// Code generated by go-swagger; DO NOT EDIT.

// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed

package cors

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"fmt"

	"github.com/go-openapi/runtime"
	"github.com/go-openapi/strfmt"
)

// New creates a new cors API client.
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
	return &Client{transport: transport, formats: formats}
}

/*
Client for cors API
*/
type Client struct {
	transport runtime.ClientTransport
	formats   strfmt.Registry
}

// ClientService is the interface for Client methods
type ClientService interface {
	CashReceiptOptions(params *CashReceiptOptionsParams) (*CashReceiptOptionsOK, error)

	ChargeOptions(params *ChargeOptionsParams) (*ChargeOptionsOK, error)

	EftOptions(params *EftOptionsParams) (*EftOptionsOK, error)

	InvoiceOptions(params *InvoiceOptionsParams) (*InvoiceOptionsOK, error)

	OrdersOptions(params *OrdersOptionsParams) (*OrdersOptionsOK, error)

	PaymentMethodOptions(params *PaymentMethodOptionsParams) (*PaymentMethodOptionsOK, error)

	PoOptions(params *PoOptionsParams) (*PoOptionsOK, error)

	ProductOptions(params *ProductOptionsParams) (*ProductOptionsOK, error)

	ProductOptionsObservable(params *ProductOptionsObservableParams) (*ProductOptionsObservableOK, error)

	QuoteOptions(params *QuoteOptionsParams) (*QuoteOptionsOK, error)

	TaxInvoiceOptions(params *TaxInvoiceOptionsParams) (*TaxInvoiceOptionsOK, error)

	TaxOrderOptions(params *TaxOrderOptionsParams) (*TaxOrderOptionsOK, error)

	TaxPoOptions(params *TaxPoOptionsParams) (*TaxPoOptionsOK, error)

	TaxQuoteOptions(params *TaxQuoteOptionsParams) (*TaxQuoteOptionsOK, error)

	SetTransport(transport runtime.ClientTransport)
}

/*
  CashReceiptOptions CORS support
*/
func (a *Client) CashReceiptOptions(params *CashReceiptOptionsParams) (*CashReceiptOptionsOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewCashReceiptOptionsParams()
	}

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "cashReceiptOptions",
		Method:             "OPTIONS",
		PathPattern:        "/cashreceipts",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &CashReceiptOptionsReader{formats: a.formats},
		Context:            params.Context,
		Client:             params.HTTPClient,
	})
	if err != nil {
		return nil, err
	}
	success, ok := result.(*CashReceiptOptionsOK)
	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 cashReceiptOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
	panic(msg)
}

/*
  ChargeOptions CORS support
*/
func (a *Client) ChargeOptions(params *ChargeOptionsParams) (*ChargeOptionsOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewChargeOptionsParams()
	}

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "chargeOptions",
		Method:             "OPTIONS",
		PathPattern:        "/charges",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &ChargeOptionsReader{formats: a.formats},
		Context:            params.Context,
		Client:             params.HTTPClient,
	})
	if err != nil {
		return nil, err
	}
	success, ok := result.(*ChargeOptionsOK)
	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 chargeOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
	panic(msg)
}

/*
  EftOptions CORS support
*/
func (a *Client) EftOptions(params *EftOptionsParams) (*EftOptionsOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewEftOptionsParams()
	}

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "eftOptions",
		Method:             "OPTIONS",
		PathPattern:        "/efts",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &EftOptionsReader{formats: a.formats},
		Context:            params.Context,
		Client:             params.HTTPClient,
	})
	if err != nil {
		return nil, err
	}
	success, ok := result.(*EftOptionsOK)
	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 eftOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
	panic(msg)
}

/*
  InvoiceOptions CORS support
*/
func (a *Client) InvoiceOptions(params *InvoiceOptionsParams) (*InvoiceOptionsOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewInvoiceOptionsParams()
	}

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "invoiceOptions",
		Method:             "OPTIONS",
		PathPattern:        "/invoices",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &InvoiceOptionsReader{formats: a.formats},
		Context:            params.Context,
		Client:             params.HTTPClient,
	})
	if err != nil {
		return nil, err
	}
	success, ok := result.(*InvoiceOptionsOK)
	if ok {
		return success, nil
	}
	// unexpected success response
	// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
	msg := fmt.Sprintf("unexpected success response for invoiceOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
	panic(msg)
}

/*
  OrdersOptions CORS support
*/
func (a *Client) OrdersOptions(params *OrdersOptionsParams) (*OrdersOptionsOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewOrdersOptionsParams()
	}

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "ordersOptions",
		Method:             "OPTIONS",
		PathPattern:        "/orders",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &OrdersOptionsReader{formats: a.formats},
		Context:            params.Context,
		Client:             params.HTTPClient,
	})
	if err != nil {
		return nil, err
	}
	success, ok := result.(*OrdersOptionsOK)
	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 ordersOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
	panic(msg)
}

