Documentation
¶
Index ¶
- type Client
- func (a *Client) GetAllUsage(ctx context.Context, params *GetAllUsageParams) (*GetAllUsageOK, error)
- func (a *Client) GetUsage(ctx context.Context, params *GetUsageParams) (*GetUsageOK, error)
- func (a *Client) RecordUsage(ctx context.Context, params *RecordUsageParams) (*RecordUsageOK, error)
- func (a *Client) SetTransport(transport runtime.ClientTransport)
- type ClientOption
- type ClientService
- type GetAllUsageBadRequest
- func (o *GetAllUsageBadRequest) Code() int
- func (o *GetAllUsageBadRequest) Error() string
- func (o *GetAllUsageBadRequest) IsClientError() bool
- func (o *GetAllUsageBadRequest) IsCode(code int) bool
- func (o *GetAllUsageBadRequest) IsRedirect() bool
- func (o *GetAllUsageBadRequest) IsServerError() bool
- func (o *GetAllUsageBadRequest) IsSuccess() bool
- func (o *GetAllUsageBadRequest) String() string
- type GetAllUsageOK
- func (o *GetAllUsageOK) Code() int
- func (o *GetAllUsageOK) Error() string
- func (o *GetAllUsageOK) GetPayload() *kbmodel.RolledUpUsage
- func (o *GetAllUsageOK) IsClientError() bool
- func (o *GetAllUsageOK) IsCode(code int) bool
- func (o *GetAllUsageOK) IsRedirect() bool
- func (o *GetAllUsageOK) IsServerError() bool
- func (o *GetAllUsageOK) IsSuccess() bool
- func (o *GetAllUsageOK) String() string
- type GetAllUsageParams
- func (o *GetAllUsageParams) SetContext(ctx context.Context)
- func (o *GetAllUsageParams) SetDefaults()
- func (o *GetAllUsageParams) SetEndDate(endDate *strfmt.Date)
- func (o *GetAllUsageParams) SetHTTPClient(client *http.Client)
- func (o *GetAllUsageParams) SetPluginProperty(pluginProperty []string)
- func (o *GetAllUsageParams) SetStartDate(startDate *strfmt.Date)
- func (o *GetAllUsageParams) SetSubscriptionID(subscriptionID strfmt.UUID)
- func (o *GetAllUsageParams) SetTimeout(timeout time.Duration)
- func (o *GetAllUsageParams) WithContext(ctx context.Context) *GetAllUsageParams
- func (o *GetAllUsageParams) WithDefaults() *GetAllUsageParams
- func (o *GetAllUsageParams) WithEndDate(endDate *strfmt.Date) *GetAllUsageParams
- func (o *GetAllUsageParams) WithHTTPClient(client *http.Client) *GetAllUsageParams
- func (o *GetAllUsageParams) WithPluginProperty(pluginProperty []string) *GetAllUsageParams
- func (o *GetAllUsageParams) WithStartDate(startDate *strfmt.Date) *GetAllUsageParams
- func (o *GetAllUsageParams) WithSubscriptionID(subscriptionID strfmt.UUID) *GetAllUsageParams
- func (o *GetAllUsageParams) WithTimeout(timeout time.Duration) *GetAllUsageParams
- func (o *GetAllUsageParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type GetAllUsageReader
- type GetUsageBadRequest
- func (o *GetUsageBadRequest) Code() int
- func (o *GetUsageBadRequest) Error() string
- func (o *GetUsageBadRequest) IsClientError() bool
- func (o *GetUsageBadRequest) IsCode(code int) bool
- func (o *GetUsageBadRequest) IsRedirect() bool
- func (o *GetUsageBadRequest) IsServerError() bool
- func (o *GetUsageBadRequest) IsSuccess() bool
- func (o *GetUsageBadRequest) String() string
- type GetUsageOK
- func (o *GetUsageOK) Code() int
- func (o *GetUsageOK) Error() string
- func (o *GetUsageOK) GetPayload() *kbmodel.RolledUpUsage
- func (o *GetUsageOK) IsClientError() bool
- func (o *GetUsageOK) IsCode(code int) bool
- func (o *GetUsageOK) IsRedirect() bool
- func (o *GetUsageOK) IsServerError() bool
- func (o *GetUsageOK) IsSuccess() bool
- func (o *GetUsageOK) String() string
- type GetUsageParams
- func (o *GetUsageParams) SetContext(ctx context.Context)
- func (o *GetUsageParams) SetDefaults()
- func (o *GetUsageParams) SetEndDate(endDate *strfmt.Date)
- func (o *GetUsageParams) SetHTTPClient(client *http.Client)
- func (o *GetUsageParams) SetPluginProperty(pluginProperty []string)
- func (o *GetUsageParams) SetStartDate(startDate *strfmt.Date)
- func (o *GetUsageParams) SetSubscriptionID(subscriptionID strfmt.UUID)
- func (o *GetUsageParams) SetTimeout(timeout time.Duration)
- func (o *GetUsageParams) SetUnitType(unitType string)
- func (o *GetUsageParams) WithContext(ctx context.Context) *GetUsageParams
- func (o *GetUsageParams) WithDefaults() *GetUsageParams
- func (o *GetUsageParams) WithEndDate(endDate *strfmt.Date) *GetUsageParams
- func (o *GetUsageParams) WithHTTPClient(client *http.Client) *GetUsageParams
- func (o *GetUsageParams) WithPluginProperty(pluginProperty []string) *GetUsageParams
- func (o *GetUsageParams) WithStartDate(startDate *strfmt.Date) *GetUsageParams
- func (o *GetUsageParams) WithSubscriptionID(subscriptionID strfmt.UUID) *GetUsageParams
- func (o *GetUsageParams) WithTimeout(timeout time.Duration) *GetUsageParams
- func (o *GetUsageParams) WithUnitType(unitType string) *GetUsageParams
- func (o *GetUsageParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type GetUsageReader
- type KillbillDefaults
- type RecordUsageBadRequest
- func (o *RecordUsageBadRequest) Code() int
- func (o *RecordUsageBadRequest) Error() string
- func (o *RecordUsageBadRequest) IsClientError() bool
- func (o *RecordUsageBadRequest) IsCode(code int) bool
- func (o *RecordUsageBadRequest) IsRedirect() bool
- func (o *RecordUsageBadRequest) IsServerError() bool
- func (o *RecordUsageBadRequest) IsSuccess() bool
- func (o *RecordUsageBadRequest) String() string
- type RecordUsageOK
- func (o *RecordUsageOK) Code() int
- func (o *RecordUsageOK) Error() string
- func (o *RecordUsageOK) IsClientError() bool
- func (o *RecordUsageOK) IsCode(code int) bool
- func (o *RecordUsageOK) IsRedirect() bool
- func (o *RecordUsageOK) IsServerError() bool
- func (o *RecordUsageOK) IsSuccess() bool
- func (o *RecordUsageOK) String() string
- type RecordUsageParams
- func (o *RecordUsageParams) SetBody(body *kbmodel.SubscriptionUsageRecord)
- func (o *RecordUsageParams) SetContext(ctx context.Context)
- func (o *RecordUsageParams) SetDefaults()
- func (o *RecordUsageParams) SetHTTPClient(client *http.Client)
- func (o *RecordUsageParams) SetTimeout(timeout time.Duration)
- func (o *RecordUsageParams) SetXKillbillComment(xKillbillComment *string)
- func (o *RecordUsageParams) SetXKillbillCreatedBy(xKillbillCreatedBy string)
- func (o *RecordUsageParams) SetXKillbillReason(xKillbillReason *string)
- func (o *RecordUsageParams) WithBody(body *kbmodel.SubscriptionUsageRecord) *RecordUsageParams
- func (o *RecordUsageParams) WithContext(ctx context.Context) *RecordUsageParams
- func (o *RecordUsageParams) WithDefaults() *RecordUsageParams
- func (o *RecordUsageParams) WithHTTPClient(client *http.Client) *RecordUsageParams
- func (o *RecordUsageParams) WithTimeout(timeout time.Duration) *RecordUsageParams
- func (o *RecordUsageParams) WithXKillbillComment(xKillbillComment *string) *RecordUsageParams
- func (o *RecordUsageParams) WithXKillbillCreatedBy(xKillbillCreatedBy string) *RecordUsageParams
- func (o *RecordUsageParams) WithXKillbillReason(xKillbillReason *string) *RecordUsageParams
- func (o *RecordUsageParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type RecordUsageReader
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 usage API
func New ¶
func New(transport runtime.ClientTransport, formats strfmt.Registry, authInfo runtime.ClientAuthInfoWriter, defaults KillbillDefaults) *Client
New creates a new usage API client.
func (*Client) GetAllUsage ¶
func (a *Client) GetAllUsage(ctx context.Context, params *GetAllUsageParams) (*GetAllUsageOK, error)
GetAllUsage retrieves usage for a subscription
func (*Client) GetUsage ¶
func (a *Client) GetUsage(ctx context.Context, params *GetUsageParams) (*GetUsageOK, error)
GetUsage retrieves usage for a subscription and unit type
func (*Client) RecordUsage ¶
func (a *Client) RecordUsage(ctx context.Context, params *RecordUsageParams) (*RecordUsageOK, error)
RecordUsage records usage for a subscription
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 { GetAllUsage(ctx context.Context, params *GetAllUsageParams) (*GetAllUsageOK, error) GetUsage(ctx context.Context, params *GetUsageParams) (*GetUsageOK, error) RecordUsage(ctx context.Context, params *RecordUsageParams) (*RecordUsageOK, error) SetTransport(transport runtime.ClientTransport) }
ClientService is the interface for Client methods
type GetAllUsageBadRequest ¶
type GetAllUsageBadRequest struct {
HttpResponse runtime.ClientResponse
}
GetAllUsageBadRequest describes a response with status code 400, with default header values.
Missing start date or end date
func NewGetAllUsageBadRequest ¶
func NewGetAllUsageBadRequest() *GetAllUsageBadRequest
NewGetAllUsageBadRequest creates a GetAllUsageBadRequest with default headers values
func (*GetAllUsageBadRequest) Code ¶
func (o *GetAllUsageBadRequest) Code() int
Code gets the status code for the get all usage bad request response
func (*GetAllUsageBadRequest) Error ¶
func (o *GetAllUsageBadRequest) Error() string
func (*GetAllUsageBadRequest) IsClientError ¶
func (o *GetAllUsageBadRequest) IsClientError() bool
IsClientError returns true when this get all usage bad request response has a 4xx status code
func (*GetAllUsageBadRequest) IsCode ¶
func (o *GetAllUsageBadRequest) IsCode(code int) bool
IsCode returns true when this get all usage bad request response a status code equal to that given
func (*GetAllUsageBadRequest) IsRedirect ¶
func (o *GetAllUsageBadRequest) IsRedirect() bool
IsRedirect returns true when this get all usage bad request response has a 3xx status code
func (*GetAllUsageBadRequest) IsServerError ¶
func (o *GetAllUsageBadRequest) IsServerError() bool
IsServerError returns true when this get all usage bad request response has a 5xx status code
func (*GetAllUsageBadRequest) IsSuccess ¶
func (o *GetAllUsageBadRequest) IsSuccess() bool
IsSuccess returns true when this get all usage bad request response has a 2xx status code
func (*GetAllUsageBadRequest) String ¶
func (o *GetAllUsageBadRequest) String() string
type GetAllUsageOK ¶
type GetAllUsageOK struct { Payload *kbmodel.RolledUpUsage HttpResponse runtime.ClientResponse }
GetAllUsageOK describes a response with status code 200, with default header values.
successful operation
func NewGetAllUsageOK ¶
func NewGetAllUsageOK() *GetAllUsageOK
NewGetAllUsageOK creates a GetAllUsageOK with default headers values
func (*GetAllUsageOK) Code ¶
func (o *GetAllUsageOK) Code() int
Code gets the status code for the get all usage o k response
func (*GetAllUsageOK) Error ¶
func (o *GetAllUsageOK) Error() string
func (*GetAllUsageOK) GetPayload ¶
func (o *GetAllUsageOK) GetPayload() *kbmodel.RolledUpUsage
func (*GetAllUsageOK) IsClientError ¶
func (o *GetAllUsageOK) IsClientError() bool
IsClientError returns true when this get all usage o k response has a 4xx status code
func (*GetAllUsageOK) IsCode ¶
func (o *GetAllUsageOK) IsCode(code int) bool
IsCode returns true when this get all usage o k response a status code equal to that given
func (*GetAllUsageOK) IsRedirect ¶
func (o *GetAllUsageOK) IsRedirect() bool
IsRedirect returns true when this get all usage o k response has a 3xx status code
func (*GetAllUsageOK) IsServerError ¶
func (o *GetAllUsageOK) IsServerError() bool
IsServerError returns true when this get all usage o k response has a 5xx status code
func (*GetAllUsageOK) IsSuccess ¶
func (o *GetAllUsageOK) IsSuccess() bool
IsSuccess returns true when this get all usage o k response has a 2xx status code
func (*GetAllUsageOK) String ¶
func (o *GetAllUsageOK) String() string
type GetAllUsageParams ¶
type GetAllUsageParams struct { // EndDate. // // Format: date EndDate *strfmt.Date // PluginProperty. PluginProperty []string // StartDate. // // Format: date StartDate *strfmt.Date // SubscriptionID. // // Format: uuid SubscriptionID 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 }
GetAllUsageParams contains all the parameters to send to the API endpoint
for the get all usage operation. Typically these are written to a http.Request.
func NewGetAllUsageParams ¶
func NewGetAllUsageParams() *GetAllUsageParams
NewGetAllUsageParams creates a new GetAllUsageParams 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 NewGetAllUsageParamsWithContext ¶
func NewGetAllUsageParamsWithContext(ctx context.Context) *GetAllUsageParams
NewGetAllUsageParamsWithContext creates a new GetAllUsageParams object with the ability to set a context for a request.
func NewGetAllUsageParamsWithHTTPClient ¶
func NewGetAllUsageParamsWithHTTPClient(client *http.Client) *GetAllUsageParams
NewGetAllUsageParamsWithHTTPClient creates a new GetAllUsageParams object with the ability to set a custom HTTPClient for a request.
func NewGetAllUsageParamsWithTimeout ¶
func NewGetAllUsageParamsWithTimeout(timeout time.Duration) *GetAllUsageParams
NewGetAllUsageParamsWithTimeout creates a new GetAllUsageParams object with the ability to set a timeout on a request.
func (*GetAllUsageParams) SetContext ¶
func (o *GetAllUsageParams) SetContext(ctx context.Context)
SetContext adds the context to the get all usage params
func (*GetAllUsageParams) SetDefaults ¶
func (o *GetAllUsageParams) SetDefaults()
SetDefaults hydrates default values in the get all usage params (not the query body).
All values with no default are reset to their zero value.
func (*GetAllUsageParams) SetEndDate ¶
func (o *GetAllUsageParams) SetEndDate(endDate *strfmt.Date)
SetEndDate adds the endDate to the get all usage params
func (*GetAllUsageParams) SetHTTPClient ¶
func (o *GetAllUsageParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the get all usage params
func (*GetAllUsageParams) SetPluginProperty ¶
func (o *GetAllUsageParams) SetPluginProperty(pluginProperty []string)
SetPluginProperty adds the pluginProperty to the get all usage params
func (*GetAllUsageParams) SetStartDate ¶
func (o *GetAllUsageParams) SetStartDate(startDate *strfmt.Date)
SetStartDate adds the startDate to the get all usage params
func (*GetAllUsageParams) SetSubscriptionID ¶
func (o *GetAllUsageParams) SetSubscriptionID(subscriptionID strfmt.UUID)
SetSubscriptionID adds the subscriptionId to the get all usage params
func (*GetAllUsageParams) SetTimeout ¶
func (o *GetAllUsageParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the get all usage params
func (*GetAllUsageParams) WithContext ¶
func (o *GetAllUsageParams) WithContext(ctx context.Context) *GetAllUsageParams
WithContext adds the context to the get all usage params
func (*GetAllUsageParams) WithDefaults ¶
func (o *GetAllUsageParams) WithDefaults() *GetAllUsageParams
WithDefaults hydrates default values in the get all usage params (not the query body).
All values with no default are reset to their zero value.
func (*GetAllUsageParams) WithEndDate ¶
func (o *GetAllUsageParams) WithEndDate(endDate *strfmt.Date) *GetAllUsageParams
WithEndDate adds the endDate to the get all usage params
func (*GetAllUsageParams) WithHTTPClient ¶
func (o *GetAllUsageParams) WithHTTPClient(client *http.Client) *GetAllUsageParams
WithHTTPClient adds the HTTPClient to the get all usage params
func (*GetAllUsageParams) WithPluginProperty ¶
func (o *GetAllUsageParams) WithPluginProperty(pluginProperty []string) *GetAllUsageParams
WithPluginProperty adds the pluginProperty to the get all usage params
func (*GetAllUsageParams) WithStartDate ¶
func (o *GetAllUsageParams) WithStartDate(startDate *strfmt.Date) *GetAllUsageParams
WithStartDate adds the startDate to the get all usage params
func (*GetAllUsageParams) WithSubscriptionID ¶
func (o *GetAllUsageParams) WithSubscriptionID(subscriptionID strfmt.UUID) *GetAllUsageParams
WithSubscriptionID adds the subscriptionID to the get all usage params
func (*GetAllUsageParams) WithTimeout ¶
func (o *GetAllUsageParams) WithTimeout(timeout time.Duration) *GetAllUsageParams
WithTimeout adds the timeout to the get all usage params
func (*GetAllUsageParams) WriteToRequest ¶
func (o *GetAllUsageParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type GetAllUsageReader ¶
type GetAllUsageReader struct {
// contains filtered or unexported fields
}
GetAllUsageReader is a Reader for the GetAllUsage structure.
func (*GetAllUsageReader) ReadResponse ¶
func (o *GetAllUsageReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.
type GetUsageBadRequest ¶
type GetUsageBadRequest struct {
HttpResponse runtime.ClientResponse
}
GetUsageBadRequest describes a response with status code 400, with default header values.
Missing start date or end date
func NewGetUsageBadRequest ¶
func NewGetUsageBadRequest() *GetUsageBadRequest
NewGetUsageBadRequest creates a GetUsageBadRequest with default headers values
func (*GetUsageBadRequest) Code ¶
func (o *GetUsageBadRequest) Code() int
Code gets the status code for the get usage bad request response
func (*GetUsageBadRequest) Error ¶
func (o *GetUsageBadRequest) Error() string
func (*GetUsageBadRequest) IsClientError ¶
func (o *GetUsageBadRequest) IsClientError() bool
IsClientError returns true when this get usage bad request response has a 4xx status code
func (*GetUsageBadRequest) IsCode ¶
func (o *GetUsageBadRequest) IsCode(code int) bool
IsCode returns true when this get usage bad request response a status code equal to that given
func (*GetUsageBadRequest) IsRedirect ¶
func (o *GetUsageBadRequest) IsRedirect() bool
IsRedirect returns true when this get usage bad request response has a 3xx status code
func (*GetUsageBadRequest) IsServerError ¶
func (o *GetUsageBadRequest) IsServerError() bool
IsServerError returns true when this get usage bad request response has a 5xx status code
func (*GetUsageBadRequest) IsSuccess ¶
func (o *GetUsageBadRequest) IsSuccess() bool
IsSuccess returns true when this get usage bad request response has a 2xx status code
func (*GetUsageBadRequest) String ¶
func (o *GetUsageBadRequest) String() string
type GetUsageOK ¶
type GetUsageOK struct { Payload *kbmodel.RolledUpUsage HttpResponse runtime.ClientResponse }
GetUsageOK describes a response with status code 200, with default header values.
successful operation
func NewGetUsageOK ¶
func NewGetUsageOK() *GetUsageOK
NewGetUsageOK creates a GetUsageOK with default headers values
func (*GetUsageOK) Code ¶
func (o *GetUsageOK) Code() int
Code gets the status code for the get usage o k response
func (*GetUsageOK) Error ¶
func (o *GetUsageOK) Error() string
func (*GetUsageOK) GetPayload ¶
func (o *GetUsageOK) GetPayload() *kbmodel.RolledUpUsage
func (*GetUsageOK) IsClientError ¶
func (o *GetUsageOK) IsClientError() bool
IsClientError returns true when this get usage o k response has a 4xx status code
func (*GetUsageOK) IsCode ¶
func (o *GetUsageOK) IsCode(code int) bool
IsCode returns true when this get usage o k response a status code equal to that given
func (*GetUsageOK) IsRedirect ¶
func (o *GetUsageOK) IsRedirect() bool
IsRedirect returns true when this get usage o k response has a 3xx status code
func (*GetUsageOK) IsServerError ¶
func (o *GetUsageOK) IsServerError() bool
IsServerError returns true when this get usage o k response has a 5xx status code
func (*GetUsageOK) IsSuccess ¶
func (o *GetUsageOK) IsSuccess() bool
IsSuccess returns true when this get usage o k response has a 2xx status code
func (*GetUsageOK) String ¶
func (o *GetUsageOK) String() string
type GetUsageParams ¶
type GetUsageParams struct { // EndDate. // // Format: date EndDate *strfmt.Date // PluginProperty. PluginProperty []string // StartDate. // // Format: date StartDate *strfmt.Date // SubscriptionID. // // Format: uuid SubscriptionID strfmt.UUID // UnitType. UnitType 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 }
GetUsageParams contains all the parameters to send to the API endpoint
for the get usage operation. Typically these are written to a http.Request.
func NewGetUsageParams ¶
func NewGetUsageParams() *GetUsageParams
NewGetUsageParams creates a new GetUsageParams 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 NewGetUsageParamsWithContext ¶
func NewGetUsageParamsWithContext(ctx context.Context) *GetUsageParams
NewGetUsageParamsWithContext creates a new GetUsageParams object with the ability to set a context for a request.
func NewGetUsageParamsWithHTTPClient ¶
func NewGetUsageParamsWithHTTPClient(client *http.Client) *GetUsageParams
NewGetUsageParamsWithHTTPClient creates a new GetUsageParams object with the ability to set a custom HTTPClient for a request.
func NewGetUsageParamsWithTimeout ¶
func NewGetUsageParamsWithTimeout(timeout time.Duration) *GetUsageParams
NewGetUsageParamsWithTimeout creates a new GetUsageParams object with the ability to set a timeout on a request.
func (*GetUsageParams) SetContext ¶
func (o *GetUsageParams) SetContext(ctx context.Context)
SetContext adds the context to the get usage params
func (*GetUsageParams) SetDefaults ¶
func (o *GetUsageParams) SetDefaults()
SetDefaults hydrates default values in the get usage params (not the query body).
All values with no default are reset to their zero value.
func (*GetUsageParams) SetEndDate ¶
func (o *GetUsageParams) SetEndDate(endDate *strfmt.Date)
SetEndDate adds the endDate to the get usage params
func (*GetUsageParams) SetHTTPClient ¶
func (o *GetUsageParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the get usage params
func (*GetUsageParams) SetPluginProperty ¶
func (o *GetUsageParams) SetPluginProperty(pluginProperty []string)
SetPluginProperty adds the pluginProperty to the get usage params
func (*GetUsageParams) SetStartDate ¶
func (o *GetUsageParams) SetStartDate(startDate *strfmt.Date)
SetStartDate adds the startDate to the get usage params
func (*GetUsageParams) SetSubscriptionID ¶
func (o *GetUsageParams) SetSubscriptionID(subscriptionID strfmt.UUID)
SetSubscriptionID adds the subscriptionId to the get usage params
func (*GetUsageParams) SetTimeout ¶
func (o *GetUsageParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the get usage params
func (*GetUsageParams) SetUnitType ¶
func (o *GetUsageParams) SetUnitType(unitType string)
SetUnitType adds the unitType to the get usage params
func (*GetUsageParams) WithContext ¶
func (o *GetUsageParams) WithContext(ctx context.Context) *GetUsageParams
WithContext adds the context to the get usage params
func (*GetUsageParams) WithDefaults ¶
func (o *GetUsageParams) WithDefaults() *GetUsageParams
WithDefaults hydrates default values in the get usage params (not the query body).
All values with no default are reset to their zero value.
func (*GetUsageParams) WithEndDate ¶
func (o *GetUsageParams) WithEndDate(endDate *strfmt.Date) *GetUsageParams
WithEndDate adds the endDate to the get usage params
func (*GetUsageParams) WithHTTPClient ¶
func (o *GetUsageParams) WithHTTPClient(client *http.Client) *GetUsageParams
WithHTTPClient adds the HTTPClient to the get usage params
func (*GetUsageParams) WithPluginProperty ¶
func (o *GetUsageParams) WithPluginProperty(pluginProperty []string) *GetUsageParams
WithPluginProperty adds the pluginProperty to the get usage params
func (*GetUsageParams) WithStartDate ¶
func (o *GetUsageParams) WithStartDate(startDate *strfmt.Date) *GetUsageParams
WithStartDate adds the startDate to the get usage params
func (*GetUsageParams) WithSubscriptionID ¶
func (o *GetUsageParams) WithSubscriptionID(subscriptionID strfmt.UUID) *GetUsageParams
WithSubscriptionID adds the subscriptionID to the get usage params
func (*GetUsageParams) WithTimeout ¶
func (o *GetUsageParams) WithTimeout(timeout time.Duration) *GetUsageParams
WithTimeout adds the timeout to the get usage params
func (*GetUsageParams) WithUnitType ¶
func (o *GetUsageParams) WithUnitType(unitType string) *GetUsageParams
WithUnitType adds the unitType to the get usage params
func (*GetUsageParams) WriteToRequest ¶
func (o *GetUsageParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type GetUsageReader ¶
type GetUsageReader struct {
// contains filtered or unexported fields
}
GetUsageReader is a Reader for the GetUsage structure.
func (*GetUsageReader) ReadResponse ¶
func (o *GetUsageReader) 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.
type RecordUsageBadRequest ¶
type RecordUsageBadRequest struct {
HttpResponse runtime.ClientResponse
}
RecordUsageBadRequest describes a response with status code 400, with default header values.
Invalid subscription (e.g. inactive)
func NewRecordUsageBadRequest ¶
func NewRecordUsageBadRequest() *RecordUsageBadRequest
NewRecordUsageBadRequest creates a RecordUsageBadRequest with default headers values
func (*RecordUsageBadRequest) Code ¶
func (o *RecordUsageBadRequest) Code() int
Code gets the status code for the record usage bad request response
func (*RecordUsageBadRequest) Error ¶
func (o *RecordUsageBadRequest) Error() string
func (*RecordUsageBadRequest) IsClientError ¶
func (o *RecordUsageBadRequest) IsClientError() bool
IsClientError returns true when this record usage bad request response has a 4xx status code
func (*RecordUsageBadRequest) IsCode ¶
func (o *RecordUsageBadRequest) IsCode(code int) bool
IsCode returns true when this record usage bad request response a status code equal to that given
func (*RecordUsageBadRequest) IsRedirect ¶
func (o *RecordUsageBadRequest) IsRedirect() bool
IsRedirect returns true when this record usage bad request response has a 3xx status code
func (*RecordUsageBadRequest) IsServerError ¶
func (o *RecordUsageBadRequest) IsServerError() bool
IsServerError returns true when this record usage bad request response has a 5xx status code
func (*RecordUsageBadRequest) IsSuccess ¶
func (o *RecordUsageBadRequest) IsSuccess() bool
IsSuccess returns true when this record usage bad request response has a 2xx status code
func (*RecordUsageBadRequest) String ¶
func (o *RecordUsageBadRequest) String() string
type RecordUsageOK ¶
type RecordUsageOK struct {
HttpResponse runtime.ClientResponse
}
RecordUsageOK describes a response with status code 200, with default header values.
Successfully recorded usage data change
func NewRecordUsageOK ¶
func NewRecordUsageOK() *RecordUsageOK
NewRecordUsageOK creates a RecordUsageOK with default headers values
func (*RecordUsageOK) Code ¶
func (o *RecordUsageOK) Code() int
Code gets the status code for the record usage o k response
func (*RecordUsageOK) Error ¶
func (o *RecordUsageOK) Error() string
func (*RecordUsageOK) IsClientError ¶
func (o *RecordUsageOK) IsClientError() bool
IsClientError returns true when this record usage o k response has a 4xx status code
func (*RecordUsageOK) IsCode ¶
func (o *RecordUsageOK) IsCode(code int) bool
IsCode returns true when this record usage o k response a status code equal to that given
func (*RecordUsageOK) IsRedirect ¶
func (o *RecordUsageOK) IsRedirect() bool
IsRedirect returns true when this record usage o k response has a 3xx status code
func (*RecordUsageOK) IsServerError ¶
func (o *RecordUsageOK) IsServerError() bool
IsServerError returns true when this record usage o k response has a 5xx status code
func (*RecordUsageOK) IsSuccess ¶
func (o *RecordUsageOK) IsSuccess() bool
IsSuccess returns true when this record usage o k response has a 2xx status code
func (*RecordUsageOK) String ¶
func (o *RecordUsageOK) String() string
type RecordUsageParams ¶
type RecordUsageParams struct { // XKillbillComment. XKillbillComment *string // XKillbillCreatedBy. XKillbillCreatedBy string // XKillbillReason. XKillbillReason *string // Body. Body *kbmodel.SubscriptionUsageRecord 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 }
RecordUsageParams contains all the parameters to send to the API endpoint
for the record usage operation. Typically these are written to a http.Request.
func NewRecordUsageParams ¶
func NewRecordUsageParams() *RecordUsageParams
NewRecordUsageParams creates a new RecordUsageParams 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 NewRecordUsageParamsWithContext ¶
func NewRecordUsageParamsWithContext(ctx context.Context) *RecordUsageParams
NewRecordUsageParamsWithContext creates a new RecordUsageParams object with the ability to set a context for a request.
func NewRecordUsageParamsWithHTTPClient ¶
func NewRecordUsageParamsWithHTTPClient(client *http.Client) *RecordUsageParams
NewRecordUsageParamsWithHTTPClient creates a new RecordUsageParams object with the ability to set a custom HTTPClient for a request.
func NewRecordUsageParamsWithTimeout ¶
func NewRecordUsageParamsWithTimeout(timeout time.Duration) *RecordUsageParams
NewRecordUsageParamsWithTimeout creates a new RecordUsageParams object with the ability to set a timeout on a request.
func (*RecordUsageParams) SetBody ¶
func (o *RecordUsageParams) SetBody(body *kbmodel.SubscriptionUsageRecord)
SetBody adds the body to the record usage params
func (*RecordUsageParams) SetContext ¶
func (o *RecordUsageParams) SetContext(ctx context.Context)
SetContext adds the context to the record usage params
func (*RecordUsageParams) SetDefaults ¶
func (o *RecordUsageParams) SetDefaults()
SetDefaults hydrates default values in the record usage params (not the query body).
All values with no default are reset to their zero value.
func (*RecordUsageParams) SetHTTPClient ¶
func (o *RecordUsageParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the record usage params
func (*RecordUsageParams) SetTimeout ¶
func (o *RecordUsageParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the record usage params
func (*RecordUsageParams) SetXKillbillComment ¶
func (o *RecordUsageParams) SetXKillbillComment(xKillbillComment *string)
SetXKillbillComment adds the xKillbillComment to the record usage params
func (*RecordUsageParams) SetXKillbillCreatedBy ¶
func (o *RecordUsageParams) SetXKillbillCreatedBy(xKillbillCreatedBy string)
SetXKillbillCreatedBy adds the xKillbillCreatedBy to the record usage params
func (*RecordUsageParams) SetXKillbillReason ¶
func (o *RecordUsageParams) SetXKillbillReason(xKillbillReason *string)
SetXKillbillReason adds the xKillbillReason to the record usage params
func (*RecordUsageParams) WithBody ¶
func (o *RecordUsageParams) WithBody(body *kbmodel.SubscriptionUsageRecord) *RecordUsageParams
WithBody adds the body to the record usage params
func (*RecordUsageParams) WithContext ¶
func (o *RecordUsageParams) WithContext(ctx context.Context) *RecordUsageParams
WithContext adds the context to the record usage params
func (*RecordUsageParams) WithDefaults ¶
func (o *RecordUsageParams) WithDefaults() *RecordUsageParams
WithDefaults hydrates default values in the record usage params (not the query body).
All values with no default are reset to their zero value.
func (*RecordUsageParams) WithHTTPClient ¶
func (o *RecordUsageParams) WithHTTPClient(client *http.Client) *RecordUsageParams
WithHTTPClient adds the HTTPClient to the record usage params
func (*RecordUsageParams) WithTimeout ¶
func (o *RecordUsageParams) WithTimeout(timeout time.Duration) *RecordUsageParams
WithTimeout adds the timeout to the record usage params
func (*RecordUsageParams) WithXKillbillComment ¶
func (o *RecordUsageParams) WithXKillbillComment(xKillbillComment *string) *RecordUsageParams
WithXKillbillComment adds the xKillbillComment to the record usage params
func (*RecordUsageParams) WithXKillbillCreatedBy ¶
func (o *RecordUsageParams) WithXKillbillCreatedBy(xKillbillCreatedBy string) *RecordUsageParams
WithXKillbillCreatedBy adds the xKillbillCreatedBy to the record usage params
func (*RecordUsageParams) WithXKillbillReason ¶
func (o *RecordUsageParams) WithXKillbillReason(xKillbillReason *string) *RecordUsageParams
WithXKillbillReason adds the xKillbillReason to the record usage params
func (*RecordUsageParams) WriteToRequest ¶
func (o *RecordUsageParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type RecordUsageReader ¶
type RecordUsageReader struct {
// contains filtered or unexported fields
}
RecordUsageReader is a Reader for the RecordUsage structure.
func (*RecordUsageReader) ReadResponse ¶
func (o *RecordUsageReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.