2021-01-08 17:40:28 +00:00
// Code generated by go-swagger; DO NOT EDIT.
2021-01-19 16:58:40 +00:00
// All Code Copyright(c) 2018-2021 by Taxnexus, Inc.
2021-01-08 17:40:28 +00:00
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package sales
// 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 sales API client.
func New ( transport runtime . ClientTransport , formats strfmt . Registry ) ClientService {
return & Client { transport : transport , formats : formats }
}
/ *
Client for sales API
* /
type Client struct {
transport runtime . ClientTransport
formats strfmt . Registry
}
// ClientService is the interface for Client methods
type ClientService interface {
DeleteSalesDelivery ( params * DeleteSalesDeliveryParams , authInfo runtime . ClientAuthInfoWriter ) ( * DeleteSalesDeliveryOK , error )
DeleteSalesReceipts ( params * DeleteSalesReceiptsParams , authInfo runtime . ClientAuthInfoWriter ) ( * DeleteSalesReceiptsOK , error )
GetCustomerTypes ( params * GetCustomerTypesParams , authInfo runtime . ClientAuthInfoWriter ) ( * GetCustomerTypesOK , error )
GetSalesDeliveries ( params * GetSalesDeliveriesParams , authInfo runtime . ClientAuthInfoWriter ) ( * GetSalesDeliveriesOK , error )
GetSalesDeliveryReturnReasons ( params * GetSalesDeliveryReturnReasonsParams , authInfo runtime . ClientAuthInfoWriter ) ( * GetSalesDeliveryReturnReasonsOK , error )
GetSalesReceipts ( params * GetSalesReceiptsParams , authInfo runtime . ClientAuthInfoWriter ) ( * GetSalesReceiptsOK , error )
GetSalesTransactionDates ( params * GetSalesTransactionDatesParams , authInfo runtime . ClientAuthInfoWriter ) ( * GetSalesTransactionDatesOK , error )
GetSalesTransactions ( params * GetSalesTransactionsParams , authInfo runtime . ClientAuthInfoWriter ) ( * GetSalesTransactionsOK , error )
PostSalesDeliveries ( params * PostSalesDeliveriesParams , authInfo runtime . ClientAuthInfoWriter ) ( * PostSalesDeliveriesOK , error )
PostSalesReceipts ( params * PostSalesReceiptsParams , authInfo runtime . ClientAuthInfoWriter ) ( * PostSalesReceiptsOK , error )
PostSalesTransactions ( params * PostSalesTransactionsParams , authInfo runtime . ClientAuthInfoWriter ) ( * PostSalesTransactionsOK , error )
PutSalesDeliveries ( params * PutSalesDeliveriesParams , authInfo runtime . ClientAuthInfoWriter ) ( * PutSalesDeliveriesOK , error )
PutSalesReceipts ( params * PutSalesReceiptsParams , authInfo runtime . ClientAuthInfoWriter ) ( * PutSalesReceiptsOK , error )
PutSalesTransactions ( params * PutSalesTransactionsParams , authInfo runtime . ClientAuthInfoWriter ) ( * PutSalesTransactionsOK , error )
SetTransport ( transport runtime . ClientTransport )
}
/ *
DeleteSalesDelivery sales delivery deleted for this user license
Delete a Sales Delivery for this User - License
* /
func ( a * Client ) DeleteSalesDelivery ( params * DeleteSalesDeliveryParams , authInfo runtime . ClientAuthInfoWriter ) ( * DeleteSalesDeliveryOK , error ) {
// TODO: Validate the params before sending
if params == nil {
params = NewDeleteSalesDeliveryParams ( )
}
result , err := a . transport . Submit ( & runtime . ClientOperation {
ID : "deleteSalesDelivery" ,
Method : "DELETE" ,
PathPattern : "/sales/deliveries" ,
ProducesMediaTypes : [ ] string { "application/json" } ,
ConsumesMediaTypes : [ ] string { "application/json" } ,
Schemes : [ ] string { "http" } ,
Params : params ,
Reader : & DeleteSalesDeliveryReader { formats : a . formats } ,
AuthInfo : authInfo ,
Context : params . Context ,
Client : params . HTTPClient ,
} )
if err != nil {
return nil , err
}
success , ok := result . ( * DeleteSalesDeliveryOK )
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 deleteSalesDelivery: API contract not enforced by server. Client expected to get an error, but got: %T" , result )
panic ( msg )
}
/ *
DeleteSalesReceipts sales receipts for this user license
Delete a Sales Receipt for this User - License
* /
func ( a * Client ) DeleteSalesReceipts ( params * DeleteSalesReceiptsParams , authInfo runtime . ClientAuthInfoWriter ) ( * DeleteSalesReceiptsOK , error ) {
// TODO: Validate the params before sending
if params == nil {
params = NewDeleteSalesReceiptsParams ( )
}
result , err := a . transport . Submit ( & runtime . ClientOperation {
ID : "deleteSalesReceipts" ,
Method : "DELETE" ,
PathPattern : "/sales/receipts" ,
ProducesMediaTypes : [ ] string { "application/json" } ,
ConsumesMediaTypes : [ ] string { "application/json" } ,
Schemes : [ ] string { "http" } ,
Params : params ,
Reader : & DeleteSalesReceiptsReader { formats : a . formats } ,
AuthInfo : authInfo ,
Context : params . Context ,
Client : params . HTTPClient ,
} )
if err != nil {
return nil , err
}
success , ok := result . ( * DeleteSalesReceiptsOK )
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 deleteSalesReceipts: API contract not enforced by server. Client expected to get an error, but got: %T" , result )
panic ( msg )
}
/ *
GetCustomerTypes customers types for user
Get Customer Types for this User
* /
func ( a * Client ) GetCustomerTypes ( params * GetCustomerTypesParams , authInfo runtime . ClientAuthInfoWriter ) ( * GetCustomerTypesOK , error ) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetCustomerTypesParams ( )
}
result , err := a . transport . Submit ( & runtime . ClientOperation {
ID : "getCustomerTypes" ,
Method : "GET" ,
PathPattern : "/sales/customertypes" ,
ProducesMediaTypes : [ ] string { "application/json" } ,
ConsumesMediaTypes : [ ] string { "application/json" } ,
Schemes : [ ] string { "http" } ,
Params : params ,
Reader : & GetCustomerTypesReader { formats : a . formats } ,
AuthInfo : authInfo ,
Context : params . Context ,
Client : params . HTTPClient ,
} )
if err != nil {
return nil , err
}
success , ok := result . ( * GetCustomerTypesOK )
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 getCustomerTypes: API contract not enforced by server. Client expected to get an error, but got: %T" , result )
panic ( msg )
}
/ *
GetSalesDeliveries deliveries for user license
Deliveries for this User - License
* /
func ( a * Client ) GetSalesDeliveries ( params * GetSalesDeliveriesParams , authInfo runtime . ClientAuthInfoWriter ) ( * GetSalesDeliveriesOK , error ) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetSalesDeliveriesParams ( )
}
result , err := a . transport . Submit ( & runtime . ClientOperation {
ID : "getSalesDeliveries" ,
Method : "GET" ,
PathPattern : "/sales/deliveries" ,
ProducesMediaTypes : [ ] string { "application/json" } ,
ConsumesMediaTypes : [ ] string { "application/json" } ,
Schemes : [ ] string { "http" } ,
Params : params ,
Reader : & GetSalesDeliveriesReader { formats : a . formats } ,
AuthInfo : authInfo ,
Context : params . Context ,
Client : params . HTTPClient ,
} )
if err != nil {
return nil , err
}
success , ok := result . ( * GetSalesDeliveriesOK )
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 getSalesDeliveries: API contract not enforced by server. Client expected to get an error, but got: %T" , result )
panic ( msg )
}
/ *
GetSalesDeliveryReturnReasons deliveries return reasons for user license
Delivery Return Reasons for this User - License
* /
func ( a * Client ) GetSalesDeliveryReturnReasons ( params * GetSalesDeliveryReturnReasonsParams , authInfo runtime . ClientAuthInfoWriter ) ( * GetSalesDeliveryReturnReasonsOK , error ) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetSalesDeliveryReturnReasonsParams ( )
}
result , err := a . transport . Submit ( & runtime . ClientOperation {
ID : "getSalesDeliveryReturnReasons" ,
Method : "GET" ,
PathPattern : "/sales/deliveries/returnreasons" ,
ProducesMediaTypes : [ ] string { "application/json" } ,
ConsumesMediaTypes : [ ] string { "application/json" } ,
Schemes : [ ] string { "http" } ,
Params : params ,
Reader : & GetSalesDeliveryReturnReasonsReader { formats : a . formats } ,
AuthInfo : authInfo ,
Context : params . Context ,
Client : params . HTTPClient ,
} )
if err != nil {
return nil , err
}
success , ok := result . ( * GetSalesDeliveryReturnReasonsOK )
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 getSalesDeliveryReturnReasons: API contract not enforced by server. Client expected to get an error, but got: %T" , result )
panic ( msg )
}
/ *
GetSalesReceipts sales receipts for user license
Sales Receipts for this User - License
* /
func ( a * Client ) GetSalesReceipts ( params * GetSalesReceiptsParams , authInfo runtime . ClientAuthInfoWriter ) ( * GetSalesReceiptsOK , error ) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetSalesReceiptsParams ( )
}
result , err := a . transport . Submit ( & runtime . ClientOperation {
ID : "getSalesReceipts" ,
Method : "GET" ,
PathPattern : "/sales/receipts" ,
ProducesMediaTypes : [ ] string { "application/json" } ,
ConsumesMediaTypes : [ ] string { "application/json" } ,
Schemes : [ ] string { "http" } ,
Params : params ,
Reader : & GetSalesReceiptsReader { formats : a . formats } ,
AuthInfo : authInfo ,
Context : params . Context ,
Client : params . HTTPClient ,
} )
if err != nil {
return nil , err
}
success , ok := result . ( * GetSalesReceiptsOK )
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 getSalesReceipts: API contract not enforced by server. Client expected to get an error, but got: %T" , result )
panic ( msg )
}
/ *
GetSalesTransactionDates as list of sales transaction dates for this user license
Get A list of Sales Transaction Dates for this User - License
* /
func ( a * Client ) GetSalesTransactionDates ( params * GetSalesTransactionDatesParams , authInfo runtime . ClientAuthInfoWriter ) ( * GetSalesTransactionDatesOK , error ) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetSalesTransactionDatesParams ( )
}
result , err := a . transport . Submit ( & runtime . ClientOperation {
ID : "getSalesTransactionDates" ,
Method : "GET" ,
PathPattern : "/sales/transactiondates" ,
ProducesMediaTypes : [ ] string { "application/json" } ,
ConsumesMediaTypes : [ ] string { "application/json" } ,
Schemes : [ ] string { "http" } ,
Params : params ,
Reader : & GetSalesTransactionDatesReader { formats : a . formats } ,
AuthInfo : authInfo ,
Context : params . Context ,
Client : params . HTTPClient ,
} )
if err != nil {
return nil , err
}
success , ok := result . ( * GetSalesTransactionDatesOK )
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 getSalesTransactionDates: API contract not enforced by server. Client expected to get an error, but got: %T" , result )
panic ( msg )
}
/ *
GetSalesTransactions sales receipts for user license
Sales Transactions for this User - License
* /
func ( a * Client ) GetSalesTransactions ( params * GetSalesTransactionsParams , authInfo runtime . ClientAuthInfoWriter ) ( * GetSalesTransactionsOK , error ) {
// TODO: Validate the params before sending
if params == nil {
params = NewGetSalesTransactionsParams ( )
}
result , err := a . transport . Submit ( & runtime . ClientOperation {
ID : "getSalesTransactions" ,
Method : "GET" ,
PathPattern : "/sales/transactions" ,
ProducesMediaTypes : [ ] string { "application/json" } ,
ConsumesMediaTypes : [ ] string { "application/json" } ,
Schemes : [ ] string { "http" } ,
Params : params ,
Reader : & GetSalesTransactionsReader { formats : a . formats } ,
AuthInfo : authInfo ,
Context : params . Context ,
Client : params . HTTPClient ,
} )
if err != nil {
return nil , err
}
success , ok := result . ( * GetSalesTransactionsOK )
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 getSalesTransactions: API contract not enforced by server. Client expected to get an error, but got: %T" , result )
panic ( msg )
}
/ *
PostSalesDeliveries creates new sales deliveries
Create new Sales Deliveries
* /
func ( a * Client ) PostSalesDeliveries ( params * PostSalesDeliveriesParams , authInfo runtime . ClientAuthInfoWriter ) ( * PostSalesDeliveriesOK , error ) {
// TODO: Validate the params before sending
if params == nil {
params = NewPostSalesDeliveriesParams ( )
}
result , err := a . transport . Submit ( & runtime . ClientOperation {
ID : "postSalesDeliveries" ,
Method : "POST" ,
PathPattern : "/sales/deliveries" ,
ProducesMediaTypes : [ ] string { "application/json" } ,
ConsumesMediaTypes : [ ] string { "application/json" } ,
Schemes : [ ] string { "http" } ,
Params : params ,
Reader : & PostSalesDeliveriesReader { formats : a . formats } ,
AuthInfo : authInfo ,
Context : params . Context ,
Client : params . HTTPClient ,
} )
if err != nil {
return nil , err
}
success , ok := result . ( * PostSalesDeliveriesOK )
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 postSalesDeliveries: API contract not enforced by server. Client expected to get an error, but got: %T" , result )
panic ( msg )
}
/ *
PostSalesReceipts creates new sales receipts
Create new Sales Receipts
* /
func ( a * Client ) PostSalesReceipts ( params * PostSalesReceiptsParams , authInfo runtime . ClientAuthInfoWriter ) ( * PostSalesReceiptsOK , error ) {
// TODO: Validate the params before sending
if params == nil {
params = NewPostSalesReceiptsParams ( )
}
result , err := a . transport . Submit ( & runtime . ClientOperation {
ID : "postSalesReceipts" ,
Method : "POST" ,
PathPattern : "/sales/receipts" ,
ProducesMediaTypes : [ ] string { "application/json" } ,
ConsumesMediaTypes : [ ] string { "application/json" } ,
Schemes : [ ] string { "http" } ,
Params : params ,
Reader : & PostSalesReceiptsReader { formats : a . formats } ,
AuthInfo : authInfo ,
Context : params . Context ,
Client : params . HTTPClient ,
} )
if err != nil {
return nil , err
}
success , ok := result . ( * PostSalesReceiptsOK )
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 postSalesReceipts: API contract not enforced by server. Client expected to get an error, but got: %T" , result )
panic ( msg )
}
/ *
PostSalesTransactions creates new sales transactions
Create new Sales Transactions
* /
func ( a * Client ) PostSalesTransactions ( params * PostSalesTransactionsParams , authInfo runtime . ClientAuthInfoWriter ) ( * PostSalesTransactionsOK , error ) {
// TODO: Validate the params before sending
if params == nil {
params = NewPostSalesTransactionsParams ( )
}
result , err := a . transport . Submit ( & runtime . ClientOperation {
ID : "postSalesTransactions" ,
Method : "POST" ,
PathPattern : "/sales/transactions" ,
ProducesMediaTypes : [ ] string { "application/json" } ,
ConsumesMediaTypes : [ ] string { "application/json" } ,
Schemes : [ ] string { "http" } ,
Params : params ,
Reader : & PostSalesTransactionsReader { formats : a . formats } ,
AuthInfo : authInfo ,
Context : params . Context ,
Client : params . HTTPClient ,
} )
if err != nil {
return nil , err
}
success , ok := result . ( * PostSalesTransactionsOK )
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 postSalesTransactions: API contract not enforced by server. Client expected to get an error, but got: %T" , result )
panic ( msg )
}
/ *
PutSalesDeliveries creates new sales deliveries
Create new Sales Deliveries
* /
func ( a * Client ) PutSalesDeliveries ( params * PutSalesDeliveriesParams , authInfo runtime . ClientAuthInfoWriter ) ( * PutSalesDeliveriesOK , error ) {
// TODO: Validate the params before sending
if params == nil {
params = NewPutSalesDeliveriesParams ( )
}
result , err := a . transport . Submit ( & runtime . ClientOperation {
ID : "putSalesDeliveries" ,
Method : "PUT" ,
PathPattern : "/sales/deliveries" ,
ProducesMediaTypes : [ ] string { "application/json" } ,
ConsumesMediaTypes : [ ] string { "application/json" } ,
Schemes : [ ] string { "http" } ,
Params : params ,
Reader : & PutSalesDeliveriesReader { formats : a . formats } ,
AuthInfo : authInfo ,
Context : params . Context ,
Client : params . HTTPClient ,
} )
if err != nil {
return nil , err
}
success , ok := result . ( * PutSalesDeliveriesOK )
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 putSalesDeliveries: API contract not enforced by server. Client expected to get an error, but got: %T" , result )
panic ( msg )
}
/ *
PutSalesReceipts creates new sales receipts
Create new Sales Receipts
* /
func ( a * Client ) PutSalesReceipts ( params * PutSalesReceiptsParams , authInfo runtime . ClientAuthInfoWriter ) ( * PutSalesReceiptsOK , error ) {
// TODO: Validate the params before sending
if params == nil {
params = NewPutSalesReceiptsParams ( )
}
result , err := a . transport . Submit ( & runtime . ClientOperation {
ID : "putSalesReceipts" ,
Method : "PUT" ,
PathPattern : "/sales/receipts" ,
ProducesMediaTypes : [ ] string { "application/json" } ,
ConsumesMediaTypes : [ ] string { "application/json" } ,
Schemes : [ ] string { "http" } ,
Params : params ,
Reader : & PutSalesReceiptsReader { formats : a . formats } ,
AuthInfo : authInfo ,
Context : params . Context ,
Client : params . HTTPClient ,
} )
if err != nil {
return nil , err
}
success , ok := result . ( * PutSalesReceiptsOK )
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 putSalesReceipts: API contract not enforced by server. Client expected to get an error, but got: %T" , result )
panic ( msg )
}
/ *
PutSalesTransactions creates new sales transactions
Create new Sales Transactions
* /
func ( a * Client ) PutSalesTransactions ( params * PutSalesTransactionsParams , authInfo runtime . ClientAuthInfoWriter ) ( * PutSalesTransactionsOK , error ) {
// TODO: Validate the params before sending
if params == nil {
params = NewPutSalesTransactionsParams ( )
}
result , err := a . transport . Submit ( & runtime . ClientOperation {
ID : "putSalesTransactions" ,
Method : "PUT" ,
PathPattern : "/sales/transactions" ,
ProducesMediaTypes : [ ] string { "application/json" } ,
ConsumesMediaTypes : [ ] string { "application/json" } ,
Schemes : [ ] string { "http" } ,
Params : params ,
Reader : & PutSalesTransactionsReader { formats : a . formats } ,
AuthInfo : authInfo ,
Context : params . Context ,
Client : params . HTTPClient ,
} )
if err != nil {
return nil , err
}
success , ok := result . ( * PutSalesTransactionsOK )
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 putSalesTransactions: 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
}