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
}
2021-02-09 16:56:57 +00:00
// ClientOption is the option for Client methods
type ClientOption func ( * runtime . ClientOperation )
2021-01-08 17:40:28 +00:00
// ClientService is the interface for Client methods
type ClientService interface {
2021-02-09 16:56:57 +00:00
DeleteSalesDelivery ( params * DeleteSalesDeliveryParams , authInfo runtime . ClientAuthInfoWriter , opts ... ClientOption ) ( * DeleteSalesDeliveryOK , error )
2021-01-08 17:40:28 +00:00
2021-02-09 16:56:57 +00:00
DeleteSalesReceipts ( params * DeleteSalesReceiptsParams , authInfo runtime . ClientAuthInfoWriter , opts ... ClientOption ) ( * DeleteSalesReceiptsOK , error )
2021-01-08 17:40:28 +00:00
2021-02-09 16:56:57 +00:00
GetCustomerTypes ( params * GetCustomerTypesParams , authInfo runtime . ClientAuthInfoWriter , opts ... ClientOption ) ( * GetCustomerTypesOK , error )
2021-01-08 17:40:28 +00:00
2021-02-09 16:56:57 +00:00
GetSalesDeliveries ( params * GetSalesDeliveriesParams , authInfo runtime . ClientAuthInfoWriter , opts ... ClientOption ) ( * GetSalesDeliveriesOK , error )
2021-01-08 17:40:28 +00:00
2021-02-09 16:56:57 +00:00
GetSalesDeliveryReturnReasons ( params * GetSalesDeliveryReturnReasonsParams , authInfo runtime . ClientAuthInfoWriter , opts ... ClientOption ) ( * GetSalesDeliveryReturnReasonsOK , error )
2021-01-08 17:40:28 +00:00
2021-02-09 16:56:57 +00:00
GetSalesReceipts ( params * GetSalesReceiptsParams , authInfo runtime . ClientAuthInfoWriter , opts ... ClientOption ) ( * GetSalesReceiptsOK , error )
2021-01-08 17:40:28 +00:00
2021-02-09 16:56:57 +00:00
GetSalesTransactionDates ( params * GetSalesTransactionDatesParams , authInfo runtime . ClientAuthInfoWriter , opts ... ClientOption ) ( * GetSalesTransactionDatesOK , error )
2021-01-08 17:40:28 +00:00
2021-02-09 16:56:57 +00:00
GetSalesTransactions ( params * GetSalesTransactionsParams , authInfo runtime . ClientAuthInfoWriter , opts ... ClientOption ) ( * GetSalesTransactionsOK , error )
2021-01-08 17:40:28 +00:00
2021-02-09 16:56:57 +00:00
PostSalesDeliveries ( params * PostSalesDeliveriesParams , authInfo runtime . ClientAuthInfoWriter , opts ... ClientOption ) ( * PostSalesDeliveriesOK , error )
2021-01-08 17:40:28 +00:00
2021-02-09 16:56:57 +00:00
PostSalesReceipts ( params * PostSalesReceiptsParams , authInfo runtime . ClientAuthInfoWriter , opts ... ClientOption ) ( * PostSalesReceiptsOK , error )
2021-01-08 17:40:28 +00:00
2021-02-09 16:56:57 +00:00
PostSalesTransactions ( params * PostSalesTransactionsParams , authInfo runtime . ClientAuthInfoWriter , opts ... ClientOption ) ( * PostSalesTransactionsOK , error )
2021-01-08 17:40:28 +00:00
2021-02-09 16:56:57 +00:00
PutSalesDeliveries ( params * PutSalesDeliveriesParams , authInfo runtime . ClientAuthInfoWriter , opts ... ClientOption ) ( * PutSalesDeliveriesOK , error )
2021-01-08 17:40:28 +00:00
2021-02-09 16:56:57 +00:00
PutSalesReceipts ( params * PutSalesReceiptsParams , authInfo runtime . ClientAuthInfoWriter , opts ... ClientOption ) ( * PutSalesReceiptsOK , error )
2021-01-08 17:40:28 +00:00
2021-02-09 16:56:57 +00:00
PutSalesTransactions ( params * PutSalesTransactionsParams , authInfo runtime . ClientAuthInfoWriter , opts ... ClientOption ) ( * PutSalesTransactionsOK , error )
2021-01-08 17:40:28 +00:00
SetTransport ( transport runtime . ClientTransport )
}
/ *
DeleteSalesDelivery sales delivery deleted for this user license
Delete a Sales Delivery for this User - License
* /
2021-02-09 16:56:57 +00:00
func ( a * Client ) DeleteSalesDelivery ( params * DeleteSalesDeliveryParams , authInfo runtime . ClientAuthInfoWriter , opts ... ClientOption ) ( * DeleteSalesDeliveryOK , error ) {
2021-01-08 17:40:28 +00:00
// TODO: Validate the params before sending
if params == nil {
params = NewDeleteSalesDeliveryParams ( )
}
2021-02-09 16:56:57 +00:00
op := & runtime . ClientOperation {
2021-01-08 17:40:28 +00:00
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 ,
2021-02-09 16:56:57 +00:00
}
for _ , opt := range opts {
opt ( op )
}
result , err := a . transport . Submit ( op )
2021-01-08 17:40:28 +00:00
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
* /
2021-02-09 16:56:57 +00:00
func ( a * Client ) DeleteSalesReceipts ( params * DeleteSalesReceiptsParams , authInfo runtime . ClientAuthInfoWriter , opts ... ClientOption ) ( * DeleteSalesReceiptsOK , error ) {
2021-01-08 17:40:28 +00:00
// TODO: Validate the params before sending
if params == nil {
params = NewDeleteSalesReceiptsParams ( )
}
2021-02-09 16:56:57 +00:00
op := & runtime . ClientOperation {
2021-01-08 17:40:28 +00:00
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 ,
2021-02-09 16:56:57 +00:00
}
for _ , opt := range opts {
opt ( op )
}
result , err := a . transport . Submit ( op )
2021-01-08 17:40:28 +00:00
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
* /
2021-02-09 16:56:57 +00:00
func ( a * Client ) GetCustomerTypes ( params * GetCustomerTypesParams , authInfo runtime . ClientAuthInfoWriter , opts ... ClientOption ) ( * GetCustomerTypesOK , error ) {
2021-01-08 17:40:28 +00:00
// TODO: Validate the params before sending
if params == nil {
params = NewGetCustomerTypesParams ( )
}
2021-02-09 16:56:57 +00:00
op := & runtime . ClientOperation {
2021-01-08 17:40:28 +00:00
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 ,
2021-02-09 16:56:57 +00:00
}
for _ , opt := range opts {
opt ( op )
}
result , err := a . transport . Submit ( op )
2021-01-08 17:40:28 +00:00
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
* /
2021-02-09 16:56:57 +00:00
func ( a * Client ) GetSalesDeliveries ( params * GetSalesDeliveriesParams , authInfo runtime . ClientAuthInfoWriter , opts ... ClientOption ) ( * GetSalesDeliveriesOK , error ) {
2021-01-08 17:40:28 +00:00
// TODO: Validate the params before sending
if params == nil {
params = NewGetSalesDeliveriesParams ( )
}
2021-02-09 16:56:57 +00:00
op := & runtime . ClientOperation {
2021-01-08 17:40:28 +00:00
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 ,
2021-02-09 16:56:57 +00:00
}
for _ , opt := range opts {
opt ( op )
}
result , err := a . transport . Submit ( op )
2021-01-08 17:40:28 +00:00
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
* /
2021-02-09 16:56:57 +00:00
func ( a * Client ) GetSalesDeliveryReturnReasons ( params * GetSalesDeliveryReturnReasonsParams , authInfo runtime . ClientAuthInfoWriter , opts ... ClientOption ) ( * GetSalesDeliveryReturnReasonsOK , error ) {
2021-01-08 17:40:28 +00:00
// TODO: Validate the params before sending
if params == nil {
params = NewGetSalesDeliveryReturnReasonsParams ( )
}
2021-02-09 16:56:57 +00:00
op := & runtime . ClientOperation {
2021-01-08 17:40:28 +00:00
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 ,
2021-02-09 16:56:57 +00:00
}
for _ , opt := range opts {
opt ( op )
}
result , err := a . transport . Submit ( op )
2021-01-08 17:40:28 +00:00
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
* /
2021-02-09 16:56:57 +00:00
func ( a * Client ) GetSalesReceipts ( params * GetSalesReceiptsParams , authInfo runtime . ClientAuthInfoWriter , opts ... ClientOption ) ( * GetSalesReceiptsOK , error ) {
2021-01-08 17:40:28 +00:00
// TODO: Validate the params before sending
if params == nil {
params = NewGetSalesReceiptsParams ( )
}
2021-02-09 16:56:57 +00:00
op := & runtime . ClientOperation {
2021-01-08 17:40:28 +00:00
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 ,
2021-02-09 16:56:57 +00:00
}
for _ , opt := range opts {
opt ( op )
}
result , err := a . transport . Submit ( op )
2021-01-08 17:40:28 +00:00
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
* /
2021-02-09 16:56:57 +00:00
func ( a * Client ) GetSalesTransactionDates ( params * GetSalesTransactionDatesParams , authInfo runtime . ClientAuthInfoWriter , opts ... ClientOption ) ( * GetSalesTransactionDatesOK , error ) {
2021-01-08 17:40:28 +00:00
// TODO: Validate the params before sending
if params == nil {
params = NewGetSalesTransactionDatesParams ( )
}
2021-02-09 16:56:57 +00:00
op := & runtime . ClientOperation {
2021-01-08 17:40:28 +00:00
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 ,
2021-02-09 16:56:57 +00:00
}
for _ , opt := range opts {
opt ( op )
}
result , err := a . transport . Submit ( op )
2021-01-08 17:40:28 +00:00
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
* /
2021-02-09 16:56:57 +00:00
func ( a * Client ) GetSalesTransactions ( params * GetSalesTransactionsParams , authInfo runtime . ClientAuthInfoWriter , opts ... ClientOption ) ( * GetSalesTransactionsOK , error ) {
2021-01-08 17:40:28 +00:00
// TODO: Validate the params before sending
if params == nil {
params = NewGetSalesTransactionsParams ( )
}
2021-02-09 16:56:57 +00:00
op := & runtime . ClientOperation {
2021-01-08 17:40:28 +00:00
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 ,
2021-02-09 16:56:57 +00:00
}
for _ , opt := range opts {
opt ( op )
}
result , err := a . transport . Submit ( op )
2021-01-08 17:40:28 +00:00
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
* /
2021-02-09 16:56:57 +00:00
func ( a * Client ) PostSalesDeliveries ( params * PostSalesDeliveriesParams , authInfo runtime . ClientAuthInfoWriter , opts ... ClientOption ) ( * PostSalesDeliveriesOK , error ) {
2021-01-08 17:40:28 +00:00
// TODO: Validate the params before sending
if params == nil {
params = NewPostSalesDeliveriesParams ( )
}
2021-02-09 16:56:57 +00:00
op := & runtime . ClientOperation {
2021-01-08 17:40:28 +00:00
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 ,
2021-02-09 16:56:57 +00:00
}
for _ , opt := range opts {
opt ( op )
}
result , err := a . transport . Submit ( op )
2021-01-08 17:40:28 +00:00
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
* /
2021-02-09 16:56:57 +00:00
func ( a * Client ) PostSalesReceipts ( params * PostSalesReceiptsParams , authInfo runtime . ClientAuthInfoWriter , opts ... ClientOption ) ( * PostSalesReceiptsOK , error ) {
2021-01-08 17:40:28 +00:00
// TODO: Validate the params before sending
if params == nil {
params = NewPostSalesReceiptsParams ( )
}
2021-02-09 16:56:57 +00:00
op := & runtime . ClientOperation {
2021-01-08 17:40:28 +00:00
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 ,
2021-02-09 16:56:57 +00:00
}
for _ , opt := range opts {
opt ( op )
}
result , err := a . transport . Submit ( op )
2021-01-08 17:40:28 +00:00
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
* /
2021-02-09 16:56:57 +00:00
func ( a * Client ) PostSalesTransactions ( params * PostSalesTransactionsParams , authInfo runtime . ClientAuthInfoWriter , opts ... ClientOption ) ( * PostSalesTransactionsOK , error ) {
2021-01-08 17:40:28 +00:00
// TODO: Validate the params before sending
if params == nil {
params = NewPostSalesTransactionsParams ( )
}
2021-02-09 16:56:57 +00:00
op := & runtime . ClientOperation {
2021-01-08 17:40:28 +00:00
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 ,
2021-02-09 16:56:57 +00:00
}
for _ , opt := range opts {
opt ( op )
}
result , err := a . transport . Submit ( op )
2021-01-08 17:40:28 +00:00
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
* /
2021-02-09 16:56:57 +00:00
func ( a * Client ) PutSalesDeliveries ( params * PutSalesDeliveriesParams , authInfo runtime . ClientAuthInfoWriter , opts ... ClientOption ) ( * PutSalesDeliveriesOK , error ) {
2021-01-08 17:40:28 +00:00
// TODO: Validate the params before sending
if params == nil {
params = NewPutSalesDeliveriesParams ( )
}
2021-02-09 16:56:57 +00:00
op := & runtime . ClientOperation {
2021-01-08 17:40:28 +00:00
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 ,
2021-02-09 16:56:57 +00:00
}
for _ , opt := range opts {
opt ( op )
}
result , err := a . transport . Submit ( op )
2021-01-08 17:40:28 +00:00
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
* /
2021-02-09 16:56:57 +00:00
func ( a * Client ) PutSalesReceipts ( params * PutSalesReceiptsParams , authInfo runtime . ClientAuthInfoWriter , opts ... ClientOption ) ( * PutSalesReceiptsOK , error ) {
2021-01-08 17:40:28 +00:00
// TODO: Validate the params before sending
if params == nil {
params = NewPutSalesReceiptsParams ( )
}
2021-02-09 16:56:57 +00:00
op := & runtime . ClientOperation {
2021-01-08 17:40:28 +00:00
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 ,
2021-02-09 16:56:57 +00:00
}
for _ , opt := range opts {
opt ( op )
}
result , err := a . transport . Submit ( op )
2021-01-08 17:40:28 +00:00
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
* /
2021-02-09 16:56:57 +00:00
func ( a * Client ) PutSalesTransactions ( params * PutSalesTransactionsParams , authInfo runtime . ClientAuthInfoWriter , opts ... ClientOption ) ( * PutSalesTransactionsOK , error ) {
2021-01-08 17:40:28 +00:00
// TODO: Validate the params before sending
if params == nil {
params = NewPutSalesTransactionsParams ( )
}
2021-02-09 16:56:57 +00:00
op := & runtime . ClientOperation {
2021-01-08 17:40:28 +00:00
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 ,
2021-02-09 16:56:57 +00:00
}
for _ , opt := range opts {
opt ( op )
}
result , err := a . transport . Submit ( op )
2021-01-08 17:40:28 +00:00
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
}