credit

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2021 License: Apache-2.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 CreateCreditBadRequest

type CreateCreditBadRequest struct {
	HttpResponse runtime.ClientResponse
}

CreateCreditBadRequest handles this case with default header values.

Invalid account id supplied

func NewCreateCreditBadRequest

func NewCreateCreditBadRequest() *CreateCreditBadRequest

NewCreateCreditBadRequest creates a CreateCreditBadRequest with default headers values

func (*CreateCreditBadRequest) Error

func (o *CreateCreditBadRequest) Error() string

type CreateCreditCreated

type CreateCreditCreated struct {
	Payload *kbmodel.Credit

	HttpResponse runtime.ClientResponse
}

CreateCreditCreated handles this case with default header values.

Created credit successfully

func NewCreateCreditCreated

func NewCreateCreditCreated() *CreateCreditCreated

NewCreateCreditCreated creates a CreateCreditCreated with default headers values

func (*CreateCreditCreated) Error

func (o *CreateCreditCreated) Error() string

func (*CreateCreditCreated) GetPayload

func (o *CreateCreditCreated) GetPayload() *kbmodel.Credit

type CreateCreditNotFound

type CreateCreditNotFound struct {
	HttpResponse runtime.ClientResponse
}

CreateCreditNotFound handles this case with default header values.

Account not found

func NewCreateCreditNotFound

func NewCreateCreditNotFound() *CreateCreditNotFound

NewCreateCreditNotFound creates a CreateCreditNotFound with default headers values

func (*CreateCreditNotFound) Error

func (o *CreateCreditNotFound) Error() string

type CreateCreditParams

type CreateCreditParams struct {

	/*XKillbillComment*/
	XKillbillComment *string
	/*XKillbillCreatedBy*/
	XKillbillCreatedBy string
	/*XKillbillReason*/
	XKillbillReason *string
	/*AutoCommit*/
	AutoCommit *bool
	/*Body*/
	Body *kbmodel.Credit
	/*PluginProperty*/
	PluginProperty []string

	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
}

CreateCreditParams contains all the parameters to send to the API endpoint for the create credit operation typically these are written to a http.Request

func NewCreateCreditParams

func NewCreateCreditParams() *CreateCreditParams

NewCreateCreditParams creates a new CreateCreditParams object with the default values initialized.

func NewCreateCreditParamsWithContext

func NewCreateCreditParamsWithContext(ctx context.Context) *CreateCreditParams

NewCreateCreditParamsWithContext creates a new CreateCreditParams object with the default values initialized, and the ability to set a context for a request

func NewCreateCreditParamsWithHTTPClient

func NewCreateCreditParamsWithHTTPClient(client *http.Client) *CreateCreditParams

NewCreateCreditParamsWithHTTPClient creates a new CreateCreditParams object with the default values initialized, and the ability to set a custom HTTPClient for a request

func NewCreateCreditParamsWithTimeout

func NewCreateCreditParamsWithTimeout(timeout time.Duration) *CreateCreditParams

NewCreateCreditParamsWithTimeout creates a new CreateCreditParams object with the default values initialized, and the ability to set a timeout on a request

func (*CreateCreditParams) SetAutoCommit

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

SetAutoCommit adds the autoCommit to the create credit params

func (*CreateCreditParams) SetBody

func (o *CreateCreditParams) SetBody(body *kbmodel.Credit)

SetBody adds the body to the create credit params

func (*CreateCreditParams) SetContext

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

SetContext adds the context to the create credit params

