metronome

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2023 License: MIT Imports: 15 Imported by: 1

README

Metronome Go client

Go client for Metronome generated from its OpenAPI spec

This is not an official client, and was generated for personal use from their OpenAPI spec.

Installation

By using this client you'll avoid a lot of boilerplate code to perform all the marshalling and unmarshalling into objects when using Metronome HTTP APIs.

Install in your project to have it as a dependency in go.mod:

go get github.com/tigrisdata/metronome-go-client@latest

Usage

Authentication

Metronome requires all HTTP requests to include a authorization header for authentication:

GET /v1/... HTTP/1.1
Host: api.metronome.com
Authorization: Bearer MY_TOKEN

Instead of adding authorization header to every request when using this go client, you can simply register a callback as:

authProvider, err := securityprovider.NewSecurityProviderBearerToken("MY_TOKEN")
if err != nil {
	panic(err)
}

client, err := metronome.NewClient("https://api.metronome.com/v1", metronome.WithRequestEditorFn(authProvider.Intercept))
Create customer example

Following is a complete example you can try in your project. Replace the REPLACE_ME with your own token generated from Metronome account.

package main

import (
	"context"
	"fmt"
	"net/http"

	"github.com/deepmap/oapi-codegen/pkg/securityprovider"

	"github.com/tigrisdata/metronome-go-client"
)

func main() {
	// API key based authentication. Add your metronome auth token here.
	// Learn more about auth: https://docs.metronome.com/using-the-api/authorization/
	authProvider, err := securityprovider.NewSecurityProviderBearerToken("REPLACE_ME")
	if err != nil {
		panic(err)
	}

	// Client will be used to perform all operations on metronome.
	// Auth provider generated above will implicitly add an authorization token to all requests.
	client, err := metronome.NewClient("https://api.metronome.com/v1", metronome.WithRequestEditorFn(authProvider.Intercept))
	if err != nil {
		panic(err)
	}

	// JSON request for CreateCustomer
	createCustomerBody := metronome.CreateCustomerJSONRequestBody{
		IngestAliases: &[]string{"my_customer_alias"},
		Name:          "my_customer_id",
	}

	// HTTP POST call to "/customers" endpoint
	resp, err := client.CreateCustomer(context.TODO(), createCustomerBody)
	if err != nil {
		panic(err)
	}

	// Checking if request succeeded
	if resp.StatusCode != http.StatusOK {
		panic(fmt.Errorf("metronome request failed: %s", resp.Status))
	}

	// Using built-in parsing to convert response to a native Go struct
	parsed, err := metronome.ParseCreateCustomerResponse(resp)
	if err != nil {
		panic(err)
	}

	// Sample output:
	// request succeeded: {ExternalId:my_customer_alias Id:7d8e8341-f271-4738-8a7f-cf7d6c2418f3 IngestAliases:[my_customer_alias] Name:my_customer_id}
	fmt.Printf("request succeeded: %+v", parsed.JSON200.Data)
}

Requesting updates

  • Since this is not official client, the API may be out of date
  • Please open an issue in the repo and we'll try to update the client to latest

Documentation

Overview

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

Code generated by github.com/deepmap/oapi-codegen version v1.12.4 DO NOT EDIT.

Index

Constants

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

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.

func NewAddCustomFieldKeyRequest

func NewAddCustomFieldKeyRequest(server string, body AddCustomFieldKeyJSONRequestBody) (*http.Request, error)

NewAddCustomFieldKeyRequest calls the generic AddCustomFieldKey builder with application/json body

func NewAddCustomFieldKeyRequestWithBody

func NewAddCustomFieldKeyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewAddCustomFieldKeyRequestWithBody generates requests for AddCustomFieldKey with any type of body

func NewAddPlanToCustomerRequest

func NewAddPlanToCustomerRequest(server string, customerId CustomerId, body AddPlanToCustomerJSONRequestBody) (*http.Request, error)

NewAddPlanToCustomerRequest calls the generic AddPlanToCustomer builder with application/json body

func NewAddPlanToCustomerRequestWithBody

func NewAddPlanToCustomerRequestWithBody(server string, customerId CustomerId, contentType string, body io.Reader) (*http.Request, error)

NewAddPlanToCustomerRequestWithBody generates requests for AddPlanToCustomer with any type of body

func NewArchiveAlertRequest

func NewArchiveAlertRequest(server string, body ArchiveAlertJSONRequestBody) (*http.Request, error)

NewArchiveAlertRequest calls the generic ArchiveAlert builder with application/json body

func NewArchiveAlertRequestWithBody

func NewArchiveAlertRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewArchiveAlertRequestWithBody generates requests for ArchiveAlert with any type of body

func NewArchiveCustomerRequest

func NewArchiveCustomerRequest(server string, body ArchiveCustomerJSONRequestBody) (*http.Request, error)

NewArchiveCustomerRequest calls the generic ArchiveCustomer builder with application/json body

func NewArchiveCustomerRequestWithBody

func NewArchiveCustomerRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewArchiveCustomerRequestWithBody generates requests for ArchiveCustomer with any type of body

func NewCreateAlertRequest

func NewCreateAlertRequest(server string, body CreateAlertJSONRequestBody) (*http.Request, error)

NewCreateAlertRequest calls the generic CreateAlert builder with application/json body

func NewCreateAlertRequestWithBody

func NewCreateAlertRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateAlertRequestWithBody generates requests for CreateAlert with any type of body

func NewCreateCustomerRequest

func NewCreateCustomerRequest(server string, body CreateCustomerJSONRequestBody) (*http.Request, error)

NewCreateCustomerRequest calls the generic CreateCustomer builder with application/json body

func NewCreateCustomerRequestWithBody

func NewCreateCustomerRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateCustomerRequestWithBody generates requests for CreateCustomer with any type of body

func NewCreateGrantRequest

func NewCreateGrantRequest(server string, body CreateGrantJSONRequestBody) (*http.Request, error)

NewCreateGrantRequest calls the generic CreateGrant builder with application/json body

func NewCreateGrantRequestWithBody

func NewCreateGrantRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateGrantRequestWithBody generates requests for CreateGrant with any type of body

func NewDeleteBillingConfigForCustomerRequest

func NewDeleteBillingConfigForCustomerRequest(server string, customerId CustomerId, billingProviderTypeParam BillingProviderTypeParam) (*http.Request, error)

NewDeleteBillingConfigForCustomerRequest generates requests for DeleteBillingConfigForCustomer

func NewDeleteCustomFieldsRequest

func NewDeleteCustomFieldsRequest(server string, body DeleteCustomFieldsJSONRequestBody) (*http.Request, error)

NewDeleteCustomFieldsRequest calls the generic DeleteCustomFields builder with application/json body

func NewDeleteCustomFieldsRequestWithBody

func NewDeleteCustomFieldsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewDeleteCustomFieldsRequestWithBody generates requests for DeleteCustomFields with any type of body

func NewDisableCustomFieldKeyRequest

func NewDisableCustomFieldKeyRequest(server string, body DisableCustomFieldKeyJSONRequestBody) (*http.Request, error)

NewDisableCustomFieldKeyRequest calls the generic DisableCustomFieldKey builder with application/json body

func NewDisableCustomFieldKeyRequestWithBody

func NewDisableCustomFieldKeyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewDisableCustomFieldKeyRequestWithBody generates requests for DisableCustomFieldKey with any type of body

func NewEmbeddableDashboardRequest

func NewEmbeddableDashboardRequest(server string, body EmbeddableDashboardJSONRequestBody) (*http.Request, error)

NewEmbeddableDashboardRequest calls the generic EmbeddableDashboard builder with application/json body

func NewEmbeddableDashboardRequestWithBody

func NewEmbeddableDashboardRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewEmbeddableDashboardRequestWithBody generates requests for EmbeddableDashboard with any type of body

func NewEndCustomerPlanRequest

func NewEndCustomerPlanRequest(server string, customerId CustomerId, customerPlanId CustomerPlanId, body EndCustomerPlanJSONRequestBody) (*http.Request, error)

NewEndCustomerPlanRequest calls the generic EndCustomerPlan builder with application/json body

func NewEndCustomerPlanRequestWithBody

func NewEndCustomerPlanRequestWithBody(server string, customerId CustomerId, customerPlanId CustomerPlanId, contentType string, body io.Reader) (*http.Request, error)

NewEndCustomerPlanRequestWithBody generates requests for EndCustomerPlan with any type of body

func NewGetBillingConfigRequest

func NewGetBillingConfigRequest(server string, customerId CustomerId, billingProviderTypeParam BillingProviderTypeParam) (*http.Request, error)

NewGetBillingConfigRequest generates requests for GetBillingConfig

func NewGetCostsRequest

func NewGetCostsRequest(server string, customerId CustomerId, params *GetCostsParams) (*http.Request, error)

NewGetCostsRequest generates requests for GetCosts

func NewGetCustomerAlertRequest

func NewGetCustomerAlertRequest(server string, body GetCustomerAlertJSONRequestBody) (*http.Request, error)

NewGetCustomerAlertRequest calls the generic GetCustomerAlert builder with application/json body

func NewGetCustomerAlertRequestWithBody

func NewGetCustomerAlertRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewGetCustomerAlertRequestWithBody generates requests for GetCustomerAlert with any type of body

func NewGetCustomerRequest

func NewGetCustomerRequest(server string, customerId CustomerId) (*http.Request, error)

NewGetCustomerRequest generates requests for GetCustomer

func NewGetInvoiceRequest

func NewGetInvoiceRequest(server string, customerId CustomerId, invoiceId InvoiceId) (*http.Request, error)

NewGetInvoiceRequest generates requests for GetInvoice

func NewGetPagedUsageRequest

func NewGetPagedUsageRequest(server string, params *GetPagedUsageParams, body GetPagedUsageJSONRequestBody) (*http.Request, error)

NewGetPagedUsageRequest calls the generic GetPagedUsage builder with application/json body

func NewGetPagedUsageRequestWithBody

func NewGetPagedUsageRequestWithBody(server string, params *GetPagedUsageParams, contentType string, body io.Reader) (*http.Request, error)

NewGetPagedUsageRequestWithBody generates requests for GetPagedUsage with any type of body

func NewGetPlanChargesRequest

func NewGetPlanChargesRequest(server string, planId PlanId, params *GetPlanChargesParams) (*http.Request, error)

NewGetPlanChargesRequest generates requests for GetPlanCharges

func NewGetPlanDetailsRequest

func NewGetPlanDetailsRequest(server string, planId PlanId) (*http.Request, error)

NewGetPlanDetailsRequest generates requests for GetPlanDetails

func NewGetPlanPriceAdjustmentsRequest

func NewGetPlanPriceAdjustmentsRequest(server string, customerId CustomerId, customerPlanId CustomerPlanId, params *GetPlanPriceAdjustmentsParams) (*http.Request, error)

NewGetPlanPriceAdjustmentsRequest generates requests for GetPlanPriceAdjustments

func NewGetUsageBatchRequest

func NewGetUsageBatchRequest(server string, params *GetUsageBatchParams, body GetUsageBatchJSONRequestBody) (*http.Request, error)

NewGetUsageBatchRequest calls the generic GetUsageBatch builder with application/json body

func NewGetUsageBatchRequestWithBody

func NewGetUsageBatchRequestWithBody(server string, params *GetUsageBatchParams, contentType string, body io.Reader) (*http.Request, error)

NewGetUsageBatchRequestWithBody generates requests for GetUsageBatch with any type of body

func NewIngestRequest

func NewIngestRequest(server string, body IngestJSONRequestBody) (*http.Request, error)

NewIngestRequest calls the generic Ingest builder with application/json body

func NewIngestRequestWithBody

func NewIngestRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewIngestRequestWithBody generates requests for Ingest with any type of body

func NewListBillableMetricsRequest

func NewListBillableMetricsRequest(server string, customerId CustomerId, params *ListBillableMetricsParams) (*http.Request, error)

NewListBillableMetricsRequest generates requests for ListBillableMetrics

func NewListCreditLedgerEntriesRequest

func NewListCreditLedgerEntriesRequest(server string, params *ListCreditLedgerEntriesParams, body ListCreditLedgerEntriesJSONRequestBody) (*http.Request, error)

NewListCreditLedgerEntriesRequest calls the generic ListCreditLedgerEntries builder with application/json body

func NewListCreditLedgerEntriesRequestWithBody

func NewListCreditLedgerEntriesRequestWithBody(server string, params *ListCreditLedgerEntriesParams, contentType string, body io.Reader) (*http.Request, error)

NewListCreditLedgerEntriesRequestWithBody generates requests for ListCreditLedgerEntries with any type of body

func NewListCreditTypesRequest

func NewListCreditTypesRequest(server string, params *ListCreditTypesParams) (*http.Request, error)

NewListCreditTypesRequest generates requests for ListCreditTypes

func NewListCustomFieldKeysRequest

func NewListCustomFieldKeysRequest(server string, body ListCustomFieldKeysJSONRequestBody) (*http.Request, error)

NewListCustomFieldKeysRequest calls the generic ListCustomFieldKeys builder with application/json body

func NewListCustomFieldKeysRequestWithBody

func NewListCustomFieldKeysRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewListCustomFieldKeysRequestWithBody generates requests for ListCustomFieldKeys with any type of body

func NewListCustomerAlertsRequest

func NewListCustomerAlertsRequest(server string, params *ListCustomerAlertsParams, body ListCustomerAlertsJSONRequestBody) (*http.Request, error)

NewListCustomerAlertsRequest calls the generic ListCustomerAlerts builder with application/json body

func NewListCustomerAlertsRequestWithBody

func NewListCustomerAlertsRequestWithBody(server string, params *ListCustomerAlertsParams, contentType string, body io.Reader) (*http.Request, error)

NewListCustomerAlertsRequestWithBody generates requests for ListCustomerAlerts with any type of body

func NewListCustomerPlansRequest

func NewListCustomerPlansRequest(server string, customerId CustomerId, params *ListCustomerPlansParams) (*http.Request, error)

NewListCustomerPlansRequest generates requests for ListCustomerPlans

func NewListCustomersRequest

func NewListCustomersRequest(server string, params *ListCustomersParams) (*http.Request, error)

NewListCustomersRequest generates requests for ListCustomers

func NewListGrantsRequest

func NewListGrantsRequest(server string, params *ListGrantsParams, body ListGrantsJSONRequestBody) (*http.Request, error)

NewListGrantsRequest calls the generic ListGrants builder with application/json body

func NewListGrantsRequestWithBody

func NewListGrantsRequestWithBody(server string, params *ListGrantsParams, contentType string, body io.Reader) (*http.Request, error)

NewListGrantsRequestWithBody generates requests for ListGrants with any type of body

func NewListInvoicesCachedRequest

func NewListInvoicesCachedRequest(server string, customerId CustomerId, params *ListInvoicesCachedParams) (*http.Request, error)

NewListInvoicesCachedRequest generates requests for ListInvoicesCached

func NewListInvoicesRequest

func NewListInvoicesRequest(server string, customerId CustomerId, params *ListInvoicesParams) (*http.Request, error)

NewListInvoicesRequest generates requests for ListInvoices

func NewListPlansRequest

func NewListPlansRequest(server string, params *ListPlansParams) (*http.Request, error)

NewListPlansRequest generates requests for ListPlans

func NewSetBillingConfigForCustomerRequest

func NewSetBillingConfigForCustomerRequest(server string, customerId CustomerId, billingProviderTypeParam BillingProviderTypeParam, body SetBillingConfigForCustomerJSONRequestBody) (*http.Request, error)

NewSetBillingConfigForCustomerRequest calls the generic SetBillingConfigForCustomer builder with application/json body

func NewSetBillingConfigForCustomerRequestWithBody

func NewSetBillingConfigForCustomerRequestWithBody(server string, customerId CustomerId, billingProviderTypeParam BillingProviderTypeParam, contentType string, body io.Reader) (*http.Request, error)

NewSetBillingConfigForCustomerRequestWithBody generates requests for SetBillingConfigForCustomer with any type of body

func NewSetCustomFieldsRequest

func NewSetCustomFieldsRequest(server string, body SetCustomFieldsJSONRequestBody) (*http.Request, error)

NewSetCustomFieldsRequest calls the generic SetCustomFields builder with application/json body

func NewSetCustomFieldsRequestWithBody

func NewSetCustomFieldsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewSetCustomFieldsRequestWithBody generates requests for SetCustomFields with any type of body

func NewSetCustomerNameRequest

func NewSetCustomerNameRequest(server string, customerId CustomerId, body SetCustomerNameJSONRequestBody) (*http.Request, error)

NewSetCustomerNameRequest calls the generic SetCustomerName builder with application/json body

func NewSetCustomerNameRequestWithBody

func NewSetCustomerNameRequestWithBody(server string, customerId CustomerId, contentType string, body io.Reader) (*http.Request, error)

NewSetCustomerNameRequestWithBody generates requests for SetCustomerName with any type of body

func NewSetIngestAliasesRequest

func NewSetIngestAliasesRequest(server string, customerId CustomerId, body SetIngestAliasesJSONRequestBody) (*http.Request, error)

NewSetIngestAliasesRequest calls the generic SetIngestAliases builder with application/json body

func NewSetIngestAliasesRequestWithBody

func NewSetIngestAliasesRequestWithBody(server string, customerId CustomerId, contentType string, body io.Reader) (*http.Request, error)

NewSetIngestAliasesRequestWithBody generates requests for SetIngestAliases with any type of body

func NewUpdateCustomerConfigRequest

func NewUpdateCustomerConfigRequest(server string, customerId CustomerId, body UpdateCustomerConfigJSONRequestBody) (*http.Request, error)

NewUpdateCustomerConfigRequest calls the generic UpdateCustomerConfig builder with application/json body

func NewUpdateCustomerConfigRequestWithBody

func NewUpdateCustomerConfigRequestWithBody(server string, customerId CustomerId, contentType string, body io.Reader) (*http.Request, error)

NewUpdateCustomerConfigRequestWithBody generates requests for UpdateCustomerConfig with any type of body

func NewVoidGrantRequest

func NewVoidGrantRequest(server string, body VoidGrantJSONRequestBody) (*http.Request, error)

NewVoidGrantRequest calls the generic VoidGrant builder with application/json body

func NewVoidGrantRequestWithBody

func NewVoidGrantRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewVoidGrantRequestWithBody generates requests for VoidGrant with any type of body

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

Types

type AddCustomFieldKeyJSONBody