/*
  PaymentMethodOptions CORS support
*/
func (a *Client) PaymentMethodOptions(params *PaymentMethodOptionsParams) (*PaymentMethodOptionsOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPaymentMethodOptionsParams()
	}

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "paymentMethodOptions",
		Method:             "OPTIONS",
		PathPattern:        "/paymentmethods",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PaymentMethodOptionsReader{formats: a.formats},
		Context:            params.Context,
		Client:             params.HTTPClient,
	})
	if err != nil {
		return nil, err
	}
	success, ok := result.(*PaymentMethodOptionsOK)
	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 paymentMethodOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
	panic(msg)
}

/*
  PoOptions CORS support
*/
func (a *Client) PoOptions(params *PoOptionsParams) (*PoOptionsOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewPoOptionsParams()
	}

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "poOptions",
		Method:             "OPTIONS",
		PathPattern:        "/pos",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &PoOptionsReader{formats: a.formats},
		Context:            params.Context,
		Client:             params.HTTPClient,
	})
	if err != nil {
		return nil, err
	}
	success, ok := result.(*PoOptionsOK)
	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 poOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
	panic(msg)
}

/*
  ProductOptions CORS support
*/
func (a *Client) ProductOptions(params *ProductOptionsParams) (*ProductOptionsOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewProductOptionsParams()
	}

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "productOptions",
		Method:             "OPTIONS",
		PathPattern:        "/products",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &ProductOptionsReader{formats: a.formats},
		Context:            params.Context,
		Client:             params.HTTPClient,
	})
	if err != nil {
		return nil, err
	}
	success, ok := result.(*ProductOptionsOK)
	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 productOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
	panic(msg)
}

/*
  ProductOptionsObservable CORS support
*/
func (a *Client) ProductOptionsObservable(params *ProductOptionsObservableParams) (*ProductOptionsObservableOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewProductOptionsObservableParams()
	}

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "productOptionsObservable",
		Method:             "OPTIONS",
		PathPattern:        "/products/observable",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &ProductOptionsObservableReader{formats: a.formats},
		Context:            params.Context,
		Client:             params.HTTPClient,
	})
	if err != nil {
		return nil, err
	}
	success, ok := result.(*ProductOptionsObservableOK)
	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 productOptionsObservable: API contract not enforced by server. Client expected to get an error, but got: %T", result)
	panic(msg)
}

/*
  QuoteOptions CORS support
*/
func (a *Client) QuoteOptions(params *QuoteOptionsParams) (*QuoteOptionsOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewQuoteOptionsParams()
	}

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "quoteOptions",
		Method:             "OPTIONS",
		PathPattern:        "/quotes",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &QuoteOptionsReader{formats: a.formats},
		Context:            params.Context,
		Client:             params.HTTPClient,
	})
	if err != nil {
		return nil, err
	}
	success, ok := result.(*QuoteOptionsOK)
	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 quoteOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
	panic(msg)
}

/*
  TaxInvoiceOptions CORS support
*/
func (a *Client) TaxInvoiceOptions(params *TaxInvoiceOptionsParams) (*TaxInvoiceOptionsOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewTaxInvoiceOptionsParams()
	}

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "taxInvoiceOptions",
		Method:             "OPTIONS",
		PathPattern:        "/taxes/invoices",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &TaxInvoiceOptionsReader{formats: a.formats},
		Context:            params.Context,
		Client:             params.HTTPClient,
	})
	if err != nil {
		return nil, err
	}
	success, ok := result.(*TaxInvoiceOptionsOK)
	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 taxInvoiceOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
	panic(msg)
}

/*
  TaxOrderOptions CORS support
*/
func (a *Client) TaxOrderOptions(params *TaxOrderOptionsParams) (*TaxOrderOptionsOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewTaxOrderOptionsParams()
	}

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "taxOrderOptions",
		Method:             "OPTIONS",
		PathPattern:        "/taxes/orders",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &TaxOrderOptionsReader{formats: a.formats},
		Context:            params.Context,
		Client:             params.HTTPClient,
	})
	if err != nil {
		return nil, err
	}
	success, ok := result.(*TaxOrderOptionsOK)
	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 taxOrderOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
	panic(msg)
}

/*
  TaxPoOptions CORS support
*/
func (a *Client) TaxPoOptions(params *TaxPoOptionsParams) (*TaxPoOptionsOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewTaxPoOptionsParams()
	}

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "taxPoOptions",
		Method:             "OPTIONS",
		PathPattern:        "/taxes/pos",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &TaxPoOptionsReader{formats: a.formats},
		Context:            params.Context,
		Client:             params.HTTPClient,
	})
	if err != nil {
		return nil, err
	}
	success, ok := result.(*TaxPoOptionsOK)
	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 taxPoOptions: API contract not enforced by server. Client expected to get an error, but got: %T", result)
	panic(msg)
}

/*
  TaxQuoteOptions CORS support
*/
func (a *Client) TaxQuoteOptions(params *TaxQuoteOptionsParams) (*TaxQuoteOptionsOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewTaxQuoteOptionsParams()
	}

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "taxQuoteOptions",
		Method:             "OPTIONS",
		PathPattern:        "/taxes/quotes",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &TaxQuoteOptionsReader{formats: a.formats},
		Context:            params.Context,
		Client:             params.HTTPClient,
	})
	if err != nil {
		return nil, err
	}
	success, ok := result.(*TaxQuoteOptionsOK)
	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 taxQuoteOptions: 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
}