func (*CreateCreditParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the create credit params

func (*CreateCreditParams) SetPluginProperty

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

SetPluginProperty adds the pluginProperty to the create credit params

func (*CreateCreditParams) SetTimeout

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

SetTimeout adds the timeout to the create credit params

func (*CreateCreditParams) SetXKillbillComment

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

SetXKillbillComment adds the xKillbillComment to the create credit params

func (*CreateCreditParams) SetXKillbillCreatedBy

func (o *CreateCreditParams) SetXKillbillCreatedBy(xKillbillCreatedBy string)

SetXKillbillCreatedBy adds the xKillbillCreatedBy to the create credit params

func (*CreateCreditParams) SetXKillbillReason

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

SetXKillbillReason adds the xKillbillReason to the create credit params

func (*CreateCreditParams) WithAutoCommit

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

WithAutoCommit adds the autoCommit to the create credit params

func (*CreateCreditParams) WithBody

WithBody adds the body to the create credit params

func (*CreateCreditParams) WithContext

WithContext adds the context to the create credit params

func (*CreateCreditParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the create credit params

func (*CreateCreditParams) WithPluginProperty

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

WithPluginProperty adds the pluginProperty to the create credit params

func (*CreateCreditParams) WithTimeout

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

WithTimeout adds the timeout to the create credit params

func (*CreateCreditParams) WithXKillbillComment

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

WithXKillbillComment adds the xKillbillComment to the create credit params

func (*CreateCreditParams) WithXKillbillCreatedBy

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

WithXKillbillCreatedBy adds the xKillbillCreatedBy to the create credit params

func (*CreateCreditParams) WithXKillbillReason

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

WithXKillbillReason adds the xKillbillReason to the create credit params

func (*CreateCreditParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type CreateCreditReader

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

CreateCreditReader is a Reader for the CreateCredit structure.

func (*CreateCreditReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type CreateCreditsBadRequest

type CreateCreditsBadRequest struct {
	HttpResponse runtime.ClientResponse
}

CreateCreditsBadRequest handles this case with default header values.

Invalid account id supplied

func NewCreateCreditsBadRequest

func NewCreateCreditsBadRequest() *CreateCreditsBadRequest

NewCreateCreditsBadRequest creates a CreateCreditsBadRequest with default headers values

func (*CreateCreditsBadRequest) Error

func (o *CreateCreditsBadRequest) Error() string

type CreateCreditsCreated

type CreateCreditsCreated struct {
	Payload []*kbmodel.InvoiceItem

	HttpResponse runtime.ClientResponse
}

CreateCreditsCreated handles this case with default header values.

Created credit successfully

func NewCreateCreditsCreated

func NewCreateCreditsCreated() *CreateCreditsCreated

NewCreateCreditsCreated creates a CreateCreditsCreated with default headers values

func (*CreateCreditsCreated) Error

func (o *CreateCreditsCreated) Error() string

func (*CreateCreditsCreated) GetPayload

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

type CreateCreditsNotFound

type CreateCreditsNotFound struct {
	HttpResponse runtime.ClientResponse
}

CreateCreditsNotFound handles this case with default header values.

Account not found

func NewCreateCreditsNotFound

func NewCreateCreditsNotFound() *CreateCreditsNotFound

NewCreateCreditsNotFound creates a CreateCreditsNotFound with default headers values

func (*CreateCreditsNotFound) Error

func (o *CreateCreditsNotFound) Error() 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 values initialized.

func NewCreateCreditsParamsWithContext

func NewCreateCreditsParamsWithContext(ctx context.Context) *CreateCreditsParams

NewCreateCreditsParamsWithContext creates a new CreateCreditsParams object with the default values initialized, and 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 default values initialized, and 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 default values initialized, and 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) 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) 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 handles this case with default header values.

Invalid credit id supplied

func NewGetCreditBadRequest

func NewGetCreditBadRequest() *GetCreditBadRequest

NewGetCreditBadRequest creates a GetCreditBadRequest with default headers values

func (*GetCreditBadRequest) Error

func (o *GetCreditBadRequest) Error() string

type GetCreditNotFound

type GetCreditNotFound struct {
	HttpResponse runtime.ClientResponse
}

GetCreditNotFound handles this case with default header values.

Credit not found

func NewGetCreditNotFound

func NewGetCreditNotFound() *GetCreditNotFound

NewGetCreditNotFound creates a GetCreditNotFound with default headers values

func (*GetCreditNotFound) Error

func (o *GetCreditNotFound) Error() string

type GetCreditOK

type GetCreditOK struct {
	Payload *kbmodel.InvoiceItem

	HttpResponse runtime.ClientResponse
}

GetCreditOK handles this case with default header values.

successful operation

func NewGetCreditOK

func NewGetCreditOK() *GetCreditOK

NewGetCreditOK creates a GetCreditOK with default headers values

func (*GetCreditOK) Error

func (o *GetCreditOK) Error() string

func (*GetCreditOK) GetPayload

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

type GetCreditParams

type GetCreditParams struct {

	/*CreditID*/
	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 values initialized.

func NewGetCreditParamsWithContext

func NewGetCreditParamsWithContext(ctx context.Context) *GetCreditParams

NewGetCreditParamsWithContext creates a new GetCreditParams object with the default values initialized, and 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 default values initialized, and 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 default values initialized, and 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) 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) 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 ICredit

type ICredit interface {
	/*
		CreateCredits creates a credit
	*/
	CreateCredits(ctx context.Context, params *CreateCreditsParams) (*CreateCreditsCreated, error)

	/*
		GetCredit retrieves a credit by id
	*/
	GetCredit(ctx context.Context, params *GetCreditParams) (*GetCreditOK, error)
}

ICredit - interface for Credit client.

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