parent
c6cc12ce7c
commit
e777b6a6cc
|
@ -1,279 +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"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewGetInvoicesParams creates a new GetInvoicesParams object
|
|
||||||
// with the default values initialized.
|
|
||||||
func NewGetInvoicesParams() *GetInvoicesParams {
|
|
||||||
var ()
|
|
||||||
return &GetInvoicesParams{
|
|
||||||
|
|
||||||
timeout: cr.DefaultTimeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetInvoicesParamsWithTimeout creates a new GetInvoicesParams object
|
|
||||||
// with the default values initialized, and the ability to set a timeout on a request
|
|
||||||
func NewGetInvoicesParamsWithTimeout(timeout time.Duration) *GetInvoicesParams {
|
|
||||||
var ()
|
|
||||||
return &GetInvoicesParams{
|
|
||||||
|
|
||||||
timeout: timeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetInvoicesParamsWithContext creates a new GetInvoicesParams object
|
|
||||||
// with the default values initialized, and the ability to set a context for a request
|
|
||||||
func NewGetInvoicesParamsWithContext(ctx context.Context) *GetInvoicesParams {
|
|
||||||
var ()
|
|
||||||
return &GetInvoicesParams{
|
|
||||||
|
|
||||||
Context: ctx,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetInvoicesParamsWithHTTPClient creates a new GetInvoicesParams object
|
|
||||||
// with the default values initialized, and the ability to set a custom HTTPClient for a request
|
|
||||||
func NewGetInvoicesParamsWithHTTPClient(client *http.Client) *GetInvoicesParams {
|
|
||||||
var ()
|
|
||||||
return &GetInvoicesParams{
|
|
||||||
HTTPClient: client,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*GetInvoicesParams contains all the parameters to send to the API endpoint
|
|
||||||
for the get invoices operation typically these are written to a http.Request
|
|
||||||
*/
|
|
||||||
type GetInvoicesParams struct {
|
|
||||||
|
|
||||||
/*AccountID
|
|
||||||
Taxnexus Record Id of an Account
|
|
||||||
|
|
||||||
*/
|
|
||||||
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
|
|
||||||
/*Semiannual
|
|
||||||
The Semiannual Number (1,2) of the report
|
|
||||||
|
|
||||||
*/
|
|
||||||
Semiannual *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 invoices params
|
|
||||||
func (o *GetInvoicesParams) WithTimeout(timeout time.Duration) *GetInvoicesParams {
|
|
||||||
o.SetTimeout(timeout)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetTimeout adds the timeout to the get invoices params
|
|
||||||
func (o *GetInvoicesParams) SetTimeout(timeout time.Duration) {
|
|
||||||
o.timeout = timeout
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithContext adds the context to the get invoices params
|
|
||||||
func (o *GetInvoicesParams) WithContext(ctx context.Context) *GetInvoicesParams {
|
|
||||||
o.SetContext(ctx)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetContext adds the context to the get invoices params
|
|
||||||
func (o *GetInvoicesParams) SetContext(ctx context.Context) {
|
|
||||||
o.Context = ctx
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithHTTPClient adds the HTTPClient to the get invoices params
|
|
||||||
func (o *GetInvoicesParams) WithHTTPClient(client *http.Client) *GetInvoicesParams {
|
|
||||||
o.SetHTTPClient(client)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHTTPClient adds the HTTPClient to the get invoices params
|
|
||||||
func (o *GetInvoicesParams) SetHTTPClient(client *http.Client) {
|
|
||||||
o.HTTPClient = client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAccountID adds the accountID to the get invoices params
|
|
||||||
func (o *GetInvoicesParams) WithAccountID(accountID *string) *GetInvoicesParams {
|
|
||||||
o.SetAccountID(accountID)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetAccountID adds the accountId to the get invoices params
|
|
||||||
func (o *GetInvoicesParams) SetAccountID(accountID *string) {
|
|
||||||
o.AccountID = accountID
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithMonth adds the month to the get invoices params
|
|
||||||
func (o *GetInvoicesParams) WithMonth(month *int64) *GetInvoicesParams {
|
|
||||||
o.SetMonth(month)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetMonth adds the month to the get invoices params
|
|
||||||
func (o *GetInvoicesParams) SetMonth(month *int64) {
|
|
||||||
o.Month = month
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithQuarter adds the quarter to the get invoices params
|
|
||||||
func (o *GetInvoicesParams) WithQuarter(quarter *int64) *GetInvoicesParams {
|
|
||||||
o.SetQuarter(quarter)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetQuarter adds the quarter to the get invoices params
|
|
||||||
func (o *GetInvoicesParams) SetQuarter(quarter *int64) {
|
|
||||||
o.Quarter = quarter
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithSemiannual adds the semiannual to the get invoices params
|
|
||||||
func (o *GetInvoicesParams) WithSemiannual(semiannual *int64) *GetInvoicesParams {
|
|
||||||
o.SetSemiannual(semiannual)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetSemiannual adds the semiannual to the get invoices params
|
|
||||||
func (o *GetInvoicesParams) SetSemiannual(semiannual *int64) {
|
|
||||||
o.Semiannual = semiannual
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithYear adds the year to the get invoices params
|
|
||||||
func (o *GetInvoicesParams) WithYear(year *int64) *GetInvoicesParams {
|
|
||||||
o.SetYear(year)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetYear adds the year to the get invoices params
|
|
||||||
func (o *GetInvoicesParams) SetYear(year *int64) {
|
|
||||||
o.Year = year
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteToRequest writes these params to a swagger request
|
|
||||||
func (o *GetInvoicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
|
||||||
|
|
||||||
if err := r.SetTimeout(o.timeout); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
if o.AccountID != nil {
|
|
||||||
|
|
||||||
// query param accountId
|
|
||||||
var qrAccountID string
|
|
||||||
if o.AccountID != nil {
|
|
||||||
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.Semiannual != nil {
|
|
||||||
|
|
||||||
// query param semiannual
|
|
||||||
var qrSemiannual int64
|
|
||||||
if o.Semiannual != nil {
|
|
||||||
qrSemiannual = *o.Semiannual
|
|
||||||
}
|
|
||||||
qSemiannual := swag.FormatInt64(qrSemiannual)
|
|
||||||
if qSemiannual != "" {
|
|
||||||
if err := r.SetQueryParam("semiannual", qSemiannual); 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
|
|
||||||
}
|
|
|
@ -1,268 +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/plex/plex_models"
|
|
||||||
)
|
|
||||||
|
|
||||||
// GetInvoicesReader is a Reader for the GetInvoices structure.
|
|
||||||
type GetInvoicesReader struct {
|
|
||||||
formats strfmt.Registry
|
|
||||||
}
|
|
||||||
|
|
||||||
// ReadResponse reads a server response into the received o.
|
|
||||||
func (o *GetInvoicesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
||||||
switch response.Code() {
|
|
||||||
case 200:
|
|
||||||
result := NewGetInvoicesOK()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return result, nil
|
|
||||||
case 401:
|
|
||||||
result := NewGetInvoicesUnauthorized()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 403:
|
|
||||||
result := NewGetInvoicesForbidden()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 404:
|
|
||||||
result := NewGetInvoicesNotFound()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 422:
|
|
||||||
result := NewGetInvoicesUnprocessableEntity()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 500:
|
|
||||||
result := NewGetInvoicesInternalServerError()
|
|
||||||
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())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetInvoicesOK creates a GetInvoicesOK with default headers values
|
|
||||||
func NewGetInvoicesOK() *GetInvoicesOK {
|
|
||||||
return &GetInvoicesOK{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*GetInvoicesOK handles this case with default header values.
|
|
||||||
|
|
||||||
Taxnexus Response with TaxSummaryResponse Objects
|
|
||||||
*/
|
|
||||||
type GetInvoicesOK struct {
|
|
||||||
Payload *plex_models.InvoiceSummaryResponse
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetInvoicesOK) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /invoices][%d] getInvoicesOK %+v", 200, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetInvoicesOK) GetPayload() *plex_models.InvoiceSummaryResponse {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetInvoicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
o.Payload = new(plex_models.InvoiceSummaryResponse)
|
|
||||||
|
|
||||||
// response payload
|
|
||||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetInvoicesUnauthorized creates a GetInvoicesUnauthorized with default headers values
|
|
||||||
func NewGetInvoicesUnauthorized() *GetInvoicesUnauthorized {
|
|
||||||
return &GetInvoicesUnauthorized{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*GetInvoicesUnauthorized handles this case with default header values.
|
|
||||||
|
|
||||||
Access Unauthorized, invalid API-KEY was used
|
|
||||||
*/
|
|
||||||
type GetInvoicesUnauthorized struct {
|
|
||||||
Payload *plex_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetInvoicesUnauthorized) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /invoices][%d] getInvoicesUnauthorized %+v", 401, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetInvoicesUnauthorized) GetPayload() *plex_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetInvoicesUnauthorized) 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
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetInvoicesForbidden creates a GetInvoicesForbidden with default headers values
|
|
||||||
func NewGetInvoicesForbidden() *GetInvoicesForbidden {
|
|
||||||
return &GetInvoicesForbidden{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*GetInvoicesForbidden handles this case with default header values.
|
|
||||||
|
|
||||||
Access forbidden, account lacks access
|
|
||||||
*/
|
|
||||||
type GetInvoicesForbidden struct {
|
|
||||||
Payload *plex_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetInvoicesForbidden) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /invoices][%d] getInvoicesForbidden %+v", 403, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetInvoicesForbidden) GetPayload() *plex_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetInvoicesForbidden) 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
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetInvoicesNotFound creates a GetInvoicesNotFound with default headers values
|
|
||||||
func NewGetInvoicesNotFound() *GetInvoicesNotFound {
|
|
||||||
return &GetInvoicesNotFound{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*GetInvoicesNotFound handles this case with default header values.
|
|
||||||
|
|
||||||
Resource was not found
|
|
||||||
*/
|
|
||||||
type GetInvoicesNotFound struct {
|
|
||||||
Payload *plex_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetInvoicesNotFound) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /invoices][%d] getInvoicesNotFound %+v", 404, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetInvoicesNotFound) GetPayload() *plex_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetInvoicesNotFound) 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
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetInvoicesUnprocessableEntity creates a GetInvoicesUnprocessableEntity with default headers values
|
|
||||||
func NewGetInvoicesUnprocessableEntity() *GetInvoicesUnprocessableEntity {
|
|
||||||
return &GetInvoicesUnprocessableEntity{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*GetInvoicesUnprocessableEntity handles this case with default header values.
|
|
||||||
|
|
||||||
Unprocessable Entity, likely a bad parameter
|
|
||||||
*/
|
|
||||||
type GetInvoicesUnprocessableEntity struct {
|
|
||||||
Payload *plex_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetInvoicesUnprocessableEntity) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /invoices][%d] getInvoicesUnprocessableEntity %+v", 422, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetInvoicesUnprocessableEntity) GetPayload() *plex_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetInvoicesUnprocessableEntity) 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
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetInvoicesInternalServerError creates a GetInvoicesInternalServerError with default headers values
|
|
||||||
func NewGetInvoicesInternalServerError() *GetInvoicesInternalServerError {
|
|
||||||
return &GetInvoicesInternalServerError{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*GetInvoicesInternalServerError handles this case with default header values.
|
|
||||||
|
|
||||||
Server Internal Error
|
|
||||||
*/
|
|
||||||
type GetInvoicesInternalServerError struct {
|
|
||||||
Payload *plex_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetInvoicesInternalServerError) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /invoices][%d] getInvoicesInternalServerError %+v", 500, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetInvoicesInternalServerError) GetPayload() *plex_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetInvoicesInternalServerError) 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
|
|
||||||
}
|
|
|
@ -1,279 +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"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewGetMedicinalParams creates a new GetMedicinalParams object
|
|
||||||
// with the default values initialized.
|
|
||||||
func NewGetMedicinalParams() *GetMedicinalParams {
|
|
||||||
var ()
|
|
||||||
return &GetMedicinalParams{
|
|
||||||
|
|
||||||
timeout: cr.DefaultTimeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetMedicinalParamsWithTimeout creates a new GetMedicinalParams object
|
|
||||||
// with the default values initialized, and the ability to set a timeout on a request
|
|
||||||
func NewGetMedicinalParamsWithTimeout(timeout time.Duration) *GetMedicinalParams {
|
|
||||||
var ()
|
|
||||||
return &GetMedicinalParams{
|
|
||||||
|
|
||||||
timeout: timeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetMedicinalParamsWithContext creates a new GetMedicinalParams object
|
|
||||||
// with the default values initialized, and the ability to set a context for a request
|
|
||||||
func NewGetMedicinalParamsWithContext(ctx context.Context) *GetMedicinalParams {
|
|
||||||
var ()
|
|
||||||
return &GetMedicinalParams{
|
|
||||||
|
|
||||||
Context: ctx,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetMedicinalParamsWithHTTPClient creates a new GetMedicinalParams object
|
|
||||||
// with the default values initialized, and the ability to set a custom HTTPClient for a request
|
|
||||||
func NewGetMedicinalParamsWithHTTPClient(client *http.Client) *GetMedicinalParams {
|
|
||||||
var ()
|
|
||||||
return &GetMedicinalParams{
|
|
||||||
HTTPClient: client,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*GetMedicinalParams contains all the parameters to send to the API endpoint
|
|
||||||
for the get medicinal operation typically these are written to a http.Request
|
|
||||||
*/
|
|
||||||
type GetMedicinalParams struct {
|
|
||||||
|
|
||||||
/*AccountID
|
|
||||||
Taxnexus Record Id of an Account
|
|
||||||
|
|
||||||
*/
|
|
||||||
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
|
|
||||||
/*Semiannual
|
|
||||||
The Semiannual Number (1,2) of the report
|
|
||||||
|
|
||||||
*/
|
|
||||||
Semiannual *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 medicinal params
|
|
||||||
func (o *GetMedicinalParams) WithTimeout(timeout time.Duration) *GetMedicinalParams {
|
|
||||||
o.SetTimeout(timeout)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetTimeout adds the timeout to the get medicinal params
|
|
||||||
func (o *GetMedicinalParams) SetTimeout(timeout time.Duration) {
|
|
||||||
o.timeout = timeout
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithContext adds the context to the get medicinal params
|
|
||||||
func (o *GetMedicinalParams) WithContext(ctx context.Context) *GetMedicinalParams {
|
|
||||||
o.SetContext(ctx)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetContext adds the context to the get medicinal params
|
|
||||||
func (o *GetMedicinalParams) SetContext(ctx context.Context) {
|
|
||||||
o.Context = ctx
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithHTTPClient adds the HTTPClient to the get medicinal params
|
|
||||||
func (o *GetMedicinalParams) WithHTTPClient(client *http.Client) *GetMedicinalParams {
|
|
||||||
o.SetHTTPClient(client)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHTTPClient adds the HTTPClient to the get medicinal params
|
|
||||||
func (o *GetMedicinalParams) SetHTTPClient(client *http.Client) {
|
|
||||||
o.HTTPClient = client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAccountID adds the accountID to the get medicinal params
|
|
||||||
func (o *GetMedicinalParams) WithAccountID(accountID *string) *GetMedicinalParams {
|
|
||||||
o.SetAccountID(accountID)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetAccountID adds the accountId to the get medicinal params
|
|
||||||
func (o *GetMedicinalParams) SetAccountID(accountID *string) {
|
|
||||||
o.AccountID = accountID
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithMonth adds the month to the get medicinal params
|
|
||||||
func (o *GetMedicinalParams) WithMonth(month *int64) *GetMedicinalParams {
|
|
||||||
o.SetMonth(month)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetMonth adds the month to the get medicinal params
|
|
||||||
func (o *GetMedicinalParams) SetMonth(month *int64) {
|
|
||||||
o.Month = month
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithQuarter adds the quarter to the get medicinal params
|
|
||||||
func (o *GetMedicinalParams) WithQuarter(quarter *int64) *GetMedicinalParams {
|
|
||||||
o.SetQuarter(quarter)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetQuarter adds the quarter to the get medicinal params
|
|
||||||
func (o *GetMedicinalParams) SetQuarter(quarter *int64) {
|
|
||||||
o.Quarter = quarter
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithSemiannual adds the semiannual to the get medicinal params
|
|
||||||
func (o *GetMedicinalParams) WithSemiannual(semiannual *int64) *GetMedicinalParams {
|
|
||||||
o.SetSemiannual(semiannual)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetSemiannual adds the semiannual to the get medicinal params
|
|
||||||
func (o *GetMedicinalParams) SetSemiannual(semiannual *int64) {
|
|
||||||
o.Semiannual = semiannual
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithYear adds the year to the get medicinal params
|
|
||||||
func (o *GetMedicinalParams) WithYear(year *int64) *GetMedicinalParams {
|
|
||||||
o.SetYear(year)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetYear adds the year to the get medicinal params
|
|
||||||
func (o *GetMedicinalParams) SetYear(year *int64) {
|
|
||||||
o.Year = year
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteToRequest writes these params to a swagger request
|
|
||||||
func (o *GetMedicinalParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
|
||||||
|
|
||||||
if err := r.SetTimeout(o.timeout); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
if o.AccountID != nil {
|
|
||||||
|
|
||||||
// query param accountId
|
|
||||||
var qrAccountID string
|
|
||||||
if o.AccountID != nil {
|
|
||||||
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.Semiannual != nil {
|
|
||||||
|
|
||||||
// query param semiannual
|
|
||||||
var qrSemiannual int64
|
|
||||||
if o.Semiannual != nil {
|
|
||||||
qrSemiannual = *o.Semiannual
|
|
||||||
}
|
|
||||||
qSemiannual := swag.FormatInt64(qrSemiannual)
|
|
||||||
if qSemiannual != "" {
|
|
||||||
if err := r.SetQueryParam("semiannual", qSemiannual); 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
|
|
||||||
}
|
|
|
@ -1,268 +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/plex/plex_models"
|
|
||||||
)
|
|
||||||
|
|
||||||
// GetMedicinalReader is a Reader for the GetMedicinal structure.
|
|
||||||
type GetMedicinalReader struct {
|
|
||||||
formats strfmt.Registry
|
|
||||||
}
|
|
||||||
|
|
||||||
// ReadResponse reads a server response into the received o.
|
|
||||||
func (o *GetMedicinalReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
||||||
switch response.Code() {
|
|
||||||
case 200:
|
|
||||||
result := NewGetMedicinalOK()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return result, nil
|
|
||||||
case 401:
|
|
||||||
result := NewGetMedicinalUnauthorized()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 403:
|
|
||||||
result := NewGetMedicinalForbidden()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 404:
|
|
||||||
result := NewGetMedicinalNotFound()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 422:
|
|
||||||
result := NewGetMedicinalUnprocessableEntity()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 500:
|
|
||||||
result := NewGetMedicinalInternalServerError()
|
|
||||||
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())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetMedicinalOK creates a GetMedicinalOK with default headers values
|
|
||||||
func NewGetMedicinalOK() *GetMedicinalOK {
|
|
||||||
return &GetMedicinalOK{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*GetMedicinalOK handles this case with default header values.
|
|
||||||
|
|
||||||
Taxnexus Response with TaxSummaryResponse Objects
|
|
||||||
*/
|
|
||||||
type GetMedicinalOK struct {
|
|
||||||
Payload *plex_models.InvoiceSummaryResponse
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetMedicinalOK) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /invoices/medicinal][%d] getMedicinalOK %+v", 200, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetMedicinalOK) GetPayload() *plex_models.InvoiceSummaryResponse {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetMedicinalOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
o.Payload = new(plex_models.InvoiceSummaryResponse)
|
|
||||||
|
|
||||||
// response payload
|
|
||||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetMedicinalUnauthorized creates a GetMedicinalUnauthorized with default headers values
|
|
||||||
func NewGetMedicinalUnauthorized() *GetMedicinalUnauthorized {
|
|
||||||
return &GetMedicinalUnauthorized{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*GetMedicinalUnauthorized handles this case with default header values.
|
|
||||||
|
|
||||||
Access Unauthorized, invalid API-KEY was used
|
|
||||||
*/
|
|
||||||
type GetMedicinalUnauthorized struct {
|
|
||||||
Payload *plex_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetMedicinalUnauthorized) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /invoices/medicinal][%d] getMedicinalUnauthorized %+v", 401, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetMedicinalUnauthorized) GetPayload() *plex_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetMedicinalUnauthorized) 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
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetMedicinalForbidden creates a GetMedicinalForbidden with default headers values
|
|
||||||
func NewGetMedicinalForbidden() *GetMedicinalForbidden {
|
|
||||||
return &GetMedicinalForbidden{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*GetMedicinalForbidden handles this case with default header values.
|
|
||||||
|
|
||||||
Access forbidden, account lacks access
|
|
||||||
*/
|
|
||||||
type GetMedicinalForbidden struct {
|
|
||||||
Payload *plex_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetMedicinalForbidden) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /invoices/medicinal][%d] getMedicinalForbidden %+v", 403, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetMedicinalForbidden) GetPayload() *plex_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetMedicinalForbidden) 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
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetMedicinalNotFound creates a GetMedicinalNotFound with default headers values
|
|
||||||
func NewGetMedicinalNotFound() *GetMedicinalNotFound {
|
|
||||||
return &GetMedicinalNotFound{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*GetMedicinalNotFound handles this case with default header values.
|
|
||||||
|
|
||||||
Resource was not found
|
|
||||||
*/
|
|
||||||
type GetMedicinalNotFound struct {
|
|
||||||
Payload *plex_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetMedicinalNotFound) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /invoices/medicinal][%d] getMedicinalNotFound %+v", 404, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetMedicinalNotFound) GetPayload() *plex_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetMedicinalNotFound) 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
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetMedicinalUnprocessableEntity creates a GetMedicinalUnprocessableEntity with default headers values
|
|
||||||
func NewGetMedicinalUnprocessableEntity() *GetMedicinalUnprocessableEntity {
|
|
||||||
return &GetMedicinalUnprocessableEntity{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*GetMedicinalUnprocessableEntity handles this case with default header values.
|
|
||||||
|
|
||||||
Unprocessable Entity, likely a bad parameter
|
|
||||||
*/
|
|
||||||
type GetMedicinalUnprocessableEntity struct {
|
|
||||||
Payload *plex_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetMedicinalUnprocessableEntity) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /invoices/medicinal][%d] getMedicinalUnprocessableEntity %+v", 422, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetMedicinalUnprocessableEntity) GetPayload() *plex_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetMedicinalUnprocessableEntity) 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
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetMedicinalInternalServerError creates a GetMedicinalInternalServerError with default headers values
|
|
||||||
func NewGetMedicinalInternalServerError() *GetMedicinalInternalServerError {
|
|
||||||
return &GetMedicinalInternalServerError{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*GetMedicinalInternalServerError handles this case with default header values.
|
|
||||||
|
|
||||||
Server Internal Error
|
|
||||||
*/
|
|
||||||
type GetMedicinalInternalServerError struct {
|
|
||||||
Payload *plex_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetMedicinalInternalServerError) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /invoices/medicinal][%d] getMedicinalInternalServerError %+v", 500, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetMedicinalInternalServerError) GetPayload() *plex_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetMedicinalInternalServerError) 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
|
|
||||||
}
|
|
|
@ -1,118 +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 {
|
|
||||||
GetInvoices(params *GetInvoicesParams, authInfo runtime.ClientAuthInfoWriter) (*GetInvoicesOK, error)
|
|
||||||
|
|
||||||
GetMedicinal(params *GetMedicinalParams, authInfo runtime.ClientAuthInfoWriter) (*GetMedicinalOK, error)
|
|
||||||
|
|
||||||
SetTransport(transport runtime.ClientTransport)
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetInvoices returns invoice summaries by month
|
|
||||||
|
|
||||||
Return invoice summaries by month for an Account
|
|
||||||
*/
|
|
||||||
func (a *Client) GetInvoices(params *GetInvoicesParams, authInfo runtime.ClientAuthInfoWriter) (*GetInvoicesOK, error) {
|
|
||||||
// TODO: Validate the params before sending
|
|
||||||
if params == nil {
|
|
||||||
params = NewGetInvoicesParams()
|
|
||||||
}
|
|
||||||
|
|
||||||
result, err := a.transport.Submit(&runtime.ClientOperation{
|
|
||||||
ID: "getInvoices",
|
|
||||||
Method: "GET",
|
|
||||||
PathPattern: "/invoices",
|
|
||||||
ProducesMediaTypes: []string{"application/json"},
|
|
||||||
ConsumesMediaTypes: []string{"application/json"},
|
|
||||||
Schemes: []string{"http"},
|
|
||||||
Params: params,
|
|
||||||
Reader: &GetInvoicesReader{formats: a.formats},
|
|
||||||
AuthInfo: authInfo,
|
|
||||||
Context: params.Context,
|
|
||||||
Client: params.HTTPClient,
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
success, ok := result.(*GetInvoicesOK)
|
|
||||||
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 getInvoices: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
|
||||||
panic(msg)
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetMedicinal returns medicinal revenue summary by period specified
|
|
||||||
|
|
||||||
Return medicinal revenue summary by period specified
|
|
||||||
*/
|
|
||||||
func (a *Client) GetMedicinal(params *GetMedicinalParams, authInfo runtime.ClientAuthInfoWriter) (*GetMedicinalOK, error) {
|
|
||||||
// TODO: Validate the params before sending
|
|
||||||
if params == nil {
|
|
||||||
params = NewGetMedicinalParams()
|
|
||||||
}
|
|
||||||
|
|
||||||
result, err := a.transport.Submit(&runtime.ClientOperation{
|
|
||||||
ID: "getMedicinal",
|
|
||||||
Method: "GET",
|
|
||||||
PathPattern: "/invoices/medicinal",
|
|
||||||
ProducesMediaTypes: []string{"application/json"},
|
|
||||||
ConsumesMediaTypes: []string{"application/json"},
|
|
||||||
Schemes: []string{"http"},
|
|
||||||
Params: params,
|
|
||||||
Reader: &GetMedicinalReader{formats: a.formats},
|
|
||||||
AuthInfo: authInfo,
|
|
||||||
Context: params.Context,
|
|
||||||
Client: params.HTTPClient,
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
success, ok := result.(*GetMedicinalOK)
|
|
||||||
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 getMedicinal: 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
|
|
||||||
}
|
|
|
@ -1,279 +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_item
|
|
||||||
|
|
||||||
// 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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewGetInvoiceitemsParams creates a new GetInvoiceitemsParams object
|
|
||||||
// with the default values initialized.
|
|
||||||
func NewGetInvoiceitemsParams() *GetInvoiceitemsParams {
|
|
||||||
var ()
|
|
||||||
return &GetInvoiceitemsParams{
|
|
||||||
|
|
||||||
timeout: cr.DefaultTimeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetInvoiceitemsParamsWithTimeout creates a new GetInvoiceitemsParams object
|
|
||||||
// with the default values initialized, and the ability to set a timeout on a request
|
|
||||||
func NewGetInvoiceitemsParamsWithTimeout(timeout time.Duration) *GetInvoiceitemsParams {
|
|
||||||
var ()
|
|
||||||
return &GetInvoiceitemsParams{
|
|
||||||
|
|
||||||
timeout: timeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetInvoiceitemsParamsWithContext creates a new GetInvoiceitemsParams object
|
|
||||||
// with the default values initialized, and the ability to set a context for a request
|
|
||||||
func NewGetInvoiceitemsParamsWithContext(ctx context.Context) *GetInvoiceitemsParams {
|
|
||||||
var ()
|
|
||||||
return &GetInvoiceitemsParams{
|
|
||||||
|
|
||||||
Context: ctx,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetInvoiceitemsParamsWithHTTPClient creates a new GetInvoiceitemsParams object
|
|
||||||
// with the default values initialized, and the ability to set a custom HTTPClient for a request
|
|
||||||
func NewGetInvoiceitemsParamsWithHTTPClient(client *http.Client) *GetInvoiceitemsParams {
|
|
||||||
var ()
|
|
||||||
return &GetInvoiceitemsParams{
|
|
||||||
HTTPClient: client,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*GetInvoiceitemsParams contains all the parameters to send to the API endpoint
|
|
||||||
for the get invoiceitems operation typically these are written to a http.Request
|
|
||||||
*/
|
|
||||||
type GetInvoiceitemsParams struct {
|
|
||||||
|
|
||||||
/*AccountID
|
|
||||||
Taxnexus Record Id of an Account
|
|
||||||
|
|
||||||
*/
|
|
||||||
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
|
|
||||||
/*Semiannual
|
|
||||||
The Semiannual Number (1,2) of the report
|
|
||||||
|
|
||||||
*/
|
|
||||||
Semiannual *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 invoiceitems params
|
|
||||||
func (o *GetInvoiceitemsParams) WithTimeout(timeout time.Duration) *GetInvoiceitemsParams {
|
|
||||||
o.SetTimeout(timeout)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetTimeout adds the timeout to the get invoiceitems params
|
|
||||||
func (o *GetInvoiceitemsParams) SetTimeout(timeout time.Duration) {
|
|
||||||
o.timeout = timeout
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithContext adds the context to the get invoiceitems params
|
|
||||||
func (o *GetInvoiceitemsParams) WithContext(ctx context.Context) *GetInvoiceitemsParams {
|
|
||||||
o.SetContext(ctx)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetContext adds the context to the get invoiceitems params
|
|
||||||
func (o *GetInvoiceitemsParams) SetContext(ctx context.Context) {
|
|
||||||
o.Context = ctx
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithHTTPClient adds the HTTPClient to the get invoiceitems params
|
|
||||||
func (o *GetInvoiceitemsParams) WithHTTPClient(client *http.Client) *GetInvoiceitemsParams {
|
|
||||||
o.SetHTTPClient(client)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHTTPClient adds the HTTPClient to the get invoiceitems params
|
|
||||||
func (o *GetInvoiceitemsParams) SetHTTPClient(client *http.Client) {
|
|
||||||
o.HTTPClient = client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAccountID adds the accountID to the get invoiceitems params
|
|
||||||
func (o *GetInvoiceitemsParams) WithAccountID(accountID *string) *GetInvoiceitemsParams {
|
|
||||||
o.SetAccountID(accountID)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetAccountID adds the accountId to the get invoiceitems params
|
|
||||||
func (o *GetInvoiceitemsParams) SetAccountID(accountID *string) {
|
|
||||||
o.AccountID = accountID
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithMonth adds the month to the get invoiceitems params
|
|
||||||
func (o *GetInvoiceitemsParams) WithMonth(month *int64) *GetInvoiceitemsParams {
|
|
||||||
o.SetMonth(month)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetMonth adds the month to the get invoiceitems params
|
|
||||||
func (o *GetInvoiceitemsParams) SetMonth(month *int64) {
|
|
||||||
o.Month = month
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithQuarter adds the quarter to the get invoiceitems params
|
|
||||||
func (o *GetInvoiceitemsParams) WithQuarter(quarter *int64) *GetInvoiceitemsParams {
|
|
||||||
o.SetQuarter(quarter)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetQuarter adds the quarter to the get invoiceitems params
|
|
||||||
func (o *GetInvoiceitemsParams) SetQuarter(quarter *int64) {
|
|
||||||
o.Quarter = quarter
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithSemiannual adds the semiannual to the get invoiceitems params
|
|
||||||
func (o *GetInvoiceitemsParams) WithSemiannual(semiannual *int64) *GetInvoiceitemsParams {
|
|
||||||
o.SetSemiannual(semiannual)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetSemiannual adds the semiannual to the get invoiceitems params
|
|
||||||
func (o *GetInvoiceitemsParams) SetSemiannual(semiannual *int64) {
|
|
||||||
o.Semiannual = semiannual
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithYear adds the year to the get invoiceitems params
|
|
||||||
func (o *GetInvoiceitemsParams) WithYear(year *int64) *GetInvoiceitemsParams {
|
|
||||||
o.SetYear(year)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetYear adds the year to the get invoiceitems params
|
|
||||||
func (o *GetInvoiceitemsParams) SetYear(year *int64) {
|
|
||||||
o.Year = year
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteToRequest writes these params to a swagger request
|
|
||||||
func (o *GetInvoiceitemsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
|
||||||
|
|
||||||
if err := r.SetTimeout(o.timeout); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
if o.AccountID != nil {
|
|
||||||
|
|
||||||
// query param accountId
|
|
||||||
var qrAccountID string
|
|
||||||
if o.AccountID != nil {
|
|
||||||
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.Semiannual != nil {
|
|
||||||
|
|
||||||
// query param semiannual
|
|
||||||
var qrSemiannual int64
|
|
||||||
if o.Semiannual != nil {
|
|
||||||
qrSemiannual = *o.Semiannual
|
|
||||||
}
|
|
||||||
qSemiannual := swag.FormatInt64(qrSemiannual)
|
|
||||||
if qSemiannual != "" {
|
|
||||||
if err := r.SetQueryParam("semiannual", qSemiannual); 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
|
|
||||||
}
|
|
|
@ -1,268 +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_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"
|
|
||||||
|
|
||||||
"code.tnxs.net/taxnexus/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
|
|
||||||
}
|
|
|
@ -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_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"
|
|
||||||
|
|
||||||
"github.com/go-openapi/runtime"
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
)
|
|
||||||
|
|
||||||
// New creates a new invoice item API client.
|
|
||||||
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
|
|
||||||
return &Client{transport: transport, formats: formats}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
Client for invoice item API
|
|
||||||
*/
|
|
||||||
type Client struct {
|
|
||||||
transport runtime.ClientTransport
|
|
||||||
formats strfmt.Registry
|
|
||||||
}
|
|
||||||
|
|
||||||
// ClientService is the interface for Client methods
|
|
||||||
type ClientService interface {
|
|
||||||
GetInvoiceitems(params *GetInvoiceitemsParams, authInfo runtime.ClientAuthInfoWriter) (*GetInvoiceitemsOK, error)
|
|
||||||
|
|
||||||
SetTransport(transport runtime.ClientTransport)
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
GetInvoiceitems returns invoice item summaries by month
|
|
||||||
|
|
||||||
Return invoiceitem summaries by month for an Account
|
|
||||||
*/
|
|
||||||
func (a *Client) GetInvoiceitems(params *GetInvoiceitemsParams, authInfo runtime.ClientAuthInfoWriter) (*GetInvoiceitemsOK, error) {
|
|
||||||
// TODO: Validate the params before sending
|
|
||||||
if params == nil {
|
|
||||||
params = NewGetInvoiceitemsParams()
|
|
||||||
}
|
|
||||||
|
|
||||||
result, err := a.transport.Submit(&runtime.ClientOperation{
|
|
||||||
ID: "getInvoiceitems",
|
|
||||||
Method: "GET",
|
|
||||||
PathPattern: "/invoiceitems",
|
|
||||||
ProducesMediaTypes: []string{"application/json"},
|
|
||||||
ConsumesMediaTypes: []string{"application/json"},
|
|
||||||
Schemes: []string{"http"},
|
|
||||||
Params: params,
|
|
||||||
Reader: &GetInvoiceitemsReader{formats: a.formats},
|
|
||||||
AuthInfo: authInfo,
|
|
||||||
Context: params.Context,
|
|
||||||
Client: params.HTTPClient,
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
success, ok := result.(*GetInvoiceitemsOK)
|
|
||||||
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 getInvoiceitems: 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
|
|
||||||
}
|
|
|
@ -14,8 +14,6 @@ import (
|
||||||
httptransport "github.com/go-openapi/runtime/client"
|
httptransport "github.com/go-openapi/runtime/client"
|
||||||
"github.com/go-openapi/strfmt"
|
"github.com/go-openapi/strfmt"
|
||||||
|
|
||||||
"code.tnxs.net/taxnexus/lib/api/plex/plex_client/invoice"
|
|
||||||
"code.tnxs.net/taxnexus/lib/api/plex/plex_client/invoice_item"
|
|
||||||
"code.tnxs.net/taxnexus/lib/api/plex/plex_client/tax"
|
"code.tnxs.net/taxnexus/lib/api/plex/plex_client/tax"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -61,8 +59,6 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *Plex {
|
||||||
|
|
||||||
cli := new(Plex)
|
cli := new(Plex)
|
||||||
cli.Transport = transport
|
cli.Transport = transport
|
||||||
cli.Invoice = invoice.New(transport, formats)
|
|
||||||
cli.InvoiceItem = invoice_item.New(transport, formats)
|
|
||||||
cli.Tax = tax.New(transport, formats)
|
cli.Tax = tax.New(transport, formats)
|
||||||
return cli
|
return cli
|
||||||
}
|
}
|
||||||
|
@ -108,10 +104,6 @@ func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig {
|
||||||
|
|
||||||
// Plex is a client for plex
|
// Plex is a client for plex
|
||||||
type Plex struct {
|
type Plex struct {
|
||||||
Invoice invoice.ClientService
|
|
||||||
|
|
||||||
InvoiceItem invoice_item.ClientService
|
|
||||||
|
|
||||||
Tax tax.ClientService
|
Tax tax.ClientService
|
||||||
|
|
||||||
Transport runtime.ClientTransport
|
Transport runtime.ClientTransport
|
||||||
|
@ -120,7 +112,5 @@ type Plex struct {
|
||||||
// SetTransport changes the transport on the client and all its subresources
|
// SetTransport changes the transport on the client and all its subresources
|
||||||
func (c *Plex) SetTransport(transport runtime.ClientTransport) {
|
func (c *Plex) SetTransport(transport runtime.ClientTransport) {
|
||||||
c.Transport = transport
|
c.Transport = transport
|
||||||
c.Invoice.SetTransport(transport)
|
|
||||||
c.InvoiceItem.SetTransport(transport)
|
|
||||||
c.Tax.SetTransport(transport)
|
c.Tax.SetTransport(transport)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,279 +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 tax
|
|
||||||
|
|
||||||
// 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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewGetDistrictTaxesParams creates a new GetDistrictTaxesParams object
|
|
||||||
// with the default values initialized.
|
|
||||||
func NewGetDistrictTaxesParams() *GetDistrictTaxesParams {
|
|
||||||
var ()
|
|
||||||
return &GetDistrictTaxesParams{
|
|
||||||
|
|
||||||
timeout: cr.DefaultTimeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetDistrictTaxesParamsWithTimeout creates a new GetDistrictTaxesParams object
|
|
||||||
// with the default values initialized, and the ability to set a timeout on a request
|
|
||||||
func NewGetDistrictTaxesParamsWithTimeout(timeout time.Duration) *GetDistrictTaxesParams {
|
|
||||||
var ()
|
|
||||||
return &GetDistrictTaxesParams{
|
|
||||||
|
|
||||||
timeout: timeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetDistrictTaxesParamsWithContext creates a new GetDistrictTaxesParams object
|
|
||||||
// with the default values initialized, and the ability to set a context for a request
|
|
||||||
func NewGetDistrictTaxesParamsWithContext(ctx context.Context) *GetDistrictTaxesParams {
|
|
||||||
var ()
|
|
||||||
return &GetDistrictTaxesParams{
|
|
||||||
|
|
||||||
Context: ctx,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetDistrictTaxesParamsWithHTTPClient creates a new GetDistrictTaxesParams object
|
|
||||||
// with the default values initialized, and the ability to set a custom HTTPClient for a request
|
|
||||||
func NewGetDistrictTaxesParamsWithHTTPClient(client *http.Client) *GetDistrictTaxesParams {
|
|
||||||
var ()
|
|
||||||
return &GetDistrictTaxesParams{
|
|
||||||
HTTPClient: client,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*GetDistrictTaxesParams contains all the parameters to send to the API endpoint
|
|
||||||
for the get district taxes operation typically these are written to a http.Request
|
|
||||||
*/
|
|
||||||
type GetDistrictTaxesParams struct {
|
|
||||||
|
|
||||||
/*AccountID
|
|
||||||
Taxnexus Record Id of an Account
|
|
||||||
|
|
||||||
*/
|
|
||||||
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
|
|
||||||
/*Semiannual
|
|
||||||
The Semiannual Number (1,2) of the report
|
|
||||||
|
|
||||||
*/
|
|
||||||
Semiannual *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 district taxes params
|
|
||||||
func (o *GetDistrictTaxesParams) WithTimeout(timeout time.Duration) *GetDistrictTaxesParams {
|
|
||||||
o.SetTimeout(timeout)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetTimeout adds the timeout to the get district taxes params
|
|
||||||
func (o *GetDistrictTaxesParams) SetTimeout(timeout time.Duration) {
|
|
||||||
o.timeout = timeout
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithContext adds the context to the get district taxes params
|
|
||||||
func (o *GetDistrictTaxesParams) WithContext(ctx context.Context) *GetDistrictTaxesParams {
|
|
||||||
o.SetContext(ctx)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetContext adds the context to the get district taxes params
|
|
||||||
func (o *GetDistrictTaxesParams) SetContext(ctx context.Context) {
|
|
||||||
o.Context = ctx
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithHTTPClient adds the HTTPClient to the get district taxes params
|
|
||||||
func (o *GetDistrictTaxesParams) WithHTTPClient(client *http.Client) *GetDistrictTaxesParams {
|
|
||||||
o.SetHTTPClient(client)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHTTPClient adds the HTTPClient to the get district taxes params
|
|
||||||
func (o *GetDistrictTaxesParams) SetHTTPClient(client *http.Client) {
|
|
||||||
o.HTTPClient = client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAccountID adds the accountID to the get district taxes params
|
|
||||||
func (o *GetDistrictTaxesParams) WithAccountID(accountID *string) *GetDistrictTaxesParams {
|
|
||||||
o.SetAccountID(accountID)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetAccountID adds the accountId to the get district taxes params
|
|
||||||
func (o *GetDistrictTaxesParams) SetAccountID(accountID *string) {
|
|
||||||
o.AccountID = accountID
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithMonth adds the month to the get district taxes params
|
|
||||||
func (o *GetDistrictTaxesParams) WithMonth(month *int64) *GetDistrictTaxesParams {
|
|
||||||
o.SetMonth(month)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetMonth adds the month to the get district taxes params
|
|
||||||
func (o *GetDistrictTaxesParams) SetMonth(month *int64) {
|
|
||||||
o.Month = month
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithQuarter adds the quarter to the get district taxes params
|
|
||||||
func (o *GetDistrictTaxesParams) WithQuarter(quarter *int64) *GetDistrictTaxesParams {
|
|
||||||
o.SetQuarter(quarter)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetQuarter adds the quarter to the get district taxes params
|
|
||||||
func (o *GetDistrictTaxesParams) SetQuarter(quarter *int64) {
|
|
||||||
o.Quarter = quarter
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithSemiannual adds the semiannual to the get district taxes params
|
|
||||||
func (o *GetDistrictTaxesParams) WithSemiannual(semiannual *int64) *GetDistrictTaxesParams {
|
|
||||||
o.SetSemiannual(semiannual)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetSemiannual adds the semiannual to the get district taxes params
|
|
||||||
func (o *GetDistrictTaxesParams) SetSemiannual(semiannual *int64) {
|
|
||||||
o.Semiannual = semiannual
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithYear adds the year to the get district taxes params
|
|
||||||
func (o *GetDistrictTaxesParams) WithYear(year *int64) *GetDistrictTaxesParams {
|
|
||||||
o.SetYear(year)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetYear adds the year to the get district taxes params
|
|
||||||
func (o *GetDistrictTaxesParams) SetYear(year *int64) {
|
|
||||||
o.Year = year
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteToRequest writes these params to a swagger request
|
|
||||||
func (o *GetDistrictTaxesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
|
||||||
|
|
||||||
if err := r.SetTimeout(o.timeout); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
if o.AccountID != nil {
|
|
||||||
|
|
||||||
// query param accountId
|
|
||||||
var qrAccountID string
|
|
||||||
if o.AccountID != nil {
|
|
||||||
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.Semiannual != nil {
|
|
||||||
|
|
||||||
// query param semiannual
|
|
||||||
var qrSemiannual int64
|
|
||||||
if o.Semiannual != nil {
|
|
||||||
qrSemiannual = *o.Semiannual
|
|
||||||
}
|
|
||||||
qSemiannual := swag.FormatInt64(qrSemiannual)
|
|
||||||
if qSemiannual != "" {
|
|
||||||
if err := r.SetQueryParam("semiannual", qSemiannual); 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
|
|
||||||
}
|
|
|
@ -1,268 +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 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"
|
|
||||||
|
|
||||||
"code.tnxs.net/taxnexus/lib/api/plex/plex_models"
|
|
||||||
)
|
|
||||||
|
|
||||||
// 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
|
|
||||||
}
|
|
|
@ -1,279 +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 tax
|
|
||||||
|
|
||||||
// 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"
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewGetUseTaxParams creates a new GetUseTaxParams object
|
|
||||||
// with the default values initialized.
|
|
||||||
func NewGetUseTaxParams() *GetUseTaxParams {
|
|
||||||
var ()
|
|
||||||
return &GetUseTaxParams{
|
|
||||||
|
|
||||||
timeout: cr.DefaultTimeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetUseTaxParamsWithTimeout creates a new GetUseTaxParams object
|
|
||||||
// with the default values initialized, and the ability to set a timeout on a request
|
|
||||||
func NewGetUseTaxParamsWithTimeout(timeout time.Duration) *GetUseTaxParams {
|
|
||||||
var ()
|
|
||||||
return &GetUseTaxParams{
|
|
||||||
|
|
||||||
timeout: timeout,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetUseTaxParamsWithContext creates a new GetUseTaxParams object
|
|
||||||
// with the default values initialized, and the ability to set a context for a request
|
|
||||||
func NewGetUseTaxParamsWithContext(ctx context.Context) *GetUseTaxParams {
|
|
||||||
var ()
|
|
||||||
return &GetUseTaxParams{
|
|
||||||
|
|
||||||
Context: ctx,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetUseTaxParamsWithHTTPClient creates a new GetUseTaxParams object
|
|
||||||
// with the default values initialized, and the ability to set a custom HTTPClient for a request
|
|
||||||
func NewGetUseTaxParamsWithHTTPClient(client *http.Client) *GetUseTaxParams {
|
|
||||||
var ()
|
|
||||||
return &GetUseTaxParams{
|
|
||||||
HTTPClient: client,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*GetUseTaxParams contains all the parameters to send to the API endpoint
|
|
||||||
for the get use tax operation typically these are written to a http.Request
|
|
||||||
*/
|
|
||||||
type GetUseTaxParams struct {
|
|
||||||
|
|
||||||
/*AccountID
|
|
||||||
Taxnexus Record Id of an Account
|
|
||||||
|
|
||||||
*/
|
|
||||||
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
|
|
||||||
/*Semiannual
|
|
||||||
The Semiannual Number (1,2) of the report
|
|
||||||
|
|
||||||
*/
|
|
||||||
Semiannual *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 use tax params
|
|
||||||
func (o *GetUseTaxParams) WithTimeout(timeout time.Duration) *GetUseTaxParams {
|
|
||||||
o.SetTimeout(timeout)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetTimeout adds the timeout to the get use tax params
|
|
||||||
func (o *GetUseTaxParams) SetTimeout(timeout time.Duration) {
|
|
||||||
o.timeout = timeout
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithContext adds the context to the get use tax params
|
|
||||||
func (o *GetUseTaxParams) WithContext(ctx context.Context) *GetUseTaxParams {
|
|
||||||
o.SetContext(ctx)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetContext adds the context to the get use tax params
|
|
||||||
func (o *GetUseTaxParams) SetContext(ctx context.Context) {
|
|
||||||
o.Context = ctx
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithHTTPClient adds the HTTPClient to the get use tax params
|
|
||||||
func (o *GetUseTaxParams) WithHTTPClient(client *http.Client) *GetUseTaxParams {
|
|
||||||
o.SetHTTPClient(client)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetHTTPClient adds the HTTPClient to the get use tax params
|
|
||||||
func (o *GetUseTaxParams) SetHTTPClient(client *http.Client) {
|
|
||||||
o.HTTPClient = client
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithAccountID adds the accountID to the get use tax params
|
|
||||||
func (o *GetUseTaxParams) WithAccountID(accountID *string) *GetUseTaxParams {
|
|
||||||
o.SetAccountID(accountID)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetAccountID adds the accountId to the get use tax params
|
|
||||||
func (o *GetUseTaxParams) SetAccountID(accountID *string) {
|
|
||||||
o.AccountID = accountID
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithMonth adds the month to the get use tax params
|
|
||||||
func (o *GetUseTaxParams) WithMonth(month *int64) *GetUseTaxParams {
|
|
||||||
o.SetMonth(month)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetMonth adds the month to the get use tax params
|
|
||||||
func (o *GetUseTaxParams) SetMonth(month *int64) {
|
|
||||||
o.Month = month
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithQuarter adds the quarter to the get use tax params
|
|
||||||
func (o *GetUseTaxParams) WithQuarter(quarter *int64) *GetUseTaxParams {
|
|
||||||
o.SetQuarter(quarter)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetQuarter adds the quarter to the get use tax params
|
|
||||||
func (o *GetUseTaxParams) SetQuarter(quarter *int64) {
|
|
||||||
o.Quarter = quarter
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithSemiannual adds the semiannual to the get use tax params
|
|
||||||
func (o *GetUseTaxParams) WithSemiannual(semiannual *int64) *GetUseTaxParams {
|
|
||||||
o.SetSemiannual(semiannual)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetSemiannual adds the semiannual to the get use tax params
|
|
||||||
func (o *GetUseTaxParams) SetSemiannual(semiannual *int64) {
|
|
||||||
o.Semiannual = semiannual
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithYear adds the year to the get use tax params
|
|
||||||
func (o *GetUseTaxParams) WithYear(year *int64) *GetUseTaxParams {
|
|
||||||
o.SetYear(year)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetYear adds the year to the get use tax params
|
|
||||||
func (o *GetUseTaxParams) SetYear(year *int64) {
|
|
||||||
o.Year = year
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteToRequest writes these params to a swagger request
|
|
||||||
func (o *GetUseTaxParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
|
||||||
|
|
||||||
if err := r.SetTimeout(o.timeout); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
if o.AccountID != nil {
|
|
||||||
|
|
||||||
// query param accountId
|
|
||||||
var qrAccountID string
|
|
||||||
if o.AccountID != nil {
|
|
||||||
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.Semiannual != nil {
|
|
||||||
|
|
||||||
// query param semiannual
|
|
||||||
var qrSemiannual int64
|
|
||||||
if o.Semiannual != nil {
|
|
||||||
qrSemiannual = *o.Semiannual
|
|
||||||
}
|
|
||||||
qSemiannual := swag.FormatInt64(qrSemiannual)
|
|
||||||
if qSemiannual != "" {
|
|
||||||
if err := r.SetQueryParam("semiannual", qSemiannual); 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
|
|
||||||
}
|
|
|
@ -1,268 +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 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"
|
|
||||||
|
|
||||||
"code.tnxs.net/taxnexus/lib/api/plex/plex_models"
|
|
||||||
)
|
|
||||||
|
|
||||||
// GetUseTaxReader is a Reader for the GetUseTax structure.
|
|
||||||
type GetUseTaxReader struct {
|
|
||||||
formats strfmt.Registry
|
|
||||||
}
|
|
||||||
|
|
||||||
// ReadResponse reads a server response into the received o.
|
|
||||||
func (o *GetUseTaxReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
||||||
switch response.Code() {
|
|
||||||
case 200:
|
|
||||||
result := NewGetUseTaxOK()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return result, nil
|
|
||||||
case 401:
|
|
||||||
result := NewGetUseTaxUnauthorized()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 403:
|
|
||||||
result := NewGetUseTaxForbidden()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 404:
|
|
||||||
result := NewGetUseTaxNotFound()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 422:
|
|
||||||
result := NewGetUseTaxUnprocessableEntity()
|
|
||||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return nil, result
|
|
||||||
case 500:
|
|
||||||
result := NewGetUseTaxInternalServerError()
|
|
||||||
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())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetUseTaxOK creates a GetUseTaxOK with default headers values
|
|
||||||
func NewGetUseTaxOK() *GetUseTaxOK {
|
|
||||||
return &GetUseTaxOK{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*GetUseTaxOK handles this case with default header values.
|
|
||||||
|
|
||||||
Taxnexus Response with TaxSummaryResponse Objects
|
|
||||||
*/
|
|
||||||
type GetUseTaxOK struct {
|
|
||||||
Payload *plex_models.UseTaxResponse
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUseTaxOK) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /taxes/usetax][%d] getUseTaxOK %+v", 200, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUseTaxOK) GetPayload() *plex_models.UseTaxResponse {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUseTaxOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
||||||
|
|
||||||
o.Payload = new(plex_models.UseTaxResponse)
|
|
||||||
|
|
||||||
// response payload
|
|
||||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetUseTaxUnauthorized creates a GetUseTaxUnauthorized with default headers values
|
|
||||||
func NewGetUseTaxUnauthorized() *GetUseTaxUnauthorized {
|
|
||||||
return &GetUseTaxUnauthorized{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*GetUseTaxUnauthorized handles this case with default header values.
|
|
||||||
|
|
||||||
Access Unauthorized, invalid API-KEY was used
|
|
||||||
*/
|
|
||||||
type GetUseTaxUnauthorized struct {
|
|
||||||
Payload *plex_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUseTaxUnauthorized) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /taxes/usetax][%d] getUseTaxUnauthorized %+v", 401, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUseTaxUnauthorized) GetPayload() *plex_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUseTaxUnauthorized) 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
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetUseTaxForbidden creates a GetUseTaxForbidden with default headers values
|
|
||||||
func NewGetUseTaxForbidden() *GetUseTaxForbidden {
|
|
||||||
return &GetUseTaxForbidden{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*GetUseTaxForbidden handles this case with default header values.
|
|
||||||
|
|
||||||
Access forbidden, account lacks access
|
|
||||||
*/
|
|
||||||
type GetUseTaxForbidden struct {
|
|
||||||
Payload *plex_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUseTaxForbidden) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /taxes/usetax][%d] getUseTaxForbidden %+v", 403, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUseTaxForbidden) GetPayload() *plex_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUseTaxForbidden) 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
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetUseTaxNotFound creates a GetUseTaxNotFound with default headers values
|
|
||||||
func NewGetUseTaxNotFound() *GetUseTaxNotFound {
|
|
||||||
return &GetUseTaxNotFound{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*GetUseTaxNotFound handles this case with default header values.
|
|
||||||
|
|
||||||
Resource was not found
|
|
||||||
*/
|
|
||||||
type GetUseTaxNotFound struct {
|
|
||||||
Payload *plex_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUseTaxNotFound) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /taxes/usetax][%d] getUseTaxNotFound %+v", 404, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUseTaxNotFound) GetPayload() *plex_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUseTaxNotFound) 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
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetUseTaxUnprocessableEntity creates a GetUseTaxUnprocessableEntity with default headers values
|
|
||||||
func NewGetUseTaxUnprocessableEntity() *GetUseTaxUnprocessableEntity {
|
|
||||||
return &GetUseTaxUnprocessableEntity{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*GetUseTaxUnprocessableEntity handles this case with default header values.
|
|
||||||
|
|
||||||
Unprocessable Entity, likely a bad parameter
|
|
||||||
*/
|
|
||||||
type GetUseTaxUnprocessableEntity struct {
|
|
||||||
Payload *plex_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUseTaxUnprocessableEntity) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /taxes/usetax][%d] getUseTaxUnprocessableEntity %+v", 422, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUseTaxUnprocessableEntity) GetPayload() *plex_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUseTaxUnprocessableEntity) 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
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewGetUseTaxInternalServerError creates a GetUseTaxInternalServerError with default headers values
|
|
||||||
func NewGetUseTaxInternalServerError() *GetUseTaxInternalServerError {
|
|
||||||
return &GetUseTaxInternalServerError{}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*GetUseTaxInternalServerError handles this case with default header values.
|
|
||||||
|
|
||||||
Server Internal Error
|
|
||||||
*/
|
|
||||||
type GetUseTaxInternalServerError struct {
|
|
||||||
Payload *plex_models.Error
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUseTaxInternalServerError) Error() string {
|
|
||||||
return fmt.Sprintf("[GET /taxes/usetax][%d] getUseTaxInternalServerError %+v", 500, o.Payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUseTaxInternalServerError) GetPayload() *plex_models.Error {
|
|
||||||
return o.Payload
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *GetUseTaxInternalServerError) 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
|
|
||||||
}
|
|
|
@ -31,52 +31,11 @@ type Client struct {
|
||||||
|
|
||||||
// ClientService is the interface for Client methods
|
// ClientService is the interface for Client methods
|
||||||
type ClientService interface {
|
type ClientService interface {
|
||||||
GetDistrictTaxes(params *GetDistrictTaxesParams, authInfo runtime.ClientAuthInfoWriter) (*GetDistrictTaxesOK, error)
|
|
||||||
|
|
||||||
GetSalesAndUseTaxReturn(params *GetSalesAndUseTaxReturnParams, authInfo runtime.ClientAuthInfoWriter) (*GetSalesAndUseTaxReturnOK, error)
|
GetSalesAndUseTaxReturn(params *GetSalesAndUseTaxReturnParams, authInfo runtime.ClientAuthInfoWriter) (*GetSalesAndUseTaxReturnOK, error)
|
||||||
|
|
||||||
GetUseTax(params *GetUseTaxParams, authInfo runtime.ClientAuthInfoWriter) (*GetUseTaxOK, error)
|
|
||||||
|
|
||||||
SetTransport(transport runtime.ClientTransport)
|
SetTransport(transport runtime.ClientTransport)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
GetDistrictTaxes returns summary tax reports for an account
|
|
||||||
|
|
||||||
Return district summary tax reports for an Account
|
|
||||||
*/
|
|
||||||
func (a *Client) GetDistrictTaxes(params *GetDistrictTaxesParams, authInfo runtime.ClientAuthInfoWriter) (*GetDistrictTaxesOK, error) {
|
|
||||||
// TODO: Validate the params before sending
|
|
||||||
if params == nil {
|
|
||||||
params = NewGetDistrictTaxesParams()
|
|
||||||
}
|
|
||||||
|
|
||||||
result, err := a.transport.Submit(&runtime.ClientOperation{
|
|
||||||
ID: "getDistrictTaxes",
|
|
||||||
Method: "GET",
|
|
||||||
PathPattern: "/taxes/districts",
|
|
||||||
ProducesMediaTypes: []string{"application/json"},
|
|
||||||
ConsumesMediaTypes: []string{"application/json"},
|
|
||||||
Schemes: []string{"http"},
|
|
||||||
Params: params,
|
|
||||||
Reader: &GetDistrictTaxesReader{formats: a.formats},
|
|
||||||
AuthInfo: authInfo,
|
|
||||||
Context: params.Context,
|
|
||||||
Client: params.HTTPClient,
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
success, ok := result.(*GetDistrictTaxesOK)
|
|
||||||
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 getDistrictTaxes: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
|
||||||
panic(msg)
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
GetSalesAndUseTaxReturn taxes return use tax summaries for an account
|
GetSalesAndUseTaxReturn taxes return use tax summaries for an account
|
||||||
|
|
||||||
|
@ -114,43 +73,6 @@ func (a *Client) GetSalesAndUseTaxReturn(params *GetSalesAndUseTaxReturnParams,
|
||||||
panic(msg)
|
panic(msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
GetUseTax returns use tax summaries for an account
|
|
||||||
|
|
||||||
Return use tax summaries for an Account
|
|
||||||
*/
|
|
||||||
func (a *Client) GetUseTax(params *GetUseTaxParams, authInfo runtime.ClientAuthInfoWriter) (*GetUseTaxOK, error) {
|
|
||||||
// TODO: Validate the params before sending
|
|
||||||
if params == nil {
|
|
||||||
params = NewGetUseTaxParams()
|
|
||||||
}
|
|
||||||
|
|
||||||
result, err := a.transport.Submit(&runtime.ClientOperation{
|
|
||||||
ID: "getUseTax",
|
|
||||||
Method: "GET",
|
|
||||||
PathPattern: "/taxes/usetax",
|
|
||||||
ProducesMediaTypes: []string{"application/json"},
|
|
||||||
ConsumesMediaTypes: []string{"application/json"},
|
|
||||||
Schemes: []string{"http"},
|
|
||||||
Params: params,
|
|
||||||
Reader: &GetUseTaxReader{formats: a.formats},
|
|
||||||
AuthInfo: authInfo,
|
|
||||||
Context: params.Context,
|
|
||||||
Client: params.HTTPClient,
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
success, ok := result.(*GetUseTaxOK)
|
|
||||||
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 getUseTax: 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
|
// SetTransport changes the transport on the client
|
||||||
func (a *Client) SetTransport(transport runtime.ClientTransport) {
|
func (a *Client) SetTransport(transport runtime.ClientTransport) {
|
||||||
a.transport = transport
|
a.transport = transport
|
||||||
|
|
|
@ -25,11 +25,11 @@ type TaxReturnPanel struct {
|
||||||
// business taxes total
|
// business taxes total
|
||||||
BusinessTaxesTotal float64 `json:"BusinessTaxesTotal,omitempty"`
|
BusinessTaxesTotal float64 `json:"BusinessTaxesTotal,omitempty"`
|
||||||
|
|
||||||
// c o g s
|
// cannabis c o g s
|
||||||
COGS []float64 `json:"COGS"`
|
CannabisCOGS []float64 `json:"CannabisCOGS"`
|
||||||
|
|
||||||
// c o g s total
|
// cannabis c o g s total
|
||||||
COGSTotal float64 `json:"COGSTotal,omitempty"`
|
CannabisCOGSTotal float64 `json:"CannabisCOGSTotal,omitempty"`
|
||||||
|
|
||||||
// cannabis revenue
|
// cannabis revenue
|
||||||
CannabisRevenue []float64 `json:"CannabisRevenue"`
|
CannabisRevenue []float64 `json:"CannabisRevenue"`
|
||||||
|
@ -46,12 +46,39 @@ type TaxReturnPanel struct {
|
||||||
// county sales tax rate
|
// county sales tax rate
|
||||||
CountySalesTaxRate float64 `json:"CountySalesTaxRate,omitempty"`
|
CountySalesTaxRate float64 `json:"CountySalesTaxRate,omitempty"`
|
||||||
|
|
||||||
|
// county sales taxes
|
||||||
|
CountySalesTaxes []float64 `json:"CountySalesTaxes"`
|
||||||
|
|
||||||
|
// county sales taxes total
|
||||||
|
CountySalesTaxesTotal float64 `json:"CountySalesTaxesTotal,omitempty"`
|
||||||
|
|
||||||
|
// district cannabis business taxes
|
||||||
|
DistrictCannabisBusinessTaxes []float64 `json:"DistrictCannabisBusinessTaxes"`
|
||||||
|
|
||||||
|
// district cannabis business taxes total
|
||||||
|
DistrictCannabisBusinessTaxesTotal float64 `json:"DistrictCannabisBusinessTaxesTotal,omitempty"`
|
||||||
|
|
||||||
|
// district cannabis delivery taxes
|
||||||
|
DistrictCannabisDeliveryTaxes []float64 `json:"DistrictCannabisDeliveryTaxes"`
|
||||||
|
|
||||||
|
// district cannabis delivery taxes total
|
||||||
|
DistrictCannabisDeliveryTaxesTotal float64 `json:"DistrictCannabisDeliveryTaxesTotal,omitempty"`
|
||||||
|
|
||||||
// district combined rate
|
// district combined rate
|
||||||
DistrictCombinedRate float64 `json:"DistrictCombinedRate,omitempty"`
|
DistrictCombinedRate float64 `json:"DistrictCombinedRate,omitempty"`
|
||||||
|
|
||||||
|
// district name
|
||||||
|
DistrictName string `json:"DistrictName,omitempty"`
|
||||||
|
|
||||||
// district sales tax rate
|
// district sales tax rate
|
||||||
DistrictSalesTaxRate float64 `json:"DistrictSalesTaxRate,omitempty"`
|
DistrictSalesTaxRate float64 `json:"DistrictSalesTaxRate,omitempty"`
|
||||||
|
|
||||||
|
// district sales taxes
|
||||||
|
DistrictSalesTaxes []float64 `json:"DistrictSalesTaxes"`
|
||||||
|
|
||||||
|
// district sales taxes total
|
||||||
|
DistrictSalesTaxesTotal float64 `json:"DistrictSalesTaxesTotal,omitempty"`
|
||||||
|
|
||||||
// district type
|
// district type
|
||||||
DistrictType string `json:"DistrictType,omitempty"`
|
DistrictType string `json:"DistrictType,omitempty"`
|
||||||
|
|
||||||
|
@ -67,6 +94,12 @@ type TaxReturnPanel struct {
|
||||||
// has district taxes
|
// has district taxes
|
||||||
HasDistrictTaxes bool `json:"HasDistrictTaxes,omitempty"`
|
HasDistrictTaxes bool `json:"HasDistrictTaxes,omitempty"`
|
||||||
|
|
||||||
|
// merch c o g s
|
||||||
|
MerchCOGS []float64 `json:"MerchCOGS"`
|
||||||
|
|
||||||
|
// merch c o g s total
|
||||||
|
MerchCOGSTotal float64 `json:"MerchCOGSTotal,omitempty"`
|
||||||
|
|
||||||
// merch revenue
|
// merch revenue
|
||||||
MerchRevenue []float64 `json:"MerchRevenue"`
|
MerchRevenue []float64 `json:"MerchRevenue"`
|
||||||
|
|
||||||
|
@ -85,15 +118,27 @@ type TaxReturnPanel struct {
|
||||||
// sales tax basis total
|
// sales tax basis total
|
||||||
SalesTaxBasisTotal float64 `json:"SalesTaxBasisTotal,omitempty"`
|
SalesTaxBasisTotal float64 `json:"SalesTaxBasisTotal,omitempty"`
|
||||||
|
|
||||||
// sales tax total
|
|
||||||
SalesTaxTotal float64 `json:"SalesTaxTotal,omitempty"`
|
|
||||||
|
|
||||||
// sales taxes
|
// sales taxes
|
||||||
SalesTaxes []float64 `json:"SalesTaxes"`
|
SalesTaxes []float64 `json:"SalesTaxes"`
|
||||||
|
|
||||||
|
// sales taxes total
|
||||||
|
SalesTaxesTotal float64 `json:"SalesTaxesTotal,omitempty"`
|
||||||
|
|
||||||
|
// state cannabis taxes
|
||||||
|
StateCannabisTaxes []float64 `json:"StateCannabisTaxes"`
|
||||||
|
|
||||||
|
// state cannabis taxes total
|
||||||
|
StateCannabisTaxesTotal float64 `json:"StateCannabisTaxesTotal,omitempty"`
|
||||||
|
|
||||||
// state sales tax rate
|
// state sales tax rate
|
||||||
StateSalesTaxRate float64 `json:"StateSalesTaxRate,omitempty"`
|
StateSalesTaxRate float64 `json:"StateSalesTaxRate,omitempty"`
|
||||||
|
|
||||||
|
// state sales taxes
|
||||||
|
StateSalesTaxes []float64 `json:"StateSalesTaxes"`
|
||||||
|
|
||||||
|
// state sales taxes total
|
||||||
|
StateSalesTaxesTotal float64 `json:"StateSalesTaxesTotal,omitempty"`
|
||||||
|
|
||||||
// tax exempt revenue
|
// tax exempt revenue
|
||||||
TaxExemptRevenue []float64 `json:"TaxExemptRevenue"`
|
TaxExemptRevenue []float64 `json:"TaxExemptRevenue"`
|
||||||
|
|
||||||
|
@ -102,6 +147,12 @@ type TaxReturnPanel struct {
|
||||||
|
|
||||||
// title
|
// title
|
||||||
Title string `json:"Title,omitempty"`
|
Title string `json:"Title,omitempty"`
|
||||||
|
|
||||||
|
// total sales taxes total
|
||||||
|
TotalSalesTaxesTotal float64 `json:"TotalSalesTaxesTotal,omitempty"`
|
||||||
|
|
||||||
|
// total taxes
|
||||||
|
TotalTaxes []float64 `json:"TotalTaxes"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate validates this tax return panel
|
// Validate validates this tax return panel
|
||||||
|
|
|
@ -106,136 +106,6 @@ responses:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/UseTaxResponse"
|
$ref: "#/definitions/UseTaxResponse"
|
||||||
paths:
|
paths:
|
||||||
/invoices:
|
|
||||||
get:
|
|
||||||
description: Return invoice summaries by month for an Account
|
|
||||||
operationId: getInvoices
|
|
||||||
parameters:
|
|
||||||
- $ref: "#/parameters/accountIdQuery"
|
|
||||||
- $ref: "#/parameters/yearQuery"
|
|
||||||
- $ref: "#/parameters/quarterQuery"
|
|
||||||
- $ref: "#/parameters/monthQuery"
|
|
||||||
- $ref: "#/parameters/semiannualQuery"
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
$ref: "#/responses/InvoiceSummaryResponse"
|
|
||||||
"401":
|
|
||||||
$ref: "#/responses/Unauthorized"
|
|
||||||
"403":
|
|
||||||
$ref: "#/responses/AccessForbidden"
|
|
||||||
"404":
|
|
||||||
$ref: "#/responses/NotFound"
|
|
||||||
"422":
|
|
||||||
$ref: "#/responses/UnprocessableEntity"
|
|
||||||
"500":
|
|
||||||
$ref: "#/responses/ServerError"
|
|
||||||
summary: Return invoice summaries by month
|
|
||||||
tags:
|
|
||||||
- Invoice
|
|
||||||
/invoices/medicinal:
|
|
||||||
get:
|
|
||||||
description: Return medicinal revenue summary by period specified
|
|
||||||
operationId: getMedicinal
|
|
||||||
parameters:
|
|
||||||
- $ref: "#/parameters/accountIdQuery"
|
|
||||||
- $ref: "#/parameters/yearQuery"
|
|
||||||
- $ref: "#/parameters/quarterQuery"
|
|
||||||
- $ref: "#/parameters/monthQuery"
|
|
||||||
- $ref: "#/parameters/semiannualQuery"
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
$ref: "#/responses/InvoiceSummaryResponse"
|
|
||||||
"401":
|
|
||||||
$ref: "#/responses/Unauthorized"
|
|
||||||
"403":
|
|
||||||
$ref: "#/responses/AccessForbidden"
|
|
||||||
"404":
|
|
||||||
$ref: "#/responses/NotFound"
|
|
||||||
"422":
|
|
||||||
$ref: "#/responses/UnprocessableEntity"
|
|
||||||
"500":
|
|
||||||
$ref: "#/responses/ServerError"
|
|
||||||
summary: Return medicinal revenue summary by period specified
|
|
||||||
tags:
|
|
||||||
- Invoice
|
|
||||||
/invoiceitems:
|
|
||||||
get:
|
|
||||||
description: Return invoiceitem summaries by month for an Account
|
|
||||||
operationId: getInvoiceitems
|
|
||||||
parameters:
|
|
||||||
- $ref: "#/parameters/accountIdQuery"
|
|
||||||
- $ref: "#/parameters/yearQuery"
|
|
||||||
- $ref: "#/parameters/quarterQuery"
|
|
||||||
- $ref: "#/parameters/monthQuery"
|
|
||||||
- $ref: "#/parameters/semiannualQuery"
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
$ref: "#/responses/InvoiceItemSummaryResponse"
|
|
||||||
"401":
|
|
||||||
$ref: "#/responses/Unauthorized"
|
|
||||||
"403":
|
|
||||||
$ref: "#/responses/AccessForbidden"
|
|
||||||
"404":
|
|
||||||
$ref: "#/responses/NotFound"
|
|
||||||
"422":
|
|
||||||
$ref: "#/responses/UnprocessableEntity"
|
|
||||||
"500":
|
|
||||||
$ref: "#/responses/ServerError"
|
|
||||||
summary: Return invoice item summaries by month
|
|
||||||
tags:
|
|
||||||
- InvoiceItem
|
|
||||||
/taxes/districts:
|
|
||||||
get:
|
|
||||||
description: Return district summary tax reports for an Account
|
|
||||||
operationId: getDistrictTaxes
|
|
||||||
parameters:
|
|
||||||
- $ref: "#/parameters/accountIdQuery"
|
|
||||||
- $ref: "#/parameters/yearQuery"
|
|
||||||
- $ref: "#/parameters/quarterQuery"
|
|
||||||
- $ref: "#/parameters/monthQuery"
|
|
||||||
- $ref: "#/parameters/semiannualQuery"
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
$ref: "#/responses/TaxSummaryResponse"
|
|
||||||
"401":
|
|
||||||
$ref: "#/responses/Unauthorized"
|
|
||||||
"403":
|
|
||||||
$ref: "#/responses/AccessForbidden"
|
|
||||||
"404":
|
|
||||||
$ref: "#/responses/NotFound"
|
|
||||||
"422":
|
|
||||||
$ref: "#/responses/UnprocessableEntity"
|
|
||||||
"500":
|
|
||||||
$ref: "#/responses/ServerError"
|
|
||||||
summary: Return summary tax reports for an Account
|
|
||||||
tags:
|
|
||||||
- Tax
|
|
||||||
/taxes/usetax:
|
|
||||||
get:
|
|
||||||
description: Return use tax summaries for an Account
|
|
||||||
operationId: getUseTax
|
|
||||||
parameters:
|
|
||||||
- $ref: "#/parameters/accountIdQuery"
|
|
||||||
- $ref: "#/parameters/yearQuery"
|
|
||||||
- $ref: "#/parameters/quarterQuery"
|
|
||||||
- $ref: "#/parameters/monthQuery"
|
|
||||||
- $ref: "#/parameters/semiannualQuery"
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
$ref: "#/responses/UseTaxResponse"
|
|
||||||
"401":
|
|
||||||
$ref: "#/responses/Unauthorized"
|
|
||||||
"403":
|
|
||||||
$ref: "#/responses/AccessForbidden"
|
|
||||||
"404":
|
|
||||||
$ref: "#/responses/NotFound"
|
|
||||||
"422":
|
|
||||||
$ref: "#/responses/UnprocessableEntity"
|
|
||||||
"500":
|
|
||||||
$ref: "#/responses/ServerError"
|
|
||||||
summary: Return use tax summaries for an Account
|
|
||||||
tags:
|
|
||||||
- Tax
|
|
||||||
/taxreturns/salesanduse:
|
/taxreturns/salesanduse:
|
||||||
get:
|
get:
|
||||||
description: Return CDTFA Sales & Use Tax Return
|
description: Return CDTFA Sales & Use Tax Return
|
||||||
|
@ -564,18 +434,18 @@ definitions:
|
||||||
BusinessTaxesTotal:
|
BusinessTaxesTotal:
|
||||||
format: double
|
format: double
|
||||||
type: number
|
type: number
|
||||||
COGS:
|
CannabisCOGS:
|
||||||
items:
|
items:
|
||||||
type: number
|
|
||||||
format: double
|
format: double
|
||||||
|
type: number
|
||||||
type: array
|
type: array
|
||||||
COGSTotal:
|
CannabisCOGSTotal:
|
||||||
type: number
|
|
||||||
format: double
|
format: double
|
||||||
|
type: number
|
||||||
CannabisRevenue:
|
CannabisRevenue:
|
||||||
items:
|
items:
|
||||||
type: number
|
|
||||||
format: double
|
format: double
|
||||||
|
type: number
|
||||||
type: array
|
type: array
|
||||||
CannabisRevenueTotal:
|
CannabisRevenueTotal:
|
||||||
format: double
|
format: double
|
||||||
|
@ -589,12 +459,46 @@ definitions:
|
||||||
CountySalesTaxRate:
|
CountySalesTaxRate:
|
||||||
format: double
|
format: double
|
||||||
type: number
|
type: number
|
||||||
|
CountySalesTaxes:
|
||||||
|
items:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
type: array
|
||||||
|
CountySalesTaxesTotal:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
DistrictCombinedRate:
|
DistrictCombinedRate:
|
||||||
format: double
|
format: double
|
||||||
type: number
|
type: number
|
||||||
DistrictSalesTaxRate:
|
DistrictSalesTaxRate:
|
||||||
format: double
|
format: double
|
||||||
type: number
|
type: number
|
||||||
|
DistrictCannabisBusinessTaxes:
|
||||||
|
items:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
type: array
|
||||||
|
DistrictCannabisBusinessTaxesTotal:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
DistrictCannabisDeliveryTaxes:
|
||||||
|
items:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
type: array
|
||||||
|
DistrictCannabisDeliveryTaxesTotal:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
DistrictSalesTaxes:
|
||||||
|
items:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
type: array
|
||||||
|
DistrictSalesTaxesTotal:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
DistrictName:
|
||||||
|
type: string
|
||||||
DistrictType:
|
DistrictType:
|
||||||
type: string
|
type: string
|
||||||
ExciseTaxes:
|
ExciseTaxes:
|
||||||
|
@ -603,12 +507,20 @@ definitions:
|
||||||
type: number
|
type: number
|
||||||
type: array
|
type: array
|
||||||
ExciseTaxesTotal:
|
ExciseTaxesTotal:
|
||||||
type: number
|
|
||||||
format: double
|
format: double
|
||||||
|
type: number
|
||||||
Geocode:
|
Geocode:
|
||||||
type: string
|
type: string
|
||||||
HasDistrictTaxes:
|
HasDistrictTaxes:
|
||||||
type: boolean
|
type: boolean
|
||||||
|
MerchCOGS:
|
||||||
|
items:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
type: array
|
||||||
|
MerchCOGSTotal:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
MerchRevenue:
|
MerchRevenue:
|
||||||
items:
|
items:
|
||||||
format: double
|
format: double
|
||||||
|
@ -619,41 +531,65 @@ definitions:
|
||||||
type: number
|
type: number
|
||||||
PreTaxRevenue:
|
PreTaxRevenue:
|
||||||
items:
|
items:
|
||||||
type: number
|
|
||||||
format: double
|
format: double
|
||||||
|
type: number
|
||||||
type: array
|
type: array
|
||||||
PreTaxRevenueTotal:
|
PreTaxRevenueTotal:
|
||||||
type: number
|
|
||||||
format: double
|
format: double
|
||||||
|
type: number
|
||||||
SalesTaxBasis:
|
SalesTaxBasis:
|
||||||
items:
|
items:
|
||||||
format: double
|
format: double
|
||||||
type: number
|
type: number
|
||||||
type: array
|
type: array
|
||||||
SalesTaxBasisTotal:
|
SalesTaxBasisTotal:
|
||||||
type: number
|
|
||||||
format: double
|
format: double
|
||||||
SalesTaxTotal:
|
|
||||||
type: number
|
type: number
|
||||||
format: double
|
|
||||||
SalesTaxes:
|
SalesTaxes:
|
||||||
items:
|
items:
|
||||||
type: number
|
|
||||||
format: double
|
format: double
|
||||||
|
type: number
|
||||||
type: array
|
type: array
|
||||||
StateSalesTaxRate:
|
SalesTaxesTotal:
|
||||||
type: number
|
|
||||||
format: double
|
format: double
|
||||||
|
type: number
|
||||||
|
StateSalesTaxRate:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
StateSalesTaxes:
|
||||||
|
items:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
type: array
|
||||||
|
StateSalesTaxesTotal:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
StateCannabisTaxes:
|
||||||
|
items:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
type: array
|
||||||
|
StateCannabisTaxesTotal:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
TaxExemptRevenue:
|
TaxExemptRevenue:
|
||||||
items:
|
items:
|
||||||
type: number
|
|
||||||
format: double
|
format: double
|
||||||
|
type: number
|
||||||
type: array
|
type: array
|
||||||
TaxExemptRevenueTotal:
|
TaxExemptRevenueTotal:
|
||||||
format: double
|
format: double
|
||||||
type: number
|
type: number
|
||||||
Title:
|
Title:
|
||||||
type: string
|
type: string
|
||||||
|
TotalSalesTaxesTotal:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
TotalTaxes:
|
||||||
|
items:
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
type: array
|
||||||
type: object
|
type: object
|
||||||
TaxReturnResponse:
|
TaxReturnResponse:
|
||||||
description: An array of Tax Return Objects
|
description: An array of Tax Return Objects
|
||||||
|
|
Loading…
Reference in New Issue