basket

package
v0.0.0-...-0ebfa01 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2024 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CancelBasketDefault

type CancelBasketDefault struct {
	Payload *models.RPCStatus
	// contains filtered or unexported fields
}
CancelBasketDefault describes a response with status code -1, with default header values.

An unexpected error response.

func NewCancelBasketDefault

func NewCancelBasketDefault(code int) *CancelBasketDefault

NewCancelBasketDefault creates a CancelBasketDefault with default headers values

func (*CancelBasketDefault) Code

func (o *CancelBasketDefault) Code() int

Code gets the status code for the cancel basket default response

func (*CancelBasketDefault) Error

func (o *CancelBasketDefault) Error() string

func (*CancelBasketDefault) GetPayload

func (o *CancelBasketDefault) GetPayload() *models.RPCStatus

type CancelBasketOK

type CancelBasketOK struct {
	Payload models.BasketspbCancelBasketResponse
}
CancelBasketOK describes a response with status code 200, with default header values.

A successful response.

func NewCancelBasketOK

func NewCancelBasketOK() *CancelBasketOK

NewCancelBasketOK creates a CancelBasketOK with default headers values

func (*CancelBasketOK) Error

func (o *CancelBasketOK) Error() string

func (*CancelBasketOK) GetPayload

type CancelBasketParams

