api

package
v1.0.0-beta.193 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

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

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

Index

Constants

View Source
const (
	PortalTokenAuthScopes = "PortalTokenAuth.Scopes"
)

Variables

This section is empty.

Functions

func GetSwagger

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

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

func 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 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:"phoneNumber,omitempty"`

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

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

Address Address

type Alignment

type Alignment struct {
	// BillablesMustAlign Whether all Billable items and RateCards must align.
	// Alignment means the Price's BillingCadence must align for both duration and anchor time.
	BillablesMustAlign *bool `json:"billablesMustAlign,omitempty"`
}

Alignment Alignment configuration for a plan or subscription.

type Annotations

type Annotations map[string]interface{}

Annotations Set of key-value pairs managed by the system. Cannot be modified by user.

type App

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

App App. One of: stripe

func (App) AsSandboxApp

func (t App) AsSandboxApp() (SandboxApp, error)

AsSandboxApp returns the union data inside the App as a SandboxApp

func (App) AsStripeApp

func (t App) AsStripeApp() (StripeApp, error)

AsStripeApp returns the union data inside the App as a StripeApp

func (App) Discriminator

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

func (*App) FromSandboxApp

func (t *App) FromSandboxApp(v SandboxApp) error

FromSandboxApp overwrites any union data inside the App as the provided SandboxApp

func (*App) FromStripeApp

func (t *App) FromStripeApp(v StripeApp) error

FromStripeApp overwrites any union data inside the App as the provided StripeApp

func (App) MarshalJSON

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

func (*App) MergeSandboxApp

func (t *App) MergeSandboxApp(v SandboxApp) error

MergeSandboxApp performs a merge with any union data inside the App, using the provided SandboxApp

func (*App) MergeStripeApp

func (t *App) MergeStripeApp(v StripeApp) error

MergeStripeApp performs a merge with any union data inside the App, using the provided StripeApp

func (*App) UnmarshalJSON

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

func (App) ValueByDiscriminator

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

type AppBaseReplaceUpdate

type AppBaseReplaceUpdate struct {
	// Default Default for the app type
	// Only one app of each type can be default.
	Default bool `json:"default"`

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

	// Metadata Additional metadata for the resource.
	Metadata *Metadata `json:"metadata"`

	// Name Human-readable name for the resource. Between 1 and 256 characters.
	Name string `json:"name"`
}

AppBaseReplaceUpdate Resource update operation model.

type AppCapability

type AppCapability struct {
	// Description The capability description.
	Description string `json:"description"`

	// Key Key
	Key string `json:"key"`

	// Name The capability name.
	Name string `json:"name"`

	// Type The capability type.
	Type AppCapabilityType `json:"type"`
}

AppCapability App capability.

Capabilities only exist in config so they don't extend the Resource model.

type AppCapabilityType

type AppCapabilityType string

AppCapabilityType App capability type.

const (
	AppCapabilityTypeCalculateTax     AppCapabilityType = "calculateTax"
	AppCapabilityTypeCollectPayments  AppCapabilityType = "collectPayments"
	AppCapabilityTypeInvoiceCustomers AppCapabilityType = "invoiceCustomers"
	AppCapabilityTypeReportEvents     AppCapabilityType = "reportEvents"
	AppCapabilityTypeReportUsage      AppCapabilityType = "reportUsage"
)

Defines values for AppCapabilityType.

type AppList

type AppList struct {
	// Items The items in the page.
	Items []App `json:"items"`

	// Page The page number.
	Page int `json:"page"`

	// PageSize The number of items in the page.
	PageSize int `json:"pageSize"`

	// TotalCount The total number of items.
	TotalCount int `json:"totalCount"`
}

AppList A page of results.

type AppReference

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

AppReference App reference

Can be used as a short reference to an app if the full app object is not needed.

type AppStatus

type AppStatus string

AppStatus App installed status.

const (
	AppStatusReady        AppStatus = "ready"
	AppStatusUnauthorized AppStatus = "unauthorized"
)

Defines values for AppStatus.

type AppStripeWebhookJSONRequestBody

type AppStripeWebhookJSONRequestBody = StripeWebhookEvent

AppStripeWebhookJSONRequestBody defines body for AppStripeWebhook for application/json ContentType.

type AppType

type AppType string

AppType Type of the app.

const (
	AppTypeSandbox AppType = "sandbox"
	AppTypeStripe  AppType = "stripe"
)

Defines values for AppType.

type BadRequestProblemResponse

type BadRequestProblemResponse = UnexpectedProblemResponse

BadRequestProblemResponse A Problem Details object (RFC 7807). Additional properties specific to the problem type may be present.

type BalanceHistoryWindow

type BalanceHistoryWindow struct {
	// BalanceAtStart The entitlement balance at the start of the period.
	BalanceAtStart float64 `json:"balanceAtStart"`

	// Period A period with a start and end time.
	Period Period `json:"period"`

	// Usage The total usage of the feature in the period.
	Usage float64 `json:"usage"`
}

BalanceHistoryWindow The balance history window.

type BillingLineCharge

type BillingLineCharge struct {
	// Amount Fixed discount amount to apply (calculated if percent present).
	Amount Numeric `json:"amount"`

	// Code Reason code.
	Code *string `json:"code,omitempty"`

	// CreatedAt Timestamp of when the resource was created.
	CreatedAt time.Time `json:"createdAt"`

	// DeletedAt Timestamp of when the resource was permanently deleted.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`

	// Description Text description as to why the discount was applied.
	Description *string `json:"description,omitempty"`

	// Id ID of the charge or discount.
	Id string `json:"id"`

	// Percent Percentage if fixed amount not applied
	Percent *Percentage `json:"percent,omitempty"`

	// UpdatedAt Timestamp of when the resource was last updated.
	UpdatedAt time.Time `json:"updatedAt"`
}

BillingLineCharge InvoiceLineCharge represents an amount added to the line, and will be applied before taxes.

type BillingParty

type BillingParty struct {
	// Addresses Regular post addresses for where information should be sent if needed.
	Addresses *[]Address `json:"addresses,omitempty"`

	// Id Unique identifier for the party (if available)
	Id *string `json:"id,omitempty"`

	// Name Legal name or representation of the organization.
	Name *string `json:"name,omitempty"`

	// TaxId The entity's legal ID code used for tax purposes. They may have
	// other numbers, but we're only interested in those valid for tax purposes.
	TaxId *BillingPartyTaxIdentity `json:"taxId,omitempty"`
}

BillingParty Party represents a person or business entity.

type BillingPartyReplaceUpdate

type BillingPartyReplaceUpdate struct {
	// Addresses Regular post addresses for where information should be sent if needed.
	Addresses *[]Address `json:"addresses,omitempty"`

	// Name Legal name or representation of the organization.
	Name *string `json:"name,omitempty"`

	// TaxId The entity's legal ID code used for tax purposes. They may have
	// other numbers, but we're only interested in those valid for tax purposes.
	TaxId *BillingPartyTaxIdentity `json:"taxId,omitempty"`
}

BillingPartyReplaceUpdate Resource update operation model.

type BillingPartyTaxIdentity

type BillingPartyTaxIdentity struct {
	// Code Normalized tax 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 BillingProfile

type BillingProfile struct {
	// Apps The applications used by this billing profile.
	//
	// Expand settings govern if this includes the whole app object or just the ID references.
	Apps BillingProfileAppsOrReference `json:"apps"`

	// CreatedAt Timestamp of when the resource was created.
	CreatedAt time.Time `json:"createdAt"`

	// Default Is this the default profile?
	Default bool `json:"default"`

	// DeletedAt Timestamp of when the resource was permanently deleted.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`

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

	// Id A unique identifier for the resource.
	Id string `json:"id"`

	// Metadata Additional metadata for the resource.
	Metadata *Metadata `json:"metadata"`

	// Name Human-readable name for 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 Timestamp of when the resource was last updated.
	UpdatedAt time.Time `json:"updatedAt"`

	// Workflow The billing workflow settings for this profile
	Workflow BillingWorkflow `json:"workflow"`
}

BillingProfile BillingProfile represents a billing profile

type BillingProfileAppReferences

type BillingProfileAppReferences struct {
	// Invoicing The invoicing app used for this workflow
	Invoicing AppReference `json:"invoicing"`

	// Payment The payment app used for this workflow
	Payment AppReference `json:"payment"`

	// Tax The tax app used for this workflow
	Tax AppReference `json:"tax"`
}

BillingProfileAppReferences BillingProfileAppReferences represents the references (id, type) to the apps used by a billing profile

type BillingProfileApps

type BillingProfileApps struct {
	// Invoicing The invoicing app used for this workflow
	Invoicing App `json:"invoicing"`

	// Payment The payment app used for this workflow
	Payment App `json:"payment"`

	// Tax The tax app used for this workflow
	Tax App `json:"tax"`
}

BillingProfileApps BillingProfileApps represents the applications used by a billing profile

type BillingProfileAppsCreate

type BillingProfileAppsCreate struct {
	// Invoicing The invoicing app used for this workflow
	Invoicing string `json:"invoicing"`

	// Payment The payment app used for this workflow
	Payment string `json:"payment"`

	// Tax The tax app used for this workflow
	Tax string `json:"tax"`
}

BillingProfileAppsCreate BillingProfileAppsCreate represents the input for creating a billing profile's apps

type BillingProfileAppsOrReference

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

BillingProfileAppsOrReference ProfileAppsOrReference represents the union of ProfileApps and ProfileAppReferences for a billing profile.

func (BillingProfileAppsOrReference) AsBillingProfileAppReferences

func (t BillingProfileAppsOrReference) AsBillingProfileAppReferences() (BillingProfileAppReferences, error)

AsBillingProfileAppReferences returns the union data inside the BillingProfileAppsOrReference as a BillingProfileAppReferences

func (BillingProfileAppsOrReference) AsBillingProfileApps

func (t BillingProfileAppsOrReference) AsBillingProfileApps() (BillingProfileApps, error)

AsBillingProfileApps returns the union data inside the BillingProfileAppsOrReference as a BillingProfileApps

func (*BillingProfileAppsOrReference) FromBillingProfileAppReferences

func (t *BillingProfileAppsOrReference) FromBillingProfileAppReferences(v BillingProfileAppReferences) error

FromBillingProfileAppReferences overwrites any union data inside the BillingProfileAppsOrReference as the provided BillingProfileAppReferences

func (*BillingProfileAppsOrReference) FromBillingProfileApps

func (t *BillingProfileAppsOrReference) FromBillingProfileApps(v BillingProfileApps) error

FromBillingProfileApps overwrites any union data inside the BillingProfileAppsOrReference as the provided BillingProfileApps

func (BillingProfileAppsOrReference) MarshalJSON

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

func (*BillingProfileAppsOrReference) MergeBillingProfileAppReferences

func (t *BillingProfileAppsOrReference) MergeBillingProfileAppReferences(v BillingProfileAppReferences) error

MergeBillingProfileAppReferences performs a merge with any union data inside the BillingProfileAppsOrReference, using the provided BillingProfileAppReferences

func (*BillingProfileAppsOrReference) MergeBillingProfileApps

func (t *BillingProfileAppsOrReference) MergeBillingProfileApps(v BillingProfileApps) error

MergeBillingProfileApps performs a merge with any union data inside the BillingProfileAppsOrReference, using the provided BillingProfileApps

func (*BillingProfileAppsOrReference) UnmarshalJSON

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

type BillingProfileCreate

type BillingProfileCreate struct {
	// Apps The apps used by this billing profile.
	Apps BillingProfileAppsCreate `json:"apps"`

	// Default Is this the default profile?
	Default bool `json:"default"`

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

	// Metadata Additional metadata for the resource.
	Metadata *Metadata `json:"metadata"`

	// Name Human-readable name for 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 BillingWorkflowCreate `json:"workflow"`
}

BillingProfileCreate BillingProfileCreate represents the input for creating a billing profile

type BillingProfileCustomerOverride

type BillingProfileCustomerOverride struct {
	// BillingProfile The billing profile this override is associated with.
	//
	// If not provided, the default billing profile is chosen if available.
	BillingProfile *string `json:"billingProfile,omitempty"`

	// CreatedAt Timestamp of when the resource was created.
	CreatedAt time.Time `json:"createdAt"`

	// DeletedAt Timestamp of when the resource was permanently deleted.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`

	// UpdatedAt Timestamp of when the resource was last updated.
	UpdatedAt time.Time `json:"updatedAt"`

	// Workflow The details of the overrides active for this specific customer.
	Workflow *BillingProfileCustomerWorkflowOverride `json:"workflow,omitempty"`
}

BillingProfileCustomerOverride Customer specific workflow overrides.

type BillingProfileCustomerOverrideCreate

type BillingProfileCustomerOverrideCreate struct {
	// BillingProfile The billing profile this override is associated with.
	//
	// If not provided, the default billing profile is chosen if available.
	BillingProfile *string `json:"billingProfile,omitempty"`

	// Workflow The details of the overrides active for this specific customer.
	Workflow *BillingProfileCustomerWorkflowOverrideCreate `json:"workflow,omitempty"`
}

BillingProfileCustomerOverrideCreate Payload for creating a new or updating an existing customer override.

type BillingProfileCustomerOverrideOrderBy

type BillingProfileCustomerOverrideOrderBy string

BillingProfileCustomerOverrideOrderBy Order by options for customers.

const (
	BillingProfileCustomerOverrideOrderById BillingProfileCustomerOverrideOrderBy = "id"
)

Defines values for BillingProfileCustomerOverrideOrderBy.

type BillingProfileCustomerOverrideOrderByOrderingOrder

type BillingProfileCustomerOverrideOrderByOrderingOrder = SortOrder

BillingProfileCustomerOverrideOrderByOrderingOrder The order direction.

type BillingProfileCustomerOverrideOrderByOrderingOrderBy

type BillingProfileCustomerOverrideOrderByOrderingOrderBy = BillingProfileCustomerOverrideOrderBy

BillingProfileCustomerOverrideOrderByOrderingOrderBy Order by options for customers.

type BillingProfileCustomerOverridePaginatedResponse

type BillingProfileCustomerOverridePaginatedResponse struct {
	// Items The items in the current page.
	Items []BillingProfileCustomerOverride `json:"items"`

	// Page The items in the current page.
	Page int `json:"page"`

	// PageSize The items in the current page.
	PageSize int `json:"pageSize"`

	// TotalCount The items in the current page.
	TotalCount int `json:"totalCount"`
}

BillingProfileCustomerOverridePaginatedResponse Paginated response

type BillingProfileCustomerWorkflowOverride

type BillingProfileCustomerWorkflowOverride 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"`

	// InvoicingApp The invoicing app used for this workflow
	InvoicingApp App `json:"invoicingApp"`

	// Payment The payment settings for this workflow
	Payment *BillingWorkflowPaymentSettings `json:"payment,omitempty"`

	// PaymentApp The payment app used for this workflow
	PaymentApp App `json:"paymentApp"`

	// TaxApp The tax app used for this workflow
	TaxApp App `json:"taxApp"`
}

BillingProfileCustomerWorkflowOverride Customer specific workflow overrides.

type BillingProfileCustomerWorkflowOverrideCreate

type BillingProfileCustomerWorkflowOverrideCreate 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"`
}

BillingProfileCustomerWorkflowOverrideCreate Resource create operation model.

type BillingProfileExpand

type BillingProfileExpand string

BillingProfileExpand BillingProfileExpand details what profile fields to expand

const (
	BillingProfileExpandAll  BillingProfileExpand = "*"
	BillingProfileExpandApps BillingProfileExpand = "apps"
)

Defines values for BillingProfileExpand.

type BillingProfileOrderBy

type BillingProfileOrderBy string

BillingProfileOrderBy BillingProfileOrderBy specifies the ordering options for profiles

const (
	BillingProfileOrderByCreatedAt BillingProfileOrderBy = "createdAt"
	BillingProfileOrderByDefault   BillingProfileOrderBy = "default"
	BillingProfileOrderByName      BillingProfileOrderBy = "name"
	BillingProfileOrderByUpdatedAt BillingProfileOrderBy = "updatedAt"
)

Defines values for BillingProfileOrderBy.

type BillingProfileOrderByOrderingOrder

type BillingProfileOrderByOrderingOrder = SortOrder

BillingProfileOrderByOrderingOrder The order direction.

type BillingProfileOrderByOrderingOrderBy

type BillingProfileOrderByOrderingOrderBy = BillingProfileOrderBy

BillingProfileOrderByOrderingOrderBy BillingProfileOrderBy specifies the ordering options for profiles

type BillingProfilePaginatedResponse

type BillingProfilePaginatedResponse struct {
	// Items The items in the current page.
	Items []BillingProfile `json:"items"`

	// Page The items in the current page.
	Page int `json:"page"`

	// PageSize The items in the current page.
	PageSize int `json:"pageSize"`

	// TotalCount The items in the current page.
	TotalCount int `json:"totalCount"`
}

BillingProfilePaginatedResponse Paginated response

type BillingProfileReplaceUpdateWithWorkflow

type BillingProfileReplaceUpdateWithWorkflow struct {
	// Default Is this the default profile?
	Default bool `json:"default"`

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

	// Metadata Additional metadata for the resource.
	Metadata *Metadata `json:"metadata"`

	// Name Human-readable name for 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"`
}

BillingProfileReplaceUpdateWithWorkflow BillingProfileReplaceUpdate represents the input for updating a billing profile

The apps field cannot be updated directly, if an app change is desired a new profile should be created.

type BillingTaxIdentificationCode

type BillingTaxIdentificationCode = string

BillingTaxIdentificationCode TaxIdentificationCode is a normalized tax code shown on the original identity document.

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"`
}

BillingWorkflow BillingWorkflow represents the settings for a billing workflow.

type BillingWorkflowCollectionAlignment

type BillingWorkflowCollectionAlignment = BillingWorkflowCollectionAlignmentSubscription

BillingWorkflowCollectionAlignment BillingWorkflowCollectionAlignmentSubscription specifies the alignment for collecting the pending line items into an invoice.

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.

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 BillingWorkflowCreate

type BillingWorkflowCreate 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"`
}

BillingWorkflowCreate Resource create operation model.

type BillingWorkflowInvoicingSettings

type BillingWorkflowInvoicingSettings struct {
	// AutoAdvance Whether to automatically issue the invoice after the draftPeriod has passed.
	AutoAdvance *bool `json:"autoAdvance,omitempty"`

	// DefaultTaxConfig Default tax configuration to apply to the invoices.
	DefaultTaxConfig *TaxConfig `json:"defaultTaxConfig,omitempty"`

	// DraftPeriod The period for the invoice to be kept in draft status for manual reviews.
	DraftPeriod *string `json:"draftPeriod,omitempty"`

	// DueAfter The period after which the invoice is due.
	DueAfter *string `json:"dueAfter,omitempty"`

	// ProgressiveBilling Should progressive billing be allowed for this workflow?
	ProgressiveBilling *bool `json:"progressiveBilling,omitempty"`
}

BillingWorkflowInvoicingSettings BillingWorkflowInvoicingSettings represents the invoice settings for a billing workflow

type BillingWorkflowPaymentSettings

type BillingWorkflowPaymentSettings struct {
	// CollectionMethod The payment method for the invoice.
	CollectionMethod *CollectionMethod `json:"collectionMethod,omitempty"`
}

BillingWorkflowPaymentSettings BillingWorkflowPaymentSettings represents the payment settings for a billing workflow

type CancelSubscriptionJSONBody

type CancelSubscriptionJSONBody struct {
	// Timing If not provided the subscription is canceled immediately.
	Timing *SubscriptionTiming `json:"timing,omitempty"`
}

CancelSubscriptionJSONBody defines parameters for CancelSubscription.

type CancelSubscriptionJSONRequestBody

type CancelSubscriptionJSONRequestBody CancelSubscriptionJSONBody

CancelSubscriptionJSONRequestBody defines body for CancelSubscription for application/json ContentType.

type ChangeSubscriptionJSONRequestBody

type ChangeSubscriptionJSONRequestBody = SubscriptionChange

ChangeSubscriptionJSONRequestBody defines body for ChangeSubscription for application/json ContentType.

type CheckoutSessionCustomTextAfterSubmitParams

type CheckoutSessionCustomTextAfterSubmitParams struct {
	AfterSubmit *struct {
		Message *string `json:"message,omitempty"`
	} `json:"afterSubmit,omitempty"`
	ShippingAddress *struct {
		Message *string `json:"message,omitempty"`
	} `json:"shippingAddress,omitempty"`
	Submit *struct {
		Message *string `json:"message,omitempty"`
	} `json:"submit,omitempty"`
	TermsOfServiceAcceptance *struct {
		Message *string `json:"message,omitempty"`
	} `json:"termsOfServiceAcceptance,omitempty"`
}

CheckoutSessionCustomTextAfterSubmitParams Stripe CheckoutSession.custom_text

type CheckoutSessionUIMode

type CheckoutSessionUIMode string

CheckoutSessionUIMode Stripe CheckoutSession.ui_mode

const (
	CheckoutSessionUIModeEmbedded CheckoutSessionUIMode = "embedded"
	CheckoutSessionUIModeHosted   CheckoutSessionUIMode = "hosted"
)

Defines values for CheckoutSessionUIMode.

type ChiServerOptions

type ChiServerOptions struct {
	BaseURL          string
	BaseRouter       chi.Router
	Middlewares      []MiddlewareFunc
	ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type ClientAppStartResponse

type ClientAppStartResponse struct {
	// Url The URL to start the OAuth2 authorization code grant flow.
	Url string `json:"url"`
}

ClientAppStartResponse Response from the client app (OpenMeter backend) to start the OAuth2 flow.

type CollectionMethod

type CollectionMethod string

CollectionMethod CollectionMethod specifies how the invoice should be collected (automatic vs manual)

const (
	CollectionMethodChargeAutomatically CollectionMethod = "charge_automatically"
	CollectionMethodSendInvoice         CollectionMethod = "send_invoice"
)

Defines values for CollectionMethod.

type ConflictProblemResponse

type ConflictProblemResponse = UnexpectedProblemResponse

ConflictProblemResponse A Problem Details object (RFC 7807). Additional properties specific to the problem type may be present.

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 CreateBillingProfileJSONRequestBody

type CreateBillingProfileJSONRequestBody = BillingProfileCreate

CreateBillingProfileJSONRequestBody defines body for CreateBillingProfile for application/json ContentType.

type CreateCheckoutSessionTaxIdCollection

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

	// Required Describes whether a tax ID is required during checkout. Defaults to never.
	Required *CreateCheckoutSessionTaxIdCollectionRequired `json:"required,omitempty"`
}

CreateCheckoutSessionTaxIdCollection Create Stripe checkout session tax ID collection.

type CreateCheckoutSessionTaxIdCollectionRequired

type CreateCheckoutSessionTaxIdCollectionRequired string

CreateCheckoutSessionTaxIdCollectionRequired Create Stripe checkout session tax ID collection required.

const (
	CreateCheckoutSessionTaxIdCollectionRequiredIfSupported CreateCheckoutSessionTaxIdCollectionRequired = "if_supported"
	CreateCheckoutSessionTaxIdCollectionRequiredNever       CreateCheckoutSessionTaxIdCollectionRequired = "never"
)

Defines values for CreateCheckoutSessionTaxIdCollectionRequired.

type CreateCustomerJSONRequestBody

type CreateCustomerJSONRequestBody = CustomerCreate

CreateCustomerJSONRequestBody defines body for CreateCustomer for application/json ContentType.

type CreateEntitlementJSONRequestBody

type CreateEntitlementJSONRequestBody = EntitlementCreateInputs

CreateEntitlementJSONRequestBody defines body for CreateEntitlement for application/json ContentType.

type CreateFeatureJSONRequestBody

type CreateFeatureJSONRequestBody = FeatureCreateInputs

CreateFeatureJSONRequestBody defines body for CreateFeature for application/json ContentType.

type CreateGrantJSONRequestBody

type CreateGrantJSONRequestBody = EntitlementGrantCreateInput

CreateGrantJSONRequestBody defines body for CreateGrant for application/json ContentType.

type CreateNotificationChannelJSONRequestBody

type CreateNotificationChannelJSONRequestBody = NotificationChannelCreateRequest

CreateNotificationChannelJSONRequestBody defines body for CreateNotificationChannel for application/json ContentType.

type CreateNotificationRuleJSONRequestBody

type CreateNotificationRuleJSONRequestBody = NotificationRuleCreateRequest

CreateNotificationRuleJSONRequestBody defines body for CreateNotificationRule for application/json ContentType.

type CreatePendingInvoiceLineJSONBody

type CreatePendingInvoiceLineJSONBody = []InvoicePendingLineCreate

CreatePendingInvoiceLineJSONBody defines parameters for CreatePendingInvoiceLine.

type CreatePendingInvoiceLineJSONRequestBody

type CreatePendingInvoiceLineJSONRequestBody = CreatePendingInvoiceLineJSONBody

CreatePendingInvoiceLineJSONRequestBody defines body for CreatePendingInvoiceLine for application/json ContentType.

type CreatePlanJSONRequestBody

type CreatePlanJSONRequestBody = PlanCreate

CreatePlanJSONRequestBody defines body for CreatePlan for application/json ContentType.

type CreatePortalTokenJSONRequestBody

type CreatePortalTokenJSONRequestBody = PortalToken

CreatePortalTokenJSONRequestBody defines body for CreatePortalToken for application/json ContentType.

type CreateStripeCheckoutSessionBillingAddressCollection

type CreateStripeCheckoutSessionBillingAddressCollection string

CreateStripeCheckoutSessionBillingAddressCollection Specify whether Checkout should collect the customer’s billing address.

const (
	CreateStripeCheckoutSessionBillingAddressCollectionAuto     CreateStripeCheckoutSessionBillingAddressCollection = "auto"
	CreateStripeCheckoutSessionBillingAddressCollectionRequired CreateStripeCheckoutSessionBillingAddressCollection = "required"
)

Defines values for CreateStripeCheckoutSessionBillingAddressCollection.

type CreateStripeCheckoutSessionConsentCollection

type CreateStripeCheckoutSessionConsentCollection struct {
	// PaymentMethodReuseAgreement Determines the position and visibility of the payment method reuse agreement in the UI.
	// When set to auto, Stripe’s defaults will be used. When set to hidden, the payment method reuse agreement text will always be hidden in the UI.
	PaymentMethodReuseAgreement *CreateStripeCheckoutSessionConsentCollectionPaymentMethodReuseAgreement `json:"paymentMethodReuseAgreement,omitempty"`

	// Promotions If set to auto, enables the collection of customer consent for promotional communications.
	// The Checkout Session will determine whether to display an option to opt into promotional
	// communication from the merchant depending on the customer’s locale. Only available to US merchants.
	Promotions *CreateStripeCheckoutSessionConsentCollectionPromotions `json:"promotions,omitempty"`

	// TermsOfService If set to required, it requires customers to check a terms of service checkbox before being able to pay.
	// There must be a valid terms of service URL set in your Stripe Dashboard settings.
	// https://dashboard.stripe.com/settings/public
	TermsOfService *CreateStripeCheckoutSessionConsentCollectionTermsOfService `json:"termsOfService,omitempty"`
}

CreateStripeCheckoutSessionConsentCollection Configure fields for the Checkout Session to gather active consent from customers.

type CreateStripeCheckoutSessionConsentCollectionPaymentMethodReuseAgreement

type CreateStripeCheckoutSessionConsentCollectionPaymentMethodReuseAgreement struct {
	// Position Create Stripe checkout session consent collection agreement position.
	Position *CreateStripeCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition `json:"position,omitempty"`
}

CreateStripeCheckoutSessionConsentCollectionPaymentMethodReuseAgreement Create Stripe checkout session payment method reuse agreement.

type CreateStripeCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition

type CreateStripeCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition string

CreateStripeCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition Create Stripe checkout session consent collection agreement position.

const (
	CreateStripeCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPositionAuto   CreateStripeCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition = "auto"
	CreateStripeCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPositionHidden CreateStripeCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition = "hidden"
)

Defines values for CreateStripeCheckoutSessionConsentCollectionPaymentMethodReuseAgreementPosition.

type CreateStripeCheckoutSessionConsentCollectionPromotions

type CreateStripeCheckoutSessionConsentCollectionPromotions string

CreateStripeCheckoutSessionConsentCollectionPromotions Create Stripe checkout session consent collection promotions.

const (
	CreateStripeCheckoutSessionConsentCollectionPromotionsAuto CreateStripeCheckoutSessionConsentCollectionPromotions = "auto"
	CreateStripeCheckoutSessionConsentCollectionPromotionsNone CreateStripeCheckoutSessionConsentCollectionPromotions = "none"
)

Defines values for CreateStripeCheckoutSessionConsentCollectionPromotions.

type CreateStripeCheckoutSessionConsentCollectionTermsOfService

type CreateStripeCheckoutSessionConsentCollectionTermsOfService string

CreateStripeCheckoutSessionConsentCollectionTermsOfService Create Stripe checkout session consent collection terms of service.

const (
	CreateStripeCheckoutSessionConsentCollectionTermsOfServiceNone     CreateStripeCheckoutSessionConsentCollectionTermsOfService = "none"
	CreateStripeCheckoutSessionConsentCollectionTermsOfServiceRequired CreateStripeCheckoutSessionConsentCollectionTermsOfService = "required"
)

Defines values for CreateStripeCheckoutSessionConsentCollectionTermsOfService.

type CreateStripeCheckoutSessionCustomerUpdate

type CreateStripeCheckoutSessionCustomerUpdate struct {
	// Address Describes whether Checkout saves the billing address onto customer.address.
	// To always collect a full billing address, use billing_address_collection.
	// Defaults to never.
	Address *CreateStripeCheckoutSessionCustomerUpdateBehavior `json:"address,omitempty"`

	// Name Describes whether Checkout saves the name onto customer.name.
	// Defaults to never.
	Name *CreateStripeCheckoutSessionCustomerUpdateBehavior `json:"name,omitempty"`

	// Shipping Describes whether Checkout saves shipping information onto customer.shipping.
	// To collect shipping information, use shipping_address_collection.
	// Defaults to never.
	Shipping *CreateStripeCheckoutSessionCustomerUpdateBehavior `json:"shipping,omitempty"`
}

CreateStripeCheckoutSessionCustomerUpdate Controls what fields on Customer can be updated by the Checkout Session.

type CreateStripeCheckoutSessionCustomerUpdateBehavior

type CreateStripeCheckoutSessionCustomerUpdateBehavior string

CreateStripeCheckoutSessionCustomerUpdateBehavior Create Stripe checkout session customer update behavior.

const (
	CreateStripeCheckoutSessionCustomerUpdateBehaviorAuto  CreateStripeCheckoutSessionCustomerUpdateBehavior = "auto"
	CreateStripeCheckoutSessionCustomerUpdateBehaviorNever CreateStripeCheckoutSessionCustomerUpdateBehavior = "never"
)

Defines values for CreateStripeCheckoutSessionCustomerUpdateBehavior.

type CreateStripeCheckoutSessionJSONRequestBody

type CreateStripeCheckoutSessionJSONRequestBody = CreateStripeCheckoutSessionRequest

CreateStripeCheckoutSessionJSONRequestBody defines body for CreateStripeCheckoutSession for application/json ContentType.

type CreateStripeCheckoutSessionRedirectOnCompletion

type CreateStripeCheckoutSessionRedirectOnCompletion string

CreateStripeCheckoutSessionRedirectOnCompletion Create Stripe checkout session redirect on completion.

const (
	CreateStripeCheckoutSessionRedirectOnCompletionAlways     CreateStripeCheckoutSessionRedirectOnCompletion = "always"
	CreateStripeCheckoutSessionRedirectOnCompletionIfRequired CreateStripeCheckoutSessionRedirectOnCompletion = "if_required"
	CreateStripeCheckoutSessionRedirectOnCompletionNever      CreateStripeCheckoutSessionRedirectOnCompletion = "never"
)

Defines values for CreateStripeCheckoutSessionRedirectOnCompletion.

type CreateStripeCheckoutSessionRequest

type CreateStripeCheckoutSessionRequest struct {
	// AppId If not provided, the default Stripe app is used if any.
	AppId *string `json:"appId,omitempty"`

	// Customer Provide a customer ID or key to use an existing OpenMeter customer.
	// or provide a customer object to create a new customer.
	Customer CreateStripeCheckoutSessionRequest_Customer `json:"customer"`

	// Options Options passed to Stripe when creating the checkout session.
	Options CreateStripeCheckoutSessionRequestOptions `json:"options"`

	// StripeCustomerId Stripe customer ID.
	// If not provided OpenMeter creates a new Stripe customer or
	// uses the OpenMeter customer's default Stripe customer ID.
	StripeCustomerId *string `json:"stripeCustomerId,omitempty"`
}

CreateStripeCheckoutSessionRequest Create Stripe checkout session request.

type CreateStripeCheckoutSessionRequestOptions

type CreateStripeCheckoutSessionRequestOptions struct {
	// BillingAddressCollection Specify whether Checkout should collect the customer’s billing address. Defaults to auto.
	BillingAddressCollection *CreateStripeCheckoutSessionBillingAddressCollection `json:"billingAddressCollection,omitempty"`

	// CancelURL If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.
	// This parameter is not allowed if ui_mode is embedded.
	CancelURL *string `json:"cancelURL,omitempty"`

	// ClientReferenceID A unique string to reference the Checkout Session. This can be a customer ID, a cart ID, or similar, and can be used to reconcile the session with your internal systems.
	ClientReferenceID *string `json:"clientReferenceID,omitempty"`

	// ConsentCollection Configure fields for the Checkout Session to gather active consent from customers.
	ConsentCollection *CreateStripeCheckoutSessionConsentCollection `json:"consentCollection,omitempty"`

	// Currency Three-letter ISO currency code, in lowercase.
	Currency *CurrencyCode `json:"currency,omitempty"`

	// CustomText Display additional text for your customers using custom text.
	CustomText *CheckoutSessionCustomTextAfterSubmitParams `json:"customText,omitempty"`

	// CustomerUpdate Controls what fields on Customer can be updated by the Checkout Session.
	CustomerUpdate *CreateStripeCheckoutSessionCustomerUpdate `json:"customerUpdate,omitempty"`

	// ExpiresAt The Epoch time in seconds at which the Checkout Session will expire.
	// It can be anywhere from 30 minutes to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation.
	ExpiresAt *int64  `json:"expiresAt,omitempty"`
	Locale    *string `json:"locale,omitempty"`

	// Metadata Set of key-value pairs that you can attach to an object.
	// This can be useful for storing additional information about the object in a structured format.
	// Individual keys can be unset by posting an empty value to them.
	// All keys can be unset by posting an empty value to metadata.
	Metadata *map[string]string `json:"metadata,omitempty"`

	// PaymentMethodTypes A list of the types of payment methods (e.g., card) this Checkout Session can accept.
	PaymentMethodTypes *[]string `json:"paymentMethodTypes,omitempty"`

	// RedirectOnCompletion This parameter applies to ui_mode: embedded. Defaults to always.
	// Learn more about the redirect behavior of embedded sessions at
	// https://docs.stripe.com/payments/checkout/custom-success-page?payment-ui=embedded-form
	RedirectOnCompletion *CreateStripeCheckoutSessionRedirectOnCompletion `json:"redirectOnCompletion,omitempty"`
	ReturnURL            *string                                          `json:"returnURL,omitempty"`

	// SuccessURL The URL to which Stripe should send customers when payment or setup is complete.
	// This parameter is not allowed if ui_mode is embedded.
	// If you’d like to use information from the successful Checkout Session on your page, read the guide on customizing your success page:
	// https://docs.stripe.com/payments/checkout/custom-success-page
	SuccessURL *string `json:"successURL,omitempty"`

	// TaxIdCollection Controls tax ID collection during checkout.
	TaxIdCollection *CreateCheckoutSessionTaxIdCollection `json:"taxIdCollection,omitempty"`

	// UiMode The UI mode of the Session. Defaults to hosted.
	UiMode *CheckoutSessionUIMode `json:"uiMode,omitempty"`
}

CreateStripeCheckoutSessionRequestOptions Create Stripe checkout session options See https://docs.stripe.com/api/checkout/sessions/create

type CreateStripeCheckoutSessionRequest_Customer

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

CreateStripeCheckoutSessionRequest_Customer Provide a customer ID or key to use an existing OpenMeter customer. or provide a customer object to create a new customer.

func (CreateStripeCheckoutSessionRequest_Customer) AsCustomerCreate

AsCustomerCreate returns the union data inside the CreateStripeCheckoutSessionRequest_Customer as a CustomerCreate

func (CreateStripeCheckoutSessionRequest_Customer) AsCustomerId

AsCustomerId returns the union data inside the CreateStripeCheckoutSessionRequest_Customer as a CustomerId

func (CreateStripeCheckoutSessionRequest_Customer) AsCustomerKey

AsCustomerKey returns the union data inside the CreateStripeCheckoutSessionRequest_Customer as a CustomerKey

func (*CreateStripeCheckoutSessionRequest_Customer) FromCustomerCreate

FromCustomerCreate overwrites any union data inside the CreateStripeCheckoutSessionRequest_Customer as the provided CustomerCreate

func (*CreateStripeCheckoutSessionRequest_Customer) FromCustomerId

FromCustomerId overwrites any union data inside the CreateStripeCheckoutSessionRequest_Customer as the provided CustomerId

func (*CreateStripeCheckoutSessionRequest_Customer) FromCustomerKey

FromCustomerKey overwrites any union data inside the CreateStripeCheckoutSessionRequest_Customer as the provided CustomerKey

func (CreateStripeCheckoutSessionRequest_Customer) MarshalJSON

func (*CreateStripeCheckoutSessionRequest_Customer) MergeCustomerCreate

MergeCustomerCreate performs a merge with any union data inside the CreateStripeCheckoutSessionRequest_Customer, using the provided CustomerCreate

func (*CreateStripeCheckoutSessionRequest_Customer) MergeCustomerId

MergeCustomerId performs a merge with any union data inside the CreateStripeCheckoutSessionRequest_Customer, using the provided CustomerId

func (*CreateStripeCheckoutSessionRequest_Customer) MergeCustomerKey

MergeCustomerKey performs a merge with any union data inside the CreateStripeCheckoutSessionRequest_Customer, using the provided CustomerKey

func (*CreateStripeCheckoutSessionRequest_Customer) UnmarshalJSON

type CreateStripeCheckoutSessionResult

type CreateStripeCheckoutSessionResult struct {
	// CancelURL Cancel URL.
	CancelURL *string `json:"cancelURL,omitempty"`

	// CustomerId The OpenMeter customer ID.
	CustomerId string `json:"customerId"`

	// Mode Mode
	// Always `setup` for now.
	Mode StripeCheckoutSessionMode `json:"mode"`

	// ReturnURL Return URL.
	ReturnURL *string `json:"returnURL,omitempty"`

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

	// SetupIntentId The checkout session setup intent ID.
	SetupIntentId string `json:"setupIntentId"`

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

	// SuccessURL Success URL.
	SuccessURL *string `json:"successURL,omitempty"`

	// Url URL to show the checkout session.
	Url *string `json:"url,omitempty"`
}

CreateStripeCheckoutSessionResult Create Stripe Checkout Session response.

type CreateSubscriptionJSONRequestBody

type CreateSubscriptionJSONRequestBody = SubscriptionCreate

CreateSubscriptionJSONRequestBody defines body for CreateSubscription for application/json ContentType.

type CreditNoteOriginalInvoiceRef

type CreditNoteOriginalInvoiceRef = InvoiceGenericDocumentRef

CreditNoteOriginalInvoiceRef Omitted fields: period: Tax period in which the referred document had an effect required by some tax regimes and formats. stamps: Seals of approval from other organisations that may need to be listed. ext: Extensions for additional codes that may be required.

type Currency

type Currency struct {
	// Code The currency ISO code.
	Code CurrencyCode `json:"code"`

	// Name The currency name.
	Name string `json:"name"`

	// Subunits Subunit of the currency.
	Subunits uint32 `json:"subunits"`

	// Symbol The currency symbol.
	Symbol string `json:"symbol"`
}

Currency Currency describes a currency supported by OpenMeter.

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 CustomPlanInput

type CustomPlanInput struct {
	// Alignment Alignment configuration for the plan.
	Alignment *Alignment `json:"alignment,omitempty"`

	// Currency The currency code of the plan.
	Currency CurrencyCode `json:"currency"`

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

	// Metadata Additional metadata for the resource.
	Metadata *Metadata `json:"metadata"`

	// Name Human-readable name for the resource. Between 1 and 256 characters.
	Name string `json:"name"`

	// Phases The plan phase or pricing ramp allows changing a plan's rate cards over time as a subscription progresses.
	// A phase switch occurs only at the end of a billing period, ensuring that a single subscription invoice will not include charges from different phase prices.
	Phases []PlanPhase `json:"phases"`
}

CustomPlanInput The template for omitting properties.

type CustomSubscriptionChange

type CustomSubscriptionChange struct {
	// CustomPlan The custom plan description which defines the Subscription.
	CustomPlan CustomPlanInput `json:"customPlan"`

	// 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 SubscriptionTiming `json:"timing"`
}

CustomSubscriptionChange Change a custom subscription.

type CustomSubscriptionCreate

type CustomSubscriptionCreate struct {
	// CustomPlan The custom plan description which defines the Subscription.
	CustomPlan CustomPlanInput `json:"customPlan"`

	// CustomerId The ID of the customer. Provide either the key or ID. Has presedence over the key.
	CustomerId *string `json:"customerId,omitempty"`

	// CustomerKey The key of the customer. Provide either the key or ID.
	CustomerKey *string `json:"customerKey,omitempty"`

	// Timing Timing configuration for the change, when the change should take effect.
	// The default is immediate.
	Timing *SubscriptionTiming `json:"timing,omitempty"`
}

CustomSubscriptionCreate Create a custom subscription.

type Customer

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

	// CreatedAt Timestamp of when the resource was created.
	CreatedAt time.Time `json:"createdAt"`

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

	// CurrentSubscriptionId The ID of the Subscription if the customer has one.
	CurrentSubscriptionId *string `json:"currentSubscriptionId,omitempty"`

	// DeletedAt Timestamp of when the resource was permanently deleted.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`

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

	// Id A unique identifier for the resource.
	Id string `json:"id"`

	// Key An optional unique key of the customer.
	// Useful to reference the customer in external systems.
	// For example, your database ID.
	Key *string `json:"key,omitempty"`

	// Metadata Additional metadata for the resource.
	Metadata *Metadata `json:"metadata"`

	// Name Human-readable name for the resource. Between 1 and 256 characters.
	Name string `json:"name"`

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

	// UpdatedAt Timestamp of when the resource was last updated.
	UpdatedAt time.Time `json:"updatedAt"`

	// UsageAttribution Mapping to attribute metered usage to the customer
	UsageAttribution CustomerUsageAttribution `json:"usageAttribution"`
}

Customer A customer object.

type CustomerAppData

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

CustomerAppData CustomerAppData Stores the app specific data for the customer. One of: stripe, sandbox

func (CustomerAppData) AsSandboxCustomerAppData

func (t CustomerAppData) AsSandboxCustomerAppData() (SandboxCustomerAppData, error)

AsSandboxCustomerAppData returns the union data inside the CustomerAppData as a SandboxCustomerAppData

func (CustomerAppData) AsStripeCustomerAppData

func (t CustomerAppData) AsStripeCustomerAppData() (StripeCustomerAppData, error)

AsStripeCustomerAppData returns the union data inside the CustomerAppData as a StripeCustomerAppData

func (CustomerAppData) Discriminator

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

func (*CustomerAppData) FromSandboxCustomerAppData

func (t *CustomerAppData) FromSandboxCustomerAppData(v SandboxCustomerAppData) error

FromSandboxCustomerAppData overwrites any union data inside the CustomerAppData as the provided SandboxCustomerAppData

func (*CustomerAppData) FromStripeCustomerAppData

func (t *CustomerAppData) FromStripeCustomerAppData(v StripeCustomerAppData) error

FromStripeCustomerAppData overwrites any union data inside the CustomerAppData as the provided StripeCustomerAppData

func (CustomerAppData) MarshalJSON

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

func (*CustomerAppData) MergeSandboxCustomerAppData

func (t *CustomerAppData) MergeSandboxCustomerAppData(v SandboxCustomerAppData) error

MergeSandboxCustomerAppData performs a merge with any union data inside the CustomerAppData, using the provided SandboxCustomerAppData

func (*CustomerAppData) MergeStripeCustomerAppData

func (t *CustomerAppData) MergeStripeCustomerAppData(v StripeCustomerAppData) error

MergeStripeCustomerAppData performs a merge with any union data inside the CustomerAppData, using the provided StripeCustomerAppData

func (*CustomerAppData) UnmarshalJSON

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

func (CustomerAppData) ValueByDiscriminator

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

type CustomerAppDataPaginatedResponse

type CustomerAppDataPaginatedResponse struct {
	// Items The items in the current page.
	Items []CustomerAppData `json:"items"`

	// Page The items in the current page.
	Page int `json:"page"`

	// PageSize The items in the current page.
	PageSize int `json:"pageSize"`

	// TotalCount The items in the current page.
	TotalCount int `json:"totalCount"`
}

CustomerAppDataPaginatedResponse Paginated response

type CustomerCreate

type CustomerCreate struct {
	// BillingAddress The billing address of the customer.
	// Used for tax and invoicing.
	BillingAddress *Address `json:"billingAddress,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 An optional unique key of the customer.
	// Useful to reference the customer in external systems.
	// For example, your database ID.
	Key *string `json:"key,omitempty"`

	// Metadata Additional metadata for the resource.
	Metadata *Metadata `json:"metadata"`

	// Name Human-readable name for the resource. Between 1 and 256 characters.
	Name string `json:"name"`

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

	// UsageAttribution Mapping to attribute metered usage to the customer
	UsageAttribution CustomerUsageAttribution `json:"usageAttribution"`
}

CustomerCreate Resource create operation model.

type CustomerId

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

CustomerId Create Stripe checkout session with customer ID.

type CustomerKey

type CustomerKey struct {
	Key string `json:"key"`
}

CustomerKey Create Stripe checkout session with customer key.

type CustomerOrderBy

type CustomerOrderBy string

CustomerOrderBy Order by options for customers.

const (
	CustomerOrderByCreatedAt CustomerOrderBy = "createdAt"
	CustomerOrderById        CustomerOrderBy = "id"
	CustomerOrderByName      CustomerOrderBy = "name"
)

Defines values for CustomerOrderBy.

type CustomerOrderByOrderingOrder

type CustomerOrderByOrderingOrder = SortOrder

CustomerOrderByOrderingOrder The order direction.

type CustomerOrderByOrderingOrderBy

type CustomerOrderByOrderingOrderBy = CustomerOrderBy

CustomerOrderByOrderingOrderBy Order by options for customers.

type CustomerPaginatedResponse

type CustomerPaginatedResponse struct {
	// Items The items in the current page.
	Items []Customer `json:"items"`

	// Page The items in the current page.
	Page int `json:"page"`

	// PageSize The items in the current page.
	PageSize int `json:"pageSize"`

	// TotalCount The items in the current page.
	TotalCount int `json:"totalCount"`
}

CustomerPaginatedResponse Paginated response

type CustomerReplaceUpdate

type CustomerReplaceUpdate struct {
	// BillingAddress The billing address of the customer.
	// Used for tax and invoicing.
	BillingAddress *Address `json:"billingAddress,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 An optional unique key of the customer.
	// Useful to reference the customer in external systems.
	// For example, your database ID.
	Key *string `json:"key,omitempty"`

	// Metadata Additional metadata for the resource.
	Metadata *Metadata `json:"metadata"`

	// Name Human-readable name for the resource. Between 1 and 256 characters.
	Name string `json:"name"`

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

	// UsageAttribution Mapping to attribute metered usage to the customer
	UsageAttribution CustomerUsageAttribution `json:"usageAttribution"`
}

CustomerReplaceUpdate Resource update operation model.

type CustomerUsageAttribution

type CustomerUsageAttribution struct {
	// SubjectKeys The subjects that are attributed to the customer.
	SubjectKeys []string `json:"subjectKeys"`
}

CustomerUsageAttribution Mapping to attribute metered usage to the customer. One customer can have multiple subjects, but one subject can only belong to one customer.

type Discount

type Discount = DiscountPercentage

Discount Percentage discount.

type DiscountPercentage

type DiscountPercentage struct {
	// Percentage The percentage of the discount.
	Percentage float32 `json:"percentage"`

	// RateCards The rate cards that the discount applies to.
	// When not specified, the discount applies to all rate cards.
	RateCards *[]string `json:"rateCards,omitempty"`

	// Type The type of the discount.
	Type DiscountPercentageType `json:"type"`
}

DiscountPercentage Percentage discount.

type DiscountPercentageType

type DiscountPercentageType string

DiscountPercentageType The type of the discount.

const (
	DiscountPercentageTypePercentage DiscountPercentageType = "percentage"
)

Defines values for DiscountPercentageType.

type EditSubscriptionAddItem

type EditSubscriptionAddItem struct {
	Op       EditSubscriptionAddItemOp `json:"op"`
	PhaseKey string                    `json:"phaseKey"`

	// RateCard A rate card defines the pricing and entitlement of a feature or service.
	RateCard RateCard `json:"rateCard"`
}

EditSubscriptionAddItem Add a new item to a phase.

type EditSubscriptionAddItemOp

type EditSubscriptionAddItemOp string

EditSubscriptionAddItemOp defines model for EditSubscriptionAddItem.Op.

const (
	EditSubscriptionAddItemOpAddItem EditSubscriptionAddItemOp = "add_item"
)

Defines values for EditSubscriptionAddItemOp.

type EditSubscriptionAddPhase

type EditSubscriptionAddPhase struct {
	Op EditSubscriptionAddPhaseOp `json:"op"`

	// Phase Subscription phase create input.
	Phase SubscriptionPhaseCreate `json:"phase"`
}

EditSubscriptionAddPhase Add a new phase

type EditSubscriptionAddPhaseOp

type EditSubscriptionAddPhaseOp string

EditSubscriptionAddPhaseOp defines model for EditSubscriptionAddPhase.Op.

const (
	EditSubscriptionAddPhaseOpAddPhase EditSubscriptionAddPhaseOp = "add_phase"
)

Defines values for EditSubscriptionAddPhaseOp.

type EditSubscriptionJSONRequestBody

type EditSubscriptionJSONRequestBody = SubscriptionEdit

EditSubscriptionJSONRequestBody defines body for EditSubscription for application/json ContentType.

type EditSubscriptionRemoveItem

type EditSubscriptionRemoveItem struct {
	ItemKey  string                       `json:"itemKey"`
	Op       EditSubscriptionRemoveItemOp `json:"op"`
	PhaseKey string                       `json:"phaseKey"`
}

EditSubscriptionRemoveItem Remove an item from a phase.

type EditSubscriptionRemoveItemOp

type EditSubscriptionRemoveItemOp string

EditSubscriptionRemoveItemOp defines model for EditSubscriptionRemoveItem.Op.

const (
	EditSubscriptionRemoveItemOpRemoveItem EditSubscriptionRemoveItemOp = "remove_item"
)

Defines values for EditSubscriptionRemoveItemOp.

type EditSubscriptionRemovePhase

type EditSubscriptionRemovePhase struct {
	Op       EditSubscriptionRemovePhaseOp `json:"op"`
	PhaseKey string                        `json:"phaseKey"`

	// Shift The direction of the phase shift when a phase is removed.
	Shift RemovePhaseShifting `json:"shift"`
}

EditSubscriptionRemovePhase Remove a phase

type EditSubscriptionRemovePhaseOp

type EditSubscriptionRemovePhaseOp string

EditSubscriptionRemovePhaseOp defines model for EditSubscriptionRemovePhase.Op.

const (
	EditSubscriptionRemovePhaseOpRemovePhase EditSubscriptionRemovePhaseOp = "remove_phase"
)

Defines values for EditSubscriptionRemovePhaseOp.

type EditSubscriptionStretchPhase

type EditSubscriptionStretchPhase struct {
	ExtendBy string                         `json:"extendBy"`
	Op       EditSubscriptionStretchPhaseOp `json:"op"`
	PhaseKey string                         `json:"phaseKey"`
}

EditSubscriptionStretchPhase Stretch a phase

type EditSubscriptionStretchPhaseOp

type EditSubscriptionStretchPhaseOp string

EditSubscriptionStretchPhaseOp defines model for EditSubscriptionStretchPhase.Op.

const (
	EditSubscriptionStretchPhaseOpStretchPhase EditSubscriptionStretchPhaseOp = "stretch_phase"
)

Defines values for EditSubscriptionStretchPhaseOp.

type EditSubscriptionUnscheduleEdit

type EditSubscriptionUnscheduleEdit struct {
	Op EditSubscriptionUnscheduleEditOp `json:"op"`
}

EditSubscriptionUnscheduleEdit Unschedules any edits from the current phase.

type EditSubscriptionUnscheduleEditOp

type EditSubscriptionUnscheduleEditOp string

EditSubscriptionUnscheduleEditOp defines model for EditSubscriptionUnscheduleEdit.Op.

const (
	EditSubscriptionUnscheduleEditOpUnscheduleEdit EditSubscriptionUnscheduleEditOp = "unschedule_edit"
)

Defines values for EditSubscriptionUnscheduleEditOp.

type Entitlement

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

Entitlement Entitlement templates are used to define the entitlements of a plan. Features are omitted from the entitlement template, as they are defined in the rate card.

func (Entitlement) AsEntitlementBoolean

func (t Entitlement) AsEntitlementBoolean() (EntitlementBoolean, error)

AsEntitlementBoolean returns the union data inside the Entitlement as a EntitlementBoolean

func (Entitlement) AsEntitlementMetered

func (t Entitlement) AsEntitlementMetered() (EntitlementMetered, error)

AsEntitlementMetered returns the union data inside the Entitlement as a EntitlementMetered

func (Entitlement) AsEntitlementStatic

func (t Entitlement) AsEntitlementStatic() (EntitlementStatic, error)

AsEntitlementStatic returns the union data inside the Entitlement as a EntitlementStatic

func (Entitlement) Discriminator

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

func (*Entitlement) FromEntitlementBoolean

func (t *Entitlement) FromEntitlementBoolean(v EntitlementBoolean) error

FromEntitlementBoolean overwrites any union data inside the Entitlement as the provided EntitlementBoolean

func (*Entitlement) FromEntitlementMetered

func (t *Entitlement) FromEntitlementMetered(v EntitlementMetered) error

FromEntitlementMetered overwrites any union data inside the Entitlement as the provided EntitlementMetered

func (*Entitlement) FromEntitlementStatic

func (t *Entitlement) FromEntitlementStatic(v EntitlementStatic) error

FromEntitlementStatic overwrites any union data inside the Entitlement as the provided EntitlementStatic

func (Entitlement) MarshalJSON

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

func (*Entitlement) MergeEntitlementBoolean

func (t *Entitlement) MergeEntitlementBoolean(v EntitlementBoolean) error

MergeEntitlementBoolean performs a merge with any union data inside the Entitlement, using the provided EntitlementBoolean

func (*Entitlement) MergeEntitlementMetered

func (t *Entitlement) MergeEntitlementMetered(v EntitlementMetered) error

MergeEntitlementMetered performs a merge with any union data inside the Entitlement, using the provided EntitlementMetered

func (*Entitlement) MergeEntitlementStatic

func (t *Entitlement) MergeEntitlementStatic(v EntitlementStatic) error

MergeEntitlementStatic performs a merge with any union data inside the Entitlement, using the provided EntitlementStatic

func (*Entitlement) UnmarshalJSON

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

func (Entitlement) ValueByDiscriminator

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

type EntitlementBaseTemplate

type EntitlementBaseTemplate struct {
	// ActiveFrom The cadence start of the resource.
	ActiveFrom time.Time `json:"activeFrom"`

	// ActiveTo The cadence end of the resource.
	ActiveTo *time.Time `json:"activeTo,omitempty"`

	// CreatedAt Timestamp of when the resource was created.
	CreatedAt time.Time `json:"createdAt"`

	// CurrentUsagePeriod The current usage period.
	CurrentUsagePeriod *Period `json:"currentUsagePeriod,omitempty"`

	// DeletedAt Timestamp of when the resource was permanently deleted.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`

	// FeatureId The feature the subject is entitled to use.
	FeatureId string `json:"featureId"`

	// FeatureKey The feature the subject is entitled to use.
	FeatureKey string `json:"featureKey"`

	// Id Readonly unique ULID identifier.
	Id string `json:"id"`

	// Metadata Additional metadata for the feature.
	Metadata *Metadata `json:"metadata,omitempty"`

	// SubjectKey The identifier key unique to the subject
	SubjectKey string `json:"subjectKey"`

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

	// UpdatedAt Timestamp of when the resource was last updated.
	UpdatedAt time.Time `json:"updatedAt"`

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

EntitlementBaseTemplate Shared fields of the entitlement templates.

type EntitlementBoolean

type EntitlementBoolean = EntitlementBaseTemplate

EntitlementBoolean Shared fields of the entitlement templates.

type EntitlementBooleanCreateInputs

type EntitlementBooleanCreateInputs struct {
	// FeatureId The feature the subject is entitled to use.
	// Either featureKey or featureId is required.
	FeatureId *string `json:"featureId,omitempty"`

	// FeatureKey The feature the subject is entitled to use.
	// Either featureKey or featureId is required.
	FeatureKey *string `json:"featureKey,omitempty"`

	// Metadata Additional metadata for the feature.
	Metadata *Metadata                          `json:"metadata,omitempty"`
	Type     EntitlementBooleanCreateInputsType `json:"type"`

	// UsagePeriod The usage period associated with the entitlement.
	UsagePeriod *RecurringPeriodCreateInput `json:"usagePeriod,omitempty"`
}

EntitlementBooleanCreateInputs Create inputs for boolean entitlement

type EntitlementBooleanCreateInputsType

type EntitlementBooleanCreateInputsType string

EntitlementBooleanCreateInputsType defines model for EntitlementBooleanCreateInputs.Type.

const (
	EntitlementBooleanCreateInputsTypeBoolean EntitlementBooleanCreateInputsType = "boolean"
)

Defines values for EntitlementBooleanCreateInputsType.

type EntitlementCreateInputs

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

EntitlementCreateInputs Create inputs for entitlement

func (EntitlementCreateInputs) AsEntitlementBooleanCreateInputs

func (t EntitlementCreateInputs) AsEntitlementBooleanCreateInputs() (EntitlementBooleanCreateInputs, error)

AsEntitlementBooleanCreateInputs returns the union data inside the EntitlementCreateInputs as a EntitlementBooleanCreateInputs

func (EntitlementCreateInputs) AsEntitlementMeteredCreateInputs

func (t EntitlementCreateInputs) AsEntitlementMeteredCreateInputs() (EntitlementMeteredCreateInputs, error)

AsEntitlementMeteredCreateInputs returns the union data inside the EntitlementCreateInputs as a EntitlementMeteredCreateInputs

func (EntitlementCreateInputs) AsEntitlementStaticCreateInputs

func (t EntitlementCreateInputs) AsEntitlementStaticCreateInputs() (EntitlementStaticCreateInputs, error)

AsEntitlementStaticCreateInputs returns the union data inside the EntitlementCreateInputs as a EntitlementStaticCreateInputs

func (EntitlementCreateInputs) Discriminator

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

func (*EntitlementCreateInputs) FromEntitlementBooleanCreateInputs

func (t *EntitlementCreateInputs) FromEntitlementBooleanCreateInputs(v EntitlementBooleanCreateInputs) error

FromEntitlementBooleanCreateInputs overwrites any union data inside the EntitlementCreateInputs as the provided EntitlementBooleanCreateInputs

func (*EntitlementCreateInputs) FromEntitlementMeteredCreateInputs

func (t *EntitlementCreateInputs) FromEntitlementMeteredCreateInputs(v EntitlementMeteredCreateInputs) error

FromEntitlementMeteredCreateInputs overwrites any union data inside the EntitlementCreateInputs as the provided EntitlementMeteredCreateInputs

func (*EntitlementCreateInputs) FromEntitlementStaticCreateInputs

func (t *EntitlementCreateInputs) FromEntitlementStaticCreateInputs(v EntitlementStaticCreateInputs) error

FromEntitlementStaticCreateInputs overwrites any union data inside the EntitlementCreateInputs as the provided EntitlementStaticCreateInputs

func (EntitlementCreateInputs) MarshalJSON

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

func (*EntitlementCreateInputs) MergeEntitlementBooleanCreateInputs

func (t *EntitlementCreateInputs) MergeEntitlementBooleanCreateInputs(v EntitlementBooleanCreateInputs) error

MergeEntitlementBooleanCreateInputs performs a merge with any union data inside the EntitlementCreateInputs, using the provided EntitlementBooleanCreateInputs

func (*EntitlementCreateInputs) MergeEntitlementMeteredCreateInputs

func (t *EntitlementCreateInputs) MergeEntitlementMeteredCreateInputs(v EntitlementMeteredCreateInputs) error

MergeEntitlementMeteredCreateInputs performs a merge with any union data inside the EntitlementCreateInputs, using the provided EntitlementMeteredCreateInputs

func (*EntitlementCreateInputs) MergeEntitlementStaticCreateInputs

func (t *EntitlementCreateInputs) MergeEntitlementStaticCreateInputs(v EntitlementStaticCreateInputs) error

MergeEntitlementStaticCreateInputs performs a merge with any union data inside the EntitlementCreateInputs, using the provided EntitlementStaticCreateInputs

func (*EntitlementCreateInputs) UnmarshalJSON

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

func (EntitlementCreateInputs) ValueByDiscriminator

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

type EntitlementGrant

type EntitlementGrant struct {
	// Amount The amount to grant. Should be a positive number.
	Amount float64 `json:"amount"`

	// CreatedAt Timestamp of when the resource was created.
	CreatedAt time.Time `json:"createdAt"`

	// DeletedAt Timestamp of when the resource was permanently deleted.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`

	// EffectiveAt Effective date for grants and anchor for recurring grants. Provided value will be ceiled to metering windowSize (minute).
	EffectiveAt time.Time `json:"effectiveAt"`

	// EntitlementId The unique entitlement ULID that the grant is associated with.
	EntitlementId string `json:"entitlementId"`

	// Expiration The grant expiration definition
	Expiration ExpirationPeriod `json:"expiration"`

	// ExpiresAt The time the grant expires.
	ExpiresAt *time.Time `json:"expiresAt,omitempty"`

	// Id Readonly unique ULID identifier.
	Id string `json:"id"`

	// MaxRolloverAmount Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset.
	// Balance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))
	MaxRolloverAmount *float64 `json:"maxRolloverAmount,omitempty"`

	// Metadata The grant metadata.
	Metadata *Metadata `json:"metadata,omitempty"`

	// MinRolloverAmount Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset.
	// Balance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))
	MinRolloverAmount *float64 `json:"minRolloverAmount,omitempty"`

	// NextRecurrence The next time the grant will recurr.
	NextRecurrence *time.Time `json:"nextRecurrence,omitempty"`

	// Priority The priority of the grant. Grants with higher priority are applied first.
	// Priority is a positive decimal numbers. With lower numbers indicating higher importance.
	// For example, a priority of 1 is more urgent than a priority of 2.
	// When there are several grants available for the same subject, the system selects the grant with the highest priority.
	// In cases where grants share the same priority level, the grant closest to its expiration will be used first.
	// In the case of two grants have identical priorities and expiration dates, the system will use the grant that was created first.
	Priority *uint8 `json:"priority,omitempty"`

	// Recurrence The recurrence period of the grant.
	Recurrence *RecurringPeriod `json:"recurrence,omitempty"`

	// UpdatedAt Timestamp of when the resource was last updated.
	UpdatedAt time.Time `json:"updatedAt"`

	// VoidedAt The time the grant was voided.
	VoidedAt *time.Time `json:"voidedAt,omitempty"`
}

EntitlementGrant The grant.

type EntitlementGrantCreateInput

type EntitlementGrantCreateInput struct {
	// Amount The amount to grant. Should be a positive number.
	Amount float64 `json:"amount"`

	// EffectiveAt Effective date for grants and anchor for recurring grants. Provided value will be ceiled to metering windowSize (minute).
	EffectiveAt time.Time `json:"effectiveAt"`

	// Expiration The grant expiration definition
	Expiration ExpirationPeriod `json:"expiration"`

	// MaxRolloverAmount Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset.
	// Balance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))
	MaxRolloverAmount *float64 `json:"maxRolloverAmount,omitempty"`

	// Metadata The grant metadata.
	Metadata *Metadata `json:"metadata,omitempty"`

	// MinRolloverAmount Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset.
	// Balance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))
	MinRolloverAmount *float64 `json:"minRolloverAmount,omitempty"`

	// Priority The priority of the grant. Grants with higher priority are applied first.
	// Priority is a positive decimal numbers. With lower numbers indicating higher importance.
	// For example, a priority of 1 is more urgent than a priority of 2.
	// When there are several grants available for the same subject, the system selects the grant with the highest priority.
	// In cases where grants share the same priority level, the grant closest to its expiration will be used first.
	// In the case of two grants have identical priorities and expiration dates, the system will use the grant that was created first.
	Priority *uint8 `json:"priority,omitempty"`

	// Recurrence The subject of the grant.
	Recurrence *RecurringPeriodCreateInput `json:"recurrence,omitempty"`
}

EntitlementGrantCreateInput The grant creation input.

type EntitlementMetered

type EntitlementMetered struct {
	// ActiveFrom The cadence start of the resource.
	ActiveFrom time.Time `json:"activeFrom"`

	// ActiveTo The cadence end of the resource.
	ActiveTo *time.Time `json:"activeTo,omitempty"`

	// CreatedAt Timestamp of when the resource was created.
	CreatedAt time.Time `json:"createdAt"`

	// CurrentUsagePeriod The current usage period.
	CurrentUsagePeriod Period `json:"currentUsagePeriod"`

	// DeletedAt Timestamp of when the resource was permanently deleted.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`

	// FeatureId The feature the subject is entitled to use.
	FeatureId string `json:"featureId"`

	// FeatureKey The feature the subject is entitled to use.
	FeatureKey string `json:"featureKey"`

	// Id Readonly unique ULID identifier.
	Id string `json:"id"`

	// IsSoftLimit If softLimit=true the subject can use the feature even if the entitlement is exhausted, hasAccess will always be true.
	IsSoftLimit *bool `json:"isSoftLimit,omitempty"`

	// IsUnlimited Deprecated, ignored by the backend. Please use isSoftLimit instead; this field will be removed in the future.
	// Deprecated:
	IsUnlimited *bool `json:"isUnlimited,omitempty"`

	// IssueAfterReset You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance.
	// If an amount is specified here, a grant will be created alongside the entitlement with the specified amount.
	// That grant will have it's rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.
	// Manually creating such a grant would mean having the "amount", "minRolloverAmount", and "maxRolloverAmount" fields all be the same.
	IssueAfterReset *float64 `json:"issueAfterReset,omitempty"`

	// IssueAfterResetPriority Defines the grant priority for the default grant.
	IssueAfterResetPriority *uint8 `json:"issueAfterResetPriority,omitempty"`

	// LastReset The time the last reset happened.
	LastReset time.Time `json:"lastReset"`

	// MeasureUsageFrom The time from which usage is measured. If not specified on creation, defaults to entitlement creation time.
	MeasureUsageFrom time.Time `json:"measureUsageFrom"`

	// Metadata Additional metadata for the feature.
	Metadata *Metadata `json:"metadata,omitempty"`

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

	// SubjectKey The identifier key unique to the subject
	SubjectKey string                 `json:"subjectKey"`
	Type       EntitlementMeteredType `json:"type"`

	// UpdatedAt Timestamp of when the resource was last updated.
	UpdatedAt time.Time `json:"updatedAt"`

	// UsagePeriod THe usage period of the entitlement.
	UsagePeriod RecurringPeriod `json:"usagePeriod"`
}

EntitlementMetered Metered entitlements are useful for many different use cases, from setting up usage based access to implementing complex credit systems. Access is determined based on feature usage using a balance calculation (the "usage allowance" provided by the issued grants is "burnt down" by the usage).

type EntitlementMeteredCreateInputs

type EntitlementMeteredCreateInputs struct {
	// FeatureId The feature the subject is entitled to use.
	// Either featureKey or featureId is required.
	FeatureId *string `json:"featureId,omitempty"`

	// FeatureKey The feature the subject is entitled to use.
	// Either featureKey or featureId is required.
	FeatureKey *string `json:"featureKey,omitempty"`

	// IsSoftLimit If softLimit=true the subject can use the feature even if the entitlement is exhausted, hasAccess will always be true.
	IsSoftLimit *bool `json:"isSoftLimit,omitempty"`

	// IsUnlimited Deprecated, ignored by the backend. Please use isSoftLimit instead; this field will be removed in the future.
	// Deprecated:
	IsUnlimited *bool `json:"isUnlimited,omitempty"`

	// IssueAfterReset You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance.
	// If an amount is specified here, a grant will be created alongside the entitlement with the specified amount.
	// That grant will have it's rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.
	// Manually creating such a grant would mean having the "amount", "minRolloverAmount", and "maxRolloverAmount" fields all be the same.
	IssueAfterReset *float64 `json:"issueAfterReset,omitempty"`

	// IssueAfterResetPriority Defines the grant priority for the default grant.
	IssueAfterResetPriority *uint8 `json:"issueAfterResetPriority,omitempty"`

	// MeasureUsageFrom Defines the time from which usage is measured. If not specified on creation, defaults to entitlement creation time.
	MeasureUsageFrom *MeasureUsageFrom `json:"measureUsageFrom,omitempty"`

	// Metadata Additional metadata for the feature.
	Metadata *Metadata `json:"metadata,omitempty"`

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

	// UsagePeriod The usage period associated with the entitlement.
	UsagePeriod RecurringPeriodCreateInput `json:"usagePeriod"`
}

EntitlementMeteredCreateInputs Create inpurs for metered entitlement

type EntitlementMeteredCreateInputsType

type EntitlementMeteredCreateInputsType string

EntitlementMeteredCreateInputsType defines model for EntitlementMeteredCreateInputs.Type.

const (
	EntitlementMeteredCreateInputsTypeMetered EntitlementMeteredCreateInputsType = "metered"
)

Defines values for EntitlementMeteredCreateInputsType.

type EntitlementMeteredType

type EntitlementMeteredType string

EntitlementMeteredType defines model for EntitlementMetered.Type.

const (
	EntitlementMeteredTypeMetered EntitlementMeteredType = "metered"
)

Defines values for EntitlementMeteredType.

type EntitlementOrderBy

type EntitlementOrderBy string

EntitlementOrderBy Order by options for entitlements.

const (
	EntitlementOrderByCreatedAt EntitlementOrderBy = "createdAt"
	EntitlementOrderByUpdatedAt EntitlementOrderBy = "updatedAt"
)

Defines values for EntitlementOrderBy.

type EntitlementOrderByOrderingOrder

type EntitlementOrderByOrderingOrder = SortOrder

EntitlementOrderByOrderingOrder The order direction.

type EntitlementOrderByOrderingOrderBy

type EntitlementOrderByOrderingOrderBy = EntitlementOrderBy

EntitlementOrderByOrderingOrderBy Order by options for entitlements.

type EntitlementPaginatedResponse

type EntitlementPaginatedResponse struct {
	// Items The items in the current page.
	Items []Entitlement `json:"items"`

	// Page The items in the current page.
	Page int `json:"page"`

	// PageSize The items in the current page.
	PageSize int `json:"pageSize"`

	// TotalCount The items in the current page.
	TotalCount int `json:"totalCount"`
}

EntitlementPaginatedResponse Paginated response

type EntitlementStatic

type EntitlementStatic struct {
	// ActiveFrom The cadence start of the resource.
	ActiveFrom time.Time `json:"activeFrom"`

	// ActiveTo The cadence end of the resource.
	ActiveTo *time.Time `json:"activeTo,omitempty"`

	// Config The JSON parsable config of the entitlement. This value is also returned when checking entitlement access and it is useful for configuring fine-grained access settings to the feature, implemented in your own system. Has to be an object.
	Config json.RawMessage `json:"config"`

	// CreatedAt Timestamp of when the resource was created.
	CreatedAt time.Time `json:"createdAt"`

	// CurrentUsagePeriod The current usage period.
	CurrentUsagePeriod *Period `json:"currentUsagePeriod,omitempty"`

	// DeletedAt Timestamp of when the resource was permanently deleted.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`

	// FeatureId The feature the subject is entitled to use.
	FeatureId string `json:"featureId"`

	// FeatureKey The feature the subject is entitled to use.
	FeatureKey string `json:"featureKey"`

	// Id Readonly unique ULID identifier.
	Id string `json:"id"`

	// Metadata Additional metadata for the feature.
	Metadata *Metadata `json:"metadata,omitempty"`

	// SubjectKey The identifier key unique to the subject
	SubjectKey string                `json:"subjectKey"`
	Type       EntitlementStaticType `json:"type"`

	// UpdatedAt Timestamp of when the resource was last updated.
	UpdatedAt time.Time `json:"updatedAt"`

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

EntitlementStatic A static entitlement.

type EntitlementStaticCreateInputs

type EntitlementStaticCreateInputs struct {
	// Config The JSON parsable config of the entitlement. This value is also returned when checking entitlement access and it is useful for configuring fine-grained access settings to the feature, implemented in your own system. Has to be an object.
	Config json.RawMessage `json:"config"`

	// FeatureId The feature the subject is entitled to use.
	// Either featureKey or featureId is required.
	FeatureId *string `json:"featureId,omitempty"`

	// FeatureKey The feature the subject is entitled to use.
	// Either featureKey or featureId is required.
	FeatureKey *string `json:"featureKey,omitempty"`

	// Metadata Additional metadata for the feature.
	Metadata *Metadata                         `json:"metadata,omitempty"`
	Type     EntitlementStaticCreateInputsType `json:"type"`

	// UsagePeriod The usage period associated with the entitlement.
	UsagePeriod *RecurringPeriodCreateInput `json:"usagePeriod,omitempty"`
}

EntitlementStaticCreateInputs Create inputs for static entitlement

type EntitlementStaticCreateInputsType

type EntitlementStaticCreateInputsType string

EntitlementStaticCreateInputsType defines model for EntitlementStaticCreateInputs.Type.

const (
	EntitlementStaticCreateInputsTypeStatic EntitlementStaticCreateInputsType = "static"
)

Defines values for EntitlementStaticCreateInputsType.

type EntitlementStaticType

type EntitlementStaticType string

EntitlementStaticType defines model for EntitlementStatic.Type.

const (
	EntitlementStaticTypeStatic EntitlementStaticType = "static"
)

Defines values for EntitlementStaticType.

type EntitlementType

type EntitlementType = string

EntitlementType Type of the entitlement.

type EntitlementValue

type EntitlementValue struct {
	// Balance Only available for metered entitlements. Metered entitlements are built around a balance calculation where feature usage is deducted from the issued grants. Balance represents the remaining balance of the entitlement, it's value never turns negative.
	Balance *float64 `json:"balance,omitempty"`

	// Config Only available for static entitlements. The JSON parsable config of the entitlement.
	Config *string `json:"config,omitempty"`

	// HasAccess Whether the subject has access to the feature. Shared accross all entitlement types.
	HasAccess bool `json:"hasAccess"`

	// Overage Only available for metered entitlements. Overage represents the usage that wasn't covered by grants, e.g. if the subject had a total feature usage of 100 in the period but they were only granted 80, there would be 20 overage.
	Overage *float64 `json:"overage,omitempty"`

	// Usage Only available for metered entitlements. Returns the total feature usage in the current period.
	Usage *float64 `json:"usage,omitempty"`
}

EntitlementValue Entitlements are the core of OpenMeter access management. They define access to features for subjects. Entitlements can be metered, boolean, or static.

type Event

type Event = event.Event

Event CloudEvents Specification JSON Schema

Optional properties are nullable according to the CloudEvents specification: OPTIONAL not omitted attributes MAY be represented as a null JSON value.

type ExpirationDuration

type ExpirationDuration string

ExpirationDuration The expiration duration enum

const (
	ExpirationDurationDAY   ExpirationDuration = "DAY"
	ExpirationDurationHOUR  ExpirationDuration = "HOUR"
	ExpirationDurationMONTH ExpirationDuration = "MONTH"
	ExpirationDurationWEEK  ExpirationDuration = "WEEK"
	ExpirationDurationYEAR  ExpirationDuration = "YEAR"
)

Defines values for ExpirationDuration.

type ExpirationPeriod

type ExpirationPeriod struct {
	// Count The number of time units in the expiration period.
	Count int `json:"count"`

	// Duration The unit of time for the expiration period.
	Duration ExpirationDuration `json:"duration"`
}

ExpirationPeriod The grant expiration definition

type Feature

type Feature struct {
	// ArchivedAt Timestamp of when the resource was archived.
	ArchivedAt *time.Time `json:"archivedAt,omitempty"`

	// CreatedAt Timestamp of when the resource was created.
	CreatedAt time.Time `json:"createdAt"`

	// DeletedAt Timestamp of when the resource was permanently deleted.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`

	// Id Readonly unique ULID identifier.
	Id string `json:"id"`

	// Key A key is a unique string that is used to identify a resource.
	Key      string    `json:"key"`
	Metadata *Metadata `json:"metadata,omitempty"`

	// MeterGroupByFilters Optional meter group by filters.
	// Useful if the meter scope is broader than what feature tracks.
	// Example scenario would be a meter tracking all token use with groupBy fields for the model,
	// then the feature could filter for model=gpt-4.
	MeterGroupByFilters *map[string]string `json:"meterGroupByFilters,omitempty"`

	// MeterSlug A key is a unique string that is used to identify a resource.
	MeterSlug *string `json:"meterSlug,omitempty"`
	Name      string  `json:"name"`

	// UpdatedAt Timestamp of when the resource was last updated.
	UpdatedAt time.Time `json:"updatedAt"`
}

Feature Represents a feature that can be enabled or disabled for a plan. Used both for product catalog and entitlements.

type FeatureCreateInputs

type FeatureCreateInputs struct {
	// Key A key is a unique string that is used to identify a resource.
	Key      string    `json:"key"`
	Metadata *Metadata `json:"metadata,omitempty"`

	// MeterGroupByFilters Optional meter group by filters.
	// Useful if the meter scope is broader than what feature tracks.
	// Example scenario would be a meter tracking all token use with groupBy fields for the model,
	// then the feature could filter for model=gpt-4.
	MeterGroupByFilters *map[string]string `json:"meterGroupByFilters,omitempty"`

	// MeterSlug A key is a unique string that is used to identify a resource.
	MeterSlug *string `json:"meterSlug,omitempty"`
	Name      string  `json:"name"`
}

FeatureCreateInputs Represents a feature that can be enabled or disabled for a plan. Used both for product catalog and entitlements.

type FeatureMeta

type FeatureMeta struct {
	// Id Unique identifier of a feature.
	Id string `json:"id"`

	// Key The key is an immutable unique identifier of the feature used throughout the API,
	// for example when interacting with a subject's entitlements.
	Key string `json:"key"`
}

FeatureMeta Limited representation of a feature resource which includes only its unique identifiers (id, key).

type FeatureOrderBy

type FeatureOrderBy string

FeatureOrderBy Order by options for features.

const (
	FeatureOrderByCreatedAt FeatureOrderBy = "createdAt"
	FeatureOrderById        FeatureOrderBy = "id"
	FeatureOrderByUpdatedAt FeatureOrderBy = "updatedAt"
)

Defines values for FeatureOrderBy.

type FeatureOrderByOrderingOrder

type FeatureOrderByOrderingOrder = SortOrder

FeatureOrderByOrderingOrder The order direction.

type FeatureOrderByOrderingOrderBy

type FeatureOrderByOrderingOrderBy = FeatureOrderBy

FeatureOrderByOrderingOrderBy Order by options for features.

type FeaturePaginatedResponse

type FeaturePaginatedResponse struct {
	// Items The items in the current page.
	Items []Feature `json:"items"`

	// Page The items in the current page.
	Page int `json:"page"`

	// PageSize The items in the current page.
	PageSize int `json:"pageSize"`

	// TotalCount The items in the current page.
	TotalCount int `json:"totalCount"`
}

FeaturePaginatedResponse Paginated response

type FlatPrice

type FlatPrice struct {
	// Amount The amount of the flat price.
	Amount Numeric `json:"amount"`

	// Type The type of the price.
	Type FlatPriceType `json:"type"`
}

FlatPrice Flat price.

type FlatPriceType

type FlatPriceType string

FlatPriceType The type of the price.

const (
	FlatPriceTypeFlat FlatPriceType = "flat"
)

Defines values for FlatPriceType.

type FlatPriceWithPaymentTerm

type FlatPriceWithPaymentTerm struct {
	// Amount The amount of the flat price.
	Amount Numeric `json:"amount"`

	// PaymentTerm The payment term of the flat price.
	// Defaults to in advance.
	PaymentTerm *PricePaymentTerm `json:"paymentTerm,omitempty"`

	// Type The type of the price.
	Type FlatPriceWithPaymentTermType `json:"type"`
}

FlatPriceWithPaymentTerm Flat price with payment term.

type FlatPriceWithPaymentTermType

type FlatPriceWithPaymentTermType string

FlatPriceWithPaymentTermType The type of the price.

const (
	FlatPriceWithPaymentTermTypeFlat FlatPriceWithPaymentTermType = "flat"
)

Defines values for FlatPriceWithPaymentTermType.

type ForbiddenProblemResponse

type ForbiddenProblemResponse = UnexpectedProblemResponse

ForbiddenProblemResponse A Problem Details object (RFC 7807). Additional properties specific to the problem type may be present.

type GetBillingProfileParams

type GetBillingProfileParams struct {
	Expand *[]BillingProfileExpand `form:"expand,omitempty" json:"expand,omitempty"`
}

GetBillingProfileParams defines parameters for GetBillingProfile.

type GetCustomerEntitlementValueParams

type GetCustomerEntitlementValueParams struct {
	Time *time.Time `form:"time,omitempty" json:"time,omitempty"`
}

GetCustomerEntitlementValueParams defines parameters for GetCustomerEntitlementValue.

type GetEntitlementHistoryParams

type GetEntitlementHistoryParams struct {
	// From Start of time range to query entitlement: date-time in RFC 3339 format. Defaults to the last reset. Gets truncated to the granularity of the underlying meter.
	From *time.Time `form:"from,omitempty" json:"from,omitempty"`

	// To End of time range to query entitlement: date-time in RFC 3339 format. Defaults to now.
	// If not now then gets truncated to the granularity of the underlying meter.
	To *time.Time `form:"to,omitempty" json:"to,omitempty"`

	// WindowSize Windowsize
	WindowSize WindowSize `form:"windowSize" json:"windowSize"`

	// WindowTimeZone The timezone used when calculating the windows.
	WindowTimeZone *string `form:"windowTimeZone,omitempty" json:"windowTimeZone,omitempty"`
}

GetEntitlementHistoryParams defines parameters for GetEntitlementHistory.

type GetEntitlementValueParams

type GetEntitlementValueParams struct {
	Time *time.Time `form:"time,omitempty" json:"time,omitempty"`
}

GetEntitlementValueParams defines parameters for GetEntitlementValue.

type GetInvoiceParams

type GetInvoiceParams struct {
	Expand              *[]InvoiceExpand `form:"expand,omitempty" json:"expand,omitempty"`
	IncludeDeletedLines *bool            `form:"includeDeletedLines,omitempty" json:"includeDeletedLines,omitempty"`
}

GetInvoiceParams defines parameters for GetInvoice.

type GetPlanParams

type GetPlanParams struct {
	// IncludeLatest Include latest version of the Plan instead of the version in active state.
	//
	// Usage: `?includeLatest=true`
	IncludeLatest *bool `form:"includeLatest,omitempty" json:"includeLatest,omitempty"`
}

GetPlanParams defines parameters for GetPlan.

type GetSubscriptionParams

type GetSubscriptionParams struct {
	// At The time at which the subscription should be queried. If not provided the current time is used.
	At *time.Time `form:"at,omitempty" json:"at,omitempty"`
}

GetSubscriptionParams defines parameters for GetSubscription.

type GrantBurnDownHistorySegment

type GrantBurnDownHistorySegment struct {
	// BalanceAtEnd The entitlement balance at the end of the period.
	BalanceAtEnd float64 `json:"balanceAtEnd"`

	// BalanceAtStart entitlement balance at the start of the period.
	BalanceAtStart float64 `json:"balanceAtStart"`

	// GrantBalancesAtEnd The balance breakdown of each active grant at the end of the period: GrantID: Balance
	GrantBalancesAtEnd map[string]float64 `json:"grantBalancesAtEnd"`

	// GrantBalancesAtStart The balance breakdown of each active grant at the start of the period: GrantID: Balance
	GrantBalancesAtStart map[string]float64 `json:"grantBalancesAtStart"`

	// GrantUsages Which grants were actually burnt down in the period and by what amount.
	GrantUsages []GrantUsageRecord `json:"grantUsages"`

	// Overage Overuse that wasn't covered by grants.
	Overage float64 `json:"overage"`

	// Period The period of the segment.
	Period Period `json:"period"`

	// Usage The total usage of the grant in the period.
	Usage float64 `json:"usage"`
}

GrantBurnDownHistorySegment A segment of the grant burn down history.

A given segment represents the usage of a grant between events that changed either the grant burn down priority order or the usag period.

type GrantOrderBy

type GrantOrderBy string

GrantOrderBy Order by options for grants.

const (
	GrantOrderByCreatedAt GrantOrderBy = "createdAt"
	GrantOrderById        GrantOrderBy = "id"
	GrantOrderByUpdatedAt GrantOrderBy = "updatedAt"
)

Defines values for GrantOrderBy.

type GrantOrderByOrderingOrder

type GrantOrderByOrderingOrder = SortOrder

GrantOrderByOrderingOrder The order direction.

type GrantOrderByOrderingOrderBy

type GrantOrderByOrderingOrderBy = GrantOrderBy

GrantOrderByOrderingOrderBy Order by options for grants.

type GrantPaginatedResponse

type GrantPaginatedResponse struct {
	// Items The items in the current page.
	Items []EntitlementGrant `json:"items"`

	// Page The items in the current page.
	Page int `json:"page"`

	// PageSize The items in the current page.
	PageSize int `json:"pageSize"`

	// TotalCount The items in the current page.
	TotalCount int `json:"totalCount"`
}

GrantPaginatedResponse Paginated response

type GrantUsageRecord

type GrantUsageRecord struct {
	// GrantId The id of the grant
	GrantId string `json:"grantId"`

	// Usage The usage in the period
	Usage float64 `json:"usage"`
}

GrantUsageRecord Usage Record

type IDResource

type IDResource struct {
	// Id A unique identifier for the resource.
	Id string `json:"id"`
}

IDResource IDResource is a resouce with an ID.

type IngestEventsApplicationCloudeventsBatchPlusJSONBody

type IngestEventsApplicationCloudeventsBatchPlusJSONBody = []Event

IngestEventsApplicationCloudeventsBatchPlusJSONBody defines parameters for IngestEvents.

type IngestEventsApplicationCloudeventsBatchPlusJSONRequestBody

type IngestEventsApplicationCloudeventsBatchPlusJSONRequestBody = IngestEventsApplicationCloudeventsBatchPlusJSONBody

IngestEventsApplicationCloudeventsBatchPlusJSONRequestBody defines body for IngestEvents for application/cloudevents-batch+json ContentType.

type IngestEventsApplicationCloudeventsPlusJSONRequestBody

type IngestEventsApplicationCloudeventsPlusJSONRequestBody = Event

IngestEventsApplicationCloudeventsPlusJSONRequestBody defines body for IngestEvents for application/cloudevents+json ContentType.

type IngestEventsBody

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

IngestEventsBody The body of the events request. Either a single event or a batch of events.

func (IngestEventsBody) AsEvent

func (t IngestEventsBody) AsEvent() (Event, error)

AsEvent returns the union data inside the IngestEventsBody as a Event

func (IngestEventsBody) AsIngestEventsBody1

func (t IngestEventsBody) AsIngestEventsBody1() (IngestEventsBody1, error)

AsIngestEventsBody1 returns the union data inside the IngestEventsBody as a IngestEventsBody1

func (*IngestEventsBody) FromEvent

func (t *IngestEventsBody) FromEvent(v Event) error

FromEvent overwrites any union data inside the IngestEventsBody as the provided Event

func (*IngestEventsBody) FromIngestEventsBody1

func (t *IngestEventsBody) FromIngestEventsBody1(v IngestEventsBody1) error

FromIngestEventsBody1 overwrites any union data inside the IngestEventsBody as the provided IngestEventsBody1

func (IngestEventsBody) MarshalJSON

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

func (*IngestEventsBody) MergeEvent

func (t *IngestEventsBody) MergeEvent(v Event) error

MergeEvent performs a merge with any union data inside the IngestEventsBody, using the provided Event

func (*IngestEventsBody) MergeIngestEventsBody1

func (t *IngestEventsBody) MergeIngestEventsBody1(v IngestEventsBody1) error

MergeIngestEventsBody1 performs a merge with any union data inside the IngestEventsBody, using the provided IngestEventsBody1

func (*IngestEventsBody) UnmarshalJSON

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

type IngestEventsBody1

type IngestEventsBody1 = []Event

IngestEventsBody1 defines model for .

type IngestEventsJSONRequestBody

type IngestEventsJSONRequestBody = IngestEventsBody

IngestEventsJSONRequestBody defines body for IngestEvents for application/json ContentType.

type IngestedEvent

type IngestedEvent struct {
	// Event The original event ingested.
	Event Event `json:"event"`

	// IngestedAt The date and time the event was ingested.
	IngestedAt time.Time `json:"ingestedAt"`

	// StoredAt The date and time the event was stored.
	StoredAt time.Time `json:"storedAt"`

	// ValidationError The validation error if the event failed validation.
	ValidationError *string `json:"validationError,omitempty"`
}

IngestedEvent An ingested event with optional validation error.

type InternalServerErrorProblemResponse

type InternalServerErrorProblemResponse = UnexpectedProblemResponse

InternalServerErrorProblemResponse A Problem Details object (RFC 7807). Additional properties specific to the problem type may be present.

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 Invoice

type Invoice struct {
	// CreatedAt Timestamp of when the resource was created.
	CreatedAt time.Time `json:"createdAt"`

	// Currency Currency for all invoice line items.
	//
	// Multi currency invoices are not supported yet.
	Currency CurrencyCode `json:"currency"`

	// Customer Legal entity receiving the goods or services.
	Customer BillingParty `json:"customer"`

	// DeletedAt Timestamp of when the resource was permanently deleted.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`

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

	// Discounts Discounts or allowances applied to the complete invoice.
	Discounts *[]Discount `json:"discounts,omitempty"`

	// DraftUntil The time until the invoice is in draft status.
	//
	// On draft invoice creation it is calculated from the workflow settings.
	//
	// If manual approval is required, the draftUntil time is set.
	DraftUntil *time.Time `json:"draftUntil,omitempty"`

	// DueAt Due time of the fulfillment of the invoice (if available).
	DueAt *time.Time `json:"dueAt,omitempty"`

	// ExternalIds External IDs of the invoice in other apps such as Stripe.
	ExternalIds *InvoiceAppExternalIds `json:"externalIds,omitempty"`

	// Id A unique identifier for the resource.
	Id string `json:"id"`

	// IssuedAt The time the invoice was issued.
	//
	// Depending on the status of the invoice this can mean multiple things:
	// - draft, gathering: The time the invoice will be issued based on the workflow settings.
	// - issued: The time the invoice was issued.
	IssuedAt *time.Time `json:"issuedAt,omitempty"`

	// Lines List of invoice lines representing each of the items sold to the customer.
	Lines *[]InvoiceLine `json:"lines,omitempty"`

	// Metadata Additional metadata for the resource.
	Metadata *Metadata `json:"metadata"`

	// Number Number specifies the human readable key used to reference this Invoice.
	//
	// The invoice number can change in the draft phases, as we are allocating temporary draft
	// invoice numbers, but it's final as soon as the invoice gets finalized (issued state).
	//
	// Please note that the number is (depending on the upstream settings) either unique for the
	// whole organization or unique for the customer, or in multi (stripe) account setups unique for the
	// account.
	Number InvoiceNumber `json:"number"`

	// Payment Information on when, how, and to whom the invoice should be paid.
	Payment *InvoicePaymentTerms `json:"payment,omitempty"`

	// Period The period the invoice covers. If the invoice has no line items, it's not set.
	Period *Period `json:"period,omitempty"`

	// Preceding Key information regarding previous invoices and potentially details as to why they were corrected.
	Preceding *[]InvoiceDocumentRef `json:"preceding,omitempty"`

	// SentToCustomerAt The time the invoice was sent to customer.
	SentToCustomerAt *time.Time `json:"sentToCustomerAt,omitempty"`

	// Status The status of the invoice.
	//
	// This field only conatins a simplified status, for more detailed information use the statusDetails field.
	Status InvoiceStatus `json:"status"`

	// StatusDetails The details of the current invoice status.
	StatusDetails InvoiceStatusDetails `json:"statusDetails"`

	// Supplier The taxable entity supplying the goods or services.
	Supplier BillingParty `json:"supplier"`

	// Totals Summary of all the invoice totals, including taxes (calculated).
	Totals InvoiceTotals `json:"totals"`

	// Type Type of the invoice.
	//
	// The type of invoice determines the purpose of the invoice and how it should be handled.
	//
	// Supported types:
	// - standard: A regular commercial invoice document between a supplier and customer.
	// - credit_note: Reflects a refund either partial or complete of the preceding document. A credit note effectively *extends* the previous document.
	Type InvoiceType `json:"type"`

	// UpdatedAt Timestamp of when the resource was last updated.
	UpdatedAt time.Time `json:"updatedAt"`

	// ValidationIssues Validation issues reported by the invoice workflow.
	ValidationIssues *[]ValidationIssue `json:"validationIssues,omitempty"`

	// VoidedAt The time the invoice was voided.
	//
	// If the invoice was voided, this field will be set to the time the invoice was voided.
	VoidedAt *time.Time `json:"voidedAt,omitempty"`

	// Workflow The workflow associated with the invoice.
	//
	// It is always a snapshot of the workflow settings at the time of invoice creation. The
	// field is optional as it should be explicitly requested with expand options.
	Workflow InvoiceWorkflowSettings `json:"workflow"`
}

Invoice Invoice represents an invoice in the system.

type InvoiceAppExternalIds

type InvoiceAppExternalIds struct {
	// Invoicing The external ID of the invoice in the invoicing app if available.
	Invoicing *string `json:"invoicing,omitempty"`

	// Payment The external ID of the invoice in the payment app if available.
	Payment *string `json:"payment,omitempty"`

	// Tax The external ID of the invoice in the tax app if available.
	Tax *string `json:"tax,omitempty"`
}

InvoiceAppExternalIds InvoiceAppExternalIds contains the external IDs of the invoice in other apps such as Stripe.

type InvoiceAvailableActionDetails

type InvoiceAvailableActionDetails struct {
	// ResultingState The state the invoice will reach if the action is activated and
	// all intermediate steps are successful.
	//
	// For example advancing a draft_created invoice will result in a draft_manual_approval_needed invoice.
	ResultingState string `json:"resultingState"`
}

InvoiceAvailableActionDetails InvoiceAvailableActionInvoiceDetails represents the details of the invoice action for non-gathering invoices.

type InvoiceAvailableActionInvoiceDetails

type InvoiceAvailableActionInvoiceDetails = map[string]interface{}

InvoiceAvailableActionInvoiceDetails InvoiceAvailableActionInvoiceDetails represents the details of the invoice action for gathering invoices.

type InvoiceAvailableActions

type InvoiceAvailableActions struct {
	// Advance Advance the invoice to the next status.
	Advance *InvoiceAvailableActionDetails `json:"advance,omitempty"`

	// Approve Approve an invoice that requires manual approval.
	Approve *InvoiceAvailableActionDetails `json:"approve,omitempty"`

	// Delete Delete the invoice (only non-issued invoices can be deleted).
	Delete *InvoiceAvailableActionDetails `json:"delete,omitempty"`

	// Invoice Invoice a gathering invoice
	Invoice *InvoiceAvailableActionInvoiceDetails `json:"invoice,omitempty"`

	// Retry Retry an invoice issuing step that failed.
	Retry *InvoiceAvailableActionDetails `json:"retry,omitempty"`

	// Void Void an already issued invoice.
	Void *InvoiceAvailableActionDetails `json:"void,omitempty"`
}

InvoiceAvailableActions InvoiceAvailableActions represents the actions that can be performed on the invoice.

type InvoiceDocumentRef

type InvoiceDocumentRef = CreditNoteOriginalInvoiceRef

InvoiceDocumentRef CreditNoteOriginalInvoiceRef is used to reference the original invoice that a credit note is based on.

type InvoiceDocumentRefType

type InvoiceDocumentRefType string

InvoiceDocumentRefType InvoiceDocumentRefType defines the type of document that is being referenced.

const (
	InvoiceDocumentRefTypeCreditNodeOriginalInvoice InvoiceDocumentRefType = "credit_node_original_invoice"
)

Defines values for InvoiceDocumentRefType.

type InvoiceExpand

type InvoiceExpand string

InvoiceExpand InvoiceExpand specifies the parts of the invoice to expand in the list output.

const (
	InvoiceExpandAll          InvoiceExpand = "*"
	InvoiceExpandLines        InvoiceExpand = "lines"
	InvoiceExpandPreceding    InvoiceExpand = "preceding"
	InvoiceExpandWorkflowApps InvoiceExpand = "workflow.apps"
)

Defines values for InvoiceExpand.

type InvoiceFlatFeeCategory

type InvoiceFlatFeeCategory string

InvoiceFlatFeeCategory InvoiceFlatFeeCategory determines if the flat fee is a regular fee due to use due to a commitment.

const (
	InvoiceFlatFeeCategoryCommitment InvoiceFlatFeeCategory = "commitment"
	InvoiceFlatFeeCategoryRegular    InvoiceFlatFeeCategory = "regular"
)

Defines values for InvoiceFlatFeeCategory.

type InvoiceFlatFeeLine

type InvoiceFlatFeeLine struct {
	// Category Category of the flat fee.
	Category *InvoiceFlatFeeCategory `json:"category,omitempty"`

	// Charges Charges applied to this line. (like minimum spend)
	//
	// New charges can be added via the invoice's charges API, to facilitate
	// charges that are affecting multiple lines.
	Charges *[]BillingLineCharge `json:"charges,omitempty"`

	// Children The lines detailing the item or service sold.
	Children *[]InvoiceLine `json:"children,omitempty"`

	// CreatedAt Timestamp of when the resource was created.
	CreatedAt time.Time `json:"createdAt"`

	// Currency The currency of this line.
	Currency CurrencyCode `json:"currency"`

	// DeletedAt Timestamp of when the resource was permanently deleted.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`

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

	// Discounts Discounts detailes applied to this line.
	//
	// New discounts can be added via the invoice's discounts API, to facilitate
	// discounts that are affecting multiple lines.
	Discounts *[]InvoiceLineDiscount `json:"discounts,omitempty"`

	// ExternalIds External IDs of the invoice in other apps such as Stripe.
	ExternalIds *InvoiceLineAppExternalIds `json:"externalIds,omitempty"`

	// Id ID of the line.
	Id string `json:"id"`

	// Invoice The invoice this item belongs to.
	Invoice *InvoiceReference `json:"invoice,omitempty"`

	// InvoiceAt The time this line item should be invoiced.
	InvoiceAt time.Time `json:"invoiceAt"`

	// ManagedBy managedBy specifies if the line is manually added via the api or managed by OpenMeter.
	ManagedBy InvoiceLineManagedBy `json:"managedBy"`

	// Metadata Additional metadata for the resource.
	Metadata *Metadata `json:"metadata"`

	// Name Human-readable name for the resource. Between 1 and 256 characters.
	Name string `json:"name"`

	// PaymentTerm Payment term of the line.
	PaymentTerm *PricePaymentTerm `json:"paymentTerm,omitempty"`

	// PerUnitAmount Price of the item being sold.
	PerUnitAmount Numeric `json:"perUnitAmount"`

	// Period Period of the line item applies to for revenue recognition pruposes.
	//
	// Billing always treats periods as start being inclusive and end being exclusive.
	Period Period `json:"period"`

	// Quantity Quantity of the item being sold.
	Quantity Numeric `json:"quantity"`

	// Status Status of the line.
	//
	// External calls always create valid lines, other line types are managed by the
	// billing engine of OpenMeter.
	Status InvoiceLineStatus `json:"status"`

	// Subscriptions Subscription are the references to the subscritpions that this line is related to.
	Subscriptions *InvoiceLineSubscriptionReference `json:"subscriptions,omitempty"`

	// TaxConfig Tax config specify the tax configuration for this line.
	TaxConfig *TaxConfig `json:"taxConfig,omitempty"`

	// Taxes Taxes applied to the invoice totals.
	Taxes *[]InvoiceLineTaxItem `json:"taxes,omitempty"`

	// Totals Totals for this line.
	Totals InvoiceTotals `json:"totals"`

	// Type Type of the line.
	Type InvoiceFlatFeeLineType `json:"type"`

	// UpdatedAt Timestamp of when the resource was last updated.
	UpdatedAt time.Time `json:"updatedAt"`
}

InvoiceFlatFeeLine InvoiceFlatFeeLine represents a line item that is sold to the customer as a manually added fee.

type InvoiceFlatFeeLineReplaceUpdate

type InvoiceFlatFeeLineReplaceUpdate struct {
	// Category Category of the flat fee.
	Category *InvoiceFlatFeeCategory `json:"category,omitempty"`

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

	// Id The ID of the line.
	Id *string `json:"id,omitempty"`

	// InvoiceAt The time this line item should be invoiced.
	InvoiceAt time.Time `json:"invoiceAt"`

	// Metadata Additional metadata for the resource.
	Metadata *Metadata `json:"metadata"`

	// Name Human-readable name for the resource. Between 1 and 256 characters.
	Name string `json:"name"`

	// PaymentTerm Payment term of the line.
	PaymentTerm *PricePaymentTerm `json:"paymentTerm,omitempty"`

	// PerUnitAmount Price of the item being sold.
	PerUnitAmount Numeric `json:"perUnitAmount"`

	// Period Period of the line item applies to for revenue recognition pruposes.
	//
	// Billing always treats periods as start being inclusive and end being exclusive.
	Period Period `json:"period"`

	// Quantity Quantity of the item being sold.
	Quantity Numeric `json:"quantity"`

	// TaxConfig Tax config specify the tax configuration for this line.
	TaxConfig *TaxConfig `json:"taxConfig,omitempty"`

	// Type Type of the line.
	Type InvoiceFlatFeeLineReplaceUpdateType `json:"type"`
}

InvoiceFlatFeeLineReplaceUpdate InvoiceFlatFeeLineReplaceUpdate represents the update model for a flat fee invoice line.

This type makes ID optional to allow for creating new lines as part of the update.

type InvoiceFlatFeeLineReplaceUpdateType

type InvoiceFlatFeeLineReplaceUpdateType string

InvoiceFlatFeeLineReplaceUpdateType Type of the line.

const (
	InvoiceFlatFeeLineReplaceUpdateTypeFlatFee InvoiceFlatFeeLineReplaceUpdateType = "flat_fee"
)

Defines values for InvoiceFlatFeeLineReplaceUpdateType.

type InvoiceFlatFeeLineType

type InvoiceFlatFeeLineType string

InvoiceFlatFeeLineType Type of the line.

const (
	InvoiceFlatFeeLineTypeFlatFee InvoiceFlatFeeLineType = "flat_fee"
)

Defines values for InvoiceFlatFeeLineType.

type InvoiceFlatFeePendingLineCreate

type InvoiceFlatFeePendingLineCreate struct {
	// Category Category of the flat fee.
	Category *InvoiceFlatFeeCategory `json:"category,omitempty"`

	// Currency The currency of this line.
	Currency CurrencyCode `json:"currency"`

	// CustomerId The customer this line item belongs to.
	CustomerId string `json:"customerId"`

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

	// InvoiceAt The time this line item should be invoiced.
	InvoiceAt time.Time `json:"invoiceAt"`

	// Metadata Additional metadata for the resource.
	Metadata *Metadata `json:"metadata"`

	// Name Human-readable name for the resource. Between 1 and 256 characters.
	Name string `json:"name"`

	// PaymentTerm Payment term of the line.
	PaymentTerm *PricePaymentTerm `json:"paymentTerm,omitempty"`

	// PerUnitAmount Price of the item being sold.
	PerUnitAmount Numeric `json:"perUnitAmount"`

	// Period Period of the line item applies to for revenue recognition pruposes.
	//
	// Billing always treats periods as start being inclusive and end being exclusive.
	Period Period `json:"period"`

	// Quantity Quantity of the item being sold.
	Quantity Numeric `json:"quantity"`

	// TaxConfig Tax config specify the tax configuration for this line.
	TaxConfig *TaxConfig `json:"taxConfig,omitempty"`

	// Type Type of the line.
	Type InvoiceFlatFeePendingLineCreateType `json:"type"`
}

InvoiceFlatFeePendingLineCreate InvoiceFlatFeePendingLineCreate represents the create model for an invoice line that is sold to the customer as a manually added fee.

type InvoiceFlatFeePendingLineCreateType

type InvoiceFlatFeePendingLineCreateType string

InvoiceFlatFeePendingLineCreateType Type of the line.

const (
	InvoiceFlatFeePendingLineCreateTypeFlatFee InvoiceFlatFeePendingLineCreateType = "flat_fee"
)

Defines values for InvoiceFlatFeePendingLineCreateType.

type InvoiceGenericDocumentRef

type InvoiceGenericDocumentRef struct {
	// Description Additional details about the document.
	Description *string `json:"description,omitempty"`

	// Reason Human readable description on why this reference is here or needs to be used.
	Reason *string `json:"reason,omitempty"`

	// Type Type of the document referenced.
	Type InvoiceDocumentRefType `json:"type"`
}

InvoiceGenericDocumentRef Omitted fields: period: Tax period in which the referred document had an effect required by some tax regimes and formats. stamps: Seals of approval from other organisations that may need to be listed. ext: Extensions for additional codes that may be required.

type InvoiceLine

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

InvoiceLine BillingInvoiceLine represents a line item that is sold to the customer based on a specific (unit) price.

func (InvoiceLine) AsInvoiceFlatFeeLine

func (t InvoiceLine) AsInvoiceFlatFeeLine() (InvoiceFlatFeeLine, error)

AsInvoiceFlatFeeLine returns the union data inside the InvoiceLine as a InvoiceFlatFeeLine

func (InvoiceLine) AsInvoiceUsageBasedLine

func (t InvoiceLine) AsInvoiceUsageBasedLine() (InvoiceUsageBasedLine, error)

AsInvoiceUsageBasedLine returns the union data inside the InvoiceLine as a InvoiceUsageBasedLine

func (InvoiceLine) Discriminator

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

func (*InvoiceLine) FromInvoiceFlatFeeLine

func (t *InvoiceLine) FromInvoiceFlatFeeLine(v InvoiceFlatFeeLine) error

FromInvoiceFlatFeeLine overwrites any union data inside the InvoiceLine as the provided InvoiceFlatFeeLine

func (*InvoiceLine) FromInvoiceUsageBasedLine

func (t *InvoiceLine) FromInvoiceUsageBasedLine(v InvoiceUsageBasedLine) error

FromInvoiceUsageBasedLine overwrites any union data inside the InvoiceLine as the provided InvoiceUsageBasedLine

func (InvoiceLine) MarshalJSON

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

func (*InvoiceLine) MergeInvoiceFlatFeeLine

func (t *InvoiceLine) MergeInvoiceFlatFeeLine(v InvoiceFlatFeeLine) error

MergeInvoiceFlatFeeLine performs a merge with any union data inside the InvoiceLine, using the provided InvoiceFlatFeeLine

func (*InvoiceLine) MergeInvoiceUsageBasedLine

func (t *InvoiceLine) MergeInvoiceUsageBasedLine(v InvoiceUsageBasedLine) error

MergeInvoiceUsageBasedLine performs a merge with any union data inside the InvoiceLine, using the provided InvoiceUsageBasedLine

func (*InvoiceLine) UnmarshalJSON

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

func (InvoiceLine) ValueByDiscriminator

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

type InvoiceLineAppExternalIds

type InvoiceLineAppExternalIds struct {
	// Invoicing The external ID of the invoice in the invoicing app if available.
	Invoicing *string `json:"invoicing,omitempty"`

	// Tax The external ID of the invoice in the tax app if available.
	Tax *string `json:"tax,omitempty"`
}

InvoiceLineAppExternalIds InvoiceLineAppExternalIds contains the external IDs of the invoice in other apps such as Stripe.

type InvoiceLineDiscount

type InvoiceLineDiscount struct {
	// Amount Fixed discount amount to apply (calculated if percent present).
	Amount Numeric `json:"amount"`

	// Code Reason code.
	Code *string `json:"code,omitempty"`

	// CreatedAt Timestamp of when the resource was created.
	CreatedAt time.Time `json:"createdAt"`

	// DeletedAt Timestamp of when the resource was permanently deleted.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`

	// Description Text description as to why the discount was applied.
	Description *string `json:"description,omitempty"`

	// ExternalIds External IDs of the invoice in other apps such as Stripe.
	ExternalIds *InvoiceLineAppExternalIds `json:"externalIds,omitempty"`

	// Id ID of the charge or discount.
	Id string `json:"id"`

	// Percent Percentage if fixed amount not applied
	Percent *Percentage `json:"percent,omitempty"`

	// UpdatedAt Timestamp of when the resource was last updated.
	UpdatedAt time.Time `json:"updatedAt"`
}

InvoiceLineDiscount InvoiceLineDiscount represents an amount deducted from the line, and will be applied before taxes.

type InvoiceLineManagedBy

type InvoiceLineManagedBy string

InvoiceLineManagedBy InvoiceLineManagedBy specifies who manages the line.

const (
	InvoiceLineManagedByManual       InvoiceLineManagedBy = "manual"
	InvoiceLineManagedBySubscription InvoiceLineManagedBy = "subscription"
	InvoiceLineManagedBySystem       InvoiceLineManagedBy = "system"
)

Defines values for InvoiceLineManagedBy.

type InvoiceLineReplaceUpdate

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

InvoiceLineReplaceUpdate InvoiceLineReplaceUpdate represents the update model for an invoice line.

func (InvoiceLineReplaceUpdate) AsInvoiceFlatFeeLineReplaceUpdate

func (t InvoiceLineReplaceUpdate) AsInvoiceFlatFeeLineReplaceUpdate() (InvoiceFlatFeeLineReplaceUpdate, error)

AsInvoiceFlatFeeLineReplaceUpdate returns the union data inside the InvoiceLineReplaceUpdate as a InvoiceFlatFeeLineReplaceUpdate

func (InvoiceLineReplaceUpdate) AsInvoiceUsageBasedLineReplaceUpdate

func (t InvoiceLineReplaceUpdate) AsInvoiceUsageBasedLineReplaceUpdate() (InvoiceUsageBasedLineReplaceUpdate, error)

AsInvoiceUsageBasedLineReplaceUpdate returns the union data inside the InvoiceLineReplaceUpdate as a InvoiceUsageBasedLineReplaceUpdate

func (InvoiceLineReplaceUpdate) Discriminator

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

func (*InvoiceLineReplaceUpdate) FromInvoiceFlatFeeLineReplaceUpdate

func (t *InvoiceLineReplaceUpdate) FromInvoiceFlatFeeLineReplaceUpdate(v InvoiceFlatFeeLineReplaceUpdate) error

FromInvoiceFlatFeeLineReplaceUpdate overwrites any union data inside the InvoiceLineReplaceUpdate as the provided InvoiceFlatFeeLineReplaceUpdate

func (*InvoiceLineReplaceUpdate) FromInvoiceUsageBasedLineReplaceUpdate

func (t *InvoiceLineReplaceUpdate) FromInvoiceUsageBasedLineReplaceUpdate(v InvoiceUsageBasedLineReplaceUpdate) error

FromInvoiceUsageBasedLineReplaceUpdate overwrites any union data inside the InvoiceLineReplaceUpdate as the provided InvoiceUsageBasedLineReplaceUpdate

func (InvoiceLineReplaceUpdate) MarshalJSON

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

func (*InvoiceLineReplaceUpdate) MergeInvoiceFlatFeeLineReplaceUpdate

func (t *InvoiceLineReplaceUpdate) MergeInvoiceFlatFeeLineReplaceUpdate(v InvoiceFlatFeeLineReplaceUpdate) error

MergeInvoiceFlatFeeLineReplaceUpdate performs a merge with any union data inside the InvoiceLineReplaceUpdate, using the provided InvoiceFlatFeeLineReplaceUpdate

func (*InvoiceLineReplaceUpdate) MergeInvoiceUsageBasedLineReplaceUpdate

func (t *InvoiceLineReplaceUpdate) MergeInvoiceUsageBasedLineReplaceUpdate(v InvoiceUsageBasedLineReplaceUpdate) error

MergeInvoiceUsageBasedLineReplaceUpdate performs a merge with any union data inside the InvoiceLineReplaceUpdate, using the provided InvoiceUsageBasedLineReplaceUpdate

func (*InvoiceLineReplaceUpdate) UnmarshalJSON

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

func (InvoiceLineReplaceUpdate) ValueByDiscriminator

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

type InvoiceLineStatus

type InvoiceLineStatus string

InvoiceLineStatus Line status specifies the status of the line.

const (
	InvoiceLineStatusDetail InvoiceLineStatus = "detail"
	InvoiceLineStatusSplit  InvoiceLineStatus = "split"
	InvoiceLineStatusValid  InvoiceLineStatus = "valid"
)

Defines values for InvoiceLineStatus.

type InvoiceLineSubscriptionReference

type InvoiceLineSubscriptionReference struct {
	// Item The item this line is related to.
	Item IDResource `json:"item"`

	// Phase The phase of the subscription.
	Phase IDResource `json:"phase"`

	// Subscription The subscription.
	Subscription IDResource `json:"subscription"`
}

InvoiceLineSubscriptionReference InvoiceLineSubscriptionReference contains the references to the subscriptions that this line is related to.

type InvoiceLineTaxBehavior

type InvoiceLineTaxBehavior string

InvoiceLineTaxBehavior InvoiceLineTaxBehavior details how the tax item is applied to the base amount.

Inclusive means the tax is included in the base amount. Exclusive means the tax is added to the base amount.

const (
	InvoiceLineTaxBehaviorExclusive InvoiceLineTaxBehavior = "exclusive"
	InvoiceLineTaxBehaviorInclusive InvoiceLineTaxBehavior = "inclusive"
)

Defines values for InvoiceLineTaxBehavior.

type InvoiceLineTaxItem

type InvoiceLineTaxItem struct {
	// Behavior Is the tax item inclusive or exclusive of the base amount.
	Behavior *InvoiceLineTaxBehavior `json:"behavior,omitempty"`

	// Config Tax provider configuration.
	Config *TaxConfig `json:"config,omitempty"`

	// Percent Percent defines the percentage set manually or determined from
	// the rate key (calculated if rate present). A nil percent implies that
	// this tax combo is **exempt** from tax.")
	Percent *Percentage `json:"percent,omitempty"`

	// Surcharge Some countries require an additional surcharge (calculated if rate present).
	Surcharge *Numeric `json:"surcharge,omitempty"`
}

InvoiceLineTaxItem TaxConfig stores the configuration for a tax line relative to an invoice line.

type InvoiceListParamsCustomers

type InvoiceListParamsCustomers = []string

InvoiceListParamsCustomers defines model for InvoiceListParams.customers.

type InvoiceListParamsExpand

type InvoiceListParamsExpand = []InvoiceExpand

InvoiceListParamsExpand defines model for InvoiceListParams.expand.

type InvoiceListParamsExtendedStatuses

type InvoiceListParamsExtendedStatuses = []string

InvoiceListParamsExtendedStatuses defines model for InvoiceListParams.extendedStatuses.

type InvoiceListParamsIncludeDeleted

type InvoiceListParamsIncludeDeleted = bool

InvoiceListParamsIncludeDeleted defines model for InvoiceListParams.includeDeleted.

type InvoiceListParamsIssuedAfter

type InvoiceListParamsIssuedAfter = time.Time

InvoiceListParamsIssuedAfter defines model for InvoiceListParams.issuedAfter.

type InvoiceListParamsIssuedBefore

type InvoiceListParamsIssuedBefore = time.Time

InvoiceListParamsIssuedBefore defines model for InvoiceListParams.issuedBefore.

type InvoiceListParamsStatuses

type InvoiceListParamsStatuses = []InvoiceStatus

InvoiceListParamsStatuses defines model for InvoiceListParams.statuses.

type InvoiceNumber

type InvoiceNumber = string

InvoiceNumber 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 InvoiceOrderBy

type InvoiceOrderBy string

InvoiceOrderBy InvoiceOrderBy specifies the ordering options for invoice listing.

const (
	InvoiceOrderByCreatedAt    InvoiceOrderBy = "createdAt"
	InvoiceOrderByCustomerName InvoiceOrderBy = "customer.name"
	InvoiceOrderByIssuedAt     InvoiceOrderBy = "issuedAt"
	InvoiceOrderByStatus       InvoiceOrderBy = "status"
	InvoiceOrderByUpdatedAt    InvoiceOrderBy = "updatedAt"
)

Defines values for InvoiceOrderBy.

type InvoiceOrderByOrderingOrder

type InvoiceOrderByOrderingOrder = SortOrder

InvoiceOrderByOrderingOrder The order direction.

type InvoiceOrderByOrderingOrderBy

type InvoiceOrderByOrderingOrderBy = InvoiceOrderBy

InvoiceOrderByOrderingOrderBy InvoiceOrderBy specifies the ordering options for invoice listing.

type InvoicePaginatedResponse

type InvoicePaginatedResponse struct {
	// Items The items in the current page.
	Items []Invoice `json:"items"`

	// Page The items in the current page.
	Page int `json:"page"`

	// PageSize The items in the current page.
	PageSize int `json:"pageSize"`

	// TotalCount The items in the current page.
	TotalCount int `json:"totalCount"`
}

InvoicePaginatedResponse Paginated response

type InvoicePaymentTerms

type InvoicePaymentTerms struct {
	// Terms The terms of payment for the invoice.
	Terms *PaymentTerms `json:"terms,omitempty"`
}

InvoicePaymentTerms Payment contains details as to how the invoice should be paid.

type InvoicePendingLineCreate

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

InvoicePendingLineCreate InvoiceLineCreate represents the create model for an invoice line.

func (InvoicePendingLineCreate) AsInvoiceFlatFeePendingLineCreate

func (t InvoicePendingLineCreate) AsInvoiceFlatFeePendingLineCreate() (InvoiceFlatFeePendingLineCreate, error)

AsInvoiceFlatFeePendingLineCreate returns the union data inside the InvoicePendingLineCreate as a InvoiceFlatFeePendingLineCreate

func (InvoicePendingLineCreate) AsInvoiceUsageBasedPendingLineCreate

func (t InvoicePendingLineCreate) AsInvoiceUsageBasedPendingLineCreate() (InvoiceUsageBasedPendingLineCreate, error)

AsInvoiceUsageBasedPendingLineCreate returns the union data inside the InvoicePendingLineCreate as a InvoiceUsageBasedPendingLineCreate

func (InvoicePendingLineCreate) Discriminator

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

func (*InvoicePendingLineCreate) FromInvoiceFlatFeePendingLineCreate

func (t *InvoicePendingLineCreate) FromInvoiceFlatFeePendingLineCreate(v InvoiceFlatFeePendingLineCreate) error

FromInvoiceFlatFeePendingLineCreate overwrites any union data inside the InvoicePendingLineCreate as the provided InvoiceFlatFeePendingLineCreate

func (*InvoicePendingLineCreate) FromInvoiceUsageBasedPendingLineCreate

func (t *InvoicePendingLineCreate) FromInvoiceUsageBasedPendingLineCreate(v InvoiceUsageBasedPendingLineCreate) error

FromInvoiceUsageBasedPendingLineCreate overwrites any union data inside the InvoicePendingLineCreate as the provided InvoiceUsageBasedPendingLineCreate

func (InvoicePendingLineCreate) MarshalJSON

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

func (*InvoicePendingLineCreate) MergeInvoiceFlatFeePendingLineCreate

func (t *InvoicePendingLineCreate) MergeInvoiceFlatFeePendingLineCreate(v InvoiceFlatFeePendingLineCreate) error

MergeInvoiceFlatFeePendingLineCreate performs a merge with any union data inside the InvoicePendingLineCreate, using the provided InvoiceFlatFeePendingLineCreate

func (*InvoicePendingLineCreate) MergeInvoiceUsageBasedPendingLineCreate

func (t *InvoicePendingLineCreate) MergeInvoiceUsageBasedPendingLineCreate(v InvoiceUsageBasedPendingLineCreate) error

MergeInvoiceUsageBasedPendingLineCreate performs a merge with any union data inside the InvoicePendingLineCreate, using the provided InvoiceUsageBasedPendingLineCreate

func (*InvoicePendingLineCreate) UnmarshalJSON

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

func (InvoicePendingLineCreate) ValueByDiscriminator

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

type InvoicePendingLinesActionFiltersInput

type InvoicePendingLinesActionFiltersInput struct {
	// LineIds The pending line items to include in the invoice, if not provided:
	// - all line items that have invoice_at < asOf will be included
	// - [progressive billing only] all usage based line items will be included up to asOf, new
	// usage-based line items will be staged for the rest of the billing cycle
	//
	// All lineIDs present in the list, must exists and must be invoicable as of asOf, or the action will fail.
	LineIds *[]string `json:"lineIds,omitempty"`
}

InvoicePendingLinesActionFiltersInput InvoicePendingLinesActionFiltersInput specifies which lines to include in the invoice.

type InvoicePendingLinesActionInput

type InvoicePendingLinesActionInput struct {
	// AsOf The time as of which the invoice is created.
	//
	// If not provided, the current time is used.
	AsOf *time.Time `json:"asOf,omitempty"`

	// CustomerId The customer ID for which to create the invoice.
	CustomerId string `json:"customerId"`

	// Filters Filters to apply when creating the invoice.
	Filters *InvoicePendingLinesActionFiltersInput `json:"filters,omitempty"`
}

InvoicePendingLinesActionInput BillingInvoiceActionInput is the input for creating an invoice.

Invoice creation is always based on already pending line items created by the billingCreateLineByCustomer operation. Empty invoices are not allowed.

type InvoicePendingLinesActionJSONRequestBody

type InvoicePendingLinesActionJSONRequestBody = InvoicePendingLinesActionInput

InvoicePendingLinesActionJSONRequestBody defines body for InvoicePendingLinesAction for application/json ContentType.

type InvoiceReference

type InvoiceReference struct {
	// Id The ID of the invoice.
	Id string `json:"id"`

	// Number The number of the invoice.
	Number *InvoiceNumber `json:"number,omitempty"`
}

InvoiceReference Reference to an invoice.

type InvoiceReplaceUpdate

type InvoiceReplaceUpdate struct {
	// Customer The customer the invoice is sent to.
	Customer BillingPartyReplaceUpdate `json:"customer"`

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

	// DraftUntil The time until the invoice is in draft status.
	//
	// On draft invoice creation it is calculated from the workflow settings.
	//
	// If manual approval is required, the draftUntil time is set.
	DraftUntil *time.Time `json:"draftUntil,omitempty"`

	// Lines The lines included in the invoice.
	Lines []InvoiceLineReplaceUpdate `json:"lines"`

	// Metadata Additional metadata for the resource.
	Metadata *Metadata `json:"metadata"`

	// Supplier The supplier of the lines included in the invoice.
	Supplier BillingPartyReplaceUpdate `json:"supplier"`

	// Workflow The workflow settings for the invoice.
	Workflow InvoiceWorkflowReplaceUpdate `json:"workflow"`
}

InvoiceReplaceUpdate InvoiceReplaceUpdate represents the update model for an invoice.

type InvoiceSimulationFlatFeeLine

type InvoiceSimulationFlatFeeLine struct {
	// Category Category of the flat fee.
	Category *InvoiceFlatFeeCategory `json:"category,omitempty"`

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

	// Id ID of the line. If not specified it will be auto-generated.
	//
	// When discounts are specified, this must be provided, so that the discount can reference it.
	Id *string `json:"id,omitempty"`

	// InvoiceAt The time this line item should be invoiced.
	InvoiceAt time.Time `json:"invoiceAt"`

	// Metadata Additional metadata for the resource.
	Metadata *Metadata `json:"metadata"`

	// Name Human-readable name for the resource. Between 1 and 256 characters.
	Name string `json:"name"`

	// PaymentTerm Payment term of the line.
	PaymentTerm *PricePaymentTerm `json:"paymentTerm,omitempty"`

	// PerUnitAmount Price of the item being sold.
	PerUnitAmount Numeric `json:"perUnitAmount"`

	// Period Period of the line item applies to for revenue recognition pruposes.
	//
	// Billing always treats periods as start being inclusive and end being exclusive.
	Period Period `json:"period"`

	// Quantity Quantity of the item being sold.
	Quantity Numeric `json:"quantity"`

	// TaxConfig Tax config specify the tax configuration for this line.
	TaxConfig *TaxConfig `json:"taxConfig,omitempty"`

	// Type Type of the line.
	Type InvoiceSimulationFlatFeeLineType `json:"type"`
}

InvoiceSimulationFlatFeeLine InvoiceSimulationFlatFeeLine represents a flat fee line item that can be input to the simulation endpoint.

type InvoiceSimulationFlatFeeLineType

type InvoiceSimulationFlatFeeLineType string

InvoiceSimulationFlatFeeLineType Type of the line.

const (
	InvoiceSimulationFlatFeeLineTypeFlatFee InvoiceSimulationFlatFeeLineType = "flat_fee"
)

Defines values for InvoiceSimulationFlatFeeLineType.

type InvoiceSimulationInput

type InvoiceSimulationInput struct {
	// Currency Currency for all invoice line items.
	//
	// Multi currency invoices are not supported yet.
	Currency CurrencyCode `json:"currency"`

	// Lines Lines to be included in the generated invoice.
	Lines []InvoiceSimulationLine `json:"lines"`

	// Number The number of the invoice.
	Number *InvoiceNumber `json:"number,omitempty"`
}

InvoiceSimulationInput InvoiceSimulationInput is the input for simulating an invoice.

type InvoiceSimulationLine

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

InvoiceSimulationLine InvoiceSimulationInput represents a line item that can be input to the simulation endpoint.

func (InvoiceSimulationLine) AsInvoiceSimulationFlatFeeLine

func (t InvoiceSimulationLine) AsInvoiceSimulationFlatFeeLine() (InvoiceSimulationFlatFeeLine, error)

AsInvoiceSimulationFlatFeeLine returns the union data inside the InvoiceSimulationLine as a InvoiceSimulationFlatFeeLine

func (InvoiceSimulationLine) AsInvoiceSimulationUsageBasedLine

func (t InvoiceSimulationLine) AsInvoiceSimulationUsageBasedLine() (InvoiceSimulationUsageBasedLine, error)

AsInvoiceSimulationUsageBasedLine returns the union data inside the InvoiceSimulationLine as a InvoiceSimulationUsageBasedLine

func (InvoiceSimulationLine) Discriminator

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

func (*InvoiceSimulationLine) FromInvoiceSimulationFlatFeeLine

func (t *InvoiceSimulationLine) FromInvoiceSimulationFlatFeeLine(v InvoiceSimulationFlatFeeLine) error

FromInvoiceSimulationFlatFeeLine overwrites any union data inside the InvoiceSimulationLine as the provided InvoiceSimulationFlatFeeLine

func (*InvoiceSimulationLine) FromInvoiceSimulationUsageBasedLine

func (t *InvoiceSimulationLine) FromInvoiceSimulationUsageBasedLine(v InvoiceSimulationUsageBasedLine) error

FromInvoiceSimulationUsageBasedLine overwrites any union data inside the InvoiceSimulationLine as the provided InvoiceSimulationUsageBasedLine

func (InvoiceSimulationLine) MarshalJSON

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

func (*InvoiceSimulationLine) MergeInvoiceSimulationFlatFeeLine

func (t *InvoiceSimulationLine) MergeInvoiceSimulationFlatFeeLine(v InvoiceSimulationFlatFeeLine) error

MergeInvoiceSimulationFlatFeeLine performs a merge with any union data inside the InvoiceSimulationLine, using the provided InvoiceSimulationFlatFeeLine

func (*InvoiceSimulationLine) MergeInvoiceSimulationUsageBasedLine

func (t *InvoiceSimulationLine) MergeInvoiceSimulationUsageBasedLine(v InvoiceSimulationUsageBasedLine) error

MergeInvoiceSimulationUsageBasedLine performs a merge with any union data inside the InvoiceSimulationLine, using the provided InvoiceSimulationUsageBasedLine

func (*InvoiceSimulationLine) UnmarshalJSON

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

func (InvoiceSimulationLine) ValueByDiscriminator

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

type InvoiceSimulationUsageBasedLine

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

	// FeatureKey The feature that the usage is based on.
	FeatureKey string `json:"featureKey"`

	// Id ID of the line. If not specified it will be auto-generated.
	//
	// When discounts are specified, this must be provided, so that the discount can reference it.
	Id *string `json:"id,omitempty"`

	// InvoiceAt The time this line item should be invoiced.
	InvoiceAt time.Time `json:"invoiceAt"`

	// Metadata Additional metadata for the resource.
	Metadata *Metadata `json:"metadata"`

	// Name Human-readable name for the resource. Between 1 and 256 characters.
	Name string `json:"name"`

	// Period Period of the line item applies to for revenue recognition pruposes.
	//
	// Billing always treats periods as start being inclusive and end being exclusive.
	Period Period `json:"period"`

	// PreLinePeriodQuantity The quantity of the item used before this line's period, if the line is billed progressively.
	PreLinePeriodQuantity *Numeric `json:"preLinePeriodQuantity,omitempty"`

	// Price Price of the usage-based item being sold.
	Price RateCardUsageBasedPrice `json:"price"`

	// Quantity The quantity of the item being sold.
	Quantity Numeric `json:"quantity"`

	// TaxConfig Tax config specify the tax configuration for this line.
	TaxConfig *TaxConfig `json:"taxConfig,omitempty"`

	// Type Type of the line.
	Type InvoiceSimulationUsageBasedLineType `json:"type"`
}

InvoiceSimulationUsageBasedLine InvoiceSimulationUsageBasedLine represents a usage-based line item that can be input to the simulation endpoint.

type InvoiceSimulationUsageBasedLineType

type InvoiceSimulationUsageBasedLineType string

InvoiceSimulationUsageBasedLineType Type of the line.

const (
	InvoiceSimulationUsageBasedLineTypeUsageBased InvoiceSimulationUsageBasedLineType = "usage_based"
)

Defines values for InvoiceSimulationUsageBasedLineType.

type InvoiceStatus

type InvoiceStatus string

InvoiceStatus InvoiceStatus describes the status of an invoice.

const (
	InvoiceStatusDraft             InvoiceStatus = "draft"
	InvoiceStatusGathering         InvoiceStatus = "gathering"
	InvoiceStatusIssued            InvoiceStatus = "issued"
	InvoiceStatusIssuing           InvoiceStatus = "issuing"
	InvoiceStatusOverdue           InvoiceStatus = "overdue"
	InvoiceStatusPaid              InvoiceStatus = "paid"
	InvoiceStatusPaymentProcessing InvoiceStatus = "payment_processing"
	InvoiceStatusUncollectible     InvoiceStatus = "uncollectible"
	InvoiceStatusVoided            InvoiceStatus = "voided"
)

Defines values for InvoiceStatus.

type InvoiceStatusDetails

type InvoiceStatusDetails struct {
	// AvailableActions The actions that can be performed on the invoice.
	AvailableActions InvoiceAvailableActions `json:"availableActions"`

	// ExtendedStatus Extended status information for the invoice.
	ExtendedStatus string `json:"extendedStatus"`

	// Failed Is the invoice in a failed state?
	Failed bool `json:"failed"`

	// Immutable Is the invoice editable?
	Immutable bool `json:"immutable"`
}

InvoiceStatusDetails InvoiceStatusDetails represents the details of the invoice status.

API users are encouraged to rely on the immutable/failed/avaliableActions fields to determine the next steps of the invoice instead of the extendedStatus field.

type InvoiceTotals

type InvoiceTotals struct {
	// Amount The total value of the line before taxes, discounts and commitments.
	Amount Numeric `json:"amount"`

	// ChargesTotal The amount of value of the line that are due to additional charges.
	ChargesTotal Numeric `json:"chargesTotal"`

	// DiscountsTotal The amount of value of the line that are due to discounts.
	DiscountsTotal Numeric `json:"discountsTotal"`

	// TaxesExclusiveTotal The total amount of taxes that are added on top of amount from the line.
	TaxesExclusiveTotal Numeric `json:"taxesExclusiveTotal"`

	// TaxesInclusiveTotal The total amount of taxes that are included in the line.
	TaxesInclusiveTotal Numeric `json:"taxesInclusiveTotal"`

	// TaxesTotal The total amount of taxes for this line.
	TaxesTotal Numeric `json:"taxesTotal"`

	// Total The total amount value of the line after taxes, discounts and commitments.
	Total Numeric `json:"total"`
}

InvoiceTotals Totals contains the summaries of all calculations for the invoice.

type InvoiceType

type InvoiceType string

InvoiceType InvoiceType represents the type of invoice.

The type of invoice determines the purpose of the invoice and how it should be handled.

const (
	InvoiceTypeCreditNote InvoiceType = "credit_note"
	InvoiceTypeStandard   InvoiceType = "standard"
)

Defines values for InvoiceType.

type InvoiceUsageBasedLine

type InvoiceUsageBasedLine struct {
	// Charges Charges applied to this line. (like minimum spend)
	//
	// New charges can be added via the invoice's charges API, to facilitate
	// charges that are affecting multiple lines.
	Charges *[]BillingLineCharge `json:"charges,omitempty"`

	// Children The lines detailing the item or service sold.
	Children *[]InvoiceLine `json:"children,omitempty"`

	// CreatedAt Timestamp of when the resource was created.
	CreatedAt time.Time `json:"createdAt"`

	// Currency The currency of this line.
	Currency CurrencyCode `json:"currency"`

	// DeletedAt Timestamp of when the resource was permanently deleted.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`

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

	// Discounts Discounts detailes applied to this line.
	//
	// New discounts can be added via the invoice's discounts API, to facilitate
	// discounts that are affecting multiple lines.
	Discounts *[]InvoiceLineDiscount `json:"discounts,omitempty"`

	// ExternalIds External IDs of the invoice in other apps such as Stripe.
	ExternalIds *InvoiceLineAppExternalIds `json:"externalIds,omitempty"`

	// FeatureKey The feature that the usage is based on.
	FeatureKey string `json:"featureKey"`

	// Id ID of the line.
	Id string `json:"id"`

	// Invoice The invoice this item belongs to.
	Invoice *InvoiceReference `json:"invoice,omitempty"`

	// InvoiceAt The time this line item should be invoiced.
	InvoiceAt time.Time `json:"invoiceAt"`

	// ManagedBy managedBy specifies if the line is manually added via the api or managed by OpenMeter.
	ManagedBy InvoiceLineManagedBy `json:"managedBy"`

	// Metadata Additional metadata for the resource.
	Metadata *Metadata `json:"metadata"`

	// Name Human-readable name for the resource. Between 1 and 256 characters.
	Name string `json:"name"`

	// Period Period of the line item applies to for revenue recognition pruposes.
	//
	// Billing always treats periods as start being inclusive and end being exclusive.
	Period Period `json:"period"`

	// PreLinePeriodQuantity The quantity of the item used in before this line's period.
	//
	// It is non-zero in case of progressive billing, when this shows how much of the usage was already billed.
	PreLinePeriodQuantity *Numeric `json:"preLinePeriodQuantity,omitempty"`

	// Price Price of the usage-based item being sold.
	Price RateCardUsageBasedPrice `json:"price"`

	// Quantity The quantity of the item being sold.
	Quantity *Numeric `json:"quantity,omitempty"`

	// Status Status of the line.
	//
	// External calls always create valid lines, other line types are managed by the
	// billing engine of OpenMeter.
	Status InvoiceLineStatus `json:"status"`

	// Subscriptions Subscription are the references to the subscritpions that this line is related to.
	Subscriptions *InvoiceLineSubscriptionReference `json:"subscriptions,omitempty"`

	// TaxConfig Tax config specify the tax configuration for this line.
	TaxConfig *TaxConfig `json:"taxConfig,omitempty"`

	// Taxes Taxes applied to the invoice totals.
	Taxes *[]InvoiceLineTaxItem `json:"taxes,omitempty"`

	// Totals Totals for this line.
	Totals InvoiceTotals `json:"totals"`

	// Type Type of the line.
	Type InvoiceUsageBasedLineType `json:"type"`

	// UpdatedAt Timestamp of when the resource was last updated.
	UpdatedAt time.Time `json:"updatedAt"`
}

InvoiceUsageBasedLine InvoiceUsageBasedLine represents a line item that is sold to the customer based on usage.

type InvoiceUsageBasedLineReplaceUpdate

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

	// FeatureKey The feature that the usage is based on.
	FeatureKey string `json:"featureKey"`

	// Id The ID of the line.
	Id *string `json:"id,omitempty"`

	// InvoiceAt The time this line item should be invoiced.
	InvoiceAt time.Time `json:"invoiceAt"`

	// Metadata Additional metadata for the resource.
	Metadata *Metadata `json:"metadata"`

	// Name Human-readable name for the resource. Between 1 and 256 characters.
	Name string `json:"name"`

	// Period Period of the line item applies to for revenue recognition pruposes.
	//
	// Billing always treats periods as start being inclusive and end being exclusive.
	Period Period `json:"period"`

	// Price Price of the usage-based item being sold.
	Price RateCardUsageBasedPrice `json:"price"`

	// TaxConfig Tax config specify the tax configuration for this line.
	TaxConfig *TaxConfig `json:"taxConfig,omitempty"`

	// Type Type of the line.
	Type InvoiceUsageBasedLineReplaceUpdateType `json:"type"`
}

InvoiceUsageBasedLineReplaceUpdate InvoiceUpdateUsageBasedLineReplaceUpdate represents the update model for an UBP invoice line.

This type makes ID optional to allow for creating new lines as part of the update.

type InvoiceUsageBasedLineReplaceUpdateType

type InvoiceUsageBasedLineReplaceUpdateType string

InvoiceUsageBasedLineReplaceUpdateType Type of the line.

const (
	InvoiceUsageBasedLineReplaceUpdateTypeUsageBased InvoiceUsageBasedLineReplaceUpdateType = "usage_based"
)

Defines values for InvoiceUsageBasedLineReplaceUpdateType.

type InvoiceUsageBasedLineType

type InvoiceUsageBasedLineType string

InvoiceUsageBasedLineType Type of the line.

const (
	InvoiceUsageBasedLineTypeUsageBased InvoiceUsageBasedLineType = "usage_based"
)

Defines values for InvoiceUsageBasedLineType.

type InvoiceUsageBasedPendingLineCreate

type InvoiceUsageBasedPendingLineCreate struct {
	// Currency The currency of this line.
	Currency CurrencyCode `json:"currency"`

	// CustomerId The customer this line item belongs to.
	CustomerId string `json:"customerId"`

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

	// FeatureKey The feature that the usage is based on.
	FeatureKey string `json:"featureKey"`

	// InvoiceAt The time this line item should be invoiced.
	InvoiceAt time.Time `json:"invoiceAt"`

	// Metadata Additional metadata for the resource.
	Metadata *Metadata `json:"metadata"`

	// Name Human-readable name for the resource. Between 1 and 256 characters.
	Name string `json:"name"`

	// Period Period of the line item applies to for revenue recognition pruposes.
	//
	// Billing always treats periods as start being inclusive and end being exclusive.
	Period Period `json:"period"`

	// Price Price of the usage-based item being sold.
	Price RateCardUsageBasedPrice `json:"price"`

	// TaxConfig Tax config specify the tax configuration for this line.
	TaxConfig *TaxConfig `json:"taxConfig,omitempty"`

	// Type Type of the line.
	Type InvoiceUsageBasedPendingLineCreateType `json:"type"`
}

InvoiceUsageBasedPendingLineCreate InvoiceUsageBasedLineCreateWithCustomer represents the create model for an invoice line that is sold to the customer based on usage.

type InvoiceUsageBasedPendingLineCreateType

type InvoiceUsageBasedPendingLineCreateType string

InvoiceUsageBasedPendingLineCreateType Type of the line.

const (
	InvoiceUsageBasedPendingLineCreateTypeUsageBased InvoiceUsageBasedPendingLineCreateType = "usage_based"
)

Defines values for InvoiceUsageBasedPendingLineCreateType.

type InvoiceWorkflowInvoicingSettingsReplaceUpdate

type InvoiceWorkflowInvoicingSettingsReplaceUpdate struct {
	// AutoAdvance Whether to automatically issue the invoice after the draftPeriod has passed.
	AutoAdvance *bool `json:"autoAdvance,omitempty"`

	// DefaultTaxConfig Default tax configuration to apply to the invoices.
	DefaultTaxConfig *TaxConfig `json:"defaultTaxConfig,omitempty"`

	// DraftPeriod The period for the invoice to be kept in draft status for manual reviews.
	DraftPeriod *string `json:"draftPeriod,omitempty"`

	// DueAfter The period after which the invoice is due.
	DueAfter *string `json:"dueAfter,omitempty"`
}

InvoiceWorkflowInvoicingSettingsReplaceUpdate InvoiceWorkflowInvoicingSettingsReplaceUpdate represents the update model for the invoicing settings of an invoice workflow.

type InvoiceWorkflowReplaceUpdate

type InvoiceWorkflowReplaceUpdate struct {
	// Workflow The workflow used for this invoice.
	Workflow InvoiceWorkflowSettingsReplaceUpdate `json:"workflow"`
}

InvoiceWorkflowReplaceUpdate InvoiceWorkflowReplaceUpdate represents the update model for an invoice workflow.

Fields that are immutable a re removed from the model. This is based on InvoiceWorkflowSettings.

type InvoiceWorkflowSettings

type InvoiceWorkflowSettings struct {
	// Apps The apps that will be used to orchestrate the invoice's workflow.
	Apps *BillingProfileAppsOrReference `json:"apps,omitempty"`

	// SourceBillingProfileId sourceBillingProfileID is the billing profile on which the workflow was based on.
	//
	// The profile is snapshotted on invoice creation, after which it can be altered independently
	// of the profile itself.
	SourceBillingProfileId string `json:"sourceBillingProfileId"`

	// Workflow The workflow details used by this invoice.
	Workflow BillingWorkflow `json:"workflow"`
}

InvoiceWorkflowSettings InvoiceWorkflowSettings represents the workflow settings used by the invoice.

This is a clone of the billing profile's workflow settings at the time of invoice creation with customer overrides considered.

type InvoiceWorkflowSettingsReplaceUpdate

type InvoiceWorkflowSettingsReplaceUpdate struct {
	// Invoicing The invoicing settings for this workflow
	Invoicing InvoiceWorkflowInvoicingSettingsReplaceUpdate `json:"invoicing"`

	// Payment The payment settings for this workflow
	Payment BillingWorkflowPaymentSettings `json:"payment"`
}

InvoiceWorkflowSettingsReplaceUpdate Mutable workflow settings for an invoice.

Other fields on the invoice's workflow are not mutable, they serve as a history of the invoice's workflow at creation time.

type LimitOffsetLimit

type LimitOffsetLimit = int

LimitOffsetLimit defines model for LimitOffset.limit.

type LimitOffsetOffset

type LimitOffsetOffset = int

LimitOffsetOffset defines model for LimitOffset.offset.

type ListAppsParams

type ListAppsParams struct {
	// Page The page number.
	Page *PaginatedQueryPage `form:"page,omitempty" json:"page,omitempty"`

	// PageSize The number of items in the page.
	PageSize *PaginatedQueryPageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"`
}

ListAppsParams defines parameters for ListApps.

type ListBillingProfileCustomerOverridesParams

type ListBillingProfileCustomerOverridesParams struct {
	BillingProfile *[]string `form:"billingProfile,omitempty" json:"billingProfile,omitempty"`

	// Page Start date-time in RFC 3339 format.
	//
	// Inclusive.
	Page *PaginationPage `form:"page,omitempty" json:"page,omitempty"`

	// PageSize Number of items per page.
	//
	// Default is 100.
	PageSize *PaginationPageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"`

	// Offset Number of items to skip.
	//
	// Default is 0.
	Offset *LimitOffsetOffset `form:"offset,omitempty" json:"offset,omitempty"`

	// Limit Number of items to return.
	//
	// Default is 100.
	Limit *LimitOffsetLimit `form:"limit,omitempty" json:"limit,omitempty"`

	// Order The order direction.
	Order *BillingProfileCustomerOverrideOrderByOrderingOrder `form:"order,omitempty" json:"order,omitempty"`

	// OrderBy The order by field.
	OrderBy *BillingProfileCustomerOverrideOrderByOrderingOrderBy `form:"orderBy,omitempty" json:"orderBy,omitempty"`
}

ListBillingProfileCustomerOverridesParams defines parameters for ListBillingProfileCustomerOverrides.

type ListBillingProfilesParams

type ListBillingProfilesParams struct {
	IncludeArchived *bool                   `form:"includeArchived,omitempty" json:"includeArchived,omitempty"`
	Expand          *[]BillingProfileExpand `form:"expand,omitempty" json:"expand,omitempty"`

	// Page Start date-time in RFC 3339 format.
	//
	// Inclusive.
	Page *PaginationPage `form:"page,omitempty" json:"page,omitempty"`

	// PageSize Number of items per page.
	//
	// Default is 100.
	PageSize *PaginationPageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"`

	// Offset Number of items to skip.
	//
	// Default is 0.
	Offset *LimitOffsetOffset `form:"offset,omitempty" json:"offset,omitempty"`

	// Limit Number of items to return.
	//
	// Default is 100.
	Limit *LimitOffsetLimit `form:"limit,omitempty" json:"limit,omitempty"`

	// Order The order direction.
	Order *BillingProfileOrderByOrderingOrder `form:"order,omitempty" json:"order,omitempty"`

	// OrderBy The order by field.
	OrderBy *BillingProfileOrderByOrderingOrderBy `form:"orderBy,omitempty" json:"orderBy,omitempty"`
}

ListBillingProfilesParams defines parameters for ListBillingProfiles.

type ListCustomerAppDataParams

type ListCustomerAppDataParams struct {
	// Page The page number.
	Page *PaginatedQueryPage `form:"page,omitempty" json:"page,omitempty"`

	// PageSize The number of items in the page.
	PageSize *PaginatedQueryPageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"`

	// Type Filter customer data by app type.
	Type *QueryCustomerListType `form:"type,omitempty" json:"type,omitempty"`
}

ListCustomerAppDataParams defines parameters for ListCustomerAppData.

type ListCustomersParams

type ListCustomersParams struct {
	// Page The page number.
	Page *PaginatedQueryPage `form:"page,omitempty" json:"page,omitempty"`

	// PageSize The number of items in the page.
	PageSize *PaginatedQueryPageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"`

	// Order The order direction.
	Order *CustomerOrderByOrderingOrder `form:"order,omitempty" json:"order,omitempty"`

	// OrderBy The order by field.
	OrderBy *CustomerOrderByOrderingOrderBy `form:"orderBy,omitempty" json:"orderBy,omitempty"`

	// IncludeDeleted Include deleted customers.
	IncludeDeleted *QueryCustomerListIncludeDeleted `form:"includeDeleted,omitempty" json:"includeDeleted,omitempty"`

	// Key Filter customers by key.
	// Case-sensitive exact match.
	Key *QueryCustomerListKey `form:"key,omitempty" json:"key,omitempty"`

	// Name Filter customers by name.
	// Case-insensitive partial match.
	Name *QueryCustomerListName `form:"name,omitempty" json:"name,omitempty"`

	// PrimaryEmail Filter customers by primary email.
	// Case-insensitive partial match.
	PrimaryEmail *QueryCustomerListPrimaryEmail `form:"primaryEmail,omitempty" json:"primaryEmail,omitempty"`

	// Subject Filter customers by usage attribution subject.
	// Case-insensitive partial match.
	Subject *QueryCustomerListSubject `form:"subject,omitempty" json:"subject,omitempty"`

	// PlanKey Filter customers by the plan key of their susbcription.
	PlanKey *QueryCustomerListPlanKey `form:"planKey,omitempty" json:"planKey,omitempty"`
}

ListCustomersParams defines parameters for ListCustomers.

type ListEntitlementGrantsParams

type ListEntitlementGrantsParams struct {
	IncludeDeleted *bool         `form:"includeDeleted,omitempty" json:"includeDeleted,omitempty"`
	OrderBy        *GrantOrderBy `form:"orderBy,omitempty" json:"orderBy,omitempty"`
}

ListEntitlementGrantsParams defines parameters for ListEntitlementGrants.

type ListEntitlementsParams

type ListEntitlementsParams struct {
	// Feature Filtering by multiple features.
	//
	// Usage: `?feature=feature-1&feature=feature-2`
	Feature *[]string `form:"feature,omitempty" json:"feature,omitempty"`

	// Subject Filtering by multiple subjects.
	//
	// Usage: `?subject=customer-1&subject=customer-2`
	Subject *[]string `form:"subject,omitempty" json:"subject,omitempty"`

	// EntitlementType Filtering by multiple entitlement types.
	//
	// Usage: `?entitlementType=metered&entitlementType=boolean`
	EntitlementType *[]EntitlementType `form:"entitlementType,omitempty" json:"entitlementType,omitempty"`

	// ExcludeInactive Exclude inactive entitlements in the response (those scheduled for later or earlier)
	ExcludeInactive *bool `form:"excludeInactive,omitempty" json:"excludeInactive,omitempty"`

	// Page Start date-time in RFC 3339 format.
	//
	// Inclusive.
	Page *PaginationPage `form:"page,omitempty" json:"page,omitempty"`

	// PageSize Number of items per page.
	//
	// Default is 100.
	PageSize *PaginationPageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"`

	// Offset Number of items to skip.
	//
	// Default is 0.
	Offset *LimitOffsetOffset `form:"offset,omitempty" json:"offset,omitempty"`

	// Limit Number of items to return.
	//
	// Default is 100.
	Limit *LimitOffsetLimit `form:"limit,omitempty" json:"limit,omitempty"`

	// Order The order direction.
	Order *EntitlementOrderByOrderingOrder `form:"order,omitempty" json:"order,omitempty"`

	// OrderBy The order by field.
	OrderBy *EntitlementOrderByOrderingOrderBy `form:"orderBy,omitempty" json:"orderBy,omitempty"`
}

ListEntitlementsParams defines parameters for ListEntitlements.

type ListEntitlementsResult

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

ListEntitlementsResult List entitlements result

func (ListEntitlementsResult) AsEntitlementPaginatedResponse

func (t ListEntitlementsResult) AsEntitlementPaginatedResponse() (EntitlementPaginatedResponse, error)

AsEntitlementPaginatedResponse returns the union data inside the ListEntitlementsResult as a EntitlementPaginatedResponse

func (ListEntitlementsResult) AsListEntitlementsResult0

func (t ListEntitlementsResult) AsListEntitlementsResult0() (ListEntitlementsResult0, error)

AsListEntitlementsResult0 returns the union data inside the ListEntitlementsResult as a ListEntitlementsResult0

func (*ListEntitlementsResult) FromEntitlementPaginatedResponse

func (t *ListEntitlementsResult) FromEntitlementPaginatedResponse(v EntitlementPaginatedResponse) error

FromEntitlementPaginatedResponse overwrites any union data inside the ListEntitlementsResult as the provided EntitlementPaginatedResponse

func (*ListEntitlementsResult) FromListEntitlementsResult0

func (t *ListEntitlementsResult) FromListEntitlementsResult0(v ListEntitlementsResult0) error

FromListEntitlementsResult0 overwrites any union data inside the ListEntitlementsResult as the provided ListEntitlementsResult0

func (ListEntitlementsResult) MarshalJSON

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

func (*ListEntitlementsResult) MergeEntitlementPaginatedResponse

func (t *ListEntitlementsResult) MergeEntitlementPaginatedResponse(v EntitlementPaginatedResponse) error

MergeEntitlementPaginatedResponse performs a merge with any union data inside the ListEntitlementsResult, using the provided EntitlementPaginatedResponse

func (*ListEntitlementsResult) MergeListEntitlementsResult0

func (t *ListEntitlementsResult) MergeListEntitlementsResult0(v ListEntitlementsResult0) error

MergeListEntitlementsResult0 performs a merge with any union data inside the ListEntitlementsResult, using the provided ListEntitlementsResult0

func (*ListEntitlementsResult) UnmarshalJSON

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

type ListEntitlementsResult0

type ListEntitlementsResult0 = []Entitlement

ListEntitlementsResult0 defines model for .

type ListEventsParams

type ListEventsParams struct {
	// IngestedAtFrom Start date-time in RFC 3339 format.
	//
	// Inclusive.
	IngestedAtFrom *time.Time `form:"ingestedAtFrom,omitempty" json:"ingestedAtFrom,omitempty"`

	// IngestedAtTo End date-time in RFC 3339 format.
	//
	// Inclusive.
	IngestedAtTo *time.Time `form:"ingestedAtTo,omitempty" json:"ingestedAtTo,omitempty"`

	// HasError If not provided lists all events.
	//
	// If provided with true, only list events with processing error.
	//
	// If provided with false, only list events without processing error.
	HasError *bool `form:"hasError,omitempty" json:"hasError,omitempty"`

	// Id The event ID.
	//
	// Accepts partial ID.
	Id *string `form:"id,omitempty" json:"id,omitempty"`

	// Subject The event subject.
	//
	// Accepts partial subject.
	Subject *string `form:"subject,omitempty" json:"subject,omitempty"`

	// From Start date-time in RFC 3339 format.
	//
	// Inclusive.
	From *time.Time `form:"from,omitempty" json:"from,omitempty"`

	// To End date-time in RFC 3339 format.
	//
	// Inclusive.
	To *time.Time `form:"to,omitempty" json:"to,omitempty"`

	// Limit Number of events to return.
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
}

ListEventsParams defines parameters for ListEvents.

type ListFeaturesParams

type ListFeaturesParams struct {
	// MeterSlug Filter by meterSlug
	MeterSlug *[]string `form:"meterSlug,omitempty" json:"meterSlug,omitempty"`

	// IncludeArchived Filter by meterGroupByFilters
	IncludeArchived *bool `form:"includeArchived,omitempty" json:"includeArchived,omitempty"`

	// Page Start date-time in RFC 3339 format.
	//
	// Inclusive.
	Page *PaginationPage `form:"page,omitempty" json:"page,omitempty"`

	// PageSize Number of items per page.
	//
	// Default is 100.
	PageSize *PaginationPageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"`

	// Offset Number of items to skip.
	//
	// Default is 0.
	Offset *LimitOffsetOffset `form:"offset,omitempty" json:"offset,omitempty"`

	// Limit Number of items to return.
	//
	// Default is 100.
	Limit *LimitOffsetLimit `form:"limit,omitempty" json:"limit,omitempty"`

	// Order The order direction.
	Order *FeatureOrderByOrderingOrder `form:"order,omitempty" json:"order,omitempty"`

	// OrderBy The order by field.
	OrderBy *FeatureOrderByOrderingOrderBy `form:"orderBy,omitempty" json:"orderBy,omitempty"`
}

ListFeaturesParams defines parameters for ListFeatures.

type ListFeaturesResult

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

ListFeaturesResult List features result

func (ListFeaturesResult) AsFeaturePaginatedResponse

func (t ListFeaturesResult) AsFeaturePaginatedResponse() (FeaturePaginatedResponse, error)

AsFeaturePaginatedResponse returns the union data inside the ListFeaturesResult as a FeaturePaginatedResponse

func (ListFeaturesResult) AsListFeaturesResult0

func (t ListFeaturesResult) AsListFeaturesResult0() (ListFeaturesResult0, error)

AsListFeaturesResult0 returns the union data inside the ListFeaturesResult as a ListFeaturesResult0

func (*ListFeaturesResult) FromFeaturePaginatedResponse

func (t *ListFeaturesResult) FromFeaturePaginatedResponse(v FeaturePaginatedResponse) error

FromFeaturePaginatedResponse overwrites any union data inside the ListFeaturesResult as the provided FeaturePaginatedResponse

func (*ListFeaturesResult) FromListFeaturesResult0

func (t *ListFeaturesResult) FromListFeaturesResult0(v ListFeaturesResult0) error

FromListFeaturesResult0 overwrites any union data inside the ListFeaturesResult as the provided ListFeaturesResult0

func (ListFeaturesResult) MarshalJSON

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

func (*ListFeaturesResult) MergeFeaturePaginatedResponse

func (t *ListFeaturesResult) MergeFeaturePaginatedResponse(v FeaturePaginatedResponse) error

MergeFeaturePaginatedResponse performs a merge with any union data inside the ListFeaturesResult, using the provided FeaturePaginatedResponse

func (*ListFeaturesResult) MergeListFeaturesResult0

func (t *ListFeaturesResult) MergeListFeaturesResult0(v ListFeaturesResult0) error

MergeListFeaturesResult0 performs a merge with any union data inside the ListFeaturesResult, using the provided ListFeaturesResult0

func (*ListFeaturesResult) UnmarshalJSON

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

type ListFeaturesResult0

type ListFeaturesResult0 = []Feature

ListFeaturesResult0 defines model for .

type ListGrantsParams

type ListGrantsParams struct {
	// Feature Filtering by multiple features.
	//
	// Usage: `?feature=feature-1&feature=feature-2`
	Feature *[]string `form:"feature,omitempty" json:"feature,omitempty"`

	// Subject Filtering by multiple subjects.
	//
	// Usage: `?subject=customer-1&subject=customer-2`
	Subject *[]string `form:"subject,omitempty" json:"subject,omitempty"`

	// IncludeDeleted Include deleted
	IncludeDeleted *bool `form:"includeDeleted,omitempty" json:"includeDeleted,omitempty"`

	// Page Start date-time in RFC 3339 format.
	//
	// Inclusive.
	Page *PaginationPage `form:"page,omitempty" json:"page,omitempty"`

	// PageSize Number of items per page.
	//
	// Default is 100.
	PageSize *PaginationPageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"`

	// Offset Number of items to skip.
	//
	// Default is 0.
	Offset *LimitOffsetOffset `form:"offset,omitempty" json:"offset,omitempty"`

	// Limit Number of items to return.
	//
	// Default is 100.
	Limit *LimitOffsetLimit `form:"limit,omitempty" json:"limit,omitempty"`

	// Order The order direction.
	Order *GrantOrderByOrderingOrder `form:"order,omitempty" json:"order,omitempty"`

	// OrderBy The order by field.
	OrderBy *GrantOrderByOrderingOrderBy `form:"orderBy,omitempty" json:"orderBy,omitempty"`
}

ListGrantsParams defines parameters for ListGrants.

type ListInvoicesParams

type ListInvoicesParams struct {
	// Statuses Filter by the invoice status.
	Statuses *InvoiceListParamsStatuses `form:"statuses,omitempty" json:"statuses,omitempty"`

	// ExtendedStatuses Filter by invoice extended statuses
	ExtendedStatuses *InvoiceListParamsExtendedStatuses `form:"extendedStatuses,omitempty" json:"extendedStatuses,omitempty"`

	// IssuedAfter Filter by invoice creation time
	IssuedAfter *InvoiceListParamsIssuedAfter `form:"issuedAfter,omitempty" json:"issuedAfter,omitempty"`

	// IssuedBefore Filter by invoice creation time
	IssuedBefore *InvoiceListParamsIssuedBefore `form:"issuedBefore,omitempty" json:"issuedBefore,omitempty"`

	// Expand What parts of the list output to expand in listings
	Expand *InvoiceListParamsExpand `form:"expand,omitempty" json:"expand,omitempty"`

	// Customers Filter by customer ID
	Customers *InvoiceListParamsCustomers `form:"customers,omitempty" json:"customers,omitempty"`

	// IncludeDeleted Include deleted invoices
	IncludeDeleted *InvoiceListParamsIncludeDeleted `form:"includeDeleted,omitempty" json:"includeDeleted,omitempty"`

	// Page Start date-time in RFC 3339 format.
	//
	// Inclusive.
	Page *PaginationPage `form:"page,omitempty" json:"page,omitempty"`

	// PageSize Number of items per page.
	//
	// Default is 100.
	PageSize *PaginationPageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"`

	// Offset Number of items to skip.
	//
	// Default is 0.
	Offset *LimitOffsetOffset `form:"offset,omitempty" json:"offset,omitempty"`

	// Limit Number of items to return.
	//
	// Default is 100.
	Limit *LimitOffsetLimit `form:"limit,omitempty" json:"limit,omitempty"`

	// Order The order direction.
	Order *InvoiceOrderByOrderingOrder `form:"order,omitempty" json:"order,omitempty"`

	// OrderBy The order by field.
	OrderBy *InvoiceOrderByOrderingOrderBy `form:"orderBy,omitempty" json:"orderBy,omitempty"`
}

ListInvoicesParams defines parameters for ListInvoices.

type ListMarketplaceListingsParams

type ListMarketplaceListingsParams struct {
	// Page The page number.
	Page *PaginatedQueryPage `form:"page,omitempty" json:"page,omitempty"`

	// PageSize The number of items in the page.
	PageSize *PaginatedQueryPageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"`
}

ListMarketplaceListingsParams defines parameters for ListMarketplaceListings.

type ListNotificationChannelsParams

type ListNotificationChannelsParams struct {
	// IncludeDeleted Include deleted notification channels in response.
	//
	// Usage: `?includeDeleted=true`
	IncludeDeleted *bool `form:"includeDeleted,omitempty" json:"includeDeleted,omitempty"`

	// IncludeDisabled Include disabled notification channels in response.
	//
	// Usage: `?includeDisabled=false`
	IncludeDisabled *bool `form:"includeDisabled,omitempty" json:"includeDisabled,omitempty"`

	// Page Start date-time in RFC 3339 format.
	//
	// Inclusive.
	Page *PaginationPage `form:"page,omitempty" json:"page,omitempty"`

	// PageSize Number of items per page.
	//
	// Default is 100.
	PageSize *PaginationPageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"`

	// Order The order direction.
	Order *NotificationChannelOrderByOrderingOrder `form:"order,omitempty" json:"order,omitempty"`

	// OrderBy The order by field.
	OrderBy *NotificationChannelOrderByOrderingOrderBy `form:"orderBy,omitempty" json:"orderBy,omitempty"`
}

ListNotificationChannelsParams defines parameters for ListNotificationChannels.

type ListNotificationEventsParams

type ListNotificationEventsParams struct {
	// From Start date-time in RFC 3339 format.
	// Inclusive.
	From *time.Time `form:"from,omitempty" json:"from,omitempty"`

	// To End date-time in RFC 3339 format.
	// Inclusive.
	To *time.Time `form:"to,omitempty" json:"to,omitempty"`

	// Feature Filtering by multiple feature ids or keys.
	//
	// Usage: `?feature=feature-1&feature=feature-2`
	Feature *[]string `form:"feature,omitempty" json:"feature,omitempty"`

	// Subject Filtering by multiple subject ids or keys.
	//
	// Usage: `?subject=subject-1&subject=subject-2`
	Subject *[]string `form:"subject,omitempty" json:"subject,omitempty"`

	// Rule Filtering by multiple rule ids.
	//
	// Usage: `?rule=01J8J2XYZ2N5WBYK09EDZFBSZM&rule=01J8J4R4VZH180KRKQ63NB2VA5`
	Rule *[]string `form:"rule,omitempty" json:"rule,omitempty"`

	// Channel Filtering by multiple channel ids.
	//
	// Usage: `?channel=01J8J4RXH778XB056JS088PCYT&channel=01J8J4S1R1G9EVN62RG23A9M6J`
	Channel *[]string `form:"channel,omitempty" json:"channel,omitempty"`

	// Page Start date-time in RFC 3339 format.
	//
	// Inclusive.
	Page *PaginationPage `form:"page,omitempty" json:"page,omitempty"`

	// PageSize Number of items per page.
	//
	// Default is 100.
	PageSize *PaginationPageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"`

	// Order The order direction.
	Order *NotificationEventOrderByOrderingOrder `form:"order,omitempty" json:"order,omitempty"`

	// OrderBy The order by field.
	OrderBy *NotificationEventOrderByOrderingOrderBy `form:"orderBy,omitempty" json:"orderBy,omitempty"`
}

ListNotificationEventsParams defines parameters for ListNotificationEvents.

type ListNotificationRulesParams

type ListNotificationRulesParams struct {
	// IncludeDeleted Include deleted notification rules in response.
	//
	// Usage: `?includeDeleted=true`
	IncludeDeleted *bool `form:"includeDeleted,omitempty" json:"includeDeleted,omitempty"`

	// IncludeDisabled Include disabled notification rules in response.
	//
	// Usage: `?includeDisabled=false`
	IncludeDisabled *bool `form:"includeDisabled,omitempty" json:"includeDisabled,omitempty"`

	// Feature Filtering by multiple feature ids/keys.
	//
	// Usage: `?feature=feature-1&feature=feature-2`
	Feature *[]string `form:"feature,omitempty" json:"feature,omitempty"`

	// Channel Filtering by multiple notifiaction channel ids.
	//
	// Usage: `?channel=01ARZ3NDEKTSV4RRFFQ69G5FAV&channel=01J8J2Y5X4NNGQS32CF81W95E3`
	Channel *[]string `form:"channel,omitempty" json:"channel,omitempty"`

	// Page Start date-time in RFC 3339 format.
	//
	// Inclusive.
	Page *PaginationPage `form:"page,omitempty" json:"page,omitempty"`

	// PageSize Number of items per page.
	//
	// Default is 100.
	PageSize *PaginationPageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"`

	// Order The order direction.
	Order *NotificationRuleOrderByOrderingOrder `form:"order,omitempty" json:"order,omitempty"`

	// OrderBy The order by field.
	OrderBy *NotificationRuleOrderByOrderingOrderBy `form:"orderBy,omitempty" json:"orderBy,omitempty"`
}

ListNotificationRulesParams defines parameters for ListNotificationRules.

type ListPlansParams

type ListPlansParams struct {
	// IncludeDeleted Include deleted plans in response.
	//
	// Usage: `?includeDeleted=true`
	IncludeDeleted *bool `form:"includeDeleted,omitempty" json:"includeDeleted,omitempty"`

	// Id Filter by plan.id attribute
	Id *[]string `form:"id,omitempty" json:"id,omitempty"`

	// Key Filter by plan.key attribute
	Key *[]string `form:"key,omitempty" json:"key,omitempty"`

	// KeyVersion Filter by plan.key and plan.version attributes
	KeyVersion *map[string][]int `json:"keyVersion,omitempty"`

	// Currency Filter by plan.currency attribute
	Currency *[]CurrencyCode `form:"currency,omitempty" json:"currency,omitempty"`

	// Page Start date-time in RFC 3339 format.
	//
	// Inclusive.
	Page *PaginationPage `form:"page,omitempty" json:"page,omitempty"`

	// PageSize Number of items per page.
	//
	// Default is 100.
	PageSize *PaginationPageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"`

	// Order The order direction.
	Order *PlanOrderByOrderingOrder `form:"order,omitempty" json:"order,omitempty"`

	// OrderBy The order by field.
	OrderBy *PlanOrderByOrderingOrderBy `form:"orderBy,omitempty" json:"orderBy,omitempty"`
}

ListPlansParams defines parameters for ListPlans.

type ListPortalTokensParams

type ListPortalTokensParams struct {
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
}

ListPortalTokensParams defines parameters for ListPortalTokens.

type ListSubjectEntitlementsParams

type ListSubjectEntitlementsParams struct {
	IncludeDeleted *bool `form:"includeDeleted,omitempty" json:"includeDeleted,omitempty"`
}

ListSubjectEntitlementsParams defines parameters for ListSubjectEntitlements.

type MarketplaceApiKeyInstallRequestType

type MarketplaceApiKeyInstallRequestType = AppType

MarketplaceApiKeyInstallRequestType Type of the app.

type MarketplaceAppAPIKeyInstallJSONBody

type MarketplaceAppAPIKeyInstallJSONBody struct {
	// ApiKey The API key for the provider.
	// For example, the Stripe API key.
	ApiKey string `json:"apiKey"`

	// Name Name of the application to install.
	//
	// If not set defaults to the marketplace item's description.
	Name *string `json:"name,omitempty"`
}

MarketplaceAppAPIKeyInstallJSONBody defines parameters for MarketplaceAppAPIKeyInstall.

type MarketplaceAppAPIKeyInstallJSONRequestBody

type MarketplaceAppAPIKeyInstallJSONRequestBody MarketplaceAppAPIKeyInstallJSONBody

MarketplaceAppAPIKeyInstallJSONRequestBody defines body for MarketplaceAppAPIKeyInstall for application/json ContentType.

type MarketplaceInstallResponse

type MarketplaceInstallResponse struct {
	// App App.
	// One of: stripe
	App App `json:"app"`

	// DefaultForCapabilityTypes Default for capabilities
	DefaultForCapabilityTypes []AppCapabilityType `json:"defaultForCapabilityTypes"`
}

MarketplaceInstallResponse Marketplace install response.

type MarketplaceListing

type MarketplaceListing struct {
	// Capabilities The app's capabilities.
	Capabilities []AppCapability `json:"capabilities"`

	// Description The app's description.
	Description string `json:"description"`

	// Name The app's name.
	Name string `json:"name"`

	// Type The app's type
	Type AppType `json:"type"`
}

MarketplaceListing A marketplace listing. Represent an available app in the app marketplace that can be installed to the organization.

Marketplace apps only exist in config so they don't extend the Resource model.

type MarketplaceListingList

type MarketplaceListingList struct {
	// Items The items in the page.
	Items []MarketplaceListing `json:"items"`

	// Page The page number.
	Page int `json:"page"`

	// PageSize The number of items in the page.
	PageSize int `json:"pageSize"`

	// TotalCount The total number of items.
	TotalCount int `json:"totalCount"`
}

MarketplaceListingList A page of results.

type MarketplaceOAuth2InstallAuthorizeParams

type MarketplaceOAuth2InstallAuthorizeParams struct {
	// State Required if the "state" parameter was present in the client authorization request.
	// The exact value received from the client:
	//
	// Unique, randomly generated, opaque, and non-guessable string that is sent
	// when starting an authentication request and validated when processing the response.
	State *OAuth2AuthorizationCodeGrantSuccessParamsState `form:"state,omitempty" json:"state,omitempty"`

	// Code Authorization code which the client will later exchange for an access token.
	// Required with the success response.
	Code *OAuth2AuthorizationCodeGrantSuccessParamsCode `form:"code,omitempty" json:"code,omitempty"`

	// Error Error code.
	// Required with the error response.
	Error *OAuth2AuthorizationCodeGrantErrorParamsError `form:"error,omitempty" json:"error,omitempty"`

	// ErrorDescription Optional human-readable text providing additional information,
	// used to assist the client developer in understanding the error that occurred.
	ErrorDescription *OAuth2AuthorizationCodeGrantErrorParamsErrorDescription `form:"error_description,omitempty" json:"error_description,omitempty"`

	// ErrorUri Optional uri identifying a human-readable web page with
	// information about the error, used to provide the client
	// developer with additional information about the error
	ErrorUri *OAuth2AuthorizationCodeGrantErrorParamsErrorUri `form:"error_uri,omitempty" json:"error_uri,omitempty"`
}

MarketplaceOAuth2InstallAuthorizeParams defines parameters for MarketplaceOAuth2InstallAuthorize.

type MarketplaceOAuth2InstallAuthorizeRequestType

type MarketplaceOAuth2InstallAuthorizeRequestType = AppType

MarketplaceOAuth2InstallAuthorizeRequestType Type of the app.

type MeasureUsageFrom

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

MeasureUsageFrom Measure usage from

func (MeasureUsageFrom) AsMeasureUsageFromPreset

func (t MeasureUsageFrom) AsMeasureUsageFromPreset() (MeasureUsageFromPreset, error)

AsMeasureUsageFromPreset returns the union data inside the MeasureUsageFrom as a MeasureUsageFromPreset

func (MeasureUsageFrom) AsMeasureUsageFromTime

func (t MeasureUsageFrom) AsMeasureUsageFromTime() (MeasureUsageFromTime, error)

AsMeasureUsageFromTime returns the union data inside the MeasureUsageFrom as a MeasureUsageFromTime

func (*MeasureUsageFrom) FromMeasureUsageFromPreset

func (t *MeasureUsageFrom) FromMeasureUsageFromPreset(v MeasureUsageFromPreset) error

FromMeasureUsageFromPreset overwrites any union data inside the MeasureUsageFrom as the provided MeasureUsageFromPreset

func (*MeasureUsageFrom) FromMeasureUsageFromTime

func (t *MeasureUsageFrom) FromMeasureUsageFromTime(v MeasureUsageFromTime) error

FromMeasureUsageFromTime overwrites any union data inside the MeasureUsageFrom as the provided MeasureUsageFromTime

func (MeasureUsageFrom) MarshalJSON

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

func (*MeasureUsageFrom) MergeMeasureUsageFromPreset

func (t *MeasureUsageFrom) MergeMeasureUsageFromPreset(v MeasureUsageFromPreset) error

MergeMeasureUsageFromPreset performs a merge with any union data inside the MeasureUsageFrom, using the provided MeasureUsageFromPreset

func (*MeasureUsageFrom) MergeMeasureUsageFromTime

func (t *MeasureUsageFrom) MergeMeasureUsageFromTime(v MeasureUsageFromTime) error

MergeMeasureUsageFromTime performs a merge with any union data inside the MeasureUsageFrom, using the provided MeasureUsageFromTime

func (*MeasureUsageFrom) UnmarshalJSON

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

type MeasureUsageFromPreset

type MeasureUsageFromPreset string

MeasureUsageFromPreset Start of measurement options

const (
	MeasureUsageFromPresetCurrentPeriodStart MeasureUsageFromPreset = "CURRENT_PERIOD_START"
	MeasureUsageFromPresetNow                MeasureUsageFromPreset = "NOW"
)

Defines values for MeasureUsageFromPreset.

type MeasureUsageFromTime

type MeasureUsageFromTime = time.Time

MeasureUsageFromTime [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.

type Metadata

type Metadata = map[string]string

Metadata Set of key-value pairs. Metadata can be used to store additional information about a resource.

type Meter

type Meter = models.Meter

Meter A meter is a configuration that defines how to match and aggregate events.

type MeterAggregation

type MeterAggregation = models.MeterAggregation

MeterAggregation The aggregation type to use for the meter.

type MeterQueryFilterGroupBy

type MeterQueryFilterGroupBy map[string]string

MeterQueryFilterGroupBy defines model for MeterQuery.filterGroupBy.

type MeterQueryFrom

type MeterQueryFrom = time.Time

MeterQueryFrom defines model for MeterQuery.from.

type MeterQueryGroupBy

type MeterQueryGroupBy = []string

MeterQueryGroupBy defines model for MeterQuery.groupBy.

type MeterQueryResult

type MeterQueryResult struct {
	Data []MeterQueryRow `json:"data"`

	// From [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.
	From *time.Time `json:"from,omitempty"`

	// To [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.
	To *time.Time `json:"to,omitempty"`

	// WindowSize Aggregation window size.
	WindowSize *WindowSize `json:"windowSize,omitempty"`
}

MeterQueryResult The result of a meter query.

type MeterQueryRow

type MeterQueryRow = models.MeterQueryRow

MeterQueryRow A row in the result of a meter query.

type MeterQuerySubject

type MeterQuerySubject = []string

MeterQuerySubject defines model for MeterQuery.subject.

type MeterQueryTo

type MeterQueryTo = time.Time

MeterQueryTo defines model for MeterQuery.to.

type MeterQueryWindowSize

type MeterQueryWindowSize = WindowSize

MeterQueryWindowSize Aggregation window size.

type MeterQueryWindowTimeZone

type MeterQueryWindowTimeZone = string

MeterQueryWindowTimeZone defines model for MeterQuery.windowTimeZone.

type MiddlewareFunc

type MiddlewareFunc func(http.Handler) http.Handler

type MigrateSubscriptionJSONBody

type MigrateSubscriptionJSONBody struct {
	TargetVersion *int `json:"targetVersion,omitempty"`
}

MigrateSubscriptionJSONBody defines parameters for MigrateSubscription.

type MigrateSubscriptionJSONRequestBody

type MigrateSubscriptionJSONRequestBody MigrateSubscriptionJSONBody

MigrateSubscriptionJSONRequestBody defines body for MigrateSubscription for application/json ContentType.

type NotFoundProblemResponse

type NotFoundProblemResponse = UnexpectedProblemResponse

NotFoundProblemResponse A Problem Details object (RFC 7807). Additional properties specific to the problem type may be present.

type NotificationChannel

type NotificationChannel = NotificationChannelWebhook

NotificationChannel Notification channel with webhook type.

type NotificationChannelCreateRequest

type NotificationChannelCreateRequest = NotificationChannelWebhookCreateRequest

NotificationChannelCreateRequest Request with input parameters for creating new notification channel with webhook type.

type NotificationChannelMeta

type NotificationChannelMeta struct {
	// Id Identifies the notification channel.
	Id string `json:"id"`

	// Type Notification channel type.
	Type NotificationChannelType `json:"type"`
}

NotificationChannelMeta Metadata only fields of a notification channel.

type NotificationChannelOrderBy

type NotificationChannelOrderBy string

NotificationChannelOrderBy Order by options for notification channels.

const (
	NotificationChannelOrderByCreatedAt NotificationChannelOrderBy = "createdAt"
	NotificationChannelOrderById        NotificationChannelOrderBy = "id"
	NotificationChannelOrderByType      NotificationChannelOrderBy = "type"
	NotificationChannelOrderByUpdatedAt NotificationChannelOrderBy = "updatedAt"
)

Defines values for NotificationChannelOrderBy.

type NotificationChannelOrderByOrderingOrder

type NotificationChannelOrderByOrderingOrder = SortOrder

NotificationChannelOrderByOrderingOrder The order direction.

type NotificationChannelOrderByOrderingOrderBy

type NotificationChannelOrderByOrderingOrderBy = NotificationChannelOrderBy

NotificationChannelOrderByOrderingOrderBy Order by options for notification channels.

type NotificationChannelPaginatedResponse

type NotificationChannelPaginatedResponse struct {
	// Items The items in the current page.
	Items []NotificationChannel `json:"items"`

	// Page The items in the current page.
	Page int `json:"page"`

	// PageSize The items in the current page.
	PageSize int `json:"pageSize"`

	// TotalCount The items in the current page.
	TotalCount int `json:"totalCount"`
}

NotificationChannelPaginatedResponse Paginated response

type NotificationChannelType

type NotificationChannelType string

NotificationChannelType Type of the notification channel.

const (
	NotificationChannelTypeWebhook NotificationChannelType = "WEBHOOK"
)

Defines values for NotificationChannelType.

type NotificationChannelWebhook

type NotificationChannelWebhook struct {
	// CreatedAt Timestamp of when the resource was created.
	CreatedAt time.Time `json:"createdAt"`

	// CustomHeaders Custom HTTP headers sent as part of the webhook request.
	CustomHeaders *map[string]string `json:"customHeaders,omitempty"`

	// DeletedAt Timestamp of when the resource was permanently deleted.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`

	// Disabled Whether the channel is disabled or not.
	Disabled *bool `json:"disabled,omitempty"`

	// Id Identifies the notification channel.
	Id string `json:"id"`

	// Name User friendly name of the channel.
	Name string `json:"name"`

	// SigningSecret Signing secret used for webhook request validation on the receiving end.
	//
	// Format: `base64` encoded random bytes optionally prefixed with `whsec_`. Recommended size: 24
	SigningSecret *string `json:"signingSecret,omitempty"`

	// Type Notification channel type.
	Type NotificationChannelWebhookType `json:"type"`

	// UpdatedAt Timestamp of when the resource was last updated.
	UpdatedAt time.Time `json:"updatedAt"`

	// Url Webhook URL where the notification is sent.
	Url string `json:"url"`
}

NotificationChannelWebhook Notification channel with webhook type.

type NotificationChannelWebhookCreateRequest

type NotificationChannelWebhookCreateRequest struct {
	// CustomHeaders Custom HTTP headers sent as part of the webhook request.
	CustomHeaders *map[string]string `json:"customHeaders,omitempty"`

	// Disabled Whether the channel is disabled or not.
	Disabled *bool `json:"disabled,omitempty"`

	// Name User friendly name of the channel.
	Name string `json:"name"`

	// SigningSecret Signing secret used for webhook request validation on the receiving end.
	//
	// Format: `base64` encoded random bytes optionally prefixed with `whsec_`. Recommended size: 24
	SigningSecret *string `json:"signingSecret,omitempty"`

	// Type Notification channel type.
	Type NotificationChannelWebhookCreateRequestType `json:"type"`

	// Url Webhook URL where the notification is sent.
	Url string `json:"url"`
}

NotificationChannelWebhookCreateRequest Request with input parameters for creating new notification channel with webhook type.

type NotificationChannelWebhookCreateRequestType

type NotificationChannelWebhookCreateRequestType string

NotificationChannelWebhookCreateRequestType Notification channel type.

const (
	NotificationChannelWebhookCreateRequestTypeWEBHOOK NotificationChannelWebhookCreateRequestType = "WEBHOOK"
)

Defines values for NotificationChannelWebhookCreateRequestType.

type NotificationChannelWebhookType

type NotificationChannelWebhookType string

NotificationChannelWebhookType Notification channel type.

const (
	NotificationChannelWebhookTypeWEBHOOK NotificationChannelWebhookType = "WEBHOOK"
)

Defines values for NotificationChannelWebhookType.

type NotificationEvent

type NotificationEvent struct {
	// Annotations Set of key-value pairs managed by the system. Cannot be modified by user.
	Annotations *Annotations `json:"annotations,omitempty"`

	// CreatedAt Timestamp when the notification event was created in RFC 3339 format.
	CreatedAt time.Time `json:"createdAt"`

	// DeliveryStatus The delivery status of the notification event.
	DeliveryStatus []NotificationEventDeliveryStatus `json:"deliveryStatus"`

	// Id A unique identifier of the notification event.
	Id string `json:"id"`

	// Payload Timestamp when the notification event was created in RFC 3339 format.
	Payload NotificationEventPayload `json:"payload"`

	// Rule The nnotification rule which generated this event.
	Rule NotificationRule `json:"rule"`

	// Type Type of the notification event.
	Type NotificationEventType `json:"type"`
}

NotificationEvent Type of the notification event.

type NotificationEventBalanceThresholdPayload

type NotificationEventBalanceThresholdPayload struct {
	// Data The data of the payload.
	Data NotificationEventBalanceThresholdPayloadData `json:"data"`

	// Id A unique identifier for the notification event the payload belongs to.
	Id string `json:"id"`

	// Timestamp Timestamp when the notification event was created in RFC 3339 format.
	Timestamp time.Time `json:"timestamp"`

	// Type Type of the notification event.
	Type NotificationEventBalanceThresholdPayloadType `json:"type"`
}

NotificationEventBalanceThresholdPayload Payload for notification event with `entitlements.balance.threshold` type.

type NotificationEventBalanceThresholdPayloadData

type NotificationEventBalanceThresholdPayloadData struct {
	Entitlement EntitlementMetered                    `json:"entitlement"`
	Feature     Feature                               `json:"feature"`
	Subject     Subject                               `json:"subject"`
	Threshold   NotificationRuleBalanceThresholdValue `json:"threshold"`
	Value       EntitlementValue                      `json:"value"`
}

NotificationEventBalanceThresholdPayloadData Data of the payload for notification event with `entitlements.balance.threshold` type.

type NotificationEventBalanceThresholdPayloadType

type NotificationEventBalanceThresholdPayloadType string

NotificationEventBalanceThresholdPayloadType Type of the notification event.

const (
	NotificationEventBalanceThresholdPayloadTypeEntitlementsBalanceThreshold NotificationEventBalanceThresholdPayloadType = "entitlements.balance.threshold"
)

Defines values for NotificationEventBalanceThresholdPayloadType.

type NotificationEventDeliveryStatus

type NotificationEventDeliveryStatus struct {
	// Channel Notification channel the delivery sattus associated with.
	Channel NotificationChannelMeta `json:"channel"`

	// Reason The reason of the last deliverry state update.
	Reason string `json:"reason"`

	// State Delivery state of the notification event to the channel.
	State NotificationEventDeliveryStatusState `json:"state"`

	// UpdatedAt Timestamp of when the status was last updated in RFC 3339 format.
	UpdatedAt time.Time `json:"updatedAt"`
}

NotificationEventDeliveryStatus The delivery status of the notification event.

type NotificationEventDeliveryStatusState

type NotificationEventDeliveryStatusState string

NotificationEventDeliveryStatusState The delivery state of the notification event to the channel.

const (
	NotificationEventDeliveryStatusStateFailed  NotificationEventDeliveryStatusState = "FAILED"
	NotificationEventDeliveryStatusStatePending NotificationEventDeliveryStatusState = "PENDING"
	NotificationEventDeliveryStatusStateSending NotificationEventDeliveryStatusState = "SENDING"
	NotificationEventDeliveryStatusStateSuccess NotificationEventDeliveryStatusState = "SUCCESS"
)

Defines values for NotificationEventDeliveryStatusState.

type NotificationEventOrderBy

type NotificationEventOrderBy string

NotificationEventOrderBy Order by options for notification channels.

const (
	NotificationEventOrderByCreatedAt NotificationEventOrderBy = "createdAt"
	NotificationEventOrderById        NotificationEventOrderBy = "id"
)

Defines values for NotificationEventOrderBy.

type NotificationEventOrderByOrderingOrder

type NotificationEventOrderByOrderingOrder = SortOrder

NotificationEventOrderByOrderingOrder The order direction.

type NotificationEventOrderByOrderingOrderBy

type NotificationEventOrderByOrderingOrderBy = NotificationEventOrderBy

NotificationEventOrderByOrderingOrderBy Order by options for notification channels.

type NotificationEventPaginatedResponse

type NotificationEventPaginatedResponse struct {
	// Items The items in the current page.
	Items []NotificationEvent `json:"items"`

	// Page The items in the current page.
	Page int `json:"page"`

	// PageSize The items in the current page.
	PageSize int `json:"pageSize"`

	// TotalCount The items in the current page.
	TotalCount int `json:"totalCount"`
}

NotificationEventPaginatedResponse Paginated response

type NotificationEventPayload

type NotificationEventPayload = NotificationEventBalanceThresholdPayload

NotificationEventPayload Payload for notification event with `entitlements.balance.threshold` type.

type NotificationEventType

type NotificationEventType string

NotificationEventType Type of the notification event.

const (
	NotificationEventTypeEntitlementsBalanceThreshold NotificationEventType = "entitlements.balance.threshold"
)

Defines values for NotificationEventType.

type NotificationRule

type NotificationRule = NotificationRuleBalanceThreshold

NotificationRule Notification rule with entitlements.balance.threshold type.

type NotificationRuleBalanceThreshold

type NotificationRuleBalanceThreshold struct {
	// Channels List of notification channels the rule applies to.
	Channels []NotificationChannelMeta `json:"channels"`

	// CreatedAt Timestamp of when the resource was created.
	CreatedAt time.Time `json:"createdAt"`

	// DeletedAt Timestamp of when the resource was permanently deleted.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`

	// Disabled Whether the rule is disabled or not.
	Disabled *bool `json:"disabled,omitempty"`

	// Features Optional field containing list of features the rule applies to.
	Features *[]FeatureMeta `json:"features,omitempty"`

	// Id Identifies the notification rule.
	Id string `json:"id"`

	// Name The user friendly name of the notification rule.
	Name string `json:"name"`

	// Thresholds List of thresholds the rule suppose to be triggered.
	Thresholds []NotificationRuleBalanceThresholdValue `json:"thresholds"`

	// Type Notification rule type.
	Type NotificationRuleBalanceThresholdType `json:"type"`

	// UpdatedAt Timestamp of when the resource was last updated.
	UpdatedAt time.Time `json:"updatedAt"`
}

NotificationRuleBalanceThreshold Notification rule with entitlements.balance.threshold type.

type NotificationRuleBalanceThresholdCreateRequest

type NotificationRuleBalanceThresholdCreateRequest struct {
	// Channels List of notification channels the rule is applied to.
	Channels []string `json:"channels"`

	// Disabled Whether the rule is disabled or not.
	Disabled *bool `json:"disabled,omitempty"`

	// Features Optional field for defining the scope of notification by feature. It may contain features by id or key.
	Features *[]string `json:"features,omitempty"`

	// Name The user friendly name of the notification rule.
	Name string `json:"name"`

	// Thresholds List of thresholds the rule suppose to be triggered.
	Thresholds []NotificationRuleBalanceThresholdValue `json:"thresholds"`

	// Type Notification rule type.
	Type NotificationRuleBalanceThresholdCreateRequestType `json:"type"`
}

NotificationRuleBalanceThresholdCreateRequest Request with input parameters for creating new notification rule with entitlements.balance.threashold type.

type NotificationRuleBalanceThresholdCreateRequestType

type NotificationRuleBalanceThresholdCreateRequestType string

NotificationRuleBalanceThresholdCreateRequestType Notification rule type.

const (
	NotificationRuleBalanceThresholdCreateRequestTypeEntitlementsBalanceThreshold NotificationRuleBalanceThresholdCreateRequestType = "entitlements.balance.threshold"
)

Defines values for NotificationRuleBalanceThresholdCreateRequestType.

type NotificationRuleBalanceThresholdType

type NotificationRuleBalanceThresholdType string

NotificationRuleBalanceThresholdType Notification rule type.

const (
	NotificationRuleBalanceThresholdTypeEntitlementsBalanceThreshold NotificationRuleBalanceThresholdType = "entitlements.balance.threshold"
)

Defines values for NotificationRuleBalanceThresholdType.

type NotificationRuleBalanceThresholdValue

type NotificationRuleBalanceThresholdValue struct {
	// Type Type of the threshold.
	Type NotificationRuleBalanceThresholdValueType `json:"type"`

	// Value Value of the threshold.
	Value float64 `json:"value"`
}

NotificationRuleBalanceThresholdValue Threshold value with multiple supported types.

type NotificationRuleBalanceThresholdValueType

type NotificationRuleBalanceThresholdValueType string

NotificationRuleBalanceThresholdValueType Type of the rule in the balance threshold specification.

const (
	NotificationRuleBalanceThresholdValueTypeNumber  NotificationRuleBalanceThresholdValueType = "NUMBER"
	NotificationRuleBalanceThresholdValueTypePercent NotificationRuleBalanceThresholdValueType = "PERCENT"
)

Defines values for NotificationRuleBalanceThresholdValueType.

type NotificationRuleCreateRequest

type NotificationRuleCreateRequest = NotificationRuleBalanceThresholdCreateRequest

NotificationRuleCreateRequest Request with input parameters for creating new notification rule with entitlements.balance.threashold type.

type NotificationRuleOrderBy

type NotificationRuleOrderBy string

NotificationRuleOrderBy Order by options for notification channels.

const (
	NotificationRuleOrderByCreatedAt NotificationRuleOrderBy = "createdAt"
	NotificationRuleOrderById        NotificationRuleOrderBy = "id"
	NotificationRuleOrderByType      NotificationRuleOrderBy = "type"
	NotificationRuleOrderByUpdatedAt NotificationRuleOrderBy = "updatedAt"
)

Defines values for NotificationRuleOrderBy.

type NotificationRuleOrderByOrderingOrder

type NotificationRuleOrderByOrderingOrder = SortOrder

NotificationRuleOrderByOrderingOrder The order direction.

type NotificationRuleOrderByOrderingOrderBy

type NotificationRuleOrderByOrderingOrderBy = NotificationRuleOrderBy

NotificationRuleOrderByOrderingOrderBy Order by options for notification channels.

type NotificationRulePaginatedResponse

type NotificationRulePaginatedResponse struct {
	// Items The items in the current page.
	Items []NotificationRule `json:"items"`

	// Page The items in the current page.
	Page int `json:"page"`

	// PageSize The items in the current page.
	PageSize int `json:"pageSize"`

	// TotalCount The items in the current page.
	TotalCount int `json:"totalCount"`
}

NotificationRulePaginatedResponse Paginated response

type Numeric

type Numeric = string

Numeric Numeric represents an arbitrary precision number.

type OAuth2AuthorizationCodeGrantErrorParamsError

type OAuth2AuthorizationCodeGrantErrorParamsError = OAuth2AuthorizationCodeGrantErrorType

OAuth2AuthorizationCodeGrantErrorParamsError OAuth2 authorization code grant error types.

type OAuth2AuthorizationCodeGrantErrorParamsErrorDescription

type OAuth2AuthorizationCodeGrantErrorParamsErrorDescription = string

OAuth2AuthorizationCodeGrantErrorParamsErrorDescription defines model for OAuth2AuthorizationCodeGrantErrorParams.error_description.

type OAuth2AuthorizationCodeGrantErrorParamsErrorUri

type OAuth2AuthorizationCodeGrantErrorParamsErrorUri = string

OAuth2AuthorizationCodeGrantErrorParamsErrorUri defines model for OAuth2AuthorizationCodeGrantErrorParams.error_uri.

type OAuth2AuthorizationCodeGrantErrorType

type OAuth2AuthorizationCodeGrantErrorType string

OAuth2AuthorizationCodeGrantErrorType OAuth2 authorization code grant error types.

const (
	OAuth2AuthorizationCodeGrantErrorTypeAccessDenied            OAuth2AuthorizationCodeGrantErrorType = "access_denied"
	OAuth2AuthorizationCodeGrantErrorTypeInvalidRequest          OAuth2AuthorizationCodeGrantErrorType = "invalid_request"
	OAuth2AuthorizationCodeGrantErrorTypeInvalidScope            OAuth2AuthorizationCodeGrantErrorType = "invalid_scope"
	OAuth2AuthorizationCodeGrantErrorTypeServerError             OAuth2AuthorizationCodeGrantErrorType = "server_error"
	OAuth2AuthorizationCodeGrantErrorTypeTemporarilyUnavailable  OAuth2AuthorizationCodeGrantErrorType = "temporarily_unavailable"
	OAuth2AuthorizationCodeGrantErrorTypeUnauthorizedClient      OAuth2AuthorizationCodeGrantErrorType = "unauthorized_client"
	OAuth2AuthorizationCodeGrantErrorTypeUnsupportedResponseType OAuth2AuthorizationCodeGrantErrorType = "unsupported_response_type"
)

Defines values for OAuth2AuthorizationCodeGrantErrorType.

type OAuth2AuthorizationCodeGrantSuccessParamsCode

type OAuth2AuthorizationCodeGrantSuccessParamsCode = string

OAuth2AuthorizationCodeGrantSuccessParamsCode defines model for OAuth2AuthorizationCodeGrantSuccessParams.code.

type OAuth2AuthorizationCodeGrantSuccessParamsState

type OAuth2AuthorizationCodeGrantSuccessParamsState = string

OAuth2AuthorizationCodeGrantSuccessParamsState defines model for OAuth2AuthorizationCodeGrantSuccessParams.state.

type OverrideEntitlementJSONRequestBody

type OverrideEntitlementJSONRequestBody = EntitlementCreateInputs

OverrideEntitlementJSONRequestBody defines body for OverrideEntitlement for application/json ContentType.

type PaginatedQueryPage

type PaginatedQueryPage = int

PaginatedQueryPage defines model for PaginatedQuery.page.

type PaginatedQueryPageSize

type PaginatedQueryPageSize = int

PaginatedQueryPageSize defines model for PaginatedQuery.pageSize.

type PaginationPage

type PaginationPage = int

PaginationPage defines model for Pagination.page.

type PaginationPageSize

type PaginationPageSize = int

PaginationPageSize defines model for Pagination.pageSize.

type PaymentDueDate

type PaymentDueDate struct {
	// Amount How much needs to be paid by the date.
	Amount Numeric `json:"amount"`

	// Currency If different from the parent document's base currency.
	Currency *CurrencyCode `json:"currency,omitempty"`

	// DueAt When the payment is due.
	DueAt time.Time `json:"dueAt"`

	// Notes Other details to take into account for the due date.
	Notes *string `json:"notes,omitempty"`

	// Percent Percentage of the total that should be paid by the date.
	Percent *Percentage `json:"percent,omitempty"`
}

PaymentDueDate PaymentDueDate contains an amount that should be paid by the given date.

type PaymentTermDueDate

type PaymentTermDueDate struct {
	// Detail Text detail of the chosen payment terms.
	Detail *string `json:"detail,omitempty"`

	// DueAt When the payment is due.
	DueAt []PaymentDueDate `json:"dueAt"`

	// Notes Description of the conditions for payment.
	Notes *string `json:"notes,omitempty"`

	// Type Type of terms to be applied.
	Type PaymentTermDueDateType `json:"type"`
}

PaymentTermDueDate PaymentTermDueDate defines the terms for payment on a specific date.

type PaymentTermDueDateType

type PaymentTermDueDateType string

PaymentTermDueDateType Type of terms to be applied.

const (
	PaymentTermDueDateTypeDueDate PaymentTermDueDateType = "due_date"
)

Defines values for PaymentTermDueDateType.

type PaymentTermInstant

type PaymentTermInstant struct {
	// Detail Text detail of the chosen payment terms.
	Detail *string `json:"detail,omitempty"`

	// Notes Description of the conditions for payment.
	Notes *string `json:"notes,omitempty"`

	// Type Type of terms to be applied.
	Type PaymentTermInstantType `json:"type"`
}

PaymentTermInstant PaymentTermInstant defines the terms for payment on receipt of invoice.

type PaymentTermInstantType

type PaymentTermInstantType string

PaymentTermInstantType Type of terms to be applied.

const (
	PaymentTermInstantTypeInstant PaymentTermInstantType = "instant"
)

Defines values for PaymentTermInstantType.

type PaymentTerms

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

PaymentTerms PaymentTerms defines the terms for payment.

func (PaymentTerms) AsPaymentTermDueDate

func (t PaymentTerms) AsPaymentTermDueDate() (PaymentTermDueDate, error)

AsPaymentTermDueDate returns the union data inside the PaymentTerms as a PaymentTermDueDate

func (PaymentTerms) AsPaymentTermInstant

func (t PaymentTerms) AsPaymentTermInstant() (PaymentTermInstant, error)

AsPaymentTermInstant returns the union data inside the PaymentTerms as a PaymentTermInstant

func (*PaymentTerms) FromPaymentTermDueDate

func (t *PaymentTerms) FromPaymentTermDueDate(v PaymentTermDueDate) error

FromPaymentTermDueDate overwrites any union data inside the PaymentTerms as the provided PaymentTermDueDate

func (*PaymentTerms) FromPaymentTermInstant

func (t *PaymentTerms) FromPaymentTermInstant(v PaymentTermInstant) error

FromPaymentTermInstant overwrites any union data inside the PaymentTerms as the provided PaymentTermInstant

func (PaymentTerms) MarshalJSON

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

func (*PaymentTerms) MergePaymentTermDueDate

func (t *PaymentTerms) MergePaymentTermDueDate(v PaymentTermDueDate) error

MergePaymentTermDueDate performs a merge with any union data inside the PaymentTerms, using the provided PaymentTermDueDate

func (*PaymentTerms) MergePaymentTermInstant

func (t *PaymentTerms) MergePaymentTermInstant(v PaymentTermInstant) error

MergePaymentTermInstant performs a merge with any union data inside the PaymentTerms, using the provided PaymentTermInstant

func (*PaymentTerms) UnmarshalJSON

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

type Percentage

type Percentage = string

Percentage Numeric representation of a percentage

type Period

type Period struct {
	// From Period start time.
	From time.Time `json:"from"`

	// To Period end time.
	To time.Time `json:"to"`
}

Period A period with a start and end time.

type Plan

type Plan struct {
	// Alignment Alignment configuration for the plan.
	Alignment *Alignment `json:"alignment,omitempty"`

	// CreatedAt Timestamp of when the resource was created.
	CreatedAt time.Time `json:"createdAt"`

	// Currency The currency code of the plan.
	Currency CurrencyCode `json:"currency"`

	// DeletedAt Timestamp of when the resource was permanently deleted.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`

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

	// EffectiveFrom The date and time when the plan becomes effective. When not specified, the plan is a draft.
	EffectiveFrom *time.Time `json:"effectiveFrom,omitempty"`

	// EffectiveTo The date and time when the plan is no longer effective. When not specified, the plan is effective indefinitely.
	EffectiveTo *time.Time `json:"effectiveTo,omitempty"`

	// Id A unique identifier for the resource.
	Id string `json:"id"`

	// Key A semi-unique identifier for the resource.
	Key string `json:"key"`

	// Metadata Additional metadata for the resource.
	Metadata *Metadata `json:"metadata"`

	// Name Human-readable name for the resource. Between 1 and 256 characters.
	Name string `json:"name"`

	// Phases The plan phase or pricing ramp allows changing a plan's rate cards over time as a subscription progresses.
	// A phase switch occurs only at the end of a billing period, ensuring that a single subscription invoice will not include charges from different phase prices.
	Phases []PlanPhase `json:"phases"`

	// Status The status of the plan.
	// Computed based on the effective start and end dates:
	// - draft = no effectiveFrom
	// - active = effectiveFrom <= now < effectiveTo
	// - archived / inactive = effectiveTo <= now
	// - scheduled = now < effectiveFrom < effectiveTo
	Status PlanStatus `json:"status"`

	// UpdatedAt Timestamp of when the resource was last updated.
	UpdatedAt time.Time `json:"updatedAt"`

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

Plan Plans provide a template for subscriptions.

type PlanCreate

type PlanCreate struct {
	// Alignment Alignment configuration for the plan.
	Alignment *Alignment `json:"alignment,omitempty"`

	// Currency The currency code of the plan.
	Currency CurrencyCode `json:"currency"`

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

	// Key A semi-unique identifier for the resource.
	Key string `json:"key"`

	// Metadata Additional metadata for the resource.
	Metadata *Metadata `json:"metadata"`

	// Name Human-readable name for the resource. Between 1 and 256 characters.
	Name string `json:"name"`

	// Phases The plan phase or pricing ramp allows changing a plan's rate cards over time as a subscription progresses.
	// A phase switch occurs only at the end of a billing period, ensuring that a single subscription invoice will not include charges from different phase prices.
	Phases []PlanPhase `json:"phases"`
}

PlanCreate Resource create operation model.

type PlanOrderBy

type PlanOrderBy string

PlanOrderBy Order by options for plans.

const (
	PlanOrderByCreateAt  PlanOrderBy = "create_at"
	PlanOrderById        PlanOrderBy = "id"
	PlanOrderByKey       PlanOrderBy = "key"
	PlanOrderByUpdatedAt PlanOrderBy = "updated_at"
	PlanOrderByVersion   PlanOrderBy = "version"
)

Defines values for PlanOrderBy.

type PlanOrderByOrderingOrder

type PlanOrderByOrderingOrder = SortOrder

PlanOrderByOrderingOrder The order direction.

type PlanOrderByOrderingOrderBy

type PlanOrderByOrderingOrderBy = PlanOrderBy

PlanOrderByOrderingOrderBy Order by options for plans.

type PlanPaginatedResponse

type PlanPaginatedResponse struct {
	// Items The items in the current page.
	Items []Plan `json:"items"`

	// Page The items in the current page.
	Page int `json:"page"`

	// PageSize The items in the current page.
	PageSize int `json:"pageSize"`

	// TotalCount The items in the current page.
	TotalCount int `json:"totalCount"`
}

PlanPaginatedResponse Paginated response

type PlanPhase

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

	// Discounts The discounts on the plan.
	Discounts *[]Discount `json:"discounts,omitempty"`

	// Duration The duration of the phase.
	Duration *string `json:"duration"`

	// Key A semi-unique identifier for the resource.
	Key string `json:"key"`

	// Metadata Additional metadata for the resource.
	Metadata *Metadata `json:"metadata"`

	// Name Human-readable name for the resource. Between 1 and 256 characters.
	Name string `json:"name"`

	// RateCards The rate cards of the plan.
	RateCards []RateCard `json:"rateCards"`
}

PlanPhase The plan phase or pricing ramp allows changing a plan's rate cards over time as a subscription progresses.

type PlanReference

type PlanReference struct {
	// Id The plan ID.
	Id string `json:"id"`

	// Key The plan key.
	Key string `json:"key"`

	// Version The plan version.
	Version int `json:"version"`
}

PlanReference References an exact plan.

type PlanReferenceInput

type PlanReferenceInput struct {
	// Key The plan key.
	Key string `json:"key"`

	// Version The plan version.
	Version *int `json:"version,omitempty"`
}

PlanReferenceInput References an exact plan defaulting to the current active version.

type PlanReplaceUpdate

type PlanReplaceUpdate struct {
	// Alignment Alignment configuration for the plan.
	Alignment *Alignment `json:"alignment,omitempty"`

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

	// Metadata Additional metadata for the resource.
	Metadata *Metadata `json:"metadata"`

	// Name Human-readable name for the resource. Between 1 and 256 characters.
	Name string `json:"name"`

	// Phases The plan phase or pricing ramp allows changing a plan's rate cards over time as a subscription progresses.
	// A phase switch occurs only at the end of a billing period, ensuring that a single subscription invoice will not include charges from different phase prices.
	Phases []PlanPhase `json:"phases"`
}

PlanReplaceUpdate Resource update operation model.

type PlanStatus

type PlanStatus string

PlanStatus The status of a plan.

const (
	PlanStatusActive    PlanStatus = "active"
	PlanStatusArchived  PlanStatus = "archived"
	PlanStatusDraft     PlanStatus = "draft"
	PlanStatusScheduled PlanStatus = "scheduled"
)

Defines values for PlanStatus.

type PlanSubscriptionChange

type PlanSubscriptionChange struct {
	// Alignment What alignment settings the subscription should have.
	Alignment *Alignment `json:"alignment,omitempty"`

	// Description Description for the Subscription.
	Description *string `json:"description,omitempty"`

	// Metadata Arbitrary metadata associated with the subscription.
	Metadata *Metadata `json:"metadata,omitempty"`

	// Name The name of the Subscription. If not provided the plan name is used.
	Name *string `json:"name,omitempty"`

	// Plan The plan reference to change to.
	Plan PlanReferenceInput `json:"plan"`

	// 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 SubscriptionTiming `json:"timing"`
}

PlanSubscriptionChange Change subscription based on plan.

type PlanSubscriptionCreate

type PlanSubscriptionCreate struct {
	// Alignment What alignment settings the subscription should have.
	Alignment *Alignment `json:"alignment,omitempty"`

	// CustomerId The ID of the customer. Provide either the key or ID. Has presedence over the key.
	CustomerId *string `json:"customerId,omitempty"`

	// CustomerKey The key of the customer. Provide either the key or ID.
	CustomerKey *string `json:"customerKey,omitempty"`

	// Description Description for the Subscription.
	Description *string `json:"description,omitempty"`

	// Metadata Arbitrary metadata associated with the subscription.
	Metadata *Metadata `json:"metadata,omitempty"`

	// Name The name of the Subscription. If not provided the plan name is used.
	Name *string `json:"name,omitempty"`

	// Plan The plan reference to change to.
	Plan PlanReferenceInput `json:"plan"`

	// Timing Timing configuration for the change, when the change should take effect.
	// The default is immediate.
	Timing *SubscriptionTiming `json:"timing,omitempty"`
}

PlanSubscriptionCreate Create subscription based on plan.

type PortalToken

type PortalToken struct {
	// AllowedMeterSlugs Optional, if defined only the specified meters will be allowed.
	AllowedMeterSlugs *[]string `json:"allowedMeterSlugs,omitempty"`

	// CreatedAt [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.
	CreatedAt *time.Time `json:"createdAt,omitempty"`
	Expired   *bool      `json:"expired,omitempty"`

	// ExpiresAt [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.
	ExpiresAt *time.Time `json:"expiresAt,omitempty"`

	// Id ULID (Universally Unique Lexicographically Sortable Identifier).
	Id      *string `json:"id,omitempty"`
	Subject string  `json:"subject"`

	// Token The token is only returned at creation.
	Token *string `json:"token,omitempty"`
}

PortalToken A consumer portal token.

Validator doesn't obey required for readOnly properties See: https://github.com/stoplightio/spectral/issues/1274

type PricePaymentTerm

type PricePaymentTerm string

PricePaymentTerm The payment term of a flat price. One of: in_advance or in_arrears.

const (
	PricePaymentTermInAdvance PricePaymentTerm = "in_advance"
	PricePaymentTermInArrears PricePaymentTerm = "in_arrears"
)

Defines values for PricePaymentTerm.

type PriceTier

type PriceTier struct {
	// FlatPrice The flat price component of the tier.
	FlatPrice *FlatPrice `json:"flatPrice"`

	// UnitPrice The unit price component of the tier.
	UnitPrice *UnitPrice `json:"unitPrice"`

	// UpToAmount Up to and including to this quantity will be contained in the tier.
	// If null, the tier is open-ended.
	UpToAmount *Numeric `json:"upToAmount,omitempty"`
}

PriceTier A price tier. At least one price component is required in each tier.

type QueryCustomerListIncludeDeleted

type QueryCustomerListIncludeDeleted = bool

QueryCustomerListIncludeDeleted defines model for queryCustomerList.includeDeleted.

type QueryCustomerListKey

type QueryCustomerListKey = string

QueryCustomerListKey defines model for queryCustomerList.key.

type QueryCustomerListName

type QueryCustomerListName = string

QueryCustomerListName defines model for queryCustomerList.name.

type QueryCustomerListPlanKey

type QueryCustomerListPlanKey = string

QueryCustomerListPlanKey defines model for queryCustomerList.planKey.

type QueryCustomerListPrimaryEmail

type QueryCustomerListPrimaryEmail = string

QueryCustomerListPrimaryEmail defines model for queryCustomerList.primaryEmail.

type QueryCustomerListSubject

type QueryCustomerListSubject = string

QueryCustomerListSubject defines model for queryCustomerList.subject.

type QueryCustomerListType

type QueryCustomerListType = AppType

QueryCustomerListType Type of the app.

type QueryMeterParams

type QueryMeterParams struct {
	// From Start date-time in RFC 3339 format.
	//
	// Inclusive.
	From *MeterQueryFrom `form:"from,omitempty" json:"from,omitempty"`

	// To End date-time in RFC 3339 format.
	//
	// Inclusive.
	To *MeterQueryTo `form:"to,omitempty" json:"to,omitempty"`

	// WindowSize If not specified, a single usage aggregate will be returned for the entirety of the specified period for each subject and group.
	WindowSize *MeterQueryWindowSize `form:"windowSize,omitempty" json:"windowSize,omitempty"`

	// WindowTimeZone The value is the name of the time zone as defined in the IANA Time Zone Database (http://www.iana.org/time-zones).
	// If not specified, the UTC timezone will be used.
	WindowTimeZone *MeterQueryWindowTimeZone `form:"windowTimeZone,omitempty" json:"windowTimeZone,omitempty"`

	// Subject Filtering by multiple subjects.
	Subject *MeterQuerySubject `form:"subject,omitempty" json:"subject,omitempty"`

	// FilterGroupBy Simple filter for group bys with exact match.
	FilterGroupBy *MeterQueryFilterGroupBy `json:"filterGroupBy,omitempty"`

	// GroupBy If not specified a single aggregate will be returned for each subject and time window.
	// `subject` is a reserved group by value.
	GroupBy *MeterQueryGroupBy `form:"groupBy,omitempty" json:"groupBy,omitempty"`
}

QueryMeterParams defines parameters for QueryMeter.

type QueryPortalMeterParams

type QueryPortalMeterParams struct {
	// From Start date-time in RFC 3339 format.
	//
	// Inclusive.
	From *MeterQueryFrom `form:"from,omitempty" json:"from,omitempty"`

	// To End date-time in RFC 3339 format.
	//
	// Inclusive.
	To *MeterQueryTo `form:"to,omitempty" json:"to,omitempty"`

	// WindowSize If not specified, a single usage aggregate will be returned for the entirety of the specified period for each subject and group.
	WindowSize *MeterQueryWindowSize `form:"windowSize,omitempty" json:"windowSize,omitempty"`

	// WindowTimeZone The value is the name of the time zone as defined in the IANA Time Zone Database (http://www.iana.org/time-zones).
	// If not specified, the UTC timezone will be used.
	WindowTimeZone *MeterQueryWindowTimeZone `form:"windowTimeZone,omitempty" json:"windowTimeZone,omitempty"`

	// FilterGroupBy Simple filter for group bys with exact match.
	FilterGroupBy *MeterQueryFilterGroupBy `json:"filterGroupBy,omitempty"`

	// GroupBy If not specified a single aggregate will be returned for each subject and time window.
	// `subject` is a reserved group by value.
	GroupBy *MeterQueryGroupBy `form:"groupBy,omitempty" json:"groupBy,omitempty"`
}

QueryPortalMeterParams defines parameters for QueryPortalMeter.

type RateCard

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

RateCard A rate card defines the pricing and entitlement of a feature or service.

func (RateCard) AsRateCardFlatFee

func (t RateCard) AsRateCardFlatFee() (RateCardFlatFee, error)

AsRateCardFlatFee returns the union data inside the RateCard as a RateCardFlatFee

func (RateCard) AsRateCardUsageBased

func (t RateCard) AsRateCardUsageBased() (RateCardUsageBased, error)

AsRateCardUsageBased returns the union data inside the RateCard as a RateCardUsageBased

func (RateCard) Discriminator

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

func (*RateCard) FromRateCardFlatFee

func (t *RateCard) FromRateCardFlatFee(v RateCardFlatFee) error

FromRateCardFlatFee overwrites any union data inside the RateCard as the provided RateCardFlatFee

func (*RateCard) FromRateCardUsageBased

func (t *RateCard) FromRateCardUsageBased(v RateCardUsageBased) error

FromRateCardUsageBased overwrites any union data inside the RateCard as the provided RateCardUsageBased

func (RateCard) MarshalJSON

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

func (*RateCard) MergeRateCardFlatFee

func (t *RateCard) MergeRateCardFlatFee(v RateCardFlatFee) error

MergeRateCardFlatFee performs a merge with any union data inside the RateCard, using the provided RateCardFlatFee

func (*RateCard) MergeRateCardUsageBased

func (t *RateCard) MergeRateCardUsageBased(v RateCardUsageBased) error

MergeRateCardUsageBased performs a merge with any union data inside the RateCard, using the provided RateCardUsageBased

func (*RateCard) UnmarshalJSON

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

func (RateCard) ValueByDiscriminator

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

type RateCardBooleanEntitlement

type RateCardBooleanEntitlement struct {
	// Metadata Additional metadata for the feature.
	Metadata *Metadata                      `json:"metadata,omitempty"`
	Type     RateCardBooleanEntitlementType `json:"type"`
}

RateCardBooleanEntitlement Entitlement template of a boolean entitlement.

type RateCardBooleanEntitlementType

type RateCardBooleanEntitlementType string

RateCardBooleanEntitlementType defines model for RateCardBooleanEntitlement.Type.

const (
	RateCardBooleanEntitlementTypeBoolean RateCardBooleanEntitlementType = "boolean"
)

Defines values for RateCardBooleanEntitlementType.

type RateCardEntitlement

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

RateCardEntitlement Entitlement templates are used to define the entitlements of a plan. Features are omitted from the entitlement template, as they are defined in the rate card.

func (RateCardEntitlement) AsRateCardBooleanEntitlement

func (t RateCardEntitlement) AsRateCardBooleanEntitlement() (RateCardBooleanEntitlement, error)

AsRateCardBooleanEntitlement returns the union data inside the RateCardEntitlement as a RateCardBooleanEntitlement

func (RateCardEntitlement) AsRateCardMeteredEntitlement

func (t RateCardEntitlement) AsRateCardMeteredEntitlement() (RateCardMeteredEntitlement, error)

AsRateCardMeteredEntitlement returns the union data inside the RateCardEntitlement as a RateCardMeteredEntitlement

func (RateCardEntitlement) AsRateCardStaticEntitlement

func (t RateCardEntitlement) AsRateCardStaticEntitlement() (RateCardStaticEntitlement, error)

AsRateCardStaticEntitlement returns the union data inside the RateCardEntitlement as a RateCardStaticEntitlement

func (RateCardEntitlement) Discriminator

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

func (*RateCardEntitlement) FromRateCardBooleanEntitlement

func (t *RateCardEntitlement) FromRateCardBooleanEntitlement(v RateCardBooleanEntitlement) error

FromRateCardBooleanEntitlement overwrites any union data inside the RateCardEntitlement as the provided RateCardBooleanEntitlement

func (*RateCardEntitlement) FromRateCardMeteredEntitlement

func (t *RateCardEntitlement) FromRateCardMeteredEntitlement(v RateCardMeteredEntitlement) error

FromRateCardMeteredEntitlement overwrites any union data inside the RateCardEntitlement as the provided RateCardMeteredEntitlement

func (*RateCardEntitlement) FromRateCardStaticEntitlement

func (t *RateCardEntitlement) FromRateCardStaticEntitlement(v RateCardStaticEntitlement) error

FromRateCardStaticEntitlement overwrites any union data inside the RateCardEntitlement as the provided RateCardStaticEntitlement

func (RateCardEntitlement) MarshalJSON

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

func (*RateCardEntitlement) MergeRateCardBooleanEntitlement

func (t *RateCardEntitlement) MergeRateCardBooleanEntitlement(v RateCardBooleanEntitlement) error

MergeRateCardBooleanEntitlement performs a merge with any union data inside the RateCardEntitlement, using the provided RateCardBooleanEntitlement

func (*RateCardEntitlement) MergeRateCardMeteredEntitlement

func (t *RateCardEntitlement) MergeRateCardMeteredEntitlement(v RateCardMeteredEntitlement) error

MergeRateCardMeteredEntitlement performs a merge with any union data inside the RateCardEntitlement, using the provided RateCardMeteredEntitlement

func (*RateCardEntitlement) MergeRateCardStaticEntitlement

func (t *RateCardEntitlement) MergeRateCardStaticEntitlement(v RateCardStaticEntitlement) error

MergeRateCardStaticEntitlement performs a merge with any union data inside the RateCardEntitlement, using the provided RateCardStaticEntitlement

func (*RateCardEntitlement) UnmarshalJSON

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

func (RateCardEntitlement) ValueByDiscriminator

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

type RateCardFlatFee

type RateCardFlatFee struct {
	// BillingCadence The billing cadence of the rate card.
	// When null it means it is a one time fee.
	BillingCadence *string `json:"billingCadence"`

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

	// EntitlementTemplate The entitlement of the rate card.
	// Only available when featureKey is set.
	EntitlementTemplate *RateCardEntitlement `json:"entitlementTemplate,omitempty"`

	// FeatureKey The feature the customer is entitled to use.
	FeatureKey *string `json:"featureKey,omitempty"`

	// Key A semi-unique identifier for the resource.
	Key string `json:"key"`

	// Metadata Additional metadata for the resource.
	Metadata *Metadata `json:"metadata"`

	// Name Human-readable name for the resource. Between 1 and 256 characters.
	Name string `json:"name"`

	// Price The price of the rate card.
	// When null, the feature or service is free.
	Price *FlatPriceWithPaymentTerm `json:"price"`

	// TaxConfig The tax config of the rate card.
	// When undefined, the tax config of the feature or the default tax config of the plan is used.
	TaxConfig *TaxConfig `json:"taxConfig,omitempty"`

	// Type The type of the RateCard.
	Type RateCardFlatFeeType `json:"type"`
}

RateCardFlatFee A flat fee rate card defines a one-time purchase or a recurring fee.

type RateCardFlatFeeType

type RateCardFlatFeeType string

RateCardFlatFeeType The type of the RateCard.

const (
	RateCardFlatFeeTypeFlatFee RateCardFlatFeeType = "flat_fee"
)

Defines values for RateCardFlatFeeType.

type RateCardMeteredEntitlement

type RateCardMeteredEntitlement struct {
	// IsSoftLimit If softLimit=true the subject can use the feature even if the entitlement is exhausted, hasAccess will always be true.
	IsSoftLimit *bool `json:"isSoftLimit,omitempty"`

	// IssueAfterReset You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance.
	// If an amount is specified here, a grant will be created alongside the entitlement with the specified amount.
	// That grant will have it's rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.
	// Manually creating such a grant would mean having the "amount", "minRolloverAmount", and "maxRolloverAmount" fields all be the same.
	IssueAfterReset *float64 `json:"issueAfterReset,omitempty"`

	// IssueAfterResetPriority Defines the grant priority for the default grant.
	IssueAfterResetPriority *uint8 `json:"issueAfterResetPriority,omitempty"`

	// Metadata Additional metadata for the feature.
	Metadata *Metadata `json:"metadata,omitempty"`

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

	// UsagePeriod The interval of the metered entitlement.
	// Defaults to the billing cadence of the rate card.
	UsagePeriod *string `json:"usagePeriod,omitempty"`
}

RateCardMeteredEntitlement The entitlement template with a metered entitlement.

type RateCardMeteredEntitlementType

type RateCardMeteredEntitlementType string

RateCardMeteredEntitlementType defines model for RateCardMeteredEntitlement.Type.

const (
	RateCardMeteredEntitlementTypeMetered RateCardMeteredEntitlementType = "metered"
)

Defines values for RateCardMeteredEntitlementType.

type RateCardStaticEntitlement

type RateCardStaticEntitlement struct {
	// Config The JSON parsable config of the entitlement. This value is also returned when checking entitlement access and it is useful for configuring fine-grained access settings to the feature, implemented in your own system. Has to be an object.
	Config json.RawMessage `json:"config"`

	// Metadata Additional metadata for the feature.
	Metadata *Metadata                     `json:"metadata,omitempty"`
	Type     RateCardStaticEntitlementType `json:"type"`
}

RateCardStaticEntitlement Entitlement template of a static entitlement.

type RateCardStaticEntitlementType

type RateCardStaticEntitlementType string

RateCardStaticEntitlementType defines model for RateCardStaticEntitlement.Type.

const (
	RateCardStaticEntitlementTypeStatic RateCardStaticEntitlementType = "static"
)

Defines values for RateCardStaticEntitlementType.

type RateCardUsageBased

type RateCardUsageBased struct {
	// BillingCadence The billing cadence of the rate card.
	BillingCadence string `json:"billingCadence"`

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

	// EntitlementTemplate The entitlement of the rate card.
	// Only available when featureKey is set.
	EntitlementTemplate *RateCardEntitlement `json:"entitlementTemplate,omitempty"`

	// FeatureKey The feature the customer is entitled to use.
	FeatureKey *string `json:"featureKey,omitempty"`

	// Key A semi-unique identifier for the resource.
	Key string `json:"key"`

	// Metadata Additional metadata for the resource.
	Metadata *Metadata `json:"metadata"`

	// Name Human-readable name for the resource. Between 1 and 256 characters.
	Name string `json:"name"`

	// Price The price of the rate card.
	// When null, the feature or service is free.
	Price *RateCardUsageBasedPrice `json:"price"`

	// TaxConfig The tax config of the rate card.
	// When undefined, the tax config of the feature or the default tax config of the plan is used.
	TaxConfig *TaxConfig `json:"taxConfig,omitempty"`

	// Type The type of the RateCard.
	Type RateCardUsageBasedType `json:"type"`
}

RateCardUsageBased A usage-based rate card defines a price based on usage.

type RateCardUsageBasedPrice

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

RateCardUsageBasedPrice The price of the usage based rate card.

func (RateCardUsageBasedPrice) AsFlatPriceWithPaymentTerm

func (t RateCardUsageBasedPrice) AsFlatPriceWithPaymentTerm() (FlatPriceWithPaymentTerm, error)

AsFlatPriceWithPaymentTerm returns the union data inside the RateCardUsageBasedPrice as a FlatPriceWithPaymentTerm

func (RateCardUsageBasedPrice) AsTieredPriceWithCommitments

func (t RateCardUsageBasedPrice) AsTieredPriceWithCommitments() (TieredPriceWithCommitments, error)

AsTieredPriceWithCommitments returns the union data inside the RateCardUsageBasedPrice as a TieredPriceWithCommitments

func (RateCardUsageBasedPrice) AsUnitPriceWithCommitments

func (t RateCardUsageBasedPrice) AsUnitPriceWithCommitments() (UnitPriceWithCommitments, error)

AsUnitPriceWithCommitments returns the union data inside the RateCardUsageBasedPrice as a UnitPriceWithCommitments

func (RateCardUsageBasedPrice) Discriminator

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

func (*RateCardUsageBasedPrice) FromFlatPriceWithPaymentTerm

func (t *RateCardUsageBasedPrice) FromFlatPriceWithPaymentTerm(v FlatPriceWithPaymentTerm) error

FromFlatPriceWithPaymentTerm overwrites any union data inside the RateCardUsageBasedPrice as the provided FlatPriceWithPaymentTerm

func (*RateCardUsageBasedPrice) FromTieredPriceWithCommitments

func (t *RateCardUsageBasedPrice) FromTieredPriceWithCommitments(v TieredPriceWithCommitments) error

FromTieredPriceWithCommitments overwrites any union data inside the RateCardUsageBasedPrice as the provided TieredPriceWithCommitments

func (*RateCardUsageBasedPrice) FromUnitPriceWithCommitments

func (t *RateCardUsageBasedPrice) FromUnitPriceWithCommitments(v UnitPriceWithCommitments) error

FromUnitPriceWithCommitments overwrites any union data inside the RateCardUsageBasedPrice as the provided UnitPriceWithCommitments

func (RateCardUsageBasedPrice) MarshalJSON

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

func (*RateCardUsageBasedPrice) MergeFlatPriceWithPaymentTerm

func (t *RateCardUsageBasedPrice) MergeFlatPriceWithPaymentTerm(v FlatPriceWithPaymentTerm) error

MergeFlatPriceWithPaymentTerm performs a merge with any union data inside the RateCardUsageBasedPrice, using the provided FlatPriceWithPaymentTerm

func (*RateCardUsageBasedPrice) MergeTieredPriceWithCommitments

func (t *RateCardUsageBasedPrice) MergeTieredPriceWithCommitments(v TieredPriceWithCommitments) error

MergeTieredPriceWithCommitments performs a merge with any union data inside the RateCardUsageBasedPrice, using the provided TieredPriceWithCommitments

func (*RateCardUsageBasedPrice) MergeUnitPriceWithCommitments

func (t *RateCardUsageBasedPrice) MergeUnitPriceWithCommitments(v UnitPriceWithCommitments) error

MergeUnitPriceWithCommitments performs a merge with any union data inside the RateCardUsageBasedPrice, using the provided UnitPriceWithCommitments

func (*RateCardUsageBasedPrice) UnmarshalJSON

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

func (RateCardUsageBasedPrice) ValueByDiscriminator

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

type RateCardUsageBasedType

type RateCardUsageBasedType string

RateCardUsageBasedType The type of the RateCard.

const (
	RateCardUsageBasedTypeUsageBased RateCardUsageBasedType = "usage_based"
)

Defines values for RateCardUsageBasedType.

type ReceiveSvixOperationalEventJSONRequestBody

type ReceiveSvixOperationalEventJSONRequestBody = SvixOperationalWebhookRequest

ReceiveSvixOperationalEventJSONRequestBody defines body for ReceiveSvixOperationalEvent for application/json ContentType.

type RecurringPeriod

type RecurringPeriod struct {
	// Anchor A date-time anchor to base the recurring period on.
	Anchor time.Time `json:"anchor"`

	// Interval The unit of time for the interval. Heuristically maps ISO duraitons to enum values or returns the ISO duration.
	Interval RecurringPeriodInterval `json:"interval"`

	// IntervalISO The unit of time for the interval in ISO8601 format.
	IntervalISO string `json:"intervalISO"`
}

RecurringPeriod Recurring period with an interval and an anchor.

type RecurringPeriodCreateInput

type RecurringPeriodCreateInput struct {
	// Anchor A date-time anchor to base the recurring period on.
	Anchor *time.Time `json:"anchor,omitempty"`

	// Interval The unit of time for the interval.
	Interval RecurringPeriodInterval `json:"interval"`
}

RecurringPeriodCreateInput Recurring period with an interval and an anchor.

type RecurringPeriodInterval

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

RecurringPeriodInterval Period duration for the recurrence

func (RecurringPeriodInterval) AsRecurringPeriodInterval0

func (t RecurringPeriodInterval) AsRecurringPeriodInterval0() (RecurringPeriodInterval0, error)

AsRecurringPeriodInterval0 returns the union data inside the RecurringPeriodInterval as a RecurringPeriodInterval0

func (RecurringPeriodInterval) AsRecurringPeriodIntervalEnum

func (t RecurringPeriodInterval) AsRecurringPeriodIntervalEnum() (RecurringPeriodIntervalEnum, error)

AsRecurringPeriodIntervalEnum returns the union data inside the RecurringPeriodInterval as a RecurringPeriodIntervalEnum

func (*RecurringPeriodInterval) FromRecurringPeriodInterval0

func (t *RecurringPeriodInterval) FromRecurringPeriodInterval0(v RecurringPeriodInterval0) error

FromRecurringPeriodInterval0 overwrites any union data inside the RecurringPeriodInterval as the provided RecurringPeriodInterval0

func (*RecurringPeriodInterval) FromRecurringPeriodIntervalEnum

func (t *RecurringPeriodInterval) FromRecurringPeriodIntervalEnum(v RecurringPeriodIntervalEnum) error

FromRecurringPeriodIntervalEnum overwrites any union data inside the RecurringPeriodInterval as the provided RecurringPeriodIntervalEnum

func (RecurringPeriodInterval) MarshalJSON

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

func (*RecurringPeriodInterval) MergeRecurringPeriodInterval0

func (t *RecurringPeriodInterval) MergeRecurringPeriodInterval0(v RecurringPeriodInterval0) error

MergeRecurringPeriodInterval0 performs a merge with any union data inside the RecurringPeriodInterval, using the provided RecurringPeriodInterval0

func (*RecurringPeriodInterval) MergeRecurringPeriodIntervalEnum

func (t *RecurringPeriodInterval) MergeRecurringPeriodIntervalEnum(v RecurringPeriodIntervalEnum) error

MergeRecurringPeriodIntervalEnum performs a merge with any union data inside the RecurringPeriodInterval, using the provided RecurringPeriodIntervalEnum

func (*RecurringPeriodInterval) UnmarshalJSON

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

type RecurringPeriodInterval0

type RecurringPeriodInterval0 = string

RecurringPeriodInterval0 defines model for .

type RecurringPeriodIntervalEnum

type RecurringPeriodIntervalEnum string

RecurringPeriodIntervalEnum The unit of time for the interval. One of: `day`, `week`, `month`, or `year`.

const (
	RecurringPeriodIntervalEnumDAY   RecurringPeriodIntervalEnum = "DAY"
	RecurringPeriodIntervalEnumMONTH RecurringPeriodIntervalEnum = "MONTH"
	RecurringPeriodIntervalEnumWEEK  RecurringPeriodIntervalEnum = "WEEK"
	RecurringPeriodIntervalEnumYEAR  RecurringPeriodIntervalEnum = "YEAR"
)

Defines values for RecurringPeriodIntervalEnum.

type RemovePhaseShifting

type RemovePhaseShifting string

RemovePhaseShifting The direction of the phase shift when a phase is removed.

const (
	RemovePhaseShiftingNext RemovePhaseShifting = "next"
	RemovePhaseShiftingPrev RemovePhaseShifting = "prev"
)

Defines values for RemovePhaseShifting.

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 ResetEntitlementUsageInput

type ResetEntitlementUsageInput struct {
	// EffectiveAt The time at which the reset takes effect, defaults to now. The reset cannot be in the future. The provided value is truncated to the minute due to how historical meter data is stored.
	EffectiveAt *time.Time `json:"effectiveAt,omitempty"`

	// PreserveOverage Determines whether the overage is preserved or forgiven, overriding the entitlement's default behavior.
	// - If true, the overage is preserved.
	// - If false, the overage is forgiven.
	PreserveOverage *bool `json:"preserveOverage,omitempty"`

	// RetainAnchor Determines whether the usage period anchor is retained or reset to the effectiveAt time.
	// - If true, the usage period anchor is retained.
	// - If false, the usage period anchor is reset to the effectiveAt time.
	RetainAnchor *bool `json:"retainAnchor,omitempty"`
}

ResetEntitlementUsageInput Reset parameters

type ResetEntitlementUsageJSONRequestBody

type ResetEntitlementUsageJSONRequestBody = ResetEntitlementUsageInput

ResetEntitlementUsageJSONRequestBody defines body for ResetEntitlementUsage for application/json ContentType.

type SandboxApp

type SandboxApp struct {
	// CreatedAt Timestamp of when the resource was created.
	CreatedAt time.Time `json:"createdAt"`

	// Default Default for the app type
	// Only one app of each type can be default.
	Default bool `json:"default"`

	// DeletedAt Timestamp of when the resource was permanently deleted.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`

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

	// Id A unique identifier for the resource.
	Id string `json:"id"`

	// Listing The marketplace listing that this installed app is based on.
	Listing MarketplaceListing `json:"listing"`

	// Metadata Additional metadata for the resource.
	Metadata *Metadata `json:"metadata"`

	// Name Human-readable name for the resource. Between 1 and 256 characters.
	Name string `json:"name"`

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

	// Type The app's type is Sandbox.
	Type SandboxAppType `json:"type"`

	// UpdatedAt Timestamp of when the resource was last updated.
	UpdatedAt time.Time `json:"updatedAt"`
}

SandboxApp Sandbox app can be used for testing OpenMeter features.

The app is not creating anything in external systems, thus it is safe to use for verifying OpenMeter features.

type SandboxAppType

type SandboxAppType string

SandboxAppType The app's type is Sandbox.

const (
	SandboxAppTypeSandbox SandboxAppType = "sandbox"
)

Defines values for SandboxAppType.

type SandboxCustomerAppData

type SandboxCustomerAppData struct {
	// App The installed sandbox app this data belongs to.
	App *SandboxApp `json:"app,omitempty"`

	// Id The app ID.
	// If not provided, it will use the global default for the app type.
	Id *string `json:"id,omitempty"`

	// Type The app name.
	Type SandboxCustomerAppDataType `json:"type"`
}

SandboxCustomerAppData Sandbox Customer App Data.

type SandboxCustomerAppDataType

type SandboxCustomerAppDataType string

SandboxCustomerAppDataType The app name.

const (
	SandboxCustomerAppDataTypeSandbox SandboxCustomerAppDataType = "sandbox"
)

Defines values for SandboxCustomerAppDataType.

type ServerInterface

type ServerInterface interface {
	// List apps
	// (GET /api/v1/apps)
	ListApps(w http.ResponseWriter, r *http.Request, params ListAppsParams)
	// Uninstall app
	// (DELETE /api/v1/apps/{id})
	UninstallApp(w http.ResponseWriter, r *http.Request, id string)
	// Get app
	// (GET /api/v1/apps/{id})
	GetApp(w http.ResponseWriter, r *http.Request, id string)
	// Update app
	// (PUT /api/v1/apps/{id})
	UpdateApp(w http.ResponseWriter, r *http.Request, id string)
	// Update Stripe API key
	// (PUT /api/v1/apps/{id}/stripe/api-key)
	UpdateStripeAPIKey(w http.ResponseWriter, r *http.Request, id string)
	// Stripe webhook
	// (POST /api/v1/apps/{id}/stripe/webhook)
	AppStripeWebhook(w http.ResponseWriter, r *http.Request, id string)
	// List customer overrides
	// (GET /api/v1/billing/customers)
	ListBillingProfileCustomerOverrides(w http.ResponseWriter, r *http.Request, params ListBillingProfileCustomerOverridesParams)
	// Delete a customer override
	// (DELETE /api/v1/billing/customers/{customerId})
	DeleteBillingProfileCustomerOverride(w http.ResponseWriter, r *http.Request, customerId string)
	// Get a customer override
	// (GET /api/v1/billing/customers/{customerId})
	GetBillingProfileCustomerOverride(w http.ResponseWriter, r *http.Request, customerId string)
	// Create a new or update a customer override
	// (POST /api/v1/billing/customers/{customerId})
	UpsertBillingProfileCustomerOverride(w http.ResponseWriter, r *http.Request, customerId string)
	// Simulate an invoice for a customer
	// (POST /api/v1/billing/customers/{customerId}/invoices/simulate)
	SimulateInvoice(w http.ResponseWriter, r *http.Request, customerId string)
	// List invoices
	// (GET /api/v1/billing/invoices)
	ListInvoices(w http.ResponseWriter, r *http.Request, params ListInvoicesParams)
	// Invoice a customer based on the pending line items
	// (POST /api/v1/billing/invoices/invoice)
	InvoicePendingLinesAction(w http.ResponseWriter, r *http.Request)
	// Create pending line items
	// (POST /api/v1/billing/invoices/lines)
	CreatePendingInvoiceLine(w http.ResponseWriter, r *http.Request)
	// Delete an invoice
	// (DELETE /api/v1/billing/invoices/{invoiceId})
	DeleteInvoice(w http.ResponseWriter, r *http.Request, invoiceId string)
	// Get an invoice
	// (GET /api/v1/billing/invoices/{invoiceId})
	GetInvoice(w http.ResponseWriter, r *http.Request, invoiceId string, params GetInvoiceParams)
	// Update an invoice
	// (PUT /api/v1/billing/invoices/{invoiceId})
	UpdateInvoice(w http.ResponseWriter, r *http.Request, invoiceId string)
	// Advance the invoice's state to the next status
	// (POST /api/v1/billing/invoices/{invoiceId}/advance)
	AdvanceInvoiceAction(w http.ResponseWriter, r *http.Request, invoiceId string)
	// Send the invoice to the customer
	// (POST /api/v1/billing/invoices/{invoiceId}/approve)
	ApproveInvoiceAction(w http.ResponseWriter, r *http.Request, invoiceId string)
	// Retry advancing the invoice after a failed attempt.
	// (POST /api/v1/billing/invoices/{invoiceId}/retry)
	RetryInvoiceAction(w http.ResponseWriter, r *http.Request, invoiceId string)
	// Recalculate an invoice's tax amounts
	// (POST /api/v1/billing/invoices/{invoiceId}/taxes/recalculate)
	RecalculateInvoiceTaxAction(w http.ResponseWriter, r *http.Request, invoiceId string)
	// Void an invoice
	// (POST /api/v1/billing/invoices/{invoiceId}/void)
	VoidInvoiceAction(w http.ResponseWriter, r *http.Request, invoiceId string)
	// List billing profiles
	// (GET /api/v1/billing/profiles)
	ListBillingProfiles(w http.ResponseWriter, r *http.Request, params ListBillingProfilesParams)
	// Create a new billing profile
	// (POST /api/v1/billing/profiles)
	CreateBillingProfile(w http.ResponseWriter, r *http.Request)
	// Delete a billing profile
	// (DELETE /api/v1/billing/profiles/{id})
	DeleteBillingProfile(w http.ResponseWriter, r *http.Request, id string)
	// Get a billing profile
	// (GET /api/v1/billing/profiles/{id})
	GetBillingProfile(w http.ResponseWriter, r *http.Request, id string, params GetBillingProfileParams)
	// Update a billing profile
	// (PUT /api/v1/billing/profiles/{id})
	UpdateBillingProfile(w http.ResponseWriter, r *http.Request, id string)
	// List customers
	// (GET /api/v1/customers)
	ListCustomers(w http.ResponseWriter, r *http.Request, params ListCustomersParams)
	// Create customer
	// (POST /api/v1/customers)
	CreateCustomer(w http.ResponseWriter, r *http.Request)
	// List customer app data
	// (GET /api/v1/customers/{customerId}/apps)
	ListCustomerAppData(w http.ResponseWriter, r *http.Request, customerId string, params ListCustomerAppDataParams)
	// Upsert customer app data
	// (PUT /api/v1/customers/{customerId}/apps)
	UpsertCustomerAppData(w http.ResponseWriter, r *http.Request, customerId string)
	// Delete customer app data
	// (DELETE /api/v1/customers/{customerId}/apps/{appId})
	DeleteCustomerAppData(w http.ResponseWriter, r *http.Request, customerId string, appId string)
	// Get entitlement value
	// (GET /api/v1/customers/{customerId}/entitlements/{featureKey}/value)
	GetCustomerEntitlementValue(w http.ResponseWriter, r *http.Request, customerId string, featureKey string, params GetCustomerEntitlementValueParams)
	// Delete customer
	// (DELETE /api/v1/customers/{id})
	DeleteCustomer(w http.ResponseWriter, r *http.Request, id string)
	// Get customer
	// (GET /api/v1/customers/{id})
	GetCustomer(w http.ResponseWriter, r *http.Request, id string)
	// Update customer
	// (PUT /api/v1/customers/{id})
	UpdateCustomer(w http.ResponseWriter, r *http.Request, id string)
	// Get event metrics
	// (GET /api/v1/debug/metrics)
	GetDebugMetrics(w http.ResponseWriter, r *http.Request)
	// List all entitlements
	// (GET /api/v1/entitlements)
	ListEntitlements(w http.ResponseWriter, r *http.Request, params ListEntitlementsParams)
	// Get entitlement by id
	// (GET /api/v1/entitlements/{entitlementId})
	GetEntitlementById(w http.ResponseWriter, r *http.Request, entitlementId string)
	// List ingested events
	// (GET /api/v1/events)
	ListEvents(w http.ResponseWriter, r *http.Request, params ListEventsParams)
	// Ingest events
	// (POST /api/v1/events)
	IngestEvents(w http.ResponseWriter, r *http.Request)
	// List features
	// (GET /api/v1/features)
	ListFeatures(w http.ResponseWriter, r *http.Request, params ListFeaturesParams)
	// Create feature
	// (POST /api/v1/features)
	CreateFeature(w http.ResponseWriter, r *http.Request)
	// Delete feature
	// (DELETE /api/v1/features/{featureId})
	DeleteFeature(w http.ResponseWriter, r *http.Request, featureId string)
	// Get feature
	// (GET /api/v1/features/{featureId})
	GetFeature(w http.ResponseWriter, r *http.Request, featureId string)
	// List grants
	// (GET /api/v1/grants)
	ListGrants(w http.ResponseWriter, r *http.Request, params ListGrantsParams)
	// Void grant
	// (DELETE /api/v1/grants/{grantId})
	VoidGrant(w http.ResponseWriter, r *http.Request, grantId string)
	// List supported currencies
	// (GET /api/v1/info/currencies)
	ListCurrencies(w http.ResponseWriter, r *http.Request)
	// List available apps
	// (GET /api/v1/marketplace/listings)
	ListMarketplaceListings(w http.ResponseWriter, r *http.Request, params ListMarketplaceListingsParams)
	// Get app details by type
	// (GET /api/v1/marketplace/listings/{type})
	GetMarketplaceListing(w http.ResponseWriter, r *http.Request, pType AppType)
	// Install app via API key
	// (POST /api/v1/marketplace/listings/{type}/install/apikey)
	MarketplaceAppAPIKeyInstall(w http.ResponseWriter, r *http.Request, pType MarketplaceApiKeyInstallRequestType)
	// Get OAuth2 install URL
	// (GET /api/v1/marketplace/listings/{type}/install/oauth2)
	MarketplaceOAuth2InstallGetURL(w http.ResponseWriter, r *http.Request, pType AppType)
	// Install app via OAuth2
	// (GET /api/v1/marketplace/listings/{type}/install/oauth2/authorize)
	MarketplaceOAuth2InstallAuthorize(w http.ResponseWriter, r *http.Request, pType MarketplaceOAuth2InstallAuthorizeRequestType, params MarketplaceOAuth2InstallAuthorizeParams)
	// List meters
	// (GET /api/v1/meters)
	ListMeters(w http.ResponseWriter, r *http.Request)
	// Get meter
	// (GET /api/v1/meters/{meterIdOrSlug})
	GetMeter(w http.ResponseWriter, r *http.Request, meterIdOrSlug string)
	// Query meter Query meter
	// (GET /api/v1/meters/{meterIdOrSlug}/query)
	QueryMeter(w http.ResponseWriter, r *http.Request, meterIdOrSlug string, params QueryMeterParams)
	// List meter subjects
	// (GET /api/v1/meters/{meterIdOrSlug}/subjects)
	ListMeterSubjects(w http.ResponseWriter, r *http.Request, meterIdOrSlug string)
	// List notification channels
	// (GET /api/v1/notification/channels)
	ListNotificationChannels(w http.ResponseWriter, r *http.Request, params ListNotificationChannelsParams)
	// Create a notification channel
	// (POST /api/v1/notification/channels)
	CreateNotificationChannel(w http.ResponseWriter, r *http.Request)
	// Delete a notification channel
	// (DELETE /api/v1/notification/channels/{channelId})
	DeleteNotificationChannel(w http.ResponseWriter, r *http.Request, channelId string)
	// Get notification channel
	// (GET /api/v1/notification/channels/{channelId})
	GetNotificationChannel(w http.ResponseWriter, r *http.Request, channelId string)
	// Update a notification channel
	// (PUT /api/v1/notification/channels/{channelId})
	UpdateNotificationChannel(w http.ResponseWriter, r *http.Request, channelId string)
	// List notification events
	// (GET /api/v1/notification/events)
	ListNotificationEvents(w http.ResponseWriter, r *http.Request, params ListNotificationEventsParams)
	// Get notification event
	// (GET /api/v1/notification/events/{eventId})
	GetNotificationEvent(w http.ResponseWriter, r *http.Request, eventId string)
	// List notification rules
	// (GET /api/v1/notification/rules)
	ListNotificationRules(w http.ResponseWriter, r *http.Request, params ListNotificationRulesParams)
	// Create a notification rule
	// (POST /api/v1/notification/rules)
	CreateNotificationRule(w http.ResponseWriter, r *http.Request)
	// Delete a notification rule
	// (DELETE /api/v1/notification/rules/{ruleId})
	DeleteNotificationRule(w http.ResponseWriter, r *http.Request, ruleId string)
	// Get notification rule
	// (GET /api/v1/notification/rules/{ruleId})
	GetNotificationRule(w http.ResponseWriter, r *http.Request, ruleId string)
	// Update a notification rule
	// (PUT /api/v1/notification/rules/{ruleId})
	UpdateNotificationRule(w http.ResponseWriter, r *http.Request, ruleId string)
	// Test notification rule
	// (POST /api/v1/notification/rules/{ruleId}/test)
	TestNotificationRule(w http.ResponseWriter, r *http.Request, ruleId string)
	// Receive Svix operational events
	// (POST /api/v1/notification/webhook/svix)
	ReceiveSvixOperationalEvent(w http.ResponseWriter, r *http.Request)
	// List plans
	// (GET /api/v1/plans)
	ListPlans(w http.ResponseWriter, r *http.Request, params ListPlansParams)
	// Create a plan
	// (POST /api/v1/plans)
	CreatePlan(w http.ResponseWriter, r *http.Request)
	// New draft plan
	// (POST /api/v1/plans/{planIdOrKey}/next)
	NextPlan(w http.ResponseWriter, r *http.Request, planIdOrKey string)
	// Delete plan
	// (DELETE /api/v1/plans/{planId})
	DeletePlan(w http.ResponseWriter, r *http.Request, planId string)
	// Get plan
	// (GET /api/v1/plans/{planId})
	GetPlan(w http.ResponseWriter, r *http.Request, planId string, params GetPlanParams)
	// Update a plan
	// (PUT /api/v1/plans/{planId})
	UpdatePlan(w http.ResponseWriter, r *http.Request, planId string)
	// Archive plan version
	// (POST /api/v1/plans/{planId}/archive)
	ArchivePlan(w http.ResponseWriter, r *http.Request, planId string)
	// Publish plan
	// (POST /api/v1/plans/{planId}/publish)
	PublishPlan(w http.ResponseWriter, r *http.Request, planId string)
	// Query meter Query meter
	// (GET /api/v1/portal/meters/{meterSlug}/query)
	QueryPortalMeter(w http.ResponseWriter, r *http.Request, meterSlug string, params QueryPortalMeterParams)
	// List consumer portal tokens
	// (GET /api/v1/portal/tokens)
	ListPortalTokens(w http.ResponseWriter, r *http.Request, params ListPortalTokensParams)
	// Create consumer portal token
	// (POST /api/v1/portal/tokens)
	CreatePortalToken(w http.ResponseWriter, r *http.Request)
	// Create checkout session
	// (POST /api/v1/stripe/checkout/sessions)
	CreateStripeCheckoutSession(w http.ResponseWriter, r *http.Request)
	// List entitlements
	// (GET /api/v1/subjects/{subjectIdOrKey}/entitlements)
	ListSubjectEntitlements(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, params ListSubjectEntitlementsParams)
	// Create an entitlement
	// (POST /api/v1/subjects/{subjectIdOrKey}/entitlements)
	CreateEntitlement(w http.ResponseWriter, r *http.Request, subjectIdOrKey string)
	// List entitlement grants
	// (GET /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants)
	ListEntitlementGrants(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, entitlementIdOrFeatureKey string, params ListEntitlementGrantsParams)
	// Create grant
	// (POST /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants)
	CreateGrant(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, entitlementIdOrFeatureKey string)
	// Override entitlement
	// (PUT /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/override)
	OverrideEntitlement(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, entitlementIdOrFeatureKey string)
	// Get entitlement value
	// (GET /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/value)
	GetEntitlementValue(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, entitlementIdOrFeatureKey string, params GetEntitlementValueParams)
	// Delete entitlement
	// (DELETE /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementId})
	DeleteEntitlement(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, entitlementId string)
	// Get entitlement
	// (GET /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementId})
	GetEntitlement(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, entitlementId string)
	// Get entitlement history
	// (GET /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementId}/history)
	GetEntitlementHistory(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, entitlementId string, params GetEntitlementHistoryParams)
	// Reset entitlement
	// (POST /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementId}/reset)
	ResetEntitlementUsage(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, entitlementId string)
	// Create subscription
	// (POST /api/v1/subscriptions)
	CreateSubscription(w http.ResponseWriter, r *http.Request)
	// Get subscription
	// (GET /api/v1/subscriptions/{subscriptionId})
	GetSubscription(w http.ResponseWriter, r *http.Request, subscriptionId string, params GetSubscriptionParams)
	// Edit subscription
	// (PATCH /api/v1/subscriptions/{subscriptionId})
	EditSubscription(w http.ResponseWriter, r *http.Request, subscriptionId string)
	// Cancel subscription
	// (POST /api/v1/subscriptions/{subscriptionId}/cancel)
	CancelSubscription(w http.ResponseWriter, r *http.Request, subscriptionId string)
	// Change subscription
	// (POST /api/v1/subscriptions/{subscriptionId}/change)
	ChangeSubscription(w http.ResponseWriter, r *http.Request, subscriptionId string)
	// Migrate subscription
	// (POST /api/v1/subscriptions/{subscriptionId}/migrate)
	MigrateSubscription(w http.ResponseWriter, r *http.Request, subscriptionId string)
	// Unschedule cancelation
	// (POST /api/v1/subscriptions/{subscriptionId}/unschedule-cancelation)
	UnscheduleCancelation(w http.ResponseWriter, r *http.Request, subscriptionId string)
}

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) AdvanceInvoiceAction

func (siw *ServerInterfaceWrapper) AdvanceInvoiceAction(w http.ResponseWriter, r *http.Request)

AdvanceInvoiceAction operation middleware

func (*ServerInterfaceWrapper) AppStripeWebhook

func (siw *ServerInterfaceWrapper) AppStripeWebhook(w http.ResponseWriter, r *http.Request)

AppStripeWebhook operation middleware

func (*ServerInterfaceWrapper) ApproveInvoiceAction

func (siw *ServerInterfaceWrapper) ApproveInvoiceAction(w http.ResponseWriter, r *http.Request)

ApproveInvoiceAction 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) CreateBillingProfile

func (siw *ServerInterfaceWrapper) CreateBillingProfile(w http.ResponseWriter, r *http.Request)

CreateBillingProfile operation middleware

func (*ServerInterfaceWrapper) CreateCustomer

func (siw *ServerInterfaceWrapper) CreateCustomer(w http.ResponseWriter, r *http.Request)

CreateCustomer operation middleware

func (*ServerInterfaceWrapper) CreateEntitlement

func (siw *ServerInterfaceWrapper) CreateEntitlement(w http.ResponseWriter, r *http.Request)

CreateEntitlement operation middleware

func (*ServerInterfaceWrapper) CreateFeature

func (siw *ServerInterfaceWrapper) CreateFeature(w http.ResponseWriter, r *http.Request)

CreateFeature operation middleware

func (*ServerInterfaceWrapper) CreateGrant

func (siw *ServerInterfaceWrapper) CreateGrant(w http.ResponseWriter, r *http.Request)

CreateGrant 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) CreatePendingInvoiceLine

func (siw *ServerInterfaceWrapper) CreatePendingInvoiceLine(w http.ResponseWriter, r *http.Request)

CreatePendingInvoiceLine operation middleware

func (*ServerInterfaceWrapper) CreatePlan

func (siw *ServerInterfaceWrapper) CreatePlan(w http.ResponseWriter, r *http.Request)

CreatePlan operation middleware

func (*ServerInterfaceWrapper) CreatePortalToken

func (siw *ServerInterfaceWrapper) CreatePortalToken(w http.ResponseWriter, r *http.Request)

CreatePortalToken operation middleware

func (*ServerInterfaceWrapper) CreateStripeCheckoutSession

func (siw *ServerInterfaceWrapper) CreateStripeCheckoutSession(w http.ResponseWriter, r *http.Request)

CreateStripeCheckoutSession operation middleware

func (*ServerInterfaceWrapper) CreateSubscription

func (siw *ServerInterfaceWrapper) CreateSubscription(w http.ResponseWriter, r *http.Request)

CreateSubscription operation middleware

func (*ServerInterfaceWrapper) DeleteBillingProfile

func (siw *ServerInterfaceWrapper) DeleteBillingProfile(w http.ResponseWriter, r *http.Request)

DeleteBillingProfile operation middleware

func (*ServerInterfaceWrapper) DeleteBillingProfileCustomerOverride

func (siw *ServerInterfaceWrapper) DeleteBillingProfileCustomerOverride(w http.ResponseWriter, r *http.Request)

DeleteBillingProfileCustomerOverride operation middleware

func (*ServerInterfaceWrapper) DeleteCustomer

func (siw *ServerInterfaceWrapper) DeleteCustomer(w http.ResponseWriter, r *http.Request)

DeleteCustomer operation middleware

func (*ServerInterfaceWrapper) DeleteCustomerAppData

func (siw *ServerInterfaceWrapper) DeleteCustomerAppData(w http.ResponseWriter, r *http.Request)

DeleteCustomerAppData operation middleware

func (*ServerInterfaceWrapper) DeleteEntitlement

func (siw *ServerInterfaceWrapper) DeleteEntitlement(w http.ResponseWriter, r *http.Request)

DeleteEntitlement 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) 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) EditSubscription

func (siw *ServerInterfaceWrapper) EditSubscription(w http.ResponseWriter, r *http.Request)

EditSubscription operation middleware

func (*ServerInterfaceWrapper) GetApp

GetApp operation middleware

func (*ServerInterfaceWrapper) GetBillingProfile

func (siw *ServerInterfaceWrapper) GetBillingProfile(w http.ResponseWriter, r *http.Request)

GetBillingProfile operation middleware

func (*ServerInterfaceWrapper) GetBillingProfileCustomerOverride

func (siw *ServerInterfaceWrapper) GetBillingProfileCustomerOverride(w http.ResponseWriter, r *http.Request)

GetBillingProfileCustomerOverride operation middleware

func (*ServerInterfaceWrapper) GetCustomer

func (siw *ServerInterfaceWrapper) GetCustomer(w http.ResponseWriter, r *http.Request)

GetCustomer operation middleware

func (*ServerInterfaceWrapper) GetCustomerEntitlementValue

func (siw *ServerInterfaceWrapper) GetCustomerEntitlementValue(w http.ResponseWriter, r *http.Request)

GetCustomerEntitlementValue operation middleware

func (*ServerInterfaceWrapper) GetDebugMetrics

func (siw *ServerInterfaceWrapper) GetDebugMetrics(w http.ResponseWriter, r *http.Request)

GetDebugMetrics operation middleware

func (*ServerInterfaceWrapper) GetEntitlement

func (siw *ServerInterfaceWrapper) GetEntitlement(w http.ResponseWriter, r *http.Request)

GetEntitlement operation middleware

func (*ServerInterfaceWrapper) GetEntitlementById

func (siw *ServerInterfaceWrapper) GetEntitlementById(w http.ResponseWriter, r *http.Request)

GetEntitlementById operation middleware

func (*ServerInterfaceWrapper) GetEntitlementHistory

func (siw *ServerInterfaceWrapper) GetEntitlementHistory(w http.ResponseWriter, r *http.Request)

GetEntitlementHistory operation middleware

func (*ServerInterfaceWrapper) GetEntitlementValue

func (siw *ServerInterfaceWrapper) GetEntitlementValue(w http.ResponseWriter, r *http.Request)

GetEntitlementValue 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) GetMarketplaceListing

func (siw *ServerInterfaceWrapper) GetMarketplaceListing(w http.ResponseWriter, r *http.Request)

GetMarketplaceListing 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) GetPlan

GetPlan operation middleware

func (*ServerInterfaceWrapper) GetSubscription

func (siw *ServerInterfaceWrapper) GetSubscription(w http.ResponseWriter, r *http.Request)

GetSubscription operation middleware

func (*ServerInterfaceWrapper) IngestEvents

func (siw *ServerInterfaceWrapper) IngestEvents(w http.ResponseWriter, r *http.Request)

IngestEvents operation middleware

func (*ServerInterfaceWrapper) InvoicePendingLinesAction

func (siw *ServerInterfaceWrapper) InvoicePendingLinesAction(w http.ResponseWriter, r *http.Request)

InvoicePendingLinesAction operation middleware

func (*ServerInterfaceWrapper) ListApps

func (siw *ServerInterfaceWrapper) ListApps(w http.ResponseWriter, r *http.Request)

ListApps operation middleware

func (*ServerInterfaceWrapper) ListBillingProfileCustomerOverrides

func (siw *ServerInterfaceWrapper) ListBillingProfileCustomerOverrides(w http.ResponseWriter, r *http.Request)

ListBillingProfileCustomerOverrides operation middleware

func (*ServerInterfaceWrapper) ListBillingProfiles

func (siw *ServerInterfaceWrapper) ListBillingProfiles(w http.ResponseWriter, r *http.Request)

ListBillingProfiles operation middleware

func (*ServerInterfaceWrapper) ListCurrencies

func (siw *ServerInterfaceWrapper) ListCurrencies(w http.ResponseWriter, r *http.Request)

ListCurrencies operation middleware

func (*ServerInterfaceWrapper) ListCustomerAppData

func (siw *ServerInterfaceWrapper) ListCustomerAppData(w http.ResponseWriter, r *http.Request)

ListCustomerAppData operation middleware

func (*ServerInterfaceWrapper) ListCustomers

func (siw *ServerInterfaceWrapper) ListCustomers(w http.ResponseWriter, r *http.Request)

ListCustomers operation middleware

func (*ServerInterfaceWrapper) ListEntitlementGrants

func (siw *ServerInterfaceWrapper) ListEntitlementGrants(w http.ResponseWriter, r *http.Request)

ListEntitlementGrants operation middleware

func (*ServerInterfaceWrapper) ListEntitlements

func (siw *ServerInterfaceWrapper) ListEntitlements(w http.ResponseWriter, r *http.Request)

ListEntitlements operation middleware

func (*ServerInterfaceWrapper) ListEvents

func (siw *ServerInterfaceWrapper) ListEvents(w http.ResponseWriter, r *http.Request)

ListEvents 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) ListMarketplaceListings

func (siw *ServerInterfaceWrapper) ListMarketplaceListings(w http.ResponseWriter, r *http.Request)

ListMarketplaceListings operation middleware

func (*ServerInterfaceWrapper) ListMeterSubjects

func (siw *ServerInterfaceWrapper) ListMeterSubjects(w http.ResponseWriter, r *http.Request)

ListMeterSubjects 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) ListPlans

func (siw *ServerInterfaceWrapper) ListPlans(w http.ResponseWriter, r *http.Request)

ListPlans operation middleware

func (*ServerInterfaceWrapper) ListPortalTokens

func (siw *ServerInterfaceWrapper) ListPortalTokens(w http.ResponseWriter, r *http.Request)

ListPortalTokens operation middleware

func (*ServerInterfaceWrapper) ListSubjectEntitlements

func (siw *ServerInterfaceWrapper) ListSubjectEntitlements(w http.ResponseWriter, r *http.Request)

ListSubjectEntitlements operation middleware

func (*ServerInterfaceWrapper) MarketplaceAppAPIKeyInstall

func (siw *ServerInterfaceWrapper) MarketplaceAppAPIKeyInstall(w http.ResponseWriter, r *http.Request)

MarketplaceAppAPIKeyInstall operation middleware

func (*ServerInterfaceWrapper) MarketplaceOAuth2InstallAuthorize

func (siw *ServerInterfaceWrapper) MarketplaceOAuth2InstallAuthorize(w http.ResponseWriter, r *http.Request)

MarketplaceOAuth2InstallAuthorize operation middleware

func (*ServerInterfaceWrapper) MarketplaceOAuth2InstallGetURL

func (siw *ServerInterfaceWrapper) MarketplaceOAuth2InstallGetURL(w http.ResponseWriter, r *http.Request)

MarketplaceOAuth2InstallGetURL operation middleware

func (*ServerInterfaceWrapper) MigrateSubscription

func (siw *ServerInterfaceWrapper) MigrateSubscription(w http.ResponseWriter, r *http.Request)

MigrateSubscription operation middleware

func (*ServerInterfaceWrapper) NextPlan

func (siw *ServerInterfaceWrapper) NextPlan(w http.ResponseWriter, r *http.Request)

NextPlan operation middleware

func (*ServerInterfaceWrapper) OverrideEntitlement

func (siw *ServerInterfaceWrapper) OverrideEntitlement(w http.ResponseWriter, r *http.Request)

OverrideEntitlement operation middleware

func (*ServerInterfaceWrapper) PublishPlan

func (siw *ServerInterfaceWrapper) PublishPlan(w http.ResponseWriter, r *http.Request)

PublishPlan operation middleware

func (*ServerInterfaceWrapper) QueryMeter

func (siw *ServerInterfaceWrapper) QueryMeter(w http.ResponseWriter, r *http.Request)

QueryMeter operation middleware

func (*ServerInterfaceWrapper) QueryPortalMeter

func (siw *ServerInterfaceWrapper) QueryPortalMeter(w http.ResponseWriter, r *http.Request)

QueryPortalMeter operation middleware

func (*ServerInterfaceWrapper) RecalculateInvoiceTaxAction

func (siw *ServerInterfaceWrapper) RecalculateInvoiceTaxAction(w http.ResponseWriter, r *http.Request)

RecalculateInvoiceTaxAction operation middleware

func (*ServerInterfaceWrapper) ReceiveSvixOperationalEvent

func (siw *ServerInterfaceWrapper) ReceiveSvixOperationalEvent(w http.ResponseWriter, r *http.Request)

ReceiveSvixOperationalEvent operation middleware

func (*ServerInterfaceWrapper) ResetEntitlementUsage

func (siw *ServerInterfaceWrapper) ResetEntitlementUsage(w http.ResponseWriter, r *http.Request)

ResetEntitlementUsage operation middleware

func (*ServerInterfaceWrapper) RetryInvoiceAction

func (siw *ServerInterfaceWrapper) RetryInvoiceAction(w http.ResponseWriter, r *http.Request)

RetryInvoiceAction operation middleware

func (*ServerInterfaceWrapper) SimulateInvoice

func (siw *ServerInterfaceWrapper) SimulateInvoice(w http.ResponseWriter, r *http.Request)

SimulateInvoice 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) 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) UpdateCustomer

func (siw *ServerInterfaceWrapper) UpdateCustomer(w http.ResponseWriter, r *http.Request)

UpdateCustomer operation middleware

func (*ServerInterfaceWrapper) UpdateInvoice

func (siw *ServerInterfaceWrapper) UpdateInvoice(w http.ResponseWriter, r *http.Request)

UpdateInvoice 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) UpdatePlan

func (siw *ServerInterfaceWrapper) UpdatePlan(w http.ResponseWriter, r *http.Request)

UpdatePlan operation middleware

func (*ServerInterfaceWrapper) UpdateStripeAPIKey

func (siw *ServerInterfaceWrapper) UpdateStripeAPIKey(w http.ResponseWriter, r *http.Request)

UpdateStripeAPIKey operation middleware

func (*ServerInterfaceWrapper) UpsertBillingProfileCustomerOverride

func (siw *ServerInterfaceWrapper) UpsertBillingProfileCustomerOverride(w http.ResponseWriter, r *http.Request)

UpsertBillingProfileCustomerOverride operation middleware

func (*ServerInterfaceWrapper) UpsertCustomerAppData

func (siw *ServerInterfaceWrapper) UpsertCustomerAppData(w http.ResponseWriter, r *http.Request)

UpsertCustomerAppData operation middleware

func (*ServerInterfaceWrapper) VoidGrant

func (siw *ServerInterfaceWrapper) VoidGrant(w http.ResponseWriter, r *http.Request)

VoidGrant operation middleware

func (*ServerInterfaceWrapper) VoidInvoiceAction

func (siw *ServerInterfaceWrapper) VoidInvoiceAction(w http.ResponseWriter, r *http.Request)

VoidInvoiceAction operation middleware

type ServiceUnavailableProblemResponse

type ServiceUnavailableProblemResponse = UnexpectedProblemResponse

ServiceUnavailableProblemResponse A Problem Details object (RFC 7807). Additional properties specific to the problem type may be present.

type SimulateInvoiceJSONRequestBody

type SimulateInvoiceJSONRequestBody = InvoiceSimulationInput

SimulateInvoiceJSONRequestBody defines body for SimulateInvoice for application/json ContentType.

type SortOrder

type SortOrder string

SortOrder The order direction.

const (
	SortOrderASC  SortOrder = "ASC"
	SortOrderDESC SortOrder = "DESC"
)

Defines values for SortOrder.

type StripeAPIKeyInput

type StripeAPIKeyInput struct {
	SecretAPIKey string `json:"secretAPIKey"`
}

StripeAPIKeyInput The Stripe API key input. Used to authenticate with the Stripe API.

type StripeApp

type StripeApp struct {
	// CreatedAt Timestamp of when the resource was created.
	CreatedAt time.Time `json:"createdAt"`

	// Default Default for the app type
	// Only one app of each type can be default.
	Default bool `json:"default"`

	// DeletedAt Timestamp of when the resource was permanently deleted.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`

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

	// Id A unique identifier for the resource.
	Id string `json:"id"`

	// Listing The marketplace listing that this installed app is based on.
	Listing MarketplaceListing `json:"listing"`

	// Livemode Livemode, true if the app is in production mode.
	Livemode bool `json:"livemode"`

	// MaskedAPIKey The masked API key.
	// Only shows the first 8 and last 3 characters.
	MaskedAPIKey string `json:"maskedAPIKey"`

	// Metadata Additional metadata for the resource.
	Metadata *Metadata `json:"metadata"`

	// Name Human-readable name for the resource. Between 1 and 256 characters.
	Name string `json:"name"`

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

	// StripeAccountId The Stripe account ID.
	StripeAccountId string `json:"stripeAccountId"`

	// Type The app's type is Stripe.
	Type StripeAppType `json:"type"`

	// UpdatedAt Timestamp of when the resource was last updated.
	UpdatedAt time.Time `json:"updatedAt"`
}

StripeApp A installed Stripe app object.

type StripeAppType

type StripeAppType string

StripeAppType The app's type is Stripe.

const (
	StripeAppTypeStripe StripeAppType = "stripe"
)

Defines values for StripeAppType.

type StripeCheckoutSessionMode

type StripeCheckoutSessionMode string

StripeCheckoutSessionMode Stripe CheckoutSession.mode

const (
	StripeCheckoutSessionModeSetup StripeCheckoutSessionMode = "setup"
)

Defines values for StripeCheckoutSessionMode.

type StripeCustomerAppData

type StripeCustomerAppData struct {
	// App The installed stripe app this data belongs to.
	App *StripeApp `json:"app,omitempty"`

	// Id The app ID.
	// If not provided, it will use the global default for the app type.
	Id *string `json:"id,omitempty"`

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

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

	// Type The app name.
	Type StripeCustomerAppDataType `json:"type"`
}

StripeCustomerAppData Stripe Customer App Data.

type StripeCustomerAppDataType

type StripeCustomerAppDataType string

StripeCustomerAppDataType The app name.

const (
	StripeCustomerAppDataTypeStripe StripeCustomerAppDataType = "stripe"
)

Defines values for StripeCustomerAppDataType.

type StripeTaxConfig

type StripeTaxConfig struct {
	// Code Product tax code.
	//
	// See: https://docs.stripe.com/tax/tax-codes
	Code string `json:"code"`
}

StripeTaxConfig The tax config for Stripe.

type StripeWebhookEvent

type StripeWebhookEvent struct {
	// Created The event created timestamp.
	Created int32 `json:"created"`

	// Data The event data.
	Data struct {
		Object interface{} `json:"object"`
	} `json:"data"`

	// Id The event ID.
	Id string `json:"id"`

	// Livemode Live mode.
	Livemode bool `json:"livemode"`

	// Type The event type.
	Type string `json:"type"`
}

StripeWebhookEvent Stripe webhook event.

type StripeWebhookResponse

type StripeWebhookResponse struct {
	// AppId ULID (Universally Unique Lexicographically Sortable Identifier).
	AppId string `json:"appId"`

	// CustomerId ULID (Universally Unique Lexicographically Sortable Identifier).
	CustomerId *string `json:"customerId,omitempty"`
	Message    *string `json:"message,omitempty"`

	// NamespaceId ULID (Universally Unique Lexicographically Sortable Identifier).
	NamespaceId string `json:"namespaceId"`
}

StripeWebhookResponse Stripe webhook response.

type Subject

type Subject struct {
	// CurrentPeriodEnd [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.
	CurrentPeriodEnd *time.Time `json:"currentPeriodEnd,omitempty"`

	// CurrentPeriodStart [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.
	CurrentPeriodStart *time.Time `json:"currentPeriodStart,omitempty"`

	// DisplayName A human-readable display name for the subject.
	DisplayName *string `json:"displayName"`

	// Id A unique identifier for the subject.
	Id string `json:"id"`

	// Key A unique, human-readable identifier for the subject.
	Key              string                  `json:"key"`
	Metadata         *map[string]interface{} `json:"metadata"`
	StripeCustomerId *string                 `json:"stripeCustomerId"`
}

Subject A subject is a unique identifier for a user or entity.

type Subscription

type Subscription struct {
	// ActiveFrom The cadence start of the resource.
	ActiveFrom time.Time `json:"activeFrom"`

	// ActiveTo The cadence end of the resource.
	ActiveTo *time.Time `json:"activeTo,omitempty"`

	// Alignment Alignment configuration for the plan.
	Alignment *Alignment `json:"alignment,omitempty"`

	// CreatedAt Timestamp of when the resource was created.
	CreatedAt time.Time `json:"createdAt"`

	// Currency The currency code of the subscription.
	// Will be revised once we add multi currency support.
	Currency CurrencyCode `json:"currency"`

	// CustomerId The customer ID of the subscription.
	CustomerId string `json:"customerId"`

	// DeletedAt Timestamp of when the resource was permanently deleted.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`

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

	// Id A unique identifier for the resource.
	Id string `json:"id"`

	// Metadata Additional metadata for the resource.
	Metadata *Metadata `json:"metadata"`

	// Name Human-readable name for the resource. Between 1 and 256 characters.
	Name string `json:"name"`

	// Plan The plan of the subscription.
	Plan *PlanReference `json:"plan,omitempty"`

	// Status The status of the subscription.
	Status SubscriptionStatus `json:"status"`

	// UpdatedAt Timestamp of when the resource was last updated.
	UpdatedAt time.Time `json:"updatedAt"`
}

Subscription Subscription is an exact subscription instance.

type SubscriptionAlignment

type SubscriptionAlignment struct {
	// BillablesMustAlign Whether all Billable items and RateCards must align.
	// Alignment means the Price's BillingCadence must align for both duration and anchor time.
	BillablesMustAlign *bool `json:"billablesMustAlign,omitempty"`

	// CurrentAlignedBillingPeriod The current billing period. Only has value if the subscription is aligned and active.
	CurrentAlignedBillingPeriod *Period `json:"currentAlignedBillingPeriod,omitempty"`
}

SubscriptionAlignment Alignment details enriched with the current billing period.

type SubscriptionChange

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

SubscriptionChange Change a subscription.

func (SubscriptionChange) AsCustomSubscriptionChange

func (t SubscriptionChange) AsCustomSubscriptionChange() (CustomSubscriptionChange, error)

AsCustomSubscriptionChange returns the union data inside the SubscriptionChange as a CustomSubscriptionChange

func (SubscriptionChange) AsPlanSubscriptionChange

func (t SubscriptionChange) AsPlanSubscriptionChange() (PlanSubscriptionChange, error)

AsPlanSubscriptionChange returns the union data inside the SubscriptionChange as a PlanSubscriptionChange

func (*SubscriptionChange) FromCustomSubscriptionChange

func (t *SubscriptionChange) FromCustomSubscriptionChange(v CustomSubscriptionChange) error

FromCustomSubscriptionChange overwrites any union data inside the SubscriptionChange as the provided CustomSubscriptionChange

func (*SubscriptionChange) FromPlanSubscriptionChange

func (t *SubscriptionChange) FromPlanSubscriptionChange(v PlanSubscriptionChange) error

FromPlanSubscriptionChange overwrites any union data inside the SubscriptionChange as the provided PlanSubscriptionChange

func (SubscriptionChange) MarshalJSON

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

func (*SubscriptionChange) MergeCustomSubscriptionChange

func (t *SubscriptionChange) MergeCustomSubscriptionChange(v CustomSubscriptionChange) error

MergeCustomSubscriptionChange performs a merge with any union data inside the SubscriptionChange, using the provided CustomSubscriptionChange

func (*SubscriptionChange) MergePlanSubscriptionChange

func (t *SubscriptionChange) MergePlanSubscriptionChange(v PlanSubscriptionChange) error

MergePlanSubscriptionChange performs a merge with any union data inside the SubscriptionChange, using the provided PlanSubscriptionChange

func (*SubscriptionChange) UnmarshalJSON

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

type SubscriptionChangeResponseBody

type SubscriptionChangeResponseBody struct {
	// Current The current subscription before the change.
	Current Subscription `json:"current"`

	// Next The new state of the subscription after the change.
	Next SubscriptionExpanded `json:"next"`
}

SubscriptionChangeResponseBody Response body for subscription change.

type SubscriptionCreate

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

SubscriptionCreate Create a subscription.

func (SubscriptionCreate) AsCustomSubscriptionCreate

func (t SubscriptionCreate) AsCustomSubscriptionCreate() (CustomSubscriptionCreate, error)

AsCustomSubscriptionCreate returns the union data inside the SubscriptionCreate as a CustomSubscriptionCreate

func (SubscriptionCreate) AsPlanSubscriptionCreate

func (t SubscriptionCreate) AsPlanSubscriptionCreate() (PlanSubscriptionCreate, error)

AsPlanSubscriptionCreate returns the union data inside the SubscriptionCreate as a PlanSubscriptionCreate

func (*SubscriptionCreate) FromCustomSubscriptionCreate

func (t *SubscriptionCreate) FromCustomSubscriptionCreate(v CustomSubscriptionCreate) error

FromCustomSubscriptionCreate overwrites any union data inside the SubscriptionCreate as the provided CustomSubscriptionCreate

func (*SubscriptionCreate) FromPlanSubscriptionCreate

func (t *SubscriptionCreate) FromPlanSubscriptionCreate(v PlanSubscriptionCreate) error

FromPlanSubscriptionCreate overwrites any union data inside the SubscriptionCreate as the provided PlanSubscriptionCreate

func (SubscriptionCreate) MarshalJSON

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

func (*SubscriptionCreate) MergeCustomSubscriptionCreate

func (t *SubscriptionCreate) MergeCustomSubscriptionCreate(v CustomSubscriptionCreate) error

MergeCustomSubscriptionCreate performs a merge with any union data inside the SubscriptionCreate, using the provided CustomSubscriptionCreate

func (*SubscriptionCreate) MergePlanSubscriptionCreate

func (t *SubscriptionCreate) MergePlanSubscriptionCreate(v PlanSubscriptionCreate) error

MergePlanSubscriptionCreate performs a merge with any union data inside the SubscriptionCreate, using the provided PlanSubscriptionCreate

func (*SubscriptionCreate) UnmarshalJSON

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

type SubscriptionEdit

type SubscriptionEdit struct {
	// Customizations Batch processing commands for manipulating running subscriptions.
	// The key format is `/phases/{phaseKey}` or `/phases/{phaseKey}/items/{itemKey}`.
	Customizations []SubscriptionEditOperation `json:"customizations"`

	// Timing Whether the billing period should be restarted.Timing configuration to allow for the changes to take effect at different times.
	Timing *SubscriptionTiming `json:"timing,omitempty"`
}

SubscriptionEdit Subscription edit input.

type SubscriptionEditOperation

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

SubscriptionEditOperation The operation to be performed on the subscription.

func (SubscriptionEditOperation) AsEditSubscriptionAddItem

func (t SubscriptionEditOperation) AsEditSubscriptionAddItem() (EditSubscriptionAddItem, error)

AsEditSubscriptionAddItem returns the union data inside the SubscriptionEditOperation as a EditSubscriptionAddItem

func (SubscriptionEditOperation) AsEditSubscriptionAddPhase

func (t SubscriptionEditOperation) AsEditSubscriptionAddPhase() (EditSubscriptionAddPhase, error)

AsEditSubscriptionAddPhase returns the union data inside the SubscriptionEditOperation as a EditSubscriptionAddPhase

func (SubscriptionEditOperation) AsEditSubscriptionRemoveItem

func (t SubscriptionEditOperation) AsEditSubscriptionRemoveItem() (EditSubscriptionRemoveItem, error)

AsEditSubscriptionRemoveItem returns the union data inside the SubscriptionEditOperation as a EditSubscriptionRemoveItem

func (SubscriptionEditOperation) AsEditSubscriptionRemovePhase

func (t SubscriptionEditOperation) AsEditSubscriptionRemovePhase() (EditSubscriptionRemovePhase, error)

AsEditSubscriptionRemovePhase returns the union data inside the SubscriptionEditOperation as a EditSubscriptionRemovePhase

func (SubscriptionEditOperation) AsEditSubscriptionStretchPhase

func (t SubscriptionEditOperation) AsEditSubscriptionStretchPhase() (EditSubscriptionStretchPhase, error)

AsEditSubscriptionStretchPhase returns the union data inside the SubscriptionEditOperation as a EditSubscriptionStretchPhase

func (SubscriptionEditOperation) AsEditSubscriptionUnscheduleEdit

func (t SubscriptionEditOperation) AsEditSubscriptionUnscheduleEdit() (EditSubscriptionUnscheduleEdit, error)

AsEditSubscriptionUnscheduleEdit returns the union data inside the SubscriptionEditOperation as a EditSubscriptionUnscheduleEdit

func (SubscriptionEditOperation) Discriminator

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

func (*SubscriptionEditOperation) FromEditSubscriptionAddItem

func (t *SubscriptionEditOperation) FromEditSubscriptionAddItem(v EditSubscriptionAddItem) error

FromEditSubscriptionAddItem overwrites any union data inside the SubscriptionEditOperation as the provided EditSubscriptionAddItem

func (*SubscriptionEditOperation) FromEditSubscriptionAddPhase

func (t *SubscriptionEditOperation) FromEditSubscriptionAddPhase(v EditSubscriptionAddPhase) error

FromEditSubscriptionAddPhase overwrites any union data inside the SubscriptionEditOperation as the provided EditSubscriptionAddPhase

func (*SubscriptionEditOperation) FromEditSubscriptionRemoveItem

func (t *SubscriptionEditOperation) FromEditSubscriptionRemoveItem(v EditSubscriptionRemoveItem) error

FromEditSubscriptionRemoveItem overwrites any union data inside the SubscriptionEditOperation as the provided EditSubscriptionRemoveItem

func (*SubscriptionEditOperation) FromEditSubscriptionRemovePhase

func (t *SubscriptionEditOperation) FromEditSubscriptionRemovePhase(v EditSubscriptionRemovePhase) error

FromEditSubscriptionRemovePhase overwrites any union data inside the SubscriptionEditOperation as the provided EditSubscriptionRemovePhase

func (*SubscriptionEditOperation) FromEditSubscriptionStretchPhase

func (t *SubscriptionEditOperation) FromEditSubscriptionStretchPhase(v EditSubscriptionStretchPhase) error

FromEditSubscriptionStretchPhase overwrites any union data inside the SubscriptionEditOperation as the provided EditSubscriptionStretchPhase

func (*SubscriptionEditOperation) FromEditSubscriptionUnscheduleEdit

func (t *SubscriptionEditOperation) FromEditSubscriptionUnscheduleEdit(v EditSubscriptionUnscheduleEdit) error

FromEditSubscriptionUnscheduleEdit overwrites any union data inside the SubscriptionEditOperation as the provided EditSubscriptionUnscheduleEdit

func (SubscriptionEditOperation) MarshalJSON

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

func (*SubscriptionEditOperation) MergeEditSubscriptionAddItem

func (t *SubscriptionEditOperation) MergeEditSubscriptionAddItem(v EditSubscriptionAddItem) error

MergeEditSubscriptionAddItem performs a merge with any union data inside the SubscriptionEditOperation, using the provided EditSubscriptionAddItem

func (*SubscriptionEditOperation) MergeEditSubscriptionAddPhase

func (t *SubscriptionEditOperation) MergeEditSubscriptionAddPhase(v EditSubscriptionAddPhase) error

MergeEditSubscriptionAddPhase performs a merge with any union data inside the SubscriptionEditOperation, using the provided EditSubscriptionAddPhase

func (*SubscriptionEditOperation) MergeEditSubscriptionRemoveItem

func (t *SubscriptionEditOperation) MergeEditSubscriptionRemoveItem(v EditSubscriptionRemoveItem) error

MergeEditSubscriptionRemoveItem performs a merge with any union data inside the SubscriptionEditOperation, using the provided EditSubscriptionRemoveItem

func (*SubscriptionEditOperation) MergeEditSubscriptionRemovePhase

func (t *SubscriptionEditOperation) MergeEditSubscriptionRemovePhase(v EditSubscriptionRemovePhase) error

MergeEditSubscriptionRemovePhase performs a merge with any union data inside the SubscriptionEditOperation, using the provided EditSubscriptionRemovePhase

func (*SubscriptionEditOperation) MergeEditSubscriptionStretchPhase

func (t *SubscriptionEditOperation) MergeEditSubscriptionStretchPhase(v EditSubscriptionStretchPhase) error

MergeEditSubscriptionStretchPhase performs a merge with any union data inside the SubscriptionEditOperation, using the provided EditSubscriptionStretchPhase

func (*SubscriptionEditOperation) MergeEditSubscriptionUnscheduleEdit

func (t *SubscriptionEditOperation) MergeEditSubscriptionUnscheduleEdit(v EditSubscriptionUnscheduleEdit) error

MergeEditSubscriptionUnscheduleEdit performs a merge with any union data inside the SubscriptionEditOperation, using the provided EditSubscriptionUnscheduleEdit

func (*SubscriptionEditOperation) UnmarshalJSON

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

func (SubscriptionEditOperation) ValueByDiscriminator

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

type SubscriptionExpanded

type SubscriptionExpanded struct {
	// ActiveFrom The cadence start of the resource.
	ActiveFrom time.Time `json:"activeFrom"`

	// ActiveTo The cadence end of the resource.
	ActiveTo *time.Time `json:"activeTo,omitempty"`

	// Alignment Alignment details enriched with the current billing period.
	Alignment *SubscriptionAlignment `json:"alignment,omitempty"`

	// CreatedAt Timestamp of when the resource was created.
	CreatedAt time.Time `json:"createdAt"`

	// Currency The currency code of the subscription.
	// Will be revised once we add multi currency support.
	Currency CurrencyCode `json:"currency"`

	// CustomerId The customer ID of the subscription.
	CustomerId string `json:"customerId"`

	// DeletedAt Timestamp of when the resource was permanently deleted.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`

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

	// Id A unique identifier for the resource.
	Id string `json:"id"`

	// Metadata Additional metadata for the resource.
	Metadata *Metadata `json:"metadata"`

	// Name Human-readable name for the resource. Between 1 and 256 characters.
	Name string `json:"name"`

	// Phases The phases of the subscription.
	Phases []SubscriptionPhaseExpanded `json:"phases"`

	// Plan The plan of the subscription.
	Plan *PlanReference `json:"plan,omitempty"`

	// Status The status of the subscription.
	Status SubscriptionStatus `json:"status"`

	// UpdatedAt Timestamp of when the resource was last updated.
	UpdatedAt time.Time `json:"updatedAt"`
}

SubscriptionExpanded Expanded subscription

type SubscriptionItem

type SubscriptionItem struct {
	// ActiveFrom The cadence start of the resource.
	ActiveFrom time.Time `json:"activeFrom"`

	// ActiveTo The cadence end of the resource.
	ActiveTo *time.Time `json:"activeTo,omitempty"`

	// BillingCadence The billing cadence of the rate card.
	// When null, the rate card is a one-time purchase.
	BillingCadence *string `json:"billingCadence"`

	// CreatedAt Timestamp of when the resource was created.
	CreatedAt time.Time `json:"createdAt"`

	// DeletedAt Timestamp of when the resource was permanently deleted.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`

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

	// FeatureKey The feature's key (if present).
	FeatureKey *string `json:"featureKey,omitempty"`

	// Id A unique identifier for the resource.
	Id string `json:"id"`

	// Included Describes what access is gained via the SubscriptionItem
	Included *SubscriptionItemIncluded `json:"included,omitempty"`

	// Key The identifier of the RateCard.
	// SubscriptionItem/RateCard can be identified, it has a reference:
	//
	// 1. If a Feature is associated with the SubscriptionItem, it is identified by the Feature
	// 1.1 It can be an ID reference, for an exact version of the Feature (Features can change across versions)
	// 1.2 It can be a Key reference, which always refers to the latest (active or inactive) version of a Feature
	//
	// 2. If a Feature is not associated with the SubscriptionItem, it is referenced by the Price
	//
	// We say “referenced by the Price” regardless of how a price itself is referenced, it colloquially makes sense to say “paying the same price for the same thing”. In practice this should be derived from what's printed on the invoice line-item.
	Key string `json:"key"`

	// Metadata Additional metadata for the resource.
	Metadata *Metadata `json:"metadata"`

	// Name Human-readable name for the resource. Between 1 and 256 characters.
	Name string `json:"name"`

	// Price The price of the rate card.
	// When null, the feature or service is free.
	Price SubscriptionItem_Price `json:"price"`

	// TaxConfig The tax config of the Subscription Item.
	// When undefined, the tax config of the feature or the default tax config of the plan is used.
	TaxConfig *TaxConfig `json:"taxConfig,omitempty"`

	// UpdatedAt Timestamp of when the resource was last updated.
	UpdatedAt time.Time `json:"updatedAt"`
}

SubscriptionItem The actual contents of the Subscription, what the user gets, what they pay, etc...

type SubscriptionItemIncluded

type SubscriptionItemIncluded struct {
	// Entitlement The entitlement of the Subscription Item.
	Entitlement *Entitlement `json:"entitlement,omitempty"`

	// Feature The feature the customer is entitled to use.
	Feature Feature `json:"feature"`
}

SubscriptionItemIncluded Included contents like Entitlement, or the Feature.

type SubscriptionItemPrice0

type SubscriptionItemPrice0 = FlatPriceWithPaymentTerm

SubscriptionItemPrice0 Flat price with payment term.

type SubscriptionItemPrice1

type SubscriptionItemPrice1 = UnitPriceWithCommitments

SubscriptionItemPrice1 Unit price with spend commitments.

type SubscriptionItemPrice2

type SubscriptionItemPrice2 = TieredPriceWithCommitments

SubscriptionItemPrice2 Tiered price with spend commitments.

type SubscriptionItem_Price

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

SubscriptionItem_Price The price of the rate card. When null, the feature or service is free.

func (SubscriptionItem_Price) AsSubscriptionItemPrice0

func (t SubscriptionItem_Price) AsSubscriptionItemPrice0() (SubscriptionItemPrice0, error)

AsSubscriptionItemPrice0 returns the union data inside the SubscriptionItem_Price as a SubscriptionItemPrice0

func (SubscriptionItem_Price) AsSubscriptionItemPrice1

func (t SubscriptionItem_Price) AsSubscriptionItemPrice1() (SubscriptionItemPrice1, error)

AsSubscriptionItemPrice1 returns the union data inside the SubscriptionItem_Price as a SubscriptionItemPrice1

func (SubscriptionItem_Price) AsSubscriptionItemPrice2

func (t SubscriptionItem_Price) AsSubscriptionItemPrice2() (SubscriptionItemPrice2, error)

AsSubscriptionItemPrice2 returns the union data inside the SubscriptionItem_Price as a SubscriptionItemPrice2

func (*SubscriptionItem_Price) FromSubscriptionItemPrice0

func (t *SubscriptionItem_Price) FromSubscriptionItemPrice0(v SubscriptionItemPrice0) error

FromSubscriptionItemPrice0 overwrites any union data inside the SubscriptionItem_Price as the provided SubscriptionItemPrice0

func (*SubscriptionItem_Price) FromSubscriptionItemPrice1

func (t *SubscriptionItem_Price) FromSubscriptionItemPrice1(v SubscriptionItemPrice1) error

FromSubscriptionItemPrice1 overwrites any union data inside the SubscriptionItem_Price as the provided SubscriptionItemPrice1

func (*SubscriptionItem_Price) FromSubscriptionItemPrice2

func (t *SubscriptionItem_Price) FromSubscriptionItemPrice2(v SubscriptionItemPrice2) error

FromSubscriptionItemPrice2 overwrites any union data inside the SubscriptionItem_Price as the provided SubscriptionItemPrice2

func (SubscriptionItem_Price) MarshalJSON

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

func (*SubscriptionItem_Price) MergeSubscriptionItemPrice0

func (t *SubscriptionItem_Price) MergeSubscriptionItemPrice0(v SubscriptionItemPrice0) error

MergeSubscriptionItemPrice0 performs a merge with any union data inside the SubscriptionItem_Price, using the provided SubscriptionItemPrice0

func (*SubscriptionItem_Price) MergeSubscriptionItemPrice1

func (t *SubscriptionItem_Price) MergeSubscriptionItemPrice1(v SubscriptionItemPrice1) error

MergeSubscriptionItemPrice1 performs a merge with any union data inside the SubscriptionItem_Price, using the provided SubscriptionItemPrice1

func (*SubscriptionItem_Price) MergeSubscriptionItemPrice2

func (t *SubscriptionItem_Price) MergeSubscriptionItemPrice2(v SubscriptionItemPrice2) error

MergeSubscriptionItemPrice2 performs a merge with any union data inside the SubscriptionItem_Price, using the provided SubscriptionItemPrice2

func (*SubscriptionItem_Price) UnmarshalJSON

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

type SubscriptionPhaseCreate

type SubscriptionPhaseCreate struct {
	// Description The description of the phase.
	Description *string `json:"description,omitempty"`

	// Discounts The discounts on the plan.
	Discounts *[]Discount `json:"discounts,omitempty"`

	// Duration The intended duration of the new phase.
	// Duration is required when the phase will not be the last phase.
	Duration *string `json:"duration,omitempty"`

	// Key A locally unique identifier for the phase.
	Key string `json:"key"`

	// Name The name of the phase.
	Name string `json:"name"`

	// StartAfter Interval after the subscription starts to transition to the phase.
	// When null, the phase starts immediately after the subscription starts.
	StartAfter *string `json:"startAfter"`
}

SubscriptionPhaseCreate Subscription phase create input.

type SubscriptionPhaseExpanded

type SubscriptionPhaseExpanded struct {
	// ActiveFrom The time from which the phase is active.
	ActiveFrom time.Time `json:"activeFrom"`

	// ActiveTo The until which the Phase is active.
	ActiveTo *time.Time `json:"activeTo,omitempty"`

	// CreatedAt Timestamp of when the resource was created.
	CreatedAt time.Time `json:"createdAt"`

	// DeletedAt Timestamp of when the resource was permanently deleted.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`

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

	// Discounts The discounts on the plan.
	Discounts *[]Discount `json:"discounts,omitempty"`

	// Id A unique identifier for the resource.
	Id string `json:"id"`

	// ItemTimelines Includes all versions of the items on each key, including all edits, scheduled changes, etc...
	ItemTimelines map[string][]SubscriptionItem `json:"itemTimelines"`

	// Items The items of the phase. The structure is flattened to better conform to the Plan API.
	// The timelines are flattened according to the following rules:
	// - for the current phase, the `items` contains only the active item for each key
	// - for past phases, the `items` contains only the last item for each key
	// - for future phases, the `items` contains only the first version of the item for each key
	Items []SubscriptionItem `json:"items"`

	// Key A locally unique identifier for the resource.
	Key string `json:"key"`

	// Metadata Additional metadata for the resource.
	Metadata *Metadata `json:"metadata"`

	// Name Human-readable name for the resource. Between 1 and 256 characters.
	Name string `json:"name"`

	// UpdatedAt Timestamp of when the resource was last updated.
	UpdatedAt time.Time `json:"updatedAt"`
}

SubscriptionPhaseExpanded Expanded subscription phase

type SubscriptionStatus

type SubscriptionStatus string

SubscriptionStatus Subscription status.

const (
	SubscriptionStatusSubscriptionStatusActive   SubscriptionStatus = "active"
	SubscriptionStatusSubscriptionStatusCanceled SubscriptionStatus = "canceled"
	SubscriptionStatusSubscriptionStatusInactive SubscriptionStatus = "inactive"
)

Defines values for SubscriptionStatus.

type SubscriptionTiming

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

SubscriptionTiming 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 (SubscriptionTiming) AsSubscriptionTiming1

func (t SubscriptionTiming) AsSubscriptionTiming1() (SubscriptionTiming1, error)

AsSubscriptionTiming1 returns the union data inside the SubscriptionTiming as a SubscriptionTiming1

func (SubscriptionTiming) AsSubscriptionTimingEnum

func (t SubscriptionTiming) AsSubscriptionTimingEnum() (SubscriptionTimingEnum, error)

AsSubscriptionTimingEnum returns the union data inside the SubscriptionTiming as a SubscriptionTimingEnum

func (*SubscriptionTiming) FromSubscriptionTiming1

func (t *SubscriptionTiming) FromSubscriptionTiming1(v SubscriptionTiming1) error

FromSubscriptionTiming1 overwrites any union data inside the SubscriptionTiming as the provided SubscriptionTiming1

func (*SubscriptionTiming) FromSubscriptionTimingEnum

func (t *SubscriptionTiming) FromSubscriptionTimingEnum(v SubscriptionTimingEnum) error

FromSubscriptionTimingEnum overwrites any union data inside the SubscriptionTiming as the provided SubscriptionTimingEnum

func (SubscriptionTiming) MarshalJSON

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

func (*SubscriptionTiming) MergeSubscriptionTiming1

func (t *SubscriptionTiming) MergeSubscriptionTiming1(v SubscriptionTiming1) error

MergeSubscriptionTiming1 performs a merge with any union data inside the SubscriptionTiming, using the provided SubscriptionTiming1

func (*SubscriptionTiming) MergeSubscriptionTimingEnum

func (t *SubscriptionTiming) MergeSubscriptionTimingEnum(v SubscriptionTimingEnum) error

MergeSubscriptionTimingEnum performs a merge with any union data inside the SubscriptionTiming, using the provided SubscriptionTimingEnum

func (*SubscriptionTiming) UnmarshalJSON

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

type SubscriptionTiming1

type SubscriptionTiming1 = time.Time

SubscriptionTiming1 [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.

type SubscriptionTimingEnum

type SubscriptionTimingEnum string

SubscriptionTimingEnum Subscription edit timing. When immediate, the requested changes take effect immediately. When nextBillingCycle, the requested changes take effect at the next billing cycle.

const (
	SubscriptionTimingEnumImmediate        SubscriptionTimingEnum = "immediate"
	SubscriptionTimingEnumNextBillingCycle SubscriptionTimingEnum = "next_billing_cycle"
)

Defines values for SubscriptionTimingEnum.

type SvixOperationalWebhookRequest

type SvixOperationalWebhookRequest struct {
	// Data The payload of the Svix operational webhook request.
	Data map[string]string `json:"data"`

	// Type The type of the Svix operational webhook request.
	Type SvixOperationalWebhookRequestType `json:"type"`
}

SvixOperationalWebhookRequest Operational webhook reqeuest sent by Svix.

type SvixOperationalWebhookRequestType

type SvixOperationalWebhookRequestType string

SvixOperationalWebhookRequestType The type of the Svix operational webhook request.

const (
	SvixOperationalWebhookRequestTypeEndpointCreated         SvixOperationalWebhookRequestType = "endpoint.created"
	SvixOperationalWebhookRequestTypeEndpointDeleted         SvixOperationalWebhookRequestType = "endpoint.deleted"
	SvixOperationalWebhookRequestTypeEndpointDisabled        SvixOperationalWebhookRequestType = "endpoint.disabled"
	SvixOperationalWebhookRequestTypeEndpointUpdated         SvixOperationalWebhookRequestType = "endpoint.updated"
	SvixOperationalWebhookRequestTypeMessageAttemptExhausted SvixOperationalWebhookRequestType = "message.attempt.exhausted"
	SvixOperationalWebhookRequestTypeMessageAttemptFailing   SvixOperationalWebhookRequestType = "message.attempt.failing"
	SvixOperationalWebhookRequestTypeMessageAttemptRecovered SvixOperationalWebhookRequestType = "message.attempt.recovered"
)

Defines values for SvixOperationalWebhookRequestType.

type TaxBehavior

type TaxBehavior string

TaxBehavior Tax behavior.

This enum is used to specify whether tax is included in the price or excluded from the price.

const (
	TaxBehaviorExclusive TaxBehavior = "exclusive"
	TaxBehaviorInclusive TaxBehavior = "inclusive"
)

Defines values for TaxBehavior.

type TaxConfig

type TaxConfig 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 *TaxBehavior `json:"behavior,omitempty"`

	// Stripe Stripe tax config.
	Stripe *StripeTaxConfig `json:"stripe,omitempty"`
}

TaxConfig Set of provider specific tax configs.

type TieredPriceMode

type TieredPriceMode string

TieredPriceMode The mode of the tiered price.

const (
	TieredPriceModeGraduated TieredPriceMode = "graduated"
	TieredPriceModeVolume    TieredPriceMode = "volume"
)

Defines values for TieredPriceMode.

type TieredPriceWithCommitments

type TieredPriceWithCommitments struct {
	// MaximumAmount The customer is limited to spend at most the amount.
	MaximumAmount *Numeric `json:"maximumAmount,omitempty"`

	// MinimumAmount The customer is committed to spend at least the amount.
	MinimumAmount *Numeric `json:"minimumAmount,omitempty"`

	// Mode Defines if the tiering mode is volume-based or graduated:
	// - In `volume`-based tiering, the maximum quantity within a period determines the per unit price.
	// - In `graduated` tiering, pricing can change as the quantity grows.
	Mode TieredPriceMode `json:"mode"`

	// Tiers The tiers of the tiered price.
	// At least one price component is required in each tier.
	Tiers []PriceTier `json:"tiers"`

	// Type The type of the price.
	//
	// One of: flat, unit, or tiered.
	Type TieredPriceWithCommitmentsType `json:"type"`
}

TieredPriceWithCommitments Tiered price with spend commitments.

type TieredPriceWithCommitmentsType

type TieredPriceWithCommitmentsType string

TieredPriceWithCommitmentsType The type of the price.

One of: flat, unit, or tiered.

const (
	TieredPriceWithCommitmentsTypeTiered TieredPriceWithCommitmentsType = "tiered"
)

Defines values for TieredPriceWithCommitmentsType.

type TooManyValuesForParamError

type TooManyValuesForParamError struct {
	ParamName string
	Count     int
}

func (*TooManyValuesForParamError) Error

type UnauthorizedProblemResponse

type UnauthorizedProblemResponse = UnexpectedProblemResponse

UnauthorizedProblemResponse A Problem Details object (RFC 7807). Additional properties specific to the problem type may be present.

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 UnexpectedProblemResponse

type UnexpectedProblemResponse = models.StatusProblem

UnexpectedProblemResponse A Problem Details object (RFC 7807). Additional properties specific to the problem type may be present.

type Unimplemented

type Unimplemented struct{}

func (Unimplemented) AdvanceInvoiceAction

func (_ Unimplemented) AdvanceInvoiceAction(w http.ResponseWriter, r *http.Request, invoiceId string)

Advance the invoice's state to the next status (POST /api/v1/billing/invoices/{invoiceId}/advance)

func (Unimplemented) AppStripeWebhook

func (_ Unimplemented) AppStripeWebhook(w http.ResponseWriter, r *http.Request, id string)

Stripe webhook (POST /api/v1/apps/{id}/stripe/webhook)

func (Unimplemented) ApproveInvoiceAction

func (_ Unimplemented) ApproveInvoiceAction(w http.ResponseWriter, r *http.Request, invoiceId string)

Send the invoice to the customer (POST /api/v1/billing/invoices/{invoiceId}/approve)

func (Unimplemented) ArchivePlan

func (_ Unimplemented) ArchivePlan(w http.ResponseWriter, r *http.Request, planId string)

Archive plan version (POST /api/v1/plans/{planId}/archive)

func (Unimplemented) CancelSubscription

func (_ Unimplemented) CancelSubscription(w http.ResponseWriter, r *http.Request, subscriptionId string)

Cancel subscription (POST /api/v1/subscriptions/{subscriptionId}/cancel)

func (Unimplemented) ChangeSubscription

func (_ Unimplemented) ChangeSubscription(w http.ResponseWriter, r *http.Request, subscriptionId string)

Change subscription (POST /api/v1/subscriptions/{subscriptionId}/change)

func (Unimplemented) CreateBillingProfile

func (_ Unimplemented) CreateBillingProfile(w http.ResponseWriter, r *http.Request)

Create a new billing profile (POST /api/v1/billing/profiles)

func (Unimplemented) CreateCustomer

func (_ Unimplemented) CreateCustomer(w http.ResponseWriter, r *http.Request)

Create customer (POST /api/v1/customers)

func (Unimplemented) CreateEntitlement

func (_ Unimplemented) CreateEntitlement(w http.ResponseWriter, r *http.Request, subjectIdOrKey string)

Create an entitlement (POST /api/v1/subjects/{subjectIdOrKey}/entitlements)

func (Unimplemented) CreateFeature

func (_ Unimplemented) CreateFeature(w http.ResponseWriter, r *http.Request)

Create feature (POST /api/v1/features)

func (Unimplemented) CreateGrant

func (_ Unimplemented) CreateGrant(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, entitlementIdOrFeatureKey string)

Create grant (POST /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants)

func (Unimplemented) CreateNotificationChannel

func (_ Unimplemented) CreateNotificationChannel(w http.ResponseWriter, r *http.Request)

Create a notification channel (POST /api/v1/notification/channels)

func (Unimplemented) CreateNotificationRule

func (_ Unimplemented) CreateNotificationRule(w http.ResponseWriter, r *http.Request)

Create a notification rule (POST /api/v1/notification/rules)

func (Unimplemented) CreatePendingInvoiceLine

func (_ Unimplemented) CreatePendingInvoiceLine(w http.ResponseWriter, r *http.Request)

Create pending line items (POST /api/v1/billing/invoices/lines)

func (Unimplemented) CreatePlan

func (_ Unimplemented) CreatePlan(w http.ResponseWriter, r *http.Request)

Create a plan (POST /api/v1/plans)

func (Unimplemented) CreatePortalToken

func (_ Unimplemented) CreatePortalToken(w http.ResponseWriter, r *http.Request)

Create consumer portal token (POST /api/v1/portal/tokens)

func (Unimplemented) CreateStripeCheckoutSession

func (_ Unimplemented) CreateStripeCheckoutSession(w http.ResponseWriter, r *http.Request)

Create checkout session (POST /api/v1/stripe/checkout/sessions)

func (Unimplemented) CreateSubscription

func (_ Unimplemented) CreateSubscription(w http.ResponseWriter, r *http.Request)

Create subscription (POST /api/v1/subscriptions)

func (Unimplemented) DeleteBillingProfile

func (_ Unimplemented) DeleteBillingProfile(w http.ResponseWriter, r *http.Request, id string)

Delete a billing profile (DELETE /api/v1/billing/profiles/{id})

func (Unimplemented) DeleteBillingProfileCustomerOverride

func (_ Unimplemented) DeleteBillingProfileCustomerOverride(w http.ResponseWriter, r *http.Request, customerId string)

Delete a customer override (DELETE /api/v1/billing/customers/{customerId})

func (Unimplemented) DeleteCustomer

func (_ Unimplemented) DeleteCustomer(w http.ResponseWriter, r *http.Request, id string)

Delete customer (DELETE /api/v1/customers/{id})

func (Unimplemented) DeleteCustomerAppData

func (_ Unimplemented) DeleteCustomerAppData(w http.ResponseWriter, r *http.Request, customerId string, appId string)

Delete customer app data (DELETE /api/v1/customers/{customerId}/apps/{appId})

func (Unimplemented) DeleteEntitlement

func (_ Unimplemented) DeleteEntitlement(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, entitlementId string)

Delete entitlement (DELETE /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementId})

func (Unimplemented) DeleteFeature

func (_ Unimplemented) DeleteFeature(w http.ResponseWriter, r *http.Request, featureId string)

Delete feature (DELETE /api/v1/features/{featureId})

func (Unimplemented) DeleteInvoice

func (_ Unimplemented) DeleteInvoice(w http.ResponseWriter, r *http.Request, invoiceId string)

Delete an invoice (DELETE /api/v1/billing/invoices/{invoiceId})

func (Unimplemented) DeleteNotificationChannel

func (_ Unimplemented) DeleteNotificationChannel(w http.ResponseWriter, r *http.Request, channelId string)

Delete a notification channel (DELETE /api/v1/notification/channels/{channelId})

func (Unimplemented) DeleteNotificationRule

func (_ Unimplemented) DeleteNotificationRule(w http.ResponseWriter, r *http.Request, ruleId string)

Delete a notification rule (DELETE /api/v1/notification/rules/{ruleId})

func (Unimplemented) DeletePlan

func (_ Unimplemented) DeletePlan(w http.ResponseWriter, r *http.Request, planId string)

Delete plan (DELETE /api/v1/plans/{planId})

func (Unimplemented) EditSubscription

func (_ Unimplemented) EditSubscription(w http.ResponseWriter, r *http.Request, subscriptionId string)

Edit subscription (PATCH /api/v1/subscriptions/{subscriptionId})

func (Unimplemented) GetApp

func (_ Unimplemented) GetApp(w http.ResponseWriter, r *http.Request, id string)

Get app (GET /api/v1/apps/{id})

func (Unimplemented) GetBillingProfile

func (_ Unimplemented) GetBillingProfile(w http.ResponseWriter, r *http.Request, id string, params GetBillingProfileParams)

Get a billing profile (GET /api/v1/billing/profiles/{id})

func (Unimplemented) GetBillingProfileCustomerOverride

func (_ Unimplemented) GetBillingProfileCustomerOverride(w http.ResponseWriter, r *http.Request, customerId string)

Get a customer override (GET /api/v1/billing/customers/{customerId})

func (Unimplemented) GetCustomer

func (_ Unimplemented) GetCustomer(w http.ResponseWriter, r *http.Request, id string)

Get customer (GET /api/v1/customers/{id})

func (Unimplemented) GetCustomerEntitlementValue

func (_ Unimplemented) GetCustomerEntitlementValue(w http.ResponseWriter, r *http.Request, customerId string, featureKey string, params GetCustomerEntitlementValueParams)

Get entitlement value (GET /api/v1/customers/{customerId}/entitlements/{featureKey}/value)

func (Unimplemented) GetDebugMetrics

func (_ Unimplemented) GetDebugMetrics(w http.ResponseWriter, r *http.Request)

Get event metrics (GET /api/v1/debug/metrics)

func (Unimplemented) GetEntitlement

func (_ Unimplemented) GetEntitlement(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, entitlementId string)

Get entitlement (GET /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementId})

func (Unimplemented) GetEntitlementById

func (_ Unimplemented) GetEntitlementById(w http.ResponseWriter, r *http.Request, entitlementId string)

Get entitlement by id (GET /api/v1/entitlements/{entitlementId})

func (Unimplemented) GetEntitlementHistory

func (_ Unimplemented) GetEntitlementHistory(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, entitlementId string, params GetEntitlementHistoryParams)

Get entitlement history (GET /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementId}/history)

func (Unimplemented) GetEntitlementValue

func (_ Unimplemented) GetEntitlementValue(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, entitlementIdOrFeatureKey string, params GetEntitlementValueParams)

Get entitlement value (GET /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/value)

func (Unimplemented) GetFeature

func (_ Unimplemented) GetFeature(w http.ResponseWriter, r *http.Request, featureId string)

Get feature (GET /api/v1/features/{featureId})

func (Unimplemented) GetInvoice

func (_ Unimplemented) GetInvoice(w http.ResponseWriter, r *http.Request, invoiceId string, params GetInvoiceParams)

Get an invoice (GET /api/v1/billing/invoices/{invoiceId})

func (Unimplemented) GetMarketplaceListing

func (_ Unimplemented) GetMarketplaceListing(w http.ResponseWriter, r *http.Request, pType AppType)

Get app details by type (GET /api/v1/marketplace/listings/{type})

func (Unimplemented) GetMeter

func (_ Unimplemented) GetMeter(w http.ResponseWriter, r *http.Request, meterIdOrSlug string)

Get meter (GET /api/v1/meters/{meterIdOrSlug})

func (Unimplemented) GetNotificationChannel

func (_ Unimplemented) GetNotificationChannel(w http.ResponseWriter, r *http.Request, channelId string)

Get notification channel (GET /api/v1/notification/channels/{channelId})

func (Unimplemented) GetNotificationEvent

func (_ Unimplemented) GetNotificationEvent(w http.ResponseWriter, r *http.Request, eventId string)

Get notification event (GET /api/v1/notification/events/{eventId})

func (Unimplemented) GetNotificationRule

func (_ Unimplemented) GetNotificationRule(w http.ResponseWriter, r *http.Request, ruleId string)

Get notification rule (GET /api/v1/notification/rules/{ruleId})

func (Unimplemented) GetPlan

func (_ Unimplemented) GetPlan(w http.ResponseWriter, r *http.Request, planId string, params GetPlanParams)

Get plan (GET /api/v1/plans/{planId})

func (Unimplemented) GetSubscription

func (_ Unimplemented) GetSubscription(w http.ResponseWriter, r *http.Request, subscriptionId string, params GetSubscriptionParams)

Get subscription (GET /api/v1/subscriptions/{subscriptionId})

func (Unimplemented) IngestEvents

func (_ Unimplemented) IngestEvents(w http.ResponseWriter, r *http.Request)

Ingest events (POST /api/v1/events)

func (Unimplemented) InvoicePendingLinesAction

func (_ Unimplemented) InvoicePendingLinesAction(w http.ResponseWriter, r *http.Request)

Invoice a customer based on the pending line items (POST /api/v1/billing/invoices/invoice)

func (Unimplemented) ListApps

func (_ Unimplemented) ListApps(w http.ResponseWriter, r *http.Request, params ListAppsParams)

List apps (GET /api/v1/apps)

func (Unimplemented) ListBillingProfileCustomerOverrides

func (_ Unimplemented) ListBillingProfileCustomerOverrides(w http.ResponseWriter, r *http.Request, params ListBillingProfileCustomerOverridesParams)

List customer overrides (GET /api/v1/billing/customers)

func (Unimplemented) ListBillingProfiles

func (_ Unimplemented) ListBillingProfiles(w http.ResponseWriter, r *http.Request, params ListBillingProfilesParams)

List billing profiles (GET /api/v1/billing/profiles)

func (Unimplemented) ListCurrencies

func (_ Unimplemented) ListCurrencies(w http.ResponseWriter, r *http.Request)

List supported currencies (GET /api/v1/info/currencies)

func (Unimplemented) ListCustomerAppData

func (_ Unimplemented) ListCustomerAppData(w http.ResponseWriter, r *http.Request, customerId string, params ListCustomerAppDataParams)

List customer app data (GET /api/v1/customers/{customerId}/apps)

func (Unimplemented) ListCustomers

func (_ Unimplemented) ListCustomers(w http.ResponseWriter, r *http.Request, params ListCustomersParams)

List customers (GET /api/v1/customers)

func (Unimplemented) ListEntitlementGrants

func (_ Unimplemented) ListEntitlementGrants(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, entitlementIdOrFeatureKey string, params ListEntitlementGrantsParams)

List entitlement grants (GET /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants)

func (Unimplemented) ListEntitlements

func (_ Unimplemented) ListEntitlements(w http.ResponseWriter, r *http.Request, params ListEntitlementsParams)

List all entitlements (GET /api/v1/entitlements)

func (Unimplemented) ListEvents

func (_ Unimplemented) ListEvents(w http.ResponseWriter, r *http.Request, params ListEventsParams)

List ingested events (GET /api/v1/events)

func (Unimplemented) ListFeatures

func (_ Unimplemented) ListFeatures(w http.ResponseWriter, r *http.Request, params ListFeaturesParams)

List features (GET /api/v1/features)

func (Unimplemented) ListGrants

func (_ Unimplemented) ListGrants(w http.ResponseWriter, r *http.Request, params ListGrantsParams)

List grants (GET /api/v1/grants)

func (Unimplemented) ListInvoices

func (_ Unimplemented) ListInvoices(w http.ResponseWriter, r *http.Request, params ListInvoicesParams)

List invoices (GET /api/v1/billing/invoices)

func (Unimplemented) ListMarketplaceListings

func (_ Unimplemented) ListMarketplaceListings(w http.ResponseWriter, r *http.Request, params ListMarketplaceListingsParams)

List available apps (GET /api/v1/marketplace/listings)

func (Unimplemented) ListMeterSubjects

func (_ Unimplemented) ListMeterSubjects(w http.ResponseWriter, r *http.Request, meterIdOrSlug string)

List meter subjects (GET /api/v1/meters/{meterIdOrSlug}/subjects)

func (Unimplemented) ListMeters

func (_ Unimplemented) ListMeters(w http.ResponseWriter, r *http.Request)

List meters (GET /api/v1/meters)

func (Unimplemented) ListNotificationChannels

func (_ Unimplemented) ListNotificationChannels(w http.ResponseWriter, r *http.Request, params ListNotificationChannelsParams)

List notification channels (GET /api/v1/notification/channels)

func (Unimplemented) ListNotificationEvents

func (_ Unimplemented) ListNotificationEvents(w http.ResponseWriter, r *http.Request, params ListNotificationEventsParams)

List notification events (GET /api/v1/notification/events)

func (Unimplemented) ListNotificationRules

func (_ Unimplemented) ListNotificationRules(w http.ResponseWriter, r *http.Request, params ListNotificationRulesParams)

List notification rules (GET /api/v1/notification/rules)

func (Unimplemented) ListPlans

func (_ Unimplemented) ListPlans(w http.ResponseWriter, r *http.Request, params ListPlansParams)

List plans (GET /api/v1/plans)

func (Unimplemented) ListPortalTokens

func (_ Unimplemented) ListPortalTokens(w http.ResponseWriter, r *http.Request, params ListPortalTokensParams)

List consumer portal tokens (GET /api/v1/portal/tokens)

func (Unimplemented) ListSubjectEntitlements

func (_ Unimplemented) ListSubjectEntitlements(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, params ListSubjectEntitlementsParams)

List entitlements (GET /api/v1/subjects/{subjectIdOrKey}/entitlements)

func (Unimplemented) MarketplaceAppAPIKeyInstall

func (_ Unimplemented) MarketplaceAppAPIKeyInstall(w http.ResponseWriter, r *http.Request, pType MarketplaceApiKeyInstallRequestType)

Install app via API key (POST /api/v1/marketplace/listings/{type}/install/apikey)

func (Unimplemented) MarketplaceOAuth2InstallAuthorize

Install app via OAuth2 (GET /api/v1/marketplace/listings/{type}/install/oauth2/authorize)

func (Unimplemented) MarketplaceOAuth2InstallGetURL

func (_ Unimplemented) MarketplaceOAuth2InstallGetURL(w http.ResponseWriter, r *http.Request, pType AppType)

Get OAuth2 install URL (GET /api/v1/marketplace/listings/{type}/install/oauth2)

func (Unimplemented) MigrateSubscription

func (_ Unimplemented) MigrateSubscription(w http.ResponseWriter, r *http.Request, subscriptionId string)

Migrate subscription (POST /api/v1/subscriptions/{subscriptionId}/migrate)

func (Unimplemented) NextPlan

func (_ Unimplemented) NextPlan(w http.ResponseWriter, r *http.Request, planIdOrKey string)

New draft plan (POST /api/v1/plans/{planIdOrKey}/next)

func (Unimplemented) OverrideEntitlement

func (_ Unimplemented) OverrideEntitlement(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, entitlementIdOrFeatureKey string)

Override entitlement (PUT /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/override)

func (Unimplemented) PublishPlan

func (_ Unimplemented) PublishPlan(w http.ResponseWriter, r *http.Request, planId string)

Publish plan (POST /api/v1/plans/{planId}/publish)

func (Unimplemented) QueryMeter

func (_ Unimplemented) QueryMeter(w http.ResponseWriter, r *http.Request, meterIdOrSlug string, params QueryMeterParams)

Query meter Query meter (GET /api/v1/meters/{meterIdOrSlug}/query)

func (Unimplemented) QueryPortalMeter

func (_ Unimplemented) QueryPortalMeter(w http.ResponseWriter, r *http.Request, meterSlug string, params QueryPortalMeterParams)

Query meter Query meter (GET /api/v1/portal/meters/{meterSlug}/query)

func (Unimplemented) RecalculateInvoiceTaxAction

func (_ Unimplemented) RecalculateInvoiceTaxAction(w http.ResponseWriter, r *http.Request, invoiceId string)

Recalculate an invoice's tax amounts (POST /api/v1/billing/invoices/{invoiceId}/taxes/recalculate)

func (Unimplemented) ReceiveSvixOperationalEvent

func (_ Unimplemented) ReceiveSvixOperationalEvent(w http.ResponseWriter, r *http.Request)

Receive Svix operational events (POST /api/v1/notification/webhook/svix)

func (Unimplemented) ResetEntitlementUsage

func (_ Unimplemented) ResetEntitlementUsage(w http.ResponseWriter, r *http.Request, subjectIdOrKey string, entitlementId string)

Reset entitlement (POST /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementId}/reset)

func (Unimplemented) RetryInvoiceAction

func (_ Unimplemented) RetryInvoiceAction(w http.ResponseWriter, r *http.Request, invoiceId string)

Retry advancing the invoice after a failed attempt. (POST /api/v1/billing/invoices/{invoiceId}/retry)

func (Unimplemented) SimulateInvoice

func (_ Unimplemented) SimulateInvoice(w http.ResponseWriter, r *http.Request, customerId string)

Simulate an invoice for a customer (POST /api/v1/billing/customers/{customerId}/invoices/simulate)

func (Unimplemented) TestNotificationRule

func (_ Unimplemented) TestNotificationRule(w http.ResponseWriter, r *http.Request, ruleId string)

Test notification rule (POST /api/v1/notification/rules/{ruleId}/test)

func (Unimplemented) UninstallApp

func (_ Unimplemented) UninstallApp(w http.ResponseWriter, r *http.Request, id string)

Uninstall app (DELETE /api/v1/apps/{id})

func (Unimplemented) UnscheduleCancelation

func (_ Unimplemented) UnscheduleCancelation(w http.ResponseWriter, r *http.Request, subscriptionId string)

Unschedule cancelation (POST /api/v1/subscriptions/{subscriptionId}/unschedule-cancelation)

func (Unimplemented) UpdateApp

func (_ Unimplemented) UpdateApp(w http.ResponseWriter, r *http.Request, id string)

Update app (PUT /api/v1/apps/{id})

func (Unimplemented) UpdateBillingProfile

func (_ Unimplemented) UpdateBillingProfile(w http.ResponseWriter, r *http.Request, id string)

Update a billing profile (PUT /api/v1/billing/profiles/{id})

func (Unimplemented) UpdateCustomer

func (_ Unimplemented) UpdateCustomer(w http.ResponseWriter, r *http.Request, id string)

Update customer (PUT /api/v1/customers/{id})

func (Unimplemented) UpdateInvoice

func (_ Unimplemented) UpdateInvoice(w http.ResponseWriter, r *http.Request, invoiceId string)

Update an invoice (PUT /api/v1/billing/invoices/{invoiceId})

func (Unimplemented) UpdateNotificationChannel

func (_ Unimplemented) UpdateNotificationChannel(w http.ResponseWriter, r *http.Request, channelId string)

Update a notification channel (PUT /api/v1/notification/channels/{channelId})

func (Unimplemented) UpdateNotificationRule

func (_ Unimplemented) UpdateNotificationRule(w http.ResponseWriter, r *http.Request, ruleId string)

Update a notification rule (PUT /api/v1/notification/rules/{ruleId})

func (Unimplemented) UpdatePlan

func (_ Unimplemented) UpdatePlan(w http.ResponseWriter, r *http.Request, planId string)

Update a plan (PUT /api/v1/plans/{planId})

func (Unimplemented) UpdateStripeAPIKey

func (_ Unimplemented) UpdateStripeAPIKey(w http.ResponseWriter, r *http.Request, id string)

Update Stripe API key (PUT /api/v1/apps/{id}/stripe/api-key)

func (Unimplemented) UpsertBillingProfileCustomerOverride

func (_ Unimplemented) UpsertBillingProfileCustomerOverride(w http.ResponseWriter, r *http.Request, customerId string)

Create a new or update a customer override (POST /api/v1/billing/customers/{customerId})

func (Unimplemented) UpsertCustomerAppData

func (_ Unimplemented) UpsertCustomerAppData(w http.ResponseWriter, r *http.Request, customerId string)

Upsert customer app data (PUT /api/v1/customers/{customerId}/apps)

func (Unimplemented) VoidGrant

func (_ Unimplemented) VoidGrant(w http.ResponseWriter, r *http.Request, grantId string)

Void grant (DELETE /api/v1/grants/{grantId})

func (Unimplemented) VoidInvoiceAction

func (_ Unimplemented) VoidInvoiceAction(w http.ResponseWriter, r *http.Request, invoiceId string)

Void an invoice (POST /api/v1/billing/invoices/{invoiceId}/void)

type UnitPrice

type UnitPrice struct {
	// Amount The amount of the unit price.
	Amount Numeric `json:"amount"`

	// Type The type of the price.
	Type UnitPriceType `json:"type"`
}

UnitPrice Unit price.

type UnitPriceType

type UnitPriceType string

UnitPriceType The type of the price.

const (
	UnitPriceTypeUnit UnitPriceType = "unit"
)

Defines values for UnitPriceType.

type UnitPriceWithCommitments

type UnitPriceWithCommitments struct {
	// Amount The amount of the unit price.
	Amount Numeric `json:"amount"`

	// MaximumAmount The customer is limited to spend at most the amount.
	MaximumAmount *Numeric `json:"maximumAmount,omitempty"`

	// MinimumAmount The customer is committed to spend at least the amount.
	MinimumAmount *Numeric `json:"minimumAmount,omitempty"`

	// Type The type of the price.
	Type UnitPriceWithCommitmentsType `json:"type"`
}

UnitPriceWithCommitments Unit price with spend commitments.

type UnitPriceWithCommitmentsType

type UnitPriceWithCommitmentsType string

UnitPriceWithCommitmentsType The type of the price.

const (
	UnitPriceWithCommitmentsTypeUnit UnitPriceWithCommitmentsType = "unit"
)

Defines values for UnitPriceWithCommitmentsType.

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 UpdateAppJSONRequestBody

type UpdateAppJSONRequestBody = AppBaseReplaceUpdate

UpdateAppJSONRequestBody defines body for UpdateApp for application/json ContentType.

type UpdateBillingProfileJSONRequestBody

type UpdateBillingProfileJSONRequestBody = BillingProfileReplaceUpdateWithWorkflow

UpdateBillingProfileJSONRequestBody defines body for UpdateBillingProfile for application/json ContentType.

type UpdateCustomerJSONRequestBody

type UpdateCustomerJSONRequestBody = CustomerReplaceUpdate

UpdateCustomerJSONRequestBody defines body for UpdateCustomer for application/json ContentType.

type UpdateInvoiceJSONRequestBody

type UpdateInvoiceJSONRequestBody = InvoiceReplaceUpdate

UpdateInvoiceJSONRequestBody defines body for UpdateInvoice for application/json ContentType.

type UpdateNotificationChannelJSONRequestBody

type UpdateNotificationChannelJSONRequestBody = NotificationChannelCreateRequest

UpdateNotificationChannelJSONRequestBody defines body for UpdateNotificationChannel for application/json ContentType.

type UpdateNotificationRuleJSONRequestBody

type UpdateNotificationRuleJSONRequestBody = NotificationRuleCreateRequest

UpdateNotificationRuleJSONRequestBody defines body for UpdateNotificationRule for application/json ContentType.

type UpdatePlanJSONRequestBody

type UpdatePlanJSONRequestBody = PlanReplaceUpdate

UpdatePlanJSONRequestBody defines body for UpdatePlan for application/json ContentType.

type UpdateStripeAPIKeyJSONRequestBody

type UpdateStripeAPIKeyJSONRequestBody = StripeAPIKeyInput

UpdateStripeAPIKeyJSONRequestBody defines body for UpdateStripeAPIKey for application/json ContentType.

type UpsertBillingProfileCustomerOverrideJSONRequestBody

type UpsertBillingProfileCustomerOverrideJSONRequestBody = BillingProfileCustomerOverrideCreate

UpsertBillingProfileCustomerOverrideJSONRequestBody defines body for UpsertBillingProfileCustomerOverride for application/json ContentType.

type UpsertCustomerAppDataJSONBody

type UpsertCustomerAppDataJSONBody = []CustomerAppData

UpsertCustomerAppDataJSONBody defines parameters for UpsertCustomerAppData.

type UpsertCustomerAppDataJSONRequestBody

type UpsertCustomerAppDataJSONRequestBody = UpsertCustomerAppDataJSONBody

UpsertCustomerAppDataJSONRequestBody defines body for UpsertCustomerAppData for application/json ContentType.

type ValidationIssue

type ValidationIssue struct {
	// Code Machine indentifiable code for the issue, if available.
	Code *string `json:"code,omitempty"`

	// Component Component reporting the issue.
	Component string `json:"component"`

	// CreatedAt Timestamp of when the resource was created.
	CreatedAt time.Time `json:"createdAt"`

	// DeletedAt Timestamp of when the resource was permanently deleted.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`

	// Field The field that the issue is related to, if available in JSON path format.
	Field *string `json:"field,omitempty"`

	// Id ID of the charge or discount.
	Id string `json:"id"`

	// Message A human-readable description of the issue.
	Message string `json:"message"`

	// Metadata Additional context for the issue.
	Metadata *Metadata `json:"metadata,omitempty"`

	// Severity The severity of the issue.
	Severity ValidationIssueSeverity `json:"severity"`

	// UpdatedAt Timestamp of when the resource was last updated.
	UpdatedAt time.Time `json:"updatedAt"`
}

ValidationIssue ValidationIssue captures any validation issues related to the invoice.

Issues with severity "critical" will prevent the invoice from being issued.

type ValidationIssueSeverity

type ValidationIssueSeverity string

ValidationIssueSeverity ValidationIssueSeverity describes the severity of a validation issue.

Issues with severity "critical" will prevent the invoice from being issued.

const (
	ValidationIssueSeverityCritical ValidationIssueSeverity = "critical"
	ValidationIssueSeverityWarning  ValidationIssueSeverity = "warning"
)

Defines values for ValidationIssueSeverity.

type VoidInvoiceActionCreate

type VoidInvoiceActionCreate struct {
	// Action The action to take on the line items.
	Action VoidInvoiceLineActionCreate `json:"action"`

	// Percentage How much of the total line items to be voided? (e.g. 100% means all charges are voided)
	Percentage Percentage `json:"percentage"`
}

VoidInvoiceActionCreate InvoiceVoidAction describes how to handle the voided line items.

type VoidInvoiceActionCreateItem

type VoidInvoiceActionCreateItem struct {
	// Action The action to take on the line items.
	Action VoidInvoiceLineActionCreateItem `json:"action"`

	// Percentage How much of the total line items to be voided? (e.g. 100% means all charges are voided)
	Percentage Percentage `json:"percentage"`
}

VoidInvoiceActionCreateItem InvoiceVoidAction describes how to handle the voided line items.

type VoidInvoiceActionInput

type VoidInvoiceActionInput struct {
	// Action The action to take on the voided line items.
	Action VoidInvoiceActionCreate `json:"action"`

	// Overrides Per line item overrides for the action.
	//
	// If not specified, the `action` will be applied to all line items.
	Overrides *[]VoidInvoiceActionLineOverride `json:"overrides"`

	// Reason The reason for voiding the invoice.
	Reason string `json:"reason"`
}

VoidInvoiceActionInput Request to void an invoice

type VoidInvoiceActionJSONRequestBody

type VoidInvoiceActionJSONRequestBody = VoidInvoiceActionInput

VoidInvoiceActionJSONRequestBody defines body for VoidInvoiceAction for application/json ContentType.

type VoidInvoiceActionLineOverride

type VoidInvoiceActionLineOverride struct {
	// Action The action to take on the line item.
	Action VoidInvoiceActionCreateItem `json:"action"`

	// LineId The line item ID to override.
	LineId string `json:"lineId"`
}

VoidInvoiceActionLineOverride VoidInvoiceLineOverride describes how to handle a specific line item in the invoice when voiding.

type VoidInvoiceLineActionCreate

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

VoidInvoiceLineActionCreate VoidInvoiceLineAction describes how to handle a specific line item in the invoice when voiding.

func (VoidInvoiceLineActionCreate) AsVoidInvoiceLineDiscardAction

func (t VoidInvoiceLineActionCreate) AsVoidInvoiceLineDiscardAction() (VoidInvoiceLineDiscardAction, error)

AsVoidInvoiceLineDiscardAction returns the union data inside the VoidInvoiceLineActionCreate as a VoidInvoiceLineDiscardAction

func (VoidInvoiceLineActionCreate) AsVoidInvoiceLinePendingActionCreate

func (t VoidInvoiceLineActionCreate) AsVoidInvoiceLinePendingActionCreate() (VoidInvoiceLinePendingActionCreate, error)

AsVoidInvoiceLinePendingActionCreate returns the union data inside the VoidInvoiceLineActionCreate as a VoidInvoiceLinePendingActionCreate

func (VoidInvoiceLineActionCreate) Discriminator

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

func (*VoidInvoiceLineActionCreate) FromVoidInvoiceLineDiscardAction

func (t *VoidInvoiceLineActionCreate) FromVoidInvoiceLineDiscardAction(v VoidInvoiceLineDiscardAction) error

FromVoidInvoiceLineDiscardAction overwrites any union data inside the VoidInvoiceLineActionCreate as the provided VoidInvoiceLineDiscardAction

func (*VoidInvoiceLineActionCreate) FromVoidInvoiceLinePendingActionCreate

func (t *VoidInvoiceLineActionCreate) FromVoidInvoiceLinePendingActionCreate(v VoidInvoiceLinePendingActionCreate) error

FromVoidInvoiceLinePendingActionCreate overwrites any union data inside the VoidInvoiceLineActionCreate as the provided VoidInvoiceLinePendingActionCreate

func (VoidInvoiceLineActionCreate) MarshalJSON

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

func (*VoidInvoiceLineActionCreate) MergeVoidInvoiceLineDiscardAction

func (t *VoidInvoiceLineActionCreate) MergeVoidInvoiceLineDiscardAction(v VoidInvoiceLineDiscardAction) error

MergeVoidInvoiceLineDiscardAction performs a merge with any union data inside the VoidInvoiceLineActionCreate, using the provided VoidInvoiceLineDiscardAction

func (*VoidInvoiceLineActionCreate) MergeVoidInvoiceLinePendingActionCreate

func (t *VoidInvoiceLineActionCreate) MergeVoidInvoiceLinePendingActionCreate(v VoidInvoiceLinePendingActionCreate) error

MergeVoidInvoiceLinePendingActionCreate performs a merge with any union data inside the VoidInvoiceLineActionCreate, using the provided VoidInvoiceLinePendingActionCreate

func (*VoidInvoiceLineActionCreate) UnmarshalJSON

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

func (VoidInvoiceLineActionCreate) ValueByDiscriminator

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

type VoidInvoiceLineActionCreateItem

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

VoidInvoiceLineActionCreateItem VoidInvoiceLineAction describes how to handle a specific line item in the invoice when voiding.

func (VoidInvoiceLineActionCreateItem) AsVoidInvoiceLineDiscardAction

func (t VoidInvoiceLineActionCreateItem) AsVoidInvoiceLineDiscardAction() (VoidInvoiceLineDiscardAction, error)

AsVoidInvoiceLineDiscardAction returns the union data inside the VoidInvoiceLineActionCreateItem as a VoidInvoiceLineDiscardAction

func (VoidInvoiceLineActionCreateItem) AsVoidInvoiceLinePendingActionCreateItem

func (t VoidInvoiceLineActionCreateItem) AsVoidInvoiceLinePendingActionCreateItem() (VoidInvoiceLinePendingActionCreateItem, error)

AsVoidInvoiceLinePendingActionCreateItem returns the union data inside the VoidInvoiceLineActionCreateItem as a VoidInvoiceLinePendingActionCreateItem

func (VoidInvoiceLineActionCreateItem) Discriminator

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

func (*VoidInvoiceLineActionCreateItem) FromVoidInvoiceLineDiscardAction

func (t *VoidInvoiceLineActionCreateItem) FromVoidInvoiceLineDiscardAction(v VoidInvoiceLineDiscardAction) error

FromVoidInvoiceLineDiscardAction overwrites any union data inside the VoidInvoiceLineActionCreateItem as the provided VoidInvoiceLineDiscardAction

func (*VoidInvoiceLineActionCreateItem) FromVoidInvoiceLinePendingActionCreateItem

func (t *VoidInvoiceLineActionCreateItem) FromVoidInvoiceLinePendingActionCreateItem(v VoidInvoiceLinePendingActionCreateItem) error

FromVoidInvoiceLinePendingActionCreateItem overwrites any union data inside the VoidInvoiceLineActionCreateItem as the provided VoidInvoiceLinePendingActionCreateItem

func (VoidInvoiceLineActionCreateItem) MarshalJSON

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

func (*VoidInvoiceLineActionCreateItem) MergeVoidInvoiceLineDiscardAction

func (t *VoidInvoiceLineActionCreateItem) MergeVoidInvoiceLineDiscardAction(v VoidInvoiceLineDiscardAction) error

MergeVoidInvoiceLineDiscardAction performs a merge with any union data inside the VoidInvoiceLineActionCreateItem, using the provided VoidInvoiceLineDiscardAction

func (*VoidInvoiceLineActionCreateItem) MergeVoidInvoiceLinePendingActionCreateItem

func (t *VoidInvoiceLineActionCreateItem) MergeVoidInvoiceLinePendingActionCreateItem(v VoidInvoiceLinePendingActionCreateItem) error

MergeVoidInvoiceLinePendingActionCreateItem performs a merge with any union data inside the VoidInvoiceLineActionCreateItem, using the provided VoidInvoiceLinePendingActionCreateItem

func (*VoidInvoiceLineActionCreateItem) UnmarshalJSON

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

func (VoidInvoiceLineActionCreateItem) ValueByDiscriminator

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

type VoidInvoiceLineDiscardAction

type VoidInvoiceLineDiscardAction struct {
	// Type The action to take on the line item.
	Type VoidInvoiceLineDiscardActionType `json:"type"`
}

VoidInvoiceLineDiscardAction VoidInvoiceLineDiscardAction describes how to handle the voidied line item in the invoice.

type VoidInvoiceLineDiscardActionType

type VoidInvoiceLineDiscardActionType string

VoidInvoiceLineDiscardActionType The action to take on the line item.

const (
	VoidInvoiceLineDiscardActionTypeDiscard VoidInvoiceLineDiscardActionType = "discard"
)

Defines values for VoidInvoiceLineDiscardActionType.

type VoidInvoiceLinePendingActionCreate

type VoidInvoiceLinePendingActionCreate struct {
	// NextInvoiceAt The time at which the line item should be invoiced again.
	//
	// If not provided, the line item will be re-invoiced now.
	NextInvoiceAt *time.Time `json:"nextInvoiceAt,omitempty"`

	// Type The action to take on the line item.
	Type VoidInvoiceLinePendingActionCreateType `json:"type"`
}

VoidInvoiceLinePendingActionCreate VoidInvoiceLinePendingAction describes how to handle the voidied line item in the invoice.

type VoidInvoiceLinePendingActionCreateItem

type VoidInvoiceLinePendingActionCreateItem struct {
	// NextInvoiceAt The time at which the line item should be invoiced again.
	//
	// If not provided, the line item will be re-invoiced now.
	NextInvoiceAt *time.Time `json:"nextInvoiceAt,omitempty"`

	// Type The action to take on the line item.
	Type VoidInvoiceLinePendingActionCreateItemType `json:"type"`
}

VoidInvoiceLinePendingActionCreateItem VoidInvoiceLinePendingAction describes how to handle the voidied line item in the invoice.

type VoidInvoiceLinePendingActionCreateItemType

type VoidInvoiceLinePendingActionCreateItemType string

VoidInvoiceLinePendingActionCreateItemType The action to take on the line item.

const (
	VoidInvoiceLinePendingActionCreateItemTypePending VoidInvoiceLinePendingActionCreateItemType = "pending"
)

Defines values for VoidInvoiceLinePendingActionCreateItemType.

type VoidInvoiceLinePendingActionCreateType

type VoidInvoiceLinePendingActionCreateType string

VoidInvoiceLinePendingActionCreateType The action to take on the line item.

const (
	VoidInvoiceLinePendingActionCreateTypePending VoidInvoiceLinePendingActionCreateType = "pending"
)

Defines values for VoidInvoiceLinePendingActionCreateType.

type WindowSize

type WindowSize = models.WindowSize

WindowSize Aggregation window size.

type WindowedBalanceHistory

type WindowedBalanceHistory struct {
	// BurndownHistory Grant burndown history.
	BurndownHistory []GrantBurnDownHistorySegment `json:"burndownHistory"`

	// WindowedHistory The windowed balance history.
	// - It only returns rows for windows where there was usage.
	// - The windows are inclusive at their start and exclusive at their end.
	// - The last window may be smaller than the window size and is inclusive at both ends.
	WindowedHistory []BalanceHistoryWindow `json:"windowedHistory"`
}

WindowedBalanceHistory The windowed balance history.

Directories

Path Synopsis
client
go
Package openmeter provides primitives to interact with the openapi HTTP API.
Package openmeter provides primitives to interact with the openapi HTTP API.
Some parts of the OpenAPI spec are not supported by oapi-codegen, such as the "oneOf" and "anyOf" keywords.
Some parts of the OpenAPI spec are not supported by oapi-codegen, such as the "oneOf" and "anyOf" keywords.

Jump to

Keyboard shortcuts

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