v3

package
v1.0.0-beta.236 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

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

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.1 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSpec

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

GetSpec returns the OpenAPI specification corresponding to the generated code in this file. External references in the spec are resolved through PathToRawSpec; externally-referenced files must be embedded in their corresponding Go packages (via the import-mapping feature). URL-based external refs are not supported.

func GetSpecJSON

func GetSpecJSON() ([]byte, error)

GetSpecJSON returns the raw JSON bytes of the embedded OpenAPI specification: decompressed but not unmarshaled. External references are not resolved here; the bytes are the spec exactly as embedded by codegen. The result is cached at package init time, so repeated calls are cheap.

func GetSwagger deprecated

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

GetSwagger returns the OpenAPI specification corresponding to the generated code in this file.

Deprecated: GetSwagger predates kin-openapi renaming openapi3.Swagger to openapi3.T. Use GetSpec instead. This wrapper is retained for backwards compatibility.

func Handler

func Handler(si ServerInterface) http.Handler

Handler creates http.Handler with routing matching OpenAPI spec.

func HandlerFromMux

func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler

HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.

func HandlerFromMuxWithBaseURL

func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler

func HandlerWithOptions

func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler

HandlerWithOptions creates http.Handler with additional options

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 Addon

type Addon struct {
	// CreatedAt An ISO-8601 timestamp representation of entity creation date.
	CreatedAt DateTime `json:"created_at"`

	// Currency The currency code of the add-on.
	Currency BillingCurrencyCode `json:"currency"`

	// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
	DeletedAt *DateTime `json:"deleted_at,omitempty"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// EffectiveFrom The date and time when the add-on becomes effective. When not specified, the
	// add-on is a draft.
	EffectiveFrom *DateTime `json:"effective_from,omitempty"`

	// EffectiveTo The date and time when the add-on is no longer effective. When not specified,
	// the add-on is effective indefinitely.
	EffectiveTo *DateTime `json:"effective_to,omitempty"`
	Id          ULID      `json:"id"`

	// InstanceType The InstanceType of the add-ons. Can be "single" or "multiple".
	InstanceType AddonInstanceType `json:"instance_type"`

	// Key A key is a semi-unique string that is used to identify the add-on. It is used to
	// reference the latest `active` version of the add-on and is unique with the
	// version number.
	Key ResourceKey `json:"key"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// RateCards The rate cards of the add-on.
	RateCards []BillingRateCard `json:"rate_cards"`

	// Status The status of the add-on. Computed based on the effective start and end dates:
	//
	// - `draft`: `effective_from` is not set.
	// - `active`: `effective_from <= now` and (`effective_to` is not set or
	// `now < effective_to`).
	// - `archived`: `effective_to <= now`.
	Status AddonStatus `json:"status"`

	// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
	UpdatedAt DateTime `json:"updated_at"`

	// ValidationErrors List of validation errors.
	ValidationErrors *[]ProductCatalogValidationError `json:"validation_errors,omitempty"`

	// Version Version of the add-on. Incremented when the add-on is updated.
	Version int `json:"version"`
}

Addon Add-on allows extending subscriptions with compatible plans with additional ratecards.

type AddonInstanceType

type AddonInstanceType string

AddonInstanceType The instanceType of the add-on.

- `single`: Can be added to a subscription only once. - `multiple`: Can be added to a subscription more than once.

const (
	AddonInstanceTypeMultiple AddonInstanceType = "multiple"
	AddonInstanceTypeSingle   AddonInstanceType = "single"
)

Defines values for AddonInstanceType.

func (AddonInstanceType) Valid

func (e AddonInstanceType) Valid() bool

Valid indicates whether the value is a known member of the AddonInstanceType enum.

type AddonPagePaginatedResponse

type AddonPagePaginatedResponse struct {
	Data []Addon `json:"data"`

	// Meta returns the pagination information
	Meta PaginatedMeta `json:"meta"`
}

AddonPagePaginatedResponse Page paginated response.

type AddonReference

type AddonReference struct {
	// Id ULID (Universally Unique Lexicographically Sortable Identifier).
	Id ULID `json:"id"`
}

AddonReference Addon reference.

type AddonStatus

type AddonStatus string

AddonStatus The status of the add-on defined by the `effective_from` and `effective_to` properties.

- `draft`: The add-on has not yet been published and can be edited. - `active`: The add-on is published and available for use. - `archived`: The add-on is no longer available for use.

const (
	AddonStatusActive   AddonStatus = "active"
	AddonStatusArchived AddonStatus = "archived"
	AddonStatusDraft    AddonStatus = "draft"
)

Defines values for AddonStatus.

func (AddonStatus) Valid

func (e AddonStatus) Valid() bool

Valid indicates whether the value is a known member of the AddonStatus enum.

type Address

type Address struct {
	// City City.
	City *string `json:"city,omitempty"`

	// Country Country code in [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html)
	// alpha-2 format.
	Country *CountryCode `json:"country,omitempty"`

	// Line1 First line of the address.
	Line1 *string `json:"line1,omitempty"`

	// Line2 Second line of the address.
	Line2 *string `json:"line2,omitempty"`

	// PhoneNumber Phone number.
	PhoneNumber *string `json:"phone_number,omitempty"`

	// PostalCode Postal code.
	PostalCode *string `json:"postal_code,omitempty"`

	// State State or province.
	State *string `json:"state,omitempty"`
}

Address Address

type AppCatalogItemPagePaginatedResponse

type AppCatalogItemPagePaginatedResponse struct {
	Data []BillingAppCatalogItem `json:"data"`

	// Meta returns the pagination information
	Meta PaginatedMeta `json:"meta"`
}

AppCatalogItemPagePaginatedResponse Page paginated response.

type AppPagePaginatedResponse

type AppPagePaginatedResponse struct {
	Data []BillingApp `json:"data"`

	// Meta returns the pagination information
	Meta PaginatedMeta `json:"meta"`
}

AppPagePaginatedResponse Page paginated response.

type BadRequest

type BadRequest = BadRequestError

BadRequest defines model for BadRequest.

type BadRequestError

type BadRequestError struct {
	// Detail A human readable explanation specific to this occurence of the problem.
	// This field may contain request/entity data to help the user understand
	// what went wrong. Enclose variable values in square brackets. Should be
	// provided as "Sentence case" for direct use in the UI.
	Detail string `json:"detail"`

	// Instance Used to return the correlation ID back to the user, in the format
	// kong:trace:<correlation_id>. This helps us find the relevant logs
	// when a customer reports an issue.
	Instance string `json:"instance"`

	// InvalidParameters invalid parameters
	InvalidParameters InvalidParameters `json:"invalid_parameters"`

	// Status The HTTP status code of the error. Useful when passing the response
	// body to child properties in a frontend UI. Must be returned as an integer.
	Status int `json:"status"`

	// Title A short, human-readable summary of the problem. It should not
	// change between occurences of a problem, except for localization.
	// Should be provided as "Sentence case" for direct use in the UI.
	Title string `json:"title"`

	// Type The error type.
	Type *string `json:"type,omitempty"`
}

BadRequestError defines model for BadRequestError.

type BaseError

type BaseError struct {
	// Detail A human readable explanation specific to this occurence of the problem.
	// This field may contain request/entity data to help the user understand
	// what went wrong. Enclose variable values in square brackets. Should be
	// provided as "Sentence case" for direct use in the UI.
	Detail string `json:"detail"`

	// Instance Used to return the correlation ID back to the user, in the format
	// kong:trace:<correlation_id>. This helps us find the relevant logs
	// when a customer reports an issue.
	Instance string `json:"instance"`

	// Status The HTTP status code of the error. Useful when passing the response
	// body to child properties in a frontend UI. Must be returned as an integer.
	Status int `json:"status"`

	// Title A short, human-readable summary of the problem. It should not
	// change between occurences of a problem, except for localization.
	// Should be provided as "Sentence case" for direct use in the UI.
	Title string `json:"title"`

	// Type The error type.
	Type *string `json:"type,omitempty"`
}

BaseError standard error

type BillingApp

type BillingApp struct {
	// contains filtered or unexported fields
}

BillingApp Installed application.

func (BillingApp) AsBillingAppExternalInvoicing

func (t BillingApp) AsBillingAppExternalInvoicing() (BillingAppExternalInvoicing, error)

AsBillingAppExternalInvoicing returns the union data inside the BillingApp as a BillingAppExternalInvoicing

func (BillingApp) AsBillingAppSandbox

func (t BillingApp) AsBillingAppSandbox() (BillingAppSandbox, error)

AsBillingAppSandbox returns the union data inside the BillingApp as a BillingAppSandbox

func (BillingApp) AsBillingAppStripe

func (t BillingApp) AsBillingAppStripe() (BillingAppStripe, error)

AsBillingAppStripe returns the union data inside the BillingApp as a BillingAppStripe

func (BillingApp) Discriminator

func (t BillingApp) Discriminator() (string, error)

func (*BillingApp) FromBillingAppExternalInvoicing

func (t *BillingApp) FromBillingAppExternalInvoicing(v BillingAppExternalInvoicing) error

FromBillingAppExternalInvoicing overwrites any union data inside the BillingApp as the provided BillingAppExternalInvoicing

func (*BillingApp) FromBillingAppSandbox

func (t *BillingApp) FromBillingAppSandbox(v BillingAppSandbox) error

FromBillingAppSandbox overwrites any union data inside the BillingApp as the provided BillingAppSandbox

func (*BillingApp) FromBillingAppStripe

func (t *BillingApp) FromBillingAppStripe(v BillingAppStripe) error

FromBillingAppStripe overwrites any union data inside the BillingApp as the provided BillingAppStripe

func (BillingApp) MarshalJSON

func (t BillingApp) MarshalJSON() ([]byte, error)

func (*BillingApp) MergeBillingAppExternalInvoicing

func (t *BillingApp) MergeBillingAppExternalInvoicing(v BillingAppExternalInvoicing) error

MergeBillingAppExternalInvoicing performs a merge with any union data inside the BillingApp, using the provided BillingAppExternalInvoicing

func (*BillingApp) MergeBillingAppSandbox

func (t *BillingApp) MergeBillingAppSandbox(v BillingAppSandbox) error

MergeBillingAppSandbox performs a merge with any union data inside the BillingApp, using the provided BillingAppSandbox

func (*BillingApp) MergeBillingAppStripe

func (t *BillingApp) MergeBillingAppStripe(v BillingAppStripe) error

MergeBillingAppStripe performs a merge with any union data inside the BillingApp, using the provided BillingAppStripe

func (*BillingApp) UnmarshalJSON

func (t *BillingApp) UnmarshalJSON(b []byte) error

func (BillingApp) ValueByDiscriminator

func (t BillingApp) ValueByDiscriminator() (interface{}, error)

type BillingAppAction

type BillingAppAction struct {
	// Description Human readable explanation of why the action is needed.
	Description string `json:"description"`

	// Type The action type.
	Type BillingAppActionType `json:"type"`
}

BillingAppAction An action the operator should take on an installed app.

type BillingAppActionRequest

type BillingAppActionRequest struct {
	// contains filtered or unexported fields
}

BillingAppActionRequest Request to execute an operator action on an installed app.

func (BillingAppActionRequest) AsBillingAppReconcileWebhookEventsActionRequest

func (t BillingAppActionRequest) AsBillingAppReconcileWebhookEventsActionRequest() (BillingAppReconcileWebhookEventsActionRequest, error)

AsBillingAppReconcileWebhookEventsActionRequest returns the union data inside the BillingAppActionRequest as a BillingAppReconcileWebhookEventsActionRequest

func (BillingAppActionRequest) Discriminator

func (t BillingAppActionRequest) Discriminator() (string, error)

func (*BillingAppActionRequest) FromBillingAppReconcileWebhookEventsActionRequest

func (t *BillingAppActionRequest) FromBillingAppReconcileWebhookEventsActionRequest(v BillingAppReconcileWebhookEventsActionRequest) error

FromBillingAppReconcileWebhookEventsActionRequest overwrites any union data inside the BillingAppActionRequest as the provided BillingAppReconcileWebhookEventsActionRequest

func (BillingAppActionRequest) MarshalJSON

func (t BillingAppActionRequest) MarshalJSON() ([]byte, error)

func (*BillingAppActionRequest) MergeBillingAppReconcileWebhookEventsActionRequest

func (t *BillingAppActionRequest) MergeBillingAppReconcileWebhookEventsActionRequest(v BillingAppReconcileWebhookEventsActionRequest) error

MergeBillingAppReconcileWebhookEventsActionRequest performs a merge with any union data inside the BillingAppActionRequest, using the provided BillingAppReconcileWebhookEventsActionRequest

func (*BillingAppActionRequest) UnmarshalJSON

func (t *BillingAppActionRequest) UnmarshalJSON(b []byte) error

func (BillingAppActionRequest) ValueByDiscriminator

func (t BillingAppActionRequest) ValueByDiscriminator() (interface{}, error)

type BillingAppActionType

type BillingAppActionType string

BillingAppActionType App action type.

const (
	BillingAppActionTypeReconcileWebhookEvents BillingAppActionType = "reconcile_webhook_events"
)

Defines values for BillingAppActionType.

func (BillingAppActionType) Valid

func (e BillingAppActionType) Valid() bool

Valid indicates whether the value is a known member of the BillingAppActionType enum.

type BillingAppCapability

type BillingAppCapability struct {
	// Description Description of the capability.
	Description string `json:"description"`

	// Key Key of the capability.
	Key ResourceKey `json:"key"`

	// Name Name of the capability.
	Name string `json:"name"`

	// Type Type of the capability.
	Type BillingAppCapabilityType `json:"type"`
}

BillingAppCapability App capability describes a function that an App can perform.

type BillingAppCapabilityType

type BillingAppCapabilityType string

BillingAppCapabilityType Supported capability types for an App.

Each capability defines an integration function that an App can perform.

const (
	BillingAppCapabilityTypeCalculateTax     BillingAppCapabilityType = "calculate_tax"
	BillingAppCapabilityTypeCollectPayments  BillingAppCapabilityType = "collect_payments"
	BillingAppCapabilityTypeInvoiceCustomers BillingAppCapabilityType = "invoice_customers"
	BillingAppCapabilityTypeReportEvents     BillingAppCapabilityType = "report_events"
	BillingAppCapabilityTypeReportUsage      BillingAppCapabilityType = "report_usage"
)

Defines values for BillingAppCapabilityType.

func (BillingAppCapabilityType) Valid

func (e BillingAppCapabilityType) Valid() bool

Valid indicates whether the value is a known member of the BillingAppCapabilityType enum.

type BillingAppCatalogItem

type BillingAppCatalogItem struct {
	// Capabilities Capabilities of the app.
	Capabilities []BillingAppCapability `json:"capabilities"`

	// Description Description of the app.
	Description string `json:"description"`

	// InstallMethods Available install methods of the app.
	InstallMethods []BillingAppInstallMethods `json:"install_methods"`

	// Name Name of the app.
	Name string `json:"name"`

	// Type Type of the app.
	Type BillingAppType `json:"type"`
}

BillingAppCatalogItem Available apps for billing integrations to connect with third-party services. Apps can have various capabilities like syncing data from or to external systems, integrating with third-party services for tax calculation, delivery of invoices, collection of payments, etc.

type BillingAppCustomerData

type BillingAppCustomerData struct {
	// ExternalInvoicing Used if the customer has a linked external invoicing app.
	//
	// Set to `null` to remove the external invoicing data of the customer; omit to
	// leave it unchanged.
	ExternalInvoicing nullable.Nullable[BillingAppCustomerDataExternalInvoicing] `json:"external_invoicing,omitempty"`

	// Stripe Used if the customer has a linked Stripe app.
	//
	// Set to `null` to remove the Stripe data of the customer; omit to leave it
	// unchanged.
	Stripe nullable.Nullable[BillingAppCustomerDataStripe] `json:"stripe,omitempty"`
}

BillingAppCustomerData App customer data.

type BillingAppCustomerDataExternalInvoicing

type BillingAppCustomerDataExternalInvoicing struct {
	// Labels Labels for this external invoicing integration on the customer.
	Labels *Labels `json:"labels,omitempty"`
}

BillingAppCustomerDataExternalInvoicing External invoicing customer data.

type BillingAppCustomerDataStripe

type BillingAppCustomerDataStripe struct {
	// CustomerId The Stripe customer ID used.
	CustomerId *string `json:"customer_id,omitempty"`

	// DefaultPaymentMethodId The Stripe default payment method ID.
	DefaultPaymentMethodId *string `json:"default_payment_method_id,omitempty"`

	// Labels Labels for this Stripe integration on the customer.
	Labels *Labels `json:"labels,omitempty"`
}

BillingAppCustomerDataStripe Stripe customer data.

type BillingAppExternalInvoicing

type BillingAppExternalInvoicing struct {
	// Actions Actions the operator should take to bring the app up to date. Omitted when no
	// action is required.
	Actions *[]BillingAppAction `json:"actions,omitempty"`

	// CreatedAt An ISO-8601 timestamp representation of entity creation date.
	CreatedAt DateTime `json:"created_at"`

	// Definition The app catalog definition that this installed app is based on.
	Definition BillingAppCatalogItem `json:"definition"`

	// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
	DeletedAt *DateTime `json:"deleted_at,omitempty"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// EnableDraftSyncHook Enable draft synchronization hook.
	//
	// When enabled, invoices will pause at the draft state and wait for the
	// integration to call the draft synchronized endpoint before progressing to the
	// issuing state. This allows the external system to validate and prepare the
	// invoice data.
	//
	// When disabled, invoices automatically progress through the draft state based on
	// the configured workflow timing.
	EnableDraftSyncHook bool `json:"enable_draft_sync_hook"`

	// EnableIssuingSyncHook Enable issuing synchronization hook.
	//
	// When enabled, invoices will pause at the issuing state and wait for the
	// integration to call the issuing synchronized endpoint before progressing to the
	// issued state. This ensures the external invoicing system has successfully
	// created and finalized the invoice before it is marked as issued.
	//
	// When disabled, invoices automatically progress through the issuing state and are
	// immediately marked as issued.
	EnableIssuingSyncHook bool `json:"enable_issuing_sync_hook"`
	Id                    ULID `json:"id"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// Status Status of the app connection.
	Status BillingAppStatus `json:"status"`

	// Type The app type.
	Type BillingAppExternalInvoicingType `json:"type"`

	// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
	UpdatedAt DateTime `json:"updated_at"`
}

BillingAppExternalInvoicing External Invoicing app enables integration with third-party invoicing or payment system.

The app supports a bi-directional synchronization pattern where OpenMeter Billing manages the invoice lifecycle while the external system handles invoice presentation and payment collection.

Integration workflow:

1. The billing system creates invoices and transitions them through lifecycle states (draft → issuing → issued) 2. The integration receives webhook notifications about invoice state changes 3. The integration calls back to provide external system IDs and metadata 4. The integration reports payment events back via the payment status API

State synchronization is controlled by hooks that pause invoice progression until the external system confirms synchronization via API callbacks.

type BillingAppExternalInvoicingType

type BillingAppExternalInvoicingType string

BillingAppExternalInvoicingType The app type.

const (
	BillingAppExternalInvoicingTypeExternalInvoicing BillingAppExternalInvoicingType = "external_invoicing"
)

Defines values for BillingAppExternalInvoicingType.

func (BillingAppExternalInvoicingType) Valid

Valid indicates whether the value is a known member of the BillingAppExternalInvoicingType enum.

type BillingAppInstallMethods

type BillingAppInstallMethods string

BillingAppInstallMethods Supported installation methods for an app.

const (
	BillingAppInstallMethodsNoCredentialsRequired BillingAppInstallMethods = "no_credentials_required"
	BillingAppInstallMethodsWithApiKey            BillingAppInstallMethods = "with_api_key"
	BillingAppInstallMethodsWithOauth2            BillingAppInstallMethods = "with_oauth2"
)

Defines values for BillingAppInstallMethods.

func (BillingAppInstallMethods) Valid

func (e BillingAppInstallMethods) Valid() bool

Valid indicates whether the value is a known member of the BillingAppInstallMethods enum.

type BillingAppReconcileWebhookEventsActionRequest

type BillingAppReconcileWebhookEventsActionRequest struct {
	// ActionType The action to execute.
	ActionType BillingAppReconcileWebhookEventsActionRequestActionType `json:"action_type"`
}

BillingAppReconcileWebhookEventsActionRequest Request to reconcile the app's webhook events with the latest supported event set.

type BillingAppReconcileWebhookEventsActionRequestActionType

type BillingAppReconcileWebhookEventsActionRequestActionType string

BillingAppReconcileWebhookEventsActionRequestActionType The action to execute.

const (
	BillingAppReconcileWebhookEventsActionRequestActionTypeReconcileWebhookEvents BillingAppReconcileWebhookEventsActionRequestActionType = "reconcile_webhook_events"
)

Defines values for BillingAppReconcileWebhookEventsActionRequestActionType.

func (BillingAppReconcileWebhookEventsActionRequestActionType) Valid

Valid indicates whether the value is a known member of the BillingAppReconcileWebhookEventsActionRequestActionType enum.

type BillingAppReference

type BillingAppReference struct {
	// Id The ID of the app.
	Id ULID `json:"id"`
}

BillingAppReference App reference.

type BillingAppSandbox

type BillingAppSandbox struct {
	// Actions Actions the operator should take to bring the app up to date. Omitted when no
	// action is required.
	Actions *[]BillingAppAction `json:"actions,omitempty"`

	// CreatedAt An ISO-8601 timestamp representation of entity creation date.
	CreatedAt DateTime `json:"created_at"`

	// Definition The app catalog definition that this installed app is based on.
	Definition BillingAppCatalogItem `json:"definition"`

	// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
	DeletedAt *DateTime `json:"deleted_at,omitempty"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`
	Id          ULID    `json:"id"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// Status Status of the app connection.
	Status BillingAppStatus `json:"status"`

	// Type The app type.
	Type BillingAppSandboxType `json:"type"`

	// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
	UpdatedAt DateTime `json:"updated_at"`
}

BillingAppSandbox Sandbox app can be used for testing billing features.

type BillingAppSandboxType

type BillingAppSandboxType string

BillingAppSandboxType The app type.

const (
	BillingAppSandboxTypeSandbox BillingAppSandboxType = "sandbox"
)

Defines values for BillingAppSandboxType.

func (BillingAppSandboxType) Valid

func (e BillingAppSandboxType) Valid() bool

Valid indicates whether the value is a known member of the BillingAppSandboxType enum.

type BillingAppStatus

type BillingAppStatus string

BillingAppStatus Connection status of an installed app.

const (
	BillingAppStatusReady        BillingAppStatus = "ready"
	BillingAppStatusUnauthorized BillingAppStatus = "unauthorized"
)

Defines values for BillingAppStatus.

func (BillingAppStatus) Valid

func (e BillingAppStatus) Valid() bool

Valid indicates whether the value is a known member of the BillingAppStatus enum.

type BillingAppStripe

type BillingAppStripe struct {
	// AccountId The Stripe account ID associated with the connected Stripe account.
	AccountId string `json:"account_id"`

	// Actions Actions the operator should take to bring the app up to date. Omitted when no
	// action is required.
	Actions *[]BillingAppAction `json:"actions,omitempty"`

	// CreatedAt An ISO-8601 timestamp representation of entity creation date.
	CreatedAt DateTime `json:"created_at"`

	// Definition The app catalog definition that this installed app is based on.
	Definition BillingAppCatalogItem `json:"definition"`

	// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
	DeletedAt *DateTime `json:"deleted_at,omitempty"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`
	Id          ULID    `json:"id"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Livemode Indicates whether the app is connected to a live Stripe account.
	Livemode bool `json:"livemode"`

	// MaskedApiKey The masked Stripe API key that only exposes the first and last few characters.
	MaskedApiKey string `json:"masked_api_key"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// Status Status of the app connection.
	Status BillingAppStatus `json:"status"`

	// Type The app type.
	Type BillingAppStripeType `json:"type"`

	// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
	UpdatedAt DateTime `json:"updated_at"`
}

BillingAppStripe Stripe app.

type BillingAppStripeCheckoutSessionCustomTextParams

type BillingAppStripeCheckoutSessionCustomTextParams struct {
	// AfterSubmit Text displayed after the payment confirmation button.
	AfterSubmit *struct {
		// Message The custom message text (max 1200 characters).
		Message *string `json:"message,omitempty"`
	} `json:"after_submit,omitempty"`

	// ShippingAddress Text displayed alongside shipping address collection.
	ShippingAddress *struct {
		// Message The custom message text (max 1200 characters).
		Message *string `json:"message,omitempty"`
	} `json:"shipping_address,omitempty"`

	// Submit Text displayed alongside the payment confirmation button.
	Submit *struct {
		// Message The custom message text (max 1200 characters).
		Message *string `json:"message,omitempty"`
	} `json:"submit,omitempty"`

	// TermsOfServiceAcceptance Text replacing the default terms of service agreement text.
	TermsOfServiceAcceptance *struct {
		// Message The custom message text (max 1200 characters).
		Message *string `json:"message,omitempty"`
	} `json:"terms_of_service_acceptance,omitempty"`
}

BillingAppStripeCheckoutSessionCustomTextParams Custom text displayed at various stages of the checkout flow.

type BillingAppStripeCheckoutSessionMode

type BillingAppStripeCheckoutSessionMode string

BillingAppStripeCheckoutSessionMode Stripe Checkout Session mode.

Determines the primary purpose of the checkout session.

const (
	BillingAppStripeCheckoutSessionModeSetup BillingAppStripeCheckoutSessionMode = "setup"
)

Defines values for BillingAppStripeCheckoutSessionMode.

func (BillingAppStripeCheckoutSessionMode) Valid

Valid indicates whether the value is a known member of the BillingAppStripeCheckoutSessionMode enum.

type BillingAppStripeCheckoutSessionUIMode

type BillingAppStripeCheckoutSessionUIMode string

BillingAppStripeCheckoutSessionUIMode Checkout Session UI mode.

const (
	BillingAppStripeCheckoutSessionUIModeEmbedded BillingAppStripeCheckoutSessionUIMode = "embedded"
	BillingAppStripeCheckoutSessionUIModeHosted   BillingAppStripeCheckoutSessionUIMode = "hosted"
)

Defines values for BillingAppStripeCheckoutSessionUIMode.

func (BillingAppStripeCheckoutSessionUIMode) Valid

Valid indicates whether the value is a known member of the BillingAppStripeCheckoutSessionUIMode enum.

type BillingAppStripeCreateCheckoutSessionBillingAddressCollection

type BillingAppStripeCreateCheckoutSessionBillingAddressCollection string

BillingAppStripeCreateCheckoutSessionBillingAddressCollection Controls whether Checkout collects the customer's billing address.

const (
	BillingAppStripeCreateCheckoutSessionBillingAddressCollectionAuto     BillingAppStripeCreateCheckoutSessionBillingAddressCollection = "auto"
	BillingAppStripeCreateCheckoutSessionBillingAddressCollectionRequired BillingAppStripeCreateCheckoutSessionBillingAddressCollection = "required"
)

Defines values for BillingAppStripeCreateCheckoutSessionBillingAddressCollection.

func (BillingAppStripeCreateCheckoutSessionBillingAddressCollection) Valid

Valid indicates whether the value is a known member of the BillingAppStripeCreateCheckoutSessionBillingAddressCollection enum.

type BillingAppStripeCreateCheckoutSessionConsentCollection

type BillingAppStripeCreateCheckoutSessionConsentCollection struct {
	// PaymentMethodReuseAgreement Controls the visibility of payment method reuse agreement.
	PaymentMethodReuseAgreement *BillingAppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement `json:"payment_method_reuse_agreement,omitempty"`

	// Promotions Enables collection of promotional communication consent.
	//
	// Only available to US merchants. When set to "auto", Checkout determines whether
	// to show the option based on the customer's locale.
	Promotions *BillingAppStripeCreateCheckoutSessionConsentCollectionPromotions `json:"promotions,omitempty"`

	// TermsOfService Requires customers to accept terms of service before payment.
	//
	// Requires a valid terms of service URL in your Stripe Dashboard settings.
	TermsOfService *BillingAppStripeCreateCheckoutSessionConsentCollectionTermsOfService `json:"terms_of_service,omitempty"`
}

BillingAppStripeCreateCheckoutSessionConsentCollection Checkout Session consent collection configuration.

type BillingAppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement

type BillingAppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement struct {
	// Position Position and visibility of the payment method reuse agreement.
	Position *BillingAppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition `json:"position,omitempty"`
}

BillingAppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement Payment method reuse agreement configuration.

type BillingAppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition

type BillingAppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition string

BillingAppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition Position of payment method reuse agreement in the UI.

const (
	BillingAppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPositionAuto   BillingAppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition = "auto"
	BillingAppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPositionHidden BillingAppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition = "hidden"
)

Defines values for BillingAppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition.

func (BillingAppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition) Valid

Valid indicates whether the value is a known member of the BillingAppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition enum.

type BillingAppStripeCreateCheckoutSessionConsentCollectionPromotions

type BillingAppStripeCreateCheckoutSessionConsentCollectionPromotions string

BillingAppStripeCreateCheckoutSessionConsentCollectionPromotions Promotional communication consent collection setting.

const (
	BillingAppStripeCreateCheckoutSessionConsentCollectionPromotionsAuto BillingAppStripeCreateCheckoutSessionConsentCollectionPromotions = "auto"
	BillingAppStripeCreateCheckoutSessionConsentCollectionPromotionsNone BillingAppStripeCreateCheckoutSessionConsentCollectionPromotions = "none"
)

Defines values for BillingAppStripeCreateCheckoutSessionConsentCollectionPromotions.

func (BillingAppStripeCreateCheckoutSessionConsentCollectionPromotions) Valid

Valid indicates whether the value is a known member of the BillingAppStripeCreateCheckoutSessionConsentCollectionPromotions enum.

type BillingAppStripeCreateCheckoutSessionConsentCollectionTermsOfService

type BillingAppStripeCreateCheckoutSessionConsentCollectionTermsOfService string

BillingAppStripeCreateCheckoutSessionConsentCollectionTermsOfService Terms of service acceptance requirement.

const (
	BillingAppStripeCreateCheckoutSessionConsentCollectionTermsOfServiceNone     BillingAppStripeCreateCheckoutSessionConsentCollectionTermsOfService = "none"
	BillingAppStripeCreateCheckoutSessionConsentCollectionTermsOfServiceRequired BillingAppStripeCreateCheckoutSessionConsentCollectionTermsOfService = "required"
)

Defines values for BillingAppStripeCreateCheckoutSessionConsentCollectionTermsOfService.

func (BillingAppStripeCreateCheckoutSessionConsentCollectionTermsOfService) Valid

Valid indicates whether the value is a known member of the BillingAppStripeCreateCheckoutSessionConsentCollectionTermsOfService enum.

type BillingAppStripeCreateCheckoutSessionCustomerUpdate

type BillingAppStripeCreateCheckoutSessionCustomerUpdate struct {
	// Address Whether to save the billing address to customer.address.
	//
	// Defaults to "never".
	Address *BillingAppStripeCreateCheckoutSessionCustomerUpdateBehavior `json:"address,omitempty"`

	// Name Whether to save the customer name to customer.name.
	//
	// Defaults to "never".
	Name *BillingAppStripeCreateCheckoutSessionCustomerUpdateBehavior `json:"name,omitempty"`

	// Shipping Whether to save shipping information to customer.shipping.
	//
	// Defaults to "never".
	Shipping *BillingAppStripeCreateCheckoutSessionCustomerUpdateBehavior `json:"shipping,omitempty"`
}

BillingAppStripeCreateCheckoutSessionCustomerUpdate Controls which customer fields can be updated by the checkout session.

type BillingAppStripeCreateCheckoutSessionCustomerUpdateBehavior

type BillingAppStripeCreateCheckoutSessionCustomerUpdateBehavior string

BillingAppStripeCreateCheckoutSessionCustomerUpdateBehavior Behavior for updating customer fields from checkout session.

const (
	BillingAppStripeCreateCheckoutSessionCustomerUpdateBehaviorAuto  BillingAppStripeCreateCheckoutSessionCustomerUpdateBehavior = "auto"
	BillingAppStripeCreateCheckoutSessionCustomerUpdateBehaviorNever BillingAppStripeCreateCheckoutSessionCustomerUpdateBehavior = "never"
)

Defines values for BillingAppStripeCreateCheckoutSessionCustomerUpdateBehavior.

func (BillingAppStripeCreateCheckoutSessionCustomerUpdateBehavior) Valid

Valid indicates whether the value is a known member of the BillingAppStripeCreateCheckoutSessionCustomerUpdateBehavior enum.

type BillingAppStripeCreateCheckoutSessionRedirectOnCompletion

type BillingAppStripeCreateCheckoutSessionRedirectOnCompletion string

BillingAppStripeCreateCheckoutSessionRedirectOnCompletion Redirect behavior for embedded checkout sessions.

const (
	BillingAppStripeCreateCheckoutSessionRedirectOnCompletionAlways     BillingAppStripeCreateCheckoutSessionRedirectOnCompletion = "always"
	BillingAppStripeCreateCheckoutSessionRedirectOnCompletionIfRequired BillingAppStripeCreateCheckoutSessionRedirectOnCompletion = "if_required"
	BillingAppStripeCreateCheckoutSessionRedirectOnCompletionNever      BillingAppStripeCreateCheckoutSessionRedirectOnCompletion = "never"
)

Defines values for BillingAppStripeCreateCheckoutSessionRedirectOnCompletion.

func (BillingAppStripeCreateCheckoutSessionRedirectOnCompletion) Valid

Valid indicates whether the value is a known member of the BillingAppStripeCreateCheckoutSessionRedirectOnCompletion enum.

type BillingAppStripeCreateCheckoutSessionRequestOptions

type BillingAppStripeCreateCheckoutSessionRequestOptions struct {
	// BillingAddressCollection Whether to collect the customer's billing address.
	//
	// Defaults to auto, which only collects the address when necessary for tax
	// calculation.
	BillingAddressCollection *BillingAppStripeCreateCheckoutSessionBillingAddressCollection `json:"billing_address_collection,omitempty"`

	// CancelUrl URL to redirect customers who cancel the checkout session.
	//
	// Not allowed when ui_mode is "embedded".
	CancelUrl *string `json:"cancel_url,omitempty"`

	// ClientReferenceId Unique reference string for reconciling sessions with internal systems.
	//
	// Can be a customer ID, cart ID, or any other identifier.
	ClientReferenceId *string `json:"client_reference_id,omitempty"`

	// ConsentCollection Configuration for collecting customer consent during checkout.
	ConsentCollection *BillingAppStripeCreateCheckoutSessionConsentCollection `json:"consent_collection,omitempty"`

	// Currency Three-letter ISO 4217 currency code in uppercase.
	//
	// Required for payment mode sessions. Optional for setup mode sessions.
	Currency *CurrencyCode `json:"currency,omitempty"`

	// CustomText Custom text to display during checkout at various stages.
	CustomText *BillingAppStripeCheckoutSessionCustomTextParams `json:"custom_text,omitempty"`

	// CustomerUpdate Controls which customer fields can be updated by the checkout session.
	CustomerUpdate *BillingAppStripeCreateCheckoutSessionCustomerUpdate `json:"customer_update,omitempty"`

	// ExpiresAt Unix timestamp when the checkout session expires.
	//
	// Can be 30 minutes to 24 hours from creation. Defaults to 24 hours.
	ExpiresAt *int64 `json:"expires_at,omitempty"`

	// Locale IETF language tag for the checkout UI locale.
	//
	// If blank or "auto", uses the browser's locale. Example: "en", "fr", "de".
	Locale *string `json:"locale,omitempty"`

	// Metadata Set of key-value pairs to attach to the checkout session.
	//
	// Useful for storing additional structured information.
	Metadata *map[string]string `json:"metadata,omitempty"`

	// PaymentMethodTypes List of payment method types to enable (e.g., "card", "us_bank_account").
	//
	// If not specified, Stripe enables all relevant payment methods.
	PaymentMethodTypes *[]string `json:"payment_method_types,omitempty"`

	// RedirectOnCompletion Redirect behavior for embedded checkout sessions.
	//
	// Controls when to redirect users after completion. See:
	// https://docs.stripe.com/payments/checkout/custom-success-page?payment-ui=embedded-form
	RedirectOnCompletion *BillingAppStripeCreateCheckoutSessionRedirectOnCompletion `json:"redirect_on_completion,omitempty"`

	// ReturnUrl Return URL for embedded checkout sessions after payment authentication.
	//
	// Required if ui_mode is "embedded" and redirect-based payment methods are
	// enabled.
	ReturnUrl *string `json:"return_url,omitempty"`

	// SuccessUrl Success URL to redirect customers after completing payment or setup.
	//
	// Not allowed when ui_mode is "embedded". See:
	// https://docs.stripe.com/payments/checkout/custom-success-page
	SuccessUrl *string `json:"success_url,omitempty"`

	// TaxIdCollection Configuration for collecting tax IDs during checkout.
	TaxIdCollection *BillingAppStripeCreateCheckoutSessionTaxIdCollection `json:"tax_id_collection,omitempty"`

	// UiMode The UI mode for the checkout session.
	//
	// "hosted" displays a Stripe-hosted page. "embedded" integrates directly into your
	// app. Defaults to "hosted".
	UiMode *BillingAppStripeCheckoutSessionUIMode `json:"ui_mode,omitempty"`
}

BillingAppStripeCreateCheckoutSessionRequestOptions Configuration options for creating a Stripe Checkout Session.

Based on Stripe's [Checkout Session API parameters](https://docs.stripe.com/api/checkout/sessions/create).

type BillingAppStripeCreateCheckoutSessionResult

type BillingAppStripeCreateCheckoutSessionResult struct {
	// CancelUrl The cancel URL where customers are redirected if they cancel.
	CancelUrl *string `json:"cancel_url,omitempty"`

	// ClientReferenceId The client reference ID provided in the request.
	//
	// Useful for reconciling the session with your internal systems.
	ClientReferenceId *string `json:"client_reference_id,omitempty"`

	// ClientSecret Client secret for initializing Stripe.js on the client side.
	//
	// Required for embedded checkout sessions. See:
	// https://docs.stripe.com/payments/checkout/custom-success-page
	ClientSecret *string `json:"client_secret,omitempty"`

	// CreatedAt Timestamp when the checkout session was created.
	CreatedAt DateTime `json:"created_at"`

	// Currency Currency code for the checkout session.
	Currency *CurrencyCode `json:"currency,omitempty"`

	// CustomerEmail Customer's email address if provided to Stripe.
	CustomerEmail *string `json:"customer_email,omitempty"`

	// CustomerId The customer ID in the billing system.
	CustomerId ULID `json:"customer_id"`

	// ExpiresAt Timestamp when the checkout session will expire.
	ExpiresAt *DateTime `json:"expires_at,omitempty"`

	// Metadata Metadata attached to the checkout session.
	Metadata *map[string]string `json:"metadata,omitempty"`

	// Mode Mode of the checkout session.
	//
	// Currently only "setup" mode is supported for collecting payment methods.
	Mode BillingAppStripeCheckoutSessionMode `json:"mode"`

	// ReturnUrl The return URL for embedded sessions after authentication.
	ReturnUrl *string `json:"return_url,omitempty"`

	// SessionId The Stripe checkout session ID.
	SessionId string `json:"session_id"`

	// SetupIntentId The setup intent ID created for collecting the payment method.
	SetupIntentId string `json:"setup_intent_id"`

	// Status The status of the checkout session.
	//
	// See:
	// https://docs.stripe.com/api/checkout/sessions/object#checkout_session_object-status
	Status *string `json:"status,omitempty"`

	// StripeCustomerId The Stripe customer ID.
	StripeCustomerId string `json:"stripe_customer_id"`

	// SuccessUrl The success URL where customers are redirected after completion.
	SuccessUrl *string `json:"success_url,omitempty"`

	// Url URL to redirect customers to the checkout page (for hosted mode).
	Url *string `json:"url,omitempty"`
}

BillingAppStripeCreateCheckoutSessionResult Result of creating a Stripe Checkout Session.

Contains all the information needed to redirect customers to the checkout or initialize an embedded checkout flow.

type BillingAppStripeCreateCheckoutSessionTaxIdCollection

type BillingAppStripeCreateCheckoutSessionTaxIdCollection struct {
	// Enabled Enable tax ID collection during checkout.
	//
	// Defaults to false.
	Enabled *bool `json:"enabled,omitempty"`

	// Required Whether tax ID collection is required.
	//
	// Defaults to "never".
	Required *BillingAppStripeCreateCheckoutSessionTaxIdCollectionRequired `json:"required,omitempty"`
}

BillingAppStripeCreateCheckoutSessionTaxIdCollection Tax ID collection configuration for checkout sessions.

type BillingAppStripeCreateCheckoutSessionTaxIdCollectionRequired

type BillingAppStripeCreateCheckoutSessionTaxIdCollectionRequired string

BillingAppStripeCreateCheckoutSessionTaxIdCollectionRequired Tax ID collection requirement level.

const (
	BillingAppStripeCreateCheckoutSessionTaxIdCollectionRequiredIfSupported BillingAppStripeCreateCheckoutSessionTaxIdCollectionRequired = "if_supported"
	BillingAppStripeCreateCheckoutSessionTaxIdCollectionRequiredNever       BillingAppStripeCreateCheckoutSessionTaxIdCollectionRequired = "never"
)

Defines values for BillingAppStripeCreateCheckoutSessionTaxIdCollectionRequired.

func (BillingAppStripeCreateCheckoutSessionTaxIdCollectionRequired) Valid

Valid indicates whether the value is a known member of the BillingAppStripeCreateCheckoutSessionTaxIdCollectionRequired enum.

type BillingAppStripeCreateCustomerPortalSessionOptions

type BillingAppStripeCreateCustomerPortalSessionOptions struct {
	// ConfigurationId The ID of an existing
	// [Stripe configuration](https://docs.stripe.com/api/customer_portal/configurations)
	// to use for this session, describing its functionality and features. If not
	// specified, the session uses the default configuration.
	ConfigurationId *string `json:"configuration_id,omitempty"`

	// Locale The IETF
	// [language tag](https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-locale)
	// of the locale customer portal is displayed in. If blank or `auto`, the
	// customer's preferred_locales or browser's locale is used.
	Locale *string `json:"locale,omitempty"`

	// ReturnUrl The
	// [URL to redirect](https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-return_url)
	// the customer to after they have completed their requested actions.
	ReturnUrl *string `json:"return_url,omitempty"`
}

BillingAppStripeCreateCustomerPortalSessionOptions Request to create a Stripe Customer Portal Session.

type BillingAppStripeCreateCustomerPortalSessionResult

type BillingAppStripeCreateCustomerPortalSessionResult struct {
	// ConfigurationId Configuration used to customize the customer portal.
	//
	// See:
	// https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-configuration
	ConfigurationId string `json:"configuration_id"`

	// CreatedAt Created at.
	//
	// See:
	// https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-created
	CreatedAt DateTime `json:"created_at"`

	// Id The ID of the customer portal session.
	//
	// See:
	// https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-id
	Id string `json:"id"`

	// Livemode Livemode.
	//
	// See:
	// https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-livemode
	Livemode bool `json:"livemode"`

	// Locale The IETF language tag of the locale customer portal is displayed in.
	//
	// See:
	// https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-locale
	Locale string `json:"locale"`

	// ReturnUrl Return URL.
	//
	// See:
	// https://docs.stripe.com/api/customer_portal/sessions/object#portal_session_object-return_url
	ReturnUrl string `json:"return_url"`

	// StripeCustomerId The ID of the stripe customer.
	StripeCustomerId string `json:"stripe_customer_id"`

	// Url The URL to redirect the customer to after they have completed their requested
	// actions.
	Url string `json:"url"`
}

BillingAppStripeCreateCustomerPortalSessionResult Result of creating a [Stripe Customer Portal Session](https://docs.stripe.com/api/customer_portal/sessions/object).

Contains all the information needed to redirect the customer to the Stripe Customer Portal.

type BillingAppStripeType

type BillingAppStripeType string

BillingAppStripeType The app type.

const (
	BillingAppStripeTypeStripe BillingAppStripeType = "stripe"
)

Defines values for BillingAppStripeType.

func (BillingAppStripeType) Valid

func (e BillingAppStripeType) Valid() bool

Valid indicates whether the value is a known member of the BillingAppStripeType enum.

type BillingAppType

type BillingAppType string

BillingAppType The type of the app.

const (
	BillingAppTypeExternalInvoicing BillingAppType = "external_invoicing"
	BillingAppTypeSandbox           BillingAppType = "sandbox"
	BillingAppTypeStripe            BillingAppType = "stripe"
)

Defines values for BillingAppType.

func (BillingAppType) Valid

func (e BillingAppType) Valid() bool

Valid indicates whether the value is a known member of the BillingAppType enum.

type BillingCharge

type BillingCharge struct {
	// contains filtered or unexported fields
}

BillingCharge Customer charge.

func (BillingCharge) AsBillingChargeFlatFee

func (t BillingCharge) AsBillingChargeFlatFee() (BillingChargeFlatFee, error)

AsBillingChargeFlatFee returns the union data inside the BillingCharge as a BillingChargeFlatFee

func (BillingCharge) AsBillingChargeUsageBased

func (t BillingCharge) AsBillingChargeUsageBased() (BillingChargeUsageBased, error)

AsBillingChargeUsageBased returns the union data inside the BillingCharge as a BillingChargeUsageBased

func (BillingCharge) Discriminator

func (t BillingCharge) Discriminator() (string, error)

func (*BillingCharge) FromBillingChargeFlatFee

func (t *BillingCharge) FromBillingChargeFlatFee(v BillingChargeFlatFee) error

FromBillingChargeFlatFee overwrites any union data inside the BillingCharge as the provided BillingChargeFlatFee

func (*BillingCharge) FromBillingChargeUsageBased

func (t *BillingCharge) FromBillingChargeUsageBased(v BillingChargeUsageBased) error

FromBillingChargeUsageBased overwrites any union data inside the BillingCharge as the provided BillingChargeUsageBased

func (BillingCharge) MarshalJSON

func (t BillingCharge) MarshalJSON() ([]byte, error)

func (*BillingCharge) MergeBillingChargeFlatFee

func (t *BillingCharge) MergeBillingChargeFlatFee(v BillingChargeFlatFee) error

MergeBillingChargeFlatFee performs a merge with any union data inside the BillingCharge, using the provided BillingChargeFlatFee

func (*BillingCharge) MergeBillingChargeUsageBased

func (t *BillingCharge) MergeBillingChargeUsageBased(v BillingChargeUsageBased) error

MergeBillingChargeUsageBased performs a merge with any union data inside the BillingCharge, using the provided BillingChargeUsageBased

func (*BillingCharge) UnmarshalJSON

func (t *BillingCharge) UnmarshalJSON(b []byte) error

func (BillingCharge) ValueByDiscriminator

func (t BillingCharge) ValueByDiscriminator() (interface{}, error)

type BillingChargeCostBasis

type BillingChargeCostBasis struct {
	// contains filtered or unexported fields
}

BillingChargeCostBasis Cost basis selection for a custom-currency charge. The variant chosen fixes when and how the conversion rate is determined.

func (BillingChargeCostBasis) AsBillingChargeCostBasisDynamic

func (t BillingChargeCostBasis) AsBillingChargeCostBasisDynamic() (BillingChargeCostBasisDynamic, error)

AsBillingChargeCostBasisDynamic returns the union data inside the BillingChargeCostBasis as a BillingChargeCostBasisDynamic

func (BillingChargeCostBasis) AsBillingChargeCostBasisManual

func (t BillingChargeCostBasis) AsBillingChargeCostBasisManual() (BillingChargeCostBasisManual, error)

AsBillingChargeCostBasisManual returns the union data inside the BillingChargeCostBasis as a BillingChargeCostBasisManual

func (BillingChargeCostBasis) AsBillingChargeCostBasisPinned

func (t BillingChargeCostBasis) AsBillingChargeCostBasisPinned() (BillingChargeCostBasisPinned, error)

AsBillingChargeCostBasisPinned returns the union data inside the BillingChargeCostBasis as a BillingChargeCostBasisPinned

func (BillingChargeCostBasis) Discriminator

func (t BillingChargeCostBasis) Discriminator() (string, error)

func (*BillingChargeCostBasis) FromBillingChargeCostBasisDynamic

func (t *BillingChargeCostBasis) FromBillingChargeCostBasisDynamic(v BillingChargeCostBasisDynamic) error

FromBillingChargeCostBasisDynamic overwrites any union data inside the BillingChargeCostBasis as the provided BillingChargeCostBasisDynamic

func (*BillingChargeCostBasis) FromBillingChargeCostBasisManual

func (t *BillingChargeCostBasis) FromBillingChargeCostBasisManual(v BillingChargeCostBasisManual) error

FromBillingChargeCostBasisManual overwrites any union data inside the BillingChargeCostBasis as the provided BillingChargeCostBasisManual

func (*BillingChargeCostBasis) FromBillingChargeCostBasisPinned

func (t *BillingChargeCostBasis) FromBillingChargeCostBasisPinned(v BillingChargeCostBasisPinned) error

FromBillingChargeCostBasisPinned overwrites any union data inside the BillingChargeCostBasis as the provided BillingChargeCostBasisPinned

func (BillingChargeCostBasis) MarshalJSON

func (t BillingChargeCostBasis) MarshalJSON() ([]byte, error)

func (*BillingChargeCostBasis) MergeBillingChargeCostBasisDynamic

func (t *BillingChargeCostBasis) MergeBillingChargeCostBasisDynamic(v BillingChargeCostBasisDynamic) error

MergeBillingChargeCostBasisDynamic performs a merge with any union data inside the BillingChargeCostBasis, using the provided BillingChargeCostBasisDynamic

func (*BillingChargeCostBasis) MergeBillingChargeCostBasisManual

func (t *BillingChargeCostBasis) MergeBillingChargeCostBasisManual(v BillingChargeCostBasisManual) error

MergeBillingChargeCostBasisManual performs a merge with any union data inside the BillingChargeCostBasis, using the provided BillingChargeCostBasisManual

func (*BillingChargeCostBasis) MergeBillingChargeCostBasisPinned

func (t *BillingChargeCostBasis) MergeBillingChargeCostBasisPinned(v BillingChargeCostBasisPinned) error

MergeBillingChargeCostBasisPinned performs a merge with any union data inside the BillingChargeCostBasis, using the provided BillingChargeCostBasisPinned

func (*BillingChargeCostBasis) UnmarshalJSON

func (t *BillingChargeCostBasis) UnmarshalJSON(b []byte) error

func (BillingChargeCostBasis) ValueByDiscriminator

func (t BillingChargeCostBasis) ValueByDiscriminator() (interface{}, error)

type BillingChargeCostBasisDynamic

type BillingChargeCostBasisDynamic struct {
	// FiatCurrency The fiat currency the charge amount is converted into for invoicing.
	FiatCurrency CurrencyCode `json:"fiat_currency"`

	// Type Discriminator selecting the cost basis mode.
	Type BillingChargeCostBasisDynamicType `json:"type"`
}

BillingChargeCostBasisDynamic Cost basis resolved at the charge's full service period start.

type BillingChargeCostBasisDynamicType

type BillingChargeCostBasisDynamicType string

BillingChargeCostBasisDynamicType Discriminator selecting the cost basis mode.

const (
	BillingChargeCostBasisDynamicTypeDynamic BillingChargeCostBasisDynamicType = "dynamic"
)

Defines values for BillingChargeCostBasisDynamicType.

func (BillingChargeCostBasisDynamicType) Valid

Valid indicates whether the value is a known member of the BillingChargeCostBasisDynamicType enum.

type BillingChargeCostBasisManual

type BillingChargeCostBasisManual struct {
	// FiatCurrency The fiat currency the charge amount is converted into for invoicing.
	FiatCurrency *CurrencyCode `json:"fiat_currency,omitempty"`

	// Rate Fiat amount per one unit of the custom currency.
	Rate Numeric `json:"rate"`

	// Type Discriminator selecting the cost basis mode.
	Type BillingChargeCostBasisManualType `json:"type"`
}

BillingChargeCostBasisManual Cost basis with an explicit conversion rate supplied with the charge.

type BillingChargeCostBasisManualType

type BillingChargeCostBasisManualType string

BillingChargeCostBasisManualType Discriminator selecting the cost basis mode.

const (
	BillingChargeCostBasisManualTypeManual BillingChargeCostBasisManualType = "manual"
)

Defines values for BillingChargeCostBasisManualType.

func (BillingChargeCostBasisManualType) Valid

Valid indicates whether the value is a known member of the BillingChargeCostBasisManualType enum.

type BillingChargeCostBasisPinned

type BillingChargeCostBasisPinned struct {
	// CostBasisId ID of the custom currency's cost basis resource to pin.
	CostBasisId ULID `json:"cost_basis_id"`

	// FiatCurrency The fiat currency the charge amount is converted into for invoicing.
	FiatCurrency CurrencyCode `json:"fiat_currency"`

	// Type Discriminator selecting the cost basis mode.
	Type BillingChargeCostBasisPinnedType `json:"type"`
}

BillingChargeCostBasisPinned Cost basis pinned to a specific cost basis resource of the custom currency.

type BillingChargeCostBasisPinnedType

type BillingChargeCostBasisPinnedType string

BillingChargeCostBasisPinnedType Discriminator selecting the cost basis mode.

const (
	BillingChargeCostBasisPinnedTypePinned BillingChargeCostBasisPinnedType = "pinned"
)

Defines values for BillingChargeCostBasisPinnedType.

func (BillingChargeCostBasisPinnedType) Valid

Valid indicates whether the value is a known member of the BillingChargeCostBasisPinnedType enum.

type BillingChargeFlatFee

type BillingChargeFlatFee struct {
	// AdvanceAfter The earliest time when the charge should be advanced again by background
	// processing.
	AdvanceAfter *DateTime `json:"advance_after,omitempty"`

	// AmountAfterProration The amount after proration of the charge.
	AmountAfterProration BillingCurrencyAmount `json:"amount_after_proration"`

	// BillingPeriod The billing period the charge belongs to.
	BillingPeriod ClosedPeriod `json:"billing_period"`

	// CreatedAt An ISO-8601 timestamp representation of entity creation date.
	CreatedAt DateTime `json:"created_at"`

	// Currency The currency of the charge.
	Currency BillingCurrencyCode `json:"currency"`

	// Customer The customer owning the charge.
	//
	// By default, only the `id` of the customer is returned. For more details use the
	// `customer` expand.
	Customer CustomerOrReference `json:"customer"`

	// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
	DeletedAt *DateTime `json:"deleted_at,omitempty"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// Discounts The discounts applied to the charge.
	Discounts *BillingChargeFlatFeeDiscounts `json:"discounts,omitempty"`

	// Feature The feature associated with the charge, when applicable.
	Feature *FeatureOrReference `json:"feature,omitempty"`

	// FullServicePeriod The full, unprorated service period of the charge.
	FullServicePeriod ClosedPeriod `json:"full_service_period"`
	Id                ULID         `json:"id"`

	// InvoiceAt The timestamp when the charge is intended to be invoiced.
	InvoiceAt DateTime `json:"invoice_at"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// LifecycleController Indicates whether the charge lifecycle is controlled by the system or manually
	// overridden by the API user.
	LifecycleController BillingLifecycleController `json:"lifecycle_controller"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// PaymentTerm Payment term of the flat fee charge.
	PaymentTerm BillingPricePaymentTerm `json:"payment_term"`

	// Price The price of the charge.
	Price BillingPriceFlat `json:"price"`

	// ProrationConfiguration The proration configuration of the charge.
	ProrationConfiguration BillingRateCardProrationConfiguration `json:"proration_configuration"`

	// Realizations The realization runs of the charge, sorted by `created_at`.
	Realizations []BillingChargeRealization `json:"realizations"`

	// ResolvedCostBasis The resolved fiat conversion rate of a custom-currency charge. Resolution
	// depends on costbasis type: dynamic is resolved when charge becomes active, all
	// other types resolved on creation.
	ResolvedCostBasis *BillingChargeResolvedCostBasis `json:"resolved_cost_basis,omitempty"`

	// ServicePeriod The effective service period covered by the charge.
	ServicePeriod ClosedPeriod `json:"service_period"`

	// SettlementMode Settlement mode of the charge.
	SettlementMode BillingSettlementMode `json:"settlement_mode"`

	// Status The lifecycle status of the charge.
	Status BillingChargeStatus `json:"status"`

	// Subscription The subscription that originated the charge, when the charge was created from a
	// subscription item.
	//
	// By default, only the `id`, `phase.id`, `phase.item.id` of the subscription is
	// returned. For more details use the `subscription` expand.
	Subscription *SubscriptionOrReference `json:"subscription,omitempty"`

	// SystemIntent Current intent from the system lifecycle controller for a charge that has an
	// active manual override. The top-level charge fields remain the effective
	// customer-facing intent.
	SystemIntent *BillingChargeFlatFeeSystemIntent `json:"system_intent,omitempty"`

	// TaxConfig Tax configuration of the charge.
	TaxConfig *BillingTaxConfig `json:"tax_config,omitempty"`

	// Type The type of the charge.
	Type BillingChargeFlatFeeType `json:"type"`

	// UniqueReferenceId Unique reference ID of the charge.
	UniqueReferenceId *string `json:"unique_reference_id,omitempty"`

	// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
	UpdatedAt DateTime `json:"updated_at"`

	// ValidationIssues Validation issues found while processing the charge.
	//
	// Present only when there are one or more validation findings. An empty list is
	// omitted.
	ValidationIssues *[]BillingValidationIssue `json:"validation_issues,omitempty"`
}

BillingChargeFlatFee A flat fee charge for a customer.

type BillingChargeFlatFeeDiscounts

type BillingChargeFlatFeeDiscounts struct {
	// Percentage Percentage discount applied to the price (0–100).
	Percentage *float32 `json:"percentage,omitempty"`
}

BillingChargeFlatFeeDiscounts Discounts applicable to flat fee charges.

This is the same as `ProductCatalog.Discounts` but without the `usage` field, which is not applicable to flat fee charges.

type BillingChargeFlatFeeSystemIntent

type BillingChargeFlatFeeSystemIntent struct {
	// AmountBeforeProration The amount before proration of the system lifecycle controller flat fee intent.
	AmountBeforeProration BillingCurrencyAmount `json:"amount_before_proration"`

	// BillingPeriod The billing period the charge belongs to.
	BillingPeriod ClosedPeriod `json:"billing_period"`

	// DeletedAt The timestamp when the system lifecycle controller intent was deleted. The
	// effective charge can remain visible while a manual override is active.
	DeletedAt *DateTime `json:"deleted_at,omitempty"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// Discounts The discounts applied to the charge.
	Discounts *BillingChargeFlatFeeDiscounts `json:"discounts,omitempty"`

	// FullServicePeriod The full, unprorated service period of the charge.
	FullServicePeriod ClosedPeriod `json:"full_service_period"`

	// InvoiceAt The timestamp when the charge is intended to be invoiced.
	InvoiceAt DateTime `json:"invoice_at"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// PaymentTerm Payment term of the flat fee charge.
	PaymentTerm BillingPricePaymentTerm `json:"payment_term"`

	// ProrationConfiguration The proration configuration of the charge.
	ProrationConfiguration BillingRateCardProrationConfiguration `json:"proration_configuration"`

	// ServicePeriod The effective service period covered by the charge.
	ServicePeriod ClosedPeriod `json:"service_period"`
}

BillingChargeFlatFeeSystemIntent Flat fee intent fields from the system lifecycle controller shadowed by a manual override.

type BillingChargeFlatFeeType

type BillingChargeFlatFeeType string

BillingChargeFlatFeeType The type of the charge.

const (
	BillingChargeFlatFeeTypeFlatFee BillingChargeFlatFeeType = "flat_fee"
)

Defines values for BillingChargeFlatFeeType.

func (BillingChargeFlatFeeType) Valid

func (e BillingChargeFlatFeeType) Valid() bool

Valid indicates whether the value is a known member of the BillingChargeFlatFeeType enum.

type BillingChargeRealization

type BillingChargeRealization struct {
	// DetailedLines The detailed (rated) lines produced by the realization run.
	//
	// Requires the `realization.detailed_lines` expand.
	DetailedLines *[]BillingChargeRealizationDetailedLine `json:"detailed_lines,omitempty"`

	// Id The ID of the realization run. Not present on `outstanding` entries, which are
	// projections rather than persisted runs.
	Id *string `json:"id,omitempty"`

	// Invoice The reference of the invoice related to the realization.
	Invoice *ChargeRealizationInvoiceOrReference `json:"invoice,omitempty"`

	// LineId The ID of the invoice line this realization was booked to, when the realization
	// has been invoiced.
	LineId *string `json:"line_id,omitempty"`

	// Payment The payment state of the realization, when the charge requires a fiat
	// transaction to settle.
	Payment *BillingChargeRealizationPayment `json:"payment,omitempty"`

	// ServicePeriod The service period covered by this realization run.
	ServicePeriod ClosedPeriod `json:"service_period"`

	// Totals Financial totals for the realization run, including credit allocations.
	//
	// Requires the `realization.totals` expand.
	Totals *BillingTotals `json:"totals,omitempty"`

	// Type The type of the realization run.
	Type BillingChargeRealizationType `json:"type"`

	// Usage The metered usage quantity this realization run accounts for. Only present on
	// usage-based charges; flat fees are not metered, so their realizations carry no
	// usage.
	//
	// Booked entries report a signed delta: a negative value states a downward usage
	// correction (or a voided run that snapshotted behind its live neighbors) instead
	// of masking it as zero.
	//
	// On an `outstanding` entry this is `0` unless the `real_time_usage` expand is
	// applied, in which case it is the not-yet-booked remainder of the live metering
	// read (never negative).
	Usage *Numeric `json:"usage,omitempty"`
}

BillingChargeRealization A realization run of a charge.

`totals` and `detailed_lines` are only populated with the `realization.totals` and `realization.detailed_lines` expands, respectively, since computing them requires re-deriving the run's rated breakdown. `invoice` is an ID reference unless the `realization.invoice` expand is used, which resolves it to the invoice header of the run's booked line: the invoice entity without its `lines` and without the `customer` snapshot (the charge itself already identifies the customer).

type BillingChargeRealizationAmountDiscount

type BillingChargeRealizationAmountDiscount struct {
	// Amount The amount of the discount applied to the charge.
	Amount Numeric `json:"amount"`

	// ChildUniqueReferenceId Unique reference ID of the discount applied to the charge.
	ChildUniqueReferenceId string `json:"child_unique_reference_id"`

	// Description Optional human-readable description of the discount.
	Description *string `json:"description,omitempty"`

	// Reason The reason for the discount applied to the charge.
	Reason string `json:"reason"`

	// RoundingAmount The discount amount applied to the charge, rounded to the nearest cent (or
	// currency equivalent) and adjusted to compensate for rounding errors across
	// multiple discounted detail lines.
	RoundingAmount *Numeric `json:"rounding_amount,omitempty"`
}

BillingChargeRealizationAmountDiscount A discount applied to a charge realization detailed line.

type BillingChargeRealizationDetailedLine

type BillingChargeRealizationDetailedLine struct {
	// contains filtered or unexported fields
}

BillingChargeRealizationDetailedLine A detailed (child) line type of a charge realization run.

This is distinct from an invoice's own detailed lines: it represents the rated/priced breakdown produced by the realization run itself, before that breakdown is (or is not yet) reflected on an invoice line. Credit-then-invoice runs include credit allocations in these lines, while credits-only runs keep the gross rated detail.

func (BillingChargeRealizationDetailedLine) AsBillingChargeRealizationDetailedLineFlatFee

func (t BillingChargeRealizationDetailedLine) AsBillingChargeRealizationDetailedLineFlatFee() (BillingChargeRealizationDetailedLineFlatFee, error)

AsBillingChargeRealizationDetailedLineFlatFee returns the union data inside the BillingChargeRealizationDetailedLine as a BillingChargeRealizationDetailedLineFlatFee

func (BillingChargeRealizationDetailedLine) AsBillingChargeRealizationDetailedLineUsageBased

func (t BillingChargeRealizationDetailedLine) AsBillingChargeRealizationDetailedLineUsageBased() (BillingChargeRealizationDetailedLineUsageBased, error)

AsBillingChargeRealizationDetailedLineUsageBased returns the union data inside the BillingChargeRealizationDetailedLine as a BillingChargeRealizationDetailedLineUsageBased

func (BillingChargeRealizationDetailedLine) Discriminator

func (t BillingChargeRealizationDetailedLine) Discriminator() (string, error)

func (*BillingChargeRealizationDetailedLine) FromBillingChargeRealizationDetailedLineFlatFee

func (t *BillingChargeRealizationDetailedLine) FromBillingChargeRealizationDetailedLineFlatFee(v BillingChargeRealizationDetailedLineFlatFee) error

FromBillingChargeRealizationDetailedLineFlatFee overwrites any union data inside the BillingChargeRealizationDetailedLine as the provided BillingChargeRealizationDetailedLineFlatFee

func (*BillingChargeRealizationDetailedLine) FromBillingChargeRealizationDetailedLineUsageBased

func (t *BillingChargeRealizationDetailedLine) FromBillingChargeRealizationDetailedLineUsageBased(v BillingChargeRealizationDetailedLineUsageBased) error

FromBillingChargeRealizationDetailedLineUsageBased overwrites any union data inside the BillingChargeRealizationDetailedLine as the provided BillingChargeRealizationDetailedLineUsageBased

func (BillingChargeRealizationDetailedLine) MarshalJSON

func (t BillingChargeRealizationDetailedLine) MarshalJSON() ([]byte, error)

func (*BillingChargeRealizationDetailedLine) MergeBillingChargeRealizationDetailedLineFlatFee

func (t *BillingChargeRealizationDetailedLine) MergeBillingChargeRealizationDetailedLineFlatFee(v BillingChargeRealizationDetailedLineFlatFee) error

MergeBillingChargeRealizationDetailedLineFlatFee performs a merge with any union data inside the BillingChargeRealizationDetailedLine, using the provided BillingChargeRealizationDetailedLineFlatFee

func (*BillingChargeRealizationDetailedLine) MergeBillingChargeRealizationDetailedLineUsageBased

func (t *BillingChargeRealizationDetailedLine) MergeBillingChargeRealizationDetailedLineUsageBased(v BillingChargeRealizationDetailedLineUsageBased) error

MergeBillingChargeRealizationDetailedLineUsageBased performs a merge with any union data inside the BillingChargeRealizationDetailedLine, using the provided BillingChargeRealizationDetailedLineUsageBased

func (*BillingChargeRealizationDetailedLine) UnmarshalJSON

func (t *BillingChargeRealizationDetailedLine) UnmarshalJSON(b []byte) error

func (BillingChargeRealizationDetailedLine) ValueByDiscriminator

func (t BillingChargeRealizationDetailedLine) ValueByDiscriminator() (interface{}, error)

type BillingChargeRealizationDetailedLineCategory

type BillingChargeRealizationDetailedLineCategory string

BillingChargeRealizationDetailedLineCategory Cost category of a charge realization detailed line.

Values:

- `regular`: A regular charge line, based on usage or subscription pricing. - `commitment`: A commitment-derived line, such as minimum spend.

const (
	BillingChargeRealizationDetailedLineCategoryCommitment BillingChargeRealizationDetailedLineCategory = "commitment"
	BillingChargeRealizationDetailedLineCategoryRegular    BillingChargeRealizationDetailedLineCategory = "regular"
)

Defines values for BillingChargeRealizationDetailedLineCategory.

func (BillingChargeRealizationDetailedLineCategory) Valid

Valid indicates whether the value is a known member of the BillingChargeRealizationDetailedLineCategory enum.

type BillingChargeRealizationDetailedLineCreditApplied

type BillingChargeRealizationDetailedLineCreditApplied struct {
	// Amount The monetary amount credited.
	Amount Numeric `json:"amount"`

	// CreditRealizationId The ID of the credit realization (allocation) this credit was applied from.
	CreditRealizationId string `json:"credit_realization_id"`

	// Description Human-readable description of the credit allocation.
	Description *string `json:"description,omitempty"`
}

BillingChargeRealizationDetailedLineCreditApplied A credit allocation applied to a charge realization detailed line.

type BillingChargeRealizationDetailedLineFlatFee

type BillingChargeRealizationDetailedLineFlatFee struct {
	// AmountDiscounts The amount discounts applied to the detailed line.
	AmountDiscounts []BillingChargeRealizationAmountDiscount `json:"amount_discounts"`

	// Category The cost category of this detailed line.
	Category BillingChargeRealizationDetailedLineCategory `json:"category"`

	// CreatedAt An ISO-8601 timestamp representation of entity creation date.
	CreatedAt DateTime `json:"created_at"`

	// CreditsApplied Credits applied to this detailed line.
	CreditsApplied *[]BillingChargeRealizationDetailedLineCreditApplied `json:"credits_applied,omitempty"`

	// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
	DeletedAt *DateTime `json:"deleted_at,omitempty"`
	Id        ULID      `json:"id"`

	// ServicePeriod The service period covered by this detailed line.
	ServicePeriod ClosedPeriod `json:"service_period"`

	// Totals Aggregated financial totals for the detailed line.
	Totals BillingTotals `json:"totals"`

	// Type The type of the charge the realization belongs to.
	Type BillingChargeRealizationDetailedLineFlatFeeType `json:"type"`

	// UnitPrice The unit price of the detailed line.
	UnitPrice Numeric `json:"unit_price"`

	// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
	UpdatedAt DateTime `json:"updated_at"`
}

BillingChargeRealizationDetailedLineFlatFee A detailed line produced by a flat fee charge's realization run.

type BillingChargeRealizationDetailedLineFlatFeeType

type BillingChargeRealizationDetailedLineFlatFeeType string

BillingChargeRealizationDetailedLineFlatFeeType The type of the charge the realization belongs to.

const (
	BillingChargeRealizationDetailedLineFlatFeeTypeFlatFee BillingChargeRealizationDetailedLineFlatFeeType = "flat_fee"
)

Defines values for BillingChargeRealizationDetailedLineFlatFeeType.

func (BillingChargeRealizationDetailedLineFlatFeeType) Valid

Valid indicates whether the value is a known member of the BillingChargeRealizationDetailedLineFlatFeeType enum.

type BillingChargeRealizationDetailedLineUsageBased

type BillingChargeRealizationDetailedLineUsageBased struct {
	// AmountDiscounts The amount discounts applied to the detailed line.
	AmountDiscounts []BillingChargeRealizationAmountDiscount `json:"amount_discounts"`

	// Category The cost category of this detailed line.
	Category BillingChargeRealizationDetailedLineCategory `json:"category"`

	// CorrectsRunId The ID of a prior realization run this detailed line corrects. Only set if the
	// detailed line's totals are negative.
	CorrectsRunId *string `json:"corrects_run_id,omitempty"`

	// CreatedAt An ISO-8601 timestamp representation of entity creation date.
	CreatedAt DateTime `json:"created_at"`

	// CreditsApplied Credits applied to this detailed line.
	CreditsApplied *[]BillingChargeRealizationDetailedLineCreditApplied `json:"credits_applied,omitempty"`

	// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
	DeletedAt *DateTime `json:"deleted_at,omitempty"`
	Id        ULID      `json:"id"`

	// Quantity The quantity of the detailed line.
	Quantity Numeric `json:"quantity"`

	// ServicePeriod The service period covered by this detailed line.
	ServicePeriod ClosedPeriod `json:"service_period"`

	// Totals Aggregated financial totals for the detailed line.
	Totals BillingTotals `json:"totals"`

	// Type The type of the charge the realization belongs to.
	Type BillingChargeRealizationDetailedLineUsageBasedType `json:"type"`

	// UnitPrice The unit price of the detailed line.
	UnitPrice Numeric `json:"unit_price"`

	// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
	UpdatedAt DateTime `json:"updated_at"`
}

BillingChargeRealizationDetailedLineUsageBased A detailed line produced by a usage-based charge's realization run.

type BillingChargeRealizationDetailedLineUsageBasedType

type BillingChargeRealizationDetailedLineUsageBasedType string

BillingChargeRealizationDetailedLineUsageBasedType The type of the charge the realization belongs to.

const (
	BillingChargeRealizationDetailedLineUsageBasedTypeUsageBased BillingChargeRealizationDetailedLineUsageBasedType = "usage_based"
)

Defines values for BillingChargeRealizationDetailedLineUsageBasedType.

func (BillingChargeRealizationDetailedLineUsageBasedType) Valid

Valid indicates whether the value is a known member of the BillingChargeRealizationDetailedLineUsageBasedType enum.

type BillingChargeRealizationInvoice

type BillingChargeRealizationInvoice struct {
	// CollectionAt Timestamp when collection was initiated for this invoice.
	CollectionAt *DateTime `json:"collection_at,omitempty"`

	// CreatedAt An ISO-8601 timestamp representation of entity creation date.
	CreatedAt DateTime `json:"created_at"`

	// Currency Three-letter ISO 4217 currency code for the invoice.
	Currency CurrencyCode `json:"currency"`

	// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
	DeletedAt *DateTime `json:"deleted_at,omitempty"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// DraftUntil Timestamp until which the invoice remains in draft state.
	//
	// The invoice advances automatically once this time is reached.
	DraftUntil *DateTime `json:"draft_until,omitempty"`

	// DueAt Timestamp when payment is due.
	DueAt *DateTime `json:"due_at,omitempty"`

	// ExternalReferences External identifiers assigned to this invoice by third-party systems.
	ExternalReferences *BillingInvoiceExternalReferences `json:"external_references,omitempty"`
	Id                 ULID                              `json:"id"`

	// IssuedAt Timestamp when the invoice was issued to the customer.
	IssuedAt *DateTime `json:"issued_at,omitempty"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Number Human-readable invoice number generated by the invoicing app.
	Number BillingInvoiceNumber `json:"number"`

	// QuantitySnapshottedAt Timestamp when usage quantities were last snapshotted for this invoice.
	QuantitySnapshottedAt *DateTime `json:"quantity_snapshotted_at,omitempty"`

	// SentToCustomerAt Timestamp when the invoice was sent to the customer.
	SentToCustomerAt *DateTime `json:"sent_to_customer_at,omitempty"`

	// ServicePeriod The service period covered by this invoice.
	//
	// For flat fee the service period can be empty which means `from` will be equals
	// to `to`. In other cases those fields will be filled with the actual service
	// period.
	ServicePeriod ClosedPeriod `json:"service_period"`

	// Status Current lifecycle status of the invoice.
	Status BillingInvoiceStandardStatus `json:"status"`

	// StatusDetails Detailed status information including available actions and workflow state.
	StatusDetails BillingInvoiceStatusDetails `json:"status_details"`

	// Supplier Snapshot of the supplier's contact information at the time the invoice was
	// issued.
	Supplier BillingSupplier `json:"supplier"`

	// Totals Aggregated financial totals for the invoice.
	Totals BillingTotals `json:"totals"`

	// Type Discriminator field identifying this as a standard invoice.
	Type BillingChargeRealizationInvoiceType `json:"type"`

	// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
	UpdatedAt DateTime `json:"updated_at"`

	// ValidationIssues Validation issues found during invoice processing.
	//
	// Present only when there are one or more validation findings. An empty list is
	// omitted.
	ValidationIssues *[]BillingValidationIssue `json:"validation_issues,omitempty"`

	// Workflow Workflow configuration snapshot captured at invoice creation time.
	Workflow BillingInvoiceWorkflowSettings `json:"workflow"`
}

BillingChargeRealizationInvoice The invoice a charge realization was booked to, embedded as a header.

Matches the standard invoice entity, except that it carries no `customer` snapshot (the charge context already identifies the customer) and `lines` are never populated (the realization itself is the line-level breakdown). The shared invoice contract stays untouched: this model exists so the charges API can slim the embedding without loosening the invoices API.

type BillingChargeRealizationInvoiceType

type BillingChargeRealizationInvoiceType string

BillingChargeRealizationInvoiceType Discriminator field identifying this as a standard invoice.

const (
	BillingChargeRealizationInvoiceTypeStandard BillingChargeRealizationInvoiceType = "standard"
)

Defines values for BillingChargeRealizationInvoiceType.

func (BillingChargeRealizationInvoiceType) Valid

Valid indicates whether the value is a known member of the BillingChargeRealizationInvoiceType enum.

type BillingChargeRealizationPayment

type BillingChargeRealizationPayment struct {
	// Status The settlement status of the payment.
	Status BillingChargeRealizationPaymentStatus `json:"status"`
}

BillingChargeRealizationPayment Payment state of a charge realization.

type BillingChargeRealizationPaymentStatus

type BillingChargeRealizationPaymentStatus string

BillingChargeRealizationPaymentStatus Settlement status of a charge realization's payment.

Values:

- `authorized`: The payment has been authorized against the customer's ledger but has not settled yet. - `settled`: The payment has settled.

const (
	BillingChargeRealizationPaymentStatusAuthorized BillingChargeRealizationPaymentStatus = "authorized"
	BillingChargeRealizationPaymentStatusSettled    BillingChargeRealizationPaymentStatus = "settled"
)

Defines values for BillingChargeRealizationPaymentStatus.

func (BillingChargeRealizationPaymentStatus) Valid

Valid indicates whether the value is a known member of the BillingChargeRealizationPaymentStatus enum.

type BillingChargeRealizationType

type BillingChargeRealizationType string

BillingChargeRealizationType Type of a charge realization run.

Values:

- `final_realization`: The run is the final realization of the charge for its service period; no further runs are expected to correct it. - `partial_invoice`: The run only realizes part of the charge, because the remainder is not yet due to be invoiced. - `outstanding`: The type an outstanding (not-yet-realized) projection would carry if it were realized now. Never returned on a booked realization run. - `voided`: The run's billing effect was undone (for example the charge's service period was extended while its invoice was still mutable); it is retained as audit history and excluded from aggregate and live calculations.

const (
	BillingChargeRealizationTypeFinalRealization BillingChargeRealizationType = "final_realization"
	BillingChargeRealizationTypeOutstanding      BillingChargeRealizationType = "outstanding"
	BillingChargeRealizationTypePartialInvoice   BillingChargeRealizationType = "partial_invoice"
	BillingChargeRealizationTypeVoided           BillingChargeRealizationType = "voided"
)

Defines values for BillingChargeRealizationType.

func (BillingChargeRealizationType) Valid

Valid indicates whether the value is a known member of the BillingChargeRealizationType enum.

type BillingChargeReference

type BillingChargeReference struct {
	// Id Unique identifier for the charge.
	Id ULID `json:"id"`
}

BillingChargeReference Reference to a charge associated with an invoice line.

type BillingChargeResolvedCostBasis

type BillingChargeResolvedCostBasis struct {
	// CostBasisId ID of the custom currency's cost basis resource the rate was taken from. Absent
	// for manual cost bases.
	CostBasisId *ULID `json:"cost_basis_id,omitempty"`

	// FiatCurrency The fiat currency the charge amount is converted into for invoicing.
	FiatCurrency CurrencyCode `json:"fiat_currency"`

	// Rate Fiat amount per one unit of the custom currency.
	Rate Numeric `json:"rate"`

	// ResolvedAt When the rate was resolved.
	ResolvedAt DateTime `json:"resolved_at"`
}

BillingChargeResolvedCostBasis Fiat conversion rate a custom-currency charge is invoiced at. Present once the cost basis is resolved; dynamic cost bases are exposed only after the service period has started.

type BillingChargeStatus

type BillingChargeStatus string

BillingChargeStatus Lifecycle status of a charge.

Values:

- `created`: The charge has been created but is not active yet. - `active`: The charge is active. - `final`: The charge is fully finalized and no further changes are expected. - `deleted`: The charge has been deleted.

const (
	BillingChargeStatusActive  BillingChargeStatus = "active"
	BillingChargeStatusCreated BillingChargeStatus = "created"
	BillingChargeStatusDeleted BillingChargeStatus = "deleted"
	BillingChargeStatusFinal   BillingChargeStatus = "final"
)

Defines values for BillingChargeStatus.

func (BillingChargeStatus) Valid

func (e BillingChargeStatus) Valid() bool

Valid indicates whether the value is a known member of the BillingChargeStatus enum.

type BillingChargeTotals

type BillingChargeTotals struct {
	// Booked The amount of the charge already booked to the internal accounting system.
	Booked BillingTotals `json:"booked"`

	// Realtime The realtime amount of the charge, i.e. the whole usage rated at the charge's
	// price for its full service period, ignoring what has already been booked to a
	// realization. This differs from the `usage` of a realization with type
	// `outstanding`, which only covers the quantity not yet booked.
	//
	// Requires the `real_time_usage` expand.
	Realtime *BillingTotals `json:"realtime,omitempty"`
}

BillingChargeTotals The totals of a charge.

`realtime` is only populated when the `real_time_usage` expand is used.

type BillingChargeUsageBased

type BillingChargeUsageBased struct {
	// AdvanceAfter The earliest time when the charge should be advanced again by background
	// processing.
	AdvanceAfter *DateTime `json:"advance_after,omitempty"`

	// BillingPeriod The billing period the charge belongs to.
	BillingPeriod ClosedPeriod `json:"billing_period"`

	// Commitments Spend commitments for the charge.
	Commitments *BillingSpendCommitments `json:"commitments,omitempty"`

	// CreatedAt An ISO-8601 timestamp representation of entity creation date.
	CreatedAt DateTime `json:"created_at"`

	// Currency The currency of the charge.
	Currency BillingCurrencyCode `json:"currency"`

	// Customer The customer owning the charge.
	//
	// By default, only the `id` of the customer is returned. For more details use the
	// `customer` expand.
	Customer CustomerOrReference `json:"customer"`

	// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
	DeletedAt *DateTime `json:"deleted_at,omitempty"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// Discounts Discounts applied to the usage-based charge.
	Discounts *BillingRateCardDiscounts `json:"discounts,omitempty"`

	// Feature The feature associated with the charge.
	Feature FeatureOrReference `json:"feature"`

	// FullServicePeriod The full, unprorated service period of the charge.
	FullServicePeriod ClosedPeriod `json:"full_service_period"`
	Id                ULID         `json:"id"`

	// InvoiceAt The timestamp when the charge is intended to be invoiced.
	InvoiceAt DateTime `json:"invoice_at"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// LifecycleController Indicates whether the charge lifecycle is controlled by the system or manually
	// overridden by the API user.
	LifecycleController BillingLifecycleController `json:"lifecycle_controller"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// Price The price of the charge.
	//
	// `free` prices are rejected on create: a usage-based charge always carries a
	// concrete price.
	Price BillingPriceUsageBased `json:"price"`

	// Realizations The realization runs of the charge, sorted by `created_at`.
	Realizations []BillingChargeRealization `json:"realizations"`

	// ResolvedCostBasis The resolved fiat conversion rate of a custom-currency charge. Resolution
	// depends on costbasis type: dynamic is resolved when charge becomes active, all
	// other types resolved on creation.
	ResolvedCostBasis *BillingChargeResolvedCostBasis `json:"resolved_cost_basis,omitempty"`

	// ServicePeriod The effective service period covered by the charge.
	ServicePeriod ClosedPeriod `json:"service_period"`

	// SettlementMode Settlement mode of the charge.
	SettlementMode BillingSettlementMode `json:"settlement_mode"`

	// Status The lifecycle status of the charge.
	Status BillingChargeStatus `json:"status"`

	// Subscription The subscription that originated the charge, when the charge was created from a
	// subscription item.
	//
	// By default, only the `id`, `phase.id`, `phase.item.id` of the subscription is
	// returned. For more details use the `subscription` expand.
	Subscription *SubscriptionOrReference `json:"subscription,omitempty"`

	// SystemIntent Current intent from the system lifecycle controller for a charge that has an
	// active manual override. The top-level charge fields remain the effective
	// customer-facing intent.
	SystemIntent *BillingChargeUsageBasedSystemIntent `json:"system_intent,omitempty"`

	// TaxConfig Tax configuration of the charge.
	TaxConfig *BillingTaxConfig `json:"tax_config,omitempty"`

	// Totals Aggregated booked and realtime totals for the charge.
	Totals BillingChargeTotals `json:"totals"`

	// Type The type of the charge.
	Type BillingChargeUsageBasedType `json:"type"`

	// UniqueReferenceId Unique reference ID of the charge.
	UniqueReferenceId *string `json:"unique_reference_id,omitempty"`

	// UnitConfig Unit conversion configuration for the charge.
	//
	// Synthesized on read for charges created from v1 dynamic or package prices:
	// dynamic prices map to a unit price with a multiply unit config, and package
	// prices map to a unit price with a divide unit config.
	//
	// Accepted on create only when the UnitConfig feature is enabled on the
	// deployment; otherwise rejected.
	UnitConfig *BillingUnitConfig `json:"unit_config,omitempty"`

	// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
	UpdatedAt DateTime `json:"updated_at"`

	// Usage The metered usage quantity of the charge for its full service period.
	//
	// Requires the `real_time_usage` expand, since it is computed live from the
	// metering store rather than stored on the charge.
	Usage *Numeric `json:"usage,omitempty"`

	// ValidationIssues Validation issues found while processing the charge.
	//
	// Present only when there are one or more validation findings. An empty list is
	// omitted.
	ValidationIssues *[]BillingValidationIssue `json:"validation_issues,omitempty"`
}

BillingChargeUsageBased A usage-based charge for a customer.

type BillingChargeUsageBasedSystemIntent

type BillingChargeUsageBasedSystemIntent struct {
	// BillingPeriod The billing period the charge belongs to.
	BillingPeriod ClosedPeriod `json:"billing_period"`

	// Commitments Spend commitments for the charge.
	Commitments *BillingSpendCommitments `json:"commitments,omitempty"`

	// DeletedAt The timestamp when the system lifecycle controller intent was deleted. The
	// effective charge can remain visible while a manual override is active.
	DeletedAt *DateTime `json:"deleted_at,omitempty"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// Discounts Discounts applied to the usage-based charge.
	Discounts *BillingRateCardDiscounts `json:"discounts,omitempty"`

	// FullServicePeriod The full, unprorated service period of the charge.
	FullServicePeriod ClosedPeriod `json:"full_service_period"`

	// InvoiceAt The timestamp when the charge is intended to be invoiced.
	InvoiceAt DateTime `json:"invoice_at"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// Price The price of the charge.
	//
	// `free` prices are rejected on create: a usage-based charge always carries a
	// concrete price.
	Price BillingPriceUsageBased `json:"price"`

	// ServicePeriod The effective service period covered by the charge.
	ServicePeriod ClosedPeriod `json:"service_period"`

	// UnitConfig Unit conversion configuration for the charge.
	//
	// Synthesized on read for charges created from v1 dynamic or package prices:
	// dynamic prices map to a unit price with a multiply unit config, and package
	// prices map to a unit price with a divide unit config.
	//
	// Accepted on create only when the UnitConfig feature is enabled on the
	// deployment; otherwise rejected.
	UnitConfig *BillingUnitConfig `json:"unit_config,omitempty"`
}

BillingChargeUsageBasedSystemIntent Usage-based intent fields from the system lifecycle controller shadowed by a manual override.

type BillingChargeUsageBasedType

type BillingChargeUsageBasedType string

BillingChargeUsageBasedType The type of the charge.

const (
	BillingChargeUsageBasedTypeUsageBased BillingChargeUsageBasedType = "usage_based"
)

Defines values for BillingChargeUsageBasedType.

func (BillingChargeUsageBasedType) Valid

Valid indicates whether the value is a known member of the BillingChargeUsageBasedType enum.

type BillingChargesExpand

type BillingChargesExpand string

BillingChargesExpand Expands for customer charges.

Values:

- `real_time_usage`: The charge's real-time usage; it sets the `usage` and the `totals.realtime` fields, and fills the `outstanding` realization's `usage` with the not-yet-booked remainder of the live read. - `customer`: The complete customer entity of the charge. - `feature`: The complete feature entity of the charge. - `subscription`: The complete subscription of the charge, when present. - `realization.invoice`: The invoice header of each realization (the invoice entity without its `lines` and `customer` snapshot), in place of the ID reference. - `realization.totals`: The `totals` of each realization run, including credit allocations. - `realization.detailed_lines`: The `detailed_lines` of each realization run.

const (
	BillingChargesExpandCustomer                 BillingChargesExpand = "customer"
	BillingChargesExpandFeature                  BillingChargesExpand = "feature"
	BillingChargesExpandRealTimeUsage            BillingChargesExpand = "real_time_usage"
	BillingChargesExpandRealizationDetailedLines BillingChargesExpand = "realization.detailed_lines"
	BillingChargesExpandRealizationInvoice       BillingChargesExpand = "realization.invoice"
	BillingChargesExpandRealizationTotals        BillingChargesExpand = "realization.totals"
	BillingChargesExpandSubscription             BillingChargesExpand = "subscription"
)

Defines values for BillingChargesExpand.

func (BillingChargesExpand) Valid

func (e BillingChargesExpand) Valid() bool

Valid indicates whether the value is a known member of the BillingChargesExpand enum.

type BillingCostBasis

type BillingCostBasis struct {
	// CreatedAt An ISO-8601 timestamp representation of entity creation date.
	CreatedAt DateTime `json:"created_at"`

	// EffectiveFrom An ISO-8601 timestamp representation of the date from which the cost basis is
	// effective. If not provided, it will be effective immediately and will be set to
	// `now` by the system.
	EffectiveFrom *DateTime `json:"effective_from,omitempty"`

	// EffectiveTo An ISO-8601 timestamp representation of the date until which the cost basis is
	// effective. If provided, it must be later than `effective_from`. If not provided,
	// it remains effective until superseded.
	EffectiveTo *DateTime `json:"effective_to,omitempty"`

	// FiatCode The fiat currency code for the cost basis.
	FiatCode CurrencyCode `json:"fiat_code"`
	Id       ULID         `json:"id"`

	// Rate The cost rate for the currency.
	Rate Numeric `json:"rate"`
}

BillingCostBasis Describes currency basis supported by billing system.

type BillingCreditAdjustment

type BillingCreditAdjustment struct {
	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`
}

BillingCreditAdjustment A credit adjustment can be used to make manual adjustments to a customer's credit balance.

Supported use-cases:

- Usage correction

type BillingCreditAvailabilityPolicy

type BillingCreditAvailabilityPolicy string

BillingCreditAvailabilityPolicy When credits become available for consumption.

- `on_creation`: Credits are available as soon as the grant is created. - `on_authorization`: Credits are available once the payment is authorized. - `on_settlement`: Credits are available once the payment is settled.

const (
	BillingCreditAvailabilityPolicyOnCreation BillingCreditAvailabilityPolicy = "on_creation"
)

Defines values for BillingCreditAvailabilityPolicy.

func (BillingCreditAvailabilityPolicy) Valid

Valid indicates whether the value is a known member of the BillingCreditAvailabilityPolicy enum.

type BillingCreditBalances

type BillingCreditBalances struct {
	// Balances The balances by currencies.
	Balances []CreditBalance `json:"balances"`

	// RetrievedAt The timestamp of the balance retrieval.
	RetrievedAt DateTime `json:"retrieved_at"`
}

BillingCreditBalances The balances of the credits of a customer.

type BillingCreditFundingMethod

type BillingCreditFundingMethod string

BillingCreditFundingMethod The funding method describes how the grant is funded.

- `none`: No funding workflow applies, for example promotional grants - `invoice`: The grant is funded by an in-system invoice flow - `external`: The grant is funded outside the system (e.g., wire transfer, external invoice, or manual reconciliation)

const (
	BillingCreditFundingMethodExternal BillingCreditFundingMethod = "external"
	BillingCreditFundingMethodInvoice  BillingCreditFundingMethod = "invoice"
	BillingCreditFundingMethodNone     BillingCreditFundingMethod = "none"
)

Defines values for BillingCreditFundingMethod.

func (BillingCreditFundingMethod) Valid

func (e BillingCreditFundingMethod) Valid() bool

Valid indicates whether the value is a known member of the BillingCreditFundingMethod enum.

type BillingCreditGrant

type BillingCreditGrant struct {
	// Amount Granted credit amount.
	Amount Numeric `json:"amount"`

	// CreatedAt An ISO-8601 timestamp representation of entity creation date.
	CreatedAt DateTime `json:"created_at"`

	// Currency The fiat or custom currency of the granted credits.
	//
	// Funded custom-currency grants must define `purchase.cost_basis` to settle in a
	// fiat currency.
	Currency BillingCurrencyCode `json:"currency"`

	// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
	DeletedAt *DateTime `json:"deleted_at,omitempty"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// EffectiveAt The timestamp when the credit grant becomes effective.
	//
	// Defaults to the current date and time.
	EffectiveAt *DateTime `json:"effective_at,omitempty"`

	// ExpiresAt The timestamp when the credit grant expires.
	//
	// Calculated from the grant effective time and `expires_after` if provided.
	ExpiresAt *DateTime `json:"expires_at,omitempty"`

	// Filters Filters for the credit grant.
	Filters *BillingCreditGrantFilters `json:"filters,omitempty"`

	// FundingMethod Funding method of the grant.
	FundingMethod BillingCreditFundingMethod `json:"funding_method"`
	Id            ULID                       `json:"id"`

	// Invoice Available when `funding_method` is `invoice`.
	Invoice *BillingCreditGrantInvoiceReference `json:"invoice,omitempty"`

	// Key Idempotency key for the credit grant creation request.
	//
	// Unique per customer: reusing the same key for the same customer returns an HTTP
	// 409 Conflict instead of creating a duplicate grant, which makes create requests
	// safe to retry. The same key may be reused across different customers.
	Key *ExternalResourceKey `json:"key,omitempty"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// Priority Draw-down priority of the grant. Lower values have higher priority.
	Priority *int16 `json:"priority,omitempty"`

	// Purchase Present when a funding workflow applies (funding_method is not `none`).
	Purchase *BillingCreditGrantPurchase `json:"purchase,omitempty"`

	// Status Current lifecycle status of the grant.
	Status BillingCreditGrantStatus `json:"status"`

	// TaxConfig Tax configuration for the grant.
	//
	// For `invoice` and `external` funding methods, tax configuration should be
	// provided to ensure correct revenue recognition. When not provided, the default
	// credit grant tax code is applied, if that's not set the global default taxcode
	// is used.
	TaxConfig *TaxCodeConfig `json:"tax_config,omitempty"`

	// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
	UpdatedAt DateTime `json:"updated_at"`

	// ValidationIssues Validation issues found while processing the credit grant.
	//
	// Present only when there are one or more validation findings. An empty list is
	// omitted.
	ValidationIssues *[]BillingValidationIssue `json:"validation_issues,omitempty"`

	// VoidedAt Timestamp when the grant was voided.
	VoidedAt *DateTime `json:"voided_at,omitempty"`
}

BillingCreditGrant A credit grant allocates credits to a customer.

Credits are drawn down against charges according to the settlement mode configured on the rate card.

type BillingCreditGrantFilters

type BillingCreditGrantFilters struct {
	// Features Limit the credit grant to specific features. If no features are specified, the
	// credit grant can be used for any feature.
	Features *[]ResourceKey `json:"features,omitempty"`

	// Plans Limit credits to charges from these plans. Entries are alternatives; when
	// features are also specified, both dimensions must match. Omission or an empty
	// list leaves plans unrestricted.
	Plans *[]BillingCreditGrantPlanFilter `json:"plans,omitempty"`
}

BillingCreditGrantFilters Filters for the credit grant.

type BillingCreditGrantInvoiceReference

type BillingCreditGrantInvoiceReference struct {
	// Id Identifier of the invoice associated with the grant.
	Id *ULID `json:"id,omitempty"`

	// Line Identifier of the invoice line associated with the grant.
	Line *struct {
		// Id ULID (Universally Unique Lexicographically Sortable Identifier).
		Id ULID `json:"id"`
	} `json:"line,omitempty"`
}

BillingCreditGrantInvoiceReference Invoice references for the grant.

type BillingCreditGrantPlanFilter

type BillingCreditGrantPlanFilter struct {
	// Key The plan key in the customer's namespace.
	Key ResourceKey `json:"key"`

	// Version Omission matches all versions, including future versions.
	Version *VersionFilter `json:"version,omitempty"`
}

BillingCreditGrantPlanFilter A plan key and an optional version constraint for matching credit grants.

type BillingCreditGrantPurchase

type BillingCreditGrantPurchase struct {
	// Amount The purchase amount, calculated from the resolved cost basis and credit
	// `amount`. Present once the cost basis is resolved.
	Amount *Numeric `json:"amount,omitempty"`

	// AvailabilityPolicy Controls when credits become available for consumption.
	//
	// Defaults to `on_creation`.
	AvailabilityPolicy *BillingCreditAvailabilityPolicy `json:"availability_policy,omitempty"`

	// Currency Fiat currency the purchase is settled in.
	//
	// Must equal the grant `currency` for fiat grants and `cost_basis.fiat_currency`
	// for custom-currency grants.
	Currency CurrencyCode `json:"currency"`

	// PerUnitCostBasis Fiat cost basis per credit unit of a fiat-currency grant.
	//
	// If `per_unit_cost_basis` is 0.50 and credit amount is
	// $100.00, the total
	// charge is $50.00. The value must be greater than 0. If the
	// cost basis is 0, use `funding_method=none` instead.
	//
	// Only applies to fiat grants and cannot be combined with `cost_basis`. Defaults
	// to 1.0 when neither is provided.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	PerUnitCostBasis *Numeric `json:"per_unit_cost_basis,omitempty"`

	// ResolvedCostBasis The rate the purchase is settled at in the purchase `currency`. Present once the
	// cost basis is resolved.
	ResolvedCostBasis *BillingChargeResolvedCostBasis `json:"resolved_cost_basis,omitempty"`

	// SettlementStatus Current payment settlement status.
	SettlementStatus *BillingCreditPurchasePaymentSettlementStatus `json:"settlement_status,omitempty"`
}

BillingCreditGrantPurchase Purchase and payment terms of the grant.

type BillingCreditGrantStatus

type BillingCreditGrantStatus string

BillingCreditGrantStatus Credit grant lifecycle status.

- `pending`: The credit block has been created but is not yet valid. (`effective_at` is in the future or availability_policy is not met) - `active`: The credit block is currently valid and eligible for consumption. (`effective_at` is in the past, `expires_at` is in the future and availability_policy is met) - `expired`: The credit block expired with remaining unused balance, `expires_at` time has passed. - `voided`: The credit block was voided. Remaining balance is forfeited.

const (
	BillingCreditGrantStatusActive  BillingCreditGrantStatus = "active"
	BillingCreditGrantStatusExpired BillingCreditGrantStatus = "expired"
	BillingCreditGrantStatusPending BillingCreditGrantStatus = "pending"
	BillingCreditGrantStatusVoided  BillingCreditGrantStatus = "voided"
)

Defines values for BillingCreditGrantStatus.

func (BillingCreditGrantStatus) Valid

func (e BillingCreditGrantStatus) Valid() bool

Valid indicates whether the value is a known member of the BillingCreditGrantStatus enum.

type BillingCreditGrantVoidPaymentAdjustment

type BillingCreditGrantVoidPaymentAdjustment string

BillingCreditGrantVoidPaymentAdjustment Describes how voiding a credit grant adjusts related payment state.

- `none`: Voiding does not adjust invoices, payment authorization, settlement, payment intents, or external collection state.

const (
	BillingCreditGrantVoidPaymentAdjustmentNone BillingCreditGrantVoidPaymentAdjustment = "none"
)

Defines values for BillingCreditGrantVoidPaymentAdjustment.

func (BillingCreditGrantVoidPaymentAdjustment) Valid

Valid indicates whether the value is a known member of the BillingCreditGrantVoidPaymentAdjustment enum.

type BillingCreditPurchasePaymentSettlementStatus

type BillingCreditPurchasePaymentSettlementStatus string

BillingCreditPurchasePaymentSettlementStatus Credit purchase payment settlement status.

- `pending`: Payment has been initiated and is not yet authorized. - `authorized`: Payment has been authorized. - `settled`: Payment has been settled.

const (
	BillingCreditPurchasePaymentSettlementStatusAuthorized BillingCreditPurchasePaymentSettlementStatus = "authorized"
	BillingCreditPurchasePaymentSettlementStatusPending    BillingCreditPurchasePaymentSettlementStatus = "pending"
	BillingCreditPurchasePaymentSettlementStatusSettled    BillingCreditPurchasePaymentSettlementStatus = "settled"
)

Defines values for BillingCreditPurchasePaymentSettlementStatus.

func (BillingCreditPurchasePaymentSettlementStatus) Valid

Valid indicates whether the value is a known member of the BillingCreditPurchasePaymentSettlementStatus enum.

type BillingCreditTransaction

type BillingCreditTransaction struct {
	// Amount Signed amount of the credit movement. Positive values add balance, negative
	// values reduce balance.
	Amount Numeric `json:"amount"`

	// AvailableBalance The available balance before and after the transaction.
	AvailableBalance struct {
		// After Numeric represents an arbitrary precision number.
		After Numeric `json:"after"`

		// Before Numeric represents an arbitrary precision number.
		Before Numeric `json:"before"`
	} `json:"available_balance"`

	// BookedAt The date and time the transaction was booked.
	BookedAt DateTime `json:"booked_at"`

	// CreatedAt An ISO-8601 timestamp representation of entity creation date.
	CreatedAt DateTime `json:"created_at"`

	// Currency Currency of the balance affected by the transaction.
	Currency BillingCurrencyCode `json:"currency"`

	// CustomCurrency Managed currency reference. Present only for custom currencies.
	CustomCurrency *CurrencyCustomReference `json:"custom_currency,omitempty"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`
	Id          ULID    `json:"id"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// Type The type of credit transaction.
	Type BillingCreditTransactionType `json:"type"`
}

BillingCreditTransaction A credit transaction represents a single credit movement on the customer's balance.

Credit transactions are immutable.

type BillingCreditTransactionType

type BillingCreditTransactionType string

BillingCreditTransactionType The type of the credit transaction.

- `funded`: Credit granted and available for consumption. - `consumed`: Credit consumed by usage or fees. - `expired`: Credit removed because it expired before being used. - `voided`: Credit removed because the grant was voided before being used.

const (
	BillingCreditTransactionTypeConsumed BillingCreditTransactionType = "consumed"
	BillingCreditTransactionTypeExpired  BillingCreditTransactionType = "expired"
	BillingCreditTransactionTypeFunded   BillingCreditTransactionType = "funded"
	BillingCreditTransactionTypeVoided   BillingCreditTransactionType = "voided"
)

Defines values for BillingCreditTransactionType.

func (BillingCreditTransactionType) Valid

Valid indicates whether the value is a known member of the BillingCreditTransactionType enum.

type BillingCurrency

type BillingCurrency struct {
	// contains filtered or unexported fields
}

BillingCurrency Fiat or custom currency.

func (BillingCurrency) AsBillingCurrencyCustom

func (t BillingCurrency) AsBillingCurrencyCustom() (BillingCurrencyCustom, error)

AsBillingCurrencyCustom returns the union data inside the BillingCurrency as a BillingCurrencyCustom

func (BillingCurrency) AsBillingCurrencyFiat

func (t BillingCurrency) AsBillingCurrencyFiat() (BillingCurrencyFiat, error)

AsBillingCurrencyFiat returns the union data inside the BillingCurrency as a BillingCurrencyFiat

func (BillingCurrency) Discriminator

func (t BillingCurrency) Discriminator() (string, error)

func (*BillingCurrency) FromBillingCurrencyCustom

func (t *BillingCurrency) FromBillingCurrencyCustom(v BillingCurrencyCustom) error

FromBillingCurrencyCustom overwrites any union data inside the BillingCurrency as the provided BillingCurrencyCustom

func (*BillingCurrency) FromBillingCurrencyFiat

func (t *BillingCurrency) FromBillingCurrencyFiat(v BillingCurrencyFiat) error

FromBillingCurrencyFiat overwrites any union data inside the BillingCurrency as the provided BillingCurrencyFiat

func (BillingCurrency) MarshalJSON

func (t BillingCurrency) MarshalJSON() ([]byte, error)

func (*BillingCurrency) MergeBillingCurrencyCustom

func (t *BillingCurrency) MergeBillingCurrencyCustom(v BillingCurrencyCustom) error

MergeBillingCurrencyCustom performs a merge with any union data inside the BillingCurrency, using the provided BillingCurrencyCustom

func (*BillingCurrency) MergeBillingCurrencyFiat

func (t *BillingCurrency) MergeBillingCurrencyFiat(v BillingCurrencyFiat) error

MergeBillingCurrencyFiat performs a merge with any union data inside the BillingCurrency, using the provided BillingCurrencyFiat

func (*BillingCurrency) UnmarshalJSON

func (t *BillingCurrency) UnmarshalJSON(b []byte) error

func (BillingCurrency) ValueByDiscriminator

func (t BillingCurrency) ValueByDiscriminator() (interface{}, error)

type BillingCurrencyAmount

type BillingCurrencyAmount struct {
	// Amount The amount as an arbitrary-precision decimal string.
	Amount Numeric `json:"amount"`

	// Currency The fiat or custom currency code of the amount.
	Currency BillingCurrencyCode `json:"currency"`
}

BillingCurrencyAmount Monetary amount in a fiat or custom currency.

type BillingCurrencyCode

type BillingCurrencyCode = string

BillingCurrencyCode Fiat or custom currency code.

type BillingCurrencyCodeCustom

type BillingCurrencyCodeCustom = string

BillingCurrencyCodeCustom Custom currency code. It should be a unique code but not conflicting with any existing fiat currency codes.

type BillingCurrencyCustom

type BillingCurrencyCustom struct {
	// Code Custom currency code. It should be a unique code but not conflicting with any
	// existing fiat currency codes.
	Code BillingCurrencyCodeCustom `json:"code"`

	// CostBasis The list of active and scheduled cost bases for the custom currency. Expired and
	// deleted cost bases are excluded.
	CostBasis *[]BillingCostBasis `json:"cost_basis,omitempty"`

	// CreatedAt An ISO-8601 timestamp representation of the custom currency creation date.
	CreatedAt DateTime `json:"created_at"`

	// DecimalMark The decimal mark for the currency. It should be a string that represents the
	// decimal mark of the currency, such as "." for US Dollar or "," for Euro.
	DecimalMark string `json:"decimal_mark"`
	Id          ULID   `json:"id"`

	// Name The name of the currency. It should be a human-readable string that represents
	// the name of the currency, such as "US Dollar" or "Euro".
	Name string `json:"name"`

	// Precision The precision of the currency. It should be a number that represents the number
	// of decimal places used for the currency, such as 2 for US Dollar or Euro.
	Precision uint32 `json:"precision"`

	// Symbol The symbol of the currency. It should be a string that represents the symbol of
	// the currency, such as "$" for US Dollar or "€" for Euro.
	Symbol *string `json:"symbol,omitempty"`

	// ThousandSeparator The thousand separator for the currency. It should be a string that represents
	// the thousand separator of the currency, such as "," for US Dollar or "." for
	// Euro.
	ThousandSeparator string `json:"thousand_separator"`

	// Type The type of the currency.
	Type BillingCurrencyCustomType `json:"type"`
}

BillingCurrencyCustom Describes custom currency.

type BillingCurrencyCustomType

type BillingCurrencyCustomType string

BillingCurrencyCustomType The type of the currency.

const (
	BillingCurrencyCustomTypeCustom BillingCurrencyCustomType = "custom"
)

Defines values for BillingCurrencyCustomType.

func (BillingCurrencyCustomType) Valid

func (e BillingCurrencyCustomType) Valid() bool

Valid indicates whether the value is a known member of the BillingCurrencyCustomType enum.

type BillingCurrencyExpand

type BillingCurrencyExpand string

BillingCurrencyExpand Expands for currencies.

Values:

- `cost_basis`: The currency's active and scheduled cost basis.

const (
	BillingCurrencyExpandCostBasis BillingCurrencyExpand = "cost_basis"
)

Defines values for BillingCurrencyExpand.

func (BillingCurrencyExpand) Valid

func (e BillingCurrencyExpand) Valid() bool

Valid indicates whether the value is a known member of the BillingCurrencyExpand enum.

type BillingCurrencyFiat

type BillingCurrencyFiat struct {
	Code CurrencyCode `json:"code"`

	// DecimalMark The decimal mark for the currency. It should be a string that represents the
	// decimal mark of the currency, such as "." for US Dollar or "," for Euro.
	DecimalMark string `json:"decimal_mark"`

	// Name The name of the currency. It should be a human-readable string that represents
	// the name of the currency, such as "US Dollar" or "Euro".
	Name string `json:"name"`

	// Precision The precision of the currency. It should be a number that represents the number
	// of decimal places used for the currency, such as 2 for US Dollar or Euro.
	Precision uint32 `json:"precision"`

	// Symbol The symbol of the currency. It should be a string that represents the symbol of
	// the currency, such as "$" for US Dollar or "€" for Euro.
	Symbol *string `json:"symbol,omitempty"`

	// ThousandSeparator The thousand separator for the currency. It should be a string that represents
	// the thousand separator of the currency, such as "," for US Dollar or "." for
	// Euro.
	ThousandSeparator string `json:"thousand_separator"`

	// Type The type of the currency.
	Type BillingCurrencyFiatType `json:"type"`
}

BillingCurrencyFiat Currency describes a currency supported by the billing system.

type BillingCurrencyFiatType

type BillingCurrencyFiatType string

BillingCurrencyFiatType The type of the currency.

const (
	BillingCurrencyFiatTypeFiat BillingCurrencyFiatType = "fiat"
)

Defines values for BillingCurrencyFiatType.

func (BillingCurrencyFiatType) Valid

func (e BillingCurrencyFiatType) Valid() bool

Valid indicates whether the value is a known member of the BillingCurrencyFiatType enum.

type BillingCurrencyType

type BillingCurrencyType string

BillingCurrencyType Currency type for custom currencies. It should be a unique code but not conflicting with any existing standard currency codes.

const (
	BillingCurrencyTypeCustom BillingCurrencyType = "custom"
	BillingCurrencyTypeFiat   BillingCurrencyType = "fiat"
)

Defines values for BillingCurrencyType.

func (BillingCurrencyType) Valid

func (e BillingCurrencyType) Valid() bool

Valid indicates whether the value is a known member of the BillingCurrencyType enum.

type BillingCustomer

type BillingCustomer struct {
	// BillingAddress The billing address of the customer. Used for tax and invoicing.
	BillingAddress *Address `json:"billing_address,omitempty"`

	// CreatedAt An ISO-8601 timestamp representation of entity creation date.
	CreatedAt DateTime `json:"created_at"`

	// Currency Currency of the customer. Used for billing, tax and invoicing.
	Currency *CurrencyCode `json:"currency,omitempty"`

	// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
	DeletedAt *DateTime `json:"deleted_at,omitempty"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`
	Id          ULID    `json:"id"`

	// Key ExternalResourceKey is a unique string that is used to identify a resource in an
	// external system.
	Key ExternalResourceKey `json:"key"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// PrimaryEmail The primary email address of the customer.
	PrimaryEmail *string `json:"primary_email,omitempty"`

	// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
	UpdatedAt DateTime `json:"updated_at"`

	// UsageAttribution Mapping to attribute metered usage to the customer by the event subject.
	UsageAttribution *BillingCustomerUsageAttribution `json:"usage_attribution,omitempty"`
}

BillingCustomer Customers can be individuals or organizations that can subscribe to plans and have access to features.

type BillingCustomerData

type BillingCustomerData struct {
	// AppData App customer data.
	AppData *BillingAppCustomerData `json:"app_data,omitempty"`

	// BillingProfile The billing profile for the customer.
	//
	// If not provided, the default billing profile will be used.
	BillingProfile *BillingProfileReference `json:"billing_profile,omitempty"`
}

BillingCustomerData Billing customer data.

type BillingCustomerStripeCreateCheckoutSessionRequest

type BillingCustomerStripeCreateCheckoutSessionRequest struct {
	// StripeOptions Options for configuring the Stripe Checkout Session.
	//
	// These options are passed directly to Stripe's
	// [checkout session creation API](https://docs.stripe.com/api/checkout/sessions/create).
	StripeOptions BillingAppStripeCreateCheckoutSessionRequestOptions `json:"stripe_options"`
}

BillingCustomerStripeCreateCheckoutSessionRequest Request to create a Stripe Checkout Session for the customer.

Checkout Sessions are used to collect payment method information from customers in a secure, Stripe-hosted interface. This integration uses setup mode to collect payment methods that can be charged later for subscription billing.

type BillingCustomerStripeCreateCustomerPortalSessionRequest

type BillingCustomerStripeCreateCustomerPortalSessionRequest struct {
	// StripeOptions Options for configuring the Stripe Customer Portal Session.
	StripeOptions BillingAppStripeCreateCustomerPortalSessionOptions `json:"stripe_options"`
}

BillingCustomerStripeCreateCustomerPortalSessionRequest Request to create a Stripe Customer Portal Session for the customer.

Useful to redirect the customer to the Stripe Customer Portal to manage their payment methods, change their billing address and access their invoice history. Only returns URL if the customer billing profile is linked to a stripe app and customer.

type BillingCustomerUsageAttribution

type BillingCustomerUsageAttribution struct {
	// SubjectKeys The subjects that are attributed to the customer. Can be empty when no usage
	// event subjects are associated with the customer.
	SubjectKeys []UsageAttributionSubjectKey `json:"subject_keys"`
}

BillingCustomerUsageAttribution Mapping to attribute metered usage to the customer. One customer can have zero or more subjects, but one subject can only belong to one customer.

type BillingEntitlement

type BillingEntitlement struct {
	// contains filtered or unexported fields
}

BillingEntitlement An entitlement grants a customer access to a feature.

func (BillingEntitlement) AsBillingEntitlementBoolean

func (t BillingEntitlement) AsBillingEntitlementBoolean() (BillingEntitlementBoolean, error)

AsBillingEntitlementBoolean returns the union data inside the BillingEntitlement as a BillingEntitlementBoolean

func (BillingEntitlement) AsBillingEntitlementMetered

func (t BillingEntitlement) AsBillingEntitlementMetered() (BillingEntitlementMetered, error)

AsBillingEntitlementMetered returns the union data inside the BillingEntitlement as a BillingEntitlementMetered

func (BillingEntitlement) AsBillingEntitlementStatic

func (t BillingEntitlement) AsBillingEntitlementStatic() (BillingEntitlementStatic, error)

AsBillingEntitlementStatic returns the union data inside the BillingEntitlement as a BillingEntitlementStatic

func (BillingEntitlement) Discriminator

func (t BillingEntitlement) Discriminator() (string, error)

func (*BillingEntitlement) FromBillingEntitlementBoolean

func (t *BillingEntitlement) FromBillingEntitlementBoolean(v BillingEntitlementBoolean) error

FromBillingEntitlementBoolean overwrites any union data inside the BillingEntitlement as the provided BillingEntitlementBoolean

func (*BillingEntitlement) FromBillingEntitlementMetered

func (t *BillingEntitlement) FromBillingEntitlementMetered(v BillingEntitlementMetered) error

FromBillingEntitlementMetered overwrites any union data inside the BillingEntitlement as the provided BillingEntitlementMetered

func (*BillingEntitlement) FromBillingEntitlementStatic

func (t *BillingEntitlement) FromBillingEntitlementStatic(v BillingEntitlementStatic) error

FromBillingEntitlementStatic overwrites any union data inside the BillingEntitlement as the provided BillingEntitlementStatic

func (BillingEntitlement) MarshalJSON

func (t BillingEntitlement) MarshalJSON() ([]byte, error)

func (*BillingEntitlement) MergeBillingEntitlementBoolean

func (t *BillingEntitlement) MergeBillingEntitlementBoolean(v BillingEntitlementBoolean) error

MergeBillingEntitlementBoolean performs a merge with any union data inside the BillingEntitlement, using the provided BillingEntitlementBoolean

func (*BillingEntitlement) MergeBillingEntitlementMetered

func (t *BillingEntitlement) MergeBillingEntitlementMetered(v BillingEntitlementMetered) error

MergeBillingEntitlementMetered performs a merge with any union data inside the BillingEntitlement, using the provided BillingEntitlementMetered

func (*BillingEntitlement) MergeBillingEntitlementStatic

func (t *BillingEntitlement) MergeBillingEntitlementStatic(v BillingEntitlementStatic) error

MergeBillingEntitlementStatic performs a merge with any union data inside the BillingEntitlement, using the provided BillingEntitlementStatic

func (*BillingEntitlement) UnmarshalJSON

func (t *BillingEntitlement) UnmarshalJSON(b []byte) error

func (BillingEntitlement) ValueByDiscriminator

func (t BillingEntitlement) ValueByDiscriminator() (interface{}, error)

type BillingEntitlementAccessCheckResult

type BillingEntitlementAccessCheckResult struct {
	// Config Only available for static entitlements. Config is the JSON parsable
	// configuration of the entitlement. Useful to describe per customer configuration.
	Config *string `json:"config,omitempty"`

	// HasAccess Whether the customer has access to the feature. Always true for `boolean` and
	// `static` entitlements. Depends on balance for `metered` entitlements.
	HasAccess bool `json:"has_access"`

	// Type The type of the entitlement.
	//
	// If not provided, the feature has no entitlement defined (has access is always
	// false in this case)
	Type *BillingEntitlementType `json:"type,omitempty"`
}

BillingEntitlementAccessCheckResult Entitlement access check result.

type BillingEntitlementAccessExpand

type BillingEntitlementAccessExpand string

BillingEntitlementAccessExpand Expands for customer entitlement access.

Values:

- `value`: The balance details of a metered entitlement; it sets the `value` field.

const (
	BillingEntitlementAccessExpandValue BillingEntitlementAccessExpand = "value"
)

Defines values for BillingEntitlementAccessExpand.

func (BillingEntitlementAccessExpand) Valid

Valid indicates whether the value is a known member of the BillingEntitlementAccessExpand enum.

type BillingEntitlementAccessValue

type BillingEntitlementAccessValue struct {
	// Balance The remaining balance of the entitlement in the usage period at the evaluation
	// time.
	Balance Numeric `json:"balance"`

	// GrantBalances The remaining balance of each grant, keyed by grant ID.
	GrantBalances map[string]Numeric `json:"grant_balances"`

	// Overage The usage exceeding the available balance in the usage period at the evaluation
	// time.
	Overage Numeric `json:"overage"`

	// TotalAvailableGrantAmount The total amount granted and available to the entitlement at the evaluation
	// time.
	TotalAvailableGrantAmount Numeric `json:"total_available_grant_amount"`

	// Usage The usage recorded in the usage period at the evaluation time.
	Usage Numeric `json:"usage"`
}

BillingEntitlementAccessValue Balance details of a metered entitlement at the evaluation time, which is the `at` query parameter when given and the current time otherwise.

type BillingEntitlementBoolean

type BillingEntitlementBoolean struct {
	// ActiveFrom The time from which the entitlement is active.
	ActiveFrom DateTime `json:"active_from"`

	// ActiveTo The time until which the entitlement is active. If not set, the entitlement is
	// active until deleted.
	ActiveTo *DateTime `json:"active_to,omitempty"`

	// CreatedAt The time the entitlement was created.
	CreatedAt DateTime `json:"created_at"`

	// CurrentUsagePeriod The current usage period of the entitlement.
	CurrentUsagePeriod *ClosedPeriod `json:"current_usage_period,omitempty"`

	// Customer The customer the entitlement belongs to.
	Customer CustomerReference `json:"customer"`

	// DeletedAt The time the entitlement was deleted.
	DeletedAt *DateTime `json:"deleted_at,omitempty"`

	// Feature The feature the customer is entitled to use.
	Feature FeatureReference `json:"feature"`
	Id      ULID             `json:"id"`
	Labels  *Labels          `json:"labels,omitempty"`

	// Type The type of the entitlement.
	Type BillingEntitlementBooleanType `json:"type"`

	// UpdatedAt The time the entitlement was last updated.
	UpdatedAt DateTime `json:"updated_at"`

	// UsagePeriod The usage period of the entitlement.
	UsagePeriod *RecurringPeriod `json:"usage_period,omitempty"`
}

BillingEntitlementBoolean A boolean entitlement grants access to a feature.

type BillingEntitlementBooleanType

type BillingEntitlementBooleanType string

BillingEntitlementBooleanType The type of the entitlement.

const (
	BillingEntitlementBooleanTypeBoolean BillingEntitlementBooleanType = "boolean"
)

Defines values for BillingEntitlementBooleanType.

func (BillingEntitlementBooleanType) Valid

Valid indicates whether the value is a known member of the BillingEntitlementBooleanType enum.

type BillingEntitlementBurndownBalance

type BillingEntitlementBurndownBalance struct {
	// End The balance at the end of the segment.
	End Numeric `json:"end"`

	// Start The balance at the start of the segment.
	Start Numeric `json:"start"`
}

BillingEntitlementBurndownBalance Entitlement balance at the boundaries of a burndown segment.

type BillingEntitlementBurndownGrantBalances

type BillingEntitlementBurndownGrantBalances struct {
	// End The balance of each active grant at the end of the segment.
	End map[string]Numeric `json:"end"`

	// Start The balance of each active grant at the start of the segment.
	Start map[string]Numeric `json:"start"`
}

BillingEntitlementBurndownGrantBalances Grant balances at the boundaries of a burndown segment, keyed by grant ID.

type BillingEntitlementBurndownSegment

type BillingEntitlementBurndownSegment struct {
	// Balance The entitlement balance at the start and at the end of the segment.
	Balance BillingEntitlementBurndownBalance `json:"balance"`

	// GrantBalances The balance of each active grant at the start and at the end of the segment,
	// keyed by grant ID.
	GrantBalances BillingEntitlementBurndownGrantBalances `json:"grant_balances"`

	// GrantUsages The grants consumed in the segment and the usage taken from each.
	GrantUsages []BillingEntitlementGrantUsage `json:"grant_usages"`

	// Overage The usage in the segment not covered by any grant.
	Overage Numeric `json:"overage"`

	// Period The period the segment covers.
	Period ClosedPeriod `json:"period"`

	// Usage The usage recorded in the segment.
	Usage Numeric `json:"usage"`
}

BillingEntitlementBurndownSegment A period in which grants were consumed in a fixed order.

type BillingEntitlementFeatureValueResult

type BillingEntitlementFeatureValueResult struct {
	// Config Only available for static entitlements. Config is the JSON parsable
	// configuration of the entitlement. Useful to describe per customer configuration.
	Config *string `json:"config,omitempty"`

	// FeatureKey The feature key being evaluated.
	FeatureKey ResourceKey `json:"feature_key"`

	// HasAccess Whether the customer has access to the feature. Always true for `boolean` and
	// `static` entitlements. Depends on balance for `metered` entitlements.
	HasAccess bool `json:"has_access"`

	// Type The type of the entitlement.
	//
	// If not provided, the feature has no entitlement defined (has access is always
	// false in this case)
	Type *BillingEntitlementType `json:"type,omitempty"`

	// Value Only available for metered entitlements. The balance details of the entitlement
	// at the evaluation time. Requires the `value` expand.
	Value *BillingEntitlementAccessValue `json:"value,omitempty"`
}

BillingEntitlementFeatureValueResult Entitlement value looked up by feature key. A missing entitlement has no type and does not grant access.

type BillingEntitlementGrant

type BillingEntitlementGrant struct {
	// Amount The granted amount, in the feature's unit.
	Amount Numeric `json:"amount"`

	// CreatedAt An ISO-8601 timestamp representation of entity creation date.
	CreatedAt DateTime `json:"created_at"`

	// CustomerId The ID of the customer the grant belongs to.
	CustomerId *ULID `json:"customer_id,omitempty"`

	// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
	DeletedAt *DateTime `json:"deleted_at,omitempty"`

	// EffectiveAt The time the grant takes effect.
	EffectiveAt DateTime `json:"effective_at"`

	// EntitlementId The ID of the entitlement the grant belongs to.
	EntitlementId ULID `json:"entitlement_id"`

	// ExpiresAfter The duration after which the grant expires, counted from `effective_at`. Always
	// a single-unit duration (for example `PT12H`, `P7D`, `P2W`, `P3M`, `P1Y`). Absent
	// when the grant never expires.
	ExpiresAfter *ISO8601Duration `json:"expires_after,omitempty"`

	// ExpiresAt The time the grant expires, calculated from `effective_at` and `expires_after`.
	// The grant is no longer in effect from this time. Absent when the grant never
	// expires.
	ExpiresAt *DateTime `json:"expires_at,omitempty"`
	Id        ULID      `json:"id"`
	Labels    *Labels   `json:"labels,omitempty"`

	// MaxRolloverAmount The maximum balance the grant carries over at reset. The balance after a reset
	// is `MIN(max_rollover_amount, MAX(balance_before_reset, min_rollover_amount))`.
	MaxRolloverAmount Numeric `json:"max_rollover_amount"`

	// MinRolloverAmount The minimum balance the grant carries over at reset. The balance after a reset
	// is `MIN(max_rollover_amount, MAX(balance_before_reset, min_rollover_amount))`.
	MinRolloverAmount Numeric `json:"min_rollover_amount"`

	// NextRecurrence The next time the grant recurs. Absent for non-recurring grants.
	NextRecurrence *DateTime `json:"next_recurrence,omitempty"`

	// Priority The priority of the grant. Lower values are consumed first: a grant with
	// priority 1 is consumed before one with priority 2. Among equal priorities, the
	// grant closest to expiration is consumed first, then the earliest created.
	Priority uint8 `json:"priority"`

	// Recurrence The recurrence of the grant. When set, the grant amount is re-issued every
	// interval from the anchor, which defaults to `effective_at`. Absent for
	// non-recurring grants.
	Recurrence *RecurringPeriod `json:"recurrence,omitempty"`

	// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
	UpdatedAt DateTime `json:"updated_at"`

	// VoidedAt The time the grant was voided. A voided grant is no longer in effect from this
	// time.
	VoidedAt *DateTime `json:"voided_at,omitempty"`
}

BillingEntitlementGrant A grant issued for a metered entitlement. Each grant adds its amount to the entitlement's balance from its effective time until it expires, and usage is deducted from the grants in priority order.

Grants are immutable, so the balance is deterministic regardless of when it is queried. Deleting a grant ends it at the time of the deletion.

type BillingEntitlementGrantCreateRequest

type BillingEntitlementGrantCreateRequest struct {
	// Amount The amount to grant, in the feature's unit. Must be positive.
	Amount Numeric `json:"amount"`

	// EffectiveAt The time the grant becomes effective and the anchor for recurring grants. The
	// value is truncated to the start of the minute.
	EffectiveAt DateTime `json:"effective_at"`

	// ExpiresAfter The duration after which the grant expires, counted from `effective_at`. Only
	// single-unit durations are accepted, such as `PT12H`, `P7D`, `P2W`, `P3M`, or
	// `P1Y`. If omitted, the grant never expires.
	ExpiresAfter *ISO8601Duration `json:"expires_after,omitempty"`
	Labels       *Labels          `json:"labels,omitempty"`

	// MaxRolloverAmount The maximum balance carried over at reset. The balance after a reset is
	// `MIN(max_rollover_amount, MAX(balance_before_reset, min_rollover_amount))`.
	// Defaults to `amount`.
	MaxRolloverAmount *Numeric `json:"max_rollover_amount,omitempty"`

	// MinRolloverAmount The minimum balance carried over at reset. The balance after a reset is
	// `MIN(max_rollover_amount, MAX(balance_before_reset, min_rollover_amount))`.
	// Defaults to `0`.
	MinRolloverAmount *Numeric `json:"min_rollover_amount,omitempty"`

	// Priority The priority of the grant. Lower values have higher priority. Grants are
	// consumed in priority order, then by closest expiration, then by earliest
	// creation.
	Priority *uint8 `json:"priority,omitempty"`

	// Recurrence The recurrence of the grant. When set, the amount is issued again every
	// interval. The anchor defaults to `effective_at`.
	Recurrence *RecurringPeriodInput `json:"recurrence,omitempty"`
}

BillingEntitlementGrantCreateRequest A grant to issue for a metered entitlement.

type BillingEntitlementGrantUsage

type BillingEntitlementGrantUsage struct {
	// GrantId The ID of the grant.
	GrantId ULID `json:"grant_id"`

	// Usage The usage taken from the grant.
	Usage Numeric `json:"usage"`
}

BillingEntitlementGrantUsage Usage taken from a single grant.

type BillingEntitlementHistory

type BillingEntitlementHistory struct {
	// BurndownHistory Periods in which grants were consumed in a fixed order. A new segment starts
	// whenever grant priorities change or a usage period starts.
	BurndownHistory []BillingEntitlementBurndownSegment `json:"burndown_history"`

	// WindowedHistory Usage in half-open windows of the requested size, aligned to the requested time
	// zone. Empty windows are included; windows before usage measurement began are
	// omitted.
	WindowedHistory []BillingEntitlementHistoryWindow `json:"windowed_history"`
}

BillingEntitlementHistory Balance and usage history of a metered entitlement.

type BillingEntitlementHistoryWindow

type BillingEntitlementHistoryWindow struct {
	// BalanceAtStart The entitlement balance at the start of the window.
	BalanceAtStart Numeric `json:"balance_at_start"`

	// Period The period the window covers.
	Period ClosedPeriod `json:"period"`

	// Usage The usage recorded in the window.
	Usage Numeric `json:"usage"`
}

BillingEntitlementHistoryWindow Usage and balance of a single history window.

type BillingEntitlementHistoryWindowSize

type BillingEntitlementHistoryWindowSize string

BillingEntitlementHistoryWindowSize The meter query granularities the usage history can be grouped into. Sub-hour windows are too expensive to compute and monthly windows are not supported.

const (
	BillingEntitlementHistoryWindowSizeP1D  BillingEntitlementHistoryWindowSize = "P1D"
	BillingEntitlementHistoryWindowSizePT1H BillingEntitlementHistoryWindowSize = "PT1H"
)

Defines values for BillingEntitlementHistoryWindowSize.

func (BillingEntitlementHistoryWindowSize) Valid

Valid indicates whether the value is a known member of the BillingEntitlementHistoryWindowSize enum.

type BillingEntitlementIssueAfterReset

type BillingEntitlementIssueAfterReset struct {
	// Amount The amount granted after each reset, in the feature's unit.
	Amount Numeric `json:"amount"`

	// Priority The priority of the grant created after each reset. Lower values have higher
	// priority.
	Priority *uint8 `json:"priority,omitempty"`
}

BillingEntitlementIssueAfterReset Usage granted automatically after each reset of a metered entitlement. The balance returns to `amount` after every reset.

type BillingEntitlementMeasureUsageFrom

type BillingEntitlementMeasureUsageFrom struct {
	// contains filtered or unexported fields
}

BillingEntitlementMeasureUsageFrom The time from which usage is measured, as a preset or an explicit timestamp.

func (BillingEntitlementMeasureUsageFrom) AsBillingEntitlementMeasureUsageFromPreset

func (t BillingEntitlementMeasureUsageFrom) AsBillingEntitlementMeasureUsageFromPreset() (BillingEntitlementMeasureUsageFromPreset, error)

AsBillingEntitlementMeasureUsageFromPreset returns the union data inside the BillingEntitlementMeasureUsageFrom as a BillingEntitlementMeasureUsageFromPreset

func (BillingEntitlementMeasureUsageFrom) AsDateTime

AsDateTime returns the union data inside the BillingEntitlementMeasureUsageFrom as a DateTime

func (*BillingEntitlementMeasureUsageFrom) FromBillingEntitlementMeasureUsageFromPreset

func (t *BillingEntitlementMeasureUsageFrom) FromBillingEntitlementMeasureUsageFromPreset(v BillingEntitlementMeasureUsageFromPreset) error

FromBillingEntitlementMeasureUsageFromPreset overwrites any union data inside the BillingEntitlementMeasureUsageFrom as the provided BillingEntitlementMeasureUsageFromPreset

func (*BillingEntitlementMeasureUsageFrom) FromDateTime

FromDateTime overwrites any union data inside the BillingEntitlementMeasureUsageFrom as the provided DateTime

func (BillingEntitlementMeasureUsageFrom) MarshalJSON

func (t BillingEntitlementMeasureUsageFrom) MarshalJSON() ([]byte, error)

func (*BillingEntitlementMeasureUsageFrom) MergeBillingEntitlementMeasureUsageFromPreset

func (t *BillingEntitlementMeasureUsageFrom) MergeBillingEntitlementMeasureUsageFromPreset(v BillingEntitlementMeasureUsageFromPreset) error

MergeBillingEntitlementMeasureUsageFromPreset performs a merge with any union data inside the BillingEntitlementMeasureUsageFrom, using the provided BillingEntitlementMeasureUsageFromPreset

func (*BillingEntitlementMeasureUsageFrom) MergeDateTime

MergeDateTime performs a merge with any union data inside the BillingEntitlementMeasureUsageFrom, using the provided DateTime

func (*BillingEntitlementMeasureUsageFrom) UnmarshalJSON

func (t *BillingEntitlementMeasureUsageFrom) UnmarshalJSON(b []byte) error

type BillingEntitlementMeasureUsageFromPreset

type BillingEntitlementMeasureUsageFromPreset string

BillingEntitlementMeasureUsageFromPreset Preset for the time from which usage is measured.

- `current_period_start`: the start of the current usage period. - `now`: the entitlement creation time.

const (
	BillingEntitlementMeasureUsageFromPresetCurrentPeriodStart BillingEntitlementMeasureUsageFromPreset = "current_period_start"
	BillingEntitlementMeasureUsageFromPresetNow                BillingEntitlementMeasureUsageFromPreset = "now"
)

Defines values for BillingEntitlementMeasureUsageFromPreset.

func (BillingEntitlementMeasureUsageFromPreset) Valid

Valid indicates whether the value is a known member of the BillingEntitlementMeasureUsageFromPreset enum.

type BillingEntitlementMetered

type BillingEntitlementMetered struct {
	// ActiveFrom The time from which the entitlement is active.
	ActiveFrom DateTime `json:"active_from"`

	// ActiveTo The time until which the entitlement is active. If not set, the entitlement is
	// active until deleted.
	ActiveTo *DateTime `json:"active_to,omitempty"`

	// CreatedAt The time the entitlement was created.
	CreatedAt DateTime `json:"created_at"`

	// CurrentUsagePeriod The current usage period of the entitlement.
	CurrentUsagePeriod ClosedPeriod `json:"current_usage_period"`

	// Customer The customer the entitlement belongs to.
	Customer CustomerReference `json:"customer"`

	// DeletedAt The time the entitlement was deleted.
	DeletedAt *DateTime `json:"deleted_at,omitempty"`

	// Feature The feature the customer is entitled to use.
	Feature FeatureReference `json:"feature"`
	Id      ULID             `json:"id"`

	// IsSoftLimit If true, the customer keeps access to the feature after the balance is
	// exhausted.
	IsSoftLimit *bool `json:"is_soft_limit,omitempty"`

	// Issue Usage granted automatically after each reset. Cannot be combined with `grants`.
	Issue *BillingEntitlementIssueAfterReset `json:"issue,omitempty"`

	// IssueAfterReset The amount granted automatically after each reset.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	IssueAfterReset *Numeric `json:"issue_after_reset,omitempty"`

	// IssueAfterResetPriority The priority of the grant created after each reset.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	IssueAfterResetPriority *uint8  `json:"issue_after_reset_priority,omitempty"`
	Labels                  *Labels `json:"labels,omitempty"`

	// LastReset The time of the last reset.
	LastReset DateTime `json:"last_reset"`

	// MeasureUsageFrom The time from which usage is measured.
	MeasureUsageFrom DateTime `json:"measure_usage_from"`

	// PreserveOverageAtReset If true, the overage is preserved at reset. If false, the usage is reset to 0.
	PreserveOverageAtReset *bool `json:"preserve_overage_at_reset,omitempty"`

	// Type The type of the entitlement.
	Type BillingEntitlementMeteredType `json:"type"`

	// UpdatedAt The time the entitlement was last updated.
	UpdatedAt DateTime `json:"updated_at"`

	// UsagePeriod The usage period of the entitlement. The balance resets at the start of every
	// period.
	UsagePeriod RecurringPeriod `json:"usage_period"`
}

BillingEntitlementMetered A metered entitlement grants a usage allowance for a feature. Access is determined by the balance: the allowance provided by grants is burnt down by usage.

type BillingEntitlementMeteredType

type BillingEntitlementMeteredType string

BillingEntitlementMeteredType The type of the entitlement.

const (
	BillingEntitlementMeteredTypeMetered BillingEntitlementMeteredType = "metered"
)

Defines values for BillingEntitlementMeteredType.

func (BillingEntitlementMeteredType) Valid

Valid indicates whether the value is a known member of the BillingEntitlementMeteredType enum.

type BillingEntitlementStatic

type BillingEntitlementStatic struct {
	// ActiveFrom The time from which the entitlement is active.
	ActiveFrom DateTime `json:"active_from"`

	// ActiveTo The time until which the entitlement is active. If not set, the entitlement is
	// active until deleted.
	ActiveTo *DateTime `json:"active_to,omitempty"`

	// Config The entitlement configuration as a JSON value. Returned when checking
	// entitlement access.
	Config json.RawMessage `json:"config"`

	// CreatedAt The time the entitlement was created.
	CreatedAt DateTime `json:"created_at"`

	// CurrentUsagePeriod The current usage period of the entitlement.
	CurrentUsagePeriod *ClosedPeriod `json:"current_usage_period,omitempty"`

	// Customer The customer the entitlement belongs to.
	Customer CustomerReference `json:"customer"`

	// DeletedAt The time the entitlement was deleted.
	DeletedAt *DateTime `json:"deleted_at,omitempty"`

	// Feature The feature the customer is entitled to use.
	Feature FeatureReference `json:"feature"`
	Id      ULID             `json:"id"`
	Labels  *Labels          `json:"labels,omitempty"`

	// Type The type of the entitlement.
	Type BillingEntitlementStaticType `json:"type"`

	// UpdatedAt The time the entitlement was last updated.
	UpdatedAt DateTime `json:"updated_at"`

	// UsagePeriod The usage period of the entitlement.
	UsagePeriod *RecurringPeriod `json:"usage_period,omitempty"`
}

BillingEntitlementStatic A static entitlement grants access to a feature together with a configuration.

type BillingEntitlementStaticType

type BillingEntitlementStaticType string

BillingEntitlementStaticType The type of the entitlement.

const (
	BillingEntitlementStaticTypeStatic BillingEntitlementStaticType = "static"
)

Defines values for BillingEntitlementStaticType.

func (BillingEntitlementStaticType) Valid

Valid indicates whether the value is a known member of the BillingEntitlementStaticType enum.

type BillingEntitlementType

type BillingEntitlementType string

BillingEntitlementType The type of the entitlement.

const (
	BillingEntitlementTypeBoolean BillingEntitlementType = "boolean"
	BillingEntitlementTypeMetered BillingEntitlementType = "metered"
	BillingEntitlementTypeStatic  BillingEntitlementType = "static"
)

Defines values for BillingEntitlementType.

func (BillingEntitlementType) Valid

func (e BillingEntitlementType) Valid() bool

Valid indicates whether the value is a known member of the BillingEntitlementType enum.

type BillingEntitlementValueResult

type BillingEntitlementValueResult struct {
	// Config Only available for static entitlements. Config is the JSON parsable
	// configuration of the entitlement. Useful to describe per customer configuration.
	Config *string `json:"config,omitempty"`

	// FeatureKey The feature key being evaluated.
	FeatureKey ResourceKey `json:"feature_key"`

	// HasAccess Whether the customer has access to the feature. Always true for `boolean` and
	// `static` entitlements. Depends on balance for `metered` entitlements.
	HasAccess bool `json:"has_access"`

	// Type The type of the entitlement.
	Type BillingEntitlementType `json:"type"`

	// Value Only available for metered entitlements. The balance details of the entitlement
	// at the evaluation time. Requires the `value` expand.
	Value *BillingEntitlementAccessValue `json:"value,omitempty"`
}

BillingEntitlementValueResult Entitlement value result.

type BillingFeatureLLMTokenType

type BillingFeatureLLMTokenType string

BillingFeatureLLMTokenType Token type for LLM cost lookup.

const (
	BillingFeatureLLMTokenTypeCacheRead  BillingFeatureLLMTokenType = "cache_read"
	BillingFeatureLLMTokenTypeCacheWrite BillingFeatureLLMTokenType = "cache_write"
	BillingFeatureLLMTokenTypeInput      BillingFeatureLLMTokenType = "input"
	BillingFeatureLLMTokenTypeOutput     BillingFeatureLLMTokenType = "output"
	BillingFeatureLLMTokenTypeReasoning  BillingFeatureLLMTokenType = "reasoning"
	BillingFeatureLLMTokenTypeRequest    BillingFeatureLLMTokenType = "request"
	BillingFeatureLLMTokenTypeResponse   BillingFeatureLLMTokenType = "response"
)

Defines values for BillingFeatureLLMTokenType.

func (BillingFeatureLLMTokenType) Valid

func (e BillingFeatureLLMTokenType) Valid() bool

Valid indicates whether the value is a known member of the BillingFeatureLLMTokenType enum.

type BillingFeatureLLMUnitCost

type BillingFeatureLLMUnitCost struct {
	// Model Static model ID value (e.g., "gpt-4", "claude-3-5-sonnet"). Use this when the
	// feature tracks a single model. Mutually exclusive with `model_property`.
	Model *string `json:"model,omitempty"`

	// ModelProperty Meter group-by property that holds the model ID. Use this when the meter has a
	// group-by dimension for model. Mutually exclusive with `model`.
	ModelProperty *string `json:"model_property,omitempty"`

	// Pricing Resolved per-token pricing from the LLM cost database. Populated in responses
	// when the provider and model can be determined, either from static values or from
	// meter group-by filters with exact matches.
	Pricing *BillingFeatureLLMUnitCostPricing `json:"pricing,omitempty"`

	// Provider Static LLM provider value (e.g., "openai", "anthropic"). Use this when the
	// feature tracks a single provider. Mutually exclusive with `provider_property`.
	Provider *string `json:"provider,omitempty"`

	// ProviderProperty Meter group-by property that holds the LLM provider. Use this when the meter has
	// a group-by dimension for provider. Mutually exclusive with `provider`.
	ProviderProperty *string `json:"provider_property,omitempty"`

	// TokenType Static token type value. Use this when the feature tracks a single token type
	// (e.g., only input tokens). `request` is an alias for `input`, `response` is an
	// alias for `output`. Mutually exclusive with `token_type_property`.
	TokenType *BillingFeatureLLMTokenType `json:"token_type,omitempty"`

	// TokenTypeProperty Meter group-by property that holds the token type. Use this when the meter has a
	// group-by dimension for token type. Mutually exclusive with `token_type`.
	TokenTypeProperty *string `json:"token_type_property,omitempty"`

	// Type The type discriminator for LLM unit cost.
	Type BillingFeatureLLMUnitCostType `json:"type"`
}

BillingFeatureLLMUnitCost LLM cost lookup configuration. Each dimension (provider, model, token type) can be specified as either a static value or a meter group-by property name (mutually exclusive).

type BillingFeatureLLMUnitCostPricing

type BillingFeatureLLMUnitCostPricing struct {
	// CacheReadPerToken Cost per cache read token in USD.
	CacheReadPerToken *Numeric `json:"cache_read_per_token,omitempty"`

	// CacheWritePerToken Cost per cache write token in USD.
	CacheWritePerToken *Numeric `json:"cache_write_per_token,omitempty"`

	// InputPerToken Cost per input token in USD.
	InputPerToken Numeric `json:"input_per_token"`

	// OutputPerToken Cost per output token in USD.
	OutputPerToken Numeric `json:"output_per_token"`

	// ReasoningPerToken Cost per reasoning token in USD.
	ReasoningPerToken *Numeric `json:"reasoning_per_token,omitempty"`
}

BillingFeatureLLMUnitCostPricing Resolved per-token pricing from the LLM cost database.

type BillingFeatureLLMUnitCostType

type BillingFeatureLLMUnitCostType string

BillingFeatureLLMUnitCostType The type discriminator for LLM unit cost.

const (
	BillingFeatureLLMUnitCostTypeLlm BillingFeatureLLMUnitCostType = "llm"
)

Defines values for BillingFeatureLLMUnitCostType.

func (BillingFeatureLLMUnitCostType) Valid

Valid indicates whether the value is a known member of the BillingFeatureLLMUnitCostType enum.

type BillingFeatureManualUnitCost

type BillingFeatureManualUnitCost struct {
	// Amount Fixed per-unit cost amount in USD.
	Amount Numeric `json:"amount"`

	// Type The type discriminator for manual unit cost.
	Type BillingFeatureManualUnitCostType `json:"type"`
}

BillingFeatureManualUnitCost A fixed per-unit cost amount.

type BillingFeatureManualUnitCostType

type BillingFeatureManualUnitCostType string

BillingFeatureManualUnitCostType The type discriminator for manual unit cost.

const (
	BillingFeatureManualUnitCostTypeManual BillingFeatureManualUnitCostType = "manual"
)

Defines values for BillingFeatureManualUnitCostType.

func (BillingFeatureManualUnitCostType) Valid

Valid indicates whether the value is a known member of the BillingFeatureManualUnitCostType enum.

type BillingFeatureUnitCost

type BillingFeatureUnitCost struct {
	// contains filtered or unexported fields
}

BillingFeatureUnitCost Per-unit cost configuration for a feature. Either a fixed manual amount or a dynamic LLM cost lookup.

func (BillingFeatureUnitCost) AsBillingFeatureLLMUnitCost

func (t BillingFeatureUnitCost) AsBillingFeatureLLMUnitCost() (BillingFeatureLLMUnitCost, error)

AsBillingFeatureLLMUnitCost returns the union data inside the BillingFeatureUnitCost as a BillingFeatureLLMUnitCost

func (BillingFeatureUnitCost) AsBillingFeatureManualUnitCost

func (t BillingFeatureUnitCost) AsBillingFeatureManualUnitCost() (BillingFeatureManualUnitCost, error)

AsBillingFeatureManualUnitCost returns the union data inside the BillingFeatureUnitCost as a BillingFeatureManualUnitCost

func (BillingFeatureUnitCost) Discriminator

func (t BillingFeatureUnitCost) Discriminator() (string, error)

func (*BillingFeatureUnitCost) FromBillingFeatureLLMUnitCost

func (t *BillingFeatureUnitCost) FromBillingFeatureLLMUnitCost(v BillingFeatureLLMUnitCost) error

FromBillingFeatureLLMUnitCost overwrites any union data inside the BillingFeatureUnitCost as the provided BillingFeatureLLMUnitCost

func (*BillingFeatureUnitCost) FromBillingFeatureManualUnitCost

func (t *BillingFeatureUnitCost) FromBillingFeatureManualUnitCost(v BillingFeatureManualUnitCost) error

FromBillingFeatureManualUnitCost overwrites any union data inside the BillingFeatureUnitCost as the provided BillingFeatureManualUnitCost

func (BillingFeatureUnitCost) MarshalJSON

func (t BillingFeatureUnitCost) MarshalJSON() ([]byte, error)

func (*BillingFeatureUnitCost) MergeBillingFeatureLLMUnitCost

func (t *BillingFeatureUnitCost) MergeBillingFeatureLLMUnitCost(v BillingFeatureLLMUnitCost) error

MergeBillingFeatureLLMUnitCost performs a merge with any union data inside the BillingFeatureUnitCost, using the provided BillingFeatureLLMUnitCost

func (*BillingFeatureUnitCost) MergeBillingFeatureManualUnitCost

func (t *BillingFeatureUnitCost) MergeBillingFeatureManualUnitCost(v BillingFeatureManualUnitCost) error

MergeBillingFeatureManualUnitCost performs a merge with any union data inside the BillingFeatureUnitCost, using the provided BillingFeatureManualUnitCost

func (*BillingFeatureUnitCost) UnmarshalJSON

func (t *BillingFeatureUnitCost) UnmarshalJSON(b []byte) error

func (BillingFeatureUnitCost) ValueByDiscriminator

func (t BillingFeatureUnitCost) ValueByDiscriminator() (interface{}, error)

type BillingInstallAppExternalInvoicing

type BillingInstallAppExternalInvoicing struct {
	// CreateBillingProfile If true, creates the Auto Collection preset with an OpenMeter supplier in the US
	// (postal code 94114), without replacing the default profile.
	CreateBillingProfile bool `json:"create_billing_profile"`

	// Name Name of the app.
	Name string `json:"name"`

	// Type Type of the app.
	Type BillingInstallAppExternalInvoicingType `json:"type"`
}

BillingInstallAppExternalInvoicing Model for installing an External Invoicing app from the catalog.

type BillingInstallAppExternalInvoicingType

type BillingInstallAppExternalInvoicingType string

BillingInstallAppExternalInvoicingType Type of the app.

const (
	BillingInstallAppExternalInvoicingTypeExternalInvoicing BillingInstallAppExternalInvoicingType = "external_invoicing"
)

Defines values for BillingInstallAppExternalInvoicingType.

func (BillingInstallAppExternalInvoicingType) Valid

Valid indicates whether the value is a known member of the BillingInstallAppExternalInvoicingType enum.

type BillingInstallAppRequest

type BillingInstallAppRequest struct {
	// contains filtered or unexported fields
}

BillingInstallAppRequest Request to install an app from the catalog.

func (BillingInstallAppRequest) AsBillingInstallAppExternalInvoicing

func (t BillingInstallAppRequest) AsBillingInstallAppExternalInvoicing() (BillingInstallAppExternalInvoicing, error)

AsBillingInstallAppExternalInvoicing returns the union data inside the BillingInstallAppRequest as a BillingInstallAppExternalInvoicing

func (BillingInstallAppRequest) AsBillingInstallAppSandbox

func (t BillingInstallAppRequest) AsBillingInstallAppSandbox() (BillingInstallAppSandbox, error)

AsBillingInstallAppSandbox returns the union data inside the BillingInstallAppRequest as a BillingInstallAppSandbox

func (BillingInstallAppRequest) AsBillingInstallAppStripeWithApiKey

func (t BillingInstallAppRequest) AsBillingInstallAppStripeWithApiKey() (BillingInstallAppStripeWithApiKey, error)

AsBillingInstallAppStripeWithApiKey returns the union data inside the BillingInstallAppRequest as a BillingInstallAppStripeWithApiKey

func (BillingInstallAppRequest) Discriminator

func (t BillingInstallAppRequest) Discriminator() (string, error)

func (*BillingInstallAppRequest) FromBillingInstallAppExternalInvoicing

func (t *BillingInstallAppRequest) FromBillingInstallAppExternalInvoicing(v BillingInstallAppExternalInvoicing) error

FromBillingInstallAppExternalInvoicing overwrites any union data inside the BillingInstallAppRequest as the provided BillingInstallAppExternalInvoicing

func (*BillingInstallAppRequest) FromBillingInstallAppSandbox

func (t *BillingInstallAppRequest) FromBillingInstallAppSandbox(v BillingInstallAppSandbox) error

FromBillingInstallAppSandbox overwrites any union data inside the BillingInstallAppRequest as the provided BillingInstallAppSandbox

func (*BillingInstallAppRequest) FromBillingInstallAppStripeWithApiKey

func (t *BillingInstallAppRequest) FromBillingInstallAppStripeWithApiKey(v BillingInstallAppStripeWithApiKey) error

FromBillingInstallAppStripeWithApiKey overwrites any union data inside the BillingInstallAppRequest as the provided BillingInstallAppStripeWithApiKey

func (BillingInstallAppRequest) MarshalJSON

func (t BillingInstallAppRequest) MarshalJSON() ([]byte, error)

func (*BillingInstallAppRequest) MergeBillingInstallAppExternalInvoicing

func (t *BillingInstallAppRequest) MergeBillingInstallAppExternalInvoicing(v BillingInstallAppExternalInvoicing) error

MergeBillingInstallAppExternalInvoicing performs a merge with any union data inside the BillingInstallAppRequest, using the provided BillingInstallAppExternalInvoicing

func (*BillingInstallAppRequest) MergeBillingInstallAppSandbox

func (t *BillingInstallAppRequest) MergeBillingInstallAppSandbox(v BillingInstallAppSandbox) error

MergeBillingInstallAppSandbox performs a merge with any union data inside the BillingInstallAppRequest, using the provided BillingInstallAppSandbox

func (*BillingInstallAppRequest) MergeBillingInstallAppStripeWithApiKey

func (t *BillingInstallAppRequest) MergeBillingInstallAppStripeWithApiKey(v BillingInstallAppStripeWithApiKey) error

MergeBillingInstallAppStripeWithApiKey performs a merge with any union data inside the BillingInstallAppRequest, using the provided BillingInstallAppStripeWithApiKey

func (*BillingInstallAppRequest) UnmarshalJSON

func (t *BillingInstallAppRequest) UnmarshalJSON(b []byte) error

func (BillingInstallAppRequest) ValueByDiscriminator

func (t BillingInstallAppRequest) ValueByDiscriminator() (interface{}, error)

type BillingInstallAppResponse

type BillingInstallAppResponse struct {
	// contains filtered or unexported fields
}

BillingInstallAppResponse Response of the app install.

func (BillingInstallAppResponse) AsBillingInstalledAppExternalInvoicing

func (t BillingInstallAppResponse) AsBillingInstalledAppExternalInvoicing() (BillingInstalledAppExternalInvoicing, error)

AsBillingInstalledAppExternalInvoicing returns the union data inside the BillingInstallAppResponse as a BillingInstalledAppExternalInvoicing

func (BillingInstallAppResponse) AsBillingInstalledAppSandbox

func (t BillingInstallAppResponse) AsBillingInstalledAppSandbox() (BillingInstalledAppSandbox, error)

AsBillingInstalledAppSandbox returns the union data inside the BillingInstallAppResponse as a BillingInstalledAppSandbox

func (BillingInstallAppResponse) AsBillingInstalledAppStripe

func (t BillingInstallAppResponse) AsBillingInstalledAppStripe() (BillingInstalledAppStripe, error)

AsBillingInstalledAppStripe returns the union data inside the BillingInstallAppResponse as a BillingInstalledAppStripe

func (BillingInstallAppResponse) Discriminator

func (t BillingInstallAppResponse) Discriminator() (string, error)

func (*BillingInstallAppResponse) FromBillingInstalledAppExternalInvoicing

func (t *BillingInstallAppResponse) FromBillingInstalledAppExternalInvoicing(v BillingInstalledAppExternalInvoicing) error

FromBillingInstalledAppExternalInvoicing overwrites any union data inside the BillingInstallAppResponse as the provided BillingInstalledAppExternalInvoicing

func (*BillingInstallAppResponse) FromBillingInstalledAppSandbox

func (t *BillingInstallAppResponse) FromBillingInstalledAppSandbox(v BillingInstalledAppSandbox) error

FromBillingInstalledAppSandbox overwrites any union data inside the BillingInstallAppResponse as the provided BillingInstalledAppSandbox

func (*BillingInstallAppResponse) FromBillingInstalledAppStripe

func (t *BillingInstallAppResponse) FromBillingInstalledAppStripe(v BillingInstalledAppStripe) error

FromBillingInstalledAppStripe overwrites any union data inside the BillingInstallAppResponse as the provided BillingInstalledAppStripe

func (BillingInstallAppResponse) MarshalJSON

func (t BillingInstallAppResponse) MarshalJSON() ([]byte, error)

func (*BillingInstallAppResponse) MergeBillingInstalledAppExternalInvoicing

func (t *BillingInstallAppResponse) MergeBillingInstalledAppExternalInvoicing(v BillingInstalledAppExternalInvoicing) error

MergeBillingInstalledAppExternalInvoicing performs a merge with any union data inside the BillingInstallAppResponse, using the provided BillingInstalledAppExternalInvoicing

func (*BillingInstallAppResponse) MergeBillingInstalledAppSandbox

func (t *BillingInstallAppResponse) MergeBillingInstalledAppSandbox(v BillingInstalledAppSandbox) error

MergeBillingInstalledAppSandbox performs a merge with any union data inside the BillingInstallAppResponse, using the provided BillingInstalledAppSandbox

func (*BillingInstallAppResponse) MergeBillingInstalledAppStripe

func (t *BillingInstallAppResponse) MergeBillingInstalledAppStripe(v BillingInstalledAppStripe) error

MergeBillingInstalledAppStripe performs a merge with any union data inside the BillingInstallAppResponse, using the provided BillingInstalledAppStripe

func (*BillingInstallAppResponse) UnmarshalJSON

func (t *BillingInstallAppResponse) UnmarshalJSON(b []byte) error

func (BillingInstallAppResponse) ValueByDiscriminator

func (t BillingInstallAppResponse) ValueByDiscriminator() (interface{}, error)

type BillingInstallAppSandbox

type BillingInstallAppSandbox struct {
	// CreateBillingProfile If true, a billing profile will be created for the app. The Stripe app will be
	// also set as the default billing profile if the current default is a Sandbox app.
	CreateBillingProfile bool `json:"create_billing_profile"`

	// Name Name of the app.
	Name string `json:"name"`

	// Type Type of the app.
	Type BillingInstallAppSandboxType `json:"type"`
}

BillingInstallAppSandbox Base model for installing an app from the catalog.

type BillingInstallAppSandboxType

type BillingInstallAppSandboxType string

BillingInstallAppSandboxType Type of the app.

const (
	BillingInstallAppSandboxTypeSandbox BillingInstallAppSandboxType = "sandbox"
)

Defines values for BillingInstallAppSandboxType.

func (BillingInstallAppSandboxType) Valid

Valid indicates whether the value is a known member of the BillingInstallAppSandboxType enum.

type BillingInstallAppStripeWithApiKey

type BillingInstallAppStripeWithApiKey struct {
	// ApiKey API key for the app.
	ApiKey string `json:"api_key"`

	// CreateBillingProfile If true, a billing profile will be created for the app. The Stripe app will be
	// also set as the default billing profile if the current default is a Sandbox app.
	CreateBillingProfile bool `json:"create_billing_profile"`

	// Name Name of the app.
	Name string `json:"name"`

	// Type Type of the app.
	Type BillingInstallAppStripeWithApiKeyType `json:"type"`
}

BillingInstallAppStripeWithApiKey Model for installing an app from the catalog with an API key.

type BillingInstallAppStripeWithApiKeyType

type BillingInstallAppStripeWithApiKeyType string

BillingInstallAppStripeWithApiKeyType Type of the app.

const (
	BillingInstallAppStripeWithApiKeyTypeStripe BillingInstallAppStripeWithApiKeyType = "stripe"
)

Defines values for BillingInstallAppStripeWithApiKeyType.

func (BillingInstallAppStripeWithApiKeyType) Valid

Valid indicates whether the value is a known member of the BillingInstallAppStripeWithApiKeyType enum.

type BillingInstalledAppExternalInvoicing

type BillingInstalledAppExternalInvoicing struct {
	// Actions Actions the operator should take to bring the app up to date. Omitted when no
	// action is required.
	Actions *[]BillingAppAction `json:"actions,omitempty"`

	// CreatedAt An ISO-8601 timestamp representation of entity creation date.
	CreatedAt DateTime `json:"created_at"`

	// DefaultForCapabilityTypes Default capabilities of the installed app.
	DefaultForCapabilityTypes []BillingAppCapabilityType `json:"default_for_capability_types"`

	// Definition The app catalog definition that this installed app is based on.
	Definition BillingAppCatalogItem `json:"definition"`

	// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
	DeletedAt *DateTime `json:"deleted_at,omitempty"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// EnableDraftSyncHook Enable draft synchronization hook.
	//
	// When enabled, invoices will pause at the draft state and wait for the
	// integration to call the draft synchronized endpoint before progressing to the
	// issuing state. This allows the external system to validate and prepare the
	// invoice data.
	//
	// When disabled, invoices automatically progress through the draft state based on
	// the configured workflow timing.
	EnableDraftSyncHook bool `json:"enable_draft_sync_hook"`

	// EnableIssuingSyncHook Enable issuing synchronization hook.
	//
	// When enabled, invoices will pause at the issuing state and wait for the
	// integration to call the issuing synchronized endpoint before progressing to the
	// issued state. This ensures the external invoicing system has successfully
	// created and finalized the invoice before it is marked as issued.
	//
	// When disabled, invoices automatically progress through the issuing state and are
	// immediately marked as issued.
	EnableIssuingSyncHook bool `json:"enable_issuing_sync_hook"`

	// Id ULID (Universally Unique Lexicographically Sortable Identifier).
	Id ULID `json:"id"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// Status Status of the app connection.
	Status BillingAppStatus `json:"status"`

	// Type The app type.
	Type BillingInstalledAppExternalInvoicingType `json:"type"`

	// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
	UpdatedAt DateTime `json:"updated_at"`
}

BillingInstalledAppExternalInvoicing Response of an installed app.

type BillingInstalledAppExternalInvoicingType

type BillingInstalledAppExternalInvoicingType string

BillingInstalledAppExternalInvoicingType The app type.

const (
	BillingInstalledAppExternalInvoicingTypeExternalInvoicing BillingInstalledAppExternalInvoicingType = "external_invoicing"
)

Defines values for BillingInstalledAppExternalInvoicingType.

func (BillingInstalledAppExternalInvoicingType) Valid

Valid indicates whether the value is a known member of the BillingInstalledAppExternalInvoicingType enum.

type BillingInstalledAppSandbox

type BillingInstalledAppSandbox struct {
	// Actions Actions the operator should take to bring the app up to date. Omitted when no
	// action is required.
	Actions *[]BillingAppAction `json:"actions,omitempty"`

	// CreatedAt An ISO-8601 timestamp representation of entity creation date.
	CreatedAt DateTime `json:"created_at"`

	// DefaultForCapabilityTypes Default capabilities of the installed app.
	DefaultForCapabilityTypes []BillingAppCapabilityType `json:"default_for_capability_types"`

	// Definition The app catalog definition that this installed app is based on.
	Definition BillingAppCatalogItem `json:"definition"`

	// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
	DeletedAt *DateTime `json:"deleted_at,omitempty"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// Id ULID (Universally Unique Lexicographically Sortable Identifier).
	Id ULID `json:"id"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// Status Status of the app connection.
	Status BillingAppStatus `json:"status"`

	// Type The app type.
	Type BillingInstalledAppSandboxType `json:"type"`

	// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
	UpdatedAt DateTime `json:"updated_at"`
}

BillingInstalledAppSandbox Response of an installed app.

type BillingInstalledAppSandboxType

type BillingInstalledAppSandboxType string

BillingInstalledAppSandboxType The app type.

const (
	BillingInstalledAppSandboxTypeSandbox BillingInstalledAppSandboxType = "sandbox"
)

Defines values for BillingInstalledAppSandboxType.

func (BillingInstalledAppSandboxType) Valid

Valid indicates whether the value is a known member of the BillingInstalledAppSandboxType enum.

type BillingInstalledAppStripe

type BillingInstalledAppStripe struct {
	// AccountId The Stripe account ID associated with the connected Stripe account.
	AccountId string `json:"account_id"`

	// Actions Actions the operator should take to bring the app up to date. Omitted when no
	// action is required.
	Actions *[]BillingAppAction `json:"actions,omitempty"`

	// CreatedAt An ISO-8601 timestamp representation of entity creation date.
	CreatedAt DateTime `json:"created_at"`

	// DefaultForCapabilityTypes Default capabilities of the installed app.
	DefaultForCapabilityTypes []BillingAppCapabilityType `json:"default_for_capability_types"`

	// Definition The app catalog definition that this installed app is based on.
	Definition BillingAppCatalogItem `json:"definition"`

	// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
	DeletedAt *DateTime `json:"deleted_at,omitempty"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// Id ULID (Universally Unique Lexicographically Sortable Identifier).
	Id ULID `json:"id"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Livemode Indicates whether the app is connected to a live Stripe account.
	Livemode bool `json:"livemode"`

	// MaskedApiKey The masked Stripe API key that only exposes the first and last few characters.
	MaskedApiKey string `json:"masked_api_key"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// Status Status of the app connection.
	Status BillingAppStatus `json:"status"`

	// Type The app type.
	Type BillingInstalledAppStripeType `json:"type"`

	// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
	UpdatedAt DateTime `json:"updated_at"`
}

BillingInstalledAppStripe Response of an installed app.

type BillingInstalledAppStripeType

type BillingInstalledAppStripeType string

BillingInstalledAppStripeType The app type.

const (
	BillingInstalledAppStripeTypeStripe BillingInstalledAppStripeType = "stripe"
)

Defines values for BillingInstalledAppStripeType.

func (BillingInstalledAppStripeType) Valid

Valid indicates whether the value is a known member of the BillingInstalledAppStripeType enum.

type BillingInvoice

type BillingInvoice struct {
	// contains filtered or unexported fields
}

BillingInvoice An invoice issued to a customer.

The `type` field determines the concrete variant:

- `standard`: a standard invoice for charges owed.

func (BillingInvoice) AsBillingInvoiceStandard

func (t BillingInvoice) AsBillingInvoiceStandard() (BillingInvoiceStandard, error)

AsBillingInvoiceStandard returns the union data inside the BillingInvoice as a BillingInvoiceStandard

func (BillingInvoice) Discriminator

func (t BillingInvoice) Discriminator() (string, error)

func (*BillingInvoice) FromBillingInvoiceStandard

func (t *BillingInvoice) FromBillingInvoiceStandard(v BillingInvoiceStandard) error

FromBillingInvoiceStandard overwrites any union data inside the BillingInvoice as the provided BillingInvoiceStandard

func (BillingInvoice) MarshalJSON

func (t BillingInvoice) MarshalJSON() ([]byte, error)

func (*BillingInvoice) MergeBillingInvoiceStandard

func (t *BillingInvoice) MergeBillingInvoiceStandard(v BillingInvoiceStandard) error

MergeBillingInvoiceStandard performs a merge with any union data inside the BillingInvoice, using the provided BillingInvoiceStandard

func (*BillingInvoice) UnmarshalJSON

func (t *BillingInvoice) UnmarshalJSON(b []byte) error

func (BillingInvoice) ValueByDiscriminator

func (t BillingInvoice) ValueByDiscriminator() (interface{}, error)

type BillingInvoiceAvailableActionDetails

type BillingInvoiceAvailableActionDetails struct {
	// ResultingState The extended status the invoice will transition to after performing this action.
	ResultingState string `json:"resulting_state"`
}

BillingInvoiceAvailableActionDetails Details about an available invoice action including the resulting state.

type BillingInvoiceAvailableActions

type BillingInvoiceAvailableActions struct {
	// Advance Advance the invoice to the next workflow step.
	Advance *BillingInvoiceAvailableActionDetails `json:"advance,omitempty"`

	// Approve Approve the invoice for issuance.
	Approve *BillingInvoiceAvailableActionDetails `json:"approve,omitempty"`

	// Delete Delete the invoice.
	Delete *BillingInvoiceAvailableActionDetails `json:"delete,omitempty"`

	// Retry Retry a failed workflow step.
	Retry *BillingInvoiceAvailableActionDetails `json:"retry,omitempty"`

	// SnapshotQuantities Snapshot the current usage quantities.
	SnapshotQuantities *BillingInvoiceAvailableActionDetails `json:"snapshot_quantities,omitempty"`
}

BillingInvoiceAvailableActions The set of state-transition actions available for an invoice in its current status.

A field is present only when that action is permitted from the current state.

type BillingInvoiceCustomer

type BillingInvoiceCustomer struct {
	// BillingAddress The billing address of the customer. Used for tax and invoicing.
	BillingAddress *Address `json:"billing_address,omitempty"`

	// Id ULID (Universally Unique Lexicographically Sortable Identifier).
	Id ULID `json:"id"`

	// Key Optional external resource key for the customer.
	//
	// Omitted when the customer was created without a key. Unlike on the customer
	// resource itself, the key is optional here because the invoice snapshot may
	// predate or omit it.
	Key *ExternalResourceKey `json:"key,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// UsageAttribution Mapping to attribute metered usage to the customer by the event subject.
	UsageAttribution *BillingCustomerUsageAttribution `json:"usage_attribution,omitempty"`
}

BillingInvoiceCustomer Snapshot of the customer's information at the time the invoice was issued.

type BillingInvoiceDetailedLine

type BillingInvoiceDetailedLine struct {
	// Category The cost category of this detailed line.
	Category BillingInvoiceDetailedLineCostCategory `json:"category"`

	// CreatedAt An ISO-8601 timestamp representation of entity creation date.
	CreatedAt DateTime `json:"created_at"`

	// CreditsApplied Credit applied to this detailed line.
	CreditsApplied *[]BillingInvoiceLineCreditsApplied `json:"credits_applied,omitempty"`

	// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
	DeletedAt *DateTime `json:"deleted_at,omitempty"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// Discounts Discounts applied to this detailed line.
	Discounts *BillingInvoiceLineDiscounts `json:"discounts,omitempty"`

	// ExternalReferences External identifiers for this detailed line.
	ExternalReferences *BillingInvoiceLineExternalReferences `json:"external_references,omitempty"`
	Id                 ULID                                  `json:"id"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// Quantity The quantity of the detailed line.
	Quantity Numeric `json:"quantity"`

	// ServicePeriod The service period covered by this detailed line.
	ServicePeriod ClosedPeriod `json:"service_period"`

	// Totals Aggregated financial totals for the detailed line.
	Totals BillingTotals `json:"totals"`

	// UnitPrice The unit price of the detailed line.
	UnitPrice Numeric `json:"unit_price"`

	// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
	UpdatedAt DateTime `json:"updated_at"`
}

BillingInvoiceDetailedLine A detailed (child) sub-line belonging to a parent invoice line.

Detailed lines represent the individual flat-fee components that make up a usage-based parent line after quantity snapshotting.

type BillingInvoiceDetailedLineCostCategory

type BillingInvoiceDetailedLineCostCategory string

BillingInvoiceDetailedLineCostCategory Cost category of a detailed invoice line item.

const (
	BillingInvoiceDetailedLineCostCategoryCommitment BillingInvoiceDetailedLineCostCategory = "commitment"
	BillingInvoiceDetailedLineCostCategoryRegular    BillingInvoiceDetailedLineCostCategory = "regular"
)

Defines values for BillingInvoiceDetailedLineCostCategory.

func (BillingInvoiceDetailedLineCostCategory) Valid

Valid indicates whether the value is a known member of the BillingInvoiceDetailedLineCostCategory enum.

type BillingInvoiceDiscountReason

type BillingInvoiceDiscountReason string

BillingInvoiceDiscountReason The reason a discount was applied to an invoice line.

const (
	BillingInvoiceDiscountReasonMaximumSpend       BillingInvoiceDiscountReason = "maximum_spend"
	BillingInvoiceDiscountReasonRatecardPercentage BillingInvoiceDiscountReason = "ratecard_percentage"
	BillingInvoiceDiscountReasonRatecardUsage      BillingInvoiceDiscountReason = "ratecard_usage"
)

Defines values for BillingInvoiceDiscountReason.

func (BillingInvoiceDiscountReason) Valid

Valid indicates whether the value is a known member of the BillingInvoiceDiscountReason enum.

type BillingInvoiceExternalReferences

type BillingInvoiceExternalReferences struct {
	// InvoicingId The ID assigned by the external invoicing app (e.g. Stripe invoice ID).
	InvoicingId *string `json:"invoicing_id,omitempty"`

	// PaymentId The ID assigned by the external payment app (e.g. Stripe payment intent ID).
	PaymentId *string `json:"payment_id,omitempty"`
}

BillingInvoiceExternalReferences External identifiers assigned to an invoice by third-party systems.

type BillingInvoiceLine

type BillingInvoiceLine struct {
	// contains filtered or unexported fields
}

BillingInvoiceLine A top-level line item on an invoice.

Each line represents a single charge, typically associated with a rate card from a subscription. Detailed (child) lines are nested under `detailed_lines` when present.

func (BillingInvoiceLine) AsBillingInvoiceStandardLine

func (t BillingInvoiceLine) AsBillingInvoiceStandardLine() (BillingInvoiceStandardLine, error)

AsBillingInvoiceStandardLine returns the union data inside the BillingInvoiceLine as a BillingInvoiceStandardLine

func (BillingInvoiceLine) Discriminator

func (t BillingInvoiceLine) Discriminator() (string, error)

func (*BillingInvoiceLine) FromBillingInvoiceStandardLine

func (t *BillingInvoiceLine) FromBillingInvoiceStandardLine(v BillingInvoiceStandardLine) error

FromBillingInvoiceStandardLine overwrites any union data inside the BillingInvoiceLine as the provided BillingInvoiceStandardLine

func (BillingInvoiceLine) MarshalJSON

func (t BillingInvoiceLine) MarshalJSON() ([]byte, error)

func (*BillingInvoiceLine) MergeBillingInvoiceStandardLine

func (t *BillingInvoiceLine) MergeBillingInvoiceStandardLine(v BillingInvoiceStandardLine) error

MergeBillingInvoiceStandardLine performs a merge with any union data inside the BillingInvoiceLine, using the provided BillingInvoiceStandardLine

func (*BillingInvoiceLine) UnmarshalJSON

func (t *BillingInvoiceLine) UnmarshalJSON(b []byte) error

func (BillingInvoiceLine) ValueByDiscriminator

func (t BillingInvoiceLine) ValueByDiscriminator() (interface{}, error)

type BillingInvoiceLineAmountDiscount

type BillingInvoiceLineAmountDiscount struct {
	// Amount The monetary amount deducted.
	Amount Numeric `json:"amount"`

	// Description Optional human-readable description of the discount.
	Description *string `json:"description,omitempty"`

	// ExternalReferences External identifiers for this discount.
	ExternalReferences *BillingInvoiceLineExternalReferences `json:"external_references,omitempty"`

	// Id Unique identifier for the discount.
	Id ULID `json:"id"`

	// Reason The reason this discount was applied.
	Reason BillingInvoiceDiscountReason `json:"reason"`
}

BillingInvoiceLineAmountDiscount A monetary amount discount applied to an invoice line item.

type BillingInvoiceLineCreditsApplied

type BillingInvoiceLineCreditsApplied struct {
	// Amount The monetary amount credited.
	Amount Numeric `json:"amount"`

	// Description Optional human-readable description of the credit allocation.
	Description *string `json:"description,omitempty"`
}

BillingInvoiceLineCreditsApplied A credit allocation applied to an invoice line item.

type BillingInvoiceLineDiscounts

type BillingInvoiceLineDiscounts struct {
	// Amount Monetary amount discounts (e.g. from maximum spend commitments).
	Amount *[]BillingInvoiceLineAmountDiscount `json:"amount,omitempty"`

	// Usage Usage quantity discounts (e.g. free tier usage allowances).
	Usage *[]BillingInvoiceLineUsageDiscount `json:"usage,omitempty"`
}

BillingInvoiceLineDiscounts Discounts applied to an invoice line item.

type BillingInvoiceLineExternalReferences

type BillingInvoiceLineExternalReferences struct {
	// InvoicingId The ID assigned by the external invoicing app.
	InvoicingId *string `json:"invoicing_id,omitempty"`
}

BillingInvoiceLineExternalReferences External identifiers for an invoice line item assigned by third-party systems.

type BillingInvoiceLineRateCard

type BillingInvoiceLineRateCard struct {
	// Discounts Discount configuration from the rate card.
	Discounts *BillingRateCardDiscounts `json:"discounts,omitempty"`

	// FeatureKey The feature key associated with this line's rate card.
	FeatureKey *ResourceKey `json:"feature_key,omitempty"`

	// Price The price definition used to calculate charges for this line.
	Price BillingPrice `json:"price"`

	// TaxConfig Tax configuration snapshot for this line.
	TaxConfig *TaxCodeConfig `json:"tax_config,omitempty"`

	// UnitConfig Unit config snapshot applied when this line was billed, converting the raw
	// metered quantity into the billed quantity. Frozen at billing time; read-only.
	UnitConfig *BillingUnitConfig `json:"unit_config,omitempty"`
}

BillingInvoiceLineRateCard Rate card configuration snapshot for a usage-based invoice line.

type BillingInvoiceLineUsageDiscount

type BillingInvoiceLineUsageDiscount struct {
	// Description Optional human-readable description of the discount.
	Description *string `json:"description,omitempty"`

	// ExternalReferences External identifiers for this discount.
	ExternalReferences *BillingInvoiceLineExternalReferences `json:"external_references,omitempty"`

	// Id Unique identifier for the discount.
	Id ULID `json:"id"`

	// Quantity The usage quantity deducted (in billing units).
	Quantity Numeric `json:"quantity"`

	// Reason The reason this discount was applied.
	Reason BillingInvoiceDiscountReason `json:"reason"`
}

BillingInvoiceLineUsageDiscount A usage quantity discount applied to an invoice line item.

type BillingInvoiceNumber

type BillingInvoiceNumber = string

BillingInvoiceNumber InvoiceNumber is a unique identifier for the invoice, generated by the invoicing app.

The uniqueness depends on a lot of factors:

- app setting (unique per app or unique per customer) - multiple app scenarios (multiple apps generating invoices with the same prefix)

type BillingInvoiceStandard

type BillingInvoiceStandard struct {
	// CollectionAt Timestamp when collection was initiated for this invoice.
	CollectionAt *DateTime `json:"collection_at,omitempty"`

	// CreatedAt An ISO-8601 timestamp representation of entity creation date.
	CreatedAt DateTime `json:"created_at"`

	// Currency Three-letter ISO 4217 currency code for the invoice.
	Currency CurrencyCode `json:"currency"`

	// Customer Snapshot of the customer's information at the time the invoice was issued.
	Customer BillingInvoiceCustomer `json:"customer"`

	// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
	DeletedAt *DateTime `json:"deleted_at,omitempty"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// DraftUntil Timestamp until which the invoice remains in draft state.
	//
	// The invoice advances automatically once this time is reached.
	DraftUntil *DateTime `json:"draft_until,omitempty"`

	// DueAt Timestamp when payment is due.
	DueAt *DateTime `json:"due_at,omitempty"`

	// ExternalReferences External identifiers assigned to this invoice by third-party systems.
	ExternalReferences *BillingInvoiceExternalReferences `json:"external_references,omitempty"`
	Id                 ULID                              `json:"id"`

	// IssuedAt Timestamp when the invoice was issued to the customer.
	IssuedAt *DateTime `json:"issued_at,omitempty"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Lines Line items on this invoice.
	//
	// Always returned on single-resource GET; omitted on list endpoints unless
	// explicitly expanded. Editable via update: existing lines are matched by `id`,
	// lines without an `id` are created, and lines present on the invoice but omitted
	// from the update request are deleted. Detailed (child) lines are always computed
	// and cannot be edited directly.
	Lines *[]BillingInvoiceLine `json:"lines,omitempty"`

	// Number Human-readable invoice number generated by the invoicing app.
	Number BillingInvoiceNumber `json:"number"`

	// QuantitySnapshottedAt Timestamp when usage quantities were last snapshotted for this invoice.
	QuantitySnapshottedAt *DateTime `json:"quantity_snapshotted_at,omitempty"`

	// SentToCustomerAt Timestamp when the invoice was sent to the customer.
	SentToCustomerAt *DateTime `json:"sent_to_customer_at,omitempty"`

	// ServicePeriod The service period covered by this invoice.
	//
	// For flat fee the service period can be empty which means `from` will be equals
	// to `to`. In other cases those fields will be filled with the actual service
	// period.
	ServicePeriod ClosedPeriod `json:"service_period"`

	// Status Current lifecycle status of the invoice.
	Status BillingInvoiceStandardStatus `json:"status"`

	// StatusDetails Detailed status information including available actions and workflow state.
	StatusDetails BillingInvoiceStatusDetails `json:"status_details"`

	// Supplier Snapshot of the supplier's contact information at the time the invoice was
	// issued.
	Supplier BillingSupplier `json:"supplier"`

	// Totals Aggregated financial totals for the invoice.
	Totals BillingTotals `json:"totals"`

	// Type Discriminator field identifying this as a standard invoice.
	Type BillingInvoiceStandardType `json:"type"`

	// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
	UpdatedAt DateTime `json:"updated_at"`

	// ValidationIssues Validation issues found during invoice processing.
	//
	// Present only when there are one or more validation findings. An empty list is
	// omitted.
	ValidationIssues *[]BillingValidationIssue `json:"validation_issues,omitempty"`

	// Workflow Workflow configuration snapshot captured at invoice creation time.
	Workflow BillingInvoiceWorkflowSettings `json:"workflow"`
}

BillingInvoiceStandard A standard invoice for charges owed by the customer.

type BillingInvoiceStandardLine

type BillingInvoiceStandardLine struct {
	// Charge Reference to the charge associated with this line item.
	Charge *BillingChargeReference `json:"charge,omitempty"`

	// CreatedAt An ISO-8601 timestamp representation of entity creation date.
	CreatedAt DateTime `json:"created_at"`

	// CreditsApplied Credit applied to this line item.
	CreditsApplied *[]BillingInvoiceLineCreditsApplied `json:"credits_applied,omitempty"`

	// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
	DeletedAt *DateTime `json:"deleted_at,omitempty"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// DetailedLines Detailed sub-lines that this line has been broken down into.
	//
	// Present when line has individual details.
	DetailedLines []BillingInvoiceDetailedLine `json:"detailed_lines"`

	// Discounts Discounts applied to this line item.
	Discounts *BillingInvoiceLineDiscounts `json:"discounts,omitempty"`

	// ExternalReferences External identifiers for this line item assigned by third-party systems.
	ExternalReferences *BillingInvoiceLineExternalReferences `json:"external_references,omitempty"`

	// Id ID of the line.
	//
	// Optional on update: omit to create a new line, or supply the ID of an existing
	// line to edit it. Existing lines omitted from an update's `lines` array are
	// deleted.
	Id *ULID `json:"id,omitempty"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// LifecycleController Indicates whether this line item's lifecycle is controlled by OpenMeter or
	// manually overridden by the API user.
	LifecycleController BillingLifecycleController `json:"lifecycle_controller"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// RateCard The rate card configuration snapshot used to price this line item.
	RateCard BillingInvoiceLineRateCard `json:"rate_card"`

	// ServicePeriod The service period covered by this invoice, spanning the earliest line start to
	// the latest line end across all of its lines.
	//
	// For an invoice with no lines the period is empty, which means `from` will be
	// equal to `to`.
	ServicePeriod ClosedPeriod `json:"service_period"`

	// Subscription Reference to the subscription item that generated this line.
	Subscription *BillingSubscriptionReference `json:"subscription,omitempty"`

	// Totals Aggregated financial totals for the line item.
	Totals BillingTotals `json:"totals"`

	// Type The type of charge this line item represents.
	Type BillingInvoiceStandardLineType `json:"type"`

	// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
	UpdatedAt DateTime `json:"updated_at"`

	// UsageQuantityDetail Usage quantity details for this line when UnitConfig is in effect.
	//
	// Read-only; omitted for lines without unit conversion.
	UsageQuantityDetail *BillingInvoiceUsageQuantityDetail `json:"usage_quantity_detail,omitempty"`
}

BillingInvoiceStandardLine A top-level line item on an invoice.

Each line represents a single charge, typically associated with a rate card from a subscription. Detailed (child) lines are nested under `detailed_lines` when present.

type BillingInvoiceStandardLineType

type BillingInvoiceStandardLineType string

BillingInvoiceStandardLineType The type of charge this line item represents.

const (
	BillingInvoiceStandardLineTypeStandardLine BillingInvoiceStandardLineType = "standard_line"
)

Defines values for BillingInvoiceStandardLineType.

func (BillingInvoiceStandardLineType) Valid

Valid indicates whether the value is a known member of the BillingInvoiceStandardLineType enum.

type BillingInvoiceStandardStatus

type BillingInvoiceStandardStatus string

BillingInvoiceStandardStatus Lifecycle status of a standard invoice.

const (
	BillingInvoiceStandardStatusDraft             BillingInvoiceStandardStatus = "draft"
	BillingInvoiceStandardStatusIssued            BillingInvoiceStandardStatus = "issued"
	BillingInvoiceStandardStatusIssuing           BillingInvoiceStandardStatus = "issuing"
	BillingInvoiceStandardStatusOverdue           BillingInvoiceStandardStatus = "overdue"
	BillingInvoiceStandardStatusPaid              BillingInvoiceStandardStatus = "paid"
	BillingInvoiceStandardStatusPaymentProcessing BillingInvoiceStandardStatus = "payment_processing"
	BillingInvoiceStandardStatusUncollectible     BillingInvoiceStandardStatus = "uncollectible"
	BillingInvoiceStandardStatusVoided            BillingInvoiceStandardStatus = "voided"
)

Defines values for BillingInvoiceStandardStatus.

func (BillingInvoiceStandardStatus) Valid

Valid indicates whether the value is a known member of the BillingInvoiceStandardStatus enum.

type BillingInvoiceStandardType

type BillingInvoiceStandardType string

BillingInvoiceStandardType Discriminator field identifying this as a standard invoice.

const (
	BillingInvoiceStandardTypeStandard BillingInvoiceStandardType = "standard"
)

Defines values for BillingInvoiceStandardType.

func (BillingInvoiceStandardType) Valid

func (e BillingInvoiceStandardType) Valid() bool

Valid indicates whether the value is a known member of the BillingInvoiceStandardType enum.

type BillingInvoiceStatusDetails

type BillingInvoiceStatusDetails struct {
	// AvailableActions The set of state-transition actions currently available for this invoice.
	AvailableActions BillingInvoiceAvailableActions `json:"available_actions"`

	// ExtendedStatus Fine-grained internal status string providing additional workflow detail beyond
	// the top-level status enum.
	ExtendedStatus string `json:"extended_status"`

	// Failed Whether the invoice is in a failed state.
	Failed bool `json:"failed"`

	// Immutable Whether the invoice is immutable (i.e. cannot be modified or deleted).
	Immutable bool `json:"immutable"`
}

BillingInvoiceStatusDetails Detailed status information for a standard invoice.

type BillingInvoiceUsageQuantityDetail

type BillingInvoiceUsageQuantityDetail struct {
	// DisplayUnit The display unit label (e.g., "GB", "hours", "M tokens").
	DisplayUnit *string `json:"display_unit,omitempty"`

	// InvoicedQuantity The net billed quantity for this line in converted units, after rounding and any
	// usage discounts.
	InvoicedQuantity Numeric `json:"invoiced_quantity"`

	// RawQuantity The raw quantity as reported by the meter (native units).
	RawQuantity Numeric `json:"raw_quantity"`
}

BillingInvoiceUsageQuantityDetail Usage quantity details on an invoice line item when UnitConfig is in effect.

Provides the full audit trail from raw meter output to the invoiced amount.

type BillingInvoiceWorkflow

type BillingInvoiceWorkflow struct {
	// Invoicing Invoicing settings for this invoice.
	Invoicing *BillingInvoiceWorkflowInvoicingSettings `json:"invoicing,omitempty"`

	// Payment Payment settings for this invoice.
	Payment *BillingWorkflowPaymentSettings `json:"payment,omitempty"`
}

BillingInvoiceWorkflow Invoice-level snapshot of the workflow configuration.

Contains only the settings that are meaningful for an already-created invoice: invoicing behaviour and payment settings. Collection alignment and tax policy are gather-time / profile-wide concerns and are not included.

type BillingInvoiceWorkflowAppsReferences

type BillingInvoiceWorkflowAppsReferences struct {
	// Invoicing The invoicing app used for this workflow
	Invoicing BillingAppReference `json:"invoicing"`

	// Payment The payment app used for this workflow
	Payment BillingAppReference `json:"payment"`

	// Tax The tax app used for this workflow
	Tax BillingAppReference `json:"tax"`
}

BillingInvoiceWorkflowAppsReferences BillingInvoiceWorkflowAppsReferences represents the references (id) to the apps used by a billing profile

type BillingInvoiceWorkflowInvoicingSettings

type BillingInvoiceWorkflowInvoicingSettings struct {
	// AutoAdvance Whether to automatically issue the invoice after the draft_period has passed.
	AutoAdvance *bool `json:"auto_advance,omitempty"`

	// DraftPeriod The period for the invoice to be kept in draft status for manual reviews.
	DraftPeriod *string `json:"draft_period,omitempty"`

	// DueAfter The period after which the invoice is considered overdue if not paid.
	DueAfter *string `json:"due_after,omitempty"`
}

BillingInvoiceWorkflowInvoicingSettings Invoice-level invoicing settings.

A subset of BillingWorkflowInvoicingSettings limited to fields that are meaningful per-invoice. progressive_billing is omitted as it is a gather-time / profile-level decision.

type BillingInvoiceWorkflowSettings

type BillingInvoiceWorkflowSettings struct {
	// Apps The apps that will be used to orchestrate the invoice's workflow.
	Apps *BillingInvoiceWorkflowAppsReferences `json:"apps,omitempty"`

	// SourceBillingProfile The billing profile that was the source of this workflow snapshot.
	SourceBillingProfile BillingProfileReference `json:"source_billing_profile"`

	// Workflow The workflow configuration that was active when the invoice was created.
	//
	// Only the fields that are meaningful at the per-invoice level are included:
	// invoicing behaviour (auto-advance, draft period) and payment settings
	// (collection method, due date). Profile-wide settings such as collection
	// alignment, progressive billing, and tax policy are omitted.
	Workflow BillingInvoiceWorkflow `json:"workflow"`
}

BillingInvoiceWorkflowSettings Snapshot of the billing workflow configuration captured at invoice creation.

type BillingLifecycleController

type BillingLifecycleController string

BillingLifecycleController Identifies whether a resource lifecycle is controlled by OpenMeter or manually overridden by the API user.

Values:

- `system`: The resource lifecycle is controlled by OpenMeter. - `manual`: The resource lifecycle was manually overridden by the API user.

const (
	BillingLifecycleControllerManual BillingLifecycleController = "manual"
	BillingLifecycleControllerSystem BillingLifecycleController = "system"
)

Defines values for BillingLifecycleController.

func (BillingLifecycleController) Valid

func (e BillingLifecycleController) Valid() bool

Valid indicates whether the value is a known member of the BillingLifecycleController enum.

type BillingNotificationBalanceThreshold

type BillingNotificationBalanceThreshold struct {
	// Type What the threshold value is measured against.
	Type BillingNotificationBalanceThresholdType `json:"type"`

	// Value The threshold value.
	Value float64 `json:"value"`
}

BillingNotificationBalanceThreshold A balance threshold of a notification rule. Crossing it generates an `entitlements.balance.threshold` event.

type BillingNotificationBalanceThresholdType

type BillingNotificationBalanceThresholdType string

BillingNotificationBalanceThresholdType What a balance threshold is measured against.

const (
	BillingNotificationBalanceThresholdTypeBalanceValue    BillingNotificationBalanceThresholdType = "balance_value"
	BillingNotificationBalanceThresholdTypeUsagePercentage BillingNotificationBalanceThresholdType = "usage_percentage"
	BillingNotificationBalanceThresholdTypeUsageValue      BillingNotificationBalanceThresholdType = "usage_value"
)

Defines values for BillingNotificationBalanceThresholdType.

func (BillingNotificationBalanceThresholdType) Valid

Valid indicates whether the value is a known member of the BillingNotificationBalanceThresholdType enum.

type BillingNotificationChannel

type BillingNotificationChannel struct {
	// CreatedAt An ISO-8601 timestamp representation of entity creation date.
	CreatedAt DateTime `json:"created_at"`

	// CustomHeaders Custom HTTP headers to include on every webhook delivery request, keyed by
	// header name.
	CustomHeaders *map[string]string `json:"custom_headers,omitempty"`

	// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
	DeletedAt *DateTime `json:"deleted_at,omitempty"`

	// Disabled Whether the channel is disabled. Disabled channels do not receive notification
	// events.
	Disabled *bool `json:"disabled,omitempty"`
	Id       ULID  `json:"id"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// SigningSecret Secret used to sign outgoing webhook payloads so recipients can verify their
	// authenticity. If omitted on create, a secret is generated automatically by the
	// delivery provider. This is a sensitive credential returned in responses (unlike
	// most secrets) specifically so clients can retrieve a server-generated value and
	// verify webhook signatures; handle it with the same care as any other credential.
	SigningSecret *string `json:"signing_secret,omitempty"`

	// Type The type of the channel. Immutable after creation.
	Type BillingNotificationChannelType `json:"type"`

	// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
	UpdatedAt DateTime `json:"updated_at"`

	// Url The URL that webhook notification events are delivered to.
	Url string `json:"url"`
}

BillingNotificationChannel A notification channel delivers notification events, such as entitlement balance threshold crossings, to an external system. Today the only supported channel type is a webhook delivered via Svix.

type BillingNotificationChannelType

type BillingNotificationChannelType string

BillingNotificationChannelType The type of a notification channel.

Currently the only supported channel type is `webhook`; the domain model anticipates additional channel types (e.g. email, Slack) in the future, so this is modeled as an enum rather than a boolean/constant even though it has a single member today.

const (
	BillingNotificationChannelTypeWebhook BillingNotificationChannelType = "webhook"
)

Defines values for BillingNotificationChannelType.

func (BillingNotificationChannelType) Valid

Valid indicates whether the value is a known member of the BillingNotificationChannelType enum.

type BillingNotificationEvent

type BillingNotificationEvent struct {
	// CreatedAt When the event was generated.
	CreatedAt DateTime `json:"created_at"`

	// DeliveryStatus The delivery status of the event, one entry per channel of the rule.
	DeliveryStatus []BillingNotificationEventDeliveryStatus `json:"delivery_status"`

	// Id The unique identifier of the event.
	Id ULID `json:"id"`

	// Payload The payload delivered to the channels.
	Payload BillingNotificationEventPayload `json:"payload"`

	// Rule The rule that generated the event.
	Rule BillingNotificationRuleReference `json:"rule"`

	// Type The type of the event.
	Type BillingNotificationEventType `json:"type"`
}

BillingNotificationEvent A notification event records that a notification rule fired and tracks the delivery of its payload to each channel of the rule. Events are created by the system and cannot be modified.

type BillingNotificationEventBalanceThresholdData

type BillingNotificationEventBalanceThresholdData struct {
	// CustomerId The identifier of the customer the subject belongs to, if any.
	CustomerId *ULID `json:"customer_id,omitempty"`

	// EntitlementId The identifier of the entitlement that triggered the event.
	EntitlementId ULID `json:"entitlement_id"`

	// Feature The feature the entitlement grants access to.
	Feature BillingNotificationEventFeatureReference `json:"feature"`

	// SubjectKey The key of the subject the entitlement belongs to.
	SubjectKey string `json:"subject_key"`

	// Threshold The threshold the balance crossed.
	Threshold BillingNotificationBalanceThreshold `json:"threshold"`

	// Value The entitlement value at the time the event was generated.
	Value BillingEntitlementValueResult `json:"value"`
}

BillingNotificationEventBalanceThresholdData The entities and threshold a balance threshold event refers to.

type BillingNotificationEventBalanceThresholdPayload

type BillingNotificationEventBalanceThresholdPayload struct {
	// Data The entities and threshold the event refers to.
	Data BillingNotificationEventBalanceThresholdData `json:"data"`

	// Id The identifier of the event the payload belongs to.
	Id ULID `json:"id"`

	// Timestamp When the event was generated.
	Timestamp DateTime `json:"timestamp"`

	// Type The type of the event.
	Type BillingNotificationEventBalanceThresholdPayloadType `json:"type"`
}

BillingNotificationEventBalanceThresholdPayload A balance threshold notification event payload.

type BillingNotificationEventBalanceThresholdPayloadType

type BillingNotificationEventBalanceThresholdPayloadType string

BillingNotificationEventBalanceThresholdPayloadType The type of the event.

const (
	BillingNotificationEventBalanceThresholdPayloadTypeEntitlementsBalanceThreshold BillingNotificationEventBalanceThresholdPayloadType = "entitlements.balance.threshold"
)

Defines values for BillingNotificationEventBalanceThresholdPayloadType.

func (BillingNotificationEventBalanceThresholdPayloadType) Valid

Valid indicates whether the value is a known member of the BillingNotificationEventBalanceThresholdPayloadType enum.

type BillingNotificationEventDeliveryAttempt

type BillingNotificationEventDeliveryAttempt struct {
	// Response The response returned by the recipient.
	Response BillingNotificationEventDeliveryAttemptResponse `json:"response"`

	// State The delivery state reached by this attempt.
	State BillingNotificationEventDeliveryState `json:"state"`

	// Timestamp When the attempt was made.
	Timestamp DateTime `json:"timestamp"`
}

BillingNotificationEventDeliveryAttempt A single delivery attempt to a channel.

type BillingNotificationEventDeliveryAttemptResponse

type BillingNotificationEventDeliveryAttemptResponse struct {
	// Body The response body returned by the recipient. Empty when no body was received.
	Body string `json:"body"`

	// DurationMs How long the delivery attempt took, in milliseconds.
	DurationMs int64 `json:"duration_ms"`

	// StatusCode The HTTP status code returned by the recipient. Absent when no response was
	// received.
	StatusCode *int32 `json:"status_code,omitempty"`

	// Url The URL the event was delivered to. Only set for webhook channels.
	Url *string `json:"url,omitempty"`
}

BillingNotificationEventDeliveryAttemptResponse The response the recipient returned for a delivery attempt. For webhook channels this is the HTTP response.

type BillingNotificationEventDeliveryState

type BillingNotificationEventDeliveryState string

BillingNotificationEventDeliveryState The delivery state of a notification event for a single channel.

const (
	BillingNotificationEventDeliveryStateFailed    BillingNotificationEventDeliveryState = "failed"
	BillingNotificationEventDeliveryStatePending   BillingNotificationEventDeliveryState = "pending"
	BillingNotificationEventDeliveryStateResending BillingNotificationEventDeliveryState = "resending"
	BillingNotificationEventDeliveryStateSending   BillingNotificationEventDeliveryState = "sending"
	BillingNotificationEventDeliveryStateSuccess   BillingNotificationEventDeliveryState = "success"
)

Defines values for BillingNotificationEventDeliveryState.

func (BillingNotificationEventDeliveryState) Valid

Valid indicates whether the value is a known member of the BillingNotificationEventDeliveryState enum.

type BillingNotificationEventDeliveryStatus

type BillingNotificationEventDeliveryStatus struct {
	// Attempts The delivery attempts made so far, most recent first.
	Attempts []BillingNotificationEventDeliveryAttempt `json:"attempts"`

	// ChannelId The identifier of the channel this delivery status belongs to.
	ChannelId ULID `json:"channel_id"`

	// NextAttempt When the next delivery attempt is scheduled. Absent when no further attempts
	// will be made.
	NextAttempt *DateTime `json:"next_attempt,omitempty"`

	// Reason The reason for the last state change. Empty for successful deliveries.
	Reason string `json:"reason"`

	// State The current delivery state.
	State BillingNotificationEventDeliveryState `json:"state"`

	// UpdatedAt When the delivery state was last updated.
	UpdatedAt DateTime `json:"updated_at"`
}

BillingNotificationEventDeliveryStatus The delivery status of a notification event for one channel of the generating rule.

type BillingNotificationEventEntitlementData

type BillingNotificationEventEntitlementData struct {
	// CustomerId The identifier of the customer the subject belongs to, if any.
	CustomerId *ULID `json:"customer_id,omitempty"`

	// EntitlementId The identifier of the entitlement that triggered the event.
	EntitlementId ULID `json:"entitlement_id"`

	// Feature The feature the entitlement grants access to.
	Feature BillingNotificationEventFeatureReference `json:"feature"`

	// SubjectKey The key of the subject the entitlement belongs to.
	SubjectKey string `json:"subject_key"`

	// Value The entitlement value at the time the event was generated.
	Value BillingEntitlementValueResult `json:"value"`
}

BillingNotificationEventEntitlementData The entitlement, feature, and subject an entitlement notification event refers to.

type BillingNotificationEventFeatureReference

type BillingNotificationEventFeatureReference struct {
	// Id The unique identifier of the feature.
	Id ULID `json:"id"`

	// Key The immutable key of the feature.
	Key string `json:"key"`
}

BillingNotificationEventFeatureReference A reference to the feature of an entitlement notification event.

type BillingNotificationEventInvoiceCreatedPayload

type BillingNotificationEventInvoiceCreatedPayload struct {
	// Data The invoice the event refers to.
	Data BillingNotificationEventInvoiceData `json:"data"`

	// Id The identifier of the event the payload belongs to.
	Id ULID `json:"id"`

	// Timestamp When the event was generated.
	Timestamp DateTime `json:"timestamp"`

	// Type The type of the event.
	Type BillingNotificationEventInvoiceCreatedPayloadType `json:"type"`
}

BillingNotificationEventInvoiceCreatedPayload An invoice created notification event payload.

type BillingNotificationEventInvoiceCreatedPayloadType

type BillingNotificationEventInvoiceCreatedPayloadType string

BillingNotificationEventInvoiceCreatedPayloadType The type of the event.

const (
	BillingNotificationEventInvoiceCreatedPayloadTypeInvoiceCreated BillingNotificationEventInvoiceCreatedPayloadType = "invoice.created"
)

Defines values for BillingNotificationEventInvoiceCreatedPayloadType.

func (BillingNotificationEventInvoiceCreatedPayloadType) Valid

Valid indicates whether the value is a known member of the BillingNotificationEventInvoiceCreatedPayloadType enum.

type BillingNotificationEventInvoiceData

type BillingNotificationEventInvoiceData struct {
	// Currency The currency the invoice is denominated in.
	Currency CurrencyCode `json:"currency"`

	// CustomerId The identifier of the customer the invoice was issued to.
	CustomerId *ULID `json:"customer_id,omitempty"`

	// Invoice The invoice the event was generated for.
	Invoice BillingNotificationEventInvoiceReference `json:"invoice"`

	// Status The status of the invoice at the time the event was generated.
	Status string `json:"status"`

	// Total The invoice total, including taxes, at the time the event was generated.
	Total Numeric `json:"total"`
}

BillingNotificationEventInvoiceData The invoice an invoice notification event refers to.

type BillingNotificationEventInvoiceReference

type BillingNotificationEventInvoiceReference struct {
	// Id The unique identifier of the invoice.
	Id ULID `json:"id"`

	// Number The human-readable invoice number.
	Number string `json:"number"`
}

BillingNotificationEventInvoiceReference A reference to the invoice of an invoice notification event.

type BillingNotificationEventInvoiceUpdatedPayload

type BillingNotificationEventInvoiceUpdatedPayload struct {
	// Data The invoice the event refers to.
	Data BillingNotificationEventInvoiceData `json:"data"`

	// Id The identifier of the event the payload belongs to.
	Id ULID `json:"id"`

	// Timestamp When the event was generated.
	Timestamp DateTime `json:"timestamp"`

	// Type The type of the event.
	Type BillingNotificationEventInvoiceUpdatedPayloadType `json:"type"`
}

BillingNotificationEventInvoiceUpdatedPayload An invoice updated notification event payload.

type BillingNotificationEventInvoiceUpdatedPayloadType

type BillingNotificationEventInvoiceUpdatedPayloadType string

BillingNotificationEventInvoiceUpdatedPayloadType The type of the event.

const (
	BillingNotificationEventInvoiceUpdatedPayloadTypeInvoiceUpdated BillingNotificationEventInvoiceUpdatedPayloadType = "invoice.updated"
)

Defines values for BillingNotificationEventInvoiceUpdatedPayloadType.

func (BillingNotificationEventInvoiceUpdatedPayloadType) Valid

Valid indicates whether the value is a known member of the BillingNotificationEventInvoiceUpdatedPayloadType enum.

type BillingNotificationEventPayload

type BillingNotificationEventPayload struct {
	// contains filtered or unexported fields
}

BillingNotificationEventPayload The payload delivered to the channels, discriminated by the event type.

func (BillingNotificationEventPayload) AsBillingNotificationEventBalanceThresholdPayload

func (t BillingNotificationEventPayload) AsBillingNotificationEventBalanceThresholdPayload() (BillingNotificationEventBalanceThresholdPayload, error)

AsBillingNotificationEventBalanceThresholdPayload returns the union data inside the BillingNotificationEventPayload as a BillingNotificationEventBalanceThresholdPayload

func (BillingNotificationEventPayload) AsBillingNotificationEventInvoiceCreatedPayload

func (t BillingNotificationEventPayload) AsBillingNotificationEventInvoiceCreatedPayload() (BillingNotificationEventInvoiceCreatedPayload, error)

AsBillingNotificationEventInvoiceCreatedPayload returns the union data inside the BillingNotificationEventPayload as a BillingNotificationEventInvoiceCreatedPayload

func (BillingNotificationEventPayload) AsBillingNotificationEventInvoiceUpdatedPayload

func (t BillingNotificationEventPayload) AsBillingNotificationEventInvoiceUpdatedPayload() (BillingNotificationEventInvoiceUpdatedPayload, error)

AsBillingNotificationEventInvoiceUpdatedPayload returns the union data inside the BillingNotificationEventPayload as a BillingNotificationEventInvoiceUpdatedPayload

func (BillingNotificationEventPayload) AsBillingNotificationEventResetPayload

func (t BillingNotificationEventPayload) AsBillingNotificationEventResetPayload() (BillingNotificationEventResetPayload, error)

AsBillingNotificationEventResetPayload returns the union data inside the BillingNotificationEventPayload as a BillingNotificationEventResetPayload

func (BillingNotificationEventPayload) Discriminator

func (t BillingNotificationEventPayload) Discriminator() (string, error)

func (*BillingNotificationEventPayload) FromBillingNotificationEventBalanceThresholdPayload

func (t *BillingNotificationEventPayload) FromBillingNotificationEventBalanceThresholdPayload(v BillingNotificationEventBalanceThresholdPayload) error

FromBillingNotificationEventBalanceThresholdPayload overwrites any union data inside the BillingNotificationEventPayload as the provided BillingNotificationEventBalanceThresholdPayload

func (*BillingNotificationEventPayload) FromBillingNotificationEventInvoiceCreatedPayload

func (t *BillingNotificationEventPayload) FromBillingNotificationEventInvoiceCreatedPayload(v BillingNotificationEventInvoiceCreatedPayload) error

FromBillingNotificationEventInvoiceCreatedPayload overwrites any union data inside the BillingNotificationEventPayload as the provided BillingNotificationEventInvoiceCreatedPayload

func (*BillingNotificationEventPayload) FromBillingNotificationEventInvoiceUpdatedPayload

func (t *BillingNotificationEventPayload) FromBillingNotificationEventInvoiceUpdatedPayload(v BillingNotificationEventInvoiceUpdatedPayload) error

FromBillingNotificationEventInvoiceUpdatedPayload overwrites any union data inside the BillingNotificationEventPayload as the provided BillingNotificationEventInvoiceUpdatedPayload

func (*BillingNotificationEventPayload) FromBillingNotificationEventResetPayload

func (t *BillingNotificationEventPayload) FromBillingNotificationEventResetPayload(v BillingNotificationEventResetPayload) error

FromBillingNotificationEventResetPayload overwrites any union data inside the BillingNotificationEventPayload as the provided BillingNotificationEventResetPayload

func (BillingNotificationEventPayload) MarshalJSON

func (t BillingNotificationEventPayload) MarshalJSON() ([]byte, error)

func (*BillingNotificationEventPayload) MergeBillingNotificationEventBalanceThresholdPayload

func (t *BillingNotificationEventPayload) MergeBillingNotificationEventBalanceThresholdPayload(v BillingNotificationEventBalanceThresholdPayload) error

MergeBillingNotificationEventBalanceThresholdPayload performs a merge with any union data inside the BillingNotificationEventPayload, using the provided BillingNotificationEventBalanceThresholdPayload

func (*BillingNotificationEventPayload) MergeBillingNotificationEventInvoiceCreatedPayload

func (t *BillingNotificationEventPayload) MergeBillingNotificationEventInvoiceCreatedPayload(v BillingNotificationEventInvoiceCreatedPayload) error

MergeBillingNotificationEventInvoiceCreatedPayload performs a merge with any union data inside the BillingNotificationEventPayload, using the provided BillingNotificationEventInvoiceCreatedPayload

func (*BillingNotificationEventPayload) MergeBillingNotificationEventInvoiceUpdatedPayload

func (t *BillingNotificationEventPayload) MergeBillingNotificationEventInvoiceUpdatedPayload(v BillingNotificationEventInvoiceUpdatedPayload) error

MergeBillingNotificationEventInvoiceUpdatedPayload performs a merge with any union data inside the BillingNotificationEventPayload, using the provided BillingNotificationEventInvoiceUpdatedPayload

func (*BillingNotificationEventPayload) MergeBillingNotificationEventResetPayload

func (t *BillingNotificationEventPayload) MergeBillingNotificationEventResetPayload(v BillingNotificationEventResetPayload) error

MergeBillingNotificationEventResetPayload performs a merge with any union data inside the BillingNotificationEventPayload, using the provided BillingNotificationEventResetPayload

func (*BillingNotificationEventPayload) UnmarshalJSON

func (t *BillingNotificationEventPayload) UnmarshalJSON(b []byte) error

func (BillingNotificationEventPayload) ValueByDiscriminator

func (t BillingNotificationEventPayload) ValueByDiscriminator() (interface{}, error)

type BillingNotificationEventResetPayload

type BillingNotificationEventResetPayload struct {
	// Data The entities the event refers to.
	Data BillingNotificationEventEntitlementData `json:"data"`

	// Id The identifier of the event the payload belongs to.
	Id ULID `json:"id"`

	// Timestamp When the event was generated.
	Timestamp DateTime `json:"timestamp"`

	// Type The type of the event.
	Type BillingNotificationEventResetPayloadType `json:"type"`
}

BillingNotificationEventResetPayload An entitlement reset notification event payload.

type BillingNotificationEventResetPayloadType

type BillingNotificationEventResetPayloadType string

BillingNotificationEventResetPayloadType The type of the event.

const (
	BillingNotificationEventResetPayloadTypeEntitlementsReset BillingNotificationEventResetPayloadType = "entitlements.reset"
)

Defines values for BillingNotificationEventResetPayloadType.

func (BillingNotificationEventResetPayloadType) Valid

Valid indicates whether the value is a known member of the BillingNotificationEventResetPayloadType enum.

type BillingNotificationEventType

type BillingNotificationEventType string

BillingNotificationEventType The type of a notification event. It determines which payload variant the event carries.

const (
	BillingNotificationEventTypeEntitlementsBalanceThreshold BillingNotificationEventType = "entitlements.balance.threshold"
	BillingNotificationEventTypeEntitlementsReset            BillingNotificationEventType = "entitlements.reset"
	BillingNotificationEventTypeInvoiceCreated               BillingNotificationEventType = "invoice.created"
	BillingNotificationEventTypeInvoiceUpdated               BillingNotificationEventType = "invoice.updated"
)

Defines values for BillingNotificationEventType.

func (BillingNotificationEventType) Valid

Valid indicates whether the value is a known member of the BillingNotificationEventType enum.

type BillingNotificationRule

type BillingNotificationRule struct {
	// contains filtered or unexported fields
}

BillingNotificationRule A notification rule selects the type of event to generate, the conditions specific to that type, and the channels to deliver the events to.

func (BillingNotificationRule) AsBillingNotificationRuleBalanceThreshold

func (t BillingNotificationRule) AsBillingNotificationRuleBalanceThreshold() (BillingNotificationRuleBalanceThreshold, error)

AsBillingNotificationRuleBalanceThreshold returns the union data inside the BillingNotificationRule as a BillingNotificationRuleBalanceThreshold

func (BillingNotificationRule) AsBillingNotificationRuleEntitlementReset

func (t BillingNotificationRule) AsBillingNotificationRuleEntitlementReset() (BillingNotificationRuleEntitlementReset, error)

AsBillingNotificationRuleEntitlementReset returns the union data inside the BillingNotificationRule as a BillingNotificationRuleEntitlementReset

func (BillingNotificationRule) AsBillingNotificationRuleInvoiceCreated

func (t BillingNotificationRule) AsBillingNotificationRuleInvoiceCreated() (BillingNotificationRuleInvoiceCreated, error)

AsBillingNotificationRuleInvoiceCreated returns the union data inside the BillingNotificationRule as a BillingNotificationRuleInvoiceCreated

func (BillingNotificationRule) AsBillingNotificationRuleInvoiceUpdated

func (t BillingNotificationRule) AsBillingNotificationRuleInvoiceUpdated() (BillingNotificationRuleInvoiceUpdated, error)

AsBillingNotificationRuleInvoiceUpdated returns the union data inside the BillingNotificationRule as a BillingNotificationRuleInvoiceUpdated

func (BillingNotificationRule) Discriminator

func (t BillingNotificationRule) Discriminator() (string, error)

func (*BillingNotificationRule) FromBillingNotificationRuleBalanceThreshold

func (t *BillingNotificationRule) FromBillingNotificationRuleBalanceThreshold(v BillingNotificationRuleBalanceThreshold) error

FromBillingNotificationRuleBalanceThreshold overwrites any union data inside the BillingNotificationRule as the provided BillingNotificationRuleBalanceThreshold

func (*BillingNotificationRule) FromBillingNotificationRuleEntitlementReset

func (t *BillingNotificationRule) FromBillingNotificationRuleEntitlementReset(v BillingNotificationRuleEntitlementReset) error

FromBillingNotificationRuleEntitlementReset overwrites any union data inside the BillingNotificationRule as the provided BillingNotificationRuleEntitlementReset

func (*BillingNotificationRule) FromBillingNotificationRuleInvoiceCreated

func (t *BillingNotificationRule) FromBillingNotificationRuleInvoiceCreated(v BillingNotificationRuleInvoiceCreated) error

FromBillingNotificationRuleInvoiceCreated overwrites any union data inside the BillingNotificationRule as the provided BillingNotificationRuleInvoiceCreated

func (*BillingNotificationRule) FromBillingNotificationRuleInvoiceUpdated

func (t *BillingNotificationRule) FromBillingNotificationRuleInvoiceUpdated(v BillingNotificationRuleInvoiceUpdated) error

FromBillingNotificationRuleInvoiceUpdated overwrites any union data inside the BillingNotificationRule as the provided BillingNotificationRuleInvoiceUpdated

func (BillingNotificationRule) MarshalJSON

func (t BillingNotificationRule) MarshalJSON() ([]byte, error)

func (*BillingNotificationRule) MergeBillingNotificationRuleBalanceThreshold

func (t *BillingNotificationRule) MergeBillingNotificationRuleBalanceThreshold(v BillingNotificationRuleBalanceThreshold) error

MergeBillingNotificationRuleBalanceThreshold performs a merge with any union data inside the BillingNotificationRule, using the provided BillingNotificationRuleBalanceThreshold

func (*BillingNotificationRule) MergeBillingNotificationRuleEntitlementReset

func (t *BillingNotificationRule) MergeBillingNotificationRuleEntitlementReset(v BillingNotificationRuleEntitlementReset) error

MergeBillingNotificationRuleEntitlementReset performs a merge with any union data inside the BillingNotificationRule, using the provided BillingNotificationRuleEntitlementReset

func (*BillingNotificationRule) MergeBillingNotificationRuleInvoiceCreated

func (t *BillingNotificationRule) MergeBillingNotificationRuleInvoiceCreated(v BillingNotificationRuleInvoiceCreated) error

MergeBillingNotificationRuleInvoiceCreated performs a merge with any union data inside the BillingNotificationRule, using the provided BillingNotificationRuleInvoiceCreated

func (*BillingNotificationRule) MergeBillingNotificationRuleInvoiceUpdated

func (t *BillingNotificationRule) MergeBillingNotificationRuleInvoiceUpdated(v BillingNotificationRuleInvoiceUpdated) error

MergeBillingNotificationRuleInvoiceUpdated performs a merge with any union data inside the BillingNotificationRule, using the provided BillingNotificationRuleInvoiceUpdated

func (*BillingNotificationRule) UnmarshalJSON

func (t *BillingNotificationRule) UnmarshalJSON(b []byte) error

func (BillingNotificationRule) ValueByDiscriminator

func (t BillingNotificationRule) ValueByDiscriminator() (interface{}, error)

type BillingNotificationRuleBalanceThreshold

type BillingNotificationRuleBalanceThreshold struct {
	// Channels The channels the rule delivers its events to. At least one and at most five
	// channels are required. Responses omit channels that have since been disabled or
	// deleted.
	Channels []NotificationChannelReference `json:"channels"`

	// CreatedAt An ISO-8601 timestamp representation of entity creation date.
	CreatedAt DateTime `json:"created_at"`

	// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
	DeletedAt *DateTime `json:"deleted_at,omitempty"`

	// Disabled Whether the rule is disabled. Disabled rules do not generate events.
	Disabled *bool `json:"disabled,omitempty"`

	// Features The features the rule applies to. When omitted, the rule applies to every
	// feature.
	Features *[]FeatureReference `json:"features,omitempty"`
	Id       ULID                `json:"id"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// Thresholds The thresholds that generate an event when crossed.
	Thresholds []BillingNotificationBalanceThreshold `json:"thresholds"`

	// Type The type of event the rule generates. Immutable after creation.
	Type BillingNotificationRuleBalanceThresholdType `json:"type"`

	// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
	UpdatedAt DateTime `json:"updated_at"`
}

BillingNotificationRuleBalanceThreshold A rule that generates an event when an entitlement balance crosses one of its thresholds.

type BillingNotificationRuleBalanceThresholdRequest

type BillingNotificationRuleBalanceThresholdRequest struct {
	// Channels The channels the rule delivers its events to. At least one and at most five
	// channels are required. Responses omit channels that have since been disabled or
	// deleted.
	Channels []NotificationChannelReference `json:"channels"`

	// Disabled Whether the rule is disabled. Disabled rules do not generate events.
	Disabled *bool `json:"disabled,omitempty"`

	// Features The features the rule applies to. When omitted, the rule applies to every
	// feature.
	Features *[]FeatureReference `json:"features,omitempty"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// Thresholds The thresholds that generate an event when crossed.
	Thresholds []BillingNotificationBalanceThreshold `json:"thresholds"`

	// Type The type of event the rule generates. Immutable after creation.
	Type BillingNotificationRuleBalanceThresholdRequestType `json:"type"`
}

BillingNotificationRuleBalanceThresholdRequest Request body for a balance threshold rule.

type BillingNotificationRuleBalanceThresholdRequestType

type BillingNotificationRuleBalanceThresholdRequestType string

BillingNotificationRuleBalanceThresholdRequestType The type of event the rule generates. Immutable after creation.

const (
	BillingNotificationRuleBalanceThresholdRequestTypeEntitlementsBalanceThreshold BillingNotificationRuleBalanceThresholdRequestType = "entitlements.balance.threshold"
)

Defines values for BillingNotificationRuleBalanceThresholdRequestType.

func (BillingNotificationRuleBalanceThresholdRequestType) Valid

Valid indicates whether the value is a known member of the BillingNotificationRuleBalanceThresholdRequestType enum.

type BillingNotificationRuleBalanceThresholdType

type BillingNotificationRuleBalanceThresholdType string

BillingNotificationRuleBalanceThresholdType The type of event the rule generates. Immutable after creation.

const (
	BillingNotificationRuleBalanceThresholdTypeEntitlementsBalanceThreshold BillingNotificationRuleBalanceThresholdType = "entitlements.balance.threshold"
)

Defines values for BillingNotificationRuleBalanceThresholdType.

func (BillingNotificationRuleBalanceThresholdType) Valid

Valid indicates whether the value is a known member of the BillingNotificationRuleBalanceThresholdType enum.

type BillingNotificationRuleEntitlementReset

type BillingNotificationRuleEntitlementReset struct {
	// Channels The channels the rule delivers its events to. At least one and at most five
	// channels are required. Responses omit channels that have since been disabled or
	// deleted.
	Channels []NotificationChannelReference `json:"channels"`

	// CreatedAt An ISO-8601 timestamp representation of entity creation date.
	CreatedAt DateTime `json:"created_at"`

	// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
	DeletedAt *DateTime `json:"deleted_at,omitempty"`

	// Disabled Whether the rule is disabled. Disabled rules do not generate events.
	Disabled *bool `json:"disabled,omitempty"`

	// Features The features the rule applies to. When omitted, the rule applies to every
	// feature.
	Features *[]FeatureReference `json:"features,omitempty"`
	Id       ULID                `json:"id"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// Type The type of event the rule generates. Immutable after creation.
	Type BillingNotificationRuleEntitlementResetType `json:"type"`

	// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
	UpdatedAt DateTime `json:"updated_at"`
}

BillingNotificationRuleEntitlementReset A rule that generates an event when an entitlement usage period is reset.

type BillingNotificationRuleEntitlementResetRequest

type BillingNotificationRuleEntitlementResetRequest struct {
	// Channels The channels the rule delivers its events to. At least one and at most five
	// channels are required. Responses omit channels that have since been disabled or
	// deleted.
	Channels []NotificationChannelReference `json:"channels"`

	// Disabled Whether the rule is disabled. Disabled rules do not generate events.
	Disabled *bool `json:"disabled,omitempty"`

	// Features The features the rule applies to. When omitted, the rule applies to every
	// feature.
	Features *[]FeatureReference `json:"features,omitempty"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// Type The type of event the rule generates. Immutable after creation.
	Type BillingNotificationRuleEntitlementResetRequestType `json:"type"`
}

BillingNotificationRuleEntitlementResetRequest Request body for an entitlement reset rule.

type BillingNotificationRuleEntitlementResetRequestType

type BillingNotificationRuleEntitlementResetRequestType string

BillingNotificationRuleEntitlementResetRequestType The type of event the rule generates. Immutable after creation.

const (
	BillingNotificationRuleEntitlementResetRequestTypeEntitlementsReset BillingNotificationRuleEntitlementResetRequestType = "entitlements.reset"
)

Defines values for BillingNotificationRuleEntitlementResetRequestType.

func (BillingNotificationRuleEntitlementResetRequestType) Valid

Valid indicates whether the value is a known member of the BillingNotificationRuleEntitlementResetRequestType enum.

type BillingNotificationRuleEntitlementResetType

type BillingNotificationRuleEntitlementResetType string

BillingNotificationRuleEntitlementResetType The type of event the rule generates. Immutable after creation.

const (
	BillingNotificationRuleEntitlementResetTypeEntitlementsReset BillingNotificationRuleEntitlementResetType = "entitlements.reset"
)

Defines values for BillingNotificationRuleEntitlementResetType.

func (BillingNotificationRuleEntitlementResetType) Valid

Valid indicates whether the value is a known member of the BillingNotificationRuleEntitlementResetType enum.

type BillingNotificationRuleInvoiceCreated

type BillingNotificationRuleInvoiceCreated struct {
	// Channels The channels the rule delivers its events to. At least one and at most five
	// channels are required. Responses omit channels that have since been disabled or
	// deleted.
	Channels []NotificationChannelReference `json:"channels"`

	// CreatedAt An ISO-8601 timestamp representation of entity creation date.
	CreatedAt DateTime `json:"created_at"`

	// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
	DeletedAt *DateTime `json:"deleted_at,omitempty"`

	// Disabled Whether the rule is disabled. Disabled rules do not generate events.
	Disabled *bool `json:"disabled,omitempty"`
	Id       ULID  `json:"id"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// Type The type of event the rule generates. Immutable after creation.
	Type BillingNotificationRuleInvoiceCreatedType `json:"type"`

	// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
	UpdatedAt DateTime `json:"updated_at"`
}

BillingNotificationRuleInvoiceCreated A rule that generates an event when an invoice is created.

type BillingNotificationRuleInvoiceCreatedRequest

type BillingNotificationRuleInvoiceCreatedRequest struct {
	// Channels The channels the rule delivers its events to. At least one and at most five
	// channels are required. Responses omit channels that have since been disabled or
	// deleted.
	Channels []NotificationChannelReference `json:"channels"`

	// Disabled Whether the rule is disabled. Disabled rules do not generate events.
	Disabled *bool `json:"disabled,omitempty"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// Type The type of event the rule generates. Immutable after creation.
	Type BillingNotificationRuleInvoiceCreatedRequestType `json:"type"`
}

BillingNotificationRuleInvoiceCreatedRequest Request body for an invoice created rule.

type BillingNotificationRuleInvoiceCreatedRequestType

type BillingNotificationRuleInvoiceCreatedRequestType string

BillingNotificationRuleInvoiceCreatedRequestType The type of event the rule generates. Immutable after creation.

const (
	BillingNotificationRuleInvoiceCreatedRequestTypeInvoiceCreated BillingNotificationRuleInvoiceCreatedRequestType = "invoice.created"
)

Defines values for BillingNotificationRuleInvoiceCreatedRequestType.

func (BillingNotificationRuleInvoiceCreatedRequestType) Valid

Valid indicates whether the value is a known member of the BillingNotificationRuleInvoiceCreatedRequestType enum.

type BillingNotificationRuleInvoiceCreatedType

type BillingNotificationRuleInvoiceCreatedType string

BillingNotificationRuleInvoiceCreatedType The type of event the rule generates. Immutable after creation.

const (
	BillingNotificationRuleInvoiceCreatedTypeInvoiceCreated BillingNotificationRuleInvoiceCreatedType = "invoice.created"
)

Defines values for BillingNotificationRuleInvoiceCreatedType.

func (BillingNotificationRuleInvoiceCreatedType) Valid

Valid indicates whether the value is a known member of the BillingNotificationRuleInvoiceCreatedType enum.

type BillingNotificationRuleInvoiceUpdated

type BillingNotificationRuleInvoiceUpdated struct {
	// Channels The channels the rule delivers its events to. At least one and at most five
	// channels are required. Responses omit channels that have since been disabled or
	// deleted.
	Channels []NotificationChannelReference `json:"channels"`

	// CreatedAt An ISO-8601 timestamp representation of entity creation date.
	CreatedAt DateTime `json:"created_at"`

	// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
	DeletedAt *DateTime `json:"deleted_at,omitempty"`

	// Disabled Whether the rule is disabled. Disabled rules do not generate events.
	Disabled *bool `json:"disabled,omitempty"`
	Id       ULID  `json:"id"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// Type The type of event the rule generates. Immutable after creation.
	Type BillingNotificationRuleInvoiceUpdatedType `json:"type"`

	// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
	UpdatedAt DateTime `json:"updated_at"`
}

BillingNotificationRuleInvoiceUpdated A rule that generates an event when an invoice is updated.

type BillingNotificationRuleInvoiceUpdatedRequest

type BillingNotificationRuleInvoiceUpdatedRequest struct {
	// Channels The channels the rule delivers its events to. At least one and at most five
	// channels are required. Responses omit channels that have since been disabled or
	// deleted.
	Channels []NotificationChannelReference `json:"channels"`

	// Disabled Whether the rule is disabled. Disabled rules do not generate events.
	Disabled *bool `json:"disabled,omitempty"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// Type The type of event the rule generates. Immutable after creation.
	Type BillingNotificationRuleInvoiceUpdatedRequestType `json:"type"`
}

BillingNotificationRuleInvoiceUpdatedRequest Request body for an invoice updated rule.

type BillingNotificationRuleInvoiceUpdatedRequestType

type BillingNotificationRuleInvoiceUpdatedRequestType string

BillingNotificationRuleInvoiceUpdatedRequestType The type of event the rule generates. Immutable after creation.

const (
	BillingNotificationRuleInvoiceUpdatedRequestTypeInvoiceUpdated BillingNotificationRuleInvoiceUpdatedRequestType = "invoice.updated"
)

Defines values for BillingNotificationRuleInvoiceUpdatedRequestType.

func (BillingNotificationRuleInvoiceUpdatedRequestType) Valid

Valid indicates whether the value is a known member of the BillingNotificationRuleInvoiceUpdatedRequestType enum.

type BillingNotificationRuleInvoiceUpdatedType

type BillingNotificationRuleInvoiceUpdatedType string

BillingNotificationRuleInvoiceUpdatedType The type of event the rule generates. Immutable after creation.

const (
	BillingNotificationRuleInvoiceUpdatedTypeInvoiceUpdated BillingNotificationRuleInvoiceUpdatedType = "invoice.updated"
)

Defines values for BillingNotificationRuleInvoiceUpdatedType.

func (BillingNotificationRuleInvoiceUpdatedType) Valid

Valid indicates whether the value is a known member of the BillingNotificationRuleInvoiceUpdatedType enum.

type BillingNotificationRuleReference

type BillingNotificationRuleReference struct {
	// Id The unique identifier of the rule.
	Id ULID `json:"id"`

	// Name The user-provided name of the rule.
	Name string `json:"name"`

	// Type The type of event the rule generates.
	Type BillingNotificationEventType `json:"type"`
}

BillingNotificationRuleReference A reference to the notification rule that generated an event.

type BillingNotificationRuleRequest

type BillingNotificationRuleRequest struct {
	// contains filtered or unexported fields
}

BillingNotificationRuleRequest Request body for creating or updating a notification rule. Updates replace the rule's mutable state: omitting `disabled`, `labels`, or `features` resets them to their defaults. The `type` must match the existing rule on update.

func (BillingNotificationRuleRequest) AsBillingNotificationRuleBalanceThresholdRequest

func (t BillingNotificationRuleRequest) AsBillingNotificationRuleBalanceThresholdRequest() (BillingNotificationRuleBalanceThresholdRequest, error)

AsBillingNotificationRuleBalanceThresholdRequest returns the union data inside the BillingNotificationRuleRequest as a BillingNotificationRuleBalanceThresholdRequest

func (BillingNotificationRuleRequest) AsBillingNotificationRuleEntitlementResetRequest

func (t BillingNotificationRuleRequest) AsBillingNotificationRuleEntitlementResetRequest() (BillingNotificationRuleEntitlementResetRequest, error)

AsBillingNotificationRuleEntitlementResetRequest returns the union data inside the BillingNotificationRuleRequest as a BillingNotificationRuleEntitlementResetRequest

func (BillingNotificationRuleRequest) AsBillingNotificationRuleInvoiceCreatedRequest

func (t BillingNotificationRuleRequest) AsBillingNotificationRuleInvoiceCreatedRequest() (BillingNotificationRuleInvoiceCreatedRequest, error)

AsBillingNotificationRuleInvoiceCreatedRequest returns the union data inside the BillingNotificationRuleRequest as a BillingNotificationRuleInvoiceCreatedRequest

func (BillingNotificationRuleRequest) AsBillingNotificationRuleInvoiceUpdatedRequest

func (t BillingNotificationRuleRequest) AsBillingNotificationRuleInvoiceUpdatedRequest() (BillingNotificationRuleInvoiceUpdatedRequest, error)

AsBillingNotificationRuleInvoiceUpdatedRequest returns the union data inside the BillingNotificationRuleRequest as a BillingNotificationRuleInvoiceUpdatedRequest

func (BillingNotificationRuleRequest) Discriminator

func (t BillingNotificationRuleRequest) Discriminator() (string, error)

func (*BillingNotificationRuleRequest) FromBillingNotificationRuleBalanceThresholdRequest

func (t *BillingNotificationRuleRequest) FromBillingNotificationRuleBalanceThresholdRequest(v BillingNotificationRuleBalanceThresholdRequest) error

FromBillingNotificationRuleBalanceThresholdRequest overwrites any union data inside the BillingNotificationRuleRequest as the provided BillingNotificationRuleBalanceThresholdRequest

func (*BillingNotificationRuleRequest) FromBillingNotificationRuleEntitlementResetRequest

func (t *BillingNotificationRuleRequest) FromBillingNotificationRuleEntitlementResetRequest(v BillingNotificationRuleEntitlementResetRequest) error

FromBillingNotificationRuleEntitlementResetRequest overwrites any union data inside the BillingNotificationRuleRequest as the provided BillingNotificationRuleEntitlementResetRequest

func (*BillingNotificationRuleRequest) FromBillingNotificationRuleInvoiceCreatedRequest

func (t *BillingNotificationRuleRequest) FromBillingNotificationRuleInvoiceCreatedRequest(v BillingNotificationRuleInvoiceCreatedRequest) error

FromBillingNotificationRuleInvoiceCreatedRequest overwrites any union data inside the BillingNotificationRuleRequest as the provided BillingNotificationRuleInvoiceCreatedRequest

func (*BillingNotificationRuleRequest) FromBillingNotificationRuleInvoiceUpdatedRequest

func (t *BillingNotificationRuleRequest) FromBillingNotificationRuleInvoiceUpdatedRequest(v BillingNotificationRuleInvoiceUpdatedRequest) error

FromBillingNotificationRuleInvoiceUpdatedRequest overwrites any union data inside the BillingNotificationRuleRequest as the provided BillingNotificationRuleInvoiceUpdatedRequest

func (BillingNotificationRuleRequest) MarshalJSON

func (t BillingNotificationRuleRequest) MarshalJSON() ([]byte, error)

func (*BillingNotificationRuleRequest) MergeBillingNotificationRuleBalanceThresholdRequest

func (t *BillingNotificationRuleRequest) MergeBillingNotificationRuleBalanceThresholdRequest(v BillingNotificationRuleBalanceThresholdRequest) error

MergeBillingNotificationRuleBalanceThresholdRequest performs a merge with any union data inside the BillingNotificationRuleRequest, using the provided BillingNotificationRuleBalanceThresholdRequest

func (*BillingNotificationRuleRequest) MergeBillingNotificationRuleEntitlementResetRequest

func (t *BillingNotificationRuleRequest) MergeBillingNotificationRuleEntitlementResetRequest(v BillingNotificationRuleEntitlementResetRequest) error

MergeBillingNotificationRuleEntitlementResetRequest performs a merge with any union data inside the BillingNotificationRuleRequest, using the provided BillingNotificationRuleEntitlementResetRequest

func (*BillingNotificationRuleRequest) MergeBillingNotificationRuleInvoiceCreatedRequest

func (t *BillingNotificationRuleRequest) MergeBillingNotificationRuleInvoiceCreatedRequest(v BillingNotificationRuleInvoiceCreatedRequest) error

MergeBillingNotificationRuleInvoiceCreatedRequest performs a merge with any union data inside the BillingNotificationRuleRequest, using the provided BillingNotificationRuleInvoiceCreatedRequest

func (*BillingNotificationRuleRequest) MergeBillingNotificationRuleInvoiceUpdatedRequest

func (t *BillingNotificationRuleRequest) MergeBillingNotificationRuleInvoiceUpdatedRequest(v BillingNotificationRuleInvoiceUpdatedRequest) error

MergeBillingNotificationRuleInvoiceUpdatedRequest performs a merge with any union data inside the BillingNotificationRuleRequest, using the provided BillingNotificationRuleInvoiceUpdatedRequest

func (*BillingNotificationRuleRequest) UnmarshalJSON

func (t *BillingNotificationRuleRequest) UnmarshalJSON(b []byte) error

func (BillingNotificationRuleRequest) ValueByDiscriminator

func (t BillingNotificationRuleRequest) ValueByDiscriminator() (interface{}, error)

type BillingParty

type BillingParty struct {
	// Addresses Address for where information should be sent if needed.
	Addresses *BillingPartyAddresses `json:"addresses,omitempty"`

	// Id Unique identifier for the party.
	Id *string `json:"id,omitempty"`

	// Key An optional unique key of the party.
	Key *ExternalResourceKey `json:"key,omitempty"`

	// Name Legal name or representation of the party.
	Name *string `json:"name,omitempty"`

	// TaxId The entity's legal identification used for tax purposes. They may have other
	// numbers, but we're only interested in those valid for tax purposes.
	TaxId *BillingPartyTaxIdentity `json:"tax_id,omitempty"`
}

BillingParty Party represents a person or business entity.

type BillingPartyAddresses

type BillingPartyAddresses struct {
	// BillingAddress Billing address.
	BillingAddress Address `json:"billing_address"`
}

BillingPartyAddresses A collection of addresses for the party.

type BillingPartyTaxIdentity

type BillingPartyTaxIdentity struct {
	// Code Normalized tax identification code shown on the original identity document.
	Code *BillingTaxIdentificationCode `json:"code,omitempty"`
}

BillingPartyTaxIdentity Identity stores the details required to identify an entity for tax purposes in a specific country.

type BillingPlan

type BillingPlan struct {
	// BillingCadence The billing cadence for subscriptions using this plan.
	BillingCadence ISO8601Duration `json:"billing_cadence"`

	// CreatedAt An ISO-8601 timestamp representation of entity creation date.
	CreatedAt DateTime `json:"created_at"`

	// Currency The currency code of the plan.
	Currency BillingCurrencyCode `json:"currency"`

	// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
	DeletedAt *DateTime `json:"deleted_at,omitempty"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// EffectiveFrom The date and time when the plan becomes `active`. When not specified, the plan
	// is in `draft` status.
	EffectiveFrom *DateTime `json:"effective_from,omitempty"`

	// EffectiveTo A scheduled date and time when the plan becomes `archived`. When not specified,
	// the plan is in `active` status indefinitely.
	EffectiveTo *DateTime `json:"effective_to,omitempty"`
	Id          ULID      `json:"id"`

	// Key A key is a semi-unique string that is used to identify the plan. It is used to
	// reference the latest `active` version of the plan and is unique with the version
	// number.
	Key ResourceKey `json:"key"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// Phases The plan phases define the pricing ramp for a subscription. A phase switch
	// occurs only at the end of a billing period. At least one phase is required.
	Phases []BillingPlanPhase `json:"phases"`

	// ProRatingEnabled Whether pro-rating is enabled for this plan.
	ProRatingEnabled *bool `json:"pro_rating_enabled,omitempty"`

	// SettlementMode Settlement mode for plan.
	//
	// Values:
	//
	// - `credit_then_invoice`: Credits are applied first, then any remainder is
	// invoiced.
	// - `credit_only`: Usage is settled exclusively against credits.
	SettlementMode BillingSettlementMode `json:"settlement_mode"`

	// Status The status of the plan. Computed based on the effective start and end dates:
	//
	// - `draft`: `effective_from` is not set.
	// - `scheduled`: `now < effective_from`.
	// - `active`: `effective_from <= now` and (`effective_to` is not set or
	// `now < effective_to`).
	// - `archived`: `effective_to <= now`.
	Status BillingPlanStatus `json:"status"`

	// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
	UpdatedAt DateTime `json:"updated_at"`

	// ValidationErrors List of validation errors in `draft` state that prevent the plan from being
	// published.
	ValidationErrors *[]ProductCatalogValidationError `json:"validation_errors,omitempty"`

	// Version Plans are versioned to allow you to make changes without affecting running
	// subscriptions.
	Version int `json:"version"`
}

BillingPlan Plans provide a template for subscriptions.

type BillingPlanPhase

type BillingPlanPhase struct {
	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// Duration The duration of the phase. When not specified, the phase runs indefinitely. Only
	// the last phase may omit the duration.
	Duration *ISO8601Duration `json:"duration,omitempty"`

	// Key A key is a unique string that is used to identify a resource.
	Key ResourceKey `json:"key"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// RateCards The rate cards of the plan.
	RateCards []BillingRateCard `json:"rate_cards"`
}

BillingPlanPhase The plan phase or pricing ramp allows changing a plan's rate cards over time as a subscription progresses.

type BillingPlanStatus

type BillingPlanStatus string

BillingPlanStatus The status of a plan.

- `draft`: The plan has not yet been published and can be edited. - `active`: The plan is published and can be used in subscriptions. - `archived`: The plan is no longer available for use. - `scheduled`: The plan is scheduled to be published at a future date.

const (
	BillingPlanStatusActive    BillingPlanStatus = "active"
	BillingPlanStatusArchived  BillingPlanStatus = "archived"
	BillingPlanStatusDraft     BillingPlanStatus = "draft"
	BillingPlanStatusScheduled BillingPlanStatus = "scheduled"
)

Defines values for BillingPlanStatus.

func (BillingPlanStatus) Valid

func (e BillingPlanStatus) Valid() bool

Valid indicates whether the value is a known member of the BillingPlanStatus enum.

type BillingPrice

type BillingPrice struct {
	// contains filtered or unexported fields
}

BillingPrice Price.

func (BillingPrice) AsBillingPriceFlat

func (t BillingPrice) AsBillingPriceFlat() (BillingPriceFlat, error)

AsBillingPriceFlat returns the union data inside the BillingPrice as a BillingPriceFlat

func (BillingPrice) AsBillingPriceFree

func (t BillingPrice) AsBillingPriceFree() (BillingPriceFree, error)

AsBillingPriceFree returns the union data inside the BillingPrice as a BillingPriceFree

func (BillingPrice) AsBillingPriceGraduated

func (t BillingPrice) AsBillingPriceGraduated() (BillingPriceGraduated, error)

AsBillingPriceGraduated returns the union data inside the BillingPrice as a BillingPriceGraduated

func (BillingPrice) AsBillingPriceUnit

func (t BillingPrice) AsBillingPriceUnit() (BillingPriceUnit, error)

AsBillingPriceUnit returns the union data inside the BillingPrice as a BillingPriceUnit

func (BillingPrice) AsBillingPriceVolume

func (t BillingPrice) AsBillingPriceVolume() (BillingPriceVolume, error)

AsBillingPriceVolume returns the union data inside the BillingPrice as a BillingPriceVolume

func (BillingPrice) Discriminator

func (t BillingPrice) Discriminator() (string, error)

func (*BillingPrice) FromBillingPriceFlat

func (t *BillingPrice) FromBillingPriceFlat(v BillingPriceFlat) error

FromBillingPriceFlat overwrites any union data inside the BillingPrice as the provided BillingPriceFlat

func (*BillingPrice) FromBillingPriceFree

func (t *BillingPrice) FromBillingPriceFree(v BillingPriceFree) error

FromBillingPriceFree overwrites any union data inside the BillingPrice as the provided BillingPriceFree

func (*BillingPrice) FromBillingPriceGraduated

func (t *BillingPrice) FromBillingPriceGraduated(v BillingPriceGraduated) error

FromBillingPriceGraduated overwrites any union data inside the BillingPrice as the provided BillingPriceGraduated

func (*BillingPrice) FromBillingPriceUnit

func (t *BillingPrice) FromBillingPriceUnit(v BillingPriceUnit) error

FromBillingPriceUnit overwrites any union data inside the BillingPrice as the provided BillingPriceUnit

func (*BillingPrice) FromBillingPriceVolume

func (t *BillingPrice) FromBillingPriceVolume(v BillingPriceVolume) error

FromBillingPriceVolume overwrites any union data inside the BillingPrice as the provided BillingPriceVolume

func (BillingPrice) MarshalJSON

func (t BillingPrice) MarshalJSON() ([]byte, error)

func (*BillingPrice) MergeBillingPriceFlat

func (t *BillingPrice) MergeBillingPriceFlat(v BillingPriceFlat) error

MergeBillingPriceFlat performs a merge with any union data inside the BillingPrice, using the provided BillingPriceFlat

func (*BillingPrice) MergeBillingPriceFree

func (t *BillingPrice) MergeBillingPriceFree(v BillingPriceFree) error

MergeBillingPriceFree performs a merge with any union data inside the BillingPrice, using the provided BillingPriceFree

func (*BillingPrice) MergeBillingPriceGraduated

func (t *BillingPrice) MergeBillingPriceGraduated(v BillingPriceGraduated) error

MergeBillingPriceGraduated performs a merge with any union data inside the BillingPrice, using the provided BillingPriceGraduated

func (*BillingPrice) MergeBillingPriceUnit

func (t *BillingPrice) MergeBillingPriceUnit(v BillingPriceUnit) error

MergeBillingPriceUnit performs a merge with any union data inside the BillingPrice, using the provided BillingPriceUnit

func (*BillingPrice) MergeBillingPriceVolume

func (t *BillingPrice) MergeBillingPriceVolume(v BillingPriceVolume) error

MergeBillingPriceVolume performs a merge with any union data inside the BillingPrice, using the provided BillingPriceVolume

func (*BillingPrice) UnmarshalJSON

func (t *BillingPrice) UnmarshalJSON(b []byte) error

func (BillingPrice) ValueByDiscriminator

func (t BillingPrice) ValueByDiscriminator() (interface{}, error)

type BillingPriceFlat

type BillingPriceFlat struct {
	// Amount The amount of the flat price.
	Amount Numeric `json:"amount"`

	// Type The type of the price.
	Type BillingPriceFlatType `json:"type"`
}

BillingPriceFlat Flat price.

type BillingPriceFlatType

type BillingPriceFlatType string

BillingPriceFlatType The type of the price.

const (
	BillingPriceFlatTypeFlat BillingPriceFlatType = "flat"
)

Defines values for BillingPriceFlatType.

func (BillingPriceFlatType) Valid

func (e BillingPriceFlatType) Valid() bool

Valid indicates whether the value is a known member of the BillingPriceFlatType enum.

type BillingPriceFree

type BillingPriceFree struct {
	// Type The type of the price.
	Type BillingPriceFreeType `json:"type"`
}

BillingPriceFree Free price.

type BillingPriceFreeType

type BillingPriceFreeType string

BillingPriceFreeType The type of the price.

const (
	BillingPriceFreeTypeFree BillingPriceFreeType = "free"
)

Defines values for BillingPriceFreeType.

func (BillingPriceFreeType) Valid

func (e BillingPriceFreeType) Valid() bool

Valid indicates whether the value is a known member of the BillingPriceFreeType enum.

type BillingPriceGraduated

type BillingPriceGraduated struct {
	// Tiers The tiers of the graduated price. At least one tier is required.
	Tiers []BillingPriceTier `json:"tiers"`

	// Type The type of the price.
	Type BillingPriceGraduatedType `json:"type"`
}

BillingPriceGraduated Graduated tiered price.

Each tier's rate applies only to the usage within that tier. Pricing can change as cumulative usage crosses tier boundaries.

When UnitConfig is present on the containing resource, tier boundaries (up_to_amount) are expressed in converted billing units.

type BillingPriceGraduatedType

type BillingPriceGraduatedType string

BillingPriceGraduatedType The type of the price.

const (
	BillingPriceGraduatedTypeGraduated BillingPriceGraduatedType = "graduated"
)

Defines values for BillingPriceGraduatedType.

func (BillingPriceGraduatedType) Valid

func (e BillingPriceGraduatedType) Valid() bool

Valid indicates whether the value is a known member of the BillingPriceGraduatedType enum.

type BillingPricePaymentTerm

type BillingPricePaymentTerm string

BillingPricePaymentTerm The payment term of a flat price.

const (
	BillingPricePaymentTermInAdvance BillingPricePaymentTerm = "in_advance"
	BillingPricePaymentTermInArrears BillingPricePaymentTerm = "in_arrears"
)

Defines values for BillingPricePaymentTerm.

func (BillingPricePaymentTerm) Valid

func (e BillingPricePaymentTerm) Valid() bool

Valid indicates whether the value is a known member of the BillingPricePaymentTerm enum.

type BillingPriceTier

type BillingPriceTier struct {
	// FlatPrice The flat price component of the tier. Charged once when the tier is entered.
	FlatPrice *BillingPriceFlat `json:"flat_price,omitempty"`

	// UnitPrice The unit price component of the tier. Charged per billing unit within the tier.
	UnitPrice *BillingPriceUnit `json:"unit_price,omitempty"`

	// UpToAmount Up to and including this quantity will be contained in the tier. If undefined,
	// the tier is open-ended (the last tier).
	UpToAmount *Numeric `json:"up_to_amount,omitempty"`
}

BillingPriceTier A price tier used in graduated and volume pricing.

At least one price component (flat_price or unit_price) must be set. When UnitConfig is present on the containing resource, up_to_amount is expressed in converted billing units.

type BillingPriceUnit

type BillingPriceUnit struct {
	// Amount The amount of the unit price.
	Amount Numeric `json:"amount"`

	// Type The type of the price.
	Type BillingPriceUnitType `json:"type"`
}

BillingPriceUnit Unit price.

Charges a fixed rate per billing unit. When UnitConfig is present on the object, billing units are the converted quantities (e.g. GB instead of bytes).

type BillingPriceUnitType

type BillingPriceUnitType string

BillingPriceUnitType The type of the price.

const (
	BillingPriceUnitTypeUnit BillingPriceUnitType = "unit"
)

Defines values for BillingPriceUnitType.

func (BillingPriceUnitType) Valid

func (e BillingPriceUnitType) Valid() bool

Valid indicates whether the value is a known member of the BillingPriceUnitType enum.

type BillingPriceUsageBased

type BillingPriceUsageBased struct {
	// contains filtered or unexported fields
}

BillingPriceUsageBased Usage-based price types for a rate card or charge.

When UnitConfig is present on the object, these price types operate on billing units (i.e. post-conversion quantities), not raw metered units.

func (BillingPriceUsageBased) AsBillingPriceGraduated

func (t BillingPriceUsageBased) AsBillingPriceGraduated() (BillingPriceGraduated, error)

AsBillingPriceGraduated returns the union data inside the BillingPriceUsageBased as a BillingPriceGraduated

func (BillingPriceUsageBased) AsBillingPriceUnit

func (t BillingPriceUsageBased) AsBillingPriceUnit() (BillingPriceUnit, error)

AsBillingPriceUnit returns the union data inside the BillingPriceUsageBased as a BillingPriceUnit

func (BillingPriceUsageBased) AsBillingPriceVolume

func (t BillingPriceUsageBased) AsBillingPriceVolume() (BillingPriceVolume, error)

AsBillingPriceVolume returns the union data inside the BillingPriceUsageBased as a BillingPriceVolume

func (BillingPriceUsageBased) Discriminator

func (t BillingPriceUsageBased) Discriminator() (string, error)

func (*BillingPriceUsageBased) FromBillingPriceGraduated

func (t *BillingPriceUsageBased) FromBillingPriceGraduated(v BillingPriceGraduated) error

FromBillingPriceGraduated overwrites any union data inside the BillingPriceUsageBased as the provided BillingPriceGraduated

func (*BillingPriceUsageBased) FromBillingPriceUnit

func (t *BillingPriceUsageBased) FromBillingPriceUnit(v BillingPriceUnit) error

FromBillingPriceUnit overwrites any union data inside the BillingPriceUsageBased as the provided BillingPriceUnit

func (*BillingPriceUsageBased) FromBillingPriceVolume

func (t *BillingPriceUsageBased) FromBillingPriceVolume(v BillingPriceVolume) error

FromBillingPriceVolume overwrites any union data inside the BillingPriceUsageBased as the provided BillingPriceVolume

func (BillingPriceUsageBased) MarshalJSON

func (t BillingPriceUsageBased) MarshalJSON() ([]byte, error)

func (*BillingPriceUsageBased) MergeBillingPriceGraduated

func (t *BillingPriceUsageBased) MergeBillingPriceGraduated(v BillingPriceGraduated) error

MergeBillingPriceGraduated performs a merge with any union data inside the BillingPriceUsageBased, using the provided BillingPriceGraduated

func (*BillingPriceUsageBased) MergeBillingPriceUnit

func (t *BillingPriceUsageBased) MergeBillingPriceUnit(v BillingPriceUnit) error

MergeBillingPriceUnit performs a merge with any union data inside the BillingPriceUsageBased, using the provided BillingPriceUnit

func (*BillingPriceUsageBased) MergeBillingPriceVolume

func (t *BillingPriceUsageBased) MergeBillingPriceVolume(v BillingPriceVolume) error

MergeBillingPriceVolume performs a merge with any union data inside the BillingPriceUsageBased, using the provided BillingPriceVolume

func (*BillingPriceUsageBased) UnmarshalJSON

func (t *BillingPriceUsageBased) UnmarshalJSON(b []byte) error

func (BillingPriceUsageBased) ValueByDiscriminator

func (t BillingPriceUsageBased) ValueByDiscriminator() (interface{}, error)

type BillingPriceVolume

type BillingPriceVolume struct {
	// Tiers The tiers of the volume price. At least one tier is required.
	Tiers []BillingPriceTier `json:"tiers"`

	// Type The type of the price.
	Type BillingPriceVolumeType `json:"type"`
}

BillingPriceVolume Volume tiered price.

The maximum quantity within a period determines the per-unit price for all units in that period.

When UnitConfig is present on the containing resource, tier boundaries (up_to_amount) are expressed in converted billing units.

type BillingPriceVolumeType

type BillingPriceVolumeType string

BillingPriceVolumeType The type of the price.

const (
	BillingPriceVolumeTypeVolume BillingPriceVolumeType = "volume"
)

Defines values for BillingPriceVolumeType.

func (BillingPriceVolumeType) Valid

func (e BillingPriceVolumeType) Valid() bool

Valid indicates whether the value is a known member of the BillingPriceVolumeType enum.

type BillingProfile

type BillingProfile struct {
	// Apps The applications used by this billing profile.
	Apps BillingProfileAppReferences `json:"apps"`

	// CreatedAt An ISO-8601 timestamp representation of entity creation date.
	CreatedAt DateTime `json:"created_at"`

	// Default Whether this is the default profile.
	Default bool `json:"default"`

	// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
	DeletedAt *DateTime `json:"deleted_at,omitempty"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`
	Id          ULID    `json:"id"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// Supplier The name and contact information for the supplier this billing profile
	// represents
	Supplier BillingParty `json:"supplier"`

	// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
	UpdatedAt DateTime `json:"updated_at"`

	// Workflow The billing workflow settings for this profile
	Workflow BillingWorkflow `json:"workflow"`
}

BillingProfile Billing profiles contain the settings for billing and controls invoice generation.

type BillingProfileAppReferences

type BillingProfileAppReferences struct {
	// Invoicing The invoicing app used for this workflow.
	Invoicing BillingAppReference `json:"invoicing"`

	// Payment The payment app used for this workflow.
	Payment BillingAppReference `json:"payment"`

	// Tax The tax app used for this workflow.
	Tax BillingAppReference `json:"tax"`
}

BillingProfileAppReferences References to the applications used by a billing profile.

type BillingProfilePagePaginatedResponse

type BillingProfilePagePaginatedResponse struct {
	Data []BillingProfile `json:"data"`

	// Meta returns the pagination information
	Meta PaginatedMeta `json:"meta"`
}

BillingProfilePagePaginatedResponse Page paginated response.

type BillingProfileReference

type BillingProfileReference struct {
	// Id The ID of the billing profile.
	Id ULID `json:"id"`
}

BillingProfileReference Billing profile reference.

type BillingRateCard

type BillingRateCard struct {
	// BillingCadence The billing cadence of the rate card. When null, the charge is one-time
	// (non-recurring). Only valid for flat prices.
	BillingCadence *ISO8601Duration `json:"billing_cadence,omitempty"`

	// Commitments Spend commitments for this rate card. Only applicable to usage-based prices
	// (unit, graduated, volume).
	Commitments *BillingSpendCommitments `json:"commitments,omitempty"`

	// Currency Overrides the containing plan or add-on currency for this rate card. When
	// omitted, the containing resource currency applies.
	Currency *BillingCurrencyCode `json:"currency,omitempty"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// Discounts The discounts of the rate card.
	Discounts *BillingRateCardDiscounts `json:"discounts,omitempty"`

	// Entitlement The entitlement template granted to subscribers of a plan or addon containing
	// this rate card. Requires `feature` to be set.
	Entitlement *BillingRateCardEntitlement `json:"entitlement,omitempty"`

	// Feature The feature associated with the rate card.
	Feature *FeatureReference `json:"feature,omitempty"`

	// Key A key is a unique string that is used to identify a resource.
	Key ResourceKey `json:"key"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// PaymentTerm The payment term of the rate card. In advance payment term can only be used for
	// flat prices.
	PaymentTerm *BillingPricePaymentTerm `json:"payment_term,omitempty"`

	// Price The price of the rate card.
	Price BillingPrice `json:"price"`

	// TaxConfig The tax config of the rate card.
	TaxConfig *TaxCodeConfig `json:"tax_config,omitempty"`

	// UnitConfig Unit conversion configuration for the rate card.
	//
	// Synthesized on read for plans authored with v1 dynamic or package prices:
	// dynamic prices map to a unit price with a multiply unit config, and package
	// prices map to a unit price with a divide unit config.
	//
	// Accepted on create and update only when the UnitConfig feature is enabled on the
	// deployment; otherwise rejected.
	UnitConfig *BillingUnitConfig `json:"unit_config,omitempty"`
}

BillingRateCard A rate card defines the pricing and entitlement of a feature or service.

type BillingRateCardBooleanEntitlement

type BillingRateCardBooleanEntitlement struct {
	// Type The type of the entitlement template.
	Type BillingRateCardBooleanEntitlementType `json:"type"`
}

BillingRateCardBooleanEntitlement The entitlement template of a boolean entitlement.

type BillingRateCardBooleanEntitlementType

type BillingRateCardBooleanEntitlementType string

BillingRateCardBooleanEntitlementType The type of the entitlement template.

const (
	BillingRateCardBooleanEntitlementTypeBoolean BillingRateCardBooleanEntitlementType = "boolean"
)

Defines values for BillingRateCardBooleanEntitlementType.

func (BillingRateCardBooleanEntitlementType) Valid

Valid indicates whether the value is a known member of the BillingRateCardBooleanEntitlementType enum.

type BillingRateCardDiscounts

type BillingRateCardDiscounts struct {
	// Percentage Percentage discount applied to the price (0–100).
	Percentage *float32 `json:"percentage,omitempty"`

	// Usage Number of usage units granted free before billing starts. Only applies to
	// usage-based lines (not flat fees). Usage is treated as zero until this amount is
	// exhausted.
	Usage *Numeric `json:"usage,omitempty"`
}

BillingRateCardDiscounts Discount configuration for a rate card.

type BillingRateCardEntitlement

type BillingRateCardEntitlement struct {
	// contains filtered or unexported fields
}

BillingRateCardEntitlement Entitlement template configured on a rate card. The feature is taken from the rate card itself, so it is omitted here.

func (BillingRateCardEntitlement) AsBillingRateCardBooleanEntitlement

func (t BillingRateCardEntitlement) AsBillingRateCardBooleanEntitlement() (BillingRateCardBooleanEntitlement, error)

AsBillingRateCardBooleanEntitlement returns the union data inside the BillingRateCardEntitlement as a BillingRateCardBooleanEntitlement

func (BillingRateCardEntitlement) AsBillingRateCardMeteredEntitlement

func (t BillingRateCardEntitlement) AsBillingRateCardMeteredEntitlement() (BillingRateCardMeteredEntitlement, error)

AsBillingRateCardMeteredEntitlement returns the union data inside the BillingRateCardEntitlement as a BillingRateCardMeteredEntitlement

func (BillingRateCardEntitlement) AsBillingRateCardStaticEntitlement

func (t BillingRateCardEntitlement) AsBillingRateCardStaticEntitlement() (BillingRateCardStaticEntitlement, error)

AsBillingRateCardStaticEntitlement returns the union data inside the BillingRateCardEntitlement as a BillingRateCardStaticEntitlement

func (BillingRateCardEntitlement) Discriminator

func (t BillingRateCardEntitlement) Discriminator() (string, error)

func (*BillingRateCardEntitlement) FromBillingRateCardBooleanEntitlement

func (t *BillingRateCardEntitlement) FromBillingRateCardBooleanEntitlement(v BillingRateCardBooleanEntitlement) error

FromBillingRateCardBooleanEntitlement overwrites any union data inside the BillingRateCardEntitlement as the provided BillingRateCardBooleanEntitlement

func (*BillingRateCardEntitlement) FromBillingRateCardMeteredEntitlement

func (t *BillingRateCardEntitlement) FromBillingRateCardMeteredEntitlement(v BillingRateCardMeteredEntitlement) error

FromBillingRateCardMeteredEntitlement overwrites any union data inside the BillingRateCardEntitlement as the provided BillingRateCardMeteredEntitlement

func (*BillingRateCardEntitlement) FromBillingRateCardStaticEntitlement

func (t *BillingRateCardEntitlement) FromBillingRateCardStaticEntitlement(v BillingRateCardStaticEntitlement) error

FromBillingRateCardStaticEntitlement overwrites any union data inside the BillingRateCardEntitlement as the provided BillingRateCardStaticEntitlement

func (BillingRateCardEntitlement) MarshalJSON

func (t BillingRateCardEntitlement) MarshalJSON() ([]byte, error)

func (*BillingRateCardEntitlement) MergeBillingRateCardBooleanEntitlement

func (t *BillingRateCardEntitlement) MergeBillingRateCardBooleanEntitlement(v BillingRateCardBooleanEntitlement) error

MergeBillingRateCardBooleanEntitlement performs a merge with any union data inside the BillingRateCardEntitlement, using the provided BillingRateCardBooleanEntitlement

func (*BillingRateCardEntitlement) MergeBillingRateCardMeteredEntitlement

func (t *BillingRateCardEntitlement) MergeBillingRateCardMeteredEntitlement(v BillingRateCardMeteredEntitlement) error

MergeBillingRateCardMeteredEntitlement performs a merge with any union data inside the BillingRateCardEntitlement, using the provided BillingRateCardMeteredEntitlement

func (*BillingRateCardEntitlement) MergeBillingRateCardStaticEntitlement

func (t *BillingRateCardEntitlement) MergeBillingRateCardStaticEntitlement(v BillingRateCardStaticEntitlement) error

MergeBillingRateCardStaticEntitlement performs a merge with any union data inside the BillingRateCardEntitlement, using the provided BillingRateCardStaticEntitlement

func (*BillingRateCardEntitlement) UnmarshalJSON

func (t *BillingRateCardEntitlement) UnmarshalJSON(b []byte) error

func (BillingRateCardEntitlement) ValueByDiscriminator

func (t BillingRateCardEntitlement) ValueByDiscriminator() (interface{}, error)

type BillingRateCardMeteredEntitlement

type BillingRateCardMeteredEntitlement struct {
	// IsSoftLimit If soft limit is true, the subject can use the feature even if the entitlement
	// is exhausted; access remains granted.
	IsSoftLimit *bool `json:"is_soft_limit,omitempty"`

	// Limit The amount of usage granted each usage period, in the feature's unit. Usage is
	// counted against this allowance and the balance resets every usage period. When
	// `is_soft_limit` is true the subject keeps access after the limit is reached;
	// otherwise access is denied once the allowance is exhausted.
	Limit *float64 `json:"limit,omitempty"`

	// Type The type of the entitlement template.
	Type BillingRateCardMeteredEntitlementType `json:"type"`

	// UsagePeriod The reset interval of the metered entitlement in ISO8601 format. Defaults to the
	// billing cadence of the rate card.
	UsagePeriod *ISO8601Duration `json:"usage_period,omitempty"`
}

BillingRateCardMeteredEntitlement The entitlement template of a metered entitlement.

type BillingRateCardMeteredEntitlementType

type BillingRateCardMeteredEntitlementType string

BillingRateCardMeteredEntitlementType The type of the entitlement template.

const (
	BillingRateCardMeteredEntitlementTypeMetered BillingRateCardMeteredEntitlementType = "metered"
)

Defines values for BillingRateCardMeteredEntitlementType.

func (BillingRateCardMeteredEntitlementType) Valid

Valid indicates whether the value is a known member of the BillingRateCardMeteredEntitlementType enum.

type BillingRateCardProrationConfiguration

type BillingRateCardProrationConfiguration struct {
	// Mode The proration mode of the rate card.
	Mode BillingRateCardProrationMode `json:"mode"`
}

BillingRateCardProrationConfiguration The proration configuration of the rate card.

type BillingRateCardProrationMode

type BillingRateCardProrationMode string

BillingRateCardProrationMode The proration mode of the rate card.

Values:

- `no_proration`: No proration. - `prorate_prices`: Prorate the price based on the time remaining in the billing period.

const (
	BillingRateCardProrationModeNoProration   BillingRateCardProrationMode = "no_proration"
	BillingRateCardProrationModeProratePrices BillingRateCardProrationMode = "prorate_prices"
)

Defines values for BillingRateCardProrationMode.

func (BillingRateCardProrationMode) Valid

Valid indicates whether the value is a known member of the BillingRateCardProrationMode enum.

type BillingRateCardStaticEntitlement

type BillingRateCardStaticEntitlement struct {
	// Config The entitlement config as a JSON object. Returned when checking entitlement
	// access; useful for configuring fine-grained access settings implemented in your
	// own system.
	Config interface{} `json:"config"`

	// Type The type of the entitlement template.
	Type BillingRateCardStaticEntitlementType `json:"type"`
}

BillingRateCardStaticEntitlement The entitlement template of a static entitlement.

type BillingRateCardStaticEntitlementType

type BillingRateCardStaticEntitlementType string

BillingRateCardStaticEntitlementType The type of the entitlement template.

const (
	BillingRateCardStaticEntitlementTypeStatic BillingRateCardStaticEntitlementType = "static"
)

Defines values for BillingRateCardStaticEntitlementType.

func (BillingRateCardStaticEntitlementType) Valid

Valid indicates whether the value is a known member of the BillingRateCardStaticEntitlementType enum.

type BillingSettlementMode

type BillingSettlementMode string

BillingSettlementMode Settlement mode for billing.

Values:

- `credit_then_invoice`: Credits are applied first, then any remainder is invoiced. - `credit_only`: Usage is settled exclusively against credits.

const (
	BillingSettlementModeCreditOnly        BillingSettlementMode = "credit_only"
	BillingSettlementModeCreditThenInvoice BillingSettlementMode = "credit_then_invoice"
)

Defines values for BillingSettlementMode.

func (BillingSettlementMode) Valid

func (e BillingSettlementMode) Valid() bool

Valid indicates whether the value is a known member of the BillingSettlementMode enum.

type BillingSpendCommitments

type BillingSpendCommitments struct {
	// MaximumAmount The customer is limited to spend at most the amount.
	MaximumAmount *Numeric `json:"maximum_amount,omitempty"`

	// MinimumAmount The customer is committed to spend at least the amount.
	MinimumAmount *Numeric `json:"minimum_amount,omitempty"`
}

BillingSpendCommitments Spend commitments for a usage-based price. The customer is committed to spend at least the minimum amount and at most the maximum amount.

type BillingSubscription

type BillingSubscription struct {
	// ActiveFrom An ISO-8601 timestamp representation of when the subscription became (or will
	// become) active.
	ActiveFrom DateTime `json:"active_from"`

	// ActiveTo An ISO-8601 timestamp representation of when the subscription stops being
	// active. Open-ended when not set.
	ActiveTo *DateTime `json:"active_to,omitempty"`

	// BillingAnchor A billing anchor is the fixed point in time that determines the subscription's
	// recurring billing cycle. It affects when charges occur and how prorations are
	// calculated. Common anchors:
	//
	// - Calendar month (1st of each month): `2025-01-01T00:00:00Z`
	// - Subscription anniversary (day customer signed up)
	// - Custom date (customer-specified day)
	BillingAnchor DateTime `json:"billing_anchor"`

	// BillingCadence The billing cadence of the subscription in ISO-8601 duration format. Defines how
	// often the customer is billed. Examples: `P1M` (monthly), `P3M` (quarterly),
	// `P1Y` (annually).
	BillingCadence ISO8601Duration `json:"billing_cadence"`

	// CostBasisMode Controls whether custom-currency cost bases are resolved dynamically or pinned
	// when their currency pair is introduced to the subscription.
	CostBasisMode BillingSubscriptionCostBasisMode `json:"cost_basis_mode"`

	// CostBasisPins Cost bases pinned to custom-currency pairs for this subscription.
	CostBasisPins []BillingSubscriptionCostBasisPin `json:"cost_basis_pins"`

	// CreatedAt An ISO-8601 timestamp representation of entity creation date.
	CreatedAt DateTime `json:"created_at"`

	// CurrentPeriod The current aligned billing period. Present only when the subscription is active
	// and aligned.
	CurrentPeriod *ClosedPeriod `json:"current_period,omitempty"`

	// CustomerId The customer ID of the subscription.
	CustomerId ULID `json:"customer_id"`

	// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
	DeletedAt *DateTime `json:"deleted_at,omitempty"`

	// Description Optional description of the subscription.
	Description *string `json:"description,omitempty"`
	Id          ULID    `json:"id"`

	// InvoiceCurrency The fiat currency in which the subscription is invoiced.
	InvoiceCurrency CurrencyCode `json:"invoice_currency"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the subscription. Defaults to the plan name when the
	// subscription is created from a plan.
	Name string `json:"name"`

	// Phases The phases of the subscription in chronological order. A phase groups the rate
	// cards that are in effect for a segment of the subscription's lifetime.
	Phases []BillingSubscriptionPhase `json:"phases"`

	// Plan The plan the subscription was created from, if any. Includes the plan key and
	// version so clients can resolve the exact plan revision.
	Plan *BillingSubscriptionPlanReference `json:"plan,omitempty"`

	// PlanId The plan ID of the subscription. Set if subscription is created from a plan.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	PlanId *ULID `json:"plan_id,omitempty"`

	// ProRatingConfig The pro-rating configuration of the subscription.
	ProRatingConfig *BillingSubscriptionProRatingConfig `json:"pro_rating_config,omitempty"`

	// SettlementMode Settlement mode for billing.
	//
	// Values:
	//
	// - `credit_then_invoice`: Credits are applied first, then any remainder is
	// invoiced.
	// - `credit_only`: Usage is settled exclusively against credits.
	SettlementMode *BillingSettlementMode `json:"settlement_mode,omitempty"`

	// Status The status of the subscription.
	Status BillingSubscriptionStatus `json:"status"`

	// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
	UpdatedAt DateTime `json:"updated_at"`
}

BillingSubscription Subscription.

type BillingSubscriptionAddonUpdate

type BillingSubscriptionAddonUpdate struct {
	// Quantity The new quantity of the add-on. Must be at least 0. A quantity of 0 removes the
	// add-on from the point the timing resolves to.
	Quantity int `json:"quantity"`

	// Timing The timing of the update. A new entry is appended to the add-on's timeline at
	// this point.
	Timing BillingSubscriptionEditTiming `json:"timing"`
}

BillingSubscriptionAddonUpdate Request for updating a subscription add-on. Only the quantity can be changed; the timing controls when the new quantity takes effect.

type BillingSubscriptionBase

type BillingSubscriptionBase struct {
	// ActiveFrom An ISO-8601 timestamp representation of when the subscription became (or will
	// become) active.
	ActiveFrom DateTime `json:"active_from"`

	// ActiveTo An ISO-8601 timestamp representation of when the subscription stops being
	// active. Open-ended when not set.
	ActiveTo *DateTime `json:"active_to,omitempty"`

	// BillingAnchor A billing anchor is the fixed point in time that determines the subscription's
	// recurring billing cycle. It affects when charges occur and how prorations are
	// calculated. Common anchors:
	//
	// - Calendar month (1st of each month): `2025-01-01T00:00:00Z`
	// - Subscription anniversary (day customer signed up)
	// - Custom date (customer-specified day)
	BillingAnchor DateTime `json:"billing_anchor"`

	// BillingCadence The billing cadence of the subscription in ISO-8601 duration format. Defines how
	// often the customer is billed. Examples: `P1M` (monthly), `P3M` (quarterly),
	// `P1Y` (annually).
	BillingCadence ISO8601Duration `json:"billing_cadence"`

	// CostBasisMode Controls whether custom-currency cost bases are resolved dynamically or pinned
	// when their currency pair is introduced to the subscription.
	CostBasisMode BillingSubscriptionCostBasisMode `json:"cost_basis_mode"`

	// CostBasisPins Cost bases pinned to custom-currency pairs for this subscription.
	CostBasisPins []BillingSubscriptionCostBasisPin `json:"cost_basis_pins"`

	// CreatedAt An ISO-8601 timestamp representation of entity creation date.
	CreatedAt DateTime `json:"created_at"`

	// CustomerId The customer ID of the subscription.
	CustomerId ULID `json:"customer_id"`

	// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
	DeletedAt *DateTime `json:"deleted_at,omitempty"`

	// Description Optional description of the subscription.
	Description *string `json:"description,omitempty"`
	Id          ULID    `json:"id"`

	// InvoiceCurrency The fiat currency in which the subscription is invoiced.
	InvoiceCurrency CurrencyCode `json:"invoice_currency"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the subscription. Defaults to the plan name when the
	// subscription is created from a plan.
	Name string `json:"name"`

	// Plan The plan the subscription was created from, if any. Includes the plan key and
	// version so clients can resolve the exact plan revision.
	Plan *BillingSubscriptionPlanReference `json:"plan,omitempty"`

	// PlanId The plan ID of the subscription. Set if subscription is created from a plan.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	PlanId *ULID `json:"plan_id,omitempty"`

	// ProRatingConfig The pro-rating configuration of the subscription.
	ProRatingConfig *BillingSubscriptionProRatingConfig `json:"pro_rating_config,omitempty"`

	// SettlementMode Settlement mode for billing.
	//
	// Values:
	//
	// - `credit_then_invoice`: Credits are applied first, then any remainder is
	// invoiced.
	// - `credit_only`: Usage is settled exclusively against credits.
	SettlementMode *BillingSettlementMode `json:"settlement_mode,omitempty"`

	// Status The status of the subscription.
	Status BillingSubscriptionStatus `json:"status"`

	// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
	UpdatedAt DateTime `json:"updated_at"`
}

BillingSubscriptionBase Subscription fields without phases or the current billing period.

type BillingSubscriptionCancel

type BillingSubscriptionCancel struct {
	// Timing If not provided the subscription is canceled immediately.
	Timing *BillingSubscriptionEditTiming `json:"timing,omitempty"`
}

BillingSubscriptionCancel Request for canceling a subscription.

type BillingSubscriptionChange

type BillingSubscriptionChange struct {
	// BillingAnchor A billing anchor is the fixed point in time that determines the subscription's
	// recurring billing cycle. It affects when charges occur and how prorations are
	// calculated. Common anchors:
	//
	// - Calendar month (1st of each month): `2025-01-01T00:00:00Z`
	// - Subscription anniversary (day customer signed up)
	// - Custom date (customer-specified day)
	//
	// If not provided, the subscription will be created with the subscription's
	// creation time as the billing anchor.
	BillingAnchor *DateTime `json:"billing_anchor,omitempty"`

	// CostBasisMode Controls how custom-currency cost bases are selected for the subscription.
	CostBasisMode *BillingSubscriptionCostBasisMode `json:"cost_basis_mode,omitempty"`

	// CustomPlan An inline plan definition to create the subscription from, without referencing a
	// published plan.
	//
	// Exactly one of `plan` or `custom_plan` must be provided. The subscription is not
	// linked to a persisted plan, so the response omits the `plan` reference.
	CustomPlan *BillingSubscriptionCustomPlan `json:"custom_plan,omitempty"`

	// Customer The customer to create the subscription for.
	Customer struct {
		// Id The ID of the customer to create the subscription for.
		//
		// Either customer ID or customer key must be provided. If both are provided, the
		// ID will be used.
		Id *ULID `json:"id,omitempty"`

		// Key The key of the customer to create the subscription for.
		//
		// Either customer ID or customer key must be provided. If both are provided, the
		// ID will be used.
		Key *ExternalResourceKey `json:"key,omitempty"`
	} `json:"customer"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Plan A reference to a published plan the subscription is created from.
	//
	// Exactly one of `plan` or `custom_plan` must be provided. Use `plan` to base the
	// subscription on an existing published plan; use `custom_plan` to define the plan
	// inline.
	Plan *struct {
		// Id The plan ID of the subscription. Set if subscription is created from a plan.
		//
		// ID or Key of the plan is required if creating a subscription from a plan. If
		// both are provided, the ID will be used.
		Id *ULID `json:"id,omitempty"`

		// Key The plan Key of the subscription, if any. Set if subscription is created from a
		// plan.
		//
		// ID or Key of the plan is required if creating a subscription from a plan. If
		// both are provided, the ID will be used.
		Key *ResourceKey `json:"key,omitempty"`

		// Version The plan version of the subscription, if any. If not provided, the latest
		// version of the plan will be used.
		Version *int `json:"version,omitempty"`
	} `json:"plan,omitempty"`

	// SettlementMode Settlement mode for billing.
	//
	// Values:
	//
	// - `credit_then_invoice`: Credits are applied first, then any remainder is
	// invoiced.
	// - `credit_only`: Usage is settled exclusively against credits.
	SettlementMode *BillingSettlementMode `json:"settlement_mode,omitempty"`

	// StartingPhase The key of the phase to start the subscription in. If not provided, the
	// subscription starts in the first phase of the plan.
	//
	// Only applies when creating from a published `plan`; custom plans define their
	// own phases inline.
	StartingPhase *string `json:"starting_phase,omitempty"`

	// Timing Timing configuration for the change, when the change should take effect. For
	// changing a subscription, the accepted values depend on the subscription
	// configuration.
	Timing BillingSubscriptionEditTiming `json:"timing"`
}

BillingSubscriptionChange Request for changing a subscription.

type BillingSubscriptionChangeResponse

type BillingSubscriptionChangeResponse struct {
	// Current The current subscription before the change.
	Current BillingSubscription `json:"current"`

	// Next The new state of the subscription after the change.
	Next BillingSubscription `json:"next"`
}

BillingSubscriptionChangeResponse Response for changing a subscription.

type BillingSubscriptionCostBasisMode

type BillingSubscriptionCostBasisMode string

BillingSubscriptionCostBasisMode Controls how custom-currency cost bases are selected for the subscription.

const (
	BillingSubscriptionCostBasisModeDynamic BillingSubscriptionCostBasisMode = "dynamic"
	BillingSubscriptionCostBasisModePinned  BillingSubscriptionCostBasisMode = "pinned"
)

Defines values for BillingSubscriptionCostBasisMode.

func (BillingSubscriptionCostBasisMode) Valid

Valid indicates whether the value is a known member of the BillingSubscriptionCostBasisMode enum.

type BillingSubscriptionCostBasisPin

type BillingSubscriptionCostBasisPin struct {
	// CostBasisId The pinned cost basis resource ID.
	CostBasisId ULID `json:"cost_basis_id"`

	// CustomCurrencyId The managed custom currency ID.
	CustomCurrencyId ULID `json:"custom_currency_id"`

	// InvoiceCurrency The fiat currency in which the subscription is invoiced.
	InvoiceCurrency CurrencyCode `json:"invoice_currency"`
}

BillingSubscriptionCostBasisPin A cost basis pinned to a custom-currency pair for the subscription.

type BillingSubscriptionCreate

type BillingSubscriptionCreate struct {
	// BillingAnchor A billing anchor is the fixed point in time that determines the subscription's
	// recurring billing cycle. It affects when charges occur and how prorations are
	// calculated. Common anchors:
	//
	// - Calendar month (1st of each month): `2025-01-01T00:00:00Z`
	// - Subscription anniversary (day customer signed up)
	// - Custom date (customer-specified day)
	//
	// If not provided, the subscription will be created with the subscription's
	// creation time as the billing anchor.
	BillingAnchor *DateTime `json:"billing_anchor,omitempty"`

	// CostBasisMode Controls how custom-currency cost bases are selected for the subscription.
	CostBasisMode *BillingSubscriptionCostBasisMode `json:"cost_basis_mode,omitempty"`

	// CustomPlan An inline plan definition to create the subscription from, without referencing a
	// published plan.
	//
	// Exactly one of `plan` or `custom_plan` must be provided. The subscription is not
	// linked to a persisted plan, so the response omits the `plan` reference.
	CustomPlan *BillingSubscriptionCustomPlan `json:"custom_plan,omitempty"`

	// Customer The customer to create the subscription for.
	Customer struct {
		// Id The ID of the customer to create the subscription for.
		//
		// Either customer ID or customer key must be provided. If both are provided, the
		// ID will be used.
		Id *ULID `json:"id,omitempty"`

		// Key The key of the customer to create the subscription for.
		//
		// Either customer ID or customer key must be provided. If both are provided, the
		// ID will be used.
		Key *ExternalResourceKey `json:"key,omitempty"`
	} `json:"customer"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Plan A reference to a published plan the subscription is created from.
	//
	// Exactly one of `plan` or `custom_plan` must be provided. Use `plan` to base the
	// subscription on an existing published plan; use `custom_plan` to define the plan
	// inline.
	Plan *struct {
		// Id The plan ID of the subscription. Set if subscription is created from a plan.
		//
		// ID or Key of the plan is required if creating a subscription from a plan. If
		// both are provided, the ID will be used.
		Id *ULID `json:"id,omitempty"`

		// Key The plan Key of the subscription, if any. Set if subscription is created from a
		// plan.
		//
		// ID or Key of the plan is required if creating a subscription from a plan. If
		// both are provided, the ID will be used.
		Key *ResourceKey `json:"key,omitempty"`

		// Version The plan version of the subscription, if any. If not provided, the latest
		// version of the plan will be used.
		Version *int `json:"version,omitempty"`
	} `json:"plan,omitempty"`

	// SettlementMode Settlement mode for billing.
	//
	// Values:
	//
	// - `credit_then_invoice`: Credits are applied first, then any remainder is
	// invoiced.
	// - `credit_only`: Usage is settled exclusively against credits.
	SettlementMode *BillingSettlementMode `json:"settlement_mode,omitempty"`

	// StartingPhase The key of the phase to start the subscription in. If not provided, the
	// subscription starts in the first phase of the plan.
	//
	// Only applies when creating from a published `plan`; custom plans define their
	// own phases inline.
	StartingPhase *string `json:"starting_phase,omitempty"`

	// Timing When the subscription should start. If not provided, the subscription starts
	// immediately. Provide a future timestamp to schedule the subscription to start
	// later — this creates a not-yet-active, scheduled subscription. A timestamp in
	// the past is rejected.
	Timing *BillingSubscriptionCreateTiming `json:"timing,omitempty"`
}

BillingSubscriptionCreate defines model for BillingSubscriptionCreate.

type BillingSubscriptionCreateTiming

type BillingSubscriptionCreateTiming struct {
	// contains filtered or unexported fields
}

BillingSubscriptionCreateTiming When a subscription should start: immediate (the default) or a custom timestamp to schedule a future start.

func (BillingSubscriptionCreateTiming) AsBillingSubscriptionCreateTimingEnum

func (t BillingSubscriptionCreateTiming) AsBillingSubscriptionCreateTimingEnum() (BillingSubscriptionCreateTimingEnum, error)

AsBillingSubscriptionCreateTimingEnum returns the union data inside the BillingSubscriptionCreateTiming as a BillingSubscriptionCreateTimingEnum

func (BillingSubscriptionCreateTiming) AsDateTime

AsDateTime returns the union data inside the BillingSubscriptionCreateTiming as a DateTime

func (*BillingSubscriptionCreateTiming) FromBillingSubscriptionCreateTimingEnum

func (t *BillingSubscriptionCreateTiming) FromBillingSubscriptionCreateTimingEnum(v BillingSubscriptionCreateTimingEnum) error

FromBillingSubscriptionCreateTimingEnum overwrites any union data inside the BillingSubscriptionCreateTiming as the provided BillingSubscriptionCreateTimingEnum

func (*BillingSubscriptionCreateTiming) FromDateTime

func (t *BillingSubscriptionCreateTiming) FromDateTime(v DateTime) error

FromDateTime overwrites any union data inside the BillingSubscriptionCreateTiming as the provided DateTime

func (BillingSubscriptionCreateTiming) MarshalJSON

func (t BillingSubscriptionCreateTiming) MarshalJSON() ([]byte, error)

func (*BillingSubscriptionCreateTiming) MergeBillingSubscriptionCreateTimingEnum

func (t *BillingSubscriptionCreateTiming) MergeBillingSubscriptionCreateTimingEnum(v BillingSubscriptionCreateTimingEnum) error

MergeBillingSubscriptionCreateTimingEnum performs a merge with any union data inside the BillingSubscriptionCreateTiming, using the provided BillingSubscriptionCreateTimingEnum

func (*BillingSubscriptionCreateTiming) MergeDateTime

func (t *BillingSubscriptionCreateTiming) MergeDateTime(v DateTime) error

MergeDateTime performs a merge with any union data inside the BillingSubscriptionCreateTiming, using the provided DateTime

func (*BillingSubscriptionCreateTiming) UnmarshalJSON

func (t *BillingSubscriptionCreateTiming) UnmarshalJSON(b []byte) error

type BillingSubscriptionCreateTimingEnum

type BillingSubscriptionCreateTimingEnum string

BillingSubscriptionCreateTimingEnum Subscription create timing. Only immediate is supported as an enum value — unlike edit timing, next_billing_cycle is not accepted on create, since a new subscription has no current billing cycle to schedule against.

const (
	BillingSubscriptionCreateTimingEnumImmediate BillingSubscriptionCreateTimingEnum = "immediate"
)

Defines values for BillingSubscriptionCreateTimingEnum.

func (BillingSubscriptionCreateTimingEnum) Valid

Valid indicates whether the value is a known member of the BillingSubscriptionCreateTimingEnum enum.

type BillingSubscriptionCustomPlan

type BillingSubscriptionCustomPlan struct {
	// BillingCadence The billing cadence for subscriptions using this plan.
	BillingCadence ISO8601Duration `json:"billing_cadence"`

	// Currency The currency code of the plan.
	Currency BillingCurrencyCode `json:"currency"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// Phases The plan phases define the pricing ramp for a subscription. A phase switch
	// occurs only at the end of a billing period. At least one phase is required.
	Phases []BillingPlanPhase `json:"phases"`

	// ProRatingEnabled Whether pro-rating is enabled for this plan.
	ProRatingEnabled *bool `json:"pro_rating_enabled,omitempty"`
}

BillingSubscriptionCustomPlan An inline (custom) plan definition used to create or change a subscription without referencing a published plan. Mirrors the plan create shape without a key or version, since a custom plan is not persisted or versioned on its own.

`settlement_mode` is also omitted: it is a subscription-level concern set via the `settlement_mode` field on the create/change request, not on the inline plan.

type BillingSubscriptionEdit

type BillingSubscriptionEdit struct {
	// Customizations The ordered batch of customizations to apply to the running subscription.
	Customizations []BillingSubscriptionEditOperation `json:"customizations"`

	// Timing When the requested changes should take effect. Defaults to immediate.
	Timing *BillingSubscriptionEditTiming `json:"timing,omitempty"`
}

BillingSubscriptionEdit Request for editing a running subscription. Applies an ordered batch of customizations to the subscription's phases and items. A later customization observes the state produced by earlier ones.

type BillingSubscriptionEditAddItem

type BillingSubscriptionEditAddItem struct {
	// PhaseKey The key of the phase to add the item to.
	PhaseKey string `json:"phase_key"`

	// RateCard The rate card describing what the customer gets and pays for the new item.
	RateCard BillingRateCard `json:"rate_card"`

	// Type Discriminator for the add-item operation.
	Type BillingSubscriptionEditAddItemType `json:"type"`
}

BillingSubscriptionEditAddItem Add a new rate card to a phase. Adding an item to the current phase closes the active version of the same item key and appends a new version.

type BillingSubscriptionEditAddItemType

type BillingSubscriptionEditAddItemType string

BillingSubscriptionEditAddItemType Discriminator for the add-item operation.

const (
	BillingSubscriptionEditAddItemTypeAddItem BillingSubscriptionEditAddItemType = "add_item"
)

Defines values for BillingSubscriptionEditAddItemType.

func (BillingSubscriptionEditAddItemType) Valid

Valid indicates whether the value is a known member of the BillingSubscriptionEditAddItemType enum.

type BillingSubscriptionEditAddPhase

type BillingSubscriptionEditAddPhase struct {
	// Phase The phase to add.
	Phase BillingSubscriptionPhaseCreate `json:"phase"`

	// Type Discriminator for the add-phase operation.
	Type BillingSubscriptionEditAddPhaseType `json:"type"`
}

BillingSubscriptionEditAddPhase Add a new phase to the subscription. The phase is created without items; use add-item operations to populate it.

type BillingSubscriptionEditAddPhaseType

type BillingSubscriptionEditAddPhaseType string

BillingSubscriptionEditAddPhaseType Discriminator for the add-phase operation.

const (
	BillingSubscriptionEditAddPhaseTypeAddPhase BillingSubscriptionEditAddPhaseType = "add_phase"
)

Defines values for BillingSubscriptionEditAddPhaseType.

func (BillingSubscriptionEditAddPhaseType) Valid

Valid indicates whether the value is a known member of the BillingSubscriptionEditAddPhaseType enum.

type BillingSubscriptionEditOperation

type BillingSubscriptionEditOperation struct {
	// contains filtered or unexported fields
}

BillingSubscriptionEditOperation A single customization to apply to a running subscription. The `type` field discriminates which operation is performed.

func (BillingSubscriptionEditOperation) AsBillingSubscriptionEditAddItem

func (t BillingSubscriptionEditOperation) AsBillingSubscriptionEditAddItem() (BillingSubscriptionEditAddItem, error)

AsBillingSubscriptionEditAddItem returns the union data inside the BillingSubscriptionEditOperation as a BillingSubscriptionEditAddItem

func (BillingSubscriptionEditOperation) AsBillingSubscriptionEditAddPhase

func (t BillingSubscriptionEditOperation) AsBillingSubscriptionEditAddPhase() (BillingSubscriptionEditAddPhase, error)

AsBillingSubscriptionEditAddPhase returns the union data inside the BillingSubscriptionEditOperation as a BillingSubscriptionEditAddPhase

func (BillingSubscriptionEditOperation) AsBillingSubscriptionEditRemoveItem

func (t BillingSubscriptionEditOperation) AsBillingSubscriptionEditRemoveItem() (BillingSubscriptionEditRemoveItem, error)

AsBillingSubscriptionEditRemoveItem returns the union data inside the BillingSubscriptionEditOperation as a BillingSubscriptionEditRemoveItem

func (BillingSubscriptionEditOperation) AsBillingSubscriptionEditRemovePhase

func (t BillingSubscriptionEditOperation) AsBillingSubscriptionEditRemovePhase() (BillingSubscriptionEditRemovePhase, error)

AsBillingSubscriptionEditRemovePhase returns the union data inside the BillingSubscriptionEditOperation as a BillingSubscriptionEditRemovePhase

func (BillingSubscriptionEditOperation) AsBillingSubscriptionEditStretchPhase

func (t BillingSubscriptionEditOperation) AsBillingSubscriptionEditStretchPhase() (BillingSubscriptionEditStretchPhase, error)

AsBillingSubscriptionEditStretchPhase returns the union data inside the BillingSubscriptionEditOperation as a BillingSubscriptionEditStretchPhase

func (BillingSubscriptionEditOperation) AsBillingSubscriptionEditUnscheduleEdit

func (t BillingSubscriptionEditOperation) AsBillingSubscriptionEditUnscheduleEdit() (BillingSubscriptionEditUnscheduleEdit, error)

AsBillingSubscriptionEditUnscheduleEdit returns the union data inside the BillingSubscriptionEditOperation as a BillingSubscriptionEditUnscheduleEdit

func (BillingSubscriptionEditOperation) Discriminator

func (t BillingSubscriptionEditOperation) Discriminator() (string, error)

func (*BillingSubscriptionEditOperation) FromBillingSubscriptionEditAddItem

func (t *BillingSubscriptionEditOperation) FromBillingSubscriptionEditAddItem(v BillingSubscriptionEditAddItem) error

FromBillingSubscriptionEditAddItem overwrites any union data inside the BillingSubscriptionEditOperation as the provided BillingSubscriptionEditAddItem

func (*BillingSubscriptionEditOperation) FromBillingSubscriptionEditAddPhase

func (t *BillingSubscriptionEditOperation) FromBillingSubscriptionEditAddPhase(v BillingSubscriptionEditAddPhase) error

FromBillingSubscriptionEditAddPhase overwrites any union data inside the BillingSubscriptionEditOperation as the provided BillingSubscriptionEditAddPhase

func (*BillingSubscriptionEditOperation) FromBillingSubscriptionEditRemoveItem

func (t *BillingSubscriptionEditOperation) FromBillingSubscriptionEditRemoveItem(v BillingSubscriptionEditRemoveItem) error

FromBillingSubscriptionEditRemoveItem overwrites any union data inside the BillingSubscriptionEditOperation as the provided BillingSubscriptionEditRemoveItem

func (*BillingSubscriptionEditOperation) FromBillingSubscriptionEditRemovePhase

func (t *BillingSubscriptionEditOperation) FromBillingSubscriptionEditRemovePhase(v BillingSubscriptionEditRemovePhase) error

FromBillingSubscriptionEditRemovePhase overwrites any union data inside the BillingSubscriptionEditOperation as the provided BillingSubscriptionEditRemovePhase

func (*BillingSubscriptionEditOperation) FromBillingSubscriptionEditStretchPhase

func (t *BillingSubscriptionEditOperation) FromBillingSubscriptionEditStretchPhase(v BillingSubscriptionEditStretchPhase) error

FromBillingSubscriptionEditStretchPhase overwrites any union data inside the BillingSubscriptionEditOperation as the provided BillingSubscriptionEditStretchPhase

func (*BillingSubscriptionEditOperation) FromBillingSubscriptionEditUnscheduleEdit

func (t *BillingSubscriptionEditOperation) FromBillingSubscriptionEditUnscheduleEdit(v BillingSubscriptionEditUnscheduleEdit) error

FromBillingSubscriptionEditUnscheduleEdit overwrites any union data inside the BillingSubscriptionEditOperation as the provided BillingSubscriptionEditUnscheduleEdit

func (BillingSubscriptionEditOperation) MarshalJSON

func (t BillingSubscriptionEditOperation) MarshalJSON() ([]byte, error)

func (*BillingSubscriptionEditOperation) MergeBillingSubscriptionEditAddItem

func (t *BillingSubscriptionEditOperation) MergeBillingSubscriptionEditAddItem(v BillingSubscriptionEditAddItem) error

MergeBillingSubscriptionEditAddItem performs a merge with any union data inside the BillingSubscriptionEditOperation, using the provided BillingSubscriptionEditAddItem

func (*BillingSubscriptionEditOperation) MergeBillingSubscriptionEditAddPhase

func (t *BillingSubscriptionEditOperation) MergeBillingSubscriptionEditAddPhase(v BillingSubscriptionEditAddPhase) error

MergeBillingSubscriptionEditAddPhase performs a merge with any union data inside the BillingSubscriptionEditOperation, using the provided BillingSubscriptionEditAddPhase

func (*BillingSubscriptionEditOperation) MergeBillingSubscriptionEditRemoveItem

func (t *BillingSubscriptionEditOperation) MergeBillingSubscriptionEditRemoveItem(v BillingSubscriptionEditRemoveItem) error

MergeBillingSubscriptionEditRemoveItem performs a merge with any union data inside the BillingSubscriptionEditOperation, using the provided BillingSubscriptionEditRemoveItem

func (*BillingSubscriptionEditOperation) MergeBillingSubscriptionEditRemovePhase

func (t *BillingSubscriptionEditOperation) MergeBillingSubscriptionEditRemovePhase(v BillingSubscriptionEditRemovePhase) error

MergeBillingSubscriptionEditRemovePhase performs a merge with any union data inside the BillingSubscriptionEditOperation, using the provided BillingSubscriptionEditRemovePhase

func (*BillingSubscriptionEditOperation) MergeBillingSubscriptionEditStretchPhase

func (t *BillingSubscriptionEditOperation) MergeBillingSubscriptionEditStretchPhase(v BillingSubscriptionEditStretchPhase) error

MergeBillingSubscriptionEditStretchPhase performs a merge with any union data inside the BillingSubscriptionEditOperation, using the provided BillingSubscriptionEditStretchPhase

func (*BillingSubscriptionEditOperation) MergeBillingSubscriptionEditUnscheduleEdit

func (t *BillingSubscriptionEditOperation) MergeBillingSubscriptionEditUnscheduleEdit(v BillingSubscriptionEditUnscheduleEdit) error

MergeBillingSubscriptionEditUnscheduleEdit performs a merge with any union data inside the BillingSubscriptionEditOperation, using the provided BillingSubscriptionEditUnscheduleEdit

func (*BillingSubscriptionEditOperation) UnmarshalJSON

func (t *BillingSubscriptionEditOperation) UnmarshalJSON(b []byte) error

func (BillingSubscriptionEditOperation) ValueByDiscriminator

func (t BillingSubscriptionEditOperation) ValueByDiscriminator() (interface{}, error)

type BillingSubscriptionEditRemoveItem

type BillingSubscriptionEditRemoveItem struct {
	// ItemKey The key of the item to remove.
	ItemKey string `json:"item_key"`

	// PhaseKey The key of the phase to remove the item from.
	PhaseKey string `json:"phase_key"`

	// Type Discriminator for the remove-item operation.
	Type BillingSubscriptionEditRemoveItemType `json:"type"`
}

BillingSubscriptionEditRemoveItem Remove a rate card from a phase.

type BillingSubscriptionEditRemoveItemType

type BillingSubscriptionEditRemoveItemType string

BillingSubscriptionEditRemoveItemType Discriminator for the remove-item operation.

const (
	BillingSubscriptionEditRemoveItemTypeRemoveItem BillingSubscriptionEditRemoveItemType = "remove_item"
)

Defines values for BillingSubscriptionEditRemoveItemType.

func (BillingSubscriptionEditRemoveItemType) Valid

Valid indicates whether the value is a known member of the BillingSubscriptionEditRemoveItemType enum.

type BillingSubscriptionEditRemovePhase

type BillingSubscriptionEditRemovePhase struct {
	// PhaseKey The key of the phase to remove.
	PhaseKey string `json:"phase_key"`

	// Shift The direction to shift surrounding phases to fill the removed phase's span.
	Shift BillingSubscriptionRemovePhaseShifting `json:"shift"`

	// Type Discriminator for the remove-phase operation.
	Type BillingSubscriptionEditRemovePhaseType `json:"type"`
}

BillingSubscriptionEditRemovePhase Remove a phase from the subscription.

type BillingSubscriptionEditRemovePhaseType

type BillingSubscriptionEditRemovePhaseType string

BillingSubscriptionEditRemovePhaseType Discriminator for the remove-phase operation.

const (
	BillingSubscriptionEditRemovePhaseTypeRemovePhase BillingSubscriptionEditRemovePhaseType = "remove_phase"
)

Defines values for BillingSubscriptionEditRemovePhaseType.

func (BillingSubscriptionEditRemovePhaseType) Valid

Valid indicates whether the value is a known member of the BillingSubscriptionEditRemovePhaseType enum.

type BillingSubscriptionEditStretchPhase

type BillingSubscriptionEditStretchPhase struct {
	// ExtendBy The ISO-8601 duration to extend the phase by.
	ExtendBy ISO8601Duration `json:"extend_by"`

	// PhaseKey The key of the phase to stretch.
	PhaseKey string `json:"phase_key"`

	// Type Discriminator for the stretch-phase operation.
	Type BillingSubscriptionEditStretchPhaseType `json:"type"`
}

BillingSubscriptionEditStretchPhase Extend the duration of a phase, shifting later phases by the same amount.

type BillingSubscriptionEditStretchPhaseType

type BillingSubscriptionEditStretchPhaseType string

BillingSubscriptionEditStretchPhaseType Discriminator for the stretch-phase operation.

const (
	BillingSubscriptionEditStretchPhaseTypeStretchPhase BillingSubscriptionEditStretchPhaseType = "stretch_phase"
)

Defines values for BillingSubscriptionEditStretchPhaseType.

func (BillingSubscriptionEditStretchPhaseType) Valid

Valid indicates whether the value is a known member of the BillingSubscriptionEditStretchPhaseType enum.

type BillingSubscriptionEditTiming

type BillingSubscriptionEditTiming struct {
	// contains filtered or unexported fields
}

BillingSubscriptionEditTiming Subscription edit timing defined when the changes should take effect. If the provided configuration is not supported by the subscription, an error will be returned.

func (BillingSubscriptionEditTiming) AsBillingSubscriptionEditTimingEnum

func (t BillingSubscriptionEditTiming) AsBillingSubscriptionEditTimingEnum() (BillingSubscriptionEditTimingEnum, error)

AsBillingSubscriptionEditTimingEnum returns the union data inside the BillingSubscriptionEditTiming as a BillingSubscriptionEditTimingEnum

func (BillingSubscriptionEditTiming) AsDateTime

func (t BillingSubscriptionEditTiming) AsDateTime() (DateTime, error)

AsDateTime returns the union data inside the BillingSubscriptionEditTiming as a DateTime

func (*BillingSubscriptionEditTiming) FromBillingSubscriptionEditTimingEnum

func (t *BillingSubscriptionEditTiming) FromBillingSubscriptionEditTimingEnum(v BillingSubscriptionEditTimingEnum) error

FromBillingSubscriptionEditTimingEnum overwrites any union data inside the BillingSubscriptionEditTiming as the provided BillingSubscriptionEditTimingEnum

func (*BillingSubscriptionEditTiming) FromDateTime

func (t *BillingSubscriptionEditTiming) FromDateTime(v DateTime) error

FromDateTime overwrites any union data inside the BillingSubscriptionEditTiming as the provided DateTime

func (BillingSubscriptionEditTiming) MarshalJSON

func (t BillingSubscriptionEditTiming) MarshalJSON() ([]byte, error)

func (*BillingSubscriptionEditTiming) MergeBillingSubscriptionEditTimingEnum

func (t *BillingSubscriptionEditTiming) MergeBillingSubscriptionEditTimingEnum(v BillingSubscriptionEditTimingEnum) error

MergeBillingSubscriptionEditTimingEnum performs a merge with any union data inside the BillingSubscriptionEditTiming, using the provided BillingSubscriptionEditTimingEnum

func (*BillingSubscriptionEditTiming) MergeDateTime

func (t *BillingSubscriptionEditTiming) MergeDateTime(v DateTime) error

MergeDateTime performs a merge with any union data inside the BillingSubscriptionEditTiming, using the provided DateTime

func (*BillingSubscriptionEditTiming) UnmarshalJSON

func (t *BillingSubscriptionEditTiming) UnmarshalJSON(b []byte) error

type BillingSubscriptionEditTimingEnum

type BillingSubscriptionEditTimingEnum string

BillingSubscriptionEditTimingEnum Subscription edit timing. When immediate, the requested changes take effect immediately. When next_billing_cycle, the requested changes take effect at the next billing cycle.

const (
	BillingSubscriptionEditTimingEnumImmediate        BillingSubscriptionEditTimingEnum = "immediate"
	BillingSubscriptionEditTimingEnumNextBillingCycle BillingSubscriptionEditTimingEnum = "next_billing_cycle"
)

Defines values for BillingSubscriptionEditTimingEnum.

func (BillingSubscriptionEditTimingEnum) Valid

Valid indicates whether the value is a known member of the BillingSubscriptionEditTimingEnum enum.

type BillingSubscriptionEditUnscheduleEdit

type BillingSubscriptionEditUnscheduleEdit struct {
	// Type Discriminator for the unschedule-edit operation.
	Type BillingSubscriptionEditUnscheduleEditType `json:"type"`
}

BillingSubscriptionEditUnscheduleEdit Discard any scheduled edits on the current phase, reverting it to its previously persisted state.

type BillingSubscriptionEditUnscheduleEditType

type BillingSubscriptionEditUnscheduleEditType string

BillingSubscriptionEditUnscheduleEditType Discriminator for the unschedule-edit operation.

const (
	BillingSubscriptionEditUnscheduleEditTypeUnscheduleEdit BillingSubscriptionEditUnscheduleEditType = "unschedule_edit"
)

Defines values for BillingSubscriptionEditUnscheduleEditType.

func (BillingSubscriptionEditUnscheduleEditType) Valid

Valid indicates whether the value is a known member of the BillingSubscriptionEditUnscheduleEditType enum.

type BillingSubscriptionItem

type BillingSubscriptionItem struct {
	// ActiveFrom An ISO-8601 timestamp representation of when this item version becomes active.
	ActiveFrom DateTime `json:"active_from"`

	// ActiveTo An ISO-8601 timestamp representation of when this item version stops being
	// active.
	ActiveTo *DateTime `json:"active_to,omitempty"`

	// Id The unique identifier of the subscription item instance.
	Id ULID `json:"id"`

	// RateCard The rate card describing what the customer gets and pays for this item.
	RateCard BillingRateCard `json:"rate_card"`
}

BillingSubscriptionItem A subscription item pins a rate card to a cadence within a subscription phase.

type BillingSubscriptionMigrate

type BillingSubscriptionMigrate struct {
	// BillingAnchor Providing a different billing anchor explicitly replaces the subscription. The
	// supplied anchor is preserved and may be before or after the replacement's start
	// time. Omit to retain the existing anchor.
	BillingAnchor *DateTime `json:"billing_anchor,omitempty"`

	// StartingPhase Explicitly replace the subscription, starting in this target plan phase. Always
	// selects replacement, even when the phase matches the current one. Replacement
	// may produce billing adjustments and does not transfer addons.
	StartingPhase *string `json:"starting_phase,omitempty"`

	// TargetVersion A strictly later version of the current plan. Omit to use its latest version.
	TargetVersion *int `json:"target_version,omitempty"`

	// Timing When the migration takes effect: immediately (default), at the next billing
	// cycle, or at an explicit billing-aligned timestamp. In-place migrations may
	// target a later phase when the phase timelines match. The target plan reference
	// is saved now; changed items take effect at the requested time.
	Timing *BillingSubscriptionEditTiming `json:"timing,omitempty"`
}

BillingSubscriptionMigrate Request for migrating to a later version of the subscription's current plan.

type BillingSubscriptionMigrateResponse

type BillingSubscriptionMigrateResponse struct {
	// Current The original subscription's own fields returned by the migration. For an
	// in-place migration this is the before snapshot; for replacement it includes the
	// cancellation. Does not include phases or the current billing period.
	Current BillingSubscriptionBase `json:"current"`

	// Next The resulting subscription, including its phases and items.
	Next BillingSubscription `json:"next"`
}

BillingSubscriptionMigrateResponse Response for migrating a subscription.

type BillingSubscriptionPhase

type BillingSubscriptionPhase struct {
	// ActiveFrom An ISO-8601 timestamp representation of when the phase becomes active.
	ActiveFrom DateTime `json:"active_from"`

	// ActiveTo An ISO-8601 timestamp representation of when the phase stops being active.
	// Open-ended for the last phase.
	ActiveTo *DateTime `json:"active_to,omitempty"`

	// CreatedAt An ISO-8601 timestamp representation of entity creation date.
	CreatedAt DateTime `json:"created_at"`

	// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
	DeletedAt *DateTime `json:"deleted_at,omitempty"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`
	Id          ULID    `json:"id"`

	// Items The rate cards in effect for this phase, resolved to the version active at the
	// queried time (the currently active version for the current phase, the first
	// version for future phases, and the last version for past phases).
	Items []BillingSubscriptionItem `json:"items"`

	// Key A key is a unique string that is used to identify a resource.
	Key ResourceKey `json:"key"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
	UpdatedAt DateTime `json:"updated_at"`
}

BillingSubscriptionPhase A subscription phase groups the rate cards in effect for a segment of the subscription's lifetime. Analogous to plan phases.

type BillingSubscriptionPhaseCreate

type BillingSubscriptionPhaseCreate struct {
	// Description An optional description of the phase.
	Description *string `json:"description,omitempty"`

	// Duration The intended ISO-8601 duration of the phase. Required unless the phase will be
	// the last phase of the subscription.
	Duration *ISO8601Duration `json:"duration,omitempty"`

	// Key A locally unique identifier for the phase.
	Key ResourceKey `json:"key"`

	// Name The name of the phase.
	Name string `json:"name"`

	// StartAfter The ISO-8601 interval after the subscription start at which the phase begins.
	// When null, the phase starts immediately after the subscription starts.
	StartAfter nullable.Nullable[ISO8601Duration] `json:"start_after"`
}

BillingSubscriptionPhaseCreate The definition of a new subscription phase to add via an edit.

type BillingSubscriptionPlanReference

type BillingSubscriptionPlanReference struct {
	// Id The plan ID (exact revision).
	Id ULID `json:"id"`

	// Key The plan key. References the plan across versions.
	Key ResourceKey `json:"key"`

	// Version The plan version.
	Version int `json:"version"`
}

BillingSubscriptionPlanReference A reference to the plan a subscription was created from, pinned to an exact revision.

type BillingSubscriptionProRatingConfig

type BillingSubscriptionProRatingConfig struct {
	// Enabled Whether pro-rating is enabled.
	Enabled bool `json:"enabled"`

	// Mode How pro-rating is calculated when enabled.
	Mode BillingRateCardProrationMode `json:"mode"`
}

BillingSubscriptionProRatingConfig The pro-rating configuration of a subscription.

type BillingSubscriptionReference

type BillingSubscriptionReference struct {
	// Id The ID of the subscription.
	Id ULID `json:"id"`

	// Name The display name of the subscription.
	//
	// Only populated where the referencing endpoint documents a `subscription` expand
	// that resolves it.
	Name *string `json:"name,omitempty"`

	// Phase The phase of the subscription.
	Phase struct {
		// Id The ID of the phase.
		Id ULID `json:"id"`

		// Item The item of the phase.
		Item struct {
			// Id The ID of the item.
			Id ULID `json:"id"`
		} `json:"item"`
	} `json:"phase"`
}

BillingSubscriptionReference Subscription reference represents a reference to the specific subscription item this entity represents.

type BillingSubscriptionRemovePhaseShifting

type BillingSubscriptionRemovePhaseShifting string

BillingSubscriptionRemovePhaseShifting The direction to shift surrounding phases when a phase is removed.

- `next`: Shift all subsequent phases to start sooner by the removed phase's length. - `prev`: Extend the previous phase to end later by the removed phase's length.

const (
	BillingSubscriptionRemovePhaseShiftingNext BillingSubscriptionRemovePhaseShifting = "next"
	BillingSubscriptionRemovePhaseShiftingPrev BillingSubscriptionRemovePhaseShifting = "prev"
)

Defines values for BillingSubscriptionRemovePhaseShifting.

func (BillingSubscriptionRemovePhaseShifting) Valid

Valid indicates whether the value is a known member of the BillingSubscriptionRemovePhaseShifting enum.

type BillingSubscriptionStatus

type BillingSubscriptionStatus string

BillingSubscriptionStatus Subscription status.

const (
	BillingSubscriptionStatusActive    BillingSubscriptionStatus = "active"
	BillingSubscriptionStatusCanceled  BillingSubscriptionStatus = "canceled"
	BillingSubscriptionStatusInactive  BillingSubscriptionStatus = "inactive"
	BillingSubscriptionStatusScheduled BillingSubscriptionStatus = "scheduled"
)

Defines values for BillingSubscriptionStatus.

func (BillingSubscriptionStatus) Valid

func (e BillingSubscriptionStatus) Valid() bool

Valid indicates whether the value is a known member of the BillingSubscriptionStatus enum.

type BillingSupplier

type BillingSupplier struct {
	// Addresses Address for where information should be sent if needed.
	Addresses *BillingPartyAddresses `json:"addresses,omitempty"`

	// Id Unique identifier for the party.
	Id *string `json:"id,omitempty"`

	// Name Legal name or representation of the party.
	Name *string `json:"name,omitempty"`

	// TaxId The entity's legal identification used for tax purposes. They may have other
	// numbers, but we're only interested in those valid for tax purposes.
	TaxId *BillingPartyTaxIdentity `json:"tax_id,omitempty"`
}

BillingSupplier Snapshot of the supplier's information at the time the invoice was issued.

Structurally a read-only subset of `BillingParty` (the type configured on the billing profile), so the snapshot stays aligned with the source. `key` is omitted because it is not part of the snapshotted supplier data.

type BillingTaxBehavior

type BillingTaxBehavior string

BillingTaxBehavior Tax behavior.

This enum is used to specify whether tax is included in the price or excluded from the price.

const (
	BillingTaxBehaviorExclusive BillingTaxBehavior = "exclusive"
	BillingTaxBehaviorInclusive BillingTaxBehavior = "inclusive"
)

Defines values for BillingTaxBehavior.

func (BillingTaxBehavior) Valid

func (e BillingTaxBehavior) Valid() bool

Valid indicates whether the value is a known member of the BillingTaxBehavior enum.

type BillingTaxCode

type BillingTaxCode struct {
	// AppMappings Mapping of app types to tax codes.
	AppMappings []BillingTaxCodeAppMapping `json:"app_mappings"`

	// CreatedAt An ISO-8601 timestamp representation of entity creation date.
	CreatedAt DateTime `json:"created_at"`

	// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
	DeletedAt *DateTime `json:"deleted_at,omitempty"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`
	Id          ULID    `json:"id"`

	// Key A key is a unique string that is used to identify a resource.
	Key ResourceKey `json:"key"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
	UpdatedAt DateTime `json:"updated_at"`
}

BillingTaxCode Tax codes by provider.

type BillingTaxCodeAppMapping

type BillingTaxCodeAppMapping struct {
	// AppType The app type that the tax code is associated with.
	AppType BillingAppType `json:"app_type"`

	// TaxCode Tax code.
	TaxCode string `json:"tax_code"`
}

BillingTaxCodeAppMapping Mapping of app types to tax codes.

type BillingTaxConfig

type BillingTaxConfig struct {
	// Behavior Tax behavior.
	//
	// If not specified the billing profile is used to determine the tax behavior. If
	// not specified in the billing profile, the provider's default behavior is used.
	Behavior *BillingTaxBehavior `json:"behavior,omitempty"`

	// ExternalInvoicing External invoicing tax config.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	ExternalInvoicing *BillingTaxConfigExternalInvoicing `json:"external_invoicing,omitempty"`

	// Stripe Stripe tax config.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	Stripe *BillingTaxConfigStripe `json:"stripe,omitempty"`

	// TaxCode Tax code reference.
	//
	// When both `tax_code` and `tax_code_id` are provided, `tax_code` takes
	// precedence. When `stripe.code` is also provided, `tax_code` still wins and
	// `stripe.code` is ignored.
	TaxCode *TaxCodeReference `json:"tax_code,omitempty"`

	// TaxCodeId Tax code ID.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	TaxCodeId *ULID `json:"tax_code_id,omitempty"`
}

BillingTaxConfig Set of provider specific tax configs.

type BillingTaxConfigExternalInvoicing

type BillingTaxConfigExternalInvoicing struct {
	// Code The tax code should be interpreted by the external invoicing provider.
	Code string `json:"code"`
}

BillingTaxConfigExternalInvoicing External invoicing tax config.

type BillingTaxConfigStripe

type BillingTaxConfigStripe struct {
	// Code Product [tax code](https://docs.stripe.com/tax/tax-codes).
	Code string `json:"code"`
}

BillingTaxConfigStripe The tax config for Stripe.

type BillingTaxIdentificationCode

type BillingTaxIdentificationCode = string

BillingTaxIdentificationCode Tax identifier code is a normalized tax code shown on the original identity document.

type BillingTotals

type BillingTotals struct {
	// Amount The total value of the resource before taxes, discounts and commitments.
	Amount Numeric `json:"amount"`

	// ChargesTotal The total amount contributed by additional charges.
	ChargesTotal Numeric `json:"charges_total"`

	// CreditsTotal The total amount deducted through credits before taxes are applied.
	CreditsTotal Numeric `json:"credits_total"`

	// DiscountsTotal The total amount deducted through discounts.
	DiscountsTotal Numeric `json:"discounts_total"`

	// TaxesExclusiveTotal The total tax amount added on top of the resource amount.
	TaxesExclusiveTotal Numeric `json:"taxes_exclusive_total"`

	// TaxesInclusiveTotal The total tax amount already included in the resource amount.
	TaxesInclusiveTotal Numeric `json:"taxes_inclusive_total"`

	// TaxesTotal The total tax amount applied to the resource.
	TaxesTotal Numeric `json:"taxes_total"`

	// Total The final total value of the resource after taxes, discounts and commitments.
	Total Numeric `json:"total"`
}

BillingTotals Totals contains the summaries of all calculations for a billing resource.

type BillingUnitConfig

type BillingUnitConfig struct {
	// ConversionFactor The factor used in the conversion operation.
	//
	// - For `divide`: `converted = raw / conversionFactor`.
	// - For `multiply`: `converted = raw × conversionFactor`.
	//
	// Must be a positive non-zero value.
	ConversionFactor Numeric `json:"conversion_factor"`

	// DisplayUnit A human-readable label for the converted unit shown on invoices and in the
	// customer portal (e.g., "GB", "hours", "M tokens").
	//
	// Optional. When omitted, no unit label is rendered.
	DisplayUnit *string `json:"display_unit,omitempty"`

	// Operation The arithmetic operation to apply to the raw metered quantity.
	Operation BillingUnitConfigOperation `json:"operation"`

	// Precision The number of decimal places to retain after rounding.
	//
	// Only meaningful when rounding is not "none". Defaults to 0 (round to whole
	// numbers).
	Precision *int `json:"precision,omitempty"`

	// Rounding The rounding mode applied to the converted quantity for invoicing.
	//
	// Defaults to none (no rounding). Entitlement checks always use the precise
	// (unrounded) value.
	Rounding *BillingUnitConfigRoundingMode `json:"rounding,omitempty"`
}

BillingUnitConfig Unit conversion configuration.

Transforms raw metered quantities into billing-ready units before pricing and entitlement evaluation. Stored with a resource's rating configuration so the same metered feature can be billed in different units across plans and charges.

Examples:

- Meter bytes, bill GB: operation=divide, conversionFactor=1e9, rounding=ceiling, displayUnit="GB" - Meter seconds, bill hours: operation=divide, conversionFactor=3600, rounding=ceiling, displayUnit="hours" - Cost + 20% margin: operation=multiply, conversionFactor=1.2 - Bill per million tokens: operation=divide, conversionFactor=1e6, rounding=ceiling, displayUnit="M"

v1 equivalents:

- DynamicPrice(multiplier): operation=multiply, conversionFactor=multiplier + UnitPrice(amount=1) - PackagePrice(amount, quantityPerPkg): operation=divide, conversionFactor=quantityPerPkg, rounding=ceiling + UnitPrice(amount)

type BillingUnitConfigOperation

type BillingUnitConfigOperation string

BillingUnitConfigOperation The arithmetic operation used to convert raw metered units into billing units.

- `divide`: Divide the metered quantity by the conversion factor (e.g., bytes ÷ 1e9 = GB). - `multiply`: Multiply the metered quantity by the conversion factor (e.g., cost × 1.2 = cost + 20% margin).

const (
	BillingUnitConfigOperationDivide   BillingUnitConfigOperation = "divide"
	BillingUnitConfigOperationMultiply BillingUnitConfigOperation = "multiply"
)

Defines values for BillingUnitConfigOperation.

func (BillingUnitConfigOperation) Valid

func (e BillingUnitConfigOperation) Valid() bool

Valid indicates whether the value is a known member of the BillingUnitConfigOperation enum.

type BillingUnitConfigRoundingMode

type BillingUnitConfigRoundingMode string

BillingUnitConfigRoundingMode The rounding mode applied to the converted quantity for invoicing.

Rounding is applied only to the invoiced quantity. Entitlement balance checks use the precise decimal value after conversion.

- `ceiling`: Round up to the next integer (typical for package-style billing). - `floor`: Round down to the previous integer. - `half_up`: Round to the nearest integer, with 0.5 rounding up. - `none`: No rounding; the converted value is used as-is.

const (
	BillingUnitConfigRoundingModeCeiling BillingUnitConfigRoundingMode = "ceiling"
	BillingUnitConfigRoundingModeFloor   BillingUnitConfigRoundingMode = "floor"
	BillingUnitConfigRoundingModeHalfUp  BillingUnitConfigRoundingMode = "half_up"
	BillingUnitConfigRoundingModeNone    BillingUnitConfigRoundingMode = "none"
)

Defines values for BillingUnitConfigRoundingMode.

func (BillingUnitConfigRoundingMode) Valid

Valid indicates whether the value is a known member of the BillingUnitConfigRoundingMode enum.

type BillingUpdateAppRequest

type BillingUpdateAppRequest struct {
	// contains filtered or unexported fields
}

BillingUpdateAppRequest Request to update an installed app.

func (BillingUpdateAppRequest) AsUpdateAppExternalInvoicingRequest

func (t BillingUpdateAppRequest) AsUpdateAppExternalInvoicingRequest() (UpdateAppExternalInvoicingRequest, error)

AsUpdateAppExternalInvoicingRequest returns the union data inside the BillingUpdateAppRequest as a UpdateAppExternalInvoicingRequest

func (BillingUpdateAppRequest) AsUpdateAppSandboxRequest

func (t BillingUpdateAppRequest) AsUpdateAppSandboxRequest() (UpdateAppSandboxRequest, error)

AsUpdateAppSandboxRequest returns the union data inside the BillingUpdateAppRequest as a UpdateAppSandboxRequest

func (BillingUpdateAppRequest) AsUpdateAppStripeRequest

func (t BillingUpdateAppRequest) AsUpdateAppStripeRequest() (UpdateAppStripeRequest, error)

AsUpdateAppStripeRequest returns the union data inside the BillingUpdateAppRequest as a UpdateAppStripeRequest

func (BillingUpdateAppRequest) Discriminator

func (t BillingUpdateAppRequest) Discriminator() (string, error)

func (*BillingUpdateAppRequest) FromUpdateAppExternalInvoicingRequest

func (t *BillingUpdateAppRequest) FromUpdateAppExternalInvoicingRequest(v UpdateAppExternalInvoicingRequest) error

FromUpdateAppExternalInvoicingRequest overwrites any union data inside the BillingUpdateAppRequest as the provided UpdateAppExternalInvoicingRequest

func (*BillingUpdateAppRequest) FromUpdateAppSandboxRequest

func (t *BillingUpdateAppRequest) FromUpdateAppSandboxRequest(v UpdateAppSandboxRequest) error

FromUpdateAppSandboxRequest overwrites any union data inside the BillingUpdateAppRequest as the provided UpdateAppSandboxRequest

func (*BillingUpdateAppRequest) FromUpdateAppStripeRequest

func (t *BillingUpdateAppRequest) FromUpdateAppStripeRequest(v UpdateAppStripeRequest) error

FromUpdateAppStripeRequest overwrites any union data inside the BillingUpdateAppRequest as the provided UpdateAppStripeRequest

func (BillingUpdateAppRequest) MarshalJSON

func (t BillingUpdateAppRequest) MarshalJSON() ([]byte, error)

func (*BillingUpdateAppRequest) MergeUpdateAppExternalInvoicingRequest

func (t *BillingUpdateAppRequest) MergeUpdateAppExternalInvoicingRequest(v UpdateAppExternalInvoicingRequest) error

MergeUpdateAppExternalInvoicingRequest performs a merge with any union data inside the BillingUpdateAppRequest, using the provided UpdateAppExternalInvoicingRequest

func (*BillingUpdateAppRequest) MergeUpdateAppSandboxRequest

func (t *BillingUpdateAppRequest) MergeUpdateAppSandboxRequest(v UpdateAppSandboxRequest) error

MergeUpdateAppSandboxRequest performs a merge with any union data inside the BillingUpdateAppRequest, using the provided UpdateAppSandboxRequest

func (*BillingUpdateAppRequest) MergeUpdateAppStripeRequest

func (t *BillingUpdateAppRequest) MergeUpdateAppStripeRequest(v UpdateAppStripeRequest) error

MergeUpdateAppStripeRequest performs a merge with any union data inside the BillingUpdateAppRequest, using the provided UpdateAppStripeRequest

func (*BillingUpdateAppRequest) UnmarshalJSON

func (t *BillingUpdateAppRequest) UnmarshalJSON(b []byte) error

func (BillingUpdateAppRequest) ValueByDiscriminator

func (t BillingUpdateAppRequest) ValueByDiscriminator() (interface{}, error)

type BillingValidationIssue

type BillingValidationIssue struct {
	// Attributes Additional structured context.
	Attributes *map[string]interface{} `json:"attributes,omitempty"`

	// Code Machine-readable error code.
	Code string `json:"code"`

	// Component Component that reported the validation issue, if applicable.
	Component *string `json:"component,omitempty"`

	// Field JSON path to the field that caused the validation issue, if applicable.
	Field *string `json:"field,omitempty"`

	// Message Human-readable description of the error.
	Message string `json:"message"`

	// Severity Severity of the validation issue.
	Severity BillingValidationIssueSeverity `json:"severity"`
}

BillingValidationIssue A validation issue found while processing a billing resource.

type BillingValidationIssueSeverity

type BillingValidationIssueSeverity string

BillingValidationIssueSeverity Severity level of a billing validation issue.

const (
	BillingValidationIssueSeverityCritical BillingValidationIssueSeverity = "critical"
	BillingValidationIssueSeverityWarning  BillingValidationIssueSeverity = "warning"
)

Defines values for BillingValidationIssueSeverity.

func (BillingValidationIssueSeverity) Valid

Valid indicates whether the value is a known member of the BillingValidationIssueSeverity enum.

type BillingWorkflow

type BillingWorkflow struct {
	// Collection The collection settings for this workflow
	Collection *BillingWorkflowCollectionSettings `json:"collection,omitempty"`

	// Invoicing The invoicing settings for this workflow
	Invoicing *BillingWorkflowInvoicingSettings `json:"invoicing,omitempty"`

	// Payment The payment settings for this workflow
	Payment *BillingWorkflowPaymentSettings `json:"payment,omitempty"`

	// Tax The tax settings for this workflow
	Tax *BillingWorkflowTaxSettings `json:"tax,omitempty"`
}

BillingWorkflow Billing workflow settings.

type BillingWorkflowCollectionAlignment

type BillingWorkflowCollectionAlignment struct {
	// contains filtered or unexported fields
}

BillingWorkflowCollectionAlignment The alignment for collecting the pending line items into an invoice.

Defaults to subscription, which means that we are to create a new invoice every time the a subscription period starts (for in advance items) or ends (for in arrears items).

func (BillingWorkflowCollectionAlignment) AsBillingWorkflowCollectionAlignmentAnchored

func (t BillingWorkflowCollectionAlignment) AsBillingWorkflowCollectionAlignmentAnchored() (BillingWorkflowCollectionAlignmentAnchored, error)

AsBillingWorkflowCollectionAlignmentAnchored returns the union data inside the BillingWorkflowCollectionAlignment as a BillingWorkflowCollectionAlignmentAnchored

func (BillingWorkflowCollectionAlignment) AsBillingWorkflowCollectionAlignmentSubscription

func (t BillingWorkflowCollectionAlignment) AsBillingWorkflowCollectionAlignmentSubscription() (BillingWorkflowCollectionAlignmentSubscription, error)

AsBillingWorkflowCollectionAlignmentSubscription returns the union data inside the BillingWorkflowCollectionAlignment as a BillingWorkflowCollectionAlignmentSubscription

func (BillingWorkflowCollectionAlignment) Discriminator

func (t BillingWorkflowCollectionAlignment) Discriminator() (string, error)

func (*BillingWorkflowCollectionAlignment) FromBillingWorkflowCollectionAlignmentAnchored

func (t *BillingWorkflowCollectionAlignment) FromBillingWorkflowCollectionAlignmentAnchored(v BillingWorkflowCollectionAlignmentAnchored) error

FromBillingWorkflowCollectionAlignmentAnchored overwrites any union data inside the BillingWorkflowCollectionAlignment as the provided BillingWorkflowCollectionAlignmentAnchored

func (*BillingWorkflowCollectionAlignment) FromBillingWorkflowCollectionAlignmentSubscription

func (t *BillingWorkflowCollectionAlignment) FromBillingWorkflowCollectionAlignmentSubscription(v BillingWorkflowCollectionAlignmentSubscription) error

FromBillingWorkflowCollectionAlignmentSubscription overwrites any union data inside the BillingWorkflowCollectionAlignment as the provided BillingWorkflowCollectionAlignmentSubscription

func (BillingWorkflowCollectionAlignment) MarshalJSON

func (t BillingWorkflowCollectionAlignment) MarshalJSON() ([]byte, error)

func (*BillingWorkflowCollectionAlignment) MergeBillingWorkflowCollectionAlignmentAnchored

func (t *BillingWorkflowCollectionAlignment) MergeBillingWorkflowCollectionAlignmentAnchored(v BillingWorkflowCollectionAlignmentAnchored) error

MergeBillingWorkflowCollectionAlignmentAnchored performs a merge with any union data inside the BillingWorkflowCollectionAlignment, using the provided BillingWorkflowCollectionAlignmentAnchored

func (*BillingWorkflowCollectionAlignment) MergeBillingWorkflowCollectionAlignmentSubscription

func (t *BillingWorkflowCollectionAlignment) MergeBillingWorkflowCollectionAlignmentSubscription(v BillingWorkflowCollectionAlignmentSubscription) error

MergeBillingWorkflowCollectionAlignmentSubscription performs a merge with any union data inside the BillingWorkflowCollectionAlignment, using the provided BillingWorkflowCollectionAlignmentSubscription

func (*BillingWorkflowCollectionAlignment) UnmarshalJSON

func (t *BillingWorkflowCollectionAlignment) UnmarshalJSON(b []byte) error

func (BillingWorkflowCollectionAlignment) ValueByDiscriminator

func (t BillingWorkflowCollectionAlignment) ValueByDiscriminator() (interface{}, error)

type BillingWorkflowCollectionAlignmentAnchored

type BillingWorkflowCollectionAlignmentAnchored struct {
	// RecurringPeriod The recurring period for the alignment.
	RecurringPeriod RecurringPeriod `json:"recurring_period"`

	// Type The type of alignment.
	Type BillingWorkflowCollectionAlignmentAnchoredType `json:"type"`
}

BillingWorkflowCollectionAlignmentAnchored BillingWorkflowCollectionAlignmentAnchored specifies the alignment for collecting the pending line items into an invoice.

type BillingWorkflowCollectionAlignmentAnchoredType

type BillingWorkflowCollectionAlignmentAnchoredType string

BillingWorkflowCollectionAlignmentAnchoredType The type of alignment.

const (
	BillingWorkflowCollectionAlignmentAnchoredTypeAnchored BillingWorkflowCollectionAlignmentAnchoredType = "anchored"
)

Defines values for BillingWorkflowCollectionAlignmentAnchoredType.

func (BillingWorkflowCollectionAlignmentAnchoredType) Valid

Valid indicates whether the value is a known member of the BillingWorkflowCollectionAlignmentAnchoredType enum.

type BillingWorkflowCollectionAlignmentSubscription

type BillingWorkflowCollectionAlignmentSubscription struct {
	// Type The type of alignment.
	Type BillingWorkflowCollectionAlignmentSubscriptionType `json:"type"`
}

BillingWorkflowCollectionAlignmentSubscription BillingWorkflowCollectionAlignmentSubscription specifies the alignment for collecting the pending line items into an invoice.

type BillingWorkflowCollectionAlignmentSubscriptionType

type BillingWorkflowCollectionAlignmentSubscriptionType string

BillingWorkflowCollectionAlignmentSubscriptionType The type of alignment.

const (
	BillingWorkflowCollectionAlignmentSubscriptionTypeSubscription BillingWorkflowCollectionAlignmentSubscriptionType = "subscription"
)

Defines values for BillingWorkflowCollectionAlignmentSubscriptionType.

func (BillingWorkflowCollectionAlignmentSubscriptionType) Valid

Valid indicates whether the value is a known member of the BillingWorkflowCollectionAlignmentSubscriptionType enum.

type BillingWorkflowCollectionSettings

type BillingWorkflowCollectionSettings struct {
	// Alignment The alignment for collecting the pending line items into an invoice.
	Alignment *BillingWorkflowCollectionAlignment `json:"alignment,omitempty"`

	// Interval This grace period can be used to delay the collection of the pending line items
	// specified in alignment.
	//
	// This is useful, in case of multiple subscriptions having slightly different
	// billing periods.
	Interval *string `json:"interval,omitempty"`
}

BillingWorkflowCollectionSettings Workflow collection specifies how to collect the pending line items for an invoice.

type BillingWorkflowInvoicingSettings

type BillingWorkflowInvoicingSettings struct {
	// AutoAdvance Whether to automatically issue the invoice after the draftPeriod has passed.
	AutoAdvance *bool `json:"auto_advance,omitempty"`

	// DraftPeriod The period for the invoice to be kept in draft status for manual reviews.
	DraftPeriod *string `json:"draft_period,omitempty"`

	// ProgressiveBilling Should progressive billing be allowed for this workflow?
	ProgressiveBilling *bool `json:"progressive_billing,omitempty"`

	// SubscriptionEndProrationMode Controls how subscription-ending shortened service periods are billed.
	SubscriptionEndProrationMode *BillingWorkflowInvoicingSubscriptionEndProrationMode `json:"subscription_end_proration_mode,omitempty"`
}

BillingWorkflowInvoicingSettings Invoice settings for a billing workflow.

type BillingWorkflowInvoicingSubscriptionEndProrationMode

type BillingWorkflowInvoicingSubscriptionEndProrationMode string

BillingWorkflowInvoicingSubscriptionEndProrationMode Billing workflow subscription end proration mode.

const (
	BillingWorkflowInvoicingSubscriptionEndProrationModeBillActualPeriod BillingWorkflowInvoicingSubscriptionEndProrationMode = "bill_actual_period"
	BillingWorkflowInvoicingSubscriptionEndProrationModeBillFullPeriod   BillingWorkflowInvoicingSubscriptionEndProrationMode = "bill_full_period"
)

Defines values for BillingWorkflowInvoicingSubscriptionEndProrationMode.

func (BillingWorkflowInvoicingSubscriptionEndProrationMode) Valid

Valid indicates whether the value is a known member of the BillingWorkflowInvoicingSubscriptionEndProrationMode enum.

type BillingWorkflowPaymentChargeAutomaticallySettings

type BillingWorkflowPaymentChargeAutomaticallySettings struct {
	// CollectionMethod The collection method for the invoice.
	CollectionMethod BillingWorkflowPaymentChargeAutomaticallySettingsCollectionMethod `json:"collection_method"`
}

BillingWorkflowPaymentChargeAutomaticallySettings Payment settings for a billing workflow when the collection method is charge automatically.

type BillingWorkflowPaymentChargeAutomaticallySettingsCollectionMethod

type BillingWorkflowPaymentChargeAutomaticallySettingsCollectionMethod string

BillingWorkflowPaymentChargeAutomaticallySettingsCollectionMethod The collection method for the invoice.

const (
	BillingWorkflowPaymentChargeAutomaticallySettingsCollectionMethodChargeAutomatically BillingWorkflowPaymentChargeAutomaticallySettingsCollectionMethod = "charge_automatically"
)

Defines values for BillingWorkflowPaymentChargeAutomaticallySettingsCollectionMethod.

func (BillingWorkflowPaymentChargeAutomaticallySettingsCollectionMethod) Valid

Valid indicates whether the value is a known member of the BillingWorkflowPaymentChargeAutomaticallySettingsCollectionMethod enum.

type BillingWorkflowPaymentSendInvoiceSettings

type BillingWorkflowPaymentSendInvoiceSettings struct {
	// CollectionMethod The collection method for the invoice.
	CollectionMethod BillingWorkflowPaymentSendInvoiceSettingsCollectionMethod `json:"collection_method"`

	// DueAfter The period after which the invoice is due. With some payment solutions it's only
	// applicable for manual collection method.
	DueAfter *string `json:"due_after,omitempty"`
}

BillingWorkflowPaymentSendInvoiceSettings Payment settings for a billing workflow when the collection method is send invoice.

type BillingWorkflowPaymentSendInvoiceSettingsCollectionMethod

type BillingWorkflowPaymentSendInvoiceSettingsCollectionMethod string

BillingWorkflowPaymentSendInvoiceSettingsCollectionMethod The collection method for the invoice.

const (
	BillingWorkflowPaymentSendInvoiceSettingsCollectionMethodSendInvoice BillingWorkflowPaymentSendInvoiceSettingsCollectionMethod = "send_invoice"
)

Defines values for BillingWorkflowPaymentSendInvoiceSettingsCollectionMethod.

func (BillingWorkflowPaymentSendInvoiceSettingsCollectionMethod) Valid

Valid indicates whether the value is a known member of the BillingWorkflowPaymentSendInvoiceSettingsCollectionMethod enum.

type BillingWorkflowPaymentSettings

type BillingWorkflowPaymentSettings struct {
	// contains filtered or unexported fields
}

BillingWorkflowPaymentSettings Payment settings for a billing workflow.

func (BillingWorkflowPaymentSettings) AsBillingWorkflowPaymentChargeAutomaticallySettings

func (t BillingWorkflowPaymentSettings) AsBillingWorkflowPaymentChargeAutomaticallySettings() (BillingWorkflowPaymentChargeAutomaticallySettings, error)

AsBillingWorkflowPaymentChargeAutomaticallySettings returns the union data inside the BillingWorkflowPaymentSettings as a BillingWorkflowPaymentChargeAutomaticallySettings

func (BillingWorkflowPaymentSettings) AsBillingWorkflowPaymentSendInvoiceSettings

func (t BillingWorkflowPaymentSettings) AsBillingWorkflowPaymentSendInvoiceSettings() (BillingWorkflowPaymentSendInvoiceSettings, error)

AsBillingWorkflowPaymentSendInvoiceSettings returns the union data inside the BillingWorkflowPaymentSettings as a BillingWorkflowPaymentSendInvoiceSettings

func (BillingWorkflowPaymentSettings) Discriminator

func (t BillingWorkflowPaymentSettings) Discriminator() (string, error)

func (*BillingWorkflowPaymentSettings) FromBillingWorkflowPaymentChargeAutomaticallySettings

func (t *BillingWorkflowPaymentSettings) FromBillingWorkflowPaymentChargeAutomaticallySettings(v BillingWorkflowPaymentChargeAutomaticallySettings) error

FromBillingWorkflowPaymentChargeAutomaticallySettings overwrites any union data inside the BillingWorkflowPaymentSettings as the provided BillingWorkflowPaymentChargeAutomaticallySettings

func (*BillingWorkflowPaymentSettings) FromBillingWorkflowPaymentSendInvoiceSettings

func (t *BillingWorkflowPaymentSettings) FromBillingWorkflowPaymentSendInvoiceSettings(v BillingWorkflowPaymentSendInvoiceSettings) error

FromBillingWorkflowPaymentSendInvoiceSettings overwrites any union data inside the BillingWorkflowPaymentSettings as the provided BillingWorkflowPaymentSendInvoiceSettings

func (BillingWorkflowPaymentSettings) MarshalJSON

func (t BillingWorkflowPaymentSettings) MarshalJSON() ([]byte, error)

func (*BillingWorkflowPaymentSettings) MergeBillingWorkflowPaymentChargeAutomaticallySettings

func (t *BillingWorkflowPaymentSettings) MergeBillingWorkflowPaymentChargeAutomaticallySettings(v BillingWorkflowPaymentChargeAutomaticallySettings) error

MergeBillingWorkflowPaymentChargeAutomaticallySettings performs a merge with any union data inside the BillingWorkflowPaymentSettings, using the provided BillingWorkflowPaymentChargeAutomaticallySettings

func (*BillingWorkflowPaymentSettings) MergeBillingWorkflowPaymentSendInvoiceSettings

func (t *BillingWorkflowPaymentSettings) MergeBillingWorkflowPaymentSendInvoiceSettings(v BillingWorkflowPaymentSendInvoiceSettings) error

MergeBillingWorkflowPaymentSendInvoiceSettings performs a merge with any union data inside the BillingWorkflowPaymentSettings, using the provided BillingWorkflowPaymentSendInvoiceSettings

func (*BillingWorkflowPaymentSettings) UnmarshalJSON

func (t *BillingWorkflowPaymentSettings) UnmarshalJSON(b []byte) error

func (BillingWorkflowPaymentSettings) ValueByDiscriminator

func (t BillingWorkflowPaymentSettings) ValueByDiscriminator() (interface{}, error)

type BillingWorkflowTaxSettings

type BillingWorkflowTaxSettings struct {
	// DefaultTaxConfig Default tax configuration to apply to the invoices for line items.
	//
	// Setting a tax code (`stripe.code` / `taxCodeId`) on a profile's default tax
	// config is deprecated and can no longer be added or changed: the organization
	// default tax code is used instead. Existing tax-code values may still be removed,
	// and `behavior` remains fully supported.
	DefaultTaxConfig *BillingTaxConfig `json:"default_tax_config,omitempty"`

	// Enabled Enable automatic tax calculation when tax is supported by the app. For example,
	// with Stripe Invoicing when enabled, tax is calculated via Stripe Tax.
	Enabled *bool `json:"enabled,omitempty"`

	// Enforced Enforce tax calculation when tax is supported by the app. When enabled, the
	// billing system will not allow to create an invoice without tax calculation.
	// Enforcement is different per apps, for example, Stripe app requires customer to
	// have a tax location when starting a paid subscription.
	Enforced *bool `json:"enforced,omitempty"`
}

BillingWorkflowTaxSettings Tax settings for a billing workflow.

type BooleanFieldFilter

type BooleanFieldFilter = filters.FilterBoolean

BooleanFieldFilter Filter by a boolean value (true/false).

type CancelSubscriptionJSONRequestBody

type CancelSubscriptionJSONRequestBody = BillingSubscriptionCancel

CancelSubscriptionJSONRequestBody defines body for CancelSubscription for application/json ContentType.

type ChangeSubscriptionJSONRequestBody

type ChangeSubscriptionJSONRequestBody = BillingSubscriptionChange

ChangeSubscriptionJSONRequestBody defines body for ChangeSubscription for application/json ContentType.

type ChargePagePaginatedResponse

type ChargePagePaginatedResponse struct {
	Data []BillingCharge `json:"data"`

	// Meta returns the pagination information
	Meta PaginatedMeta `json:"meta"`
}

ChargePagePaginatedResponse Page paginated response.

type ChargeRealizationInvoiceOrReference

type ChargeRealizationInvoiceOrReference struct {
	// contains filtered or unexported fields
}

ChargeRealizationInvoiceOrReference ChargeRealizationInvoice or reference.

func (ChargeRealizationInvoiceOrReference) AsBillingChargeRealizationInvoice

func (t ChargeRealizationInvoiceOrReference) AsBillingChargeRealizationInvoice() (BillingChargeRealizationInvoice, error)

AsBillingChargeRealizationInvoice returns the union data inside the ChargeRealizationInvoiceOrReference as a BillingChargeRealizationInvoice

func (ChargeRealizationInvoiceOrReference) AsChargeRealizationInvoiceReference

func (t ChargeRealizationInvoiceOrReference) AsChargeRealizationInvoiceReference() (ChargeRealizationInvoiceReference, error)

AsChargeRealizationInvoiceReference returns the union data inside the ChargeRealizationInvoiceOrReference as a ChargeRealizationInvoiceReference

func (*ChargeRealizationInvoiceOrReference) FromBillingChargeRealizationInvoice

func (t *ChargeRealizationInvoiceOrReference) FromBillingChargeRealizationInvoice(v BillingChargeRealizationInvoice) error

FromBillingChargeRealizationInvoice overwrites any union data inside the ChargeRealizationInvoiceOrReference as the provided BillingChargeRealizationInvoice

func (*ChargeRealizationInvoiceOrReference) FromChargeRealizationInvoiceReference

func (t *ChargeRealizationInvoiceOrReference) FromChargeRealizationInvoiceReference(v ChargeRealizationInvoiceReference) error

FromChargeRealizationInvoiceReference overwrites any union data inside the ChargeRealizationInvoiceOrReference as the provided ChargeRealizationInvoiceReference

func (ChargeRealizationInvoiceOrReference) MarshalJSON

func (t ChargeRealizationInvoiceOrReference) MarshalJSON() ([]byte, error)

func (*ChargeRealizationInvoiceOrReference) MergeBillingChargeRealizationInvoice

func (t *ChargeRealizationInvoiceOrReference) MergeBillingChargeRealizationInvoice(v BillingChargeRealizationInvoice) error

MergeBillingChargeRealizationInvoice performs a merge with any union data inside the ChargeRealizationInvoiceOrReference, using the provided BillingChargeRealizationInvoice

func (*ChargeRealizationInvoiceOrReference) MergeChargeRealizationInvoiceReference

func (t *ChargeRealizationInvoiceOrReference) MergeChargeRealizationInvoiceReference(v ChargeRealizationInvoiceReference) error

MergeChargeRealizationInvoiceReference performs a merge with any union data inside the ChargeRealizationInvoiceOrReference, using the provided ChargeRealizationInvoiceReference

func (*ChargeRealizationInvoiceOrReference) UnmarshalJSON

func (t *ChargeRealizationInvoiceOrReference) UnmarshalJSON(b []byte) error

type ChargeRealizationInvoiceReference

type ChargeRealizationInvoiceReference struct {
	// Id ULID (Universally Unique Lexicographically Sortable Identifier).
	Id ULID `json:"id"`
}

ChargeRealizationInvoiceReference ChargeRealizationInvoice reference.

type ChiServerOptions

type ChiServerOptions struct {
	BaseURL          string
	BaseRouter       chi.Router
	Middlewares      []MiddlewareFunc
	ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type ClosedPeriod

type ClosedPeriod struct {
	// From The start of the period.
	//
	// The period is inclusive at the start.
	From DateTime `json:"from"`

	// To The end of the period.
	//
	// The period is exclusive at the end.
	To DateTime `json:"to"`
}

ClosedPeriod A period with defined start and end dates.

The period is always inclusive at the start and exclusive at the end.

type Conflict

type Conflict = ConflictError

Conflict defines model for Conflict.

type ConflictError

type ConflictError struct {
	Detail   interface{} `json:"detail"`
	Instance interface{} `json:"instance"`
	Status   interface{} `json:"status"`
	Title    interface{} `json:"title"`
	Type     interface{} `json:"type,omitempty"`
}

ConflictError defines model for ConflictError.

type CostBasisPagePaginatedResponse

type CostBasisPagePaginatedResponse struct {
	Data []BillingCostBasis `json:"data"`

	// Meta returns the pagination information
	Meta PaginatedMeta `json:"meta"`
}

CostBasisPagePaginatedResponse Page paginated response.

type CountryCode

type CountryCode = string

CountryCode [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) alpha-2 country code. Custom two-letter country codes are also supported for convenience.

type CreateAddonJSONRequestBody

type CreateAddonJSONRequestBody = CreateAddonRequest

CreateAddonJSONRequestBody defines body for CreateAddon for application/json ContentType.

type CreateAddonRequest

type CreateAddonRequest struct {
	// Currency The currency code of the add-on.
	Currency BillingCurrencyCode `json:"currency"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// InstanceType The InstanceType of the add-ons. Can be "single" or "multiple".
	InstanceType AddonInstanceType `json:"instance_type"`

	// Key A key is a semi-unique string that is used to identify the add-on. It is used to
	// reference the latest `active` version of the add-on and is unique with the
	// version number.
	Key ResourceKey `json:"key"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// RateCards The rate cards of the add-on.
	RateCards []BillingRateCard `json:"rate_cards"`
}

CreateAddonRequest Addon create request.

type CreateBillingProfileJSONRequestBody

type CreateBillingProfileJSONRequestBody = CreateBillingProfileRequest

CreateBillingProfileJSONRequestBody defines body for CreateBillingProfile for application/json ContentType.

type CreateBillingProfileRequest

type CreateBillingProfileRequest struct {
	// Apps The applications used by this billing profile.
	Apps BillingProfileAppReferences `json:"apps"`

	// Default Whether this is the default profile.
	Default bool `json:"default"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// Supplier The name and contact information for the supplier this billing profile
	// represents
	Supplier BillingParty `json:"supplier"`

	// Workflow The billing workflow settings for this profile
	Workflow BillingWorkflow `json:"workflow"`
}

CreateBillingProfileRequest BillingProfile create request.

type CreateChargeCostBasis

type CreateChargeCostBasis struct {
	// contains filtered or unexported fields
}

CreateChargeCostBasis Cost basis selection for a custom-currency charge. The variant chosen fixes when and how the conversion rate is determined.

func (CreateChargeCostBasis) AsCreateChargeCostBasisDynamic

func (t CreateChargeCostBasis) AsCreateChargeCostBasisDynamic() (CreateChargeCostBasisDynamic, error)

AsCreateChargeCostBasisDynamic returns the union data inside the CreateChargeCostBasis as a CreateChargeCostBasisDynamic

func (CreateChargeCostBasis) AsCreateChargeCostBasisManual

func (t CreateChargeCostBasis) AsCreateChargeCostBasisManual() (CreateChargeCostBasisManual, error)

AsCreateChargeCostBasisManual returns the union data inside the CreateChargeCostBasis as a CreateChargeCostBasisManual

func (CreateChargeCostBasis) AsCreateChargeCostBasisPinned

func (t CreateChargeCostBasis) AsCreateChargeCostBasisPinned() (CreateChargeCostBasisPinned, error)

AsCreateChargeCostBasisPinned returns the union data inside the CreateChargeCostBasis as a CreateChargeCostBasisPinned

func (CreateChargeCostBasis) Discriminator

func (t CreateChargeCostBasis) Discriminator() (string, error)

func (*CreateChargeCostBasis) FromCreateChargeCostBasisDynamic

func (t *CreateChargeCostBasis) FromCreateChargeCostBasisDynamic(v CreateChargeCostBasisDynamic) error

FromCreateChargeCostBasisDynamic overwrites any union data inside the CreateChargeCostBasis as the provided CreateChargeCostBasisDynamic

func (*CreateChargeCostBasis) FromCreateChargeCostBasisManual

func (t *CreateChargeCostBasis) FromCreateChargeCostBasisManual(v CreateChargeCostBasisManual) error

FromCreateChargeCostBasisManual overwrites any union data inside the CreateChargeCostBasis as the provided CreateChargeCostBasisManual

func (*CreateChargeCostBasis) FromCreateChargeCostBasisPinned

func (t *CreateChargeCostBasis) FromCreateChargeCostBasisPinned(v CreateChargeCostBasisPinned) error

FromCreateChargeCostBasisPinned overwrites any union data inside the CreateChargeCostBasis as the provided CreateChargeCostBasisPinned

func (CreateChargeCostBasis) MarshalJSON

func (t CreateChargeCostBasis) MarshalJSON() ([]byte, error)

func (*CreateChargeCostBasis) MergeCreateChargeCostBasisDynamic

func (t *CreateChargeCostBasis) MergeCreateChargeCostBasisDynamic(v CreateChargeCostBasisDynamic) error

MergeCreateChargeCostBasisDynamic performs a merge with any union data inside the CreateChargeCostBasis, using the provided CreateChargeCostBasisDynamic

func (*CreateChargeCostBasis) MergeCreateChargeCostBasisManual

func (t *CreateChargeCostBasis) MergeCreateChargeCostBasisManual(v CreateChargeCostBasisManual) error

MergeCreateChargeCostBasisManual performs a merge with any union data inside the CreateChargeCostBasis, using the provided CreateChargeCostBasisManual

func (*CreateChargeCostBasis) MergeCreateChargeCostBasisPinned

func (t *CreateChargeCostBasis) MergeCreateChargeCostBasisPinned(v CreateChargeCostBasisPinned) error

MergeCreateChargeCostBasisPinned performs a merge with any union data inside the CreateChargeCostBasis, using the provided CreateChargeCostBasisPinned

func (*CreateChargeCostBasis) UnmarshalJSON

func (t *CreateChargeCostBasis) UnmarshalJSON(b []byte) error

func (CreateChargeCostBasis) ValueByDiscriminator

func (t CreateChargeCostBasis) ValueByDiscriminator() (interface{}, error)

type CreateChargeCostBasisDynamic

type CreateChargeCostBasisDynamic struct {
	// FiatCurrency The fiat currency the charge amount is converted into for invoicing.
	FiatCurrency CurrencyCode `json:"fiat_currency"`

	// Type Discriminator selecting the cost basis mode.
	Type CreateChargeCostBasisDynamicType `json:"type"`
}

CreateChargeCostBasisDynamic Cost basis resolved at the charge's full service period start.

type CreateChargeCostBasisDynamicType

type CreateChargeCostBasisDynamicType string

CreateChargeCostBasisDynamicType Discriminator selecting the cost basis mode.

const (
	CreateChargeCostBasisDynamicTypeDynamic CreateChargeCostBasisDynamicType = "dynamic"
)

Defines values for CreateChargeCostBasisDynamicType.

func (CreateChargeCostBasisDynamicType) Valid

Valid indicates whether the value is a known member of the CreateChargeCostBasisDynamicType enum.

type CreateChargeCostBasisManual

type CreateChargeCostBasisManual struct {
	// FiatCurrency The fiat currency the charge amount is converted into for invoicing.
	FiatCurrency *CurrencyCode `json:"fiat_currency,omitempty"`

	// Rate Fiat amount per one unit of the custom currency.
	Rate Numeric `json:"rate"`

	// Type Discriminator selecting the cost basis mode.
	Type CreateChargeCostBasisManualType `json:"type"`
}

CreateChargeCostBasisManual Cost basis with an explicit conversion rate supplied with the charge.

type CreateChargeCostBasisManualType

type CreateChargeCostBasisManualType string

CreateChargeCostBasisManualType Discriminator selecting the cost basis mode.

const (
	CreateChargeCostBasisManualTypeManual CreateChargeCostBasisManualType = "manual"
)

Defines values for CreateChargeCostBasisManualType.

func (CreateChargeCostBasisManualType) Valid

Valid indicates whether the value is a known member of the CreateChargeCostBasisManualType enum.

type CreateChargeCostBasisPinned

type CreateChargeCostBasisPinned struct {
	// CostBasisId ID of the custom currency's cost basis resource to pin.
	CostBasisId ULID `json:"cost_basis_id"`

	// FiatCurrency The fiat currency the charge amount is converted into for invoicing.
	FiatCurrency CurrencyCode `json:"fiat_currency"`

	// Type Discriminator selecting the cost basis mode.
	Type CreateChargeCostBasisPinnedType `json:"type"`
}

CreateChargeCostBasisPinned Cost basis pinned to a specific cost basis resource of the custom currency.

type CreateChargeCostBasisPinnedType

type CreateChargeCostBasisPinnedType string

CreateChargeCostBasisPinnedType Discriminator selecting the cost basis mode.

const (
	CreateChargeCostBasisPinnedTypePinned CreateChargeCostBasisPinnedType = "pinned"
)

Defines values for CreateChargeCostBasisPinnedType.

func (CreateChargeCostBasisPinnedType) Valid

Valid indicates whether the value is a known member of the CreateChargeCostBasisPinnedType enum.

type CreateChargeFlatFeeRequest

type CreateChargeFlatFeeRequest struct {
	// AmountBeforeProration The amount before proration of the charge.
	AmountBeforeProration BillingCurrencyAmount `json:"amount_before_proration"`

	// BillingPeriod The billing period the charge belongs to.
	BillingPeriod *ClosedPeriod `json:"billing_period,omitempty"`

	// CostBasis Defines how a custom-currency charge is converted into its fiat invoice
	// currency; the resolved rate is exposed through `resolved_cost_basis`. Required
	// when `currency` is custom and the charge settles as `credit_then_invoice`; must
	// be omitted otherwise.
	CostBasis *BillingChargeCostBasis `json:"cost_basis,omitempty"`

	// Currency The currency of the charge.
	Currency BillingCurrencyCode `json:"currency"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// Discounts The discounts applied to the charge.
	Discounts *BillingChargeFlatFeeDiscounts `json:"discounts,omitempty"`

	// Feature A reference to the feature associated with the charge, when applicable.
	Feature *FeatureReference `json:"feature,omitempty"`

	// FullServicePeriod The full, unprorated service period of the charge.
	FullServicePeriod *ClosedPeriod `json:"full_service_period,omitempty"`

	// InvoiceAt The timestamp when the charge is intended to be invoiced.
	InvoiceAt DateTime `json:"invoice_at"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// PaymentTerm Payment term of the flat fee charge.
	PaymentTerm BillingPricePaymentTerm `json:"payment_term"`

	// ProrationConfiguration The proration configuration of the charge.
	ProrationConfiguration BillingRateCardProrationConfiguration `json:"proration_configuration"`

	// ServicePeriod The effective service period covered by the charge.
	ServicePeriod ClosedPeriod `json:"service_period"`

	// SettlementMode Settlement mode of the charge.
	SettlementMode BillingSettlementMode `json:"settlement_mode"`

	// TaxConfig Tax configuration of the charge.
	TaxConfig *BillingTaxConfig `json:"tax_config,omitempty"`

	// Type The type of the charge.
	Type CreateChargeFlatFeeRequestType `json:"type"`

	// UniqueReferenceId Unique reference ID of the charge.
	UniqueReferenceId *string `json:"unique_reference_id,omitempty"`
}

CreateChargeFlatFeeRequest Flat fee charge create request.

type CreateChargeFlatFeeRequestType

type CreateChargeFlatFeeRequestType string

CreateChargeFlatFeeRequestType The type of the charge.

const (
	CreateChargeFlatFeeRequestTypeFlatFee CreateChargeFlatFeeRequestType = "flat_fee"
)

Defines values for CreateChargeFlatFeeRequestType.

func (CreateChargeFlatFeeRequestType) Valid

Valid indicates whether the value is a known member of the CreateChargeFlatFeeRequestType enum.

type CreateChargeRequest

type CreateChargeRequest struct {
	// contains filtered or unexported fields
}

CreateChargeRequest Customer charge.

func (CreateChargeRequest) AsCreateChargeFlatFeeRequest

func (t CreateChargeRequest) AsCreateChargeFlatFeeRequest() (CreateChargeFlatFeeRequest, error)

AsCreateChargeFlatFeeRequest returns the union data inside the CreateChargeRequest as a CreateChargeFlatFeeRequest

func (CreateChargeRequest) AsCreateChargeUsageBasedRequest

func (t CreateChargeRequest) AsCreateChargeUsageBasedRequest() (CreateChargeUsageBasedRequest, error)

AsCreateChargeUsageBasedRequest returns the union data inside the CreateChargeRequest as a CreateChargeUsageBasedRequest

func (CreateChargeRequest) Discriminator

func (t CreateChargeRequest) Discriminator() (string, error)

func (*CreateChargeRequest) FromCreateChargeFlatFeeRequest

func (t *CreateChargeRequest) FromCreateChargeFlatFeeRequest(v CreateChargeFlatFeeRequest) error

FromCreateChargeFlatFeeRequest overwrites any union data inside the CreateChargeRequest as the provided CreateChargeFlatFeeRequest

func (*CreateChargeRequest) FromCreateChargeUsageBasedRequest

func (t *CreateChargeRequest) FromCreateChargeUsageBasedRequest(v CreateChargeUsageBasedRequest) error

FromCreateChargeUsageBasedRequest overwrites any union data inside the CreateChargeRequest as the provided CreateChargeUsageBasedRequest

func (CreateChargeRequest) MarshalJSON

func (t CreateChargeRequest) MarshalJSON() ([]byte, error)

func (*CreateChargeRequest) MergeCreateChargeFlatFeeRequest

func (t *CreateChargeRequest) MergeCreateChargeFlatFeeRequest(v CreateChargeFlatFeeRequest) error

MergeCreateChargeFlatFeeRequest performs a merge with any union data inside the CreateChargeRequest, using the provided CreateChargeFlatFeeRequest

func (*CreateChargeRequest) MergeCreateChargeUsageBasedRequest

func (t *CreateChargeRequest) MergeCreateChargeUsageBasedRequest(v CreateChargeUsageBasedRequest) error

MergeCreateChargeUsageBasedRequest performs a merge with any union data inside the CreateChargeRequest, using the provided CreateChargeUsageBasedRequest

func (*CreateChargeRequest) UnmarshalJSON

func (t *CreateChargeRequest) UnmarshalJSON(b []byte) error

func (CreateChargeRequest) ValueByDiscriminator

func (t CreateChargeRequest) ValueByDiscriminator() (interface{}, error)

type CreateChargeUsageBasedRequest

type CreateChargeUsageBasedRequest struct {
	// BillingPeriod The billing period the charge belongs to.
	BillingPeriod *ClosedPeriod `json:"billing_period,omitempty"`

	// Commitments Spend commitments for the charge.
	Commitments *BillingSpendCommitments `json:"commitments,omitempty"`

	// CostBasis Defines how a custom-currency charge is converted into its fiat invoice
	// currency; the resolved rate is exposed through `resolved_cost_basis`. Required
	// when `currency` is custom and the charge settles as `credit_then_invoice`; must
	// be omitted otherwise.
	CostBasis *BillingChargeCostBasis `json:"cost_basis,omitempty"`

	// Currency The currency of the charge.
	Currency BillingCurrencyCode `json:"currency"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// Discounts Discounts applied to the usage-based charge.
	Discounts *BillingRateCardDiscounts `json:"discounts,omitempty"`

	// Feature A reference to the feature associated with the charge.
	Feature FeatureReference `json:"feature"`

	// FullServicePeriod The full, unprorated service period of the charge.
	FullServicePeriod *ClosedPeriod `json:"full_service_period,omitempty"`

	// InvoiceAt The timestamp when the charge is intended to be invoiced.
	InvoiceAt DateTime `json:"invoice_at"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// Price The price of the charge.
	//
	// `free` prices are rejected on create: a usage-based charge always carries a
	// concrete price.
	Price BillingPriceUsageBased `json:"price"`

	// ServicePeriod The effective service period covered by the charge.
	ServicePeriod ClosedPeriod `json:"service_period"`

	// SettlementMode Settlement mode of the charge.
	SettlementMode BillingSettlementMode `json:"settlement_mode"`

	// TaxConfig Tax configuration of the charge.
	TaxConfig *BillingTaxConfig `json:"tax_config,omitempty"`

	// Type The type of the charge.
	Type CreateChargeUsageBasedRequestType `json:"type"`

	// UniqueReferenceId Unique reference ID of the charge.
	UniqueReferenceId *string `json:"unique_reference_id,omitempty"`

	// UnitConfig Unit conversion configuration for the charge.
	//
	// Synthesized on read for charges created from v1 dynamic or package prices:
	// dynamic prices map to a unit price with a multiply unit config, and package
	// prices map to a unit price with a divide unit config.
	//
	// Accepted on create only when the UnitConfig feature is enabled on the
	// deployment; otherwise rejected.
	UnitConfig *BillingUnitConfig `json:"unit_config,omitempty"`
}

CreateChargeUsageBasedRequest Usage-based charge create request.

type CreateChargeUsageBasedRequestType

type CreateChargeUsageBasedRequestType string

CreateChargeUsageBasedRequestType The type of the charge.

const (
	CreateChargeUsageBasedRequestTypeUsageBased CreateChargeUsageBasedRequestType = "usage_based"
)

Defines values for CreateChargeUsageBasedRequestType.

func (CreateChargeUsageBasedRequestType) Valid

Valid indicates whether the value is a known member of the CreateChargeUsageBasedRequestType enum.

type CreateCostBasisJSONRequestBody

type CreateCostBasisJSONRequestBody = CreateCostBasisRequest

CreateCostBasisJSONRequestBody defines body for CreateCostBasis for application/json ContentType.

type CreateCostBasisRequest

type CreateCostBasisRequest struct {
	// EffectiveFrom An ISO-8601 timestamp representation of the date from which the cost basis is
	// effective. If not provided, it will be effective immediately and will be set to
	// `now` by the system.
	EffectiveFrom *DateTime `json:"effective_from,omitempty"`

	// EffectiveTo An ISO-8601 timestamp representation of the date until which the cost basis is
	// effective. If provided, it must be later than `effective_from`. If not provided,
	// it remains effective until superseded.
	EffectiveTo *DateTime `json:"effective_to,omitempty"`

	// FiatCode The fiat currency code for the cost basis.
	FiatCode CurrencyCode `json:"fiat_code"`

	// Rate The cost rate for the currency.
	Rate Numeric `json:"rate"`
}

CreateCostBasisRequest CostBasis create request.

type CreateCreditAdjustmentJSONRequestBody

type CreateCreditAdjustmentJSONRequestBody = CreateCreditAdjustmentRequest

CreateCreditAdjustmentJSONRequestBody defines body for CreateCreditAdjustment for application/json ContentType.

type CreateCreditAdjustmentRequest

type CreateCreditAdjustmentRequest struct {
	// Amount Granted credit amount.
	Amount Numeric `json:"amount"`

	// Currency The currency of the granted credits.
	Currency BillingCurrencyCode `json:"currency"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`
}

CreateCreditAdjustmentRequest CreditAdjustment create request.

type CreateCreditGrantFilters

type CreateCreditGrantFilters struct {
	// Features Limit the credit grant to specific features. If no features are specified, the
	// credit grant can be used for any feature.
	Features *[]ResourceKey `json:"features,omitempty"`

	// Plans Limit credits to charges from these plans. Entries are alternatives; when
	// features are also specified, both dimensions must match. Omission or an empty
	// list leaves plans unrestricted.
	Plans *[]CreateCreditGrantPlanFilter `json:"plans,omitempty"`
}

CreateCreditGrantFilters Filters for the credit grant.

type CreateCreditGrantJSONRequestBody

type CreateCreditGrantJSONRequestBody = CreateCreditGrantRequest

CreateCreditGrantJSONRequestBody defines body for CreateCreditGrant for application/json ContentType.

type CreateCreditGrantPlanFilter

type CreateCreditGrantPlanFilter struct {
	// Key The plan key in the customer's namespace.
	Key ResourceKey `json:"key"`

	// Version Omission matches all versions, including future versions.
	Version *CreateVersionFilter `json:"version,omitempty"`
}

CreateCreditGrantPlanFilter A plan key and an optional version constraint for matching credit grants.

type CreateCreditGrantPurchase

type CreateCreditGrantPurchase struct {
	// AvailabilityPolicy Controls when credits become available for consumption.
	//
	// Defaults to `on_creation`.
	AvailabilityPolicy *BillingCreditAvailabilityPolicy `json:"availability_policy,omitempty"`

	// CostBasis Defines how custom-currency credits are priced in the purchase `currency`; the
	// resolved rate is exposed through `resolved_cost_basis`.
	//
	// Fiat grants accept only a `manual` cost basis without `fiat_currency`, where
	// `rate` is the fiat cost per credit unit. Custom-currency grants require a cost
	// basis of any type with `fiat_currency` set and equal to the purchase `currency`.
	// A `dynamic` cost basis is resolved at the grant's effective time, so the
	// currency cost basis must be effective by then. Cannot be combined with
	// `per_unit_cost_basis`.
	CostBasis *CreateChargeCostBasis `json:"cost_basis,omitempty"`

	// Currency Fiat currency the purchase is settled in.
	//
	// Must equal the grant `currency` for fiat grants and `cost_basis.fiat_currency`
	// for custom-currency grants.
	Currency CurrencyCode `json:"currency"`

	// PerUnitCostBasis Fiat cost basis per credit unit of a fiat-currency grant.
	//
	// If `per_unit_cost_basis` is 0.50 and credit amount is
	// $100.00, the total
	// charge is $50.00. The value must be greater than 0. If the
	// cost basis is 0, use `funding_method=none` instead.
	//
	// Only applies to fiat grants and cannot be combined with `cost_basis`. Defaults
	// to 1.0 when neither is provided.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	PerUnitCostBasis *Numeric `json:"per_unit_cost_basis,omitempty"`
}

CreateCreditGrantPurchase Purchase and payment terms of the grant.

type CreateCreditGrantRequest

type CreateCreditGrantRequest struct {
	// Amount Granted credit amount.
	Amount Numeric `json:"amount"`

	// Currency The fiat or custom currency of the granted credits.
	//
	// Funded custom-currency grants must define `purchase.cost_basis` to settle in a
	// fiat currency.
	Currency CreateCurrencyCode `json:"currency"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// EffectiveAt The timestamp when the credit grant becomes effective.
	//
	// Defaults to the current date and time.
	EffectiveAt *DateTime `json:"effective_at,omitempty"`

	// ExpiresAfter The duration after which the credit grant expires.
	//
	// Defaults to never expiring.
	ExpiresAfter *ISO8601Duration `json:"expires_after,omitempty"`

	// Filters Filters for the credit grant.
	Filters *CreateCreditGrantFilters `json:"filters,omitempty"`

	// FundingMethod Funding method of the grant.
	FundingMethod BillingCreditFundingMethod `json:"funding_method"`

	// Key Idempotency key for the credit grant creation request.
	//
	// Unique per customer: reusing the same key for the same customer returns an HTTP
	// 409 Conflict instead of creating a duplicate grant, which makes create requests
	// safe to retry. The same key may be reused across different customers.
	Key *ExternalResourceKey `json:"key,omitempty"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// Priority Draw-down priority of the grant. Lower values have higher priority.
	Priority *int16 `json:"priority,omitempty"`

	// Purchase Present when a funding workflow applies (funding_method is not `none`).
	Purchase *CreateCreditGrantPurchase `json:"purchase,omitempty"`

	// TaxConfig Tax configuration for the grant.
	//
	// For `invoice` and `external` funding methods, tax configuration should be
	// provided to ensure correct revenue recognition. When not provided, the default
	// credit grant tax code is applied, if that's not set the global default taxcode
	// is used.
	TaxConfig *CreateTaxCodeConfig `json:"tax_config,omitempty"`
}

CreateCreditGrantRequest CreditGrant create request.

type CreateCurrencyCode

type CreateCurrencyCode = string

CreateCurrencyCode Fiat or custom currency code.

type CreateCurrencyCustomRequest

type CreateCurrencyCustomRequest struct {
	// Code Custom currency code. It should be a unique code but not conflicting with any
	// existing fiat currency codes.
	Code BillingCurrencyCodeCustom `json:"code"`

	// DecimalMark The decimal mark for the currency. It should be a string that represents the
	// decimal mark of the currency, such as "." for US Dollar or "," for Euro.
	DecimalMark string `json:"decimal_mark"`

	// Name The name of the currency. It should be a human-readable string that represents
	// the name of the currency, such as "US Dollar" or "Euro".
	Name string `json:"name"`

	// Precision The precision of the currency. It should be a number that represents the number
	// of decimal places used for the currency, such as 2 for US Dollar or Euro.
	Precision uint32 `json:"precision"`

	// Symbol The symbol of the currency. It should be a string that represents the symbol of
	// the currency, such as "$" for US Dollar or "€" for Euro.
	Symbol *string `json:"symbol,omitempty"`

	// ThousandSeparator The thousand separator for the currency. It should be a string that represents
	// the thousand separator of the currency, such as "," for US Dollar or "." for
	// Euro.
	ThousandSeparator string `json:"thousand_separator"`
}

CreateCurrencyCustomRequest CurrencyCustom create request.

type CreateCustomCurrencyJSONRequestBody

type CreateCustomCurrencyJSONRequestBody = CreateCurrencyCustomRequest

CreateCustomCurrencyJSONRequestBody defines body for CreateCustomCurrency for application/json ContentType.

type CreateCustomerChargesJSONRequestBody

type CreateCustomerChargesJSONRequestBody = CreateChargeRequest

CreateCustomerChargesJSONRequestBody defines body for CreateCustomerCharges for application/json ContentType.

type CreateCustomerEntitlementGrantJSONRequestBody

type CreateCustomerEntitlementGrantJSONRequestBody = BillingEntitlementGrantCreateRequest

CreateCustomerEntitlementGrantJSONRequestBody defines body for CreateCustomerEntitlementGrant for application/json ContentType.

type CreateCustomerEntitlementJSONRequestBody

type CreateCustomerEntitlementJSONRequestBody = CreateEntitlementRequest

CreateCustomerEntitlementJSONRequestBody defines body for CreateCustomerEntitlement for application/json ContentType.

type CreateCustomerJSONRequestBody

type CreateCustomerJSONRequestBody = CreateCustomerRequest

CreateCustomerJSONRequestBody defines body for CreateCustomer for application/json ContentType.

type CreateCustomerRequest

type CreateCustomerRequest struct {
	// BillingAddress The billing address of the customer. Used for tax and invoicing.
	BillingAddress *Address `json:"billing_address,omitempty"`

	// Currency Currency of the customer. Used for billing, tax and invoicing.
	Currency *CurrencyCode `json:"currency,omitempty"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// Key ExternalResourceKey is a unique string that is used to identify a resource in an
	// external system.
	Key ExternalResourceKey `json:"key"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// PrimaryEmail The primary email address of the customer.
	PrimaryEmail *string `json:"primary_email,omitempty"`

	// UsageAttribution Mapping to attribute metered usage to the customer by the event subject.
	UsageAttribution *BillingCustomerUsageAttribution `json:"usage_attribution,omitempty"`
}

CreateCustomerRequest Customer create request.

type CreateCustomerStripeCheckoutSessionJSONRequestBody

type CreateCustomerStripeCheckoutSessionJSONRequestBody = BillingCustomerStripeCreateCheckoutSessionRequest

CreateCustomerStripeCheckoutSessionJSONRequestBody defines body for CreateCustomerStripeCheckoutSession for application/json ContentType.

type CreateCustomerStripePortalSessionJSONRequestBody

type CreateCustomerStripePortalSessionJSONRequestBody = BillingCustomerStripeCreateCustomerPortalSessionRequest

CreateCustomerStripePortalSessionJSONRequestBody defines body for CreateCustomerStripePortalSession for application/json ContentType.

type CreateEntitlementBooleanRequest

type CreateEntitlementBooleanRequest struct {
	// Feature The feature the customer is entitled to use.
	Feature FeatureReference `json:"feature"`
	Labels  *Labels          `json:"labels,omitempty"`

	// Type The type of the entitlement.
	Type CreateEntitlementBooleanRequestType `json:"type"`

	// UsagePeriod The usage period of the entitlement. The anchor defaults to the entitlement
	// creation time.
	UsagePeriod *RecurringPeriodInput `json:"usage_period,omitempty"`
}

CreateEntitlementBooleanRequest Boolean entitlement create request.

type CreateEntitlementBooleanRequestType

type CreateEntitlementBooleanRequestType string

CreateEntitlementBooleanRequestType The type of the entitlement.

const (
	CreateEntitlementBooleanRequestTypeBoolean CreateEntitlementBooleanRequestType = "boolean"
)

Defines values for CreateEntitlementBooleanRequestType.

func (CreateEntitlementBooleanRequestType) Valid

Valid indicates whether the value is a known member of the CreateEntitlementBooleanRequestType enum.

type CreateEntitlementMeteredRequest

type CreateEntitlementMeteredRequest struct {
	// Feature The feature the customer is entitled to use.
	Feature FeatureReference `json:"feature"`

	// Grants Grants created together with the entitlement. Cannot be combined with `issue`.
	Grants *[]BillingEntitlementGrantCreateRequest `json:"grants,omitempty"`

	// IsSoftLimit If true, the customer keeps access to the feature after the balance is
	// exhausted.
	IsSoftLimit *bool `json:"is_soft_limit,omitempty"`

	// Issue Usage granted automatically after each reset. Cannot be combined with `grants`.
	Issue *BillingEntitlementIssueAfterReset `json:"issue,omitempty"`

	// IssueAfterReset The amount granted automatically after each reset.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	IssueAfterReset *Numeric `json:"issue_after_reset,omitempty"`

	// IssueAfterResetPriority The priority of the grant created after each reset.
	// Deprecated: this property has been marked as deprecated upstream, but no `x-deprecated-reason` was set
	IssueAfterResetPriority *uint8  `json:"issue_after_reset_priority,omitempty"`
	Labels                  *Labels `json:"labels,omitempty"`

	// MeasureUsageFrom The time from which usage is measured. Defaults to the entitlement creation
	// time.
	MeasureUsageFrom *BillingEntitlementMeasureUsageFrom `json:"measure_usage_from,omitempty"`

	// PreserveOverageAtReset If true, the overage is preserved at reset. If false, the usage is reset to 0.
	PreserveOverageAtReset *bool `json:"preserve_overage_at_reset,omitempty"`

	// Type The type of the entitlement.
	Type CreateEntitlementMeteredRequestType `json:"type"`

	// UsagePeriod The usage period of the entitlement. The balance resets at the start of every
	// period. The anchor defaults to the entitlement creation time.
	UsagePeriod RecurringPeriodInput `json:"usage_period"`
}

CreateEntitlementMeteredRequest Metered entitlement create request.

type CreateEntitlementMeteredRequestType

type CreateEntitlementMeteredRequestType string

CreateEntitlementMeteredRequestType The type of the entitlement.

const (
	CreateEntitlementMeteredRequestTypeMetered CreateEntitlementMeteredRequestType = "metered"
)

Defines values for CreateEntitlementMeteredRequestType.

func (CreateEntitlementMeteredRequestType) Valid

Valid indicates whether the value is a known member of the CreateEntitlementMeteredRequestType enum.

type CreateEntitlementRequest

type CreateEntitlementRequest struct {
	// contains filtered or unexported fields
}

CreateEntitlementRequest Entitlement create request.

func (CreateEntitlementRequest) AsCreateEntitlementBooleanRequest

func (t CreateEntitlementRequest) AsCreateEntitlementBooleanRequest() (CreateEntitlementBooleanRequest, error)

AsCreateEntitlementBooleanRequest returns the union data inside the CreateEntitlementRequest as a CreateEntitlementBooleanRequest

func (CreateEntitlementRequest) AsCreateEntitlementMeteredRequest

func (t CreateEntitlementRequest) AsCreateEntitlementMeteredRequest() (CreateEntitlementMeteredRequest, error)

AsCreateEntitlementMeteredRequest returns the union data inside the CreateEntitlementRequest as a CreateEntitlementMeteredRequest

func (CreateEntitlementRequest) AsCreateEntitlementStaticRequest

func (t CreateEntitlementRequest) AsCreateEntitlementStaticRequest() (CreateEntitlementStaticRequest, error)

AsCreateEntitlementStaticRequest returns the union data inside the CreateEntitlementRequest as a CreateEntitlementStaticRequest

func (CreateEntitlementRequest) Discriminator

func (t CreateEntitlementRequest) Discriminator() (string, error)

func (*CreateEntitlementRequest) FromCreateEntitlementBooleanRequest

func (t *CreateEntitlementRequest) FromCreateEntitlementBooleanRequest(v CreateEntitlementBooleanRequest) error

FromCreateEntitlementBooleanRequest overwrites any union data inside the CreateEntitlementRequest as the provided CreateEntitlementBooleanRequest

func (*CreateEntitlementRequest) FromCreateEntitlementMeteredRequest

func (t *CreateEntitlementRequest) FromCreateEntitlementMeteredRequest(v CreateEntitlementMeteredRequest) error

FromCreateEntitlementMeteredRequest overwrites any union data inside the CreateEntitlementRequest as the provided CreateEntitlementMeteredRequest

func (*CreateEntitlementRequest) FromCreateEntitlementStaticRequest

func (t *CreateEntitlementRequest) FromCreateEntitlementStaticRequest(v CreateEntitlementStaticRequest) error

FromCreateEntitlementStaticRequest overwrites any union data inside the CreateEntitlementRequest as the provided CreateEntitlementStaticRequest

func (CreateEntitlementRequest) MarshalJSON

func (t CreateEntitlementRequest) MarshalJSON() ([]byte, error)

func (*CreateEntitlementRequest) MergeCreateEntitlementBooleanRequest

func (t *CreateEntitlementRequest) MergeCreateEntitlementBooleanRequest(v CreateEntitlementBooleanRequest) error

MergeCreateEntitlementBooleanRequest performs a merge with any union data inside the CreateEntitlementRequest, using the provided CreateEntitlementBooleanRequest

func (*CreateEntitlementRequest) MergeCreateEntitlementMeteredRequest

func (t *CreateEntitlementRequest) MergeCreateEntitlementMeteredRequest(v CreateEntitlementMeteredRequest) error

MergeCreateEntitlementMeteredRequest performs a merge with any union data inside the CreateEntitlementRequest, using the provided CreateEntitlementMeteredRequest

func (*CreateEntitlementRequest) MergeCreateEntitlementStaticRequest

func (t *CreateEntitlementRequest) MergeCreateEntitlementStaticRequest(v CreateEntitlementStaticRequest) error

MergeCreateEntitlementStaticRequest performs a merge with any union data inside the CreateEntitlementRequest, using the provided CreateEntitlementStaticRequest

func (*CreateEntitlementRequest) UnmarshalJSON

func (t *CreateEntitlementRequest) UnmarshalJSON(b []byte) error

func (CreateEntitlementRequest) ValueByDiscriminator

func (t CreateEntitlementRequest) ValueByDiscriminator() (interface{}, error)

type CreateEntitlementStaticRequest

type CreateEntitlementStaticRequest struct {
	// Config The entitlement configuration as a JSON value. Returned when checking
	// entitlement access.
	Config json.RawMessage `json:"config"`

	// Feature The feature the customer is entitled to use.
	Feature FeatureReference `json:"feature"`
	Labels  *Labels          `json:"labels,omitempty"`

	// Type The type of the entitlement.
	Type CreateEntitlementStaticRequestType `json:"type"`

	// UsagePeriod The usage period of the entitlement. The anchor defaults to the entitlement
	// creation time.
	UsagePeriod *RecurringPeriodInput `json:"usage_period,omitempty"`
}

CreateEntitlementStaticRequest Static entitlement create request.

type CreateEntitlementStaticRequestType

type CreateEntitlementStaticRequestType string

CreateEntitlementStaticRequestType The type of the entitlement.

const (
	CreateEntitlementStaticRequestTypeStatic CreateEntitlementStaticRequestType = "static"
)

Defines values for CreateEntitlementStaticRequestType.

func (CreateEntitlementStaticRequestType) Valid

Valid indicates whether the value is a known member of the CreateEntitlementStaticRequestType enum.

type CreateFeatureJSONRequestBody

type CreateFeatureJSONRequestBody = CreateFeatureRequest

CreateFeatureJSONRequestBody defines body for CreateFeature for application/json ContentType.

type CreateFeatureRequest

type CreateFeatureRequest struct {
	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// Key A key is a unique string that is used to identify a resource.
	Key ResourceKey `json:"key"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Meter The meter that the feature is associated with and based on which usage is
	// calculated. If not specified, the feature is static.
	Meter *FeatureMeterReference `json:"meter,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// UnitCost Optional per-unit cost configuration. Use "manual" for a fixed per-unit cost, or
	// "llm" to look up cost from the LLM cost database based on meter group-by
	// properties.
	UnitCost *BillingFeatureUnitCost `json:"unit_cost,omitempty"`
}

CreateFeatureRequest Feature create request.

type CreateLlmCostOverrideJSONRequestBody

type CreateLlmCostOverrideJSONRequestBody = LLMCostOverrideCreate

CreateLlmCostOverrideJSONRequestBody defines body for CreateLlmCostOverride for application/json ContentType.

type CreateMeterJSONRequestBody

type CreateMeterJSONRequestBody = CreateMeterRequest

CreateMeterJSONRequestBody defines body for CreateMeter for application/json ContentType.

type CreateMeterRequest

type CreateMeterRequest struct {
	// Aggregation The aggregation type to use for the meter.
	Aggregation MeterAggregation `json:"aggregation"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// Dimensions Named JSONPath expressions to extract the group by values from the event data.
	//
	// Keys must be unique and consist only alphanumeric and underscore characters.
	Dimensions *map[string]string `json:"dimensions,omitempty"`

	// EventType The event type to include in the aggregation.
	EventType string `json:"event_type"`

	// EventsFrom The date since the meter should include events. Useful to skip old events. If
	// not specified, all historical events are included.
	EventsFrom *DateTime `json:"events_from,omitempty"`

	// Key A key is a unique string that is used to identify a resource.
	Key ResourceKey `json:"key"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// ValueProperty JSONPath expression to extract the value from the ingested event's data
	// property.
	//
	// The ingested value for sum, avg, min, and max aggregations is a number or a
	// string that can be parsed to a number.
	//
	// For unique_count aggregation, the ingested value must be a string. For count
	// aggregation the value_property is ignored.
	ValueProperty *string `json:"value_property,omitempty"`
}

CreateMeterRequest Meter create request.

type CreateNotificationChannelJSONRequestBody

type CreateNotificationChannelJSONRequestBody = CreateNotificationChannelRequest

CreateNotificationChannelJSONRequestBody defines body for CreateNotificationChannel for application/json ContentType.

type CreateNotificationChannelRequest

type CreateNotificationChannelRequest struct {
	// CustomHeaders Custom HTTP headers to include on every webhook delivery request, keyed by
	// header name.
	CustomHeaders *map[string]string `json:"custom_headers,omitempty"`

	// Disabled Whether the channel is disabled. Disabled channels do not receive notification
	// events.
	Disabled *bool `json:"disabled,omitempty"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// SigningSecret Secret used to sign outgoing webhook payloads so recipients can verify their
	// authenticity. If omitted on create, a secret is generated automatically by the
	// delivery provider. This is a sensitive credential returned in responses (unlike
	// most secrets) specifically so clients can retrieve a server-generated value and
	// verify webhook signatures; handle it with the same care as any other credential.
	SigningSecret *string `json:"signing_secret,omitempty"`

	// Type The type of the channel. Immutable after creation.
	Type BillingNotificationChannelType `json:"type"`

	// Url The URL that webhook notification events are delivered to.
	Url string `json:"url"`
}

CreateNotificationChannelRequest NotificationChannel create request.

type CreateNotificationRuleJSONRequestBody

type CreateNotificationRuleJSONRequestBody = BillingNotificationRuleRequest

CreateNotificationRuleJSONRequestBody defines body for CreateNotificationRule for application/json ContentType.

type CreatePlanAddonJSONRequestBody

type CreatePlanAddonJSONRequestBody = CreatePlanAddonRequest

CreatePlanAddonJSONRequestBody defines body for CreatePlanAddon for application/json ContentType.

type CreatePlanAddonRequest

type CreatePlanAddonRequest struct {
	// Addon The add-on associated with the plan.
	Addon AddonReference `json:"addon"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// FromPlanPhase The key of the plan phase from which the add-on becomes available for purchase.
	FromPlanPhase ResourceKey `json:"from_plan_phase"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// MaxQuantity The maximum number of times the add-on can be purchased for the plan. For
	// single-instance add-ons this field must be omitted. For multi-instance add-ons
	// when omitted, unlimited quantity can be purchased.
	MaxQuantity *int `json:"max_quantity,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`
}

CreatePlanAddonRequest PlanAddon create request.

type CreatePlanJSONRequestBody

type CreatePlanJSONRequestBody = CreatePlanRequest

CreatePlanJSONRequestBody defines body for CreatePlan for application/json ContentType.

type CreatePlanRequest

type CreatePlanRequest struct {
	// BillingCadence The billing cadence for subscriptions using this plan.
	BillingCadence ISO8601Duration `json:"billing_cadence"`

	// Currency The currency code of the plan.
	Currency BillingCurrencyCode `json:"currency"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// Key A key is a semi-unique string that is used to identify the plan. It is used to
	// reference the latest `active` version of the plan and is unique with the version
	// number.
	Key ResourceKey `json:"key"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// Phases The plan phases define the pricing ramp for a subscription. A phase switch
	// occurs only at the end of a billing period. At least one phase is required.
	Phases []BillingPlanPhase `json:"phases"`

	// ProRatingEnabled Whether pro-rating is enabled for this plan.
	ProRatingEnabled *bool `json:"pro_rating_enabled,omitempty"`

	// SettlementMode Settlement mode for the plan. Defaults to `credit_then_invoice` when omitted.
	SettlementMode *BillingSettlementMode `json:"settlement_mode,omitempty"`
}

CreatePlanRequest Plan create request. `settlement_mode` is re-declared as optional with a `credit_then_invoice` default, applied only on create.

type CreateResourceReference

type CreateResourceReference struct {
	// Id ULID (Universally Unique Lexicographically Sortable Identifier).
	Id ULID `json:"id"`
}

CreateResourceReference TaxCode reference.

type CreateSubscriptionAddonJSONRequestBody

type CreateSubscriptionAddonJSONRequestBody = CreateSubscriptionAddonRequest

CreateSubscriptionAddonJSONRequestBody defines body for CreateSubscriptionAddon for application/json ContentType.

type CreateSubscriptionAddonRequest

type CreateSubscriptionAddonRequest struct {
	// Addon The add-on associated with the subscription.
	Addon AddonReference `json:"addon"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Quantity The quantity of the add-on. Always 1 for single instance add-ons.
	Quantity int `json:"quantity"`

	// Timing The timing of the operation. After the create or update, a new entry will be
	// created in the timeline.
	Timing BillingSubscriptionEditTiming `json:"timing"`
}

CreateSubscriptionAddonRequest SubscriptionAddon create request.

type CreateSubscriptionJSONRequestBody

type CreateSubscriptionJSONRequestBody = BillingSubscriptionCreate

CreateSubscriptionJSONRequestBody defines body for CreateSubscription for application/json ContentType.

type CreateTaxCodeConfig

type CreateTaxCodeConfig struct {
	// Behavior Tax behavior.
	//
	// This enum is used to specify whether tax is included in the price or excluded
	// from the price. If not specified, the billing profile is used to determine the
	// tax behavior. If not specified in the billing profile, the provider's default
	// behavior is used.
	Behavior *BillingTaxBehavior `json:"behavior,omitempty"`

	// Code Tax code applied to the invoice line item.
	Code *CreateResourceReference `json:"code,omitempty"`
}

CreateTaxCodeConfig Tax configuration for a billable resource.

Applies a tax code and tax behavior to the resulting invoice line items. When not set, the applicable default is used: the billing profile default tax configuration, then the organization default tax code.

type CreateTaxCodeJSONRequestBody

type CreateTaxCodeJSONRequestBody = CreateTaxCodeRequest

CreateTaxCodeJSONRequestBody defines body for CreateTaxCode for application/json ContentType.

type CreateTaxCodeRequest

type CreateTaxCodeRequest struct {
	// AppMappings Mapping of app types to tax codes.
	AppMappings []BillingTaxCodeAppMapping `json:"app_mappings"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// Key A key is a unique string that is used to identify a resource.
	Key ResourceKey `json:"key"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`
}

CreateTaxCodeRequest TaxCode create request.

type CreateVersionFilter

type CreateVersionFilter struct {
	// Eq Match this exact version.
	Eq *int32 `json:"eq,omitempty"`

	// Gte Match this version and later versions.
	Gte *int32 `json:"gte,omitempty"`

	// Lte Match this version and earlier versions.
	Lte *int32 `json:"lte,omitempty"`

	// Oeq Match one of these versions.
	Oeq *[]int32 `json:"oeq,omitempty"`
}

CreateVersionFilter An integer version comparison. Exactly one operator must be provided.

type CreditBalance

type CreditBalance struct {
	Currency BillingCurrencyCode `json:"currency"`

	// CustomCurrency Managed currency reference. Present only for custom currencies.
	CustomCurrency *CurrencyCustomReference `json:"custom_currency,omitempty"`

	// Live Credits available after applying currently live charge impacts.
	//
	// Always zero for historical balance queries using the `timestamp` parameter
	// because live charge impacts cannot be reconstructed historically.
	Live Numeric `json:"live"`

	// Pending Credits that have been granted but are not yet written to the ledger, or are
	// written to the ledger with a future booked time.
	Pending Numeric `json:"pending"`

	// Settled Credits that have been booked on the ledger as of the balance timestamp.
	Settled Numeric `json:"settled"`
}

CreditBalance The credit balance by currency.

type CreditGrantPagePaginatedResponse

type CreditGrantPagePaginatedResponse struct {
	Data []BillingCreditGrant `json:"data"`

	// Meta returns the pagination information
	Meta PaginatedMeta `json:"meta"`
}

CreditGrantPagePaginatedResponse Page paginated response.

type CreditTransactionPaginatedResponse

type CreditTransactionPaginatedResponse struct {
	Data []BillingCreditTransaction `json:"data"`

	// Meta Pagination metadata.
	Meta CursorMeta `json:"meta"`
}

CreditTransactionPaginatedResponse Cursor paginated response.

type CurrencyCode

type CurrencyCode = string

CurrencyCode Three-letter [ISO4217](https://www.iso.org/iso-4217-currency-codes.html) currency code. Custom three-letter currency codes are also supported for convenience.

type CurrencyCustomReference

type CurrencyCustomReference struct {
	// Id ULID (Universally Unique Lexicographically Sortable Identifier).
	Id ULID `json:"id"`
}

CurrencyCustomReference CurrencyCustom reference.

type CurrencyPagePaginatedResponse

type CurrencyPagePaginatedResponse struct {
	Data []BillingCurrency `json:"data"`

	// Meta returns the pagination information
	Meta PaginatedMeta `json:"meta"`
}

CurrencyPagePaginatedResponse Page paginated response.

type CursorMeta

type CursorMeta struct {
	Page CursorMetaPage `json:"page"`
}

CursorMeta Pagination metadata.

type CursorMetaPage

type CursorMetaPage struct {
	// First URI to the first page
	First *string `json:"first,omitempty"`

	// Last URI to the last page
	Last *string `json:"last,omitempty"`

	// Next URI to the next page
	Next nullable.Nullable[string] `json:"next"`

	// Previous URI to the previous page
	Previous nullable.Nullable[string] `json:"previous"`

	// Size Requested page size
	Size float32 `json:"size"`
}

CursorMetaPage defines model for CursorMetaPage.

type CursorPaginationQuery

type CursorPaginationQuery = CursorPaginationQueryPage

CursorPaginationQuery Determines which page of the collection to retrieve.

type CursorPaginationQueryPage

type CursorPaginationQueryPage struct {
	// After Request the next page of data, starting with the item after this parameter.
	After *string `json:"after,omitempty"`

	// Before Request the previous page of data, starting with the item before this parameter.
	Before *string `json:"before,omitempty"`

	// Size The number of items to include per page.
	Size *int `json:"size,omitempty"`
}

CursorPaginationQueryPage Determines which page of the collection to retrieve.

type CustomerOrReference

type CustomerOrReference struct {
	// contains filtered or unexported fields
}

CustomerOrReference Customer or reference.

func (CustomerOrReference) AsBillingCustomer

func (t CustomerOrReference) AsBillingCustomer() (BillingCustomer, error)

AsBillingCustomer returns the union data inside the CustomerOrReference as a BillingCustomer

func (CustomerOrReference) AsCustomerReference

func (t CustomerOrReference) AsCustomerReference() (CustomerReference, error)

AsCustomerReference returns the union data inside the CustomerOrReference as a CustomerReference

func (*CustomerOrReference) FromBillingCustomer

func (t *CustomerOrReference) FromBillingCustomer(v BillingCustomer) error

FromBillingCustomer overwrites any union data inside the CustomerOrReference as the provided BillingCustomer

func (*CustomerOrReference) FromCustomerReference

func (t *CustomerOrReference) FromCustomerReference(v CustomerReference) error

FromCustomerReference overwrites any union data inside the CustomerOrReference as the provided CustomerReference

func (CustomerOrReference) MarshalJSON

func (t CustomerOrReference) MarshalJSON() ([]byte, error)

func (*CustomerOrReference) MergeBillingCustomer

func (t *CustomerOrReference) MergeBillingCustomer(v BillingCustomer) error

MergeBillingCustomer performs a merge with any union data inside the CustomerOrReference, using the provided BillingCustomer

func (*CustomerOrReference) MergeCustomerReference

func (t *CustomerOrReference) MergeCustomerReference(v CustomerReference) error

MergeCustomerReference performs a merge with any union data inside the CustomerOrReference, using the provided CustomerReference

func (*CustomerOrReference) UnmarshalJSON

func (t *CustomerOrReference) UnmarshalJSON(b []byte) error

type CustomerPagePaginatedResponse

type CustomerPagePaginatedResponse struct {
	Data []BillingCustomer `json:"data"`

	// Meta returns the pagination information
	Meta PaginatedMeta `json:"meta"`
}

CustomerPagePaginatedResponse Page paginated response.

type CustomerReference

type CustomerReference struct {
	// Id ULID (Universally Unique Lexicographically Sortable Identifier).
	Id ULID `json:"id"`
}

CustomerReference Customer reference.

type DateTime

type DateTime = time.Time

DateTime [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.

type DateTimeFieldFilter

type DateTimeFieldFilter = filters.FilterDateTime

DateTimeFieldFilter Filters on the given datetime (RFC-3339) field value. All properties are optional; provide exactly one to specify the comparison.

type EditSubscriptionJSONRequestBody

type EditSubscriptionJSONRequestBody = BillingSubscriptionEdit

EditSubscriptionJSONRequestBody defines body for EditSubscription for application/json ContentType.

type EntitlementAccessQueryError

type EntitlementAccessQueryError struct {
	// Attributes Additional structured context.
	Attributes *map[string]interface{} `json:"attributes,omitempty"`

	// Code Machine-readable error code.
	Code EntitlementAccessQueryErrorCode `json:"code"`

	// Customer The customer identifier from the request that produced this error.
	Customer *string `json:"customer,omitempty"`

	// Message Human-readable description of the error.
	Message string `json:"message"`
}

EntitlementAccessQueryError Query error within a partially successful entitlement access query response.

type EntitlementAccessQueryErrorCode

type EntitlementAccessQueryErrorCode string

EntitlementAccessQueryErrorCode Error code for an entitlement access query failure.

const (
	EntitlementAccessQueryErrorCodeCustomerNotFound EntitlementAccessQueryErrorCode = "customer_not_found"
	EntitlementAccessQueryErrorCodeUnknown          EntitlementAccessQueryErrorCode = "unknown"
)

Defines values for EntitlementAccessQueryErrorCode.

func (EntitlementAccessQueryErrorCode) Valid

Valid indicates whether the value is a known member of the EntitlementAccessQueryErrorCode enum.

type EntitlementAccessQueryRequest

type EntitlementAccessQueryRequest struct {
	Customer EntitlementAccessQueryRequestCustomers `json:"customer"`
	Feature  *EntitlementAccessQueryRequestFeatures `json:"feature,omitempty"`

	// IncludeCredits Whether to include credit balance availability for each resolved customer. When
	// true, each feature evaluation includes credit balance checks.
	//
	// Defaults to `false`.
	IncludeCredits *bool `json:"include_credits,omitempty"`
}

EntitlementAccessQueryRequest Query to evaluate feature access for a list of customers.

type EntitlementAccessQueryRequestCustomers

type EntitlementAccessQueryRequestCustomers struct {
	// Keys Each entry can be a customer `key` or a usage-attribution subject `key`.
	// Identifiers that cannot be resolved to a customer are reported in the response
	// `errors` array.
	Keys []string `json:"keys"`
}

EntitlementAccessQueryRequestCustomers List of customer identifiers to evaluate access for.

type EntitlementAccessQueryRequestFeatures

type EntitlementAccessQueryRequestFeatures struct {
	// Keys List of feature keys to evaluate access for.
	Keys []string `json:"keys"`
}

EntitlementAccessQueryRequestFeatures Optional list of feature keys to evaluate access for. If omitted, all features available in the organization are returned. Providing this list is recommended to reduce the response size and the load on the backend services.

type EntitlementAccessQueryResponse

type EntitlementAccessQueryResponse struct {
	// Data Access evaluation results, one entry per resolved customer.
	Data []EntitlementAccessQueryResult `json:"data"`

	// Errors Partial errors encountered while processing the request.
	Errors []EntitlementAccessQueryError `json:"errors"`

	// Meta Pagination metadata. The endpoint may return a partial response if the full
	// response would exceed server-side limits.
	Meta CursorMeta `json:"meta"`
}

EntitlementAccessQueryResponse Response of the entitlement access query.

type EntitlementAccessQueryResult

type EntitlementAccessQueryResult struct {
	// Customer The customer the matched identifiers resolved to.
	Customer BillingCustomer `json:"customer"`

	// Features Map of features with their access status.
	//
	// Map keys are the feature keys requested in `feature.keys`, or every feature
	// `key` available in the organization when the feature filter was omitted.
	Features map[string]EntitlementFeatureAccess `json:"features"`

	// Matched The list of identifiers from the request that resolved to this customer. Each
	// entry is either the customer `key` or one of its usage-attribution subject
	// `key`s.
	//
	// Duplicate or aliased identifiers that resolve to the same customer collapse to a
	// single result entry, with every requested identifier listed here.
	Matched []string `json:"matched"`

	// UpdatedAt Timestamp of the most recent change to the customer's access state reflected in
	// this result.
	UpdatedAt DateTime `json:"updated_at"`
}

EntitlementAccessQueryResult Access evaluation result for a single resolved customer.

type EntitlementFeatureAccess

type EntitlementFeatureAccess struct {
	// HasAccess Whether the customer currently has access to the feature.
	//
	// `true` for boolean and static entitlements that are available, and for metered
	// entitlements with remaining balance. `false` when the feature is unavailable,
	// the usage limit has been reached, or (when applicable) credits have been
	// exhausted.
	HasAccess bool `json:"has_access"`

	// Reason Optional reason when the customer does not have access to the feature. Populated
	// when `has_access` is `false`.
	Reason *EntitlementFeatureAccessReason `json:"reason,omitempty"`
}

EntitlementFeatureAccess Access status for a single feature.

type EntitlementFeatureAccessReason

type EntitlementFeatureAccessReason struct {
	// Attributes Additional structured context.
	Attributes *map[string]interface{} `json:"attributes,omitempty"`

	// Code Machine-readable error code.
	Code EntitlementFeatureAccessReasonCode `json:"code"`

	// Message Human-readable description of the error.
	Message string `json:"message"`
}

EntitlementFeatureAccessReason Reason a feature is not accessible to a customer.

type EntitlementFeatureAccessReasonCode

type EntitlementFeatureAccessReasonCode string

EntitlementFeatureAccessReasonCode Machine-readable reason code for denied feature access.

const (
	EntitlementFeatureAccessReasonCodeFeatureNotFound    EntitlementFeatureAccessReasonCode = "feature_not_found"
	EntitlementFeatureAccessReasonCodeFeatureUnavailable EntitlementFeatureAccessReasonCode = "feature_unavailable"
	EntitlementFeatureAccessReasonCodeNoCreditAvailable  EntitlementFeatureAccessReasonCode = "no_credit_available"
	EntitlementFeatureAccessReasonCodeUnknown            EntitlementFeatureAccessReasonCode = "unknown"
	EntitlementFeatureAccessReasonCodeUsageLimitReached  EntitlementFeatureAccessReasonCode = "usage_limit_reached"
)

Defines values for EntitlementFeatureAccessReasonCode.

func (EntitlementFeatureAccessReasonCode) Valid

Valid indicates whether the value is a known member of the EntitlementFeatureAccessReasonCode enum.

type EntitlementGrantPagePaginatedResponse

type EntitlementGrantPagePaginatedResponse struct {
	Data []BillingEntitlementGrant `json:"data"`

	// Meta returns the pagination information
	Meta PaginatedMeta `json:"meta"`
}

EntitlementGrantPagePaginatedResponse Page paginated response.

type EntitlementPagePaginatedResponse

type EntitlementPagePaginatedResponse struct {
	Data []BillingEntitlement `json:"data"`

	// Meta returns the pagination information
	Meta PaginatedMeta `json:"meta"`
}

EntitlementPagePaginatedResponse Page paginated response.

type ExecuteAppActionJSONRequestBody

type ExecuteAppActionJSONRequestBody = BillingAppActionRequest

ExecuteAppActionJSONRequestBody defines body for ExecuteAppAction for application/json ContentType.

type ExternalResourceKey

type ExternalResourceKey = string

ExternalResourceKey ExternalResourceKey is a unique string that is used to identify a resource in an external system.

type Feature

type Feature struct {
	// CreatedAt An ISO-8601 timestamp representation of entity creation date.
	CreatedAt DateTime `json:"created_at"`

	// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
	DeletedAt *DateTime `json:"deleted_at,omitempty"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`
	Id          ULID    `json:"id"`

	// Key A key is a unique string that is used to identify a resource.
	Key ResourceKey `json:"key"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Meter The meter that the feature is associated with and based on which usage is
	// calculated. If not specified, the feature is static.
	Meter *FeatureMeterReference `json:"meter,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// UnitCost Optional per-unit cost configuration. Use "manual" for a fixed per-unit cost, or
	// "llm" to look up cost from the LLM cost database based on meter group-by
	// properties.
	UnitCost *BillingFeatureUnitCost `json:"unit_cost,omitempty"`

	// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
	UpdatedAt DateTime `json:"updated_at"`
}

Feature A capability or billable dimension offered by a provider.

type FeatureCostQueryResult

type FeatureCostQueryResult struct {
	// Data The cost data rows.
	Data []FeatureCostQueryRow `json:"data"`

	// From Start of the queried period.
	From *DateTime `json:"from,omitempty"`

	// To End of the queried period.
	To *DateTime `json:"to,omitempty"`
}

FeatureCostQueryResult Result of a feature cost query.

type FeatureCostQueryRow

type FeatureCostQueryRow struct {
	// Cost The computed cost amount (usage × unit cost). Null when pricing is not available
	// for the given combination of dimensions.
	Cost nullable.Nullable[Numeric] `json:"cost"`

	// Currency The currency code of the cost amount.
	Currency CurrencyCode `json:"currency"`

	// Detail Detail message when cost amount is null, explaining why the cost could not be
	// resolved.
	Detail *string `json:"detail,omitempty"`

	// Dimensions The dimensions the value is aggregated over. `subject` and `customer_id` are
	// reserved dimensions.
	Dimensions map[string]string `json:"dimensions"`

	// From The start of the time bucket the value is aggregated over.
	From DateTime `json:"from"`

	// To The end of the time bucket the value is aggregated over.
	To DateTime `json:"to"`

	// Usage The metered usage value for the period.
	Usage Numeric `json:"usage"`
}

FeatureCostQueryRow A row in the result of a feature cost query.

type FeatureMeterReference

type FeatureMeterReference struct {
	// Filters Filters to apply to the dimensions of the meter.
	Filters *map[string]QueryFilterStringMapItem `json:"filters,omitempty"`

	// Id The ID of the meter to associate with this feature.
	Id ULID `json:"id"`
}

FeatureMeterReference Reference to a meter associated with a feature.

type FeatureOrReference

type FeatureOrReference struct {
	// contains filtered or unexported fields
}

FeatureOrReference Feature or reference.

func (FeatureOrReference) AsFeature

func (t FeatureOrReference) AsFeature() (Feature, error)

AsFeature returns the union data inside the FeatureOrReference as a Feature

func (FeatureOrReference) AsFeatureReference

func (t FeatureOrReference) AsFeatureReference() (FeatureReference, error)

AsFeatureReference returns the union data inside the FeatureOrReference as a FeatureReference

func (*FeatureOrReference) FromFeature

func (t *FeatureOrReference) FromFeature(v Feature) error

FromFeature overwrites any union data inside the FeatureOrReference as the provided Feature

func (*FeatureOrReference) FromFeatureReference

func (t *FeatureOrReference) FromFeatureReference(v FeatureReference) error

FromFeatureReference overwrites any union data inside the FeatureOrReference as the provided FeatureReference

func (FeatureOrReference) MarshalJSON

func (t FeatureOrReference) MarshalJSON() ([]byte, error)

func (*FeatureOrReference) MergeFeature

func (t *FeatureOrReference) MergeFeature(v Feature) error

MergeFeature performs a merge with any union data inside the FeatureOrReference, using the provided Feature

func (*FeatureOrReference) MergeFeatureReference

func (t *FeatureOrReference) MergeFeatureReference(v FeatureReference) error

MergeFeatureReference performs a merge with any union data inside the FeatureOrReference, using the provided FeatureReference

func (*FeatureOrReference) UnmarshalJSON

func (t *FeatureOrReference) UnmarshalJSON(b []byte) error

type FeaturePagePaginatedResponse

type FeaturePagePaginatedResponse struct {
	Data []Feature `json:"data"`

	// Meta returns the pagination information
	Meta PaginatedMeta `json:"meta"`
}

FeaturePagePaginatedResponse Page paginated response.

type FeatureReference

type FeatureReference struct {
	// Id ULID (Universally Unique Lexicographically Sortable Identifier).
	Id ULID `json:"id"`
}

FeatureReference Feature reference.

type Forbidden

type Forbidden = ForbiddenError

Forbidden defines model for Forbidden.

type ForbiddenError

type ForbiddenError struct {
	Detail   interface{} `json:"detail"`
	Instance interface{} `json:"instance"`
	Status   interface{} `json:"status"`
	Title    interface{} `json:"title"`
	Type     interface{} `json:"type,omitempty"`
}

ForbiddenError defines model for ForbiddenError.

type GetCreditBalanceParamsFilter

type GetCreditBalanceParamsFilter struct {
	// Currency Filter credit balance by currency code. When historical custom currencies reuse
	// a code, each managed currency is returned as a separate balance row.
	Currency *StringFieldFilterExact `json:"currency,omitempty"`

	// FeatureKey Filter credit balance by feature key. Omit to return the total portfolio value.
	// Use `exists=false` to return only unrestricted balance.
	FeatureKey *StringFieldFilter `json:"feature_key,omitempty"`
}

GetCreditBalanceParamsFilter Filter options for getting a credit balance.

type GetCustomerCreditBalanceParams

type GetCustomerCreditBalanceParams struct {
	// Timestamp Return the credit balance as of this timestamp.
	//
	// Defaults to the current time. Historical responses return `live` as zero because
	// live charge impacts are only available for current balances.
	Timestamp *DateTime                     `form:"timestamp,omitempty" json:"timestamp,omitempty"`
	Filter    *GetCreditBalanceParamsFilter `json:"filter,omitempty"`
}

GetCustomerCreditBalanceParams defines parameters for GetCustomerCreditBalance.

type GetCustomerEntitlementHistoryParams

type GetCustomerEntitlementHistoryParams struct {
	// From The start of the queried range. Defaults to the last reset. Truncated to the
	// minute. The range may span at most 1000 windows.
	From *DateTime `form:"from,omitempty" json:"from,omitempty"`

	// To The end of the queried range. Defaults to the current time. Truncated to the
	// minute unless it is the current time.
	To *DateTime `form:"to,omitempty" json:"to,omitempty"`

	// WindowSize The size of the windows the usage is grouped into.
	WindowSize BillingEntitlementHistoryWindowSize `form:"window_size" json:"window_size"`

	// TimeZone The IANA time zone the windows are aligned to.
	TimeZone *string `form:"time_zone,omitempty" json:"time_zone,omitempty"`
}

GetCustomerEntitlementHistoryParams defines parameters for GetCustomerEntitlementHistory.

type GetCustomerEntitlementValueByFeatureKeyParams

type GetCustomerEntitlementValueByFeatureKeyParams struct {
	// Expand Expand computed fields.
	//
	// Supported values are:
	//
	// - `value`: Expand the balance details of a metered entitlement; it sets the
	// `value` field.
	Expand *[]BillingEntitlementAccessExpand `form:"expand,omitempty" json:"expand,omitempty"`

	// At The point in time to evaluate the entitlement at. Defaults to the current time.
	At *DateTime `form:"at,omitempty" json:"at,omitempty"`
}

GetCustomerEntitlementValueByFeatureKeyParams defines parameters for GetCustomerEntitlementValueByFeatureKey.

type GetCustomerEntitlementValueParams

type GetCustomerEntitlementValueParams struct {
	// Expand Expand computed fields.
	//
	// Supported values are:
	//
	// - `value`: Expand the balance details of a metered entitlement; it sets the
	// `value` field.
	Expand *[]BillingEntitlementAccessExpand `form:"expand,omitempty" json:"expand,omitempty"`

	// At The point in time to evaluate the entitlement at. Defaults to the current time.
	At *DateTime `form:"at,omitempty" json:"at,omitempty"`
}

GetCustomerEntitlementValueParams defines parameters for GetCustomerEntitlementValue.

type Gone

type Gone = GoneError

Gone defines model for Gone.

type GoneError

type GoneError struct {
	Detail   interface{} `json:"detail"`
	Instance interface{} `json:"instance"`
	Status   interface{} `json:"status"`
	Title    interface{} `json:"title"`
	Type     interface{} `json:"type,omitempty"`
}

GoneError defines model for GoneError.

type IngestMeteringEventsApplicationCloudeventsBatchPlusJSONBody

type IngestMeteringEventsApplicationCloudeventsBatchPlusJSONBody = []MeteringEvent

IngestMeteringEventsApplicationCloudeventsBatchPlusJSONBody defines parameters for IngestMeteringEvents.

type IngestMeteringEventsApplicationCloudeventsBatchPlusJSONRequestBody

type IngestMeteringEventsApplicationCloudeventsBatchPlusJSONRequestBody = IngestMeteringEventsApplicationCloudeventsBatchPlusJSONBody

IngestMeteringEventsApplicationCloudeventsBatchPlusJSONRequestBody defines body for IngestMeteringEvents for application/cloudevents-batch+json ContentType.

type IngestMeteringEventsApplicationCloudeventsPlusJSONRequestBody

type IngestMeteringEventsApplicationCloudeventsPlusJSONRequestBody = MeteringEvent

IngestMeteringEventsApplicationCloudeventsPlusJSONRequestBody defines body for IngestMeteringEvents for application/cloudevents+json ContentType.

type IngestMeteringEventsJSONBody

type IngestMeteringEventsJSONBody struct {
	// contains filtered or unexported fields
}

IngestMeteringEventsJSONBody defines parameters for IngestMeteringEvents.

func (IngestMeteringEventsJSONBody) AsIngestMeteringEventsJSONBody1

func (t IngestMeteringEventsJSONBody) AsIngestMeteringEventsJSONBody1() (IngestMeteringEventsJSONBody1, error)

AsIngestMeteringEventsJSONBody1 returns the union data inside the IngestMeteringEventsJSONBody as a IngestMeteringEventsJSONBody1

func (IngestMeteringEventsJSONBody) AsMeteringEvent

func (t IngestMeteringEventsJSONBody) AsMeteringEvent() (MeteringEvent, error)

AsMeteringEvent returns the union data inside the IngestMeteringEventsJSONBody as a MeteringEvent

func (*IngestMeteringEventsJSONBody) FromIngestMeteringEventsJSONBody1

func (t *IngestMeteringEventsJSONBody) FromIngestMeteringEventsJSONBody1(v IngestMeteringEventsJSONBody1) error

FromIngestMeteringEventsJSONBody1 overwrites any union data inside the IngestMeteringEventsJSONBody as the provided IngestMeteringEventsJSONBody1

func (*IngestMeteringEventsJSONBody) FromMeteringEvent

func (t *IngestMeteringEventsJSONBody) FromMeteringEvent(v MeteringEvent) error

FromMeteringEvent overwrites any union data inside the IngestMeteringEventsJSONBody as the provided MeteringEvent

func (IngestMeteringEventsJSONBody) MarshalJSON

func (t IngestMeteringEventsJSONBody) MarshalJSON() ([]byte, error)

func (*IngestMeteringEventsJSONBody) MergeIngestMeteringEventsJSONBody1

func (t *IngestMeteringEventsJSONBody) MergeIngestMeteringEventsJSONBody1(v IngestMeteringEventsJSONBody1) error

MergeIngestMeteringEventsJSONBody1 performs a merge with any union data inside the IngestMeteringEventsJSONBody, using the provided IngestMeteringEventsJSONBody1

func (*IngestMeteringEventsJSONBody) MergeMeteringEvent

func (t *IngestMeteringEventsJSONBody) MergeMeteringEvent(v MeteringEvent) error

MergeMeteringEvent performs a merge with any union data inside the IngestMeteringEventsJSONBody, using the provided MeteringEvent

func (*IngestMeteringEventsJSONBody) UnmarshalJSON

func (t *IngestMeteringEventsJSONBody) UnmarshalJSON(b []byte) error

type IngestMeteringEventsJSONBody1

type IngestMeteringEventsJSONBody1 = []MeteringEvent

IngestMeteringEventsJSONBody1 defines parameters for IngestMeteringEvents.

type IngestMeteringEventsJSONRequestBody

type IngestMeteringEventsJSONRequestBody IngestMeteringEventsJSONBody

IngestMeteringEventsJSONRequestBody defines body for IngestMeteringEvents for application/json ContentType.

type IngestedEventPaginatedResponse

type IngestedEventPaginatedResponse struct {
	Data []MeteringIngestedEvent `json:"data"`

	// Meta Pagination metadata.
	Meta CursorMeta `json:"meta"`
}

IngestedEventPaginatedResponse Cursor paginated response.

type InstallAppJSONRequestBody

type InstallAppJSONRequestBody = BillingInstallAppRequest

InstallAppJSONRequestBody defines body for InstallApp for application/json ContentType.

type InvalidParamFormatError

type InvalidParamFormatError struct {
	ParamName string
	Err       error
}

func (*InvalidParamFormatError) Error

func (e *InvalidParamFormatError) Error() string

func (*InvalidParamFormatError) Unwrap

func (e *InvalidParamFormatError) Unwrap() error

type InvalidParameterChoiceItem

type InvalidParameterChoiceItem struct {
	Choices []interface{} `json:"choices"`
	Field   string        `json:"field"`
	Reason  string        `json:"reason"`

	// Rule invalid parameters rules
	Rule   InvalidParameterChoiceItemRule `json:"rule"`
	Source *string                        `json:"source,omitempty"`
}

InvalidParameterChoiceItem defines model for InvalidParameterChoiceItem.

type InvalidParameterChoiceItemRule

type InvalidParameterChoiceItemRule string

InvalidParameterChoiceItemRule invalid parameters rules

const (
	InvalidParameterChoiceItemRuleEnum InvalidParameterChoiceItemRule = "enum"
)

Defines values for InvalidParameterChoiceItemRule.

func (InvalidParameterChoiceItemRule) Valid

Valid indicates whether the value is a known member of the InvalidParameterChoiceItemRule enum.

type InvalidParameterDependentItem

type InvalidParameterDependentItem struct {
	Dependents nullable.Nullable[[]interface{}] `json:"dependents"`
	Field      string                           `json:"field"`
	Reason     string                           `json:"reason"`

	// Rule invalid parameters rules
	Rule   nullable.Nullable[InvalidParameterDependentItemRule] `json:"rule"`
	Source *string                                              `json:"source,omitempty"`
}

InvalidParameterDependentItem defines model for InvalidParameterDependentItem.

type InvalidParameterDependentItemRule

type InvalidParameterDependentItemRule string

InvalidParameterDependentItemRule invalid parameters rules

const (
	InvalidParameterDependentItemRuleDependentFields InvalidParameterDependentItemRule = "dependent_fields"
)

Defines values for InvalidParameterDependentItemRule.

func (InvalidParameterDependentItemRule) Valid

Valid indicates whether the value is a known member of the InvalidParameterDependentItemRule enum.

type InvalidParameterMaximumLength

type InvalidParameterMaximumLength struct {
	Field   string `json:"field"`
	Maximum int    `json:"maximum"`
	Reason  string `json:"reason"`

	// Rule invalid parameters rules
	Rule   InvalidParameterMaximumLengthRule `json:"rule"`
	Source *string                           `json:"source,omitempty"`
}

InvalidParameterMaximumLength defines model for InvalidParameterMaximumLength.

type InvalidParameterMaximumLengthRule

type InvalidParameterMaximumLengthRule string

InvalidParameterMaximumLengthRule invalid parameters rules

const (
	InvalidParameterMaximumLengthRuleMax       InvalidParameterMaximumLengthRule = "max"
	InvalidParameterMaximumLengthRuleMaxItems  InvalidParameterMaximumLengthRule = "max_items"
	InvalidParameterMaximumLengthRuleMaxLength InvalidParameterMaximumLengthRule = "max_length"
)

Defines values for InvalidParameterMaximumLengthRule.

func (InvalidParameterMaximumLengthRule) Valid

Valid indicates whether the value is a known member of the InvalidParameterMaximumLengthRule enum.

type InvalidParameterMinimumLength

type InvalidParameterMinimumLength struct {
	Field   string `json:"field"`
	Minimum int    `json:"minimum"`
	Reason  string `json:"reason"`

	// Rule invalid parameters rules
	Rule   InvalidParameterMinimumLengthRule `json:"rule"`
	Source *string                           `json:"source,omitempty"`
}

InvalidParameterMinimumLength defines model for InvalidParameterMinimumLength.

type InvalidParameterMinimumLengthRule

type InvalidParameterMinimumLengthRule string

InvalidParameterMinimumLengthRule invalid parameters rules

const (
	InvalidParameterMinimumLengthRuleMin          InvalidParameterMinimumLengthRule = "min"
	InvalidParameterMinimumLengthRuleMinDigits    InvalidParameterMinimumLengthRule = "min_digits"
	InvalidParameterMinimumLengthRuleMinItems     InvalidParameterMinimumLengthRule = "min_items"
	InvalidParameterMinimumLengthRuleMinLength    InvalidParameterMinimumLengthRule = "min_length"
	InvalidParameterMinimumLengthRuleMinLowercase InvalidParameterMinimumLengthRule = "min_lowercase"
	InvalidParameterMinimumLengthRuleMinSymbols   InvalidParameterMinimumLengthRule = "min_symbols"
	InvalidParameterMinimumLengthRuleMinUppercase InvalidParameterMinimumLengthRule = "min_uppercase"
)

Defines values for InvalidParameterMinimumLengthRule.

func (InvalidParameterMinimumLengthRule) Valid

Valid indicates whether the value is a known member of the InvalidParameterMinimumLengthRule enum.

type InvalidParameterStandard

type InvalidParameterStandard struct {
	Field  string `json:"field"`
	Reason string `json:"reason"`

	// Rule invalid parameters rules
	Rule   nullable.Nullable[InvalidRules] `json:"rule,omitempty"`
	Source *string                         `json:"source,omitempty"`
}

InvalidParameterStandard defines model for InvalidParameterStandard.

type InvalidParameters

type InvalidParameters = []InvalidParameters_Item

InvalidParameters invalid parameters

type InvalidParameters_Item

type InvalidParameters_Item struct {
	// contains filtered or unexported fields
}

InvalidParameters_Item defines model for InvalidParameters.Item.

func (InvalidParameters_Item) AsInvalidParameterChoiceItem

func (t InvalidParameters_Item) AsInvalidParameterChoiceItem() (InvalidParameterChoiceItem, error)

AsInvalidParameterChoiceItem returns the union data inside the InvalidParameters_Item as a InvalidParameterChoiceItem

func (InvalidParameters_Item) AsInvalidParameterDependentItem

func (t InvalidParameters_Item) AsInvalidParameterDependentItem() (InvalidParameterDependentItem, error)

AsInvalidParameterDependentItem returns the union data inside the InvalidParameters_Item as a InvalidParameterDependentItem

func (InvalidParameters_Item) AsInvalidParameterMaximumLength

func (t InvalidParameters_Item) AsInvalidParameterMaximumLength() (InvalidParameterMaximumLength, error)

AsInvalidParameterMaximumLength returns the union data inside the InvalidParameters_Item as a InvalidParameterMaximumLength

func (InvalidParameters_Item) AsInvalidParameterMinimumLength

func (t InvalidParameters_Item) AsInvalidParameterMinimumLength() (InvalidParameterMinimumLength, error)

AsInvalidParameterMinimumLength returns the union data inside the InvalidParameters_Item as a InvalidParameterMinimumLength

func (InvalidParameters_Item) AsInvalidParameterStandard

func (t InvalidParameters_Item) AsInvalidParameterStandard() (InvalidParameterStandard, error)

AsInvalidParameterStandard returns the union data inside the InvalidParameters_Item as a InvalidParameterStandard

func (*InvalidParameters_Item) FromInvalidParameterChoiceItem

func (t *InvalidParameters_Item) FromInvalidParameterChoiceItem(v InvalidParameterChoiceItem) error

FromInvalidParameterChoiceItem overwrites any union data inside the InvalidParameters_Item as the provided InvalidParameterChoiceItem

func (*InvalidParameters_Item) FromInvalidParameterDependentItem

func (t *InvalidParameters_Item) FromInvalidParameterDependentItem(v InvalidParameterDependentItem) error

FromInvalidParameterDependentItem overwrites any union data inside the InvalidParameters_Item as the provided InvalidParameterDependentItem

func (*InvalidParameters_Item) FromInvalidParameterMaximumLength

func (t *InvalidParameters_Item) FromInvalidParameterMaximumLength(v InvalidParameterMaximumLength) error

FromInvalidParameterMaximumLength overwrites any union data inside the InvalidParameters_Item as the provided InvalidParameterMaximumLength

func (*InvalidParameters_Item) FromInvalidParameterMinimumLength

func (t *InvalidParameters_Item) FromInvalidParameterMinimumLength(v InvalidParameterMinimumLength) error

FromInvalidParameterMinimumLength overwrites any union data inside the InvalidParameters_Item as the provided InvalidParameterMinimumLength

func (*InvalidParameters_Item) FromInvalidParameterStandard

func (t *InvalidParameters_Item) FromInvalidParameterStandard(v InvalidParameterStandard) error

FromInvalidParameterStandard overwrites any union data inside the InvalidParameters_Item as the provided InvalidParameterStandard

func (InvalidParameters_Item) MarshalJSON

func (t InvalidParameters_Item) MarshalJSON() ([]byte, error)

func (*InvalidParameters_Item) MergeInvalidParameterChoiceItem

func (t *InvalidParameters_Item) MergeInvalidParameterChoiceItem(v InvalidParameterChoiceItem) error

MergeInvalidParameterChoiceItem performs a merge with any union data inside the InvalidParameters_Item, using the provided InvalidParameterChoiceItem

func (*InvalidParameters_Item) MergeInvalidParameterDependentItem

func (t *InvalidParameters_Item) MergeInvalidParameterDependentItem(v InvalidParameterDependentItem) error

MergeInvalidParameterDependentItem performs a merge with any union data inside the InvalidParameters_Item, using the provided InvalidParameterDependentItem

func (*InvalidParameters_Item) MergeInvalidParameterMaximumLength

func (t *InvalidParameters_Item) MergeInvalidParameterMaximumLength(v InvalidParameterMaximumLength) error

MergeInvalidParameterMaximumLength performs a merge with any union data inside the InvalidParameters_Item, using the provided InvalidParameterMaximumLength

func (*InvalidParameters_Item) MergeInvalidParameterMinimumLength

func (t *InvalidParameters_Item) MergeInvalidParameterMinimumLength(v InvalidParameterMinimumLength) error

MergeInvalidParameterMinimumLength performs a merge with any union data inside the InvalidParameters_Item, using the provided InvalidParameterMinimumLength

func (*InvalidParameters_Item) MergeInvalidParameterStandard

func (t *InvalidParameters_Item) MergeInvalidParameterStandard(v InvalidParameterStandard) error

MergeInvalidParameterStandard performs a merge with any union data inside the InvalidParameters_Item, using the provided InvalidParameterStandard

func (*InvalidParameters_Item) UnmarshalJSON

func (t *InvalidParameters_Item) UnmarshalJSON(b []byte) error

type InvalidRules

type InvalidRules string

InvalidRules invalid parameters rules

const (
	InvalidRulesInvalid                                InvalidRules = "invalid"
	InvalidRulesIsArn                                  InvalidRules = "is_arn"
	InvalidRulesIsArray                                InvalidRules = "is_array"
	InvalidRulesIsBase64                               InvalidRules = "is_base64"
	InvalidRulesIsBoolean                              InvalidRules = "is_boolean"
	InvalidRulesIsDateTime                             InvalidRules = "is_date_time"
	InvalidRulesIsFqdn                                 InvalidRules = "is_fqdn"
	InvalidRulesIsInteger                              InvalidRules = "is_integer"
	InvalidRulesIsLabel                                InvalidRules = "is_label"
	InvalidRulesIsNull                                 InvalidRules = "is_null"
	InvalidRulesIsNumber                               InvalidRules = "is_number"
	InvalidRulesIsObject                               InvalidRules = "is_object"
	InvalidRulesIsString                               InvalidRules = "is_string"
	InvalidRulesIsSupportedNetworkAvailabilityZoneList InvalidRules = "is_supported_network_availability_zone_list"
	InvalidRulesIsSupportedNetworkCidrBlock            InvalidRules = "is_supported_network_cidr_block"
	InvalidRulesIsSupportedProviderRegion              InvalidRules = "is_supported_provider_region"
	InvalidRulesIsUuid                                 InvalidRules = "is_uuid"
	InvalidRulesMatchesRegex                           InvalidRules = "matches_regex"
	InvalidRulesMissingReference                       InvalidRules = "missing_reference"
	InvalidRulesRequired                               InvalidRules = "required"
	InvalidRulesType                                   InvalidRules = "type"
	InvalidRulesUnknownProperty                        InvalidRules = "unknown_property"
)

Defines values for InvalidRules.

func (InvalidRules) Valid

func (e InvalidRules) Valid() bool

Valid indicates whether the value is a known member of the InvalidRules enum.

type InvoicePagePaginatedResponse

type InvoicePagePaginatedResponse struct {
	Data []BillingInvoice `json:"data"`

	// Meta returns the pagination information
	Meta PaginatedMeta `json:"meta"`
}

InvoicePagePaginatedResponse Page paginated response.

type LLMCostModel

type LLMCostModel struct {
	// Id Identifier of the model, e.g., "gpt-4", "claude-3-5-sonnet".
	Id string `json:"id"`

	// Name Name of the model, e.g., "GPT-4", "Claude 3.5 Sonnet".
	Name string `json:"name"`
}

LLMCostModel LLM Model

type LLMCostModelPricing

type LLMCostModelPricing struct {
	// CacheReadPerToken Cache read price per token (USD).
	CacheReadPerToken *Numeric `json:"cache_read_per_token,omitempty"`

	// CacheWritePerToken Cache write price per token (USD).
	CacheWritePerToken *Numeric `json:"cache_write_per_token,omitempty"`

	// InputPerToken Input price per token (USD).
	InputPerToken Numeric `json:"input_per_token"`

	// OutputPerToken Output price per token (USD).
	OutputPerToken Numeric `json:"output_per_token"`

	// ReasoningPerToken Reasoning output price per token (USD).
	ReasoningPerToken *Numeric `json:"reasoning_per_token,omitempty"`
}

LLMCostModelPricing Token pricing for an LLM model, denominated per token.

type LLMCostOverrideCreate

type LLMCostOverrideCreate struct {
	// Currency Currency code.
	Currency CurrencyCode `json:"currency"`

	// EffectiveFrom When this override becomes effective.
	EffectiveFrom DateTime `json:"effective_from"`

	// EffectiveTo When this override expires.
	EffectiveTo *DateTime `json:"effective_to,omitempty"`

	// ModelId Canonical model identifier.
	ModelId string `json:"model_id"`

	// ModelName Human-readable model name.
	ModelName *string `json:"model_name,omitempty"`

	// Pricing Token pricing data.
	Pricing LLMCostModelPricing `json:"pricing"`

	// Provider Provider/vendor of the model.
	Provider string `json:"provider"`
}

LLMCostOverrideCreate Input for creating a per-namespace price override. Unique per provider, model and currency. If an override already exists for the given provider, model and currency, it will be updated. If an override does not exist, it will be created.

type LLMCostPrice

type LLMCostPrice struct {
	// CreatedAt Creation timestamp.
	CreatedAt DateTime `json:"created_at"`

	// Currency Currency code (currently always "USD").
	Currency CurrencyCode `json:"currency"`

	// EffectiveFrom When this price becomes effective.
	EffectiveFrom DateTime `json:"effective_from"`

	// EffectiveTo When this price expires. Omitted when the price is currently effective.
	EffectiveTo *DateTime `json:"effective_to,omitempty"`

	// Id Unique identifier.
	Id ULID `json:"id"`

	// Model The model.
	Model LLMCostModel `json:"model"`

	// Pricing Token pricing data.
	Pricing LLMCostModelPricing `json:"pricing"`

	// Provider Provider of the model.
	Provider LLMCostProvider `json:"provider"`

	// Source Where this price came from.
	Source LLMCostPriceSource `json:"source"`

	// UpdatedAt Last update timestamp.
	UpdatedAt DateTime `json:"updated_at"`
}

LLMCostPrice An LLM cost price record, representing the cost per token for a specific model from a specific provider.

type LLMCostPriceSource

type LLMCostPriceSource string

LLMCostPriceSource Identifies where an LLM cost price came from.

const (
	LLMCostPriceSourceManual LLMCostPriceSource = "manual"
	LLMCostPriceSourceSystem LLMCostPriceSource = "system"
)

Defines values for LLMCostPriceSource.

func (LLMCostPriceSource) Valid

func (e LLMCostPriceSource) Valid() bool

Valid indicates whether the value is a known member of the LLMCostPriceSource enum.

type LLMCostProvider

type LLMCostProvider struct {
	// Id Identifier of the provider, e.g., "openai", "anthropic".
	Id string `json:"id"`

	// Name Name of the provider, e.g., "OpenAI", "Anthropic".
	Name string `json:"name"`
}

LLMCostProvider LLM Provider

type Labels

type Labels map[string]string

Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.

Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".

type ListAddonsParams

type ListAddonsParams struct {
	// Page Determines which page of the collection to retrieve.
	Page *PagePaginationQuery `json:"page,omitempty"`

	// Sort Sort add-ons returned in the response. Supported sort attributes are:
	//
	// - `id`
	// - `key`
	// - `name`
	// - `created_at` (default)
	// - `updated_at`
	//
	// The `asc` suffix is optional as the default sort order is ascending. The `desc`
	// suffix is used to specify a descending order.
	Sort *SortQuery `form:"sort,omitempty" json:"sort,omitempty"`

	// Filter Filter add-ons returned in the response.
	Filter *ListAddonsParamsFilter `json:"filter,omitempty"`
}

ListAddonsParams defines parameters for ListAddons.

type ListAddonsParamsFilter

type ListAddonsParamsFilter struct {
	// Currency Filters on the given string field value by exact match. All properties are
	// optional; provide exactly one to specify the comparison.
	Currency *StringFieldFilterExact `json:"currency,omitempty"`

	// Id Filters on the given ULID field value by exact match. All properties are
	// optional; provide exactly one to specify the comparison.
	Id *ULIDFieldFilter `json:"id,omitempty"`

	// Key Filters on the given string field value by either exact or fuzzy match. All
	// properties are optional; provide exactly one to specify the comparison.
	Key *StringFieldFilter `json:"key,omitempty"`

	// Name Filters on the given string field value by either exact or fuzzy match. All
	// properties are optional; provide exactly one to specify the comparison.
	Name *StringFieldFilter `json:"name,omitempty"`

	// Status Filters on the given string field value by exact match. All properties are
	// optional; provide exactly one to specify the comparison.
	Status *StringFieldFilterExact `json:"status,omitempty"`
}

ListAddonsParamsFilter Filter options for listing add-ons.

type ListAppCatalogParams

type ListAppCatalogParams struct {
	// Page Determines which page of the collection to retrieve.
	Page *PagePaginationQuery `json:"page,omitempty"`
}

ListAppCatalogParams defines parameters for ListAppCatalog.

type ListAppsParams

type ListAppsParams struct {
	// Page Determines which page of the collection to retrieve.
	Page *PagePaginationQuery `json:"page,omitempty"`

	// Sort Sort apps returned in the response. Supported sort attributes are:
	//
	// - `id`
	// - `created_at` (default)
	//
	// The `asc` suffix is optional as the default sort order is ascending. The `desc`
	// suffix is used to specify a descending order.
	Sort *SortQuery `form:"sort,omitempty" json:"sort,omitempty"`

	// Filter Filter apps returned in the response.
	//
	// To filter apps by name add the following query param: filter[name]=my-app
	Filter *ListAppsParamsFilter `json:"filter,omitempty"`
}

ListAppsParams defines parameters for ListApps.

type ListAppsParamsFilter

type ListAppsParamsFilter struct {
	// Id Filters on the given ULID field value by exact match. All properties are
	// optional; provide exactly one to specify the comparison.
	Id *ULIDFieldFilter `json:"id,omitempty"`

	// Name Filters on the given string field value by either exact or fuzzy match. All
	// properties are optional; provide exactly one to specify the comparison.
	Name *StringFieldFilter `json:"name,omitempty"`

	// Status Filters on the given string field value by exact match. All properties are
	// optional; provide exactly one to specify the comparison.
	Status *StringFieldFilterExact `json:"status,omitempty"`

	// Type Filters on the given string field value by exact match. All properties are
	// optional; provide exactly one to specify the comparison.
	Type *StringFieldFilterExact `json:"type,omitempty"`
}

ListAppsParamsFilter Filter options for listing apps.

type ListBillingProfilesParams

type ListBillingProfilesParams struct {
	// Page Determines which page of the collection to retrieve.
	Page *PagePaginationQuery `json:"page,omitempty"`

	// Sort Sort billing profiles returned in the response. Supported sort attributes are:
	//
	// - `id`
	// - `name`
	// - `created_at` (default)
	//
	// The `asc` suffix is optional as the default sort order is ascending. The `desc`
	// suffix is used to specify a descending order.
	Sort *SortQuery `form:"sort,omitempty" json:"sort,omitempty"`

	// Filter Filter billing profiles returned in the response.
	//
	// To filter billing profiles by name add the following query param:
	// filter[name]=my-profile
	Filter *ListBillingProfilesParamsFilter `json:"filter,omitempty"`
}

ListBillingProfilesParams defines parameters for ListBillingProfiles.

type ListBillingProfilesParamsFilter

type ListBillingProfilesParamsFilter struct {
	// Id Filters on the given ULID field value by exact match. All properties are
	// optional; provide exactly one to specify the comparison.
	Id *ULIDFieldFilter `json:"id,omitempty"`

	// Name Filters on the given string field value by either exact or fuzzy match. All
	// properties are optional; provide exactly one to specify the comparison.
	Name *StringFieldFilter `json:"name,omitempty"`
}

ListBillingProfilesParamsFilter Filter options for listing billing profiles.

type ListChargesParams

type ListChargesParams struct {
	// Page Determines which page of the collection to retrieve.
	Page *PagePaginationQuery `json:"page,omitempty"`

	// Sort Sort charges returned in the response.
	//
	// Supported sort attributes are:
	//
	// - `id`
	// - `created_at`
	// - `service_period.from`
	// - `billing_period.from`
	Sort *SortQuery `form:"sort,omitempty" json:"sort,omitempty"`

	// Filter Filter charges.
	//
	// To filter charges by customer add the following query param:
	// `filter[customer_id][eq]=<id>` or `filter[customer_id][oeq]=<id>,<id>`.
	//
	// To filter charges by status add the following query param:
	// `filter[status][oeq]=created,active`
	//
	// To filter charges by feature, use `filter[feature_id][oeq]=<id>,<id>` or
	// `filter[feature_key][oeq]=<key>,<key>`.
	//
	// See the `service_period_from` filter field for expressing a service-period
	// window query.
	Filter *ListChargesParamsFilter `json:"filter,omitempty"`

	// Expand Expand full objects for referenced entities.
	//
	// Supported values are:
	//
	// - `real_time_usage`: Expand the charge's real-time usage; it sets the `usage`
	// and the `totals.realtime` fields.
	// - `customer`: Expand the charge's customer to the complete entity.
	// - `feature`: Expand the charge's feature to the complete entity.
	// - `subscription`: Expand the charge's subscription to the complete entity.
	// - `realization.invoice`: Expand each realization's invoice to the complete
	// entity.
	// - `realization.totals`: Expand each realization run's `totals`.
	// - `realization.detailed_lines`: Expand each realization run's `detailed_lines`.
	Expand *[]BillingChargesExpand `form:"expand,omitempty" json:"expand,omitempty"`
}

ListChargesParams defines parameters for ListCharges.

type ListChargesParamsFilter

type ListChargesParamsFilter struct {
	// CustomerId Filter charges by the ID of their customer.
	CustomerId *ULIDFieldFilter `json:"customer_id,omitempty"`

	// FeatureId Filter charges by the ID of their associated feature.
	FeatureId *ULIDFieldFilter `json:"feature_id,omitempty"`

	// FeatureKey Filter charges by the key of their associated feature.
	FeatureKey *StringFieldFilterExact `json:"feature_key,omitempty"`

	// ServicePeriodFrom Filter charges by the start of their service period.
	ServicePeriodFrom *DateTimeFieldFilter `json:"service_period_from,omitempty"`

	// ServicePeriodTo Filter charges by the end of their service period.
	ServicePeriodTo *DateTimeFieldFilter `json:"service_period_to,omitempty"`

	// Status Filter charges by status.
	//
	// Supported statuses are:
	//
	// - `created`
	// - `active`
	// - `final`
	// - `deleted`
	//
	// If omitted, all statuses are returned except for `deleted`.
	Status *StringFieldFilterExact `json:"status,omitempty"`
}

ListChargesParamsFilter Filter options for listing charges across customers.

type ListCostBasesParams

type ListCostBasesParams struct {
	// Filter Filter cost bases returned in the response.
	//
	// To filter cost bases by fiat currency code add the following query param:
	// filter[fiat_code]=USD
	Filter *ListCostBasesParamsFilter `json:"filter,omitempty"`

	// Page Determines which page of the collection to retrieve.
	Page *PagePaginationQuery `json:"page,omitempty"`
}

ListCostBasesParams defines parameters for ListCostBases.

type ListCostBasesParamsFilter

type ListCostBasesParamsFilter struct {
	// FiatCode Filter cost bases by fiat currency code.
	FiatCode *CurrencyCode `json:"fiat_code,omitempty"`
}

ListCostBasesParamsFilter Filter options for listing cost bases.

type ListCreditGrantsParams

type ListCreditGrantsParams struct {
	// Page Determines which page of the collection to retrieve.
	Page *PagePaginationQuery `json:"page,omitempty"`

	// Filter Filter credit grants returned in the response.
	Filter *ListCreditGrantsParamsFilter `json:"filter,omitempty"`
}

ListCreditGrantsParams defines parameters for ListCreditGrants.

type ListCreditGrantsParamsFilter

type ListCreditGrantsParamsFilter struct {
	// Currency Filter credit grants by currency.
	Currency *CurrencyCode `json:"currency,omitempty"`

	// Key Filter credit grants by key.
	Key *StringFieldFilter `json:"key,omitempty"`

	// Status Filter credit grants by status.
	Status *BillingCreditGrantStatus `json:"status,omitempty"`
}

ListCreditGrantsParamsFilter Filter options for listing credit grants.

type ListCreditTransactionsParams

type ListCreditTransactionsParams struct {
	Page *CursorPaginationQuery `json:"page,omitempty"`

	// Filter Filter credit transactions returned in the response.
	Filter *ListCreditTransactionsParamsFilter `json:"filter,omitempty"`
}

ListCreditTransactionsParams defines parameters for ListCreditTransactions.

type ListCreditTransactionsParamsFilter

type ListCreditTransactionsParamsFilter struct {
	// Currency Filter credit transactions by currency code. Custom-currency rows retain their
	// managed currency identifier.
	Currency *BillingCurrencyCode `json:"currency,omitempty"`

	// FeatureKey Filter credit transactions by feature key. Omit to return all credit
	// transactions. Use `exists=false` to return only unrestricted credit
	// transactions.
	FeatureKey *StringFieldFilter `json:"feature_key,omitempty"`

	// Type Filter credit transactions by type.
	Type *BillingCreditTransactionType `json:"type,omitempty"`
}

ListCreditTransactionsParamsFilter Filter options for listing credit transactions.

type ListCurrenciesParams

type ListCurrenciesParams struct {
	// Page Determines which page of the collection to retrieve.
	Page *PagePaginationQuery `json:"page,omitempty"`

	// Sort Sort currencies returned in the response. Supported sort attributes are:
	//
	// - `code` (default)
	// - `name`
	//
	// The `asc` suffix is optional as the default sort order is ascending. The `desc`
	// suffix is used to specify a descending order.
	Sort *SortQuery `form:"sort,omitempty" json:"sort,omitempty"`

	// Filter Filter currencies returned in the response.
	//
	// To filter currencies by type add the following query param: filter[type]=custom
	Filter *ListCurrenciesParamsFilter `json:"filter,omitempty"`

	// Expand Expand the currencies returned in the response.
	//
	// To include the active and scheduled cost basis add: expand=cost_basis
	Expand *[]BillingCurrencyExpand `form:"expand,omitempty" json:"expand,omitempty"`
}

ListCurrenciesParams defines parameters for ListCurrencies.

type ListCurrenciesParamsFilter

type ListCurrenciesParamsFilter struct {
	// Code Filters on the given string field value by either exact or fuzzy match. All
	// properties are optional; provide exactly one to specify the comparison.
	Code *StringFieldFilter `json:"code,omitempty"`

	// Type Currency type for custom currencies. It should be a unique code but not
	// conflicting with any existing standard currency codes.
	Type *BillingCurrencyType `json:"type,omitempty"`
}

ListCurrenciesParamsFilter Filter options for listing currencies.

type ListCustomerChargesParams

type ListCustomerChargesParams struct {
	// Page Determines which page of the collection to retrieve.
	Page *PagePaginationQuery `json:"page,omitempty"`

	// Sort Sort charges returned in the response.
	//
	// Supported sort attributes are:
	//
	// - `id`
	// - `created_at`
	// - `service_period.from`
	// - `billing_period.from`
	Sort *SortQuery `form:"sort,omitempty" json:"sort,omitempty"`

	// Filter Filter charges.
	//
	// To filter charges by status add the following query param:
	// `filter[status][oeq]=created,active`
	//
	// To filter charges by feature, use `filter[feature_id][oeq]=<id>,<id>` or
	// `filter[feature_key][oeq]=<key>,<key>`.
	//
	// See the `service_period_from` filter field for expressing a service-period
	// window query.
	Filter *ListCustomerChargesParamsFilter `json:"filter,omitempty"`

	// Expand Expand full objects for referenced entities.
	//
	// Supported values are:
	//
	// - `real_time_usage`: Expand the charge's real-time usage; it sets the `usage`
	// and the `totals.realtime` fields.
	// - `customer`: Expand the charge's customer to the complete entity.
	// - `feature`: Expand the charge's feature to the complete entity.
	// - `subscription`: Expand the charge's subscription to the complete entity.
	// - `realization.invoice`: Expand each realization's invoice to the complete
	// entity.
	// - `realization.totals`: Expand each realization run's `totals`.
	// - `realization.detailed_lines`: Expand each realization run's `detailed_lines`.
	Expand *[]BillingChargesExpand `form:"expand,omitempty" json:"expand,omitempty"`
}

ListCustomerChargesParams defines parameters for ListCustomerCharges.

type ListCustomerChargesParamsFilter

type ListCustomerChargesParamsFilter struct {
	// FeatureId Filter charges by the ID of their associated feature.
	FeatureId *ULIDFieldFilter `json:"feature_id,omitempty"`

	// FeatureKey Filter charges by the key of their associated feature.
	FeatureKey *StringFieldFilterExact `json:"feature_key,omitempty"`

	// ServicePeriodFrom Filter charges by the start of their service period.
	ServicePeriodFrom *DateTimeFieldFilter `json:"service_period_from,omitempty"`

	// ServicePeriodTo Filter charges by the end of their service period.
	ServicePeriodTo *DateTimeFieldFilter `json:"service_period_to,omitempty"`

	// Status Filter charges by status.
	//
	// Supported statuses are:
	//
	// - `created`
	// - `active`
	// - `final`
	// - `deleted`
	//
	// If omitted, all statuses are returned except for `deleted`.
	Status *StringFieldFilterExact `json:"status,omitempty"`
}

ListCustomerChargesParamsFilter Filter options for listing charges.

type ListCustomerEntitlementAccessResponseData

type ListCustomerEntitlementAccessResponseData struct {
	// Data The list of entitlement access results.
	Data []BillingEntitlementValueResult `json:"data"`
}

ListCustomerEntitlementAccessResponseData List customer entitlement access response data.

type ListCustomerEntitlementGrantsParams

type ListCustomerEntitlementGrantsParams struct {
	// Page Determines which page of the collection to retrieve.
	Page *PagePaginationQuery `json:"page,omitempty"`

	// Sort Sort grants returned in the response. Supported sort attributes are:
	//
	// - `created_at` (default)
	// - `updated_at`
	// - `effective_at`
	// - `expires_at`
	//
	// The `asc` suffix is optional as the default sort order is ascending. The `desc`
	// suffix is used to specify a descending order.
	Sort *SortQuery `form:"sort,omitempty" json:"sort,omitempty"`

	// IncludeDeleted Include deleted grants in the response.
	IncludeDeleted *bool `form:"include_deleted,omitempty" json:"include_deleted,omitempty"`
}

ListCustomerEntitlementGrantsParams defines parameters for ListCustomerEntitlementGrants.

type ListCustomerEntitlementsParams

type ListCustomerEntitlementsParams struct {
	// Page Determines which page of the collection to retrieve.
	Page *PagePaginationQuery `json:"page,omitempty"`

	// Sort Sort entitlements returned in the response. Supported sort attributes are:
	//
	// - `created_at` (default)
	// - `updated_at`
	//
	// The `asc` suffix is optional as the default sort order is ascending. The `desc`
	// suffix is used to specify a descending order.
	Sort *SortQuery `form:"sort,omitempty" json:"sort,omitempty"`

	// Filter Filter entitlements returned in the response.
	//
	// To filter entitlements by feature key add the following query param:
	// `filter[feature_key]=my-feature`
	Filter *ListCustomerEntitlementsParamsFilter `json:"filter,omitempty"`
}

ListCustomerEntitlementsParams defines parameters for ListCustomerEntitlements.

type ListCustomerEntitlementsParamsFilter

type ListCustomerEntitlementsParamsFilter struct {
	// FeatureId Filter entitlements by feature ID.
	FeatureId *ULIDFieldFilter `json:"feature_id,omitempty"`

	// FeatureKey Filter entitlements by feature key.
	FeatureKey *StringFieldFilterExact `json:"feature_key,omitempty"`

	// Type Filter entitlements by type (`metered`, `static` or `boolean`).
	Type *StringFieldFilterExact `json:"type,omitempty"`
}

ListCustomerEntitlementsParamsFilter Filter options for listing customer entitlements.

type ListCustomersParams

type ListCustomersParams struct {
	// Page Determines which page of the collection to retrieve.
	Page *PagePaginationQuery `json:"page,omitempty"`

	// Sort Sort customers returned in the response. Supported sort attributes are:
	//
	// - `id`
	// - `name` (default)
	// - `created_at`
	//
	// The `asc` suffix is optional as the default sort order is ascending. The `desc`
	// suffix is used to specify a descending order.
	Sort *SortQuery `form:"sort,omitempty" json:"sort,omitempty"`

	// Filter Filter customers returned in the response.
	//
	// To filter customers by key add the following query param: filter[key]=my-db-id
	Filter *ListCustomersParamsFilter `json:"filter,omitempty"`
}

ListCustomersParams defines parameters for ListCustomers.

type ListCustomersParamsFilter

type ListCustomersParamsFilter struct {
	// BillingProfileId Filters on the given ULID field value by exact match. All properties are
	// optional; provide exactly one to specify the comparison.
	BillingProfileId *ULIDFieldFilter `json:"billing_profile_id,omitempty"`

	// Key Filters on the given string field value by either exact or fuzzy match. All
	// properties are optional; provide exactly one to specify the comparison.
	Key *StringFieldFilter `json:"key,omitempty"`

	// Name Filters on the given string field value by either exact or fuzzy match. All
	// properties are optional; provide exactly one to specify the comparison.
	Name *StringFieldFilter `json:"name,omitempty"`

	// PlanKey Filters on the given string field value by either exact or fuzzy match. All
	// properties are optional; provide exactly one to specify the comparison.
	PlanKey *StringFieldFilter `json:"plan_key,omitempty"`

	// PrimaryEmail Filters on the given string field value by either exact or fuzzy match. All
	// properties are optional; provide exactly one to specify the comparison.
	PrimaryEmail *StringFieldFilter `json:"primary_email,omitempty"`

	// UsageAttributionSubjectKey Filters on the given string field value by either exact or fuzzy match. All
	// properties are optional; provide exactly one to specify the comparison.
	UsageAttributionSubjectKey *StringFieldFilter `json:"usage_attribution_subject_key,omitempty"`
}

ListCustomersParamsFilter Filter options for listing customers.

type ListEntitlementsParams

type ListEntitlementsParams struct {
	// Page Determines which page of the collection to retrieve.
	Page *PagePaginationQuery `json:"page,omitempty"`

	// Sort Sort entitlements returned in the response. Supported sort attributes are:
	//
	// - `created_at` (default)
	// - `updated_at`
	//
	// The `asc` suffix is optional as the default sort order is ascending. The `desc`
	// suffix is used to specify a descending order.
	Sort *SortQuery `form:"sort,omitempty" json:"sort,omitempty"`

	// Filter Filter entitlements returned in the response.
	//
	// To filter entitlements by customer, add the following query param:
	// `filter[customer_id]=01K4WAQ0J99ZZ0MD75HXR112H8`
	Filter *ListEntitlementsParamsFilter `json:"filter,omitempty"`
}

ListEntitlementsParams defines parameters for ListEntitlements.

type ListEntitlementsParamsFilter

type ListEntitlementsParamsFilter struct {
	// CustomerId Filter entitlements by customer ID.
	CustomerId *ULIDFieldFilter `json:"customer_id,omitempty"`

	// FeatureId Filter entitlements by feature ID.
	FeatureId *ULIDFieldFilter `json:"feature_id,omitempty"`

	// FeatureKey Filter entitlements by feature key.
	FeatureKey *StringFieldFilterExact `json:"feature_key,omitempty"`

	// Type Filter entitlements by type (`metered`, `static` or `boolean`).
	Type *StringFieldFilterExact `json:"type,omitempty"`
}

ListEntitlementsParamsFilter Filter options for listing entitlements.

type ListEventsParamsFilter

type ListEventsParamsFilter struct {
	// CustomerId Filter events by the associated customer ID.
	CustomerId *ULIDFieldFilter `json:"customer_id,omitempty"`

	// Id Filter events by ID.
	Id *StringFieldFilter `json:"id,omitempty"`

	// IngestedAt Filter events by the time the event was ingested.
	IngestedAt *DateTimeFieldFilter `json:"ingested_at,omitempty"`

	// Source Filter events by source.
	Source *StringFieldFilter `json:"source,omitempty"`

	// StoredAt Filter events by the time the event was stored.
	StoredAt *DateTimeFieldFilter `json:"stored_at,omitempty"`

	// Subject Filter events by subject.
	Subject *StringFieldFilter `json:"subject,omitempty"`

	// Time Filter events by event time.
	Time *DateTimeFieldFilter `json:"time,omitempty"`

	// Type Filter events by type.
	Type *StringFieldFilter `json:"type,omitempty"`
}

ListEventsParamsFilter Filter options for listing ingested events.

type ListFeatureParamsFilter

type ListFeatureParamsFilter struct {
	// Key Filters on the given string field value by either exact or fuzzy match. All
	// properties are optional; provide exactly one to specify the comparison.
	Key *StringFieldFilter `json:"key,omitempty"`

	// MeterId Filters on the given ULID field value by exact match. All properties are
	// optional; provide exactly one to specify the comparison.
	MeterId *ULIDFieldFilter `json:"meter_id,omitempty"`

	// Name Filters on the given string field value by either exact or fuzzy match. All
	// properties are optional; provide exactly one to specify the comparison.
	Name *StringFieldFilter `json:"name,omitempty"`
}

ListFeatureParamsFilter Filter options for listing features.

type ListFeaturesParams

type ListFeaturesParams struct {
	// Page Determines which page of the collection to retrieve.
	Page *PagePaginationQuery `json:"page,omitempty"`

	// Sort Sort features returned in the response. Supported sort attributes are:
	//
	// - `key`
	// - `name`
	// - `created_at` (default)
	// - `updated_at`
	//
	// The `asc` suffix is optional as the default sort order is ascending. The `desc`
	// suffix is used to specify a descending order.
	Sort *SortQuery `form:"sort,omitempty" json:"sort,omitempty"`

	// Filter Filter features returned in the response.
	//
	// To filter features by meter_id add the following query param:
	// filter[meter_id][oeq]=<id>
	Filter *ListFeatureParamsFilter `json:"filter,omitempty"`
}

ListFeaturesParams defines parameters for ListFeatures.

type ListGrantsParams

type ListGrantsParams struct {
	// Page Determines which page of the collection to retrieve.
	Page *PagePaginationQuery `json:"page,omitempty"`

	// Sort Sort grants returned in the response. Supported sort attributes are:
	//
	// - `created_at` (default)
	// - `updated_at`
	// - `effective_at`
	// - `expires_at`
	//
	// The `asc` suffix is optional as the default sort order is ascending. The `desc`
	// suffix is used to specify a descending order.
	Sort *SortQuery `form:"sort,omitempty" json:"sort,omitempty"`

	// Filter Filter grants returned in the response.
	//
	// To filter grants by customer, add the following query param:
	// `filter[customer_id]=01K4WAQ0J99ZZ0MD75HXR112H8`
	Filter *ListGrantsParamsFilter `json:"filter,omitempty"`

	// IncludeDeleted Include deleted grants in the response.
	IncludeDeleted *bool `form:"include_deleted,omitempty" json:"include_deleted,omitempty"`
}

ListGrantsParams defines parameters for ListGrants.

type ListGrantsParamsFilter

type ListGrantsParamsFilter struct {
	// CustomerId Filter grants by the ID of the customer that owns the entitlement.
	CustomerId *ULIDFieldFilter `json:"customer_id,omitempty"`

	// FeatureId Filter grants by the ID of the entitlement's feature.
	FeatureId *ULIDFieldFilter `json:"feature_id,omitempty"`
}

ListGrantsParamsFilter Filter options for listing grants.

type ListInvoicesParams

type ListInvoicesParams struct {
	// Page Determines which page of the collection to retrieve.
	Page *PagePaginationQuery `json:"page,omitempty"`

	// Sort Sort invoices returned in the response. Supported sort attributes:
	//
	// - `issued_at`
	// - `created_at` (default)
	// - `service_period_start`
	//
	// The `asc` suffix is optional as the default sort order is ascending. The `desc`
	// suffix is used to specify a descending order.
	Sort *SortQuery `form:"sort,omitempty" json:"sort,omitempty"`

	// Filter Filter invoices returned in the response.
	//
	// Examples:
	//
	// - `filter[status][oeq]=draft,issued`
	// - `filter[customer_id]=01KPDB8K...`
	// - `filter[issued_at][gte]=2024-01-01T00:00:00Z`
	Filter *ListInvoicesParamsFilter `json:"filter,omitempty"`
}

ListInvoicesParams defines parameters for ListInvoices.

type ListInvoicesParamsFilter

type ListInvoicesParamsFilter struct {
	// CreatedAt Filter by invoice creation time.
	CreatedAt *DateTimeFieldFilter `json:"created_at,omitempty"`

	// CustomerId Filter by customer ID.
	CustomerId *ULIDFieldFilter `json:"customer_id,omitempty"`

	// IssuedAt Filter by the time the invoice was issued.
	IssuedAt *DateTimeFieldFilter `json:"issued_at,omitempty"`

	// ServicePeriodStart Filter by service period start.
	ServicePeriodStart *DateTimeFieldFilter `json:"service_period_start,omitempty"`

	// Status Filter by invoice status.
	Status *StringFieldFilterExact `json:"status,omitempty"`
}

ListInvoicesParamsFilter Filter options for listing invoices.

type ListLLMCostPricesParamsFilter

type ListLLMCostPricesParamsFilter struct {
	// Currency Filter by currency code. e.g. ?filter[currency][eq]=USD
	Currency *StringFieldFilter `json:"currency,omitempty"`

	// ModelId Filter by model ID. e.g. ?filter[model_id][eq]=gpt-4
	ModelId *StringFieldFilter `json:"model_id,omitempty"`

	// ModelName Filter by model name. e.g. ?filter[model_name][contains]=gpt
	ModelName *StringFieldFilter `json:"model_name,omitempty"`

	// Provider Filter by provider. e.g. ?filter[provider][eq]=openai
	Provider *StringFieldFilter `json:"provider,omitempty"`

	// Source Filter by source. e.g. ?filter[source][eq]=system
	Source *StringFieldFilter `json:"source,omitempty"`
}

ListLLMCostPricesParamsFilter Filter options for listing LLM cost prices.

type ListLlmCostOverridesParams

type ListLlmCostOverridesParams struct {
	Filter *ListLLMCostPricesParamsFilter `json:"filter,omitempty"`

	// Page Determines which page of the collection to retrieve.
	Page *PagePaginationQuery `json:"page,omitempty"`
}

ListLlmCostOverridesParams defines parameters for ListLlmCostOverrides.

type ListLlmCostPricesParams

type ListLlmCostPricesParams struct {
	// Filter Filter prices.
	Filter *ListLLMCostPricesParamsFilter `json:"filter,omitempty"`

	// Sort Sort prices returned in the response. Supported sort attributes are:
	//
	// - `id`
	// - `provider.id`
	// - `model.id` (default)
	// - `effective_from`
	// - `effective_to`
	//
	// The `asc` suffix is optional as the default sort order is ascending. The `desc`
	// suffix is used to specify a descending order.
	Sort *SortQuery `form:"sort,omitempty" json:"sort,omitempty"`

	// Page Determines which page of the collection to retrieve.
	Page *PagePaginationQuery `json:"page,omitempty"`
}

ListLlmCostPricesParams defines parameters for ListLlmCostPrices.

type ListMeteringEventsParams

type ListMeteringEventsParams struct {
	Page *CursorPaginationQuery `json:"page,omitempty"`

	// Filter Filter events returned in the response.
	//
	// To filter events by subject add the following query param:
	// filter[subject][eq]=customer-1
	Filter *ListEventsParamsFilter `json:"filter,omitempty"`

	// Sort Sort events returned in the response. Supported sort attributes are:
	//
	// - `time` (default)
	// - `ingested_at`
	// - `stored_at`
	//
	// When omitted, events are sorted by `time desc` (most recent first). When a sort
	// field is provided without a suffix, it sorts descending. Append the `asc` suffix
	// to sort ascending, or the `desc` suffix to sort descending.
	Sort *SortQuery `form:"sort,omitempty" json:"sort,omitempty"`
}

ListMeteringEventsParams defines parameters for ListMeteringEvents.

type ListMetersParams

type ListMetersParams struct {
	// Page Determines which page of the collection to retrieve.
	Page *PagePaginationQuery `json:"page,omitempty"`

	// Sort Sort meters returned in the response. Supported sort attributes are:
	//
	// - `key`
	// - `name`
	// - `aggregation`
	// - `created_at` (default)
	// - `updated_at`
	//
	// The `asc` suffix is optional as the default sort order is ascending. The `desc`
	// suffix is used to specify a descending order.
	Sort *SortQuery `form:"sort,omitempty" json:"sort,omitempty"`

	// Filter Filter meters returned in the response.
	//
	// To filter meters by key add the following query param: filter[key]=my-meter-key
	Filter *ListMetersParamsFilter `json:"filter,omitempty"`
}

ListMetersParams defines parameters for ListMeters.

type ListMetersParamsFilter

type ListMetersParamsFilter struct {
	// Key Filter meters by key.
	Key *StringFieldFilter `json:"key,omitempty"`

	// Name Filter meters by name.
	Name *StringFieldFilter `json:"name,omitempty"`
}

ListMetersParamsFilter Filter options for listing meters.

type ListNotificationChannelsParams

type ListNotificationChannelsParams struct {
	// Page Determines which page of the collection to retrieve.
	Page *PagePaginationQuery `json:"page,omitempty"`

	// Sort Sort notification channels returned in the response. Supported sort attributes
	// are:
	//
	// - `id` (default)
	// - `type`
	// - `created_at`
	// - `updated_at`
	//
	// The `asc` suffix is optional as the default sort order is ascending. The `desc`
	// suffix is used to specify a descending order.
	Sort *SortQuery `form:"sort,omitempty" json:"sort,omitempty"`

	// Filter Filter notification channels returned in the response.
	//
	// To filter notification channels by type add the following query param:
	// filter[type]=webhook
	Filter *ListNotificationChannelsParamsFilter `json:"filter,omitempty"`
}

ListNotificationChannelsParams defines parameters for ListNotificationChannels.

type ListNotificationChannelsParamsFilter

type ListNotificationChannelsParamsFilter struct {
	// CreatedAt Filters on the given datetime (RFC-3339) field value. All properties are
	// optional; provide exactly one to specify the comparison.
	CreatedAt *DateTimeFieldFilter `json:"created_at,omitempty"`

	// Disabled Filter by a boolean value (true/false).
	Disabled *BooleanFieldFilter `json:"disabled,omitempty"`

	// Id Filters on the given ULID field value by exact match. All properties are
	// optional; provide exactly one to specify the comparison.
	Id *ULIDFieldFilter `json:"id,omitempty"`

	// Name Filters on the given string field value by either exact or fuzzy match. All
	// properties are optional; provide exactly one to specify the comparison.
	Name *StringFieldFilter `json:"name,omitempty"`

	// Type Filters on the given string field value by exact match. All properties are
	// optional; provide exactly one to specify the comparison.
	Type *StringFieldFilterExact `json:"type,omitempty"`

	// UpdatedAt Filters on the given datetime (RFC-3339) field value. All properties are
	// optional; provide exactly one to specify the comparison.
	UpdatedAt *DateTimeFieldFilter `json:"updated_at,omitempty"`
}

ListNotificationChannelsParamsFilter Filter options for listing notification channels.

type ListNotificationEventsParams

type ListNotificationEventsParams struct {
	// Page Determines which page of the collection to retrieve.
	Page *PagePaginationQuery `json:"page,omitempty"`

	// Sort Sort notification events returned in the response. Supported sort attributes
	// are:
	//
	// - `created_at` (default)
	// - `id`
	// - `type`
	//
	// The `asc` suffix is optional as the default sort order is ascending. The `desc`
	// suffix is used to specify a descending order. Without a `sort` parameter, events
	// are returned newest first.
	Sort *SortQuery `form:"sort,omitempty" json:"sort,omitempty"`

	// Filter Filter notification events returned in the response.
	//
	// Examples:
	//
	// - `filter[type]=invoice.created`
	// - `filter[delivery_status]=failed`
	// - `filter[subject_key]=customer-1`
	Filter *ListNotificationEventsParamsFilter `json:"filter,omitempty"`
}

ListNotificationEventsParams defines parameters for ListNotificationEvents.

type ListNotificationEventsParamsFilter

type ListNotificationEventsParamsFilter struct {
	// ChannelId Filter by a channel of the generating rule. Matches events whose rule targets at
	// least one of the given channels. Only `eq` and `oeq` are supported.
	ChannelId *ULIDFieldFilter `json:"channel_id,omitempty"`

	// CreatedAt Filters on the given datetime (RFC-3339) field value. All properties are
	// optional; provide exactly one to specify the comparison.
	CreatedAt *DateTimeFieldFilter `json:"created_at,omitempty"`

	// DeliveryStatus Filter by delivery state. Matches events where delivery to at least one channel
	// is in one of the given states. Only `eq` and `oeq` are supported.
	DeliveryStatus *StringFieldFilterExact `json:"delivery_status,omitempty"`

	// FeatureId Filter by the id of the feature the event refers to. Events without a feature
	// never match, not even with `neq`.
	FeatureId *ULIDFieldFilter `json:"feature_id,omitempty"`

	// FeatureKey Filter by the key of the feature the event refers to. Events without a feature
	// never match, not even with `neq`.
	FeatureKey *StringFieldFilterExact `json:"feature_key,omitempty"`

	// Id Filters on the given ULID field value by exact match. All properties are
	// optional; provide exactly one to specify the comparison.
	Id *ULIDFieldFilter `json:"id,omitempty"`

	// RuleId Filters on the given ULID field value by exact match. All properties are
	// optional; provide exactly one to specify the comparison.
	RuleId *ULIDFieldFilter `json:"rule_id,omitempty"`

	// SubjectId Filter by the id of the subject the event refers to. Events without a subject
	// never match, not even with `neq`.
	SubjectId *ULIDFieldFilter `json:"subject_id,omitempty"`

	// SubjectKey Filter by the key of the subject the event refers to. Events without a subject
	// never match, not even with `neq`.
	SubjectKey *StringFieldFilterExact `json:"subject_key,omitempty"`

	// Type Filters on the given string field value by exact match. All properties are
	// optional; provide exactly one to specify the comparison.
	Type *StringFieldFilterExact `json:"type,omitempty"`
}

ListNotificationEventsParamsFilter Filter options for listing notification events.

type ListNotificationRulesParams

type ListNotificationRulesParams struct {
	// Page Determines which page of the collection to retrieve.
	Page *PagePaginationQuery `json:"page,omitempty"`

	// Sort Sort notification rules returned in the response. Supported sort attributes are:
	//
	// - `id` (default)
	// - `type`
	// - `created_at`
	// - `updated_at`
	//
	// The `asc` suffix is optional as the default sort order is ascending. The `desc`
	// suffix is used to specify a descending order.
	Sort *SortQuery `form:"sort,omitempty" json:"sort,omitempty"`

	// Filter Filter notification rules returned in the response.
	//
	// Examples:
	//
	// - `filter[type]=entitlements.balance.threshold`
	// - `filter[disabled]=false`
	// - `filter[channel_id]=01ARZ3NDEKTSV4RRFFQ69G5FAV`
	Filter *ListNotificationRulesParamsFilter `json:"filter,omitempty"`
}

ListNotificationRulesParams defines parameters for ListNotificationRules.

type ListNotificationRulesParamsFilter

type ListNotificationRulesParamsFilter struct {
	// ChannelId Filter by an assigned channel. Matches rules that deliver to at least one of the
	// given channels. Only `eq` and `oeq` are supported.
	ChannelId *ULIDFieldFilter `json:"channel_id,omitempty"`

	// CreatedAt Filters on the given datetime (RFC-3339) field value. All properties are
	// optional; provide exactly one to specify the comparison.
	CreatedAt *DateTimeFieldFilter `json:"created_at,omitempty"`

	// Disabled Filter by a boolean value (true/false).
	Disabled *BooleanFieldFilter `json:"disabled,omitempty"`

	// Id Filters on the given ULID field value by exact match. All properties are
	// optional; provide exactly one to specify the comparison.
	Id *ULIDFieldFilter `json:"id,omitempty"`

	// Name Filters on the given string field value by either exact or fuzzy match. All
	// properties are optional; provide exactly one to specify the comparison.
	Name *StringFieldFilter `json:"name,omitempty"`

	// Type Filters on the given string field value by exact match. All properties are
	// optional; provide exactly one to specify the comparison.
	Type *StringFieldFilterExact `json:"type,omitempty"`

	// UpdatedAt Filters on the given datetime (RFC-3339) field value. All properties are
	// optional; provide exactly one to specify the comparison.
	UpdatedAt *DateTimeFieldFilter `json:"updated_at,omitempty"`
}

ListNotificationRulesParamsFilter Filter options for listing notification rules.

type ListPlanAddonsParams

type ListPlanAddonsParams struct {
	// Page Determines which page of the collection to retrieve.
	Page *PagePaginationQuery `json:"page,omitempty"`

	// Sort Sort plan add-ons returned in the response. Supported sort attributes are:
	//
	// - `id` (default)
	// - `created_at`
	// - `updated_at`
	//
	// The `asc` suffix is optional as the default sort order is ascending. The `desc`
	// suffix is used to specify a descending order.
	Sort *SortQuery `form:"sort,omitempty" json:"sort,omitempty"`

	// Filter Filter plan add-ons returned in the response.
	Filter *ListPlanAddonsParamsFilter `json:"filter,omitempty"`
}

ListPlanAddonsParams defines parameters for ListPlanAddons.

type ListPlanAddonsParamsFilter

type ListPlanAddonsParamsFilter struct {
	// AddonId Filters on the given ULID field value by exact match. All properties are
	// optional; provide exactly one to specify the comparison.
	AddonId *ULIDFieldFilter `json:"addon_id,omitempty"`

	// AddonKey Filters on the given string field value by either exact or fuzzy match. All
	// properties are optional; provide exactly one to specify the comparison.
	AddonKey *StringFieldFilter `json:"addon_key,omitempty"`

	// AddonName Filters on the given string field value by either exact or fuzzy match. All
	// properties are optional; provide exactly one to specify the comparison.
	AddonName *StringFieldFilter `json:"addon_name,omitempty"`

	// Id Filters on the given ULID field value by exact match. All properties are
	// optional; provide exactly one to specify the comparison.
	Id *ULIDFieldFilter `json:"id,omitempty"`

	// PlanCurrency Filters on the given string field value by either exact or fuzzy match. All
	// properties are optional; provide exactly one to specify the comparison.
	PlanCurrency *StringFieldFilter `json:"plan_currency,omitempty"`

	// PlanKey Filters on the given string field value by either exact or fuzzy match. All
	// properties are optional; provide exactly one to specify the comparison.
	PlanKey *StringFieldFilter `json:"plan_key,omitempty"`
}

ListPlanAddonsParamsFilter Filter options for listing plan add-ons.

type ListPlansParams

type ListPlansParams struct {
	// Page Determines which page of the collection to retrieve.
	Page *PagePaginationQuery `json:"page,omitempty"`

	// Sort Sort plans returned in the response. Supported sort attributes are:
	//
	// - `id`
	// - `key`
	// - `version`
	// - `created_at` (default)
	// - `updated_at`
	Sort *SortQuery `form:"sort,omitempty" json:"sort,omitempty"`

	// Filter Filter plans returned in the response.
	Filter *ListPlansParamsFilter `json:"filter,omitempty"`
}

ListPlansParams defines parameters for ListPlans.

type ListPlansParamsFilter

type ListPlansParamsFilter struct {
	// Currency Filters on the given string field value by exact match. All properties are
	// optional; provide exactly one to specify the comparison.
	Currency *StringFieldFilterExact `json:"currency,omitempty"`

	// Key Filters on the given string field value by either exact or fuzzy match. All
	// properties are optional; provide exactly one to specify the comparison.
	Key *StringFieldFilter `json:"key,omitempty"`

	// Name Filters on the given string field value by either exact or fuzzy match. All
	// properties are optional; provide exactly one to specify the comparison.
	Name *StringFieldFilter `json:"name,omitempty"`

	// Status Filters on the given string field value by exact match. All properties are
	// optional; provide exactly one to specify the comparison.
	Status *StringFieldFilterExact `json:"status,omitempty"`
}

ListPlansParamsFilter Filter options for listing plans.

type ListSubscriptionAddonsParams

type ListSubscriptionAddonsParams struct {
	// Page Determines which page of the collection to retrieve.
	Page *PagePaginationQuery `json:"page,omitempty"`

	// Sort Sort subscription addons returned in the response. Supported sort attributes
	// are:
	//
	// - `id`
	// - `created_at` (default)
	// - `updated_at`
	//
	// The `asc` suffix is optional as the default sort order is ascending. The `desc`
	// suffix is used to specify a descending order.
	Sort *SortQuery `form:"sort,omitempty" json:"sort,omitempty"`
}

ListSubscriptionAddonsParams defines parameters for ListSubscriptionAddons.

type ListSubscriptionsParams

type ListSubscriptionsParams struct {
	// Page Determines which page of the collection to retrieve.
	Page *PagePaginationQuery `json:"page,omitempty"`

	// Sort Sort subscriptions returned in the response. Supported sort attributes are:
	//
	// - `id`
	// - `active_from` (default)
	// - `active_to`
	//
	// The `asc` suffix is optional as the default sort order is ascending. The `desc`
	// suffix is used to specify a descending order.
	Sort *SortQuery `form:"sort,omitempty" json:"sort,omitempty"`

	// Filter Filter subscriptions.
	Filter *ListSubscriptionsParamsFilter `json:"filter,omitempty"`
}

ListSubscriptionsParams defines parameters for ListSubscriptions.

type ListSubscriptionsParamsFilter

type ListSubscriptionsParamsFilter struct {
	// CustomerId Filters on the given ULID field value by exact match. All properties are
	// optional; provide exactly one to specify the comparison.
	CustomerId *ULIDFieldFilter `json:"customer_id,omitempty"`

	// Id Filters on the given ULID field value by exact match. All properties are
	// optional; provide exactly one to specify the comparison.
	Id *ULIDFieldFilter `json:"id,omitempty"`

	// PlanId Filters on the given ULID field value by exact match. All properties are
	// optional; provide exactly one to specify the comparison.
	PlanId *ULIDFieldFilter `json:"plan_id,omitempty"`

	// PlanKey Filters on the given string field value by exact match. All properties are
	// optional; provide exactly one to specify the comparison.
	PlanKey *StringFieldFilterExact `json:"plan_key,omitempty"`

	// Status Filters on the given string field value by exact match. All properties are
	// optional; provide exactly one to specify the comparison.
	Status *StringFieldFilterExact `json:"status,omitempty"`
}

ListSubscriptionsParamsFilter Filter options for listing subscriptions.

type ListTaxCodesParams

type ListTaxCodesParams struct {
	// Page Determines which page of the collection to retrieve.
	Page *PagePaginationQuery `json:"page,omitempty"`

	// IncludeDeleted Include deleted tax codes in the response.
	IncludeDeleted *bool `form:"include_deleted,omitempty" json:"include_deleted,omitempty"`
}

ListTaxCodesParams defines parameters for ListTaxCodes.

type Meter

type Meter struct {
	// Aggregation The aggregation type to use for the meter.
	Aggregation MeterAggregation `json:"aggregation"`

	// CreatedAt An ISO-8601 timestamp representation of entity creation date.
	CreatedAt DateTime `json:"created_at"`

	// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
	DeletedAt *DateTime `json:"deleted_at,omitempty"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// Dimensions Named JSONPath expressions to extract the group by values from the event data.
	//
	// Keys must be unique and consist only alphanumeric and underscore characters.
	Dimensions *map[string]string `json:"dimensions,omitempty"`

	// EventType The event type to include in the aggregation.
	EventType string `json:"event_type"`

	// EventsFrom The date since the meter should include events. Useful to skip old events. If
	// not specified, all historical events are included.
	EventsFrom *DateTime `json:"events_from,omitempty"`
	Id         ULID      `json:"id"`

	// Key A key is a unique string that is used to identify a resource.
	Key ResourceKey `json:"key"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
	UpdatedAt DateTime `json:"updated_at"`

	// ValueProperty JSONPath expression to extract the value from the ingested event's data
	// property.
	//
	// The ingested value for sum, avg, min, and max aggregations is a number or a
	// string that can be parsed to a number.
	//
	// For unique_count aggregation, the ingested value must be a string. For count
	// aggregation the value_property is ignored.
	ValueProperty *string `json:"value_property,omitempty"`
}

Meter A meter is a configuration that defines how to match and aggregate events.

type MeterAggregation

type MeterAggregation string

MeterAggregation The aggregation type to use for the meter.

const (
	MeterAggregationAvg         MeterAggregation = "avg"
	MeterAggregationCount       MeterAggregation = "count"
	MeterAggregationLatest      MeterAggregation = "latest"
	MeterAggregationMax         MeterAggregation = "max"
	MeterAggregationMin         MeterAggregation = "min"
	MeterAggregationSum         MeterAggregation = "sum"
	MeterAggregationUniqueCount MeterAggregation = "unique_count"
)

Defines values for MeterAggregation.

func (MeterAggregation) Valid

func (e MeterAggregation) Valid() bool

Valid indicates whether the value is a known member of the MeterAggregation enum.

type MeterPagePaginatedResponse

type MeterPagePaginatedResponse struct {
	Data []Meter `json:"data"`

	// Meta returns the pagination information
	Meta PaginatedMeta `json:"meta"`
}

MeterPagePaginatedResponse Page paginated response.

type MeterQueryFilters

type MeterQueryFilters struct {
	// Dimensions Filters to apply to the dimensions of the query. For `subject` and `customer_id`
	// only equals ("eq", "in") comparisons are supported.
	Dimensions *map[string]QueryFilterStringMapItem `json:"dimensions,omitempty"`
}

MeterQueryFilters Filters to apply to a meter query.

type MeterQueryGranularity

type MeterQueryGranularity string

MeterQueryGranularity The granularity of the time grouping. Time durations are specified in ISO 8601 format.

const (
	MeterQueryGranularityP1D  MeterQueryGranularity = "P1D"
	MeterQueryGranularityP1M  MeterQueryGranularity = "P1M"
	MeterQueryGranularityPT1H MeterQueryGranularity = "PT1H"
	MeterQueryGranularityPT1M MeterQueryGranularity = "PT1M"
)

Defines values for MeterQueryGranularity.

func (MeterQueryGranularity) Valid

func (e MeterQueryGranularity) Valid() bool

Valid indicates whether the value is a known member of the MeterQueryGranularity enum.

type MeterQueryRequest

type MeterQueryRequest struct {
	// Filters Filters to apply to the query.
	Filters *MeterQueryFilters `json:"filters,omitempty"`

	// From The start of the period the usage is queried from.
	From *DateTime `json:"from,omitempty"`

	// Granularity The size of the time buckets to group the usage into. If not specified, the
	// usage is aggregated over the entire period.
	Granularity *MeterQueryGranularity `json:"granularity,omitempty"`

	// GroupByDimensions The dimensions to group the results by.
	GroupByDimensions *[]string `json:"group_by_dimensions,omitempty"`

	// TimeZone The value is the name of the time zone as defined in the IANA Time Zone Database
	// (http://www.iana.org/time-zones). The time zone is used to determine the start
	// and end of the time buckets. If not specified, the UTC timezone will be used.
	TimeZone *string `json:"time_zone,omitempty"`

	// To The end of the period the usage is queried to.
	To *DateTime `json:"to,omitempty"`
}

MeterQueryRequest A meter query request.

type MeterQueryResult

type MeterQueryResult struct {
	// Data The usage data. If no data is available, an empty array is returned.
	Data []MeterQueryRow `json:"data"`

	// From The start of the period the usage is queried from.
	From *DateTime `json:"from,omitempty"`

	// To The end of the period the usage is queried to.
	To *DateTime `json:"to,omitempty"`
}

MeterQueryResult Meter query result.

type MeterQueryRow

type MeterQueryRow struct {
	// Dimensions The dimensions the value is aggregated over. `subject` and `customer_id` are
	// reserved dimensions.
	Dimensions map[string]string `json:"dimensions"`

	// From The start of the time bucket the value is aggregated over.
	From DateTime `json:"from"`

	// To The end of the time bucket the value is aggregated over.
	To DateTime `json:"to"`

	// Value The aggregated value.
	Value Numeric `json:"value"`
}

MeterQueryRow A row in the result of a meter query.

type MeteringEvent

type MeteringEvent struct {
	// Data The event payload. Optional, if present it must be a JSON object.
	Data nullable.Nullable[map[string]interface{}] `json:"data,omitempty"`

	// Datacontenttype Content type of the CloudEvents data value. Only the value "application/json" is
	// allowed over HTTP.
	Datacontenttype nullable.Nullable[MeteringEventDatacontenttype] `json:"datacontenttype,omitempty"`

	// Dataschema Identifies the schema that data adheres to.
	Dataschema nullable.Nullable[string] `json:"dataschema,omitempty"`

	// Id Identifies the event.
	Id string `json:"id"`

	// Source Identifies the context in which an event happened.
	Source string `json:"source"`

	// Specversion The version of the CloudEvents specification which the event uses.
	Specversion string `json:"specversion"`

	// Subject Describes the subject of the event in the context of the event producer
	// (identified by source).
	Subject string `json:"subject"`

	// Time Timestamp of when the occurrence happened. Must adhere to RFC 3339.
	Time nullable.Nullable[DateTime] `json:"time,omitempty"`

	// Type Contains a value describing the type of event related to the originating
	// occurrence.
	Type string `json:"type"`
}

MeteringEvent Metering event following the CloudEvents specification.

type MeteringEventDatacontenttype

type MeteringEventDatacontenttype string

MeteringEventDatacontenttype Content type of the CloudEvents data value. Only the value "application/json" is allowed over HTTP.

const (
	MeteringEventDatacontenttypeApplicationjson MeteringEventDatacontenttype = "application/json"
)

Defines values for MeteringEventDatacontenttype.

func (MeteringEventDatacontenttype) Valid

Valid indicates whether the value is a known member of the MeteringEventDatacontenttype enum.

type MeteringIngestedEvent

type MeteringIngestedEvent struct {
	// Customer The customer if the event is associated with a customer.
	Customer *CustomerReference `json:"customer,omitempty"`

	// Event The original event ingested.
	Event MeteringEvent `json:"event"`

	// IngestedAt The date and time the event was ingested and its processing started.
	IngestedAt DateTime `json:"ingested_at"`

	// StoredAt The date and time the event was stored in the database.
	StoredAt DateTime `json:"stored_at"`

	// ValidationErrors The validation errors of the ingested event.
	ValidationErrors *[]MeteringIngestedEventValidationError `json:"validation_errors,omitempty"`
}

MeteringIngestedEvent An ingested metering event with ingestion metadata.

type MeteringIngestedEventValidationError

type MeteringIngestedEventValidationError struct {
	// Attributes Additional attributes.
	Attributes *map[string]interface{} `json:"attributes,omitempty"`

	// Code The machine readable code of the error.
	Code string `json:"code"`

	// Message The human readable description of the error.
	Message string `json:"message"`
}

MeteringIngestedEventValidationError Event validation errors.

type MiddlewareFunc

type MiddlewareFunc func(http.Handler) http.Handler

type MigrateSubscriptionJSONRequestBody

type MigrateSubscriptionJSONRequestBody = BillingSubscriptionMigrate

MigrateSubscriptionJSONRequestBody defines body for MigrateSubscription for application/json ContentType.

type NotFound

type NotFound = NotFoundError

NotFound defines model for NotFound.

type NotFoundError

type NotFoundError struct {
	Detail   interface{} `json:"detail"`
	Instance interface{} `json:"instance"`
	Status   interface{} `json:"status"`
	Title    interface{} `json:"title"`
	Type     interface{} `json:"type,omitempty"`
}

NotFoundError defines model for NotFoundError.

type NotificationChannelPagePaginatedResponse

type NotificationChannelPagePaginatedResponse struct {
	Data []BillingNotificationChannel `json:"data"`

	// Meta returns the pagination information
	Meta PaginatedMeta `json:"meta"`
}

NotificationChannelPagePaginatedResponse Page paginated response.

type NotificationChannelReference

type NotificationChannelReference struct {
	// Id ULID (Universally Unique Lexicographically Sortable Identifier).
	Id ULID `json:"id"`
}

NotificationChannelReference NotificationChannel reference.

type NotificationEventPagePaginatedResponse

type NotificationEventPagePaginatedResponse struct {
	Data []BillingNotificationEvent `json:"data"`

	// Meta returns the pagination information
	Meta PaginatedMeta `json:"meta"`
}

NotificationEventPagePaginatedResponse Page paginated response.

type NotificationRulePagePaginatedResponse

type NotificationRulePagePaginatedResponse struct {
	Data []BillingNotificationRule `json:"data"`

	// Meta returns the pagination information
	Meta PaginatedMeta `json:"meta"`
}

NotificationRulePagePaginatedResponse Page paginated response.

type Numeric

type Numeric = string

Numeric Numeric represents an arbitrary precision number.

type OrganizationDefaultTaxCodes

type OrganizationDefaultTaxCodes struct {
	// CreatedAt Timestamp of creation.
	CreatedAt DateTime `json:"created_at"`

	// CreditGrantTaxCode Default tax code for credit grants.
	CreditGrantTaxCode TaxCodeReference `json:"credit_grant_tax_code"`

	// InvoicingTaxCode Default tax code for invoicing.
	InvoicingTaxCode TaxCodeReference `json:"invoicing_tax_code"`

	// UpdatedAt Timestamp of last update.
	UpdatedAt DateTime `json:"updated_at"`
}

OrganizationDefaultTaxCodes Organization-level default tax code references.

Stores the default tax codes applied to specific billing contexts for this organization. Provisioned automatically when the organization is created.

type OverrideCustomerEntitlementJSONRequestBody

type OverrideCustomerEntitlementJSONRequestBody = CreateEntitlementRequest

OverrideCustomerEntitlementJSONRequestBody defines body for OverrideCustomerEntitlement for application/json ContentType.

type PageMeta

type PageMeta struct {
	Number float32 `json:"number"`
	Size   float32 `json:"size"`
	Total  float32 `json:"total"`
}

PageMeta Contains pagination query parameters and the total number of objects returned.

type PagePaginationQuery

type PagePaginationQuery struct {
	// Number The page number.
	Number *int `json:"number,omitempty"`

	// Size The number of items to include per page.
	Size *int `json:"size,omitempty"`
}

PagePaginationQuery defines model for PagePaginationQuery.

type PaginatedMeta

type PaginatedMeta struct {
	// Page Contains pagination query parameters and the total number of objects returned.
	Page PageMeta `json:"page"`
}

PaginatedMeta returns the pagination information

type PlanAddon

type PlanAddon struct {
	// Addon The add-on associated with the plan.
	Addon AddonReference `json:"addon"`

	// CreatedAt An ISO-8601 timestamp representation of entity creation date.
	CreatedAt DateTime `json:"created_at"`

	// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
	DeletedAt *DateTime `json:"deleted_at,omitempty"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// FromPlanPhase The key of the plan phase from which the add-on becomes available for purchase.
	FromPlanPhase ResourceKey `json:"from_plan_phase"`
	Id            ULID        `json:"id"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// MaxQuantity The maximum number of times the add-on can be purchased for the plan. For
	// single-instance add-ons this field must be omitted. For multi-instance add-ons
	// when omitted, unlimited quantity can be purchased.
	MaxQuantity *int `json:"max_quantity,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
	UpdatedAt DateTime `json:"updated_at"`

	// ValidationErrors List of validation errors.
	ValidationErrors *[]ProductCatalogValidationError `json:"validation_errors,omitempty"`
}

PlanAddon PlanAddon represents an association between a plan and an add-on, controlling which add-ons are available for purchase within a plan.

type PlanAddonPagePaginatedResponse

type PlanAddonPagePaginatedResponse struct {
	Data []PlanAddon `json:"data"`

	// Meta returns the pagination information
	Meta PaginatedMeta `json:"meta"`
}

PlanAddonPagePaginatedResponse Page paginated response.

type PlanPagePaginatedResponse

type PlanPagePaginatedResponse struct {
	Data []BillingPlan `json:"data"`

	// Meta returns the pagination information
	Meta PaginatedMeta `json:"meta"`
}

PlanPagePaginatedResponse Page paginated response.

type PricePagePaginatedResponse

type PricePagePaginatedResponse struct {
	Data []LLMCostPrice `json:"data"`

	// Meta returns the pagination information
	Meta PaginatedMeta `json:"meta"`
}

PricePagePaginatedResponse Page paginated response.

type ProductCatalogValidationError

type ProductCatalogValidationError struct {
	// Attributes Additional structured context.
	Attributes *map[string]interface{} `json:"attributes,omitempty"`

	// Code Machine-readable error code.
	Code string `json:"code"`

	// Field The path to the field.
	Field string `json:"field"`

	// Message Human-readable description of the error.
	Message string `json:"message"`
}

ProductCatalogValidationError Validation errors providing detailed description of the issue.

type QueryEntitlementAccessJSONRequestBody

type QueryEntitlementAccessJSONRequestBody = EntitlementAccessQueryRequest

QueryEntitlementAccessJSONRequestBody defines body for QueryEntitlementAccess for application/json ContentType.

type QueryEntitlementAccessParams

type QueryEntitlementAccessParams struct {
	Page *CursorPaginationQuery `json:"page,omitempty"`
}

QueryEntitlementAccessParams defines parameters for QueryEntitlementAccess.

type QueryFeatureCostJSONRequestBody

type QueryFeatureCostJSONRequestBody = MeterQueryRequest

QueryFeatureCostJSONRequestBody defines body for QueryFeatureCost for application/json ContentType.

type QueryFilterString

type QueryFilterString struct {
	// And Combines the provided filters with a logical AND.
	And *[]QueryFilterString `json:"and,omitempty"`

	// Contains The attribute contains the provided value.
	Contains *string `json:"contains,omitempty"`

	// Eq The attribute equals the provided value.
	Eq *string `json:"eq,omitempty"`

	// In The attribute is one of the provided values.
	In *[]string `json:"in,omitempty"`

	// Ncontains The attribute does not contain the provided value.
	Ncontains *string `json:"ncontains,omitempty"`

	// Neq The attribute does not equal the provided value.
	Neq *string `json:"neq,omitempty"`

	// Nin The attribute is not one of the provided values.
	Nin *[]string `json:"nin,omitempty"`

	// Or Combines the provided filters with a logical OR.
	Or *[]QueryFilterString `json:"or,omitempty"`
}

QueryFilterString A query filter for a string attribute. Operators are mutually exclusive, only one operator is allowed at a time.

type QueryFilterStringMapItem

type QueryFilterStringMapItem struct {
	// And Combines the provided filters with a logical AND.
	And *[]QueryFilterString `json:"and,omitempty"`

	// Contains The attribute contains the provided value.
	Contains *string `json:"contains,omitempty"`

	// Eq The attribute equals the provided value.
	Eq *string `json:"eq,omitempty"`

	// Exists The attribute exists.
	Exists *bool `json:"exists,omitempty"`

	// In The attribute is one of the provided values.
	In *[]string `json:"in,omitempty"`

	// Ncontains The attribute does not contain the provided value.
	Ncontains *string `json:"ncontains,omitempty"`

	// Neq The attribute does not equal the provided value.
	Neq *string `json:"neq,omitempty"`

	// Nin The attribute is not one of the provided values.
	Nin *[]string `json:"nin,omitempty"`

	// Or Combines the provided filters with a logical OR.
	Or *[]QueryFilterString `json:"or,omitempty"`
}

QueryFilterStringMapItem A query filter for an item in a string map attribute. Operators are mutually exclusive, only one operator is allowed at a time.

type QueryMeterJSONRequestBody

type QueryMeterJSONRequestBody = MeterQueryRequest

QueryMeterJSONRequestBody defines body for QueryMeter for application/json ContentType.

type RecurringPeriod

type RecurringPeriod struct {
	// Anchor A date-time anchor to base the recurring period on.
	Anchor DateTime `json:"anchor"`

	// Interval The interval duration in ISO 8601 format.
	Interval ISO8601Duration `json:"interval"`
}

RecurringPeriod Recurring period with an anchor and an interval.

type RecurringPeriodInput

type RecurringPeriodInput struct {
	// Anchor A date-time anchor to base the recurring period on.
	Anchor *DateTime `json:"anchor,omitempty"`

	// Interval The interval duration in ISO 8601 format.
	Interval ISO8601Duration `json:"interval"`
}

RecurringPeriodInput Recurring period input. The anchor is optional; the owning resource defines the default, typically its creation time.

type RequiredHeaderError

type RequiredHeaderError struct {
	ParamName string
	Err       error
}

func (*RequiredHeaderError) Error

func (e *RequiredHeaderError) Error() string

func (*RequiredHeaderError) Unwrap

func (e *RequiredHeaderError) Unwrap() error

type RequiredParamError

type RequiredParamError struct {
	ParamName string
}

func (*RequiredParamError) Error

func (e *RequiredParamError) Error() string

type ResendBillingNotificationEventRequest

type ResendBillingNotificationEventRequest struct {
	// Channels The channels to resend the event to. When omitted or empty, the event is resent
	// to every enabled channel of the rule. Channels not targeted by the rule or
	// disabled are rejected.
	Channels *[]ULID `json:"channels,omitempty"`
}

ResendBillingNotificationEventRequest Request body for resending a notification event.

type ResendNotificationEventJSONRequestBody

type ResendNotificationEventJSONRequestBody = ResendBillingNotificationEventRequest

ResendNotificationEventJSONRequestBody defines body for ResendNotificationEvent for application/json ContentType.

type ResetCustomerEntitlementUsageJSONRequestBody

type ResetCustomerEntitlementUsageJSONRequestBody = ResetCustomerEntitlementUsageRequest

ResetCustomerEntitlementUsageJSONRequestBody defines body for ResetCustomerEntitlementUsage for application/json ContentType.

type ResetCustomerEntitlementUsageRequest

type ResetCustomerEntitlementUsageRequest struct {
	// EffectiveAt The time the reset takes effect. Defaults to the current time and cannot be in
	// the future. Truncated to the minute.
	EffectiveAt *DateTime `json:"effective_at,omitempty"`

	// PreserveOverage Whether overage carries over into the new usage period. Defaults to the
	// entitlement's own setting.
	PreserveOverage *bool `json:"preserve_overage,omitempty"`

	// RetainAnchor Whether the usage period anchor is kept. When false, the anchor moves to
	// `effective_at`.
	RetainAnchor *bool `json:"retain_anchor,omitempty"`
}

ResetCustomerEntitlementUsageRequest Request body for resetting the usage of a metered entitlement.

type ResourceKey

type ResourceKey = string

ResourceKey A key is a unique string that is used to identify a resource.

type ServerInterface

type ServerInterface interface {
	// List add-ons
	// (GET /openmeter/addons)
	ListAddons(w http.ResponseWriter, r *http.Request, params ListAddonsParams)
	// Create add-on
	// (POST /openmeter/addons)
	CreateAddon(w http.ResponseWriter, r *http.Request)
	// Soft delete add-on
	// (DELETE /openmeter/addons/{addonId})
	DeleteAddon(w http.ResponseWriter, r *http.Request, addonId ULID)
	// Get add-on
	// (GET /openmeter/addons/{addonId})
	GetAddon(w http.ResponseWriter, r *http.Request, addonId ULID)
	// Update add-on
	// (PUT /openmeter/addons/{addonId})
	UpdateAddon(w http.ResponseWriter, r *http.Request, addonId ULID)
	// Archive add-on version
	// (POST /openmeter/addons/{addonId}/archive)
	ArchiveAddon(w http.ResponseWriter, r *http.Request, addonId ULID)
	// Publish add-on version
	// (POST /openmeter/addons/{addonId}/publish)
	PublishAddon(w http.ResponseWriter, r *http.Request, addonId ULID)
	// List app catalog
	// (GET /openmeter/app-catalog)
	ListAppCatalog(w http.ResponseWriter, r *http.Request, params ListAppCatalogParams)
	// Install app from the catalog
	// (POST /openmeter/app-catalog/install)
	InstallApp(w http.ResponseWriter, r *http.Request)
	// Get app catalog item by type
	// (GET /openmeter/app-catalog/{appType})
	GetAppCatalogItem(w http.ResponseWriter, r *http.Request, appType BillingAppType)
	// List apps
	// (GET /openmeter/apps)
	ListApps(w http.ResponseWriter, r *http.Request, params ListAppsParams)
	// Uninstall app
	// (DELETE /openmeter/apps/{appId})
	UninstallApp(w http.ResponseWriter, r *http.Request, appId ULID)
	// Get app
	// (GET /openmeter/apps/{appId})
	GetApp(w http.ResponseWriter, r *http.Request, appId ULID)
	// Update app
	// (PUT /openmeter/apps/{appId})
	UpdateApp(w http.ResponseWriter, r *http.Request, appId ULID)
	// Execute app action
	// (POST /openmeter/apps/{appId}/action)
	ExecuteAppAction(w http.ResponseWriter, r *http.Request, appId ULID)
	// List billing invoices
	// (GET /openmeter/billing/invoices)
	ListInvoices(w http.ResponseWriter, r *http.Request, params ListInvoicesParams)
	// Delete a billing invoice
	// (DELETE /openmeter/billing/invoices/{invoiceId})
	DeleteInvoice(w http.ResponseWriter, r *http.Request, invoiceId ULID)
	// Get a billing invoice
	// (GET /openmeter/billing/invoices/{invoiceId})
	GetInvoice(w http.ResponseWriter, r *http.Request, invoiceId ULID)
	// Update a billing invoice
	// (PUT /openmeter/billing/invoices/{invoiceId})
	UpdateInvoice(w http.ResponseWriter, r *http.Request, invoiceId ULID)
	// Advance billing invoice's next status
	// (POST /openmeter/billing/invoices/{invoiceId}/advance)
	AdvanceInvoice(w http.ResponseWriter, r *http.Request, invoiceId ULID)
	// Send the invoice to the customer
	// (POST /openmeter/billing/invoices/{invoiceId}/approve)
	ApproveInvoice(w http.ResponseWriter, r *http.Request, invoiceId ULID)
	// Retry advancing the invoice after a failed attempt
	// (POST /openmeter/billing/invoices/{invoiceId}/retry)
	RetryInvoice(w http.ResponseWriter, r *http.Request, invoiceId ULID)
	// Snapshot quantities for usage based line items
	// (POST /openmeter/billing/invoices/{invoiceId}/snapshot-quantities)
	SnapshotQuantitiesInvoice(w http.ResponseWriter, r *http.Request, invoiceId ULID)
	// List charges
	// (GET /openmeter/charges)
	ListCharges(w http.ResponseWriter, r *http.Request, params ListChargesParams)
	// List currencies
	// (GET /openmeter/currencies)
	ListCurrencies(w http.ResponseWriter, r *http.Request, params ListCurrenciesParams)
	// Create custom currency
	// (POST /openmeter/currencies/custom)
	CreateCustomCurrency(w http.ResponseWriter, r *http.Request)
	// Get custom currency
	// (GET /openmeter/currencies/custom/{currencyId})
	GetCustomCurrency(w http.ResponseWriter, r *http.Request, currencyId ULID)
	// List cost bases
	// (GET /openmeter/currencies/custom/{currencyId}/cost-bases)
	ListCostBases(w http.ResponseWriter, r *http.Request, currencyId ULID, params ListCostBasesParams)
	// Create cost basis
	// (POST /openmeter/currencies/custom/{currencyId}/cost-bases)
	CreateCostBasis(w http.ResponseWriter, r *http.Request, currencyId ULID)
	// List customers
	// (GET /openmeter/customers)
	ListCustomers(w http.ResponseWriter, r *http.Request, params ListCustomersParams)
	// Create customer
	// (POST /openmeter/customers)
	CreateCustomer(w http.ResponseWriter, r *http.Request)
	// Delete customer
	// (DELETE /openmeter/customers/{customerId})
	DeleteCustomer(w http.ResponseWriter, r *http.Request, customerId ULID)
	// Get customer
	// (GET /openmeter/customers/{customerId})
	GetCustomer(w http.ResponseWriter, r *http.Request, customerId ULID)
	// Upsert customer
	// (PUT /openmeter/customers/{customerId})
	UpsertCustomer(w http.ResponseWriter, r *http.Request, customerId ULID)
	// Get customer billing data
	// (GET /openmeter/customers/{customerId}/billing)
	GetCustomerBilling(w http.ResponseWriter, r *http.Request, customerId ULID)
	// Update customer billing data
	// (PUT /openmeter/customers/{customerId}/billing)
	UpdateCustomerBilling(w http.ResponseWriter, r *http.Request, customerId ULID)
	// Update customer billing app data
	// (PUT /openmeter/customers/{customerId}/billing/app-data)
	UpdateCustomerBillingAppData(w http.ResponseWriter, r *http.Request, customerId ULID)
	// Create Stripe Checkout Session
	// (POST /openmeter/customers/{customerId}/billing/stripe/checkout-sessions)
	CreateCustomerStripeCheckoutSession(w http.ResponseWriter, r *http.Request, customerId ULID)
	// Create Stripe customer portal session
	// (POST /openmeter/customers/{customerId}/billing/stripe/portal-sessions)
	CreateCustomerStripePortalSession(w http.ResponseWriter, r *http.Request, customerId ULID)
	// List customer charges
	// (GET /openmeter/customers/{customerId}/charges)
	ListCustomerCharges(w http.ResponseWriter, r *http.Request, customerId ULID, params ListCustomerChargesParams)
	// Create customer charge
	// (POST /openmeter/customers/{customerId}/charges)
	CreateCustomerCharges(w http.ResponseWriter, r *http.Request, customerId ULID)
	// Create a credit adjustment
	// (POST /openmeter/customers/{customerId}/credits/adjustments)
	CreateCreditAdjustment(w http.ResponseWriter, r *http.Request, customerId ULID)
	// Get a customer's credit balance
	// (GET /openmeter/customers/{customerId}/credits/balance)
	GetCustomerCreditBalance(w http.ResponseWriter, r *http.Request, customerId ULID, params GetCustomerCreditBalanceParams)
	// List credit grants
	// (GET /openmeter/customers/{customerId}/credits/grants)
	ListCreditGrants(w http.ResponseWriter, r *http.Request, customerId ULID, params ListCreditGrantsParams)
	// Create a new credit grant
	// (POST /openmeter/customers/{customerId}/credits/grants)
	CreateCreditGrant(w http.ResponseWriter, r *http.Request, customerId ULID)
	// Get a credit grant
	// (GET /openmeter/customers/{customerId}/credits/grants/{creditGrantId})
	GetCreditGrant(w http.ResponseWriter, r *http.Request, customerId ULID, creditGrantId ULID)
	// Update credit grant external settlement status
	// (POST /openmeter/customers/{customerId}/credits/grants/{creditGrantId}/settlement/external)
	UpdateCreditGrantExternalSettlement(w http.ResponseWriter, r *http.Request, customerId ULID, creditGrantId ULID)
	// Void credit grant
	// (POST /openmeter/customers/{customerId}/credits/grants/{creditGrantId}/void)
	VoidCreditGrant(w http.ResponseWriter, r *http.Request, customerId ULID, creditGrantId ULID)
	// List credit transactions
	// (GET /openmeter/customers/{customerId}/credits/transactions)
	ListCreditTransactions(w http.ResponseWriter, r *http.Request, customerId ULID, params ListCreditTransactionsParams)
	// List customer entitlement access
	// (GET /openmeter/customers/{customerId}/entitlement-access)
	ListCustomerEntitlementAccess(w http.ResponseWriter, r *http.Request, customerId ULID)
	// Get customer entitlement access
	// (GET /openmeter/customers/{customerId}/entitlement-access/features/{featureKey})
	GetCustomerEntitlementAccess(w http.ResponseWriter, r *http.Request, customerId ULID, featureKey ResourceKey)
	// Get customer entitlement value by feature key
	// (GET /openmeter/customers/{customerId}/entitlement-access/features/{featureKey}/value)
	GetCustomerEntitlementValueByFeatureKey(w http.ResponseWriter, r *http.Request, customerId ULID, featureKey ResourceKey, params GetCustomerEntitlementValueByFeatureKeyParams)
	// List customer entitlements
	// (GET /openmeter/customers/{customerId}/entitlements)
	ListCustomerEntitlements(w http.ResponseWriter, r *http.Request, customerId ULID, params ListCustomerEntitlementsParams)
	// Create customer entitlement
	// (POST /openmeter/customers/{customerId}/entitlements)
	CreateCustomerEntitlement(w http.ResponseWriter, r *http.Request, customerId ULID)
	// Delete customer entitlement
	// (DELETE /openmeter/customers/{customerId}/entitlements/{entitlementId})
	DeleteCustomerEntitlement(w http.ResponseWriter, r *http.Request, customerId ULID, entitlementId ULID)
	// Get customer entitlement
	// (GET /openmeter/customers/{customerId}/entitlements/{entitlementId})
	GetCustomerEntitlement(w http.ResponseWriter, r *http.Request, customerId ULID, entitlementId ULID)
	// List customer entitlement grants
	// (GET /openmeter/customers/{customerId}/entitlements/{entitlementId}/grants)
	ListCustomerEntitlementGrants(w http.ResponseWriter, r *http.Request, customerId ULID, entitlementId ULID, params ListCustomerEntitlementGrantsParams)
	// Create customer entitlement grant
	// (POST /openmeter/customers/{customerId}/entitlements/{entitlementId}/grants)
	CreateCustomerEntitlementGrant(w http.ResponseWriter, r *http.Request, customerId ULID, entitlementId ULID)
	// Get customer entitlement history
	// (GET /openmeter/customers/{customerId}/entitlements/{entitlementId}/history)
	GetCustomerEntitlementHistory(w http.ResponseWriter, r *http.Request, customerId ULID, entitlementId ULID, params GetCustomerEntitlementHistoryParams)
	// Override customer entitlement
	// (PUT /openmeter/customers/{customerId}/entitlements/{entitlementId}/override)
	OverrideCustomerEntitlement(w http.ResponseWriter, r *http.Request, customerId ULID, entitlementId ULID)
	// Reset customer entitlement usage
	// (POST /openmeter/customers/{customerId}/entitlements/{entitlementId}/reset)
	ResetCustomerEntitlementUsage(w http.ResponseWriter, r *http.Request, customerId ULID, entitlementId ULID)
	// Get customer entitlement value
	// (GET /openmeter/customers/{customerId}/entitlements/{entitlementId}/value)
	GetCustomerEntitlementValue(w http.ResponseWriter, r *http.Request, customerId ULID, entitlementId ULID, params GetCustomerEntitlementValueParams)
	// Get organization default tax codes
	// (GET /openmeter/defaults/tax-codes)
	GetOrganizationDefaultTaxCodes(w http.ResponseWriter, r *http.Request)
	// Update organization default tax codes
	// (PUT /openmeter/defaults/tax-codes)
	UpdateOrganizationDefaultTaxCodes(w http.ResponseWriter, r *http.Request)
	// Query entitlement access
	// (POST /openmeter/entitlement-access/query)
	QueryEntitlementAccess(w http.ResponseWriter, r *http.Request, params QueryEntitlementAccessParams)
	// List entitlements
	// (GET /openmeter/entitlements)
	ListEntitlements(w http.ResponseWriter, r *http.Request, params ListEntitlementsParams)
	// Get entitlement
	// (GET /openmeter/entitlements/{entitlementId})
	GetEntitlement(w http.ResponseWriter, r *http.Request, entitlementId ULID)
	// List metering events
	// (GET /openmeter/events)
	ListMeteringEvents(w http.ResponseWriter, r *http.Request, params ListMeteringEventsParams)
	// Ingest metering events
	// (POST /openmeter/events)
	IngestMeteringEvents(w http.ResponseWriter, r *http.Request)
	// List features
	// (GET /openmeter/features)
	ListFeatures(w http.ResponseWriter, r *http.Request, params ListFeaturesParams)
	// Create feature
	// (POST /openmeter/features)
	CreateFeature(w http.ResponseWriter, r *http.Request)
	// Delete feature
	// (DELETE /openmeter/features/{featureId})
	DeleteFeature(w http.ResponseWriter, r *http.Request, featureId ULID)
	// Get feature
	// (GET /openmeter/features/{featureId})
	GetFeature(w http.ResponseWriter, r *http.Request, featureId ULID)
	// Update feature
	// (PATCH /openmeter/features/{featureId})
	UpdateFeature(w http.ResponseWriter, r *http.Request, featureId ULID)
	// Query feature cost
	// (POST /openmeter/features/{featureId}/cost/query)
	QueryFeatureCost(w http.ResponseWriter, r *http.Request, featureId ULID)
	// List grants
	// (GET /openmeter/grants)
	ListGrants(w http.ResponseWriter, r *http.Request, params ListGrantsParams)
	// Void grant
	// (DELETE /openmeter/grants/{grantId})
	VoidGrant(w http.ResponseWriter, r *http.Request, grantId ULID, params VoidGrantParams)
	// List LLM cost overrides
	// (GET /openmeter/llm-cost/overrides)
	ListLlmCostOverrides(w http.ResponseWriter, r *http.Request, params ListLlmCostOverridesParams)
	// Create LLM cost override
	// (POST /openmeter/llm-cost/overrides)
	CreateLlmCostOverride(w http.ResponseWriter, r *http.Request)
	// Delete LLM cost override
	// (DELETE /openmeter/llm-cost/overrides/{priceId})
	DeleteLlmCostOverride(w http.ResponseWriter, r *http.Request, priceId ULID)
	// List LLM cost prices
	// (GET /openmeter/llm-cost/prices)
	ListLlmCostPrices(w http.ResponseWriter, r *http.Request, params ListLlmCostPricesParams)
	// Get LLM cost price
	// (GET /openmeter/llm-cost/prices/{priceId})
	GetLlmCostPrice(w http.ResponseWriter, r *http.Request, priceId ULID)
	// List meters
	// (GET /openmeter/meters)
	ListMeters(w http.ResponseWriter, r *http.Request, params ListMetersParams)
	// Create meter
	// (POST /openmeter/meters)
	CreateMeter(w http.ResponseWriter, r *http.Request)
	// Delete meter
	// (DELETE /openmeter/meters/{meterId})
	DeleteMeter(w http.ResponseWriter, r *http.Request, meterId ULID)
	// Get meter
	// (GET /openmeter/meters/{meterId})
	GetMeter(w http.ResponseWriter, r *http.Request, meterId ULID)
	// Update meter
	// (PUT /openmeter/meters/{meterId})
	UpdateMeter(w http.ResponseWriter, r *http.Request, meterId ULID)
	// Query meter
	// (POST /openmeter/meters/{meterId}/query)
	QueryMeter(w http.ResponseWriter, r *http.Request, meterId ULID)
	// List notification channels
	// (GET /openmeter/notification/channels)
	ListNotificationChannels(w http.ResponseWriter, r *http.Request, params ListNotificationChannelsParams)
	// Create notification channel
	// (POST /openmeter/notification/channels)
	CreateNotificationChannel(w http.ResponseWriter, r *http.Request)
	// Delete notification channel
	// (DELETE /openmeter/notification/channels/{notificationChannelId})
	DeleteNotificationChannel(w http.ResponseWriter, r *http.Request, notificationChannelId ULID)
	// Get notification channel
	// (GET /openmeter/notification/channels/{notificationChannelId})
	GetNotificationChannel(w http.ResponseWriter, r *http.Request, notificationChannelId ULID)
	// Update notification channel
	// (PUT /openmeter/notification/channels/{notificationChannelId})
	UpdateNotificationChannel(w http.ResponseWriter, r *http.Request, notificationChannelId ULID)
	// List notification events
	// (GET /openmeter/notification/events)
	ListNotificationEvents(w http.ResponseWriter, r *http.Request, params ListNotificationEventsParams)
	// Get notification event
	// (GET /openmeter/notification/events/{notificationEventId})
	GetNotificationEvent(w http.ResponseWriter, r *http.Request, notificationEventId ULID)
	// Resend notification event
	// (POST /openmeter/notification/events/{notificationEventId}/resend)
	ResendNotificationEvent(w http.ResponseWriter, r *http.Request, notificationEventId ULID)
	// List notification rules
	// (GET /openmeter/notification/rules)
	ListNotificationRules(w http.ResponseWriter, r *http.Request, params ListNotificationRulesParams)
	// Create notification rule
	// (POST /openmeter/notification/rules)
	CreateNotificationRule(w http.ResponseWriter, r *http.Request)
	// Delete notification rule
	// (DELETE /openmeter/notification/rules/{notificationRuleId})
	DeleteNotificationRule(w http.ResponseWriter, r *http.Request, notificationRuleId ULID)
	// Get notification rule
	// (GET /openmeter/notification/rules/{notificationRuleId})
	GetNotificationRule(w http.ResponseWriter, r *http.Request, notificationRuleId ULID)
	// Update notification rule
	// (PUT /openmeter/notification/rules/{notificationRuleId})
	UpdateNotificationRule(w http.ResponseWriter, r *http.Request, notificationRuleId ULID)
	// Test notification rule
	// (POST /openmeter/notification/rules/{notificationRuleId}/test)
	TestNotificationRule(w http.ResponseWriter, r *http.Request, notificationRuleId ULID)
	// List plans
	// (GET /openmeter/plans)
	ListPlans(w http.ResponseWriter, r *http.Request, params ListPlansParams)
	// Create plan
	// (POST /openmeter/plans)
	CreatePlan(w http.ResponseWriter, r *http.Request)
	// Delete plan
	// (DELETE /openmeter/plans/{planId})
	DeletePlan(w http.ResponseWriter, r *http.Request, planId ULID)
	// Get plan
	// (GET /openmeter/plans/{planId})
	GetPlan(w http.ResponseWriter, r *http.Request, planId ULID)
	// Update plan
	// (PUT /openmeter/plans/{planId})
	UpdatePlan(w http.ResponseWriter, r *http.Request, planId ULID)
	// List add-ons for plan
	// (GET /openmeter/plans/{planId}/addons)
	ListPlanAddons(w http.ResponseWriter, r *http.Request, planId ULID, params ListPlanAddonsParams)
	// Add add-on to plan
	// (POST /openmeter/plans/{planId}/addons)
	CreatePlanAddon(w http.ResponseWriter, r *http.Request, planId ULID)
	// Remove add-on from plan
	// (DELETE /openmeter/plans/{planId}/addons/{planAddonId})
	DeletePlanAddon(w http.ResponseWriter, r *http.Request, planId ULID, planAddonId ULID)
	// Get add-on association for plan
	// (GET /openmeter/plans/{planId}/addons/{planAddonId})
	GetPlanAddon(w http.ResponseWriter, r *http.Request, planId ULID, planAddonId ULID)
	// Update add-on association for plan
	// (PUT /openmeter/plans/{planId}/addons/{planAddonId})
	UpdatePlanAddon(w http.ResponseWriter, r *http.Request, planId ULID, planAddonId ULID)
	// Archive plan version
	// (POST /openmeter/plans/{planId}/archive)
	ArchivePlan(w http.ResponseWriter, r *http.Request, planId ULID)
	// Publish plan version
	// (POST /openmeter/plans/{planId}/publish)
	PublishPlan(w http.ResponseWriter, r *http.Request, planId ULID)
	// List billing profiles
	// (GET /openmeter/profiles)
	ListBillingProfiles(w http.ResponseWriter, r *http.Request, params ListBillingProfilesParams)
	// Create a new billing profile
	// (POST /openmeter/profiles)
	CreateBillingProfile(w http.ResponseWriter, r *http.Request)
	// Delete a billing profile
	// (DELETE /openmeter/profiles/{id})
	DeleteBillingProfile(w http.ResponseWriter, r *http.Request, id ULID)
	// Get a billing profile
	// (GET /openmeter/profiles/{id})
	GetBillingProfile(w http.ResponseWriter, r *http.Request, id ULID)
	// Update a billing profile
	// (PUT /openmeter/profiles/{id})
	UpdateBillingProfile(w http.ResponseWriter, r *http.Request, id ULID)
	// List subscriptions
	// (GET /openmeter/subscriptions)
	ListSubscriptions(w http.ResponseWriter, r *http.Request, params ListSubscriptionsParams)
	// Create subscription
	// (POST /openmeter/subscriptions)
	CreateSubscription(w http.ResponseWriter, r *http.Request)
	// Get subscription
	// (GET /openmeter/subscriptions/{subscriptionId})
	GetSubscription(w http.ResponseWriter, r *http.Request, subscriptionId ULID)
	// List subscription addons
	// (GET /openmeter/subscriptions/{subscriptionId}/addons)
	ListSubscriptionAddons(w http.ResponseWriter, r *http.Request, subscriptionId ULID, params ListSubscriptionAddonsParams)
	// Create a new subscription add-on
	// (POST /openmeter/subscriptions/{subscriptionId}/addons)
	CreateSubscriptionAddon(w http.ResponseWriter, r *http.Request, subscriptionId ULID)
	// Get add-on association for subscription
	// (GET /openmeter/subscriptions/{subscriptionId}/addons/{subscriptionAddonId})
	GetSubscriptionAddon(w http.ResponseWriter, r *http.Request, subscriptionId ULID, subscriptionAddonId ULID)
	// Update subscription addon
	// (PATCH /openmeter/subscriptions/{subscriptionId}/addons/{subscriptionAddonId})
	UpdateSubscriptionAddon(w http.ResponseWriter, r *http.Request, subscriptionId ULID, subscriptionAddonId ULID)
	// Cancel subscription
	// (POST /openmeter/subscriptions/{subscriptionId}/cancel)
	CancelSubscription(w http.ResponseWriter, r *http.Request, subscriptionId ULID)
	// Change subscription
	// (POST /openmeter/subscriptions/{subscriptionId}/change)
	ChangeSubscription(w http.ResponseWriter, r *http.Request, subscriptionId ULID)
	// Edit subscription
	// (POST /openmeter/subscriptions/{subscriptionId}/edit)
	EditSubscription(w http.ResponseWriter, r *http.Request, subscriptionId ULID)
	// Migrate subscription
	// (POST /openmeter/subscriptions/{subscriptionId}/migrate)
	MigrateSubscription(w http.ResponseWriter, r *http.Request, subscriptionId ULID)
	// Restore subscription
	// (POST /openmeter/subscriptions/{subscriptionId}/restore)
	RestoreSubscription(w http.ResponseWriter, r *http.Request, subscriptionId ULID)
	// Unschedule subscription
	// (POST /openmeter/subscriptions/{subscriptionId}/unschedule)
	UnscheduleSubscription(w http.ResponseWriter, r *http.Request, subscriptionId ULID)
	// Unschedule subscription cancelation
	// (POST /openmeter/subscriptions/{subscriptionId}/unschedule-cancelation)
	UnscheduleCancelation(w http.ResponseWriter, r *http.Request, subscriptionId ULID)
	// List tax codes
	// (GET /openmeter/tax-codes)
	ListTaxCodes(w http.ResponseWriter, r *http.Request, params ListTaxCodesParams)
	// Create tax code
	// (POST /openmeter/tax-codes)
	CreateTaxCode(w http.ResponseWriter, r *http.Request)
	// Delete tax code
	// (DELETE /openmeter/tax-codes/{taxCodeId})
	DeleteTaxCode(w http.ResponseWriter, r *http.Request, taxCodeId ULID)
	// Get tax code
	// (GET /openmeter/tax-codes/{taxCodeId})
	GetTaxCode(w http.ResponseWriter, r *http.Request, taxCodeId ULID)
	// Upsert tax code
	// (PUT /openmeter/tax-codes/{taxCodeId})
	UpsertTaxCode(w http.ResponseWriter, r *http.Request, taxCodeId ULID)
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler            ServerInterface
	HandlerMiddlewares []MiddlewareFunc
	ErrorHandlerFunc   func(w http.ResponseWriter, r *http.Request, err error)
}

ServerInterfaceWrapper converts contexts to parameters.

func (*ServerInterfaceWrapper) AdvanceInvoice

func (siw *ServerInterfaceWrapper) AdvanceInvoice(w http.ResponseWriter, r *http.Request)

AdvanceInvoice operation middleware

func (*ServerInterfaceWrapper) ApproveInvoice

func (siw *ServerInterfaceWrapper) ApproveInvoice(w http.ResponseWriter, r *http.Request)

ApproveInvoice operation middleware

func (*ServerInterfaceWrapper) ArchiveAddon

func (siw *ServerInterfaceWrapper) ArchiveAddon(w http.ResponseWriter, r *http.Request)

ArchiveAddon operation middleware

func (*ServerInterfaceWrapper) ArchivePlan

func (siw *ServerInterfaceWrapper) ArchivePlan(w http.ResponseWriter, r *http.Request)

ArchivePlan operation middleware

func (*ServerInterfaceWrapper) CancelSubscription

func (siw *ServerInterfaceWrapper) CancelSubscription(w http.ResponseWriter, r *http.Request)

CancelSubscription operation middleware

func (*ServerInterfaceWrapper) ChangeSubscription

func (siw *ServerInterfaceWrapper) ChangeSubscription(w http.ResponseWriter, r *http.Request)

ChangeSubscription operation middleware

func (*ServerInterfaceWrapper) CreateAddon

func (siw *ServerInterfaceWrapper) CreateAddon(w http.ResponseWriter, r *http.Request)

CreateAddon operation middleware

func (*ServerInterfaceWrapper) CreateBillingProfile

func (siw *ServerInterfaceWrapper) CreateBillingProfile(w http.ResponseWriter, r *http.Request)

CreateBillingProfile operation middleware

func (*ServerInterfaceWrapper) CreateCostBasis

func (siw *ServerInterfaceWrapper) CreateCostBasis(w http.ResponseWriter, r *http.Request)

CreateCostBasis operation middleware

func (*ServerInterfaceWrapper) CreateCreditAdjustment

func (siw *ServerInterfaceWrapper) CreateCreditAdjustment(w http.ResponseWriter, r *http.Request)

CreateCreditAdjustment operation middleware

func (*ServerInterfaceWrapper) CreateCreditGrant

func (siw *ServerInterfaceWrapper) CreateCreditGrant(w http.ResponseWriter, r *http.Request)

CreateCreditGrant operation middleware

func (*ServerInterfaceWrapper) CreateCustomCurrency

func (siw *ServerInterfaceWrapper) CreateCustomCurrency(w http.ResponseWriter, r *http.Request)

CreateCustomCurrency operation middleware

func (*ServerInterfaceWrapper) CreateCustomer

func (siw *ServerInterfaceWrapper) CreateCustomer(w http.ResponseWriter, r *http.Request)

CreateCustomer operation middleware

func (*ServerInterfaceWrapper) CreateCustomerCharges

func (siw *ServerInterfaceWrapper) CreateCustomerCharges(w http.ResponseWriter, r *http.Request)

CreateCustomerCharges operation middleware

func (*ServerInterfaceWrapper) CreateCustomerEntitlement

func (siw *ServerInterfaceWrapper) CreateCustomerEntitlement(w http.ResponseWriter, r *http.Request)

CreateCustomerEntitlement operation middleware

func (*ServerInterfaceWrapper) CreateCustomerEntitlementGrant

func (siw *ServerInterfaceWrapper) CreateCustomerEntitlementGrant(w http.ResponseWriter, r *http.Request)

CreateCustomerEntitlementGrant operation middleware

func (*ServerInterfaceWrapper) CreateCustomerStripeCheckoutSession

func (siw *ServerInterfaceWrapper) CreateCustomerStripeCheckoutSession(w http.ResponseWriter, r *http.Request)

CreateCustomerStripeCheckoutSession operation middleware

func (*ServerInterfaceWrapper) CreateCustomerStripePortalSession

func (siw *ServerInterfaceWrapper) CreateCustomerStripePortalSession(w http.ResponseWriter, r *http.Request)

CreateCustomerStripePortalSession operation middleware

func (*ServerInterfaceWrapper) CreateFeature

func (siw *ServerInterfaceWrapper) CreateFeature(w http.ResponseWriter, r *http.Request)

CreateFeature operation middleware

func (*ServerInterfaceWrapper) CreateLlmCostOverride

func (siw *ServerInterfaceWrapper) CreateLlmCostOverride(w http.ResponseWriter, r *http.Request)

CreateLlmCostOverride operation middleware

func (*ServerInterfaceWrapper) CreateMeter

func (siw *ServerInterfaceWrapper) CreateMeter(w http.ResponseWriter, r *http.Request)

CreateMeter operation middleware

func (*ServerInterfaceWrapper) CreateNotificationChannel

func (siw *ServerInterfaceWrapper) CreateNotificationChannel(w http.ResponseWriter, r *http.Request)

CreateNotificationChannel operation middleware

func (*ServerInterfaceWrapper) CreateNotificationRule

func (siw *ServerInterfaceWrapper) CreateNotificationRule(w http.ResponseWriter, r *http.Request)

CreateNotificationRule operation middleware

func (*ServerInterfaceWrapper) CreatePlan

func (siw *ServerInterfaceWrapper) CreatePlan(w http.ResponseWriter, r *http.Request)

CreatePlan operation middleware

func (*ServerInterfaceWrapper) CreatePlanAddon

func (siw *ServerInterfaceWrapper) CreatePlanAddon(w http.ResponseWriter, r *http.Request)

CreatePlanAddon operation middleware

func (*ServerInterfaceWrapper) CreateSubscription

func (siw *ServerInterfaceWrapper) CreateSubscription(w http.ResponseWriter, r *http.Request)

CreateSubscription operation middleware

func (*ServerInterfaceWrapper) CreateSubscriptionAddon

func (siw *ServerInterfaceWrapper) CreateSubscriptionAddon(w http.ResponseWriter, r *http.Request)

CreateSubscriptionAddon operation middleware

func (*ServerInterfaceWrapper) CreateTaxCode

func (siw *ServerInterfaceWrapper) CreateTaxCode(w http.ResponseWriter, r *http.Request)

CreateTaxCode operation middleware

func (*ServerInterfaceWrapper) DeleteAddon

func (siw *ServerInterfaceWrapper) DeleteAddon(w http.ResponseWriter, r *http.Request)

DeleteAddon operation middleware

func (*ServerInterfaceWrapper) DeleteBillingProfile

func (siw *ServerInterfaceWrapper) DeleteBillingProfile(w http.ResponseWriter, r *http.Request)

DeleteBillingProfile operation middleware

func (*ServerInterfaceWrapper) DeleteCustomer

func (siw *ServerInterfaceWrapper) DeleteCustomer(w http.ResponseWriter, r *http.Request)

DeleteCustomer operation middleware

func (*ServerInterfaceWrapper) DeleteCustomerEntitlement

func (siw *ServerInterfaceWrapper) DeleteCustomerEntitlement(w http.ResponseWriter, r *http.Request)

DeleteCustomerEntitlement operation middleware

func (*ServerInterfaceWrapper) DeleteFeature

func (siw *ServerInterfaceWrapper) DeleteFeature(w http.ResponseWriter, r *http.Request)

DeleteFeature operation middleware

func (*ServerInterfaceWrapper) DeleteInvoice

func (siw *ServerInterfaceWrapper) DeleteInvoice(w http.ResponseWriter, r *http.Request)

DeleteInvoice operation middleware

func (*ServerInterfaceWrapper) DeleteLlmCostOverride

func (siw *ServerInterfaceWrapper) DeleteLlmCostOverride(w http.ResponseWriter, r *http.Request)

DeleteLlmCostOverride operation middleware

func (*ServerInterfaceWrapper) DeleteMeter

func (siw *ServerInterfaceWrapper) DeleteMeter(w http.ResponseWriter, r *http.Request)

DeleteMeter operation middleware

func (*ServerInterfaceWrapper) DeleteNotificationChannel

func (siw *ServerInterfaceWrapper) DeleteNotificationChannel(w http.ResponseWriter, r *http.Request)

DeleteNotificationChannel operation middleware

func (*ServerInterfaceWrapper) DeleteNotificationRule

func (siw *ServerInterfaceWrapper) DeleteNotificationRule(w http.ResponseWriter, r *http.Request)

DeleteNotificationRule operation middleware

func (*ServerInterfaceWrapper) DeletePlan

func (siw *ServerInterfaceWrapper) DeletePlan(w http.ResponseWriter, r *http.Request)

DeletePlan operation middleware

func (*ServerInterfaceWrapper) DeletePlanAddon

func (siw *ServerInterfaceWrapper) DeletePlanAddon(w http.ResponseWriter, r *http.Request)

DeletePlanAddon operation middleware

func (*ServerInterfaceWrapper) DeleteTaxCode

func (siw *ServerInterfaceWrapper) DeleteTaxCode(w http.ResponseWriter, r *http.Request)

DeleteTaxCode operation middleware

func (*ServerInterfaceWrapper) EditSubscription

func (siw *ServerInterfaceWrapper) EditSubscription(w http.ResponseWriter, r *http.Request)

EditSubscription operation middleware

func (*ServerInterfaceWrapper) ExecuteAppAction

func (siw *ServerInterfaceWrapper) ExecuteAppAction(w http.ResponseWriter, r *http.Request)

ExecuteAppAction operation middleware

func (*ServerInterfaceWrapper) GetAddon

func (siw *ServerInterfaceWrapper) GetAddon(w http.ResponseWriter, r *http.Request)

GetAddon operation middleware

func (*ServerInterfaceWrapper) GetApp

GetApp operation middleware

func (*ServerInterfaceWrapper) GetAppCatalogItem

func (siw *ServerInterfaceWrapper) GetAppCatalogItem(w http.ResponseWriter, r *http.Request)

GetAppCatalogItem operation middleware

func (*ServerInterfaceWrapper) GetBillingProfile

func (siw *ServerInterfaceWrapper) GetBillingProfile(w http.ResponseWriter, r *http.Request)

GetBillingProfile operation middleware

func (*ServerInterfaceWrapper) GetCreditGrant

func (siw *ServerInterfaceWrapper) GetCreditGrant(w http.ResponseWriter, r *http.Request)

GetCreditGrant operation middleware

func (*ServerInterfaceWrapper) GetCustomCurrency

func (siw *ServerInterfaceWrapper) GetCustomCurrency(w http.ResponseWriter, r *http.Request)

GetCustomCurrency operation middleware

func (*ServerInterfaceWrapper) GetCustomer

func (siw *ServerInterfaceWrapper) GetCustomer(w http.ResponseWriter, r *http.Request)

GetCustomer operation middleware

func (*ServerInterfaceWrapper) GetCustomerBilling

func (siw *ServerInterfaceWrapper) GetCustomerBilling(w http.ResponseWriter, r *http.Request)

GetCustomerBilling operation middleware

func (*ServerInterfaceWrapper) GetCustomerCreditBalance

func (siw *ServerInterfaceWrapper) GetCustomerCreditBalance(w http.ResponseWriter, r *http.Request)

GetCustomerCreditBalance operation middleware

func (*ServerInterfaceWrapper) GetCustomerEntitlement

func (siw *ServerInterfaceWrapper) GetCustomerEntitlement(w http.ResponseWriter, r *http.Request)

GetCustomerEntitlement operation middleware

func (*ServerInterfaceWrapper) GetCustomerEntitlementAccess

func (siw *ServerInterfaceWrapper) GetCustomerEntitlementAccess(w http.ResponseWriter, r *http.Request)

GetCustomerEntitlementAccess operation middleware

func (*ServerInterfaceWrapper) GetCustomerEntitlementHistory

func (siw *ServerInterfaceWrapper) GetCustomerEntitlementHistory(w http.ResponseWriter, r *http.Request)

GetCustomerEntitlementHistory operation middleware

func (*ServerInterfaceWrapper) GetCustomerEntitlementValue

func (siw *ServerInterfaceWrapper) GetCustomerEntitlementValue(w http.ResponseWriter, r *http.Request)

GetCustomerEntitlementValue operation middleware

func (*ServerInterfaceWrapper) GetCustomerEntitlementValueByFeatureKey

func (siw *ServerInterfaceWrapper) GetCustomerEntitlementValueByFeatureKey(w http.ResponseWriter, r *http.Request)

GetCustomerEntitlementValueByFeatureKey operation middleware

func (*ServerInterfaceWrapper) GetEntitlement

func (siw *ServerInterfaceWrapper) GetEntitlement(w http.ResponseWriter, r *http.Request)

GetEntitlement operation middleware

func (*ServerInterfaceWrapper) GetFeature

func (siw *ServerInterfaceWrapper) GetFeature(w http.ResponseWriter, r *http.Request)

GetFeature operation middleware

func (*ServerInterfaceWrapper) GetInvoice

func (siw *ServerInterfaceWrapper) GetInvoice(w http.ResponseWriter, r *http.Request)

GetInvoice operation middleware

func (*ServerInterfaceWrapper) GetLlmCostPrice

func (siw *ServerInterfaceWrapper) GetLlmCostPrice(w http.ResponseWriter, r *http.Request)

GetLlmCostPrice operation middleware

func (*ServerInterfaceWrapper) GetMeter

func (siw *ServerInterfaceWrapper) GetMeter(w http.ResponseWriter, r *http.Request)

GetMeter operation middleware

func (*ServerInterfaceWrapper) GetNotificationChannel

func (siw *ServerInterfaceWrapper) GetNotificationChannel(w http.ResponseWriter, r *http.Request)

GetNotificationChannel operation middleware

func (*ServerInterfaceWrapper) GetNotificationEvent

func (siw *ServerInterfaceWrapper) GetNotificationEvent(w http.ResponseWriter, r *http.Request)

GetNotificationEvent operation middleware

func (*ServerInterfaceWrapper) GetNotificationRule

func (siw *ServerInterfaceWrapper) GetNotificationRule(w http.ResponseWriter, r *http.Request)

GetNotificationRule operation middleware

func (*ServerInterfaceWrapper) GetOrganizationDefaultTaxCodes

func (siw *ServerInterfaceWrapper) GetOrganizationDefaultTaxCodes(w http.ResponseWriter, r *http.Request)

GetOrganizationDefaultTaxCodes operation middleware

func (*ServerInterfaceWrapper) GetPlan

GetPlan operation middleware

func (*ServerInterfaceWrapper) GetPlanAddon

func (siw *ServerInterfaceWrapper) GetPlanAddon(w http.ResponseWriter, r *http.Request)

GetPlanAddon operation middleware

func (*ServerInterfaceWrapper) GetSubscription

func (siw *ServerInterfaceWrapper) GetSubscription(w http.ResponseWriter, r *http.Request)

GetSubscription operation middleware

func (*ServerInterfaceWrapper) GetSubscriptionAddon

func (siw *ServerInterfaceWrapper) GetSubscriptionAddon(w http.ResponseWriter, r *http.Request)

GetSubscriptionAddon operation middleware

func (*ServerInterfaceWrapper) GetTaxCode

func (siw *ServerInterfaceWrapper) GetTaxCode(w http.ResponseWriter, r *http.Request)

GetTaxCode operation middleware

func (*ServerInterfaceWrapper) IngestMeteringEvents

func (siw *ServerInterfaceWrapper) IngestMeteringEvents(w http.ResponseWriter, r *http.Request)

IngestMeteringEvents operation middleware

func (*ServerInterfaceWrapper) InstallApp

func (siw *ServerInterfaceWrapper) InstallApp(w http.ResponseWriter, r *http.Request)

InstallApp operation middleware

func (*ServerInterfaceWrapper) ListAddons

func (siw *ServerInterfaceWrapper) ListAddons(w http.ResponseWriter, r *http.Request)

ListAddons operation middleware

func (*ServerInterfaceWrapper) ListAppCatalog

func (siw *ServerInterfaceWrapper) ListAppCatalog(w http.ResponseWriter, r *http.Request)

ListAppCatalog operation middleware

func (*ServerInterfaceWrapper) ListApps

func (siw *ServerInterfaceWrapper) ListApps(w http.ResponseWriter, r *http.Request)

ListApps operation middleware

func (*ServerInterfaceWrapper) ListBillingProfiles

func (siw *ServerInterfaceWrapper) ListBillingProfiles(w http.ResponseWriter, r *http.Request)

ListBillingProfiles operation middleware

func (*ServerInterfaceWrapper) ListCharges

func (siw *ServerInterfaceWrapper) ListCharges(w http.ResponseWriter, r *http.Request)

ListCharges operation middleware

func (*ServerInterfaceWrapper) ListCostBases

func (siw *ServerInterfaceWrapper) ListCostBases(w http.ResponseWriter, r *http.Request)

ListCostBases operation middleware

func (*ServerInterfaceWrapper) ListCreditGrants

func (siw *ServerInterfaceWrapper) ListCreditGrants(w http.ResponseWriter, r *http.Request)

ListCreditGrants operation middleware

func (*ServerInterfaceWrapper) ListCreditTransactions

func (siw *ServerInterfaceWrapper) ListCreditTransactions(w http.ResponseWriter, r *http.Request)

ListCreditTransactions operation middleware

func (*ServerInterfaceWrapper) ListCurrencies

func (siw *ServerInterfaceWrapper) ListCurrencies(w http.ResponseWriter, r *http.Request)

ListCurrencies operation middleware

func (*ServerInterfaceWrapper) ListCustomerCharges

func (siw *ServerInterfaceWrapper) ListCustomerCharges(w http.ResponseWriter, r *http.Request)

ListCustomerCharges operation middleware

func (*ServerInterfaceWrapper) ListCustomerEntitlementAccess

func (siw *ServerInterfaceWrapper) ListCustomerEntitlementAccess(w http.ResponseWriter, r *http.Request)

ListCustomerEntitlementAccess operation middleware

func (*ServerInterfaceWrapper) ListCustomerEntitlementGrants

func (siw *ServerInterfaceWrapper) ListCustomerEntitlementGrants(w http.ResponseWriter, r *http.Request)

ListCustomerEntitlementGrants operation middleware

func (*ServerInterfaceWrapper) ListCustomerEntitlements

func (siw *ServerInterfaceWrapper) ListCustomerEntitlements(w http.ResponseWriter, r *http.Request)

ListCustomerEntitlements operation middleware

func (*ServerInterfaceWrapper) ListCustomers

func (siw *ServerInterfaceWrapper) ListCustomers(w http.ResponseWriter, r *http.Request)

ListCustomers operation middleware

func (*ServerInterfaceWrapper) ListEntitlements

func (siw *ServerInterfaceWrapper) ListEntitlements(w http.ResponseWriter, r *http.Request)

ListEntitlements operation middleware

func (*ServerInterfaceWrapper) ListFeatures

func (siw *ServerInterfaceWrapper) ListFeatures(w http.ResponseWriter, r *http.Request)

ListFeatures operation middleware

func (*ServerInterfaceWrapper) ListGrants

func (siw *ServerInterfaceWrapper) ListGrants(w http.ResponseWriter, r *http.Request)

ListGrants operation middleware

func (*ServerInterfaceWrapper) ListInvoices

func (siw *ServerInterfaceWrapper) ListInvoices(w http.ResponseWriter, r *http.Request)

ListInvoices operation middleware

func (*ServerInterfaceWrapper) ListLlmCostOverrides

func (siw *ServerInterfaceWrapper) ListLlmCostOverrides(w http.ResponseWriter, r *http.Request)

ListLlmCostOverrides operation middleware

func (*ServerInterfaceWrapper) ListLlmCostPrices

func (siw *ServerInterfaceWrapper) ListLlmCostPrices(w http.ResponseWriter, r *http.Request)

ListLlmCostPrices operation middleware

func (*ServerInterfaceWrapper) ListMeteringEvents

func (siw *ServerInterfaceWrapper) ListMeteringEvents(w http.ResponseWriter, r *http.Request)

ListMeteringEvents operation middleware

func (*ServerInterfaceWrapper) ListMeters

func (siw *ServerInterfaceWrapper) ListMeters(w http.ResponseWriter, r *http.Request)

ListMeters operation middleware

func (*ServerInterfaceWrapper) ListNotificationChannels

func (siw *ServerInterfaceWrapper) ListNotificationChannels(w http.ResponseWriter, r *http.Request)

ListNotificationChannels operation middleware

func (*ServerInterfaceWrapper) ListNotificationEvents

func (siw *ServerInterfaceWrapper) ListNotificationEvents(w http.ResponseWriter, r *http.Request)

ListNotificationEvents operation middleware

func (*ServerInterfaceWrapper) ListNotificationRules

func (siw *ServerInterfaceWrapper) ListNotificationRules(w http.ResponseWriter, r *http.Request)

ListNotificationRules operation middleware

func (*ServerInterfaceWrapper) ListPlanAddons

func (siw *ServerInterfaceWrapper) ListPlanAddons(w http.ResponseWriter, r *http.Request)

ListPlanAddons operation middleware

func (*ServerInterfaceWrapper) ListPlans

func (siw *ServerInterfaceWrapper) ListPlans(w http.ResponseWriter, r *http.Request)

ListPlans operation middleware

func (*ServerInterfaceWrapper) ListSubscriptionAddons

func (siw *ServerInterfaceWrapper) ListSubscriptionAddons(w http.ResponseWriter, r *http.Request)

ListSubscriptionAddons operation middleware

func (*ServerInterfaceWrapper) ListSubscriptions

func (siw *ServerInterfaceWrapper) ListSubscriptions(w http.ResponseWriter, r *http.Request)

ListSubscriptions operation middleware

func (*ServerInterfaceWrapper) ListTaxCodes

func (siw *ServerInterfaceWrapper) ListTaxCodes(w http.ResponseWriter, r *http.Request)

ListTaxCodes operation middleware

func (*ServerInterfaceWrapper) MigrateSubscription

func (siw *ServerInterfaceWrapper) MigrateSubscription(w http.ResponseWriter, r *http.Request)

MigrateSubscription operation middleware

func (*ServerInterfaceWrapper) OverrideCustomerEntitlement

func (siw *ServerInterfaceWrapper) OverrideCustomerEntitlement(w http.ResponseWriter, r *http.Request)

OverrideCustomerEntitlement operation middleware

func (*ServerInterfaceWrapper) PublishAddon

func (siw *ServerInterfaceWrapper) PublishAddon(w http.ResponseWriter, r *http.Request)

PublishAddon operation middleware

func (*ServerInterfaceWrapper) PublishPlan

func (siw *ServerInterfaceWrapper) PublishPlan(w http.ResponseWriter, r *http.Request)

PublishPlan operation middleware

func (*ServerInterfaceWrapper) QueryEntitlementAccess

func (siw *ServerInterfaceWrapper) QueryEntitlementAccess(w http.ResponseWriter, r *http.Request)

QueryEntitlementAccess operation middleware

func (*ServerInterfaceWrapper) QueryFeatureCost

func (siw *ServerInterfaceWrapper) QueryFeatureCost(w http.ResponseWriter, r *http.Request)

QueryFeatureCost operation middleware

func (*ServerInterfaceWrapper) QueryMeter

func (siw *ServerInterfaceWrapper) QueryMeter(w http.ResponseWriter, r *http.Request)

QueryMeter operation middleware

func (*ServerInterfaceWrapper) ResendNotificationEvent

func (siw *ServerInterfaceWrapper) ResendNotificationEvent(w http.ResponseWriter, r *http.Request)

ResendNotificationEvent operation middleware

func (*ServerInterfaceWrapper) ResetCustomerEntitlementUsage

func (siw *ServerInterfaceWrapper) ResetCustomerEntitlementUsage(w http.ResponseWriter, r *http.Request)

ResetCustomerEntitlementUsage operation middleware

func (*ServerInterfaceWrapper) RestoreSubscription

func (siw *ServerInterfaceWrapper) RestoreSubscription(w http.ResponseWriter, r *http.Request)

RestoreSubscription operation middleware

func (*ServerInterfaceWrapper) RetryInvoice

func (siw *ServerInterfaceWrapper) RetryInvoice(w http.ResponseWriter, r *http.Request)

RetryInvoice operation middleware

func (*ServerInterfaceWrapper) SnapshotQuantitiesInvoice

func (siw *ServerInterfaceWrapper) SnapshotQuantitiesInvoice(w http.ResponseWriter, r *http.Request)

SnapshotQuantitiesInvoice operation middleware

func (*ServerInterfaceWrapper) TestNotificationRule

func (siw *ServerInterfaceWrapper) TestNotificationRule(w http.ResponseWriter, r *http.Request)

TestNotificationRule operation middleware

func (*ServerInterfaceWrapper) UninstallApp

func (siw *ServerInterfaceWrapper) UninstallApp(w http.ResponseWriter, r *http.Request)

UninstallApp operation middleware

func (*ServerInterfaceWrapper) UnscheduleCancelation

func (siw *ServerInterfaceWrapper) UnscheduleCancelation(w http.ResponseWriter, r *http.Request)

UnscheduleCancelation operation middleware

func (*ServerInterfaceWrapper) UnscheduleSubscription

func (siw *ServerInterfaceWrapper) UnscheduleSubscription(w http.ResponseWriter, r *http.Request)

UnscheduleSubscription operation middleware

func (*ServerInterfaceWrapper) UpdateAddon

func (siw *ServerInterfaceWrapper) UpdateAddon(w http.ResponseWriter, r *http.Request)

UpdateAddon operation middleware

func (*ServerInterfaceWrapper) UpdateApp

func (siw *ServerInterfaceWrapper) UpdateApp(w http.ResponseWriter, r *http.Request)

UpdateApp operation middleware

func (*ServerInterfaceWrapper) UpdateBillingProfile

func (siw *ServerInterfaceWrapper) UpdateBillingProfile(w http.ResponseWriter, r *http.Request)

UpdateBillingProfile operation middleware

func (*ServerInterfaceWrapper) UpdateCreditGrantExternalSettlement

func (siw *ServerInterfaceWrapper) UpdateCreditGrantExternalSettlement(w http.ResponseWriter, r *http.Request)

UpdateCreditGrantExternalSettlement operation middleware

func (*ServerInterfaceWrapper) UpdateCustomerBilling

func (siw *ServerInterfaceWrapper) UpdateCustomerBilling(w http.ResponseWriter, r *http.Request)

UpdateCustomerBilling operation middleware

func (*ServerInterfaceWrapper) UpdateCustomerBillingAppData

func (siw *ServerInterfaceWrapper) UpdateCustomerBillingAppData(w http.ResponseWriter, r *http.Request)

UpdateCustomerBillingAppData operation middleware

func (*ServerInterfaceWrapper) UpdateFeature

func (siw *ServerInterfaceWrapper) UpdateFeature(w http.ResponseWriter, r *http.Request)

UpdateFeature operation middleware

func (*ServerInterfaceWrapper) UpdateInvoice

func (siw *ServerInterfaceWrapper) UpdateInvoice(w http.ResponseWriter, r *http.Request)

UpdateInvoice operation middleware

func (*ServerInterfaceWrapper) UpdateMeter

func (siw *ServerInterfaceWrapper) UpdateMeter(w http.ResponseWriter, r *http.Request)

UpdateMeter operation middleware

func (*ServerInterfaceWrapper) UpdateNotificationChannel

func (siw *ServerInterfaceWrapper) UpdateNotificationChannel(w http.ResponseWriter, r *http.Request)

UpdateNotificationChannel operation middleware

func (*ServerInterfaceWrapper) UpdateNotificationRule

func (siw *ServerInterfaceWrapper) UpdateNotificationRule(w http.ResponseWriter, r *http.Request)

UpdateNotificationRule operation middleware

func (*ServerInterfaceWrapper) UpdateOrganizationDefaultTaxCodes

func (siw *ServerInterfaceWrapper) UpdateOrganizationDefaultTaxCodes(w http.ResponseWriter, r *http.Request)

UpdateOrganizationDefaultTaxCodes operation middleware

func (*ServerInterfaceWrapper) UpdatePlan

func (siw *ServerInterfaceWrapper) UpdatePlan(w http.ResponseWriter, r *http.Request)

UpdatePlan operation middleware

func (*ServerInterfaceWrapper) UpdatePlanAddon

func (siw *ServerInterfaceWrapper) UpdatePlanAddon(w http.ResponseWriter, r *http.Request)

UpdatePlanAddon operation middleware

func (*ServerInterfaceWrapper) UpdateSubscriptionAddon

func (siw *ServerInterfaceWrapper) UpdateSubscriptionAddon(w http.ResponseWriter, r *http.Request)

UpdateSubscriptionAddon operation middleware

func (*ServerInterfaceWrapper) UpsertCustomer

func (siw *ServerInterfaceWrapper) UpsertCustomer(w http.ResponseWriter, r *http.Request)

UpsertCustomer operation middleware

func (*ServerInterfaceWrapper) UpsertTaxCode

func (siw *ServerInterfaceWrapper) UpsertTaxCode(w http.ResponseWriter, r *http.Request)

UpsertTaxCode operation middleware

func (*ServerInterfaceWrapper) VoidCreditGrant

func (siw *ServerInterfaceWrapper) VoidCreditGrant(w http.ResponseWriter, r *http.Request)

VoidCreditGrant operation middleware

func (*ServerInterfaceWrapper) VoidGrant

func (siw *ServerInterfaceWrapper) VoidGrant(w http.ResponseWriter, r *http.Request)

VoidGrant operation middleware

type SortQuery

type SortQuery = string

SortQuery The `asc` suffix is optional as the default sort order is ascending. The `desc` suffix is used to specify a descending order. Multiple sort attributes may be provided via a comma separated list. JSONPath notation may be used to specify a sub-attribute (eg: 'foo.bar desc').

type StringFieldFilter

type StringFieldFilter = filters.FilterString

StringFieldFilter Filters on the given string field value by either exact or fuzzy match. All properties are optional; provide exactly one to specify the comparison.

type StringFieldFilterExact

type StringFieldFilterExact = filters.FilterStringExact

StringFieldFilterExact Filters on the given string field value by exact match. All properties are optional; provide exactly one to specify the comparison.

type SubscriptionAddon

type SubscriptionAddon struct {
	// ActiveFrom An ISO-8601 timestamp representation of the cadence start of the resource.
	ActiveFrom DateTime `json:"active_from"`

	// ActiveTo An ISO-8601 timestamp representation of the cadence end of the resource.
	ActiveTo *DateTime `json:"active_to,omitempty"`

	// Addon The add-on associated with the subscription.
	Addon AddonReference `json:"addon"`

	// CreatedAt An ISO-8601 timestamp representation of entity creation date.
	CreatedAt DateTime `json:"created_at"`

	// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
	DeletedAt *DateTime `json:"deleted_at,omitempty"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`
	Id          ULID    `json:"id"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// Quantity The quantity of the add-on. Always 1 for single instance add-ons.
	Quantity int `json:"quantity"`

	// QuantityAt An ISO-8601 timestamp representation of which point in time the quantity was
	// resolved to.
	QuantityAt DateTime `json:"quantity_at"`

	// RateCards The rate cards of the add-on.
	RateCards []SubscriptionAddonRateCard `json:"rate_cards"`

	// Timeline The timeline of the add-on. The returned periods are sorted and continuous.
	Timeline []SubscriptionAddonTimelineSegment `json:"timeline"`

	// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
	UpdatedAt DateTime `json:"updated_at"`
}

SubscriptionAddon Addon purchased with a subscription.

type SubscriptionAddonPagePaginatedResponse

type SubscriptionAddonPagePaginatedResponse struct {
	Data []SubscriptionAddon `json:"data"`

	// Meta returns the pagination information
	Meta PaginatedMeta `json:"meta"`
}

SubscriptionAddonPagePaginatedResponse Page paginated response.

type SubscriptionAddonRateCard

type SubscriptionAddonRateCard struct {
	// AffectedSubscriptionItemIds The IDs of the subscription items that this rate card belongs to.
	AffectedSubscriptionItemIds []ULID `json:"affected_subscription_item_ids"`

	// RateCard The rate card.
	RateCard BillingRateCard `json:"rate_card"`
}

SubscriptionAddonRateCard A rate card for a subscription add-on.

type SubscriptionAddonTimelineSegment

type SubscriptionAddonTimelineSegment struct {
	// ActiveFrom An ISO-8601 timestamp representation of the cadence start of the resource.
	ActiveFrom DateTime `json:"active_from"`

	// ActiveTo An ISO-8601 timestamp representation of the cadence end of the resource.
	ActiveTo *DateTime `json:"active_to,omitempty"`

	// Quantity The quantity of the add-on for the given period.
	Quantity int `json:"quantity"`
}

SubscriptionAddonTimelineSegment A subscription add-on event.

type SubscriptionOrReference

type SubscriptionOrReference struct {
	// contains filtered or unexported fields
}

SubscriptionOrReference Subscription or reference.

func (SubscriptionOrReference) AsBillingSubscription

func (t SubscriptionOrReference) AsBillingSubscription() (BillingSubscription, error)

AsBillingSubscription returns the union data inside the SubscriptionOrReference as a BillingSubscription

func (SubscriptionOrReference) AsBillingSubscriptionReference

func (t SubscriptionOrReference) AsBillingSubscriptionReference() (BillingSubscriptionReference, error)

AsBillingSubscriptionReference returns the union data inside the SubscriptionOrReference as a BillingSubscriptionReference

func (*SubscriptionOrReference) FromBillingSubscription

func (t *SubscriptionOrReference) FromBillingSubscription(v BillingSubscription) error

FromBillingSubscription overwrites any union data inside the SubscriptionOrReference as the provided BillingSubscription

func (*SubscriptionOrReference) FromBillingSubscriptionReference

func (t *SubscriptionOrReference) FromBillingSubscriptionReference(v BillingSubscriptionReference) error

FromBillingSubscriptionReference overwrites any union data inside the SubscriptionOrReference as the provided BillingSubscriptionReference

func (SubscriptionOrReference) MarshalJSON

func (t SubscriptionOrReference) MarshalJSON() ([]byte, error)

func (*SubscriptionOrReference) MergeBillingSubscription

func (t *SubscriptionOrReference) MergeBillingSubscription(v BillingSubscription) error

MergeBillingSubscription performs a merge with any union data inside the SubscriptionOrReference, using the provided BillingSubscription

func (*SubscriptionOrReference) MergeBillingSubscriptionReference

func (t *SubscriptionOrReference) MergeBillingSubscriptionReference(v BillingSubscriptionReference) error

MergeBillingSubscriptionReference performs a merge with any union data inside the SubscriptionOrReference, using the provided BillingSubscriptionReference

func (*SubscriptionOrReference) UnmarshalJSON

func (t *SubscriptionOrReference) UnmarshalJSON(b []byte) error

type SubscriptionPagePaginatedResponse

type SubscriptionPagePaginatedResponse struct {
	Data []BillingSubscription `json:"data"`

	// Meta returns the pagination information
	Meta PaginatedMeta `json:"meta"`
}

SubscriptionPagePaginatedResponse Page paginated response.

type TaxCodeConfig

type TaxCodeConfig struct {
	// Behavior Tax behavior.
	//
	// This enum is used to specify whether tax is included in the price or excluded
	// from the price. If not specified, the billing profile is used to determine the
	// tax behavior. If not specified in the billing profile, the provider's default
	// behavior is used.
	Behavior *BillingTaxBehavior `json:"behavior,omitempty"`

	// Code Tax code applied to the invoice line item.
	Code *TaxCodeReference `json:"code,omitempty"`
}

TaxCodeConfig Tax configuration for a billable resource.

Applies a tax code and tax behavior to the resulting invoice line items. When not set, the applicable default is used: the billing profile default tax configuration, then the organization default tax code.

type TaxCodePagePaginatedResponse

type TaxCodePagePaginatedResponse struct {
	Data []BillingTaxCode `json:"data"`

	// Meta returns the pagination information
	Meta PaginatedMeta `json:"meta"`
}

TaxCodePagePaginatedResponse Page paginated response.

type TaxCodeReference

type TaxCodeReference struct {
	// Id ULID (Universally Unique Lexicographically Sortable Identifier).
	Id ULID `json:"id"`
}

TaxCodeReference TaxCode reference.

type TooManyValuesForParamError

type TooManyValuesForParamError struct {
	ParamName string
	Count     int
}

func (*TooManyValuesForParamError) Error

type ULID

type ULID = string

ULID ULID (Universally Unique Lexicographically Sortable Identifier).

type ULIDFieldFilter

type ULIDFieldFilter = filters.FilterULID

ULIDFieldFilter Filters on the given ULID field value by exact match. All properties are optional; provide exactly one to specify the comparison.

type Unauthorized

type Unauthorized = UnauthorizedError

Unauthorized defines model for Unauthorized.

type UnauthorizedError

type UnauthorizedError struct {
	Detail   interface{} `json:"detail"`
	Instance interface{} `json:"instance"`
	Status   interface{} `json:"status"`
	Title    interface{} `json:"title"`
	Type     interface{} `json:"type,omitempty"`
}

UnauthorizedError defines model for UnauthorizedError.

type UnescapedCookieParamError

type UnescapedCookieParamError struct {
	ParamName string
	Err       error
}

func (*UnescapedCookieParamError) Error

func (e *UnescapedCookieParamError) Error() string

func (*UnescapedCookieParamError) Unwrap

func (e *UnescapedCookieParamError) Unwrap() error

type Unimplemented

type Unimplemented struct{}

func (Unimplemented) AdvanceInvoice

func (_ Unimplemented) AdvanceInvoice(w http.ResponseWriter, r *http.Request, invoiceId ULID)

Advance billing invoice's next status (POST /openmeter/billing/invoices/{invoiceId}/advance)

func (Unimplemented) ApproveInvoice

func (_ Unimplemented) ApproveInvoice(w http.ResponseWriter, r *http.Request, invoiceId ULID)

Send the invoice to the customer (POST /openmeter/billing/invoices/{invoiceId}/approve)

func (Unimplemented) ArchiveAddon

func (_ Unimplemented) ArchiveAddon(w http.ResponseWriter, r *http.Request, addonId ULID)

Archive add-on version (POST /openmeter/addons/{addonId}/archive)

func (Unimplemented) ArchivePlan

func (_ Unimplemented) ArchivePlan(w http.ResponseWriter, r *http.Request, planId ULID)

Archive plan version (POST /openmeter/plans/{planId}/archive)

func (Unimplemented) CancelSubscription

func (_ Unimplemented) CancelSubscription(w http.ResponseWriter, r *http.Request, subscriptionId ULID)

Cancel subscription (POST /openmeter/subscriptions/{subscriptionId}/cancel)

func (Unimplemented) ChangeSubscription

func (_ Unimplemented) ChangeSubscription(w http.ResponseWriter, r *http.Request, subscriptionId ULID)

Change subscription (POST /openmeter/subscriptions/{subscriptionId}/change)

func (Unimplemented) CreateAddon

func (_ Unimplemented) CreateAddon(w http.ResponseWriter, r *http.Request)

Create add-on (POST /openmeter/addons)

func (Unimplemented) CreateBillingProfile

func (_ Unimplemented) CreateBillingProfile(w http.ResponseWriter, r *http.Request)

Create a new billing profile (POST /openmeter/profiles)

func (Unimplemented) CreateCostBasis

func (_ Unimplemented) CreateCostBasis(w http.ResponseWriter, r *http.Request, currencyId ULID)

Create cost basis (POST /openmeter/currencies/custom/{currencyId}/cost-bases)

func (Unimplemented) CreateCreditAdjustment

func (_ Unimplemented) CreateCreditAdjustment(w http.ResponseWriter, r *http.Request, customerId ULID)

Create a credit adjustment (POST /openmeter/customers/{customerId}/credits/adjustments)

func (Unimplemented) CreateCreditGrant

func (_ Unimplemented) CreateCreditGrant(w http.ResponseWriter, r *http.Request, customerId ULID)

Create a new credit grant (POST /openmeter/customers/{customerId}/credits/grants)

func (Unimplemented) CreateCustomCurrency

func (_ Unimplemented) CreateCustomCurrency(w http.ResponseWriter, r *http.Request)

Create custom currency (POST /openmeter/currencies/custom)

func (Unimplemented) CreateCustomer

func (_ Unimplemented) CreateCustomer(w http.ResponseWriter, r *http.Request)

Create customer (POST /openmeter/customers)

func (Unimplemented) CreateCustomerCharges

func (_ Unimplemented) CreateCustomerCharges(w http.ResponseWriter, r *http.Request, customerId ULID)

Create customer charge (POST /openmeter/customers/{customerId}/charges)

func (Unimplemented) CreateCustomerEntitlement

func (_ Unimplemented) CreateCustomerEntitlement(w http.ResponseWriter, r *http.Request, customerId ULID)

Create customer entitlement (POST /openmeter/customers/{customerId}/entitlements)

func (Unimplemented) CreateCustomerEntitlementGrant

func (_ Unimplemented) CreateCustomerEntitlementGrant(w http.ResponseWriter, r *http.Request, customerId ULID, entitlementId ULID)

Create customer entitlement grant (POST /openmeter/customers/{customerId}/entitlements/{entitlementId}/grants)

func (Unimplemented) CreateCustomerStripeCheckoutSession

func (_ Unimplemented) CreateCustomerStripeCheckoutSession(w http.ResponseWriter, r *http.Request, customerId ULID)

Create Stripe Checkout Session (POST /openmeter/customers/{customerId}/billing/stripe/checkout-sessions)

func (Unimplemented) CreateCustomerStripePortalSession

func (_ Unimplemented) CreateCustomerStripePortalSession(w http.ResponseWriter, r *http.Request, customerId ULID)

Create Stripe customer portal session (POST /openmeter/customers/{customerId}/billing/stripe/portal-sessions)

func (Unimplemented) CreateFeature

func (_ Unimplemented) CreateFeature(w http.ResponseWriter, r *http.Request)

Create feature (POST /openmeter/features)

func (Unimplemented) CreateLlmCostOverride

func (_ Unimplemented) CreateLlmCostOverride(w http.ResponseWriter, r *http.Request)

Create LLM cost override (POST /openmeter/llm-cost/overrides)

func (Unimplemented) CreateMeter

func (_ Unimplemented) CreateMeter(w http.ResponseWriter, r *http.Request)

Create meter (POST /openmeter/meters)

func (Unimplemented) CreateNotificationChannel

func (_ Unimplemented) CreateNotificationChannel(w http.ResponseWriter, r *http.Request)

Create notification channel (POST /openmeter/notification/channels)

func (Unimplemented) CreateNotificationRule

func (_ Unimplemented) CreateNotificationRule(w http.ResponseWriter, r *http.Request)

Create notification rule (POST /openmeter/notification/rules)

func (Unimplemented) CreatePlan

func (_ Unimplemented) CreatePlan(w http.ResponseWriter, r *http.Request)

Create plan (POST /openmeter/plans)

func (Unimplemented) CreatePlanAddon

func (_ Unimplemented) CreatePlanAddon(w http.ResponseWriter, r *http.Request, planId ULID)

Add add-on to plan (POST /openmeter/plans/{planId}/addons)

func (Unimplemented) CreateSubscription

func (_ Unimplemented) CreateSubscription(w http.ResponseWriter, r *http.Request)

Create subscription (POST /openmeter/subscriptions)

func (Unimplemented) CreateSubscriptionAddon

func (_ Unimplemented) CreateSubscriptionAddon(w http.ResponseWriter, r *http.Request, subscriptionId ULID)

Create a new subscription add-on (POST /openmeter/subscriptions/{subscriptionId}/addons)

func (Unimplemented) CreateTaxCode

func (_ Unimplemented) CreateTaxCode(w http.ResponseWriter, r *http.Request)

Create tax code (POST /openmeter/tax-codes)

func (Unimplemented) DeleteAddon

func (_ Unimplemented) DeleteAddon(w http.ResponseWriter, r *http.Request, addonId ULID)

Soft delete add-on (DELETE /openmeter/addons/{addonId})

func (Unimplemented) DeleteBillingProfile

func (_ Unimplemented) DeleteBillingProfile(w http.ResponseWriter, r *http.Request, id ULID)

Delete a billing profile (DELETE /openmeter/profiles/{id})

func (Unimplemented) DeleteCustomer

func (_ Unimplemented) DeleteCustomer(w http.ResponseWriter, r *http.Request, customerId ULID)

Delete customer (DELETE /openmeter/customers/{customerId})

func (Unimplemented) DeleteCustomerEntitlement

func (_ Unimplemented) DeleteCustomerEntitlement(w http.ResponseWriter, r *http.Request, customerId ULID, entitlementId ULID)

Delete customer entitlement (DELETE /openmeter/customers/{customerId}/entitlements/{entitlementId})

func (Unimplemented) DeleteFeature

func (_ Unimplemented) DeleteFeature(w http.ResponseWriter, r *http.Request, featureId ULID)

Delete feature (DELETE /openmeter/features/{featureId})

func (Unimplemented) DeleteInvoice

func (_ Unimplemented) DeleteInvoice(w http.ResponseWriter, r *http.Request, invoiceId ULID)

Delete a billing invoice (DELETE /openmeter/billing/invoices/{invoiceId})

func (Unimplemented) DeleteLlmCostOverride

func (_ Unimplemented) DeleteLlmCostOverride(w http.ResponseWriter, r *http.Request, priceId ULID)

Delete LLM cost override (DELETE /openmeter/llm-cost/overrides/{priceId})

func (Unimplemented) DeleteMeter

func (_ Unimplemented) DeleteMeter(w http.ResponseWriter, r *http.Request, meterId ULID)

Delete meter (DELETE /openmeter/meters/{meterId})

func (Unimplemented) DeleteNotificationChannel

func (_ Unimplemented) DeleteNotificationChannel(w http.ResponseWriter, r *http.Request, notificationChannelId ULID)

Delete notification channel (DELETE /openmeter/notification/channels/{notificationChannelId})

func (Unimplemented) DeleteNotificationRule

func (_ Unimplemented) DeleteNotificationRule(w http.ResponseWriter, r *http.Request, notificationRuleId ULID)

Delete notification rule (DELETE /openmeter/notification/rules/{notificationRuleId})

func (Unimplemented) DeletePlan

func (_ Unimplemented) DeletePlan(w http.ResponseWriter, r *http.Request, planId ULID)

Delete plan (DELETE /openmeter/plans/{planId})

func (Unimplemented) DeletePlanAddon

func (_ Unimplemented) DeletePlanAddon(w http.ResponseWriter, r *http.Request, planId ULID, planAddonId ULID)

Remove add-on from plan (DELETE /openmeter/plans/{planId}/addons/{planAddonId})

func (Unimplemented) DeleteTaxCode

func (_ Unimplemented) DeleteTaxCode(w http.ResponseWriter, r *http.Request, taxCodeId ULID)

Delete tax code (DELETE /openmeter/tax-codes/{taxCodeId})

func (Unimplemented) EditSubscription

func (_ Unimplemented) EditSubscription(w http.ResponseWriter, r *http.Request, subscriptionId ULID)

Edit subscription (POST /openmeter/subscriptions/{subscriptionId}/edit)

func (Unimplemented) ExecuteAppAction

func (_ Unimplemented) ExecuteAppAction(w http.ResponseWriter, r *http.Request, appId ULID)

Execute app action (POST /openmeter/apps/{appId}/action)

func (Unimplemented) GetAddon

func (_ Unimplemented) GetAddon(w http.ResponseWriter, r *http.Request, addonId ULID)

Get add-on (GET /openmeter/addons/{addonId})

func (Unimplemented) GetApp

func (_ Unimplemented) GetApp(w http.ResponseWriter, r *http.Request, appId ULID)

Get app (GET /openmeter/apps/{appId})

func (Unimplemented) GetAppCatalogItem

func (_ Unimplemented) GetAppCatalogItem(w http.ResponseWriter, r *http.Request, appType BillingAppType)

Get app catalog item by type (GET /openmeter/app-catalog/{appType})

func (Unimplemented) GetBillingProfile

func (_ Unimplemented) GetBillingProfile(w http.ResponseWriter, r *http.Request, id ULID)

Get a billing profile (GET /openmeter/profiles/{id})

func (Unimplemented) GetCreditGrant

func (_ Unimplemented) GetCreditGrant(w http.ResponseWriter, r *http.Request, customerId ULID, creditGrantId ULID)

Get a credit grant (GET /openmeter/customers/{customerId}/credits/grants/{creditGrantId})

func (Unimplemented) GetCustomCurrency

func (_ Unimplemented) GetCustomCurrency(w http.ResponseWriter, r *http.Request, currencyId ULID)

Get custom currency (GET /openmeter/currencies/custom/{currencyId})

func (Unimplemented) GetCustomer

func (_ Unimplemented) GetCustomer(w http.ResponseWriter, r *http.Request, customerId ULID)

Get customer (GET /openmeter/customers/{customerId})

func (Unimplemented) GetCustomerBilling

func (_ Unimplemented) GetCustomerBilling(w http.ResponseWriter, r *http.Request, customerId ULID)

Get customer billing data (GET /openmeter/customers/{customerId}/billing)

func (Unimplemented) GetCustomerCreditBalance

func (_ Unimplemented) GetCustomerCreditBalance(w http.ResponseWriter, r *http.Request, customerId ULID, params GetCustomerCreditBalanceParams)

Get a customer's credit balance (GET /openmeter/customers/{customerId}/credits/balance)

func (Unimplemented) GetCustomerEntitlement

func (_ Unimplemented) GetCustomerEntitlement(w http.ResponseWriter, r *http.Request, customerId ULID, entitlementId ULID)

Get customer entitlement (GET /openmeter/customers/{customerId}/entitlements/{entitlementId})

func (Unimplemented) GetCustomerEntitlementAccess

func (_ Unimplemented) GetCustomerEntitlementAccess(w http.ResponseWriter, r *http.Request, customerId ULID, featureKey ResourceKey)

Get customer entitlement access (GET /openmeter/customers/{customerId}/entitlement-access/features/{featureKey})

func (Unimplemented) GetCustomerEntitlementHistory

func (_ Unimplemented) GetCustomerEntitlementHistory(w http.ResponseWriter, r *http.Request, customerId ULID, entitlementId ULID, params GetCustomerEntitlementHistoryParams)

Get customer entitlement history (GET /openmeter/customers/{customerId}/entitlements/{entitlementId}/history)

func (Unimplemented) GetCustomerEntitlementValue

func (_ Unimplemented) GetCustomerEntitlementValue(w http.ResponseWriter, r *http.Request, customerId ULID, entitlementId ULID, params GetCustomerEntitlementValueParams)

Get customer entitlement value (GET /openmeter/customers/{customerId}/entitlements/{entitlementId}/value)

func (Unimplemented) GetCustomerEntitlementValueByFeatureKey

func (_ Unimplemented) GetCustomerEntitlementValueByFeatureKey(w http.ResponseWriter, r *http.Request, customerId ULID, featureKey ResourceKey, params GetCustomerEntitlementValueByFeatureKeyParams)

Get customer entitlement value by feature key (GET /openmeter/customers/{customerId}/entitlement-access/features/{featureKey}/value)

func (Unimplemented) GetEntitlement

func (_ Unimplemented) GetEntitlement(w http.ResponseWriter, r *http.Request, entitlementId ULID)

Get entitlement (GET /openmeter/entitlements/{entitlementId})

func (Unimplemented) GetFeature

func (_ Unimplemented) GetFeature(w http.ResponseWriter, r *http.Request, featureId ULID)

Get feature (GET /openmeter/features/{featureId})

func (Unimplemented) GetInvoice

func (_ Unimplemented) GetInvoice(w http.ResponseWriter, r *http.Request, invoiceId ULID)

Get a billing invoice (GET /openmeter/billing/invoices/{invoiceId})

func (Unimplemented) GetLlmCostPrice

func (_ Unimplemented) GetLlmCostPrice(w http.ResponseWriter, r *http.Request, priceId ULID)

Get LLM cost price (GET /openmeter/llm-cost/prices/{priceId})

func (Unimplemented) GetMeter

func (_ Unimplemented) GetMeter(w http.ResponseWriter, r *http.Request, meterId ULID)

Get meter (GET /openmeter/meters/{meterId})

func (Unimplemented) GetNotificationChannel

func (_ Unimplemented) GetNotificationChannel(w http.ResponseWriter, r *http.Request, notificationChannelId ULID)

Get notification channel (GET /openmeter/notification/channels/{notificationChannelId})

func (Unimplemented) GetNotificationEvent

func (_ Unimplemented) GetNotificationEvent(w http.ResponseWriter, r *http.Request, notificationEventId ULID)

Get notification event (GET /openmeter/notification/events/{notificationEventId})

func (Unimplemented) GetNotificationRule

func (_ Unimplemented) GetNotificationRule(w http.ResponseWriter, r *http.Request, notificationRuleId ULID)

Get notification rule (GET /openmeter/notification/rules/{notificationRuleId})

func (Unimplemented) GetOrganizationDefaultTaxCodes

func (_ Unimplemented) GetOrganizationDefaultTaxCodes(w http.ResponseWriter, r *http.Request)

Get organization default tax codes (GET /openmeter/defaults/tax-codes)

func (Unimplemented) GetPlan

func (_ Unimplemented) GetPlan(w http.ResponseWriter, r *http.Request, planId ULID)

Get plan (GET /openmeter/plans/{planId})

func (Unimplemented) GetPlanAddon

func (_ Unimplemented) GetPlanAddon(w http.ResponseWriter, r *http.Request, planId ULID, planAddonId ULID)

Get add-on association for plan (GET /openmeter/plans/{planId}/addons/{planAddonId})

func (Unimplemented) GetSubscription

func (_ Unimplemented) GetSubscription(w http.ResponseWriter, r *http.Request, subscriptionId ULID)

Get subscription (GET /openmeter/subscriptions/{subscriptionId})

func (Unimplemented) GetSubscriptionAddon

func (_ Unimplemented) GetSubscriptionAddon(w http.ResponseWriter, r *http.Request, subscriptionId ULID, subscriptionAddonId ULID)

Get add-on association for subscription (GET /openmeter/subscriptions/{subscriptionId}/addons/{subscriptionAddonId})

func (Unimplemented) GetTaxCode

func (_ Unimplemented) GetTaxCode(w http.ResponseWriter, r *http.Request, taxCodeId ULID)

Get tax code (GET /openmeter/tax-codes/{taxCodeId})

func (Unimplemented) IngestMeteringEvents

func (_ Unimplemented) IngestMeteringEvents(w http.ResponseWriter, r *http.Request)

Ingest metering events (POST /openmeter/events)

func (Unimplemented) InstallApp

func (_ Unimplemented) InstallApp(w http.ResponseWriter, r *http.Request)

Install app from the catalog (POST /openmeter/app-catalog/install)

func (Unimplemented) ListAddons

func (_ Unimplemented) ListAddons(w http.ResponseWriter, r *http.Request, params ListAddonsParams)

List add-ons (GET /openmeter/addons)

func (Unimplemented) ListAppCatalog

func (_ Unimplemented) ListAppCatalog(w http.ResponseWriter, r *http.Request, params ListAppCatalogParams)

List app catalog (GET /openmeter/app-catalog)

func (Unimplemented) ListApps

func (_ Unimplemented) ListApps(w http.ResponseWriter, r *http.Request, params ListAppsParams)

List apps (GET /openmeter/apps)

func (Unimplemented) ListBillingProfiles

func (_ Unimplemented) ListBillingProfiles(w http.ResponseWriter, r *http.Request, params ListBillingProfilesParams)

List billing profiles (GET /openmeter/profiles)

func (Unimplemented) ListCharges

func (_ Unimplemented) ListCharges(w http.ResponseWriter, r *http.Request, params ListChargesParams)

List charges (GET /openmeter/charges)

func (Unimplemented) ListCostBases

func (_ Unimplemented) ListCostBases(w http.ResponseWriter, r *http.Request, currencyId ULID, params ListCostBasesParams)

List cost bases (GET /openmeter/currencies/custom/{currencyId}/cost-bases)

func (Unimplemented) ListCreditGrants

func (_ Unimplemented) ListCreditGrants(w http.ResponseWriter, r *http.Request, customerId ULID, params ListCreditGrantsParams)

List credit grants (GET /openmeter/customers/{customerId}/credits/grants)

func (Unimplemented) ListCreditTransactions

func (_ Unimplemented) ListCreditTransactions(w http.ResponseWriter, r *http.Request, customerId ULID, params ListCreditTransactionsParams)

List credit transactions (GET /openmeter/customers/{customerId}/credits/transactions)

func (Unimplemented) ListCurrencies

func (_ Unimplemented) ListCurrencies(w http.ResponseWriter, r *http.Request, params ListCurrenciesParams)

List currencies (GET /openmeter/currencies)

func (Unimplemented) ListCustomerCharges

func (_ Unimplemented) ListCustomerCharges(w http.ResponseWriter, r *http.Request, customerId ULID, params ListCustomerChargesParams)

List customer charges (GET /openmeter/customers/{customerId}/charges)

func (Unimplemented) ListCustomerEntitlementAccess

func (_ Unimplemented) ListCustomerEntitlementAccess(w http.ResponseWriter, r *http.Request, customerId ULID)

List customer entitlement access (GET /openmeter/customers/{customerId}/entitlement-access)

func (Unimplemented) ListCustomerEntitlementGrants

func (_ Unimplemented) ListCustomerEntitlementGrants(w http.ResponseWriter, r *http.Request, customerId ULID, entitlementId ULID, params ListCustomerEntitlementGrantsParams)

List customer entitlement grants (GET /openmeter/customers/{customerId}/entitlements/{entitlementId}/grants)

func (Unimplemented) ListCustomerEntitlements

func (_ Unimplemented) ListCustomerEntitlements(w http.ResponseWriter, r *http.Request, customerId ULID, params ListCustomerEntitlementsParams)

List customer entitlements (GET /openmeter/customers/{customerId}/entitlements)

func (Unimplemented) ListCustomers

func (_ Unimplemented) ListCustomers(w http.ResponseWriter, r *http.Request, params ListCustomersParams)

List customers (GET /openmeter/customers)

func (Unimplemented) ListEntitlements

func (_ Unimplemented) ListEntitlements(w http.ResponseWriter, r *http.Request, params ListEntitlementsParams)

List entitlements (GET /openmeter/entitlements)

func (Unimplemented) ListFeatures

func (_ Unimplemented) ListFeatures(w http.ResponseWriter, r *http.Request, params ListFeaturesParams)

List features (GET /openmeter/features)

func (Unimplemented) ListGrants

func (_ Unimplemented) ListGrants(w http.ResponseWriter, r *http.Request, params ListGrantsParams)

List grants (GET /openmeter/grants)

func (Unimplemented) ListInvoices

func (_ Unimplemented) ListInvoices(w http.ResponseWriter, r *http.Request, params ListInvoicesParams)

List billing invoices (GET /openmeter/billing/invoices)

func (Unimplemented) ListLlmCostOverrides

func (_ Unimplemented) ListLlmCostOverrides(w http.ResponseWriter, r *http.Request, params ListLlmCostOverridesParams)

List LLM cost overrides (GET /openmeter/llm-cost/overrides)

func (Unimplemented) ListLlmCostPrices

func (_ Unimplemented) ListLlmCostPrices(w http.ResponseWriter, r *http.Request, params ListLlmCostPricesParams)

List LLM cost prices (GET /openmeter/llm-cost/prices)

func (Unimplemented) ListMeteringEvents

func (_ Unimplemented) ListMeteringEvents(w http.ResponseWriter, r *http.Request, params ListMeteringEventsParams)

List metering events (GET /openmeter/events)

func (Unimplemented) ListMeters

func (_ Unimplemented) ListMeters(w http.ResponseWriter, r *http.Request, params ListMetersParams)

List meters (GET /openmeter/meters)

func (Unimplemented) ListNotificationChannels

func (_ Unimplemented) ListNotificationChannels(w http.ResponseWriter, r *http.Request, params ListNotificationChannelsParams)

List notification channels (GET /openmeter/notification/channels)

func (Unimplemented) ListNotificationEvents

func (_ Unimplemented) ListNotificationEvents(w http.ResponseWriter, r *http.Request, params ListNotificationEventsParams)

List notification events (GET /openmeter/notification/events)

func (Unimplemented) ListNotificationRules

func (_ Unimplemented) ListNotificationRules(w http.ResponseWriter, r *http.Request, params ListNotificationRulesParams)

List notification rules (GET /openmeter/notification/rules)

func (Unimplemented) ListPlanAddons

func (_ Unimplemented) ListPlanAddons(w http.ResponseWriter, r *http.Request, planId ULID, params ListPlanAddonsParams)

List add-ons for plan (GET /openmeter/plans/{planId}/addons)

func (Unimplemented) ListPlans

func (_ Unimplemented) ListPlans(w http.ResponseWriter, r *http.Request, params ListPlansParams)

List plans (GET /openmeter/plans)

func (Unimplemented) ListSubscriptionAddons

func (_ Unimplemented) ListSubscriptionAddons(w http.ResponseWriter, r *http.Request, subscriptionId ULID, params ListSubscriptionAddonsParams)

List subscription addons (GET /openmeter/subscriptions/{subscriptionId}/addons)

func (Unimplemented) ListSubscriptions

func (_ Unimplemented) ListSubscriptions(w http.ResponseWriter, r *http.Request, params ListSubscriptionsParams)

List subscriptions (GET /openmeter/subscriptions)

func (Unimplemented) ListTaxCodes

func (_ Unimplemented) ListTaxCodes(w http.ResponseWriter, r *http.Request, params ListTaxCodesParams)

List tax codes (GET /openmeter/tax-codes)

func (Unimplemented) MigrateSubscription

func (_ Unimplemented) MigrateSubscription(w http.ResponseWriter, r *http.Request, subscriptionId ULID)

Migrate subscription (POST /openmeter/subscriptions/{subscriptionId}/migrate)

func (Unimplemented) OverrideCustomerEntitlement

func (_ Unimplemented) OverrideCustomerEntitlement(w http.ResponseWriter, r *http.Request, customerId ULID, entitlementId ULID)

Override customer entitlement (PUT /openmeter/customers/{customerId}/entitlements/{entitlementId}/override)

func (Unimplemented) PublishAddon

func (_ Unimplemented) PublishAddon(w http.ResponseWriter, r *http.Request, addonId ULID)

Publish add-on version (POST /openmeter/addons/{addonId}/publish)

func (Unimplemented) PublishPlan

func (_ Unimplemented) PublishPlan(w http.ResponseWriter, r *http.Request, planId ULID)

Publish plan version (POST /openmeter/plans/{planId}/publish)

func (Unimplemented) QueryEntitlementAccess

func (_ Unimplemented) QueryEntitlementAccess(w http.ResponseWriter, r *http.Request, params QueryEntitlementAccessParams)

Query entitlement access (POST /openmeter/entitlement-access/query)

func (Unimplemented) QueryFeatureCost

func (_ Unimplemented) QueryFeatureCost(w http.ResponseWriter, r *http.Request, featureId ULID)

Query feature cost (POST /openmeter/features/{featureId}/cost/query)

func (Unimplemented) QueryMeter

func (_ Unimplemented) QueryMeter(w http.ResponseWriter, r *http.Request, meterId ULID)

Query meter (POST /openmeter/meters/{meterId}/query)

func (Unimplemented) ResendNotificationEvent

func (_ Unimplemented) ResendNotificationEvent(w http.ResponseWriter, r *http.Request, notificationEventId ULID)

Resend notification event (POST /openmeter/notification/events/{notificationEventId}/resend)

func (Unimplemented) ResetCustomerEntitlementUsage

func (_ Unimplemented) ResetCustomerEntitlementUsage(w http.ResponseWriter, r *http.Request, customerId ULID, entitlementId ULID)

Reset customer entitlement usage (POST /openmeter/customers/{customerId}/entitlements/{entitlementId}/reset)

func (Unimplemented) RestoreSubscription

func (_ Unimplemented) RestoreSubscription(w http.ResponseWriter, r *http.Request, subscriptionId ULID)

Restore subscription (POST /openmeter/subscriptions/{subscriptionId}/restore)

func (Unimplemented) RetryInvoice

func (_ Unimplemented) RetryInvoice(w http.ResponseWriter, r *http.Request, invoiceId ULID)

Retry advancing the invoice after a failed attempt (POST /openmeter/billing/invoices/{invoiceId}/retry)

func (Unimplemented) SnapshotQuantitiesInvoice

func (_ Unimplemented) SnapshotQuantitiesInvoice(w http.ResponseWriter, r *http.Request, invoiceId ULID)

Snapshot quantities for usage based line items (POST /openmeter/billing/invoices/{invoiceId}/snapshot-quantities)

func (Unimplemented) TestNotificationRule

func (_ Unimplemented) TestNotificationRule(w http.ResponseWriter, r *http.Request, notificationRuleId ULID)

Test notification rule (POST /openmeter/notification/rules/{notificationRuleId}/test)

func (Unimplemented) UninstallApp

func (_ Unimplemented) UninstallApp(w http.ResponseWriter, r *http.Request, appId ULID)

Uninstall app (DELETE /openmeter/apps/{appId})

func (Unimplemented) UnscheduleCancelation

func (_ Unimplemented) UnscheduleCancelation(w http.ResponseWriter, r *http.Request, subscriptionId ULID)

Unschedule subscription cancelation (POST /openmeter/subscriptions/{subscriptionId}/unschedule-cancelation)

func (Unimplemented) UnscheduleSubscription

func (_ Unimplemented) UnscheduleSubscription(w http.ResponseWriter, r *http.Request, subscriptionId ULID)

Unschedule subscription (POST /openmeter/subscriptions/{subscriptionId}/unschedule)

func (Unimplemented) UpdateAddon

func (_ Unimplemented) UpdateAddon(w http.ResponseWriter, r *http.Request, addonId ULID)

Update add-on (PUT /openmeter/addons/{addonId})

func (Unimplemented) UpdateApp

func (_ Unimplemented) UpdateApp(w http.ResponseWriter, r *http.Request, appId ULID)

Update app (PUT /openmeter/apps/{appId})

func (Unimplemented) UpdateBillingProfile

func (_ Unimplemented) UpdateBillingProfile(w http.ResponseWriter, r *http.Request, id ULID)

Update a billing profile (PUT /openmeter/profiles/{id})

func (Unimplemented) UpdateCreditGrantExternalSettlement

func (_ Unimplemented) UpdateCreditGrantExternalSettlement(w http.ResponseWriter, r *http.Request, customerId ULID, creditGrantId ULID)

Update credit grant external settlement status (POST /openmeter/customers/{customerId}/credits/grants/{creditGrantId}/settlement/external)

func (Unimplemented) UpdateCustomerBilling

func (_ Unimplemented) UpdateCustomerBilling(w http.ResponseWriter, r *http.Request, customerId ULID)

Update customer billing data (PUT /openmeter/customers/{customerId}/billing)

func (Unimplemented) UpdateCustomerBillingAppData

func (_ Unimplemented) UpdateCustomerBillingAppData(w http.ResponseWriter, r *http.Request, customerId ULID)

Update customer billing app data (PUT /openmeter/customers/{customerId}/billing/app-data)

func (Unimplemented) UpdateFeature

func (_ Unimplemented) UpdateFeature(w http.ResponseWriter, r *http.Request, featureId ULID)

Update feature (PATCH /openmeter/features/{featureId})

func (Unimplemented) UpdateInvoice

func (_ Unimplemented) UpdateInvoice(w http.ResponseWriter, r *http.Request, invoiceId ULID)

Update a billing invoice (PUT /openmeter/billing/invoices/{invoiceId})

func (Unimplemented) UpdateMeter

func (_ Unimplemented) UpdateMeter(w http.ResponseWriter, r *http.Request, meterId ULID)

Update meter (PUT /openmeter/meters/{meterId})

func (Unimplemented) UpdateNotificationChannel

func (_ Unimplemented) UpdateNotificationChannel(w http.ResponseWriter, r *http.Request, notificationChannelId ULID)

Update notification channel (PUT /openmeter/notification/channels/{notificationChannelId})

func (Unimplemented) UpdateNotificationRule

func (_ Unimplemented) UpdateNotificationRule(w http.ResponseWriter, r *http.Request, notificationRuleId ULID)

Update notification rule (PUT /openmeter/notification/rules/{notificationRuleId})

func (Unimplemented) UpdateOrganizationDefaultTaxCodes

func (_ Unimplemented) UpdateOrganizationDefaultTaxCodes(w http.ResponseWriter, r *http.Request)

Update organization default tax codes (PUT /openmeter/defaults/tax-codes)

func (Unimplemented) UpdatePlan

func (_ Unimplemented) UpdatePlan(w http.ResponseWriter, r *http.Request, planId ULID)

Update plan (PUT /openmeter/plans/{planId})

func (Unimplemented) UpdatePlanAddon

func (_ Unimplemented) UpdatePlanAddon(w http.ResponseWriter, r *http.Request, planId ULID, planAddonId ULID)

Update add-on association for plan (PUT /openmeter/plans/{planId}/addons/{planAddonId})

func (Unimplemented) UpdateSubscriptionAddon

func (_ Unimplemented) UpdateSubscriptionAddon(w http.ResponseWriter, r *http.Request, subscriptionId ULID, subscriptionAddonId ULID)

Update subscription addon (PATCH /openmeter/subscriptions/{subscriptionId}/addons/{subscriptionAddonId})

func (Unimplemented) UpsertCustomer

func (_ Unimplemented) UpsertCustomer(w http.ResponseWriter, r *http.Request, customerId ULID)

Upsert customer (PUT /openmeter/customers/{customerId})

func (Unimplemented) UpsertTaxCode

func (_ Unimplemented) UpsertTaxCode(w http.ResponseWriter, r *http.Request, taxCodeId ULID)

Upsert tax code (PUT /openmeter/tax-codes/{taxCodeId})

func (Unimplemented) VoidCreditGrant

func (_ Unimplemented) VoidCreditGrant(w http.ResponseWriter, r *http.Request, customerId ULID, creditGrantId ULID)

Void credit grant (POST /openmeter/customers/{customerId}/credits/grants/{creditGrantId}/void)

func (Unimplemented) VoidGrant

func (_ Unimplemented) VoidGrant(w http.ResponseWriter, r *http.Request, grantId ULID, params VoidGrantParams)

Void grant (DELETE /openmeter/grants/{grantId})

type UnmarshalingParamError

type UnmarshalingParamError struct {
	ParamName string
	Err       error
}

func (*UnmarshalingParamError) Error

func (e *UnmarshalingParamError) Error() string

func (*UnmarshalingParamError) Unwrap

func (e *UnmarshalingParamError) Unwrap() error

type UpdateAddonJSONRequestBody

type UpdateAddonJSONRequestBody = UpsertAddonRequest

UpdateAddonJSONRequestBody defines body for UpdateAddon for application/json ContentType.

type UpdateAddress

type UpdateAddress struct {
	// City City.
	City *string `json:"city,omitempty"`

	// Country Country code in [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html)
	// alpha-2 format.
	Country *CountryCode `json:"country,omitempty"`

	// Line1 First line of the address.
	Line1 *string `json:"line1,omitempty"`

	// Line2 Second line of the address.
	Line2 *string `json:"line2,omitempty"`

	// PhoneNumber Phone number.
	PhoneNumber *string `json:"phone_number,omitempty"`

	// PostalCode Postal code.
	PostalCode *string `json:"postal_code,omitempty"`

	// State State or province.
	State *string `json:"state,omitempty"`
}

UpdateAddress Address

type UpdateAppExternalInvoicingRequest

type UpdateAppExternalInvoicingRequest struct {
	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// EnableDraftSyncHook Enable draft synchronization hook.
	//
	// When enabled, invoices will pause at the draft state and wait for the
	// integration to call the draft synchronized endpoint before progressing to the
	// issuing state. This allows the external system to validate and prepare the
	// invoice data.
	//
	// When disabled, invoices automatically progress through the draft state based on
	// the configured workflow timing.
	EnableDraftSyncHook bool `json:"enable_draft_sync_hook"`

	// EnableIssuingSyncHook Enable issuing synchronization hook.
	//
	// When enabled, invoices will pause at the issuing state and wait for the
	// integration to call the issuing synchronized endpoint before progressing to the
	// issued state. This ensures the external invoicing system has successfully
	// created and finalized the invoice before it is marked as issued.
	//
	// When disabled, invoices automatically progress through the issuing state and are
	// immediately marked as issued.
	EnableIssuingSyncHook bool `json:"enable_issuing_sync_hook"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// Type The app type.
	Type UpdateAppExternalInvoicingRequestType `json:"type"`
}

UpdateAppExternalInvoicingRequest AppExternalInvoicing update request.

type UpdateAppExternalInvoicingRequestType

type UpdateAppExternalInvoicingRequestType string

UpdateAppExternalInvoicingRequestType The app type.

const (
	UpdateAppExternalInvoicingRequestTypeExternalInvoicing UpdateAppExternalInvoicingRequestType = "external_invoicing"
)

Defines values for UpdateAppExternalInvoicingRequestType.

func (UpdateAppExternalInvoicingRequestType) Valid

Valid indicates whether the value is a known member of the UpdateAppExternalInvoicingRequestType enum.

type UpdateAppJSONRequestBody

type UpdateAppJSONRequestBody = BillingUpdateAppRequest

UpdateAppJSONRequestBody defines body for UpdateApp for application/json ContentType.

type UpdateAppSandboxRequest

type UpdateAppSandboxRequest struct {
	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// Type The app type.
	Type UpdateAppSandboxRequestType `json:"type"`
}

UpdateAppSandboxRequest AppSandbox update request.

type UpdateAppSandboxRequestType

type UpdateAppSandboxRequestType string

UpdateAppSandboxRequestType The app type.

const (
	UpdateAppSandboxRequestTypeSandbox UpdateAppSandboxRequestType = "sandbox"
)

Defines values for UpdateAppSandboxRequestType.

func (UpdateAppSandboxRequestType) Valid

Valid indicates whether the value is a known member of the UpdateAppSandboxRequestType enum.

type UpdateAppStripeRequest

type UpdateAppStripeRequest struct {
	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// SecretApiKey The Stripe secret API key used to authenticate API requests.
	SecretApiKey *string `json:"secret_api_key,omitempty"`

	// Type The app type.
	Type UpdateAppStripeRequestType `json:"type"`
}

UpdateAppStripeRequest AppStripe update request.

type UpdateAppStripeRequestType

type UpdateAppStripeRequestType string

UpdateAppStripeRequestType The app type.

const (
	UpdateAppStripeRequestTypeStripe UpdateAppStripeRequestType = "stripe"
)

Defines values for UpdateAppStripeRequestType.

func (UpdateAppStripeRequestType) Valid

func (e UpdateAppStripeRequestType) Valid() bool

Valid indicates whether the value is a known member of the UpdateAppStripeRequestType enum.

type UpdateBillingInvoiceWorkflow

type UpdateBillingInvoiceWorkflow struct {
	// Invoicing Invoicing settings for this invoice.
	Invoicing *UpdateBillingInvoiceWorkflowInvoicingSettings `json:"invoicing,omitempty"`

	// Payment Payment settings for this invoice.
	Payment *UpdateBillingWorkflowPaymentSettings `json:"payment,omitempty"`
}

UpdateBillingInvoiceWorkflow Invoice-level snapshot of the workflow configuration.

Contains only the settings that are meaningful for an already-created invoice: invoicing behaviour and payment settings. Collection alignment and tax policy are gather-time / profile-wide concerns and are not included.

type UpdateBillingInvoiceWorkflowInvoicingSettings

type UpdateBillingInvoiceWorkflowInvoicingSettings struct {
	// AutoAdvance Whether to automatically issue the invoice after the draft_period has passed.
	AutoAdvance *bool `json:"auto_advance,omitempty"`

	// DraftPeriod The period for the invoice to be kept in draft status for manual reviews.
	DraftPeriod *string `json:"draft_period,omitempty"`
}

UpdateBillingInvoiceWorkflowInvoicingSettings Invoice-level invoicing settings.

A subset of BillingWorkflowInvoicingSettings limited to fields that are meaningful per-invoice. progressive_billing is omitted as it is a gather-time / profile-level decision.

type UpdateBillingNotificationChannelRequest

type UpdateBillingNotificationChannelRequest struct {
	// CustomHeaders Custom HTTP headers to include on every webhook delivery request, keyed by
	// header name.
	CustomHeaders *map[string]string `json:"custom_headers,omitempty"`

	// Disabled Whether the channel is disabled. Disabled channels do not receive notification
	// events.
	Disabled *bool `json:"disabled,omitempty"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// SigningSecret Secret used to sign outgoing webhook payloads so recipients can verify their
	// authenticity. If omitted on create, a secret is generated automatically by the
	// delivery provider. This is a sensitive credential returned in responses (unlike
	// most secrets) specifically so clients can retrieve a server-generated value and
	// verify webhook signatures; handle it with the same care as any other credential.
	SigningSecret *string `json:"signing_secret,omitempty"`

	// Type The type of the channel. Immutable after creation.
	Type BillingNotificationChannelType `json:"type"`

	// Url The URL that webhook notification events are delivered to.
	Url string `json:"url"`
}

UpdateBillingNotificationChannelRequest Request body for updating a notification channel. Updates replace the channel's mutable state rather than merging it: `type`, `name`, and `url` must always be provided, and omitting `disabled`, `labels`, or `custom_headers` resets them to their defaults (enabled, no labels, no custom headers). `signing_secret` is the one exception: omitting it keeps the channel's current signing secret instead of clearing the credential.

type UpdateBillingPartyAddresses

type UpdateBillingPartyAddresses struct {
	// BillingAddress Billing address.
	BillingAddress UpdateAddress `json:"billing_address"`
}

UpdateBillingPartyAddresses A collection of addresses for the party.

type UpdateBillingPartyTaxIdentity

type UpdateBillingPartyTaxIdentity struct {
	// Code Normalized tax identification code shown on the original identity document.
	Code *BillingTaxIdentificationCode `json:"code,omitempty"`
}

UpdateBillingPartyTaxIdentity Identity stores the details required to identify an entity for tax purposes in a specific country.

type UpdateBillingProfileJSONRequestBody

type UpdateBillingProfileJSONRequestBody = UpsertBillingProfileRequest

UpdateBillingProfileJSONRequestBody defines body for UpdateBillingProfile for application/json ContentType.

type UpdateBillingWorkflowPaymentChargeAutomaticallySettings

type UpdateBillingWorkflowPaymentChargeAutomaticallySettings struct {
	// CollectionMethod The collection method for the invoice.
	CollectionMethod UpdateBillingWorkflowPaymentChargeAutomaticallySettingsCollectionMethod `json:"collection_method"`
}

UpdateBillingWorkflowPaymentChargeAutomaticallySettings Payment settings for a billing workflow when the collection method is charge automatically.

type UpdateBillingWorkflowPaymentChargeAutomaticallySettingsCollectionMethod

type UpdateBillingWorkflowPaymentChargeAutomaticallySettingsCollectionMethod string

UpdateBillingWorkflowPaymentChargeAutomaticallySettingsCollectionMethod The collection method for the invoice.

const (
	UpdateBillingWorkflowPaymentChargeAutomaticallySettingsCollectionMethodChargeAutomatically UpdateBillingWorkflowPaymentChargeAutomaticallySettingsCollectionMethod = "charge_automatically"
)

Defines values for UpdateBillingWorkflowPaymentChargeAutomaticallySettingsCollectionMethod.

func (UpdateBillingWorkflowPaymentChargeAutomaticallySettingsCollectionMethod) Valid

Valid indicates whether the value is a known member of the UpdateBillingWorkflowPaymentChargeAutomaticallySettingsCollectionMethod enum.

type UpdateBillingWorkflowPaymentSendInvoiceSettings

type UpdateBillingWorkflowPaymentSendInvoiceSettings struct {
	// CollectionMethod The collection method for the invoice.
	CollectionMethod UpdateBillingWorkflowPaymentSendInvoiceSettingsCollectionMethod `json:"collection_method"`

	// DueAfter The period after which the invoice is due. With some payment solutions it's only
	// applicable for manual collection method.
	DueAfter *string `json:"due_after,omitempty"`
}

UpdateBillingWorkflowPaymentSendInvoiceSettings Payment settings for a billing workflow when the collection method is send invoice.

type UpdateBillingWorkflowPaymentSendInvoiceSettingsCollectionMethod

type UpdateBillingWorkflowPaymentSendInvoiceSettingsCollectionMethod string

UpdateBillingWorkflowPaymentSendInvoiceSettingsCollectionMethod The collection method for the invoice.

const (
	UpdateBillingWorkflowPaymentSendInvoiceSettingsCollectionMethodSendInvoice UpdateBillingWorkflowPaymentSendInvoiceSettingsCollectionMethod = "send_invoice"
)

Defines values for UpdateBillingWorkflowPaymentSendInvoiceSettingsCollectionMethod.

func (UpdateBillingWorkflowPaymentSendInvoiceSettingsCollectionMethod) Valid

Valid indicates whether the value is a known member of the UpdateBillingWorkflowPaymentSendInvoiceSettingsCollectionMethod enum.

type UpdateBillingWorkflowPaymentSettings

type UpdateBillingWorkflowPaymentSettings struct {
	// contains filtered or unexported fields
}

UpdateBillingWorkflowPaymentSettings Payment settings for a billing workflow.

func (UpdateBillingWorkflowPaymentSettings) AsUpdateBillingWorkflowPaymentChargeAutomaticallySettings

func (t UpdateBillingWorkflowPaymentSettings) AsUpdateBillingWorkflowPaymentChargeAutomaticallySettings() (UpdateBillingWorkflowPaymentChargeAutomaticallySettings, error)

AsUpdateBillingWorkflowPaymentChargeAutomaticallySettings returns the union data inside the UpdateBillingWorkflowPaymentSettings as a UpdateBillingWorkflowPaymentChargeAutomaticallySettings

func (UpdateBillingWorkflowPaymentSettings) AsUpdateBillingWorkflowPaymentSendInvoiceSettings

func (t UpdateBillingWorkflowPaymentSettings) AsUpdateBillingWorkflowPaymentSendInvoiceSettings() (UpdateBillingWorkflowPaymentSendInvoiceSettings, error)

AsUpdateBillingWorkflowPaymentSendInvoiceSettings returns the union data inside the UpdateBillingWorkflowPaymentSettings as a UpdateBillingWorkflowPaymentSendInvoiceSettings

func (UpdateBillingWorkflowPaymentSettings) Discriminator

func (t UpdateBillingWorkflowPaymentSettings) Discriminator() (string, error)

func (*UpdateBillingWorkflowPaymentSettings) FromUpdateBillingWorkflowPaymentChargeAutomaticallySettings

func (t *UpdateBillingWorkflowPaymentSettings) FromUpdateBillingWorkflowPaymentChargeAutomaticallySettings(v UpdateBillingWorkflowPaymentChargeAutomaticallySettings) error

FromUpdateBillingWorkflowPaymentChargeAutomaticallySettings overwrites any union data inside the UpdateBillingWorkflowPaymentSettings as the provided UpdateBillingWorkflowPaymentChargeAutomaticallySettings

func (*UpdateBillingWorkflowPaymentSettings) FromUpdateBillingWorkflowPaymentSendInvoiceSettings

func (t *UpdateBillingWorkflowPaymentSettings) FromUpdateBillingWorkflowPaymentSendInvoiceSettings(v UpdateBillingWorkflowPaymentSendInvoiceSettings) error

FromUpdateBillingWorkflowPaymentSendInvoiceSettings overwrites any union data inside the UpdateBillingWorkflowPaymentSettings as the provided UpdateBillingWorkflowPaymentSendInvoiceSettings

func (UpdateBillingWorkflowPaymentSettings) MarshalJSON

func (t UpdateBillingWorkflowPaymentSettings) MarshalJSON() ([]byte, error)

func (*UpdateBillingWorkflowPaymentSettings) MergeUpdateBillingWorkflowPaymentChargeAutomaticallySettings

func (t *UpdateBillingWorkflowPaymentSettings) MergeUpdateBillingWorkflowPaymentChargeAutomaticallySettings(v UpdateBillingWorkflowPaymentChargeAutomaticallySettings) error

MergeUpdateBillingWorkflowPaymentChargeAutomaticallySettings performs a merge with any union data inside the UpdateBillingWorkflowPaymentSettings, using the provided UpdateBillingWorkflowPaymentChargeAutomaticallySettings

func (*UpdateBillingWorkflowPaymentSettings) MergeUpdateBillingWorkflowPaymentSendInvoiceSettings

func (t *UpdateBillingWorkflowPaymentSettings) MergeUpdateBillingWorkflowPaymentSendInvoiceSettings(v UpdateBillingWorkflowPaymentSendInvoiceSettings) error

MergeUpdateBillingWorkflowPaymentSendInvoiceSettings performs a merge with any union data inside the UpdateBillingWorkflowPaymentSettings, using the provided UpdateBillingWorkflowPaymentSendInvoiceSettings

func (*UpdateBillingWorkflowPaymentSettings) UnmarshalJSON

func (t *UpdateBillingWorkflowPaymentSettings) UnmarshalJSON(b []byte) error

func (UpdateBillingWorkflowPaymentSettings) ValueByDiscriminator

func (t UpdateBillingWorkflowPaymentSettings) ValueByDiscriminator() (interface{}, error)

type UpdateClosedPeriod

type UpdateClosedPeriod struct {
	// From The start of the period.
	//
	// The period is inclusive at the start.
	From DateTime `json:"from"`

	// To The end of the period.
	//
	// The period is exclusive at the end.
	To DateTime `json:"to"`
}

UpdateClosedPeriod A period with defined start and end dates.

The period is always inclusive at the start and exclusive at the end.

type UpdateCreditGrantExternalSettlementJSONRequestBody

type UpdateCreditGrantExternalSettlementJSONRequestBody = UpdateCreditGrantExternalSettlementRequest

UpdateCreditGrantExternalSettlementJSONRequestBody defines body for UpdateCreditGrantExternalSettlement for application/json ContentType.

type UpdateCreditGrantExternalSettlementRequest

type UpdateCreditGrantExternalSettlementRequest struct {
	// Status The new payment settlement status.
	Status BillingCreditPurchasePaymentSettlementStatus `json:"status"`
}

UpdateCreditGrantExternalSettlementRequest Request body for updating the external payment settlement status of a credit grant.

type UpdateCustomerBillingAppDataJSONRequestBody

type UpdateCustomerBillingAppDataJSONRequestBody = UpsertAppCustomerDataRequest

UpdateCustomerBillingAppDataJSONRequestBody defines body for UpdateCustomerBillingAppData for application/json ContentType.

type UpdateCustomerBillingJSONRequestBody

type UpdateCustomerBillingJSONRequestBody = UpsertCustomerBillingDataRequest

UpdateCustomerBillingJSONRequestBody defines body for UpdateCustomerBilling for application/json ContentType.

type UpdateCustomerUsageAttribution

type UpdateCustomerUsageAttribution struct {
	// SubjectKeys The subjects that are attributed to the customer. Can be empty when no usage
	// event subjects are associated with the customer.
	SubjectKeys []UsageAttributionSubjectKey `json:"subject_keys"`
}

UpdateCustomerUsageAttribution Mapping to attribute metered usage to the customer. One customer can have zero or more subjects, but one subject can only belong to one customer.

type UpdateDiscounts

type UpdateDiscounts struct {
	// Percentage Percentage discount applied to the price (0–100).
	Percentage *float32 `json:"percentage,omitempty"`

	// Usage Number of usage units granted free before billing starts. Only applies to
	// usage-based lines (not flat fees). Usage is treated as zero until this amount is
	// exhausted.
	Usage *Numeric `json:"usage,omitempty"`
}

UpdateDiscounts Discount configuration for a rate card.

type UpdateFeatureJSONRequestBody

type UpdateFeatureJSONRequestBody = UpdateFeatureRequest

UpdateFeatureJSONRequestBody defines body for UpdateFeature for application/json ContentType.

type UpdateFeatureRequest

type UpdateFeatureRequest struct {
	// UnitCost Optional per-unit cost configuration. Use "manual" for a fixed per-unit cost, or
	// "llm" to look up cost from the LLM cost database based on meter group-by
	// properties. Set to `null` to clear the existing unit cost; omit to leave it
	// unchanged.
	UnitCost nullable.Nullable[BillingFeatureUnitCost] `json:"unit_cost,omitempty"`
}

UpdateFeatureRequest Request body for updating a feature. Currently only the unit_cost field can be updated.

type UpdateInvoiceCustomer

type UpdateInvoiceCustomer struct {
	// BillingAddress The billing address of the customer. Used for tax and invoicing.
	BillingAddress *UpdateAddress `json:"billing_address,omitempty"`

	// Id ULID (Universally Unique Lexicographically Sortable Identifier).
	Id ULID `json:"id"`

	// Key Optional external resource key for the customer.
	//
	// Omitted when the customer was created without a key. Unlike on the customer
	// resource itself, the key is optional here because the invoice snapshot may
	// predate or omit it.
	Key *ExternalResourceKey `json:"key,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// UsageAttribution Mapping to attribute metered usage to the customer by the event subject.
	UsageAttribution *UpdateCustomerUsageAttribution `json:"usage_attribution,omitempty"`
}

UpdateInvoiceCustomer Snapshot of the customer's information at the time the invoice was issued.

type UpdateInvoiceJSONRequestBody

type UpdateInvoiceJSONRequestBody = UpdateInvoiceRequest

UpdateInvoiceJSONRequestBody defines body for UpdateInvoice for application/json ContentType.

type UpdateInvoiceLine

type UpdateInvoiceLine struct {
	// contains filtered or unexported fields
}

UpdateInvoiceLine A top-level line item on an invoice.

Each line represents a single charge, typically associated with a rate card from a subscription. Detailed (child) lines are nested under `detailed_lines` when present.

func (UpdateInvoiceLine) AsUpdateInvoiceStandardLine

func (t UpdateInvoiceLine) AsUpdateInvoiceStandardLine() (UpdateInvoiceStandardLine, error)

AsUpdateInvoiceStandardLine returns the union data inside the UpdateInvoiceLine as a UpdateInvoiceStandardLine

func (UpdateInvoiceLine) Discriminator

func (t UpdateInvoiceLine) Discriminator() (string, error)

func (*UpdateInvoiceLine) FromUpdateInvoiceStandardLine

func (t *UpdateInvoiceLine) FromUpdateInvoiceStandardLine(v UpdateInvoiceStandardLine) error

FromUpdateInvoiceStandardLine overwrites any union data inside the UpdateInvoiceLine as the provided UpdateInvoiceStandardLine

func (UpdateInvoiceLine) MarshalJSON

func (t UpdateInvoiceLine) MarshalJSON() ([]byte, error)

func (*UpdateInvoiceLine) MergeUpdateInvoiceStandardLine

func (t *UpdateInvoiceLine) MergeUpdateInvoiceStandardLine(v UpdateInvoiceStandardLine) error

MergeUpdateInvoiceStandardLine performs a merge with any union data inside the UpdateInvoiceLine, using the provided UpdateInvoiceStandardLine

func (*UpdateInvoiceLine) UnmarshalJSON

func (t *UpdateInvoiceLine) UnmarshalJSON(b []byte) error

func (UpdateInvoiceLine) ValueByDiscriminator

func (t UpdateInvoiceLine) ValueByDiscriminator() (interface{}, error)

type UpdateInvoiceLineRateCard

type UpdateInvoiceLineRateCard struct {
	// Discounts Discount configuration from the rate card.
	Discounts *UpdateDiscounts `json:"discounts,omitempty"`

	// FeatureKey The feature key associated with this line's rate card.
	FeatureKey *ResourceKey `json:"feature_key,omitempty"`

	// Price The price definition used to calculate charges for this line.
	Price UpdatePrice `json:"price"`

	// TaxConfig Tax configuration snapshot for this line.
	TaxConfig *UpdateTaxCodeConfig `json:"tax_config,omitempty"`
}

UpdateInvoiceLineRateCard Rate card configuration snapshot for a usage-based invoice line.

type UpdateInvoiceRequest

type UpdateInvoiceRequest struct {
	// contains filtered or unexported fields
}

UpdateInvoiceRequest UpdateInvoiceRequest update request.

func (UpdateInvoiceRequest) AsUpdateInvoiceStandardRequest

func (t UpdateInvoiceRequest) AsUpdateInvoiceStandardRequest() (UpdateInvoiceStandardRequest, error)

AsUpdateInvoiceStandardRequest returns the union data inside the UpdateInvoiceRequest as a UpdateInvoiceStandardRequest

func (UpdateInvoiceRequest) Discriminator

func (t UpdateInvoiceRequest) Discriminator() (string, error)

func (*UpdateInvoiceRequest) FromUpdateInvoiceStandardRequest

func (t *UpdateInvoiceRequest) FromUpdateInvoiceStandardRequest(v UpdateInvoiceStandardRequest) error

FromUpdateInvoiceStandardRequest overwrites any union data inside the UpdateInvoiceRequest as the provided UpdateInvoiceStandardRequest

func (UpdateInvoiceRequest) MarshalJSON

func (t UpdateInvoiceRequest) MarshalJSON() ([]byte, error)

func (*UpdateInvoiceRequest) MergeUpdateInvoiceStandardRequest

func (t *UpdateInvoiceRequest) MergeUpdateInvoiceStandardRequest(v UpdateInvoiceStandardRequest) error

MergeUpdateInvoiceStandardRequest performs a merge with any union data inside the UpdateInvoiceRequest, using the provided UpdateInvoiceStandardRequest

func (*UpdateInvoiceRequest) UnmarshalJSON

func (t *UpdateInvoiceRequest) UnmarshalJSON(b []byte) error

func (UpdateInvoiceRequest) ValueByDiscriminator

func (t UpdateInvoiceRequest) ValueByDiscriminator() (interface{}, error)

type UpdateInvoiceStandardLine

type UpdateInvoiceStandardLine struct {
	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// Id ID of the line.
	//
	// Optional on update: omit to create a new line, or supply the ID of an existing
	// line to edit it. Existing lines omitted from an update's `lines` array are
	// deleted.
	Id *ULID `json:"id,omitempty"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// RateCard The rate card configuration snapshot used to price this line item.
	RateCard UpdateInvoiceLineRateCard `json:"rate_card"`

	// ServicePeriod The service period covered by this invoice, spanning the earliest line start to
	// the latest line end across all of its lines.
	//
	// For an invoice with no lines the period is empty, which means `from` will be
	// equal to `to`.
	ServicePeriod UpdateClosedPeriod `json:"service_period"`

	// Type The type of charge this line item represents.
	Type UpdateInvoiceStandardLineType `json:"type"`
}

UpdateInvoiceStandardLine A top-level line item on an invoice.

Each line represents a single charge, typically associated with a rate card from a subscription. Detailed (child) lines are nested under `detailed_lines` when present.

type UpdateInvoiceStandardLineType

type UpdateInvoiceStandardLineType string

UpdateInvoiceStandardLineType The type of charge this line item represents.

const (
	UpdateInvoiceStandardLineTypeStandardLine UpdateInvoiceStandardLineType = "standard_line"
)

Defines values for UpdateInvoiceStandardLineType.

func (UpdateInvoiceStandardLineType) Valid

Valid indicates whether the value is a known member of the UpdateInvoiceStandardLineType enum.

type UpdateInvoiceStandardRequest

type UpdateInvoiceStandardRequest struct {
	// Customer Snapshot of the customer's information at the time the invoice was issued.
	Customer UpdateInvoiceCustomer `json:"customer"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Lines Line items on this invoice.
	//
	// Always returned on single-resource GET; omitted on list endpoints unless
	// explicitly expanded. Editable via update: existing lines are matched by `id`,
	// lines without an `id` are created, and lines present on the invoice but omitted
	// from the update request are deleted. Detailed (child) lines are always computed
	// and cannot be edited directly.
	Lines *[]UpdateInvoiceLine `json:"lines,omitempty"`

	// Supplier Snapshot of the supplier's contact information at the time the invoice was
	// issued.
	Supplier UpdateSupplier `json:"supplier"`

	// Type Discriminator field identifying this as a standard invoice.
	Type UpdateInvoiceStandardRequestType `json:"type"`

	// Workflow Workflow configuration snapshot captured at invoice creation time.
	Workflow UpdateInvoiceWorkflowSettings `json:"workflow"`
}

UpdateInvoiceStandardRequest InvoiceStandard update request.

type UpdateInvoiceStandardRequestType

type UpdateInvoiceStandardRequestType string

UpdateInvoiceStandardRequestType Discriminator field identifying this as a standard invoice.

const (
	UpdateInvoiceStandardRequestTypeStandard UpdateInvoiceStandardRequestType = "standard"
)

Defines values for UpdateInvoiceStandardRequestType.

func (UpdateInvoiceStandardRequestType) Valid

Valid indicates whether the value is a known member of the UpdateInvoiceStandardRequestType enum.

type UpdateInvoiceWorkflowSettings

type UpdateInvoiceWorkflowSettings struct {
	// Workflow The workflow configuration that was active when the invoice was created.
	//
	// Only the fields that are meaningful at the per-invoice level are included:
	// invoicing behaviour (auto-advance, draft period) and payment settings
	// (collection method, due date). Profile-wide settings such as collection
	// alignment, progressive billing, and tax policy are omitted.
	Workflow UpdateBillingInvoiceWorkflow `json:"workflow"`
}

UpdateInvoiceWorkflowSettings Snapshot of the billing workflow configuration captured at invoice creation.

type UpdateMeterJSONRequestBody

type UpdateMeterJSONRequestBody = UpdateMeterRequest

UpdateMeterJSONRequestBody defines body for UpdateMeter for application/json ContentType.

type UpdateMeterRequest

type UpdateMeterRequest struct {
	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// Dimensions Named JSONPath expressions to extract the group by values from the event data.
	//
	// Keys must be unique and consist only alphanumeric and underscore characters.
	Dimensions *map[string]string `json:"dimensions,omitempty"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name *string `json:"name,omitempty"`
}

UpdateMeterRequest Meter update request.

type UpdateNotificationChannelJSONRequestBody

type UpdateNotificationChannelJSONRequestBody = UpdateBillingNotificationChannelRequest

UpdateNotificationChannelJSONRequestBody defines body for UpdateNotificationChannel for application/json ContentType.

type UpdateNotificationRuleJSONRequestBody

type UpdateNotificationRuleJSONRequestBody = BillingNotificationRuleRequest

UpdateNotificationRuleJSONRequestBody defines body for UpdateNotificationRule for application/json ContentType.

type UpdateOrganizationDefaultTaxCodesJSONRequestBody

type UpdateOrganizationDefaultTaxCodesJSONRequestBody = UpdateOrganizationDefaultTaxCodesRequest

UpdateOrganizationDefaultTaxCodesJSONRequestBody defines body for UpdateOrganizationDefaultTaxCodes for application/json ContentType.

type UpdateOrganizationDefaultTaxCodesRequest

type UpdateOrganizationDefaultTaxCodesRequest struct {
	// CreditGrantTaxCode Default tax code for credit grants.
	CreditGrantTaxCode *TaxCodeReference `json:"credit_grant_tax_code,omitempty"`

	// InvoicingTaxCode Default tax code for invoicing.
	InvoicingTaxCode *TaxCodeReference `json:"invoicing_tax_code,omitempty"`
}

UpdateOrganizationDefaultTaxCodesRequest OrganizationDefaultTaxCodes update request.

type UpdatePlanAddonJSONRequestBody

type UpdatePlanAddonJSONRequestBody = UpsertPlanAddonRequest

UpdatePlanAddonJSONRequestBody defines body for UpdatePlanAddon for application/json ContentType.

type UpdatePlanJSONRequestBody

type UpdatePlanJSONRequestBody = UpsertPlanRequest

UpdatePlanJSONRequestBody defines body for UpdatePlan for application/json ContentType.

type UpdatePrice

type UpdatePrice struct {
	// contains filtered or unexported fields
}

UpdatePrice Price.

func (UpdatePrice) AsUpdatePriceFlat

func (t UpdatePrice) AsUpdatePriceFlat() (UpdatePriceFlat, error)

AsUpdatePriceFlat returns the union data inside the UpdatePrice as a UpdatePriceFlat

func (UpdatePrice) AsUpdatePriceFree

func (t UpdatePrice) AsUpdatePriceFree() (UpdatePriceFree, error)

AsUpdatePriceFree returns the union data inside the UpdatePrice as a UpdatePriceFree

func (UpdatePrice) AsUpdatePriceGraduated

func (t UpdatePrice) AsUpdatePriceGraduated() (UpdatePriceGraduated, error)

AsUpdatePriceGraduated returns the union data inside the UpdatePrice as a UpdatePriceGraduated

func (UpdatePrice) AsUpdatePriceUnit

func (t UpdatePrice) AsUpdatePriceUnit() (UpdatePriceUnit, error)

AsUpdatePriceUnit returns the union data inside the UpdatePrice as a UpdatePriceUnit

func (UpdatePrice) AsUpdatePriceVolume

func (t UpdatePrice) AsUpdatePriceVolume() (UpdatePriceVolume, error)

AsUpdatePriceVolume returns the union data inside the UpdatePrice as a UpdatePriceVolume

func (UpdatePrice) Discriminator

func (t UpdatePrice) Discriminator() (string, error)

func (*UpdatePrice) FromUpdatePriceFlat

func (t *UpdatePrice) FromUpdatePriceFlat(v UpdatePriceFlat) error

FromUpdatePriceFlat overwrites any union data inside the UpdatePrice as the provided UpdatePriceFlat

func (*UpdatePrice) FromUpdatePriceFree

func (t *UpdatePrice) FromUpdatePriceFree(v UpdatePriceFree) error

FromUpdatePriceFree overwrites any union data inside the UpdatePrice as the provided UpdatePriceFree

func (*UpdatePrice) FromUpdatePriceGraduated

func (t *UpdatePrice) FromUpdatePriceGraduated(v UpdatePriceGraduated) error

FromUpdatePriceGraduated overwrites any union data inside the UpdatePrice as the provided UpdatePriceGraduated

func (*UpdatePrice) FromUpdatePriceUnit

func (t *UpdatePrice) FromUpdatePriceUnit(v UpdatePriceUnit) error

FromUpdatePriceUnit overwrites any union data inside the UpdatePrice as the provided UpdatePriceUnit

func (*UpdatePrice) FromUpdatePriceVolume

func (t *UpdatePrice) FromUpdatePriceVolume(v UpdatePriceVolume) error

FromUpdatePriceVolume overwrites any union data inside the UpdatePrice as the provided UpdatePriceVolume

func (UpdatePrice) MarshalJSON

func (t UpdatePrice) MarshalJSON() ([]byte, error)

func (*UpdatePrice) MergeUpdatePriceFlat

func (t *UpdatePrice) MergeUpdatePriceFlat(v UpdatePriceFlat) error

MergeUpdatePriceFlat performs a merge with any union data inside the UpdatePrice, using the provided UpdatePriceFlat

func (*UpdatePrice) MergeUpdatePriceFree

func (t *UpdatePrice) MergeUpdatePriceFree(v UpdatePriceFree) error

MergeUpdatePriceFree performs a merge with any union data inside the UpdatePrice, using the provided UpdatePriceFree

func (*UpdatePrice) MergeUpdatePriceGraduated

func (t *UpdatePrice) MergeUpdatePriceGraduated(v UpdatePriceGraduated) error

MergeUpdatePriceGraduated performs a merge with any union data inside the UpdatePrice, using the provided UpdatePriceGraduated

func (*UpdatePrice) MergeUpdatePriceUnit

func (t *UpdatePrice) MergeUpdatePriceUnit(v UpdatePriceUnit) error

MergeUpdatePriceUnit performs a merge with any union data inside the UpdatePrice, using the provided UpdatePriceUnit

func (*UpdatePrice) MergeUpdatePriceVolume

func (t *UpdatePrice) MergeUpdatePriceVolume(v UpdatePriceVolume) error

MergeUpdatePriceVolume performs a merge with any union data inside the UpdatePrice, using the provided UpdatePriceVolume

func (*UpdatePrice) UnmarshalJSON

func (t *UpdatePrice) UnmarshalJSON(b []byte) error

func (UpdatePrice) ValueByDiscriminator

func (t UpdatePrice) ValueByDiscriminator() (interface{}, error)

type UpdatePriceFlat

type UpdatePriceFlat struct {
	// Amount The amount of the flat price.
	Amount Numeric `json:"amount"`

	// Type The type of the price.
	Type UpdatePriceFlatType `json:"type"`
}

UpdatePriceFlat Flat price.

type UpdatePriceFlatType

type UpdatePriceFlatType string

UpdatePriceFlatType The type of the price.

const (
	UpdatePriceFlatTypeFlat UpdatePriceFlatType = "flat"
)

Defines values for UpdatePriceFlatType.

func (UpdatePriceFlatType) Valid

func (e UpdatePriceFlatType) Valid() bool

Valid indicates whether the value is a known member of the UpdatePriceFlatType enum.

type UpdatePriceFree

type UpdatePriceFree struct {
	// Type The type of the price.
	Type UpdatePriceFreeType `json:"type"`
}

UpdatePriceFree Free price.

type UpdatePriceFreeType

type UpdatePriceFreeType string

UpdatePriceFreeType The type of the price.

const (
	UpdatePriceFreeTypeFree UpdatePriceFreeType = "free"
)

Defines values for UpdatePriceFreeType.

func (UpdatePriceFreeType) Valid

func (e UpdatePriceFreeType) Valid() bool

Valid indicates whether the value is a known member of the UpdatePriceFreeType enum.

type UpdatePriceGraduated

type UpdatePriceGraduated struct {
	// Tiers The tiers of the graduated price. At least one tier is required.
	Tiers []UpdatePriceTier `json:"tiers"`

	// Type The type of the price.
	Type UpdatePriceGraduatedType `json:"type"`
}

UpdatePriceGraduated Graduated tiered price.

Each tier's rate applies only to the usage within that tier. Pricing can change as cumulative usage crosses tier boundaries.

When UnitConfig is present on the containing resource, tier boundaries (up_to_amount) are expressed in converted billing units.

type UpdatePriceGraduatedType

type UpdatePriceGraduatedType string

UpdatePriceGraduatedType The type of the price.

const (
	UpdatePriceGraduatedTypeGraduated UpdatePriceGraduatedType = "graduated"
)

Defines values for UpdatePriceGraduatedType.

func (UpdatePriceGraduatedType) Valid

func (e UpdatePriceGraduatedType) Valid() bool

Valid indicates whether the value is a known member of the UpdatePriceGraduatedType enum.

type UpdatePriceTier

type UpdatePriceTier struct {
	// FlatPrice The flat price component of the tier. Charged once when the tier is entered.
	FlatPrice *UpdatePriceFlat `json:"flat_price,omitempty"`

	// UnitPrice The unit price component of the tier. Charged per billing unit within the tier.
	UnitPrice *UpdatePriceUnit `json:"unit_price,omitempty"`

	// UpToAmount Up to and including this quantity will be contained in the tier. If undefined,
	// the tier is open-ended (the last tier).
	UpToAmount *Numeric `json:"up_to_amount,omitempty"`
}

UpdatePriceTier A price tier used in graduated and volume pricing.

At least one price component (flat_price or unit_price) must be set. When UnitConfig is present on the containing resource, up_to_amount is expressed in converted billing units.

type UpdatePriceUnit

type UpdatePriceUnit struct {
	// Amount The amount of the unit price.
	Amount Numeric `json:"amount"`

	// Type The type of the price.
	Type UpdatePriceUnitType `json:"type"`
}

UpdatePriceUnit Unit price.

Charges a fixed rate per billing unit. When UnitConfig is present on the object, billing units are the converted quantities (e.g. GB instead of bytes).

type UpdatePriceUnitType

type UpdatePriceUnitType string

UpdatePriceUnitType The type of the price.

const (
	UpdatePriceUnitTypeUnit UpdatePriceUnitType = "unit"
)

Defines values for UpdatePriceUnitType.

func (UpdatePriceUnitType) Valid

func (e UpdatePriceUnitType) Valid() bool

Valid indicates whether the value is a known member of the UpdatePriceUnitType enum.

type UpdatePriceVolume

type UpdatePriceVolume struct {
	// Tiers The tiers of the volume price. At least one tier is required.
	Tiers []UpdatePriceTier `json:"tiers"`

	// Type The type of the price.
	Type UpdatePriceVolumeType `json:"type"`
}

UpdatePriceVolume Volume tiered price.

The maximum quantity within a period determines the per-unit price for all units in that period.

When UnitConfig is present on the containing resource, tier boundaries (up_to_amount) are expressed in converted billing units.

type UpdatePriceVolumeType

type UpdatePriceVolumeType string

UpdatePriceVolumeType The type of the price.

const (
	UpdatePriceVolumeTypeVolume UpdatePriceVolumeType = "volume"
)

Defines values for UpdatePriceVolumeType.

func (UpdatePriceVolumeType) Valid

func (e UpdatePriceVolumeType) Valid() bool

Valid indicates whether the value is a known member of the UpdatePriceVolumeType enum.

type UpdateResourceReference

type UpdateResourceReference struct {
	// Id ULID (Universally Unique Lexicographically Sortable Identifier).
	Id ULID `json:"id"`
}

UpdateResourceReference TaxCode reference.

type UpdateSubscriptionAddonJSONRequestBody

type UpdateSubscriptionAddonJSONRequestBody = BillingSubscriptionAddonUpdate

UpdateSubscriptionAddonJSONRequestBody defines body for UpdateSubscriptionAddon for application/json ContentType.

type UpdateSupplier

type UpdateSupplier struct {
	// Addresses Address for where information should be sent if needed.
	Addresses *UpdateBillingPartyAddresses `json:"addresses,omitempty"`

	// Id Unique identifier for the party.
	Id *string `json:"id,omitempty"`

	// Name Legal name or representation of the party.
	Name *string `json:"name,omitempty"`

	// TaxId The entity's legal identification used for tax purposes. They may have other
	// numbers, but we're only interested in those valid for tax purposes.
	TaxId *UpdateBillingPartyTaxIdentity `json:"tax_id,omitempty"`
}

UpdateSupplier Snapshot of the supplier's information at the time the invoice was issued.

Structurally a read-only subset of `BillingParty` (the type configured on the billing profile), so the snapshot stays aligned with the source. `key` is omitted because it is not part of the snapshotted supplier data.

type UpdateTaxCodeConfig

type UpdateTaxCodeConfig struct {
	// Behavior Tax behavior.
	//
	// This enum is used to specify whether tax is included in the price or excluded
	// from the price. If not specified, the billing profile is used to determine the
	// tax behavior. If not specified in the billing profile, the provider's default
	// behavior is used.
	Behavior *BillingTaxBehavior `json:"behavior,omitempty"`

	// Code Tax code applied to the invoice line item.
	Code *UpdateResourceReference `json:"code,omitempty"`
}

UpdateTaxCodeConfig Tax configuration for a billable resource.

Applies a tax code and tax behavior to the resulting invoice line items. When not set, the applicable default is used: the billing profile default tax configuration, then the organization default tax code.

type UpsertAddonRequest

type UpsertAddonRequest struct {
	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// InstanceType The InstanceType of the add-ons. Can be "single" or "multiple".
	InstanceType AddonInstanceType `json:"instance_type"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// RateCards The rate cards of the add-on.
	RateCards []BillingRateCard `json:"rate_cards"`
}

UpsertAddonRequest Addon upsert request.

type UpsertAppCustomerDataRequest

type UpsertAppCustomerDataRequest struct {
	// ExternalInvoicing Used if the customer has a linked external invoicing app.
	//
	// Set to `null` to remove the external invoicing data of the customer; omit to
	// leave it unchanged.
	ExternalInvoicing nullable.Nullable[BillingAppCustomerDataExternalInvoicing] `json:"external_invoicing,omitempty"`

	// Stripe Used if the customer has a linked Stripe app.
	//
	// Set to `null` to remove the Stripe data of the customer; omit to leave it
	// unchanged.
	Stripe nullable.Nullable[BillingAppCustomerDataStripe] `json:"stripe,omitempty"`
}

UpsertAppCustomerDataRequest AppCustomerData upsert request.

type UpsertBillingProfileRequest

type UpsertBillingProfileRequest struct {
	// Default Whether this is the default profile.
	Default bool `json:"default"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// Supplier The name and contact information for the supplier this billing profile
	// represents
	Supplier BillingParty `json:"supplier"`

	// Workflow The billing workflow settings for this profile
	Workflow BillingWorkflow `json:"workflow"`
}

UpsertBillingProfileRequest BillingProfile upsert request.

type UpsertCustomerBillingDataRequest

type UpsertCustomerBillingDataRequest struct {
	// AppData App customer data.
	AppData *BillingAppCustomerData `json:"app_data,omitempty"`

	// BillingProfile The billing profile for the customer.
	//
	// If not provided, the default billing profile will be used.
	BillingProfile *BillingProfileReference `json:"billing_profile,omitempty"`
}

UpsertCustomerBillingDataRequest CustomerBillingData upsert request.

type UpsertCustomerJSONRequestBody

type UpsertCustomerJSONRequestBody = UpsertCustomerRequest

UpsertCustomerJSONRequestBody defines body for UpsertCustomer for application/json ContentType.

type UpsertCustomerRequest

type UpsertCustomerRequest struct {
	// BillingAddress The billing address of the customer. Used for tax and invoicing.
	BillingAddress *Address `json:"billing_address,omitempty"`

	// Currency Currency of the customer. Used for billing, tax and invoicing.
	Currency *CurrencyCode `json:"currency,omitempty"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// PrimaryEmail The primary email address of the customer.
	PrimaryEmail *string `json:"primary_email,omitempty"`

	// UsageAttribution Mapping to attribute metered usage to the customer by the event subject.
	UsageAttribution *BillingCustomerUsageAttribution `json:"usage_attribution,omitempty"`
}

UpsertCustomerRequest Customer upsert request.

type UpsertPlanAddonRequest

type UpsertPlanAddonRequest struct {
	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// FromPlanPhase The key of the plan phase from which the add-on becomes available for purchase.
	FromPlanPhase ResourceKey `json:"from_plan_phase"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// MaxQuantity The maximum number of times the add-on can be purchased for the plan. For
	// single-instance add-ons this field must be omitted. For multi-instance add-ons
	// when omitted, unlimited quantity can be purchased.
	MaxQuantity *int `json:"max_quantity,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`
}

UpsertPlanAddonRequest PlanAddon upsert request.

type UpsertPlanRequest

type UpsertPlanRequest struct {
	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`

	// Phases The plan phases define the pricing ramp for a subscription. A phase switch
	// occurs only at the end of a billing period. At least one phase is required.
	Phases []BillingPlanPhase `json:"phases"`

	// ProRatingEnabled Whether pro-rating is enabled for this plan.
	ProRatingEnabled *bool `json:"pro_rating_enabled,omitempty"`

	// SettlementMode Settlement mode for the plan. When omitted, the existing settlement mode is
	// preserved.
	SettlementMode *BillingSettlementMode `json:"settlement_mode,omitempty"`
}

UpsertPlanRequest Plan upsert (update) request. `settlement_mode` is re-declared as optional with no default, so an omitted value leaves the plan's existing settlement mode unchanged.

type UpsertTaxCodeJSONRequestBody

type UpsertTaxCodeJSONRequestBody = UpsertTaxCodeRequest

UpsertTaxCodeJSONRequestBody defines body for UpsertTaxCode for application/json ContentType.

type UpsertTaxCodeRequest

type UpsertTaxCodeRequest struct {
	// AppMappings Mapping of app types to tax codes.
	AppMappings []BillingTaxCodeAppMapping `json:"app_mappings"`

	// Description Optional description of the resource.
	//
	// Maximum 1024 characters.
	Description *string `json:"description,omitempty"`

	// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
	//
	// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
	Labels *Labels `json:"labels,omitempty"`

	// Name Display name of the resource.
	//
	// Between 1 and 256 characters.
	Name string `json:"name"`
}

UpsertTaxCodeRequest TaxCode upsert request.

type UsageAttributionSubjectKey

type UsageAttributionSubjectKey = string

UsageAttributionSubjectKey Subject key.

type VersionFilter

type VersionFilter struct {
	// Eq Match this exact version.
	Eq *int32 `json:"eq,omitempty"`

	// Gte Match this version and later versions.
	Gte *int32 `json:"gte,omitempty"`

	// Lte Match this version and earlier versions.
	Lte *int32 `json:"lte,omitempty"`

	// Oeq Match one of these versions.
	Oeq *[]int32 `json:"oeq,omitempty"`
}

VersionFilter An integer version comparison. Exactly one operator must be provided.

type VoidCreditGrantJSONRequestBody

type VoidCreditGrantJSONRequestBody = VoidCreditGrantRequest

VoidCreditGrantJSONRequestBody defines body for VoidCreditGrant for application/json ContentType.

type VoidCreditGrantRequest

type VoidCreditGrantRequest struct {
	// PaymentAdjustment How voiding adjusts payment state related to the grant.
	//
	// Currently only `none` is supported: voiding does not adjust invoices, payment
	// authorization, settlement, payment intents, or external collection state. If
	// payment later completes, the original invoiced amount may still be collected.
	PaymentAdjustment *BillingCreditGrantVoidPaymentAdjustment `json:"payment_adjustment,omitempty"`
}

VoidCreditGrantRequest Request body for voiding a credit grant.

type VoidGrantParams

type VoidGrantParams struct {
	// VoidedAt The time the grant is voided from. Defaults to now; it cannot be in the future
	// or before the start of the current usage period.
	VoidedAt *DateTime `form:"voided_at,omitempty" json:"voided_at,omitempty"`
}

VoidGrantParams defines parameters for VoidGrant.

Directories

Path Synopsis
client module
handlers
billingcommon
Package billingcommon holds converter helpers shared by the billing-related v3 handler packages (customer charges, invoices), so that neither handler package needs to import the other.
Package billingcommon holds converter helpers shared by the billing-related v3 handler packages (customer charges, invoices), so that neither handler package needs to import the other.

Jump to

Keyboard shortcuts

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