lib/api/plex/plex_client/invoice/get_invoices_responses.go

269 lines
7.3 KiB
Go
Raw Permalink Normal View History

2021-01-08 17:40:28 +00:00
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package invoice
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"io"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
2021-01-10 17:03:26 +00:00
"code.tnxs.net/taxnexus/lib/api/plex/plex_models"
2021-01-08 17:40:28 +00:00
)
// GetInvoicesReader is a Reader for the GetInvoices structure.
type GetInvoicesReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GetInvoicesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetInvoicesOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewGetInvoicesUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewGetInvoicesForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewGetInvoicesNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewGetInvoicesUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewGetInvoicesInternalServerError()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("unknown error", response, response.Code())
}
}
// NewGetInvoicesOK creates a GetInvoicesOK with default headers values
func NewGetInvoicesOK() *GetInvoicesOK {
return &GetInvoicesOK{}
}
/*GetInvoicesOK handles this case with default header values.
Taxnexus Response with TaxSummaryResponse Objects
*/
type GetInvoicesOK struct {
Payload *plex_models.InvoiceSummaryResponse
}
func (o *GetInvoicesOK) Error() string {
return fmt.Sprintf("[GET /invoices][%d] getInvoicesOK %+v", 200, o.Payload)
}
func (o *GetInvoicesOK) GetPayload() *plex_models.InvoiceSummaryResponse {
return o.Payload
}
func (o *GetInvoicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(plex_models.InvoiceSummaryResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetInvoicesUnauthorized creates a GetInvoicesUnauthorized with default headers values
func NewGetInvoicesUnauthorized() *GetInvoicesUnauthorized {
return &GetInvoicesUnauthorized{}
}
/*GetInvoicesUnauthorized handles this case with default header values.
Access Unauthorized, invalid API-KEY was used
*/
type GetInvoicesUnauthorized struct {
Payload *plex_models.Error
}
func (o *GetInvoicesUnauthorized) Error() string {
return fmt.Sprintf("[GET /invoices][%d] getInvoicesUnauthorized %+v", 401, o.Payload)
}
func (o *GetInvoicesUnauthorized) GetPayload() *plex_models.Error {
return o.Payload
}
func (o *GetInvoicesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(plex_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetInvoicesForbidden creates a GetInvoicesForbidden with default headers values
func NewGetInvoicesForbidden() *GetInvoicesForbidden {
return &GetInvoicesForbidden{}
}
/*GetInvoicesForbidden handles this case with default header values.
Access forbidden, account lacks access
*/
type GetInvoicesForbidden struct {
Payload *plex_models.Error
}
func (o *GetInvoicesForbidden) Error() string {
return fmt.Sprintf("[GET /invoices][%d] getInvoicesForbidden %+v", 403, o.Payload)
}
func (o *GetInvoicesForbidden) GetPayload() *plex_models.Error {
return o.Payload
}
func (o *GetInvoicesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(plex_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetInvoicesNotFound creates a GetInvoicesNotFound with default headers values
func NewGetInvoicesNotFound() *GetInvoicesNotFound {
return &GetInvoicesNotFound{}
}
/*GetInvoicesNotFound handles this case with default header values.
Resource was not found
*/
type GetInvoicesNotFound struct {
Payload *plex_models.Error
}
func (o *GetInvoicesNotFound) Error() string {
return fmt.Sprintf("[GET /invoices][%d] getInvoicesNotFound %+v", 404, o.Payload)
}
func (o *GetInvoicesNotFound) GetPayload() *plex_models.Error {
return o.Payload
}
func (o *GetInvoicesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(plex_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetInvoicesUnprocessableEntity creates a GetInvoicesUnprocessableEntity with default headers values
func NewGetInvoicesUnprocessableEntity() *GetInvoicesUnprocessableEntity {
return &GetInvoicesUnprocessableEntity{}
}
/*GetInvoicesUnprocessableEntity handles this case with default header values.
Unprocessable Entity, likely a bad parameter
*/
type GetInvoicesUnprocessableEntity struct {
Payload *plex_models.Error
}
func (o *GetInvoicesUnprocessableEntity) Error() string {
return fmt.Sprintf("[GET /invoices][%d] getInvoicesUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetInvoicesUnprocessableEntity) GetPayload() *plex_models.Error {
return o.Payload
}
func (o *GetInvoicesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(plex_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetInvoicesInternalServerError creates a GetInvoicesInternalServerError with default headers values
func NewGetInvoicesInternalServerError() *GetInvoicesInternalServerError {
return &GetInvoicesInternalServerError{}
}
/*GetInvoicesInternalServerError handles this case with default header values.
Server Internal Error
*/
type GetInvoicesInternalServerError struct {
Payload *plex_models.Error
}
func (o *GetInvoicesInternalServerError) Error() string {
return fmt.Sprintf("[GET /invoices][%d] getInvoicesInternalServerError %+v", 500, o.Payload)
}
func (o *GetInvoicesInternalServerError) GetPayload() *plex_models.Error {
return o.Payload
}
func (o *GetInvoicesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(plex_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}