costs

package
v1.19.0-pre Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package costs provides primitives to interact with the openapi HTTP API.

Code generated by dev.azure.com/schwarzit/schwarzit.odj.core/_git/stackit-client-generator.git version v1.0.23 DO NOT EDIT.

Index

Constants

View Source
const (
	BearerAuthScopes = "bearerAuth.Scopes"
)

Variables

View Source
var BaseURLs = env.URLs(
	"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 openapiTypes.UUID, params *GetCostsForAllProjectsInAllSubCustomerAccountsParams) (*http.Request, error)

NewGetCostsForAllProjectsInAllSubCustomerAccountsRequest generates requests for GetCostsForAllProjectsInAllSubCustomerAccounts

func NewGetCostsForAllProjectsInCustomerAccountRequest

func NewGetCostsForAllProjectsInCustomerAccountRequest(ctx context.Context, server string, customerAccountId openapiTypes.UUID, params *GetCostsForAllProjectsInCustomerAccountParams) (*http.Request, error)

NewGetCostsForAllProjectsInCustomerAccountRequest generates requests for GetCostsForAllProjectsInCustomerAccount

func NewGetForecastCustomerAccountRequest

func NewGetForecastCustomerAccountRequest(ctx context.Context, server string, customerAccountId openapiTypes.UUID, params *GetForecastCustomerAccountParams) (*http.Request, error)

NewGetForecastCustomerAccountRequest generates requests for GetForecastCustomerAccount

func NewGetProjectCostsRequest

func NewGetProjectCostsRequest(ctx context.Context, server string, customerAccountId openapiTypes.UUID, projectId openapiTypes.UUID, params *GetProjectCostsParams) (*http.Request, error)

NewGetProjectCostsRequest generates requests for GetProjectCosts

Types

type Client

type Client[K contracts.ClientFlowConfig] 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 contracts.ClientInterface[K]

	// 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 NewRawClient

func NewRawClient[K contracts.ClientFlowConfig](server string, opts ...ClientOption[K]) (*Client[K], error)

NewRawClient creates a new Client, with reasonable defaults

func (*Client[K]) GetCostsForAllProjectsInAllSubCustomerAccountsRaw

func (c *Client[K]) GetCostsForAllProjectsInAllSubCustomerAccountsRaw(ctx context.Context, customerAccountId openapiTypes.UUID, params *GetCostsForAllProjectsInAllSubCustomerAccountsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client[K]) GetCostsForAllProjectsInCustomerAccountRaw

func (c *Client[K]) GetCostsForAllProjectsInCustomerAccountRaw(ctx context.Context, customerAccountId openapiTypes.UUID, params *GetCostsForAllProjectsInCustomerAccountParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client[K]) GetForecastCustomerAccountRaw

func (c *Client[K]) GetForecastCustomerAccountRaw(ctx context.Context, customerAccountId openapiTypes.UUID, params *GetForecastCustomerAccountParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client[K]) GetProjectCostsRaw

func (c *Client[K]) GetProjectCostsRaw(ctx context.Context, customerAccountId openapiTypes.UUID, projectId openapiTypes.UUID, params *GetProjectCostsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientOption

type ClientOption[K contracts.ClientFlowConfig] func(*Client[K]) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL[K contracts.ClientFlowConfig](baseURL string) ClientOption[K]

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient[K contracts.ClientFlowConfig](doer contracts.ClientInterface[K]) ClientOption[K]

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn[K contracts.ClientFlowConfig](fn RequestEditorFn) ClientOption[K]

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[K contracts.ClientFlowConfig] struct {
	// contains filtered or unexported fields
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClient

func NewClient[K contracts.ClientFlowConfig](server string, opts ...ClientOption[K]) (*ClientWithResponses[K], error)

NewClient creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses[K]) GetCostsForAllProjectsInAllSubCustomerAccounts

func (c *ClientWithResponses[K]) GetCostsForAllProjectsInAllSubCustomerAccounts(ctx context.Context, customerAccountId openapiTypes.UUID, params *GetCostsForAllProjectsInAllSubCustomerAccountsParams, reqEditors ...RequestEditorFn) (*GetCostsForAllProjectsInAllSubCustomerAccountsResponse, error)

GetCostsForAllProjectsInAllSubCustomerAccounts request returning *GetCostsForAllProjectsInAllSubCustomerAccountsResponse

func (*ClientWithResponses[K]) GetCostsForAllProjectsInCustomerAccount

func (c *ClientWithResponses[K]) GetCostsForAllProjectsInCustomerAccount(ctx context.Context, customerAccountId openapiTypes.UUID, params *GetCostsForAllProjectsInCustomerAccountParams, reqEditors ...RequestEditorFn) (*GetCostsForAllProjectsInCustomerAccountResponse, error)

GetCostsForAllProjectsInCustomerAccount request returning *GetCostsForAllProjectsInCustomerAccountResponse

func (*ClientWithResponses[K]) GetForecastCustomerAccount

func (c *ClientWithResponses[K]) GetForecastCustomerAccount(ctx context.Context, customerAccountId openapiTypes.UUID, params *GetForecastCustomerAccountParams, reqEditors ...RequestEditorFn) (*GetForecastCustomerAccountResponse, error)

GetForecastCustomerAccount request returning *GetForecastCustomerAccountResponse

func (*ClientWithResponses[K]) GetProjectCosts

func (c *ClientWithResponses[K]) GetProjectCosts(ctx context.Context, customerAccountId openapiTypes.UUID, projectId openapiTypes.UUID, params *GetProjectCostsParams, reqEditors ...RequestEditorFn) (*GetProjectCostsResponse, error)

GetProjectCosts request returning *GetProjectCostsResponse

func (*ClientWithResponses[K]) ParseGetCostsForAllProjectsInAllSubCustomerAccountsResponse

func (c *ClientWithResponses[K]) ParseGetCostsForAllProjectsInAllSubCustomerAccountsResponse(rsp *http.Response) (*GetCostsForAllProjectsInAllSubCustomerAccountsResponse, error)

ParseGetCostsForAllProjectsInAllSubCustomerAccountsResponse parses an HTTP response from a GetCostsForAllProjectsInAllSubCustomerAccounts call

func (*ClientWithResponses[K]) ParseGetCostsForAllProjectsInCustomerAccountResponse

func (c *ClientWithResponses[K]) ParseGetCostsForAllProjectsInCustomerAccountResponse(rsp *http.Response) (*GetCostsForAllProjectsInCustomerAccountResponse, error)

ParseGetCostsForAllProjectsInCustomerAccountResponse parses an HTTP response from a GetCostsForAllProjectsInCustomerAccount call

func (*ClientWithResponses[K]) ParseGetForecastCustomerAccountResponse

func (c *ClientWithResponses[K]) ParseGetForecastCustomerAccountResponse(rsp *http.Response) (*GetForecastCustomerAccountResponse, error)

ParseGetForecastCustomerAccountResponse parses an HTTP response from a GetForecastCustomerAccount call

func (*ClientWithResponses[K]) ParseGetProjectCostsResponse

func (c *ClientWithResponses[K]) ParseGetProjectCostsResponse(rsp *http.Response) (*GetProjectCostsResponse, error)

ParseGetProjectCostsResponse parses an HTTP response from a GetProjectCosts call

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// GetCostsForAllProjectsInCustomerAccount request
	GetCostsForAllProjectsInCustomerAccount(ctx context.Context, customerAccountId openapiTypes.UUID, params *GetCostsForAllProjectsInCustomerAccountParams, reqEditors ...RequestEditorFn) (*GetCostsForAllProjectsInCustomerAccountResponse, error)

	// GetCostsForAllProjectsInAllSubCustomerAccounts request
	GetCostsForAllProjectsInAllSubCustomerAccounts(ctx context.Context, customerAccountId openapiTypes.UUID, params *GetCostsForAllProjectsInAllSubCustomerAccountsParams, reqEditors ...RequestEditorFn) (*GetCostsForAllProjectsInAllSubCustomerAccountsResponse, error)

	// GetProjectCosts request
	GetProjectCosts(ctx context.Context, customerAccountId openapiTypes.UUID, projectId openapiTypes.UUID, params *GetProjectCostsParams, reqEditors ...RequestEditorFn) (*GetProjectCostsResponse, error)

	// GetForecastCustomerAccount request
	GetForecastCustomerAccount(ctx context.Context, customerAccountId openapiTypes.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 openapiTypes.Date `form:"from" json:"from"`

	// To End date (including)
	To openapiTypes.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 openapiTypes.UUID `json:"customerAccountId"`
		ProjectID         openapiTypes.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   *openapiTypes.Date `json:"end,omitempty"`
				Start *openapiTypes.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   *openapiTypes.Date `json:"end,omitempty"`
					Start *openapiTypes.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"`
	}
	Error error // Aggregated error
}

func (GetCostsForAllProjectsInAllSubCustomerAccountsResponse) Status

Status returns HTTPResponse.Status

func (GetCostsForAllProjectsInAllSubCustomerAccountsResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type GetCostsForAllProjectsInCustomerAccountParams

type GetCostsForAllProjectsInCustomerAccountParams struct {
	// From Start date (including)
	From openapiTypes.Date `form:"from" json:"from"`

	// To End date (including)
	To openapiTypes.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 openapiTypes.UUID `json:"customerAccountId"`
		ProjectID         openapiTypes.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   *openapiTypes.Date `json:"end,omitempty"`
				Start *openapiTypes.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   *openapiTypes.Date `json:"end,omitempty"`
					Start *openapiTypes.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"`
	}
	Error error // Aggregated error
}

func (GetCostsForAllProjectsInCustomerAccountResponse) Status

Status returns HTTPResponse.Status

func (GetCostsForAllProjectsInCustomerAccountResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type GetForecastCustomerAccountParams

type GetForecastCustomerAccountParams struct {
	// From Start date (including)
	From openapiTypes.Date `form:"from" json:"from"`

	// To End date (including), maximum 3 months in the future
	To openapiTypes.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 openapiTypes.UUID `json:"customerAccountId"`
		ProjectID         openapiTypes.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   *openapiTypes.Date `json:"end,omitempty"`
				Start *openapiTypes.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"`
	}
	Error error // Aggregated error
}

func (GetForecastCustomerAccountResponse) Status

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 openapiTypes.Date `form:"from" json:"from"`

	// To End date (including)
	To openapiTypes.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 openapiTypes.UUID `json:"customerAccountId"`
		ProjectID         openapiTypes.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   *openapiTypes.Date `json:"end,omitempty"`
				Start *openapiTypes.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   *openapiTypes.Date `json:"end,omitempty"`
					Start *openapiTypes.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"`
	}
	Error 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

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL