2021-01-08 17:40:28 +00:00
// Code generated by go-swagger; DO NOT EDIT.
2021-01-19 16:58:40 +00:00
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
2021-01-08 17:40:28 +00:00
// 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/render/render_models"
2021-01-08 17:40:28 +00:00
)
// GetRenderTaxesReader is a Reader for the GetRenderTaxes structure.
type GetRenderTaxesReader struct {
formats strfmt . Registry
}
// ReadResponse reads a server response into the received o.
func ( o * GetRenderTaxesReader ) ReadResponse ( response runtime . ClientResponse , consumer runtime . Consumer ) ( interface { } , error ) {
switch response . Code ( ) {
case 200 :
result := NewGetRenderTaxesOK ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return result , nil
case 401 :
result := NewGetRenderTaxesUnauthorized ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 403 :
result := NewGetRenderTaxesForbidden ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 404 :
result := NewGetRenderTaxesNotFound ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 422 :
result := NewGetRenderTaxesUnprocessableEntity ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 500 :
result := NewGetRenderTaxesInternalServerError ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
default :
2021-02-09 16:56:57 +00:00
return nil , runtime . NewAPIError ( "response status code does not match any response statuses defined for this endpoint in the swagger spec" , response , response . Code ( ) )
2021-01-08 17:40:28 +00:00
}
}
// NewGetRenderTaxesOK creates a GetRenderTaxesOK with default headers values
func NewGetRenderTaxesOK ( ) * GetRenderTaxesOK {
return & GetRenderTaxesOK { }
}
2021-02-09 16:56:57 +00:00
/ * GetRenderTaxesOK describes a response with status code 200 , with default header values .
2021-01-08 17:40:28 +00:00
Rendered documents response
* /
type GetRenderTaxesOK struct {
AccessControlAllowOrigin string
Payload * render_models . DocumentResponse
}
func ( o * GetRenderTaxesOK ) Error ( ) string {
2021-02-08 23:28:46 +00:00
return fmt . Sprintf ( "[GET /accounts/tax][%d] getRenderTaxesOK %+v" , 200 , o . Payload )
2021-01-08 17:40:28 +00:00
}
func ( o * GetRenderTaxesOK ) GetPayload ( ) * render_models . DocumentResponse {
return o . Payload
}
func ( o * GetRenderTaxesOK ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
2021-02-09 16:56:57 +00:00
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response . GetHeader ( "Access-Control-Allow-Origin" )
if hdrAccessControlAllowOrigin != "" {
o . AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
2021-01-08 17:40:28 +00:00
o . Payload = new ( render_models . DocumentResponse )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewGetRenderTaxesUnauthorized creates a GetRenderTaxesUnauthorized with default headers values
func NewGetRenderTaxesUnauthorized ( ) * GetRenderTaxesUnauthorized {
return & GetRenderTaxesUnauthorized { }
}
2021-02-09 16:56:57 +00:00
/ * GetRenderTaxesUnauthorized describes a response with status code 401 , with default header values .
2021-01-08 17:40:28 +00:00
Access unauthorized , invalid API - KEY was used
* /
type GetRenderTaxesUnauthorized struct {
AccessControlAllowOrigin string
Payload * render_models . Error
}
func ( o * GetRenderTaxesUnauthorized ) Error ( ) string {
2021-02-08 23:28:46 +00:00
return fmt . Sprintf ( "[GET /accounts/tax][%d] getRenderTaxesUnauthorized %+v" , 401 , o . Payload )
2021-01-08 17:40:28 +00:00
}
func ( o * GetRenderTaxesUnauthorized ) GetPayload ( ) * render_models . Error {
return o . Payload
}
func ( o * GetRenderTaxesUnauthorized ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
2021-02-09 16:56:57 +00:00
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response . GetHeader ( "Access-Control-Allow-Origin" )
if hdrAccessControlAllowOrigin != "" {
o . AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
2021-01-08 17:40:28 +00:00
o . Payload = new ( render_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewGetRenderTaxesForbidden creates a GetRenderTaxesForbidden with default headers values
func NewGetRenderTaxesForbidden ( ) * GetRenderTaxesForbidden {
return & GetRenderTaxesForbidden { }
}
2021-02-09 16:56:57 +00:00
/ * GetRenderTaxesForbidden describes a response with status code 403 , with default header values .
2021-01-08 17:40:28 +00:00
Access forbidden , account lacks access
* /
type GetRenderTaxesForbidden struct {
AccessControlAllowOrigin string
Payload * render_models . Error
}
func ( o * GetRenderTaxesForbidden ) Error ( ) string {
2021-02-08 23:28:46 +00:00
return fmt . Sprintf ( "[GET /accounts/tax][%d] getRenderTaxesForbidden %+v" , 403 , o . Payload )
2021-01-08 17:40:28 +00:00
}
func ( o * GetRenderTaxesForbidden ) GetPayload ( ) * render_models . Error {
return o . Payload
}
func ( o * GetRenderTaxesForbidden ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
2021-02-09 16:56:57 +00:00
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response . GetHeader ( "Access-Control-Allow-Origin" )
if hdrAccessControlAllowOrigin != "" {
o . AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
2021-01-08 17:40:28 +00:00
o . Payload = new ( render_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewGetRenderTaxesNotFound creates a GetRenderTaxesNotFound with default headers values
func NewGetRenderTaxesNotFound ( ) * GetRenderTaxesNotFound {
return & GetRenderTaxesNotFound { }
}
2021-02-09 16:56:57 +00:00
/ * GetRenderTaxesNotFound describes a response with status code 404 , with default header values .
2021-01-08 17:40:28 +00:00
Resource was not found
* /
type GetRenderTaxesNotFound struct {
AccessControlAllowOrigin string
Payload * render_models . Error
}
func ( o * GetRenderTaxesNotFound ) Error ( ) string {
2021-02-08 23:28:46 +00:00
return fmt . Sprintf ( "[GET /accounts/tax][%d] getRenderTaxesNotFound %+v" , 404 , o . Payload )
2021-01-08 17:40:28 +00:00
}
func ( o * GetRenderTaxesNotFound ) GetPayload ( ) * render_models . Error {
return o . Payload
}
func ( o * GetRenderTaxesNotFound ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
2021-02-09 16:56:57 +00:00
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response . GetHeader ( "Access-Control-Allow-Origin" )
if hdrAccessControlAllowOrigin != "" {
o . AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
2021-01-08 17:40:28 +00:00
o . Payload = new ( render_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewGetRenderTaxesUnprocessableEntity creates a GetRenderTaxesUnprocessableEntity with default headers values
func NewGetRenderTaxesUnprocessableEntity ( ) * GetRenderTaxesUnprocessableEntity {
return & GetRenderTaxesUnprocessableEntity { }
}
2021-02-09 16:56:57 +00:00
/ * GetRenderTaxesUnprocessableEntity describes a response with status code 422 , with default header values .
2021-01-08 17:40:28 +00:00
Unprocessable Entity , likely a bad parameter
* /
type GetRenderTaxesUnprocessableEntity struct {
AccessControlAllowOrigin string
Payload * render_models . Error
}
func ( o * GetRenderTaxesUnprocessableEntity ) Error ( ) string {
2021-02-08 23:28:46 +00:00
return fmt . Sprintf ( "[GET /accounts/tax][%d] getRenderTaxesUnprocessableEntity %+v" , 422 , o . Payload )
2021-01-08 17:40:28 +00:00
}
func ( o * GetRenderTaxesUnprocessableEntity ) GetPayload ( ) * render_models . Error {
return o . Payload
}
func ( o * GetRenderTaxesUnprocessableEntity ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
2021-02-09 16:56:57 +00:00
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response . GetHeader ( "Access-Control-Allow-Origin" )
if hdrAccessControlAllowOrigin != "" {
o . AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
2021-01-08 17:40:28 +00:00
o . Payload = new ( render_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewGetRenderTaxesInternalServerError creates a GetRenderTaxesInternalServerError with default headers values
func NewGetRenderTaxesInternalServerError ( ) * GetRenderTaxesInternalServerError {
return & GetRenderTaxesInternalServerError { }
}
2021-02-09 16:56:57 +00:00
/ * GetRenderTaxesInternalServerError describes a response with status code 500 , with default header values .
2021-01-08 17:40:28 +00:00
Server Internal Error
* /
type GetRenderTaxesInternalServerError struct {
AccessControlAllowOrigin string
Payload * render_models . Error
}
func ( o * GetRenderTaxesInternalServerError ) Error ( ) string {
2021-02-08 23:28:46 +00:00
return fmt . Sprintf ( "[GET /accounts/tax][%d] getRenderTaxesInternalServerError %+v" , 500 , o . Payload )
2021-01-08 17:40:28 +00:00
}
func ( o * GetRenderTaxesInternalServerError ) GetPayload ( ) * render_models . Error {
return o . Payload
}
func ( o * GetRenderTaxesInternalServerError ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
2021-02-09 16:56:57 +00:00
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response . GetHeader ( "Access-Control-Allow-Origin" )
if hdrAccessControlAllowOrigin != "" {
o . AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
2021-01-08 17:40:28 +00:00
o . Payload = new ( render_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}