Documentation ¶
Index ¶
- type Client
- type ClientOption
- type ClientService
- type CreateCheckoutOK
- type CreateCheckoutParams
- func NewCreateCheckoutParams() *CreateCheckoutParams
- func NewCreateCheckoutParamsWithContext(ctx context.Context) *CreateCheckoutParams
- func NewCreateCheckoutParamsWithHTTPClient(client *http.Client) *CreateCheckoutParams
- func NewCreateCheckoutParamsWithTimeout(timeout time.Duration) *CreateCheckoutParams
- func (o *CreateCheckoutParams) SetBody(body *models.CreateCheckoutRequest)
- func (o *CreateCheckoutParams) SetContext(ctx context.Context)
- func (o *CreateCheckoutParams) SetDefaults()
- func (o *CreateCheckoutParams) SetHTTPClient(client *http.Client)
- func (o *CreateCheckoutParams) SetLocationID(locationID string)
- func (o *CreateCheckoutParams) SetTimeout(timeout time.Duration)
- func (o *CreateCheckoutParams) WithBody(body *models.CreateCheckoutRequest) *CreateCheckoutParams
- func (o *CreateCheckoutParams) WithContext(ctx context.Context) *CreateCheckoutParams
- func (o *CreateCheckoutParams) WithDefaults() *CreateCheckoutParams
- func (o *CreateCheckoutParams) WithHTTPClient(client *http.Client) *CreateCheckoutParams
- func (o *CreateCheckoutParams) WithLocationID(locationID string) *CreateCheckoutParams
- func (o *CreateCheckoutParams) WithTimeout(timeout time.Duration) *CreateCheckoutParams
- func (o *CreateCheckoutParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type CreateCheckoutReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client for checkout API
func (*Client) CreateCheckout ¶
func (a *Client) CreateCheckout(params *CreateCheckoutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateCheckoutOK, error)
CreateCheckout creates checkout Links a `checkoutId` to a `checkout_page_url` that customers will
be directed to in order to provide their payment information using a payment processing workflow hosted on connect.squareup.com.
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 { CreateCheckout(params *CreateCheckoutParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateCheckoutOK, 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 checkout API client.
type CreateCheckoutOK ¶
type CreateCheckoutOK struct {
Payload *models.CreateCheckoutResponse
}
CreateCheckoutOK describes a response with status code 200, with default header values.
Success
func NewCreateCheckoutOK ¶
func NewCreateCheckoutOK() *CreateCheckoutOK
NewCreateCheckoutOK creates a CreateCheckoutOK with default headers values
func (*CreateCheckoutOK) Error ¶
func (o *CreateCheckoutOK) Error() string
func (*CreateCheckoutOK) GetPayload ¶
func (o *CreateCheckoutOK) GetPayload() *models.CreateCheckoutResponse
type CreateCheckoutParams ¶
type CreateCheckoutParams struct { /* Body. An object containing the fields to POST for the request. See the corresponding object definition for field details. */ Body *models.CreateCheckoutRequest /* LocationID. The ID of the business location to associate the checkout with. */ LocationID string Context context.Context HTTPClient *http.Client // contains filtered or unexported fields }
CreateCheckoutParams contains all the parameters to send to the API endpoint
for the create checkout operation. Typically these are written to a http.Request.
func NewCreateCheckoutParams ¶
func NewCreateCheckoutParams() *CreateCheckoutParams
NewCreateCheckoutParams creates a new CreateCheckoutParams 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 NewCreateCheckoutParamsWithContext ¶
func NewCreateCheckoutParamsWithContext(ctx context.Context) *CreateCheckoutParams
NewCreateCheckoutParamsWithContext creates a new CreateCheckoutParams object with the ability to set a context for a request.
func NewCreateCheckoutParamsWithHTTPClient ¶
func NewCreateCheckoutParamsWithHTTPClient(client *http.Client) *CreateCheckoutParams
NewCreateCheckoutParamsWithHTTPClient creates a new CreateCheckoutParams object with the ability to set a custom HTTPClient for a request.
func NewCreateCheckoutParamsWithTimeout ¶
func NewCreateCheckoutParamsWithTimeout(timeout time.Duration) *CreateCheckoutParams
NewCreateCheckoutParamsWithTimeout creates a new CreateCheckoutParams object with the ability to set a timeout on a request.
func (*CreateCheckoutParams) SetBody ¶
func (o *CreateCheckoutParams) SetBody(body *models.CreateCheckoutRequest)
SetBody adds the body to the create checkout params
func (*CreateCheckoutParams) SetContext ¶
func (o *CreateCheckoutParams) SetContext(ctx context.Context)
SetContext adds the context to the create checkout params
func (*CreateCheckoutParams) SetDefaults ¶
func (o *CreateCheckoutParams) SetDefaults()
SetDefaults hydrates default values in the create checkout params (not the query body).
All values with no default are reset to their zero value.
func (*CreateCheckoutParams) SetHTTPClient ¶
func (o *CreateCheckoutParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the create checkout params
func (*CreateCheckoutParams) SetLocationID ¶
func (o *CreateCheckoutParams) SetLocationID(locationID string)
SetLocationID adds the locationId to the create checkout params
func (*CreateCheckoutParams) SetTimeout ¶
func (o *CreateCheckoutParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the create checkout params
func (*CreateCheckoutParams) WithBody ¶
func (o *CreateCheckoutParams) WithBody(body *models.CreateCheckoutRequest) *CreateCheckoutParams
WithBody adds the body to the create checkout params
func (*CreateCheckoutParams) WithContext ¶
func (o *CreateCheckoutParams) WithContext(ctx context.Context) *CreateCheckoutParams
WithContext adds the context to the create checkout params
func (*CreateCheckoutParams) WithDefaults ¶
func (o *CreateCheckoutParams) WithDefaults() *CreateCheckoutParams
WithDefaults hydrates default values in the create checkout params (not the query body).
All values with no default are reset to their zero value.
func (*CreateCheckoutParams) WithHTTPClient ¶
func (o *CreateCheckoutParams) WithHTTPClient(client *http.Client) *CreateCheckoutParams
WithHTTPClient adds the HTTPClient to the create checkout params
func (*CreateCheckoutParams) WithLocationID ¶
func (o *CreateCheckoutParams) WithLocationID(locationID string) *CreateCheckoutParams
WithLocationID adds the locationID to the create checkout params
func (*CreateCheckoutParams) WithTimeout ¶
func (o *CreateCheckoutParams) WithTimeout(timeout time.Duration) *CreateCheckoutParams
WithTimeout adds the timeout to the create checkout params
func (*CreateCheckoutParams) WriteToRequest ¶
func (o *CreateCheckoutParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type CreateCheckoutReader ¶
type CreateCheckoutReader struct {
// contains filtered or unexported fields
}
CreateCheckoutReader is a Reader for the CreateCheckout structure.
func (*CreateCheckoutReader) ReadResponse ¶
func (o *CreateCheckoutReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.