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 tax
|
|
|
|
|
|
|
|
// 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
|
|
|
)
|
|
|
|
|
|
|
|
// GetDistrictTaxesReader is a Reader for the GetDistrictTaxes structure.
|
|
|
|
type GetDistrictTaxesReader struct {
|
|
|
|
formats strfmt.Registry
|
|
|
|
}
|
|
|
|
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
|
|
func (o *GetDistrictTaxesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
|
|
switch response.Code() {
|
|
|
|
case 200:
|
|
|
|
result := NewGetDistrictTaxesOK()
|
|
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return result, nil
|
|
|
|
case 401:
|
|
|
|
result := NewGetDistrictTaxesUnauthorized()
|
|
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return nil, result
|
|
|
|
case 403:
|
|
|
|
result := NewGetDistrictTaxesForbidden()
|
|
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return nil, result
|
|
|
|
case 404:
|
|
|
|
result := NewGetDistrictTaxesNotFound()
|
|
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return nil, result
|
|
|
|
case 422:
|
|
|
|
result := NewGetDistrictTaxesUnprocessableEntity()
|
|
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return nil, result
|
|
|
|
case 500:
|
|
|
|
result := NewGetDistrictTaxesInternalServerError()
|
|
|
|
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())
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewGetDistrictTaxesOK creates a GetDistrictTaxesOK with default headers values
|
|
|
|
func NewGetDistrictTaxesOK() *GetDistrictTaxesOK {
|
|
|
|
return &GetDistrictTaxesOK{}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*GetDistrictTaxesOK handles this case with default header values.
|
|
|
|
|
|
|
|
Taxnexus Response with TaxSummaryResponse Objects
|
|
|
|
*/
|
|
|
|
type GetDistrictTaxesOK struct {
|
|
|
|
Payload *plex_models.TaxSummaryResponse
|
|
|
|
}
|
|
|
|
|
|
|
|
func (o *GetDistrictTaxesOK) Error() string {
|
|
|
|
return fmt.Sprintf("[GET /taxes/districts][%d] getDistrictTaxesOK %+v", 200, o.Payload)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (o *GetDistrictTaxesOK) GetPayload() *plex_models.TaxSummaryResponse {
|
|
|
|
return o.Payload
|
|
|
|
}
|
|
|
|
|
|
|
|
func (o *GetDistrictTaxesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
|
|
|
|
o.Payload = new(plex_models.TaxSummaryResponse)
|
|
|
|
|
|
|
|
// response payload
|
|
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewGetDistrictTaxesUnauthorized creates a GetDistrictTaxesUnauthorized with default headers values
|
|
|
|
func NewGetDistrictTaxesUnauthorized() *GetDistrictTaxesUnauthorized {
|
|
|
|
return &GetDistrictTaxesUnauthorized{}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*GetDistrictTaxesUnauthorized handles this case with default header values.
|
|
|
|
|
|
|
|
Access Unauthorized, invalid API-KEY was used
|
|
|
|
*/
|
|
|
|
type GetDistrictTaxesUnauthorized struct {
|
|
|
|
Payload *plex_models.Error
|
|
|
|
}
|
|
|
|
|
|
|
|
func (o *GetDistrictTaxesUnauthorized) Error() string {
|
|
|
|
return fmt.Sprintf("[GET /taxes/districts][%d] getDistrictTaxesUnauthorized %+v", 401, o.Payload)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (o *GetDistrictTaxesUnauthorized) GetPayload() *plex_models.Error {
|
|
|
|
return o.Payload
|
|
|
|
}
|
|
|
|
|
|
|
|
func (o *GetDistrictTaxesUnauthorized) 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
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewGetDistrictTaxesForbidden creates a GetDistrictTaxesForbidden with default headers values
|
|
|
|
func NewGetDistrictTaxesForbidden() *GetDistrictTaxesForbidden {
|
|
|
|
return &GetDistrictTaxesForbidden{}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*GetDistrictTaxesForbidden handles this case with default header values.
|
|
|
|
|
|
|
|
Access forbidden, account lacks access
|
|
|
|
*/
|
|
|
|
type GetDistrictTaxesForbidden struct {
|
|
|
|
Payload *plex_models.Error
|
|
|
|
}
|
|
|
|
|
|
|
|
func (o *GetDistrictTaxesForbidden) Error() string {
|
|
|
|
return fmt.Sprintf("[GET /taxes/districts][%d] getDistrictTaxesForbidden %+v", 403, o.Payload)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (o *GetDistrictTaxesForbidden) GetPayload() *plex_models.Error {
|
|
|
|
return o.Payload
|
|
|
|
}
|
|
|
|
|
|
|
|
func (o *GetDistrictTaxesForbidden) 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
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewGetDistrictTaxesNotFound creates a GetDistrictTaxesNotFound with default headers values
|
|
|
|
func NewGetDistrictTaxesNotFound() *GetDistrictTaxesNotFound {
|
|
|
|
return &GetDistrictTaxesNotFound{}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*GetDistrictTaxesNotFound handles this case with default header values.
|
|
|
|
|
|
|
|
Resource was not found
|
|
|
|
*/
|
|
|
|
type GetDistrictTaxesNotFound struct {
|
|
|
|
Payload *plex_models.Error
|
|
|
|
}
|
|
|
|
|
|
|
|
func (o *GetDistrictTaxesNotFound) Error() string {
|
|
|
|
return fmt.Sprintf("[GET /taxes/districts][%d] getDistrictTaxesNotFound %+v", 404, o.Payload)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (o *GetDistrictTaxesNotFound) GetPayload() *plex_models.Error {
|
|
|
|
return o.Payload
|
|
|
|
}
|
|
|
|
|
|
|
|
func (o *GetDistrictTaxesNotFound) 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
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewGetDistrictTaxesUnprocessableEntity creates a GetDistrictTaxesUnprocessableEntity with default headers values
|
|
|
|
func NewGetDistrictTaxesUnprocessableEntity() *GetDistrictTaxesUnprocessableEntity {
|
|
|
|
return &GetDistrictTaxesUnprocessableEntity{}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*GetDistrictTaxesUnprocessableEntity handles this case with default header values.
|
|
|
|
|
|
|
|
Unprocessable Entity, likely a bad parameter
|
|
|
|
*/
|
|
|
|
type GetDistrictTaxesUnprocessableEntity struct {
|
|
|
|
Payload *plex_models.Error
|
|
|
|
}
|
|
|
|
|
|
|
|
func (o *GetDistrictTaxesUnprocessableEntity) Error() string {
|
|
|
|
return fmt.Sprintf("[GET /taxes/districts][%d] getDistrictTaxesUnprocessableEntity %+v", 422, o.Payload)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (o *GetDistrictTaxesUnprocessableEntity) GetPayload() *plex_models.Error {
|
|
|
|
return o.Payload
|
|
|
|
}
|
|
|
|
|
|
|
|
func (o *GetDistrictTaxesUnprocessableEntity) 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
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewGetDistrictTaxesInternalServerError creates a GetDistrictTaxesInternalServerError with default headers values
|
|
|
|
func NewGetDistrictTaxesInternalServerError() *GetDistrictTaxesInternalServerError {
|
|
|
|
return &GetDistrictTaxesInternalServerError{}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*GetDistrictTaxesInternalServerError handles this case with default header values.
|
|
|
|
|
|
|
|
Server Internal Error
|
|
|
|
*/
|
|
|
|
type GetDistrictTaxesInternalServerError struct {
|
|
|
|
Payload *plex_models.Error
|
|
|
|
}
|
|
|
|
|
|
|
|
func (o *GetDistrictTaxesInternalServerError) Error() string {
|
|
|
|
return fmt.Sprintf("[GET /taxes/districts][%d] getDistrictTaxesInternalServerError %+v", 500, o.Payload)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (o *GetDistrictTaxesInternalServerError) GetPayload() *plex_models.Error {
|
|
|
|
return o.Payload
|
|
|
|
}
|
|
|
|
|
|
|
|
func (o *GetDistrictTaxesInternalServerError) 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
|
|
|
|
}
|