Documentation ¶
Index ¶
- type Client
- type ClientOption
- type ClientService
- type CreateMobileAuthorizationCodeOK
- type CreateMobileAuthorizationCodeParams
- func NewCreateMobileAuthorizationCodeParams() *CreateMobileAuthorizationCodeParams
- func NewCreateMobileAuthorizationCodeParamsWithContext(ctx context.Context) *CreateMobileAuthorizationCodeParams
- func NewCreateMobileAuthorizationCodeParamsWithHTTPClient(client *http.Client) *CreateMobileAuthorizationCodeParams
- func NewCreateMobileAuthorizationCodeParamsWithTimeout(timeout time.Duration) *CreateMobileAuthorizationCodeParams
- func (o *CreateMobileAuthorizationCodeParams) SetBody(body *models.CreateMobileAuthorizationCodeRequest)
- func (o *CreateMobileAuthorizationCodeParams) SetContext(ctx context.Context)
- func (o *CreateMobileAuthorizationCodeParams) SetDefaults()
- func (o *CreateMobileAuthorizationCodeParams) SetHTTPClient(client *http.Client)
- func (o *CreateMobileAuthorizationCodeParams) SetTimeout(timeout time.Duration)
- func (o *CreateMobileAuthorizationCodeParams) WithBody(body *models.CreateMobileAuthorizationCodeRequest) *CreateMobileAuthorizationCodeParams
- func (o *CreateMobileAuthorizationCodeParams) WithContext(ctx context.Context) *CreateMobileAuthorizationCodeParams
- func (o *CreateMobileAuthorizationCodeParams) WithDefaults() *CreateMobileAuthorizationCodeParams
- func (o *CreateMobileAuthorizationCodeParams) WithHTTPClient(client *http.Client) *CreateMobileAuthorizationCodeParams
- func (o *CreateMobileAuthorizationCodeParams) WithTimeout(timeout time.Duration) *CreateMobileAuthorizationCodeParams
- func (o *CreateMobileAuthorizationCodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type CreateMobileAuthorizationCodeReader
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 mobile authorization API
func (*Client) CreateMobileAuthorizationCode ¶
func (a *Client) CreateMobileAuthorizationCode(params *CreateMobileAuthorizationCodeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateMobileAuthorizationCodeOK, error)
CreateMobileAuthorizationCode creates mobile authorization code Generates code to authorize a mobile application to connect to a Square card reader
Authorization codes are one-time-use and expire __60 minutes__ after being issued.
__Important:__ The `Authorization` header you provide to this endpoint must have the following format:
``` Authorization: Bearer ACCESS_TOKEN ```
Replace `ACCESS_TOKEN` with a [valid production authorization credential](/docs/build-basics/access-tokens).
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 { CreateMobileAuthorizationCode(params *CreateMobileAuthorizationCodeParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateMobileAuthorizationCodeOK, 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 mobile authorization API client.
type CreateMobileAuthorizationCodeOK ¶
type CreateMobileAuthorizationCodeOK struct {
Payload *models.CreateMobileAuthorizationCodeResponse
}
CreateMobileAuthorizationCodeOK describes a response with status code 200, with default header values.
Success
func NewCreateMobileAuthorizationCodeOK ¶
func NewCreateMobileAuthorizationCodeOK() *CreateMobileAuthorizationCodeOK
NewCreateMobileAuthorizationCodeOK creates a CreateMobileAuthorizationCodeOK with default headers values
func (*CreateMobileAuthorizationCodeOK) Error ¶
func (o *CreateMobileAuthorizationCodeOK) Error() string
func (*CreateMobileAuthorizationCodeOK) GetPayload ¶
func (o *CreateMobileAuthorizationCodeOK) GetPayload() *models.CreateMobileAuthorizationCodeResponse
type CreateMobileAuthorizationCodeParams ¶
type CreateMobileAuthorizationCodeParams struct { /* Body. An object containing the fields to POST for the request. See the corresponding object definition for field details. */ Body *models.CreateMobileAuthorizationCodeRequest Context context.Context HTTPClient *http.Client // contains filtered or unexported fields }
CreateMobileAuthorizationCodeParams contains all the parameters to send to the API endpoint
for the create mobile authorization code operation. Typically these are written to a http.Request.
func NewCreateMobileAuthorizationCodeParams ¶
func NewCreateMobileAuthorizationCodeParams() *CreateMobileAuthorizationCodeParams
NewCreateMobileAuthorizationCodeParams creates a new CreateMobileAuthorizationCodeParams 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 NewCreateMobileAuthorizationCodeParamsWithContext ¶
func NewCreateMobileAuthorizationCodeParamsWithContext(ctx context.Context) *CreateMobileAuthorizationCodeParams
NewCreateMobileAuthorizationCodeParamsWithContext creates a new CreateMobileAuthorizationCodeParams object with the ability to set a context for a request.
func NewCreateMobileAuthorizationCodeParamsWithHTTPClient ¶
func NewCreateMobileAuthorizationCodeParamsWithHTTPClient(client *http.Client) *CreateMobileAuthorizationCodeParams
NewCreateMobileAuthorizationCodeParamsWithHTTPClient creates a new CreateMobileAuthorizationCodeParams object with the ability to set a custom HTTPClient for a request.
func NewCreateMobileAuthorizationCodeParamsWithTimeout ¶
func NewCreateMobileAuthorizationCodeParamsWithTimeout(timeout time.Duration) *CreateMobileAuthorizationCodeParams
NewCreateMobileAuthorizationCodeParamsWithTimeout creates a new CreateMobileAuthorizationCodeParams object with the ability to set a timeout on a request.
func (*CreateMobileAuthorizationCodeParams) SetBody ¶
func (o *CreateMobileAuthorizationCodeParams) SetBody(body *models.CreateMobileAuthorizationCodeRequest)
SetBody adds the body to the create mobile authorization code params
func (*CreateMobileAuthorizationCodeParams) SetContext ¶
func (o *CreateMobileAuthorizationCodeParams) SetContext(ctx context.Context)
SetContext adds the context to the create mobile authorization code params
func (*CreateMobileAuthorizationCodeParams) SetDefaults ¶
func (o *CreateMobileAuthorizationCodeParams) SetDefaults()
SetDefaults hydrates default values in the create mobile authorization code params (not the query body).
All values with no default are reset to their zero value.
func (*CreateMobileAuthorizationCodeParams) SetHTTPClient ¶
func (o *CreateMobileAuthorizationCodeParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the create mobile authorization code params
func (*CreateMobileAuthorizationCodeParams) SetTimeout ¶
func (o *CreateMobileAuthorizationCodeParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the create mobile authorization code params
func (*CreateMobileAuthorizationCodeParams) WithBody ¶
func (o *CreateMobileAuthorizationCodeParams) WithBody(body *models.CreateMobileAuthorizationCodeRequest) *CreateMobileAuthorizationCodeParams
WithBody adds the body to the create mobile authorization code params
func (*CreateMobileAuthorizationCodeParams) WithContext ¶
func (o *CreateMobileAuthorizationCodeParams) WithContext(ctx context.Context) *CreateMobileAuthorizationCodeParams
WithContext adds the context to the create mobile authorization code params
func (*CreateMobileAuthorizationCodeParams) WithDefaults ¶
func (o *CreateMobileAuthorizationCodeParams) WithDefaults() *CreateMobileAuthorizationCodeParams
WithDefaults hydrates default values in the create mobile authorization code params (not the query body).
All values with no default are reset to their zero value.
func (*CreateMobileAuthorizationCodeParams) WithHTTPClient ¶
func (o *CreateMobileAuthorizationCodeParams) WithHTTPClient(client *http.Client) *CreateMobileAuthorizationCodeParams
WithHTTPClient adds the HTTPClient to the create mobile authorization code params
func (*CreateMobileAuthorizationCodeParams) WithTimeout ¶
func (o *CreateMobileAuthorizationCodeParams) WithTimeout(timeout time.Duration) *CreateMobileAuthorizationCodeParams
WithTimeout adds the timeout to the create mobile authorization code params
func (*CreateMobileAuthorizationCodeParams) WriteToRequest ¶
func (o *CreateMobileAuthorizationCodeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type CreateMobileAuthorizationCodeReader ¶
type CreateMobileAuthorizationCodeReader struct {
// contains filtered or unexported fields
}
CreateMobileAuthorizationCodeReader is a Reader for the CreateMobileAuthorizationCode structure.
func (*CreateMobileAuthorizationCodeReader) ReadResponse ¶
func (o *CreateMobileAuthorizationCodeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.