mobile_authorization

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 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 (*CreateMobileAuthorizationCodeOK) GetPayload

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

SetBody adds the body to the create mobile authorization code params

func (*CreateMobileAuthorizationCodeParams) SetContext

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

WithBody adds the body to the create mobile authorization code params

func (*CreateMobileAuthorizationCodeParams) WithContext

WithContext adds the context to the create mobile authorization code params

func (*CreateMobileAuthorizationCodeParams) WithDefaults

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

WithHTTPClient adds the HTTPClient to the create mobile authorization code params

func (*CreateMobileAuthorizationCodeParams) WithTimeout

WithTimeout adds the timeout to the create mobile authorization code params

func (*CreateMobileAuthorizationCodeParams) WriteToRequest

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL