Documentation ¶
Index ¶
- type Client
- type CreateCreditsBadRequest
- type CreateCreditsCreated
- type CreateCreditsNotFound
- type CreateCreditsParams
- func (o *CreateCreditsParams) SetAutoCommit(autoCommit *bool)
- func (o *CreateCreditsParams) SetBody(body []*kbmodel.InvoiceItem)
- func (o *CreateCreditsParams) SetContext(ctx context.Context)
- func (o *CreateCreditsParams) SetHTTPClient(client *http.Client)
- func (o *CreateCreditsParams) SetPluginProperty(pluginProperty []string)
- func (o *CreateCreditsParams) SetTimeout(timeout time.Duration)
- func (o *CreateCreditsParams) SetXKillbillComment(xKillbillComment *string)
- func (o *CreateCreditsParams) SetXKillbillCreatedBy(xKillbillCreatedBy string)
- func (o *CreateCreditsParams) SetXKillbillReason(xKillbillReason *string)
- func (o *CreateCreditsParams) WithAutoCommit(autoCommit *bool) *CreateCreditsParams
- func (o *CreateCreditsParams) WithBody(body []*kbmodel.InvoiceItem) *CreateCreditsParams
- func (o *CreateCreditsParams) WithContext(ctx context.Context) *CreateCreditsParams
- func (o *CreateCreditsParams) WithHTTPClient(client *http.Client) *CreateCreditsParams
- func (o *CreateCreditsParams) WithPluginProperty(pluginProperty []string) *CreateCreditsParams
- func (o *CreateCreditsParams) WithTimeout(timeout time.Duration) *CreateCreditsParams
- func (o *CreateCreditsParams) WithXKillbillComment(xKillbillComment *string) *CreateCreditsParams
- func (o *CreateCreditsParams) WithXKillbillCreatedBy(xKillbillCreatedBy string) *CreateCreditsParams
- func (o *CreateCreditsParams) WithXKillbillReason(xKillbillReason *string) *CreateCreditsParams
- func (o *CreateCreditsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type CreateCreditsReader
- type GetCreditBadRequest
- type GetCreditNotFound
- type GetCreditOK
- type GetCreditParams
- func (o *GetCreditParams) SetContext(ctx context.Context)
- func (o *GetCreditParams) SetCreditID(creditID strfmt.UUID)
- func (o *GetCreditParams) SetHTTPClient(client *http.Client)
- func (o *GetCreditParams) SetTimeout(timeout time.Duration)
- func (o *GetCreditParams) WithContext(ctx context.Context) *GetCreditParams
- func (o *GetCreditParams) WithCreditID(creditID strfmt.UUID) *GetCreditParams
- func (o *GetCreditParams) WithHTTPClient(client *http.Client) *GetCreditParams
- func (o *GetCreditParams) WithTimeout(timeout time.Duration) *GetCreditParams
- func (o *GetCreditParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type GetCreditReader
- type ICredit
- type KillbillDefaults
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
resource description
func (*Client) GetCredit ¶
func (a *Client) GetCredit(ctx context.Context, params *GetCreditParams) (*GetCreditOK, error)
GetCredit retrieves a credit by id
resource description
func (*Client) SetTransport ¶
func (a *Client) SetTransport(transport runtime.ClientTransport)
SetTransport changes the transport on the client
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 ¶
func (o *CreateCreditsParams) WithBody(body []*kbmodel.InvoiceItem) *CreateCreditsParams
WithBody adds the body to the create credits params
func (*CreateCreditsParams) WithContext ¶
func (o *CreateCreditsParams) WithContext(ctx context.Context) *CreateCreditsParams
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 resource description */ CreateCredits(ctx context.Context, params *CreateCreditsParams) (*CreateCreditsCreated, error) /* GetCredit retrieves a credit by id resource description */ 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.