merchants

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: 11 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 merchants API

func (*Client) ListMerchants

func (a *Client) ListMerchants(params *ListMerchantsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListMerchantsOK, error)
ListMerchants lists merchants

Returns `Merchant` information for a given access token.

If you don't know a `Merchant` ID, you can use this endpoint to retrieve the merchant ID for an access token. You can specify your personal access token to get your own merchant information or specify an OAuth token to get the information for the merchant that granted you access.

If you know the merchant ID, you can also use the [RetrieveMerchant](#endpoint-merchants-retrievemerchant) endpoint to get the merchant information.

func (*Client) RetrieveMerchant

func (a *Client) RetrieveMerchant(params *RetrieveMerchantParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RetrieveMerchantOK, error)

RetrieveMerchant retrieves merchant

Retrieve a `Merchant` object for the given `merchant_id`.

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 {
	ListMerchants(params *ListMerchantsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListMerchantsOK, error)

	RetrieveMerchant(params *RetrieveMerchantParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RetrieveMerchantOK, 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 merchants API client.

type ListMerchantsOK

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

Success

func NewListMerchantsOK

func NewListMerchantsOK() *ListMerchantsOK

NewListMerchantsOK creates a ListMerchantsOK with default headers values

func (*ListMerchantsOK) Error

func (o *ListMerchantsOK) Error() string

func (*ListMerchantsOK) GetPayload

func (o *ListMerchantsOK) GetPayload() *models.ListMerchantsResponse

type ListMerchantsParams

type ListMerchantsParams struct {

	/* Cursor.

	   The cursor generated by the previous response.
	*/
	Cursor *int64

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

ListMerchantsParams contains all the parameters to send to the API endpoint

for the list merchants operation.

Typically these are written to a http.Request.

func NewListMerchantsParams

func NewListMerchantsParams() *ListMerchantsParams

NewListMerchantsParams creates a new ListMerchantsParams 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 NewListMerchantsParamsWithContext

func NewListMerchantsParamsWithContext(ctx context.Context) *ListMerchantsParams

NewListMerchantsParamsWithContext creates a new ListMerchantsParams object with the ability to set a context for a request.

func NewListMerchantsParamsWithHTTPClient

func NewListMerchantsParamsWithHTTPClient(client *http.Client) *ListMerchantsParams

NewListMerchantsParamsWithHTTPClient creates a new ListMerchantsParams object with the ability to set a custom HTTPClient for a request.

func NewListMerchantsParamsWithTimeout

func NewListMerchantsParamsWithTimeout(timeout time.Duration) *ListMerchantsParams

NewListMerchantsParamsWithTimeout creates a new ListMerchantsParams object with the ability to set a timeout on a request.

func (*ListMerchantsParams) SetContext

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

SetContext adds the context to the list merchants params

func (*ListMerchantsParams) SetCursor

func (o *ListMerchantsParams) SetCursor(cursor *int64)

SetCursor adds the cursor to the list merchants params

func (*ListMerchantsParams) SetDefaults

func (o *ListMerchantsParams) SetDefaults()

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

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

func (*ListMerchantsParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the list merchants params

func (*ListMerchantsParams) SetTimeout

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

SetTimeout adds the timeout to the list merchants params

func (*ListMerchantsParams) WithContext

WithContext adds the context to the list merchants params

func (*ListMerchantsParams) WithCursor

func (o *ListMerchantsParams) WithCursor(cursor *int64) *ListMerchantsParams

WithCursor adds the cursor to the list merchants params

func (*ListMerchantsParams) WithDefaults

func (o *ListMerchantsParams) WithDefaults() *ListMerchantsParams

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

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

func (*ListMerchantsParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the list merchants params

func (*ListMerchantsParams) WithTimeout

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

WithTimeout adds the timeout to the list merchants params

func (*ListMerchantsParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type ListMerchantsReader

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

ListMerchantsReader is a Reader for the ListMerchants structure.

func (*ListMerchantsReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type RetrieveMerchantOK

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

Success

func NewRetrieveMerchantOK

func NewRetrieveMerchantOK() *RetrieveMerchantOK

NewRetrieveMerchantOK creates a RetrieveMerchantOK with default headers values

func (*RetrieveMerchantOK) Error

func (o *RetrieveMerchantOK) Error() string

func (*RetrieveMerchantOK) GetPayload

type RetrieveMerchantParams

type RetrieveMerchantParams struct {

	/* MerchantID.

	     The ID of the merchant to retrieve. If the string "me" is supplied as the ID,
	then retrieve the merchant that is currently accessible to this call.
	*/
	MerchantID string

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

RetrieveMerchantParams contains all the parameters to send to the API endpoint

for the retrieve merchant operation.

Typically these are written to a http.Request.

func NewRetrieveMerchantParams

func NewRetrieveMerchantParams() *RetrieveMerchantParams

NewRetrieveMerchantParams creates a new RetrieveMerchantParams 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 NewRetrieveMerchantParamsWithContext

func NewRetrieveMerchantParamsWithContext(ctx context.Context) *RetrieveMerchantParams

NewRetrieveMerchantParamsWithContext creates a new RetrieveMerchantParams object with the ability to set a context for a request.

func NewRetrieveMerchantParamsWithHTTPClient

func NewRetrieveMerchantParamsWithHTTPClient(client *http.Client) *RetrieveMerchantParams

NewRetrieveMerchantParamsWithHTTPClient creates a new RetrieveMerchantParams object with the ability to set a custom HTTPClient for a request.

func NewRetrieveMerchantParamsWithTimeout

func NewRetrieveMerchantParamsWithTimeout(timeout time.Duration) *RetrieveMerchantParams

NewRetrieveMerchantParamsWithTimeout creates a new RetrieveMerchantParams object with the ability to set a timeout on a request.

func (*RetrieveMerchantParams) SetContext

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

SetContext adds the context to the retrieve merchant params

func (*RetrieveMerchantParams) SetDefaults

func (o *RetrieveMerchantParams) SetDefaults()

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

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

func (*RetrieveMerchantParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the retrieve merchant params

func (*RetrieveMerchantParams) SetMerchantID

func (o *RetrieveMerchantParams) SetMerchantID(merchantID string)

SetMerchantID adds the merchantId to the retrieve merchant params

func (*RetrieveMerchantParams) SetTimeout

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

SetTimeout adds the timeout to the retrieve merchant params

func (*RetrieveMerchantParams) WithContext

WithContext adds the context to the retrieve merchant params

func (*RetrieveMerchantParams) WithDefaults

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

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

func (*RetrieveMerchantParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the retrieve merchant params

func (*RetrieveMerchantParams) WithMerchantID

func (o *RetrieveMerchantParams) WithMerchantID(merchantID string) *RetrieveMerchantParams

WithMerchantID adds the merchantID to the retrieve merchant params

func (*RetrieveMerchantParams) WithTimeout

WithTimeout adds the timeout to the retrieve merchant params

func (*RetrieveMerchantParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type RetrieveMerchantReader

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

RetrieveMerchantReader is a Reader for the RetrieveMerchant structure.

func (*RetrieveMerchantReader) ReadResponse

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