swaggersync

v0.1.50 v0.1.50
Vernon Keenan 2021-02-02 17:41:29 -08:00
parent 3fc2004190
commit 8a3f183375
16 changed files with 98 additions and 1779 deletions

View File

@ -1,68 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package plex_models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// RequestMeta request meta
//
// swagger:model RequestMeta
type RequestMeta struct {
// Taxnexus Account Number of the Reseller or OEM
// Required: true
TaxnexusAccount *string `json:"TaxnexusAccount"`
}
// Validate validates this request meta
func (m *RequestMeta) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateTaxnexusAccount(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *RequestMeta) validateTaxnexusAccount(formats strfmt.Registry) error {
if err := validate.Required("TaxnexusAccount", "body", m.TaxnexusAccount); err != nil {
return err
}
return nil
}
// MarshalBinary interface implementation
func (m *RequestMeta) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *RequestMeta) UnmarshalBinary(b []byte) error {
var res RequestMeta
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@ -82,6 +82,48 @@ type TaxReturnPanel struct {
// district type
DistrictType string `json:"DistrictType,omitempty"`
// estimated business taxes
EstimatedBusinessTaxes []float64 `json:"EstimatedBusinessTaxes"`
// estimated business taxes total
EstimatedBusinessTaxesTotal float64 `json:"EstimatedBusinessTaxesTotal,omitempty"`
// estimated c o g s
EstimatedCOGS []float64 `json:"EstimatedCOGS"`
// estimated c o g s total
EstimatedCOGSTotal float64 `json:"EstimatedCOGSTotal,omitempty"`
// estimated cannabis taxes
EstimatedCannabisTaxes []float64 `json:"EstimatedCannabisTaxes"`
// estimated cannabis taxes total
EstimatedCannabisTaxesTotal float64 `json:"EstimatedCannabisTaxesTotal,omitempty"`
// estimated discounts
EstimatedDiscounts []float64 `json:"EstimatedDiscounts"`
// estimated discounts total
EstimatedDiscountsTotal float64 `json:"EstimatedDiscountsTotal,omitempty"`
// estimated sales taxes
EstimatedSalesTaxes []float64 `json:"EstimatedSalesTaxes"`
// estimated sales taxes total
EstimatedSalesTaxesTotal float64 `json:"EstimatedSalesTaxesTotal,omitempty"`
// estimated subtotals
EstimatedSubtotals []float64 `json:"EstimatedSubtotals"`
// estimated subtotals total
EstimatedSubtotalsTotal float64 `json:"EstimatedSubtotalsTotal,omitempty"`
// estimated totals
EstimatedTotals []float64 `json:"EstimatedTotals"`
// estimated totals total
EstimatedTotalsTotal float64 `json:"EstimatedTotalsTotal,omitempty"`
// excise taxes
ExciseTaxes []float64 `json:"ExciseTaxes"`

View File

@ -37,10 +37,6 @@ type ClientService interface {
IngestOptions(params *IngestOptionsParams) (*IngestOptionsOK, error)
InvoiceOptions(params *InvoiceOptionsParams) (*InvoiceOptionsOK, error)
ReportOptions(params *ReportOptionsParams) (*ReportOptionsOK, error)
TaxOptions(params *TaxOptionsParams) (*TaxOptionsOK, error)
SetTransport(transport runtime.ClientTransport)
@ -148,74 +144,6 @@ func (a *Client) IngestOptions(params *IngestOptionsParams) (*IngestOptionsOK, e
panic(msg)
}
/*
InvoiceOptions CORS support
*/
func (a *Client) InvoiceOptions(params *InvoiceOptionsParams) (*InvoiceOptionsOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewInvoiceOptionsParams()
}
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "invoiceOptions",
Method: "OPTIONS",
PathPattern: "/invoices",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &InvoiceOptionsReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
})
if err != nil {
return nil, err
}
success, ok := result.(*InvoiceOptionsOK)
if ok {
return success, nil
}
// unexpected success response
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
msg := fmt.Sprintf("unexpected success response for invoiceOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
ReportOptions CORS support
*/
func (a *Client) ReportOptions(params *ReportOptionsParams) (*ReportOptionsOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewReportOptionsParams()
}
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "reportOptions",
Method: "OPTIONS",
PathPattern: "/reports",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &ReportOptionsReader{formats: a.formats},
Context: params.Context,
Client: params.HTTPClient,
})
if err != nil {
return nil, err
}
success, ok := result.(*ReportOptionsOK)
if ok {
return success, nil
}
// unexpected success response
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
msg := fmt.Sprintf("unexpected success response for reportOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
/*
TaxOptions CORS support
*/

View File

@ -1,116 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package cors
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"net/http"
"time"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
cr "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
)
// NewInvoiceOptionsParams creates a new InvoiceOptionsParams object
// with the default values initialized.
func NewInvoiceOptionsParams() *InvoiceOptionsParams {
return &InvoiceOptionsParams{
timeout: cr.DefaultTimeout,
}
}
// NewInvoiceOptionsParamsWithTimeout creates a new InvoiceOptionsParams object
// with the default values initialized, and the ability to set a timeout on a request
func NewInvoiceOptionsParamsWithTimeout(timeout time.Duration) *InvoiceOptionsParams {
return &InvoiceOptionsParams{
timeout: timeout,
}
}
// NewInvoiceOptionsParamsWithContext creates a new InvoiceOptionsParams object
// with the default values initialized, and the ability to set a context for a request
func NewInvoiceOptionsParamsWithContext(ctx context.Context) *InvoiceOptionsParams {
return &InvoiceOptionsParams{
Context: ctx,
}
}
// NewInvoiceOptionsParamsWithHTTPClient creates a new InvoiceOptionsParams object
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewInvoiceOptionsParamsWithHTTPClient(client *http.Client) *InvoiceOptionsParams {
return &InvoiceOptionsParams{
HTTPClient: client,
}
}
/*InvoiceOptionsParams contains all the parameters to send to the API endpoint
for the invoice options operation typically these are written to a http.Request
*/
type InvoiceOptionsParams struct {
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithTimeout adds the timeout to the invoice options params
func (o *InvoiceOptionsParams) WithTimeout(timeout time.Duration) *InvoiceOptionsParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the invoice options params
func (o *InvoiceOptionsParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the invoice options params
func (o *InvoiceOptionsParams) WithContext(ctx context.Context) *InvoiceOptionsParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the invoice options params
func (o *InvoiceOptionsParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the invoice options params
func (o *InvoiceOptionsParams) WithHTTPClient(client *http.Client) *InvoiceOptionsParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the invoice options params
func (o *InvoiceOptionsParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WriteToRequest writes these params to a swagger request
func (o *InvoiceOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}

View File

@ -1,92 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package cors
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
)
// InvoiceOptionsReader is a Reader for the InvoiceOptions structure.
type InvoiceOptionsReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *InvoiceOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewInvoiceOptionsOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
return nil, runtime.NewAPIError("unknown error", response, response.Code())
}
}
// NewInvoiceOptionsOK creates a InvoiceOptionsOK with default headers values
func NewInvoiceOptionsOK() *InvoiceOptionsOK {
return &InvoiceOptionsOK{}
}
/*InvoiceOptionsOK handles this case with default header values.
CORS OPTIONS response
*/
type InvoiceOptionsOK struct {
AccessControlAllowCredentials string
AccessControlAllowHeaders string
AccessControlAllowMethods string
AccessControlAllowOrigin string
AccessControlExposeHeaders string
AccessControlMaxAge string
CacheControl string
}
func (o *InvoiceOptionsOK) Error() string {
return fmt.Sprintf("[OPTIONS /invoices][%d] invoiceOptionsOK ", 200)
}
func (o *InvoiceOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// response header Access-Control-Allow-Credentials
o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials")
// response header Access-Control-Allow-Headers
o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers")
// response header Access-Control-Allow-Methods
o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods")
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
// response header Access-Control-Expose-Headers
o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers")
// response header Access-Control-Max-Age
o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age")
// response header Cache-Control
o.CacheControl = response.GetHeader("Cache-Control")
return nil
}

View File

@ -1,116 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package cors
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"net/http"
"time"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
cr "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
)
// NewReportOptionsParams creates a new ReportOptionsParams object
// with the default values initialized.
func NewReportOptionsParams() *ReportOptionsParams {
return &ReportOptionsParams{
timeout: cr.DefaultTimeout,
}
}
// NewReportOptionsParamsWithTimeout creates a new ReportOptionsParams object
// with the default values initialized, and the ability to set a timeout on a request
func NewReportOptionsParamsWithTimeout(timeout time.Duration) *ReportOptionsParams {
return &ReportOptionsParams{
timeout: timeout,
}
}
// NewReportOptionsParamsWithContext creates a new ReportOptionsParams object
// with the default values initialized, and the ability to set a context for a request
func NewReportOptionsParamsWithContext(ctx context.Context) *ReportOptionsParams {
return &ReportOptionsParams{
Context: ctx,
}
}
// NewReportOptionsParamsWithHTTPClient creates a new ReportOptionsParams object
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewReportOptionsParamsWithHTTPClient(client *http.Client) *ReportOptionsParams {
return &ReportOptionsParams{
HTTPClient: client,
}
}
/*ReportOptionsParams contains all the parameters to send to the API endpoint
for the report options operation typically these are written to a http.Request
*/
type ReportOptionsParams struct {
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithTimeout adds the timeout to the report options params
func (o *ReportOptionsParams) WithTimeout(timeout time.Duration) *ReportOptionsParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the report options params
func (o *ReportOptionsParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the report options params
func (o *ReportOptionsParams) WithContext(ctx context.Context) *ReportOptionsParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the report options params
func (o *ReportOptionsParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the report options params
func (o *ReportOptionsParams) WithHTTPClient(client *http.Client) *ReportOptionsParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the report options params
func (o *ReportOptionsParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WriteToRequest writes these params to a swagger request
func (o *ReportOptionsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}

View File

@ -1,92 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package cors
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
)
// ReportOptionsReader is a Reader for the ReportOptions structure.
type ReportOptionsReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *ReportOptionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewReportOptionsOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
default:
return nil, runtime.NewAPIError("unknown error", response, response.Code())
}
}
// NewReportOptionsOK creates a ReportOptionsOK with default headers values
func NewReportOptionsOK() *ReportOptionsOK {
return &ReportOptionsOK{}
}
/*ReportOptionsOK handles this case with default header values.
CORS OPTIONS response
*/
type ReportOptionsOK struct {
AccessControlAllowCredentials string
AccessControlAllowHeaders string
AccessControlAllowMethods string
AccessControlAllowOrigin string
AccessControlExposeHeaders string
AccessControlMaxAge string
CacheControl string
}
func (o *ReportOptionsOK) Error() string {
return fmt.Sprintf("[OPTIONS /reports][%d] reportOptionsOK ", 200)
}
func (o *ReportOptionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// response header Access-Control-Allow-Credentials
o.AccessControlAllowCredentials = response.GetHeader("Access-Control-Allow-Credentials")
// response header Access-Control-Allow-Headers
o.AccessControlAllowHeaders = response.GetHeader("Access-Control-Allow-Headers")
// response header Access-Control-Allow-Methods
o.AccessControlAllowMethods = response.GetHeader("Access-Control-Allow-Methods")
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
// response header Access-Control-Expose-Headers
o.AccessControlExposeHeaders = response.GetHeader("Access-Control-Expose-Headers")
// response header Access-Control-Max-Age
o.AccessControlMaxAge = response.GetHeader("Access-Control-Max-Age")
// response header Cache-Control
o.CacheControl = response.GetHeader("Cache-Control")
return nil
}

View File

@ -1,143 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 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 (
"context"
"net/http"
"time"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
cr "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
)
// NewGetRenderInvoiceParams creates a new GetRenderInvoiceParams object
// with the default values initialized.
func NewGetRenderInvoiceParams() *GetRenderInvoiceParams {
var ()
return &GetRenderInvoiceParams{
timeout: cr.DefaultTimeout,
}
}
// NewGetRenderInvoiceParamsWithTimeout creates a new GetRenderInvoiceParams object
// with the default values initialized, and the ability to set a timeout on a request
func NewGetRenderInvoiceParamsWithTimeout(timeout time.Duration) *GetRenderInvoiceParams {
var ()
return &GetRenderInvoiceParams{
timeout: timeout,
}
}
// NewGetRenderInvoiceParamsWithContext creates a new GetRenderInvoiceParams object
// with the default values initialized, and the ability to set a context for a request
func NewGetRenderInvoiceParamsWithContext(ctx context.Context) *GetRenderInvoiceParams {
var ()
return &GetRenderInvoiceParams{
Context: ctx,
}
}
// NewGetRenderInvoiceParamsWithHTTPClient creates a new GetRenderInvoiceParams object
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewGetRenderInvoiceParamsWithHTTPClient(client *http.Client) *GetRenderInvoiceParams {
var ()
return &GetRenderInvoiceParams{
HTTPClient: client,
}
}
/*GetRenderInvoiceParams contains all the parameters to send to the API endpoint
for the get render invoice operation typically these are written to a http.Request
*/
type GetRenderInvoiceParams struct {
/*InvoiceID
Taxnexus Id of the Invoice to be retrieved
*/
InvoiceID string
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithTimeout adds the timeout to the get render invoice params
func (o *GetRenderInvoiceParams) WithTimeout(timeout time.Duration) *GetRenderInvoiceParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the get render invoice params
func (o *GetRenderInvoiceParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the get render invoice params
func (o *GetRenderInvoiceParams) WithContext(ctx context.Context) *GetRenderInvoiceParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the get render invoice params
func (o *GetRenderInvoiceParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the get render invoice params
func (o *GetRenderInvoiceParams) WithHTTPClient(client *http.Client) *GetRenderInvoiceParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the get render invoice params
func (o *GetRenderInvoiceParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithInvoiceID adds the invoiceID to the get render invoice params
func (o *GetRenderInvoiceParams) WithInvoiceID(invoiceID string) *GetRenderInvoiceParams {
o.SetInvoiceID(invoiceID)
return o
}
// SetInvoiceID adds the invoiceId to the get render invoice params
func (o *GetRenderInvoiceParams) SetInvoiceID(invoiceID string) {
o.InvoiceID = invoiceID
}
// WriteToRequest writes these params to a swagger request
func (o *GetRenderInvoiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// query param invoiceId
qrInvoiceID := o.InvoiceID
qInvoiceID := qrInvoiceID
if qInvoiceID != "" {
if err := r.SetQueryParam("invoiceId", qInvoiceID); err != nil {
return err
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}

View File

@ -1,298 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 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"
"code.tnxs.net/taxnexus/lib/api/render/render_models"
)
// GetRenderInvoiceReader is a Reader for the GetRenderInvoice structure.
type GetRenderInvoiceReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GetRenderInvoiceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetRenderInvoiceOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewGetRenderInvoiceUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewGetRenderInvoiceForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewGetRenderInvoiceNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewGetRenderInvoiceUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewGetRenderInvoiceInternalServerError()
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())
}
}
// NewGetRenderInvoiceOK creates a GetRenderInvoiceOK with default headers values
func NewGetRenderInvoiceOK() *GetRenderInvoiceOK {
return &GetRenderInvoiceOK{}
}
/*GetRenderInvoiceOK handles this case with default header values.
Rendered documents response
*/
type GetRenderInvoiceOK struct {
AccessControlAllowOrigin string
Payload *render_models.DocumentResponse
}
func (o *GetRenderInvoiceOK) Error() string {
return fmt.Sprintf("[GET /invoices][%d] getRenderInvoiceOK %+v", 200, o.Payload)
}
func (o *GetRenderInvoiceOK) GetPayload() *render_models.DocumentResponse {
return o.Payload
}
func (o *GetRenderInvoiceOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
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
}
// NewGetRenderInvoiceUnauthorized creates a GetRenderInvoiceUnauthorized with default headers values
func NewGetRenderInvoiceUnauthorized() *GetRenderInvoiceUnauthorized {
return &GetRenderInvoiceUnauthorized{}
}
/*GetRenderInvoiceUnauthorized handles this case with default header values.
Access unauthorized, invalid API-KEY was used
*/
type GetRenderInvoiceUnauthorized struct {
AccessControlAllowOrigin string
Payload *render_models.Error
}
func (o *GetRenderInvoiceUnauthorized) Error() string {
return fmt.Sprintf("[GET /invoices][%d] getRenderInvoiceUnauthorized %+v", 401, o.Payload)
}
func (o *GetRenderInvoiceUnauthorized) GetPayload() *render_models.Error {
return o.Payload
}
func (o *GetRenderInvoiceUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
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
}
// NewGetRenderInvoiceForbidden creates a GetRenderInvoiceForbidden with default headers values
func NewGetRenderInvoiceForbidden() *GetRenderInvoiceForbidden {
return &GetRenderInvoiceForbidden{}
}
/*GetRenderInvoiceForbidden handles this case with default header values.
Access forbidden, account lacks access
*/
type GetRenderInvoiceForbidden struct {
AccessControlAllowOrigin string
Payload *render_models.Error
}
func (o *GetRenderInvoiceForbidden) Error() string {
return fmt.Sprintf("[GET /invoices][%d] getRenderInvoiceForbidden %+v", 403, o.Payload)
}
func (o *GetRenderInvoiceForbidden) GetPayload() *render_models.Error {
return o.Payload
}
func (o *GetRenderInvoiceForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
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
}
// NewGetRenderInvoiceNotFound creates a GetRenderInvoiceNotFound with default headers values
func NewGetRenderInvoiceNotFound() *GetRenderInvoiceNotFound {
return &GetRenderInvoiceNotFound{}
}
/*GetRenderInvoiceNotFound handles this case with default header values.
Resource was not found
*/
type GetRenderInvoiceNotFound struct {
AccessControlAllowOrigin string
Payload *render_models.Error
}
func (o *GetRenderInvoiceNotFound) Error() string {
return fmt.Sprintf("[GET /invoices][%d] getRenderInvoiceNotFound %+v", 404, o.Payload)
}
func (o *GetRenderInvoiceNotFound) GetPayload() *render_models.Error {
return o.Payload
}
func (o *GetRenderInvoiceNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
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
}
// NewGetRenderInvoiceUnprocessableEntity creates a GetRenderInvoiceUnprocessableEntity with default headers values
func NewGetRenderInvoiceUnprocessableEntity() *GetRenderInvoiceUnprocessableEntity {
return &GetRenderInvoiceUnprocessableEntity{}
}
/*GetRenderInvoiceUnprocessableEntity handles this case with default header values.
Unprocessable Entity, likely a bad parameter
*/
type GetRenderInvoiceUnprocessableEntity struct {
AccessControlAllowOrigin string
Payload *render_models.Error
}
func (o *GetRenderInvoiceUnprocessableEntity) Error() string {
return fmt.Sprintf("[GET /invoices][%d] getRenderInvoiceUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetRenderInvoiceUnprocessableEntity) GetPayload() *render_models.Error {
return o.Payload
}
func (o *GetRenderInvoiceUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
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
}
// NewGetRenderInvoiceInternalServerError creates a GetRenderInvoiceInternalServerError with default headers values
func NewGetRenderInvoiceInternalServerError() *GetRenderInvoiceInternalServerError {
return &GetRenderInvoiceInternalServerError{}
}
/*GetRenderInvoiceInternalServerError handles this case with default header values.
Server Internal Error
*/
type GetRenderInvoiceInternalServerError struct {
AccessControlAllowOrigin string
Payload *render_models.Error
}
func (o *GetRenderInvoiceInternalServerError) Error() string {
return fmt.Sprintf("[GET /invoices][%d] getRenderInvoiceInternalServerError %+v", 500, o.Payload)
}
func (o *GetRenderInvoiceInternalServerError) GetPayload() *render_models.Error {
return o.Payload
}
func (o *GetRenderInvoiceInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
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
}

View File

@ -1,79 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 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"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
)
// New creates a new invoice API client.
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
return &Client{transport: transport, formats: formats}
}
/*
Client for invoice API
*/
type Client struct {
transport runtime.ClientTransport
formats strfmt.Registry
}
// ClientService is the interface for Client methods
type ClientService interface {
GetRenderInvoice(params *GetRenderInvoiceParams, authInfo runtime.ClientAuthInfoWriter) (*GetRenderInvoiceOK, error)
SetTransport(transport runtime.ClientTransport)
}
/*
GetRenderInvoice generates p d f from an invoice ID
Generate PDF from an Invoice ID
*/
func (a *Client) GetRenderInvoice(params *GetRenderInvoiceParams, authInfo runtime.ClientAuthInfoWriter) (*GetRenderInvoiceOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetRenderInvoiceParams()
}
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "getRenderInvoice",
Method: "GET",
PathPattern: "/invoices",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &GetRenderInvoiceReader{formats: a.formats},
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
})
if err != nil {
return nil, err
}
success, ok := result.(*GetRenderInvoiceOK)
if ok {
return success, nil
}
// unexpected success response
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
msg := fmt.Sprintf("unexpected success response for getRenderInvoice: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
// SetTransport changes the transport on the client
func (a *Client) SetTransport(transport runtime.ClientTransport) {
a.transport = transport
}

View File

@ -18,8 +18,6 @@ import (
"code.tnxs.net/taxnexus/lib/api/render/render_client/cors"
"code.tnxs.net/taxnexus/lib/api/render/render_client/county"
"code.tnxs.net/taxnexus/lib/api/render/render_client/ingest"
"code.tnxs.net/taxnexus/lib/api/render/render_client/invoice"
"code.tnxs.net/taxnexus/lib/api/render/render_client/report"
"code.tnxs.net/taxnexus/lib/api/render/render_client/tax"
)
@ -69,8 +67,6 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *Render {
cli.Cors = cors.New(transport, formats)
cli.County = county.New(transport, formats)
cli.Ingest = ingest.New(transport, formats)
cli.Invoice = invoice.New(transport, formats)
cli.Report = report.New(transport, formats)
cli.Tax = tax.New(transport, formats)
return cli
}
@ -124,10 +120,6 @@ type Render struct {
Ingest ingest.ClientService
Invoice invoice.ClientService
Report report.ClientService
Tax tax.ClientService
Transport runtime.ClientTransport
@ -140,7 +132,5 @@ func (c *Render) SetTransport(transport runtime.ClientTransport) {
c.Cors.SetTransport(transport)
c.County.SetTransport(transport)
c.Ingest.SetTransport(transport)
c.Invoice.SetTransport(transport)
c.Report.SetTransport(transport)
c.Tax.SetTransport(transport)
}

View File

@ -1,240 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package report
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"net/http"
"time"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
cr "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// NewGetRenderReportsParams creates a new GetRenderReportsParams object
// with the default values initialized.
func NewGetRenderReportsParams() *GetRenderReportsParams {
var ()
return &GetRenderReportsParams{
timeout: cr.DefaultTimeout,
}
}
// NewGetRenderReportsParamsWithTimeout creates a new GetRenderReportsParams object
// with the default values initialized, and the ability to set a timeout on a request
func NewGetRenderReportsParamsWithTimeout(timeout time.Duration) *GetRenderReportsParams {
var ()
return &GetRenderReportsParams{
timeout: timeout,
}
}
// NewGetRenderReportsParamsWithContext creates a new GetRenderReportsParams object
// with the default values initialized, and the ability to set a context for a request
func NewGetRenderReportsParamsWithContext(ctx context.Context) *GetRenderReportsParams {
var ()
return &GetRenderReportsParams{
Context: ctx,
}
}
// NewGetRenderReportsParamsWithHTTPClient creates a new GetRenderReportsParams object
// with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewGetRenderReportsParamsWithHTTPClient(client *http.Client) *GetRenderReportsParams {
var ()
return &GetRenderReportsParams{
HTTPClient: client,
}
}
/*GetRenderReportsParams contains all the parameters to send to the API endpoint
for the get render reports operation typically these are written to a http.Request
*/
type GetRenderReportsParams struct {
/*AccountID
Taxnexus Id of the Account to be used a record retrieval
*/
AccountID string
/*Month
The Month Number (1,2, ..., 12) of the report
*/
Month *int64
/*Quarter
The Quarter Number (1,2,3,4) of the report
*/
Quarter *int64
/*Year
The year of the report
*/
Year *int64
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithTimeout adds the timeout to the get render reports params
func (o *GetRenderReportsParams) WithTimeout(timeout time.Duration) *GetRenderReportsParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the get render reports params
func (o *GetRenderReportsParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the get render reports params
func (o *GetRenderReportsParams) WithContext(ctx context.Context) *GetRenderReportsParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the get render reports params
func (o *GetRenderReportsParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the get render reports params
func (o *GetRenderReportsParams) WithHTTPClient(client *http.Client) *GetRenderReportsParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the get render reports params
func (o *GetRenderReportsParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithAccountID adds the accountID to the get render reports params
func (o *GetRenderReportsParams) WithAccountID(accountID string) *GetRenderReportsParams {
o.SetAccountID(accountID)
return o
}
// SetAccountID adds the accountId to the get render reports params
func (o *GetRenderReportsParams) SetAccountID(accountID string) {
o.AccountID = accountID
}
// WithMonth adds the month to the get render reports params
func (o *GetRenderReportsParams) WithMonth(month *int64) *GetRenderReportsParams {
o.SetMonth(month)
return o
}
// SetMonth adds the month to the get render reports params
func (o *GetRenderReportsParams) SetMonth(month *int64) {
o.Month = month
}
// WithQuarter adds the quarter to the get render reports params
func (o *GetRenderReportsParams) WithQuarter(quarter *int64) *GetRenderReportsParams {
o.SetQuarter(quarter)
return o
}
// SetQuarter adds the quarter to the get render reports params
func (o *GetRenderReportsParams) SetQuarter(quarter *int64) {
o.Quarter = quarter
}
// WithYear adds the year to the get render reports params
func (o *GetRenderReportsParams) WithYear(year *int64) *GetRenderReportsParams {
o.SetYear(year)
return o
}
// SetYear adds the year to the get render reports params
func (o *GetRenderReportsParams) SetYear(year *int64) {
o.Year = year
}
// WriteToRequest writes these params to a swagger request
func (o *GetRenderReportsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
// query param accountId
qrAccountID := o.AccountID
qAccountID := qrAccountID
if qAccountID != "" {
if err := r.SetQueryParam("accountId", qAccountID); err != nil {
return err
}
}
if o.Month != nil {
// query param month
var qrMonth int64
if o.Month != nil {
qrMonth = *o.Month
}
qMonth := swag.FormatInt64(qrMonth)
if qMonth != "" {
if err := r.SetQueryParam("month", qMonth); err != nil {
return err
}
}
}
if o.Quarter != nil {
// query param quarter
var qrQuarter int64
if o.Quarter != nil {
qrQuarter = *o.Quarter
}
qQuarter := swag.FormatInt64(qrQuarter)
if qQuarter != "" {
if err := r.SetQueryParam("quarter", qQuarter); err != nil {
return err
}
}
}
if o.Year != nil {
// query param year
var qrYear int64
if o.Year != nil {
qrYear = *o.Year
}
qYear := swag.FormatInt64(qrYear)
if qYear != "" {
if err := r.SetQueryParam("year", qYear); err != nil {
return err
}
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}

View File

@ -1,298 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package report
// 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"
"code.tnxs.net/taxnexus/lib/api/render/render_models"
)
// GetRenderReportsReader is a Reader for the GetRenderReports structure.
type GetRenderReportsReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GetRenderReportsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetRenderReportsOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewGetRenderReportsUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewGetRenderReportsForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewGetRenderReportsNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewGetRenderReportsUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewGetRenderReportsInternalServerError()
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())
}
}
// NewGetRenderReportsOK creates a GetRenderReportsOK with default headers values
func NewGetRenderReportsOK() *GetRenderReportsOK {
return &GetRenderReportsOK{}
}
/*GetRenderReportsOK handles this case with default header values.
Rendered documents response
*/
type GetRenderReportsOK struct {
AccessControlAllowOrigin string
Payload *render_models.DocumentResponse
}
func (o *GetRenderReportsOK) Error() string {
return fmt.Sprintf("[GET /reports][%d] getRenderReportsOK %+v", 200, o.Payload)
}
func (o *GetRenderReportsOK) GetPayload() *render_models.DocumentResponse {
return o.Payload
}
func (o *GetRenderReportsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
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
}
// NewGetRenderReportsUnauthorized creates a GetRenderReportsUnauthorized with default headers values
func NewGetRenderReportsUnauthorized() *GetRenderReportsUnauthorized {
return &GetRenderReportsUnauthorized{}
}
/*GetRenderReportsUnauthorized handles this case with default header values.
Access unauthorized, invalid API-KEY was used
*/
type GetRenderReportsUnauthorized struct {
AccessControlAllowOrigin string
Payload *render_models.Error
}
func (o *GetRenderReportsUnauthorized) Error() string {
return fmt.Sprintf("[GET /reports][%d] getRenderReportsUnauthorized %+v", 401, o.Payload)
}
func (o *GetRenderReportsUnauthorized) GetPayload() *render_models.Error {
return o.Payload
}
func (o *GetRenderReportsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
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
}
// NewGetRenderReportsForbidden creates a GetRenderReportsForbidden with default headers values
func NewGetRenderReportsForbidden() *GetRenderReportsForbidden {
return &GetRenderReportsForbidden{}
}
/*GetRenderReportsForbidden handles this case with default header values.
Access forbidden, account lacks access
*/
type GetRenderReportsForbidden struct {
AccessControlAllowOrigin string
Payload *render_models.Error
}
func (o *GetRenderReportsForbidden) Error() string {
return fmt.Sprintf("[GET /reports][%d] getRenderReportsForbidden %+v", 403, o.Payload)
}
func (o *GetRenderReportsForbidden) GetPayload() *render_models.Error {
return o.Payload
}
func (o *GetRenderReportsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
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
}
// NewGetRenderReportsNotFound creates a GetRenderReportsNotFound with default headers values
func NewGetRenderReportsNotFound() *GetRenderReportsNotFound {
return &GetRenderReportsNotFound{}
}
/*GetRenderReportsNotFound handles this case with default header values.
Resource was not found
*/
type GetRenderReportsNotFound struct {
AccessControlAllowOrigin string
Payload *render_models.Error
}
func (o *GetRenderReportsNotFound) Error() string {
return fmt.Sprintf("[GET /reports][%d] getRenderReportsNotFound %+v", 404, o.Payload)
}
func (o *GetRenderReportsNotFound) GetPayload() *render_models.Error {
return o.Payload
}
func (o *GetRenderReportsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
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
}
// NewGetRenderReportsUnprocessableEntity creates a GetRenderReportsUnprocessableEntity with default headers values
func NewGetRenderReportsUnprocessableEntity() *GetRenderReportsUnprocessableEntity {
return &GetRenderReportsUnprocessableEntity{}
}
/*GetRenderReportsUnprocessableEntity handles this case with default header values.
Unprocessable Entity, likely a bad parameter
*/
type GetRenderReportsUnprocessableEntity struct {
AccessControlAllowOrigin string
Payload *render_models.Error
}
func (o *GetRenderReportsUnprocessableEntity) Error() string {
return fmt.Sprintf("[GET /reports][%d] getRenderReportsUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetRenderReportsUnprocessableEntity) GetPayload() *render_models.Error {
return o.Payload
}
func (o *GetRenderReportsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
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
}
// NewGetRenderReportsInternalServerError creates a GetRenderReportsInternalServerError with default headers values
func NewGetRenderReportsInternalServerError() *GetRenderReportsInternalServerError {
return &GetRenderReportsInternalServerError{}
}
/*GetRenderReportsInternalServerError handles this case with default header values.
Server Internal Error
*/
type GetRenderReportsInternalServerError struct {
AccessControlAllowOrigin string
Payload *render_models.Error
}
func (o *GetRenderReportsInternalServerError) Error() string {
return fmt.Sprintf("[GET /reports][%d] getRenderReportsInternalServerError %+v", 500, o.Payload)
}
func (o *GetRenderReportsInternalServerError) GetPayload() *render_models.Error {
return o.Payload
}
func (o *GetRenderReportsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
// response header Access-Control-Allow-Origin
o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin")
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
}

View File

@ -1,79 +0,0 @@
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package report
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
)
// New creates a new report API client.
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
return &Client{transport: transport, formats: formats}
}
/*
Client for report API
*/
type Client struct {
transport runtime.ClientTransport
formats strfmt.Registry
}
// ClientService is the interface for Client methods
type ClientService interface {
GetRenderReports(params *GetRenderReportsParams, authInfo runtime.ClientAuthInfoWriter) (*GetRenderReportsOK, error)
SetTransport(transport runtime.ClientTransport)
}
/*
GetRenderReports financials summary by account
Return a month-by-month summary financial report for an Account
*/
func (a *Client) GetRenderReports(params *GetRenderReportsParams, authInfo runtime.ClientAuthInfoWriter) (*GetRenderReportsOK, error) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetRenderReportsParams()
}
result, err := a.transport.Submit(&runtime.ClientOperation{
ID: "getRenderReports",
Method: "GET",
PathPattern: "/reports",
ProducesMediaTypes: []string{"application/json"},
ConsumesMediaTypes: []string{"application/json"},
Schemes: []string{"http"},
Params: params,
Reader: &GetRenderReportsReader{formats: a.formats},
AuthInfo: authInfo,
Context: params.Context,
Client: params.HTTPClient,
})
if err != nil {
return nil, err
}
success, ok := result.(*GetRenderReportsOK)
if ok {
return success, nil
}
// unexpected success response
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
msg := fmt.Sprintf("unexpected success response for getRenderReports: API contract not enforced by server. Client expected to get an error, but got: %T", result)
panic(msg)
}
// SetTransport changes the transport on the client
func (a *Client) SetTransport(transport runtime.ClientTransport) {
a.transport = transport
}

View File

@ -275,14 +275,6 @@ definitions:
format: int64
type: integer
type: object
RequestMeta:
properties:
TaxnexusAccount:
description: Taxnexus Account Number of the Reseller or OEM
type: string
required:
- TaxnexusAccount
type: object
ResponseMeta:
properties:
Contact:
@ -501,6 +493,62 @@ definitions:
type: string
DistrictType:
type: string
EstimatedSalesTaxes:
items:
format: double
type: number
type: array
EstimatedSalesTaxesTotal:
format: double
type: number
EstimatedTotals:
items:
format: double
type: number
type: array
EstimatedTotalsTotal:
format: double
type: number
EstimatedBusinessTaxes:
items:
format: double
type: number
type: array
EstimatedBusinessTaxesTotal:
format: double
type: number
EstimatedCannabisTaxes:
items:
format: double
type: number
type: array
EstimatedCannabisTaxesTotal:
format: double
type: number
EstimatedCOGS:
items:
format: double
type: number
type: array
EstimatedCOGSTotal:
format: double
type: number
EstimatedDiscounts:
items:
format: double
type: number
type: array
EstimatedDiscountsTotal:
format: double
type: number
EstimatedSubtotals:
items:
format: double
type: number
type: array
EstimatedSubtotalsTotal:
format: double
type: number
ExciseTaxes:
items:
format: double