type AddCustomFieldKeyJSONBody struct {
	EnforceUniqueness bool          `json:"enforce_uniqueness"`
	Entity            ManagedEntity `json:"entity"`
	Key               string        `json:"key"`
}

AddCustomFieldKeyJSONBody defines parameters for AddCustomFieldKey.

type AddCustomFieldKeyJSONRequestBody

type AddCustomFieldKeyJSONRequestBody AddCustomFieldKeyJSONBody

AddCustomFieldKeyJSONRequestBody defines body for AddCustomFieldKey for application/json ContentType.

type AddCustomFieldKeyResponse

type AddCustomFieldKeyResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseAddCustomFieldKeyResponse

func ParseAddCustomFieldKeyResponse(rsp *http.Response) (*AddCustomFieldKeyResponse, error)

ParseAddCustomFieldKeyResponse parses an HTTP response from a AddCustomFieldKeyWithResponse call

func (AddCustomFieldKeyResponse) Status

func (r AddCustomFieldKeyResponse) Status() string

Status returns HTTPResponse.Status

func (AddCustomFieldKeyResponse) StatusCode

func (r AddCustomFieldKeyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AddPlanToCustomerJSONRequestBody

type AddPlanToCustomerJSONRequestBody = AddPlanToCustomerPayload

AddPlanToCustomerJSONRequestBody defines body for AddPlanToCustomer for application/json ContentType.

type AddPlanToCustomerPayload

type AddPlanToCustomerPayload struct {
	// EndingBefore RFC 3339 timestamp for when the plan ends (exclusive) for this customer. Must be at 0:00 UTC (midnight).
	EndingBefore *time.Time `json:"ending_before,omitempty"`

	// NetPaymentTermsDays Number of days after issuance of invoice after which the invoice is due (e.g. Net 30).
	NetPaymentTermsDays *float32           `json:"net_payment_terms_days,omitempty"`
	PlanId              openapi_types.UUID `json:"plan_id"`

	// PriceAdjustments A list of price adjustments can be applied on top of the pricing in the plans. See the [price adjustments documentation](https://docs.metronome.com/pricing/managing-plans/#price-adjustments) for details.
	PriceAdjustments *[]struct {
		AdjustmentType AddPlanToCustomerPayloadPriceAdjustmentsAdjustmentType `json:"adjustment_type"`
		ChargeId       openapi_types.UUID                                     `json:"charge_id"`

		// Quantity the overridden quantity for a fixed charge
		Quantity *float32 `json:"quantity,omitempty"`

		// StartPeriod Used in price ramps.  Indicates how many billing periods pass before the charge applies.
		StartPeriod float32 `json:"start_period"`

		// Tier Used in pricing tiers.  Indicates at what metric value the price applies.
		Tier *float32 `json:"tier,omitempty"`

		// Value The amount of change to a price. Percentage and fixed adjustments can be positive or negative. Percentage-based adjustments should be decimals, e.g. -0.05 for a 5% discount.
		Value *float32 `json:"value,omitempty"`
	} `json:"price_adjustments,omitempty"`

	// StartingOn RFC 3339 timestamp for when the plan becomes active for this customer. Must be at 0:00 UTC (midnight).
	StartingOn time.Time `json:"starting_on"`
}

AddPlanToCustomerPayload defines model for AddPlanToCustomerPayload.

type AddPlanToCustomerPayloadPriceAdjustmentsAdjustmentType

type AddPlanToCustomerPayloadPriceAdjustmentsAdjustmentType string

AddPlanToCustomerPayloadPriceAdjustmentsAdjustmentType defines model for AddPlanToCustomerPayload.PriceAdjustments.AdjustmentType.

const (
	AddPlanToCustomerPayloadPriceAdjustmentsAdjustmentTypeFixed      AddPlanToCustomerPayloadPriceAdjustmentsAdjustmentType = "fixed"
	AddPlanToCustomerPayloadPriceAdjustmentsAdjustmentTypeOverride   AddPlanToCustomerPayloadPriceAdjustmentsAdjustmentType = "override"
	AddPlanToCustomerPayloadPriceAdjustmentsAdjustmentTypePercentage AddPlanToCustomerPayloadPriceAdjustmentsAdjustmentType = "percentage"
	AddPlanToCustomerPayloadPriceAdjustmentsAdjustmentTypeQuantity   AddPlanToCustomerPayloadPriceAdjustmentsAdjustmentType = "quantity"
)

Defines values for AddPlanToCustomerPayloadPriceAdjustmentsAdjustmentType.

type AddPlanToCustomerResponse

type AddPlanToCustomerResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data Id `json:"data"`
	}
}

func ParseAddPlanToCustomerResponse

func ParseAddPlanToCustomerResponse(rsp *http.Response) (*AddPlanToCustomerResponse, error)

ParseAddPlanToCustomerResponse parses an HTTP response from a AddPlanToCustomerWithResponse call

func (AddPlanToCustomerResponse) Status

func (r AddPlanToCustomerResponse) Status() string

Status returns HTTPResponse.Status

func (AddPlanToCustomerResponse) StatusCode

func (r AddPlanToCustomerResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Alert

type Alert struct {
	CreditType CreditType `json:"credit_type"`

	// Id the Metronome ID of the alert
	Id string `json:"id"`

	// Name Name of the alert
	Name string `json:"name"`

	// Status Status of the alert
	Status AlertStatus `json:"status"`

	// Threshold Threshold value of the alert policy
	Threshold float32 `json:"threshold"`

	// Type Type of the alert
	Type AlertType `json:"type"`

	// UpdatedAt Timestamp for when the alert was last updated
	UpdatedAt time.Time `json:"updated_at"`
}

Alert defines model for Alert.

type AlertStatus

type AlertStatus string

AlertStatus Status of the alert

const (
	AlertStatusArchived AlertStatus = "archived"
	AlertStatusDisabled AlertStatus = "disabled"
	AlertStatusEnabled  AlertStatus = "enabled"
)

Defines values for AlertStatus.

type AlertType

type AlertType string

AlertType Type of the alert

const (
	AlertTypeLowCreditBalanceReached             AlertType = "low_credit_balance_reached"
	AlertTypeLowRemainingCreditPercentageReached AlertType = "low_remaining_credit_percentage_reached"
	AlertTypeLowRemainingDaysInPlanReached       AlertType = "low_remaining_days_in_plan_reached"
	AlertTypeSpendThresholdReached               AlertType = "spend_threshold_reached"
	AlertTypeUsageThresholdReached               AlertType = "usage_threshold_reached"
)

Defines values for AlertType.

type ArchiveAlertJSONRequestBody

type ArchiveAlertJSONRequestBody = Id

ArchiveAlertJSONRequestBody defines body for ArchiveAlert for application/json ContentType.

type ArchiveAlertResponse

type ArchiveAlertResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data Id `json:"data"`
	}
	JSON404 *Error
}

func ParseArchiveAlertResponse

func ParseArchiveAlertResponse(rsp *http.Response) (*ArchiveAlertResponse, error)

ParseArchiveAlertResponse parses an HTTP response from a ArchiveAlertWithResponse call

func (ArchiveAlertResponse) Status

func (r ArchiveAlertResponse) Status() string

Status returns HTTPResponse.Status

func (ArchiveAlertResponse) StatusCode

func (r ArchiveAlertResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ArchiveCustomerJSONRequestBody

type ArchiveCustomerJSONRequestBody = Id

ArchiveCustomerJSONRequestBody defines body for ArchiveCustomer for application/json ContentType.

type ArchiveCustomerResponse

type ArchiveCustomerResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data Id `json:"data"`
	}
	JSON400 *Error
	JSON404 *Error
}

func ParseArchiveCustomerResponse

func ParseArchiveCustomerResponse(rsp *http.Response) (*ArchiveCustomerResponse, error)

ParseArchiveCustomerResponse parses an HTTP response from a ArchiveCustomerWithResponse call

func (ArchiveCustomerResponse) Status

func (r ArchiveCustomerResponse) Status() string

Status returns HTTPResponse.Status

func (ArchiveCustomerResponse) StatusCode

func (r ArchiveCustomerResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AwsExpirationDate

type AwsExpirationDate = time.Time

AwsExpirationDate Contract expiration date for the customer. The expected format is RFC 3339 and can be retrieved from AWS's GetEntitlements API. (See https://docs.aws.amazon.com/marketplaceentitlement/latest/APIReference/API_GetEntitlements.html.)

type AwsRegion

type AwsRegion string

AwsRegion defines model for AwsRegion.

const (
	AfSouth1     AwsRegion = "af-south-1"
	ApEast1      AwsRegion = "ap-east-1"
	ApNortheast1 AwsRegion = "ap-northeast-1"
	ApNortheast2 AwsRegion = "ap-northeast-2"
	ApNortheast3 AwsRegion = "ap-northeast-3"
	ApSouth1     AwsRegion = "ap-south-1"
	ApSoutheast1 AwsRegion = "ap-southeast-1"
	ApSoutheast2 AwsRegion = "ap-southeast-2"
	CaCentral1   AwsRegion = "ca-central-1"
	CnNorth1     AwsRegion = "cn-north-1"
	CnNorthwest1 AwsRegion = "cn-northwest-1"
	EuCentral1   AwsRegion = "eu-central-1"
	EuNorth1     AwsRegion = "eu-north-1"
	EuSouth1     AwsRegion = "eu-south-1"
	EuWest1      AwsRegion = "eu-west-1"
	EuWest2      AwsRegion = "eu-west-2"
	EuWest3      AwsRegion = "eu-west-3"
	MeSouth1     AwsRegion = "me-south-1"
	SaEast1      AwsRegion = "sa-east-1"
	UsEast1      AwsRegion = "us-east-1"
	UsEast2      AwsRegion = "us-east-2"
	UsGovEast1   AwsRegion = "us-gov-east-1"
	UsGovWest1   AwsRegion = "us-gov-west-1"
	UsWest1      AwsRegion = "us-west-1"
	UsWest2      AwsRegion = "us-west-2"
)

Defines values for AwsRegion.

type BillableMetric

type BillableMetric struct {
	GroupBy *[]string          `json:"group_by,omitempty"`
	Id      openapi_types.UUID `json:"id"`
	Name    string             `json:"name"`
}

BillableMetric defines model for BillableMetric.

type BillingProviderType

type BillingProviderType string

BillingProviderType defines model for BillingProviderType.

const (
	AwsMarketplace BillingProviderType = "aws_marketplace"
	Stripe         BillingProviderType = "stripe"
)

Defines values for BillingProviderType.

type BillingProviderTypeParam

type BillingProviderTypeParam = BillingProviderType

BillingProviderTypeParam defines model for BillingProviderType.

type ChargeType

type ChargeType string

ChargeType defines model for ChargeType.

const (
	ChargeTypeComposite ChargeType = "composite"
	ChargeTypeFixed     ChargeType = "fixed"
	ChargeTypeMinimum   ChargeType = "minimum"
	ChargeTypeUsage     ChargeType = "usage"
)

Defines values for ChargeType.

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 HttpRequestDoer

	// 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) AddCustomFieldKey

func (c *Client) AddCustomFieldKey(ctx context.Context, body AddCustomFieldKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AddCustomFieldKeyWithBody

func (c *Client) AddCustomFieldKeyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AddPlanToCustomer

func (c *Client) AddPlanToCustomer(ctx context.Context, customerId CustomerId, body AddPlanToCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) AddPlanToCustomerWithBody

func (c *Client) AddPlanToCustomerWithBody(ctx context.Context, customerId CustomerId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ArchiveAlert

func (c *Client) ArchiveAlert(ctx context.Context, body ArchiveAlertJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ArchiveAlertWithBody

func (c *Client) ArchiveAlertWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ArchiveCustomer

func (c *Client) ArchiveCustomer(ctx context.Context, body ArchiveCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ArchiveCustomerWithBody

func (c *Client) ArchiveCustomerWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateAlert

func (c *Client) CreateAlert(ctx context.Context, body CreateAlertJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateAlertWithBody

func (c *Client) CreateAlertWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateCustomer

func (c *Client) CreateCustomer(ctx context.Context, body CreateCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateCustomerWithBody

func (c *Client) CreateCustomerWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateGrant

func (c *Client) CreateGrant(ctx context.Context, body CreateGrantJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateGrantWithBody

func (c *Client) CreateGrantWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteBillingConfigForCustomer

func (c *Client) DeleteBillingConfigForCustomer(ctx context.Context, customerId CustomerId, billingProviderTypeParam BillingProviderTypeParam, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteCustomFields

func (c *Client) DeleteCustomFields(ctx context.Context, body DeleteCustomFieldsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteCustomFieldsWithBody

func (c *Client) DeleteCustomFieldsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DisableCustomFieldKey

func (c *Client) DisableCustomFieldKey(ctx context.Context, body DisableCustomFieldKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DisableCustomFieldKeyWithBody

func (c *Client) DisableCustomFieldKeyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) EmbeddableDashboard

func (c *Client) EmbeddableDashboard(ctx context.Context, body EmbeddableDashboardJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) EmbeddableDashboardWithBody

func (c *Client) EmbeddableDashboardWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) EndCustomerPlan

func (c *Client) EndCustomerPlan(ctx context.Context, customerId CustomerId, customerPlanId CustomerPlanId, body EndCustomerPlanJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) EndCustomerPlanWithBody

func (c *Client) EndCustomerPlanWithBody(ctx context.Context, customerId CustomerId, customerPlanId CustomerPlanId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetBillingConfig

func (c *Client) GetBillingConfig(ctx context.Context, customerId CustomerId, billingProviderTypeParam BillingProviderTypeParam, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetCosts

func (c *Client) GetCosts(ctx context.Context, customerId CustomerId, params *GetCostsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetCustomer

func (c *Client) GetCustomer(ctx context.Context, customerId CustomerId, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetCustomerAlert

func (c *Client) GetCustomerAlert(ctx context.Context, body GetCustomerAlertJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetCustomerAlertWithBody

func (c *Client) GetCustomerAlertWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetInvoice

func (c *Client) GetInvoice(ctx context.Context, customerId CustomerId, invoiceId InvoiceId, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetPagedUsage

func (c *Client) GetPagedUsage(ctx context.Context, params *GetPagedUsageParams, body GetPagedUsageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetPagedUsageWithBody

func (c *Client) GetPagedUsageWithBody(ctx context.Context, params *GetPagedUsageParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetPlanCharges

func (c *Client) GetPlanCharges(ctx context.Context, planId PlanId, params *GetPlanChargesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetPlanDetails

func (c *Client) GetPlanDetails(ctx context.Context, planId PlanId, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetPlanPriceAdjustments

func (c *Client) GetPlanPriceAdjustments(ctx context.Context, customerId CustomerId, customerPlanId CustomerPlanId, params *GetPlanPriceAdjustmentsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetUsageBatch

func (c *Client) GetUsageBatch(ctx context.Context, params *GetUsageBatchParams, body GetUsageBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetUsageBatchWithBody

func (c *Client) GetUsageBatchWithBody(ctx context.Context, params *GetUsageBatchParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) Ingest

func (c *Client) Ingest(ctx context.Context, body IngestJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) IngestWithBody

func (c *Client) IngestWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListBillableMetrics

func (c *Client) ListBillableMetrics(ctx context.Context, customerId CustomerId, params *ListBillableMetricsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListCreditLedgerEntries

func (c *Client) ListCreditLedgerEntries(ctx context.Context, params *ListCreditLedgerEntriesParams, body ListCreditLedgerEntriesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListCreditLedgerEntriesWithBody

func (c *Client) ListCreditLedgerEntriesWithBody(ctx context.Context, params *ListCreditLedgerEntriesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListCreditTypes

func (c *Client) ListCreditTypes(ctx context.Context, params *ListCreditTypesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListCustomFieldKeys

func (c *Client) ListCustomFieldKeys(ctx context.Context, body ListCustomFieldKeysJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListCustomFieldKeysWithBody

func (c *Client) ListCustomFieldKeysWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListCustomerAlerts

func (c *Client) ListCustomerAlerts(ctx context.Context, params *ListCustomerAlertsParams, body ListCustomerAlertsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListCustomerAlertsWithBody

func (c *Client) ListCustomerAlertsWithBody(ctx context.Context, params *ListCustomerAlertsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListCustomerPlans

func (c *Client) ListCustomerPlans(ctx context.Context, customerId CustomerId, params *ListCustomerPlansParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListCustomers

func (c *Client) ListCustomers(ctx context.Context, params *ListCustomersParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListGrants

func (c *Client) ListGrants(ctx context.Context, params *ListGrantsParams, body ListGrantsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListGrantsWithBody

func (c *Client) ListGrantsWithBody(ctx context.Context, params *ListGrantsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListInvoices

func (c *Client) ListInvoices(ctx context.Context, customerId CustomerId, params *ListInvoicesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListInvoicesCached

func (c *Client) ListInvoicesCached(ctx context.Context, customerId CustomerId, params *ListInvoicesCachedParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListPlans

func (c *Client) ListPlans(ctx context.Context, params *ListPlansParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SetBillingConfigForCustomer

func (c *Client) SetBillingConfigForCustomer(ctx context.Context, customerId CustomerId, billingProviderTypeParam BillingProviderTypeParam, body SetBillingConfigForCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SetBillingConfigForCustomerWithBody

func (c *Client) SetBillingConfigForCustomerWithBody(ctx context.Context, customerId CustomerId, billingProviderTypeParam BillingProviderTypeParam, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SetCustomFields

func (c *Client) SetCustomFields(ctx context.Context, body SetCustomFieldsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SetCustomFieldsWithBody

func (c *Client) SetCustomFieldsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SetCustomerName

func (c *Client) SetCustomerName(ctx context.Context, customerId CustomerId, body SetCustomerNameJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SetCustomerNameWithBody

func (c *Client) SetCustomerNameWithBody(ctx context.Context, customerId CustomerId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SetIngestAliases

func (c *Client) SetIngestAliases(ctx context.Context, customerId CustomerId, body SetIngestAliasesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) SetIngestAliasesWithBody

func (c *Client) SetIngestAliasesWithBody(ctx context.Context, customerId CustomerId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateCustomerConfig

func (c *Client) UpdateCustomerConfig(ctx context.Context, customerId CustomerId, body UpdateCustomerConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateCustomerConfigWithBody

func (c *Client) UpdateCustomerConfigWithBody(ctx context.Context, customerId CustomerId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) VoidGrant

func (c *Client) VoidGrant(ctx context.Context, body VoidGrantJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) VoidGrantWithBody

func (c *Client) VoidGrantWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// ArchiveAlert request with any body
	ArchiveAlertWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	ArchiveAlert(ctx context.Context, body ArchiveAlertJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateAlert request with any body
	CreateAlertWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateAlert(ctx context.Context, body CreateAlertJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListCreditTypes request
	ListCreditTypes(ctx context.Context, params *ListCreditTypesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateGrant request with any body
	CreateGrantWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateGrant(ctx context.Context, body CreateGrantJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListCreditLedgerEntries request with any body
	ListCreditLedgerEntriesWithBody(ctx context.Context, params *ListCreditLedgerEntriesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	ListCreditLedgerEntries(ctx context.Context, params *ListCreditLedgerEntriesParams, body ListCreditLedgerEntriesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListGrants request with any body
	ListGrantsWithBody(ctx context.Context, params *ListGrantsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	ListGrants(ctx context.Context, params *ListGrantsParams, body ListGrantsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// VoidGrant request with any body
	VoidGrantWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	VoidGrant(ctx context.Context, body VoidGrantJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AddCustomFieldKey request with any body
	AddCustomFieldKeyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	AddCustomFieldKey(ctx context.Context, body AddCustomFieldKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteCustomFields request with any body
	DeleteCustomFieldsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	DeleteCustomFields(ctx context.Context, body DeleteCustomFieldsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListCustomFieldKeys request with any body
	ListCustomFieldKeysWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	ListCustomFieldKeys(ctx context.Context, body ListCustomFieldKeysJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DisableCustomFieldKey request with any body
	DisableCustomFieldKeyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	DisableCustomFieldKey(ctx context.Context, body DisableCustomFieldKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SetCustomFields request with any body
	SetCustomFieldsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	SetCustomFields(ctx context.Context, body SetCustomFieldsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetCustomerAlert request with any body
	GetCustomerAlertWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	GetCustomerAlert(ctx context.Context, body GetCustomerAlertJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListCustomerAlerts request with any body
	ListCustomerAlertsWithBody(ctx context.Context, params *ListCustomerAlertsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	ListCustomerAlerts(ctx context.Context, params *ListCustomerAlertsParams, body ListCustomerAlertsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListCustomers request
	ListCustomers(ctx context.Context, params *ListCustomersParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateCustomer request with any body
	CreateCustomerWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateCustomer(ctx context.Context, body CreateCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ArchiveCustomer request with any body
	ArchiveCustomerWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	ArchiveCustomer(ctx context.Context, body ArchiveCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetCustomer request
	GetCustomer(ctx context.Context, customerId CustomerId, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListBillableMetrics request
	ListBillableMetrics(ctx context.Context, customerId CustomerId, params *ListBillableMetricsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteBillingConfigForCustomer request
	DeleteBillingConfigForCustomer(ctx context.Context, customerId CustomerId, billingProviderTypeParam BillingProviderTypeParam, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetBillingConfig request
	GetBillingConfig(ctx context.Context, customerId CustomerId, billingProviderTypeParam BillingProviderTypeParam, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SetBillingConfigForCustomer request with any body
	SetBillingConfigForCustomerWithBody(ctx context.Context, customerId CustomerId, billingProviderTypeParam BillingProviderTypeParam, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	SetBillingConfigForCustomer(ctx context.Context, customerId CustomerId, billingProviderTypeParam BillingProviderTypeParam, body SetBillingConfigForCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetCosts request
	GetCosts(ctx context.Context, customerId CustomerId, params *GetCostsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListInvoices request
	ListInvoices(ctx context.Context, customerId CustomerId, params *ListInvoicesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListInvoicesCached request
	ListInvoicesCached(ctx context.Context, customerId CustomerId, params *ListInvoicesCachedParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetInvoice request
	GetInvoice(ctx context.Context, customerId CustomerId, invoiceId InvoiceId, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListCustomerPlans request
	ListCustomerPlans(ctx context.Context, customerId CustomerId, params *ListCustomerPlansParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AddPlanToCustomer request with any body
	AddPlanToCustomerWithBody(ctx context.Context, customerId CustomerId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	AddPlanToCustomer(ctx context.Context, customerId CustomerId, body AddPlanToCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// EndCustomerPlan request with any body
	EndCustomerPlanWithBody(ctx context.Context, customerId CustomerId, customerPlanId CustomerPlanId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	EndCustomerPlan(ctx context.Context, customerId CustomerId, customerPlanId CustomerPlanId, body EndCustomerPlanJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetPlanPriceAdjustments request
	GetPlanPriceAdjustments(ctx context.Context, customerId CustomerId, customerPlanId CustomerPlanId, params *GetPlanPriceAdjustmentsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SetIngestAliases request with any body
	SetIngestAliasesWithBody(ctx context.Context, customerId CustomerId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	SetIngestAliases(ctx context.Context, customerId CustomerId, body SetIngestAliasesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// SetCustomerName request with any body
	SetCustomerNameWithBody(ctx context.Context, customerId CustomerId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	SetCustomerName(ctx context.Context, customerId CustomerId, body SetCustomerNameJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateCustomerConfig request with any body
	UpdateCustomerConfigWithBody(ctx context.Context, customerId CustomerId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	UpdateCustomerConfig(ctx context.Context, customerId CustomerId, body UpdateCustomerConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// EmbeddableDashboard request with any body
	EmbeddableDashboardWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	EmbeddableDashboard(ctx context.Context, body EmbeddableDashboardJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// Ingest request with any body
	IngestWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	Ingest(ctx context.Context, body IngestJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetPlanDetails request
	GetPlanDetails(ctx context.Context, planId PlanId, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetPlanCharges request
	GetPlanCharges(ctx context.Context, planId PlanId, params *GetPlanChargesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListPlans request
	ListPlans(ctx context.Context, params *ListPlansParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetUsageBatch request with any body
	GetUsageBatchWithBody(ctx context.Context, params *GetUsageBatchParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	GetUsageBatch(ctx context.Context, params *GetUsageBatchParams, body GetUsageBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetPagedUsage request with any body
	GetPagedUsageWithBody(ctx context.Context, params *GetPagedUsageParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	GetPagedUsage(ctx context.Context, params *GetPagedUsageParams, body GetPagedUsageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

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

func WithRequestEditorFn

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 (*ClientWithResponses) AddCustomFieldKeyWithBodyWithResponse

func (c *ClientWithResponses) AddCustomFieldKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddCustomFieldKeyResponse, error)

AddCustomFieldKeyWithBodyWithResponse request with arbitrary body returning *AddCustomFieldKeyResponse

func (*ClientWithResponses) AddCustomFieldKeyWithResponse

func (c *ClientWithResponses) AddCustomFieldKeyWithResponse(ctx context.Context, body AddCustomFieldKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*AddCustomFieldKeyResponse, error)

func (*ClientWithResponses) AddPlanToCustomerWithBodyWithResponse

func (c *ClientWithResponses) AddPlanToCustomerWithBodyWithResponse(ctx context.Context, customerId CustomerId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddPlanToCustomerResponse, error)

AddPlanToCustomerWithBodyWithResponse request with arbitrary body returning *AddPlanToCustomerResponse

func (*ClientWithResponses) AddPlanToCustomerWithResponse

func (c *ClientWithResponses) AddPlanToCustomerWithResponse(ctx context.Context, customerId CustomerId, body AddPlanToCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*AddPlanToCustomerResponse, error)

func (*ClientWithResponses) ArchiveAlertWithBodyWithResponse

func (c *ClientWithResponses) ArchiveAlertWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ArchiveAlertResponse, error)

ArchiveAlertWithBodyWithResponse request with arbitrary body returning *ArchiveAlertResponse

func (*ClientWithResponses) ArchiveAlertWithResponse

func (c *ClientWithResponses) ArchiveAlertWithResponse(ctx context.Context, body ArchiveAlertJSONRequestBody, reqEditors ...RequestEditorFn) (*ArchiveAlertResponse, error)

func (*ClientWithResponses) ArchiveCustomerWithBodyWithResponse

func (c *ClientWithResponses) ArchiveCustomerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ArchiveCustomerResponse, error)

ArchiveCustomerWithBodyWithResponse request with arbitrary body returning *ArchiveCustomerResponse

func (*ClientWithResponses) ArchiveCustomerWithResponse

func (c *ClientWithResponses) ArchiveCustomerWithResponse(ctx context.Context, body ArchiveCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*ArchiveCustomerResponse, error)

func (*ClientWithResponses) CreateAlertWithBodyWithResponse

func (c *ClientWithResponses) CreateAlertWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAlertResponse, error)

CreateAlertWithBodyWithResponse request with arbitrary body returning *CreateAlertResponse

func (*ClientWithResponses) CreateAlertWithResponse

func (c *ClientWithResponses) CreateAlertWithResponse(ctx context.Context, body CreateAlertJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAlertResponse, error)

func (*ClientWithResponses) CreateCustomerWithBodyWithResponse

func (c *ClientWithResponses) CreateCustomerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCustomerResponse, error)

CreateCustomerWithBodyWithResponse request with arbitrary body returning *CreateCustomerResponse

func (*ClientWithResponses) CreateCustomerWithResponse

func (c *ClientWithResponses) CreateCustomerWithResponse(ctx context.Context, body CreateCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCustomerResponse, error)

func (*ClientWithResponses) CreateGrantWithBodyWithResponse

func (c *ClientWithResponses) CreateGrantWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateGrantResponse, error)

CreateGrantWithBodyWithResponse request with arbitrary body returning *CreateGrantResponse

func (*ClientWithResponses) CreateGrantWithResponse

func (c *ClientWithResponses) CreateGrantWithResponse(ctx context.Context, body CreateGrantJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateGrantResponse, error)

func (*ClientWithResponses) DeleteBillingConfigForCustomerWithResponse

func (c *ClientWithResponses) DeleteBillingConfigForCustomerWithResponse(ctx context.Context, customerId CustomerId, billingProviderTypeParam BillingProviderTypeParam, reqEditors ...RequestEditorFn) (*DeleteBillingConfigForCustomerResponse, error)

DeleteBillingConfigForCustomerWithResponse request returning *DeleteBillingConfigForCustomerResponse

func (*ClientWithResponses) DeleteCustomFieldsWithBodyWithResponse

func (c *ClientWithResponses) DeleteCustomFieldsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteCustomFieldsResponse, error)

DeleteCustomFieldsWithBodyWithResponse request with arbitrary body returning *DeleteCustomFieldsResponse

func (*ClientWithResponses) DeleteCustomFieldsWithResponse

func (c *ClientWithResponses) DeleteCustomFieldsWithResponse(ctx context.Context, body DeleteCustomFieldsJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteCustomFieldsResponse, error)

func (*ClientWithResponses) DisableCustomFieldKeyWithBodyWithResponse

func (c *ClientWithResponses) DisableCustomFieldKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DisableCustomFieldKeyResponse, error)

DisableCustomFieldKeyWithBodyWithResponse request with arbitrary body returning *DisableCustomFieldKeyResponse

func (*ClientWithResponses) DisableCustomFieldKeyWithResponse

func (c *ClientWithResponses) DisableCustomFieldKeyWithResponse(ctx context.Context, body DisableCustomFieldKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*DisableCustomFieldKeyResponse, error)

func (*ClientWithResponses) EmbeddableDashboardWithBodyWithResponse

func (c *ClientWithResponses) EmbeddableDashboardWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmbeddableDashboardResponse, error)

EmbeddableDashboardWithBodyWithResponse request with arbitrary body returning *EmbeddableDashboardResponse

func (*ClientWithResponses) EmbeddableDashboardWithResponse

func (c *ClientWithResponses) EmbeddableDashboardWithResponse(ctx context.Context, body EmbeddableDashboardJSONRequestBody, reqEditors ...RequestEditorFn) (*EmbeddableDashboardResponse, error)

func (*ClientWithResponses) EndCustomerPlanWithBodyWithResponse

func (c *ClientWithResponses) EndCustomerPlanWithBodyWithResponse(ctx context.Context, customerId CustomerId, customerPlanId CustomerPlanId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EndCustomerPlanResponse, error)

EndCustomerPlanWithBodyWithResponse request with arbitrary body returning *EndCustomerPlanResponse

func (*ClientWithResponses) EndCustomerPlanWithResponse

func (c *ClientWithResponses) EndCustomerPlanWithResponse(ctx context.Context, customerId CustomerId, customerPlanId CustomerPlanId, body EndCustomerPlanJSONRequestBody, reqEditors ...RequestEditorFn) (*EndCustomerPlanResponse, error)

func (*ClientWithResponses) GetBillingConfigWithResponse

func (c *ClientWithResponses) GetBillingConfigWithResponse(ctx context.Context, customerId CustomerId, billingProviderTypeParam BillingProviderTypeParam, reqEditors ...RequestEditorFn) (*GetBillingConfigResponse, error)

GetBillingConfigWithResponse request returning *GetBillingConfigResponse

func (*ClientWithResponses) GetCostsWithResponse

func (c *ClientWithResponses) GetCostsWithResponse(ctx context.Context, customerId CustomerId, params *GetCostsParams, reqEditors ...RequestEditorFn) (*GetCostsResponse, error)

GetCostsWithResponse request returning *GetCostsResponse

func (*ClientWithResponses) GetCustomerAlertWithBodyWithResponse

func (c *ClientWithResponses) GetCustomerAlertWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetCustomerAlertResponse, error)

GetCustomerAlertWithBodyWithResponse request with arbitrary body returning *GetCustomerAlertResponse

func (*ClientWithResponses) GetCustomerAlertWithResponse

func (c *ClientWithResponses) GetCustomerAlertWithResponse(ctx context.Context, body GetCustomerAlertJSONRequestBody, reqEditors ...RequestEditorFn) (*GetCustomerAlertResponse, error)

func (*ClientWithResponses) GetCustomerWithResponse

func (c *ClientWithResponses) GetCustomerWithResponse(ctx context.Context, customerId CustomerId, reqEditors ...RequestEditorFn) (*GetCustomerResponse, error)

GetCustomerWithResponse request returning *GetCustomerResponse

func (*ClientWithResponses) GetInvoiceWithResponse

func (c *ClientWithResponses) GetInvoiceWithResponse(ctx context.Context, customerId CustomerId, invoiceId InvoiceId, reqEditors ...RequestEditorFn) (*GetInvoiceResponse, error)

GetInvoiceWithResponse request returning *GetInvoiceResponse

func (*ClientWithResponses) GetPagedUsageWithBodyWithResponse

func (c *ClientWithResponses) GetPagedUsageWithBodyWithResponse(ctx context.Context, params *GetPagedUsageParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetPagedUsageResponse, error)

GetPagedUsageWithBodyWithResponse request with arbitrary body returning *GetPagedUsageResponse

func (*ClientWithResponses) GetPagedUsageWithResponse

func (c *ClientWithResponses) GetPagedUsageWithResponse(ctx context.Context, params *GetPagedUsageParams, body GetPagedUsageJSONRequestBody, reqEditors ...RequestEditorFn) (*GetPagedUsageResponse, error)

func (*ClientWithResponses) GetPlanChargesWithResponse

func (c *ClientWithResponses) GetPlanChargesWithResponse(ctx context.Context, planId PlanId, params *GetPlanChargesParams, reqEditors ...RequestEditorFn) (*GetPlanChargesResponse, error)

GetPlanChargesWithResponse request returning *GetPlanChargesResponse

func (*ClientWithResponses) GetPlanDetailsWithResponse

func (c *ClientWithResponses) GetPlanDetailsWithResponse(ctx context.Context, planId PlanId, reqEditors ...RequestEditorFn) (*GetPlanDetailsResponse, error)

GetPlanDetailsWithResponse request returning *GetPlanDetailsResponse

func (*ClientWithResponses) GetPlanPriceAdjustmentsWithResponse

func (c *ClientWithResponses) GetPlanPriceAdjustmentsWithResponse(ctx context.Context, customerId CustomerId, customerPlanId CustomerPlanId, params *GetPlanPriceAdjustmentsParams, reqEditors ...RequestEditorFn) (*GetPlanPriceAdjustmentsResponse, error)

GetPlanPriceAdjustmentsWithResponse request returning *GetPlanPriceAdjustmentsResponse

func (*ClientWithResponses) GetUsageBatchWithBodyWithResponse

func (c *ClientWithResponses) GetUsageBatchWithBodyWithResponse(ctx context.Context, params *GetUsageBatchParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetUsageBatchResponse, error)

GetUsageBatchWithBodyWithResponse request with arbitrary body returning *GetUsageBatchResponse

func (*ClientWithResponses) GetUsageBatchWithResponse

func (c *ClientWithResponses) GetUsageBatchWithResponse(ctx context.Context, params *GetUsageBatchParams, body GetUsageBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*GetUsageBatchResponse, error)

func (*ClientWithResponses) IngestWithBodyWithResponse

func (c *ClientWithResponses) IngestWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IngestResponse, error)

IngestWithBodyWithResponse request with arbitrary body returning *IngestResponse

func (*ClientWithResponses) IngestWithResponse

func (c *ClientWithResponses) IngestWithResponse(ctx context.Context, body IngestJSONRequestBody, reqEditors ...RequestEditorFn) (*IngestResponse, error)

func (*ClientWithResponses) ListBillableMetricsWithResponse

func (c *ClientWithResponses) ListBillableMetricsWithResponse(ctx context.Context, customerId CustomerId, params *ListBillableMetricsParams, reqEditors ...RequestEditorFn) (*ListBillableMetricsResponse, error)

ListBillableMetricsWithResponse request returning *ListBillableMetricsResponse

func (*ClientWithResponses) ListCreditLedgerEntriesWithBodyWithResponse

func (c *ClientWithResponses) ListCreditLedgerEntriesWithBodyWithResponse(ctx context.Context, params *ListCreditLedgerEntriesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ListCreditLedgerEntriesResponse, error)

ListCreditLedgerEntriesWithBodyWithResponse request with arbitrary body returning *ListCreditLedgerEntriesResponse

func (*ClientWithResponses) ListCreditTypesWithResponse

func (c *ClientWithResponses) ListCreditTypesWithResponse(ctx context.Context, params *ListCreditTypesParams, reqEditors ...RequestEditorFn) (*ListCreditTypesResponse, error)

ListCreditTypesWithResponse request returning *ListCreditTypesResponse

func (*ClientWithResponses) ListCustomFieldKeysWithBodyWithResponse

func (c *ClientWithResponses) ListCustomFieldKeysWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ListCustomFieldKeysResponse, error)

ListCustomFieldKeysWithBodyWithResponse request with arbitrary body returning *ListCustomFieldKeysResponse

func (*ClientWithResponses) ListCustomFieldKeysWithResponse

func (c *ClientWithResponses) ListCustomFieldKeysWithResponse(ctx context.Context, body ListCustomFieldKeysJSONRequestBody, reqEditors ...RequestEditorFn) (*ListCustomFieldKeysResponse, error)

func (*ClientWithResponses) ListCustomerAlertsWithBodyWithResponse

func (c *ClientWithResponses) ListCustomerAlertsWithBodyWithResponse(ctx context.Context, params *ListCustomerAlertsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ListCustomerAlertsResponse, error)

ListCustomerAlertsWithBodyWithResponse request with arbitrary body returning *ListCustomerAlertsResponse

func (*ClientWithResponses) ListCustomerAlertsWithResponse

func (*ClientWithResponses) ListCustomerPlansWithResponse

func (c *ClientWithResponses) ListCustomerPlansWithResponse(ctx context.Context, customerId CustomerId, params *ListCustomerPlansParams, reqEditors ...RequestEditorFn) (*ListCustomerPlansResponse, error)

ListCustomerPlansWithResponse request returning *ListCustomerPlansResponse

func (*ClientWithResponses) ListCustomersWithResponse

func (c *ClientWithResponses) ListCustomersWithResponse(ctx context.Context, params *ListCustomersParams, reqEditors ...RequestEditorFn) (*ListCustomersResponse, error)

ListCustomersWithResponse request returning *ListCustomersResponse

func (*ClientWithResponses) ListGrantsWithBodyWithResponse

func (c *ClientWithResponses) ListGrantsWithBodyWithResponse(ctx context.Context, params *ListGrantsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ListGrantsResponse, error)

ListGrantsWithBodyWithResponse request with arbitrary body returning *ListGrantsResponse

func (*ClientWithResponses) ListGrantsWithResponse

func (c *ClientWithResponses) ListGrantsWithResponse(ctx context.Context, params *ListGrantsParams, body ListGrantsJSONRequestBody, reqEditors ...RequestEditorFn) (*ListGrantsResponse, error)

func (*ClientWithResponses) ListInvoicesCachedWithResponse

func (c *ClientWithResponses) ListInvoicesCachedWithResponse(ctx context.Context, customerId CustomerId, params *ListInvoicesCachedParams, reqEditors ...RequestEditorFn) (*ListInvoicesCachedResponse, error)

ListInvoicesCachedWithResponse request returning *ListInvoicesCachedResponse

func (*ClientWithResponses) ListInvoicesWithResponse

func (c *ClientWithResponses) ListInvoicesWithResponse(ctx context.Context, customerId CustomerId, params *ListInvoicesParams, reqEditors ...RequestEditorFn) (*ListInvoicesResponse, error)

ListInvoicesWithResponse request returning *ListInvoicesResponse

func (*ClientWithResponses) ListPlansWithResponse

func (c *ClientWithResponses) ListPlansWithResponse(ctx context.Context, params *ListPlansParams, reqEditors ...RequestEditorFn) (*ListPlansResponse, error)

ListPlansWithResponse request returning *ListPlansResponse

func (*ClientWithResponses) SetBillingConfigForCustomerWithBodyWithResponse

func (c *ClientWithResponses) SetBillingConfigForCustomerWithBodyWithResponse(ctx context.Context, customerId CustomerId, billingProviderTypeParam BillingProviderTypeParam, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetBillingConfigForCustomerResponse, error)

SetBillingConfigForCustomerWithBodyWithResponse request with arbitrary body returning *SetBillingConfigForCustomerResponse

func (*ClientWithResponses) SetBillingConfigForCustomerWithResponse

func (c *ClientWithResponses) SetBillingConfigForCustomerWithResponse(ctx context.Context, customerId CustomerId, billingProviderTypeParam BillingProviderTypeParam, body SetBillingConfigForCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*SetBillingConfigForCustomerResponse, error)

func (*ClientWithResponses) SetCustomFieldsWithBodyWithResponse

func (c *ClientWithResponses) SetCustomFieldsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetCustomFieldsResponse, error)

SetCustomFieldsWithBodyWithResponse request with arbitrary body returning *SetCustomFieldsResponse

func (*ClientWithResponses) SetCustomFieldsWithResponse

func (c *ClientWithResponses) SetCustomFieldsWithResponse(ctx context.Context, body SetCustomFieldsJSONRequestBody, reqEditors ...RequestEditorFn) (*SetCustomFieldsResponse, error)

func (*ClientWithResponses) SetCustomerNameWithBodyWithResponse

func (c *ClientWithResponses) SetCustomerNameWithBodyWithResponse(ctx context.Context, customerId CustomerId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetCustomerNameResponse, error)

SetCustomerNameWithBodyWithResponse request with arbitrary body returning *SetCustomerNameResponse

func (*ClientWithResponses) SetCustomerNameWithResponse

func (c *ClientWithResponses) SetCustomerNameWithResponse(ctx context.Context, customerId CustomerId, body SetCustomerNameJSONRequestBody, reqEditors ...RequestEditorFn) (*SetCustomerNameResponse, error)

func (*ClientWithResponses) SetIngestAliasesWithBodyWithResponse

func (c *ClientWithResponses) SetIngestAliasesWithBodyWithResponse(ctx context.Context, customerId CustomerId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetIngestAliasesResponse, error)

SetIngestAliasesWithBodyWithResponse request with arbitrary body returning *SetIngestAliasesResponse

func (*ClientWithResponses) SetIngestAliasesWithResponse

func (c *ClientWithResponses) SetIngestAliasesWithResponse(ctx context.Context, customerId CustomerId, body SetIngestAliasesJSONRequestBody, reqEditors ...RequestEditorFn) (*SetIngestAliasesResponse, error)

func (*ClientWithResponses) UpdateCustomerConfigWithBodyWithResponse

func (c *ClientWithResponses) UpdateCustomerConfigWithBodyWithResponse(ctx context.Context, customerId CustomerId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCustomerConfigResponse, error)

UpdateCustomerConfigWithBodyWithResponse request with arbitrary body returning *UpdateCustomerConfigResponse

func (*ClientWithResponses) UpdateCustomerConfigWithResponse

func (c *ClientWithResponses) UpdateCustomerConfigWithResponse(ctx context.Context, customerId CustomerId, body UpdateCustomerConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCustomerConfigResponse, error)

func (*ClientWithResponses) VoidGrantWithBodyWithResponse

func (c *ClientWithResponses) VoidGrantWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*VoidGrantResponse, error)

VoidGrantWithBodyWithResponse request with arbitrary body returning *VoidGrantResponse

func (*ClientWithResponses) VoidGrantWithResponse

func (c *ClientWithResponses) VoidGrantWithResponse(ctx context.Context, body VoidGrantJSONRequestBody, reqEditors ...RequestEditorFn) (*VoidGrantResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// ArchiveAlert request with any body
	ArchiveAlertWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ArchiveAlertResponse, error)

	ArchiveAlertWithResponse(ctx context.Context, body ArchiveAlertJSONRequestBody, reqEditors ...RequestEditorFn) (*ArchiveAlertResponse, error)

	// CreateAlert request with any body
	CreateAlertWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAlertResponse, error)

	CreateAlertWithResponse(ctx context.Context, body CreateAlertJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAlertResponse, error)

	// ListCreditTypes request
	ListCreditTypesWithResponse(ctx context.Context, params *ListCreditTypesParams, reqEditors ...RequestEditorFn) (*ListCreditTypesResponse, error)

	// CreateGrant request with any body
	CreateGrantWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateGrantResponse, error)

	CreateGrantWithResponse(ctx context.Context, body CreateGrantJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateGrantResponse, error)

	// ListCreditLedgerEntries request with any body
	ListCreditLedgerEntriesWithBodyWithResponse(ctx context.Context, params *ListCreditLedgerEntriesParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ListCreditLedgerEntriesResponse, error)

	ListCreditLedgerEntriesWithResponse(ctx context.Context, params *ListCreditLedgerEntriesParams, body ListCreditLedgerEntriesJSONRequestBody, reqEditors ...RequestEditorFn) (*ListCreditLedgerEntriesResponse, error)

	// ListGrants request with any body
	ListGrantsWithBodyWithResponse(ctx context.Context, params *ListGrantsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ListGrantsResponse, error)

	ListGrantsWithResponse(ctx context.Context, params *ListGrantsParams, body ListGrantsJSONRequestBody, reqEditors ...RequestEditorFn) (*ListGrantsResponse, error)

	// VoidGrant request with any body
	VoidGrantWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*VoidGrantResponse, error)

	VoidGrantWithResponse(ctx context.Context, body VoidGrantJSONRequestBody, reqEditors ...RequestEditorFn) (*VoidGrantResponse, error)

	// AddCustomFieldKey request with any body
	AddCustomFieldKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddCustomFieldKeyResponse, error)

	AddCustomFieldKeyWithResponse(ctx context.Context, body AddCustomFieldKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*AddCustomFieldKeyResponse, error)

	// DeleteCustomFields request with any body
	DeleteCustomFieldsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteCustomFieldsResponse, error)

	DeleteCustomFieldsWithResponse(ctx context.Context, body DeleteCustomFieldsJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteCustomFieldsResponse, error)

	// ListCustomFieldKeys request with any body
	ListCustomFieldKeysWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ListCustomFieldKeysResponse, error)

	ListCustomFieldKeysWithResponse(ctx context.Context, body ListCustomFieldKeysJSONRequestBody, reqEditors ...RequestEditorFn) (*ListCustomFieldKeysResponse, error)

	// DisableCustomFieldKey request with any body
	DisableCustomFieldKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DisableCustomFieldKeyResponse, error)

	DisableCustomFieldKeyWithResponse(ctx context.Context, body DisableCustomFieldKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*DisableCustomFieldKeyResponse, error)

	// SetCustomFields request with any body
	SetCustomFieldsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetCustomFieldsResponse, error)

	SetCustomFieldsWithResponse(ctx context.Context, body SetCustomFieldsJSONRequestBody, reqEditors ...RequestEditorFn) (*SetCustomFieldsResponse, error)

	// GetCustomerAlert request with any body
	GetCustomerAlertWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetCustomerAlertResponse, error)

	GetCustomerAlertWithResponse(ctx context.Context, body GetCustomerAlertJSONRequestBody, reqEditors ...RequestEditorFn) (*GetCustomerAlertResponse, error)

	// ListCustomerAlerts request with any body
	ListCustomerAlertsWithBodyWithResponse(ctx context.Context, params *ListCustomerAlertsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ListCustomerAlertsResponse, error)

	ListCustomerAlertsWithResponse(ctx context.Context, params *ListCustomerAlertsParams, body ListCustomerAlertsJSONRequestBody, reqEditors ...RequestEditorFn) (*ListCustomerAlertsResponse, error)

	// ListCustomers request
	ListCustomersWithResponse(ctx context.Context, params *ListCustomersParams, reqEditors ...RequestEditorFn) (*ListCustomersResponse, error)

	// CreateCustomer request with any body
	CreateCustomerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCustomerResponse, error)

	CreateCustomerWithResponse(ctx context.Context, body CreateCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCustomerResponse, error)

	// ArchiveCustomer request with any body
	ArchiveCustomerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ArchiveCustomerResponse, error)

	ArchiveCustomerWithResponse(ctx context.Context, body ArchiveCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*ArchiveCustomerResponse, error)

	// GetCustomer request
	GetCustomerWithResponse(ctx context.Context, customerId CustomerId, reqEditors ...RequestEditorFn) (*GetCustomerResponse, error)

	// ListBillableMetrics request
	ListBillableMetricsWithResponse(ctx context.Context, customerId CustomerId, params *ListBillableMetricsParams, reqEditors ...RequestEditorFn) (*ListBillableMetricsResponse, error)

	// DeleteBillingConfigForCustomer request
	DeleteBillingConfigForCustomerWithResponse(ctx context.Context, customerId CustomerId, billingProviderTypeParam BillingProviderTypeParam, reqEditors ...RequestEditorFn) (*DeleteBillingConfigForCustomerResponse, error)

	// GetBillingConfig request
	GetBillingConfigWithResponse(ctx context.Context, customerId CustomerId, billingProviderTypeParam BillingProviderTypeParam, reqEditors ...RequestEditorFn) (*GetBillingConfigResponse, error)

	// SetBillingConfigForCustomer request with any body
	SetBillingConfigForCustomerWithBodyWithResponse(ctx context.Context, customerId CustomerId, billingProviderTypeParam BillingProviderTypeParam, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetBillingConfigForCustomerResponse, error)

	SetBillingConfigForCustomerWithResponse(ctx context.Context, customerId CustomerId, billingProviderTypeParam BillingProviderTypeParam, body SetBillingConfigForCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*SetBillingConfigForCustomerResponse, error)

	// GetCosts request
	GetCostsWithResponse(ctx context.Context, customerId CustomerId, params *GetCostsParams, reqEditors ...RequestEditorFn) (*GetCostsResponse, error)

	// ListInvoices request
	ListInvoicesWithResponse(ctx context.Context, customerId CustomerId, params *ListInvoicesParams, reqEditors ...RequestEditorFn) (*ListInvoicesResponse, error)

	// ListInvoicesCached request
	ListInvoicesCachedWithResponse(ctx context.Context, customerId CustomerId, params *ListInvoicesCachedParams, reqEditors ...RequestEditorFn) (*ListInvoicesCachedResponse, error)

	// GetInvoice request
	GetInvoiceWithResponse(ctx context.Context, customerId CustomerId, invoiceId InvoiceId, reqEditors ...RequestEditorFn) (*GetInvoiceResponse, error)

	// ListCustomerPlans request
	ListCustomerPlansWithResponse(ctx context.Context, customerId CustomerId, params *ListCustomerPlansParams, reqEditors ...RequestEditorFn) (*ListCustomerPlansResponse, error)

	// AddPlanToCustomer request with any body
	AddPlanToCustomerWithBodyWithResponse(ctx context.Context, customerId CustomerId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddPlanToCustomerResponse, error)

	AddPlanToCustomerWithResponse(ctx context.Context, customerId CustomerId, body AddPlanToCustomerJSONRequestBody, reqEditors ...RequestEditorFn) (*AddPlanToCustomerResponse, error)

	// EndCustomerPlan request with any body
	EndCustomerPlanWithBodyWithResponse(ctx context.Context, customerId CustomerId, customerPlanId CustomerPlanId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EndCustomerPlanResponse, error)

	EndCustomerPlanWithResponse(ctx context.Context, customerId CustomerId, customerPlanId CustomerPlanId, body EndCustomerPlanJSONRequestBody, reqEditors ...RequestEditorFn) (*EndCustomerPlanResponse, error)

	// GetPlanPriceAdjustments request
	GetPlanPriceAdjustmentsWithResponse(ctx context.Context, customerId CustomerId, customerPlanId CustomerPlanId, params *GetPlanPriceAdjustmentsParams, reqEditors ...RequestEditorFn) (*GetPlanPriceAdjustmentsResponse, error)

	// SetIngestAliases request with any body
	SetIngestAliasesWithBodyWithResponse(ctx context.Context, customerId CustomerId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetIngestAliasesResponse, error)

	SetIngestAliasesWithResponse(ctx context.Context, customerId CustomerId, body SetIngestAliasesJSONRequestBody, reqEditors ...RequestEditorFn) (*SetIngestAliasesResponse, error)

	// SetCustomerName request with any body
	SetCustomerNameWithBodyWithResponse(ctx context.Context, customerId CustomerId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetCustomerNameResponse, error)

	SetCustomerNameWithResponse(ctx context.Context, customerId CustomerId, body SetCustomerNameJSONRequestBody, reqEditors ...RequestEditorFn) (*SetCustomerNameResponse, error)

	// UpdateCustomerConfig request with any body
	UpdateCustomerConfigWithBodyWithResponse(ctx context.Context, customerId CustomerId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCustomerConfigResponse, error)

	UpdateCustomerConfigWithResponse(ctx context.Context, customerId CustomerId, body UpdateCustomerConfigJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCustomerConfigResponse, error)

	// EmbeddableDashboard request with any body
	EmbeddableDashboardWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*EmbeddableDashboardResponse, error)

	EmbeddableDashboardWithResponse(ctx context.Context, body EmbeddableDashboardJSONRequestBody, reqEditors ...RequestEditorFn) (*EmbeddableDashboardResponse, error)

	// Ingest request with any body
	IngestWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IngestResponse, error)

	IngestWithResponse(ctx context.Context, body IngestJSONRequestBody, reqEditors ...RequestEditorFn) (*IngestResponse, error)

	// GetPlanDetails request
	GetPlanDetailsWithResponse(ctx context.Context, planId PlanId, reqEditors ...RequestEditorFn) (*GetPlanDetailsResponse, error)

	// GetPlanCharges request
	GetPlanChargesWithResponse(ctx context.Context, planId PlanId, params *GetPlanChargesParams, reqEditors ...RequestEditorFn) (*GetPlanChargesResponse, error)

	// ListPlans request
	ListPlansWithResponse(ctx context.Context, params *ListPlansParams, reqEditors ...RequestEditorFn) (*ListPlansResponse, error)

	// GetUsageBatch request with any body
	GetUsageBatchWithBodyWithResponse(ctx context.Context, params *GetUsageBatchParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetUsageBatchResponse, error)

	GetUsageBatchWithResponse(ctx context.Context, params *GetUsageBatchParams, body GetUsageBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*GetUsageBatchResponse, error)

	// GetPagedUsage request with any body
	GetPagedUsageWithBodyWithResponse(ctx context.Context, params *GetPagedUsageParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*GetPagedUsageResponse, error)

	GetPagedUsageWithResponse(ctx context.Context, params *GetPagedUsageParams, body GetPagedUsageJSONRequestBody, reqEditors ...RequestEditorFn) (*GetPagedUsageResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type Costs

type Costs struct {
	CreditTypes    CostsPerCreditType `json:"credit_types"`
	EndTimestamp   time.Time          `json:"end_timestamp"`
	StartTimestamp time.Time          `json:"start_timestamp"`
}

Costs defines model for Costs.

type CostsPerCreditType

type CostsPerCreditType map[string]struct {
	Cost              *float32             `json:"cost,omitempty"`
	LineItemBreakdown *[]LineItemBreakdown `json:"line_item_breakdown,omitempty"`
	Name              *string              `json:"name,omitempty"`
}

CostsPerCreditType defines model for CostsPerCreditType.

type CreateAlertJSONRequestBody

type CreateAlertJSONRequestBody = CreateCustomerAlertPayload

CreateAlertJSONRequestBody defines body for CreateAlert for application/json ContentType.

type CreateAlertResponse

type CreateAlertResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data Id `json:"data"`
	}
}

func ParseCreateAlertResponse

func ParseCreateAlertResponse(rsp *http.Response) (*CreateAlertResponse, error)

ParseCreateAlertResponse parses an HTTP response from a CreateAlertWithResponse call

func (CreateAlertResponse) Status

func (r CreateAlertResponse) Status() string

Status returns HTTPResponse.Status

func (CreateAlertResponse) StatusCode

func (r CreateAlertResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateCreditGrantPayload

type CreateCreditGrantPayload struct {
	// CustomerId the Metronome ID of the customer
	CustomerId openapi_types.UUID `json:"customer_id"`

	// EffectiveAt The credit grant will only apply to billing periods that end at or after this timestamp.
	EffectiveAt *time.Time `json:"effective_at,omitempty"`

	// ExpiresAt The credit grant will only apply to billing periods that end before this timestamp.
	ExpiresAt time.Time `json:"expires_at"`

	// GrantAmount the amount of credits granted
	GrantAmount struct {
		Amount       float32            `json:"amount"`
		CreditTypeId openapi_types.UUID `json:"credit_type_id"`
	} `json:"grant_amount"`

	// InvoiceDate The date to issue an invoice for the paid_amount.
	InvoiceDate *time.Time `json:"invoice_date,omitempty"`

	// Name the name of the credit grant as it will appear on invoices
	Name string `json:"name"`

	// PaidAmount the amount paid for this credit grant
	PaidAmount struct {
		Amount       float32            `json:"amount"`
		CreditTypeId openapi_types.UUID `json:"credit_type_id"`
	} `json:"paid_amount"`
	Priority float32 `json:"priority"`

	// ProductIds The product(s) which these credits will be applied to. (If unspecified, the credits will be applied to charges for all products.). The array ordering specified here will be used to determine the order in which credits will be applied to invoice line items
	ProductIds *[]openapi_types.UUID `json:"product_ids,omitempty"`
	Reason     *string               `json:"reason,omitempty"`
}

CreateCreditGrantPayload defines model for CreateCreditGrantPayload.

type CreateCustomerAlertPayload

type CreateCustomerAlertPayload struct {
	// AlertType Type of the alert
	AlertType CreateCustomerAlertPayloadAlertType `json:"alert_type"`

	// BillableMetricId For alerts of type `usage_threshold_reached`, specifies which billable metric to track the usage for.
	BillableMetricId *openapi_types.UUID `json:"billable_metric_id,omitempty"`
	CreditTypeId     *openapi_types.UUID `json:"credit_type_id,omitempty"`

	// CustomerId If provided, will create this alert for this specific customer. To create an alert for all customers, do not specify `customer_id` or `plan_id`.
	CustomerId *openapi_types.UUID `json:"customer_id,omitempty"`

	// Name Name of the alert
	Name string `json:"name"`

	// PlanId If provided, will create this alert for this specific plan. To create an alert for all customers, do not specify `customer_id` or `plan_id`.
	PlanId *openapi_types.UUID `json:"plan_id,omitempty"`

	// Threshold Threshold value of the alert policy
	Threshold float32 `json:"threshold"`
}

CreateCustomerAlertPayload defines model for CreateCustomerAlertPayload.

type CreateCustomerAlertPayloadAlertType

type CreateCustomerAlertPayloadAlertType string

CreateCustomerAlertPayloadAlertType Type of the alert

const (
	CreateCustomerAlertPayloadAlertTypeLowCreditBalanceReached             CreateCustomerAlertPayloadAlertType = "low_credit_balance_reached"
	CreateCustomerAlertPayloadAlertTypeLowRemainingCreditPercentageReached CreateCustomerAlertPayloadAlertType = "low_remaining_credit_percentage_reached"
	CreateCustomerAlertPayloadAlertTypeLowRemainingDaysInPlanReached       CreateCustomerAlertPayloadAlertType = "low_remaining_days_in_plan_reached"
	CreateCustomerAlertPayloadAlertTypeSpendThresholdReached               CreateCustomerAlertPayloadAlertType = "spend_threshold_reached"
	CreateCustomerAlertPayloadAlertTypeUsageThresholdReached               CreateCustomerAlertPayloadAlertType = "usage_threshold_reached"
)

Defines values for CreateCustomerAlertPayloadAlertType.

type CreateCustomerJSONRequestBody

type CreateCustomerJSONRequestBody = CreateCustomerPayload

CreateCustomerJSONRequestBody defines body for CreateCustomer for application/json ContentType.

type CreateCustomerPayload

type CreateCustomerPayload struct {
	BillingConfig *struct {
		AwsProductCode            *string                 `json:"aws_product_code,omitempty"`
		AwsRegion                 *AwsRegion              `json:"aws_region,omitempty"`
		BillingProviderCustomerId string                  `json:"billing_provider_customer_id"`
		BillingProviderType       BillingProviderType     `json:"billing_provider_type"`
		StripeCollectionMethod    *StripeCollectionMethod `json:"stripe_collection_method,omitempty"`
	} `json:"billing_config,omitempty"`

	// ExternalId (deprecated, use ingest_aliases instead) the first ID (Metronome ID or ingest alias) that can be used in usage events
	ExternalId *string `json:"external_id,omitempty"`

	// IngestAliases Aliases that can be used to refer to this customer in usage events
	IngestAliases *[]string `json:"ingest_aliases,omitempty"`
	Name          string    `json:"name"`
}

CreateCustomerPayload defines model for CreateCustomerPayload.

type CreateCustomerResponse

type CreateCustomerResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data Customer `json:"data"`
	}
	JSON409 *struct {
		Message *string `json:"message,omitempty"`
	}
}

func ParseCreateCustomerResponse

func ParseCreateCustomerResponse(rsp *http.Response) (*CreateCustomerResponse, error)

ParseCreateCustomerResponse parses an HTTP response from a CreateCustomerWithResponse call

func (CreateCustomerResponse) Status

func (r CreateCustomerResponse) Status() string

Status returns HTTPResponse.Status

func (CreateCustomerResponse) StatusCode

func (r CreateCustomerResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateGrantJSONRequestBody

type CreateGrantJSONRequestBody = CreateCreditGrantPayload

CreateGrantJSONRequestBody defines body for CreateGrant for application/json ContentType.

type CreateGrantResponse

type CreateGrantResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data Id `json:"data"`
	}
}

func ParseCreateGrantResponse

func ParseCreateGrantResponse(rsp *http.Response) (*CreateGrantResponse, error)

ParseCreateGrantResponse parses an HTTP response from a CreateGrantWithResponse call

func (CreateGrantResponse) Status

func (r CreateGrantResponse) Status() string

Status returns HTTPResponse.Status

func (CreateGrantResponse) StatusCode

func (r CreateGrantResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreditGrant

type CreditGrant struct {
	// Balance The effective balance of the grant as of the end of the customer's current billing period. Expiration deductions will be included only if the grant expires before the end of the current billing period.
	Balance struct {
		// EffectiveAt The end_date of the customer's current billing period.
		EffectiveAt time.Time `json:"effective_at"`

		// ExcludingPending The grant's current balance including all posted deductions. If the grant has expired, this amount will be 0.
		ExcludingPending float32 `json:"excluding_pending"`

		// IncludingPending The grant's current balance including all posted and pending deductions. If the grant expires before the end of the customer's current billing period, this amount will be 0.
		IncludingPending float32 `json:"including_pending"`
	} `json:"balance"`
	CustomFields CustomField `json:"custom_fields"`

	// CustomerId the Metronome ID of the customer
	CustomerId  openapi_types.UUID  `json:"customer_id"`
	Deductions  []CreditLedgerEntry `json:"deductions"`
	EffectiveAt time.Time           `json:"effective_at"`
	ExpiresAt   time.Time           `json:"expires_at"`

	// GrantAmount the amount of credits initially granted
	GrantAmount struct {
		Amount     float32    `json:"amount"`
		CreditType CreditType `json:"credit_type"`
	} `json:"grant_amount"`

	// Id the Metronome ID of the credit grant
	Id openapi_types.UUID `json:"id"`

	// InvoiceId the Metronome ID of the invoice with the purchase charge for this credit grant, if applicable
	InvoiceId *openapi_types.UUID `json:"invoice_id"`
	Name      string              `json:"name"`

	// PaidAmount the amount paid for this credit grant
	PaidAmount struct {
		Amount     float32    `json:"amount"`
		CreditType CreditType `json:"credit_type"`
	} `json:"paid_amount"`
	PendingDeductions []CreditLedgerEntry `json:"pending_deductions"`
	Priority          float32             `json:"priority"`

	// Products The products which these credits will be applied to. (If unspecified, the credits will be applied to charges for all products.)
	Products *[]struct {
		Id   string `json:"id"`
		Name string `json:"name"`
	} `json:"products,omitempty"`
	Reason *string `json:"reason"`
}

CreditGrant defines model for CreditGrant.

type CreditLedgerEntriesQueryPayload

type CreditLedgerEntriesQueryPayload struct {
	// CreditTypeIds A list of Metronome credit type IDs to fetch ledger entries for. If absent, ledger entries for all credit types will be returned.
	CreditTypeIds *[]openapi_types.UUID `json:"credit_type_ids,omitempty"`

	// CustomerIds A list of Metronome customer IDs to fetch ledger entries for. If absent, ledger entries for all customers will be returned.
	CustomerIds *[]openapi_types.UUID `json:"customer_ids,omitempty"`

	// EndingBefore If supplied, ledger entries will only be returned with an effective_at before this time. This timestamp must not be in the future. If no timestamp is supplied, all entries up to the start of the customer's next billing period will be returned.
	EndingBefore *time.Time `json:"ending_before,omitempty"`

	// StartingOn If supplied, only ledger entries effective at or after this time will be returned.
	StartingOn *time.Time `json:"starting_on,omitempty"`
}

CreditLedgerEntriesQueryPayload defines model for CreditLedgerEntriesQueryPayload.

type CreditLedgerEntry

type CreditLedgerEntry struct {
	// Amount an amount representing the change to the customer's credit balance
	Amount    float32 `json:"amount"`
	CreatedBy string  `json:"created_by"`

	// CreditGrantId the credit grant this entry is related to
	CreditGrantId openapi_types.UUID `json:"credit_grant_id"`
	EffectiveAt   time.Time          `json:"effective_at"`

	// InvoiceId if this entry is a deduction, the Metronome ID of the invoice where the credit deduction was consumed; if this entry is a grant, the Metronome ID of the invoice where the grant's paid_amount was charged
	InvoiceId *openapi_types.UUID `json:"invoice_id"`
	Reason    string              `json:"reason"`

	// RunningBalance the running balance for this credit type at the time of the ledger entry, including all preceding charges
	RunningBalance float32 `json:"running_balance"`
}

CreditLedgerEntry defines model for CreditLedgerEntry.

type CreditType

type CreditType struct {
	Id   openapi_types.UUID `json:"id"`
	Name string             `json:"name"`
}

CreditType defines model for CreditType.

type CreditTypeLedger

type CreditTypeLedger struct {
	CreditType CreditType `json:"credit_type"`

	// EndingBalance the effective balances at the end of the specified time window
	EndingBalance struct {
		// EffectiveAt the ending_before request parameter (if supplied) or the current billing period's end date
		EffectiveAt time.Time `json:"effective_at"`

		// ExcludingPending the ending balance, including the balance of all grants that have not expired before the effective_at date and deductions that happened before the effective_at date
		ExcludingPending float32 `json:"excluding_pending"`

		// IncludingPending the excluding_pending balance plus any pending invoice deductions and expirations that will happen by the effective_at date
		IncludingPending float32 `json:"including_pending"`
	} `json:"ending_balance"`
	Entries         []CreditLedgerEntry `json:"entries"`
	PendingEntries  []CreditLedgerEntry `json:"pending_entries"`
	StartingBalance struct {
		// EffectiveAt the starting_on request parameter (if supplied) or the first credit grant's effective_at date
		EffectiveAt time.Time `json:"effective_at"`

		// ExcludingPending the starting balance, including all posted grants, deductions, and expirations that happened at or before the effective_at timestamp
		ExcludingPending float32 `json:"excluding_pending"`

		// IncludingPending the excluding_pending balance plus any pending activity that has not been posted at the time of the query
		IncludingPending float32 `json:"including_pending"`
	} `json:"starting_balance"`
}

CreditTypeLedger defines model for CreditTypeLedger.

type CustomField

type CustomField map[string]string

CustomField defines model for CustomField.

type Customer

type Customer struct {
	// ExternalId (deprecated, use ingest_aliases instead) the first ID (Metronome or ingest alias) that can be used in usage events
	ExternalId string `json:"external_id"`

	// Id the Metronome ID of the customer
	Id openapi_types.UUID `json:"id"`

	// IngestAliases aliases for this customer that can be used instead of the Metronome customer ID in usage events
	IngestAliases []string `json:"ingest_aliases"`
	Name          string   `json:"name"`
}

Customer defines model for Customer.

type CustomerAlert

type CustomerAlert struct {
	Alert Alert `json:"alert"`

	// CustomerStatus The status of the customer alert. If the alert is archived, null will be returned.
	CustomerStatus *CustomerAlertCustomerStatus `json:"customer_status"`
}

CustomerAlert defines model for CustomerAlert.

type CustomerAlertCustomerStatus

type CustomerAlertCustomerStatus string

CustomerAlertCustomerStatus The status of the customer alert. If the alert is archived, null will be returned.

const (
	Evaluating CustomerAlertCustomerStatus = "evaluating"
	InAlarm    CustomerAlertCustomerStatus = "in_alarm"
	Ok         CustomerAlertCustomerStatus = "ok"
)

Defines values for CustomerAlertCustomerStatus.

type CustomerConfig

type CustomerConfig struct {
	// SalesforceAccountId The Salesforce account ID for the customer
	SalesforceAccountId *string `json:"salesforce_account_id"`
}

CustomerConfig defines model for CustomerConfig.

type CustomerConfigPayload

type CustomerConfigPayload struct {
	// SalesforceAccountId The Salesforce account ID for the customer
	SalesforceAccountId *string `json:"salesforce_account_id"`
}

CustomerConfigPayload defines model for CustomerConfigPayload.

type CustomerCreditTypeLedger

type CustomerCreditTypeLedger struct {
	CustomerId openapi_types.UUID `json:"customer_id"`
	Ledgers    []CreditTypeLedger `json:"ledgers"`
}

CustomerCreditTypeLedger defines model for CustomerCreditTypeLedger.

type CustomerDetail

type CustomerDetail struct {
	CustomFields   CustomField    `json:"custom_fields"`
	CustomerConfig CustomerConfig `json:"customer_config"`

	// ExternalId (deprecated, use ingest_aliases instead) the first ID (Metronome or ingest alias) that can be used in usage events
	ExternalId string `json:"external_id"`

	// Id the Metronome ID of the customer
	Id openapi_types.UUID `json:"id"`

	// IngestAliases aliases for this customer that can be used instead of the Metronome customer ID in usage events
	IngestAliases []string `json:"ingest_aliases"`
	Name          string   `json:"name"`
}

CustomerDetail defines model for CustomerDetail.

type CustomerId

type CustomerId = openapi_types.UUID

CustomerId defines model for CustomerId.

type CustomerPlan

type CustomerPlan struct {
	EndingBefore        *time.Time         `json:"ending_before,omitempty"`
	Id                  openapi_types.UUID `json:"id"`
	NetPaymentTermsDays *float32           `json:"net_payment_terms_days,omitempty"`
	PlanId              openapi_types.UUID `json:"plan_id"`
	PlanName            string             `json:"plan_name"`
	StartingOn          time.Time          `json:"starting_on"`
	TrialInfo           *struct {
		EndingBefore string `json:"ending_before"`
		SpendingCaps []struct {
			Amount          float32    `json:"amount"`
			AmountRemaining float32    `json:"amount_remaining"`
			CreditType      CreditType `json:"credit_type"`
		} `json:"spending_caps"`
	} `json:"trial_info,omitempty"`
}

CustomerPlan defines model for CustomerPlan.

type CustomerPlanId

type CustomerPlanId = openapi_types.UUID

CustomerPlanId defines model for CustomerPlanId.

type DeleteBillingConfigForCustomerResponse

type DeleteBillingConfigForCustomerResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON404      *Error
}

func ParseDeleteBillingConfigForCustomerResponse

func ParseDeleteBillingConfigForCustomerResponse(rsp *http.Response) (*DeleteBillingConfigForCustomerResponse, error)

ParseDeleteBillingConfigForCustomerResponse parses an HTTP response from a DeleteBillingConfigForCustomerWithResponse call

func (DeleteBillingConfigForCustomerResponse) Status

Status returns HTTPResponse.Status

func (DeleteBillingConfigForCustomerResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type DeleteCustomFieldsJSONBody

type DeleteCustomFieldsJSONBody struct {
	Entity   ManagedEntity      `json:"entity"`
	EntityId openapi_types.UUID `json:"entity_id"`
	Keys     []string           `json:"keys"`
}

DeleteCustomFieldsJSONBody defines parameters for DeleteCustomFields.

type DeleteCustomFieldsJSONRequestBody

type DeleteCustomFieldsJSONRequestBody DeleteCustomFieldsJSONBody

DeleteCustomFieldsJSONRequestBody defines body for DeleteCustomFields for application/json ContentType.

type DeleteCustomFieldsResponse

type DeleteCustomFieldsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseDeleteCustomFieldsResponse

func ParseDeleteCustomFieldsResponse(rsp *http.Response) (*DeleteCustomFieldsResponse, error)

ParseDeleteCustomFieldsResponse parses an HTTP response from a DeleteCustomFieldsWithResponse call

func (DeleteCustomFieldsResponse) Status

Status returns HTTPResponse.Status

func (DeleteCustomFieldsResponse) StatusCode

func (r DeleteCustomFieldsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DisableCustomFieldKeyJSONBody

type DisableCustomFieldKeyJSONBody struct {
	Entity ManagedEntity `json:"entity"`
	Key    string        `json:"key"`
}

DisableCustomFieldKeyJSONBody defines parameters for DisableCustomFieldKey.

type DisableCustomFieldKeyJSONRequestBody

type DisableCustomFieldKeyJSONRequestBody DisableCustomFieldKeyJSONBody

DisableCustomFieldKeyJSONRequestBody defines body for DisableCustomFieldKey for application/json ContentType.

type DisableCustomFieldKeyResponse

type DisableCustomFieldKeyResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseDisableCustomFieldKeyResponse

func ParseDisableCustomFieldKeyResponse(rsp *http.Response) (*DisableCustomFieldKeyResponse, error)

ParseDisableCustomFieldKeyResponse parses an HTTP response from a DisableCustomFieldKeyWithResponse call

func (DisableCustomFieldKeyResponse) Status

Status returns HTTPResponse.Status

func (DisableCustomFieldKeyResponse) StatusCode

func (r DisableCustomFieldKeyResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type EmbeddableDashboardJSONRequestBody

type EmbeddableDashboardJSONRequestBody = EmbeddableDashboardPayload

EmbeddableDashboardJSONRequestBody defines body for EmbeddableDashboard for application/json ContentType.

type EmbeddableDashboardPayload

type EmbeddableDashboardPayload struct {
	// ColorOverrides Optional list of colors to override
	ColorOverrides *[]struct {
		// Name The color to override
		Name *EmbeddableDashboardPayloadColorOverridesName `json:"name,omitempty"`

		// Value Hex value representation of the color
		Value *string `json:"value,omitempty"`
	} `json:"color_overrides,omitempty"`
	CustomerId openapi_types.UUID `json:"customer_id"`

	// Dashboard The type of dashboard to retrieve.
	Dashboard EmbeddableDashboardPayloadDashboard `json:"dashboard"`

	// DashboardOptions Optional dashboard specific options
	DashboardOptions *[]struct {
		// Key The option key name
		Key string `json:"key"`

		// Value The option value
		Value string `json:"value"`
	} `json:"dashboard_options,omitempty"`
}

EmbeddableDashboardPayload defines model for EmbeddableDashboardPayload.

type EmbeddableDashboardPayloadColorOverridesName

type EmbeddableDashboardPayloadColorOverridesName string

EmbeddableDashboardPayloadColorOverridesName The color to override

const (
	GrayDark       EmbeddableDashboardPayloadColorOverridesName = "Gray_dark"
	GrayExtralight EmbeddableDashboardPayloadColorOverridesName = "Gray_extralight"
	GrayLight      EmbeddableDashboardPayloadColorOverridesName = "Gray_light"
	GrayMedium     EmbeddableDashboardPayloadColorOverridesName = "Gray_medium"
	PrimaryLight   EmbeddableDashboardPayloadColorOverridesName = "Primary_light"
	PrimaryMedium  EmbeddableDashboardPayloadColorOverridesName = "Primary_medium"
	White          EmbeddableDashboardPayloadColorOverridesName = "White"
)

Defines values for EmbeddableDashboardPayloadColorOverridesName.

type EmbeddableDashboardPayloadDashboard

type EmbeddableDashboardPayloadDashboard string

EmbeddableDashboardPayloadDashboard The type of dashboard to retrieve.

const (
	Invoices EmbeddableDashboardPayloadDashboard = "invoices"
	Usage    EmbeddableDashboardPayloadDashboard = "usage"
)

Defines values for EmbeddableDashboardPayloadDashboard.

type EmbeddableDashboardResponse

type EmbeddableDashboardResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data struct {
			Url *string `json:"url,omitempty"`
		} `json:"data"`
	}
	JSON400 *Error
}

func ParseEmbeddableDashboardResponse

func ParseEmbeddableDashboardResponse(rsp *http.Response) (*EmbeddableDashboardResponse, error)

ParseEmbeddableDashboardResponse parses an HTTP response from a EmbeddableDashboardWithResponse call

func (EmbeddableDashboardResponse) Status

Status returns HTTPResponse.Status

func (EmbeddableDashboardResponse) StatusCode

func (r EmbeddableDashboardResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type EndCustomerPlanJSONRequestBody

type EndCustomerPlanJSONRequestBody = EndCustomerPlanPayload

EndCustomerPlanJSONRequestBody defines body for EndCustomerPlan for application/json ContentType.

type EndCustomerPlanPayload

type EndCustomerPlanPayload struct {
	// EndingBefore RFC 3339 timestamp for when the plan ends (exclusive) for this customer. Must be at 0:00 UTC (midnight).
	EndingBefore time.Time `json:"ending_before"`
}

EndCustomerPlanPayload defines model for EndCustomerPlanPayload.

type EndCustomerPlanResponse

type EndCustomerPlanResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseEndCustomerPlanResponse

func ParseEndCustomerPlanResponse(rsp *http.Response) (*EndCustomerPlanResponse, error)

ParseEndCustomerPlanResponse parses an HTTP response from a EndCustomerPlanWithResponse call

func (EndCustomerPlanResponse) Status

func (r EndCustomerPlanResponse) Status() string

Status returns HTTPResponse.Status

func (EndCustomerPlanResponse) StatusCode

func (r EndCustomerPlanResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Error

type Error struct {
	Message string `json:"message"`
}

Error defines model for Error.

type Event

type Event struct {
	CustomerId string                  `json:"customer_id"`
	EventType  string                  `json:"event_type"`
	Properties *map[string]interface{} `json:"properties,omitempty"`

	// Timestamp RFC 3339 formatted
	Timestamp     string `json:"timestamp"`
	TransactionId string `json:"transaction_id"`
}

Event defines model for Event.

type ExternalInvoice

type ExternalInvoice struct {
	BillingProviderType BillingProviderType    `json:"billing_provider_type"`
	ExternalStatus      *ExternalInvoiceStatus `json:"external_status,omitempty"`
	InvoiceId           string                 `json:"invoice_id"`
	IssuedAtTimestamp   time.Time              `json:"issued_at_timestamp"`
}

ExternalInvoice defines model for ExternalInvoice.

type ExternalInvoiceStatus

type ExternalInvoiceStatus string

ExternalInvoiceStatus defines model for ExternalInvoiceStatus.

const (
	DELETED       ExternalInvoiceStatus = "DELETED"
	DRAFT         ExternalInvoiceStatus = "DRAFT"
	FINALIZED     ExternalInvoiceStatus = "FINALIZED"
	PAYMENTFAILED ExternalInvoiceStatus = "PAYMENT_FAILED"
	UNCOLLECTIBLE ExternalInvoiceStatus = "UNCOLLECTIBLE"
	VOID          ExternalInvoiceStatus = "VOID"
)

Defines values for ExternalInvoiceStatus.

type GetBillingConfigResponse

type GetBillingConfigResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data struct {
			// AwsExpirationDate Contract expiration date for the customer. The expected format is RFC 3339 and can be retrieved from AWS's GetEntitlements API. (See https://docs.aws.amazon.com/marketplaceentitlement/latest/APIReference/API_GetEntitlements.html.)
			AwsExpirationDate         *AwsExpirationDate      `json:"aws_expiration_date,omitempty"`
			AwsProductCode            *string                 `json:"aws_product_code,omitempty"`
			AwsRegion                 *AwsRegion              `json:"aws_region,omitempty"`
			BillingProviderCustomerId *string                 `json:"billing_provider_customer_id,omitempty"`
			StripeCollectionMethod    *StripeCollectionMethod `json:"stripe_collection_method,omitempty"`
		} `json:"data"`
	}
	JSON404 *Error
}

func ParseGetBillingConfigResponse

func ParseGetBillingConfigResponse(rsp *http.Response) (*GetBillingConfigResponse, error)

ParseGetBillingConfigResponse parses an HTTP response from a GetBillingConfigWithResponse call

func (GetBillingConfigResponse) Status

func (r GetBillingConfigResponse) Status() string

Status returns HTTPResponse.Status

func (GetBillingConfigResponse) StatusCode

func (r GetBillingConfigResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetCostsParams

type GetCostsParams struct {
	// StartingOn RFC 3339 timestamp (inclusive)
	StartingOn RequiredStartDate `form:"starting_on" json:"starting_on"`

	// EndingBefore RFC 3339 timestamp (exclusive)
	EndingBefore RequiredEndDate `form:"ending_before" json:"ending_before"`

	// Limit Max number of results that should be returned
	Limit *PageLimit `form:"limit,omitempty" json:"limit,omitempty"`

	// NextPage Cursor that indicates where the next page of results should start.
	NextPage *NextPage `form:"next_page,omitempty" json:"next_page,omitempty"`
}

GetCostsParams defines parameters for GetCosts.

type GetCostsResponse

type GetCostsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data     []Costs `json:"data"`
		NextPage *string `json:"next_page"`
	}
	JSON400 *Error
	JSON404 *Error
}

func ParseGetCostsResponse

func ParseGetCostsResponse(rsp *http.Response) (*GetCostsResponse, error)

ParseGetCostsResponse parses an HTTP response from a GetCostsWithResponse call

func (GetCostsResponse) Status

func (r GetCostsResponse) Status() string

Status returns HTTPResponse.Status

func (GetCostsResponse) StatusCode

func (r GetCostsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetCustomerAlertJSONRequestBody

type GetCustomerAlertJSONRequestBody = GetCustomerAlertPayload

GetCustomerAlertJSONRequestBody defines body for GetCustomerAlert for application/json ContentType.

type GetCustomerAlertPayload

type GetCustomerAlertPayload struct {
	// AlertId The Metronome ID of the alert
	AlertId openapi_types.UUID `json:"alert_id"`

	// CustomerId The Metronome ID of the customer
	CustomerId openapi_types.UUID `json:"customer_id"`
}

GetCustomerAlertPayload defines model for GetCustomerAlertPayload.

type GetCustomerAlertResponse

type GetCustomerAlertResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data CustomerAlert `json:"data"`
	}
	JSON404 *Error
}

func ParseGetCustomerAlertResponse

func ParseGetCustomerAlertResponse(rsp *http.Response) (*GetCustomerAlertResponse, error)

ParseGetCustomerAlertResponse parses an HTTP response from a GetCustomerAlertWithResponse call

func (GetCustomerAlertResponse) Status

func (r GetCustomerAlertResponse) Status() string

Status returns HTTPResponse.Status

func (GetCustomerAlertResponse) StatusCode

func (r GetCustomerAlertResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetCustomerResponse

type GetCustomerResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data CustomerDetail `json:"data"`
	}
}

func ParseGetCustomerResponse

func ParseGetCustomerResponse(rsp *http.Response) (*GetCustomerResponse, error)

ParseGetCustomerResponse parses an HTTP response from a GetCustomerWithResponse call

func (GetCustomerResponse) Status

func (r GetCustomerResponse) Status() string

Status returns HTTPResponse.Status

func (GetCustomerResponse) StatusCode

func (r GetCustomerResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetInvoiceResponse

type GetInvoiceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data Invoice `json:"data"`
	}
	JSON404 *Error
}

func ParseGetInvoiceResponse

func ParseGetInvoiceResponse(rsp *http.Response) (*GetInvoiceResponse, error)

ParseGetInvoiceResponse parses an HTTP response from a GetInvoiceWithResponse call

func (GetInvoiceResponse) Status

func (r GetInvoiceResponse) Status() string

Status returns HTTPResponse.Status

func (GetInvoiceResponse) StatusCode

func (r GetInvoiceResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetPagedUsageJSONRequestBody

type GetPagedUsageJSONRequestBody = PagedUsageQueryPayload

GetPagedUsageJSONRequestBody defines body for GetPagedUsage for application/json ContentType.

type GetPagedUsageParams

type GetPagedUsageParams struct {
	// Limit Max number of results that should be returned
	Limit *PageLimit `form:"limit,omitempty" json:"limit,omitempty"`

	// NextPage Cursor that indicates where the next page of results should start.
	NextPage *NextPage `form:"next_page,omitempty" json:"next_page,omitempty"`
}

GetPagedUsageParams defines parameters for GetPagedUsage.

type GetPagedUsageResponse

type GetPagedUsageResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data     []PagedUsageAggregate `json:"data"`
		NextPage *string               `json:"next_page"`
	}
}

func ParseGetPagedUsageResponse

func ParseGetPagedUsageResponse(rsp *http.Response) (*GetPagedUsageResponse, error)

ParseGetPagedUsageResponse parses an HTTP response from a GetPagedUsageWithResponse call

func (GetPagedUsageResponse) Status

func (r GetPagedUsageResponse) Status() string

Status returns HTTPResponse.Status

func (GetPagedUsageResponse) StatusCode

func (r GetPagedUsageResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetPlanChargesParams

type GetPlanChargesParams struct {
	// Limit Max number of results that should be returned
	Limit *PageLimit `form:"limit,omitempty" json:"limit,omitempty"`

	// NextPage Cursor that indicates where the next page of results should start.
	NextPage *NextPage `form:"next_page,omitempty" json:"next_page,omitempty"`
}

GetPlanChargesParams defines parameters for GetPlanCharges.

type GetPlanChargesResponse

type GetPlanChargesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data     []PlanCharge `json:"data"`
		NextPage *string      `json:"next_page"`
	}
}

func ParseGetPlanChargesResponse

func ParseGetPlanChargesResponse(rsp *http.Response) (*GetPlanChargesResponse, error)

ParseGetPlanChargesResponse parses an HTTP response from a GetPlanChargesWithResponse call

func (GetPlanChargesResponse) Status

func (r GetPlanChargesResponse) Status() string

Status returns HTTPResponse.Status

func (GetPlanChargesResponse) StatusCode

func (r GetPlanChargesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetPlanDetailsResponse

type GetPlanDetailsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data PlanDetail `json:"data"`
	}
}

func ParseGetPlanDetailsResponse

func ParseGetPlanDetailsResponse(rsp *http.Response) (*GetPlanDetailsResponse, error)

ParseGetPlanDetailsResponse parses an HTTP response from a GetPlanDetailsWithResponse call

func (GetPlanDetailsResponse) Status

func (r GetPlanDetailsResponse) Status() string

Status returns HTTPResponse.Status

func (GetPlanDetailsResponse) StatusCode

func (r GetPlanDetailsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetPlanPriceAdjustmentsParams

type GetPlanPriceAdjustmentsParams struct {
	// Limit Max number of results that should be returned
	Limit *PageLimit `form:"limit,omitempty" json:"limit,omitempty"`

	// NextPage Cursor that indicates where the next page of results should start.
	NextPage *NextPage `form:"next_page,omitempty" json:"next_page,omitempty"`
}

GetPlanPriceAdjustmentsParams defines parameters for GetPlanPriceAdjustments.

type GetPlanPriceAdjustmentsResponse

type GetPlanPriceAdjustmentsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data     []PriceAdjustment `json:"data"`
		NextPage *string           `json:"next_page"`
	}
}

func ParseGetPlanPriceAdjustmentsResponse

func ParseGetPlanPriceAdjustmentsResponse(rsp *http.Response) (*GetPlanPriceAdjustmentsResponse, error)

ParseGetPlanPriceAdjustmentsResponse parses an HTTP response from a GetPlanPriceAdjustmentsWithResponse call

func (GetPlanPriceAdjustmentsResponse) Status

Status returns HTTPResponse.Status

func (GetPlanPriceAdjustmentsResponse) StatusCode

func (r GetPlanPriceAdjustmentsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetUsageBatchJSONRequestBody

type GetUsageBatchJSONRequestBody = UsageBatchQueryPayload

GetUsageBatchJSONRequestBody defines body for GetUsageBatch for application/json ContentType.

type GetUsageBatchParams

type GetUsageBatchParams struct {
	// NextPage Cursor that indicates where the next page of results should start.
	NextPage *NextPage `form:"next_page,omitempty" json:"next_page,omitempty"`
}

GetUsageBatchParams defines parameters for GetUsageBatch.

type GetUsageBatchResponse

type GetUsageBatchResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data     []UsageBatchAggregate `json:"data"`
		NextPage *string               `json:"next_page"`
	}
}

func ParseGetUsageBatchResponse

func ParseGetUsageBatchResponse(rsp *http.Response) (*GetUsageBatchResponse, error)

ParseGetUsageBatchResponse parses an HTTP response from a GetUsageBatchWithResponse call

func (GetUsageBatchResponse) Status

func (r GetUsageBatchResponse) Status() string

Status returns HTTPResponse.Status

func (GetUsageBatchResponse) StatusCode

func (r GetUsageBatchResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type Id

type Id struct {
	Id openapi_types.UUID `json:"id"`
}

Id defines model for Id.

type IngestJSONBody

type IngestJSONBody = []Event

IngestJSONBody defines parameters for Ingest.

type IngestJSONRequestBody

type IngestJSONRequestBody = IngestJSONBody

IngestJSONRequestBody defines body for Ingest for application/json ContentType.

type IngestResponse

type IngestResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseIngestResponse

func ParseIngestResponse(rsp *http.Response) (*IngestResponse, error)

ParseIngestResponse parses an HTTP response from a IngestWithResponse call

func (IngestResponse) Status

func (r IngestResponse) Status() string

Status returns HTTPResponse.Status

func (IngestResponse) StatusCode

func (r IngestResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Invoice

type Invoice struct {
	CreditType CreditType         `json:"credit_type"`
	CustomerId openapi_types.UUID `json:"customer_id"`

	// EndTimestamp End of the usage period this invoice covers (UTC)
	EndTimestamp       time.Time           `json:"end_timestamp"`
	ExternalInvoice    *ExternalInvoice    `json:"external_invoice,omitempty"`
	Id                 openapi_types.UUID  `json:"id"`
	InvoiceAdjustments []InvoiceAdjustment `json:"invoice_adjustments"`
	LineItems          []InvoiceLineItem   `json:"line_items"`
	PlanId             *openapi_types.UUID `json:"plan_id,omitempty"`
	PlanName           *string             `json:"plan_name,omitempty"`

	// StartTimestamp Beginning of the usage period this invoice covers (UTC)
	StartTimestamp time.Time     `json:"start_timestamp"`
	Status         InvoiceStatus `json:"status"`
	Subtotal       float32       `json:"subtotal"`
	Total          float32       `json:"total"`
}

Invoice defines model for Invoice.

type InvoiceAdjustment

type InvoiceAdjustment struct {
	CreditType CreditType `json:"credit_type"`
	Name       string     `json:"name"`
	Total      float32    `json:"total"`
}

InvoiceAdjustment defines model for InvoiceAdjustment.

type InvoiceId

type InvoiceId = openapi_types.UUID

InvoiceId defines model for InvoiceId.

type InvoiceLineItem

type InvoiceLineItem struct {
	CreditType   CreditType           `json:"credit_type"`
	CustomFields CustomField          `json:"custom_fields"`
	GroupKey     *string              `json:"group_key,omitempty"`
	GroupValue   *string              `json:"group_value,omitempty"`
	Name         string               `json:"name"`
	ProductId    *openapi_types.UUID  `json:"product_id,omitempty"`
	Quantity     float32              `json:"quantity"`
	SubLineItems []InvoiceSubLineItem `json:"sub_line_items"`
	Total        float32              `json:"total"`
}

InvoiceLineItem defines model for InvoiceLineItem.

type InvoiceStatus

type InvoiceStatus = string

InvoiceStatus defines model for InvoiceStatus.

type InvoiceStatusParam

type InvoiceStatusParam = string

InvoiceStatusParam defines model for InvoiceStatus.

type InvoiceSubLineItem

type InvoiceSubLineItem struct {
	ChargeId     *openapi_types.UUID `json:"charge_id,omitempty"`
	CustomFields CustomField         `json:"custom_fields"`
	Name         string              `json:"name"`

	// Price the unit price for this charge, present only if the charge is not tiered and the quantity is nonzero
	Price    *float32       `json:"price,omitempty"`
	Quantity float32        `json:"quantity"`
	Subtotal float32        `json:"subtotal"`
	Tiers    *[]InvoiceTier `json:"tiers,omitempty"`
}

InvoiceSubLineItem defines model for InvoiceSubLineItem.

type InvoiceTier

type InvoiceTier struct {
	Price    float32 `json:"price"`
	Quantity float32 `json:"quantity"`

	// StartingAt at what metric amount this tier begins
	StartingAt float32 `json:"starting_at"`
	Subtotal   float32 `json:"subtotal"`
}

InvoiceTier defines model for InvoiceTier.

type LineItemBreakdown

type LineItemBreakdown struct {
	Cost       float32 `json:"cost"`
	GroupKey   *string `json:"group_key,omitempty"`
	GroupValue *string `json:"group_value"`
	Name       string  `json:"name"`
}

LineItemBreakdown defines model for LineItemBreakdown.

type ListBillableMetricsParams

type ListBillableMetricsParams struct {
	// Limit Max number of results that should be returned
	Limit *PageLimit `form:"limit,omitempty" json:"limit,omitempty"`

	// NextPage Cursor that indicates where the next page of results should start.
	NextPage *NextPage `form:"next_page,omitempty" json:"next_page,omitempty"`

	// OnCurrentPlan If true, the list of metrics will be filtered to just ones that are on the customer's current plan
	OnCurrentPlan *bool `form:"on_current_plan,omitempty" json:"on_current_plan,omitempty"`
}

ListBillableMetricsParams defines parameters for ListBillableMetrics.

type ListBillableMetricsResponse

type ListBillableMetricsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data     []BillableMetric `json:"data"`
		NextPage *string          `json:"next_page"`
	}
}

func ParseListBillableMetricsResponse

func ParseListBillableMetricsResponse(rsp *http.Response) (*ListBillableMetricsResponse, error)

ParseListBillableMetricsResponse parses an HTTP response from a ListBillableMetricsWithResponse call

func (ListBillableMetricsResponse) Status

Status returns HTTPResponse.Status

func (ListBillableMetricsResponse) StatusCode

func (r ListBillableMetricsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListCreditGrantPayload

type ListCreditGrantPayload struct {
	// CreditGrantIds An array of credit grant IDs. If this is specified, neither credit_type_ids nor customer_ids may be specified.
	CreditGrantIds *[]openapi_types.UUID `json:"credit_grant_ids,omitempty"`

	// CreditTypeIds An array of credit type IDs. This must not be specified if credit_grant_ids is specified.
	CreditTypeIds *[]openapi_types.UUID `json:"credit_type_ids,omitempty"`

	// CustomerIds An array of Metronome customer IDs. This must not be specified if credit_grant_ids is specified.
	CustomerIds *[]openapi_types.UUID `json:"customer_ids,omitempty"`

	// EffectiveBefore Only return credit grants that are effective before this timestamp (exclusive).
	EffectiveBefore *time.Time `json:"effective_before,omitempty"`

	// NotExpiringBefore Only return credit grants that expire at or after this timestamp.
	NotExpiringBefore *time.Time `json:"not_expiring_before,omitempty"`
}

ListCreditGrantPayload defines model for ListCreditGrantPayload.

type ListCreditLedgerEntriesJSONRequestBody

type ListCreditLedgerEntriesJSONRequestBody = CreditLedgerEntriesQueryPayload

ListCreditLedgerEntriesJSONRequestBody defines body for ListCreditLedgerEntries for application/json ContentType.

type ListCreditLedgerEntriesParams

type ListCreditLedgerEntriesParams struct {
	// NextPage Cursor that indicates where the next page of results should start.
	NextPage *NextPage `form:"next_page,omitempty" json:"next_page,omitempty"`
}

ListCreditLedgerEntriesParams defines parameters for ListCreditLedgerEntries.

type ListCreditLedgerEntriesResponse

type ListCreditLedgerEntriesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data     []CustomerCreditTypeLedger `json:"data"`
		NextPage *string                    `json:"next_page"`
	}
	JSON404 *Error
}

func ParseListCreditLedgerEntriesResponse

func ParseListCreditLedgerEntriesResponse(rsp *http.Response) (*ListCreditLedgerEntriesResponse, error)

ParseListCreditLedgerEntriesResponse parses an HTTP response from a ListCreditLedgerEntriesWithResponse call

func (ListCreditLedgerEntriesResponse) Status

Status returns HTTPResponse.Status

func (ListCreditLedgerEntriesResponse) StatusCode

func (r ListCreditLedgerEntriesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListCreditTypesParams

type ListCreditTypesParams struct {
	// Limit Max number of results that should be returned
	Limit *PageLimit `form:"limit,omitempty" json:"limit,omitempty"`

	// NextPage Cursor that indicates where the next page of results should start.
	NextPage *NextPage `form:"next_page,omitempty" json:"next_page,omitempty"`
}

ListCreditTypesParams defines parameters for ListCreditTypes.

type ListCreditTypesResponse

type ListCreditTypesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data []struct {
			Id         *openapi_types.UUID `json:"id,omitempty"`
			IsCurrency *bool               `json:"is_currency,omitempty"`
			Name       *string             `json:"name,omitempty"`
		} `json:"data"`
		NextPage *string `json:"next_page"`
	}
}

func ParseListCreditTypesResponse

func ParseListCreditTypesResponse(rsp *http.Response) (*ListCreditTypesResponse, error)

ParseListCreditTypesResponse parses an HTTP response from a ListCreditTypesWithResponse call

func (ListCreditTypesResponse) Status

func (r ListCreditTypesResponse) Status() string

Status returns HTTPResponse.Status

func (ListCreditTypesResponse) StatusCode

func (r ListCreditTypesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListCustomFieldKeysJSONBody

type ListCustomFieldKeysJSONBody struct {
	// Entities Optional list of entity types to return keys for
	Entities *[]ManagedEntity `json:"entities,omitempty"`
}

ListCustomFieldKeysJSONBody defines parameters for ListCustomFieldKeys.

type ListCustomFieldKeysJSONRequestBody

type ListCustomFieldKeysJSONRequestBody ListCustomFieldKeysJSONBody

ListCustomFieldKeysJSONRequestBody defines body for ListCustomFieldKeys for application/json ContentType.

type ListCustomFieldKeysResponse

type ListCustomFieldKeysResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data []struct {
			EnforceUniqueness bool          `json:"enforce_uniqueness"`
			Entity            ManagedEntity `json:"entity"`
			Key               string        `json:"key"`
		} `json:"data"`
		NextPage *string `json:"next_page"`
	}
}

func ParseListCustomFieldKeysResponse

func ParseListCustomFieldKeysResponse(rsp *http.Response) (*ListCustomFieldKeysResponse, error)

ParseListCustomFieldKeysResponse parses an HTTP response from a ListCustomFieldKeysWithResponse call

func (ListCustomFieldKeysResponse) Status

Status returns HTTPResponse.Status

func (ListCustomFieldKeysResponse) StatusCode

func (r ListCustomFieldKeysResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListCustomerAlertsJSONRequestBody

type ListCustomerAlertsJSONRequestBody = ListCustomerAlertsPayload

ListCustomerAlertsJSONRequestBody defines body for ListCustomerAlerts for application/json ContentType.

type ListCustomerAlertsParams

type ListCustomerAlertsParams struct {
	// NextPage Cursor that indicates where the next page of results should start.
	NextPage *NextPage `form:"next_page,omitempty" json:"next_page,omitempty"`
}

ListCustomerAlertsParams defines parameters for ListCustomerAlerts.

type ListCustomerAlertsPayload

type ListCustomerAlertsPayload struct {
	// AlertStatuses Optionally filter by alert status. If absent, only enabled alerts will be returned.
	AlertStatuses *[]ListCustomerAlertsPayloadAlertStatuses `json:"alert_statuses,omitempty"`

	// CustomerId The Metronome ID of the customer
	CustomerId openapi_types.UUID `json:"customer_id"`
}

ListCustomerAlertsPayload defines model for ListCustomerAlertsPayload.

type ListCustomerAlertsPayloadAlertStatuses

type ListCustomerAlertsPayloadAlertStatuses string

ListCustomerAlertsPayloadAlertStatuses defines model for ListCustomerAlertsPayload.AlertStatuses.

const (
	ListCustomerAlertsPayloadAlertStatusesARCHIVED  ListCustomerAlertsPayloadAlertStatuses = "ARCHIVED"
	ListCustomerAlertsPayloadAlertStatusesArchived  ListCustomerAlertsPayloadAlertStatuses = "archived"
	ListCustomerAlertsPayloadAlertStatusesArchived1 ListCustomerAlertsPayloadAlertStatuses = "Archived"
	ListCustomerAlertsPayloadAlertStatusesDISABLED  ListCustomerAlertsPayloadAlertStatuses = "DISABLED"
	ListCustomerAlertsPayloadAlertStatusesDisabled  ListCustomerAlertsPayloadAlertStatuses = "disabled"
	ListCustomerAlertsPayloadAlertStatusesDisabled1 ListCustomerAlertsPayloadAlertStatuses = "Disabled"
	ListCustomerAlertsPayloadAlertStatusesENABLED   ListCustomerAlertsPayloadAlertStatuses = "ENABLED"
	ListCustomerAlertsPayloadAlertStatusesEnabled   ListCustomerAlertsPayloadAlertStatuses = "enabled"
	ListCustomerAlertsPayloadAlertStatusesEnabled1  ListCustomerAlertsPayloadAlertStatuses = "Enabled"
)

Defines values for ListCustomerAlertsPayloadAlertStatuses.

type ListCustomerAlertsResponse

type ListCustomerAlertsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data     []CustomerAlert `json:"data"`
		NextPage *string         `json:"next_page"`
	}
}

func ParseListCustomerAlertsResponse

func ParseListCustomerAlertsResponse(rsp *http.Response) (*ListCustomerAlertsResponse, error)

ParseListCustomerAlertsResponse parses an HTTP response from a ListCustomerAlertsWithResponse call

func (ListCustomerAlertsResponse) Status

Status returns HTTPResponse.Status

func (ListCustomerAlertsResponse) StatusCode

func (r ListCustomerAlertsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListCustomerPlansParams

type ListCustomerPlansParams struct {
	// Limit Max number of results that should be returned
	Limit *PageLimit `form:"limit,omitempty" json:"limit,omitempty"`

	// NextPage Cursor that indicates where the next page of results should start.
	NextPage *NextPage `form:"next_page,omitempty" json:"next_page,omitempty"`
}

ListCustomerPlansParams defines parameters for ListCustomerPlans.

type ListCustomerPlansResponse

type ListCustomerPlansResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data     []CustomerPlan `json:"data"`
		NextPage *string        `json:"next_page"`
	}
}

func ParseListCustomerPlansResponse

func ParseListCustomerPlansResponse(rsp *http.Response) (*ListCustomerPlansResponse, error)

ParseListCustomerPlansResponse parses an HTTP response from a ListCustomerPlansWithResponse call

func (ListCustomerPlansResponse) Status

func (r ListCustomerPlansResponse) Status() string

Status returns HTTPResponse.Status

func (ListCustomerPlansResponse) StatusCode

func (r ListCustomerPlansResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListCustomersParams

type ListCustomersParams struct {
	// Limit Max number of results that should be returned
	Limit *PageLimit `form:"limit,omitempty" json:"limit,omitempty"`

	// NextPage Cursor that indicates where the next page of results should start.
	NextPage *NextPage `form:"next_page,omitempty" json:"next_page,omitempty"`

	// IngestAlias Filter the customer list by ingest_alias
	IngestAlias *string `form:"ingest_alias,omitempty" json:"ingest_alias,omitempty"`

	// CustomerIds Filter the customer list by customer_id.  Up to 100 ids can be provided.
	CustomerIds *[]string `form:"customer_ids,omitempty" json:"customer_ids,omitempty"`

	// OnlyArchived Filter the customer list by only archived customers.
	OnlyArchived *bool `form:"only_archived,omitempty" json:"only_archived,omitempty"`
}

ListCustomersParams defines parameters for ListCustomers.

type ListCustomersResponse

type ListCustomersResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data     []CustomerDetail `json:"data"`
		NextPage *string          `json:"next_page"`
	}
}

func ParseListCustomersResponse

func ParseListCustomersResponse(rsp *http.Response) (*ListCustomersResponse, error)

ParseListCustomersResponse parses an HTTP response from a ListCustomersWithResponse call

func (ListCustomersResponse) Status

func (r ListCustomersResponse) Status() string

Status returns HTTPResponse.Status

func (ListCustomersResponse) StatusCode

func (r ListCustomersResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListGrantsJSONRequestBody

type ListGrantsJSONRequestBody = ListCreditGrantPayload

ListGrantsJSONRequestBody defines body for ListGrants for application/json ContentType.

type ListGrantsParams

type ListGrantsParams struct {
	// NextPage Cursor that indicates where the next page of results should start.
	NextPage *NextPage `form:"next_page,omitempty" json:"next_page,omitempty"`
}

ListGrantsParams defines parameters for ListGrants.

type ListGrantsResponse

type ListGrantsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data     []CreditGrant `json:"data"`
		NextPage *string       `json:"next_page"`
	}
}

func ParseListGrantsResponse

func ParseListGrantsResponse(rsp *http.Response) (*ListGrantsResponse, error)

ParseListGrantsResponse parses an HTTP response from a ListGrantsWithResponse call

func (ListGrantsResponse) Status

func (r ListGrantsResponse) Status() string

Status returns HTTPResponse.Status

func (ListGrantsResponse) StatusCode

func (r ListGrantsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListInvoicesCachedParams

type ListInvoicesCachedParams struct {
	// Limit Max number of results that should be returned
	Limit *PageLimit `form:"limit,omitempty" json:"limit,omitempty"`

	// NextPage Cursor that indicates where the next page of results should start.
	NextPage *NextPage `form:"next_page,omitempty" json:"next_page,omitempty"`

	// Status Invoice status, e.g. DRAFT, FINALIZED, or VOID
	InvoiceStatusParam *InvoiceStatusParam `form:"status,omitempty" json:"status,omitempty"`

	// CreditTypeId Only return invoices for the specified credit type
	CreditTypeId *string `form:"credit_type_id,omitempty" json:"credit_type_id,omitempty"`

	// StartingOn RFC 3339 timestamp (inclusive). Invoices will only be returned for billing periods that start at or after this time.
	StartingOn *time.Time `form:"starting_on,omitempty" json:"starting_on,omitempty"`

	// EndingBefore RFC 3339 timestamp (exclusive). Invoices will only be returned for billing periods that end before this time.
	EndingBefore *time.Time `form:"ending_before,omitempty" json:"ending_before,omitempty"`
}

ListInvoicesCachedParams defines parameters for ListInvoicesCached.

type ListInvoicesCachedResponse

type ListInvoicesCachedResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data     []Invoice `json:"data"`
		NextPage *string   `json:"next_page"`
	}
	JSON404 *Error
}

func ParseListInvoicesCachedResponse

func ParseListInvoicesCachedResponse(rsp *http.Response) (*ListInvoicesCachedResponse, error)

ParseListInvoicesCachedResponse parses an HTTP response from a ListInvoicesCachedWithResponse call

func (ListInvoicesCachedResponse) Status

Status returns HTTPResponse.Status

func (ListInvoicesCachedResponse) StatusCode

func (r ListInvoicesCachedResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListInvoicesParams

type ListInvoicesParams struct {
	// Limit Max number of results that should be returned
	Limit *PageLimit `form:"limit,omitempty" json:"limit,omitempty"`

	// NextPage Cursor that indicates where the next page of results should start.
	NextPage *NextPage `form:"next_page,omitempty" json:"next_page,omitempty"`

	// Status Invoice status, e.g. DRAFT, FINALIZED, or VOID
	InvoiceStatusParam *InvoiceStatusParam `form:"status,omitempty" json:"status,omitempty"`

	// CreditTypeId Only return invoices for the specified credit type
	CreditTypeId *string `form:"credit_type_id,omitempty" json:"credit_type_id,omitempty"`

	// StartingOn RFC 3339 timestamp (inclusive). Invoices will only be returned for billing periods that start at or after this time.
	StartingOn *time.Time `form:"starting_on,omitempty" json:"starting_on,omitempty"`

	// EndingBefore RFC 3339 timestamp (exclusive). Invoices will only be returned for billing periods that end before this time.
	EndingBefore *time.Time `form:"ending_before,omitempty" json:"ending_before,omitempty"`
}

ListInvoicesParams defines parameters for ListInvoices.

type ListInvoicesResponse

type ListInvoicesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data     []Invoice `json:"data"`
		NextPage *string   `json:"next_page"`
	}
	JSON404 *Error
}

func ParseListInvoicesResponse

func ParseListInvoicesResponse(rsp *http.Response) (*ListInvoicesResponse, error)

ParseListInvoicesResponse parses an HTTP response from a ListInvoicesWithResponse call

func (ListInvoicesResponse) Status

func (r ListInvoicesResponse) Status() string

Status returns HTTPResponse.Status

func (ListInvoicesResponse) StatusCode

func (r ListInvoicesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListPlansParams

type ListPlansParams struct {
	// Limit Max number of results that should be returned
	Limit *PageLimit `form:"limit,omitempty" json:"limit,omitempty"`

	// NextPage Cursor that indicates where the next page of results should start.
	NextPage *NextPage `form:"next_page,omitempty" json:"next_page,omitempty"`
}

ListPlansParams defines parameters for ListPlans.

type ListPlansResponse

type ListPlansResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data     []Plan  `json:"data"`
		NextPage *string `json:"next_page"`
	}
}

func ParseListPlansResponse

func ParseListPlansResponse(rsp *http.Response) (*ListPlansResponse, error)

ParseListPlansResponse parses an HTTP response from a ListPlansWithResponse call

func (ListPlansResponse) Status

func (r ListPlansResponse) Status() string

Status returns HTTPResponse.Status

func (ListPlansResponse) StatusCode

func (r ListPlansResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ManagedEntity

type ManagedEntity string

ManagedEntity defines model for ManagedEntity.

const (
	ManagedEntityCharge      ManagedEntity = "charge"
	ManagedEntityCreditGrant ManagedEntity = "credit_grant"
	ManagedEntityCustomer    ManagedEntity = "customer"
	ManagedEntityProduct     ManagedEntity = "product"
)

Defines values for ManagedEntity.

type NextPage

type NextPage = string

NextPage defines model for NextPage.

type NotFound

type NotFound = Error

NotFound defines model for NotFound.

type PageLimit

type PageLimit = int

PageLimit defines model for PageLimit.

type PagedUsageAggregate

type PagedUsageAggregate struct {
	EndingBefore time.Time `json:"ending_before"`
	GroupKey     *string   `json:"group_key"`
	GroupValue   *string   `json:"group_value"`
	StartingOn   time.Time `json:"starting_on"`
	Value        *float32  `json:"value"`
}

PagedUsageAggregate defines model for PagedUsageAggregate.

type PagedUsageQueryPayload

type PagedUsageQueryPayload struct {
	BillableMetricId openapi_types.UUID `json:"billable_metric_id"`

	// CurrentPeriod If true, will return the usage for the current billing period. Will return an error if the customer is currently uncontracted or starting_on and ending_before are specified when this is true.
	CurrentPeriod *bool              `json:"current_period,omitempty"`
	CustomerId    openapi_types.UUID `json:"customer_id"`
	EndingBefore  *time.Time         `json:"ending_before,omitempty"`
	GroupBy       *struct {
		// Key The name of the group_by key to use
		Key string `json:"key"`

		// Values Values of the group_by key to return in the query. Omit this if you'd like all values for the key returned.
		Values *[]string `json:"values,omitempty"`
	} `json:"group_by,omitempty"`
	StartingOn *time.Time `json:"starting_on,omitempty"`

	// WindowSize A window_size of "day" or "hour" will return the usage for the specified period segmented into daily or hourly aggregates. A window_size of "none" will return a single usage aggregate for the entirety of the specified period.
	WindowSize PagedUsageQueryPayloadWindowSize `json:"window_size"`
}

PagedUsageQueryPayload defines model for PagedUsageQueryPayload.

type PagedUsageQueryPayloadWindowSize

type PagedUsageQueryPayloadWindowSize string

PagedUsageQueryPayloadWindowSize A window_size of "day" or "hour" will return the usage for the specified period segmented into daily or hourly aggregates. A window_size of "none" will return a single usage aggregate for the entirety of the specified period.

const (
	PagedUsageQueryPayloadWindowSizeDAY   PagedUsageQueryPayloadWindowSize = "DAY"
	PagedUsageQueryPayloadWindowSizeDay   PagedUsageQueryPayloadWindowSize = "day"
	PagedUsageQueryPayloadWindowSizeDay1  PagedUsageQueryPayloadWindowSize = "Day"
	PagedUsageQueryPayloadWindowSizeHOUR  PagedUsageQueryPayloadWindowSize = "HOUR"
	PagedUsageQueryPayloadWindowSizeHour  PagedUsageQueryPayloadWindowSize = "hour"
	PagedUsageQueryPayloadWindowSizeHour1 PagedUsageQueryPayloadWindowSize = "Hour"
	PagedUsageQueryPayloadWindowSizeNONE  PagedUsageQueryPayloadWindowSize = "NONE"
	PagedUsageQueryPayloadWindowSizeNone  PagedUsageQueryPayloadWindowSize = "none"
	PagedUsageQueryPayloadWindowSizeNone1 PagedUsageQueryPayloadWindowSize = "None"
)

Defines values for PagedUsageQueryPayloadWindowSize.

type Plan

type Plan struct {
	Description string             `json:"description"`
	Id          openapi_types.UUID `json:"id"`
	Name        string             `json:"name"`
}

Plan defines model for Plan.

type PlanCharge

type PlanCharge struct {
	ChargeType   ChargeType         `json:"charge_type"`
	CreditType   CreditType         `json:"credit_type"`
	CustomFields CustomField        `json:"custom_fields"`
	Id           openapi_types.UUID `json:"id"`
	Name         string             `json:"name"`
	Prices       []struct {
		CollectionInterval *float32 `json:"collection_interval,omitempty"`
		CollectionSchedule *string  `json:"collection_schedule,omitempty"`
		Quantity           *float32 `json:"quantity,omitempty"`

		// Tier Used in pricing tiers.  Indicates at what metric value the price applies.
		Tier  float32 `json:"tier"`
		Value float32 `json:"value"`
	} `json:"prices"`
	ProductName string   `json:"product_name"`
	Quantity    *float32 `json:"quantity,omitempty"`

	// StartPeriod Used in price ramps.  Indicates how many billing periods pass before the charge applies.
	StartPeriod *float32 `json:"start_period,omitempty"`

	// UnitConversion Specifies how quantities for usage based charges will be converted.
	UnitConversion *struct {
		// DivisionFactor The conversion factor
		DivisionFactor float32 `json:"division_factor"`

		// RoundingBehavior Whether usage should be rounded down or up to the nearest whole number. If null, quantity will be rounded to 20 decimal places.
		RoundingBehavior *PlanChargeUnitConversionRoundingBehavior `json:"rounding_behavior,omitempty"`
	} `json:"unit_conversion,omitempty"`
}

PlanCharge defines model for PlanCharge.

type PlanChargeUnitConversionRoundingBehavior

type PlanChargeUnitConversionRoundingBehavior string

PlanChargeUnitConversionRoundingBehavior Whether usage should be rounded down or up to the nearest whole number. If null, quantity will be rounded to 20 decimal places.

Defines values for PlanChargeUnitConversionRoundingBehavior.

type PlanDetail

type PlanDetail struct {
	CreditGrants *[]struct {
		AmountGranted           float32    `json:"amount_granted"`
		AmountGrantedCreditType CreditType `json:"amount_granted_credit_type"`
		AmountPaid              float32    `json:"amount_paid"`
		AmountPaidCreditType    CreditType `json:"amount_paid_credit_type"`
		EffectiveDuration       float32    `json:"effective_duration"`
		Name                    string     `json:"name"`
		Priority                string     `json:"priority"`
		Reason                  *string    `json:"reason,omitempty"`
		RecurrenceDuration      *float32   `json:"recurrence_duration,omitempty"`
		RecurrenceInterval      *float32   `json:"recurrence_interval,omitempty"`
		SendInvoice             bool       `json:"send_invoice"`
	} `json:"credit_grants,omitempty"`
	Description *string            `json:"description,omitempty"`
	Id          openapi_types.UUID `json:"id"`
	Minimums    *[]struct {
		CreditType CreditType `json:"credit_type"`
		Name       string     `json:"name"`

		// StartPeriod Used in price ramps.  Indicates how many billing periods pass before the charge applies.
		StartPeriod float32 `json:"start_period"`
		Value       float32 `json:"value"`
	} `json:"minimums,omitempty"`
	Name string `json:"name"`
}

PlanDetail defines model for PlanDetail.

type PlanId

type PlanId = openapi_types.UUID

PlanId defines model for PlanId.

type PriceAdjustment

type PriceAdjustment struct {
	ChargeId   openapi_types.UUID `json:"charge_id"`
	ChargeType ChargeType         `json:"charge_type"`
	Prices     []struct {
		// AdjustmentType Determines how the value will be applied.
		AdjustmentType PriceAdjustmentPricesAdjustmentType `json:"adjustment_type"`

		// Tier Used in pricing tiers.  Indicates at what metric value the price applies.
		Tier  *float32 `json:"tier,omitempty"`
		Value *float32 `json:"value,omitempty"`
	} `json:"prices"`
	Quantity    *float32 `json:"quantity,omitempty"`
	StartPeriod float32  `json:"start_period"`
}

PriceAdjustment defines model for PriceAdjustment.

type PriceAdjustmentPricesAdjustmentType

type PriceAdjustmentPricesAdjustmentType string

PriceAdjustmentPricesAdjustmentType Determines how the value will be applied.

const (
	Fixed      PriceAdjustmentPricesAdjustmentType = "fixed"
	Override   PriceAdjustmentPricesAdjustmentType = "override"
	Percentage PriceAdjustmentPricesAdjustmentType = "percentage"
	Quantity   PriceAdjustmentPricesAdjustmentType = "quantity"
)

Defines values for PriceAdjustmentPricesAdjustmentType.

type RequestEditorFn

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

RequestEditorFn is the function signature for the RequestEditor callback function

type RequiredEndDate

type RequiredEndDate = time.Time

RequiredEndDate defines model for RequiredEndDate.

type RequiredStartDate

type RequiredStartDate = time.Time

RequiredStartDate defines model for RequiredStartDate.

type SetBillingConfigForCustomerJSONBody

type SetBillingConfigForCustomerJSONBody struct {
	AwsProductCode            *string                 `json:"aws_product_code,omitempty"`
	AwsRegion                 *AwsRegion              `json:"aws_region,omitempty"`
	BillingProviderCustomerId string                  `json:"billing_provider_customer_id"`
	StripeCollectionMethod    *StripeCollectionMethod `json:"stripe_collection_method,omitempty"`
}

SetBillingConfigForCustomerJSONBody defines parameters for SetBillingConfigForCustomer.

type SetBillingConfigForCustomerJSONRequestBody

type SetBillingConfigForCustomerJSONRequestBody SetBillingConfigForCustomerJSONBody

SetBillingConfigForCustomerJSONRequestBody defines body for SetBillingConfigForCustomer for application/json ContentType.

type SetBillingConfigForCustomerResponse

type SetBillingConfigForCustomerResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON400      *Error
	JSON404      *Error
}

func ParseSetBillingConfigForCustomerResponse

func ParseSetBillingConfigForCustomerResponse(rsp *http.Response) (*SetBillingConfigForCustomerResponse, error)

ParseSetBillingConfigForCustomerResponse parses an HTTP response from a SetBillingConfigForCustomerWithResponse call

func (SetBillingConfigForCustomerResponse) Status

Status returns HTTPResponse.Status

func (SetBillingConfigForCustomerResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type SetCustomFieldsJSONBody

type SetCustomFieldsJSONBody struct {
	CustomFields CustomField        `json:"custom_fields"`
	Entity       ManagedEntity      `json:"entity"`
	EntityId     openapi_types.UUID `json:"entity_id"`
}

SetCustomFieldsJSONBody defines parameters for SetCustomFields.

type SetCustomFieldsJSONRequestBody

type SetCustomFieldsJSONRequestBody SetCustomFieldsJSONBody

SetCustomFieldsJSONRequestBody defines body for SetCustomFields for application/json ContentType.

type SetCustomFieldsResponse

type SetCustomFieldsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseSetCustomFieldsResponse

func ParseSetCustomFieldsResponse(rsp *http.Response) (*SetCustomFieldsResponse, error)

ParseSetCustomFieldsResponse parses an HTTP response from a SetCustomFieldsWithResponse call

func (SetCustomFieldsResponse) Status

func (r SetCustomFieldsResponse) Status() string

Status returns HTTPResponse.Status

func (SetCustomFieldsResponse) StatusCode

func (r SetCustomFieldsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type SetCustomerNameJSONRequestBody

type SetCustomerNameJSONRequestBody = SetCustomerNamePayload

SetCustomerNameJSONRequestBody defines body for SetCustomerName for application/json ContentType.

type SetCustomerNamePayload

type SetCustomerNamePayload struct {
	// Name The new name for the customer
	Name string `json:"name"`
}

SetCustomerNamePayload defines model for SetCustomerNamePayload.

type SetCustomerNameResponse

type SetCustomerNameResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data Customer `json:"data"`
	}
}

func ParseSetCustomerNameResponse

func ParseSetCustomerNameResponse(rsp *http.Response) (*SetCustomerNameResponse, error)

ParseSetCustomerNameResponse parses an HTTP response from a SetCustomerNameWithResponse call

func (SetCustomerNameResponse) Status

func (r SetCustomerNameResponse) Status() string

Status returns HTTPResponse.Status

func (SetCustomerNameResponse) StatusCode

func (r SetCustomerNameResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type SetIngestAliasesJSONRequestBody

type SetIngestAliasesJSONRequestBody = SetIngestAliasesPayload

SetIngestAliasesJSONRequestBody defines body for SetIngestAliases for application/json ContentType.

type SetIngestAliasesPayload

type SetIngestAliasesPayload struct {
	IngestAliases []string `json:"ingest_aliases"`
}

SetIngestAliasesPayload defines model for SetIngestAliasesPayload.

type SetIngestAliasesResponse

type SetIngestAliasesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseSetIngestAliasesResponse

func ParseSetIngestAliasesResponse(rsp *http.Response) (*SetIngestAliasesResponse, error)

ParseSetIngestAliasesResponse parses an HTTP response from a SetIngestAliasesWithResponse call

func (SetIngestAliasesResponse) Status

func (r SetIngestAliasesResponse) Status() string

Status returns HTTPResponse.Status

func (SetIngestAliasesResponse) StatusCode

func (r SetIngestAliasesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type StripeCollectionMethod

type StripeCollectionMethod string

StripeCollectionMethod defines model for StripeCollectionMethod.

const (
	ChargeAutomatically StripeCollectionMethod = "charge_automatically"
	SendInvoice         StripeCollectionMethod = "send_invoice"
)

Defines values for StripeCollectionMethod.

type UpdateCustomerConfigJSONRequestBody

type UpdateCustomerConfigJSONRequestBody = CustomerConfigPayload

UpdateCustomerConfigJSONRequestBody defines body for UpdateCustomerConfig for application/json ContentType.

type UpdateCustomerConfigResponse

type UpdateCustomerConfigResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON400      *Error
	JSON404      *Error
}

func ParseUpdateCustomerConfigResponse

func ParseUpdateCustomerConfigResponse(rsp *http.Response) (*UpdateCustomerConfigResponse, error)

ParseUpdateCustomerConfigResponse parses an HTTP response from a UpdateCustomerConfigWithResponse call

func (UpdateCustomerConfigResponse) Status

Status returns HTTPResponse.Status

func (UpdateCustomerConfigResponse) StatusCode

func (r UpdateCustomerConfigResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UsageBatchAggregate

type UsageBatchAggregate struct {
	BillableMetricId   openapi_types.UUID `json:"billable_metric_id"`
	BillableMetricName string             `json:"billable_metric_name"`
	CustomerId         openapi_types.UUID `json:"customer_id"`
	EndTimestamp       time.Time          `json:"end_timestamp"`

	// Groups Values will be either a number or null. Null indicates that there were no matches for the group_by value.
	Groups         *map[string]float32 `json:"groups,omitempty"`
	StartTimestamp time.Time           `json:"start_timestamp"`
	Value          *float32            `json:"value"`
}

UsageBatchAggregate defines model for UsageBatchAggregate.

type UsageBatchQueryPayload

type UsageBatchQueryPayload struct {
	// BillableMetrics A list of billable metrics to fetch usage for. If absent, all billable metrics will be returned.
	BillableMetrics *[]struct {
		GroupBy *struct {
			// Key The name of the group_by key to use
			Key string `json:"key"`

			// Values Values of the group_by key to return in the query. If this field is omitted, all available values will be returned, up to a maximum of 200.
			Values *[]string `json:"values,omitempty"`
		} `json:"group_by,omitempty"`
		Id openapi_types.UUID `json:"id"`
	} `json:"billable_metrics,omitempty"`

	// CustomerIds A list of Metronome customer IDs to fetch usage for. If absent, usage for all customers will be returned.
	CustomerIds  *[]openapi_types.UUID `json:"customer_ids,omitempty"`
	EndingBefore time.Time             `json:"ending_before"`
	StartingOn   time.Time             `json:"starting_on"`

	// WindowSize A window_size of "day" or "hour" will return the usage for the specified period segmented into daily or hourly aggregates. A window_size of "none" will return a single usage aggregate for the entirety of the specified period.
	WindowSize UsageBatchQueryPayloadWindowSize `json:"window_size"`
}

UsageBatchQueryPayload defines model for UsageBatchQueryPayload.

type UsageBatchQueryPayloadWindowSize

type UsageBatchQueryPayloadWindowSize string

UsageBatchQueryPayloadWindowSize A window_size of "day" or "hour" will return the usage for the specified period segmented into daily or hourly aggregates. A window_size of "none" will return a single usage aggregate for the entirety of the specified period.

const (
	UsageBatchQueryPayloadWindowSizeDAY   UsageBatchQueryPayloadWindowSize = "DAY"
	UsageBatchQueryPayloadWindowSizeDay   UsageBatchQueryPayloadWindowSize = "day"
	UsageBatchQueryPayloadWindowSizeDay1  UsageBatchQueryPayloadWindowSize = "Day"
	UsageBatchQueryPayloadWindowSizeHOUR  UsageBatchQueryPayloadWindowSize = "HOUR"
	UsageBatchQueryPayloadWindowSizeHour  UsageBatchQueryPayloadWindowSize = "hour"
	UsageBatchQueryPayloadWindowSizeHour1 UsageBatchQueryPayloadWindowSize = "Hour"
	UsageBatchQueryPayloadWindowSizeNONE  UsageBatchQueryPayloadWindowSize = "NONE"
	UsageBatchQueryPayloadWindowSizeNone  UsageBatchQueryPayloadWindowSize = "none"
	UsageBatchQueryPayloadWindowSizeNone1 UsageBatchQueryPayloadWindowSize = "None"
)

Defines values for UsageBatchQueryPayloadWindowSize.

type VoidGrantJSONRequestBody

type VoidGrantJSONRequestBody = Id

VoidGrantJSONRequestBody defines body for VoidGrant for application/json ContentType.

type VoidGrantResponse

type VoidGrantResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Data Id `json:"data"`
	}
	JSON400 *Error
}

func ParseVoidGrantResponse

func ParseVoidGrantResponse(rsp *http.Response) (*VoidGrantResponse, error)

ParseVoidGrantResponse parses an HTTP response from a VoidGrantWithResponse call

func (VoidGrantResponse) Status

func (r VoidGrantResponse) Status() string

Status returns HTTPResponse.Status

func (VoidGrantResponse) StatusCode

func (r VoidGrantResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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