credit

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2019 License: Apache-2.0 Imports: 13 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) CreateCredit

func (a *Client) CreateCredit(ctx context.Context, params *CreateCreditParams) (*CreateCreditCreated, error)

CreateCredit 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

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 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.Credit

	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

type GetCreditParams

type GetCreditParams struct {

	/*CreditID*/
	CreditID strfmt.UUID

	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 {
	/*
		CreateCredit creates a credit
	*/
	CreateCredit(ctx context.Context, params *CreateCreditParams) (*CreateCreditCreated, 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 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