type CancelBasketParams struct {

	// ID.
	ID string

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

CancelBasketParams contains all the parameters to send to the API endpoint

for the cancel basket operation.

Typically these are written to a http.Request.

func NewCancelBasketParams

func NewCancelBasketParams() *CancelBasketParams

NewCancelBasketParams creates a new CancelBasketParams 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 NewCancelBasketParamsWithContext

func NewCancelBasketParamsWithContext(ctx context.Context) *CancelBasketParams

NewCancelBasketParamsWithContext creates a new CancelBasketParams object with the ability to set a context for a request.

func NewCancelBasketParamsWithHTTPClient

func NewCancelBasketParamsWithHTTPClient(client *http.Client) *CancelBasketParams

NewCancelBasketParamsWithHTTPClient creates a new CancelBasketParams object with the ability to set a custom HTTPClient for a request.

func NewCancelBasketParamsWithTimeout

func NewCancelBasketParamsWithTimeout(timeout time.Duration) *CancelBasketParams

NewCancelBasketParamsWithTimeout creates a new CancelBasketParams object with the ability to set a timeout on a request.

func (*CancelBasketParams) SetContext

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

SetContext adds the context to the cancel basket params

func (*CancelBasketParams) SetDefaults

func (o *CancelBasketParams) SetDefaults()

SetDefaults hydrates default values in the cancel basket params (not the query body).

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

func (*CancelBasketParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the cancel basket params

func (*CancelBasketParams) SetID

func (o *CancelBasketParams) SetID(id string)

SetID adds the id to the cancel basket params

func (*CancelBasketParams) SetTimeout

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

SetTimeout adds the timeout to the cancel basket params

func (*CancelBasketParams) WithContext

WithContext adds the context to the cancel basket params

func (*CancelBasketParams) WithDefaults

func (o *CancelBasketParams) WithDefaults() *CancelBasketParams

WithDefaults hydrates default values in the cancel basket params (not the query body).

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

func (*CancelBasketParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the cancel basket params

func (*CancelBasketParams) WithID

WithID adds the id to the cancel basket params

func (*CancelBasketParams) WithTimeout

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

WithTimeout adds the timeout to the cancel basket params

func (*CancelBasketParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type CancelBasketReader

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

CancelBasketReader is a Reader for the CancelBasket structure.

func (*CancelBasketReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type CheckoutBasketDefault

type CheckoutBasketDefault struct {
	Payload *models.RPCStatus
	// contains filtered or unexported fields
}
CheckoutBasketDefault describes a response with status code -1, with default header values.

An unexpected error response.

func NewCheckoutBasketDefault

func NewCheckoutBasketDefault(code int) *CheckoutBasketDefault

NewCheckoutBasketDefault creates a CheckoutBasketDefault with default headers values

func (*CheckoutBasketDefault) Code

func (o *CheckoutBasketDefault) Code() int

Code gets the status code for the checkout basket default response

func (*CheckoutBasketDefault) Error

func (o *CheckoutBasketDefault) Error() string

func (*CheckoutBasketDefault) GetPayload

func (o *CheckoutBasketDefault) GetPayload() *models.RPCStatus

type CheckoutBasketOK

type CheckoutBasketOK struct {
	Payload models.BasketspbCheckoutBasketResponse
}
CheckoutBasketOK describes a response with status code 200, with default header values.

A successful response.

func NewCheckoutBasketOK

func NewCheckoutBasketOK() *CheckoutBasketOK

NewCheckoutBasketOK creates a CheckoutBasketOK with default headers values

func (*CheckoutBasketOK) Error

func (o *CheckoutBasketOK) Error() string

func (*CheckoutBasketOK) GetPayload

type CheckoutBasketParams

type CheckoutBasketParams struct {

	// Body.
	Body *models.CheckoutBasketParamsBody

	// ID.
	ID string

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

CheckoutBasketParams contains all the parameters to send to the API endpoint

for the checkout basket operation.

Typically these are written to a http.Request.

func NewCheckoutBasketParams

func NewCheckoutBasketParams() *CheckoutBasketParams

NewCheckoutBasketParams creates a new CheckoutBasketParams 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 NewCheckoutBasketParamsWithContext

func NewCheckoutBasketParamsWithContext(ctx context.Context) *CheckoutBasketParams

NewCheckoutBasketParamsWithContext creates a new CheckoutBasketParams object with the ability to set a context for a request.

func NewCheckoutBasketParamsWithHTTPClient

func NewCheckoutBasketParamsWithHTTPClient(client *http.Client) *CheckoutBasketParams

NewCheckoutBasketParamsWithHTTPClient creates a new CheckoutBasketParams object with the ability to set a custom HTTPClient for a request.

func NewCheckoutBasketParamsWithTimeout

func NewCheckoutBasketParamsWithTimeout(timeout time.Duration) *CheckoutBasketParams

NewCheckoutBasketParamsWithTimeout creates a new CheckoutBasketParams object with the ability to set a timeout on a request.

func (*CheckoutBasketParams) SetBody

SetBody adds the body to the checkout basket params

func (*CheckoutBasketParams) SetContext

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

SetContext adds the context to the checkout basket params

func (*CheckoutBasketParams) SetDefaults

func (o *CheckoutBasketParams) SetDefaults()

SetDefaults hydrates default values in the checkout basket params (not the query body).

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

func (*CheckoutBasketParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the checkout basket params

func (*CheckoutBasketParams) SetID

func (o *CheckoutBasketParams) SetID(id string)

SetID adds the id to the checkout basket params

func (*CheckoutBasketParams) SetTimeout

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

SetTimeout adds the timeout to the checkout basket params

func (*CheckoutBasketParams) WithBody

WithBody adds the body to the checkout basket params

func (*CheckoutBasketParams) WithContext

WithContext adds the context to the checkout basket params

func (*CheckoutBasketParams) WithDefaults

func (o *CheckoutBasketParams) WithDefaults() *CheckoutBasketParams

WithDefaults hydrates default values in the checkout basket params (not the query body).

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

func (*CheckoutBasketParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the checkout basket params

func (*CheckoutBasketParams) WithID

WithID adds the id to the checkout basket params

func (*CheckoutBasketParams) WithTimeout

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

WithTimeout adds the timeout to the checkout basket params

func (*CheckoutBasketParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type CheckoutBasketReader

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

CheckoutBasketReader is a Reader for the CheckoutBasket structure.

func (*CheckoutBasketReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type Client

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

Client for basket API

func (*Client) CancelBasket

func (a *Client) CancelBasket(params *CancelBasketParams, opts ...ClientOption) (*CancelBasketOK, error)

CancelBasket cancels a shopping basket

func (*Client) CheckoutBasket

func (a *Client) CheckoutBasket(params *CheckoutBasketParams, opts ...ClientOption) (*CheckoutBasketOK, error)

CheckoutBasket checkouts with a shopping basket

func (*Client) GetBasket

func (a *Client) GetBasket(params *GetBasketParams, opts ...ClientOption) (*GetBasketOK, error)

GetBasket gets a basket

func (*Client) SetTransport

func (a *Client) SetTransport(transport runtime.ClientTransport)

SetTransport changes the transport on the client

func (*Client) StartBasket

func (a *Client) StartBasket(params *StartBasketParams, opts ...ClientOption) (*StartBasketOK, error)

StartBasket starts a new shopping basket

type ClientOption

type ClientOption func(*runtime.ClientOperation)

ClientOption is the option for Client methods

type ClientService

type ClientService interface {
	CancelBasket(params *CancelBasketParams, opts ...ClientOption) (*CancelBasketOK, error)

	CheckoutBasket(params *CheckoutBasketParams, opts ...ClientOption) (*CheckoutBasketOK, error)

	GetBasket(params *GetBasketParams, opts ...ClientOption) (*GetBasketOK, error)

	StartBasket(params *StartBasketParams, opts ...ClientOption) (*StartBasketOK, 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 basket API client.

type GetBasketDefault

type GetBasketDefault struct {
	Payload *models.RPCStatus
	// contains filtered or unexported fields
}
GetBasketDefault describes a response with status code -1, with default header values.

An unexpected error response.

func NewGetBasketDefault

func NewGetBasketDefault(code int) *GetBasketDefault

NewGetBasketDefault creates a GetBasketDefault with default headers values

func (*GetBasketDefault) Code

func (o *GetBasketDefault) Code() int

Code gets the status code for the get basket default response

func (*GetBasketDefault) Error

func (o *GetBasketDefault) Error() string

func (*GetBasketDefault) GetPayload

func (o *GetBasketDefault) GetPayload() *models.RPCStatus

type GetBasketOK

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

A successful response.

func NewGetBasketOK

func NewGetBasketOK() *GetBasketOK

NewGetBasketOK creates a GetBasketOK with default headers values

func (*GetBasketOK) Error

func (o *GetBasketOK) Error() string

func (*GetBasketOK) GetPayload

type GetBasketParams

type GetBasketParams struct {

	// ID.
	ID string

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

GetBasketParams contains all the parameters to send to the API endpoint

for the get basket operation.

Typically these are written to a http.Request.

func NewGetBasketParams

func NewGetBasketParams() *GetBasketParams

NewGetBasketParams creates a new GetBasketParams 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 NewGetBasketParamsWithContext

func NewGetBasketParamsWithContext(ctx context.Context) *GetBasketParams

NewGetBasketParamsWithContext creates a new GetBasketParams object with the ability to set a context for a request.

func NewGetBasketParamsWithHTTPClient

func NewGetBasketParamsWithHTTPClient(client *http.Client) *GetBasketParams

NewGetBasketParamsWithHTTPClient creates a new GetBasketParams object with the ability to set a custom HTTPClient for a request.

func NewGetBasketParamsWithTimeout

func NewGetBasketParamsWithTimeout(timeout time.Duration) *GetBasketParams

NewGetBasketParamsWithTimeout creates a new GetBasketParams object with the ability to set a timeout on a request.

func (*GetBasketParams) SetContext

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

SetContext adds the context to the get basket params

func (*GetBasketParams) SetDefaults

func (o *GetBasketParams) SetDefaults()

SetDefaults hydrates default values in the get basket params (not the query body).

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

func (*GetBasketParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get basket params

func (*GetBasketParams) SetID

func (o *GetBasketParams) SetID(id string)

SetID adds the id to the get basket params

func (*GetBasketParams) SetTimeout

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

SetTimeout adds the timeout to the get basket params

func (*GetBasketParams) WithContext

func (o *GetBasketParams) WithContext(ctx context.Context) *GetBasketParams

WithContext adds the context to the get basket params

func (*GetBasketParams) WithDefaults

func (o *GetBasketParams) WithDefaults() *GetBasketParams

WithDefaults hydrates default values in the get basket params (not the query body).

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

func (*GetBasketParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get basket params

func (*GetBasketParams) WithID

func (o *GetBasketParams) WithID(id string) *GetBasketParams

WithID adds the id to the get basket params

func (*GetBasketParams) WithTimeout

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

WithTimeout adds the timeout to the get basket params

func (*GetBasketParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type GetBasketReader

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

GetBasketReader is a Reader for the GetBasket structure.

func (*GetBasketReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type StartBasketDefault

type StartBasketDefault struct {
	Payload *models.RPCStatus
	// contains filtered or unexported fields
}
StartBasketDefault describes a response with status code -1, with default header values.

An unexpected error response.

func NewStartBasketDefault

func NewStartBasketDefault(code int) *StartBasketDefault

NewStartBasketDefault creates a StartBasketDefault with default headers values

func (*StartBasketDefault) Code

func (o *StartBasketDefault) Code() int

Code gets the status code for the start basket default response

func (*StartBasketDefault) Error

func (o *StartBasketDefault) Error() string

func (*StartBasketDefault) GetPayload

func (o *StartBasketDefault) GetPayload() *models.RPCStatus

type StartBasketOK

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

A successful response.

func NewStartBasketOK

func NewStartBasketOK() *StartBasketOK

NewStartBasketOK creates a StartBasketOK with default headers values

func (*StartBasketOK) Error

func (o *StartBasketOK) Error() string

func (*StartBasketOK) GetPayload

type StartBasketParams

type StartBasketParams struct {

	// Body.
	Body *models.BasketspbStartBasketRequest

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

StartBasketParams contains all the parameters to send to the API endpoint

for the start basket operation.

Typically these are written to a http.Request.

func NewStartBasketParams

func NewStartBasketParams() *StartBasketParams

NewStartBasketParams creates a new StartBasketParams 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 NewStartBasketParamsWithContext

func NewStartBasketParamsWithContext(ctx context.Context) *StartBasketParams

NewStartBasketParamsWithContext creates a new StartBasketParams object with the ability to set a context for a request.

func NewStartBasketParamsWithHTTPClient

func NewStartBasketParamsWithHTTPClient(client *http.Client) *StartBasketParams

NewStartBasketParamsWithHTTPClient creates a new StartBasketParams object with the ability to set a custom HTTPClient for a request.

func NewStartBasketParamsWithTimeout

func NewStartBasketParamsWithTimeout(timeout time.Duration) *StartBasketParams

NewStartBasketParamsWithTimeout creates a new StartBasketParams object with the ability to set a timeout on a request.

func (*StartBasketParams) SetBody

SetBody adds the body to the start basket params

func (*StartBasketParams) SetContext

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

SetContext adds the context to the start basket params

func (*StartBasketParams) SetDefaults

func (o *StartBasketParams) SetDefaults()

SetDefaults hydrates default values in the start basket params (not the query body).

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

func (*StartBasketParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the start basket params

func (*StartBasketParams) SetTimeout

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

SetTimeout adds the timeout to the start basket params

func (*StartBasketParams) WithBody

WithBody adds the body to the start basket params

func (*StartBasketParams) WithContext

func (o *StartBasketParams) WithContext(ctx context.Context) *StartBasketParams

WithContext adds the context to the start basket params

func (*StartBasketParams) WithDefaults

func (o *StartBasketParams) WithDefaults() *StartBasketParams

WithDefaults hydrates default values in the start basket params (not the query body).

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

func (*StartBasketParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the start basket params

func (*StartBasketParams) WithTimeout

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

WithTimeout adds the timeout to the start basket params

func (*StartBasketParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type StartBasketReader

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

StartBasketReader is a Reader for the StartBasket structure.

func (*StartBasketReader) ReadResponse

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