269 lines
7.7 KiB
Go
269 lines
7.7 KiB
Go
// 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_item
|
|
|
|
// 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"
|
|
|
|
"github.com/taxnexus/go/lib/api/plex/plex_models"
|
|
)
|
|
|
|
// GetInvoiceitemsReader is a Reader for the GetInvoiceitems structure.
|
|
type GetInvoiceitemsReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *GetInvoiceitemsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 200:
|
|
result := NewGetInvoiceitemsOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 401:
|
|
result := NewGetInvoiceitemsUnauthorized()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 403:
|
|
result := NewGetInvoiceitemsForbidden()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 404:
|
|
result := NewGetInvoiceitemsNotFound()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 422:
|
|
result := NewGetInvoiceitemsUnprocessableEntity()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 500:
|
|
result := NewGetInvoiceitemsInternalServerError()
|
|
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())
|
|
}
|
|
}
|
|
|
|
// NewGetInvoiceitemsOK creates a GetInvoiceitemsOK with default headers values
|
|
func NewGetInvoiceitemsOK() *GetInvoiceitemsOK {
|
|
return &GetInvoiceitemsOK{}
|
|
}
|
|
|
|
/*GetInvoiceitemsOK handles this case with default header values.
|
|
|
|
Taxnexus Response with TaxSummaryResponse Objects
|
|
*/
|
|
type GetInvoiceitemsOK struct {
|
|
Payload *plex_models.InvoiceItemSummaryResponse
|
|
}
|
|
|
|
func (o *GetInvoiceitemsOK) Error() string {
|
|
return fmt.Sprintf("[GET /invoiceitems][%d] getInvoiceitemsOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *GetInvoiceitemsOK) GetPayload() *plex_models.InvoiceItemSummaryResponse {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetInvoiceitemsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(plex_models.InvoiceItemSummaryResponse)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetInvoiceitemsUnauthorized creates a GetInvoiceitemsUnauthorized with default headers values
|
|
func NewGetInvoiceitemsUnauthorized() *GetInvoiceitemsUnauthorized {
|
|
return &GetInvoiceitemsUnauthorized{}
|
|
}
|
|
|
|
/*GetInvoiceitemsUnauthorized handles this case with default header values.
|
|
|
|
Access Unauthorized, invalid API-KEY was used
|
|
*/
|
|
type GetInvoiceitemsUnauthorized struct {
|
|
Payload *plex_models.Error
|
|
}
|
|
|
|
func (o *GetInvoiceitemsUnauthorized) Error() string {
|
|
return fmt.Sprintf("[GET /invoiceitems][%d] getInvoiceitemsUnauthorized %+v", 401, o.Payload)
|
|
}
|
|
|
|
func (o *GetInvoiceitemsUnauthorized) GetPayload() *plex_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetInvoiceitemsUnauthorized) 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
|
|
}
|
|
|
|
// NewGetInvoiceitemsForbidden creates a GetInvoiceitemsForbidden with default headers values
|
|
func NewGetInvoiceitemsForbidden() *GetInvoiceitemsForbidden {
|
|
return &GetInvoiceitemsForbidden{}
|
|
}
|
|
|
|
/*GetInvoiceitemsForbidden handles this case with default header values.
|
|
|
|
Access forbidden, account lacks access
|
|
*/
|
|
type GetInvoiceitemsForbidden struct {
|
|
Payload *plex_models.Error
|
|
}
|
|
|
|
func (o *GetInvoiceitemsForbidden) Error() string {
|
|
return fmt.Sprintf("[GET /invoiceitems][%d] getInvoiceitemsForbidden %+v", 403, o.Payload)
|
|
}
|
|
|
|
func (o *GetInvoiceitemsForbidden) GetPayload() *plex_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetInvoiceitemsForbidden) 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
|
|
}
|
|
|
|
// NewGetInvoiceitemsNotFound creates a GetInvoiceitemsNotFound with default headers values
|
|
func NewGetInvoiceitemsNotFound() *GetInvoiceitemsNotFound {
|
|
return &GetInvoiceitemsNotFound{}
|
|
}
|
|
|
|
/*GetInvoiceitemsNotFound handles this case with default header values.
|
|
|
|
Resource was not found
|
|
*/
|
|
type GetInvoiceitemsNotFound struct {
|
|
Payload *plex_models.Error
|
|
}
|
|
|
|
func (o *GetInvoiceitemsNotFound) Error() string {
|
|
return fmt.Sprintf("[GET /invoiceitems][%d] getInvoiceitemsNotFound %+v", 404, o.Payload)
|
|
}
|
|
|
|
func (o *GetInvoiceitemsNotFound) GetPayload() *plex_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetInvoiceitemsNotFound) 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
|
|
}
|
|
|
|
// NewGetInvoiceitemsUnprocessableEntity creates a GetInvoiceitemsUnprocessableEntity with default headers values
|
|
func NewGetInvoiceitemsUnprocessableEntity() *GetInvoiceitemsUnprocessableEntity {
|
|
return &GetInvoiceitemsUnprocessableEntity{}
|
|
}
|
|
|
|
/*GetInvoiceitemsUnprocessableEntity handles this case with default header values.
|
|
|
|
Unprocessable Entity, likely a bad parameter
|
|
*/
|
|
type GetInvoiceitemsUnprocessableEntity struct {
|
|
Payload *plex_models.Error
|
|
}
|
|
|
|
func (o *GetInvoiceitemsUnprocessableEntity) Error() string {
|
|
return fmt.Sprintf("[GET /invoiceitems][%d] getInvoiceitemsUnprocessableEntity %+v", 422, o.Payload)
|
|
}
|
|
|
|
func (o *GetInvoiceitemsUnprocessableEntity) GetPayload() *plex_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetInvoiceitemsUnprocessableEntity) 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
|
|
}
|
|
|
|
// NewGetInvoiceitemsInternalServerError creates a GetInvoiceitemsInternalServerError with default headers values
|
|
func NewGetInvoiceitemsInternalServerError() *GetInvoiceitemsInternalServerError {
|
|
return &GetInvoiceitemsInternalServerError{}
|
|
}
|
|
|
|
/*GetInvoiceitemsInternalServerError handles this case with default header values.
|
|
|
|
Server Internal Error
|
|
*/
|
|
type GetInvoiceitemsInternalServerError struct {
|
|
Payload *plex_models.Error
|
|
}
|
|
|
|
func (o *GetInvoiceitemsInternalServerError) Error() string {
|
|
return fmt.Sprintf("[GET /invoiceitems][%d] getInvoiceitemsInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *GetInvoiceitemsInternalServerError) GetPayload() *plex_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetInvoiceitemsInternalServerError) 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
|
|
}
|