transactions

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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CaptureTransactionOK

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

Success

func NewCaptureTransactionOK

func NewCaptureTransactionOK() *CaptureTransactionOK

NewCaptureTransactionOK creates a CaptureTransactionOK with default headers values

func (*CaptureTransactionOK) Error

func (o *CaptureTransactionOK) Error() string

func (*CaptureTransactionOK) GetPayload

type CaptureTransactionParams

type CaptureTransactionParams struct {

	// LocationID.
	LocationID string

	// TransactionID.
	TransactionID string

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

CaptureTransactionParams contains all the parameters to send to the API endpoint

for the capture transaction operation.

Typically these are written to a http.Request.

func NewCaptureTransactionParams

func NewCaptureTransactionParams() *CaptureTransactionParams

NewCaptureTransactionParams creates a new CaptureTransactionParams 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 NewCaptureTransactionParamsWithContext

func NewCaptureTransactionParamsWithContext(ctx context.Context) *CaptureTransactionParams

NewCaptureTransactionParamsWithContext creates a new CaptureTransactionParams object with the ability to set a context for a request.

func NewCaptureTransactionParamsWithHTTPClient

func NewCaptureTransactionParamsWithHTTPClient(client *http.Client) *CaptureTransactionParams

NewCaptureTransactionParamsWithHTTPClient creates a new CaptureTransactionParams object with the ability to set a custom HTTPClient for a request.

func NewCaptureTransactionParamsWithTimeout

func NewCaptureTransactionParamsWithTimeout(timeout time.Duration) *CaptureTransactionParams

NewCaptureTransactionParamsWithTimeout creates a new CaptureTransactionParams object with the ability to set a timeout on a request.

func (*CaptureTransactionParams) SetContext

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

SetContext adds the context to the capture transaction params

func (*CaptureTransactionParams) SetDefaults

func (o *CaptureTransactionParams) SetDefaults()

SetDefaults hydrates default values in the capture transaction params (not the query body).

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

func (*CaptureTransactionParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the capture transaction params

func (*CaptureTransactionParams) SetLocationID

func (o *CaptureTransactionParams) SetLocationID(locationID string)

SetLocationID adds the locationId to the capture transaction params

func (*CaptureTransactionParams) SetTimeout

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

SetTimeout adds the timeout to the capture transaction params

func (*CaptureTransactionParams) SetTransactionID

func (o *CaptureTransactionParams) SetTransactionID(transactionID string)

SetTransactionID adds the transactionId to the capture transaction params

func (*CaptureTransactionParams) WithContext

WithContext adds the context to the capture transaction params

func (*CaptureTransactionParams) WithDefaults

WithDefaults hydrates default values in the capture transaction params (not the query body).

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

func (*CaptureTransactionParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the capture transaction params

func (*CaptureTransactionParams) WithLocationID

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

WithLocationID adds the locationID to the capture transaction params

func (*CaptureTransactionParams) WithTimeout

WithTimeout adds the timeout to the capture transaction params

func (*CaptureTransactionParams) WithTransactionID

func (o *CaptureTransactionParams) WithTransactionID(transactionID string) *CaptureTransactionParams

WithTransactionID adds the transactionID to the capture transaction params

func (*CaptureTransactionParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type CaptureTransactionReader

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

CaptureTransactionReader is a Reader for the CaptureTransaction structure.

func (*CaptureTransactionReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type ChargeOK

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

Success

func NewChargeOK

func NewChargeOK() *ChargeOK

NewChargeOK creates a ChargeOK with default headers values

func (*ChargeOK) Error

func (o *ChargeOK) Error() string

func (*ChargeOK) GetPayload

func (o *ChargeOK) GetPayload() *models.ChargeResponse

type ChargeParams

type ChargeParams struct {

	/* Body.

	     An object containing the fields to POST for the request.

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

	/* LocationID.

	   The ID of the location to associate the created transaction with.
	*/
	LocationID string

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

ChargeParams contains all the parameters to send to the API endpoint

for the charge operation.

Typically these are written to a http.Request.

func NewChargeParams

func NewChargeParams() *ChargeParams

NewChargeParams creates a new ChargeParams 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 NewChargeParamsWithContext

func NewChargeParamsWithContext(ctx context.Context) *ChargeParams

NewChargeParamsWithContext creates a new ChargeParams object with the ability to set a context for a request.

func NewChargeParamsWithHTTPClient

func NewChargeParamsWithHTTPClient(client *http.Client) *ChargeParams

NewChargeParamsWithHTTPClient creates a new ChargeParams object with the ability to set a custom HTTPClient for a request.

func NewChargeParamsWithTimeout

func NewChargeParamsWithTimeout(timeout time.Duration) *ChargeParams

NewChargeParamsWithTimeout creates a new ChargeParams object with the ability to set a timeout on a request.

func (*ChargeParams) SetBody

func (o *ChargeParams) SetBody(body *models.ChargeRequest)

SetBody adds the body to the charge params

func (*ChargeParams) SetContext

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

SetContext adds the context to the charge params

func (*ChargeParams) SetDefaults

func (o *ChargeParams) SetDefaults()

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

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

func (*ChargeParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the charge params

func (*ChargeParams) SetLocationID

func (o *ChargeParams) SetLocationID(locationID string)

SetLocationID adds the locationId to the charge params

func (*ChargeParams) SetTimeout

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

SetTimeout adds the timeout to the charge params

func (*ChargeParams) WithBody

func (o *ChargeParams) WithBody(body *models.ChargeRequest) *ChargeParams

WithBody adds the body to the charge params

func (*ChargeParams) WithContext

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

WithContext adds the context to the charge params

func (*ChargeParams) WithDefaults

func (o *ChargeParams) WithDefaults() *ChargeParams

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

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

func (*ChargeParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the charge params

func (*ChargeParams) WithLocationID

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

WithLocationID adds the locationID to the charge params

func (*ChargeParams) WithTimeout

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

WithTimeout adds the timeout to the charge params

func (*ChargeParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type ChargeReader

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

ChargeReader is a Reader for the Charge structure.

func (*ChargeReader) ReadResponse

func (o *ChargeReader) 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 transactions API

func (*Client) CaptureTransaction

func (a *Client) CaptureTransaction(params *CaptureTransactionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CaptureTransactionOK, error)
CaptureTransaction captures transaction

Captures a transaction that was created with the [Charge](#endpoint-charge)

endpoint with a `delay_capture` value of `true`.

See [Delayed capture transactions](/payments/transactions/overview#delayed-capture) for more information.

func (*Client) Charge

func (a *Client) Charge(params *ChargeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ChargeOK, error)
Charge charges

Charges a card represented by a card nonce or a customer's card on file.

Your request to this endpoint must include _either_:

- A value for the `card_nonce` parameter (to charge a card nonce generated with the `SqPaymentForm`) - Values for the `customer_card_id` and `customer_id` parameters (to charge a customer's card on file)

In order for an eCommerce payment to potentially qualify for [Square chargeback protection](https://squareup.com/help/article/5394), you _must_ provide values for the following parameters in your request:

- `buyer_email_address` - At least one of `billing_address` or `shipping_address`

When this response is returned, the amount of Square's processing fee might not yet be calculated. To obtain the processing fee, wait about ten seconds and call [RetrieveTransaction](#endpoint-retrievetransaction). See the `processing_fee_money` field of each [Tender included](#type-tender) in the transaction.

func (*Client) CreateRefund

func (a *Client) CreateRefund(params *CreateRefundParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateRefundOK, error)
CreateRefund creates refund

Initiates a refund for a previously charged tender.

You must issue a refund within 120 days of the associated payment. See [this article](https://squareup.com/help/us/en/article/5060) for more information on refund behavior.

NOTE: Card-present transactions with Interac credit cards **cannot be refunded using the Connect API**. Interac transactions must refunded in-person (e.g., dipping the card using POS app).

func (*Client) ListRefunds

func (a *Client) ListRefunds(params *ListRefundsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListRefundsOK, error)
ListRefunds lists refunds

Lists refunds for one of a business's locations.

In addition to full or partial tender refunds processed through Square APIs, refunds may result from itemized returns or exchanges through Square's Point of Sale applications.

Refunds with a `status` of `PENDING` are not currently included in this endpoint's response.

Max results per [page](#paginatingresults): 50

func (*Client) ListTransactions

func (a *Client) ListTransactions(params *ListTransactionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListTransactionsOK, error)
ListTransactions lists transactions

Lists transactions for a particular location.

Transactions include payment information from sales and exchanges and refund information from returns and exchanges.

Max results per [page](#paginatingresults): 50

func (*Client) RetrieveTransaction

func (a *Client) RetrieveTransaction(params *RetrieveTransactionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RetrieveTransactionOK, error)

RetrieveTransaction retrieves transaction

Retrieves details for a single transaction.

func (*Client) SetTransport

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

SetTransport changes the transport on the client

func (*Client) VoidTransaction

func (a *Client) VoidTransaction(params *VoidTransactionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*VoidTransactionOK, error)
VoidTransaction voids transaction

Cancels a transaction that was created with the [Charge](#endpoint-charge)

endpoint with a `delay_capture` value of `true`.

See [Delayed capture transactions](/payments/transactions/overview#delayed-capture) for more information.

type ClientOption

type ClientOption func(*runtime.ClientOperation)

ClientOption is the option for Client methods

type ClientService

type ClientService interface {
	CaptureTransaction(params *CaptureTransactionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CaptureTransactionOK, error)

	Charge(params *ChargeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ChargeOK, error)

	CreateRefund(params *CreateRefundParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateRefundOK, error)

	ListRefunds(params *ListRefundsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListRefundsOK, error)

	ListTransactions(params *ListTransactionsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListTransactionsOK, error)

	RetrieveTransaction(params *RetrieveTransactionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RetrieveTransactionOK, error)

	VoidTransaction(params *VoidTransactionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*VoidTransactionOK, 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 transactions API client.

type CreateRefundOK

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

Success

func NewCreateRefundOK

func NewCreateRefundOK() *CreateRefundOK

NewCreateRefundOK creates a CreateRefundOK with default headers values

func (*CreateRefundOK) Error

func (o *CreateRefundOK) Error() string

func (*CreateRefundOK) GetPayload

func (o *CreateRefundOK) GetPayload() *models.CreateRefundResponse

type CreateRefundParams

type CreateRefundParams struct {

	/* Body.

	     An object containing the fields to POST for the request.

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

	/* LocationID.

	   The ID of the original transaction's associated location.
	*/
	LocationID string

	/* TransactionID.

	   The ID of the original transaction that includes the tender to refund.
	*/
	TransactionID string

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

CreateRefundParams contains all the parameters to send to the API endpoint

for the create refund operation.

Typically these are written to a http.Request.

func NewCreateRefundParams

func NewCreateRefundParams() *CreateRefundParams

NewCreateRefundParams creates a new CreateRefundParams 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 NewCreateRefundParamsWithContext

func NewCreateRefundParamsWithContext(ctx context.Context) *CreateRefundParams

NewCreateRefundParamsWithContext creates a new CreateRefundParams object with the ability to set a context for a request.

func NewCreateRefundParamsWithHTTPClient

func NewCreateRefundParamsWithHTTPClient(client *http.Client) *CreateRefundParams

NewCreateRefundParamsWithHTTPClient creates a new CreateRefundParams object with the ability to set a custom HTTPClient for a request.

func NewCreateRefundParamsWithTimeout

func NewCreateRefundParamsWithTimeout(timeout time.Duration) *CreateRefundParams

NewCreateRefundParamsWithTimeout creates a new CreateRefundParams object with the ability to set a timeout on a request.

func (*CreateRefundParams) SetBody

func (o *CreateRefundParams) SetBody(body *models.CreateRefundRequest)

SetBody adds the body to the create refund params

func (*CreateRefundParams) SetContext

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

SetContext adds the context to the create refund params

func (*CreateRefundParams) SetDefaults

func (o *CreateRefundParams) SetDefaults()

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

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

func (*CreateRefundParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the create refund params

func (*CreateRefundParams) SetLocationID

func (o *CreateRefundParams) SetLocationID(locationID string)

SetLocationID adds the locationId to the create refund params

func (*CreateRefundParams) SetTimeout

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

SetTimeout adds the timeout to the create refund params

func (*CreateRefundParams) SetTransactionID

func (o *CreateRefundParams) SetTransactionID(transactionID string)

SetTransactionID adds the transactionId to the create refund params

func (*CreateRefundParams) WithBody

WithBody adds the body to the create refund params

func (*CreateRefundParams) WithContext

WithContext adds the context to the create refund params

func (*CreateRefundParams) WithDefaults

func (o *CreateRefundParams) WithDefaults() *CreateRefundParams

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

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

func (*CreateRefundParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the create refund params

func (*CreateRefundParams) WithLocationID

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

WithLocationID adds the locationID to the create refund params

func (*CreateRefundParams) WithTimeout

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

WithTimeout adds the timeout to the create refund params

func (*CreateRefundParams) WithTransactionID

func (o *CreateRefundParams) WithTransactionID(transactionID string) *CreateRefundParams

WithTransactionID adds the transactionID to the create refund params

func (*CreateRefundParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type CreateRefundReader

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

CreateRefundReader is a Reader for the CreateRefund structure.

func (*CreateRefundReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type ListRefundsOK

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

Success

func NewListRefundsOK

func NewListRefundsOK() *ListRefundsOK

NewListRefundsOK creates a ListRefundsOK with default headers values

func (*ListRefundsOK) Error

func (o *ListRefundsOK) Error() string

func (*ListRefundsOK) GetPayload

func (o *ListRefundsOK) GetPayload() *models.ListRefundsResponse

type ListRefundsParams

type ListRefundsParams struct {

	/* BeginTime.

	     The beginning of the requested reporting period, in RFC 3339 format.

	See [Date ranges](#dateranges) for details on date inclusivity/exclusivity.

	Default value: The current time minus one year.
	*/
	BeginTime *string

	/* Cursor.

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

	See [Paginating results](#paginatingresults) for more information.
	*/
	Cursor *string

	/* EndTime.

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

	See [Date ranges](#dateranges) for details on date inclusivity/exclusivity.

	Default value: The current time.
	*/
	EndTime *string

	/* LocationID.

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

	/* SortOrder.

	     The order in which results are listed in the response (`ASC` for
	oldest first, `DESC` for newest first).

	Default value: `DESC`
	*/
	SortOrder *string

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

ListRefundsParams contains all the parameters to send to the API endpoint

for the list refunds operation.

Typically these are written to a http.Request.

func NewListRefundsParams

func NewListRefundsParams() *ListRefundsParams

NewListRefundsParams creates a new ListRefundsParams 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 NewListRefundsParamsWithContext

func NewListRefundsParamsWithContext(ctx context.Context) *ListRefundsParams

NewListRefundsParamsWithContext creates a new ListRefundsParams object with the ability to set a context for a request.

func NewListRefundsParamsWithHTTPClient

func NewListRefundsParamsWithHTTPClient(client *http.Client) *ListRefundsParams

NewListRefundsParamsWithHTTPClient creates a new ListRefundsParams object with the ability to set a custom HTTPClient for a request.

func NewListRefundsParamsWithTimeout

func NewListRefundsParamsWithTimeout(timeout time.Duration) *ListRefundsParams

NewListRefundsParamsWithTimeout creates a new ListRefundsParams object with the ability to set a timeout on a request.

func (*ListRefundsParams) SetBeginTime

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

SetBeginTime adds the beginTime to the list refunds params

func (*ListRefundsParams) SetContext

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

SetContext adds the context to the list refunds params

func (*ListRefundsParams) SetCursor

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

SetCursor adds the cursor to the list refunds params

func (*ListRefundsParams) SetDefaults

func (o *ListRefundsParams) SetDefaults()

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

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

func (*ListRefundsParams) SetEndTime

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

SetEndTime adds the endTime to the list refunds params

func (*ListRefundsParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the list refunds params

func (*ListRefundsParams) SetLocationID

func (o *ListRefundsParams) SetLocationID(locationID string)

SetLocationID adds the locationId to the list refunds params

func (*ListRefundsParams) SetSortOrder

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

SetSortOrder adds the sortOrder to the list refunds params

func (*ListRefundsParams) SetTimeout

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

SetTimeout adds the timeout to the list refunds params

func (*ListRefundsParams) WithBeginTime

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

WithBeginTime adds the beginTime to the list refunds params

func (*ListRefundsParams) WithContext

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

WithContext adds the context to the list refunds params

func (*ListRefundsParams) WithCursor

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

WithCursor adds the cursor to the list refunds params

func (*ListRefundsParams) WithDefaults

func (o *ListRefundsParams) WithDefaults() *ListRefundsParams

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

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

func (*ListRefundsParams) WithEndTime

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

WithEndTime adds the endTime to the list refunds params

func (*ListRefundsParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the list refunds params

func (*ListRefundsParams) WithLocationID

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

WithLocationID adds the locationID to the list refunds params

func (*ListRefundsParams) WithSortOrder

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

WithSortOrder adds the sortOrder to the list refunds params

func (*ListRefundsParams) WithTimeout

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

WithTimeout adds the timeout to the list refunds params

func (*ListRefundsParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type ListRefundsReader

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

ListRefundsReader is a Reader for the ListRefunds structure.

func (*ListRefundsReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type ListTransactionsOK

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

Success

func NewListTransactionsOK

func NewListTransactionsOK() *ListTransactionsOK

NewListTransactionsOK creates a ListTransactionsOK with default headers values

func (*ListTransactionsOK) Error

func (o *ListTransactionsOK) Error() string

func (*ListTransactionsOK) GetPayload

type ListTransactionsParams

type ListTransactionsParams struct {

	/* BeginTime.

	     The beginning of the requested reporting period, in RFC 3339 format.

	See [Date ranges](#dateranges) for details on date inclusivity/exclusivity.

	Default value: The current time minus one year.
	*/
	BeginTime *string

	/* Cursor.

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

	See [Paginating results](#paginatingresults) for more information.
	*/
	Cursor *string

	/* EndTime.

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

	See [Date ranges](#dateranges) for details on date inclusivity/exclusivity.

	Default value: The current time.
	*/
	EndTime *string

	/* LocationID.

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

	/* SortOrder.

	     The order in which results are listed in the response (`ASC` for
	oldest first, `DESC` for newest first).

	Default value: `DESC`
	*/
	SortOrder *string

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

ListTransactionsParams contains all the parameters to send to the API endpoint

for the list transactions operation.

Typically these are written to a http.Request.

func NewListTransactionsParams

func NewListTransactionsParams() *ListTransactionsParams

NewListTransactionsParams creates a new ListTransactionsParams 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 NewListTransactionsParamsWithContext

func NewListTransactionsParamsWithContext(ctx context.Context) *ListTransactionsParams

NewListTransactionsParamsWithContext creates a new ListTransactionsParams object with the ability to set a context for a request.

func NewListTransactionsParamsWithHTTPClient

func NewListTransactionsParamsWithHTTPClient(client *http.Client) *ListTransactionsParams

NewListTransactionsParamsWithHTTPClient creates a new ListTransactionsParams object with the ability to set a custom HTTPClient for a request.

func NewListTransactionsParamsWithTimeout

func NewListTransactionsParamsWithTimeout(timeout time.Duration) *ListTransactionsParams

NewListTransactionsParamsWithTimeout creates a new ListTransactionsParams object with the ability to set a timeout on a request.

func (*ListTransactionsParams) SetBeginTime

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

SetBeginTime adds the beginTime to the list transactions params

func (*ListTransactionsParams) SetContext

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

SetContext adds the context to the list transactions params

func (*ListTransactionsParams) SetCursor

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

SetCursor adds the cursor to the list transactions params

func (*ListTransactionsParams) SetDefaults

func (o *ListTransactionsParams) SetDefaults()

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

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

func (*ListTransactionsParams) SetEndTime

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

SetEndTime adds the endTime to the list transactions params

func (*ListTransactionsParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the list transactions params

func (*ListTransactionsParams) SetLocationID

func (o *ListTransactionsParams) SetLocationID(locationID string)

SetLocationID adds the locationId to the list transactions params

func (*ListTransactionsParams) SetSortOrder

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

SetSortOrder adds the sortOrder to the list transactions params

func (*ListTransactionsParams) SetTimeout

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

SetTimeout adds the timeout to the list transactions params

func (*ListTransactionsParams) WithBeginTime

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

WithBeginTime adds the beginTime to the list transactions params

func (*ListTransactionsParams) WithContext

WithContext adds the context to the list transactions params

func (*ListTransactionsParams) WithCursor

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

WithCursor adds the cursor to the list transactions params

func (*ListTransactionsParams) WithDefaults

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

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

func (*ListTransactionsParams) WithEndTime

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

WithEndTime adds the endTime to the list transactions params

func (*ListTransactionsParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the list transactions params

func (*ListTransactionsParams) WithLocationID

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

WithLocationID adds the locationID to the list transactions params

func (*ListTransactionsParams) WithSortOrder

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

WithSortOrder adds the sortOrder to the list transactions params

func (*ListTransactionsParams) WithTimeout

WithTimeout adds the timeout to the list transactions params

func (*ListTransactionsParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type ListTransactionsReader

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

ListTransactionsReader is a Reader for the ListTransactions structure.

func (*ListTransactionsReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type RetrieveTransactionOK

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

Success

func NewRetrieveTransactionOK

func NewRetrieveTransactionOK() *RetrieveTransactionOK

NewRetrieveTransactionOK creates a RetrieveTransactionOK with default headers values

func (*RetrieveTransactionOK) Error

func (o *RetrieveTransactionOK) Error() string

func (*RetrieveTransactionOK) GetPayload

type RetrieveTransactionParams

type RetrieveTransactionParams struct {

	/* LocationID.

	   The ID of the transaction's associated location.
	*/
	LocationID string

	/* TransactionID.

	   The ID of the transaction to retrieve.
	*/
	TransactionID string

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

RetrieveTransactionParams contains all the parameters to send to the API endpoint

for the retrieve transaction operation.

Typically these are written to a http.Request.

func NewRetrieveTransactionParams

func NewRetrieveTransactionParams() *RetrieveTransactionParams

NewRetrieveTransactionParams creates a new RetrieveTransactionParams 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 NewRetrieveTransactionParamsWithContext

func NewRetrieveTransactionParamsWithContext(ctx context.Context) *RetrieveTransactionParams

NewRetrieveTransactionParamsWithContext creates a new RetrieveTransactionParams object with the ability to set a context for a request.

func NewRetrieveTransactionParamsWithHTTPClient

func NewRetrieveTransactionParamsWithHTTPClient(client *http.Client) *RetrieveTransactionParams

NewRetrieveTransactionParamsWithHTTPClient creates a new RetrieveTransactionParams object with the ability to set a custom HTTPClient for a request.

func NewRetrieveTransactionParamsWithTimeout

func NewRetrieveTransactionParamsWithTimeout(timeout time.Duration) *RetrieveTransactionParams

NewRetrieveTransactionParamsWithTimeout creates a new RetrieveTransactionParams object with the ability to set a timeout on a request.

func (*RetrieveTransactionParams) SetContext

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

SetContext adds the context to the retrieve transaction params

func (*RetrieveTransactionParams) SetDefaults

func (o *RetrieveTransactionParams) SetDefaults()

SetDefaults hydrates default values in the retrieve transaction params (not the query body).

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

func (*RetrieveTransactionParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the retrieve transaction params

func (*RetrieveTransactionParams) SetLocationID

func (o *RetrieveTransactionParams) SetLocationID(locationID string)

SetLocationID adds the locationId to the retrieve transaction params

func (*RetrieveTransactionParams) SetTimeout

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

SetTimeout adds the timeout to the retrieve transaction params

func (*RetrieveTransactionParams) SetTransactionID

func (o *RetrieveTransactionParams) SetTransactionID(transactionID string)

SetTransactionID adds the transactionId to the retrieve transaction params

func (*RetrieveTransactionParams) WithContext

WithContext adds the context to the retrieve transaction params

func (*RetrieveTransactionParams) WithDefaults

WithDefaults hydrates default values in the retrieve transaction params (not the query body).

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

func (*RetrieveTransactionParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the retrieve transaction params

func (*RetrieveTransactionParams) WithLocationID

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

WithLocationID adds the locationID to the retrieve transaction params

func (*RetrieveTransactionParams) WithTimeout

WithTimeout adds the timeout to the retrieve transaction params

func (*RetrieveTransactionParams) WithTransactionID

func (o *RetrieveTransactionParams) WithTransactionID(transactionID string) *RetrieveTransactionParams

WithTransactionID adds the transactionID to the retrieve transaction params

func (*RetrieveTransactionParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type RetrieveTransactionReader

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

RetrieveTransactionReader is a Reader for the RetrieveTransaction structure.

func (*RetrieveTransactionReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type VoidTransactionOK

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

Success

func NewVoidTransactionOK

func NewVoidTransactionOK() *VoidTransactionOK

NewVoidTransactionOK creates a VoidTransactionOK with default headers values

func (*VoidTransactionOK) Error

func (o *VoidTransactionOK) Error() string

func (*VoidTransactionOK) GetPayload

type VoidTransactionParams

type VoidTransactionParams struct {

	// LocationID.
	LocationID string

	// TransactionID.
	TransactionID string

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

VoidTransactionParams contains all the parameters to send to the API endpoint

for the void transaction operation.

Typically these are written to a http.Request.

func NewVoidTransactionParams

func NewVoidTransactionParams() *VoidTransactionParams

NewVoidTransactionParams creates a new VoidTransactionParams 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 NewVoidTransactionParamsWithContext

func NewVoidTransactionParamsWithContext(ctx context.Context) *VoidTransactionParams

NewVoidTransactionParamsWithContext creates a new VoidTransactionParams object with the ability to set a context for a request.

func NewVoidTransactionParamsWithHTTPClient

func NewVoidTransactionParamsWithHTTPClient(client *http.Client) *VoidTransactionParams

NewVoidTransactionParamsWithHTTPClient creates a new VoidTransactionParams object with the ability to set a custom HTTPClient for a request.

func NewVoidTransactionParamsWithTimeout

func NewVoidTransactionParamsWithTimeout(timeout time.Duration) *VoidTransactionParams

NewVoidTransactionParamsWithTimeout creates a new VoidTransactionParams object with the ability to set a timeout on a request.

func (*VoidTransactionParams) SetContext

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

SetContext adds the context to the void transaction params

func (*VoidTransactionParams) SetDefaults

func (o *VoidTransactionParams) SetDefaults()

SetDefaults hydrates default values in the void transaction params (not the query body).

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

func (*VoidTransactionParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the void transaction params

func (*VoidTransactionParams) SetLocationID

func (o *VoidTransactionParams) SetLocationID(locationID string)

SetLocationID adds the locationId to the void transaction params

func (*VoidTransactionParams) SetTimeout

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

SetTimeout adds the timeout to the void transaction params

func (*VoidTransactionParams) SetTransactionID

func (o *VoidTransactionParams) SetTransactionID(transactionID string)

SetTransactionID adds the transactionId to the void transaction params

func (*VoidTransactionParams) WithContext

WithContext adds the context to the void transaction params

func (*VoidTransactionParams) WithDefaults

func (o *VoidTransactionParams) WithDefaults() *VoidTransactionParams

WithDefaults hydrates default values in the void transaction params (not the query body).

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

func (*VoidTransactionParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the void transaction params

func (*VoidTransactionParams) WithLocationID

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

WithLocationID adds the locationID to the void transaction params

func (*VoidTransactionParams) WithTimeout

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

WithTimeout adds the timeout to the void transaction params

func (*VoidTransactionParams) WithTransactionID

func (o *VoidTransactionParams) WithTransactionID(transactionID string) *VoidTransactionParams

WithTransactionID adds the transactionID to the void transaction params

func (*VoidTransactionParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type VoidTransactionReader

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

VoidTransactionReader is a Reader for the VoidTransaction structure.

func (*VoidTransactionReader) ReadResponse

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