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/ops/ops_models"
2021-01-08 17:40:28 +00:00
)
// PostTaxesQuotesReader is a Reader for the PostTaxesQuotes structure.
type PostTaxesQuotesReader struct {
formats strfmt . Registry
}
// ReadResponse reads a server response into the received o.
func ( o * PostTaxesQuotesReader ) ReadResponse ( response runtime . ClientResponse , consumer runtime . Consumer ) ( interface { } , error ) {
switch response . Code ( ) {
case 200 :
result := NewPostTaxesQuotesOK ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return result , nil
case 401 :
result := NewPostTaxesQuotesUnauthorized ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 403 :
result := NewPostTaxesQuotesForbidden ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 404 :
result := NewPostTaxesQuotesNotFound ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 422 :
result := NewPostTaxesQuotesUnprocessableEntity ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 500 :
result := NewPostTaxesQuotesInternalServerError ( )
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
}
}
// NewPostTaxesQuotesOK creates a PostTaxesQuotesOK with default headers values
func NewPostTaxesQuotesOK ( ) * PostTaxesQuotesOK {
return & PostTaxesQuotesOK { }
}
2021-02-09 16:56:57 +00:00
/ * PostTaxesQuotesOK describes a response with status code 200 , with default header values .
2021-01-08 17:40:28 +00:00
Taxnexus Response with Tax Transaction Objects
* /
type PostTaxesQuotesOK struct {
AccessControlAllowOrigin string
2021-02-09 16:56:57 +00:00
CacheControl string
2021-01-08 17:40:28 +00:00
Payload * ops_models . TaxTransactionResponse
}
func ( o * PostTaxesQuotesOK ) Error ( ) string {
return fmt . Sprintf ( "[POST /taxes/quotes][%d] postTaxesQuotesOK %+v" , 200 , o . Payload )
}
func ( o * PostTaxesQuotesOK ) GetPayload ( ) * ops_models . TaxTransactionResponse {
return o . Payload
}
func ( o * PostTaxesQuotesOK ) 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" )
2021-01-08 17:40:28 +00:00
2021-02-09 16:56:57 +00:00
if hdrAccessControlAllowOrigin != "" {
o . AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
// hydrates response header Cache-Control
hdrCacheControl := response . GetHeader ( "Cache-Control" )
if hdrCacheControl != "" {
o . CacheControl = hdrCacheControl
}
2021-01-08 17:40:28 +00:00
o . Payload = new ( ops_models . TaxTransactionResponse )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewPostTaxesQuotesUnauthorized creates a PostTaxesQuotesUnauthorized with default headers values
func NewPostTaxesQuotesUnauthorized ( ) * PostTaxesQuotesUnauthorized {
return & PostTaxesQuotesUnauthorized { }
}
2021-02-09 16:56:57 +00:00
/ * PostTaxesQuotesUnauthorized 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 PostTaxesQuotesUnauthorized struct {
AccessControlAllowOrigin string
Payload * ops_models . Error
}
func ( o * PostTaxesQuotesUnauthorized ) Error ( ) string {
return fmt . Sprintf ( "[POST /taxes/quotes][%d] postTaxesQuotesUnauthorized %+v" , 401 , o . Payload )
}
func ( o * PostTaxesQuotesUnauthorized ) GetPayload ( ) * ops_models . Error {
return o . Payload
}
func ( o * PostTaxesQuotesUnauthorized ) 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 ( ops_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewPostTaxesQuotesForbidden creates a PostTaxesQuotesForbidden with default headers values
func NewPostTaxesQuotesForbidden ( ) * PostTaxesQuotesForbidden {
return & PostTaxesQuotesForbidden { }
}
2021-02-09 16:56:57 +00:00
/ * PostTaxesQuotesForbidden 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 PostTaxesQuotesForbidden struct {
AccessControlAllowOrigin string
Payload * ops_models . Error
}
func ( o * PostTaxesQuotesForbidden ) Error ( ) string {
return fmt . Sprintf ( "[POST /taxes/quotes][%d] postTaxesQuotesForbidden %+v" , 403 , o . Payload )
}
func ( o * PostTaxesQuotesForbidden ) GetPayload ( ) * ops_models . Error {
return o . Payload
}
func ( o * PostTaxesQuotesForbidden ) 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 ( ops_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewPostTaxesQuotesNotFound creates a PostTaxesQuotesNotFound with default headers values
func NewPostTaxesQuotesNotFound ( ) * PostTaxesQuotesNotFound {
return & PostTaxesQuotesNotFound { }
}
2021-02-09 16:56:57 +00:00
/ * PostTaxesQuotesNotFound describes a response with status code 404 , with default header values .
2021-01-08 17:40:28 +00:00
Resource was not found
* /
type PostTaxesQuotesNotFound struct {
AccessControlAllowOrigin string
Payload * ops_models . Error
}
func ( o * PostTaxesQuotesNotFound ) Error ( ) string {
return fmt . Sprintf ( "[POST /taxes/quotes][%d] postTaxesQuotesNotFound %+v" , 404 , o . Payload )
}
func ( o * PostTaxesQuotesNotFound ) GetPayload ( ) * ops_models . Error {
return o . Payload
}
func ( o * PostTaxesQuotesNotFound ) 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 ( ops_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewPostTaxesQuotesUnprocessableEntity creates a PostTaxesQuotesUnprocessableEntity with default headers values
func NewPostTaxesQuotesUnprocessableEntity ( ) * PostTaxesQuotesUnprocessableEntity {
return & PostTaxesQuotesUnprocessableEntity { }
}
2021-02-09 16:56:57 +00:00
/ * PostTaxesQuotesUnprocessableEntity 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 PostTaxesQuotesUnprocessableEntity struct {
AccessControlAllowOrigin string
Payload * ops_models . Error
}
func ( o * PostTaxesQuotesUnprocessableEntity ) Error ( ) string {
return fmt . Sprintf ( "[POST /taxes/quotes][%d] postTaxesQuotesUnprocessableEntity %+v" , 422 , o . Payload )
}
func ( o * PostTaxesQuotesUnprocessableEntity ) GetPayload ( ) * ops_models . Error {
return o . Payload
}
func ( o * PostTaxesQuotesUnprocessableEntity ) 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 ( ops_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewPostTaxesQuotesInternalServerError creates a PostTaxesQuotesInternalServerError with default headers values
func NewPostTaxesQuotesInternalServerError ( ) * PostTaxesQuotesInternalServerError {
return & PostTaxesQuotesInternalServerError { }
}
2021-02-09 16:56:57 +00:00
/ * PostTaxesQuotesInternalServerError describes a response with status code 500 , with default header values .
2021-01-08 17:40:28 +00:00
Server Internal Error
* /
type PostTaxesQuotesInternalServerError struct {
AccessControlAllowOrigin string
Payload * ops_models . Error
}
func ( o * PostTaxesQuotesInternalServerError ) Error ( ) string {
return fmt . Sprintf ( "[POST /taxes/quotes][%d] postTaxesQuotesInternalServerError %+v" , 500 , o . Payload )
}
func ( o * PostTaxesQuotesInternalServerError ) GetPayload ( ) * ops_models . Error {
return o . Payload
}
func ( o * PostTaxesQuotesInternalServerError ) 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 ( ops_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}