payments

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 CancelPaymentByIdempotencyKeyOK

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

Success

func NewCancelPaymentByIdempotencyKeyOK

func NewCancelPaymentByIdempotencyKeyOK() *CancelPaymentByIdempotencyKeyOK

NewCancelPaymentByIdempotencyKeyOK creates a CancelPaymentByIdempotencyKeyOK with default headers values

func (*CancelPaymentByIdempotencyKeyOK) Error

func (*CancelPaymentByIdempotencyKeyOK) GetPayload

type CancelPaymentByIdempotencyKeyParams

type CancelPaymentByIdempotencyKeyParams struct {

	/* Body.

	     An object containing the fields to POST for the request.

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

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

CancelPaymentByIdempotencyKeyParams contains all the parameters to send to the API endpoint

for the cancel payment by idempotency key operation.

Typically these are written to a http.Request.

func NewCancelPaymentByIdempotencyKeyParams

func NewCancelPaymentByIdempotencyKeyParams() *CancelPaymentByIdempotencyKeyParams

NewCancelPaymentByIdempotencyKeyParams creates a new CancelPaymentByIdempotencyKeyParams 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 NewCancelPaymentByIdempotencyKeyParamsWithContext

func NewCancelPaymentByIdempotencyKeyParamsWithContext(ctx context.Context) *CancelPaymentByIdempotencyKeyParams

NewCancelPaymentByIdempotencyKeyParamsWithContext creates a new CancelPaymentByIdempotencyKeyParams object with the ability to set a context for a request.

func NewCancelPaymentByIdempotencyKeyParamsWithHTTPClient

func NewCancelPaymentByIdempotencyKeyParamsWithHTTPClient(client *http.Client) *CancelPaymentByIdempotencyKeyParams

NewCancelPaymentByIdempotencyKeyParamsWithHTTPClient creates a new CancelPaymentByIdempotencyKeyParams object with the ability to set a custom HTTPClient for a request.

func NewCancelPaymentByIdempotencyKeyParamsWithTimeout

func NewCancelPaymentByIdempotencyKeyParamsWithTimeout(timeout time.Duration) *CancelPaymentByIdempotencyKeyParams

NewCancelPaymentByIdempotencyKeyParamsWithTimeout creates a new CancelPaymentByIdempotencyKeyParams object with the ability to set a timeout on a request.

func (*CancelPaymentByIdempotencyKeyParams) SetBody

SetBody adds the body to the cancel payment by idempotency key params

func (*CancelPaymentByIdempotencyKeyParams) SetContext

SetContext adds the context to the cancel payment by idempotency key params

func (*CancelPaymentByIdempotencyKeyParams) SetDefaults

func (o *CancelPaymentByIdempotencyKeyParams) SetDefaults()

SetDefaults hydrates default values in the cancel payment by idempotency key params (not the query body).

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

func (*CancelPaymentByIdempotencyKeyParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the cancel payment by idempotency key params

func (*CancelPaymentByIdempotencyKeyParams) SetTimeout

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

SetTimeout adds the timeout to the cancel payment by idempotency key params

func (*CancelPaymentByIdempotencyKeyParams) WithBody

WithBody adds the body to the cancel payment by idempotency key params

func (*CancelPaymentByIdempotencyKeyParams) WithContext

WithContext adds the context to the cancel payment by idempotency key params

func (*CancelPaymentByIdempotencyKeyParams) WithDefaults

WithDefaults hydrates default values in the cancel payment by idempotency key params (not the query body).

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

func (*CancelPaymentByIdempotencyKeyParams) WithHTTPClient

WithHTTPClient adds the HTTPClient to the cancel payment by idempotency key params

func (*CancelPaymentByIdempotencyKeyParams) WithTimeout

WithTimeout adds the timeout to the cancel payment by idempotency key params

func (*CancelPaymentByIdempotencyKeyParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type CancelPaymentByIdempotencyKeyReader

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

CancelPaymentByIdempotencyKeyReader is a Reader for the CancelPaymentByIdempotencyKey structure.

func (*CancelPaymentByIdempotencyKeyReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type CancelPaymentOK

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

Success

func NewCancelPaymentOK

func NewCancelPaymentOK() *CancelPaymentOK

NewCancelPaymentOK creates a CancelPaymentOK with default headers values

func (*CancelPaymentOK) Error

func (o *CancelPaymentOK) Error() string

func (*CancelPaymentOK) GetPayload

func (o *CancelPaymentOK) GetPayload() *models.CancelPaymentResponse

type CancelPaymentParams

type CancelPaymentParams struct {

	/* PaymentID.

	   The `payment_id` identifying the payment to be canceled.
	*/
	PaymentID string

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

CancelPaymentParams contains all the parameters to send to the API endpoint

for the cancel payment operation.

Typically these are written to a http.Request.

func NewCancelPaymentParams

func NewCancelPaymentParams() *CancelPaymentParams

NewCancelPaymentParams creates a new CancelPaymentParams 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 NewCancelPaymentParamsWithContext

func NewCancelPaymentParamsWithContext(ctx context.Context) *CancelPaymentParams

NewCancelPaymentParamsWithContext creates a new CancelPaymentParams object with the ability to set a context for a request.

func NewCancelPaymentParamsWithHTTPClient

func NewCancelPaymentParamsWithHTTPClient(client *http.Client) *CancelPaymentParams

NewCancelPaymentParamsWithHTTPClient creates a new CancelPaymentParams object with the ability to set a custom HTTPClient for a request.

func NewCancelPaymentParamsWithTimeout

func NewCancelPaymentParamsWithTimeout(timeout time.Duration) *CancelPaymentParams

NewCancelPaymentParamsWithTimeout creates a new CancelPaymentParams object with the ability to set a timeout on a request.

func (*CancelPaymentParams) SetContext

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

SetContext adds the context to the cancel payment params

func (*CancelPaymentParams) SetDefaults

func (o *CancelPaymentParams) SetDefaults()

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

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

func (*CancelPaymentParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the cancel payment params

func (*CancelPaymentParams) SetPaymentID

func (o *CancelPaymentParams) SetPaymentID(paymentID string)

SetPaymentID adds the paymentId to the cancel payment params

func (*CancelPaymentParams) SetTimeout

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

SetTimeout adds the timeout to the cancel payment params

func (*CancelPaymentParams) WithContext

WithContext adds the context to the cancel payment params

func (*CancelPaymentParams) WithDefaults

func (o *CancelPaymentParams) WithDefaults() *CancelPaymentParams

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

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

func (*CancelPaymentParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the cancel payment params

func (*CancelPaymentParams) WithPaymentID

func (o *CancelPaymentParams) WithPaymentID(paymentID string) *CancelPaymentParams

WithPaymentID adds the paymentID to the cancel payment params

func (*CancelPaymentParams) WithTimeout

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

WithTimeout adds the timeout to the cancel payment params

func (*CancelPaymentParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type CancelPaymentReader

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

CancelPaymentReader is a Reader for the CancelPayment structure.

func (*CancelPaymentReader) ReadResponse

func (o *CancelPaymentReader) 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 payments API

func (*Client) CancelPayment

func (a *Client) CancelPayment(params *CancelPaymentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CancelPaymentOK, error)
CancelPayment cancels payment

Cancels (voids) a payment. If you set `autocomplete` to `false` when creating a payment,

you can cancel the payment using this endpoint.

func (*Client) CancelPaymentByIdempotencyKey

func (a *Client) CancelPaymentByIdempotencyKey(params *CancelPaymentByIdempotencyKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CancelPaymentByIdempotencyKeyOK, error)
CancelPaymentByIdempotencyKey cancels payment by idempotency key

Cancels (voids) a payment identified by the idempotency key that is specified in the

request.

Use this method when the status of a `CreatePayment` request is unknown (for example, after you send a `CreatePayment` request, a network error occurs and you do not get a response). In this case, you can direct Square to cancel the payment using this endpoint. In the request, you provide the same idempotency key that you provided in your `CreatePayment` request that you want to cancel. After canceling the payment, you can submit your `CreatePayment` request again.

Note that if no payment with the specified idempotency key is found, no action is taken and the endpoint returns successfully.

func (*Client) CompletePayment

func (a *Client) CompletePayment(params *CompletePaymentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CompletePaymentOK, error)
CompletePayment completes payment

Completes (captures) a payment.

By default, payments are set to complete immediately after they are created. If you set `autocomplete` to `false` when creating a payment, you can complete (capture) the payment using this endpoint.

func (*Client) CreatePayment

func (a *Client) CreatePayment(params *CreatePaymentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreatePaymentOK, error)
CreatePayment creates payment

Charges a payment source (for example, a card

represented by customer's card on file or a card nonce). In addition to the payment source, the request must include the amount to accept for the payment.

There are several optional parameters that you can include in the request (for example, tip money, whether to autocomplete the payment, or a reference ID to correlate this payment with another system).

The `PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS` OAuth permission is required to enable application fees.

func (*Client) GetPayment

func (a *Client) GetPayment(params *GetPaymentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPaymentOK, error)

GetPayment gets payment

Retrieves details for a specific payment.

func (*Client) ListPayments

func (a *Client) ListPayments(params *ListPaymentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListPaymentsOK, error)
ListPayments lists payments

Retrieves a list of payments taken by the account making the request.

The maximum results per page is 100.

func (*Client) SetTransport

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

SetTransport changes the transport on the client

type ClientOption

type ClientOption func(*runtime.ClientOperation)

ClientOption is the option for Client methods

type ClientService

type ClientService interface {
	CancelPayment(params *CancelPaymentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CancelPaymentOK, error)

	CancelPaymentByIdempotencyKey(params *CancelPaymentByIdempotencyKeyParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CancelPaymentByIdempotencyKeyOK, error)

	CompletePayment(params *CompletePaymentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CompletePaymentOK, error)

	CreatePayment(params *CreatePaymentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreatePaymentOK, error)

	GetPayment(params *GetPaymentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetPaymentOK, error)

	ListPayments(params *ListPaymentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListPaymentsOK, 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 payments API client.

type CompletePaymentOK

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

Success

func NewCompletePaymentOK

func NewCompletePaymentOK() *CompletePaymentOK

NewCompletePaymentOK creates a CompletePaymentOK with default headers values

func (*CompletePaymentOK) Error

func (o *CompletePaymentOK) Error() string

func (*CompletePaymentOK) GetPayload

type CompletePaymentParams

type CompletePaymentParams struct {

	/* PaymentID.

	   The unique ID identifying the payment to be completed.
	*/
	PaymentID string

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

CompletePaymentParams contains all the parameters to send to the API endpoint

for the complete payment operation.

Typically these are written to a http.Request.

func NewCompletePaymentParams

func NewCompletePaymentParams() *CompletePaymentParams

NewCompletePaymentParams creates a new CompletePaymentParams 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 NewCompletePaymentParamsWithContext

func NewCompletePaymentParamsWithContext(ctx context.Context) *CompletePaymentParams

NewCompletePaymentParamsWithContext creates a new CompletePaymentParams object with the ability to set a context for a request.

func NewCompletePaymentParamsWithHTTPClient

func NewCompletePaymentParamsWithHTTPClient(client *http.Client) *CompletePaymentParams

NewCompletePaymentParamsWithHTTPClient creates a new CompletePaymentParams object with the ability to set a custom HTTPClient for a request.

func NewCompletePaymentParamsWithTimeout

func NewCompletePaymentParamsWithTimeout(timeout time.Duration) *CompletePaymentParams

NewCompletePaymentParamsWithTimeout creates a new CompletePaymentParams object with the ability to set a timeout on a request.

func (*CompletePaymentParams) SetContext

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

SetContext adds the context to the complete payment params

func (*CompletePaymentParams) SetDefaults

func (o *CompletePaymentParams) SetDefaults()

SetDefaults hydrates default values in the complete payment params (not the query body).

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

func (*CompletePaymentParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the complete payment params

func (*CompletePaymentParams) SetPaymentID

func (o *CompletePaymentParams) SetPaymentID(paymentID string)

SetPaymentID adds the paymentId to the complete payment params

func (*CompletePaymentParams) SetTimeout

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

SetTimeout adds the timeout to the complete payment params

func (*CompletePaymentParams) WithContext

WithContext adds the context to the complete payment params

func (*CompletePaymentParams) WithDefaults

func (o *CompletePaymentParams) WithDefaults() *CompletePaymentParams

WithDefaults hydrates default values in the complete payment params (not the query body).

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

func (*CompletePaymentParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the complete payment params

func (*CompletePaymentParams) WithPaymentID

func (o *CompletePaymentParams) WithPaymentID(paymentID string) *CompletePaymentParams

WithPaymentID adds the paymentID to the complete payment params

func (*CompletePaymentParams) WithTimeout

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

WithTimeout adds the timeout to the complete payment params

func (*CompletePaymentParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type CompletePaymentReader

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

CompletePaymentReader is a Reader for the CompletePayment structure.

func (*CompletePaymentReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type CreatePaymentOK

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

Success

func NewCreatePaymentOK

func NewCreatePaymentOK() *CreatePaymentOK

NewCreatePaymentOK creates a CreatePaymentOK with default headers values

func (*CreatePaymentOK) Error

func (o *CreatePaymentOK) Error() string

func (*CreatePaymentOK) GetPayload

func (o *CreatePaymentOK) GetPayload() *models.CreatePaymentResponse

type CreatePaymentParams

type CreatePaymentParams struct {

	/* Body.

	     An object containing the fields to POST for the request.

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

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

CreatePaymentParams contains all the parameters to send to the API endpoint

for the create payment operation.

Typically these are written to a http.Request.

func NewCreatePaymentParams

func NewCreatePaymentParams() *CreatePaymentParams

NewCreatePaymentParams creates a new CreatePaymentParams 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 NewCreatePaymentParamsWithContext

func NewCreatePaymentParamsWithContext(ctx context.Context) *CreatePaymentParams

NewCreatePaymentParamsWithContext creates a new CreatePaymentParams object with the ability to set a context for a request.

func NewCreatePaymentParamsWithHTTPClient

func NewCreatePaymentParamsWithHTTPClient(client *http.Client) *CreatePaymentParams

NewCreatePaymentParamsWithHTTPClient creates a new CreatePaymentParams object with the ability to set a custom HTTPClient for a request.

func NewCreatePaymentParamsWithTimeout

func NewCreatePaymentParamsWithTimeout(timeout time.Duration) *CreatePaymentParams

NewCreatePaymentParamsWithTimeout creates a new CreatePaymentParams object with the ability to set a timeout on a request.

func (*CreatePaymentParams) SetBody

SetBody adds the body to the create payment params

func (*CreatePaymentParams) SetContext

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

SetContext adds the context to the create payment params

func (*CreatePaymentParams) SetDefaults

func (o *CreatePaymentParams) SetDefaults()

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

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

func (*CreatePaymentParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the create payment params

func (*CreatePaymentParams) SetTimeout

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

SetTimeout adds the timeout to the create payment params

func (*CreatePaymentParams) WithBody

WithBody adds the body to the create payment params

func (*CreatePaymentParams) WithContext

WithContext adds the context to the create payment params

func (*CreatePaymentParams) WithDefaults

func (o *CreatePaymentParams) WithDefaults() *CreatePaymentParams

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

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

func (*CreatePaymentParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the create payment params

func (*CreatePaymentParams) WithTimeout

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

WithTimeout adds the timeout to the create payment params

func (*CreatePaymentParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type CreatePaymentReader

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

CreatePaymentReader is a Reader for the CreatePayment structure.

func (*CreatePaymentReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type GetPaymentOK

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

Success

func NewGetPaymentOK

func NewGetPaymentOK() *GetPaymentOK

NewGetPaymentOK creates a GetPaymentOK with default headers values

func (*GetPaymentOK) Error

func (o *GetPaymentOK) Error() string

func (*GetPaymentOK) GetPayload

func (o *GetPaymentOK) GetPayload() *models.GetPaymentResponse

type GetPaymentParams

type GetPaymentParams struct {

	/* PaymentID.

	   A unique ID for the desired payment.
	*/
	PaymentID string

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

GetPaymentParams contains all the parameters to send to the API endpoint

for the get payment operation.

Typically these are written to a http.Request.

func NewGetPaymentParams

func NewGetPaymentParams() *GetPaymentParams

NewGetPaymentParams creates a new GetPaymentParams 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 NewGetPaymentParamsWithContext

func NewGetPaymentParamsWithContext(ctx context.Context) *GetPaymentParams

NewGetPaymentParamsWithContext creates a new GetPaymentParams object with the ability to set a context for a request.

func NewGetPaymentParamsWithHTTPClient

func NewGetPaymentParamsWithHTTPClient(client *http.Client) *GetPaymentParams

NewGetPaymentParamsWithHTTPClient creates a new GetPaymentParams object with the ability to set a custom HTTPClient for a request.

func NewGetPaymentParamsWithTimeout

func NewGetPaymentParamsWithTimeout(timeout time.Duration) *GetPaymentParams

NewGetPaymentParamsWithTimeout creates a new GetPaymentParams object with the ability to set a timeout on a request.

func (*GetPaymentParams) SetContext

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

SetContext adds the context to the get payment params

func (*GetPaymentParams) SetDefaults

func (o *GetPaymentParams) SetDefaults()

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

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

func (*GetPaymentParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get payment params

func (*GetPaymentParams) SetPaymentID

func (o *GetPaymentParams) SetPaymentID(paymentID string)

SetPaymentID adds the paymentId to the get payment params

func (*GetPaymentParams) SetTimeout

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

SetTimeout adds the timeout to the get payment params

func (*GetPaymentParams) WithContext

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

WithContext adds the context to the get payment params

func (*GetPaymentParams) WithDefaults

func (o *GetPaymentParams) WithDefaults() *GetPaymentParams

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

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

func (*GetPaymentParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get payment params

func (*GetPaymentParams) WithPaymentID

func (o *GetPaymentParams) WithPaymentID(paymentID string) *GetPaymentParams

WithPaymentID adds the paymentID to the get payment params

func (*GetPaymentParams) WithTimeout

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

WithTimeout adds the timeout to the get payment params

func (*GetPaymentParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type GetPaymentReader

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

GetPaymentReader is a Reader for the GetPayment structure.

func (*GetPaymentReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type ListPaymentsOK

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

Success

func NewListPaymentsOK

func NewListPaymentsOK() *ListPaymentsOK

NewListPaymentsOK creates a ListPaymentsOK with default headers values

func (*ListPaymentsOK) Error

func (o *ListPaymentsOK) Error() string

func (*ListPaymentsOK) GetPayload

func (o *ListPaymentsOK) GetPayload() *models.ListPaymentsResponse

type ListPaymentsParams

type ListPaymentsParams struct {

	/* BeginTime.

	     The timestamp for the beginning of the reporting period, in RFC 3339 format.
	Inclusive. Default: The current time minus one year.
	*/
	BeginTime *string

	/* CardBrand.

	   The brand of the payment card (for example, VISA).
	*/
	CardBrand *string

	/* Cursor.

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

	For more information, see [Pagination](https://developer.squareup.com/docs/basics/api101/pagination).
	*/
	Cursor *string

	/* EndTime.

	     The timestamp for the end of the reporting period, in RFC 3339 format.

	Default: The current time.
	*/
	EndTime *string

	/* Last4.

	   The last four digits of a payment card.
	*/
	Last4 *string

	/* Limit.

	     The maximum number of results to be returned in a single page.
	It is possible to receive fewer results than the specified limit on a given page.

	The default value of 100 is also the maximum allowed value. If the provided value is
	greater than 100, it is ignored and the default value is used instead.

	Default: `100`
	*/
	Limit *int64

	/* LocationID.

	     Limit results to the location supplied. By default, results are returned
	for the default (main) location associated with the seller.
	*/
	LocationID *string

	/* SortOrder.

	     The order in which results are listed:
	- `ASC` - Oldest to newest.
	- `DESC` - Newest to oldest (default).
	*/
	SortOrder *string

	/* Total.

	   The exact amount in the `total_money` for a payment.

	   Format: int64
	*/
	Total *int64

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

ListPaymentsParams contains all the parameters to send to the API endpoint

for the list payments operation.

Typically these are written to a http.Request.

func NewListPaymentsParams

func NewListPaymentsParams() *ListPaymentsParams

NewListPaymentsParams creates a new ListPaymentsParams 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 NewListPaymentsParamsWithContext

func NewListPaymentsParamsWithContext(ctx context.Context) *ListPaymentsParams

NewListPaymentsParamsWithContext creates a new ListPaymentsParams object with the ability to set a context for a request.

func NewListPaymentsParamsWithHTTPClient

func NewListPaymentsParamsWithHTTPClient(client *http.Client) *ListPaymentsParams

NewListPaymentsParamsWithHTTPClient creates a new ListPaymentsParams object with the ability to set a custom HTTPClient for a request.

func NewListPaymentsParamsWithTimeout

func NewListPaymentsParamsWithTimeout(timeout time.Duration) *ListPaymentsParams

NewListPaymentsParamsWithTimeout creates a new ListPaymentsParams object with the ability to set a timeout on a request.

func (*ListPaymentsParams) SetBeginTime

func (o *ListPaymentsParams) SetBeginTime(beginTime *string)

SetBeginTime adds the beginTime to the list payments params

func (*ListPaymentsParams) SetCardBrand

func (o *ListPaymentsParams) SetCardBrand(cardBrand *string)

SetCardBrand adds the cardBrand to the list payments params

func (*ListPaymentsParams) SetContext

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

SetContext adds the context to the list payments params

func (*ListPaymentsParams) SetCursor

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

SetCursor adds the cursor to the list payments params

func (*ListPaymentsParams) SetDefaults

func (o *ListPaymentsParams) SetDefaults()

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

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

func (*ListPaymentsParams) SetEndTime

func (o *ListPaymentsParams) SetEndTime(endTime *string)

SetEndTime adds the endTime to the list payments params

func (*ListPaymentsParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the list payments params

func (*ListPaymentsParams) SetLast4

func (o *ListPaymentsParams) SetLast4(last4 *string)

SetLast4 adds the last4 to the list payments params

func (*ListPaymentsParams) SetLimit

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

SetLimit adds the limit to the list payments params

func (*ListPaymentsParams) SetLocationID

func (o *ListPaymentsParams) SetLocationID(locationID *string)

SetLocationID adds the locationId to the list payments params

func (*ListPaymentsParams) SetSortOrder

func (o *ListPaymentsParams) SetSortOrder(sortOrder *string)

SetSortOrder adds the sortOrder to the list payments params

func (*ListPaymentsParams) SetTimeout

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

SetTimeout adds the timeout to the list payments params

func (*ListPaymentsParams) SetTotal

func (o *ListPaymentsParams) SetTotal(total *int64)

SetTotal adds the total to the list payments params

func (*ListPaymentsParams) WithBeginTime

func (o *ListPaymentsParams) WithBeginTime(beginTime *string) *ListPaymentsParams

WithBeginTime adds the beginTime to the list payments params

func (*ListPaymentsParams) WithCardBrand

func (o *ListPaymentsParams) WithCardBrand(cardBrand *string) *ListPaymentsParams

WithCardBrand adds the cardBrand to the list payments params

func (*ListPaymentsParams) WithContext

WithContext adds the context to the list payments params

func (*ListPaymentsParams) WithCursor

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

WithCursor adds the cursor to the list payments params

func (*ListPaymentsParams) WithDefaults

func (o *ListPaymentsParams) WithDefaults() *ListPaymentsParams

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

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

func (*ListPaymentsParams) WithEndTime

func (o *ListPaymentsParams) WithEndTime(endTime *string) *ListPaymentsParams

WithEndTime adds the endTime to the list payments params

func (*ListPaymentsParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the list payments params

func (*ListPaymentsParams) WithLast4

func (o *ListPaymentsParams) WithLast4(last4 *string) *ListPaymentsParams

WithLast4 adds the last4 to the list payments params

func (*ListPaymentsParams) WithLimit

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

WithLimit adds the limit to the list payments params

func (*ListPaymentsParams) WithLocationID

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

WithLocationID adds the locationID to the list payments params

func (*ListPaymentsParams) WithSortOrder

func (o *ListPaymentsParams) WithSortOrder(sortOrder *string) *ListPaymentsParams

WithSortOrder adds the sortOrder to the list payments params

func (*ListPaymentsParams) WithTimeout

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

WithTimeout adds the timeout to the list payments params

func (*ListPaymentsParams) WithTotal

func (o *ListPaymentsParams) WithTotal(total *int64) *ListPaymentsParams

WithTotal adds the total to the list payments params

func (*ListPaymentsParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type ListPaymentsReader

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

ListPaymentsReader is a Reader for the ListPayments structure.

func (*ListPaymentsReader) ReadResponse

func (o *ListPaymentsReader) 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