credit

package
v3.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2023 License: Apache-2.0 Imports: 12 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 credit API

func New

func New(transport runtime.ClientTransport,
	formats strfmt.Registry,
	authInfo runtime.ClientAuthInfoWriter,
	defaults KillbillDefaults) *Client

New creates a new credit API client.

func (*Client) CreateCredits

func (a *Client) CreateCredits(ctx context.Context, params *CreateCreditsParams) (*CreateCreditsCreated, error)

CreateCredits creates a credit

func (*Client) GetCredit

func (a *Client) GetCredit(ctx context.Context, params *GetCreditParams) (*GetCreditOK, error)

GetCredit retrieves a credit by 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 {
	CreateCredits(ctx context.Context, params *CreateCreditsParams) (*CreateCreditsCreated, error)

	GetCredit(ctx context.Context, params *GetCreditParams) (*GetCreditOK, error)

	SetTransport(transport runtime.ClientTransport)
}

ClientService is the interface for Client methods

type CreateCreditsBadRequest

type CreateCreditsBadRequest struct {
	HttpResponse runtime.ClientResponse
}

CreateCreditsBadRequest describes a response with status code 400, with default header values.

Invalid account id supplied

func NewCreateCreditsBadRequest

func NewCreateCreditsBadRequest() *CreateCreditsBadRequest

NewCreateCreditsBadRequest creates a CreateCreditsBadRequest with default headers values

func (*CreateCreditsBadRequest) Code

func (o *CreateCreditsBadRequest) Code() int

Code gets the status code for the create credits bad request response

func (*CreateCreditsBadRequest) Error

func (o *CreateCreditsBadRequest) Error() string

func (*CreateCreditsBadRequest) IsClientError

func (o *CreateCreditsBadRequest) IsClientError() bool

IsClientError returns true when this create credits bad request response has a 4xx status code

func (*CreateCreditsBadRequest) IsCode

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

IsCode returns true when this create credits bad request response a status code equal to that given

func (*CreateCreditsBadRequest) IsRedirect

func (o *CreateCreditsBadRequest) IsRedirect() bool

IsRedirect returns true when this create credits bad request response has a 3xx status code

func (*CreateCreditsBadRequest) IsServerError

func (o *CreateCreditsBadRequest) IsServerError() bool

IsServerError returns true when this create credits bad request response has a 5xx status code

func (*CreateCreditsBadRequest) IsSuccess

func (o *CreateCreditsBadRequest) IsSuccess() bool

IsSuccess returns true when this create credits bad request response has a 2xx status code

func (*CreateCreditsBadRequest) String

func (o *CreateCreditsBadRequest) String() string

type CreateCreditsCreated

type CreateCreditsCreated struct {
	Payload      []*kbmodel.InvoiceItem
	HttpResponse runtime.ClientResponse
}

CreateCreditsCreated describes a response with status code 201, with default header values.

Created credit successfully

func NewCreateCreditsCreated

func NewCreateCreditsCreated() *CreateCreditsCreated

NewCreateCreditsCreated creates a CreateCreditsCreated with default headers values

func (*CreateCreditsCreated) Code

func (o *CreateCreditsCreated) Code() int

Code gets the status code for the create credits created response

func (*CreateCreditsCreated) Error

func (o *CreateCreditsCreated) Error() string

func (*CreateCreditsCreated) GetPayload

func (o *CreateCreditsCreated) GetPayload() []*kbmodel.InvoiceItem

func (*CreateCreditsCreated) IsClientError

func (o *CreateCreditsCreated) IsClientError() bool

IsClientError returns true when this create credits created response has a 4xx status code

func (*CreateCreditsCreated) IsCode

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

IsCode returns true when this create credits created response a status code equal to that given

func (*CreateCreditsCreated) IsRedirect

func (o *CreateCreditsCreated) IsRedirect() bool

IsRedirect returns true when this create credits created response has a 3xx status code

func (*CreateCreditsCreated) IsServerError

func (o *CreateCreditsCreated) IsServerError() bool

IsServerError returns true when this create credits created response has a 5xx status code

func (*CreateCreditsCreated) IsSuccess

func (o *CreateCreditsCreated) IsSuccess() bool

IsSuccess returns true when this create credits created response has a 2xx status code

func (*CreateCreditsCreated) String

func (o *CreateCreditsCreated) String() string

type CreateCreditsNotFound

type CreateCreditsNotFound struct {
	HttpResponse runtime.ClientResponse
}

CreateCreditsNotFound describes a response with status code 404, with default header values.

Account not found

func NewCreateCreditsNotFound

func NewCreateCreditsNotFound() *CreateCreditsNotFound

NewCreateCreditsNotFound creates a CreateCreditsNotFound with default headers values

func (*CreateCreditsNotFound) Code

