invoices

package
v0.0.0-...-dc3cc4a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CancelInvoiceOK

type CancelInvoiceOK struct {
	Payload *models.CancelInvoiceResponse
}
CancelInvoiceOK describes a response with status code 200, with default header values.

Success

func NewCancelInvoiceOK

func NewCancelInvoiceOK() *CancelInvoiceOK

NewCancelInvoiceOK creates a CancelInvoiceOK with default headers values

func (*CancelInvoiceOK) Error

func (o *CancelInvoiceOK) Error() string

func (*CancelInvoiceOK) GetPayload

func (o *CancelInvoiceOK) GetPayload() *models.CancelInvoiceResponse

type CancelInvoiceParams

type CancelInvoiceParams struct {

	/* Body.

	     An object containing the fields to POST for the request.

	See the corresponding object definition for field details.
	*/
	Body *models.CancelInvoiceRequest

	/* InvoiceID.

	   The ID of the `invoice` to cancel.
	*/
	InvoiceID string

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

CancelInvoiceParams contains all the parameters to send to the API endpoint

for the cancel invoice operation.

Typically these are written to a http.Request.

func NewCancelInvoiceParams

func NewCancelInvoiceParams() *CancelInvoiceParams

NewCancelInvoiceParams creates a new CancelInvoiceParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewCancelInvoiceParamsWithContext

func NewCancelInvoiceParamsWithContext(ctx context.Context) *CancelInvoiceParams

NewCancelInvoiceParamsWithContext creates a new CancelInvoiceParams object with the ability to set a context for a request.

func NewCancelInvoiceParamsWithHTTPClient

func NewCancelInvoiceParamsWithHTTPClient(client *http.Client) *CancelInvoiceParams

NewCancelInvoiceParamsWithHTTPClient creates a new CancelInvoiceParams object with the ability to set a custom HTTPClient for a request.

func NewCancelInvoiceParamsWithTimeout

func NewCancelInvoiceParamsWithTimeout(timeout time.Duration) *CancelInvoiceParams

NewCancelInvoiceParamsWithTimeout creates a new CancelInvoiceParams object with the ability to set a timeout on a request.

func (*CancelInvoiceParams) SetBody

SetBody adds the body to the cancel invoice params

func (*CancelInvoiceParams) SetContext

func (o *CancelInvoiceParams) SetContext(ctx context.Context)

SetContext adds the context to the cancel invoice params

func (*CancelInvoiceParams) SetDefaults

func (o *CancelInvoiceParams) SetDefaults()

SetDefaults hydrates default values in the cancel invoice params (not the query body).

All values with no default are reset to their zero value.

func (*CancelInvoiceParams) SetHTTPClient

func (o *CancelInvoiceParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the cancel invoice params

func (*CancelInvoiceParams) SetInvoiceID

func (o *CancelInvoiceParams) SetInvoiceID(invoiceID string)

SetInvoiceID adds the invoiceId to the cancel invoice params

func (*CancelInvoiceParams) SetTimeout

func (o *CancelInvoiceParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the cancel invoice params

func (*CancelInvoiceParams) WithBody

WithBody adds the body to the cancel invoice params

func (*CancelInvoiceParams) WithContext

WithContext adds the context to the cancel invoice params

func (*CancelInvoiceParams) WithDefaults

func (o *CancelInvoiceParams) WithDefaults() *CancelInvoiceParams

WithDefaults hydrates default values in the cancel invoice params (not the query body).

All values with no default are reset to their zero value.

func (*CancelInvoiceParams) WithHTTPClient

func (o *CancelInvoiceParams) WithHTTPClient(client *http.Client) *CancelInvoiceParams

WithHTTPClient adds the HTTPClient to the cancel invoice params

func (*CancelInvoiceParams) WithInvoiceID

func (o *CancelInvoiceParams) WithInvoiceID(invoiceID string) *CancelInvoiceParams

WithInvoiceID adds the invoiceID to the cancel invoice params

func (*CancelInvoiceParams) WithTimeout

func (o *CancelInvoiceParams) WithTimeout(timeout time.Duration) *CancelInvoiceParams

WithTimeout adds the timeout to the cancel invoice params

func (*CancelInvoiceParams) WriteToRequest

func (o *CancelInvoiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type CancelInvoiceReader

type CancelInvoiceReader struct {
	// contains filtered or unexported fields
}

CancelInvoiceReader is a Reader for the CancelInvoice structure.

func (*CancelInvoiceReader) ReadResponse

func (o *CancelInvoiceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client for invoices API

func (*Client) CancelInvoice

func (a *Client) CancelInvoice(params *CancelInvoiceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CancelInvoiceOK, error)
CancelInvoice cancels invoice

Cancels an invoice. The seller cannot collect payments for

the canceled invoice.

You cannot cancel an invoice in the `DRAFT` state or in a terminal state: `PAID`, `REFUNDED`, `CANCELED`, or `FAILED`.

func (*Client) CreateInvoice

func (a *Client) CreateInvoice(params *CreateInvoiceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateInvoiceOK, error)
CreateInvoice creates invoice

Creates a draft [invoice](#type-invoice)

for an order created using the Orders API.

A draft invoice remains in your account and no action is taken. You must publish the invoice before Square can process it (send it to the customer's email address or charge the customer’s card on file).

func (*Client) DeleteInvoice

func (a *Client) DeleteInvoice(params *DeleteInvoiceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteInvoiceOK, error)
DeleteInvoice deletes invoice

Deletes the specified invoice. When an invoice is deleted, the

associated Order status changes to CANCELED. You can only delete a draft invoice (you cannot delete a published invoice, including one that is scheduled for processing).

func (*Client) GetInvoice

func (a *Client) GetInvoice(params *GetInvoiceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetInvoiceOK, error)

GetInvoice gets invoice

Retrieves an invoice by invoice ID.

func (*Client) ListInvoices

func (a *Client) ListInvoices(params *ListInvoicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListInvoicesOK, error)
ListInvoices lists invoices

Returns a list of invoices for a given location. The response

is paginated. If truncated, the response includes a `cursor` that you use in a subsequent request to fetch the next set of invoices.

func (*Client) PublishInvoice

func (a *Client) PublishInvoice(params *PublishInvoiceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PublishInvoiceOK, error)
PublishInvoice publishes invoice

Publishes the specified draft invoice.

After an invoice is published, Square follows up based on the invoice configuration. For example, Square sends the invoice to the customer's email address, charges the customer's card on file, or does nothing. Square also makes the invoice available on a Square-hosted invoice page.

The invoice `status` also changes from `DRAFT` to a status based on the invoice configuration. For example, the status changes to `UNPAID` if Square emails the invoice or `PARTIALLY_PAID` if Square charge a card on file for a portion of the invoice amount).

func (*Client) SearchInvoices

func (a *Client) SearchInvoices(params *SearchInvoicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SearchInvoicesOK, error)
SearchInvoices searches invoices

Searches for invoices from a location specified in

the filter. You can optionally specify customers in the filter for whom to retrieve invoices. In the current implementation, you can only specify one location and optionally one customer.

The response is paginated. If truncated, the response includes a `cursor` that you use in a subsequent request to fetch the next set of invoices.

func (*Client) SetTransport

func (a *Client) SetTransport(transport runtime.ClientTransport)

SetTransport changes the transport on the client

func (*Client) UpdateInvoice

func (a *Client) UpdateInvoice(params *UpdateInvoiceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateInvoiceOK, error)
UpdateInvoice updates invoice

Updates an invoice by modifying fields, clearing fields, or both. For most updates, you can use a sparse

`Invoice` object to add fields or change values, and use the `fields_to_clear` field to specify fields to clear. However, some restrictions apply. For example, you cannot change the `order_id` or `location_id` field, and you must provide the complete `custom_fields` list to update a custom field. Published invoices have additional restrictions.

type ClientOption

type ClientOption func(*runtime.ClientOperation)

ClientOption is the option for Client methods

type ClientService

type ClientService interface {
	CancelInvoice(params *CancelInvoiceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CancelInvoiceOK, error)

	CreateInvoice(params *CreateInvoiceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateInvoiceOK, error)

	DeleteInvoice(params *DeleteInvoiceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*DeleteInvoiceOK, error)

	GetInvoice(params *GetInvoiceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetInvoiceOK, error)

	ListInvoices(params *ListInvoicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListInvoicesOK, error)

	PublishInvoice(params *PublishInvoiceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PublishInvoiceOK, error)

	SearchInvoices(params *SearchInvoicesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*SearchInvoicesOK, error)

	UpdateInvoice(params *UpdateInvoiceParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*UpdateInvoiceOK, error)

	SetTransport(transport runtime.ClientTransport)
}

ClientService is the interface for Client methods

func New

func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService

New creates a new invoices API client.

type CreateInvoiceOK

type CreateInvoiceOK struct {
	Payload *models.CreateInvoiceResponse
}
CreateInvoiceOK describes a response with status code 200, with default header values.

Success

func NewCreateInvoiceOK

func NewCreateInvoiceOK() *CreateInvoiceOK

NewCreateInvoiceOK creates a CreateInvoiceOK with default headers values

func (*CreateInvoiceOK) Error

func (o *CreateInvoiceOK) Error() string

func (*CreateInvoiceOK) GetPayload

func (o *CreateInvoiceOK) GetPayload() *models.CreateInvoiceResponse

type CreateInvoiceParams

type CreateInvoiceParams struct {

	/* Body.

	     An object containing the fields to POST for the request.

	See the corresponding object definition for field details.
	*/
	Body *models.CreateInvoiceRequest

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

CreateInvoiceParams contains all the parameters to send to the API endpoint

for the create invoice operation.

Typically these are written to a http.Request.

func NewCreateInvoiceParams

func NewCreateInvoiceParams() *CreateInvoiceParams

NewCreateInvoiceParams creates a new CreateInvoiceParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewCreateInvoiceParamsWithContext

func NewCreateInvoiceParamsWithContext(ctx context.Context) *CreateInvoiceParams

NewCreateInvoiceParamsWithContext creates a new CreateInvoiceParams object with the ability to set a context for a request.

func NewCreateInvoiceParamsWithHTTPClient

func NewCreateInvoiceParamsWithHTTPClient(client *http.Client) *CreateInvoiceParams

NewCreateInvoiceParamsWithHTTPClient creates a new CreateInvoiceParams object with the ability to set a custom HTTPClient for a request.

func NewCreateInvoiceParamsWithTimeout

func NewCreateInvoiceParamsWithTimeout(timeout time.Duration) *CreateInvoiceParams

NewCreateInvoiceParamsWithTimeout creates a new CreateInvoiceParams object with the ability to set a timeout on a request.

func (*CreateInvoiceParams) SetBody

SetBody adds the body to the create invoice params

func (*CreateInvoiceParams) SetContext

func (o *CreateInvoiceParams) SetContext(ctx context.Context)

SetContext adds the context to the create invoice params

func (*CreateInvoiceParams) SetDefaults

func (o *CreateInvoiceParams) SetDefaults()

SetDefaults hydrates default values in the create invoice params (not the query body).

All values with no default are reset to their zero value.

func (*CreateInvoiceParams) SetHTTPClient

func (o *CreateInvoiceParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the create invoice params

func (*CreateInvoiceParams) SetTimeout

func (o *CreateInvoiceParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the create invoice params

func (*CreateInvoiceParams) WithBody

WithBody adds the body to the create invoice params

func (*CreateInvoiceParams) WithContext

WithContext adds the context to the create invoice params

func (*CreateInvoiceParams) WithDefaults

func (o *CreateInvoiceParams) WithDefaults() *CreateInvoiceParams

WithDefaults hydrates default values in the create invoice params (not the query body).

All values with no default are reset to their zero value.

func (*CreateInvoiceParams) WithHTTPClient

func (o *CreateInvoiceParams) WithHTTPClient(client *http.Client) *CreateInvoiceParams

WithHTTPClient adds the HTTPClient to the create invoice params

func (*CreateInvoiceParams) WithTimeout

func (o *CreateInvoiceParams) WithTimeout(timeout time.Duration) *CreateInvoiceParams

WithTimeout adds the timeout to the create invoice params

func (*CreateInvoiceParams) WriteToRequest

func (o *CreateInvoiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type CreateInvoiceReader

type CreateInvoiceReader struct {
	// contains filtered or unexported fields
}

CreateInvoiceReader is a Reader for the CreateInvoice structure.

func (*CreateInvoiceReader) ReadResponse

func (o *CreateInvoiceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type DeleteInvoiceOK

type DeleteInvoiceOK struct {
	Payload *models.DeleteInvoiceResponse
}
DeleteInvoiceOK describes a response with status code 200, with default header values.

Success

func NewDeleteInvoiceOK

func NewDeleteInvoiceOK() *DeleteInvoiceOK

NewDeleteInvoiceOK creates a DeleteInvoiceOK with default headers values

func (*DeleteInvoiceOK) Error

func (o *DeleteInvoiceOK) Error() string

func (*DeleteInvoiceOK) GetPayload

func (o *DeleteInvoiceOK) GetPayload() *models.DeleteInvoiceResponse

type DeleteInvoiceParams

type DeleteInvoiceParams struct {

	/* InvoiceID.

	   The ID of the invoice to delete.
	*/
	InvoiceID string

	/* Version.

	     The version of the `invoice` to delete.
	If you do not know the version, you can call `GetInvoice` or
	`ListInvoices`.
	*/
	Version *int64

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

DeleteInvoiceParams contains all the parameters to send to the API endpoint

for the delete invoice operation.

Typically these are written to a http.Request.

func NewDeleteInvoiceParams

func NewDeleteInvoiceParams() *DeleteInvoiceParams

NewDeleteInvoiceParams creates a new DeleteInvoiceParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewDeleteInvoiceParamsWithContext

func NewDeleteInvoiceParamsWithContext(ctx context.Context) *DeleteInvoiceParams

NewDeleteInvoiceParamsWithContext creates a new DeleteInvoiceParams object with the ability to set a context for a request.

func NewDeleteInvoiceParamsWithHTTPClient

func NewDeleteInvoiceParamsWithHTTPClient(client *http.Client) *DeleteInvoiceParams

NewDeleteInvoiceParamsWithHTTPClient creates a new DeleteInvoiceParams object with the ability to set a custom HTTPClient for a request.

func NewDeleteInvoiceParamsWithTimeout

func NewDeleteInvoiceParamsWithTimeout(timeout time.Duration) *DeleteInvoiceParams

NewDeleteInvoiceParamsWithTimeout creates a new DeleteInvoiceParams object with the ability to set a timeout on a request.

func (*DeleteInvoiceParams) SetContext

func (o *DeleteInvoiceParams) SetContext(ctx context.Context)

SetContext adds the context to the delete invoice params

func (*DeleteInvoiceParams) SetDefaults

func (o *DeleteInvoiceParams) SetDefaults()

SetDefaults hydrates default values in the delete invoice params (not the query body).

All values with no default are reset to their zero value.

func (*DeleteInvoiceParams) SetHTTPClient

func (o *DeleteInvoiceParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the delete invoice params

func (*DeleteInvoiceParams) SetInvoiceID

func (o *DeleteInvoiceParams) SetInvoiceID(invoiceID string)

SetInvoiceID adds the invoiceId to the delete invoice params

func (*DeleteInvoiceParams) SetTimeout

func (o *DeleteInvoiceParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the delete invoice params

func (*DeleteInvoiceParams) SetVersion

func (o *DeleteInvoiceParams) SetVersion(version *int64)

SetVersion adds the version to the delete invoice params

func (*DeleteInvoiceParams) WithContext

WithContext adds the context to the delete invoice params

func (*DeleteInvoiceParams) WithDefaults

func (o *DeleteInvoiceParams) WithDefaults() *DeleteInvoiceParams

WithDefaults hydrates default values in the delete invoice params (not the query body).

All values with no default are reset to their zero value.

func (*DeleteInvoiceParams) WithHTTPClient

func (o *DeleteInvoiceParams) WithHTTPClient(client *http.Client) *DeleteInvoiceParams

WithHTTPClient adds the HTTPClient to the delete invoice params

func (*DeleteInvoiceParams) WithInvoiceID

func (o *DeleteInvoiceParams) WithInvoiceID(invoiceID string) *DeleteInvoiceParams

WithInvoiceID adds the invoiceID to the delete invoice params

func (*DeleteInvoiceParams) WithTimeout

func (o *DeleteInvoiceParams) WithTimeout(timeout time.Duration) *DeleteInvoiceParams

WithTimeout adds the timeout to the delete invoice params

func (*DeleteInvoiceParams) WithVersion

func (o *DeleteInvoiceParams) WithVersion(version *int64) *DeleteInvoiceParams

WithVersion adds the version to the delete invoice params

func (*DeleteInvoiceParams) WriteToRequest

func (o *DeleteInvoiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type DeleteInvoiceReader

type DeleteInvoiceReader struct {
	// contains filtered or unexported fields
}

DeleteInvoiceReader is a Reader for the DeleteInvoice structure.

func (*DeleteInvoiceReader) ReadResponse

func (o *DeleteInvoiceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type GetInvoiceOK

type GetInvoiceOK struct {
	Payload *models.GetInvoiceResponse
}
GetInvoiceOK describes a response with status code 200, with default header values.

Success

func NewGetInvoiceOK

func NewGetInvoiceOK() *GetInvoiceOK

NewGetInvoiceOK creates a GetInvoiceOK with default headers values

func (*GetInvoiceOK) Error

func (o *GetInvoiceOK) Error() string

func (*GetInvoiceOK) GetPayload

func (o *GetInvoiceOK) GetPayload() *models.GetInvoiceResponse

type GetInvoiceParams

type GetInvoiceParams struct {

	/* InvoiceID.

	   The id of the invoice to retrieve.
	*/
	InvoiceID string

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

GetInvoiceParams contains all the parameters to send to the API endpoint

for the get invoice operation.

Typically these are written to a http.Request.

func NewGetInvoiceParams

func NewGetInvoiceParams() *GetInvoiceParams

NewGetInvoiceParams creates a new GetInvoiceParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewGetInvoiceParamsWithContext

func NewGetInvoiceParamsWithContext(ctx context.Context) *GetInvoiceParams

NewGetInvoiceParamsWithContext creates a new GetInvoiceParams object with the ability to set a context for a request.

func NewGetInvoiceParamsWithHTTPClient

func NewGetInvoiceParamsWithHTTPClient(client *http.Client) *GetInvoiceParams

NewGetInvoiceParamsWithHTTPClient creates a new GetInvoiceParams object with the ability to set a custom HTTPClient for a request.

func NewGetInvoiceParamsWithTimeout

func NewGetInvoiceParamsWithTimeout(timeout time.Duration) *GetInvoiceParams

NewGetInvoiceParamsWithTimeout creates a new GetInvoiceParams object with the ability to set a timeout on a request.

func (*GetInvoiceParams) SetContext

func (o *GetInvoiceParams) SetContext(ctx context.Context)

SetContext adds the context to the get invoice params

func (*GetInvoiceParams) SetDefaults

func (o *GetInvoiceParams) SetDefaults()

SetDefaults hydrates default values in the get invoice params (not the query body).

All values with no default are reset to their zero value.

func (*GetInvoiceParams) SetHTTPClient

func (o *GetInvoiceParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the get invoice params

func (*GetInvoiceParams) SetInvoiceID

func (o *GetInvoiceParams) SetInvoiceID(invoiceID string)

SetInvoiceID adds the invoiceId to the get invoice params

func (*GetInvoiceParams) SetTimeout

func (o *GetInvoiceParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the get invoice params

func (*GetInvoiceParams) WithContext

func (o *GetInvoiceParams) WithContext(ctx context.Context) *GetInvoiceParams

WithContext adds the context to the get invoice params

func (*GetInvoiceParams) WithDefaults

func (o *GetInvoiceParams) WithDefaults() *GetInvoiceParams

WithDefaults hydrates default values in the get invoice params (not the query body).

All values with no default are reset to their zero value.

func (*GetInvoiceParams) WithHTTPClient

func (o *GetInvoiceParams) WithHTTPClient(client *http.Client) *GetInvoiceParams

WithHTTPClient adds the HTTPClient to the get invoice params

func (*GetInvoiceParams) WithInvoiceID

func (o *GetInvoiceParams) WithInvoiceID(invoiceID string) *GetInvoiceParams

WithInvoiceID adds the invoiceID to the get invoice params

func (*GetInvoiceParams) WithTimeout

func (o *GetInvoiceParams) WithTimeout(timeout time.Duration) *GetInvoiceParams

WithTimeout adds the timeout to the get invoice params

func (*GetInvoiceParams) WriteToRequest

func (o *GetInvoiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type GetInvoiceReader

type GetInvoiceReader struct {
	// contains filtered or unexported fields
}

GetInvoiceReader is a Reader for the GetInvoice structure.

func (*GetInvoiceReader) ReadResponse

func (o *GetInvoiceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type ListInvoicesOK

type ListInvoicesOK struct {
	Payload *models.ListInvoicesResponse
}
ListInvoicesOK describes a response with status code 200, with default header values.

Success

func NewListInvoicesOK

func NewListInvoicesOK() *ListInvoicesOK

NewListInvoicesOK creates a ListInvoicesOK with default headers values

func (*ListInvoicesOK) Error

func (o *ListInvoicesOK) Error() string

func (*ListInvoicesOK) GetPayload

func (o *ListInvoicesOK) GetPayload() *models.ListInvoicesResponse

type ListInvoicesParams

type ListInvoicesParams struct {

	/* Cursor.

	     A pagination cursor returned by a previous call to this endpoint.
	Provide this cursor to retrieve the next set of results for your original query.

	For more information, see [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pagination).
	*/
	Cursor *string

	/* Limit.

	     The maximum number of invoices to return (200 is the maximum `limit`).
	If not provided, the server
	uses a default limit of 100 invoices.
	*/
	Limit *int64

	/* LocationID.

	   The ID of the location for which to list invoices.
	*/
	LocationID string

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

ListInvoicesParams contains all the parameters to send to the API endpoint

for the list invoices operation.

Typically these are written to a http.Request.

func NewListInvoicesParams

func NewListInvoicesParams() *ListInvoicesParams

NewListInvoicesParams creates a new ListInvoicesParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewListInvoicesParamsWithContext

func NewListInvoicesParamsWithContext(ctx context.Context) *ListInvoicesParams

NewListInvoicesParamsWithContext creates a new ListInvoicesParams object with the ability to set a context for a request.

func NewListInvoicesParamsWithHTTPClient

func NewListInvoicesParamsWithHTTPClient(client *http.Client) *ListInvoicesParams

NewListInvoicesParamsWithHTTPClient creates a new ListInvoicesParams object with the ability to set a custom HTTPClient for a request.

func NewListInvoicesParamsWithTimeout

func NewListInvoicesParamsWithTimeout(timeout time.Duration) *ListInvoicesParams

NewListInvoicesParamsWithTimeout creates a new ListInvoicesParams object with the ability to set a timeout on a request.

func (*ListInvoicesParams) SetContext

func (o *ListInvoicesParams) SetContext(ctx context.Context)

SetContext adds the context to the list invoices params

func (*ListInvoicesParams) SetCursor

func (o *ListInvoicesParams) SetCursor(cursor *string)

SetCursor adds the cursor to the list invoices params

func (*ListInvoicesParams) SetDefaults

func (o *ListInvoicesParams) SetDefaults()

SetDefaults hydrates default values in the list invoices params (not the query body).

All values with no default are reset to their zero value.

func (*ListInvoicesParams) SetHTTPClient

func (o *ListInvoicesParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the list invoices params

func (*ListInvoicesParams) SetLimit

func (o *ListInvoicesParams) SetLimit(limit *int64)

SetLimit adds the limit to the list invoices params

func (*ListInvoicesParams) SetLocationID

func (o *ListInvoicesParams) SetLocationID(locationID string)

SetLocationID adds the locationId to the list invoices params

func (*ListInvoicesParams) SetTimeout

func (o *ListInvoicesParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the list invoices params

func (*ListInvoicesParams) WithContext

WithContext adds the context to the list invoices params

func (*ListInvoicesParams) WithCursor

func (o *ListInvoicesParams) WithCursor(cursor *string) *ListInvoicesParams

WithCursor adds the cursor to the list invoices params

func (*ListInvoicesParams) WithDefaults

func (o *ListInvoicesParams) WithDefaults() *ListInvoicesParams

WithDefaults hydrates default values in the list invoices params (not the query body).

All values with no default are reset to their zero value.

func (*ListInvoicesParams) WithHTTPClient

func (o *ListInvoicesParams) WithHTTPClient(client *http.Client) *ListInvoicesParams

WithHTTPClient adds the HTTPClient to the list invoices params

func (*ListInvoicesParams) WithLimit

func (o *ListInvoicesParams) WithLimit(limit *int64) *ListInvoicesParams

WithLimit adds the limit to the list invoices params

func (*ListInvoicesParams) WithLocationID

func (o *ListInvoicesParams) WithLocationID(locationID string) *ListInvoicesParams

WithLocationID adds the locationID to the list invoices params

func (*ListInvoicesParams) WithTimeout

func (o *ListInvoicesParams) WithTimeout(timeout time.Duration) *ListInvoicesParams

WithTimeout adds the timeout to the list invoices params

func (*ListInvoicesParams) WriteToRequest

func (o *ListInvoicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type ListInvoicesReader

type ListInvoicesReader struct {
	// contains filtered or unexported fields
}

ListInvoicesReader is a Reader for the ListInvoices structure.

func (*ListInvoicesReader) ReadResponse

func (o *ListInvoicesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type PublishInvoiceOK

type PublishInvoiceOK struct {
	Payload *models.PublishInvoiceResponse
}
PublishInvoiceOK describes a response with status code 200, with default header values.

Success

func NewPublishInvoiceOK

func NewPublishInvoiceOK() *PublishInvoiceOK

NewPublishInvoiceOK creates a PublishInvoiceOK with default headers values

func (*PublishInvoiceOK) Error

func (o *PublishInvoiceOK) Error() string

func (*PublishInvoiceOK) GetPayload

type PublishInvoiceParams

type PublishInvoiceParams struct {

	/* Body.

	     An object containing the fields to POST for the request.

	See the corresponding object definition for field details.
	*/
	Body *models.PublishInvoiceRequest

	/* InvoiceID.

	   The id of the invoice to publish.
	*/
	InvoiceID string

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

PublishInvoiceParams contains all the parameters to send to the API endpoint

for the publish invoice operation.

Typically these are written to a http.Request.

func NewPublishInvoiceParams

func NewPublishInvoiceParams() *PublishInvoiceParams

NewPublishInvoiceParams creates a new PublishInvoiceParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewPublishInvoiceParamsWithContext

func NewPublishInvoiceParamsWithContext(ctx context.Context) *PublishInvoiceParams

NewPublishInvoiceParamsWithContext creates a new PublishInvoiceParams object with the ability to set a context for a request.

func NewPublishInvoiceParamsWithHTTPClient

func NewPublishInvoiceParamsWithHTTPClient(client *http.Client) *PublishInvoiceParams

NewPublishInvoiceParamsWithHTTPClient creates a new PublishInvoiceParams object with the ability to set a custom HTTPClient for a request.

func NewPublishInvoiceParamsWithTimeout

func NewPublishInvoiceParamsWithTimeout(timeout time.Duration) *PublishInvoiceParams

NewPublishInvoiceParamsWithTimeout creates a new PublishInvoiceParams object with the ability to set a timeout on a request.

func (*PublishInvoiceParams) SetBody

SetBody adds the body to the publish invoice params

func (*PublishInvoiceParams) SetContext

func (o *PublishInvoiceParams) SetContext(ctx context.Context)

SetContext adds the context to the publish invoice params

func (*PublishInvoiceParams) SetDefaults

func (o *PublishInvoiceParams) SetDefaults()

SetDefaults hydrates default values in the publish invoice params (not the query body).

All values with no default are reset to their zero value.

func (*PublishInvoiceParams) SetHTTPClient

func (o *PublishInvoiceParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the publish invoice params

func (*PublishInvoiceParams) SetInvoiceID

func (o *PublishInvoiceParams) SetInvoiceID(invoiceID string)

SetInvoiceID adds the invoiceId to the publish invoice params

func (*PublishInvoiceParams) SetTimeout

func (o *PublishInvoiceParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the publish invoice params

func (*PublishInvoiceParams) WithBody

WithBody adds the body to the publish invoice params

func (*PublishInvoiceParams) WithContext

WithContext adds the context to the publish invoice params

func (*PublishInvoiceParams) WithDefaults

func (o *PublishInvoiceParams) WithDefaults() *PublishInvoiceParams

WithDefaults hydrates default values in the publish invoice params (not the query body).

All values with no default are reset to their zero value.

func (*PublishInvoiceParams) WithHTTPClient

func (o *PublishInvoiceParams) WithHTTPClient(client *http.Client) *PublishInvoiceParams

WithHTTPClient adds the HTTPClient to the publish invoice params

func (*PublishInvoiceParams) WithInvoiceID

func (o *PublishInvoiceParams) WithInvoiceID(invoiceID string) *PublishInvoiceParams

WithInvoiceID adds the invoiceID to the publish invoice params

func (*PublishInvoiceParams) WithTimeout

func (o *PublishInvoiceParams) WithTimeout(timeout time.Duration) *PublishInvoiceParams

WithTimeout adds the timeout to the publish invoice params

func (*PublishInvoiceParams) WriteToRequest

func (o *PublishInvoiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type PublishInvoiceReader

type PublishInvoiceReader struct {
	// contains filtered or unexported fields
}

PublishInvoiceReader is a Reader for the PublishInvoice structure.

func (*PublishInvoiceReader) ReadResponse

func (o *PublishInvoiceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type SearchInvoicesOK

type SearchInvoicesOK struct {
	Payload *models.SearchInvoicesResponse
}
SearchInvoicesOK describes a response with status code 200, with default header values.

Success

func NewSearchInvoicesOK

func NewSearchInvoicesOK() *SearchInvoicesOK

NewSearchInvoicesOK creates a SearchInvoicesOK with default headers values

func (*SearchInvoicesOK) Error

func (o *SearchInvoicesOK) Error() string

func (*SearchInvoicesOK) GetPayload

type SearchInvoicesParams

type SearchInvoicesParams struct {

	/* Body.

	     An object containing the fields to POST for the request.

	See the corresponding object definition for field details.
	*/
	Body *models.SearchInvoicesRequest

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

SearchInvoicesParams contains all the parameters to send to the API endpoint

for the search invoices operation.

Typically these are written to a http.Request.

func NewSearchInvoicesParams

func NewSearchInvoicesParams() *SearchInvoicesParams

NewSearchInvoicesParams creates a new SearchInvoicesParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewSearchInvoicesParamsWithContext

func NewSearchInvoicesParamsWithContext(ctx context.Context) *SearchInvoicesParams

NewSearchInvoicesParamsWithContext creates a new SearchInvoicesParams object with the ability to set a context for a request.

func NewSearchInvoicesParamsWithHTTPClient

func NewSearchInvoicesParamsWithHTTPClient(client *http.Client) *SearchInvoicesParams

NewSearchInvoicesParamsWithHTTPClient creates a new SearchInvoicesParams object with the ability to set a custom HTTPClient for a request.

func NewSearchInvoicesParamsWithTimeout

func NewSearchInvoicesParamsWithTimeout(timeout time.Duration) *SearchInvoicesParams

NewSearchInvoicesParamsWithTimeout creates a new SearchInvoicesParams object with the ability to set a timeout on a request.

func (*SearchInvoicesParams) SetBody

SetBody adds the body to the search invoices params

func (*SearchInvoicesParams) SetContext

func (o *SearchInvoicesParams) SetContext(ctx context.Context)

SetContext adds the context to the search invoices params

func (*SearchInvoicesParams) SetDefaults

func (o *SearchInvoicesParams) SetDefaults()

SetDefaults hydrates default values in the search invoices params (not the query body).

All values with no default are reset to their zero value.

func (*SearchInvoicesParams) SetHTTPClient

func (o *SearchInvoicesParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the search invoices params

func (*SearchInvoicesParams) SetTimeout

func (o *SearchInvoicesParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the search invoices params

func (*SearchInvoicesParams) WithBody

WithBody adds the body to the search invoices params

func (*SearchInvoicesParams) WithContext

WithContext adds the context to the search invoices params

func (*SearchInvoicesParams) WithDefaults

func (o *SearchInvoicesParams) WithDefaults() *SearchInvoicesParams

WithDefaults hydrates default values in the search invoices params (not the query body).

All values with no default are reset to their zero value.

func (*SearchInvoicesParams) WithHTTPClient

func (o *SearchInvoicesParams) WithHTTPClient(client *http.Client) *SearchInvoicesParams

WithHTTPClient adds the HTTPClient to the search invoices params

func (*SearchInvoicesParams) WithTimeout

func (o *SearchInvoicesParams) WithTimeout(timeout time.Duration) *SearchInvoicesParams

WithTimeout adds the timeout to the search invoices params

func (*SearchInvoicesParams) WriteToRequest

func (o *SearchInvoicesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type SearchInvoicesReader

type SearchInvoicesReader struct {
	// contains filtered or unexported fields
}

SearchInvoicesReader is a Reader for the SearchInvoices structure.

func (*SearchInvoicesReader) ReadResponse

func (o *SearchInvoicesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type UpdateInvoiceOK

type UpdateInvoiceOK struct {
	Payload *models.UpdateInvoiceResponse
}
UpdateInvoiceOK describes a response with status code 200, with default header values.

Success

func NewUpdateInvoiceOK

func NewUpdateInvoiceOK() *UpdateInvoiceOK

NewUpdateInvoiceOK creates a UpdateInvoiceOK with default headers values

func (*UpdateInvoiceOK) Error

func (o *UpdateInvoiceOK) Error() string

func (*UpdateInvoiceOK) GetPayload

func (o *UpdateInvoiceOK) GetPayload() *models.UpdateInvoiceResponse

type UpdateInvoiceParams

type UpdateInvoiceParams struct {

	/* Body.

	     An object containing the fields to POST for the request.

	See the corresponding object definition for field details.
	*/
	Body *models.UpdateInvoiceRequest

	/* InvoiceID.

	   The ID of the invoice to update.
	*/
	InvoiceID string

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

UpdateInvoiceParams contains all the parameters to send to the API endpoint

for the update invoice operation.

Typically these are written to a http.Request.

func NewUpdateInvoiceParams

func NewUpdateInvoiceParams() *UpdateInvoiceParams

NewUpdateInvoiceParams creates a new UpdateInvoiceParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewUpdateInvoiceParamsWithContext

func NewUpdateInvoiceParamsWithContext(ctx context.Context) *UpdateInvoiceParams

NewUpdateInvoiceParamsWithContext creates a new UpdateInvoiceParams object with the ability to set a context for a request.

func NewUpdateInvoiceParamsWithHTTPClient

func NewUpdateInvoiceParamsWithHTTPClient(client *http.Client) *UpdateInvoiceParams

NewUpdateInvoiceParamsWithHTTPClient creates a new UpdateInvoiceParams object with the ability to set a custom HTTPClient for a request.

func NewUpdateInvoiceParamsWithTimeout

func NewUpdateInvoiceParamsWithTimeout(timeout time.Duration) *UpdateInvoiceParams

NewUpdateInvoiceParamsWithTimeout creates a new UpdateInvoiceParams object with the ability to set a timeout on a request.

func (*UpdateInvoiceParams) SetBody

SetBody adds the body to the update invoice params

func (*UpdateInvoiceParams) SetContext

func (o *UpdateInvoiceParams) SetContext(ctx context.Context)

SetContext adds the context to the update invoice params

func (*UpdateInvoiceParams) SetDefaults

func (o *UpdateInvoiceParams) SetDefaults()

SetDefaults hydrates default values in the update invoice params (not the query body).

All values with no default are reset to their zero value.

func (*UpdateInvoiceParams) SetHTTPClient

func (o *UpdateInvoiceParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the update invoice params

func (*UpdateInvoiceParams) SetInvoiceID

func (o *UpdateInvoiceParams) SetInvoiceID(invoiceID string)

SetInvoiceID adds the invoiceId to the update invoice params

func (*UpdateInvoiceParams) SetTimeout

func (o *UpdateInvoiceParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the update invoice params

func (*UpdateInvoiceParams) WithBody

WithBody adds the body to the update invoice params

func (*UpdateInvoiceParams) WithContext

WithContext adds the context to the update invoice params

func (*UpdateInvoiceParams) WithDefaults

func (o *UpdateInvoiceParams) WithDefaults() *UpdateInvoiceParams

WithDefaults hydrates default values in the update invoice params (not the query body).

All values with no default are reset to their zero value.

func (*UpdateInvoiceParams) WithHTTPClient

func (o *UpdateInvoiceParams) WithHTTPClient(client *http.Client) *UpdateInvoiceParams

WithHTTPClient adds the HTTPClient to the update invoice params

func (*UpdateInvoiceParams) WithInvoiceID

func (o *UpdateInvoiceParams) WithInvoiceID(invoiceID string) *UpdateInvoiceParams

WithInvoiceID adds the invoiceID to the update invoice params

func (*UpdateInvoiceParams) WithTimeout

func (o *UpdateInvoiceParams) WithTimeout(timeout time.Duration) *UpdateInvoiceParams

WithTimeout adds the timeout to the update invoice params

func (*UpdateInvoiceParams) WriteToRequest

func (o *UpdateInvoiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type UpdateInvoiceReader

type UpdateInvoiceReader struct {
	// contains filtered or unexported fields
}

UpdateInvoiceReader is a Reader for the UpdateInvoice structure.

func (*UpdateInvoiceReader) ReadResponse

func (o *UpdateInvoiceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL