Documentation
¶
Index ¶
- type Client
- func (a *Client) CreateDeviceCode(params *CreateDeviceCodeParams, authInfo runtime.ClientAuthInfoWriter, ...) (*CreateDeviceCodeOK, error)
- func (a *Client) GetDeviceCode(params *GetDeviceCodeParams, authInfo runtime.ClientAuthInfoWriter, ...) (*GetDeviceCodeOK, error)
- func (a *Client) ListDeviceCodes(params *ListDeviceCodesParams, authInfo runtime.ClientAuthInfoWriter, ...) (*ListDeviceCodesOK, error)
- func (a *Client) SetTransport(transport runtime.ClientTransport)
- type ClientOption
- type ClientService
- type CreateDeviceCodeOK
- type CreateDeviceCodeParams
- func NewCreateDeviceCodeParams() *CreateDeviceCodeParams
- func NewCreateDeviceCodeParamsWithContext(ctx context.Context) *CreateDeviceCodeParams
- func NewCreateDeviceCodeParamsWithHTTPClient(client *http.Client) *CreateDeviceCodeParams
- func NewCreateDeviceCodeParamsWithTimeout(timeout time.Duration) *CreateDeviceCodeParams
- func (o *CreateDeviceCodeParams) SetBody(body *models.CreateDeviceCodeRequest)
- func (o *CreateDeviceCodeParams) SetContext(ctx context.Context)
- func (o *CreateDeviceCodeParams) SetDefaults()
- func (o *CreateDeviceCodeParams) SetHTTPClient(client *http.Client)
- func (o *CreateDeviceCodeParams) SetTimeout(timeout time.Duration)
- func (o *CreateDeviceCodeParams) WithBody(body *models.CreateDeviceCodeRequest) *CreateDeviceCodeParams
- func (o *CreateDeviceCodeParams) WithContext(ctx context.Context) *CreateDeviceCodeParams
- func (o *CreateDeviceCodeParams) WithDefaults() *CreateDeviceCodeParams
- func (o *CreateDeviceCodeParams) WithHTTPClient(client *http.Client) *CreateDeviceCodeParams
- func (o *CreateDeviceCodeParams) WithTimeout(timeout time.Duration) *CreateDeviceCodeParams
- func (o *CreateDeviceCodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type CreateDeviceCodeReader
- type GetDeviceCodeOK
- type GetDeviceCodeParams
- func (o *GetDeviceCodeParams) SetContext(ctx context.Context)
- func (o *GetDeviceCodeParams) SetDefaults()
- func (o *GetDeviceCodeParams) SetHTTPClient(client *http.Client)
- func (o *GetDeviceCodeParams) SetID(id string)
- func (o *GetDeviceCodeParams) SetTimeout(timeout time.Duration)
- func (o *GetDeviceCodeParams) WithContext(ctx context.Context) *GetDeviceCodeParams
- func (o *GetDeviceCodeParams) WithDefaults() *GetDeviceCodeParams
- func (o *GetDeviceCodeParams) WithHTTPClient(client *http.Client) *GetDeviceCodeParams
- func (o *GetDeviceCodeParams) WithID(id string) *GetDeviceCodeParams
- func (o *GetDeviceCodeParams) WithTimeout(timeout time.Duration) *GetDeviceCodeParams
- func (o *GetDeviceCodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type GetDeviceCodeReader
- type ListDeviceCodesOK
- type ListDeviceCodesParams
- func NewListDeviceCodesParams() *ListDeviceCodesParams
- func NewListDeviceCodesParamsWithContext(ctx context.Context) *ListDeviceCodesParams
- func NewListDeviceCodesParamsWithHTTPClient(client *http.Client) *ListDeviceCodesParams
- func NewListDeviceCodesParamsWithTimeout(timeout time.Duration) *ListDeviceCodesParams
- func (o *ListDeviceCodesParams) SetContext(ctx context.Context)
- func (o *ListDeviceCodesParams) SetCursor(cursor *string)
- func (o *ListDeviceCodesParams) SetDefaults()
- func (o *ListDeviceCodesParams) SetHTTPClient(client *http.Client)
- func (o *ListDeviceCodesParams) SetLocationID(locationID *string)
- func (o *ListDeviceCodesParams) SetProductType(productType *string)
- func (o *ListDeviceCodesParams) SetStatus(status *string)
- func (o *ListDeviceCodesParams) SetTimeout(timeout time.Duration)
- func (o *ListDeviceCodesParams) WithContext(ctx context.Context) *ListDeviceCodesParams
- func (o *ListDeviceCodesParams) WithCursor(cursor *string) *ListDeviceCodesParams
- func (o *ListDeviceCodesParams) WithDefaults() *ListDeviceCodesParams
- func (o *ListDeviceCodesParams) WithHTTPClient(client *http.Client) *ListDeviceCodesParams
- func (o *ListDeviceCodesParams) WithLocationID(locationID *string) *ListDeviceCodesParams
- func (o *ListDeviceCodesParams) WithProductType(productType *string) *ListDeviceCodesParams
- func (o *ListDeviceCodesParams) WithStatus(status *string) *ListDeviceCodesParams
- func (o *ListDeviceCodesParams) WithTimeout(timeout time.Duration) *ListDeviceCodesParams
- func (o *ListDeviceCodesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type ListDeviceCodesReader
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 devices API
func (*Client) CreateDeviceCode ¶
func (a *Client) CreateDeviceCode(params *CreateDeviceCodeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateDeviceCodeOK, error)
CreateDeviceCode creates device code Creates a DeviceCode that can be used to login to a Square Terminal device to enter the connected
terminal mode.
func (*Client) GetDeviceCode ¶
func (a *Client) GetDeviceCode(params *GetDeviceCodeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetDeviceCodeOK, error)
GetDeviceCode gets device code
Retrieves DeviceCode with the associated ID.
func (*Client) ListDeviceCodes ¶
func (a *Client) ListDeviceCodes(params *ListDeviceCodesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListDeviceCodesOK, error)
ListDeviceCodes lists device codes
Lists all DeviceCodes associated with the merchant.
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 { CreateDeviceCode(params *CreateDeviceCodeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateDeviceCodeOK, error) GetDeviceCode(params *GetDeviceCodeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetDeviceCodeOK, error) ListDeviceCodes(params *ListDeviceCodesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListDeviceCodesOK, 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 devices API client.
type CreateDeviceCodeOK ¶
type CreateDeviceCodeOK struct {
Payload *models.CreateDeviceCodeResponse
}
CreateDeviceCodeOK describes a response with status code 200, with default header values.
Success
func NewCreateDeviceCodeOK ¶
func NewCreateDeviceCodeOK() *CreateDeviceCodeOK
NewCreateDeviceCodeOK creates a CreateDeviceCodeOK with default headers values
func (*CreateDeviceCodeOK) Error ¶
func (o *CreateDeviceCodeOK) Error() string
func (*CreateDeviceCodeOK) GetPayload ¶
func (o *CreateDeviceCodeOK) GetPayload() *models.CreateDeviceCodeResponse
type CreateDeviceCodeParams ¶
type CreateDeviceCodeParams struct { /* Body. An object containing the fields to POST for the request. See the corresponding object definition for field details. */ Body *models.CreateDeviceCodeRequest Context context.Context HTTPClient *http.Client // contains filtered or unexported fields }
CreateDeviceCodeParams contains all the parameters to send to the API endpoint
for the create device code operation. Typically these are written to a http.Request.
func NewCreateDeviceCodeParams ¶
func NewCreateDeviceCodeParams() *CreateDeviceCodeParams
NewCreateDeviceCodeParams creates a new CreateDeviceCodeParams 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 NewCreateDeviceCodeParamsWithContext ¶
func NewCreateDeviceCodeParamsWithContext(ctx context.Context) *CreateDeviceCodeParams
NewCreateDeviceCodeParamsWithContext creates a new CreateDeviceCodeParams object with the ability to set a context for a request.
func NewCreateDeviceCodeParamsWithHTTPClient ¶
func NewCreateDeviceCodeParamsWithHTTPClient(client *http.Client) *CreateDeviceCodeParams
NewCreateDeviceCodeParamsWithHTTPClient creates a new CreateDeviceCodeParams object with the ability to set a custom HTTPClient for a request.
func NewCreateDeviceCodeParamsWithTimeout ¶
func NewCreateDeviceCodeParamsWithTimeout(timeout time.Duration) *CreateDeviceCodeParams
NewCreateDeviceCodeParamsWithTimeout creates a new CreateDeviceCodeParams object with the ability to set a timeout on a request.
func (*CreateDeviceCodeParams) SetBody ¶
func (o *CreateDeviceCodeParams) SetBody(body *models.CreateDeviceCodeRequest)
SetBody adds the body to the create device code params
func (*CreateDeviceCodeParams) SetContext ¶
func (o *CreateDeviceCodeParams) SetContext(ctx context.Context)
SetContext adds the context to the create device code params
func (*CreateDeviceCodeParams) SetDefaults ¶
func (o *CreateDeviceCodeParams) SetDefaults()
SetDefaults hydrates default values in the create device code params (not the query body).
All values with no default are reset to their zero value.
func (*CreateDeviceCodeParams) SetHTTPClient ¶
func (o *CreateDeviceCodeParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the create device code params
func (*CreateDeviceCodeParams) SetTimeout ¶
func (o *CreateDeviceCodeParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the create device code params
func (*CreateDeviceCodeParams) WithBody ¶
func (o *CreateDeviceCodeParams) WithBody(body *models.CreateDeviceCodeRequest) *CreateDeviceCodeParams
WithBody adds the body to the create device code params
func (*CreateDeviceCodeParams) WithContext ¶
func (o *CreateDeviceCodeParams) WithContext(ctx context.Context) *CreateDeviceCodeParams
WithContext adds the context to the create device code params
func (*CreateDeviceCodeParams) WithDefaults ¶
func (o *CreateDeviceCodeParams) WithDefaults() *CreateDeviceCodeParams
WithDefaults hydrates default values in the create device code params (not the query body).
All values with no default are reset to their zero value.
func (*CreateDeviceCodeParams) WithHTTPClient ¶
func (o *CreateDeviceCodeParams) WithHTTPClient(client *http.Client) *CreateDeviceCodeParams
WithHTTPClient adds the HTTPClient to the create device code params
func (*CreateDeviceCodeParams) WithTimeout ¶
func (o *CreateDeviceCodeParams) WithTimeout(timeout time.Duration) *CreateDeviceCodeParams
WithTimeout adds the timeout to the create device code params
func (*CreateDeviceCodeParams) WriteToRequest ¶
func (o *CreateDeviceCodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type CreateDeviceCodeReader ¶
type CreateDeviceCodeReader struct {
// contains filtered or unexported fields
}
CreateDeviceCodeReader is a Reader for the CreateDeviceCode structure.
func (*CreateDeviceCodeReader) ReadResponse ¶
func (o *CreateDeviceCodeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.
type GetDeviceCodeOK ¶
type GetDeviceCodeOK struct {
Payload *models.GetDeviceCodeResponse
}
GetDeviceCodeOK describes a response with status code 200, with default header values.
Success
func NewGetDeviceCodeOK ¶
func NewGetDeviceCodeOK() *GetDeviceCodeOK
NewGetDeviceCodeOK creates a GetDeviceCodeOK with default headers values
func (*GetDeviceCodeOK) Error ¶
func (o *GetDeviceCodeOK) Error() string
func (*GetDeviceCodeOK) GetPayload ¶
func (o *GetDeviceCodeOK) GetPayload() *models.GetDeviceCodeResponse
type GetDeviceCodeParams ¶
type GetDeviceCodeParams struct { /* ID. The unique identifier for the device code. */ ID string Context context.Context HTTPClient *http.Client // contains filtered or unexported fields }
GetDeviceCodeParams contains all the parameters to send to the API endpoint
for the get device code operation. Typically these are written to a http.Request.
func NewGetDeviceCodeParams ¶
func NewGetDeviceCodeParams() *GetDeviceCodeParams
NewGetDeviceCodeParams creates a new GetDeviceCodeParams 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 NewGetDeviceCodeParamsWithContext ¶
func NewGetDeviceCodeParamsWithContext(ctx context.Context) *GetDeviceCodeParams
NewGetDeviceCodeParamsWithContext creates a new GetDeviceCodeParams object with the ability to set a context for a request.
func NewGetDeviceCodeParamsWithHTTPClient ¶
func NewGetDeviceCodeParamsWithHTTPClient(client *http.Client) *GetDeviceCodeParams
NewGetDeviceCodeParamsWithHTTPClient creates a new GetDeviceCodeParams object with the ability to set a custom HTTPClient for a request.
func NewGetDeviceCodeParamsWithTimeout ¶
func NewGetDeviceCodeParamsWithTimeout(timeout time.Duration) *GetDeviceCodeParams
NewGetDeviceCodeParamsWithTimeout creates a new GetDeviceCodeParams object with the ability to set a timeout on a request.
func (*GetDeviceCodeParams) SetContext ¶
func (o *GetDeviceCodeParams) SetContext(ctx context.Context)
SetContext adds the context to the get device code params
func (*GetDeviceCodeParams) SetDefaults ¶
func (o *GetDeviceCodeParams) SetDefaults()
SetDefaults hydrates default values in the get device code params (not the query body).
All values with no default are reset to their zero value.
func (*GetDeviceCodeParams) SetHTTPClient ¶
func (o *GetDeviceCodeParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the get device code params
func (*GetDeviceCodeParams) SetID ¶
func (o *GetDeviceCodeParams) SetID(id string)
SetID adds the id to the get device code params
func (*GetDeviceCodeParams) SetTimeout ¶
func (o *GetDeviceCodeParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the get device code params
func (*GetDeviceCodeParams) WithContext ¶
func (o *GetDeviceCodeParams) WithContext(ctx context.Context) *GetDeviceCodeParams
WithContext adds the context to the get device code params
func (*GetDeviceCodeParams) WithDefaults ¶
func (o *GetDeviceCodeParams) WithDefaults() *GetDeviceCodeParams
WithDefaults hydrates default values in the get device code params (not the query body).
All values with no default are reset to their zero value.
func (*GetDeviceCodeParams) WithHTTPClient ¶
func (o *GetDeviceCodeParams) WithHTTPClient(client *http.Client) *GetDeviceCodeParams
WithHTTPClient adds the HTTPClient to the get device code params
func (*GetDeviceCodeParams) WithID ¶
func (o *GetDeviceCodeParams) WithID(id string) *GetDeviceCodeParams
WithID adds the id to the get device code params
func (*GetDeviceCodeParams) WithTimeout ¶
func (o *GetDeviceCodeParams) WithTimeout(timeout time.Duration) *GetDeviceCodeParams
WithTimeout adds the timeout to the get device code params
func (*GetDeviceCodeParams) WriteToRequest ¶
func (o *GetDeviceCodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type GetDeviceCodeReader ¶
type GetDeviceCodeReader struct {
// contains filtered or unexported fields
}
GetDeviceCodeReader is a Reader for the GetDeviceCode structure.
func (*GetDeviceCodeReader) ReadResponse ¶
func (o *GetDeviceCodeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.
type ListDeviceCodesOK ¶
type ListDeviceCodesOK struct {
Payload *models.ListDeviceCodesResponse
}
ListDeviceCodesOK describes a response with status code 200, with default header values.
Success
func NewListDeviceCodesOK ¶
func NewListDeviceCodesOK() *ListDeviceCodesOK
NewListDeviceCodesOK creates a ListDeviceCodesOK with default headers values
func (*ListDeviceCodesOK) Error ¶
func (o *ListDeviceCodesOK) Error() string
func (*ListDeviceCodesOK) GetPayload ¶
func (o *ListDeviceCodesOK) GetPayload() *models.ListDeviceCodesResponse
type ListDeviceCodesParams ¶
type ListDeviceCodesParams struct { /* 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 /* LocationID. If specified, only returns DeviceCodes of the specified location. Returns DeviceCodes of all locations if empty. */ LocationID *string /* ProductType. If specified, only returns DeviceCodes targeting the specified product type. Returns DeviceCodes of all product types if empty. */ ProductType *string /* Status. If specified, returns DeviceCodes with the specified statuses. Returns DeviceCodes of status `PAIRED` and `UNPAIRED` if empty. */ Status *string Context context.Context HTTPClient *http.Client // contains filtered or unexported fields }
ListDeviceCodesParams contains all the parameters to send to the API endpoint
for the list device codes operation. Typically these are written to a http.Request.
func NewListDeviceCodesParams ¶
func NewListDeviceCodesParams() *ListDeviceCodesParams
NewListDeviceCodesParams creates a new ListDeviceCodesParams 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 NewListDeviceCodesParamsWithContext ¶
func NewListDeviceCodesParamsWithContext(ctx context.Context) *ListDeviceCodesParams
NewListDeviceCodesParamsWithContext creates a new ListDeviceCodesParams object with the ability to set a context for a request.
func NewListDeviceCodesParamsWithHTTPClient ¶
func NewListDeviceCodesParamsWithHTTPClient(client *http.Client) *ListDeviceCodesParams
NewListDeviceCodesParamsWithHTTPClient creates a new ListDeviceCodesParams object with the ability to set a custom HTTPClient for a request.
func NewListDeviceCodesParamsWithTimeout ¶
func NewListDeviceCodesParamsWithTimeout(timeout time.Duration) *ListDeviceCodesParams
NewListDeviceCodesParamsWithTimeout creates a new ListDeviceCodesParams object with the ability to set a timeout on a request.
func (*ListDeviceCodesParams) SetContext ¶
func (o *ListDeviceCodesParams) SetContext(ctx context.Context)
SetContext adds the context to the list device codes params
func (*ListDeviceCodesParams) SetCursor ¶
func (o *ListDeviceCodesParams) SetCursor(cursor *string)
SetCursor adds the cursor to the list device codes params
func (*ListDeviceCodesParams) SetDefaults ¶
func (o *ListDeviceCodesParams) SetDefaults()
SetDefaults hydrates default values in the list device codes params (not the query body).
All values with no default are reset to their zero value.
func (*ListDeviceCodesParams) SetHTTPClient ¶
func (o *ListDeviceCodesParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the list device codes params
func (*ListDeviceCodesParams) SetLocationID ¶
func (o *ListDeviceCodesParams) SetLocationID(locationID *string)
SetLocationID adds the locationId to the list device codes params
func (*ListDeviceCodesParams) SetProductType ¶
func (o *ListDeviceCodesParams) SetProductType(productType *string)
SetProductType adds the productType to the list device codes params
func (*ListDeviceCodesParams) SetStatus ¶
func (o *ListDeviceCodesParams) SetStatus(status *string)
SetStatus adds the status to the list device codes params
func (*ListDeviceCodesParams) SetTimeout ¶
func (o *ListDeviceCodesParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the list device codes params
func (*ListDeviceCodesParams) WithContext ¶
func (o *ListDeviceCodesParams) WithContext(ctx context.Context) *ListDeviceCodesParams
WithContext adds the context to the list device codes params
func (*ListDeviceCodesParams) WithCursor ¶
func (o *ListDeviceCodesParams) WithCursor(cursor *string) *ListDeviceCodesParams
WithCursor adds the cursor to the list device codes params
func (*ListDeviceCodesParams) WithDefaults ¶
func (o *ListDeviceCodesParams) WithDefaults() *ListDeviceCodesParams
WithDefaults hydrates default values in the list device codes params (not the query body).
All values with no default are reset to their zero value.
func (*ListDeviceCodesParams) WithHTTPClient ¶
func (o *ListDeviceCodesParams) WithHTTPClient(client *http.Client) *ListDeviceCodesParams
WithHTTPClient adds the HTTPClient to the list device codes params
func (*ListDeviceCodesParams) WithLocationID ¶
func (o *ListDeviceCodesParams) WithLocationID(locationID *string) *ListDeviceCodesParams
WithLocationID adds the locationID to the list device codes params
func (*ListDeviceCodesParams) WithProductType ¶
func (o *ListDeviceCodesParams) WithProductType(productType *string) *ListDeviceCodesParams
WithProductType adds the productType to the list device codes params
func (*ListDeviceCodesParams) WithStatus ¶
func (o *ListDeviceCodesParams) WithStatus(status *string) *ListDeviceCodesParams
WithStatus adds the status to the list device codes params
func (*ListDeviceCodesParams) WithTimeout ¶
func (o *ListDeviceCodesParams) WithTimeout(timeout time.Duration) *ListDeviceCodesParams
WithTimeout adds the timeout to the list device codes params
func (*ListDeviceCodesParams) WriteToRequest ¶
func (o *ListDeviceCodesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type ListDeviceCodesReader ¶
type ListDeviceCodesReader struct {
// contains filtered or unexported fields
}
ListDeviceCodesReader is a Reader for the ListDeviceCodes structure.
func (*ListDeviceCodesReader) ReadResponse ¶
func (o *ListDeviceCodesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.