func (o *CreateCreditsNotFound) Code() int

Code gets the status code for the create credits not found response

func (*CreateCreditsNotFound) Error

func (o *CreateCreditsNotFound) Error() string

func (*CreateCreditsNotFound) IsClientError

func (o *CreateCreditsNotFound) IsClientError() bool

IsClientError returns true when this create credits not found response has a 4xx status code

func (*CreateCreditsNotFound) IsCode

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

IsCode returns true when this create credits not found response a status code equal to that given

func (*CreateCreditsNotFound) IsRedirect

func (o *CreateCreditsNotFound) IsRedirect() bool

IsRedirect returns true when this create credits not found response has a 3xx status code

func (*CreateCreditsNotFound) IsServerError

func (o *CreateCreditsNotFound) IsServerError() bool

IsServerError returns true when this create credits not found response has a 5xx status code

func (*CreateCreditsNotFound) IsSuccess

func (o *CreateCreditsNotFound) IsSuccess() bool

IsSuccess returns true when this create credits not found response has a 2xx status code

func (*CreateCreditsNotFound) String

func (o *CreateCreditsNotFound) String() string

type CreateCreditsParams

type CreateCreditsParams struct {

	// XKillbillComment.
	XKillbillComment *string

	// XKillbillCreatedBy.
	XKillbillCreatedBy string

	// XKillbillReason.
	XKillbillReason *string

	// AutoCommit.
	AutoCommit *bool

	// Body.
	Body []*kbmodel.InvoiceItem

	// PluginProperty.
	PluginProperty []string

	WithProfilingInfo *string // If set, return KB hprof headers
	WithStackTrace    *bool   // If set, returns full stack trace with error message

	Context               context.Context
	HTTPClient            *http.Client
	ProcessLocationHeader bool // For create APIs that return 201, send another request and retrieve the resource.
	// contains filtered or unexported fields
}

CreateCreditsParams contains all the parameters to send to the API endpoint

for the create credits operation.

Typically these are written to a http.Request.

func NewCreateCreditsParams

func NewCreateCreditsParams() *CreateCreditsParams

NewCreateCreditsParams creates a new CreateCreditsParams 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 NewCreateCreditsParamsWithContext

func NewCreateCreditsParamsWithContext(ctx context.Context) *CreateCreditsParams

NewCreateCreditsParamsWithContext creates a new CreateCreditsParams object with the ability to set a context for a request.

func NewCreateCreditsParamsWithHTTPClient

func NewCreateCreditsParamsWithHTTPClient(client *http.Client) *CreateCreditsParams

NewCreateCreditsParamsWithHTTPClient creates a new CreateCreditsParams object with the ability to set a custom HTTPClient for a request.

func NewCreateCreditsParamsWithTimeout

func NewCreateCreditsParamsWithTimeout(timeout time.Duration) *CreateCreditsParams

NewCreateCreditsParamsWithTimeout creates a new CreateCreditsParams object with the ability to set a timeout on a request.

func (*CreateCreditsParams) SetAutoCommit

func (o *CreateCreditsParams) SetAutoCommit(autoCommit *bool)

SetAutoCommit adds the autoCommit to the create credits params

func (*CreateCreditsParams) SetBody

func (o *CreateCreditsParams) SetBody(body []*kbmodel.InvoiceItem)

SetBody adds the body to the create credits params

func (*CreateCreditsParams) SetContext

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

SetContext adds the context to the create credits params

func (*CreateCreditsParams) SetDefaults

func (o *CreateCreditsParams) SetDefaults()

SetDefaults hydrates default values in the create credits params (not the query body).

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

