Documentation ¶
Overview ¶
Package costs provides primitives to interact with the openapi HTTP API.
Code generated by github.com/do87/oapi-codegen version v0.5.1 DO NOT EDIT.
Index ¶
- Constants
- Variables
- func NewGetCostsForAllProjectsInAllSubCustomerAccountsRequest(ctx context.Context, server string, customerAccountId openapi_types.UUID, ...) (*http.Request, error)
- func NewGetCostsForAllProjectsInCustomerAccountRequest(ctx context.Context, server string, customerAccountId openapi_types.UUID, ...) (*http.Request, error)
- func NewGetForecastCustomerAccountRequest(ctx context.Context, server string, customerAccountId openapi_types.UUID, ...) (*http.Request, error)
- func NewGetProjectCostsRequest(ctx context.Context, server string, customerAccountId openapi_types.UUID, ...) (*http.Request, error)
- type Client
- func (c *Client) GetCostsForAllProjectsInAllSubCustomerAccounts(ctx context.Context, customerAccountId openapi_types.UUID, ...) (*http.Response, error)
- func (c *Client) GetCostsForAllProjectsInCustomerAccount(ctx context.Context, customerAccountId openapi_types.UUID, ...) (*http.Response, error)
- func (c *Client) GetForecastCustomerAccount(ctx context.Context, customerAccountId openapi_types.UUID, ...) (*http.Response, error)
- func (c *Client) GetProjectCosts(ctx context.Context, customerAccountId openapi_types.UUID, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) GetCostsForAllProjectsInAllSubCustomerAccountsWithResponse(ctx context.Context, customerAccountId openapi_types.UUID, ...) (*GetCostsForAllProjectsInAllSubCustomerAccountsResponse, error)
- func (c *ClientWithResponses) GetCostsForAllProjectsInCustomerAccountWithResponse(ctx context.Context, customerAccountId openapi_types.UUID, ...) (*GetCostsForAllProjectsInCustomerAccountResponse, error)
- func (c *ClientWithResponses) GetForecastCustomerAccountWithResponse(ctx context.Context, customerAccountId openapi_types.UUID, ...) (*GetForecastCustomerAccountResponse, error)
- func (c *ClientWithResponses) GetProjectCostsWithResponse(ctx context.Context, customerAccountId openapi_types.UUID, ...) (*GetProjectCostsResponse, error)
- func (c *ClientWithResponses) ParseGetCostsForAllProjectsInAllSubCustomerAccountsResponse(rsp *http.Response) (*GetCostsForAllProjectsInAllSubCustomerAccountsResponse, error)
- func (c *ClientWithResponses) ParseGetCostsForAllProjectsInCustomerAccountResponse(rsp *http.Response) (*GetCostsForAllProjectsInCustomerAccountResponse, error)
- func (c *ClientWithResponses) ParseGetForecastCustomerAccountResponse(rsp *http.Response) (*GetForecastCustomerAccountResponse, error)
- func (c *ClientWithResponses) ParseGetProjectCostsResponse(rsp *http.Response) (*GetProjectCostsResponse, error)
- type ClientWithResponsesInterface
- type GetCostsForAllProjectsInAllSubCustomerAccountsParams
- type GetCostsForAllProjectsInAllSubCustomerAccountsParamsAccept
- type GetCostsForAllProjectsInAllSubCustomerAccountsParamsDepth
- type GetCostsForAllProjectsInAllSubCustomerAccountsParamsGranularity
- type GetCostsForAllProjectsInAllSubCustomerAccountsResponse
- type GetCostsForAllProjectsInCustomerAccountParams
- type GetCostsForAllProjectsInCustomerAccountParamsAccept
- type GetCostsForAllProjectsInCustomerAccountParamsDepth
- type GetCostsForAllProjectsInCustomerAccountParamsGranularity
- type GetCostsForAllProjectsInCustomerAccountResponse
- type GetForecastCustomerAccountParams
- type GetForecastCustomerAccountParamsAccept
- type GetForecastCustomerAccountParamsGranularity
- type GetForecastCustomerAccountResponse
- type GetProjectCostsParams
- type GetProjectCostsParamsAccept
- type GetProjectCostsParamsDepth
- type GetProjectCostsParamsGranularity
- type GetProjectCostsResponse
- type RequestEditorFn
Constants ¶
const (
BearerAuthScopes = "bearerAuth.Scopes"
)
Variables ¶
var BaseURLs = urls.Init(
"costs",
"https://api.stackit.cloud/costs-service/v1/",
"https://api-qa.stackit.cloud/costs-service/v1/",
"https://api-dev.stackit.cloud/costs-service/v1/",
)
Functions ¶
func NewGetCostsForAllProjectsInAllSubCustomerAccountsRequest ¶
func NewGetCostsForAllProjectsInAllSubCustomerAccountsRequest(ctx context.Context, server string, customerAccountId openapi_types.UUID, params *GetCostsForAllProjectsInAllSubCustomerAccountsParams) (*http.Request, error)
NewGetCostsForAllProjectsInAllSubCustomerAccountsRequest generates requests for GetCostsForAllProjectsInAllSubCustomerAccounts
func NewGetCostsForAllProjectsInCustomerAccountRequest ¶
func NewGetCostsForAllProjectsInCustomerAccountRequest(ctx context.Context, server string, customerAccountId openapi_types.UUID, params *GetCostsForAllProjectsInCustomerAccountParams) (*http.Request, error)
NewGetCostsForAllProjectsInCustomerAccountRequest generates requests for GetCostsForAllProjectsInCustomerAccount
func NewGetForecastCustomerAccountRequest ¶
func NewGetForecastCustomerAccountRequest(ctx context.Context, server string, customerAccountId openapi_types.UUID, params *GetForecastCustomerAccountParams) (*http.Request, error)
NewGetForecastCustomerAccountRequest generates requests for GetForecastCustomerAccount
func NewGetProjectCostsRequest ¶
func NewGetProjectCostsRequest(ctx context.Context, server string, customerAccountId openapi_types.UUID, projectId openapi_types.UUID, params *GetProjectCostsParams) (*http.Request, error)
NewGetProjectCostsRequest generates requests for GetProjectCosts
Types ¶
type Client ¶
type Client struct { // The endpoint of the server conforming to this interface, with scheme, // https://api.deepmap.com for example. This can contain a path relative // to the server, such as https://api.deepmap.com/dev-test, and all the // paths in the swagger spec will be appended to the server. Server string // Doer for performing requests, typically a *http.Client with any // customized settings, such as certificate chains. Client common.Client // A list of callbacks for modifying requests which are generated before sending over // the network. RequestEditors []RequestEditorFn }
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) GetCostsForAllProjectsInAllSubCustomerAccounts ¶
func (c *Client) GetCostsForAllProjectsInAllSubCustomerAccounts(ctx context.Context, customerAccountId openapi_types.UUID, params *GetCostsForAllProjectsInAllSubCustomerAccountsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetCostsForAllProjectsInCustomerAccount ¶
func (c *Client) GetCostsForAllProjectsInCustomerAccount(ctx context.Context, customerAccountId openapi_types.UUID, params *GetCostsForAllProjectsInCustomerAccountParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetForecastCustomerAccount ¶
func (c *Client) GetForecastCustomerAccount(ctx context.Context, customerAccountId openapi_types.UUID, params *GetForecastCustomerAccountParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetProjectCosts ¶
func (c *Client) GetProjectCosts(ctx context.Context, customerAccountId openapi_types.UUID, projectId openapi_types.UUID, params *GetProjectCostsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface { // GetCostsForAllProjectsInCustomerAccount request GetCostsForAllProjectsInCustomerAccount(ctx context.Context, customerAccountId openapi_types.UUID, params *GetCostsForAllProjectsInCustomerAccountParams, reqEditors ...RequestEditorFn) (*http.Response, error) // GetCostsForAllProjectsInAllSubCustomerAccounts request GetCostsForAllProjectsInAllSubCustomerAccounts(ctx context.Context, customerAccountId openapi_types.UUID, params *GetCostsForAllProjectsInAllSubCustomerAccountsParams, reqEditors ...RequestEditorFn) (*http.Response, error) // GetProjectCosts request GetProjectCosts(ctx context.Context, customerAccountId openapi_types.UUID, projectId openapi_types.UUID, params *GetProjectCostsParams, reqEditors ...RequestEditorFn) (*http.Response, error) // GetForecastCustomerAccount request GetForecastCustomerAccount(ctx context.Context, customerAccountId openapi_types.UUID, params *GetForecastCustomerAccountParams, reqEditors ...RequestEditorFn) (*http.Response, error) }
The interface specification for the client above.
type ClientOption ¶ added in v1.12.6
ClientOption allows setting custom parameters during construction
func WithBaseURL ¶ added in v1.12.6
func WithBaseURL(baseURL string) ClientOption
WithBaseURL overrides the baseURL.
func WithHTTPClient ¶ added in v1.12.6
func WithHTTPClient(doer common.Client) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶ added in v1.12.6
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func NewService ¶
func NewService(c common.Client) *ClientWithResponses
func (*ClientWithResponses) GetCostsForAllProjectsInAllSubCustomerAccountsWithResponse ¶
func (c *ClientWithResponses) GetCostsForAllProjectsInAllSubCustomerAccountsWithResponse(ctx context.Context, customerAccountId openapi_types.UUID, params *GetCostsForAllProjectsInAllSubCustomerAccountsParams, reqEditors ...RequestEditorFn) (*GetCostsForAllProjectsInAllSubCustomerAccountsResponse, error)
GetCostsForAllProjectsInAllSubCustomerAccountsWithResponse request returning *GetCostsForAllProjectsInAllSubCustomerAccountsResponse
func (*ClientWithResponses) GetCostsForAllProjectsInCustomerAccountWithResponse ¶
func (c *ClientWithResponses) GetCostsForAllProjectsInCustomerAccountWithResponse(ctx context.Context, customerAccountId openapi_types.UUID, params *GetCostsForAllProjectsInCustomerAccountParams, reqEditors ...RequestEditorFn) (*GetCostsForAllProjectsInCustomerAccountResponse, error)
GetCostsForAllProjectsInCustomerAccountWithResponse request returning *GetCostsForAllProjectsInCustomerAccountResponse
func (*ClientWithResponses) GetForecastCustomerAccountWithResponse ¶
func (c *ClientWithResponses) GetForecastCustomerAccountWithResponse(ctx context.Context, customerAccountId openapi_types.UUID, params *GetForecastCustomerAccountParams, reqEditors ...RequestEditorFn) (*GetForecastCustomerAccountResponse, error)
GetForecastCustomerAccountWithResponse request returning *GetForecastCustomerAccountResponse
func (*ClientWithResponses) GetProjectCostsWithResponse ¶
func (c *ClientWithResponses) GetProjectCostsWithResponse(ctx context.Context, customerAccountId openapi_types.UUID, projectId openapi_types.UUID, params *GetProjectCostsParams, reqEditors ...RequestEditorFn) (*GetProjectCostsResponse, error)
GetProjectCostsWithResponse request returning *GetProjectCostsResponse
func (*ClientWithResponses) ParseGetCostsForAllProjectsInAllSubCustomerAccountsResponse ¶
func (c *ClientWithResponses) ParseGetCostsForAllProjectsInAllSubCustomerAccountsResponse(rsp *http.Response) (*GetCostsForAllProjectsInAllSubCustomerAccountsResponse, error)
ParseGetCostsForAllProjectsInAllSubCustomerAccountsResponse parses an HTTP response from a GetCostsForAllProjectsInAllSubCustomerAccountsWithResponse call
func (*ClientWithResponses) ParseGetCostsForAllProjectsInCustomerAccountResponse ¶
func (c *ClientWithResponses) ParseGetCostsForAllProjectsInCustomerAccountResponse(rsp *http.Response) (*GetCostsForAllProjectsInCustomerAccountResponse, error)
ParseGetCostsForAllProjectsInCustomerAccountResponse parses an HTTP response from a GetCostsForAllProjectsInCustomerAccountWithResponse call
func (*ClientWithResponses) ParseGetForecastCustomerAccountResponse ¶
func (c *ClientWithResponses) ParseGetForecastCustomerAccountResponse(rsp *http.Response) (*GetForecastCustomerAccountResponse, error)
ParseGetForecastCustomerAccountResponse parses an HTTP response from a GetForecastCustomerAccountWithResponse call
func (*ClientWithResponses) ParseGetProjectCostsResponse ¶
func (c *ClientWithResponses) ParseGetProjectCostsResponse(rsp *http.Response) (*GetProjectCostsResponse, error)
ParseGetProjectCostsResponse parses an HTTP response from a GetProjectCostsWithResponse call
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // GetCostsForAllProjectsInCustomerAccount request GetCostsForAllProjectsInCustomerAccountWithResponse(ctx context.Context, customerAccountId openapi_types.UUID, params *GetCostsForAllProjectsInCustomerAccountParams, reqEditors ...RequestEditorFn) (*GetCostsForAllProjectsInCustomerAccountResponse, error) // GetCostsForAllProjectsInAllSubCustomerAccounts request GetCostsForAllProjectsInAllSubCustomerAccountsWithResponse(ctx context.Context, customerAccountId openapi_types.UUID, params *GetCostsForAllProjectsInAllSubCustomerAccountsParams, reqEditors ...RequestEditorFn) (*GetCostsForAllProjectsInAllSubCustomerAccountsResponse, error) // GetProjectCosts request GetProjectCostsWithResponse(ctx context.Context, customerAccountId openapi_types.UUID, projectId openapi_types.UUID, params *GetProjectCostsParams, reqEditors ...RequestEditorFn) (*GetProjectCostsResponse, error) // GetForecastCustomerAccount request GetForecastCustomerAccountWithResponse(ctx context.Context, customerAccountId openapi_types.UUID, params *GetForecastCustomerAccountParams, reqEditors ...RequestEditorFn) (*GetForecastCustomerAccountResponse, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type GetCostsForAllProjectsInAllSubCustomerAccountsParams ¶
type GetCostsForAllProjectsInAllSubCustomerAccountsParams struct { // From Start date (including) From openapi_types.Date `form:"from" json:"from"` // To End date (including) To openapi_types.Date `form:"to" json:"to"` // Depth Depth of desired cost information. "project" provides costs grouped by project, without services. "service" provides costs separated on service level. Depth *GetCostsForAllProjectsInAllSubCustomerAccountsParamsDepth `form:"depth,omitempty" json:"depth,omitempty"` // Granularity Define granularity of costs – Default is "none" which does NOT include detailed report data. // // If "monthly", "weekly" or "yearly" is requested, the "from" parameter SHOULD be the first day and the "to" parameter SHOULD be the last day of that time period. // If not, they are normalized accordingly. // // If "daily" is requested, the date range defined by "from" and "to" MUST NOT be longer than 92 days. Granularity *GetCostsForAllProjectsInAllSubCustomerAccountsParamsGranularity `form:"granularity,omitempty" json:"granularity,omitempty"` // IncludeZeroCosts Whether costs of 0 should be included in the response IncludeZeroCosts *bool `form:"includeZeroCosts,omitempty" json:"includeZeroCosts,omitempty"` // Accept Desired content type Accept *GetCostsForAllProjectsInAllSubCustomerAccountsParamsAccept `json:"Accept,omitempty"` }
GetCostsForAllProjectsInAllSubCustomerAccountsParams defines parameters for GetCostsForAllProjectsInAllSubCustomerAccounts.
type GetCostsForAllProjectsInAllSubCustomerAccountsParamsAccept ¶
type GetCostsForAllProjectsInAllSubCustomerAccountsParamsAccept string
GetCostsForAllProjectsInAllSubCustomerAccountsParamsAccept defines parameters for GetCostsForAllProjectsInAllSubCustomerAccounts.
const ( GET_COSTS_FOR_ALL_PROJECTS_IN_ALL_SUB_CUSTOMER_ACCOUNTS_PARAMS_ACCEPT_APPLICATION_JSON GetCostsForAllProjectsInAllSubCustomerAccountsParamsAccept = "application/json" GET_COSTS_FOR_ALL_PROJECTS_IN_ALL_SUB_CUSTOMER_ACCOUNTS_PARAMS_ACCEPT_TEXT_CSV GetCostsForAllProjectsInAllSubCustomerAccountsParamsAccept = "text/csv" )
Defines values for GetCostsForAllProjectsInAllSubCustomerAccountsParamsAccept.
type GetCostsForAllProjectsInAllSubCustomerAccountsParamsDepth ¶
type GetCostsForAllProjectsInAllSubCustomerAccountsParamsDepth string
GetCostsForAllProjectsInAllSubCustomerAccountsParamsDepth defines parameters for GetCostsForAllProjectsInAllSubCustomerAccounts.
const ( GET_COSTS_FOR_ALL_PROJECTS_IN_ALL_SUB_CUSTOMER_ACCOUNTS_PARAMS_DEPTH_AUTO GetCostsForAllProjectsInAllSubCustomerAccountsParamsDepth = "auto" GET_COSTS_FOR_ALL_PROJECTS_IN_ALL_SUB_CUSTOMER_ACCOUNTS_PARAMS_DEPTH_PROJECT GetCostsForAllProjectsInAllSubCustomerAccountsParamsDepth = "project" GET_COSTS_FOR_ALL_PROJECTS_IN_ALL_SUB_CUSTOMER_ACCOUNTS_PARAMS_DEPTH_SERVICE GetCostsForAllProjectsInAllSubCustomerAccountsParamsDepth = "service" )
Defines values for GetCostsForAllProjectsInAllSubCustomerAccountsParamsDepth.
type GetCostsForAllProjectsInAllSubCustomerAccountsParamsGranularity ¶
type GetCostsForAllProjectsInAllSubCustomerAccountsParamsGranularity string
GetCostsForAllProjectsInAllSubCustomerAccountsParamsGranularity defines parameters for GetCostsForAllProjectsInAllSubCustomerAccounts.
const ( GET_COSTS_FOR_ALL_PROJECTS_IN_ALL_SUB_CUSTOMER_ACCOUNTS_PARAMS_GRANULARITY_DAILY GetCostsForAllProjectsInAllSubCustomerAccountsParamsGranularity = "daily" GET_COSTS_FOR_ALL_PROJECTS_IN_ALL_SUB_CUSTOMER_ACCOUNTS_PARAMS_GRANULARITY_MONTHLY GetCostsForAllProjectsInAllSubCustomerAccountsParamsGranularity = "monthly" GET_COSTS_FOR_ALL_PROJECTS_IN_ALL_SUB_CUSTOMER_ACCOUNTS_PARAMS_GRANULARITY_NONE GetCostsForAllProjectsInAllSubCustomerAccountsParamsGranularity = "none" GET_COSTS_FOR_ALL_PROJECTS_IN_ALL_SUB_CUSTOMER_ACCOUNTS_PARAMS_GRANULARITY_WEEKLY GetCostsForAllProjectsInAllSubCustomerAccountsParamsGranularity = "weekly" GET_COSTS_FOR_ALL_PROJECTS_IN_ALL_SUB_CUSTOMER_ACCOUNTS_PARAMS_GRANULARITY_YEARLY GetCostsForAllProjectsInAllSubCustomerAccountsParamsGranularity = "yearly" )
Defines values for GetCostsForAllProjectsInAllSubCustomerAccountsParamsGranularity.
type GetCostsForAllProjectsInAllSubCustomerAccountsResponse ¶
type GetCostsForAllProjectsInAllSubCustomerAccountsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *[]struct { CustomerAccountID openapi_types.UUID `json:"customerAccountId"` ProjectID openapi_types.UUID `json:"projectId"` ProjectName string `json:"projectName"` // ReportData Detailed project costs which are ONLY included if granularity is provided AND depth is "project" ReportData *[]struct { // Charge Charge, value in cents Charge float64 `json:"charge"` // Discount Discount, value in cents Discount float64 `json:"discount"` // Quantity Quantity Quantity int32 `json:"quantity"` // TimePeriod Time period according to desired granularity TimePeriod struct { End *openapi_types.Date `json:"end,omitempty"` Start *openapi_types.Date `json:"start,omitempty"` } `json:"timePeriod"` } `json:"reportData,omitempty"` // Services Total discount for all services and the whole requested date range (value in cents). Please see "depth" parameter for more details. Services *[]struct { // ReportData Detailed service costs which are ONLY included if granularity is provided ReportData *[]struct { // Charge Charge, value in cents Charge float64 `json:"charge"` // Discount Discount, value in cents Discount float64 `json:"discount"` // Quantity Quantity Quantity int32 `json:"quantity"` // TimePeriod Time period according to desired granularity TimePeriod struct { End *openapi_types.Date `json:"end,omitempty"` Start *openapi_types.Date `json:"start,omitempty"` } `json:"timePeriod"` } `json:"reportData,omitempty"` // ServiceCategoryName Service category name ServiceCategoryName string `json:"serviceCategoryName"` // ServiceName Name of the service ServiceName string `json:"serviceName"` // Sku Service key Sku string `json:"sku"` // TotalCharge Total charge for the whole requested date range (value in cents) TotalCharge float64 `json:"totalCharge"` // TotalDiscount Total discount for the whole requested date range (value in cents) TotalDiscount float64 `json:"totalDiscount"` // TotalQuantity Total quantity TotalQuantity int32 `json:"totalQuantity"` // UnitLabel Label for unit UnitLabel string `json:"unitLabel"` } `json:"services,omitempty"` // TotalCharge Total charge for all services and the whole requested date range (value in cents) TotalCharge float64 `json:"totalCharge"` // TotalDiscount Total discount for all services and the whole requested date range (value in cents) TotalDiscount float64 `json:"totalDiscount"` } JSONDefault *struct { Code string `json:"code"` Message *string `json:"message,omitempty"` } HasError error // Aggregated error }
func (GetCostsForAllProjectsInAllSubCustomerAccountsResponse) Status ¶
func (r GetCostsForAllProjectsInAllSubCustomerAccountsResponse) Status() string
Status returns HTTPResponse.Status
func (GetCostsForAllProjectsInAllSubCustomerAccountsResponse) StatusCode ¶
func (r GetCostsForAllProjectsInAllSubCustomerAccountsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetCostsForAllProjectsInCustomerAccountParams ¶
type GetCostsForAllProjectsInCustomerAccountParams struct { // From Start date (including) From openapi_types.Date `form:"from" json:"from"` // To End date (including) To openapi_types.Date `form:"to" json:"to"` // Depth Depth of desired cost information. "project" provides costs grouped by project, without services. "service" provides costs separated on service level. Depth *GetCostsForAllProjectsInCustomerAccountParamsDepth `form:"depth,omitempty" json:"depth,omitempty"` // Granularity Define granularity of costs – Default is "none" which does NOT include detailed report data. // // If "monthly", "weekly" or "yearly" is requested, the "from" parameter SHOULD be the first day and the "to" parameter SHOULD be the last day of that time period. // If not, they are normalized accordingly. // // If "daily" is requested, the date range defined by "from" and "to" MUST NOT be longer than 92 days. Granularity *GetCostsForAllProjectsInCustomerAccountParamsGranularity `form:"granularity,omitempty" json:"granularity,omitempty"` // IncludeZeroCosts Whether costs of 0 should be included in the response IncludeZeroCosts *bool `form:"includeZeroCosts,omitempty" json:"includeZeroCosts,omitempty"` // Accept Desired content type Accept *GetCostsForAllProjectsInCustomerAccountParamsAccept `json:"Accept,omitempty"` }
GetCostsForAllProjectsInCustomerAccountParams defines parameters for GetCostsForAllProjectsInCustomerAccount.
type GetCostsForAllProjectsInCustomerAccountParamsAccept ¶
type GetCostsForAllProjectsInCustomerAccountParamsAccept string
GetCostsForAllProjectsInCustomerAccountParamsAccept defines parameters for GetCostsForAllProjectsInCustomerAccount.
const ( GET_COSTS_FOR_ALL_PROJECTS_IN_CUSTOMER_ACCOUNT_PARAMS_ACCEPT_APPLICATION_JSON GetCostsForAllProjectsInCustomerAccountParamsAccept = "application/json" GET_COSTS_FOR_ALL_PROJECTS_IN_CUSTOMER_ACCOUNT_PARAMS_ACCEPT_TEXT_CSV GetCostsForAllProjectsInCustomerAccountParamsAccept = "text/csv" )
Defines values for GetCostsForAllProjectsInCustomerAccountParamsAccept.
type GetCostsForAllProjectsInCustomerAccountParamsDepth ¶
type GetCostsForAllProjectsInCustomerAccountParamsDepth string
GetCostsForAllProjectsInCustomerAccountParamsDepth defines parameters for GetCostsForAllProjectsInCustomerAccount.
const ( GET_COSTS_FOR_ALL_PROJECTS_IN_CUSTOMER_ACCOUNT_PARAMS_DEPTH_AUTO GetCostsForAllProjectsInCustomerAccountParamsDepth = "auto" GET_COSTS_FOR_ALL_PROJECTS_IN_CUSTOMER_ACCOUNT_PARAMS_DEPTH_PROJECT GetCostsForAllProjectsInCustomerAccountParamsDepth = "project" GET_COSTS_FOR_ALL_PROJECTS_IN_CUSTOMER_ACCOUNT_PARAMS_DEPTH_SERVICE GetCostsForAllProjectsInCustomerAccountParamsDepth = "service" )
Defines values for GetCostsForAllProjectsInCustomerAccountParamsDepth.
type GetCostsForAllProjectsInCustomerAccountParamsGranularity ¶
type GetCostsForAllProjectsInCustomerAccountParamsGranularity string
GetCostsForAllProjectsInCustomerAccountParamsGranularity defines parameters for GetCostsForAllProjectsInCustomerAccount.
const ( GET_COSTS_FOR_ALL_PROJECTS_IN_CUSTOMER_ACCOUNT_PARAMS_GRANULARITY_DAILY GetCostsForAllProjectsInCustomerAccountParamsGranularity = "daily" GET_COSTS_FOR_ALL_PROJECTS_IN_CUSTOMER_ACCOUNT_PARAMS_GRANULARITY_MONTHLY GetCostsForAllProjectsInCustomerAccountParamsGranularity = "monthly" GET_COSTS_FOR_ALL_PROJECTS_IN_CUSTOMER_ACCOUNT_PARAMS_GRANULARITY_NONE GetCostsForAllProjectsInCustomerAccountParamsGranularity = "none" GET_COSTS_FOR_ALL_PROJECTS_IN_CUSTOMER_ACCOUNT_PARAMS_GRANULARITY_WEEKLY GetCostsForAllProjectsInCustomerAccountParamsGranularity = "weekly" GET_COSTS_FOR_ALL_PROJECTS_IN_CUSTOMER_ACCOUNT_PARAMS_GRANULARITY_YEARLY GetCostsForAllProjectsInCustomerAccountParamsGranularity = "yearly" )
Defines values for GetCostsForAllProjectsInCustomerAccountParamsGranularity.
type GetCostsForAllProjectsInCustomerAccountResponse ¶
type GetCostsForAllProjectsInCustomerAccountResponse struct { Body []byte HTTPResponse *http.Response JSON200 *[]struct { CustomerAccountID openapi_types.UUID `json:"customerAccountId"` ProjectID openapi_types.UUID `json:"projectId"` ProjectName string `json:"projectName"` // ReportData Detailed project costs which are ONLY included if granularity is provided AND depth is "project" ReportData *[]struct { // Charge Charge, value in cents Charge float64 `json:"charge"` // Discount Discount, value in cents Discount float64 `json:"discount"` // Quantity Quantity Quantity int32 `json:"quantity"` // TimePeriod Time period according to desired granularity TimePeriod struct { End *openapi_types.Date `json:"end,omitempty"` Start *openapi_types.Date `json:"start,omitempty"` } `json:"timePeriod"` } `json:"reportData,omitempty"` // Services Total discount for all services and the whole requested date range (value in cents). Please see "depth" parameter for more details. Services *[]struct { // ReportData Detailed service costs which are ONLY included if granularity is provided ReportData *[]struct { // Charge Charge, value in cents Charge float64 `json:"charge"` // Discount Discount, value in cents Discount float64 `json:"discount"` // Quantity Quantity Quantity int32 `json:"quantity"` // TimePeriod Time period according to desired granularity TimePeriod struct { End *openapi_types.Date `json:"end,omitempty"` Start *openapi_types.Date `json:"start,omitempty"` } `json:"timePeriod"` } `json:"reportData,omitempty"` // ServiceCategoryName Service category name ServiceCategoryName string `json:"serviceCategoryName"` // ServiceName Name of the service ServiceName string `json:"serviceName"` // Sku Service key Sku string `json:"sku"` // TotalCharge Total charge for the whole requested date range (value in cents) TotalCharge float64 `json:"totalCharge"` // TotalDiscount Total discount for the whole requested date range (value in cents) TotalDiscount float64 `json:"totalDiscount"` // TotalQuantity Total quantity TotalQuantity int32 `json:"totalQuantity"` // UnitLabel Label for unit UnitLabel string `json:"unitLabel"` } `json:"services,omitempty"` // TotalCharge Total charge for all services and the whole requested date range (value in cents) TotalCharge float64 `json:"totalCharge"` // TotalDiscount Total discount for all services and the whole requested date range (value in cents) TotalDiscount float64 `json:"totalDiscount"` } JSONDefault *struct { Code string `json:"code"` Message *string `json:"message,omitempty"` } HasError error // Aggregated error }
func (GetCostsForAllProjectsInCustomerAccountResponse) Status ¶
func (r GetCostsForAllProjectsInCustomerAccountResponse) Status() string
Status returns HTTPResponse.Status
func (GetCostsForAllProjectsInCustomerAccountResponse) StatusCode ¶
func (r GetCostsForAllProjectsInCustomerAccountResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetForecastCustomerAccountParams ¶
type GetForecastCustomerAccountParams struct { // From Start date (including) From openapi_types.Date `form:"from" json:"from"` // To End date (including), maximum 3 months in the future To openapi_types.Date `form:"to" json:"to"` // Granularity Define granularity of costs – Default is "none" which does NOT include detailed report data. // // If "monthly" or "weekly" is requested, the "from" parameter SHOULD be the first day and the "to" parameter SHOULD be the last day of that time period. // If not, they are normalized accordingly. // // If "daily" is requested, the date range defined by "from" and "to" MUST NOT be longer than 92 days. Granularity *GetForecastCustomerAccountParamsGranularity `form:"granularity,omitempty" json:"granularity,omitempty"` // Accept Desired content type Accept *GetForecastCustomerAccountParamsAccept `json:"Accept,omitempty"` }
GetForecastCustomerAccountParams defines parameters for GetForecastCustomerAccount.
type GetForecastCustomerAccountParamsAccept ¶
type GetForecastCustomerAccountParamsAccept string
GetForecastCustomerAccountParamsAccept defines parameters for GetForecastCustomerAccount.
const ( GET_FORECAST_CUSTOMER_ACCOUNT_PARAMS_ACCEPT_APPLICATION_JSON GetForecastCustomerAccountParamsAccept = "application/json" GET_FORECAST_CUSTOMER_ACCOUNT_PARAMS_ACCEPT_TEXT_CSV GetForecastCustomerAccountParamsAccept = "text/csv" )
Defines values for GetForecastCustomerAccountParamsAccept.
type GetForecastCustomerAccountParamsGranularity ¶
type GetForecastCustomerAccountParamsGranularity string
GetForecastCustomerAccountParamsGranularity defines parameters for GetForecastCustomerAccount.
const ( GET_FORECAST_CUSTOMER_ACCOUNT_PARAMS_GRANULARITY_DAILY GetForecastCustomerAccountParamsGranularity = "daily" GET_FORECAST_CUSTOMER_ACCOUNT_PARAMS_GRANULARITY_MONTHLY GetForecastCustomerAccountParamsGranularity = "monthly" GET_FORECAST_CUSTOMER_ACCOUNT_PARAMS_GRANULARITY_NONE GetForecastCustomerAccountParamsGranularity = "none" GET_FORECAST_CUSTOMER_ACCOUNT_PARAMS_GRANULARITY_WEEKLY GetForecastCustomerAccountParamsGranularity = "weekly" )
Defines values for GetForecastCustomerAccountParamsGranularity.
type GetForecastCustomerAccountResponse ¶
type GetForecastCustomerAccountResponse struct { Body []byte HTTPResponse *http.Response JSON200 *[]struct { CustomerAccountID openapi_types.UUID `json:"customerAccountId"` ProjectID openapi_types.UUID `json:"projectId"` ProjectName string `json:"projectName"` // ReportData Detailed forcasted project costs which are ONLY included if granularity is provided AND depth is "project" ReportData *[]struct { // Charge Forecasted charge, value in cents Charge float64 `json:"charge"` // TimePeriod Time period according to desired granularity TimePeriod struct { End *openapi_types.Date `json:"end,omitempty"` Start *openapi_types.Date `json:"start,omitempty"` } `json:"timePeriod"` } `json:"reportData,omitempty"` // TotalCharge Total forecasted charge for all services and the whole requested date range (value in cents) TotalCharge float64 `json:"totalCharge"` } JSONDefault *struct { Code string `json:"code"` Message *string `json:"message,omitempty"` } HasError error // Aggregated error }
func (GetForecastCustomerAccountResponse) Status ¶
func (r GetForecastCustomerAccountResponse) Status() string
Status returns HTTPResponse.Status
func (GetForecastCustomerAccountResponse) StatusCode ¶
func (r GetForecastCustomerAccountResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetProjectCostsParams ¶
type GetProjectCostsParams struct { // From Start date (including) From openapi_types.Date `form:"from" json:"from"` // To End date (including) To openapi_types.Date `form:"to" json:"to"` // Depth Depth of desired cost information. "project" provides costs grouped by project, without services. "service" provides costs separated on service level. Depth *GetProjectCostsParamsDepth `form:"depth,omitempty" json:"depth,omitempty"` // Granularity Define granularity of costs – Default is "none" which does NOT include detailed report data. // // If "monthly", "weekly" or "yearly" is requested, the "from" parameter SHOULD be the first day and the "to" parameter SHOULD be the last day of that time period. // If not, they are normalized accordingly. // // If "daily" is requested, the date range defined by "from" and "to" MUST NOT be longer than 92 days. Granularity *GetProjectCostsParamsGranularity `form:"granularity,omitempty" json:"granularity,omitempty"` // IncludeZeroCosts Whether costs of 0 should be included in the response IncludeZeroCosts *bool `form:"includeZeroCosts,omitempty" json:"includeZeroCosts,omitempty"` // Accept Desired content type Accept *GetProjectCostsParamsAccept `json:"Accept,omitempty"` }
GetProjectCostsParams defines parameters for GetProjectCosts.
type GetProjectCostsParamsAccept ¶
type GetProjectCostsParamsAccept string
GetProjectCostsParamsAccept defines parameters for GetProjectCosts.
const ( GET_PROJECT_COSTS_PARAMS_ACCEPT_APPLICATION_JSON GetProjectCostsParamsAccept = "application/json" GET_PROJECT_COSTS_PARAMS_ACCEPT_TEXT_CSV GetProjectCostsParamsAccept = "text/csv" )
Defines values for GetProjectCostsParamsAccept.
type GetProjectCostsParamsDepth ¶
type GetProjectCostsParamsDepth string
GetProjectCostsParamsDepth defines parameters for GetProjectCosts.
const ( AUTO GetProjectCostsParamsDepth = "auto" PROJECT GetProjectCostsParamsDepth = "project" SERVICE GetProjectCostsParamsDepth = "service" )
Defines values for GetProjectCostsParamsDepth.
type GetProjectCostsParamsGranularity ¶
type GetProjectCostsParamsGranularity string
GetProjectCostsParamsGranularity defines parameters for GetProjectCosts.
const ( GET_PROJECT_COSTS_PARAMS_GRANULARITY_DAILY GetProjectCostsParamsGranularity = "daily" GET_PROJECT_COSTS_PARAMS_GRANULARITY_MONTHLY GetProjectCostsParamsGranularity = "monthly" GET_PROJECT_COSTS_PARAMS_GRANULARITY_NONE GetProjectCostsParamsGranularity = "none" GET_PROJECT_COSTS_PARAMS_GRANULARITY_WEEKLY GetProjectCostsParamsGranularity = "weekly" GET_PROJECT_COSTS_PARAMS_GRANULARITY_YEARLY GetProjectCostsParamsGranularity = "yearly" )
Defines values for GetProjectCostsParamsGranularity.
type GetProjectCostsResponse ¶
type GetProjectCostsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { CustomerAccountID openapi_types.UUID `json:"customerAccountId"` ProjectID openapi_types.UUID `json:"projectId"` ProjectName string `json:"projectName"` // ReportData Detailed project costs which are ONLY included if granularity is provided AND depth is "project" ReportData *[]struct { // Charge Charge, value in cents Charge float64 `json:"charge"` // Discount Discount, value in cents Discount float64 `json:"discount"` // Quantity Quantity Quantity int32 `json:"quantity"` // TimePeriod Time period according to desired granularity TimePeriod struct { End *openapi_types.Date `json:"end,omitempty"` Start *openapi_types.Date `json:"start,omitempty"` } `json:"timePeriod"` } `json:"reportData,omitempty"` // Services Total discount for all services and the whole requested date range (value in cents). Please see "depth" parameter for more details. Services *[]struct { // ReportData Detailed service costs which are ONLY included if granularity is provided ReportData *[]struct { // Charge Charge, value in cents Charge float64 `json:"charge"` // Discount Discount, value in cents Discount float64 `json:"discount"` // Quantity Quantity Quantity int32 `json:"quantity"` // TimePeriod Time period according to desired granularity TimePeriod struct { End *openapi_types.Date `json:"end,omitempty"` Start *openapi_types.Date `json:"start,omitempty"` } `json:"timePeriod"` } `json:"reportData,omitempty"` // ServiceCategoryName Service category name ServiceCategoryName string `json:"serviceCategoryName"` // ServiceName Name of the service ServiceName string `json:"serviceName"` // Sku Service key Sku string `json:"sku"` // TotalCharge Total charge for the whole requested date range (value in cents) TotalCharge float64 `json:"totalCharge"` // TotalDiscount Total discount for the whole requested date range (value in cents) TotalDiscount float64 `json:"totalDiscount"` // TotalQuantity Total quantity TotalQuantity int32 `json:"totalQuantity"` // UnitLabel Label for unit UnitLabel string `json:"unitLabel"` } `json:"services,omitempty"` // TotalCharge Total charge for all services and the whole requested date range (value in cents) TotalCharge float64 `json:"totalCharge"` // TotalDiscount Total discount for all services and the whole requested date range (value in cents) TotalDiscount float64 `json:"totalDiscount"` } JSONDefault *struct { Code string `json:"code"` Message *string `json:"message,omitempty"` } HasError error // Aggregated error }
func (GetProjectCostsResponse) Status ¶
func (r GetProjectCostsResponse) Status() string
Status returns HTTPResponse.Status
func (GetProjectCostsResponse) StatusCode ¶
func (r GetProjectCostsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode