invoice

package
v0.0.0-...-76fafce Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 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 invoice API

func (*Client) PayInvoice

func (a *Client) PayInvoice(params *PayInvoiceParams, opts ...ClientOption) (*PayInvoiceOK, error)

PayInvoice pays an invoice

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 {
	PayInvoice(params *PayInvoiceParams, opts ...ClientOption) (*PayInvoiceOK, 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 invoice API client.

type PayInvoiceDefault

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

An unexpected error response.

func NewPayInvoiceDefault

func NewPayInvoiceDefault(code int) *PayInvoiceDefault

NewPayInvoiceDefault creates a PayInvoiceDefault with default headers values

func (*PayInvoiceDefault) Code

func (o *PayInvoiceDefault) Code() int

Code gets the status code for the pay invoice default response

func (*PayInvoiceDefault) Error

func (o *PayInvoiceDefault) Error() string

func (*PayInvoiceDefault) GetPayload

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

func (*PayInvoiceDefault) IsClientError

func (o *PayInvoiceDefault) IsClientError() bool

IsClientError returns true when this pay invoice default response has a 4xx status code

func (*PayInvoiceDefault) IsCode

func (o *PayInvoiceDefault) IsCode(code int) bool

IsCode returns true when this pay invoice default response a status code equal to that given

func (*PayInvoiceDefault) IsRedirect

func (o *PayInvoiceDefault) IsRedirect() bool

IsRedirect returns true when this pay invoice default response has a 3xx status code

func (*PayInvoiceDefault) IsServerError

func (o *PayInvoiceDefault) IsServerError() bool

IsServerError returns true when this pay invoice default response has a 5xx status code

func (*PayInvoiceDefault) IsSuccess

func (o *PayInvoiceDefault) IsSuccess() bool

IsSuccess returns true when this pay invoice default response has a 2xx status code

func (*PayInvoiceDefault) String

func (o *PayInvoiceDefault) String() string

type PayInvoiceOK

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

A successful response.

func NewPayInvoiceOK

func NewPayInvoiceOK() *PayInvoiceOK

NewPayInvoiceOK creates a PayInvoiceOK with default headers values

func (*PayInvoiceOK) Error

func (o *PayInvoiceOK) Error() string

func (*PayInvoiceOK) GetPayload

func (*PayInvoiceOK) IsClientError

func (o *PayInvoiceOK) IsClientError() bool

IsClientError returns true when this pay invoice o k response has a 4xx status code

func (*PayInvoiceOK) IsCode

func (o *PayInvoiceOK) IsCode(code int) bool

IsCode returns true when this pay invoice o k response a status code equal to that given

func (*PayInvoiceOK) IsRedirect

func (o *PayInvoiceOK) IsRedirect() bool

IsRedirect returns true when this pay invoice o k response has a 3xx status code

func (*PayInvoiceOK) IsServerError

func (o *PayInvoiceOK) IsServerError() bool

IsServerError returns true when this pay invoice o k response has a 5xx status code

func (*PayInvoiceOK) IsSuccess

func (o *PayInvoiceOK) IsSuccess() bool

IsSuccess returns true when this pay invoice o k response has a 2xx status code

func (*PayInvoiceOK) String

func (o *PayInvoiceOK) String() string

type PayInvoiceParams

type PayInvoiceParams struct {

	// Body.
	Body interface{}

	// ID.
	ID string

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

PayInvoiceParams contains all the parameters to send to the API endpoint

for the pay invoice operation.

Typically these are written to a http.Request.

func NewPayInvoiceParams

func NewPayInvoiceParams() *PayInvoiceParams

NewPayInvoiceParams creates a new PayInvoiceParams 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 NewPayInvoiceParamsWithContext

func NewPayInvoiceParamsWithContext(ctx context.Context) *PayInvoiceParams

NewPayInvoiceParamsWithContext creates a new PayInvoiceParams object with the ability to set a context for a request.

func NewPayInvoiceParamsWithHTTPClient

func NewPayInvoiceParamsWithHTTPClient(client *http.Client) *PayInvoiceParams

NewPayInvoiceParamsWithHTTPClient creates a new PayInvoiceParams object with the ability to set a custom HTTPClient for a request.

func NewPayInvoiceParamsWithTimeout

func NewPayInvoiceParamsWithTimeout(timeout time.Duration) *PayInvoiceParams

NewPayInvoiceParamsWithTimeout creates a new PayInvoiceParams object with the ability to set a timeout on a request.

func (*PayInvoiceParams) SetBody

func (o *PayInvoiceParams) SetBody(body interface{})

SetBody adds the body to the pay invoice params

func (*PayInvoiceParams) SetContext

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

SetContext adds the context to the pay invoice params

func (*PayInvoiceParams) SetDefaults

func (o *PayInvoiceParams) SetDefaults()

SetDefaults hydrates default values in the pay invoice params (not the query body).

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

func (*PayInvoiceParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the pay invoice params

func (*PayInvoiceParams) SetID

func (o *PayInvoiceParams) SetID(id string)

SetID adds the id to the pay invoice params

func (*PayInvoiceParams) SetTimeout

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

SetTimeout adds the timeout to the pay invoice params

func (*PayInvoiceParams) WithBody

func (o *PayInvoiceParams) WithBody(body interface{}) *PayInvoiceParams

WithBody adds the body to the pay invoice params

func (*PayInvoiceParams) WithContext

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

WithContext adds the context to the pay invoice params

func (*PayInvoiceParams) WithDefaults

func (o *PayInvoiceParams) WithDefaults() *PayInvoiceParams

WithDefaults hydrates default values in the pay invoice params (not the query body).

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

func (*PayInvoiceParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the pay invoice params

func (*PayInvoiceParams) WithID

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

WithID adds the id to the pay invoice params

func (*PayInvoiceParams) WithTimeout

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

WithTimeout adds the timeout to the pay invoice params

func (*PayInvoiceParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type PayInvoiceReader

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

PayInvoiceReader is a Reader for the PayInvoice structure.

func (*PayInvoiceReader) ReadResponse

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