func (*CreateCreditsParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the create credits params

func (*CreateCreditsParams) SetPluginProperty

func (o *CreateCreditsParams) SetPluginProperty(pluginProperty []string)

SetPluginProperty adds the pluginProperty to the create credits params

func (*CreateCreditsParams) SetTimeout

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

SetTimeout adds the timeout to the create credits params

func (*CreateCreditsParams) SetXKillbillComment

func (o *CreateCreditsParams) SetXKillbillComment(xKillbillComment *string)

SetXKillbillComment adds the xKillbillComment to the create credits params

func (*CreateCreditsParams) SetXKillbillCreatedBy

func (o *CreateCreditsParams) SetXKillbillCreatedBy(xKillbillCreatedBy string)

SetXKillbillCreatedBy adds the xKillbillCreatedBy to the create credits params

func (*CreateCreditsParams) SetXKillbillReason

func (o *CreateCreditsParams) SetXKillbillReason(xKillbillReason *string)

SetXKillbillReason adds the xKillbillReason to the create credits params

func (*CreateCreditsParams) WithAutoCommit

func (o *CreateCreditsParams) WithAutoCommit(autoCommit *bool) *CreateCreditsParams

WithAutoCommit adds the autoCommit to the create credits params

func (*CreateCreditsParams) WithBody

WithBody adds the body to the create credits params

func (*CreateCreditsParams) WithContext

WithContext adds the context to the create credits params

func (*CreateCreditsParams) WithDefaults

func (o *CreateCreditsParams) WithDefaults() *CreateCreditsParams

WithDefaults hydrates default values in the create credits params (not the query body).

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

func (*CreateCreditsParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the create credits params

func (*CreateCreditsParams) WithPluginProperty

func (o *CreateCreditsParams) WithPluginProperty(pluginProperty []string) *CreateCreditsParams

WithPluginProperty adds the pluginProperty to the create credits params

func (*CreateCreditsParams) WithTimeout

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

WithTimeout adds the timeout to the create credits params

func (*CreateCreditsParams) WithXKillbillComment

func (o *CreateCreditsParams) WithXKillbillComment(xKillbillComment *string) *CreateCreditsParams

WithXKillbillComment adds the xKillbillComment to the create credits params

func (*CreateCreditsParams) WithXKillbillCreatedBy

func (o *CreateCreditsParams) WithXKillbillCreatedBy(xKillbillCreatedBy string) *CreateCreditsParams

WithXKillbillCreatedBy adds the xKillbillCreatedBy to the create credits params

func (*CreateCreditsParams) WithXKillbillReason

func (o *CreateCreditsParams) WithXKillbillReason(xKillbillReason *string) *CreateCreditsParams

WithXKillbillReason adds the xKillbillReason to the create credits params

func (*CreateCreditsParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type CreateCreditsReader

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

CreateCreditsReader is a Reader for the CreateCredits structure.

func (*CreateCreditsReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type GetCreditBadRequest

type GetCreditBadRequest struct {
	HttpResponse runtime.ClientResponse
}

GetCreditBadRequest describes a response with status code 400, with default header values.

Invalid credit id supplied

func NewGetCreditBadRequest

func NewGetCreditBadRequest() *GetCreditBadRequest

NewGetCreditBadRequest creates a GetCreditBadRequest with default headers values

func (*GetCreditBadRequest) Code

func (o *GetCreditBadRequest) Code() int

Code gets the status code for the get credit bad request response

func (*GetCreditBadRequest) Error

func (o *GetCreditBadRequest) Error() string

func (*GetCreditBadRequest) IsClientError

func (o *GetCreditBadRequest) IsClientError() bool

IsClientError returns true when this get credit bad request response has a 4xx status code

func (*GetCreditBadRequest) IsCode

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

IsCode returns true when this get credit bad request response a status code equal to that given

func (*GetCreditBadRequest) IsRedirect

func (o *GetCreditBadRequest) IsRedirect() bool

IsRedirect returns true when this get credit bad request response has a 3xx status code

func (*GetCreditBadRequest) IsServerError

func (o *GetCreditBadRequest) IsServerError() bool

IsServerError returns true when this get credit bad request response has a 5xx status code

func (*GetCreditBadRequest) IsSuccess

func (o *GetCreditBadRequest) IsSuccess() bool

IsSuccess returns true when this get credit bad request response has a 2xx status code

func (*GetCreditBadRequest) String

func (o *GetCreditBadRequest) String() string

type GetCreditNotFound

type GetCreditNotFound struct {
	HttpResponse runtime.ClientResponse
}

GetCreditNotFound describes a response with status code 404, with default header values.

Credit not found

func NewGetCreditNotFound

func NewGetCreditNotFound() *GetCreditNotFound

NewGetCreditNotFound creates a GetCreditNotFound with default headers values

func (*GetCreditNotFound) Code

func (o *GetCreditNotFound) Code() int

Code gets the status code for the get credit not found response

func (*GetCreditNotFound) Error

func (o *GetCreditNotFound) Error() string

func (*GetCreditNotFound) IsClientError

func (o *GetCreditNotFound) IsClientError() bool

IsClientError returns true when this get credit not found response has a 4xx status code

func (*GetCreditNotFound) IsCode

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

IsCode returns true when this get credit not found response a status code equal to that given

func (*GetCreditNotFound) IsRedirect

func (o *GetCreditNotFound) IsRedirect() bool

IsRedirect returns true when this get credit not found response has a 3xx status code

func (*GetCreditNotFound) IsServerError

func (o *GetCreditNotFound) IsServerError() bool

IsServerError returns true when this get credit not found response has a 5xx status code

func (*GetCreditNotFound) IsSuccess

func (o *GetCreditNotFound) IsSuccess() bool

IsSuccess returns true when this get credit not found response has a 2xx status code

func (*GetCreditNotFound) String

func (o *GetCreditNotFound) String() string

type GetCreditOK

type GetCreditOK struct {
	Payload      *kbmodel.InvoiceItem
	HttpResponse runtime.ClientResponse
}

GetCreditOK describes a response with status code 200, with default header values.

successful operation

func NewGetCreditOK

func NewGetCreditOK() *GetCreditOK

NewGetCreditOK creates a GetCreditOK with default headers values

func (*GetCreditOK) Code

func (o *GetCreditOK) Code() int

Code gets the status code for the get credit o k response

func (*GetCreditOK) Error

func (o *GetCreditOK) Error() string

func (*GetCreditOK) GetPayload

func (o *GetCreditOK) GetPayload() *kbmodel.InvoiceItem

func (*GetCreditOK) IsClientError

func (o *GetCreditOK) IsClientError() bool

IsClientError returns true when this get credit o k response has a 4xx status code

func (*GetCreditOK) IsCode

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

IsCode returns true when this get credit o k response a status code equal to that given

func (*GetCreditOK) IsRedirect

func (o *GetCreditOK) IsRedirect() bool

IsRedirect returns true when this get credit o k response has a 3xx status code

func (*GetCreditOK) IsServerError

func (o *GetCreditOK) IsServerError() bool

IsServerError returns true when this get credit o k response has a 5xx status code

func (*GetCreditOK) IsSuccess

func (o *GetCreditOK) IsSuccess() bool

IsSuccess returns true when this get credit o k response has a 2xx status code

func (*GetCreditOK) String

func (o *GetCreditOK) String() string

type GetCreditParams

type GetCreditParams struct {

	// CreditID.
	//
	// Format: uuid
	CreditID strfmt.UUID

	WithProfilingInfo *string // If set, return KB hprof headers
	WithStackTrace    *bool   // If set, returns full stack trace with error message

	Context               context.Context
	HTTPClient            *http.Client
	ProcessLocationHeader bool // For create APIs that return 201, send another request and retrieve the resource.
	// contains filtered or unexported fields
}

GetCreditParams contains all the parameters to send to the API endpoint

for the get credit operation.

Typically these are written to a http.Request.

func NewGetCreditParams

func NewGetCreditParams() *GetCreditParams

NewGetCreditParams creates a new GetCreditParams 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 NewGetCreditParamsWithContext

func NewGetCreditParamsWithContext(ctx context.Context) *GetCreditParams

NewGetCreditParamsWithContext creates a new GetCreditParams object with the ability to set a context for a request.

func NewGetCreditParamsWithHTTPClient

func NewGetCreditParamsWithHTTPClient(client *http.Client) *GetCreditParams

NewGetCreditParamsWithHTTPClient creates a new GetCreditParams object with the ability to set a custom HTTPClient for a request.

func NewGetCreditParamsWithTimeout

func NewGetCreditParamsWithTimeout(timeout time.Duration) *GetCreditParams

NewGetCreditParamsWithTimeout creates a new GetCreditParams object with the ability to set a timeout on a request.

func (*GetCreditParams) SetContext

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

SetContext adds the context to the get credit params

func (*GetCreditParams) SetCreditID

func (o *GetCreditParams) SetCreditID(creditID strfmt.UUID)

SetCreditID adds the creditId to the get credit params

func (*GetCreditParams) SetDefaults

func (o *GetCreditParams) SetDefaults()

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

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

func (*GetCreditParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get credit params

func (*GetCreditParams) SetTimeout

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

SetTimeout adds the timeout to the get credit params

func (*GetCreditParams) WithContext

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

WithContext adds the context to the get credit params

func (*GetCreditParams) WithCreditID

func (o *GetCreditParams) WithCreditID(creditID strfmt.UUID) *GetCreditParams

WithCreditID adds the creditID to the get credit params

func (*GetCreditParams) WithDefaults

func (o *GetCreditParams) WithDefaults() *GetCreditParams

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

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

func (*GetCreditParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get credit params

func (*GetCreditParams) WithTimeout

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

WithTimeout adds the timeout to the get credit params

func (*GetCreditParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type GetCreditReader

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

GetCreditReader is a Reader for the GetCredit structure.

func (*GetCreditReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type KillbillDefaults

type KillbillDefaults interface {
	// Default CreatedBy. If not set explicitly in params, this will be used.
	XKillbillCreatedBy() *string
	// Default Comment. If not set explicitly in params, this will be used.
	XKillbillComment() *string
	// Default Reason. If not set explicitly in params, this will be used.
	XKillbillReason() *string
	// Default WithWithProfilingInfo. If not set explicitly in params, this will be used.
	KillbillWithProfilingInfo() *string
	// Default WithStackTrace. If not set explicitly in params, this will be used.
	KillbillWithStackTrace() *bool
}

killbill default values. When a call is made to an operation, these values are used if params doesn't specify them.

Jump to

Keyboard shortcuts

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