View File

@ -266,74 +266,6 @@ paths:
$ref: "#/responses/CORSResponse"
tags:
- cors
/invoices:
get:
description: Generate PDF from an Invoice ID
operationId: getRenderInvoice
parameters:
- $ref: "#/parameters/invoiceIdQueryRequired"
responses:
"200":
$ref: "#/responses/DocumentResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Generate PDF from an Invoice ID
tags:
- Invoice
options:
description: CORS support
operationId: invoiceOptions
responses:
"200":
$ref: "#/responses/CORSResponse"
tags:
- cors
/reports:
get:
description:
Return a month-by-month summary financial report for an Account
operationId: getRenderReports
parameters:
- $ref: "#/parameters/accountIdQueryRequired"
- $ref: "#/parameters/yearQuery"
- $ref: "#/parameters/quarterQuery"
- $ref: "#/parameters/monthQuery"
responses:
"200":
$ref: "#/responses/DocumentResponse"
"401":
$ref: "#/responses/Unauthorized"
"403":
$ref: "#/responses/AccessForbidden"
"404":
$ref: "#/responses/NotFound"
"422":
$ref: "#/responses/UnprocessableEntity"
"500":
$ref: "#/responses/ServerError"
security:
- ApiKeyAuth: []
summary: Financial Summary by Account
tags:
- Report
options:
description: CORS support
operationId: reportOptions
responses:
"200":
$ref: "#/responses/CORSResponse"
tags:
- cors
/taxes:
get:
description: Return a summary tax report for an Account