shared

package
v0.103.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddCreditLedgerEntryRequestAddAmendmentCreditLedgerEntryRequestParamsEntryType added in v0.103.0

type AddCreditLedgerEntryRequestAddAmendmentCreditLedgerEntryRequestParamsEntryType string
const (
	AddCreditLedgerEntryRequestAddAmendmentCreditLedgerEntryRequestParamsEntryTypeAmendment AddCreditLedgerEntryRequestAddAmendmentCreditLedgerEntryRequestParamsEntryType = "amendment"
)

func (AddCreditLedgerEntryRequestAddAmendmentCreditLedgerEntryRequestParamsEntryType) IsKnown added in v0.103.0

type AddCreditLedgerEntryRequestAddAmendmentCreditLedgerEntryRequestParamsParam added in v0.103.0

type AddCreditLedgerEntryRequestAddAmendmentCreditLedgerEntryRequestParamsParam struct {
	// The number of credits to effect. Note that this is required for increment,
	// decrement or void operations.
	Amount param.Field[float64] `json:"amount,required"`
	// The ID of the block to reverse a decrement from.
	BlockID   param.Field[string]                                                                         `json:"block_id,required"`
	EntryType param.Field[AddCreditLedgerEntryRequestAddAmendmentCreditLedgerEntryRequestParamsEntryType] `json:"entry_type,required"`
	// The currency or custom pricing unit to use for this ledger entry. If this is a
	// real-world currency, it must match the customer's invoicing currency.
	Currency param.Field[string] `json:"currency"`
	// Optional metadata that can be specified when adding ledger results via the API.
	// For example, this can be used to note an increment refers to trial credits, or
	// for noting corrections as a result of an incident, etc.
	Description param.Field[string] `json:"description"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (AddCreditLedgerEntryRequestAddAmendmentCreditLedgerEntryRequestParamsParam) MarshalJSON added in v0.103.0

type AddCreditLedgerEntryRequestAddDecrementCreditLedgerEntryRequestParamsEntryType added in v0.103.0

type AddCreditLedgerEntryRequestAddDecrementCreditLedgerEntryRequestParamsEntryType string
const (
	AddCreditLedgerEntryRequestAddDecrementCreditLedgerEntryRequestParamsEntryTypeDecrement AddCreditLedgerEntryRequestAddDecrementCreditLedgerEntryRequestParamsEntryType = "decrement"
)

func (AddCreditLedgerEntryRequestAddDecrementCreditLedgerEntryRequestParamsEntryType) IsKnown added in v0.103.0

type AddCreditLedgerEntryRequestAddDecrementCreditLedgerEntryRequestParamsParam added in v0.103.0

type AddCreditLedgerEntryRequestAddDecrementCreditLedgerEntryRequestParamsParam struct {
	// The number of credits to effect. Note that this is required for increment,
	// decrement, void, or undo operations.
	Amount    param.Field[float64]                                                                        `json:"amount,required"`
	EntryType param.Field[AddCreditLedgerEntryRequestAddDecrementCreditLedgerEntryRequestParamsEntryType] `json:"entry_type,required"`
	// The currency or custom pricing unit to use for this ledger entry. If this is a
	// real-world currency, it must match the customer's invoicing currency.
	Currency param.Field[string] `json:"currency"`
	// Optional metadata that can be specified when adding ledger results via the API.
	// For example, this can be used to note an increment refers to trial credits, or
	// for noting corrections as a result of an incident, etc.
	Description param.Field[string] `json:"description"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (AddCreditLedgerEntryRequestAddDecrementCreditLedgerEntryRequestParamsParam) MarshalJSON added in v0.103.0

type AddCreditLedgerEntryRequestAddExpirationChangeCreditLedgerEntryRequestParamsEntryType added in v0.103.0

type AddCreditLedgerEntryRequestAddExpirationChangeCreditLedgerEntryRequestParamsEntryType string
const (
	AddCreditLedgerEntryRequestAddExpirationChangeCreditLedgerEntryRequestParamsEntryTypeExpirationChange AddCreditLedgerEntryRequestAddExpirationChangeCreditLedgerEntryRequestParamsEntryType = "expiration_change"
)

func (AddCreditLedgerEntryRequestAddExpirationChangeCreditLedgerEntryRequestParamsEntryType) IsKnown added in v0.103.0

type AddCreditLedgerEntryRequestAddExpirationChangeCreditLedgerEntryRequestParamsParam added in v0.103.0

type AddCreditLedgerEntryRequestAddExpirationChangeCreditLedgerEntryRequestParamsParam struct {
	EntryType param.Field[AddCreditLedgerEntryRequestAddExpirationChangeCreditLedgerEntryRequestParamsEntryType] `json:"entry_type,required"`
	// An ISO 8601 format date that identifies the origination credit block to expire
	ExpiryDate param.Field[time.Time] `json:"expiry_date,required" format:"date-time"`
	// A future date (specified in YYYY-MM-DD format) used for expiration change,
	// denoting when credits transferred (as part of a partial block expiration) should
	// expire.
	TargetExpiryDate param.Field[time.Time] `json:"target_expiry_date,required" format:"date"`
	// The number of credits to effect. Note that this is required for increment,
	// decrement, void, or undo operations.
	Amount param.Field[float64] `json:"amount"`
	// The ID of the block affected by an expiration_change, used to differentiate
	// between multiple blocks with the same `expiry_date`.
	BlockID param.Field[string] `json:"block_id"`
	// The currency or custom pricing unit to use for this ledger entry. If this is a
	// real-world currency, it must match the customer's invoicing currency.
	Currency param.Field[string] `json:"currency"`
	// Optional metadata that can be specified when adding ledger results via the API.
	// For example, this can be used to note an increment refers to trial credits, or
	// for noting corrections as a result of an incident, etc.
	Description param.Field[string] `json:"description"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (AddCreditLedgerEntryRequestAddExpirationChangeCreditLedgerEntryRequestParamsParam) MarshalJSON added in v0.103.0

type AddCreditLedgerEntryRequestAddIncrementCreditLedgerEntryRequestParamsEntryType added in v0.103.0

type AddCreditLedgerEntryRequestAddIncrementCreditLedgerEntryRequestParamsEntryType string
const (
	AddCreditLedgerEntryRequestAddIncrementCreditLedgerEntryRequestParamsEntryTypeIncrement AddCreditLedgerEntryRequestAddIncrementCreditLedgerEntryRequestParamsEntryType = "increment"
)

func (AddCreditLedgerEntryRequestAddIncrementCreditLedgerEntryRequestParamsEntryType) IsKnown added in v0.103.0

type AddCreditLedgerEntryRequestAddIncrementCreditLedgerEntryRequestParamsInvoiceSettingsParam added in v0.103.0

type AddCreditLedgerEntryRequestAddIncrementCreditLedgerEntryRequestParamsInvoiceSettingsParam struct {
	// Whether the credits purchase invoice should auto collect with the customer's
	// saved payment method.
	AutoCollection param.Field[bool] `json:"auto_collection,required"`
	// The net terms determines the difference between the invoice date and the issue
	// date for the invoice. If you intend the invoice to be due on issue, set this
	// to 0.
	NetTerms param.Field[int64] `json:"net_terms,required"`
	// An optional memo to display on the invoice.
	Memo param.Field[string] `json:"memo"`
	// If true, the new credit block will require that the corresponding invoice is
	// paid before it can be drawn down from.
	RequireSuccessfulPayment param.Field[bool] `json:"require_successful_payment"`
}

Passing `invoice_settings` automatically generates an invoice for the newly added credits. If `invoice_settings` is passed, you must specify per_unit_cost_basis, as the calculation of the invoice total is done on that basis.

func (AddCreditLedgerEntryRequestAddIncrementCreditLedgerEntryRequestParamsInvoiceSettingsParam) MarshalJSON added in v0.103.0

type AddCreditLedgerEntryRequestAddIncrementCreditLedgerEntryRequestParamsParam added in v0.103.0

type AddCreditLedgerEntryRequestAddIncrementCreditLedgerEntryRequestParamsParam struct {
	// The number of credits to effect. Note that this is required for increment,
	// decrement, void, or undo operations.
	Amount    param.Field[float64]                                                                        `json:"amount,required"`
	EntryType param.Field[AddCreditLedgerEntryRequestAddIncrementCreditLedgerEntryRequestParamsEntryType] `json:"entry_type,required"`
	// The currency or custom pricing unit to use for this ledger entry. If this is a
	// real-world currency, it must match the customer's invoicing currency.
	Currency param.Field[string] `json:"currency"`
	// Optional metadata that can be specified when adding ledger results via the API.
	// For example, this can be used to note an increment refers to trial credits, or
	// for noting corrections as a result of an incident, etc.
	Description param.Field[string] `json:"description"`
	// An ISO 8601 format date that denotes when this credit balance should become
	// available for use.
	EffectiveDate param.Field[time.Time] `json:"effective_date" format:"date-time"`
	// An ISO 8601 format date that denotes when this credit balance should expire.
	ExpiryDate param.Field[time.Time] `json:"expiry_date" format:"date-time"`
	// Passing `invoice_settings` automatically generates an invoice for the newly
	// added credits. If `invoice_settings` is passed, you must specify
	// per_unit_cost_basis, as the calculation of the invoice total is done on that
	// basis.
	InvoiceSettings param.Field[AddCreditLedgerEntryRequestAddIncrementCreditLedgerEntryRequestParamsInvoiceSettingsParam] `json:"invoice_settings"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// Can only be specified when entry_type=increment. How much, in the customer's
	// currency, a customer paid for a single credit in this block
	PerUnitCostBasis param.Field[string] `json:"per_unit_cost_basis"`
}

func (AddCreditLedgerEntryRequestAddIncrementCreditLedgerEntryRequestParamsParam) MarshalJSON added in v0.103.0

type AddCreditLedgerEntryRequestAddVoidCreditLedgerEntryRequestParamsEntryType added in v0.103.0

type AddCreditLedgerEntryRequestAddVoidCreditLedgerEntryRequestParamsEntryType string
const (
	AddCreditLedgerEntryRequestAddVoidCreditLedgerEntryRequestParamsEntryTypeVoid AddCreditLedgerEntryRequestAddVoidCreditLedgerEntryRequestParamsEntryType = "void"
)

func (AddCreditLedgerEntryRequestAddVoidCreditLedgerEntryRequestParamsEntryType) IsKnown added in v0.103.0

type AddCreditLedgerEntryRequestAddVoidCreditLedgerEntryRequestParamsParam added in v0.103.0

type AddCreditLedgerEntryRequestAddVoidCreditLedgerEntryRequestParamsParam struct {
	// The number of credits to effect. Note that this is required for increment,
	// decrement, void, or undo operations.
	Amount param.Field[float64] `json:"amount,required"`
	// The ID of the block to void.
	BlockID   param.Field[string]                                                                    `json:"block_id,required"`
	EntryType param.Field[AddCreditLedgerEntryRequestAddVoidCreditLedgerEntryRequestParamsEntryType] `json:"entry_type,required"`
	// The currency or custom pricing unit to use for this ledger entry. If this is a
	// real-world currency, it must match the customer's invoicing currency.
	Currency param.Field[string] `json:"currency"`
	// Optional metadata that can be specified when adding ledger results via the API.
	// For example, this can be used to note an increment refers to trial credits, or
	// for noting corrections as a result of an incident, etc.
	Description param.Field[string] `json:"description"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// Can only be specified when `entry_type=void`. The reason for the void.
	VoidReason param.Field[AddCreditLedgerEntryRequestAddVoidCreditLedgerEntryRequestParamsVoidReason] `json:"void_reason"`
}

func (AddCreditLedgerEntryRequestAddVoidCreditLedgerEntryRequestParamsParam) MarshalJSON added in v0.103.0

type AddCreditLedgerEntryRequestAddVoidCreditLedgerEntryRequestParamsVoidReason added in v0.103.0

type AddCreditLedgerEntryRequestAddVoidCreditLedgerEntryRequestParamsVoidReason string

Can only be specified when `entry_type=void`. The reason for the void.

const (
	AddCreditLedgerEntryRequestAddVoidCreditLedgerEntryRequestParamsVoidReasonRefund AddCreditLedgerEntryRequestAddVoidCreditLedgerEntryRequestParamsVoidReason = "refund"
)

func (AddCreditLedgerEntryRequestAddVoidCreditLedgerEntryRequestParamsVoidReason) IsKnown added in v0.103.0

type AddCreditLedgerEntryRequestEntryType added in v0.103.0

type AddCreditLedgerEntryRequestEntryType string
const (
	AddCreditLedgerEntryRequestEntryTypeIncrement        AddCreditLedgerEntryRequestEntryType = "increment"
	AddCreditLedgerEntryRequestEntryTypeDecrement        AddCreditLedgerEntryRequestEntryType = "decrement"
	AddCreditLedgerEntryRequestEntryTypeExpirationChange AddCreditLedgerEntryRequestEntryType = "expiration_change"
	AddCreditLedgerEntryRequestEntryTypeVoid             AddCreditLedgerEntryRequestEntryType = "void"
	AddCreditLedgerEntryRequestEntryTypeAmendment        AddCreditLedgerEntryRequestEntryType = "amendment"
)

func (AddCreditLedgerEntryRequestEntryType) IsKnown added in v0.103.0

type AddCreditLedgerEntryRequestParam added in v0.103.0

type AddCreditLedgerEntryRequestParam struct {
	EntryType param.Field[AddCreditLedgerEntryRequestEntryType] `json:"entry_type,required"`
	// The number of credits to effect. Note that this is required for increment,
	// decrement, void, or undo operations.
	Amount param.Field[float64] `json:"amount"`
	// The ID of the block affected by an expiration_change, used to differentiate
	// between multiple blocks with the same `expiry_date`.
	BlockID param.Field[string] `json:"block_id"`
	// The currency or custom pricing unit to use for this ledger entry. If this is a
	// real-world currency, it must match the customer's invoicing currency.
	Currency param.Field[string] `json:"currency"`
	// Optional metadata that can be specified when adding ledger results via the API.
	// For example, this can be used to note an increment refers to trial credits, or
	// for noting corrections as a result of an incident, etc.
	Description param.Field[string] `json:"description"`
	// An ISO 8601 format date that denotes when this credit balance should become
	// available for use.
	EffectiveDate param.Field[time.Time] `json:"effective_date" format:"date-time"`
	// An ISO 8601 format date that denotes when this credit balance should expire.
	ExpiryDate      param.Field[time.Time]   `json:"expiry_date" format:"date-time"`
	InvoiceSettings param.Field[interface{}] `json:"invoice_settings"`
	Metadata        param.Field[interface{}] `json:"metadata"`
	// Can only be specified when entry_type=increment. How much, in the customer's
	// currency, a customer paid for a single credit in this block
	PerUnitCostBasis param.Field[string] `json:"per_unit_cost_basis"`
	// A future date (specified in YYYY-MM-DD format) used for expiration change,
	// denoting when credits transferred (as part of a partial block expiration) should
	// expire.
	TargetExpiryDate param.Field[time.Time] `json:"target_expiry_date" format:"date"`
	// Can only be specified when `entry_type=void`. The reason for the void.
	VoidReason param.Field[AddCreditLedgerEntryRequestVoidReason] `json:"void_reason"`
}

func (AddCreditLedgerEntryRequestParam) MarshalJSON added in v0.103.0

func (r AddCreditLedgerEntryRequestParam) MarshalJSON() (data []byte, err error)

type AddCreditLedgerEntryRequestVoidReason added in v0.103.0

type AddCreditLedgerEntryRequestVoidReason string

Can only be specified when `entry_type=void`. The reason for the void.

const (
	AddCreditLedgerEntryRequestVoidReasonRefund AddCreditLedgerEntryRequestVoidReason = "refund"
)

func (AddCreditLedgerEntryRequestVoidReason) IsKnown added in v0.103.0

type AddSubscriptionAdjustmentParams added in v0.103.0

type AddSubscriptionAdjustmentParams struct {
	// The definition of a new adjustment to create and add to the subscription.
	Adjustment param.Field[NewAdjustmentModelUnionParam] `json:"adjustment,required"`
	// The end date of the adjustment interval. This is the date that the adjustment
	// will stop affecting prices on the subscription.
	EndDate param.Field[time.Time] `json:"end_date" format:"date-time"`
	// The phase to add this adjustment to.
	PlanPhaseOrder param.Field[int64] `json:"plan_phase_order"`
	// The start date of the adjustment interval. This is the date that the adjustment
	// will start affecting prices on the subscription. If null, the adjustment will
	// start when the phase or subscription starts.
	StartDate param.Field[time.Time] `json:"start_date" format:"date-time"`
}

func (AddSubscriptionAdjustmentParams) MarshalJSON added in v0.103.0

func (r AddSubscriptionAdjustmentParams) MarshalJSON() (data []byte, err error)

type AddSubscriptionPriceParams added in v0.103.0

type AddSubscriptionPriceParams struct {
	// The definition of a new allocation price to create and add to the subscription.
	AllocationPrice param.Field[NewAllocationPriceModelParam] `json:"allocation_price"`
	// [DEPRECATED] Use add_adjustments instead. The subscription's discounts for this
	// price.
	//
	// Deprecated: deprecated
	Discounts param.Field[[]DiscountOverrideModelParam] `json:"discounts"`
	// The end date of the price interval. This is the date that the price will stop
	// billing on the subscription. If null, billing will end when the phase or
	// subscription ends.
	EndDate param.Field[time.Time] `json:"end_date" format:"date-time"`
	// The external price id of the price to add to the subscription.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for
	// this price.
	//
	// Deprecated: deprecated
	MaximumAmount param.Field[string] `json:"maximum_amount"`
	// [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for
	// this price.
	//
	// Deprecated: deprecated
	MinimumAmount param.Field[string] `json:"minimum_amount"`
	// The phase to add this price to.
	PlanPhaseOrder param.Field[int64] `json:"plan_phase_order"`
	// The definition of a new price to create and add to the subscription.
	Price param.Field[NewSubscriptionPriceModelUnionParam] `json:"price"`
	// The id of the price to add to the subscription.
	PriceID param.Field[string] `json:"price_id"`
	// The start date of the price interval. This is the date that the price will start
	// billing on the subscription. If null, billing will start when the phase or
	// subscription starts.
	StartDate param.Field[time.Time] `json:"start_date" format:"date-time"`
}

func (AddSubscriptionPriceParams) MarshalJSON added in v0.103.0

func (r AddSubscriptionPriceParams) MarshalJSON() (data []byte, err error)

type AddressInputModelParam added in v0.103.0

type AddressInputModelParam struct {
	City       param.Field[string] `json:"city"`
	Country    param.Field[string] `json:"country"`
	Line1      param.Field[string] `json:"line1"`
	Line2      param.Field[string] `json:"line2"`
	PostalCode param.Field[string] `json:"postal_code"`
	State      param.Field[string] `json:"state"`
}

func (AddressInputModelParam) MarshalJSON added in v0.103.0

func (r AddressInputModelParam) MarshalJSON() (data []byte, err error)

type AddressModel added in v0.103.0

type AddressModel struct {
	City       string           `json:"city,required,nullable"`
	Country    string           `json:"country,required,nullable"`
	Line1      string           `json:"line1,required,nullable"`
	Line2      string           `json:"line2,required,nullable"`
	PostalCode string           `json:"postal_code,required,nullable"`
	State      string           `json:"state,required,nullable"`
	JSON       addressModelJSON `json:"-"`
}

func (*AddressModel) UnmarshalJSON added in v0.103.0

func (r *AddressModel) UnmarshalJSON(data []byte) (err error)

type AdjustmentIntervalModel added in v0.103.0

type AdjustmentIntervalModel struct {
	ID         string          `json:"id,required"`
	Adjustment AdjustmentModel `json:"adjustment,required"`
	// The price interval IDs that this adjustment applies to.
	AppliesToPriceIntervalIDs []string `json:"applies_to_price_interval_ids,required"`
	// The end date of the adjustment interval.
	EndDate time.Time `json:"end_date,required,nullable" format:"date-time"`
	// The start date of the adjustment interval.
	StartDate time.Time                   `json:"start_date,required" format:"date-time"`
	JSON      adjustmentIntervalModelJSON `json:"-"`
}

func (*AdjustmentIntervalModel) UnmarshalJSON added in v0.103.0

func (r *AdjustmentIntervalModel) UnmarshalJSON(data []byte) (err error)

type AdjustmentModel added in v0.103.0

type AdjustmentModel struct {
	ID             string                        `json:"id,required"`
	AdjustmentType AdjustmentModelAdjustmentType `json:"adjustment_type,required"`
	// This field can have the runtime type of [[]string].
	AppliesToPriceIDs interface{} `json:"applies_to_price_ids,required"`
	// True for adjustments that apply to an entire invocice, false for adjustments
	// that apply to only one price.
	IsInvoiceLevel bool `json:"is_invoice_level,required"`
	// The plan phase in which this adjustment is active.
	PlanPhaseOrder int64 `json:"plan_phase_order,required,nullable"`
	// The reason for the adjustment.
	Reason string `json:"reason,required,nullable"`
	// The amount by which to discount the prices this adjustment applies to in a given
	// billing period.
	AmountDiscount string `json:"amount_discount"`
	// The item ID that revenue from this minimum will be attributed to.
	ItemID string `json:"item_id"`
	// The maximum amount to charge in a given billing period for the prices this
	// adjustment applies to.
	MaximumAmount string `json:"maximum_amount"`
	// The minimum amount to charge in a given billing period for the prices this
	// adjustment applies to.
	MinimumAmount string `json:"minimum_amount"`
	// The percentage (as a value between 0 and 1) by which to discount the price
	// intervals this adjustment applies to in a given billing period.
	PercentageDiscount float64 `json:"percentage_discount"`
	// The number of usage units by which to discount the price this adjustment applies
	// to in a given billing period.
	UsageDiscount float64             `json:"usage_discount"`
	JSON          adjustmentModelJSON `json:"-"`
	// contains filtered or unexported fields
}

func (*AdjustmentModel) UnmarshalJSON added in v0.103.0

func (r *AdjustmentModel) UnmarshalJSON(data []byte) (err error)

type AdjustmentModelAdjustmentType added in v0.103.0

type AdjustmentModelAdjustmentType string
const (
	AdjustmentModelAdjustmentTypeUsageDiscount      AdjustmentModelAdjustmentType = "usage_discount"
	AdjustmentModelAdjustmentTypeAmountDiscount     AdjustmentModelAdjustmentType = "amount_discount"
	AdjustmentModelAdjustmentTypePercentageDiscount AdjustmentModelAdjustmentType = "percentage_discount"
	AdjustmentModelAdjustmentTypeMinimum            AdjustmentModelAdjustmentType = "minimum"
	AdjustmentModelAdjustmentTypeMaximum            AdjustmentModelAdjustmentType = "maximum"
)

func (AdjustmentModelAdjustmentType) IsKnown added in v0.103.0

func (r AdjustmentModelAdjustmentType) IsKnown() bool

type AdjustmentModelPlanPhaseAmountDiscountAdjustment added in v0.103.0

type AdjustmentModelPlanPhaseAmountDiscountAdjustment struct {
	ID             string                                                         `json:"id,required"`
	AdjustmentType AdjustmentModelPlanPhaseAmountDiscountAdjustmentAdjustmentType `json:"adjustment_type,required"`
	// The amount by which to discount the prices this adjustment applies to in a given
	// billing period.
	AmountDiscount string `json:"amount_discount,required"`
	// The price IDs that this adjustment applies to.
	AppliesToPriceIDs []string `json:"applies_to_price_ids,required"`
	// True for adjustments that apply to an entire invocice, false for adjustments
	// that apply to only one price.
	IsInvoiceLevel bool `json:"is_invoice_level,required"`
	// The plan phase in which this adjustment is active.
	PlanPhaseOrder int64 `json:"plan_phase_order,required,nullable"`
	// The reason for the adjustment.
	Reason string                                               `json:"reason,required,nullable"`
	JSON   adjustmentModelPlanPhaseAmountDiscountAdjustmentJSON `json:"-"`
}

func (*AdjustmentModelPlanPhaseAmountDiscountAdjustment) UnmarshalJSON added in v0.103.0

func (r *AdjustmentModelPlanPhaseAmountDiscountAdjustment) UnmarshalJSON(data []byte) (err error)

type AdjustmentModelPlanPhaseAmountDiscountAdjustmentAdjustmentType added in v0.103.0

type AdjustmentModelPlanPhaseAmountDiscountAdjustmentAdjustmentType string
const (
	AdjustmentModelPlanPhaseAmountDiscountAdjustmentAdjustmentTypeAmountDiscount AdjustmentModelPlanPhaseAmountDiscountAdjustmentAdjustmentType = "amount_discount"
)

func (AdjustmentModelPlanPhaseAmountDiscountAdjustmentAdjustmentType) IsKnown added in v0.103.0

type AdjustmentModelPlanPhaseMaximumAdjustment added in v0.103.0

type AdjustmentModelPlanPhaseMaximumAdjustment struct {
	ID             string                                                  `json:"id,required"`
	AdjustmentType AdjustmentModelPlanPhaseMaximumAdjustmentAdjustmentType `json:"adjustment_type,required"`
	// The price IDs that this adjustment applies to.
	AppliesToPriceIDs []string `json:"applies_to_price_ids,required"`
	// True for adjustments that apply to an entire invocice, false for adjustments
	// that apply to only one price.
	IsInvoiceLevel bool `json:"is_invoice_level,required"`
	// The maximum amount to charge in a given billing period for the prices this
	// adjustment applies to.
	MaximumAmount string `json:"maximum_amount,required"`
	// The plan phase in which this adjustment is active.
	PlanPhaseOrder int64 `json:"plan_phase_order,required,nullable"`
	// The reason for the adjustment.
	Reason string                                        `json:"reason,required,nullable"`
	JSON   adjustmentModelPlanPhaseMaximumAdjustmentJSON `json:"-"`
}

func (*AdjustmentModelPlanPhaseMaximumAdjustment) UnmarshalJSON added in v0.103.0

func (r *AdjustmentModelPlanPhaseMaximumAdjustment) UnmarshalJSON(data []byte) (err error)

type AdjustmentModelPlanPhaseMaximumAdjustmentAdjustmentType added in v0.103.0

type AdjustmentModelPlanPhaseMaximumAdjustmentAdjustmentType string
const (
	AdjustmentModelPlanPhaseMaximumAdjustmentAdjustmentTypeMaximum AdjustmentModelPlanPhaseMaximumAdjustmentAdjustmentType = "maximum"
)

func (AdjustmentModelPlanPhaseMaximumAdjustmentAdjustmentType) IsKnown added in v0.103.0

type AdjustmentModelPlanPhaseMinimumAdjustment added in v0.103.0

type AdjustmentModelPlanPhaseMinimumAdjustment struct {
	ID             string                                                  `json:"id,required"`
	AdjustmentType AdjustmentModelPlanPhaseMinimumAdjustmentAdjustmentType `json:"adjustment_type,required"`
	// The price IDs that this adjustment applies to.
	AppliesToPriceIDs []string `json:"applies_to_price_ids,required"`
	// True for adjustments that apply to an entire invocice, false for adjustments
	// that apply to only one price.
	IsInvoiceLevel bool `json:"is_invoice_level,required"`
	// The item ID that revenue from this minimum will be attributed to.
	ItemID string `json:"item_id,required"`
	// The minimum amount to charge in a given billing period for the prices this
	// adjustment applies to.
	MinimumAmount string `json:"minimum_amount,required"`
	// The plan phase in which this adjustment is active.
	PlanPhaseOrder int64 `json:"plan_phase_order,required,nullable"`
	// The reason for the adjustment.
	Reason string                                        `json:"reason,required,nullable"`
	JSON   adjustmentModelPlanPhaseMinimumAdjustmentJSON `json:"-"`
}

func (*AdjustmentModelPlanPhaseMinimumAdjustment) UnmarshalJSON added in v0.103.0

func (r *AdjustmentModelPlanPhaseMinimumAdjustment) UnmarshalJSON(data []byte) (err error)

type AdjustmentModelPlanPhaseMinimumAdjustmentAdjustmentType added in v0.103.0

type AdjustmentModelPlanPhaseMinimumAdjustmentAdjustmentType string
const (
	AdjustmentModelPlanPhaseMinimumAdjustmentAdjustmentTypeMinimum AdjustmentModelPlanPhaseMinimumAdjustmentAdjustmentType = "minimum"
)

func (AdjustmentModelPlanPhaseMinimumAdjustmentAdjustmentType) IsKnown added in v0.103.0

type AdjustmentModelPlanPhasePercentageDiscountAdjustment added in v0.103.0

type AdjustmentModelPlanPhasePercentageDiscountAdjustment struct {
	ID             string                                                             `json:"id,required"`
	AdjustmentType AdjustmentModelPlanPhasePercentageDiscountAdjustmentAdjustmentType `json:"adjustment_type,required"`
	// The price IDs that this adjustment applies to.
	AppliesToPriceIDs []string `json:"applies_to_price_ids,required"`
	// True for adjustments that apply to an entire invocice, false for adjustments
	// that apply to only one price.
	IsInvoiceLevel bool `json:"is_invoice_level,required"`
	// The percentage (as a value between 0 and 1) by which to discount the price
	// intervals this adjustment applies to in a given billing period.
	PercentageDiscount float64 `json:"percentage_discount,required"`
	// The plan phase in which this adjustment is active.
	PlanPhaseOrder int64 `json:"plan_phase_order,required,nullable"`
	// The reason for the adjustment.
	Reason string                                                   `json:"reason,required,nullable"`
	JSON   adjustmentModelPlanPhasePercentageDiscountAdjustmentJSON `json:"-"`
}

func (*AdjustmentModelPlanPhasePercentageDiscountAdjustment) UnmarshalJSON added in v0.103.0

func (r *AdjustmentModelPlanPhasePercentageDiscountAdjustment) UnmarshalJSON(data []byte) (err error)

type AdjustmentModelPlanPhasePercentageDiscountAdjustmentAdjustmentType added in v0.103.0

type AdjustmentModelPlanPhasePercentageDiscountAdjustmentAdjustmentType string
const (
	AdjustmentModelPlanPhasePercentageDiscountAdjustmentAdjustmentTypePercentageDiscount AdjustmentModelPlanPhasePercentageDiscountAdjustmentAdjustmentType = "percentage_discount"
)

func (AdjustmentModelPlanPhasePercentageDiscountAdjustmentAdjustmentType) IsKnown added in v0.103.0

type AdjustmentModelPlanPhaseUsageDiscountAdjustment added in v0.103.0

type AdjustmentModelPlanPhaseUsageDiscountAdjustment struct {
	ID             string                                                        `json:"id,required"`
	AdjustmentType AdjustmentModelPlanPhaseUsageDiscountAdjustmentAdjustmentType `json:"adjustment_type,required"`
	// The price IDs that this adjustment applies to.
	AppliesToPriceIDs []string `json:"applies_to_price_ids,required"`
	// True for adjustments that apply to an entire invocice, false for adjustments
	// that apply to only one price.
	IsInvoiceLevel bool `json:"is_invoice_level,required"`
	// The plan phase in which this adjustment is active.
	PlanPhaseOrder int64 `json:"plan_phase_order,required,nullable"`
	// The reason for the adjustment.
	Reason string `json:"reason,required,nullable"`
	// The number of usage units by which to discount the price this adjustment applies
	// to in a given billing period.
	UsageDiscount float64                                             `json:"usage_discount,required"`
	JSON          adjustmentModelPlanPhaseUsageDiscountAdjustmentJSON `json:"-"`
}

func (*AdjustmentModelPlanPhaseUsageDiscountAdjustment) UnmarshalJSON added in v0.103.0

func (r *AdjustmentModelPlanPhaseUsageDiscountAdjustment) UnmarshalJSON(data []byte) (err error)

type AdjustmentModelPlanPhaseUsageDiscountAdjustmentAdjustmentType added in v0.103.0

type AdjustmentModelPlanPhaseUsageDiscountAdjustmentAdjustmentType string
const (
	AdjustmentModelPlanPhaseUsageDiscountAdjustmentAdjustmentTypeUsageDiscount AdjustmentModelPlanPhaseUsageDiscountAdjustmentAdjustmentType = "usage_discount"
)

func (AdjustmentModelPlanPhaseUsageDiscountAdjustmentAdjustmentType) IsKnown added in v0.103.0

type AffectedBlockModel added in v0.103.0

type AffectedBlockModel struct {
	ID               string                 `json:"id,required"`
	ExpiryDate       time.Time              `json:"expiry_date,required,nullable" format:"date-time"`
	PerUnitCostBasis string                 `json:"per_unit_cost_basis,required,nullable"`
	JSON             affectedBlockModelJSON `json:"-"`
}

func (*AffectedBlockModel) UnmarshalJSON added in v0.103.0

func (r *AffectedBlockModel) UnmarshalJSON(data []byte) (err error)

type AggregatedCostModel added in v0.103.0

type AggregatedCostModel struct {
	PerPriceCosts []AggregatedCostModelPerPriceCost `json:"per_price_costs,required"`
	// Total costs for the timeframe, excluding any minimums and discounts.
	Subtotal       string    `json:"subtotal,required"`
	TimeframeEnd   time.Time `json:"timeframe_end,required" format:"date-time"`
	TimeframeStart time.Time `json:"timeframe_start,required" format:"date-time"`
	// Total costs for the timeframe, including any minimums and discounts.
	Total string                  `json:"total,required"`
	JSON  aggregatedCostModelJSON `json:"-"`
}

func (*AggregatedCostModel) UnmarshalJSON added in v0.103.0

func (r *AggregatedCostModel) UnmarshalJSON(data []byte) (err error)

type AggregatedCostModelPerPriceCost added in v0.103.0

type AggregatedCostModelPerPriceCost struct {
	// The price object
	Price PriceModel `json:"price,required"`
	// The price the cost is associated with
	PriceID string `json:"price_id,required"`
	// Price's contributions for the timeframe, excluding any minimums and discounts.
	Subtotal string `json:"subtotal,required"`
	// Price's contributions for the timeframe, including minimums and discounts.
	Total string `json:"total,required"`
	// The price's quantity for the timeframe
	Quantity float64                             `json:"quantity,nullable"`
	JSON     aggregatedCostModelPerPriceCostJSON `json:"-"`
}

func (*AggregatedCostModelPerPriceCost) UnmarshalJSON added in v0.103.0

func (r *AggregatedCostModelPerPriceCost) UnmarshalJSON(data []byte) (err error)

type AlertModel added in v0.103.0

type AlertModel struct {
	// Also referred to as alert_id in this documentation.
	ID string `json:"id,required"`
	// The creation time of the resource in Orb.
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// The name of the currency the credit balance or invoice cost is denominated in.
	Currency string `json:"currency,required,nullable"`
	// The customer the alert applies to.
	Customer CustomerMinifiedModel `json:"customer,required,nullable"`
	// Whether the alert is enabled or disabled.
	Enabled bool `json:"enabled,required"`
	// The metric the alert applies to.
	Metric AlertModelMetric `json:"metric,required,nullable"`
	// The plan the alert applies to.
	Plan AlertModelPlan `json:"plan,required,nullable"`
	// The subscription the alert applies to.
	Subscription SubscriptionMinifiedModel `json:"subscription,required,nullable"`
	// The thresholds that define the conditions under which the alert will be
	// triggered.
	Thresholds []ThresholdModel `json:"thresholds,required,nullable"`
	// The type of alert. This must be a valid alert type.
	Type AlertModelType `json:"type,required"`
	JSON alertModelJSON `json:"-"`
}

[Alerts within Orb](/product-catalog/configuring-alerts) monitor spending, usage, or credit balance and trigger webhooks when a threshold is exceeded.

Alerts created through the API can be scoped to either customers or subscriptions.

func (*AlertModel) UnmarshalJSON added in v0.103.0

func (r *AlertModel) UnmarshalJSON(data []byte) (err error)

type AlertModelMetric added in v0.103.0

type AlertModelMetric struct {
	ID   string               `json:"id,required"`
	JSON alertModelMetricJSON `json:"-"`
}

The metric the alert applies to.

func (*AlertModelMetric) UnmarshalJSON added in v0.103.0

func (r *AlertModelMetric) UnmarshalJSON(data []byte) (err error)

type AlertModelPlan added in v0.103.0

type AlertModelPlan struct {
	ID string `json:"id,required,nullable"`
	// An optional user-defined ID for this plan resource, used throughout the system
	// as an alias for this Plan. Use this field to identify a plan by an existing
	// identifier in your system.
	ExternalPlanID string             `json:"external_plan_id,required,nullable"`
	Name           string             `json:"name,required,nullable"`
	PlanVersion    string             `json:"plan_version,required"`
	JSON           alertModelPlanJSON `json:"-"`
}

The plan the alert applies to.

func (*AlertModelPlan) UnmarshalJSON added in v0.103.0

func (r *AlertModelPlan) UnmarshalJSON(data []byte) (err error)

type AlertModelType added in v0.103.0

type AlertModelType string

The type of alert. This must be a valid alert type.

const (
	AlertModelTypeUsageExceeded          AlertModelType = "usage_exceeded"
	AlertModelTypeCostExceeded           AlertModelType = "cost_exceeded"
	AlertModelTypeCreditBalanceDepleted  AlertModelType = "credit_balance_depleted"
	AlertModelTypeCreditBalanceDropped   AlertModelType = "credit_balance_dropped"
	AlertModelTypeCreditBalanceRecovered AlertModelType = "credit_balance_recovered"
)

func (AlertModelType) IsKnown added in v0.103.0

func (r AlertModelType) IsKnown() bool

type AllocationModel added in v0.103.0

type AllocationModel struct {
	AllowsRollover bool                `json:"allows_rollover,required"`
	Currency       string              `json:"currency,required"`
	JSON           allocationModelJSON `json:"-"`
}

func (*AllocationModel) UnmarshalJSON added in v0.103.0

func (r *AllocationModel) UnmarshalJSON(data []byte) (err error)

type AmountDiscount added in v0.67.0

type AmountDiscount struct {
	// Only available if discount_type is `amount`.
	AmountDiscount string `json:"amount_discount,required"`
	// List of price_ids that this discount applies to. For plan/plan phase discounts,
	// this can be a subset of prices.
	AppliesToPriceIDs []string                   `json:"applies_to_price_ids,required"`
	DiscountType      AmountDiscountDiscountType `json:"discount_type,required"`
	Reason            string                     `json:"reason,nullable"`
	JSON              amountDiscountJSON         `json:"-"`
}

func (AmountDiscount) ImplementsCouponModelDiscount added in v0.103.0

func (r AmountDiscount) ImplementsCouponModelDiscount()

func (AmountDiscount) ImplementsDiscount added in v0.89.1

func (r AmountDiscount) ImplementsDiscount()

func (AmountDiscount) ImplementsInvoiceLevelDiscount added in v0.89.1

func (r AmountDiscount) ImplementsInvoiceLevelDiscount()

func (*AmountDiscount) UnmarshalJSON added in v0.67.0

func (r *AmountDiscount) UnmarshalJSON(data []byte) (err error)

type AmountDiscountDiscountType added in v0.67.0

type AmountDiscountDiscountType string
const (
	AmountDiscountDiscountTypeAmount AmountDiscountDiscountType = "amount"
)

func (AmountDiscountDiscountType) IsKnown added in v0.67.0

func (r AmountDiscountDiscountType) IsKnown() bool

type AmountDiscountIntervalModel added in v0.103.0

type AmountDiscountIntervalModel struct {
	// Only available if discount_type is `amount`.
	AmountDiscount string `json:"amount_discount,required"`
	// The price ids that this discount interval applies to.
	AppliesToPriceIDs []string `json:"applies_to_price_ids,required"`
	// The price interval ids that this discount interval applies to.
	AppliesToPriceIntervalIDs []string                                `json:"applies_to_price_interval_ids,required"`
	DiscountType              AmountDiscountIntervalModelDiscountType `json:"discount_type,required"`
	// The end date of the discount interval.
	EndDate time.Time `json:"end_date,required,nullable" format:"date-time"`
	// The start date of the discount interval.
	StartDate time.Time                       `json:"start_date,required" format:"date-time"`
	JSON      amountDiscountIntervalModelJSON `json:"-"`
}

func (AmountDiscountIntervalModel) ImplementsMutatedSubscriptionModelDiscountInterval added in v0.103.0

func (r AmountDiscountIntervalModel) ImplementsMutatedSubscriptionModelDiscountInterval()

func (AmountDiscountIntervalModel) ImplementsSubscriptionModelDiscountInterval added in v0.103.0

func (r AmountDiscountIntervalModel) ImplementsSubscriptionModelDiscountInterval()

func (*AmountDiscountIntervalModel) UnmarshalJSON added in v0.103.0

func (r *AmountDiscountIntervalModel) UnmarshalJSON(data []byte) (err error)

type AmountDiscountIntervalModelDiscountType added in v0.103.0

type AmountDiscountIntervalModelDiscountType string
const (
	AmountDiscountIntervalModelDiscountTypeAmount AmountDiscountIntervalModelDiscountType = "amount"
)

func (AmountDiscountIntervalModelDiscountType) IsKnown added in v0.103.0

type AmountDiscountParam added in v0.67.0

type AmountDiscountParam struct {
	// Only available if discount_type is `amount`.
	AmountDiscount param.Field[string] `json:"amount_discount,required"`
	// List of price_ids that this discount applies to. For plan/plan phase discounts,
	// this can be a subset of prices.
	AppliesToPriceIDs param.Field[[]string]                   `json:"applies_to_price_ids,required"`
	DiscountType      param.Field[AmountDiscountDiscountType] `json:"discount_type,required"`
	Reason            param.Field[string]                     `json:"reason"`
}

func (AmountDiscountParam) ImplementsDiscountUnionParam added in v0.89.1

func (r AmountDiscountParam) ImplementsDiscountUnionParam()

func (AmountDiscountParam) MarshalJSON added in v0.67.0

func (r AmountDiscountParam) MarshalJSON() (data []byte, err error)

type AutoCollectionModel added in v0.103.0

type AutoCollectionModel struct {
	// True only if auto-collection is enabled for this invoice.
	Enabled bool `json:"enabled,required,nullable"`
	// If the invoice is scheduled for auto-collection, this field will reflect when
	// the next attempt will occur. If dunning has been exhausted, or auto-collection
	// is not enabled for this invoice, this field will be `null`.
	NextAttemptAt time.Time `json:"next_attempt_at,required,nullable" format:"date-time"`
	// Number of auto-collection payment attempts.
	NumAttempts int64 `json:"num_attempts,required,nullable"`
	// If Orb has ever attempted payment auto-collection for this invoice, this field
	// will reflect when that attempt occurred. In conjunction with `next_attempt_at`,
	// this can be used to tell whether the invoice is currently in dunning (that is,
	// `previously_attempted_at` is non-null, and `next_attempt_time` is non-null), or
	// if dunning has been exhausted (`previously_attempted_at` is non-null, but
	// `next_attempt_time` is null).
	PreviouslyAttemptedAt time.Time               `json:"previously_attempted_at,required,nullable" format:"date-time"`
	JSON                  autoCollectionModelJSON `json:"-"`
}

func (*AutoCollectionModel) UnmarshalJSON added in v0.103.0

func (r *AutoCollectionModel) UnmarshalJSON(data []byte) (err error)

type BackfillModel added in v0.103.0

type BackfillModel struct {
	ID string `json:"id,required"`
	// If in the future, the time at which the backfill will automatically close. If in
	// the past, the time at which the backfill was closed.
	CloseTime time.Time `json:"close_time,required,nullable" format:"date-time"`
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// The Orb-generated ID of the customer to which this backfill is scoped. If
	// `null`, this backfill is scoped to all customers.
	CustomerID string `json:"customer_id,required,nullable"`
	// The number of events ingested in this backfill.
	EventsIngested int64 `json:"events_ingested,required"`
	// If `true`, existing events in the backfill's timeframe will be replaced with the
	// newly ingested events associated with the backfill. If `false`, newly ingested
	// events will be added to the existing events.
	ReplaceExistingEvents bool `json:"replace_existing_events,required"`
	// The time at which this backfill was reverted.
	RevertedAt time.Time `json:"reverted_at,required,nullable" format:"date-time"`
	// The status of the backfill.
	Status         BackfillModelStatus `json:"status,required"`
	TimeframeEnd   time.Time           `json:"timeframe_end,required" format:"date-time"`
	TimeframeStart time.Time           `json:"timeframe_start,required" format:"date-time"`
	// A boolean
	// [computed property](/extensibility/advanced-metrics#computed-properties) used to
	// filter the set of events to deprecate
	DeprecationFilter string            `json:"deprecation_filter,nullable"`
	JSON              backfillModelJSON `json:"-"`
}

A backfill represents an update to historical usage data, adding or replacing events in a timeframe.

func (*BackfillModel) UnmarshalJSON added in v0.103.0

func (r *BackfillModel) UnmarshalJSON(data []byte) (err error)

type BackfillModelStatus added in v0.103.0

type BackfillModelStatus string

The status of the backfill.

const (
	BackfillModelStatusPending       BackfillModelStatus = "pending"
	BackfillModelStatusReflected     BackfillModelStatus = "reflected"
	BackfillModelStatusPendingRevert BackfillModelStatus = "pending_revert"
	BackfillModelStatusReverted      BackfillModelStatus = "reverted"
)

func (BackfillModelStatus) IsKnown added in v0.103.0

func (r BackfillModelStatus) IsKnown() bool

type BillableMetricModel added in v0.103.0

type BillableMetricModel struct {
	ID          string `json:"id,required"`
	Description string `json:"description,required,nullable"`
	// The Item resource represents a sellable product or good. Items are associated
	// with all line items, billable metrics, and prices and are used for defining
	// external sync behavior for invoices and tax calculation purposes.
	Item ItemModel `json:"item,required"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata map[string]string         `json:"metadata,required"`
	Name     string                    `json:"name,required"`
	Status   BillableMetricModelStatus `json:"status,required"`
	JSON     billableMetricModelJSON   `json:"-"`
}

The Metric resource represents a calculation of a quantity based on events. Metrics are defined by the query that transforms raw usage events into meaningful values for your customers.

func (*BillableMetricModel) UnmarshalJSON added in v0.103.0

func (r *BillableMetricModel) UnmarshalJSON(data []byte) (err error)

type BillableMetricModelStatus added in v0.103.0

type BillableMetricModelStatus string
const (
	BillableMetricModelStatusActive   BillableMetricModelStatus = "active"
	BillableMetricModelStatusDraft    BillableMetricModelStatus = "draft"
	BillableMetricModelStatusArchived BillableMetricModelStatus = "archived"
)

func (BillableMetricModelStatus) IsKnown added in v0.103.0

func (r BillableMetricModelStatus) IsKnown() bool

type BillableMetricSimpleModel added in v0.103.0

type BillableMetricSimpleModel struct {
	ID   string                        `json:"id,required"`
	Name string                        `json:"name,required"`
	JSON billableMetricSimpleModelJSON `json:"-"`
}

func (*BillableMetricSimpleModel) UnmarshalJSON added in v0.103.0

func (r *BillableMetricSimpleModel) UnmarshalJSON(data []byte) (err error)

type BillableMetricTinyModel added in v0.103.0

type BillableMetricTinyModel struct {
	ID   string                      `json:"id,required"`
	JSON billableMetricTinyModelJSON `json:"-"`
}

func (*BillableMetricTinyModel) UnmarshalJSON added in v0.103.0

func (r *BillableMetricTinyModel) UnmarshalJSON(data []byte) (err error)

type BillingCycleAnchorConfigurationModel added in v0.103.0

type BillingCycleAnchorConfigurationModel struct {
	// The day of the month on which the billing cycle is anchored. If the maximum
	// number of days in a month is greater than this value, the last day of the month
	// is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
	// period begins on the 30th.
	Day int64 `json:"day,required"`
	// The month on which the billing cycle is anchored (e.g. a quarterly price
	// anchored in February would have cycles starting February, May, August, and
	// November).
	Month int64 `json:"month,nullable"`
	// The year on which the billing cycle is anchored (e.g. a 2 year billing cycle
	// anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.).
	Year int64                                    `json:"year,nullable"`
	JSON billingCycleAnchorConfigurationModelJSON `json:"-"`
}

func (*BillingCycleAnchorConfigurationModel) UnmarshalJSON added in v0.103.0

func (r *BillingCycleAnchorConfigurationModel) UnmarshalJSON(data []byte) (err error)

type BillingCycleAnchorConfigurationModelParam added in v0.103.0

type BillingCycleAnchorConfigurationModelParam struct {
	// The day of the month on which the billing cycle is anchored. If the maximum
	// number of days in a month is greater than this value, the last day of the month
	// is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
	// period begins on the 30th.
	Day param.Field[int64] `json:"day,required"`
	// The month on which the billing cycle is anchored (e.g. a quarterly price
	// anchored in February would have cycles starting February, May, August, and
	// November).
	Month param.Field[int64] `json:"month"`
	// The year on which the billing cycle is anchored (e.g. a 2 year billing cycle
	// anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.).
	Year param.Field[int64] `json:"year"`
}

func (BillingCycleAnchorConfigurationModelParam) MarshalJSON added in v0.103.0

func (r BillingCycleAnchorConfigurationModelParam) MarshalJSON() (data []byte, err error)

type BillingCycleConfigurationModel added in v0.103.0

type BillingCycleConfigurationModel struct {
	Duration     int64                                      `json:"duration,required"`
	DurationUnit BillingCycleConfigurationModelDurationUnit `json:"duration_unit,required"`
	JSON         billingCycleConfigurationModelJSON         `json:"-"`
}

func (*BillingCycleConfigurationModel) UnmarshalJSON added in v0.103.0

func (r *BillingCycleConfigurationModel) UnmarshalJSON(data []byte) (err error)

type BillingCycleConfigurationModelDurationUnit added in v0.103.0

type BillingCycleConfigurationModelDurationUnit string
const (
	BillingCycleConfigurationModelDurationUnitDay   BillingCycleConfigurationModelDurationUnit = "day"
	BillingCycleConfigurationModelDurationUnitMonth BillingCycleConfigurationModelDurationUnit = "month"
)

func (BillingCycleConfigurationModelDurationUnit) IsKnown added in v0.103.0

type BillingCycleRelativeDate

type BillingCycleRelativeDate string
const (
	BillingCycleRelativeDateStartOfTerm BillingCycleRelativeDate = "start_of_term"
	BillingCycleRelativeDateEndOfTerm   BillingCycleRelativeDate = "end_of_term"
)

func (BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsAddAdjustmentsEndDateUnion added in v0.37.1

func (r BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsAddAdjustmentsEndDateUnion()

func (BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsAddAdjustmentsStartDateUnion added in v0.37.1

func (r BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsAddAdjustmentsStartDateUnion()

func (BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsAddEndDateUnion added in v0.37.1

func (r BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsAddEndDateUnion()

func (BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsAddStartDateUnion added in v0.37.1

func (r BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsAddStartDateUnion()

func (BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsEditAdjustmentsEndDateUnion added in v0.37.1

func (r BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsEditAdjustmentsEndDateUnion()

func (BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsEditAdjustmentsStartDateUnion added in v0.37.1

func (r BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsEditAdjustmentsStartDateUnion()

func (BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsEditEndDateUnion added in v0.37.1

func (r BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsEditEndDateUnion()

func (BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsEditStartDateUnion added in v0.37.1

func (r BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsEditStartDateUnion()

func (BillingCycleRelativeDate) IsKnown

func (r BillingCycleRelativeDate) IsKnown() bool

type BpsConfigModel added in v0.103.0

type BpsConfigModel struct {
	// Basis point take rate per event
	Bps float64 `json:"bps,required"`
	// Optional currency amount maximum to cap spend per event
	PerUnitMaximum string             `json:"per_unit_maximum,nullable"`
	JSON           bpsConfigModelJSON `json:"-"`
}

func (*BpsConfigModel) UnmarshalJSON added in v0.103.0

func (r *BpsConfigModel) UnmarshalJSON(data []byte) (err error)

type BpsConfigModelParam added in v0.103.0

type BpsConfigModelParam struct {
	// Basis point take rate per event
	Bps param.Field[float64] `json:"bps,required"`
	// Optional currency amount maximum to cap spend per event
	PerUnitMaximum param.Field[string] `json:"per_unit_maximum"`
}

func (BpsConfigModelParam) MarshalJSON added in v0.103.0

func (r BpsConfigModelParam) MarshalJSON() (data []byte, err error)

type BulkBpsConfigModel added in v0.103.0

type BulkBpsConfigModel struct {
	// Tiers for a bulk BPS pricing model where all usage is aggregated to a single
	// tier based on total volume
	Tiers []BulkBpsConfigModelTier `json:"tiers,required"`
	JSON  bulkBpsConfigModelJSON   `json:"-"`
}

func (*BulkBpsConfigModel) UnmarshalJSON added in v0.103.0

func (r *BulkBpsConfigModel) UnmarshalJSON(data []byte) (err error)

type BulkBpsConfigModelParam added in v0.103.0

type BulkBpsConfigModelParam struct {
	// Tiers for a bulk BPS pricing model where all usage is aggregated to a single
	// tier based on total volume
	Tiers param.Field[[]BulkBpsConfigModelTierParam] `json:"tiers,required"`
}

func (BulkBpsConfigModelParam) MarshalJSON added in v0.103.0

func (r BulkBpsConfigModelParam) MarshalJSON() (data []byte, err error)

type BulkBpsConfigModelTier added in v0.103.0

type BulkBpsConfigModelTier struct {
	// Basis points to rate on
	Bps float64 `json:"bps,required"`
	// Upper bound for tier
	MaximumAmount string `json:"maximum_amount,nullable"`
	// The maximum amount to charge for any one event
	PerUnitMaximum string                     `json:"per_unit_maximum,nullable"`
	JSON           bulkBpsConfigModelTierJSON `json:"-"`
}

func (*BulkBpsConfigModelTier) UnmarshalJSON added in v0.103.0

func (r *BulkBpsConfigModelTier) UnmarshalJSON(data []byte) (err error)

type BulkBpsConfigModelTierParam added in v0.103.0

type BulkBpsConfigModelTierParam struct {
	// Basis points to rate on
	Bps param.Field[float64] `json:"bps,required"`
	// Upper bound for tier
	MaximumAmount param.Field[string] `json:"maximum_amount"`
	// The maximum amount to charge for any one event
	PerUnitMaximum param.Field[string] `json:"per_unit_maximum"`
}

func (BulkBpsConfigModelTierParam) MarshalJSON added in v0.103.0

func (r BulkBpsConfigModelTierParam) MarshalJSON() (data []byte, err error)

type BulkConfigModel added in v0.103.0

type BulkConfigModel struct {
	// Bulk tiers for rating based on total usage volume
	Tiers []BulkConfigModelTier `json:"tiers,required"`
	JSON  bulkConfigModelJSON   `json:"-"`
}

func (*BulkConfigModel) UnmarshalJSON added in v0.103.0

func (r *BulkConfigModel) UnmarshalJSON(data []byte) (err error)

type BulkConfigModelParam added in v0.103.0

type BulkConfigModelParam struct {
	// Bulk tiers for rating based on total usage volume
	Tiers param.Field[[]BulkConfigModelTierParam] `json:"tiers,required"`
}

func (BulkConfigModelParam) MarshalJSON added in v0.103.0

func (r BulkConfigModelParam) MarshalJSON() (data []byte, err error)

type BulkConfigModelTier added in v0.103.0

type BulkConfigModelTier struct {
	// Amount per unit
	UnitAmount string `json:"unit_amount,required"`
	// Upper bound for this tier
	MaximumUnits float64                 `json:"maximum_units,nullable"`
	JSON         bulkConfigModelTierJSON `json:"-"`
}

func (*BulkConfigModelTier) UnmarshalJSON added in v0.103.0

func (r *BulkConfigModelTier) UnmarshalJSON(data []byte) (err error)

type BulkConfigModelTierParam added in v0.103.0

type BulkConfigModelTierParam struct {
	// Amount per unit
	UnitAmount param.Field[string] `json:"unit_amount,required"`
	// Upper bound for this tier
	MaximumUnits param.Field[float64] `json:"maximum_units"`
}

func (BulkConfigModelTierParam) MarshalJSON added in v0.103.0

func (r BulkConfigModelTierParam) MarshalJSON() (data []byte, err error)

type CouponModel added in v0.103.0

type CouponModel struct {
	// Also referred to as coupon_id in this documentation.
	ID string `json:"id,required"`
	// An archived coupon can no longer be redeemed. Active coupons will have a value
	// of null for `archived_at`; this field will be non-null for archived coupons.
	ArchivedAt time.Time           `json:"archived_at,required,nullable" format:"date-time"`
	Discount   CouponModelDiscount `json:"discount,required"`
	// This allows for a coupon's discount to apply for a limited time (determined in
	// months); a `null` value here means "unlimited time".
	DurationInMonths int64 `json:"duration_in_months,required,nullable"`
	// The maximum number of redemptions allowed for this coupon before it is
	// exhausted; `null` here means "unlimited".
	MaxRedemptions int64 `json:"max_redemptions,required,nullable"`
	// This string can be used to redeem this coupon for a given subscription.
	RedemptionCode string `json:"redemption_code,required"`
	// The number of times this coupon has been redeemed.
	TimesRedeemed int64           `json:"times_redeemed,required"`
	JSON          couponModelJSON `json:"-"`
}

A coupon represents a reusable discount configuration that can be applied either as a fixed or percentage amount to an invoice or subscription. Coupons are activated using a redemption code, which applies the discount to a subscription or invoice. The duration of a coupon determines how long it remains available for use by end users.

func (*CouponModel) UnmarshalJSON added in v0.103.0

func (r *CouponModel) UnmarshalJSON(data []byte) (err error)

type CouponModelDiscount added in v0.103.0

type CouponModelDiscount struct {
	// This field can have the runtime type of [[]string].
	AppliesToPriceIDs interface{}                     `json:"applies_to_price_ids,required"`
	DiscountType      CouponModelDiscountDiscountType `json:"discount_type,required"`
	// Only available if discount_type is `amount`.
	AmountDiscount string `json:"amount_discount"`
	// Only available if discount_type is `percentage`. This is a number between 0
	// and 1.
	PercentageDiscount float64                 `json:"percentage_discount"`
	Reason             string                  `json:"reason,nullable"`
	JSON               couponModelDiscountJSON `json:"-"`
	// contains filtered or unexported fields
}

func (CouponModelDiscount) AsUnion added in v0.103.0

AsUnion returns a CouponModelDiscountUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are shared.PercentageDiscount, shared.AmountDiscount.

func (*CouponModelDiscount) UnmarshalJSON added in v0.103.0

func (r *CouponModelDiscount) UnmarshalJSON(data []byte) (err error)

type CouponModelDiscountDiscountType added in v0.103.0

type CouponModelDiscountDiscountType string
const (
	CouponModelDiscountDiscountTypePercentage CouponModelDiscountDiscountType = "percentage"
	CouponModelDiscountDiscountTypeAmount     CouponModelDiscountDiscountType = "amount"
)

func (CouponModelDiscountDiscountType) IsKnown added in v0.103.0

type CouponModelDiscountUnion added in v0.103.0

type CouponModelDiscountUnion interface {
	ImplementsCouponModelDiscount()
}

Union satisfied by shared.PercentageDiscount or shared.AmountDiscount.

type CouponRedemptionModel added in v0.103.0

type CouponRedemptionModel struct {
	CouponID  string                    `json:"coupon_id,required"`
	EndDate   time.Time                 `json:"end_date,required,nullable" format:"date-time"`
	StartDate time.Time                 `json:"start_date,required" format:"date-time"`
	JSON      couponRedemptionModelJSON `json:"-"`
}

func (*CouponRedemptionModel) UnmarshalJSON added in v0.103.0

func (r *CouponRedemptionModel) UnmarshalJSON(data []byte) (err error)

type CreditLedgerEntriesModel added in v0.103.0

type CreditLedgerEntriesModel struct {
	Data               []CreditLedgerEntryModel     `json:"data,required"`
	PaginationMetadata PaginationMetadata           `json:"pagination_metadata,required"`
	JSON               creditLedgerEntriesModelJSON `json:"-"`
}

func (*CreditLedgerEntriesModel) UnmarshalJSON added in v0.103.0

func (r *CreditLedgerEntriesModel) UnmarshalJSON(data []byte) (err error)

type CreditLedgerEntryModel added in v0.103.0

type CreditLedgerEntryModel struct {
	ID                   string                            `json:"id,required"`
	Amount               float64                           `json:"amount,required"`
	CreatedAt            time.Time                         `json:"created_at,required" format:"date-time"`
	CreditBlock          AffectedBlockModel                `json:"credit_block,required"`
	Currency             string                            `json:"currency,required"`
	Customer             CustomerMinifiedModel             `json:"customer,required"`
	Description          string                            `json:"description,required,nullable"`
	EndingBalance        float64                           `json:"ending_balance,required"`
	EntryStatus          CreditLedgerEntryModelEntryStatus `json:"entry_status,required"`
	EntryType            CreditLedgerEntryModelEntryType   `json:"entry_type,required"`
	LedgerSequenceNumber int64                             `json:"ledger_sequence_number,required"`
	// This field can have the runtime type of [map[string]string].
	Metadata           interface{}                `json:"metadata,required"`
	StartingBalance    float64                    `json:"starting_balance,required"`
	EventID            string                     `json:"event_id,nullable"`
	InvoiceID          string                     `json:"invoice_id,nullable"`
	NewBlockExpiryDate time.Time                  `json:"new_block_expiry_date,nullable" format:"date-time"`
	PriceID            string                     `json:"price_id,nullable"`
	VoidAmount         float64                    `json:"void_amount"`
	VoidReason         string                     `json:"void_reason,nullable"`
	JSON               creditLedgerEntryModelJSON `json:"-"`
	// contains filtered or unexported fields
}

The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid credits within Orb.

func (*CreditLedgerEntryModel) UnmarshalJSON added in v0.103.0

func (r *CreditLedgerEntryModel) UnmarshalJSON(data []byte) (err error)

type CreditLedgerEntryModelAmendmentLedgerEntry added in v0.103.0

type CreditLedgerEntryModelAmendmentLedgerEntry struct {
	ID                   string                                                `json:"id,required"`
	Amount               float64                                               `json:"amount,required"`
	CreatedAt            time.Time                                             `json:"created_at,required" format:"date-time"`
	CreditBlock          AffectedBlockModel                                    `json:"credit_block,required"`
	Currency             string                                                `json:"currency,required"`
	Customer             CustomerMinifiedModel                                 `json:"customer,required"`
	Description          string                                                `json:"description,required,nullable"`
	EndingBalance        float64                                               `json:"ending_balance,required"`
	EntryStatus          CreditLedgerEntryModelAmendmentLedgerEntryEntryStatus `json:"entry_status,required"`
	EntryType            CreditLedgerEntryModelAmendmentLedgerEntryEntryType   `json:"entry_type,required"`
	LedgerSequenceNumber int64                                                 `json:"ledger_sequence_number,required"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata        map[string]string                              `json:"metadata,required"`
	StartingBalance float64                                        `json:"starting_balance,required"`
	JSON            creditLedgerEntryModelAmendmentLedgerEntryJSON `json:"-"`
}

func (*CreditLedgerEntryModelAmendmentLedgerEntry) UnmarshalJSON added in v0.103.0

func (r *CreditLedgerEntryModelAmendmentLedgerEntry) UnmarshalJSON(data []byte) (err error)

type CreditLedgerEntryModelAmendmentLedgerEntryEntryStatus added in v0.103.0

type CreditLedgerEntryModelAmendmentLedgerEntryEntryStatus string
const (
	CreditLedgerEntryModelAmendmentLedgerEntryEntryStatusCommitted CreditLedgerEntryModelAmendmentLedgerEntryEntryStatus = "committed"
	CreditLedgerEntryModelAmendmentLedgerEntryEntryStatusPending   CreditLedgerEntryModelAmendmentLedgerEntryEntryStatus = "pending"
)

func (CreditLedgerEntryModelAmendmentLedgerEntryEntryStatus) IsKnown added in v0.103.0

type CreditLedgerEntryModelAmendmentLedgerEntryEntryType added in v0.103.0

type CreditLedgerEntryModelAmendmentLedgerEntryEntryType string
const (
	CreditLedgerEntryModelAmendmentLedgerEntryEntryTypeAmendment CreditLedgerEntryModelAmendmentLedgerEntryEntryType = "amendment"
)

func (CreditLedgerEntryModelAmendmentLedgerEntryEntryType) IsKnown added in v0.103.0

type CreditLedgerEntryModelCreditBlockExpiryLedgerEntry added in v0.103.0

type CreditLedgerEntryModelCreditBlockExpiryLedgerEntry struct {
	ID                   string                                                        `json:"id,required"`
	Amount               float64                                                       `json:"amount,required"`
	CreatedAt            time.Time                                                     `json:"created_at,required" format:"date-time"`
	CreditBlock          AffectedBlockModel                                            `json:"credit_block,required"`
	Currency             string                                                        `json:"currency,required"`
	Customer             CustomerMinifiedModel                                         `json:"customer,required"`
	Description          string                                                        `json:"description,required,nullable"`
	EndingBalance        float64                                                       `json:"ending_balance,required"`
	EntryStatus          CreditLedgerEntryModelCreditBlockExpiryLedgerEntryEntryStatus `json:"entry_status,required"`
	EntryType            CreditLedgerEntryModelCreditBlockExpiryLedgerEntryEntryType   `json:"entry_type,required"`
	LedgerSequenceNumber int64                                                         `json:"ledger_sequence_number,required"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata        map[string]string                                      `json:"metadata,required"`
	StartingBalance float64                                                `json:"starting_balance,required"`
	JSON            creditLedgerEntryModelCreditBlockExpiryLedgerEntryJSON `json:"-"`
}

func (*CreditLedgerEntryModelCreditBlockExpiryLedgerEntry) UnmarshalJSON added in v0.103.0

func (r *CreditLedgerEntryModelCreditBlockExpiryLedgerEntry) UnmarshalJSON(data []byte) (err error)

type CreditLedgerEntryModelCreditBlockExpiryLedgerEntryEntryStatus added in v0.103.0

type CreditLedgerEntryModelCreditBlockExpiryLedgerEntryEntryStatus string
const (
	CreditLedgerEntryModelCreditBlockExpiryLedgerEntryEntryStatusCommitted CreditLedgerEntryModelCreditBlockExpiryLedgerEntryEntryStatus = "committed"
	CreditLedgerEntryModelCreditBlockExpiryLedgerEntryEntryStatusPending   CreditLedgerEntryModelCreditBlockExpiryLedgerEntryEntryStatus = "pending"
)

func (CreditLedgerEntryModelCreditBlockExpiryLedgerEntryEntryStatus) IsKnown added in v0.103.0

type CreditLedgerEntryModelCreditBlockExpiryLedgerEntryEntryType added in v0.103.0

type CreditLedgerEntryModelCreditBlockExpiryLedgerEntryEntryType string
const (
	CreditLedgerEntryModelCreditBlockExpiryLedgerEntryEntryTypeCreditBlockExpiry CreditLedgerEntryModelCreditBlockExpiryLedgerEntryEntryType = "credit_block_expiry"
)

func (CreditLedgerEntryModelCreditBlockExpiryLedgerEntryEntryType) IsKnown added in v0.103.0

type CreditLedgerEntryModelDecrementLedgerEntry added in v0.103.0

type CreditLedgerEntryModelDecrementLedgerEntry struct {
	ID                   string                                                `json:"id,required"`
	Amount               float64                                               `json:"amount,required"`
	CreatedAt            time.Time                                             `json:"created_at,required" format:"date-time"`
	CreditBlock          AffectedBlockModel                                    `json:"credit_block,required"`
	Currency             string                                                `json:"currency,required"`
	Customer             CustomerMinifiedModel                                 `json:"customer,required"`
	Description          string                                                `json:"description,required,nullable"`
	EndingBalance        float64                                               `json:"ending_balance,required"`
	EntryStatus          CreditLedgerEntryModelDecrementLedgerEntryEntryStatus `json:"entry_status,required"`
	EntryType            CreditLedgerEntryModelDecrementLedgerEntryEntryType   `json:"entry_type,required"`
	LedgerSequenceNumber int64                                                 `json:"ledger_sequence_number,required"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata        map[string]string                              `json:"metadata,required"`
	StartingBalance float64                                        `json:"starting_balance,required"`
	EventID         string                                         `json:"event_id,nullable"`
	InvoiceID       string                                         `json:"invoice_id,nullable"`
	PriceID         string                                         `json:"price_id,nullable"`
	JSON            creditLedgerEntryModelDecrementLedgerEntryJSON `json:"-"`
}

func (*CreditLedgerEntryModelDecrementLedgerEntry) UnmarshalJSON added in v0.103.0

func (r *CreditLedgerEntryModelDecrementLedgerEntry) UnmarshalJSON(data []byte) (err error)

type CreditLedgerEntryModelDecrementLedgerEntryEntryStatus added in v0.103.0

type CreditLedgerEntryModelDecrementLedgerEntryEntryStatus string
const (
	CreditLedgerEntryModelDecrementLedgerEntryEntryStatusCommitted CreditLedgerEntryModelDecrementLedgerEntryEntryStatus = "committed"
	CreditLedgerEntryModelDecrementLedgerEntryEntryStatusPending   CreditLedgerEntryModelDecrementLedgerEntryEntryStatus = "pending"
)

func (CreditLedgerEntryModelDecrementLedgerEntryEntryStatus) IsKnown added in v0.103.0

type CreditLedgerEntryModelDecrementLedgerEntryEntryType added in v0.103.0

type CreditLedgerEntryModelDecrementLedgerEntryEntryType string
const (
	CreditLedgerEntryModelDecrementLedgerEntryEntryTypeDecrement CreditLedgerEntryModelDecrementLedgerEntryEntryType = "decrement"
)

func (CreditLedgerEntryModelDecrementLedgerEntryEntryType) IsKnown added in v0.103.0

type CreditLedgerEntryModelEntryStatus added in v0.103.0

type CreditLedgerEntryModelEntryStatus string
const (
	CreditLedgerEntryModelEntryStatusCommitted CreditLedgerEntryModelEntryStatus = "committed"
	CreditLedgerEntryModelEntryStatusPending   CreditLedgerEntryModelEntryStatus = "pending"
)

func (CreditLedgerEntryModelEntryStatus) IsKnown added in v0.103.0

type CreditLedgerEntryModelEntryType added in v0.103.0

type CreditLedgerEntryModelEntryType string
const (
	CreditLedgerEntryModelEntryTypeIncrement         CreditLedgerEntryModelEntryType = "increment"
	CreditLedgerEntryModelEntryTypeDecrement         CreditLedgerEntryModelEntryType = "decrement"
	CreditLedgerEntryModelEntryTypeExpirationChange  CreditLedgerEntryModelEntryType = "expiration_change"
	CreditLedgerEntryModelEntryTypeCreditBlockExpiry CreditLedgerEntryModelEntryType = "credit_block_expiry"
	CreditLedgerEntryModelEntryTypeVoid              CreditLedgerEntryModelEntryType = "void"
	CreditLedgerEntryModelEntryTypeVoidInitiated     CreditLedgerEntryModelEntryType = "void_initiated"
	CreditLedgerEntryModelEntryTypeAmendment         CreditLedgerEntryModelEntryType = "amendment"
)

func (CreditLedgerEntryModelEntryType) IsKnown added in v0.103.0

type CreditLedgerEntryModelExpirationChangeLedgerEntry added in v0.103.0

type CreditLedgerEntryModelExpirationChangeLedgerEntry struct {
	ID                   string                                                       `json:"id,required"`
	Amount               float64                                                      `json:"amount,required"`
	CreatedAt            time.Time                                                    `json:"created_at,required" format:"date-time"`
	CreditBlock          AffectedBlockModel                                           `json:"credit_block,required"`
	Currency             string                                                       `json:"currency,required"`
	Customer             CustomerMinifiedModel                                        `json:"customer,required"`
	Description          string                                                       `json:"description,required,nullable"`
	EndingBalance        float64                                                      `json:"ending_balance,required"`
	EntryStatus          CreditLedgerEntryModelExpirationChangeLedgerEntryEntryStatus `json:"entry_status,required"`
	EntryType            CreditLedgerEntryModelExpirationChangeLedgerEntryEntryType   `json:"entry_type,required"`
	LedgerSequenceNumber int64                                                        `json:"ledger_sequence_number,required"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata           map[string]string                                     `json:"metadata,required"`
	NewBlockExpiryDate time.Time                                             `json:"new_block_expiry_date,required,nullable" format:"date-time"`
	StartingBalance    float64                                               `json:"starting_balance,required"`
	JSON               creditLedgerEntryModelExpirationChangeLedgerEntryJSON `json:"-"`
}

func (*CreditLedgerEntryModelExpirationChangeLedgerEntry) UnmarshalJSON added in v0.103.0

func (r *CreditLedgerEntryModelExpirationChangeLedgerEntry) UnmarshalJSON(data []byte) (err error)

type CreditLedgerEntryModelExpirationChangeLedgerEntryEntryStatus added in v0.103.0

type CreditLedgerEntryModelExpirationChangeLedgerEntryEntryStatus string
const (
	CreditLedgerEntryModelExpirationChangeLedgerEntryEntryStatusCommitted CreditLedgerEntryModelExpirationChangeLedgerEntryEntryStatus = "committed"
	CreditLedgerEntryModelExpirationChangeLedgerEntryEntryStatusPending   CreditLedgerEntryModelExpirationChangeLedgerEntryEntryStatus = "pending"
)

func (CreditLedgerEntryModelExpirationChangeLedgerEntryEntryStatus) IsKnown added in v0.103.0

type CreditLedgerEntryModelExpirationChangeLedgerEntryEntryType added in v0.103.0

type CreditLedgerEntryModelExpirationChangeLedgerEntryEntryType string
const (
	CreditLedgerEntryModelExpirationChangeLedgerEntryEntryTypeExpirationChange CreditLedgerEntryModelExpirationChangeLedgerEntryEntryType = "expiration_change"
)

func (CreditLedgerEntryModelExpirationChangeLedgerEntryEntryType) IsKnown added in v0.103.0

type CreditLedgerEntryModelIncrementLedgerEntry added in v0.103.0

type CreditLedgerEntryModelIncrementLedgerEntry struct {
	ID                   string                                                `json:"id,required"`
	Amount               float64                                               `json:"amount,required"`
	CreatedAt            time.Time                                             `json:"created_at,required" format:"date-time"`
	CreditBlock          AffectedBlockModel                                    `json:"credit_block,required"`
	Currency             string                                                `json:"currency,required"`
	Customer             CustomerMinifiedModel                                 `json:"customer,required"`
	Description          string                                                `json:"description,required,nullable"`
	EndingBalance        float64                                               `json:"ending_balance,required"`
	EntryStatus          CreditLedgerEntryModelIncrementLedgerEntryEntryStatus `json:"entry_status,required"`
	EntryType            CreditLedgerEntryModelIncrementLedgerEntryEntryType   `json:"entry_type,required"`
	LedgerSequenceNumber int64                                                 `json:"ledger_sequence_number,required"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata        map[string]string                              `json:"metadata,required"`
	StartingBalance float64                                        `json:"starting_balance,required"`
	JSON            creditLedgerEntryModelIncrementLedgerEntryJSON `json:"-"`
}

func (*CreditLedgerEntryModelIncrementLedgerEntry) UnmarshalJSON added in v0.103.0

func (r *CreditLedgerEntryModelIncrementLedgerEntry) UnmarshalJSON(data []byte) (err error)

type CreditLedgerEntryModelIncrementLedgerEntryEntryStatus added in v0.103.0

type CreditLedgerEntryModelIncrementLedgerEntryEntryStatus string
const (
	CreditLedgerEntryModelIncrementLedgerEntryEntryStatusCommitted CreditLedgerEntryModelIncrementLedgerEntryEntryStatus = "committed"
	CreditLedgerEntryModelIncrementLedgerEntryEntryStatusPending   CreditLedgerEntryModelIncrementLedgerEntryEntryStatus = "pending"
)

func (CreditLedgerEntryModelIncrementLedgerEntryEntryStatus) IsKnown added in v0.103.0

type CreditLedgerEntryModelIncrementLedgerEntryEntryType added in v0.103.0

type CreditLedgerEntryModelIncrementLedgerEntryEntryType string
const (
	CreditLedgerEntryModelIncrementLedgerEntryEntryTypeIncrement CreditLedgerEntryModelIncrementLedgerEntryEntryType = "increment"
)

func (CreditLedgerEntryModelIncrementLedgerEntryEntryType) IsKnown added in v0.103.0

type CreditLedgerEntryModelVoidInitiatedLedgerEntry added in v0.103.0

type CreditLedgerEntryModelVoidInitiatedLedgerEntry struct {
	ID                   string                                                    `json:"id,required"`
	Amount               float64                                                   `json:"amount,required"`
	CreatedAt            time.Time                                                 `json:"created_at,required" format:"date-time"`
	CreditBlock          AffectedBlockModel                                        `json:"credit_block,required"`
	Currency             string                                                    `json:"currency,required"`
	Customer             CustomerMinifiedModel                                     `json:"customer,required"`
	Description          string                                                    `json:"description,required,nullable"`
	EndingBalance        float64                                                   `json:"ending_balance,required"`
	EntryStatus          CreditLedgerEntryModelVoidInitiatedLedgerEntryEntryStatus `json:"entry_status,required"`
	EntryType            CreditLedgerEntryModelVoidInitiatedLedgerEntryEntryType   `json:"entry_type,required"`
	LedgerSequenceNumber int64                                                     `json:"ledger_sequence_number,required"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata           map[string]string                                  `json:"metadata,required"`
	NewBlockExpiryDate time.Time                                          `json:"new_block_expiry_date,required" format:"date-time"`
	StartingBalance    float64                                            `json:"starting_balance,required"`
	VoidAmount         float64                                            `json:"void_amount,required"`
	VoidReason         string                                             `json:"void_reason,required,nullable"`
	JSON               creditLedgerEntryModelVoidInitiatedLedgerEntryJSON `json:"-"`
}

func (*CreditLedgerEntryModelVoidInitiatedLedgerEntry) UnmarshalJSON added in v0.103.0

func (r *CreditLedgerEntryModelVoidInitiatedLedgerEntry) UnmarshalJSON(data []byte) (err error)

type CreditLedgerEntryModelVoidInitiatedLedgerEntryEntryStatus added in v0.103.0

type CreditLedgerEntryModelVoidInitiatedLedgerEntryEntryStatus string
const (
	CreditLedgerEntryModelVoidInitiatedLedgerEntryEntryStatusCommitted CreditLedgerEntryModelVoidInitiatedLedgerEntryEntryStatus = "committed"
	CreditLedgerEntryModelVoidInitiatedLedgerEntryEntryStatusPending   CreditLedgerEntryModelVoidInitiatedLedgerEntryEntryStatus = "pending"
)

func (CreditLedgerEntryModelVoidInitiatedLedgerEntryEntryStatus) IsKnown added in v0.103.0

type CreditLedgerEntryModelVoidInitiatedLedgerEntryEntryType added in v0.103.0

type CreditLedgerEntryModelVoidInitiatedLedgerEntryEntryType string
const (
	CreditLedgerEntryModelVoidInitiatedLedgerEntryEntryTypeVoidInitiated CreditLedgerEntryModelVoidInitiatedLedgerEntryEntryType = "void_initiated"
)

func (CreditLedgerEntryModelVoidInitiatedLedgerEntryEntryType) IsKnown added in v0.103.0

type CreditLedgerEntryModelVoidLedgerEntry added in v0.103.0

type CreditLedgerEntryModelVoidLedgerEntry struct {
	ID                   string                                           `json:"id,required"`
	Amount               float64                                          `json:"amount,required"`
	CreatedAt            time.Time                                        `json:"created_at,required" format:"date-time"`
	CreditBlock          AffectedBlockModel                               `json:"credit_block,required"`
	Currency             string                                           `json:"currency,required"`
	Customer             CustomerMinifiedModel                            `json:"customer,required"`
	Description          string                                           `json:"description,required,nullable"`
	EndingBalance        float64                                          `json:"ending_balance,required"`
	EntryStatus          CreditLedgerEntryModelVoidLedgerEntryEntryStatus `json:"entry_status,required"`
	EntryType            CreditLedgerEntryModelVoidLedgerEntryEntryType   `json:"entry_type,required"`
	LedgerSequenceNumber int64                                            `json:"ledger_sequence_number,required"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata        map[string]string                         `json:"metadata,required"`
	StartingBalance float64                                   `json:"starting_balance,required"`
	VoidAmount      float64                                   `json:"void_amount,required"`
	VoidReason      string                                    `json:"void_reason,required,nullable"`
	JSON            creditLedgerEntryModelVoidLedgerEntryJSON `json:"-"`
}

func (*CreditLedgerEntryModelVoidLedgerEntry) UnmarshalJSON added in v0.103.0

func (r *CreditLedgerEntryModelVoidLedgerEntry) UnmarshalJSON(data []byte) (err error)

type CreditLedgerEntryModelVoidLedgerEntryEntryStatus added in v0.103.0

type CreditLedgerEntryModelVoidLedgerEntryEntryStatus string
const (
	CreditLedgerEntryModelVoidLedgerEntryEntryStatusCommitted CreditLedgerEntryModelVoidLedgerEntryEntryStatus = "committed"
	CreditLedgerEntryModelVoidLedgerEntryEntryStatusPending   CreditLedgerEntryModelVoidLedgerEntryEntryStatus = "pending"
)

func (CreditLedgerEntryModelVoidLedgerEntryEntryStatus) IsKnown added in v0.103.0

type CreditLedgerEntryModelVoidLedgerEntryEntryType added in v0.103.0

type CreditLedgerEntryModelVoidLedgerEntryEntryType string
const (
	CreditLedgerEntryModelVoidLedgerEntryEntryTypeVoid CreditLedgerEntryModelVoidLedgerEntryEntryType = "void"
)

func (CreditLedgerEntryModelVoidLedgerEntryEntryType) IsKnown added in v0.103.0

type CreditNoteDiscountModel added in v0.103.0

type CreditNoteDiscountModel struct {
	AmountApplied      string                                  `json:"amount_applied,required"`
	DiscountType       CreditNoteDiscountModelDiscountType     `json:"discount_type,required"`
	PercentageDiscount float64                                 `json:"percentage_discount,required"`
	AppliesToPrices    []CreditNoteDiscountModelAppliesToPrice `json:"applies_to_prices,nullable"`
	Reason             string                                  `json:"reason,nullable"`
	JSON               creditNoteDiscountModelJSON             `json:"-"`
}

func (*CreditNoteDiscountModel) UnmarshalJSON added in v0.103.0

func (r *CreditNoteDiscountModel) UnmarshalJSON(data []byte) (err error)

type CreditNoteDiscountModelAppliesToPrice added in v0.103.0

type CreditNoteDiscountModelAppliesToPrice struct {
	ID   string                                    `json:"id,required"`
	Name string                                    `json:"name,required"`
	JSON creditNoteDiscountModelAppliesToPriceJSON `json:"-"`
}

func (*CreditNoteDiscountModelAppliesToPrice) UnmarshalJSON added in v0.103.0

func (r *CreditNoteDiscountModelAppliesToPrice) UnmarshalJSON(data []byte) (err error)

type CreditNoteDiscountModelDiscountType added in v0.103.0

type CreditNoteDiscountModelDiscountType string
const (
	CreditNoteDiscountModelDiscountTypePercentage CreditNoteDiscountModelDiscountType = "percentage"
)

func (CreditNoteDiscountModelDiscountType) IsKnown added in v0.103.0

type CreditNoteModel added in v0.103.0

type CreditNoteModel struct {
	// The Orb id of this credit note.
	ID string `json:"id,required"`
	// The creation time of the resource in Orb.
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// The unique identifier for credit notes.
	CreditNoteNumber string `json:"credit_note_number,required"`
	// A URL to a PDF of the credit note.
	CreditNotePdf string                `json:"credit_note_pdf,required,nullable"`
	Customer      CustomerMinifiedModel `json:"customer,required"`
	// The id of the invoice resource that this credit note is applied to.
	InvoiceID string `json:"invoice_id,required"`
	// All of the line items associated with this credit note.
	LineItems []CreditNoteModelLineItem `json:"line_items,required"`
	// The maximum amount applied on the original invoice
	MaximumAmountAdjustment CreditNoteDiscountModel `json:"maximum_amount_adjustment,required,nullable"`
	// An optional memo supplied on the credit note.
	Memo string `json:"memo,required,nullable"`
	// Any credited amount from the applied minimum on the invoice.
	MinimumAmountRefunded string                `json:"minimum_amount_refunded,required,nullable"`
	Reason                CreditNoteModelReason `json:"reason,required,nullable"`
	// The total prior to any creditable invoice-level discounts or minimums.
	Subtotal string `json:"subtotal,required"`
	// The total including creditable invoice-level discounts or minimums, and tax.
	Total string              `json:"total,required"`
	Type  CreditNoteModelType `json:"type,required"`
	// The time at which the credit note was voided in Orb, if applicable.
	VoidedAt time.Time `json:"voided_at,required,nullable" format:"date-time"`
	// Any discounts applied on the original invoice.
	Discounts []CreditNoteDiscountModel `json:"discounts"`
	JSON      creditNoteModelJSON       `json:"-"`
}

The [Credit Note](/invoicing/credit-notes) resource represents a credit that has been applied to a particular invoice.

func (*CreditNoteModel) UnmarshalJSON added in v0.103.0

func (r *CreditNoteModel) UnmarshalJSON(data []byte) (err error)

type CreditNoteModelLineItem added in v0.103.0

type CreditNoteModelLineItem struct {
	// The Orb id of this resource.
	ID string `json:"id,required"`
	// The amount of the line item, including any line item minimums and discounts.
	Amount string `json:"amount,required"`
	// The id of the item associated with this line item.
	ItemID string `json:"item_id,required"`
	// The name of the corresponding invoice line item.
	Name string `json:"name,required"`
	// An optional quantity credited.
	Quantity float64 `json:"quantity,required,nullable"`
	// The amount of the line item, excluding any line item minimums and discounts.
	Subtotal string `json:"subtotal,required"`
	// Any tax amounts applied onto the line item.
	TaxAmounts []TaxAmountModel `json:"tax_amounts,required"`
	// Any line item discounts from the invoice's line item.
	Discounts []CreditNoteModelLineItemsDiscount `json:"discounts"`
	JSON      creditNoteModelLineItemJSON        `json:"-"`
}

func (*CreditNoteModelLineItem) UnmarshalJSON added in v0.103.0

func (r *CreditNoteModelLineItem) UnmarshalJSON(data []byte) (err error)

type CreditNoteModelLineItemsDiscount added in v0.103.0

type CreditNoteModelLineItemsDiscount struct {
	ID                 string                                        `json:"id,required"`
	AmountApplied      string                                        `json:"amount_applied,required"`
	AppliesToPriceIDs  []string                                      `json:"applies_to_price_ids,required"`
	DiscountType       CreditNoteModelLineItemsDiscountsDiscountType `json:"discount_type,required"`
	PercentageDiscount float64                                       `json:"percentage_discount,required"`
	AmountDiscount     string                                        `json:"amount_discount,nullable"`
	Reason             string                                        `json:"reason,nullable"`
	JSON               creditNoteModelLineItemsDiscountJSON          `json:"-"`
}

func (*CreditNoteModelLineItemsDiscount) UnmarshalJSON added in v0.103.0

func (r *CreditNoteModelLineItemsDiscount) UnmarshalJSON(data []byte) (err error)

type CreditNoteModelLineItemsDiscountsDiscountType added in v0.103.0

type CreditNoteModelLineItemsDiscountsDiscountType string
const (
	CreditNoteModelLineItemsDiscountsDiscountTypePercentage CreditNoteModelLineItemsDiscountsDiscountType = "percentage"
	CreditNoteModelLineItemsDiscountsDiscountTypeAmount     CreditNoteModelLineItemsDiscountsDiscountType = "amount"
)

func (CreditNoteModelLineItemsDiscountsDiscountType) IsKnown added in v0.103.0

type CreditNoteModelReason added in v0.103.0

type CreditNoteModelReason string
const (
	CreditNoteModelReasonDuplicate             CreditNoteModelReason = "Duplicate"
	CreditNoteModelReasonFraudulent            CreditNoteModelReason = "Fraudulent"
	CreditNoteModelReasonOrderChange           CreditNoteModelReason = "Order change"
	CreditNoteModelReasonProductUnsatisfactory CreditNoteModelReason = "Product unsatisfactory"
)

func (CreditNoteModelReason) IsKnown added in v0.103.0

func (r CreditNoteModelReason) IsKnown() bool

type CreditNoteModelType added in v0.103.0

type CreditNoteModelType string
const (
	CreditNoteModelTypeRefund     CreditNoteModelType = "refund"
	CreditNoteModelTypeAdjustment CreditNoteModelType = "adjustment"
)

func (CreditNoteModelType) IsKnown added in v0.103.0

func (r CreditNoteModelType) IsKnown() bool

type CreditNoteSummaryModel added in v0.103.0

type CreditNoteSummaryModel struct {
	ID               string `json:"id,required"`
	CreditNoteNumber string `json:"credit_note_number,required"`
	// An optional memo supplied on the credit note.
	Memo   string `json:"memo,required,nullable"`
	Reason string `json:"reason,required"`
	Total  string `json:"total,required"`
	Type   string `json:"type,required"`
	// If the credit note has a status of `void`, this gives a timestamp when the
	// credit note was voided.
	VoidedAt time.Time                  `json:"voided_at,required,nullable" format:"date-time"`
	JSON     creditNoteSummaryModelJSON `json:"-"`
}

func (*CreditNoteSummaryModel) UnmarshalJSON added in v0.103.0

func (r *CreditNoteSummaryModel) UnmarshalJSON(data []byte) (err error)

type CustomRatingFunctionConfigModel added in v0.103.0

type CustomRatingFunctionConfigModel map[string]interface{}

type CustomRatingFunctionConfigModelParam added in v0.103.0

type CustomRatingFunctionConfigModelParam map[string]interface{}

type CustomerBalanceTransactionModel added in v0.103.0

type CustomerBalanceTransactionModel struct {
	// A unique id for this transaction.
	ID     string                                `json:"id,required"`
	Action CustomerBalanceTransactionModelAction `json:"action,required"`
	// The value of the amount changed in the transaction.
	Amount string `json:"amount,required"`
	// The creation time of this transaction.
	CreatedAt  time.Time                                 `json:"created_at,required" format:"date-time"`
	CreditNote CustomerBalanceTransactionModelCreditNote `json:"credit_note,required,nullable"`
	// An optional description provided for manual customer balance adjustments.
	Description string `json:"description,required,nullable"`
	// The new value of the customer's balance prior to the transaction, in the
	// customer's currency.
	EndingBalance string                                 `json:"ending_balance,required"`
	Invoice       CustomerBalanceTransactionModelInvoice `json:"invoice,required,nullable"`
	// The original value of the customer's balance prior to the transaction, in the
	// customer's currency.
	StartingBalance string                              `json:"starting_balance,required"`
	Type            CustomerBalanceTransactionModelType `json:"type,required"`
	JSON            customerBalanceTransactionModelJSON `json:"-"`
}

func (*CustomerBalanceTransactionModel) UnmarshalJSON added in v0.103.0

func (r *CustomerBalanceTransactionModel) UnmarshalJSON(data []byte) (err error)

type CustomerBalanceTransactionModelAction added in v0.103.0

type CustomerBalanceTransactionModelAction string
const (
	CustomerBalanceTransactionModelActionAppliedToInvoice     CustomerBalanceTransactionModelAction = "applied_to_invoice"
	CustomerBalanceTransactionModelActionManualAdjustment     CustomerBalanceTransactionModelAction = "manual_adjustment"
	CustomerBalanceTransactionModelActionProratedRefund       CustomerBalanceTransactionModelAction = "prorated_refund"
	CustomerBalanceTransactionModelActionRevertProratedRefund CustomerBalanceTransactionModelAction = "revert_prorated_refund"
	CustomerBalanceTransactionModelActionReturnFromVoiding    CustomerBalanceTransactionModelAction = "return_from_voiding"
	CustomerBalanceTransactionModelActionCreditNoteApplied    CustomerBalanceTransactionModelAction = "credit_note_applied"
	CustomerBalanceTransactionModelActionCreditNoteVoided     CustomerBalanceTransactionModelAction = "credit_note_voided"
	CustomerBalanceTransactionModelActionOverpaymentRefund    CustomerBalanceTransactionModelAction = "overpayment_refund"
	CustomerBalanceTransactionModelActionExternalPayment      CustomerBalanceTransactionModelAction = "external_payment"
)

func (CustomerBalanceTransactionModelAction) IsKnown added in v0.103.0

type CustomerBalanceTransactionModelCreditNote added in v0.103.0

type CustomerBalanceTransactionModelCreditNote struct {
	// The id of the Credit note
	ID   string                                        `json:"id,required"`
	JSON customerBalanceTransactionModelCreditNoteJSON `json:"-"`
}

func (*CustomerBalanceTransactionModelCreditNote) UnmarshalJSON added in v0.103.0

func (r *CustomerBalanceTransactionModelCreditNote) UnmarshalJSON(data []byte) (err error)

type CustomerBalanceTransactionModelInvoice added in v0.103.0

type CustomerBalanceTransactionModelInvoice struct {
	// The Invoice id
	ID   string                                     `json:"id,required"`
	JSON customerBalanceTransactionModelInvoiceJSON `json:"-"`
}

func (*CustomerBalanceTransactionModelInvoice) UnmarshalJSON added in v0.103.0

func (r *CustomerBalanceTransactionModelInvoice) UnmarshalJSON(data []byte) (err error)

type CustomerBalanceTransactionModelType added in v0.103.0

type CustomerBalanceTransactionModelType string
const (
	CustomerBalanceTransactionModelTypeIncrement CustomerBalanceTransactionModelType = "increment"
	CustomerBalanceTransactionModelTypeDecrement CustomerBalanceTransactionModelType = "decrement"
)

func (CustomerBalanceTransactionModelType) IsKnown added in v0.103.0

type CustomerCostsModel added in v0.103.0

type CustomerCostsModel struct {
	Data []AggregatedCostModel  `json:"data,required"`
	JSON customerCostsModelJSON `json:"-"`
}

func (*CustomerCostsModel) UnmarshalJSON added in v0.103.0

func (r *CustomerCostsModel) UnmarshalJSON(data []byte) (err error)

type CustomerCreditBalancesModel added in v0.103.0

type CustomerCreditBalancesModel struct {
	Data               []CustomerCreditBalancesModelData `json:"data,required"`
	PaginationMetadata PaginationMetadata                `json:"pagination_metadata,required"`
	JSON               customerCreditBalancesModelJSON   `json:"-"`
}

func (*CustomerCreditBalancesModel) UnmarshalJSON added in v0.103.0

func (r *CustomerCreditBalancesModel) UnmarshalJSON(data []byte) (err error)

type CustomerCreditBalancesModelData added in v0.103.0

type CustomerCreditBalancesModelData struct {
	ID                    string                                `json:"id,required"`
	Balance               float64                               `json:"balance,required"`
	EffectiveDate         time.Time                             `json:"effective_date,required,nullable" format:"date-time"`
	ExpiryDate            time.Time                             `json:"expiry_date,required,nullable" format:"date-time"`
	MaximumInitialBalance float64                               `json:"maximum_initial_balance,required,nullable"`
	PerUnitCostBasis      string                                `json:"per_unit_cost_basis,required,nullable"`
	Status                CustomerCreditBalancesModelDataStatus `json:"status,required"`
	JSON                  customerCreditBalancesModelDataJSON   `json:"-"`
}

func (*CustomerCreditBalancesModelData) UnmarshalJSON added in v0.103.0

func (r *CustomerCreditBalancesModelData) UnmarshalJSON(data []byte) (err error)

type CustomerCreditBalancesModelDataStatus added in v0.103.0

type CustomerCreditBalancesModelDataStatus string
const (
	CustomerCreditBalancesModelDataStatusActive         CustomerCreditBalancesModelDataStatus = "active"
	CustomerCreditBalancesModelDataStatusPendingPayment CustomerCreditBalancesModelDataStatus = "pending_payment"
)

func (CustomerCreditBalancesModelDataStatus) IsKnown added in v0.103.0

type CustomerHierarchyConfigModelParam added in v0.103.0

type CustomerHierarchyConfigModelParam struct {
	// A list of child customer IDs to add to the hierarchy. The desired child
	// customers must not already be part of another hierarchy.
	ChildCustomerIDs param.Field[[]string] `json:"child_customer_ids"`
	// The ID of the parent customer in the hierarchy. The desired parent customer must
	// not be a child of another customer.
	ParentCustomerID param.Field[string] `json:"parent_customer_id"`
}

func (CustomerHierarchyConfigModelParam) MarshalJSON added in v0.103.0

func (r CustomerHierarchyConfigModelParam) MarshalJSON() (data []byte, err error)

type CustomerMinifiedModel added in v0.103.0

type CustomerMinifiedModel struct {
	ID                 string                    `json:"id,required"`
	ExternalCustomerID string                    `json:"external_customer_id,required,nullable"`
	JSON               customerMinifiedModelJSON `json:"-"`
}

func (*CustomerMinifiedModel) UnmarshalJSON added in v0.103.0

func (r *CustomerMinifiedModel) UnmarshalJSON(data []byte) (err error)

type CustomerModel added in v0.103.0

type CustomerModel struct {
	ID               string   `json:"id,required"`
	AdditionalEmails []string `json:"additional_emails,required"`
	AutoCollection   bool     `json:"auto_collection,required"`
	// The customer's current balance in their currency.
	Balance        string       `json:"balance,required"`
	BillingAddress AddressModel `json:"billing_address,required,nullable"`
	CreatedAt      time.Time    `json:"created_at,required" format:"date-time"`
	Currency       string       `json:"currency,required,nullable"`
	// A valid customer email, to be used for notifications. When Orb triggers payment
	// through a payment gateway, this email will be used for any automatically issued
	// receipts.
	Email                  string `json:"email,required"`
	EmailDelivery          bool   `json:"email_delivery,required"`
	ExemptFromAutomatedTax bool   `json:"exempt_from_automated_tax,required,nullable"`
	// An optional user-defined ID for this customer resource, used throughout the
	// system as an alias for this Customer. Use this field to identify a customer by
	// an existing identifier in your system.
	ExternalCustomerID string `json:"external_customer_id,required,nullable"`
	// The hierarchical relationships for this customer.
	Hierarchy CustomerModelHierarchy `json:"hierarchy,required"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata map[string]string `json:"metadata,required"`
	// The full name of the customer
	Name string `json:"name,required"`
	// This is used for creating charges or invoices in an external system via Orb.
	// When not in test mode, the connection must first be configured in the Orb
	// webapp.
	PaymentProvider CustomerModelPaymentProvider `json:"payment_provider,required,nullable"`
	// The ID of this customer in an external payments solution, such as Stripe. This
	// is used for creating charges or invoices in the external system via Orb.
	PaymentProviderID string       `json:"payment_provider_id,required,nullable"`
	PortalURL         string       `json:"portal_url,required,nullable"`
	ShippingAddress   AddressModel `json:"shipping_address,required,nullable"`
	// Tax IDs are commonly required to be displayed on customer invoices, which are
	// added to the headers of invoices.
	//
	// ### Supported Tax ID Countries and Types
	//
	// | Country              | Type         | Description                                                                                             |
	// | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- |
	// | Andorra              | `ad_nrt`     | Andorran NRT Number                                                                                     |
	// | Argentina            | `ar_cuit`    | Argentinian Tax ID Number                                                                               |
	// | Australia            | `au_abn`     | Australian Business Number (AU ABN)                                                                     |
	// | Australia            | `au_arn`     | Australian Taxation Office Reference Number                                                             |
	// | Austria              | `eu_vat`     | European VAT Number                                                                                     |
	// | Bahrain              | `bh_vat`     | Bahraini VAT Number                                                                                     |
	// | Belgium              | `eu_vat`     | European VAT Number                                                                                     |
	// | Bolivia              | `bo_tin`     | Bolivian Tax ID                                                                                         |
	// | Brazil               | `br_cnpj`    | Brazilian CNPJ Number                                                                                   |
	// | Brazil               | `br_cpf`     | Brazilian CPF Number                                                                                    |
	// | Bulgaria             | `bg_uic`     | Bulgaria Unified Identification Code                                                                    |
	// | Bulgaria             | `eu_vat`     | European VAT Number                                                                                     |
	// | Canada               | `ca_bn`      | Canadian BN                                                                                             |
	// | Canada               | `ca_gst_hst` | Canadian GST/HST Number                                                                                 |
	// | Canada               | `ca_pst_bc`  | Canadian PST Number (British Columbia)                                                                  |
	// | Canada               | `ca_pst_mb`  | Canadian PST Number (Manitoba)                                                                          |
	// | Canada               | `ca_pst_sk`  | Canadian PST Number (Saskatchewan)                                                                      |
	// | Canada               | `ca_qst`     | Canadian QST Number (Québec)                                                                            |
	// | Chile                | `cl_tin`     | Chilean TIN                                                                                             |
	// | China                | `cn_tin`     | Chinese Tax ID                                                                                          |
	// | Colombia             | `co_nit`     | Colombian NIT Number                                                                                    |
	// | Costa Rica           | `cr_tin`     | Costa Rican Tax ID                                                                                      |
	// | Croatia              | `eu_vat`     | European VAT Number                                                                                     |
	// | Cyprus               | `eu_vat`     | European VAT Number                                                                                     |
	// | Czech Republic       | `eu_vat`     | European VAT Number                                                                                     |
	// | Denmark              | `eu_vat`     | European VAT Number                                                                                     |
	// | Dominican Republic   | `do_rcn`     | Dominican RCN Number                                                                                    |
	// | Ecuador              | `ec_ruc`     | Ecuadorian RUC Number                                                                                   |
	// | Egypt                | `eg_tin`     | Egyptian Tax Identification Number                                                                      |
	// | El Salvador          | `sv_nit`     | El Salvadorian NIT Number                                                                               |
	// | Estonia              | `eu_vat`     | European VAT Number                                                                                     |
	// | EU                   | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme                                                  |
	// | Finland              | `eu_vat`     | European VAT Number                                                                                     |
	// | France               | `eu_vat`     | European VAT Number                                                                                     |
	// | Georgia              | `ge_vat`     | Georgian VAT                                                                                            |
	// | Germany              | `eu_vat`     | European VAT Number                                                                                     |
	// | Greece               | `eu_vat`     | European VAT Number                                                                                     |
	// | Hong Kong            | `hk_br`      | Hong Kong BR Number                                                                                     |
	// | Hungary              | `eu_vat`     | European VAT Number                                                                                     |
	// | Hungary              | `hu_tin`     | Hungary Tax Number (adószám)                                                                            |
	// | Iceland              | `is_vat`     | Icelandic VAT                                                                                           |
	// | India                | `in_gst`     | Indian GST Number                                                                                       |
	// | Indonesia            | `id_npwp`    | Indonesian NPWP Number                                                                                  |
	// | Ireland              | `eu_vat`     | European VAT Number                                                                                     |
	// | Israel               | `il_vat`     | Israel VAT                                                                                              |
	// | Italy                | `eu_vat`     | European VAT Number                                                                                     |
	// | Japan                | `jp_cn`      | Japanese Corporate Number (_Hōjin Bangō_)                                                               |
	// | Japan                | `jp_rn`      | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
	// | Japan                | `jp_trn`     | Japanese Tax Registration Number (_Tōroku Bangō_)                                                       |
	// | Kazakhstan           | `kz_bin`     | Kazakhstani Business Identification Number                                                              |
	// | Kenya                | `ke_pin`     | Kenya Revenue Authority Personal Identification Number                                                  |
	// | Latvia               | `eu_vat`     | European VAT Number                                                                                     |
	// | Liechtenstein        | `li_uid`     | Liechtensteinian UID Number                                                                             |
	// | Lithuania            | `eu_vat`     | European VAT Number                                                                                     |
	// | Luxembourg           | `eu_vat`     | European VAT Number                                                                                     |
	// | Malaysia             | `my_frp`     | Malaysian FRP Number                                                                                    |
	// | Malaysia             | `my_itn`     | Malaysian ITN                                                                                           |
	// | Malaysia             | `my_sst`     | Malaysian SST Number                                                                                    |
	// | Malta                | `eu_vat `    | European VAT Number                                                                                     |
	// | Mexico               | `mx_rfc`     | Mexican RFC Number                                                                                      |
	// | Netherlands          | `eu_vat`     | European VAT Number                                                                                     |
	// | New Zealand          | `nz_gst`     | New Zealand GST Number                                                                                  |
	// | Nigeria              | `ng_tin`     | Nigerian Tax Identification Number                                                                      |
	// | Norway               | `no_vat`     | Norwegian VAT Number                                                                                    |
	// | Norway               | `no_voec`    | Norwegian VAT on e-commerce Number                                                                      |
	// | Oman                 | `om_vat`     | Omani VAT Number                                                                                        |
	// | Peru                 | `pe_ruc`     | Peruvian RUC Number                                                                                     |
	// | Philippines          | `ph_tin `    | Philippines Tax Identification Number                                                                   |
	// | Poland               | `eu_vat`     | European VAT Number                                                                                     |
	// | Portugal             | `eu_vat`     | European VAT Number                                                                                     |
	// | Romania              | `eu_vat`     | European VAT Number                                                                                     |
	// | Romania              | `ro_tin`     | Romanian Tax ID Number                                                                                  |
	// | Russia               | `ru_inn`     | Russian INN                                                                                             |
	// | Russia               | `ru_kpp`     | Russian KPP                                                                                             |
	// | Saudi Arabia         | `sa_vat`     | Saudi Arabia VAT                                                                                        |
	// | Serbia               | `rs_pib`     | Serbian PIB Number                                                                                      |
	// | Singapore            | `sg_gst`     | Singaporean GST                                                                                         |
	// | Singapore            | `sg_uen`     | Singaporean UEN                                                                                         |
	// | Slovakia             | `eu_vat`     | European VAT Number                                                                                     |
	// | Slovenia             | `eu_vat`     | European VAT Number                                                                                     |
	// | Slovenia             | `si_tin`     | Slovenia Tax Number (davčna številka)                                                                   |
	// | South Africa         | `za_vat`     | South African VAT Number                                                                                |
	// | South Korea          | `kr_brn`     | Korean BRN                                                                                              |
	// | Spain                | `es_cif`     | Spanish NIF Number (previously Spanish CIF Number)                                                      |
	// | Spain                | `eu_vat`     | European VAT Number                                                                                     |
	// | Sweden               | `eu_vat`     | European VAT Number                                                                                     |
	// | Switzerland          | `ch_vat`     | Switzerland VAT Number                                                                                  |
	// | Taiwan               | `tw_vat`     | Taiwanese VAT                                                                                           |
	// | Thailand             | `th_vat`     | Thai VAT                                                                                                |
	// | Turkey               | `tr_tin`     | Turkish Tax Identification Number                                                                       |
	// | Ukraine              | `ua_vat`     | Ukrainian VAT                                                                                           |
	// | United Arab Emirates | `ae_trn`     | United Arab Emirates TRN                                                                                |
	// | United Kingdom       | `eu_vat`     | Northern Ireland VAT Number                                                                             |
	// | United Kingdom       | `gb_vat`     | United Kingdom VAT Number                                                                               |
	// | United States        | `us_ein`     | United States EIN                                                                                       |
	// | Uruguay              | `uy_ruc`     | Uruguayan RUC Number                                                                                    |
	// | Venezuela            | `ve_rif`     | Venezuelan RIF Number                                                                                   |
	// | Vietnam              | `vn_tin`     | Vietnamese Tax ID Number                                                                                |
	TaxID CustomerTaxIDModel `json:"tax_id,required,nullable"`
	// A timezone identifier from the IANA timezone database, such as
	// "America/Los_Angeles". This "defaults to your account's timezone if not set.
	// This cannot be changed after customer creation.
	Timezone                    string                                   `json:"timezone,required"`
	AccountingSyncConfiguration CustomerModelAccountingSyncConfiguration `json:"accounting_sync_configuration,nullable"`
	ReportingConfiguration      CustomerModelReportingConfiguration      `json:"reporting_configuration,nullable"`
	JSON                        customerModelJSON                        `json:"-"`
}

A customer is a buyer of your products, and the other party to the billing relationship.

In Orb, customers are assigned system generated identifiers automatically, but it's often desirable to have these match existing identifiers in your system. To avoid having to denormalize Orb ID information, you can pass in an `external_customer_id` with your own identifier. See [Customer ID Aliases](/events-and-metrics/customer-aliases) for further information about how these aliases work in Orb.

In addition to having an identifier in your system, a customer may exist in a payment provider solution like Stripe. Use the `payment_provider_id` and the `payment_provider` enum field to express this mapping.

A customer also has a timezone (from the standard [IANA timezone database](https://www.iana.org/time-zones)), which defaults to your account's timezone. See [Timezone localization](/essentials/timezones) for information on what this timezone parameter influences within Orb.

func (*CustomerModel) UnmarshalJSON added in v0.103.0

func (r *CustomerModel) UnmarshalJSON(data []byte) (err error)

type CustomerModelAccountingSyncConfiguration added in v0.103.0

type CustomerModelAccountingSyncConfiguration struct {
	AccountingProviders []CustomerModelAccountingSyncConfigurationAccountingProvider `json:"accounting_providers,required"`
	Excluded            bool                                                         `json:"excluded,required"`
	JSON                customerModelAccountingSyncConfigurationJSON                 `json:"-"`
}

func (*CustomerModelAccountingSyncConfiguration) UnmarshalJSON added in v0.103.0

func (r *CustomerModelAccountingSyncConfiguration) UnmarshalJSON(data []byte) (err error)

type CustomerModelAccountingSyncConfigurationAccountingProvider added in v0.103.0

type CustomerModelAccountingSyncConfigurationAccountingProvider struct {
	ExternalProviderID string                                                                  `json:"external_provider_id,required,nullable"`
	ProviderType       CustomerModelAccountingSyncConfigurationAccountingProvidersProviderType `json:"provider_type,required"`
	JSON               customerModelAccountingSyncConfigurationAccountingProviderJSON          `json:"-"`
}

func (*CustomerModelAccountingSyncConfigurationAccountingProvider) UnmarshalJSON added in v0.103.0

type CustomerModelAccountingSyncConfigurationAccountingProvidersProviderType added in v0.103.0

type CustomerModelAccountingSyncConfigurationAccountingProvidersProviderType string
const (
	CustomerModelAccountingSyncConfigurationAccountingProvidersProviderTypeQuickbooks CustomerModelAccountingSyncConfigurationAccountingProvidersProviderType = "quickbooks"
	CustomerModelAccountingSyncConfigurationAccountingProvidersProviderTypeNetsuite   CustomerModelAccountingSyncConfigurationAccountingProvidersProviderType = "netsuite"
)

func (CustomerModelAccountingSyncConfigurationAccountingProvidersProviderType) IsKnown added in v0.103.0

type CustomerModelHierarchy added in v0.103.0

type CustomerModelHierarchy struct {
	Children []CustomerMinifiedModel    `json:"children,required"`
	Parent   CustomerMinifiedModel      `json:"parent,required,nullable"`
	JSON     customerModelHierarchyJSON `json:"-"`
}

The hierarchical relationships for this customer.

func (*CustomerModelHierarchy) UnmarshalJSON added in v0.103.0

func (r *CustomerModelHierarchy) UnmarshalJSON(data []byte) (err error)

type CustomerModelPaymentProvider added in v0.103.0

type CustomerModelPaymentProvider string

This is used for creating charges or invoices in an external system via Orb. When not in test mode, the connection must first be configured in the Orb webapp.

const (
	CustomerModelPaymentProviderQuickbooks    CustomerModelPaymentProvider = "quickbooks"
	CustomerModelPaymentProviderBillCom       CustomerModelPaymentProvider = "bill.com"
	CustomerModelPaymentProviderStripeCharge  CustomerModelPaymentProvider = "stripe_charge"
	CustomerModelPaymentProviderStripeInvoice CustomerModelPaymentProvider = "stripe_invoice"
	CustomerModelPaymentProviderNetsuite      CustomerModelPaymentProvider = "netsuite"
)

func (CustomerModelPaymentProvider) IsKnown added in v0.103.0

func (r CustomerModelPaymentProvider) IsKnown() bool

type CustomerModelReportingConfiguration added in v0.103.0

type CustomerModelReportingConfiguration struct {
	Exempt bool                                    `json:"exempt,required"`
	JSON   customerModelReportingConfigurationJSON `json:"-"`
}

func (*CustomerModelReportingConfiguration) UnmarshalJSON added in v0.103.0

func (r *CustomerModelReportingConfiguration) UnmarshalJSON(data []byte) (err error)

type CustomerTaxIDModel added in v0.103.0

type CustomerTaxIDModel struct {
	Country CustomerTaxIDModelCountry `json:"country,required"`
	Type    CustomerTaxIDModelType    `json:"type,required"`
	Value   string                    `json:"value,required"`
	JSON    customerTaxIDModelJSON    `json:"-"`
}

Tax IDs are commonly required to be displayed on customer invoices, which are added to the headers of invoices.

### Supported Tax ID Countries and Types

| Country | Type | Description | | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- | | Andorra | `ad_nrt` | Andorran NRT Number | | Argentina | `ar_cuit` | Argentinian Tax ID Number | | Australia | `au_abn` | Australian Business Number (AU ABN) | | Australia | `au_arn` | Australian Taxation Office Reference Number | | Austria | `eu_vat` | European VAT Number | | Bahrain | `bh_vat` | Bahraini VAT Number | | Belgium | `eu_vat` | European VAT Number | | Bolivia | `bo_tin` | Bolivian Tax ID | | Brazil | `br_cnpj` | Brazilian CNPJ Number | | Brazil | `br_cpf` | Brazilian CPF Number | | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code | | Bulgaria | `eu_vat` | European VAT Number | | Canada | `ca_bn` | Canadian BN | | Canada | `ca_gst_hst` | Canadian GST/HST Number | | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) | | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) | | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) | | Canada | `ca_qst` | Canadian QST Number (Québec) | | Chile | `cl_tin` | Chilean TIN | | China | `cn_tin` | Chinese Tax ID | | Colombia | `co_nit` | Colombian NIT Number | | Costa Rica | `cr_tin` | Costa Rican Tax ID | | Croatia | `eu_vat` | European VAT Number | | Cyprus | `eu_vat` | European VAT Number | | Czech Republic | `eu_vat` | European VAT Number | | Denmark | `eu_vat` | European VAT Number | | Dominican Republic | `do_rcn` | Dominican RCN Number | | Ecuador | `ec_ruc` | Ecuadorian RUC Number | | Egypt | `eg_tin` | Egyptian Tax Identification Number | | El Salvador | `sv_nit` | El Salvadorian NIT Number | | Estonia | `eu_vat` | European VAT Number | | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | | Finland | `eu_vat` | European VAT Number | | France | `eu_vat` | European VAT Number | | Georgia | `ge_vat` | Georgian VAT | | Germany | `eu_vat` | European VAT Number | | Greece | `eu_vat` | European VAT Number | | Hong Kong | `hk_br` | Hong Kong BR Number | | Hungary | `eu_vat` | European VAT Number | | Hungary | `hu_tin` | Hungary Tax Number (adószám) | | Iceland | `is_vat` | Icelandic VAT | | India | `in_gst` | Indian GST Number | | Indonesia | `id_npwp` | Indonesian NPWP Number | | Ireland | `eu_vat` | European VAT Number | | Israel | `il_vat` | Israel VAT | | Italy | `eu_vat` | European VAT Number | | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number | | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number | | Latvia | `eu_vat` | European VAT Number | | Liechtenstein | `li_uid` | Liechtensteinian UID Number | | Lithuania | `eu_vat` | European VAT Number | | Luxembourg | `eu_vat` | European VAT Number | | Malaysia | `my_frp` | Malaysian FRP Number | | Malaysia | `my_itn` | Malaysian ITN | | Malaysia | `my_sst` | Malaysian SST Number | | Malta | `eu_vat ` | European VAT Number | | Mexico | `mx_rfc` | Mexican RFC Number | | Netherlands | `eu_vat` | European VAT Number | | New Zealand | `nz_gst` | New Zealand GST Number | | Nigeria | `ng_tin` | Nigerian Tax Identification Number | | Norway | `no_vat` | Norwegian VAT Number | | Norway | `no_voec` | Norwegian VAT on e-commerce Number | | Oman | `om_vat` | Omani VAT Number | | Peru | `pe_ruc` | Peruvian RUC Number | | Philippines | `ph_tin ` | Philippines Tax Identification Number | | Poland | `eu_vat` | European VAT Number | | Portugal | `eu_vat` | European VAT Number | | Romania | `eu_vat` | European VAT Number | | Romania | `ro_tin` | Romanian Tax ID Number | | Russia | `ru_inn` | Russian INN | | Russia | `ru_kpp` | Russian KPP | | Saudi Arabia | `sa_vat` | Saudi Arabia VAT | | Serbia | `rs_pib` | Serbian PIB Number | | Singapore | `sg_gst` | Singaporean GST | | Singapore | `sg_uen` | Singaporean UEN | | Slovakia | `eu_vat` | European VAT Number | | Slovenia | `eu_vat` | European VAT Number | | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) | | South Africa | `za_vat` | South African VAT Number | | South Korea | `kr_brn` | Korean BRN | | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | | Spain | `eu_vat` | European VAT Number | | Sweden | `eu_vat` | European VAT Number | | Switzerland | `ch_vat` | Switzerland VAT Number | | Taiwan | `tw_vat` | Taiwanese VAT | | Thailand | `th_vat` | Thai VAT | | Turkey | `tr_tin` | Turkish Tax Identification Number | | Ukraine | `ua_vat` | Ukrainian VAT | | United Arab Emirates | `ae_trn` | United Arab Emirates TRN | | United Kingdom | `eu_vat` | Northern Ireland VAT Number | | United Kingdom | `gb_vat` | United Kingdom VAT Number | | United States | `us_ein` | United States EIN | | Uruguay | `uy_ruc` | Uruguayan RUC Number | | Venezuela | `ve_rif` | Venezuelan RIF Number | | Vietnam | `vn_tin` | Vietnamese Tax ID Number |

func (*CustomerTaxIDModel) UnmarshalJSON added in v0.103.0

func (r *CustomerTaxIDModel) UnmarshalJSON(data []byte) (err error)

type CustomerTaxIDModelCountry added in v0.103.0

type CustomerTaxIDModelCountry string
const (
	CustomerTaxIDModelCountryAd CustomerTaxIDModelCountry = "AD"
	CustomerTaxIDModelCountryAe CustomerTaxIDModelCountry = "AE"
	CustomerTaxIDModelCountryAr CustomerTaxIDModelCountry = "AR"
	CustomerTaxIDModelCountryAt CustomerTaxIDModelCountry = "AT"
	CustomerTaxIDModelCountryAu CustomerTaxIDModelCountry = "AU"
	CustomerTaxIDModelCountryBe CustomerTaxIDModelCountry = "BE"
	CustomerTaxIDModelCountryBg CustomerTaxIDModelCountry = "BG"
	CustomerTaxIDModelCountryBh CustomerTaxIDModelCountry = "BH"
	CustomerTaxIDModelCountryBo CustomerTaxIDModelCountry = "BO"
	CustomerTaxIDModelCountryBr CustomerTaxIDModelCountry = "BR"
	CustomerTaxIDModelCountryCa CustomerTaxIDModelCountry = "CA"
	CustomerTaxIDModelCountryCh CustomerTaxIDModelCountry = "CH"
	CustomerTaxIDModelCountryCl CustomerTaxIDModelCountry = "CL"
	CustomerTaxIDModelCountryCn CustomerTaxIDModelCountry = "CN"
	CustomerTaxIDModelCountryCo CustomerTaxIDModelCountry = "CO"
	CustomerTaxIDModelCountryCr CustomerTaxIDModelCountry = "CR"
	CustomerTaxIDModelCountryCy CustomerTaxIDModelCountry = "CY"
	CustomerTaxIDModelCountryCz CustomerTaxIDModelCountry = "CZ"
	CustomerTaxIDModelCountryDe CustomerTaxIDModelCountry = "DE"
	CustomerTaxIDModelCountryDk CustomerTaxIDModelCountry = "DK"
	CustomerTaxIDModelCountryEe CustomerTaxIDModelCountry = "EE"
	CustomerTaxIDModelCountryDo CustomerTaxIDModelCountry = "DO"
	CustomerTaxIDModelCountryEc CustomerTaxIDModelCountry = "EC"
	CustomerTaxIDModelCountryEg CustomerTaxIDModelCountry = "EG"
	CustomerTaxIDModelCountryEs CustomerTaxIDModelCountry = "ES"
	CustomerTaxIDModelCountryEu CustomerTaxIDModelCountry = "EU"
	CustomerTaxIDModelCountryFi CustomerTaxIDModelCountry = "FI"
	CustomerTaxIDModelCountryFr CustomerTaxIDModelCountry = "FR"
	CustomerTaxIDModelCountryGB CustomerTaxIDModelCountry = "GB"
	CustomerTaxIDModelCountryGe CustomerTaxIDModelCountry = "GE"
	CustomerTaxIDModelCountryGr CustomerTaxIDModelCountry = "GR"
	CustomerTaxIDModelCountryHk CustomerTaxIDModelCountry = "HK"
	CustomerTaxIDModelCountryHr CustomerTaxIDModelCountry = "HR"
	CustomerTaxIDModelCountryHu CustomerTaxIDModelCountry = "HU"
	CustomerTaxIDModelCountryID CustomerTaxIDModelCountry = "ID"
	CustomerTaxIDModelCountryIe CustomerTaxIDModelCountry = "IE"
	CustomerTaxIDModelCountryIl CustomerTaxIDModelCountry = "IL"
	CustomerTaxIDModelCountryIn CustomerTaxIDModelCountry = "IN"
	CustomerTaxIDModelCountryIs CustomerTaxIDModelCountry = "IS"
	CustomerTaxIDModelCountryIt CustomerTaxIDModelCountry = "IT"
	CustomerTaxIDModelCountryJp CustomerTaxIDModelCountry = "JP"
	CustomerTaxIDModelCountryKe CustomerTaxIDModelCountry = "KE"
	CustomerTaxIDModelCountryKr CustomerTaxIDModelCountry = "KR"
	CustomerTaxIDModelCountryKz CustomerTaxIDModelCountry = "KZ"
	CustomerTaxIDModelCountryLi CustomerTaxIDModelCountry = "LI"
	CustomerTaxIDModelCountryLt CustomerTaxIDModelCountry = "LT"
	CustomerTaxIDModelCountryLu CustomerTaxIDModelCountry = "LU"
	CustomerTaxIDModelCountryLv CustomerTaxIDModelCountry = "LV"
	CustomerTaxIDModelCountryMt CustomerTaxIDModelCountry = "MT"
	CustomerTaxIDModelCountryMx CustomerTaxIDModelCountry = "MX"
	CustomerTaxIDModelCountryMy CustomerTaxIDModelCountry = "MY"
	CustomerTaxIDModelCountryNg CustomerTaxIDModelCountry = "NG"
	CustomerTaxIDModelCountryNl CustomerTaxIDModelCountry = "NL"
	CustomerTaxIDModelCountryNo CustomerTaxIDModelCountry = "NO"
	CustomerTaxIDModelCountryNz CustomerTaxIDModelCountry = "NZ"
	CustomerTaxIDModelCountryOm CustomerTaxIDModelCountry = "OM"
	CustomerTaxIDModelCountryPe CustomerTaxIDModelCountry = "PE"
	CustomerTaxIDModelCountryPh CustomerTaxIDModelCountry = "PH"
	CustomerTaxIDModelCountryPl CustomerTaxIDModelCountry = "PL"
	CustomerTaxIDModelCountryPt CustomerTaxIDModelCountry = "PT"
	CustomerTaxIDModelCountryRo CustomerTaxIDModelCountry = "RO"
	CustomerTaxIDModelCountryRs CustomerTaxIDModelCountry = "RS"
	CustomerTaxIDModelCountryRu CustomerTaxIDModelCountry = "RU"
	CustomerTaxIDModelCountrySa CustomerTaxIDModelCountry = "SA"
	CustomerTaxIDModelCountrySe CustomerTaxIDModelCountry = "SE"
	CustomerTaxIDModelCountrySg CustomerTaxIDModelCountry = "SG"
	CustomerTaxIDModelCountrySi CustomerTaxIDModelCountry = "SI"
	CustomerTaxIDModelCountrySk CustomerTaxIDModelCountry = "SK"
	CustomerTaxIDModelCountrySv CustomerTaxIDModelCountry = "SV"
	CustomerTaxIDModelCountryTh CustomerTaxIDModelCountry = "TH"
	CustomerTaxIDModelCountryTr CustomerTaxIDModelCountry = "TR"
	CustomerTaxIDModelCountryTw CustomerTaxIDModelCountry = "TW"
	CustomerTaxIDModelCountryUa CustomerTaxIDModelCountry = "UA"
	CustomerTaxIDModelCountryUs CustomerTaxIDModelCountry = "US"
	CustomerTaxIDModelCountryUy CustomerTaxIDModelCountry = "UY"
	CustomerTaxIDModelCountryVe CustomerTaxIDModelCountry = "VE"
	CustomerTaxIDModelCountryVn CustomerTaxIDModelCountry = "VN"
	CustomerTaxIDModelCountryZa CustomerTaxIDModelCountry = "ZA"
)

func (CustomerTaxIDModelCountry) IsKnown added in v0.103.0

func (r CustomerTaxIDModelCountry) IsKnown() bool

type CustomerTaxIDModelParam added in v0.103.0

type CustomerTaxIDModelParam struct {
	Country param.Field[CustomerTaxIDModelCountry] `json:"country,required"`
	Type    param.Field[CustomerTaxIDModelType]    `json:"type,required"`
	Value   param.Field[string]                    `json:"value,required"`
}

Tax IDs are commonly required to be displayed on customer invoices, which are added to the headers of invoices.

### Supported Tax ID Countries and Types

| Country | Type | Description | | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- | | Andorra | `ad_nrt` | Andorran NRT Number | | Argentina | `ar_cuit` | Argentinian Tax ID Number | | Australia | `au_abn` | Australian Business Number (AU ABN) | | Australia | `au_arn` | Australian Taxation Office Reference Number | | Austria | `eu_vat` | European VAT Number | | Bahrain | `bh_vat` | Bahraini VAT Number | | Belgium | `eu_vat` | European VAT Number | | Bolivia | `bo_tin` | Bolivian Tax ID | | Brazil | `br_cnpj` | Brazilian CNPJ Number | | Brazil | `br_cpf` | Brazilian CPF Number | | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code | | Bulgaria | `eu_vat` | European VAT Number | | Canada | `ca_bn` | Canadian BN | | Canada | `ca_gst_hst` | Canadian GST/HST Number | | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) | | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) | | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) | | Canada | `ca_qst` | Canadian QST Number (Québec) | | Chile | `cl_tin` | Chilean TIN | | China | `cn_tin` | Chinese Tax ID | | Colombia | `co_nit` | Colombian NIT Number | | Costa Rica | `cr_tin` | Costa Rican Tax ID | | Croatia | `eu_vat` | European VAT Number | | Cyprus | `eu_vat` | European VAT Number | | Czech Republic | `eu_vat` | European VAT Number | | Denmark | `eu_vat` | European VAT Number | | Dominican Republic | `do_rcn` | Dominican RCN Number | | Ecuador | `ec_ruc` | Ecuadorian RUC Number | | Egypt | `eg_tin` | Egyptian Tax Identification Number | | El Salvador | `sv_nit` | El Salvadorian NIT Number | | Estonia | `eu_vat` | European VAT Number | | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | | Finland | `eu_vat` | European VAT Number | | France | `eu_vat` | European VAT Number | | Georgia | `ge_vat` | Georgian VAT | | Germany | `eu_vat` | European VAT Number | | Greece | `eu_vat` | European VAT Number | | Hong Kong | `hk_br` | Hong Kong BR Number | | Hungary | `eu_vat` | European VAT Number | | Hungary | `hu_tin` | Hungary Tax Number (adószám) | | Iceland | `is_vat` | Icelandic VAT | | India | `in_gst` | Indian GST Number | | Indonesia | `id_npwp` | Indonesian NPWP Number | | Ireland | `eu_vat` | European VAT Number | | Israel | `il_vat` | Israel VAT | | Italy | `eu_vat` | European VAT Number | | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number | | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number | | Latvia | `eu_vat` | European VAT Number | | Liechtenstein | `li_uid` | Liechtensteinian UID Number | | Lithuania | `eu_vat` | European VAT Number | | Luxembourg | `eu_vat` | European VAT Number | | Malaysia | `my_frp` | Malaysian FRP Number | | Malaysia | `my_itn` | Malaysian ITN | | Malaysia | `my_sst` | Malaysian SST Number | | Malta | `eu_vat ` | European VAT Number | | Mexico | `mx_rfc` | Mexican RFC Number | | Netherlands | `eu_vat` | European VAT Number | | New Zealand | `nz_gst` | New Zealand GST Number | | Nigeria | `ng_tin` | Nigerian Tax Identification Number | | Norway | `no_vat` | Norwegian VAT Number | | Norway | `no_voec` | Norwegian VAT on e-commerce Number | | Oman | `om_vat` | Omani VAT Number | | Peru | `pe_ruc` | Peruvian RUC Number | | Philippines | `ph_tin ` | Philippines Tax Identification Number | | Poland | `eu_vat` | European VAT Number | | Portugal | `eu_vat` | European VAT Number | | Romania | `eu_vat` | European VAT Number | | Romania | `ro_tin` | Romanian Tax ID Number | | Russia | `ru_inn` | Russian INN | | Russia | `ru_kpp` | Russian KPP | | Saudi Arabia | `sa_vat` | Saudi Arabia VAT | | Serbia | `rs_pib` | Serbian PIB Number | | Singapore | `sg_gst` | Singaporean GST | | Singapore | `sg_uen` | Singaporean UEN | | Slovakia | `eu_vat` | European VAT Number | | Slovenia | `eu_vat` | European VAT Number | | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) | | South Africa | `za_vat` | South African VAT Number | | South Korea | `kr_brn` | Korean BRN | | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | | Spain | `eu_vat` | European VAT Number | | Sweden | `eu_vat` | European VAT Number | | Switzerland | `ch_vat` | Switzerland VAT Number | | Taiwan | `tw_vat` | Taiwanese VAT | | Thailand | `th_vat` | Thai VAT | | Turkey | `tr_tin` | Turkish Tax Identification Number | | Ukraine | `ua_vat` | Ukrainian VAT | | United Arab Emirates | `ae_trn` | United Arab Emirates TRN | | United Kingdom | `eu_vat` | Northern Ireland VAT Number | | United Kingdom | `gb_vat` | United Kingdom VAT Number | | United States | `us_ein` | United States EIN | | Uruguay | `uy_ruc` | Uruguayan RUC Number | | Venezuela | `ve_rif` | Venezuelan RIF Number | | Vietnam | `vn_tin` | Vietnamese Tax ID Number |

func (CustomerTaxIDModelParam) MarshalJSON added in v0.103.0

func (r CustomerTaxIDModelParam) MarshalJSON() (data []byte, err error)

type CustomerTaxIDModelType added in v0.103.0

type CustomerTaxIDModelType string
const (
	CustomerTaxIDModelTypeAdNrt    CustomerTaxIDModelType = "ad_nrt"
	CustomerTaxIDModelTypeAeTrn    CustomerTaxIDModelType = "ae_trn"
	CustomerTaxIDModelTypeArCuit   CustomerTaxIDModelType = "ar_cuit"
	CustomerTaxIDModelTypeEuVat    CustomerTaxIDModelType = "eu_vat"
	CustomerTaxIDModelTypeAuAbn    CustomerTaxIDModelType = "au_abn"
	CustomerTaxIDModelTypeAuArn    CustomerTaxIDModelType = "au_arn"
	CustomerTaxIDModelTypeBgUic    CustomerTaxIDModelType = "bg_uic"
	CustomerTaxIDModelTypeBhVat    CustomerTaxIDModelType = "bh_vat"
	CustomerTaxIDModelTypeBoTin    CustomerTaxIDModelType = "bo_tin"
	CustomerTaxIDModelTypeBrCnpj   CustomerTaxIDModelType = "br_cnpj"
	CustomerTaxIDModelTypeBrCpf    CustomerTaxIDModelType = "br_cpf"
	CustomerTaxIDModelTypeCaBn     CustomerTaxIDModelType = "ca_bn"
	CustomerTaxIDModelTypeCaGstHst CustomerTaxIDModelType = "ca_gst_hst"
	CustomerTaxIDModelTypeCaPstBc  CustomerTaxIDModelType = "ca_pst_bc"
	CustomerTaxIDModelTypeCaPstMB  CustomerTaxIDModelType = "ca_pst_mb"
	CustomerTaxIDModelTypeCaPstSk  CustomerTaxIDModelType = "ca_pst_sk"
	CustomerTaxIDModelTypeCaQst    CustomerTaxIDModelType = "ca_qst"
	CustomerTaxIDModelTypeChVat    CustomerTaxIDModelType = "ch_vat"
	CustomerTaxIDModelTypeClTin    CustomerTaxIDModelType = "cl_tin"
	CustomerTaxIDModelTypeCnTin    CustomerTaxIDModelType = "cn_tin"
	CustomerTaxIDModelTypeCoNit    CustomerTaxIDModelType = "co_nit"
	CustomerTaxIDModelTypeCrTin    CustomerTaxIDModelType = "cr_tin"
	CustomerTaxIDModelTypeDoRcn    CustomerTaxIDModelType = "do_rcn"
	CustomerTaxIDModelTypeEcRuc    CustomerTaxIDModelType = "ec_ruc"
	CustomerTaxIDModelTypeEgTin    CustomerTaxIDModelType = "eg_tin"
	CustomerTaxIDModelTypeEsCif    CustomerTaxIDModelType = "es_cif"
	CustomerTaxIDModelTypeEuOssVat CustomerTaxIDModelType = "eu_oss_vat"
	CustomerTaxIDModelTypeGBVat    CustomerTaxIDModelType = "gb_vat"
	CustomerTaxIDModelTypeGeVat    CustomerTaxIDModelType = "ge_vat"
	CustomerTaxIDModelTypeHkBr     CustomerTaxIDModelType = "hk_br"
	CustomerTaxIDModelTypeHuTin    CustomerTaxIDModelType = "hu_tin"
	CustomerTaxIDModelTypeIDNpwp   CustomerTaxIDModelType = "id_npwp"
	CustomerTaxIDModelTypeIlVat    CustomerTaxIDModelType = "il_vat"
	CustomerTaxIDModelTypeInGst    CustomerTaxIDModelType = "in_gst"
	CustomerTaxIDModelTypeIsVat    CustomerTaxIDModelType = "is_vat"
	CustomerTaxIDModelTypeJpCn     CustomerTaxIDModelType = "jp_cn"
	CustomerTaxIDModelTypeJpRn     CustomerTaxIDModelType = "jp_rn"
	CustomerTaxIDModelTypeJpTrn    CustomerTaxIDModelType = "jp_trn"
	CustomerTaxIDModelTypeKePin    CustomerTaxIDModelType = "ke_pin"
	CustomerTaxIDModelTypeKrBrn    CustomerTaxIDModelType = "kr_brn"
	CustomerTaxIDModelTypeKzBin    CustomerTaxIDModelType = "kz_bin"
	CustomerTaxIDModelTypeLiUid    CustomerTaxIDModelType = "li_uid"
	CustomerTaxIDModelTypeMxRfc    CustomerTaxIDModelType = "mx_rfc"
	CustomerTaxIDModelTypeMyFrp    CustomerTaxIDModelType = "my_frp"
	CustomerTaxIDModelTypeMyItn    CustomerTaxIDModelType = "my_itn"
	CustomerTaxIDModelTypeMySst    CustomerTaxIDModelType = "my_sst"
	CustomerTaxIDModelTypeNgTin    CustomerTaxIDModelType = "ng_tin"
	CustomerTaxIDModelTypeNoVat    CustomerTaxIDModelType = "no_vat"
	CustomerTaxIDModelTypeNoVoec   CustomerTaxIDModelType = "no_voec"
	CustomerTaxIDModelTypeNzGst    CustomerTaxIDModelType = "nz_gst"
	CustomerTaxIDModelTypeOmVat    CustomerTaxIDModelType = "om_vat"
	CustomerTaxIDModelTypePeRuc    CustomerTaxIDModelType = "pe_ruc"
	CustomerTaxIDModelTypePhTin    CustomerTaxIDModelType = "ph_tin"
	CustomerTaxIDModelTypeRoTin    CustomerTaxIDModelType = "ro_tin"
	CustomerTaxIDModelTypeRsPib    CustomerTaxIDModelType = "rs_pib"
	CustomerTaxIDModelTypeRuInn    CustomerTaxIDModelType = "ru_inn"
	CustomerTaxIDModelTypeRuKpp    CustomerTaxIDModelType = "ru_kpp"
	CustomerTaxIDModelTypeSaVat    CustomerTaxIDModelType = "sa_vat"
	CustomerTaxIDModelTypeSgGst    CustomerTaxIDModelType = "sg_gst"
	CustomerTaxIDModelTypeSgUen    CustomerTaxIDModelType = "sg_uen"
	CustomerTaxIDModelTypeSiTin    CustomerTaxIDModelType = "si_tin"
	CustomerTaxIDModelTypeSvNit    CustomerTaxIDModelType = "sv_nit"
	CustomerTaxIDModelTypeThVat    CustomerTaxIDModelType = "th_vat"
	CustomerTaxIDModelTypeTrTin    CustomerTaxIDModelType = "tr_tin"
	CustomerTaxIDModelTypeTwVat    CustomerTaxIDModelType = "tw_vat"
	CustomerTaxIDModelTypeUaVat    CustomerTaxIDModelType = "ua_vat"
	CustomerTaxIDModelTypeUsEin    CustomerTaxIDModelType = "us_ein"
	CustomerTaxIDModelTypeUyRuc    CustomerTaxIDModelType = "uy_ruc"
	CustomerTaxIDModelTypeVeRif    CustomerTaxIDModelType = "ve_rif"
	CustomerTaxIDModelTypeVnTin    CustomerTaxIDModelType = "vn_tin"
	CustomerTaxIDModelTypeZaVat    CustomerTaxIDModelType = "za_vat"
)

func (CustomerTaxIDModelType) IsKnown added in v0.103.0

func (r CustomerTaxIDModelType) IsKnown() bool

type DimensionalPriceConfigurationModel added in v0.103.0

type DimensionalPriceConfigurationModel struct {
	DimensionValues         []string                               `json:"dimension_values,required"`
	DimensionalPriceGroupID string                                 `json:"dimensional_price_group_id,required"`
	JSON                    dimensionalPriceConfigurationModelJSON `json:"-"`
}

func (*DimensionalPriceConfigurationModel) UnmarshalJSON added in v0.103.0

func (r *DimensionalPriceConfigurationModel) UnmarshalJSON(data []byte) (err error)

type DimensionalPriceGroupModel added in v0.103.0

type DimensionalPriceGroupModel struct {
	ID string `json:"id,required"`
	// The billable metric associated with this dimensional price group. All prices
	// associated with this dimensional price group will be computed using this
	// billable metric.
	BillableMetricID string `json:"billable_metric_id,required"`
	// The dimensions that this dimensional price group is defined over
	Dimensions []string `json:"dimensions,required"`
	// An alias for the dimensional price group
	ExternalDimensionalPriceGroupID string `json:"external_dimensional_price_group_id,required,nullable"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata map[string]string `json:"metadata,required"`
	// The name of the dimensional price group
	Name string                         `json:"name,required"`
	JSON dimensionalPriceGroupModelJSON `json:"-"`
}

A dimensional price group is used to partition the result of a billable metric by a set of dimensions. Prices in a price group must specify the parition used to derive their usage.

func (*DimensionalPriceGroupModel) UnmarshalJSON added in v0.103.0

func (r *DimensionalPriceGroupModel) UnmarshalJSON(data []byte) (err error)

type Discount

type Discount struct {
	// This field can have the runtime type of [[]string].
	AppliesToPriceIDs interface{}          `json:"applies_to_price_ids,required"`
	DiscountType      DiscountDiscountType `json:"discount_type,required"`
	// Only available if discount_type is `amount`.
	AmountDiscount string `json:"amount_discount"`
	// Only available if discount_type is `percentage`. This is a number between 0
	// and 1.
	PercentageDiscount float64 `json:"percentage_discount"`
	Reason             string  `json:"reason,nullable"`
	// Only available if discount_type is `trial`
	TrialAmountDiscount string `json:"trial_amount_discount,nullable"`
	// Only available if discount_type is `trial`
	TrialPercentageDiscount float64 `json:"trial_percentage_discount,nullable"`
	// Only available if discount_type is `usage`. Number of usage units that this
	// discount is for
	UsageDiscount float64      `json:"usage_discount"`
	JSON          discountJSON `json:"-"`
	// contains filtered or unexported fields
}

func (Discount) AsUnion

func (r Discount) AsUnion() DiscountUnion

AsUnion returns a DiscountUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are shared.PercentageDiscount, shared.TrialDiscount, shared.DiscountUsageDiscount, shared.AmountDiscount.

func (*Discount) UnmarshalJSON

func (r *Discount) UnmarshalJSON(data []byte) (err error)

type DiscountDiscountType

type DiscountDiscountType string
const (
	DiscountDiscountTypePercentage DiscountDiscountType = "percentage"
	DiscountDiscountTypeTrial      DiscountDiscountType = "trial"
	DiscountDiscountTypeUsage      DiscountDiscountType = "usage"
	DiscountDiscountTypeAmount     DiscountDiscountType = "amount"
)

func (DiscountDiscountType) IsKnown

func (r DiscountDiscountType) IsKnown() bool

type DiscountOverrideModelDiscountType added in v0.103.0

type DiscountOverrideModelDiscountType string
const (
	DiscountOverrideModelDiscountTypePercentage DiscountOverrideModelDiscountType = "percentage"
	DiscountOverrideModelDiscountTypeUsage      DiscountOverrideModelDiscountType = "usage"
	DiscountOverrideModelDiscountTypeAmount     DiscountOverrideModelDiscountType = "amount"
)

func (DiscountOverrideModelDiscountType) IsKnown added in v0.103.0

type DiscountOverrideModelParam added in v0.103.0

type DiscountOverrideModelParam struct {
	DiscountType param.Field[DiscountOverrideModelDiscountType] `json:"discount_type,required"`
	// Only available if discount_type is `amount`.
	AmountDiscount param.Field[string] `json:"amount_discount"`
	// Only available if discount_type is `percentage`. This is a number between 0
	// and 1.
	PercentageDiscount param.Field[float64] `json:"percentage_discount"`
	// Only available if discount_type is `usage`. Number of usage units that this
	// discount is for
	UsageDiscount param.Field[float64] `json:"usage_discount"`
}

func (DiscountOverrideModelParam) MarshalJSON added in v0.103.0

func (r DiscountOverrideModelParam) MarshalJSON() (data []byte, err error)

type DiscountParam added in v0.35.0

type DiscountParam struct {
	AppliesToPriceIDs param.Field[interface{}]          `json:"applies_to_price_ids,required"`
	DiscountType      param.Field[DiscountDiscountType] `json:"discount_type,required"`
	// Only available if discount_type is `amount`.
	AmountDiscount param.Field[string] `json:"amount_discount"`
	// Only available if discount_type is `percentage`. This is a number between 0
	// and 1.
	PercentageDiscount param.Field[float64] `json:"percentage_discount"`
	Reason             param.Field[string]  `json:"reason"`
	// Only available if discount_type is `trial`
	TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"`
	// Only available if discount_type is `trial`
	TrialPercentageDiscount param.Field[float64] `json:"trial_percentage_discount"`
	// Only available if discount_type is `usage`. Number of usage units that this
	// discount is for
	UsageDiscount param.Field[float64] `json:"usage_discount"`
}

func (DiscountParam) ImplementsDiscountUnionParam added in v0.89.1

func (r DiscountParam) ImplementsDiscountUnionParam()

func (DiscountParam) MarshalJSON added in v0.35.0

func (r DiscountParam) MarshalJSON() (data []byte, err error)

type DiscountUnion

type DiscountUnion interface {
	ImplementsDiscount()
}

Union satisfied by shared.PercentageDiscount, shared.TrialDiscount, shared.DiscountUsageDiscount or shared.AmountDiscount.

type DiscountUnionParam added in v0.35.0

type DiscountUnionParam interface {
	ImplementsDiscountUnionParam()
}

Satisfied by shared.PercentageDiscountParam, shared.TrialDiscountParam, shared.DiscountUsageDiscountParam, shared.AmountDiscountParam, DiscountParam.

type DiscountUsageDiscount

type DiscountUsageDiscount struct {
	// List of price_ids that this discount applies to. For plan/plan phase discounts,
	// this can be a subset of prices.
	AppliesToPriceIDs []string                          `json:"applies_to_price_ids,required"`
	DiscountType      DiscountUsageDiscountDiscountType `json:"discount_type,required"`
	// Only available if discount_type is `usage`. Number of usage units that this
	// discount is for
	UsageDiscount float64                   `json:"usage_discount,required"`
	Reason        string                    `json:"reason,nullable"`
	JSON          discountUsageDiscountJSON `json:"-"`
}

func (DiscountUsageDiscount) ImplementsDiscount added in v0.89.1

func (r DiscountUsageDiscount) ImplementsDiscount()

func (*DiscountUsageDiscount) UnmarshalJSON

func (r *DiscountUsageDiscount) UnmarshalJSON(data []byte) (err error)

type DiscountUsageDiscountDiscountType

type DiscountUsageDiscountDiscountType string
const (
	DiscountUsageDiscountDiscountTypeUsage DiscountUsageDiscountDiscountType = "usage"
)

func (DiscountUsageDiscountDiscountType) IsKnown

type DiscountUsageDiscountParam added in v0.35.0

type DiscountUsageDiscountParam struct {
	// List of price_ids that this discount applies to. For plan/plan phase discounts,
	// this can be a subset of prices.
	AppliesToPriceIDs param.Field[[]string]                          `json:"applies_to_price_ids,required"`
	DiscountType      param.Field[DiscountUsageDiscountDiscountType] `json:"discount_type,required"`
	// Only available if discount_type is `usage`. Number of usage units that this
	// discount is for
	UsageDiscount param.Field[float64] `json:"usage_discount,required"`
	Reason        param.Field[string]  `json:"reason"`
}

func (DiscountUsageDiscountParam) ImplementsDiscountUnionParam added in v0.89.1

func (r DiscountUsageDiscountParam) ImplementsDiscountUnionParam()

func (DiscountUsageDiscountParam) MarshalJSON added in v0.35.0

func (r DiscountUsageDiscountParam) MarshalJSON() (data []byte, err error)

type FixedFeeQuantityScheduleEntryModel added in v0.103.0

type FixedFeeQuantityScheduleEntryModel struct {
	EndDate   time.Time                              `json:"end_date,required,nullable" format:"date-time"`
	PriceID   string                                 `json:"price_id,required"`
	Quantity  float64                                `json:"quantity,required"`
	StartDate time.Time                              `json:"start_date,required" format:"date-time"`
	JSON      fixedFeeQuantityScheduleEntryModelJSON `json:"-"`
}

func (*FixedFeeQuantityScheduleEntryModel) UnmarshalJSON added in v0.103.0

func (r *FixedFeeQuantityScheduleEntryModel) UnmarshalJSON(data []byte) (err error)

type InvoiceLevelDiscount added in v0.67.0

type InvoiceLevelDiscount struct {
	// This field can have the runtime type of [[]string].
	AppliesToPriceIDs interface{}                      `json:"applies_to_price_ids,required"`
	DiscountType      InvoiceLevelDiscountDiscountType `json:"discount_type,required"`
	// Only available if discount_type is `amount`.
	AmountDiscount string `json:"amount_discount"`
	// Only available if discount_type is `percentage`. This is a number between 0
	// and 1.
	PercentageDiscount float64 `json:"percentage_discount"`
	Reason             string  `json:"reason,nullable"`
	// Only available if discount_type is `trial`
	TrialAmountDiscount string `json:"trial_amount_discount,nullable"`
	// Only available if discount_type is `trial`
	TrialPercentageDiscount float64                  `json:"trial_percentage_discount,nullable"`
	JSON                    invoiceLevelDiscountJSON `json:"-"`
	// contains filtered or unexported fields
}

func (InvoiceLevelDiscount) AsUnion added in v0.67.0

AsUnion returns a InvoiceLevelDiscountUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are shared.PercentageDiscount, shared.AmountDiscount, shared.TrialDiscount.

func (*InvoiceLevelDiscount) UnmarshalJSON added in v0.67.0

func (r *InvoiceLevelDiscount) UnmarshalJSON(data []byte) (err error)

type InvoiceLevelDiscountDiscountType added in v0.67.0

type InvoiceLevelDiscountDiscountType string
const (
	InvoiceLevelDiscountDiscountTypePercentage InvoiceLevelDiscountDiscountType = "percentage"
	InvoiceLevelDiscountDiscountTypeAmount     InvoiceLevelDiscountDiscountType = "amount"
	InvoiceLevelDiscountDiscountTypeTrial      InvoiceLevelDiscountDiscountType = "trial"
)

func (InvoiceLevelDiscountDiscountType) IsKnown added in v0.67.0

type InvoiceLevelDiscountUnion added in v0.67.0

type InvoiceLevelDiscountUnion interface {
	ImplementsInvoiceLevelDiscount()
}

Union satisfied by shared.PercentageDiscount, shared.AmountDiscount or shared.TrialDiscount.

type InvoiceLineItemModel added in v0.103.0

type InvoiceLineItemModel struct {
	// A unique ID for this line item.
	ID string `json:"id,required"`
	// The line amount after any adjustments and before overage conversion, credits and
	// partial invoicing.
	AdjustedSubtotal string `json:"adjusted_subtotal,required"`
	// All adjustments (ie. maximums, minimums, discounts) applied to the line item.
	Adjustments []InvoiceLineItemModelAdjustment `json:"adjustments,required"`
	// The final amount for a line item after all adjustments and pre paid credits have
	// been applied.
	Amount string `json:"amount,required"`
	// The number of prepaid credits applied.
	CreditsApplied string   `json:"credits_applied,required"`
	Discount       Discount `json:"discount,required,nullable"`
	// The end date of the range of time applied for this line item's price.
	EndDate time.Time `json:"end_date,required" format:"date-time"`
	// An additional filter that was used to calculate the usage for this line item.
	Filter string `json:"filter,required,nullable"`
	// [DEPRECATED] For configured prices that are split by a grouping key, this will
	// be populated with the key and a value. The `amount` and `subtotal` will be the
	// values for this particular grouping.
	Grouping string `json:"grouping,required,nullable"`
	// This field is deprecated in favor of `adjustments`.
	//
	// Deprecated: deprecated
	Maximum MaximumModel `json:"maximum,required,nullable"`
	// This field is deprecated in favor of `adjustments`.
	//
	// Deprecated: deprecated
	MaximumAmount string `json:"maximum_amount,required,nullable"`
	// This field is deprecated in favor of `adjustments`.
	//
	// Deprecated: deprecated
	Minimum MinimumModel `json:"minimum,required,nullable"`
	// This field is deprecated in favor of `adjustments`.
	//
	// Deprecated: deprecated
	MinimumAmount string `json:"minimum_amount,required,nullable"`
	// The name of the price associated with this line item.
	Name string `json:"name,required"`
	// Any amount applied from a partial invoice
	PartiallyInvoicedAmount string `json:"partially_invoiced_amount,required"`
	// The Price resource represents a price that can be billed on a subscription,
	// resulting in a charge on an invoice in the form of an invoice line item. Prices
	// take a quantity and determine an amount to bill.
	//
	// Orb supports a few different pricing models out of the box. Each of these models
	// is serialized differently in a given Price object. The model_type field
	// determines the key for the configuration object that is present.
	//
	// For more on the types of prices, see
	// [the core concepts documentation](/core-concepts#plan-and-price)
	Price PriceModel `json:"price,required,nullable"`
	// Either the fixed fee quantity or the usage during the service period.
	Quantity float64 `json:"quantity,required"`
	// The start date of the range of time applied for this line item's price.
	StartDate time.Time `json:"start_date,required" format:"date-time"`
	// For complex pricing structures, the line item can be broken down further in
	// `sub_line_items`.
	SubLineItems []InvoiceLineItemModelSubLineItem `json:"sub_line_items,required"`
	// The line amount before before any adjustments.
	Subtotal string `json:"subtotal,required"`
	// An array of tax rates and their incurred tax amounts. Empty if no tax
	// integration is configured.
	TaxAmounts []TaxAmountModel `json:"tax_amounts,required"`
	// A list of customer ids that were used to calculate the usage for this line item.
	UsageCustomerIDs []string                 `json:"usage_customer_ids,required,nullable"`
	JSON             invoiceLineItemModelJSON `json:"-"`
}

func (*InvoiceLineItemModel) UnmarshalJSON added in v0.103.0

func (r *InvoiceLineItemModel) UnmarshalJSON(data []byte) (err error)

type InvoiceLineItemModelAdjustment added in v0.103.0

type InvoiceLineItemModelAdjustment struct {
	ID             string                                        `json:"id,required"`
	AdjustmentType InvoiceLineItemModelAdjustmentsAdjustmentType `json:"adjustment_type,required"`
	// The value applied by an adjustment.
	Amount string `json:"amount,required"`
	// This field can have the runtime type of [[]string].
	AppliesToPriceIDs interface{} `json:"applies_to_price_ids,required"`
	// True for adjustments that apply to an entire invocice, false for adjustments
	// that apply to only one price.
	IsInvoiceLevel bool `json:"is_invoice_level,required"`
	// The reason for the adjustment.
	Reason string `json:"reason,required,nullable"`
	// The amount by which to discount the prices this adjustment applies to in a given
	// billing period.
	AmountDiscount string `json:"amount_discount"`
	// The item ID that revenue from this minimum will be attributed to.
	ItemID string `json:"item_id"`
	// The maximum amount to charge in a given billing period for the prices this
	// adjustment applies to.
	MaximumAmount string `json:"maximum_amount"`
	// The minimum amount to charge in a given billing period for the prices this
	// adjustment applies to.
	MinimumAmount string `json:"minimum_amount"`
	// The percentage (as a value between 0 and 1) by which to discount the price
	// intervals this adjustment applies to in a given billing period.
	PercentageDiscount float64 `json:"percentage_discount"`
	// The number of usage units by which to discount the price this adjustment applies
	// to in a given billing period.
	UsageDiscount float64                            `json:"usage_discount"`
	JSON          invoiceLineItemModelAdjustmentJSON `json:"-"`
	// contains filtered or unexported fields
}

func (*InvoiceLineItemModelAdjustment) UnmarshalJSON added in v0.103.0

func (r *InvoiceLineItemModelAdjustment) UnmarshalJSON(data []byte) (err error)

type InvoiceLineItemModelAdjustmentsAdjustmentType added in v0.103.0

type InvoiceLineItemModelAdjustmentsAdjustmentType string
const (
	InvoiceLineItemModelAdjustmentsAdjustmentTypeUsageDiscount      InvoiceLineItemModelAdjustmentsAdjustmentType = "usage_discount"
	InvoiceLineItemModelAdjustmentsAdjustmentTypeAmountDiscount     InvoiceLineItemModelAdjustmentsAdjustmentType = "amount_discount"
	InvoiceLineItemModelAdjustmentsAdjustmentTypePercentageDiscount InvoiceLineItemModelAdjustmentsAdjustmentType = "percentage_discount"
	InvoiceLineItemModelAdjustmentsAdjustmentTypeMinimum            InvoiceLineItemModelAdjustmentsAdjustmentType = "minimum"
	InvoiceLineItemModelAdjustmentsAdjustmentTypeMaximum            InvoiceLineItemModelAdjustmentsAdjustmentType = "maximum"
)

func (InvoiceLineItemModelAdjustmentsAdjustmentType) IsKnown added in v0.103.0

type InvoiceLineItemModelAdjustmentsMonetaryAmountDiscountAdjustment added in v0.103.0

type InvoiceLineItemModelAdjustmentsMonetaryAmountDiscountAdjustment struct {
	ID             string                                                                        `json:"id,required"`
	AdjustmentType InvoiceLineItemModelAdjustmentsMonetaryAmountDiscountAdjustmentAdjustmentType `json:"adjustment_type,required"`
	// The value applied by an adjustment.
	Amount string `json:"amount,required"`
	// The amount by which to discount the prices this adjustment applies to in a given
	// billing period.
	AmountDiscount string `json:"amount_discount,required"`
	// The price IDs that this adjustment applies to.
	AppliesToPriceIDs []string `json:"applies_to_price_ids,required"`
	// True for adjustments that apply to an entire invocice, false for adjustments
	// that apply to only one price.
	IsInvoiceLevel bool `json:"is_invoice_level,required"`
	// The reason for the adjustment.
	Reason string                                                              `json:"reason,required,nullable"`
	JSON   invoiceLineItemModelAdjustmentsMonetaryAmountDiscountAdjustmentJSON `json:"-"`
}

func (*InvoiceLineItemModelAdjustmentsMonetaryAmountDiscountAdjustment) UnmarshalJSON added in v0.103.0

type InvoiceLineItemModelAdjustmentsMonetaryAmountDiscountAdjustmentAdjustmentType added in v0.103.0

type InvoiceLineItemModelAdjustmentsMonetaryAmountDiscountAdjustmentAdjustmentType string
const (
	InvoiceLineItemModelAdjustmentsMonetaryAmountDiscountAdjustmentAdjustmentTypeAmountDiscount InvoiceLineItemModelAdjustmentsMonetaryAmountDiscountAdjustmentAdjustmentType = "amount_discount"
)

func (InvoiceLineItemModelAdjustmentsMonetaryAmountDiscountAdjustmentAdjustmentType) IsKnown added in v0.103.0

type InvoiceLineItemModelAdjustmentsMonetaryMaximumAdjustment added in v0.103.0

type InvoiceLineItemModelAdjustmentsMonetaryMaximumAdjustment struct {
	ID             string                                                                 `json:"id,required"`
	AdjustmentType InvoiceLineItemModelAdjustmentsMonetaryMaximumAdjustmentAdjustmentType `json:"adjustment_type,required"`
	// The value applied by an adjustment.
	Amount string `json:"amount,required"`
	// The price IDs that this adjustment applies to.
	AppliesToPriceIDs []string `json:"applies_to_price_ids,required"`
	// True for adjustments that apply to an entire invocice, false for adjustments
	// that apply to only one price.
	IsInvoiceLevel bool `json:"is_invoice_level,required"`
	// The maximum amount to charge in a given billing period for the prices this
	// adjustment applies to.
	MaximumAmount string `json:"maximum_amount,required"`
	// The reason for the adjustment.
	Reason string                                                       `json:"reason,required,nullable"`
	JSON   invoiceLineItemModelAdjustmentsMonetaryMaximumAdjustmentJSON `json:"-"`
}

func (*InvoiceLineItemModelAdjustmentsMonetaryMaximumAdjustment) UnmarshalJSON added in v0.103.0

type InvoiceLineItemModelAdjustmentsMonetaryMaximumAdjustmentAdjustmentType added in v0.103.0

type InvoiceLineItemModelAdjustmentsMonetaryMaximumAdjustmentAdjustmentType string
const (
	InvoiceLineItemModelAdjustmentsMonetaryMaximumAdjustmentAdjustmentTypeMaximum InvoiceLineItemModelAdjustmentsMonetaryMaximumAdjustmentAdjustmentType = "maximum"
)

func (InvoiceLineItemModelAdjustmentsMonetaryMaximumAdjustmentAdjustmentType) IsKnown added in v0.103.0

type InvoiceLineItemModelAdjustmentsMonetaryMinimumAdjustment added in v0.103.0

type InvoiceLineItemModelAdjustmentsMonetaryMinimumAdjustment struct {
	ID             string                                                                 `json:"id,required"`
	AdjustmentType InvoiceLineItemModelAdjustmentsMonetaryMinimumAdjustmentAdjustmentType `json:"adjustment_type,required"`
	// The value applied by an adjustment.
	Amount string `json:"amount,required"`
	// The price IDs that this adjustment applies to.
	AppliesToPriceIDs []string `json:"applies_to_price_ids,required"`
	// True for adjustments that apply to an entire invocice, false for adjustments
	// that apply to only one price.
	IsInvoiceLevel bool `json:"is_invoice_level,required"`
	// The item ID that revenue from this minimum will be attributed to.
	ItemID string `json:"item_id,required"`
	// The minimum amount to charge in a given billing period for the prices this
	// adjustment applies to.
	MinimumAmount string `json:"minimum_amount,required"`
	// The reason for the adjustment.
	Reason string                                                       `json:"reason,required,nullable"`
	JSON   invoiceLineItemModelAdjustmentsMonetaryMinimumAdjustmentJSON `json:"-"`
}

func (*InvoiceLineItemModelAdjustmentsMonetaryMinimumAdjustment) UnmarshalJSON added in v0.103.0

type InvoiceLineItemModelAdjustmentsMonetaryMinimumAdjustmentAdjustmentType added in v0.103.0

type InvoiceLineItemModelAdjustmentsMonetaryMinimumAdjustmentAdjustmentType string
const (
	InvoiceLineItemModelAdjustmentsMonetaryMinimumAdjustmentAdjustmentTypeMinimum InvoiceLineItemModelAdjustmentsMonetaryMinimumAdjustmentAdjustmentType = "minimum"
)

func (InvoiceLineItemModelAdjustmentsMonetaryMinimumAdjustmentAdjustmentType) IsKnown added in v0.103.0

type InvoiceLineItemModelAdjustmentsMonetaryPercentageDiscountAdjustment added in v0.103.0

type InvoiceLineItemModelAdjustmentsMonetaryPercentageDiscountAdjustment struct {
	ID             string                                                                            `json:"id,required"`
	AdjustmentType InvoiceLineItemModelAdjustmentsMonetaryPercentageDiscountAdjustmentAdjustmentType `json:"adjustment_type,required"`
	// The value applied by an adjustment.
	Amount string `json:"amount,required"`
	// The price IDs that this adjustment applies to.
	AppliesToPriceIDs []string `json:"applies_to_price_ids,required"`
	// True for adjustments that apply to an entire invocice, false for adjustments
	// that apply to only one price.
	IsInvoiceLevel bool `json:"is_invoice_level,required"`
	// The percentage (as a value between 0 and 1) by which to discount the price
	// intervals this adjustment applies to in a given billing period.
	PercentageDiscount float64 `json:"percentage_discount,required"`
	// The reason for the adjustment.
	Reason string                                                                  `json:"reason,required,nullable"`
	JSON   invoiceLineItemModelAdjustmentsMonetaryPercentageDiscountAdjustmentJSON `json:"-"`
}

func (*InvoiceLineItemModelAdjustmentsMonetaryPercentageDiscountAdjustment) UnmarshalJSON added in v0.103.0

type InvoiceLineItemModelAdjustmentsMonetaryPercentageDiscountAdjustmentAdjustmentType added in v0.103.0

type InvoiceLineItemModelAdjustmentsMonetaryPercentageDiscountAdjustmentAdjustmentType string
const (
	InvoiceLineItemModelAdjustmentsMonetaryPercentageDiscountAdjustmentAdjustmentTypePercentageDiscount InvoiceLineItemModelAdjustmentsMonetaryPercentageDiscountAdjustmentAdjustmentType = "percentage_discount"
)

func (InvoiceLineItemModelAdjustmentsMonetaryPercentageDiscountAdjustmentAdjustmentType) IsKnown added in v0.103.0

type InvoiceLineItemModelAdjustmentsMonetaryUsageDiscountAdjustment added in v0.103.0

type InvoiceLineItemModelAdjustmentsMonetaryUsageDiscountAdjustment struct {
	ID             string                                                                       `json:"id,required"`
	AdjustmentType InvoiceLineItemModelAdjustmentsMonetaryUsageDiscountAdjustmentAdjustmentType `json:"adjustment_type,required"`
	// The value applied by an adjustment.
	Amount string `json:"amount,required"`
	// The price IDs that this adjustment applies to.
	AppliesToPriceIDs []string `json:"applies_to_price_ids,required"`
	// True for adjustments that apply to an entire invocice, false for adjustments
	// that apply to only one price.
	IsInvoiceLevel bool `json:"is_invoice_level,required"`
	// The reason for the adjustment.
	Reason string `json:"reason,required,nullable"`
	// The number of usage units by which to discount the price this adjustment applies
	// to in a given billing period.
	UsageDiscount float64                                                            `json:"usage_discount,required"`
	JSON          invoiceLineItemModelAdjustmentsMonetaryUsageDiscountAdjustmentJSON `json:"-"`
}

func (*InvoiceLineItemModelAdjustmentsMonetaryUsageDiscountAdjustment) UnmarshalJSON added in v0.103.0

type InvoiceLineItemModelAdjustmentsMonetaryUsageDiscountAdjustmentAdjustmentType added in v0.103.0

type InvoiceLineItemModelAdjustmentsMonetaryUsageDiscountAdjustmentAdjustmentType string
const (
	InvoiceLineItemModelAdjustmentsMonetaryUsageDiscountAdjustmentAdjustmentTypeUsageDiscount InvoiceLineItemModelAdjustmentsMonetaryUsageDiscountAdjustmentAdjustmentType = "usage_discount"
)

func (InvoiceLineItemModelAdjustmentsMonetaryUsageDiscountAdjustmentAdjustmentType) IsKnown added in v0.103.0

type InvoiceLineItemModelSubLineItem added in v0.103.0

type InvoiceLineItemModelSubLineItem struct {
	// The total amount for this sub line item.
	Amount   string                               `json:"amount,required"`
	Grouping SubLineItemGroupingModel             `json:"grouping,required,nullable"`
	Name     string                               `json:"name,required"`
	Quantity float64                              `json:"quantity,required"`
	Type     InvoiceLineItemModelSubLineItemsType `json:"type,required"`
	// This field can have the runtime type of
	// [InvoiceLineItemModelSubLineItemsMatrixSubLineItemMatrixConfig].
	MatrixConfig interface{} `json:"matrix_config"`
	// This field can have the runtime type of
	// [InvoiceLineItemModelSubLineItemsTierSubLineItemTierConfig].
	TierConfig interface{}                         `json:"tier_config"`
	JSON       invoiceLineItemModelSubLineItemJSON `json:"-"`
	// contains filtered or unexported fields
}

func (InvoiceLineItemModelSubLineItem) AsUnion added in v0.103.0

AsUnion returns a InvoiceLineItemModelSubLineItemsUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are shared.InvoiceLineItemModelSubLineItemsMatrixSubLineItem, shared.InvoiceLineItemModelSubLineItemsTierSubLineItem, shared.InvoiceLineItemModelSubLineItemsOtherSubLineItem.

func (*InvoiceLineItemModelSubLineItem) UnmarshalJSON added in v0.103.0

func (r *InvoiceLineItemModelSubLineItem) UnmarshalJSON(data []byte) (err error)

type InvoiceLineItemModelSubLineItemsMatrixSubLineItem added in v0.103.0

type InvoiceLineItemModelSubLineItemsMatrixSubLineItem struct {
	// The total amount for this sub line item.
	Amount       string                                                        `json:"amount,required"`
	Grouping     SubLineItemGroupingModel                                      `json:"grouping,required,nullable"`
	MatrixConfig InvoiceLineItemModelSubLineItemsMatrixSubLineItemMatrixConfig `json:"matrix_config,required"`
	Name         string                                                        `json:"name,required"`
	Quantity     float64                                                       `json:"quantity,required"`
	Type         InvoiceLineItemModelSubLineItemsMatrixSubLineItemType         `json:"type,required"`
	JSON         invoiceLineItemModelSubLineItemsMatrixSubLineItemJSON         `json:"-"`
}

func (*InvoiceLineItemModelSubLineItemsMatrixSubLineItem) UnmarshalJSON added in v0.103.0

func (r *InvoiceLineItemModelSubLineItemsMatrixSubLineItem) UnmarshalJSON(data []byte) (err error)

type InvoiceLineItemModelSubLineItemsMatrixSubLineItemMatrixConfig added in v0.103.0

type InvoiceLineItemModelSubLineItemsMatrixSubLineItemMatrixConfig struct {
	// The ordered dimension values for this line item.
	DimensionValues []string                                                          `json:"dimension_values,required"`
	JSON            invoiceLineItemModelSubLineItemsMatrixSubLineItemMatrixConfigJSON `json:"-"`
}

func (*InvoiceLineItemModelSubLineItemsMatrixSubLineItemMatrixConfig) UnmarshalJSON added in v0.103.0

type InvoiceLineItemModelSubLineItemsMatrixSubLineItemType added in v0.103.0

type InvoiceLineItemModelSubLineItemsMatrixSubLineItemType string
const (
	InvoiceLineItemModelSubLineItemsMatrixSubLineItemTypeMatrix InvoiceLineItemModelSubLineItemsMatrixSubLineItemType = "matrix"
)

func (InvoiceLineItemModelSubLineItemsMatrixSubLineItemType) IsKnown added in v0.103.0

type InvoiceLineItemModelSubLineItemsOtherSubLineItem added in v0.103.0

type InvoiceLineItemModelSubLineItemsOtherSubLineItem struct {
	// The total amount for this sub line item.
	Amount   string                                               `json:"amount,required"`
	Grouping SubLineItemGroupingModel                             `json:"grouping,required,nullable"`
	Name     string                                               `json:"name,required"`
	Quantity float64                                              `json:"quantity,required"`
	Type     InvoiceLineItemModelSubLineItemsOtherSubLineItemType `json:"type,required"`
	JSON     invoiceLineItemModelSubLineItemsOtherSubLineItemJSON `json:"-"`
}

func (*InvoiceLineItemModelSubLineItemsOtherSubLineItem) UnmarshalJSON added in v0.103.0

func (r *InvoiceLineItemModelSubLineItemsOtherSubLineItem) UnmarshalJSON(data []byte) (err error)

type InvoiceLineItemModelSubLineItemsOtherSubLineItemType added in v0.103.0

type InvoiceLineItemModelSubLineItemsOtherSubLineItemType string
const (
	InvoiceLineItemModelSubLineItemsOtherSubLineItemTypeNull InvoiceLineItemModelSubLineItemsOtherSubLineItemType = "'null'"
)

func (InvoiceLineItemModelSubLineItemsOtherSubLineItemType) IsKnown added in v0.103.0

type InvoiceLineItemModelSubLineItemsTierSubLineItem added in v0.103.0

type InvoiceLineItemModelSubLineItemsTierSubLineItem struct {
	// The total amount for this sub line item.
	Amount     string                                                    `json:"amount,required"`
	Grouping   SubLineItemGroupingModel                                  `json:"grouping,required,nullable"`
	Name       string                                                    `json:"name,required"`
	Quantity   float64                                                   `json:"quantity,required"`
	TierConfig InvoiceLineItemModelSubLineItemsTierSubLineItemTierConfig `json:"tier_config,required"`
	Type       InvoiceLineItemModelSubLineItemsTierSubLineItemType       `json:"type,required"`
	JSON       invoiceLineItemModelSubLineItemsTierSubLineItemJSON       `json:"-"`
}

func (*InvoiceLineItemModelSubLineItemsTierSubLineItem) UnmarshalJSON added in v0.103.0

func (r *InvoiceLineItemModelSubLineItemsTierSubLineItem) UnmarshalJSON(data []byte) (err error)

type InvoiceLineItemModelSubLineItemsTierSubLineItemTierConfig added in v0.103.0

type InvoiceLineItemModelSubLineItemsTierSubLineItemTierConfig struct {
	FirstUnit  float64                                                       `json:"first_unit,required"`
	LastUnit   float64                                                       `json:"last_unit,required,nullable"`
	UnitAmount string                                                        `json:"unit_amount,required"`
	JSON       invoiceLineItemModelSubLineItemsTierSubLineItemTierConfigJSON `json:"-"`
}

func (*InvoiceLineItemModelSubLineItemsTierSubLineItemTierConfig) UnmarshalJSON added in v0.103.0

type InvoiceLineItemModelSubLineItemsTierSubLineItemType added in v0.103.0

type InvoiceLineItemModelSubLineItemsTierSubLineItemType string
const (
	InvoiceLineItemModelSubLineItemsTierSubLineItemTypeTier InvoiceLineItemModelSubLineItemsTierSubLineItemType = "tier"
)

func (InvoiceLineItemModelSubLineItemsTierSubLineItemType) IsKnown added in v0.103.0

type InvoiceLineItemModelSubLineItemsType added in v0.103.0

type InvoiceLineItemModelSubLineItemsType string
const (
	InvoiceLineItemModelSubLineItemsTypeMatrix InvoiceLineItemModelSubLineItemsType = "matrix"
	InvoiceLineItemModelSubLineItemsTypeTier   InvoiceLineItemModelSubLineItemsType = "tier"
	InvoiceLineItemModelSubLineItemsTypeNull   InvoiceLineItemModelSubLineItemsType = "'null'"
)

func (InvoiceLineItemModelSubLineItemsType) IsKnown added in v0.103.0

type InvoiceLineItemModelSubLineItemsUnion added in v0.103.0

type InvoiceLineItemModelSubLineItemsUnion interface {
	// contains filtered or unexported methods
}

Union satisfied by shared.InvoiceLineItemModelSubLineItemsMatrixSubLineItem, shared.InvoiceLineItemModelSubLineItemsTierSubLineItem or shared.InvoiceLineItemModelSubLineItemsOtherSubLineItem.

type InvoiceModel added in v0.103.0

type InvoiceModel struct {
	ID string `json:"id,required"`
	// This is the final amount required to be charged to the customer and reflects the
	// application of the customer balance to the `total` of the invoice.
	AmountDue      string              `json:"amount_due,required"`
	AutoCollection AutoCollectionModel `json:"auto_collection,required"`
	BillingAddress AddressModel        `json:"billing_address,required,nullable"`
	// The creation time of the resource in Orb.
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// A list of credit notes associated with the invoice
	CreditNotes []CreditNoteSummaryModel `json:"credit_notes,required"`
	// An ISO 4217 currency string or `credits`
	Currency                    string                            `json:"currency,required"`
	Customer                    CustomerMinifiedModel             `json:"customer,required"`
	CustomerBalanceTransactions []CustomerBalanceTransactionModel `json:"customer_balance_transactions,required"`
	// Tax IDs are commonly required to be displayed on customer invoices, which are
	// added to the headers of invoices.
	//
	// ### Supported Tax ID Countries and Types
	//
	// | Country              | Type         | Description                                                                                             |
	// | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- |
	// | Andorra              | `ad_nrt`     | Andorran NRT Number                                                                                     |
	// | Argentina            | `ar_cuit`    | Argentinian Tax ID Number                                                                               |
	// | Australia            | `au_abn`     | Australian Business Number (AU ABN)                                                                     |
	// | Australia            | `au_arn`     | Australian Taxation Office Reference Number                                                             |
	// | Austria              | `eu_vat`     | European VAT Number                                                                                     |
	// | Bahrain              | `bh_vat`     | Bahraini VAT Number                                                                                     |
	// | Belgium              | `eu_vat`     | European VAT Number                                                                                     |
	// | Bolivia              | `bo_tin`     | Bolivian Tax ID                                                                                         |
	// | Brazil               | `br_cnpj`    | Brazilian CNPJ Number                                                                                   |
	// | Brazil               | `br_cpf`     | Brazilian CPF Number                                                                                    |
	// | Bulgaria             | `bg_uic`     | Bulgaria Unified Identification Code                                                                    |
	// | Bulgaria             | `eu_vat`     | European VAT Number                                                                                     |
	// | Canada               | `ca_bn`      | Canadian BN                                                                                             |
	// | Canada               | `ca_gst_hst` | Canadian GST/HST Number                                                                                 |
	// | Canada               | `ca_pst_bc`  | Canadian PST Number (British Columbia)                                                                  |
	// | Canada               | `ca_pst_mb`  | Canadian PST Number (Manitoba)                                                                          |
	// | Canada               | `ca_pst_sk`  | Canadian PST Number (Saskatchewan)                                                                      |
	// | Canada               | `ca_qst`     | Canadian QST Number (Québec)                                                                            |
	// | Chile                | `cl_tin`     | Chilean TIN                                                                                             |
	// | China                | `cn_tin`     | Chinese Tax ID                                                                                          |
	// | Colombia             | `co_nit`     | Colombian NIT Number                                                                                    |
	// | Costa Rica           | `cr_tin`     | Costa Rican Tax ID                                                                                      |
	// | Croatia              | `eu_vat`     | European VAT Number                                                                                     |
	// | Cyprus               | `eu_vat`     | European VAT Number                                                                                     |
	// | Czech Republic       | `eu_vat`     | European VAT Number                                                                                     |
	// | Denmark              | `eu_vat`     | European VAT Number                                                                                     |
	// | Dominican Republic   | `do_rcn`     | Dominican RCN Number                                                                                    |
	// | Ecuador              | `ec_ruc`     | Ecuadorian RUC Number                                                                                   |
	// | Egypt                | `eg_tin`     | Egyptian Tax Identification Number                                                                      |
	// | El Salvador          | `sv_nit`     | El Salvadorian NIT Number                                                                               |
	// | Estonia              | `eu_vat`     | European VAT Number                                                                                     |
	// | EU                   | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme                                                  |
	// | Finland              | `eu_vat`     | European VAT Number                                                                                     |
	// | France               | `eu_vat`     | European VAT Number                                                                                     |
	// | Georgia              | `ge_vat`     | Georgian VAT                                                                                            |
	// | Germany              | `eu_vat`     | European VAT Number                                                                                     |
	// | Greece               | `eu_vat`     | European VAT Number                                                                                     |
	// | Hong Kong            | `hk_br`      | Hong Kong BR Number                                                                                     |
	// | Hungary              | `eu_vat`     | European VAT Number                                                                                     |
	// | Hungary              | `hu_tin`     | Hungary Tax Number (adószám)                                                                            |
	// | Iceland              | `is_vat`     | Icelandic VAT                                                                                           |
	// | India                | `in_gst`     | Indian GST Number                                                                                       |
	// | Indonesia            | `id_npwp`    | Indonesian NPWP Number                                                                                  |
	// | Ireland              | `eu_vat`     | European VAT Number                                                                                     |
	// | Israel               | `il_vat`     | Israel VAT                                                                                              |
	// | Italy                | `eu_vat`     | European VAT Number                                                                                     |
	// | Japan                | `jp_cn`      | Japanese Corporate Number (_Hōjin Bangō_)                                                               |
	// | Japan                | `jp_rn`      | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
	// | Japan                | `jp_trn`     | Japanese Tax Registration Number (_Tōroku Bangō_)                                                       |
	// | Kazakhstan           | `kz_bin`     | Kazakhstani Business Identification Number                                                              |
	// | Kenya                | `ke_pin`     | Kenya Revenue Authority Personal Identification Number                                                  |
	// | Latvia               | `eu_vat`     | European VAT Number                                                                                     |
	// | Liechtenstein        | `li_uid`     | Liechtensteinian UID Number                                                                             |
	// | Lithuania            | `eu_vat`     | European VAT Number                                                                                     |
	// | Luxembourg           | `eu_vat`     | European VAT Number                                                                                     |
	// | Malaysia             | `my_frp`     | Malaysian FRP Number                                                                                    |
	// | Malaysia             | `my_itn`     | Malaysian ITN                                                                                           |
	// | Malaysia             | `my_sst`     | Malaysian SST Number                                                                                    |
	// | Malta                | `eu_vat `    | European VAT Number                                                                                     |
	// | Mexico               | `mx_rfc`     | Mexican RFC Number                                                                                      |
	// | Netherlands          | `eu_vat`     | European VAT Number                                                                                     |
	// | New Zealand          | `nz_gst`     | New Zealand GST Number                                                                                  |
	// | Nigeria              | `ng_tin`     | Nigerian Tax Identification Number                                                                      |
	// | Norway               | `no_vat`     | Norwegian VAT Number                                                                                    |
	// | Norway               | `no_voec`    | Norwegian VAT on e-commerce Number                                                                      |
	// | Oman                 | `om_vat`     | Omani VAT Number                                                                                        |
	// | Peru                 | `pe_ruc`     | Peruvian RUC Number                                                                                     |
	// | Philippines          | `ph_tin `    | Philippines Tax Identification Number                                                                   |
	// | Poland               | `eu_vat`     | European VAT Number                                                                                     |
	// | Portugal             | `eu_vat`     | European VAT Number                                                                                     |
	// | Romania              | `eu_vat`     | European VAT Number                                                                                     |
	// | Romania              | `ro_tin`     | Romanian Tax ID Number                                                                                  |
	// | Russia               | `ru_inn`     | Russian INN                                                                                             |
	// | Russia               | `ru_kpp`     | Russian KPP                                                                                             |
	// | Saudi Arabia         | `sa_vat`     | Saudi Arabia VAT                                                                                        |
	// | Serbia               | `rs_pib`     | Serbian PIB Number                                                                                      |
	// | Singapore            | `sg_gst`     | Singaporean GST                                                                                         |
	// | Singapore            | `sg_uen`     | Singaporean UEN                                                                                         |
	// | Slovakia             | `eu_vat`     | European VAT Number                                                                                     |
	// | Slovenia             | `eu_vat`     | European VAT Number                                                                                     |
	// | Slovenia             | `si_tin`     | Slovenia Tax Number (davčna številka)                                                                   |
	// | South Africa         | `za_vat`     | South African VAT Number                                                                                |
	// | South Korea          | `kr_brn`     | Korean BRN                                                                                              |
	// | Spain                | `es_cif`     | Spanish NIF Number (previously Spanish CIF Number)                                                      |
	// | Spain                | `eu_vat`     | European VAT Number                                                                                     |
	// | Sweden               | `eu_vat`     | European VAT Number                                                                                     |
	// | Switzerland          | `ch_vat`     | Switzerland VAT Number                                                                                  |
	// | Taiwan               | `tw_vat`     | Taiwanese VAT                                                                                           |
	// | Thailand             | `th_vat`     | Thai VAT                                                                                                |
	// | Turkey               | `tr_tin`     | Turkish Tax Identification Number                                                                       |
	// | Ukraine              | `ua_vat`     | Ukrainian VAT                                                                                           |
	// | United Arab Emirates | `ae_trn`     | United Arab Emirates TRN                                                                                |
	// | United Kingdom       | `eu_vat`     | Northern Ireland VAT Number                                                                             |
	// | United Kingdom       | `gb_vat`     | United Kingdom VAT Number                                                                               |
	// | United States        | `us_ein`     | United States EIN                                                                                       |
	// | Uruguay              | `uy_ruc`     | Uruguayan RUC Number                                                                                    |
	// | Venezuela            | `ve_rif`     | Venezuelan RIF Number                                                                                   |
	// | Vietnam              | `vn_tin`     | Vietnamese Tax ID Number                                                                                |
	CustomerTaxID CustomerTaxIDModel `json:"customer_tax_id,required,nullable"`
	// This field is deprecated in favor of `discounts`. If a `discounts` list is
	// provided, the first discount in the list will be returned. If the list is empty,
	// `None` will be returned.
	//
	// Deprecated: deprecated
	Discount  interface{}            `json:"discount,required"`
	Discounts []InvoiceLevelDiscount `json:"discounts,required"`
	// When the invoice payment is due. The due date is null if the invoice is not yet
	// finalized.
	DueDate time.Time `json:"due_date,required,nullable" format:"date-time"`
	// If the invoice has a status of `draft`, this will be the time that the invoice
	// will be eligible to be issued, otherwise it will be `null`. If `auto-issue` is
	// true, the invoice will automatically begin issuing at this time.
	EligibleToIssueAt time.Time `json:"eligible_to_issue_at,required,nullable" format:"date-time"`
	// A URL for the customer-facing invoice portal. This URL expires 30 days after the
	// invoice's due date, or 60 days after being re-generated through the UI.
	HostedInvoiceURL string `json:"hosted_invoice_url,required,nullable"`
	// The scheduled date of the invoice
	InvoiceDate time.Time `json:"invoice_date,required" format:"date-time"`
	// Automatically generated invoice number to help track and reconcile invoices.
	// Invoice numbers have a prefix such as `RFOBWG`. These can be sequential per
	// account or customer.
	InvoiceNumber string `json:"invoice_number,required"`
	// The link to download the PDF representation of the `Invoice`.
	InvoicePdf    string                    `json:"invoice_pdf,required,nullable"`
	InvoiceSource InvoiceModelInvoiceSource `json:"invoice_source,required"`
	// If the invoice failed to issue, this will be the last time it failed to issue
	// (even if it is now in a different state.)
	IssueFailedAt time.Time `json:"issue_failed_at,required,nullable" format:"date-time"`
	// If the invoice has been issued, this will be the time it transitioned to
	// `issued` (even if it is now in a different state.)
	IssuedAt time.Time `json:"issued_at,required,nullable" format:"date-time"`
	// The breakdown of prices in this invoice.
	LineItems     []InvoiceLineItemModel `json:"line_items,required"`
	Maximum       MaximumModel           `json:"maximum,required,nullable"`
	MaximumAmount string                 `json:"maximum_amount,required,nullable"`
	// Free-form text which is available on the invoice PDF and the Orb invoice portal.
	Memo string `json:"memo,required,nullable"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata      map[string]string `json:"metadata,required"`
	Minimum       MinimumModel      `json:"minimum,required,nullable"`
	MinimumAmount string            `json:"minimum_amount,required,nullable"`
	// If the invoice has a status of `paid`, this gives a timestamp when the invoice
	// was paid.
	PaidAt time.Time `json:"paid_at,required,nullable" format:"date-time"`
	// A list of payment attempts associated with the invoice
	PaymentAttempts []PaymentAttemptModel `json:"payment_attempts,required"`
	// If payment was attempted on this invoice but failed, this will be the time of
	// the most recent attempt.
	PaymentFailedAt time.Time `json:"payment_failed_at,required,nullable" format:"date-time"`
	// If payment was attempted on this invoice, this will be the start time of the
	// most recent attempt. This field is especially useful for delayed-notification
	// payment mechanisms (like bank transfers), where payment can take 3 days or more.
	PaymentStartedAt time.Time `json:"payment_started_at,required,nullable" format:"date-time"`
	// If the invoice is in draft, this timestamp will reflect when the invoice is
	// scheduled to be issued.
	ScheduledIssueAt time.Time                 `json:"scheduled_issue_at,required,nullable" format:"date-time"`
	ShippingAddress  AddressModel              `json:"shipping_address,required,nullable"`
	Status           InvoiceModelStatus        `json:"status,required"`
	Subscription     SubscriptionMinifiedModel `json:"subscription,required,nullable"`
	// The total before any discounts and minimums are applied.
	Subtotal string `json:"subtotal,required"`
	// If the invoice failed to sync, this will be the last time an external invoicing
	// provider sync was attempted. This field will always be `null` for invoices using
	// Orb Invoicing.
	SyncFailedAt time.Time `json:"sync_failed_at,required,nullable" format:"date-time"`
	// The total after any minimums and discounts have been applied.
	Total string `json:"total,required"`
	// If the invoice has a status of `void`, this gives a timestamp when the invoice
	// was voided.
	VoidedAt time.Time `json:"voided_at,required,nullable" format:"date-time"`
	// This is true if the invoice will be automatically issued in the future, and
	// false otherwise.
	WillAutoIssue bool             `json:"will_auto_issue,required"`
	JSON          invoiceModelJSON `json:"-"`
}

An [`Invoice`](/core-concepts#invoice) is a fundamental billing entity, representing the request for payment for a single subscription. This includes a set of line items, which correspond to prices in the subscription's plan and can represent fixed recurring fees or usage-based fees. They are generated at the end of a billing period, or as the result of an action, such as a cancellation.

func (*InvoiceModel) UnmarshalJSON added in v0.103.0

func (r *InvoiceModel) UnmarshalJSON(data []byte) (err error)

type InvoiceModelInvoiceSource added in v0.103.0

type InvoiceModelInvoiceSource string
const (
	InvoiceModelInvoiceSourceSubscription InvoiceModelInvoiceSource = "subscription"
	InvoiceModelInvoiceSourcePartial      InvoiceModelInvoiceSource = "partial"
	InvoiceModelInvoiceSourceOneOff       InvoiceModelInvoiceSource = "one_off"
)

func (InvoiceModelInvoiceSource) IsKnown added in v0.103.0

func (r InvoiceModelInvoiceSource) IsKnown() bool

type InvoiceModelStatus added in v0.103.0

type InvoiceModelStatus string
const (
	InvoiceModelStatusIssued InvoiceModelStatus = "issued"
	InvoiceModelStatusPaid   InvoiceModelStatus = "paid"
	InvoiceModelStatusSynced InvoiceModelStatus = "synced"
	InvoiceModelStatusVoid   InvoiceModelStatus = "void"
	InvoiceModelStatusDraft  InvoiceModelStatus = "draft"
)

func (InvoiceModelStatus) IsKnown added in v0.103.0

func (r InvoiceModelStatus) IsKnown() bool

type ItemExternalConnectionModel added in v0.103.0

type ItemExternalConnectionModel struct {
	ExternalConnectionName ItemExternalConnectionModelExternalConnectionName `json:"external_connection_name,required"`
	ExternalEntityID       string                                            `json:"external_entity_id,required"`
	JSON                   itemExternalConnectionModelJSON                   `json:"-"`
}

func (*ItemExternalConnectionModel) UnmarshalJSON added in v0.103.0

func (r *ItemExternalConnectionModel) UnmarshalJSON(data []byte) (err error)

type ItemExternalConnectionModelExternalConnectionName added in v0.103.0

type ItemExternalConnectionModelExternalConnectionName string
const (
	ItemExternalConnectionModelExternalConnectionNameStripe     ItemExternalConnectionModelExternalConnectionName = "stripe"
	ItemExternalConnectionModelExternalConnectionNameQuickbooks ItemExternalConnectionModelExternalConnectionName = "quickbooks"
	ItemExternalConnectionModelExternalConnectionNameBillCom    ItemExternalConnectionModelExternalConnectionName = "bill.com"
	ItemExternalConnectionModelExternalConnectionNameNetsuite   ItemExternalConnectionModelExternalConnectionName = "netsuite"
	ItemExternalConnectionModelExternalConnectionNameTaxjar     ItemExternalConnectionModelExternalConnectionName = "taxjar"
	ItemExternalConnectionModelExternalConnectionNameAvalara    ItemExternalConnectionModelExternalConnectionName = "avalara"
	ItemExternalConnectionModelExternalConnectionNameAnrok      ItemExternalConnectionModelExternalConnectionName = "anrok"
)

func (ItemExternalConnectionModelExternalConnectionName) IsKnown added in v0.103.0

type ItemExternalConnectionModelParam added in v0.103.0

type ItemExternalConnectionModelParam struct {
	ExternalConnectionName param.Field[ItemExternalConnectionModelExternalConnectionName] `json:"external_connection_name,required"`
	ExternalEntityID       param.Field[string]                                            `json:"external_entity_id,required"`
}

func (ItemExternalConnectionModelParam) MarshalJSON added in v0.103.0

func (r ItemExternalConnectionModelParam) MarshalJSON() (data []byte, err error)

type ItemModel added in v0.103.0

type ItemModel struct {
	ID                  string                        `json:"id,required"`
	CreatedAt           time.Time                     `json:"created_at,required" format:"date-time"`
	ExternalConnections []ItemExternalConnectionModel `json:"external_connections,required"`
	Name                string                        `json:"name,required"`
	JSON                itemModelJSON                 `json:"-"`
}

The Item resource represents a sellable product or good. Items are associated with all line items, billable metrics, and prices and are used for defining external sync behavior for invoices and tax calculation purposes.

func (*ItemModel) UnmarshalJSON added in v0.103.0

func (r *ItemModel) UnmarshalJSON(data []byte) (err error)

type ItemSlimModel added in v0.103.0

type ItemSlimModel struct {
	ID   string            `json:"id,required"`
	Name string            `json:"name,required"`
	JSON itemSlimModelJSON `json:"-"`
}

func (*ItemSlimModel) UnmarshalJSON added in v0.103.0

func (r *ItemSlimModel) UnmarshalJSON(data []byte) (err error)

type MatrixConfigModel added in v0.103.0

type MatrixConfigModel struct {
	// Default per unit rate for any usage not bucketed into a specified matrix_value
	DefaultUnitAmount string `json:"default_unit_amount,required"`
	// One or two event property values to evaluate matrix groups by
	Dimensions []string `json:"dimensions,required"`
	// Matrix values for specified matrix grouping keys
	MatrixValues []MatrixValueModel    `json:"matrix_values,required"`
	JSON         matrixConfigModelJSON `json:"-"`
}

func (*MatrixConfigModel) UnmarshalJSON added in v0.103.0

func (r *MatrixConfigModel) UnmarshalJSON(data []byte) (err error)

type MatrixConfigModelParam added in v0.103.0

type MatrixConfigModelParam struct {
	// Default per unit rate for any usage not bucketed into a specified matrix_value
	DefaultUnitAmount param.Field[string] `json:"default_unit_amount,required"`
	// One or two event property values to evaluate matrix groups by
	Dimensions param.Field[[]string] `json:"dimensions,required"`
	// Matrix values for specified matrix grouping keys
	MatrixValues param.Field[[]MatrixValueModelParam] `json:"matrix_values,required"`
}

func (MatrixConfigModelParam) MarshalJSON added in v0.103.0

func (r MatrixConfigModelParam) MarshalJSON() (data []byte, err error)

type MatrixValueModel added in v0.103.0

type MatrixValueModel struct {
	// One or two matrix keys to filter usage to this Matrix value by. For example,
	// ["region", "tier"] could be used to filter cloud usage by a cloud region and an
	// instance tier.
	DimensionValues []string `json:"dimension_values,required"`
	// Unit price for the specified dimension_values
	UnitAmount string               `json:"unit_amount,required"`
	JSON       matrixValueModelJSON `json:"-"`
}

func (*MatrixValueModel) UnmarshalJSON added in v0.103.0

func (r *MatrixValueModel) UnmarshalJSON(data []byte) (err error)

type MatrixValueModelParam added in v0.103.0

type MatrixValueModelParam struct {
	// One or two matrix keys to filter usage to this Matrix value by. For example,
	// ["region", "tier"] could be used to filter cloud usage by a cloud region and an
	// instance tier.
	DimensionValues param.Field[[]string] `json:"dimension_values,required"`
	// Unit price for the specified dimension_values
	UnitAmount param.Field[string] `json:"unit_amount,required"`
}

func (MatrixValueModelParam) MarshalJSON added in v0.103.0

func (r MatrixValueModelParam) MarshalJSON() (data []byte, err error)

type MatrixWithAllocationConfigModel added in v0.103.0

type MatrixWithAllocationConfigModel struct {
	// Allocation to be used to calculate the price
	Allocation float64 `json:"allocation,required"`
	// Default per unit rate for any usage not bucketed into a specified matrix_value
	DefaultUnitAmount string `json:"default_unit_amount,required"`
	// One or two event property values to evaluate matrix groups by
	Dimensions []string `json:"dimensions,required"`
	// Matrix values for specified matrix grouping keys
	MatrixValues []MatrixValueModel                  `json:"matrix_values,required"`
	JSON         matrixWithAllocationConfigModelJSON `json:"-"`
}

func (*MatrixWithAllocationConfigModel) UnmarshalJSON added in v0.103.0

func (r *MatrixWithAllocationConfigModel) UnmarshalJSON(data []byte) (err error)

type MatrixWithAllocationConfigModelParam added in v0.103.0

type MatrixWithAllocationConfigModelParam struct {
	// Allocation to be used to calculate the price
	Allocation param.Field[float64] `json:"allocation,required"`
	// Default per unit rate for any usage not bucketed into a specified matrix_value
	DefaultUnitAmount param.Field[string] `json:"default_unit_amount,required"`
	// One or two event property values to evaluate matrix groups by
	Dimensions param.Field[[]string] `json:"dimensions,required"`
	// Matrix values for specified matrix grouping keys
	MatrixValues param.Field[[]MatrixValueModelParam] `json:"matrix_values,required"`
}

func (MatrixWithAllocationConfigModelParam) MarshalJSON added in v0.103.0

func (r MatrixWithAllocationConfigModelParam) MarshalJSON() (data []byte, err error)

type MaximumIntervalModel added in v0.103.0

type MaximumIntervalModel struct {
	// The price ids that this maximum interval applies to.
	AppliesToPriceIDs []string `json:"applies_to_price_ids,required"`
	// The price interval ids that this maximum interval applies to.
	AppliesToPriceIntervalIDs []string `json:"applies_to_price_interval_ids,required"`
	// The end date of the maximum interval.
	EndDate time.Time `json:"end_date,required,nullable" format:"date-time"`
	// The maximum amount to charge in a given billing period for the price intervals
	// this transform applies to.
	MaximumAmount string `json:"maximum_amount,required"`
	// The start date of the maximum interval.
	StartDate time.Time                `json:"start_date,required" format:"date-time"`
	JSON      maximumIntervalModelJSON `json:"-"`
}

func (*MaximumIntervalModel) UnmarshalJSON added in v0.103.0

func (r *MaximumIntervalModel) UnmarshalJSON(data []byte) (err error)

type MaximumModel added in v0.103.0

type MaximumModel struct {
	// List of price_ids that this maximum amount applies to. For plan/plan phase
	// maximums, this can be a subset of prices.
	AppliesToPriceIDs []string `json:"applies_to_price_ids,required"`
	// Maximum amount applied
	MaximumAmount string           `json:"maximum_amount,required"`
	JSON          maximumModelJSON `json:"-"`
}

func (*MaximumModel) UnmarshalJSON added in v0.103.0

func (r *MaximumModel) UnmarshalJSON(data []byte) (err error)

type MinimumIntervalModel added in v0.103.0

type MinimumIntervalModel struct {
	// The price ids that this minimum interval applies to.
	AppliesToPriceIDs []string `json:"applies_to_price_ids,required"`
	// The price interval ids that this minimum interval applies to.
	AppliesToPriceIntervalIDs []string `json:"applies_to_price_interval_ids,required"`
	// The end date of the minimum interval.
	EndDate time.Time `json:"end_date,required,nullable" format:"date-time"`
	// The minimum amount to charge in a given billing period for the price intervals
	// this minimum applies to.
	MinimumAmount string `json:"minimum_amount,required"`
	// The start date of the minimum interval.
	StartDate time.Time                `json:"start_date,required" format:"date-time"`
	JSON      minimumIntervalModelJSON `json:"-"`
}

func (*MinimumIntervalModel) UnmarshalJSON added in v0.103.0

func (r *MinimumIntervalModel) UnmarshalJSON(data []byte) (err error)

type MinimumModel added in v0.103.0

type MinimumModel struct {
	// List of price_ids that this minimum amount applies to. For plan/plan phase
	// minimums, this can be a subset of prices.
	AppliesToPriceIDs []string `json:"applies_to_price_ids,required"`
	// Minimum amount applied
	MinimumAmount string           `json:"minimum_amount,required"`
	JSON          minimumModelJSON `json:"-"`
}

func (*MinimumModel) UnmarshalJSON added in v0.103.0

func (r *MinimumModel) UnmarshalJSON(data []byte) (err error)

type MutatedSubscriptionModel added in v0.103.0

type MutatedSubscriptionModel struct {
	ID string `json:"id,required"`
	// The current plan phase that is active, only if the subscription's plan has
	// phases.
	ActivePlanPhaseOrder int64 `json:"active_plan_phase_order,required,nullable"`
	// The adjustment intervals for this subscription.
	AdjustmentIntervals []AdjustmentIntervalModel `json:"adjustment_intervals,required"`
	// Determines whether issued invoices for this subscription will automatically be
	// charged with the saved payment method on the due date. This property defaults to
	// the plan's behavior. If null, defaults to the customer's setting.
	AutoCollection                  bool                                 `json:"auto_collection,required,nullable"`
	BillingCycleAnchorConfiguration BillingCycleAnchorConfigurationModel `json:"billing_cycle_anchor_configuration,required"`
	// The day of the month on which the billing cycle is anchored. If the maximum
	// number of days in a month is greater than this value, the last day of the month
	// is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
	// period begins on the 30th.
	BillingCycleDay int64     `json:"billing_cycle_day,required"`
	CreatedAt       time.Time `json:"created_at,required" format:"date-time"`
	// The end of the current billing period. This is an exclusive timestamp, such that
	// the instant returned is not part of the billing period. Set to null for
	// subscriptions that are not currently active.
	CurrentBillingPeriodEndDate time.Time `json:"current_billing_period_end_date,required,nullable" format:"date-time"`
	// The start date of the current billing period. This is an inclusive timestamp;
	// the instant returned is exactly the beginning of the billing period. Set to null
	// if the subscription is not currently active.
	CurrentBillingPeriodStartDate time.Time `json:"current_billing_period_start_date,required,nullable" format:"date-time"`
	// A customer is a buyer of your products, and the other party to the billing
	// relationship.
	//
	// In Orb, customers are assigned system generated identifiers automatically, but
	// it's often desirable to have these match existing identifiers in your system. To
	// avoid having to denormalize Orb ID information, you can pass in an
	// `external_customer_id` with your own identifier. See
	// [Customer ID Aliases](/events-and-metrics/customer-aliases) for further
	// information about how these aliases work in Orb.
	//
	// In addition to having an identifier in your system, a customer may exist in a
	// payment provider solution like Stripe. Use the `payment_provider_id` and the
	// `payment_provider` enum field to express this mapping.
	//
	// A customer also has a timezone (from the standard
	// [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
	// your account's timezone. See [Timezone localization](/essentials/timezones) for
	// information on what this timezone parameter influences within Orb.
	Customer CustomerModel `json:"customer,required"`
	// Determines the default memo on this subscriptions' invoices. Note that if this
	// is not provided, it is determined by the plan configuration.
	DefaultInvoiceMemo string `json:"default_invoice_memo,required,nullable"`
	// The discount intervals for this subscription.
	DiscountIntervals []MutatedSubscriptionModelDiscountInterval `json:"discount_intervals,required"`
	// The date Orb stops billing for this subscription.
	EndDate                  time.Time                            `json:"end_date,required,nullable" format:"date-time"`
	FixedFeeQuantitySchedule []FixedFeeQuantityScheduleEntryModel `json:"fixed_fee_quantity_schedule,required"`
	InvoicingThreshold       string                               `json:"invoicing_threshold,required,nullable"`
	// The maximum intervals for this subscription.
	MaximumIntervals []MaximumIntervalModel `json:"maximum_intervals,required"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata map[string]string `json:"metadata,required"`
	// The minimum intervals for this subscription.
	MinimumIntervals []MinimumIntervalModel `json:"minimum_intervals,required"`
	// Determines the difference between the invoice issue date for subscription
	// invoices as the date that they are due. A value of `0` here represents that the
	// invoice is due on issue, whereas a value of `30` represents that the customer
	// has a month to pay the invoice.
	NetTerms int64 `json:"net_terms,required"`
	// The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
	// subscribed to by a customer. Plans define the billing behavior of the
	// subscription. You can see more about how to configure prices in the
	// [Price resource](/reference/price).
	Plan PlanModel `json:"plan,required"`
	// The price intervals for this subscription.
	PriceIntervals []PriceIntervalModel  `json:"price_intervals,required"`
	RedeemedCoupon CouponRedemptionModel `json:"redeemed_coupon,required,nullable"`
	// The date Orb starts billing for this subscription.
	StartDate time.Time                      `json:"start_date,required" format:"date-time"`
	Status    MutatedSubscriptionModelStatus `json:"status,required"`
	TrialInfo SubscriptionTrialInfoModel     `json:"trial_info,required"`
	JSON      mutatedSubscriptionModelJSON   `json:"-"`
}

func (*MutatedSubscriptionModel) UnmarshalJSON added in v0.103.0

func (r *MutatedSubscriptionModel) UnmarshalJSON(data []byte) (err error)

type MutatedSubscriptionModelDiscountInterval added in v0.103.0

type MutatedSubscriptionModelDiscountInterval struct {
	// This field can have the runtime type of [[]string].
	AppliesToPriceIDs interface{} `json:"applies_to_price_ids,required"`
	// This field can have the runtime type of [[]string].
	AppliesToPriceIntervalIDs interface{}                                           `json:"applies_to_price_interval_ids,required"`
	DiscountType              MutatedSubscriptionModelDiscountIntervalsDiscountType `json:"discount_type,required"`
	// The end date of the discount interval.
	EndDate time.Time `json:"end_date,required,nullable" format:"date-time"`
	// The start date of the discount interval.
	StartDate time.Time `json:"start_date,required" format:"date-time"`
	// Only available if discount_type is `amount`.
	AmountDiscount string `json:"amount_discount"`
	// Only available if discount_type is `percentage`.This is a number between 0
	// and 1.
	PercentageDiscount float64 `json:"percentage_discount"`
	// Only available if discount_type is `usage`. Number of usage units that this
	// discount is for
	UsageDiscount float64                                      `json:"usage_discount"`
	JSON          mutatedSubscriptionModelDiscountIntervalJSON `json:"-"`
	// contains filtered or unexported fields
}

func (MutatedSubscriptionModelDiscountInterval) AsUnion added in v0.103.0

AsUnion returns a MutatedSubscriptionModelDiscountIntervalsUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are shared.AmountDiscountIntervalModel, shared.PercentageDiscountIntervalModel, shared.UsageDiscountIntervalModel.

func (*MutatedSubscriptionModelDiscountInterval) UnmarshalJSON added in v0.103.0

func (r *MutatedSubscriptionModelDiscountInterval) UnmarshalJSON(data []byte) (err error)

type MutatedSubscriptionModelDiscountIntervalsDiscountType added in v0.103.0

type MutatedSubscriptionModelDiscountIntervalsDiscountType string
const (
	MutatedSubscriptionModelDiscountIntervalsDiscountTypeAmount     MutatedSubscriptionModelDiscountIntervalsDiscountType = "amount"
	MutatedSubscriptionModelDiscountIntervalsDiscountTypePercentage MutatedSubscriptionModelDiscountIntervalsDiscountType = "percentage"
	MutatedSubscriptionModelDiscountIntervalsDiscountTypeUsage      MutatedSubscriptionModelDiscountIntervalsDiscountType = "usage"
)

func (MutatedSubscriptionModelDiscountIntervalsDiscountType) IsKnown added in v0.103.0

type MutatedSubscriptionModelDiscountIntervalsUnion added in v0.103.0

type MutatedSubscriptionModelDiscountIntervalsUnion interface {
	ImplementsMutatedSubscriptionModelDiscountInterval()
}

Union satisfied by shared.AmountDiscountIntervalModel, shared.PercentageDiscountIntervalModel or shared.UsageDiscountIntervalModel.

type MutatedSubscriptionModelStatus added in v0.103.0

type MutatedSubscriptionModelStatus string
const (
	MutatedSubscriptionModelStatusActive   MutatedSubscriptionModelStatus = "active"
	MutatedSubscriptionModelStatusEnded    MutatedSubscriptionModelStatus = "ended"
	MutatedSubscriptionModelStatusUpcoming MutatedSubscriptionModelStatus = "upcoming"
)

func (MutatedSubscriptionModelStatus) IsKnown added in v0.103.0

type NewAccountingSyncConfigurationModelAccountingProviderParam added in v0.103.0

type NewAccountingSyncConfigurationModelAccountingProviderParam struct {
	ExternalProviderID param.Field[string] `json:"external_provider_id,required"`
	ProviderType       param.Field[string] `json:"provider_type,required"`
}

func (NewAccountingSyncConfigurationModelAccountingProviderParam) MarshalJSON added in v0.103.0

type NewAccountingSyncConfigurationModelParam added in v0.103.0

type NewAccountingSyncConfigurationModelParam struct {
	AccountingProviders param.Field[[]NewAccountingSyncConfigurationModelAccountingProviderParam] `json:"accounting_providers"`
	Excluded            param.Field[bool]                                                         `json:"excluded"`
}

func (NewAccountingSyncConfigurationModelParam) MarshalJSON added in v0.103.0

func (r NewAccountingSyncConfigurationModelParam) MarshalJSON() (data []byte, err error)

type NewAdjustmentModelAdjustmentType added in v0.103.0

type NewAdjustmentModelAdjustmentType string
const (
	NewAdjustmentModelAdjustmentTypePercentageDiscount NewAdjustmentModelAdjustmentType = "percentage_discount"
	NewAdjustmentModelAdjustmentTypeUsageDiscount      NewAdjustmentModelAdjustmentType = "usage_discount"
	NewAdjustmentModelAdjustmentTypeAmountDiscount     NewAdjustmentModelAdjustmentType = "amount_discount"
	NewAdjustmentModelAdjustmentTypeMinimum            NewAdjustmentModelAdjustmentType = "minimum"
	NewAdjustmentModelAdjustmentTypeMaximum            NewAdjustmentModelAdjustmentType = "maximum"
)

func (NewAdjustmentModelAdjustmentType) IsKnown added in v0.103.0

type NewAdjustmentModelNewAmountDiscountAdjustmentType added in v0.103.0

type NewAdjustmentModelNewAmountDiscountAdjustmentType string
const (
	NewAdjustmentModelNewAmountDiscountAdjustmentTypeAmountDiscount NewAdjustmentModelNewAmountDiscountAdjustmentType = "amount_discount"
)

func (NewAdjustmentModelNewAmountDiscountAdjustmentType) IsKnown added in v0.103.0

type NewAdjustmentModelNewAmountDiscountParam added in v0.103.0

type NewAdjustmentModelNewAmountDiscountParam struct {
	AdjustmentType param.Field[NewAdjustmentModelNewAmountDiscountAdjustmentType] `json:"adjustment_type,required"`
	AmountDiscount param.Field[string]                                            `json:"amount_discount,required"`
	// The set of price IDs to which this adjustment applies.
	AppliesToPriceIDs param.Field[[]string] `json:"applies_to_price_ids,required"`
	// When false, this adjustment will be applied to a single price. Otherwise, it
	// will be applied at the invoice level, possibly to multiple prices.
	IsInvoiceLevel param.Field[bool] `json:"is_invoice_level"`
}

func (NewAdjustmentModelNewAmountDiscountParam) MarshalJSON added in v0.103.0

func (r NewAdjustmentModelNewAmountDiscountParam) MarshalJSON() (data []byte, err error)

type NewAdjustmentModelNewMaximumAdjustmentType added in v0.103.0

type NewAdjustmentModelNewMaximumAdjustmentType string
const (
	NewAdjustmentModelNewMaximumAdjustmentTypeMaximum NewAdjustmentModelNewMaximumAdjustmentType = "maximum"
)

func (NewAdjustmentModelNewMaximumAdjustmentType) IsKnown added in v0.103.0

type NewAdjustmentModelNewMaximumParam added in v0.103.0

type NewAdjustmentModelNewMaximumParam struct {
	AdjustmentType param.Field[NewAdjustmentModelNewMaximumAdjustmentType] `json:"adjustment_type,required"`
	// The set of price IDs to which this adjustment applies.
	AppliesToPriceIDs param.Field[[]string] `json:"applies_to_price_ids,required"`
	MaximumAmount     param.Field[string]   `json:"maximum_amount,required"`
	// When false, this adjustment will be applied to a single price. Otherwise, it
	// will be applied at the invoice level, possibly to multiple prices.
	IsInvoiceLevel param.Field[bool] `json:"is_invoice_level"`
}

func (NewAdjustmentModelNewMaximumParam) MarshalJSON added in v0.103.0

func (r NewAdjustmentModelNewMaximumParam) MarshalJSON() (data []byte, err error)

type NewAdjustmentModelNewMinimumAdjustmentType added in v0.103.0

type NewAdjustmentModelNewMinimumAdjustmentType string
const (
	NewAdjustmentModelNewMinimumAdjustmentTypeMinimum NewAdjustmentModelNewMinimumAdjustmentType = "minimum"
)

func (NewAdjustmentModelNewMinimumAdjustmentType) IsKnown added in v0.103.0

type NewAdjustmentModelNewMinimumParam added in v0.103.0

type NewAdjustmentModelNewMinimumParam struct {
	AdjustmentType param.Field[NewAdjustmentModelNewMinimumAdjustmentType] `json:"adjustment_type,required"`
	// The set of price IDs to which this adjustment applies.
	AppliesToPriceIDs param.Field[[]string] `json:"applies_to_price_ids,required"`
	// The item ID that revenue from this minimum will be attributed to.
	ItemID        param.Field[string] `json:"item_id,required"`
	MinimumAmount param.Field[string] `json:"minimum_amount,required"`
	// When false, this adjustment will be applied to a single price. Otherwise, it
	// will be applied at the invoice level, possibly to multiple prices.
	IsInvoiceLevel param.Field[bool] `json:"is_invoice_level"`
}

func (NewAdjustmentModelNewMinimumParam) MarshalJSON added in v0.103.0

func (r NewAdjustmentModelNewMinimumParam) MarshalJSON() (data []byte, err error)

type NewAdjustmentModelNewPercentageDiscountAdjustmentType added in v0.103.0

type NewAdjustmentModelNewPercentageDiscountAdjustmentType string
const (
	NewAdjustmentModelNewPercentageDiscountAdjustmentTypePercentageDiscount NewAdjustmentModelNewPercentageDiscountAdjustmentType = "percentage_discount"
)

func (NewAdjustmentModelNewPercentageDiscountAdjustmentType) IsKnown added in v0.103.0

type NewAdjustmentModelNewPercentageDiscountParam added in v0.103.0

type NewAdjustmentModelNewPercentageDiscountParam struct {
	AdjustmentType param.Field[NewAdjustmentModelNewPercentageDiscountAdjustmentType] `json:"adjustment_type,required"`
	// The set of price IDs to which this adjustment applies.
	AppliesToPriceIDs  param.Field[[]string] `json:"applies_to_price_ids,required"`
	PercentageDiscount param.Field[float64]  `json:"percentage_discount,required"`
	// When false, this adjustment will be applied to a single price. Otherwise, it
	// will be applied at the invoice level, possibly to multiple prices.
	IsInvoiceLevel param.Field[bool] `json:"is_invoice_level"`
}

func (NewAdjustmentModelNewPercentageDiscountParam) MarshalJSON added in v0.103.0

func (r NewAdjustmentModelNewPercentageDiscountParam) MarshalJSON() (data []byte, err error)

type NewAdjustmentModelNewUsageDiscountAdjustmentType added in v0.103.0

type NewAdjustmentModelNewUsageDiscountAdjustmentType string
const (
	NewAdjustmentModelNewUsageDiscountAdjustmentTypeUsageDiscount NewAdjustmentModelNewUsageDiscountAdjustmentType = "usage_discount"
)

func (NewAdjustmentModelNewUsageDiscountAdjustmentType) IsKnown added in v0.103.0

type NewAdjustmentModelNewUsageDiscountParam added in v0.103.0

type NewAdjustmentModelNewUsageDiscountParam struct {
	AdjustmentType param.Field[NewAdjustmentModelNewUsageDiscountAdjustmentType] `json:"adjustment_type,required"`
	// The set of price IDs to which this adjustment applies.
	AppliesToPriceIDs param.Field[[]string] `json:"applies_to_price_ids,required"`
	UsageDiscount     param.Field[float64]  `json:"usage_discount,required"`
	// When false, this adjustment will be applied to a single price. Otherwise, it
	// will be applied at the invoice level, possibly to multiple prices.
	IsInvoiceLevel param.Field[bool] `json:"is_invoice_level"`
}

func (NewAdjustmentModelNewUsageDiscountParam) MarshalJSON added in v0.103.0

func (r NewAdjustmentModelNewUsageDiscountParam) MarshalJSON() (data []byte, err error)

type NewAdjustmentModelParam added in v0.103.0

type NewAdjustmentModelParam struct {
	AdjustmentType    param.Field[NewAdjustmentModelAdjustmentType] `json:"adjustment_type,required"`
	AppliesToPriceIDs param.Field[interface{}]                      `json:"applies_to_price_ids,required"`
	AmountDiscount    param.Field[string]                           `json:"amount_discount"`
	// When false, this adjustment will be applied to a single price. Otherwise, it
	// will be applied at the invoice level, possibly to multiple prices.
	IsInvoiceLevel param.Field[bool] `json:"is_invoice_level"`
	// The item ID that revenue from this minimum will be attributed to.
	ItemID             param.Field[string]  `json:"item_id"`
	MaximumAmount      param.Field[string]  `json:"maximum_amount"`
	MinimumAmount      param.Field[string]  `json:"minimum_amount"`
	PercentageDiscount param.Field[float64] `json:"percentage_discount"`
	UsageDiscount      param.Field[float64] `json:"usage_discount"`
}

func (NewAdjustmentModelParam) MarshalJSON added in v0.103.0

func (r NewAdjustmentModelParam) MarshalJSON() (data []byte, err error)

type NewAllocationPriceModelCadence added in v0.103.0

type NewAllocationPriceModelCadence string

The cadence at which to allocate the amount to the customer.

const (
	NewAllocationPriceModelCadenceOneTime    NewAllocationPriceModelCadence = "one_time"
	NewAllocationPriceModelCadenceMonthly    NewAllocationPriceModelCadence = "monthly"
	NewAllocationPriceModelCadenceQuarterly  NewAllocationPriceModelCadence = "quarterly"
	NewAllocationPriceModelCadenceSemiAnnual NewAllocationPriceModelCadence = "semi_annual"
	NewAllocationPriceModelCadenceAnnual     NewAllocationPriceModelCadence = "annual"
	NewAllocationPriceModelCadenceCustom     NewAllocationPriceModelCadence = "custom"
)

func (NewAllocationPriceModelCadence) IsKnown added in v0.103.0

type NewAllocationPriceModelParam added in v0.103.0

type NewAllocationPriceModelParam struct {
	// An amount of the currency to allocate to the customer at the specified cadence.
	Amount param.Field[string] `json:"amount,required"`
	// The cadence at which to allocate the amount to the customer.
	Cadence param.Field[NewAllocationPriceModelCadence] `json:"cadence,required"`
	// An ISO 4217 currency string or a custom pricing unit identifier in which to bill
	// this price.
	Currency param.Field[string] `json:"currency,required"`
	// Whether the allocated amount should expire at the end of the cadence or roll
	// over to the next period.
	ExpiresAtEndOfCadence param.Field[bool] `json:"expires_at_end_of_cadence,required"`
}

func (NewAllocationPriceModelParam) MarshalJSON added in v0.103.0

func (r NewAllocationPriceModelParam) MarshalJSON() (data []byte, err error)

type NewBillingCycleConfigurationModelDurationUnit added in v0.103.0

type NewBillingCycleConfigurationModelDurationUnit string

The unit of billing period duration.

const (
	NewBillingCycleConfigurationModelDurationUnitDay   NewBillingCycleConfigurationModelDurationUnit = "day"
	NewBillingCycleConfigurationModelDurationUnitMonth NewBillingCycleConfigurationModelDurationUnit = "month"
)

func (NewBillingCycleConfigurationModelDurationUnit) IsKnown added in v0.103.0

type NewBillingCycleConfigurationModelParam added in v0.103.0

type NewBillingCycleConfigurationModelParam struct {
	// The duration of the billing period.
	Duration param.Field[int64] `json:"duration,required"`
	// The unit of billing period duration.
	DurationUnit param.Field[NewBillingCycleConfigurationModelDurationUnit] `json:"duration_unit,required"`
}

func (NewBillingCycleConfigurationModelParam) MarshalJSON added in v0.103.0

func (r NewBillingCycleConfigurationModelParam) MarshalJSON() (data []byte, err error)

type NewFloatingPriceModelCadence added in v0.103.0

type NewFloatingPriceModelCadence string

The cadence to bill for this price on.

const (
	NewFloatingPriceModelCadenceAnnual     NewFloatingPriceModelCadence = "annual"
	NewFloatingPriceModelCadenceSemiAnnual NewFloatingPriceModelCadence = "semi_annual"
	NewFloatingPriceModelCadenceMonthly    NewFloatingPriceModelCadence = "monthly"
	NewFloatingPriceModelCadenceQuarterly  NewFloatingPriceModelCadence = "quarterly"
	NewFloatingPriceModelCadenceOneTime    NewFloatingPriceModelCadence = "one_time"
	NewFloatingPriceModelCadenceCustom     NewFloatingPriceModelCadence = "custom"
)

func (NewFloatingPriceModelCadence) IsKnown added in v0.103.0

func (r NewFloatingPriceModelCadence) IsKnown() bool

type NewFloatingPriceModelModelType added in v0.103.0

type NewFloatingPriceModelModelType string
const (
	NewFloatingPriceModelModelTypeUnit                            NewFloatingPriceModelModelType = "unit"
	NewFloatingPriceModelModelTypePackage                         NewFloatingPriceModelModelType = "package"
	NewFloatingPriceModelModelTypeMatrix                          NewFloatingPriceModelModelType = "matrix"
	NewFloatingPriceModelModelTypeMatrixWithAllocation            NewFloatingPriceModelModelType = "matrix_with_allocation"
	NewFloatingPriceModelModelTypeTiered                          NewFloatingPriceModelModelType = "tiered"
	NewFloatingPriceModelModelTypeTieredBps                       NewFloatingPriceModelModelType = "tiered_bps"
	NewFloatingPriceModelModelTypeBps                             NewFloatingPriceModelModelType = "bps"
	NewFloatingPriceModelModelTypeBulkBps                         NewFloatingPriceModelModelType = "bulk_bps"
	NewFloatingPriceModelModelTypeBulk                            NewFloatingPriceModelModelType = "bulk"
	NewFloatingPriceModelModelTypeThresholdTotalAmount            NewFloatingPriceModelModelType = "threshold_total_amount"
	NewFloatingPriceModelModelTypeTieredPackage                   NewFloatingPriceModelModelType = "tiered_package"
	NewFloatingPriceModelModelTypeGroupedTiered                   NewFloatingPriceModelModelType = "grouped_tiered"
	NewFloatingPriceModelModelTypeMaxGroupTieredPackage           NewFloatingPriceModelModelType = "max_group_tiered_package"
	NewFloatingPriceModelModelTypeTieredWithMinimum               NewFloatingPriceModelModelType = "tiered_with_minimum"
	NewFloatingPriceModelModelTypePackageWithAllocation           NewFloatingPriceModelModelType = "package_with_allocation"
	NewFloatingPriceModelModelTypeTieredPackageWithMinimum        NewFloatingPriceModelModelType = "tiered_package_with_minimum"
	NewFloatingPriceModelModelTypeUnitWithPercent                 NewFloatingPriceModelModelType = "unit_with_percent"
	NewFloatingPriceModelModelTypeTieredWithProration             NewFloatingPriceModelModelType = "tiered_with_proration"
	NewFloatingPriceModelModelTypeUnitWithProration               NewFloatingPriceModelModelType = "unit_with_proration"
	NewFloatingPriceModelModelTypeGroupedAllocation               NewFloatingPriceModelModelType = "grouped_allocation"
	NewFloatingPriceModelModelTypeGroupedWithProratedMinimum      NewFloatingPriceModelModelType = "grouped_with_prorated_minimum"
	NewFloatingPriceModelModelTypeGroupedWithMeteredMinimum       NewFloatingPriceModelModelType = "grouped_with_metered_minimum"
	NewFloatingPriceModelModelTypeMatrixWithDisplayName           NewFloatingPriceModelModelType = "matrix_with_display_name"
	NewFloatingPriceModelModelTypeBulkWithProration               NewFloatingPriceModelModelType = "bulk_with_proration"
	NewFloatingPriceModelModelTypeGroupedTieredPackage            NewFloatingPriceModelModelType = "grouped_tiered_package"
	NewFloatingPriceModelModelTypeScalableMatrixWithUnitPricing   NewFloatingPriceModelModelType = "scalable_matrix_with_unit_pricing"
	NewFloatingPriceModelModelTypeScalableMatrixWithTieredPricing NewFloatingPriceModelModelType = "scalable_matrix_with_tiered_pricing"
	NewFloatingPriceModelModelTypeCumulativeGroupedBulk           NewFloatingPriceModelModelType = "cumulative_grouped_bulk"
)

func (NewFloatingPriceModelModelType) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingBpsPriceCadence added in v0.103.0

type NewFloatingPriceModelNewFloatingBpsPriceCadence string

The cadence to bill for this price on.

const (
	NewFloatingPriceModelNewFloatingBpsPriceCadenceAnnual     NewFloatingPriceModelNewFloatingBpsPriceCadence = "annual"
	NewFloatingPriceModelNewFloatingBpsPriceCadenceSemiAnnual NewFloatingPriceModelNewFloatingBpsPriceCadence = "semi_annual"
	NewFloatingPriceModelNewFloatingBpsPriceCadenceMonthly    NewFloatingPriceModelNewFloatingBpsPriceCadence = "monthly"
	NewFloatingPriceModelNewFloatingBpsPriceCadenceQuarterly  NewFloatingPriceModelNewFloatingBpsPriceCadence = "quarterly"
	NewFloatingPriceModelNewFloatingBpsPriceCadenceOneTime    NewFloatingPriceModelNewFloatingBpsPriceCadence = "one_time"
	NewFloatingPriceModelNewFloatingBpsPriceCadenceCustom     NewFloatingPriceModelNewFloatingBpsPriceCadence = "custom"
)

func (NewFloatingPriceModelNewFloatingBpsPriceCadence) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingBpsPriceModelType added in v0.103.0

type NewFloatingPriceModelNewFloatingBpsPriceModelType string
const (
	NewFloatingPriceModelNewFloatingBpsPriceModelTypeBps NewFloatingPriceModelNewFloatingBpsPriceModelType = "bps"
)

func (NewFloatingPriceModelNewFloatingBpsPriceModelType) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingBpsPriceParam added in v0.103.0

type NewFloatingPriceModelNewFloatingBpsPriceParam struct {
	BpsConfig param.Field[BpsConfigModelParam] `json:"bps_config,required"`
	// The cadence to bill for this price on.
	Cadence param.Field[NewFloatingPriceModelNewFloatingBpsPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                            `json:"item_id,required"`
	ModelType param.Field[NewFloatingPriceModelNewFloatingBpsPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (NewFloatingPriceModelNewFloatingBpsPriceParam) MarshalJSON added in v0.103.0

func (r NewFloatingPriceModelNewFloatingBpsPriceParam) MarshalJSON() (data []byte, err error)

type NewFloatingPriceModelNewFloatingBulkBpsPriceCadence added in v0.103.0

type NewFloatingPriceModelNewFloatingBulkBpsPriceCadence string

The cadence to bill for this price on.

const (
	NewFloatingPriceModelNewFloatingBulkBpsPriceCadenceAnnual     NewFloatingPriceModelNewFloatingBulkBpsPriceCadence = "annual"
	NewFloatingPriceModelNewFloatingBulkBpsPriceCadenceSemiAnnual NewFloatingPriceModelNewFloatingBulkBpsPriceCadence = "semi_annual"
	NewFloatingPriceModelNewFloatingBulkBpsPriceCadenceMonthly    NewFloatingPriceModelNewFloatingBulkBpsPriceCadence = "monthly"
	NewFloatingPriceModelNewFloatingBulkBpsPriceCadenceQuarterly  NewFloatingPriceModelNewFloatingBulkBpsPriceCadence = "quarterly"
	NewFloatingPriceModelNewFloatingBulkBpsPriceCadenceOneTime    NewFloatingPriceModelNewFloatingBulkBpsPriceCadence = "one_time"
	NewFloatingPriceModelNewFloatingBulkBpsPriceCadenceCustom     NewFloatingPriceModelNewFloatingBulkBpsPriceCadence = "custom"
)

func (NewFloatingPriceModelNewFloatingBulkBpsPriceCadence) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingBulkBpsPriceModelType added in v0.103.0

type NewFloatingPriceModelNewFloatingBulkBpsPriceModelType string
const (
	NewFloatingPriceModelNewFloatingBulkBpsPriceModelTypeBulkBps NewFloatingPriceModelNewFloatingBulkBpsPriceModelType = "bulk_bps"
)

func (NewFloatingPriceModelNewFloatingBulkBpsPriceModelType) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingBulkBpsPriceParam added in v0.103.0

type NewFloatingPriceModelNewFloatingBulkBpsPriceParam struct {
	BulkBpsConfig param.Field[BulkBpsConfigModelParam] `json:"bulk_bps_config,required"`
	// The cadence to bill for this price on.
	Cadence param.Field[NewFloatingPriceModelNewFloatingBulkBpsPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                `json:"item_id,required"`
	ModelType param.Field[NewFloatingPriceModelNewFloatingBulkBpsPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (NewFloatingPriceModelNewFloatingBulkBpsPriceParam) MarshalJSON added in v0.103.0

func (r NewFloatingPriceModelNewFloatingBulkBpsPriceParam) MarshalJSON() (data []byte, err error)

type NewFloatingPriceModelNewFloatingBulkPriceCadence added in v0.103.0

type NewFloatingPriceModelNewFloatingBulkPriceCadence string

The cadence to bill for this price on.

const (
	NewFloatingPriceModelNewFloatingBulkPriceCadenceAnnual     NewFloatingPriceModelNewFloatingBulkPriceCadence = "annual"
	NewFloatingPriceModelNewFloatingBulkPriceCadenceSemiAnnual NewFloatingPriceModelNewFloatingBulkPriceCadence = "semi_annual"
	NewFloatingPriceModelNewFloatingBulkPriceCadenceMonthly    NewFloatingPriceModelNewFloatingBulkPriceCadence = "monthly"
	NewFloatingPriceModelNewFloatingBulkPriceCadenceQuarterly  NewFloatingPriceModelNewFloatingBulkPriceCadence = "quarterly"
	NewFloatingPriceModelNewFloatingBulkPriceCadenceOneTime    NewFloatingPriceModelNewFloatingBulkPriceCadence = "one_time"
	NewFloatingPriceModelNewFloatingBulkPriceCadenceCustom     NewFloatingPriceModelNewFloatingBulkPriceCadence = "custom"
)

func (NewFloatingPriceModelNewFloatingBulkPriceCadence) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingBulkPriceModelType added in v0.103.0

type NewFloatingPriceModelNewFloatingBulkPriceModelType string
const (
	NewFloatingPriceModelNewFloatingBulkPriceModelTypeBulk NewFloatingPriceModelNewFloatingBulkPriceModelType = "bulk"
)

func (NewFloatingPriceModelNewFloatingBulkPriceModelType) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingBulkPriceParam added in v0.103.0

type NewFloatingPriceModelNewFloatingBulkPriceParam struct {
	BulkConfig param.Field[BulkConfigModelParam] `json:"bulk_config,required"`
	// The cadence to bill for this price on.
	Cadence param.Field[NewFloatingPriceModelNewFloatingBulkPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                             `json:"item_id,required"`
	ModelType param.Field[NewFloatingPriceModelNewFloatingBulkPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (NewFloatingPriceModelNewFloatingBulkPriceParam) MarshalJSON added in v0.103.0

func (r NewFloatingPriceModelNewFloatingBulkPriceParam) MarshalJSON() (data []byte, err error)

type NewFloatingPriceModelNewFloatingBulkWithProrationPriceCadence added in v0.103.0

type NewFloatingPriceModelNewFloatingBulkWithProrationPriceCadence string

The cadence to bill for this price on.

const (
	NewFloatingPriceModelNewFloatingBulkWithProrationPriceCadenceAnnual     NewFloatingPriceModelNewFloatingBulkWithProrationPriceCadence = "annual"
	NewFloatingPriceModelNewFloatingBulkWithProrationPriceCadenceSemiAnnual NewFloatingPriceModelNewFloatingBulkWithProrationPriceCadence = "semi_annual"
	NewFloatingPriceModelNewFloatingBulkWithProrationPriceCadenceMonthly    NewFloatingPriceModelNewFloatingBulkWithProrationPriceCadence = "monthly"
	NewFloatingPriceModelNewFloatingBulkWithProrationPriceCadenceQuarterly  NewFloatingPriceModelNewFloatingBulkWithProrationPriceCadence = "quarterly"
	NewFloatingPriceModelNewFloatingBulkWithProrationPriceCadenceOneTime    NewFloatingPriceModelNewFloatingBulkWithProrationPriceCadence = "one_time"
	NewFloatingPriceModelNewFloatingBulkWithProrationPriceCadenceCustom     NewFloatingPriceModelNewFloatingBulkWithProrationPriceCadence = "custom"
)

func (NewFloatingPriceModelNewFloatingBulkWithProrationPriceCadence) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingBulkWithProrationPriceModelType added in v0.103.0

type NewFloatingPriceModelNewFloatingBulkWithProrationPriceModelType string
const (
	NewFloatingPriceModelNewFloatingBulkWithProrationPriceModelTypeBulkWithProration NewFloatingPriceModelNewFloatingBulkWithProrationPriceModelType = "bulk_with_proration"
)

func (NewFloatingPriceModelNewFloatingBulkWithProrationPriceModelType) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingBulkWithProrationPriceParam added in v0.103.0

type NewFloatingPriceModelNewFloatingBulkWithProrationPriceParam struct {
	BulkWithProrationConfig param.Field[CustomRatingFunctionConfigModelParam] `json:"bulk_with_proration_config,required"`
	// The cadence to bill for this price on.
	Cadence param.Field[NewFloatingPriceModelNewFloatingBulkWithProrationPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                          `json:"item_id,required"`
	ModelType param.Field[NewFloatingPriceModelNewFloatingBulkWithProrationPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (NewFloatingPriceModelNewFloatingBulkWithProrationPriceParam) MarshalJSON added in v0.103.0

type NewFloatingPriceModelNewFloatingCumulativeGroupedBulkPriceCadence added in v0.103.0

type NewFloatingPriceModelNewFloatingCumulativeGroupedBulkPriceCadence string

The cadence to bill for this price on.

const (
	NewFloatingPriceModelNewFloatingCumulativeGroupedBulkPriceCadenceAnnual     NewFloatingPriceModelNewFloatingCumulativeGroupedBulkPriceCadence = "annual"
	NewFloatingPriceModelNewFloatingCumulativeGroupedBulkPriceCadenceSemiAnnual NewFloatingPriceModelNewFloatingCumulativeGroupedBulkPriceCadence = "semi_annual"
	NewFloatingPriceModelNewFloatingCumulativeGroupedBulkPriceCadenceMonthly    NewFloatingPriceModelNewFloatingCumulativeGroupedBulkPriceCadence = "monthly"
	NewFloatingPriceModelNewFloatingCumulativeGroupedBulkPriceCadenceQuarterly  NewFloatingPriceModelNewFloatingCumulativeGroupedBulkPriceCadence = "quarterly"
	NewFloatingPriceModelNewFloatingCumulativeGroupedBulkPriceCadenceOneTime    NewFloatingPriceModelNewFloatingCumulativeGroupedBulkPriceCadence = "one_time"
	NewFloatingPriceModelNewFloatingCumulativeGroupedBulkPriceCadenceCustom     NewFloatingPriceModelNewFloatingCumulativeGroupedBulkPriceCadence = "custom"
)

func (NewFloatingPriceModelNewFloatingCumulativeGroupedBulkPriceCadence) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingCumulativeGroupedBulkPriceModelType added in v0.103.0

type NewFloatingPriceModelNewFloatingCumulativeGroupedBulkPriceModelType string
const (
	NewFloatingPriceModelNewFloatingCumulativeGroupedBulkPriceModelTypeCumulativeGroupedBulk NewFloatingPriceModelNewFloatingCumulativeGroupedBulkPriceModelType = "cumulative_grouped_bulk"
)

func (NewFloatingPriceModelNewFloatingCumulativeGroupedBulkPriceModelType) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingCumulativeGroupedBulkPriceParam added in v0.103.0

type NewFloatingPriceModelNewFloatingCumulativeGroupedBulkPriceParam struct {
	// The cadence to bill for this price on.
	Cadence                     param.Field[NewFloatingPriceModelNewFloatingCumulativeGroupedBulkPriceCadence] `json:"cadence,required"`
	CumulativeGroupedBulkConfig param.Field[CustomRatingFunctionConfigModelParam]                              `json:"cumulative_grouped_bulk_config,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                              `json:"item_id,required"`
	ModelType param.Field[NewFloatingPriceModelNewFloatingCumulativeGroupedBulkPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (NewFloatingPriceModelNewFloatingCumulativeGroupedBulkPriceParam) MarshalJSON added in v0.103.0

type NewFloatingPriceModelNewFloatingGroupedAllocationPriceCadence added in v0.103.0

type NewFloatingPriceModelNewFloatingGroupedAllocationPriceCadence string

The cadence to bill for this price on.

const (
	NewFloatingPriceModelNewFloatingGroupedAllocationPriceCadenceAnnual     NewFloatingPriceModelNewFloatingGroupedAllocationPriceCadence = "annual"
	NewFloatingPriceModelNewFloatingGroupedAllocationPriceCadenceSemiAnnual NewFloatingPriceModelNewFloatingGroupedAllocationPriceCadence = "semi_annual"
	NewFloatingPriceModelNewFloatingGroupedAllocationPriceCadenceMonthly    NewFloatingPriceModelNewFloatingGroupedAllocationPriceCadence = "monthly"
	NewFloatingPriceModelNewFloatingGroupedAllocationPriceCadenceQuarterly  NewFloatingPriceModelNewFloatingGroupedAllocationPriceCadence = "quarterly"
	NewFloatingPriceModelNewFloatingGroupedAllocationPriceCadenceOneTime    NewFloatingPriceModelNewFloatingGroupedAllocationPriceCadence = "one_time"
	NewFloatingPriceModelNewFloatingGroupedAllocationPriceCadenceCustom     NewFloatingPriceModelNewFloatingGroupedAllocationPriceCadence = "custom"
)

func (NewFloatingPriceModelNewFloatingGroupedAllocationPriceCadence) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingGroupedAllocationPriceModelType added in v0.103.0

type NewFloatingPriceModelNewFloatingGroupedAllocationPriceModelType string
const (
	NewFloatingPriceModelNewFloatingGroupedAllocationPriceModelTypeGroupedAllocation NewFloatingPriceModelNewFloatingGroupedAllocationPriceModelType = "grouped_allocation"
)

func (NewFloatingPriceModelNewFloatingGroupedAllocationPriceModelType) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingGroupedAllocationPriceParam added in v0.103.0

type NewFloatingPriceModelNewFloatingGroupedAllocationPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewFloatingPriceModelNewFloatingGroupedAllocationPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency                param.Field[string]                               `json:"currency,required"`
	GroupedAllocationConfig param.Field[CustomRatingFunctionConfigModelParam] `json:"grouped_allocation_config,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                          `json:"item_id,required"`
	ModelType param.Field[NewFloatingPriceModelNewFloatingGroupedAllocationPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (NewFloatingPriceModelNewFloatingGroupedAllocationPriceParam) MarshalJSON added in v0.103.0

type NewFloatingPriceModelNewFloatingGroupedTieredPackagePriceCadence added in v0.103.0

type NewFloatingPriceModelNewFloatingGroupedTieredPackagePriceCadence string

The cadence to bill for this price on.

const (
	NewFloatingPriceModelNewFloatingGroupedTieredPackagePriceCadenceAnnual     NewFloatingPriceModelNewFloatingGroupedTieredPackagePriceCadence = "annual"
	NewFloatingPriceModelNewFloatingGroupedTieredPackagePriceCadenceSemiAnnual NewFloatingPriceModelNewFloatingGroupedTieredPackagePriceCadence = "semi_annual"
	NewFloatingPriceModelNewFloatingGroupedTieredPackagePriceCadenceMonthly    NewFloatingPriceModelNewFloatingGroupedTieredPackagePriceCadence = "monthly"
	NewFloatingPriceModelNewFloatingGroupedTieredPackagePriceCadenceQuarterly  NewFloatingPriceModelNewFloatingGroupedTieredPackagePriceCadence = "quarterly"
	NewFloatingPriceModelNewFloatingGroupedTieredPackagePriceCadenceOneTime    NewFloatingPriceModelNewFloatingGroupedTieredPackagePriceCadence = "one_time"
	NewFloatingPriceModelNewFloatingGroupedTieredPackagePriceCadenceCustom     NewFloatingPriceModelNewFloatingGroupedTieredPackagePriceCadence = "custom"
)

func (NewFloatingPriceModelNewFloatingGroupedTieredPackagePriceCadence) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingGroupedTieredPackagePriceModelType added in v0.103.0

type NewFloatingPriceModelNewFloatingGroupedTieredPackagePriceModelType string
const (
	NewFloatingPriceModelNewFloatingGroupedTieredPackagePriceModelTypeGroupedTieredPackage NewFloatingPriceModelNewFloatingGroupedTieredPackagePriceModelType = "grouped_tiered_package"
)

func (NewFloatingPriceModelNewFloatingGroupedTieredPackagePriceModelType) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingGroupedTieredPackagePriceParam added in v0.103.0

type NewFloatingPriceModelNewFloatingGroupedTieredPackagePriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewFloatingPriceModelNewFloatingGroupedTieredPackagePriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency                   param.Field[string]                               `json:"currency,required"`
	GroupedTieredPackageConfig param.Field[CustomRatingFunctionConfigModelParam] `json:"grouped_tiered_package_config,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                             `json:"item_id,required"`
	ModelType param.Field[NewFloatingPriceModelNewFloatingGroupedTieredPackagePriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (NewFloatingPriceModelNewFloatingGroupedTieredPackagePriceParam) MarshalJSON added in v0.103.0

type NewFloatingPriceModelNewFloatingGroupedTieredPriceCadence added in v0.103.0

type NewFloatingPriceModelNewFloatingGroupedTieredPriceCadence string

The cadence to bill for this price on.

const (
	NewFloatingPriceModelNewFloatingGroupedTieredPriceCadenceAnnual     NewFloatingPriceModelNewFloatingGroupedTieredPriceCadence = "annual"
	NewFloatingPriceModelNewFloatingGroupedTieredPriceCadenceSemiAnnual NewFloatingPriceModelNewFloatingGroupedTieredPriceCadence = "semi_annual"
	NewFloatingPriceModelNewFloatingGroupedTieredPriceCadenceMonthly    NewFloatingPriceModelNewFloatingGroupedTieredPriceCadence = "monthly"
	NewFloatingPriceModelNewFloatingGroupedTieredPriceCadenceQuarterly  NewFloatingPriceModelNewFloatingGroupedTieredPriceCadence = "quarterly"
	NewFloatingPriceModelNewFloatingGroupedTieredPriceCadenceOneTime    NewFloatingPriceModelNewFloatingGroupedTieredPriceCadence = "one_time"
	NewFloatingPriceModelNewFloatingGroupedTieredPriceCadenceCustom     NewFloatingPriceModelNewFloatingGroupedTieredPriceCadence = "custom"
)

func (NewFloatingPriceModelNewFloatingGroupedTieredPriceCadence) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingGroupedTieredPriceModelType added in v0.103.0

type NewFloatingPriceModelNewFloatingGroupedTieredPriceModelType string
const (
	NewFloatingPriceModelNewFloatingGroupedTieredPriceModelTypeGroupedTiered NewFloatingPriceModelNewFloatingGroupedTieredPriceModelType = "grouped_tiered"
)

func (NewFloatingPriceModelNewFloatingGroupedTieredPriceModelType) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingGroupedTieredPriceParam added in v0.103.0

type NewFloatingPriceModelNewFloatingGroupedTieredPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewFloatingPriceModelNewFloatingGroupedTieredPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency            param.Field[string]                               `json:"currency,required"`
	GroupedTieredConfig param.Field[CustomRatingFunctionConfigModelParam] `json:"grouped_tiered_config,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                      `json:"item_id,required"`
	ModelType param.Field[NewFloatingPriceModelNewFloatingGroupedTieredPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (NewFloatingPriceModelNewFloatingGroupedTieredPriceParam) MarshalJSON added in v0.103.0

type NewFloatingPriceModelNewFloatingGroupedWithMeteredMinimumPriceCadence added in v0.103.0

type NewFloatingPriceModelNewFloatingGroupedWithMeteredMinimumPriceCadence string

The cadence to bill for this price on.

const (
	NewFloatingPriceModelNewFloatingGroupedWithMeteredMinimumPriceCadenceAnnual     NewFloatingPriceModelNewFloatingGroupedWithMeteredMinimumPriceCadence = "annual"
	NewFloatingPriceModelNewFloatingGroupedWithMeteredMinimumPriceCadenceSemiAnnual NewFloatingPriceModelNewFloatingGroupedWithMeteredMinimumPriceCadence = "semi_annual"
	NewFloatingPriceModelNewFloatingGroupedWithMeteredMinimumPriceCadenceMonthly    NewFloatingPriceModelNewFloatingGroupedWithMeteredMinimumPriceCadence = "monthly"
	NewFloatingPriceModelNewFloatingGroupedWithMeteredMinimumPriceCadenceQuarterly  NewFloatingPriceModelNewFloatingGroupedWithMeteredMinimumPriceCadence = "quarterly"
	NewFloatingPriceModelNewFloatingGroupedWithMeteredMinimumPriceCadenceOneTime    NewFloatingPriceModelNewFloatingGroupedWithMeteredMinimumPriceCadence = "one_time"
	NewFloatingPriceModelNewFloatingGroupedWithMeteredMinimumPriceCadenceCustom     NewFloatingPriceModelNewFloatingGroupedWithMeteredMinimumPriceCadence = "custom"
)

func (NewFloatingPriceModelNewFloatingGroupedWithMeteredMinimumPriceCadence) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingGroupedWithMeteredMinimumPriceModelType added in v0.103.0

type NewFloatingPriceModelNewFloatingGroupedWithMeteredMinimumPriceModelType string
const (
	NewFloatingPriceModelNewFloatingGroupedWithMeteredMinimumPriceModelTypeGroupedWithMeteredMinimum NewFloatingPriceModelNewFloatingGroupedWithMeteredMinimumPriceModelType = "grouped_with_metered_minimum"
)

func (NewFloatingPriceModelNewFloatingGroupedWithMeteredMinimumPriceModelType) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingGroupedWithMeteredMinimumPriceParam added in v0.103.0

type NewFloatingPriceModelNewFloatingGroupedWithMeteredMinimumPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewFloatingPriceModelNewFloatingGroupedWithMeteredMinimumPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency                        param.Field[string]                               `json:"currency,required"`
	GroupedWithMeteredMinimumConfig param.Field[CustomRatingFunctionConfigModelParam] `json:"grouped_with_metered_minimum_config,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                                  `json:"item_id,required"`
	ModelType param.Field[NewFloatingPriceModelNewFloatingGroupedWithMeteredMinimumPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (NewFloatingPriceModelNewFloatingGroupedWithMeteredMinimumPriceParam) MarshalJSON added in v0.103.0

type NewFloatingPriceModelNewFloatingGroupedWithProratedMinimumPriceCadence added in v0.103.0

type NewFloatingPriceModelNewFloatingGroupedWithProratedMinimumPriceCadence string

The cadence to bill for this price on.

const (
	NewFloatingPriceModelNewFloatingGroupedWithProratedMinimumPriceCadenceAnnual     NewFloatingPriceModelNewFloatingGroupedWithProratedMinimumPriceCadence = "annual"
	NewFloatingPriceModelNewFloatingGroupedWithProratedMinimumPriceCadenceSemiAnnual NewFloatingPriceModelNewFloatingGroupedWithProratedMinimumPriceCadence = "semi_annual"
	NewFloatingPriceModelNewFloatingGroupedWithProratedMinimumPriceCadenceMonthly    NewFloatingPriceModelNewFloatingGroupedWithProratedMinimumPriceCadence = "monthly"
	NewFloatingPriceModelNewFloatingGroupedWithProratedMinimumPriceCadenceQuarterly  NewFloatingPriceModelNewFloatingGroupedWithProratedMinimumPriceCadence = "quarterly"
	NewFloatingPriceModelNewFloatingGroupedWithProratedMinimumPriceCadenceOneTime    NewFloatingPriceModelNewFloatingGroupedWithProratedMinimumPriceCadence = "one_time"
	NewFloatingPriceModelNewFloatingGroupedWithProratedMinimumPriceCadenceCustom     NewFloatingPriceModelNewFloatingGroupedWithProratedMinimumPriceCadence = "custom"
)

func (NewFloatingPriceModelNewFloatingGroupedWithProratedMinimumPriceCadence) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingGroupedWithProratedMinimumPriceModelType added in v0.103.0

type NewFloatingPriceModelNewFloatingGroupedWithProratedMinimumPriceModelType string
const (
	NewFloatingPriceModelNewFloatingGroupedWithProratedMinimumPriceModelTypeGroupedWithProratedMinimum NewFloatingPriceModelNewFloatingGroupedWithProratedMinimumPriceModelType = "grouped_with_prorated_minimum"
)

func (NewFloatingPriceModelNewFloatingGroupedWithProratedMinimumPriceModelType) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingGroupedWithProratedMinimumPriceParam added in v0.103.0

type NewFloatingPriceModelNewFloatingGroupedWithProratedMinimumPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewFloatingPriceModelNewFloatingGroupedWithProratedMinimumPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency                         param.Field[string]                               `json:"currency,required"`
	GroupedWithProratedMinimumConfig param.Field[CustomRatingFunctionConfigModelParam] `json:"grouped_with_prorated_minimum_config,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                                   `json:"item_id,required"`
	ModelType param.Field[NewFloatingPriceModelNewFloatingGroupedWithProratedMinimumPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (NewFloatingPriceModelNewFloatingGroupedWithProratedMinimumPriceParam) MarshalJSON added in v0.103.0

type NewFloatingPriceModelNewFloatingMatrixPriceCadence added in v0.103.0

type NewFloatingPriceModelNewFloatingMatrixPriceCadence string

The cadence to bill for this price on.

const (
	NewFloatingPriceModelNewFloatingMatrixPriceCadenceAnnual     NewFloatingPriceModelNewFloatingMatrixPriceCadence = "annual"
	NewFloatingPriceModelNewFloatingMatrixPriceCadenceSemiAnnual NewFloatingPriceModelNewFloatingMatrixPriceCadence = "semi_annual"
	NewFloatingPriceModelNewFloatingMatrixPriceCadenceMonthly    NewFloatingPriceModelNewFloatingMatrixPriceCadence = "monthly"
	NewFloatingPriceModelNewFloatingMatrixPriceCadenceQuarterly  NewFloatingPriceModelNewFloatingMatrixPriceCadence = "quarterly"
	NewFloatingPriceModelNewFloatingMatrixPriceCadenceOneTime    NewFloatingPriceModelNewFloatingMatrixPriceCadence = "one_time"
	NewFloatingPriceModelNewFloatingMatrixPriceCadenceCustom     NewFloatingPriceModelNewFloatingMatrixPriceCadence = "custom"
)

func (NewFloatingPriceModelNewFloatingMatrixPriceCadence) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingMatrixPriceModelType added in v0.103.0

type NewFloatingPriceModelNewFloatingMatrixPriceModelType string
const (
	NewFloatingPriceModelNewFloatingMatrixPriceModelTypeMatrix NewFloatingPriceModelNewFloatingMatrixPriceModelType = "matrix"
)

func (NewFloatingPriceModelNewFloatingMatrixPriceModelType) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingMatrixPriceParam added in v0.103.0

type NewFloatingPriceModelNewFloatingMatrixPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewFloatingPriceModelNewFloatingMatrixPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID       param.Field[string]                                               `json:"item_id,required"`
	MatrixConfig param.Field[MatrixConfigModelParam]                               `json:"matrix_config,required"`
	ModelType    param.Field[NewFloatingPriceModelNewFloatingMatrixPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (NewFloatingPriceModelNewFloatingMatrixPriceParam) MarshalJSON added in v0.103.0

func (r NewFloatingPriceModelNewFloatingMatrixPriceParam) MarshalJSON() (data []byte, err error)

type NewFloatingPriceModelNewFloatingMatrixWithAllocationPriceCadence added in v0.103.0

type NewFloatingPriceModelNewFloatingMatrixWithAllocationPriceCadence string

The cadence to bill for this price on.

const (
	NewFloatingPriceModelNewFloatingMatrixWithAllocationPriceCadenceAnnual     NewFloatingPriceModelNewFloatingMatrixWithAllocationPriceCadence = "annual"
	NewFloatingPriceModelNewFloatingMatrixWithAllocationPriceCadenceSemiAnnual NewFloatingPriceModelNewFloatingMatrixWithAllocationPriceCadence = "semi_annual"
	NewFloatingPriceModelNewFloatingMatrixWithAllocationPriceCadenceMonthly    NewFloatingPriceModelNewFloatingMatrixWithAllocationPriceCadence = "monthly"
	NewFloatingPriceModelNewFloatingMatrixWithAllocationPriceCadenceQuarterly  NewFloatingPriceModelNewFloatingMatrixWithAllocationPriceCadence = "quarterly"
	NewFloatingPriceModelNewFloatingMatrixWithAllocationPriceCadenceOneTime    NewFloatingPriceModelNewFloatingMatrixWithAllocationPriceCadence = "one_time"
	NewFloatingPriceModelNewFloatingMatrixWithAllocationPriceCadenceCustom     NewFloatingPriceModelNewFloatingMatrixWithAllocationPriceCadence = "custom"
)

func (NewFloatingPriceModelNewFloatingMatrixWithAllocationPriceCadence) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingMatrixWithAllocationPriceModelType added in v0.103.0

type NewFloatingPriceModelNewFloatingMatrixWithAllocationPriceModelType string
const (
	NewFloatingPriceModelNewFloatingMatrixWithAllocationPriceModelTypeMatrixWithAllocation NewFloatingPriceModelNewFloatingMatrixWithAllocationPriceModelType = "matrix_with_allocation"
)

func (NewFloatingPriceModelNewFloatingMatrixWithAllocationPriceModelType) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingMatrixWithAllocationPriceParam added in v0.103.0

type NewFloatingPriceModelNewFloatingMatrixWithAllocationPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewFloatingPriceModelNewFloatingMatrixWithAllocationPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID                     param.Field[string]                                                             `json:"item_id,required"`
	MatrixWithAllocationConfig param.Field[MatrixWithAllocationConfigModelParam]                               `json:"matrix_with_allocation_config,required"`
	ModelType                  param.Field[NewFloatingPriceModelNewFloatingMatrixWithAllocationPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (NewFloatingPriceModelNewFloatingMatrixWithAllocationPriceParam) MarshalJSON added in v0.103.0

type NewFloatingPriceModelNewFloatingMatrixWithDisplayNamePriceCadence added in v0.103.0

type NewFloatingPriceModelNewFloatingMatrixWithDisplayNamePriceCadence string

The cadence to bill for this price on.

const (
	NewFloatingPriceModelNewFloatingMatrixWithDisplayNamePriceCadenceAnnual     NewFloatingPriceModelNewFloatingMatrixWithDisplayNamePriceCadence = "annual"
	NewFloatingPriceModelNewFloatingMatrixWithDisplayNamePriceCadenceSemiAnnual NewFloatingPriceModelNewFloatingMatrixWithDisplayNamePriceCadence = "semi_annual"
	NewFloatingPriceModelNewFloatingMatrixWithDisplayNamePriceCadenceMonthly    NewFloatingPriceModelNewFloatingMatrixWithDisplayNamePriceCadence = "monthly"
	NewFloatingPriceModelNewFloatingMatrixWithDisplayNamePriceCadenceQuarterly  NewFloatingPriceModelNewFloatingMatrixWithDisplayNamePriceCadence = "quarterly"
	NewFloatingPriceModelNewFloatingMatrixWithDisplayNamePriceCadenceOneTime    NewFloatingPriceModelNewFloatingMatrixWithDisplayNamePriceCadence = "one_time"
	NewFloatingPriceModelNewFloatingMatrixWithDisplayNamePriceCadenceCustom     NewFloatingPriceModelNewFloatingMatrixWithDisplayNamePriceCadence = "custom"
)

func (NewFloatingPriceModelNewFloatingMatrixWithDisplayNamePriceCadence) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingMatrixWithDisplayNamePriceModelType added in v0.103.0

type NewFloatingPriceModelNewFloatingMatrixWithDisplayNamePriceModelType string
const (
	NewFloatingPriceModelNewFloatingMatrixWithDisplayNamePriceModelTypeMatrixWithDisplayName NewFloatingPriceModelNewFloatingMatrixWithDisplayNamePriceModelType = "matrix_with_display_name"
)

func (NewFloatingPriceModelNewFloatingMatrixWithDisplayNamePriceModelType) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingMatrixWithDisplayNamePriceParam added in v0.103.0

type NewFloatingPriceModelNewFloatingMatrixWithDisplayNamePriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewFloatingPriceModelNewFloatingMatrixWithDisplayNamePriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID                      param.Field[string]                                                              `json:"item_id,required"`
	MatrixWithDisplayNameConfig param.Field[CustomRatingFunctionConfigModelParam]                                `json:"matrix_with_display_name_config,required"`
	ModelType                   param.Field[NewFloatingPriceModelNewFloatingMatrixWithDisplayNamePriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (NewFloatingPriceModelNewFloatingMatrixWithDisplayNamePriceParam) MarshalJSON added in v0.103.0

type NewFloatingPriceModelNewFloatingMaxGroupTieredPackagePriceCadence added in v0.103.0

type NewFloatingPriceModelNewFloatingMaxGroupTieredPackagePriceCadence string

The cadence to bill for this price on.

const (
	NewFloatingPriceModelNewFloatingMaxGroupTieredPackagePriceCadenceAnnual     NewFloatingPriceModelNewFloatingMaxGroupTieredPackagePriceCadence = "annual"
	NewFloatingPriceModelNewFloatingMaxGroupTieredPackagePriceCadenceSemiAnnual NewFloatingPriceModelNewFloatingMaxGroupTieredPackagePriceCadence = "semi_annual"
	NewFloatingPriceModelNewFloatingMaxGroupTieredPackagePriceCadenceMonthly    NewFloatingPriceModelNewFloatingMaxGroupTieredPackagePriceCadence = "monthly"
	NewFloatingPriceModelNewFloatingMaxGroupTieredPackagePriceCadenceQuarterly  NewFloatingPriceModelNewFloatingMaxGroupTieredPackagePriceCadence = "quarterly"
	NewFloatingPriceModelNewFloatingMaxGroupTieredPackagePriceCadenceOneTime    NewFloatingPriceModelNewFloatingMaxGroupTieredPackagePriceCadence = "one_time"
	NewFloatingPriceModelNewFloatingMaxGroupTieredPackagePriceCadenceCustom     NewFloatingPriceModelNewFloatingMaxGroupTieredPackagePriceCadence = "custom"
)

func (NewFloatingPriceModelNewFloatingMaxGroupTieredPackagePriceCadence) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingMaxGroupTieredPackagePriceModelType added in v0.103.0

type NewFloatingPriceModelNewFloatingMaxGroupTieredPackagePriceModelType string
const (
	NewFloatingPriceModelNewFloatingMaxGroupTieredPackagePriceModelTypeMaxGroupTieredPackage NewFloatingPriceModelNewFloatingMaxGroupTieredPackagePriceModelType = "max_group_tiered_package"
)

func (NewFloatingPriceModelNewFloatingMaxGroupTieredPackagePriceModelType) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingMaxGroupTieredPackagePriceParam added in v0.103.0

type NewFloatingPriceModelNewFloatingMaxGroupTieredPackagePriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewFloatingPriceModelNewFloatingMaxGroupTieredPackagePriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID                      param.Field[string]                                                              `json:"item_id,required"`
	MaxGroupTieredPackageConfig param.Field[CustomRatingFunctionConfigModelParam]                                `json:"max_group_tiered_package_config,required"`
	ModelType                   param.Field[NewFloatingPriceModelNewFloatingMaxGroupTieredPackagePriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (NewFloatingPriceModelNewFloatingMaxGroupTieredPackagePriceParam) MarshalJSON added in v0.103.0

type NewFloatingPriceModelNewFloatingPackagePriceCadence added in v0.103.0

type NewFloatingPriceModelNewFloatingPackagePriceCadence string

The cadence to bill for this price on.

const (
	NewFloatingPriceModelNewFloatingPackagePriceCadenceAnnual     NewFloatingPriceModelNewFloatingPackagePriceCadence = "annual"
	NewFloatingPriceModelNewFloatingPackagePriceCadenceSemiAnnual NewFloatingPriceModelNewFloatingPackagePriceCadence = "semi_annual"
	NewFloatingPriceModelNewFloatingPackagePriceCadenceMonthly    NewFloatingPriceModelNewFloatingPackagePriceCadence = "monthly"
	NewFloatingPriceModelNewFloatingPackagePriceCadenceQuarterly  NewFloatingPriceModelNewFloatingPackagePriceCadence = "quarterly"
	NewFloatingPriceModelNewFloatingPackagePriceCadenceOneTime    NewFloatingPriceModelNewFloatingPackagePriceCadence = "one_time"
	NewFloatingPriceModelNewFloatingPackagePriceCadenceCustom     NewFloatingPriceModelNewFloatingPackagePriceCadence = "custom"
)

func (NewFloatingPriceModelNewFloatingPackagePriceCadence) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingPackagePriceModelType added in v0.103.0

type NewFloatingPriceModelNewFloatingPackagePriceModelType string
const (
	NewFloatingPriceModelNewFloatingPackagePriceModelTypePackage NewFloatingPriceModelNewFloatingPackagePriceModelType = "package"
)

func (NewFloatingPriceModelNewFloatingPackagePriceModelType) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingPackagePriceParam added in v0.103.0

type NewFloatingPriceModelNewFloatingPackagePriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewFloatingPriceModelNewFloatingPackagePriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                `json:"item_id,required"`
	ModelType param.Field[NewFloatingPriceModelNewFloatingPackagePriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name          param.Field[string]                  `json:"name,required"`
	PackageConfig param.Field[PackageConfigModelParam] `json:"package_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (NewFloatingPriceModelNewFloatingPackagePriceParam) MarshalJSON added in v0.103.0

func (r NewFloatingPriceModelNewFloatingPackagePriceParam) MarshalJSON() (data []byte, err error)

type NewFloatingPriceModelNewFloatingPackageWithAllocationPriceCadence added in v0.103.0

type NewFloatingPriceModelNewFloatingPackageWithAllocationPriceCadence string

The cadence to bill for this price on.

const (
	NewFloatingPriceModelNewFloatingPackageWithAllocationPriceCadenceAnnual     NewFloatingPriceModelNewFloatingPackageWithAllocationPriceCadence = "annual"
	NewFloatingPriceModelNewFloatingPackageWithAllocationPriceCadenceSemiAnnual NewFloatingPriceModelNewFloatingPackageWithAllocationPriceCadence = "semi_annual"
	NewFloatingPriceModelNewFloatingPackageWithAllocationPriceCadenceMonthly    NewFloatingPriceModelNewFloatingPackageWithAllocationPriceCadence = "monthly"
	NewFloatingPriceModelNewFloatingPackageWithAllocationPriceCadenceQuarterly  NewFloatingPriceModelNewFloatingPackageWithAllocationPriceCadence = "quarterly"
	NewFloatingPriceModelNewFloatingPackageWithAllocationPriceCadenceOneTime    NewFloatingPriceModelNewFloatingPackageWithAllocationPriceCadence = "one_time"
	NewFloatingPriceModelNewFloatingPackageWithAllocationPriceCadenceCustom     NewFloatingPriceModelNewFloatingPackageWithAllocationPriceCadence = "custom"
)

func (NewFloatingPriceModelNewFloatingPackageWithAllocationPriceCadence) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingPackageWithAllocationPriceModelType added in v0.103.0

type NewFloatingPriceModelNewFloatingPackageWithAllocationPriceModelType string
const (
	NewFloatingPriceModelNewFloatingPackageWithAllocationPriceModelTypePackageWithAllocation NewFloatingPriceModelNewFloatingPackageWithAllocationPriceModelType = "package_with_allocation"
)

func (NewFloatingPriceModelNewFloatingPackageWithAllocationPriceModelType) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingPackageWithAllocationPriceParam added in v0.103.0

type NewFloatingPriceModelNewFloatingPackageWithAllocationPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewFloatingPriceModelNewFloatingPackageWithAllocationPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                              `json:"item_id,required"`
	ModelType param.Field[NewFloatingPriceModelNewFloatingPackageWithAllocationPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                        param.Field[string]                               `json:"name,required"`
	PackageWithAllocationConfig param.Field[CustomRatingFunctionConfigModelParam] `json:"package_with_allocation_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (NewFloatingPriceModelNewFloatingPackageWithAllocationPriceParam) MarshalJSON added in v0.103.0

type NewFloatingPriceModelNewFloatingScalableMatrixWithTieredPricingPriceCadence added in v0.103.0

type NewFloatingPriceModelNewFloatingScalableMatrixWithTieredPricingPriceCadence string

The cadence to bill for this price on.

const (
	NewFloatingPriceModelNewFloatingScalableMatrixWithTieredPricingPriceCadenceAnnual     NewFloatingPriceModelNewFloatingScalableMatrixWithTieredPricingPriceCadence = "annual"
	NewFloatingPriceModelNewFloatingScalableMatrixWithTieredPricingPriceCadenceSemiAnnual NewFloatingPriceModelNewFloatingScalableMatrixWithTieredPricingPriceCadence = "semi_annual"
	NewFloatingPriceModelNewFloatingScalableMatrixWithTieredPricingPriceCadenceMonthly    NewFloatingPriceModelNewFloatingScalableMatrixWithTieredPricingPriceCadence = "monthly"
	NewFloatingPriceModelNewFloatingScalableMatrixWithTieredPricingPriceCadenceQuarterly  NewFloatingPriceModelNewFloatingScalableMatrixWithTieredPricingPriceCadence = "quarterly"
	NewFloatingPriceModelNewFloatingScalableMatrixWithTieredPricingPriceCadenceOneTime    NewFloatingPriceModelNewFloatingScalableMatrixWithTieredPricingPriceCadence = "one_time"
	NewFloatingPriceModelNewFloatingScalableMatrixWithTieredPricingPriceCadenceCustom     NewFloatingPriceModelNewFloatingScalableMatrixWithTieredPricingPriceCadence = "custom"
)

func (NewFloatingPriceModelNewFloatingScalableMatrixWithTieredPricingPriceCadence) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingScalableMatrixWithTieredPricingPriceModelType added in v0.103.0

type NewFloatingPriceModelNewFloatingScalableMatrixWithTieredPricingPriceModelType string
const (
	NewFloatingPriceModelNewFloatingScalableMatrixWithTieredPricingPriceModelTypeScalableMatrixWithTieredPricing NewFloatingPriceModelNewFloatingScalableMatrixWithTieredPricingPriceModelType = "scalable_matrix_with_tiered_pricing"
)

func (NewFloatingPriceModelNewFloatingScalableMatrixWithTieredPricingPriceModelType) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingScalableMatrixWithTieredPricingPriceParam added in v0.103.0

type NewFloatingPriceModelNewFloatingScalableMatrixWithTieredPricingPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewFloatingPriceModelNewFloatingScalableMatrixWithTieredPricingPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                                        `json:"item_id,required"`
	ModelType param.Field[NewFloatingPriceModelNewFloatingScalableMatrixWithTieredPricingPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                                  param.Field[string]                               `json:"name,required"`
	ScalableMatrixWithTieredPricingConfig param.Field[CustomRatingFunctionConfigModelParam] `json:"scalable_matrix_with_tiered_pricing_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (NewFloatingPriceModelNewFloatingScalableMatrixWithTieredPricingPriceParam) MarshalJSON added in v0.103.0

type NewFloatingPriceModelNewFloatingScalableMatrixWithUnitPricingPriceCadence added in v0.103.0

type NewFloatingPriceModelNewFloatingScalableMatrixWithUnitPricingPriceCadence string

The cadence to bill for this price on.

const (
	NewFloatingPriceModelNewFloatingScalableMatrixWithUnitPricingPriceCadenceAnnual     NewFloatingPriceModelNewFloatingScalableMatrixWithUnitPricingPriceCadence = "annual"
	NewFloatingPriceModelNewFloatingScalableMatrixWithUnitPricingPriceCadenceSemiAnnual NewFloatingPriceModelNewFloatingScalableMatrixWithUnitPricingPriceCadence = "semi_annual"
	NewFloatingPriceModelNewFloatingScalableMatrixWithUnitPricingPriceCadenceMonthly    NewFloatingPriceModelNewFloatingScalableMatrixWithUnitPricingPriceCadence = "monthly"
	NewFloatingPriceModelNewFloatingScalableMatrixWithUnitPricingPriceCadenceQuarterly  NewFloatingPriceModelNewFloatingScalableMatrixWithUnitPricingPriceCadence = "quarterly"
	NewFloatingPriceModelNewFloatingScalableMatrixWithUnitPricingPriceCadenceOneTime    NewFloatingPriceModelNewFloatingScalableMatrixWithUnitPricingPriceCadence = "one_time"
	NewFloatingPriceModelNewFloatingScalableMatrixWithUnitPricingPriceCadenceCustom     NewFloatingPriceModelNewFloatingScalableMatrixWithUnitPricingPriceCadence = "custom"
)

func (NewFloatingPriceModelNewFloatingScalableMatrixWithUnitPricingPriceCadence) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingScalableMatrixWithUnitPricingPriceModelType added in v0.103.0

type NewFloatingPriceModelNewFloatingScalableMatrixWithUnitPricingPriceModelType string
const (
	NewFloatingPriceModelNewFloatingScalableMatrixWithUnitPricingPriceModelTypeScalableMatrixWithUnitPricing NewFloatingPriceModelNewFloatingScalableMatrixWithUnitPricingPriceModelType = "scalable_matrix_with_unit_pricing"
)

func (NewFloatingPriceModelNewFloatingScalableMatrixWithUnitPricingPriceModelType) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingScalableMatrixWithUnitPricingPriceParam added in v0.103.0

type NewFloatingPriceModelNewFloatingScalableMatrixWithUnitPricingPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewFloatingPriceModelNewFloatingScalableMatrixWithUnitPricingPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                                      `json:"item_id,required"`
	ModelType param.Field[NewFloatingPriceModelNewFloatingScalableMatrixWithUnitPricingPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                                param.Field[string]                               `json:"name,required"`
	ScalableMatrixWithUnitPricingConfig param.Field[CustomRatingFunctionConfigModelParam] `json:"scalable_matrix_with_unit_pricing_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (NewFloatingPriceModelNewFloatingScalableMatrixWithUnitPricingPriceParam) MarshalJSON added in v0.103.0

type NewFloatingPriceModelNewFloatingThresholdTotalAmountPriceCadence added in v0.103.0

type NewFloatingPriceModelNewFloatingThresholdTotalAmountPriceCadence string

The cadence to bill for this price on.

const (
	NewFloatingPriceModelNewFloatingThresholdTotalAmountPriceCadenceAnnual     NewFloatingPriceModelNewFloatingThresholdTotalAmountPriceCadence = "annual"
	NewFloatingPriceModelNewFloatingThresholdTotalAmountPriceCadenceSemiAnnual NewFloatingPriceModelNewFloatingThresholdTotalAmountPriceCadence = "semi_annual"
	NewFloatingPriceModelNewFloatingThresholdTotalAmountPriceCadenceMonthly    NewFloatingPriceModelNewFloatingThresholdTotalAmountPriceCadence = "monthly"
	NewFloatingPriceModelNewFloatingThresholdTotalAmountPriceCadenceQuarterly  NewFloatingPriceModelNewFloatingThresholdTotalAmountPriceCadence = "quarterly"
	NewFloatingPriceModelNewFloatingThresholdTotalAmountPriceCadenceOneTime    NewFloatingPriceModelNewFloatingThresholdTotalAmountPriceCadence = "one_time"
	NewFloatingPriceModelNewFloatingThresholdTotalAmountPriceCadenceCustom     NewFloatingPriceModelNewFloatingThresholdTotalAmountPriceCadence = "custom"
)

func (NewFloatingPriceModelNewFloatingThresholdTotalAmountPriceCadence) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingThresholdTotalAmountPriceModelType added in v0.103.0

type NewFloatingPriceModelNewFloatingThresholdTotalAmountPriceModelType string
const (
	NewFloatingPriceModelNewFloatingThresholdTotalAmountPriceModelTypeThresholdTotalAmount NewFloatingPriceModelNewFloatingThresholdTotalAmountPriceModelType = "threshold_total_amount"
)

func (NewFloatingPriceModelNewFloatingThresholdTotalAmountPriceModelType) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingThresholdTotalAmountPriceParam added in v0.103.0

type NewFloatingPriceModelNewFloatingThresholdTotalAmountPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewFloatingPriceModelNewFloatingThresholdTotalAmountPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                             `json:"item_id,required"`
	ModelType param.Field[NewFloatingPriceModelNewFloatingThresholdTotalAmountPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                       param.Field[string]                               `json:"name,required"`
	ThresholdTotalAmountConfig param.Field[CustomRatingFunctionConfigModelParam] `json:"threshold_total_amount_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (NewFloatingPriceModelNewFloatingThresholdTotalAmountPriceParam) MarshalJSON added in v0.103.0

type NewFloatingPriceModelNewFloatingTieredBpsPriceCadence added in v0.103.0

type NewFloatingPriceModelNewFloatingTieredBpsPriceCadence string

The cadence to bill for this price on.

const (
	NewFloatingPriceModelNewFloatingTieredBpsPriceCadenceAnnual     NewFloatingPriceModelNewFloatingTieredBpsPriceCadence = "annual"
	NewFloatingPriceModelNewFloatingTieredBpsPriceCadenceSemiAnnual NewFloatingPriceModelNewFloatingTieredBpsPriceCadence = "semi_annual"
	NewFloatingPriceModelNewFloatingTieredBpsPriceCadenceMonthly    NewFloatingPriceModelNewFloatingTieredBpsPriceCadence = "monthly"
	NewFloatingPriceModelNewFloatingTieredBpsPriceCadenceQuarterly  NewFloatingPriceModelNewFloatingTieredBpsPriceCadence = "quarterly"
	NewFloatingPriceModelNewFloatingTieredBpsPriceCadenceOneTime    NewFloatingPriceModelNewFloatingTieredBpsPriceCadence = "one_time"
	NewFloatingPriceModelNewFloatingTieredBpsPriceCadenceCustom     NewFloatingPriceModelNewFloatingTieredBpsPriceCadence = "custom"
)

func (NewFloatingPriceModelNewFloatingTieredBpsPriceCadence) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingTieredBpsPriceModelType added in v0.103.0

type NewFloatingPriceModelNewFloatingTieredBpsPriceModelType string
const (
	NewFloatingPriceModelNewFloatingTieredBpsPriceModelTypeTieredBps NewFloatingPriceModelNewFloatingTieredBpsPriceModelType = "tiered_bps"
)

func (NewFloatingPriceModelNewFloatingTieredBpsPriceModelType) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingTieredBpsPriceParam added in v0.103.0

type NewFloatingPriceModelNewFloatingTieredBpsPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewFloatingPriceModelNewFloatingTieredBpsPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                  `json:"item_id,required"`
	ModelType param.Field[NewFloatingPriceModelNewFloatingTieredBpsPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name            param.Field[string]                    `json:"name,required"`
	TieredBpsConfig param.Field[TieredBpsConfigModelParam] `json:"tiered_bps_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (NewFloatingPriceModelNewFloatingTieredBpsPriceParam) MarshalJSON added in v0.103.0

func (r NewFloatingPriceModelNewFloatingTieredBpsPriceParam) MarshalJSON() (data []byte, err error)

type NewFloatingPriceModelNewFloatingTieredPackagePriceCadence added in v0.103.0

type NewFloatingPriceModelNewFloatingTieredPackagePriceCadence string

The cadence to bill for this price on.

const (
	NewFloatingPriceModelNewFloatingTieredPackagePriceCadenceAnnual     NewFloatingPriceModelNewFloatingTieredPackagePriceCadence = "annual"
	NewFloatingPriceModelNewFloatingTieredPackagePriceCadenceSemiAnnual NewFloatingPriceModelNewFloatingTieredPackagePriceCadence = "semi_annual"
	NewFloatingPriceModelNewFloatingTieredPackagePriceCadenceMonthly    NewFloatingPriceModelNewFloatingTieredPackagePriceCadence = "monthly"
	NewFloatingPriceModelNewFloatingTieredPackagePriceCadenceQuarterly  NewFloatingPriceModelNewFloatingTieredPackagePriceCadence = "quarterly"
	NewFloatingPriceModelNewFloatingTieredPackagePriceCadenceOneTime    NewFloatingPriceModelNewFloatingTieredPackagePriceCadence = "one_time"
	NewFloatingPriceModelNewFloatingTieredPackagePriceCadenceCustom     NewFloatingPriceModelNewFloatingTieredPackagePriceCadence = "custom"
)

func (NewFloatingPriceModelNewFloatingTieredPackagePriceCadence) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingTieredPackagePriceModelType added in v0.103.0

type NewFloatingPriceModelNewFloatingTieredPackagePriceModelType string
const (
	NewFloatingPriceModelNewFloatingTieredPackagePriceModelTypeTieredPackage NewFloatingPriceModelNewFloatingTieredPackagePriceModelType = "tiered_package"
)

func (NewFloatingPriceModelNewFloatingTieredPackagePriceModelType) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingTieredPackagePriceParam added in v0.103.0

type NewFloatingPriceModelNewFloatingTieredPackagePriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewFloatingPriceModelNewFloatingTieredPackagePriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                      `json:"item_id,required"`
	ModelType param.Field[NewFloatingPriceModelNewFloatingTieredPackagePriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                param.Field[string]                               `json:"name,required"`
	TieredPackageConfig param.Field[CustomRatingFunctionConfigModelParam] `json:"tiered_package_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (NewFloatingPriceModelNewFloatingTieredPackagePriceParam) MarshalJSON added in v0.103.0

type NewFloatingPriceModelNewFloatingTieredPackageWithMinimumPriceCadence added in v0.103.0

type NewFloatingPriceModelNewFloatingTieredPackageWithMinimumPriceCadence string

The cadence to bill for this price on.

const (
	NewFloatingPriceModelNewFloatingTieredPackageWithMinimumPriceCadenceAnnual     NewFloatingPriceModelNewFloatingTieredPackageWithMinimumPriceCadence = "annual"
	NewFloatingPriceModelNewFloatingTieredPackageWithMinimumPriceCadenceSemiAnnual NewFloatingPriceModelNewFloatingTieredPackageWithMinimumPriceCadence = "semi_annual"
	NewFloatingPriceModelNewFloatingTieredPackageWithMinimumPriceCadenceMonthly    NewFloatingPriceModelNewFloatingTieredPackageWithMinimumPriceCadence = "monthly"
	NewFloatingPriceModelNewFloatingTieredPackageWithMinimumPriceCadenceQuarterly  NewFloatingPriceModelNewFloatingTieredPackageWithMinimumPriceCadence = "quarterly"
	NewFloatingPriceModelNewFloatingTieredPackageWithMinimumPriceCadenceOneTime    NewFloatingPriceModelNewFloatingTieredPackageWithMinimumPriceCadence = "one_time"
	NewFloatingPriceModelNewFloatingTieredPackageWithMinimumPriceCadenceCustom     NewFloatingPriceModelNewFloatingTieredPackageWithMinimumPriceCadence = "custom"
)

func (NewFloatingPriceModelNewFloatingTieredPackageWithMinimumPriceCadence) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingTieredPackageWithMinimumPriceModelType added in v0.103.0

type NewFloatingPriceModelNewFloatingTieredPackageWithMinimumPriceModelType string
const (
	NewFloatingPriceModelNewFloatingTieredPackageWithMinimumPriceModelTypeTieredPackageWithMinimum NewFloatingPriceModelNewFloatingTieredPackageWithMinimumPriceModelType = "tiered_package_with_minimum"
)

func (NewFloatingPriceModelNewFloatingTieredPackageWithMinimumPriceModelType) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingTieredPackageWithMinimumPriceParam added in v0.103.0

type NewFloatingPriceModelNewFloatingTieredPackageWithMinimumPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewFloatingPriceModelNewFloatingTieredPackageWithMinimumPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                                 `json:"item_id,required"`
	ModelType param.Field[NewFloatingPriceModelNewFloatingTieredPackageWithMinimumPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                           param.Field[string]                               `json:"name,required"`
	TieredPackageWithMinimumConfig param.Field[CustomRatingFunctionConfigModelParam] `json:"tiered_package_with_minimum_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (NewFloatingPriceModelNewFloatingTieredPackageWithMinimumPriceParam) MarshalJSON added in v0.103.0

type NewFloatingPriceModelNewFloatingTieredPriceCadence added in v0.103.0

type NewFloatingPriceModelNewFloatingTieredPriceCadence string

The cadence to bill for this price on.

const (
	NewFloatingPriceModelNewFloatingTieredPriceCadenceAnnual     NewFloatingPriceModelNewFloatingTieredPriceCadence = "annual"
	NewFloatingPriceModelNewFloatingTieredPriceCadenceSemiAnnual NewFloatingPriceModelNewFloatingTieredPriceCadence = "semi_annual"
	NewFloatingPriceModelNewFloatingTieredPriceCadenceMonthly    NewFloatingPriceModelNewFloatingTieredPriceCadence = "monthly"
	NewFloatingPriceModelNewFloatingTieredPriceCadenceQuarterly  NewFloatingPriceModelNewFloatingTieredPriceCadence = "quarterly"
	NewFloatingPriceModelNewFloatingTieredPriceCadenceOneTime    NewFloatingPriceModelNewFloatingTieredPriceCadence = "one_time"
	NewFloatingPriceModelNewFloatingTieredPriceCadenceCustom     NewFloatingPriceModelNewFloatingTieredPriceCadence = "custom"
)

func (NewFloatingPriceModelNewFloatingTieredPriceCadence) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingTieredPriceModelType added in v0.103.0

type NewFloatingPriceModelNewFloatingTieredPriceModelType string
const (
	NewFloatingPriceModelNewFloatingTieredPriceModelTypeTiered NewFloatingPriceModelNewFloatingTieredPriceModelType = "tiered"
)

func (NewFloatingPriceModelNewFloatingTieredPriceModelType) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingTieredPriceParam added in v0.103.0

type NewFloatingPriceModelNewFloatingTieredPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewFloatingPriceModelNewFloatingTieredPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                               `json:"item_id,required"`
	ModelType param.Field[NewFloatingPriceModelNewFloatingTieredPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name         param.Field[string]                 `json:"name,required"`
	TieredConfig param.Field[TieredConfigModelParam] `json:"tiered_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (NewFloatingPriceModelNewFloatingTieredPriceParam) MarshalJSON added in v0.103.0

func (r NewFloatingPriceModelNewFloatingTieredPriceParam) MarshalJSON() (data []byte, err error)

type NewFloatingPriceModelNewFloatingTieredWithMinimumPriceCadence added in v0.103.0

type NewFloatingPriceModelNewFloatingTieredWithMinimumPriceCadence string

The cadence to bill for this price on.

const (
	NewFloatingPriceModelNewFloatingTieredWithMinimumPriceCadenceAnnual     NewFloatingPriceModelNewFloatingTieredWithMinimumPriceCadence = "annual"
	NewFloatingPriceModelNewFloatingTieredWithMinimumPriceCadenceSemiAnnual NewFloatingPriceModelNewFloatingTieredWithMinimumPriceCadence = "semi_annual"
	NewFloatingPriceModelNewFloatingTieredWithMinimumPriceCadenceMonthly    NewFloatingPriceModelNewFloatingTieredWithMinimumPriceCadence = "monthly"
	NewFloatingPriceModelNewFloatingTieredWithMinimumPriceCadenceQuarterly  NewFloatingPriceModelNewFloatingTieredWithMinimumPriceCadence = "quarterly"
	NewFloatingPriceModelNewFloatingTieredWithMinimumPriceCadenceOneTime    NewFloatingPriceModelNewFloatingTieredWithMinimumPriceCadence = "one_time"
	NewFloatingPriceModelNewFloatingTieredWithMinimumPriceCadenceCustom     NewFloatingPriceModelNewFloatingTieredWithMinimumPriceCadence = "custom"
)

func (NewFloatingPriceModelNewFloatingTieredWithMinimumPriceCadence) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingTieredWithMinimumPriceModelType added in v0.103.0

type NewFloatingPriceModelNewFloatingTieredWithMinimumPriceModelType string
const (
	NewFloatingPriceModelNewFloatingTieredWithMinimumPriceModelTypeTieredWithMinimum NewFloatingPriceModelNewFloatingTieredWithMinimumPriceModelType = "tiered_with_minimum"
)

func (NewFloatingPriceModelNewFloatingTieredWithMinimumPriceModelType) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingTieredWithMinimumPriceParam added in v0.103.0

type NewFloatingPriceModelNewFloatingTieredWithMinimumPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewFloatingPriceModelNewFloatingTieredWithMinimumPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                          `json:"item_id,required"`
	ModelType param.Field[NewFloatingPriceModelNewFloatingTieredWithMinimumPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                    param.Field[string]                               `json:"name,required"`
	TieredWithMinimumConfig param.Field[CustomRatingFunctionConfigModelParam] `json:"tiered_with_minimum_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (NewFloatingPriceModelNewFloatingTieredWithMinimumPriceParam) MarshalJSON added in v0.103.0

type NewFloatingPriceModelNewFloatingTieredWithProrationPriceCadence added in v0.103.0

type NewFloatingPriceModelNewFloatingTieredWithProrationPriceCadence string

The cadence to bill for this price on.

const (
	NewFloatingPriceModelNewFloatingTieredWithProrationPriceCadenceAnnual     NewFloatingPriceModelNewFloatingTieredWithProrationPriceCadence = "annual"
	NewFloatingPriceModelNewFloatingTieredWithProrationPriceCadenceSemiAnnual NewFloatingPriceModelNewFloatingTieredWithProrationPriceCadence = "semi_annual"
	NewFloatingPriceModelNewFloatingTieredWithProrationPriceCadenceMonthly    NewFloatingPriceModelNewFloatingTieredWithProrationPriceCadence = "monthly"
	NewFloatingPriceModelNewFloatingTieredWithProrationPriceCadenceQuarterly  NewFloatingPriceModelNewFloatingTieredWithProrationPriceCadence = "quarterly"
	NewFloatingPriceModelNewFloatingTieredWithProrationPriceCadenceOneTime    NewFloatingPriceModelNewFloatingTieredWithProrationPriceCadence = "one_time"
	NewFloatingPriceModelNewFloatingTieredWithProrationPriceCadenceCustom     NewFloatingPriceModelNewFloatingTieredWithProrationPriceCadence = "custom"
)

func (NewFloatingPriceModelNewFloatingTieredWithProrationPriceCadence) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingTieredWithProrationPriceModelType added in v0.103.0

type NewFloatingPriceModelNewFloatingTieredWithProrationPriceModelType string
const (
	NewFloatingPriceModelNewFloatingTieredWithProrationPriceModelTypeTieredWithProration NewFloatingPriceModelNewFloatingTieredWithProrationPriceModelType = "tiered_with_proration"
)

func (NewFloatingPriceModelNewFloatingTieredWithProrationPriceModelType) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingTieredWithProrationPriceParam added in v0.103.0

type NewFloatingPriceModelNewFloatingTieredWithProrationPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewFloatingPriceModelNewFloatingTieredWithProrationPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                            `json:"item_id,required"`
	ModelType param.Field[NewFloatingPriceModelNewFloatingTieredWithProrationPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                      param.Field[string]                               `json:"name,required"`
	TieredWithProrationConfig param.Field[CustomRatingFunctionConfigModelParam] `json:"tiered_with_proration_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (NewFloatingPriceModelNewFloatingTieredWithProrationPriceParam) MarshalJSON added in v0.103.0

type NewFloatingPriceModelNewFloatingUnitPriceCadence added in v0.103.0

type NewFloatingPriceModelNewFloatingUnitPriceCadence string

The cadence to bill for this price on.

const (
	NewFloatingPriceModelNewFloatingUnitPriceCadenceAnnual     NewFloatingPriceModelNewFloatingUnitPriceCadence = "annual"
	NewFloatingPriceModelNewFloatingUnitPriceCadenceSemiAnnual NewFloatingPriceModelNewFloatingUnitPriceCadence = "semi_annual"
	NewFloatingPriceModelNewFloatingUnitPriceCadenceMonthly    NewFloatingPriceModelNewFloatingUnitPriceCadence = "monthly"
	NewFloatingPriceModelNewFloatingUnitPriceCadenceQuarterly  NewFloatingPriceModelNewFloatingUnitPriceCadence = "quarterly"
	NewFloatingPriceModelNewFloatingUnitPriceCadenceOneTime    NewFloatingPriceModelNewFloatingUnitPriceCadence = "one_time"
	NewFloatingPriceModelNewFloatingUnitPriceCadenceCustom     NewFloatingPriceModelNewFloatingUnitPriceCadence = "custom"
)

func (NewFloatingPriceModelNewFloatingUnitPriceCadence) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingUnitPriceModelType added in v0.103.0

type NewFloatingPriceModelNewFloatingUnitPriceModelType string
const (
	NewFloatingPriceModelNewFloatingUnitPriceModelTypeUnit NewFloatingPriceModelNewFloatingUnitPriceModelType = "unit"
)

func (NewFloatingPriceModelNewFloatingUnitPriceModelType) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingUnitPriceParam added in v0.103.0

type NewFloatingPriceModelNewFloatingUnitPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewFloatingPriceModelNewFloatingUnitPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                             `json:"item_id,required"`
	ModelType param.Field[NewFloatingPriceModelNewFloatingUnitPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name       param.Field[string]               `json:"name,required"`
	UnitConfig param.Field[UnitConfigModelParam] `json:"unit_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (NewFloatingPriceModelNewFloatingUnitPriceParam) MarshalJSON added in v0.103.0

func (r NewFloatingPriceModelNewFloatingUnitPriceParam) MarshalJSON() (data []byte, err error)

type NewFloatingPriceModelNewFloatingUnitWithPercentPriceCadence added in v0.103.0

type NewFloatingPriceModelNewFloatingUnitWithPercentPriceCadence string

The cadence to bill for this price on.

const (
	NewFloatingPriceModelNewFloatingUnitWithPercentPriceCadenceAnnual     NewFloatingPriceModelNewFloatingUnitWithPercentPriceCadence = "annual"
	NewFloatingPriceModelNewFloatingUnitWithPercentPriceCadenceSemiAnnual NewFloatingPriceModelNewFloatingUnitWithPercentPriceCadence = "semi_annual"
	NewFloatingPriceModelNewFloatingUnitWithPercentPriceCadenceMonthly    NewFloatingPriceModelNewFloatingUnitWithPercentPriceCadence = "monthly"
	NewFloatingPriceModelNewFloatingUnitWithPercentPriceCadenceQuarterly  NewFloatingPriceModelNewFloatingUnitWithPercentPriceCadence = "quarterly"
	NewFloatingPriceModelNewFloatingUnitWithPercentPriceCadenceOneTime    NewFloatingPriceModelNewFloatingUnitWithPercentPriceCadence = "one_time"
	NewFloatingPriceModelNewFloatingUnitWithPercentPriceCadenceCustom     NewFloatingPriceModelNewFloatingUnitWithPercentPriceCadence = "custom"
)

func (NewFloatingPriceModelNewFloatingUnitWithPercentPriceCadence) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingUnitWithPercentPriceModelType added in v0.103.0

type NewFloatingPriceModelNewFloatingUnitWithPercentPriceModelType string
const (
	NewFloatingPriceModelNewFloatingUnitWithPercentPriceModelTypeUnitWithPercent NewFloatingPriceModelNewFloatingUnitWithPercentPriceModelType = "unit_with_percent"
)

func (NewFloatingPriceModelNewFloatingUnitWithPercentPriceModelType) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingUnitWithPercentPriceParam added in v0.103.0

type NewFloatingPriceModelNewFloatingUnitWithPercentPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewFloatingPriceModelNewFloatingUnitWithPercentPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                        `json:"item_id,required"`
	ModelType param.Field[NewFloatingPriceModelNewFloatingUnitWithPercentPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                  param.Field[string]                               `json:"name,required"`
	UnitWithPercentConfig param.Field[CustomRatingFunctionConfigModelParam] `json:"unit_with_percent_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (NewFloatingPriceModelNewFloatingUnitWithPercentPriceParam) MarshalJSON added in v0.103.0

type NewFloatingPriceModelNewFloatingUnitWithProrationPriceCadence added in v0.103.0

type NewFloatingPriceModelNewFloatingUnitWithProrationPriceCadence string

The cadence to bill for this price on.

const (
	NewFloatingPriceModelNewFloatingUnitWithProrationPriceCadenceAnnual     NewFloatingPriceModelNewFloatingUnitWithProrationPriceCadence = "annual"
	NewFloatingPriceModelNewFloatingUnitWithProrationPriceCadenceSemiAnnual NewFloatingPriceModelNewFloatingUnitWithProrationPriceCadence = "semi_annual"
	NewFloatingPriceModelNewFloatingUnitWithProrationPriceCadenceMonthly    NewFloatingPriceModelNewFloatingUnitWithProrationPriceCadence = "monthly"
	NewFloatingPriceModelNewFloatingUnitWithProrationPriceCadenceQuarterly  NewFloatingPriceModelNewFloatingUnitWithProrationPriceCadence = "quarterly"
	NewFloatingPriceModelNewFloatingUnitWithProrationPriceCadenceOneTime    NewFloatingPriceModelNewFloatingUnitWithProrationPriceCadence = "one_time"
	NewFloatingPriceModelNewFloatingUnitWithProrationPriceCadenceCustom     NewFloatingPriceModelNewFloatingUnitWithProrationPriceCadence = "custom"
)

func (NewFloatingPriceModelNewFloatingUnitWithProrationPriceCadence) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingUnitWithProrationPriceModelType added in v0.103.0

type NewFloatingPriceModelNewFloatingUnitWithProrationPriceModelType string
const (
	NewFloatingPriceModelNewFloatingUnitWithProrationPriceModelTypeUnitWithProration NewFloatingPriceModelNewFloatingUnitWithProrationPriceModelType = "unit_with_proration"
)

func (NewFloatingPriceModelNewFloatingUnitWithProrationPriceModelType) IsKnown added in v0.103.0

type NewFloatingPriceModelNewFloatingUnitWithProrationPriceParam added in v0.103.0

type NewFloatingPriceModelNewFloatingUnitWithProrationPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewFloatingPriceModelNewFloatingUnitWithProrationPriceCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                          `json:"item_id,required"`
	ModelType param.Field[NewFloatingPriceModelNewFloatingUnitWithProrationPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                    param.Field[string]                               `json:"name,required"`
	UnitWithProrationConfig param.Field[CustomRatingFunctionConfigModelParam] `json:"unit_with_proration_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
}

func (NewFloatingPriceModelNewFloatingUnitWithProrationPriceParam) MarshalJSON added in v0.103.0

type NewFloatingPriceModelParam added in v0.103.0

type NewFloatingPriceModelParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewFloatingPriceModelCadence] `json:"cadence,required"`
	// An ISO 4217 currency string for which this price is billed in.
	Currency param.Field[string] `json:"currency,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                         `json:"item_id,required"`
	ModelType param.Field[NewFloatingPriceModelModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	BpsConfig                 param.Field[BpsConfigModelParam]                    `json:"bps_config"`
	BulkBpsConfig             param.Field[BulkBpsConfigModelParam]                `json:"bulk_bps_config"`
	BulkConfig                param.Field[BulkConfigModelParam]                   `json:"bulk_config"`
	BulkWithProrationConfig   param.Field[CustomRatingFunctionConfigModelParam]   `json:"bulk_with_proration_config"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate              param.Field[float64]                              `json:"conversion_rate"`
	CumulativeGroupedBulkConfig param.Field[CustomRatingFunctionConfigModelParam] `json:"cumulative_grouped_bulk_config"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity               param.Field[float64]                              `json:"fixed_price_quantity"`
	GroupedAllocationConfig          param.Field[CustomRatingFunctionConfigModelParam] `json:"grouped_allocation_config"`
	GroupedTieredConfig              param.Field[CustomRatingFunctionConfigModelParam] `json:"grouped_tiered_config"`
	GroupedTieredPackageConfig       param.Field[CustomRatingFunctionConfigModelParam] `json:"grouped_tiered_package_config"`
	GroupedWithMeteredMinimumConfig  param.Field[CustomRatingFunctionConfigModelParam] `json:"grouped_with_metered_minimum_config"`
	GroupedWithProratedMinimumConfig param.Field[CustomRatingFunctionConfigModelParam] `json:"grouped_with_prorated_minimum_config"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration           param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	MatrixConfig                          param.Field[MatrixConfigModelParam]                 `json:"matrix_config"`
	MatrixWithAllocationConfig            param.Field[MatrixWithAllocationConfigModelParam]   `json:"matrix_with_allocation_config"`
	MatrixWithDisplayNameConfig           param.Field[CustomRatingFunctionConfigModelParam]   `json:"matrix_with_display_name_config"`
	MaxGroupTieredPackageConfig           param.Field[CustomRatingFunctionConfigModelParam]   `json:"max_group_tiered_package_config"`
	Metadata                              param.Field[interface{}]                            `json:"metadata"`
	PackageConfig                         param.Field[PackageConfigModelParam]                `json:"package_config"`
	PackageWithAllocationConfig           param.Field[CustomRatingFunctionConfigModelParam]   `json:"package_with_allocation_config"`
	ScalableMatrixWithTieredPricingConfig param.Field[CustomRatingFunctionConfigModelParam]   `json:"scalable_matrix_with_tiered_pricing_config"`
	ScalableMatrixWithUnitPricingConfig   param.Field[CustomRatingFunctionConfigModelParam]   `json:"scalable_matrix_with_unit_pricing_config"`
	ThresholdTotalAmountConfig            param.Field[CustomRatingFunctionConfigModelParam]   `json:"threshold_total_amount_config"`
	TieredBpsConfig                       param.Field[TieredBpsConfigModelParam]              `json:"tiered_bps_config"`
	TieredConfig                          param.Field[TieredConfigModelParam]                 `json:"tiered_config"`
	TieredPackageConfig                   param.Field[CustomRatingFunctionConfigModelParam]   `json:"tiered_package_config"`
	TieredPackageWithMinimumConfig        param.Field[CustomRatingFunctionConfigModelParam]   `json:"tiered_package_with_minimum_config"`
	TieredWithMinimumConfig               param.Field[CustomRatingFunctionConfigModelParam]   `json:"tiered_with_minimum_config"`
	TieredWithProrationConfig             param.Field[CustomRatingFunctionConfigModelParam]   `json:"tiered_with_proration_config"`
	UnitConfig                            param.Field[UnitConfigModelParam]                   `json:"unit_config"`
	UnitWithPercentConfig                 param.Field[CustomRatingFunctionConfigModelParam]   `json:"unit_with_percent_config"`
	UnitWithProrationConfig               param.Field[CustomRatingFunctionConfigModelParam]   `json:"unit_with_proration_config"`
}

func (NewFloatingPriceModelParam) MarshalJSON added in v0.103.0

func (r NewFloatingPriceModelParam) MarshalJSON() (data []byte, err error)

type NewFloatingPriceModelUnionParam added in v0.103.0

type NewFloatingPriceModelUnionParam interface {
	// contains filtered or unexported methods
}

Satisfied by shared.NewFloatingPriceModelNewFloatingUnitPriceParam, shared.NewFloatingPriceModelNewFloatingPackagePriceParam, shared.NewFloatingPriceModelNewFloatingMatrixPriceParam, shared.NewFloatingPriceModelNewFloatingMatrixWithAllocationPriceParam, shared.NewFloatingPriceModelNewFloatingTieredPriceParam, shared.NewFloatingPriceModelNewFloatingTieredBpsPriceParam, shared.NewFloatingPriceModelNewFloatingBpsPriceParam, shared.NewFloatingPriceModelNewFloatingBulkBpsPriceParam, shared.NewFloatingPriceModelNewFloatingBulkPriceParam, shared.NewFloatingPriceModelNewFloatingThresholdTotalAmountPriceParam, shared.NewFloatingPriceModelNewFloatingTieredPackagePriceParam, shared.NewFloatingPriceModelNewFloatingGroupedTieredPriceParam, shared.NewFloatingPriceModelNewFloatingMaxGroupTieredPackagePriceParam, shared.NewFloatingPriceModelNewFloatingTieredWithMinimumPriceParam, shared.NewFloatingPriceModelNewFloatingPackageWithAllocationPriceParam, shared.NewFloatingPriceModelNewFloatingTieredPackageWithMinimumPriceParam, shared.NewFloatingPriceModelNewFloatingUnitWithPercentPriceParam, shared.NewFloatingPriceModelNewFloatingTieredWithProrationPriceParam, shared.NewFloatingPriceModelNewFloatingUnitWithProrationPriceParam, shared.NewFloatingPriceModelNewFloatingGroupedAllocationPriceParam, shared.NewFloatingPriceModelNewFloatingGroupedWithProratedMinimumPriceParam, shared.NewFloatingPriceModelNewFloatingGroupedWithMeteredMinimumPriceParam, shared.NewFloatingPriceModelNewFloatingMatrixWithDisplayNamePriceParam, shared.NewFloatingPriceModelNewFloatingBulkWithProrationPriceParam, shared.NewFloatingPriceModelNewFloatingGroupedTieredPackagePriceParam, shared.NewFloatingPriceModelNewFloatingScalableMatrixWithUnitPricingPriceParam, shared.NewFloatingPriceModelNewFloatingScalableMatrixWithTieredPricingPriceParam, shared.NewFloatingPriceModelNewFloatingCumulativeGroupedBulkPriceParam, NewFloatingPriceModelParam.

type NewReportingConfigurationModelParam added in v0.103.0

type NewReportingConfigurationModelParam struct {
	Exempt param.Field[bool] `json:"exempt,required"`
}

func (NewReportingConfigurationModelParam) MarshalJSON added in v0.103.0

func (r NewReportingConfigurationModelParam) MarshalJSON() (data []byte, err error)

type NewSubscriptionPriceModelCadence added in v0.103.0

type NewSubscriptionPriceModelCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionPriceModelCadenceAnnual     NewSubscriptionPriceModelCadence = "annual"
	NewSubscriptionPriceModelCadenceSemiAnnual NewSubscriptionPriceModelCadence = "semi_annual"
	NewSubscriptionPriceModelCadenceMonthly    NewSubscriptionPriceModelCadence = "monthly"
	NewSubscriptionPriceModelCadenceQuarterly  NewSubscriptionPriceModelCadence = "quarterly"
	NewSubscriptionPriceModelCadenceOneTime    NewSubscriptionPriceModelCadence = "one_time"
	NewSubscriptionPriceModelCadenceCustom     NewSubscriptionPriceModelCadence = "custom"
)

func (NewSubscriptionPriceModelCadence) IsKnown added in v0.103.0

type NewSubscriptionPriceModelModelType added in v0.103.0

type NewSubscriptionPriceModelModelType string
const (
	NewSubscriptionPriceModelModelTypeUnit                            NewSubscriptionPriceModelModelType = "unit"
	NewSubscriptionPriceModelModelTypePackage                         NewSubscriptionPriceModelModelType = "package"
	NewSubscriptionPriceModelModelTypeMatrix                          NewSubscriptionPriceModelModelType = "matrix"
	NewSubscriptionPriceModelModelTypeTiered                          NewSubscriptionPriceModelModelType = "tiered"
	NewSubscriptionPriceModelModelTypeTieredBps                       NewSubscriptionPriceModelModelType = "tiered_bps"
	NewSubscriptionPriceModelModelTypeBps                             NewSubscriptionPriceModelModelType = "bps"
	NewSubscriptionPriceModelModelTypeBulkBps                         NewSubscriptionPriceModelModelType = "bulk_bps"
	NewSubscriptionPriceModelModelTypeBulk                            NewSubscriptionPriceModelModelType = "bulk"
	NewSubscriptionPriceModelModelTypeThresholdTotalAmount            NewSubscriptionPriceModelModelType = "threshold_total_amount"
	NewSubscriptionPriceModelModelTypeTieredPackage                   NewSubscriptionPriceModelModelType = "tiered_package"
	NewSubscriptionPriceModelModelTypeTieredWithMinimum               NewSubscriptionPriceModelModelType = "tiered_with_minimum"
	NewSubscriptionPriceModelModelTypeUnitWithPercent                 NewSubscriptionPriceModelModelType = "unit_with_percent"
	NewSubscriptionPriceModelModelTypePackageWithAllocation           NewSubscriptionPriceModelModelType = "package_with_allocation"
	NewSubscriptionPriceModelModelTypeTieredWithProration             NewSubscriptionPriceModelModelType = "tiered_with_proration"
	NewSubscriptionPriceModelModelTypeUnitWithProration               NewSubscriptionPriceModelModelType = "unit_with_proration"
	NewSubscriptionPriceModelModelTypeGroupedAllocation               NewSubscriptionPriceModelModelType = "grouped_allocation"
	NewSubscriptionPriceModelModelTypeGroupedWithProratedMinimum      NewSubscriptionPriceModelModelType = "grouped_with_prorated_minimum"
	NewSubscriptionPriceModelModelTypeBulkWithProration               NewSubscriptionPriceModelModelType = "bulk_with_proration"
	NewSubscriptionPriceModelModelTypeScalableMatrixWithUnitPricing   NewSubscriptionPriceModelModelType = "scalable_matrix_with_unit_pricing"
	NewSubscriptionPriceModelModelTypeScalableMatrixWithTieredPricing NewSubscriptionPriceModelModelType = "scalable_matrix_with_tiered_pricing"
	NewSubscriptionPriceModelModelTypeCumulativeGroupedBulk           NewSubscriptionPriceModelModelType = "cumulative_grouped_bulk"
	NewSubscriptionPriceModelModelTypeMaxGroupTieredPackage           NewSubscriptionPriceModelModelType = "max_group_tiered_package"
	NewSubscriptionPriceModelModelTypeGroupedWithMeteredMinimum       NewSubscriptionPriceModelModelType = "grouped_with_metered_minimum"
	NewSubscriptionPriceModelModelTypeMatrixWithDisplayName           NewSubscriptionPriceModelModelType = "matrix_with_display_name"
	NewSubscriptionPriceModelModelTypeGroupedTieredPackage            NewSubscriptionPriceModelModelType = "grouped_tiered_package"
)

func (NewSubscriptionPriceModelModelType) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionBpsPriceCadence added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionBpsPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionPriceModelNewSubscriptionBpsPriceCadenceAnnual     NewSubscriptionPriceModelNewSubscriptionBpsPriceCadence = "annual"
	NewSubscriptionPriceModelNewSubscriptionBpsPriceCadenceSemiAnnual NewSubscriptionPriceModelNewSubscriptionBpsPriceCadence = "semi_annual"
	NewSubscriptionPriceModelNewSubscriptionBpsPriceCadenceMonthly    NewSubscriptionPriceModelNewSubscriptionBpsPriceCadence = "monthly"
	NewSubscriptionPriceModelNewSubscriptionBpsPriceCadenceQuarterly  NewSubscriptionPriceModelNewSubscriptionBpsPriceCadence = "quarterly"
	NewSubscriptionPriceModelNewSubscriptionBpsPriceCadenceOneTime    NewSubscriptionPriceModelNewSubscriptionBpsPriceCadence = "one_time"
	NewSubscriptionPriceModelNewSubscriptionBpsPriceCadenceCustom     NewSubscriptionPriceModelNewSubscriptionBpsPriceCadence = "custom"
)

func (NewSubscriptionPriceModelNewSubscriptionBpsPriceCadence) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionBpsPriceModelType added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionBpsPriceModelType string
const (
	NewSubscriptionPriceModelNewSubscriptionBpsPriceModelTypeBps NewSubscriptionPriceModelNewSubscriptionBpsPriceModelType = "bps"
)

func (NewSubscriptionPriceModelNewSubscriptionBpsPriceModelType) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionBpsPriceParam added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionBpsPriceParam struct {
	BpsConfig param.Field[BpsConfigModelParam] `json:"bps_config,required"`
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionPriceModelNewSubscriptionBpsPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                    `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionPriceModelNewSubscriptionBpsPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionPriceModelNewSubscriptionBpsPriceParam) MarshalJSON added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionBulkBpsPriceCadence added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionBulkBpsPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionPriceModelNewSubscriptionBulkBpsPriceCadenceAnnual     NewSubscriptionPriceModelNewSubscriptionBulkBpsPriceCadence = "annual"
	NewSubscriptionPriceModelNewSubscriptionBulkBpsPriceCadenceSemiAnnual NewSubscriptionPriceModelNewSubscriptionBulkBpsPriceCadence = "semi_annual"
	NewSubscriptionPriceModelNewSubscriptionBulkBpsPriceCadenceMonthly    NewSubscriptionPriceModelNewSubscriptionBulkBpsPriceCadence = "monthly"
	NewSubscriptionPriceModelNewSubscriptionBulkBpsPriceCadenceQuarterly  NewSubscriptionPriceModelNewSubscriptionBulkBpsPriceCadence = "quarterly"
	NewSubscriptionPriceModelNewSubscriptionBulkBpsPriceCadenceOneTime    NewSubscriptionPriceModelNewSubscriptionBulkBpsPriceCadence = "one_time"
	NewSubscriptionPriceModelNewSubscriptionBulkBpsPriceCadenceCustom     NewSubscriptionPriceModelNewSubscriptionBulkBpsPriceCadence = "custom"
)

func (NewSubscriptionPriceModelNewSubscriptionBulkBpsPriceCadence) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionBulkBpsPriceModelType added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionBulkBpsPriceModelType string
const (
	NewSubscriptionPriceModelNewSubscriptionBulkBpsPriceModelTypeBulkBps NewSubscriptionPriceModelNewSubscriptionBulkBpsPriceModelType = "bulk_bps"
)

func (NewSubscriptionPriceModelNewSubscriptionBulkBpsPriceModelType) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionBulkBpsPriceParam added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionBulkBpsPriceParam struct {
	BulkBpsConfig param.Field[BulkBpsConfigModelParam] `json:"bulk_bps_config,required"`
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionPriceModelNewSubscriptionBulkBpsPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                        `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionPriceModelNewSubscriptionBulkBpsPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionPriceModelNewSubscriptionBulkBpsPriceParam) MarshalJSON added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionBulkPriceCadence added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionBulkPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionPriceModelNewSubscriptionBulkPriceCadenceAnnual     NewSubscriptionPriceModelNewSubscriptionBulkPriceCadence = "annual"
	NewSubscriptionPriceModelNewSubscriptionBulkPriceCadenceSemiAnnual NewSubscriptionPriceModelNewSubscriptionBulkPriceCadence = "semi_annual"
	NewSubscriptionPriceModelNewSubscriptionBulkPriceCadenceMonthly    NewSubscriptionPriceModelNewSubscriptionBulkPriceCadence = "monthly"
	NewSubscriptionPriceModelNewSubscriptionBulkPriceCadenceQuarterly  NewSubscriptionPriceModelNewSubscriptionBulkPriceCadence = "quarterly"
	NewSubscriptionPriceModelNewSubscriptionBulkPriceCadenceOneTime    NewSubscriptionPriceModelNewSubscriptionBulkPriceCadence = "one_time"
	NewSubscriptionPriceModelNewSubscriptionBulkPriceCadenceCustom     NewSubscriptionPriceModelNewSubscriptionBulkPriceCadence = "custom"
)

func (NewSubscriptionPriceModelNewSubscriptionBulkPriceCadence) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionBulkPriceModelType added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionBulkPriceModelType string
const (
	NewSubscriptionPriceModelNewSubscriptionBulkPriceModelTypeBulk NewSubscriptionPriceModelNewSubscriptionBulkPriceModelType = "bulk"
)

func (NewSubscriptionPriceModelNewSubscriptionBulkPriceModelType) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionBulkPriceParam added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionBulkPriceParam struct {
	BulkConfig param.Field[BulkConfigModelParam] `json:"bulk_config,required"`
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionPriceModelNewSubscriptionBulkPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                     `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionPriceModelNewSubscriptionBulkPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionPriceModelNewSubscriptionBulkPriceParam) MarshalJSON added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionBulkWithProrationPriceCadence added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionBulkWithProrationPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionPriceModelNewSubscriptionBulkWithProrationPriceCadenceAnnual     NewSubscriptionPriceModelNewSubscriptionBulkWithProrationPriceCadence = "annual"
	NewSubscriptionPriceModelNewSubscriptionBulkWithProrationPriceCadenceSemiAnnual NewSubscriptionPriceModelNewSubscriptionBulkWithProrationPriceCadence = "semi_annual"
	NewSubscriptionPriceModelNewSubscriptionBulkWithProrationPriceCadenceMonthly    NewSubscriptionPriceModelNewSubscriptionBulkWithProrationPriceCadence = "monthly"
	NewSubscriptionPriceModelNewSubscriptionBulkWithProrationPriceCadenceQuarterly  NewSubscriptionPriceModelNewSubscriptionBulkWithProrationPriceCadence = "quarterly"
	NewSubscriptionPriceModelNewSubscriptionBulkWithProrationPriceCadenceOneTime    NewSubscriptionPriceModelNewSubscriptionBulkWithProrationPriceCadence = "one_time"
	NewSubscriptionPriceModelNewSubscriptionBulkWithProrationPriceCadenceCustom     NewSubscriptionPriceModelNewSubscriptionBulkWithProrationPriceCadence = "custom"
)

func (NewSubscriptionPriceModelNewSubscriptionBulkWithProrationPriceCadence) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionBulkWithProrationPriceModelType added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionBulkWithProrationPriceModelType string
const (
	NewSubscriptionPriceModelNewSubscriptionBulkWithProrationPriceModelTypeBulkWithProration NewSubscriptionPriceModelNewSubscriptionBulkWithProrationPriceModelType = "bulk_with_proration"
)

func (NewSubscriptionPriceModelNewSubscriptionBulkWithProrationPriceModelType) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionBulkWithProrationPriceParam added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionBulkWithProrationPriceParam struct {
	BulkWithProrationConfig param.Field[CustomRatingFunctionConfigModelParam] `json:"bulk_with_proration_config,required"`
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionPriceModelNewSubscriptionBulkWithProrationPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                                  `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionPriceModelNewSubscriptionBulkWithProrationPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionPriceModelNewSubscriptionBulkWithProrationPriceParam) MarshalJSON added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionCumulativeGroupedBulkPriceCadence added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionCumulativeGroupedBulkPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionPriceModelNewSubscriptionCumulativeGroupedBulkPriceCadenceAnnual     NewSubscriptionPriceModelNewSubscriptionCumulativeGroupedBulkPriceCadence = "annual"
	NewSubscriptionPriceModelNewSubscriptionCumulativeGroupedBulkPriceCadenceSemiAnnual NewSubscriptionPriceModelNewSubscriptionCumulativeGroupedBulkPriceCadence = "semi_annual"
	NewSubscriptionPriceModelNewSubscriptionCumulativeGroupedBulkPriceCadenceMonthly    NewSubscriptionPriceModelNewSubscriptionCumulativeGroupedBulkPriceCadence = "monthly"
	NewSubscriptionPriceModelNewSubscriptionCumulativeGroupedBulkPriceCadenceQuarterly  NewSubscriptionPriceModelNewSubscriptionCumulativeGroupedBulkPriceCadence = "quarterly"
	NewSubscriptionPriceModelNewSubscriptionCumulativeGroupedBulkPriceCadenceOneTime    NewSubscriptionPriceModelNewSubscriptionCumulativeGroupedBulkPriceCadence = "one_time"
	NewSubscriptionPriceModelNewSubscriptionCumulativeGroupedBulkPriceCadenceCustom     NewSubscriptionPriceModelNewSubscriptionCumulativeGroupedBulkPriceCadence = "custom"
)

func (NewSubscriptionPriceModelNewSubscriptionCumulativeGroupedBulkPriceCadence) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionCumulativeGroupedBulkPriceModelType added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionCumulativeGroupedBulkPriceModelType string
const (
	NewSubscriptionPriceModelNewSubscriptionCumulativeGroupedBulkPriceModelTypeCumulativeGroupedBulk NewSubscriptionPriceModelNewSubscriptionCumulativeGroupedBulkPriceModelType = "cumulative_grouped_bulk"
)

func (NewSubscriptionPriceModelNewSubscriptionCumulativeGroupedBulkPriceModelType) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionCumulativeGroupedBulkPriceParam added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionCumulativeGroupedBulkPriceParam struct {
	// The cadence to bill for this price on.
	Cadence                     param.Field[NewSubscriptionPriceModelNewSubscriptionCumulativeGroupedBulkPriceCadence] `json:"cadence,required"`
	CumulativeGroupedBulkConfig param.Field[CustomRatingFunctionConfigModelParam]                                      `json:"cumulative_grouped_bulk_config,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                                      `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionPriceModelNewSubscriptionCumulativeGroupedBulkPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionPriceModelNewSubscriptionCumulativeGroupedBulkPriceParam) MarshalJSON added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionGroupedAllocationPriceCadence added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionGroupedAllocationPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionPriceModelNewSubscriptionGroupedAllocationPriceCadenceAnnual     NewSubscriptionPriceModelNewSubscriptionGroupedAllocationPriceCadence = "annual"
	NewSubscriptionPriceModelNewSubscriptionGroupedAllocationPriceCadenceSemiAnnual NewSubscriptionPriceModelNewSubscriptionGroupedAllocationPriceCadence = "semi_annual"
	NewSubscriptionPriceModelNewSubscriptionGroupedAllocationPriceCadenceMonthly    NewSubscriptionPriceModelNewSubscriptionGroupedAllocationPriceCadence = "monthly"
	NewSubscriptionPriceModelNewSubscriptionGroupedAllocationPriceCadenceQuarterly  NewSubscriptionPriceModelNewSubscriptionGroupedAllocationPriceCadence = "quarterly"
	NewSubscriptionPriceModelNewSubscriptionGroupedAllocationPriceCadenceOneTime    NewSubscriptionPriceModelNewSubscriptionGroupedAllocationPriceCadence = "one_time"
	NewSubscriptionPriceModelNewSubscriptionGroupedAllocationPriceCadenceCustom     NewSubscriptionPriceModelNewSubscriptionGroupedAllocationPriceCadence = "custom"
)

func (NewSubscriptionPriceModelNewSubscriptionGroupedAllocationPriceCadence) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionGroupedAllocationPriceModelType added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionGroupedAllocationPriceModelType string
const (
	NewSubscriptionPriceModelNewSubscriptionGroupedAllocationPriceModelTypeGroupedAllocation NewSubscriptionPriceModelNewSubscriptionGroupedAllocationPriceModelType = "grouped_allocation"
)

func (NewSubscriptionPriceModelNewSubscriptionGroupedAllocationPriceModelType) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionGroupedAllocationPriceParam added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionGroupedAllocationPriceParam struct {
	// The cadence to bill for this price on.
	Cadence                 param.Field[NewSubscriptionPriceModelNewSubscriptionGroupedAllocationPriceCadence] `json:"cadence,required"`
	GroupedAllocationConfig param.Field[CustomRatingFunctionConfigModelParam]                                  `json:"grouped_allocation_config,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                                  `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionPriceModelNewSubscriptionGroupedAllocationPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionPriceModelNewSubscriptionGroupedAllocationPriceParam) MarshalJSON added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionGroupedTieredPackagePriceCadence added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionGroupedTieredPackagePriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionPriceModelNewSubscriptionGroupedTieredPackagePriceCadenceAnnual     NewSubscriptionPriceModelNewSubscriptionGroupedTieredPackagePriceCadence = "annual"
	NewSubscriptionPriceModelNewSubscriptionGroupedTieredPackagePriceCadenceSemiAnnual NewSubscriptionPriceModelNewSubscriptionGroupedTieredPackagePriceCadence = "semi_annual"
	NewSubscriptionPriceModelNewSubscriptionGroupedTieredPackagePriceCadenceMonthly    NewSubscriptionPriceModelNewSubscriptionGroupedTieredPackagePriceCadence = "monthly"
	NewSubscriptionPriceModelNewSubscriptionGroupedTieredPackagePriceCadenceQuarterly  NewSubscriptionPriceModelNewSubscriptionGroupedTieredPackagePriceCadence = "quarterly"
	NewSubscriptionPriceModelNewSubscriptionGroupedTieredPackagePriceCadenceOneTime    NewSubscriptionPriceModelNewSubscriptionGroupedTieredPackagePriceCadence = "one_time"
	NewSubscriptionPriceModelNewSubscriptionGroupedTieredPackagePriceCadenceCustom     NewSubscriptionPriceModelNewSubscriptionGroupedTieredPackagePriceCadence = "custom"
)

func (NewSubscriptionPriceModelNewSubscriptionGroupedTieredPackagePriceCadence) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionGroupedTieredPackagePriceModelType added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionGroupedTieredPackagePriceModelType string
const (
	NewSubscriptionPriceModelNewSubscriptionGroupedTieredPackagePriceModelTypeGroupedTieredPackage NewSubscriptionPriceModelNewSubscriptionGroupedTieredPackagePriceModelType = "grouped_tiered_package"
)

func (NewSubscriptionPriceModelNewSubscriptionGroupedTieredPackagePriceModelType) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionGroupedTieredPackagePriceParam added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionGroupedTieredPackagePriceParam struct {
	// The cadence to bill for this price on.
	Cadence                    param.Field[NewSubscriptionPriceModelNewSubscriptionGroupedTieredPackagePriceCadence] `json:"cadence,required"`
	GroupedTieredPackageConfig param.Field[CustomRatingFunctionConfigModelParam]                                     `json:"grouped_tiered_package_config,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                                     `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionPriceModelNewSubscriptionGroupedTieredPackagePriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionPriceModelNewSubscriptionGroupedTieredPackagePriceParam) MarshalJSON added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionGroupedWithMeteredMinimumPriceCadence added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionGroupedWithMeteredMinimumPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionPriceModelNewSubscriptionGroupedWithMeteredMinimumPriceCadenceAnnual     NewSubscriptionPriceModelNewSubscriptionGroupedWithMeteredMinimumPriceCadence = "annual"
	NewSubscriptionPriceModelNewSubscriptionGroupedWithMeteredMinimumPriceCadenceSemiAnnual NewSubscriptionPriceModelNewSubscriptionGroupedWithMeteredMinimumPriceCadence = "semi_annual"
	NewSubscriptionPriceModelNewSubscriptionGroupedWithMeteredMinimumPriceCadenceMonthly    NewSubscriptionPriceModelNewSubscriptionGroupedWithMeteredMinimumPriceCadence = "monthly"
	NewSubscriptionPriceModelNewSubscriptionGroupedWithMeteredMinimumPriceCadenceQuarterly  NewSubscriptionPriceModelNewSubscriptionGroupedWithMeteredMinimumPriceCadence = "quarterly"
	NewSubscriptionPriceModelNewSubscriptionGroupedWithMeteredMinimumPriceCadenceOneTime    NewSubscriptionPriceModelNewSubscriptionGroupedWithMeteredMinimumPriceCadence = "one_time"
	NewSubscriptionPriceModelNewSubscriptionGroupedWithMeteredMinimumPriceCadenceCustom     NewSubscriptionPriceModelNewSubscriptionGroupedWithMeteredMinimumPriceCadence = "custom"
)

func (NewSubscriptionPriceModelNewSubscriptionGroupedWithMeteredMinimumPriceCadence) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionGroupedWithMeteredMinimumPriceModelType added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionGroupedWithMeteredMinimumPriceModelType string
const (
	NewSubscriptionPriceModelNewSubscriptionGroupedWithMeteredMinimumPriceModelTypeGroupedWithMeteredMinimum NewSubscriptionPriceModelNewSubscriptionGroupedWithMeteredMinimumPriceModelType = "grouped_with_metered_minimum"
)

func (NewSubscriptionPriceModelNewSubscriptionGroupedWithMeteredMinimumPriceModelType) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionGroupedWithMeteredMinimumPriceParam added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionGroupedWithMeteredMinimumPriceParam struct {
	// The cadence to bill for this price on.
	Cadence                         param.Field[NewSubscriptionPriceModelNewSubscriptionGroupedWithMeteredMinimumPriceCadence] `json:"cadence,required"`
	GroupedWithMeteredMinimumConfig param.Field[CustomRatingFunctionConfigModelParam]                                          `json:"grouped_with_metered_minimum_config,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                                          `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionPriceModelNewSubscriptionGroupedWithMeteredMinimumPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionPriceModelNewSubscriptionGroupedWithMeteredMinimumPriceParam) MarshalJSON added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionGroupedWithProratedMinimumPriceCadence added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionGroupedWithProratedMinimumPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionPriceModelNewSubscriptionGroupedWithProratedMinimumPriceCadenceAnnual     NewSubscriptionPriceModelNewSubscriptionGroupedWithProratedMinimumPriceCadence = "annual"
	NewSubscriptionPriceModelNewSubscriptionGroupedWithProratedMinimumPriceCadenceSemiAnnual NewSubscriptionPriceModelNewSubscriptionGroupedWithProratedMinimumPriceCadence = "semi_annual"
	NewSubscriptionPriceModelNewSubscriptionGroupedWithProratedMinimumPriceCadenceMonthly    NewSubscriptionPriceModelNewSubscriptionGroupedWithProratedMinimumPriceCadence = "monthly"
	NewSubscriptionPriceModelNewSubscriptionGroupedWithProratedMinimumPriceCadenceQuarterly  NewSubscriptionPriceModelNewSubscriptionGroupedWithProratedMinimumPriceCadence = "quarterly"
	NewSubscriptionPriceModelNewSubscriptionGroupedWithProratedMinimumPriceCadenceOneTime    NewSubscriptionPriceModelNewSubscriptionGroupedWithProratedMinimumPriceCadence = "one_time"
	NewSubscriptionPriceModelNewSubscriptionGroupedWithProratedMinimumPriceCadenceCustom     NewSubscriptionPriceModelNewSubscriptionGroupedWithProratedMinimumPriceCadence = "custom"
)

func (NewSubscriptionPriceModelNewSubscriptionGroupedWithProratedMinimumPriceCadence) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionGroupedWithProratedMinimumPriceModelType added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionGroupedWithProratedMinimumPriceModelType string
const (
	NewSubscriptionPriceModelNewSubscriptionGroupedWithProratedMinimumPriceModelTypeGroupedWithProratedMinimum NewSubscriptionPriceModelNewSubscriptionGroupedWithProratedMinimumPriceModelType = "grouped_with_prorated_minimum"
)

func (NewSubscriptionPriceModelNewSubscriptionGroupedWithProratedMinimumPriceModelType) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionGroupedWithProratedMinimumPriceParam added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionGroupedWithProratedMinimumPriceParam struct {
	// The cadence to bill for this price on.
	Cadence                          param.Field[NewSubscriptionPriceModelNewSubscriptionGroupedWithProratedMinimumPriceCadence] `json:"cadence,required"`
	GroupedWithProratedMinimumConfig param.Field[CustomRatingFunctionConfigModelParam]                                           `json:"grouped_with_prorated_minimum_config,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                                           `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionPriceModelNewSubscriptionGroupedWithProratedMinimumPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionPriceModelNewSubscriptionGroupedWithProratedMinimumPriceParam) MarshalJSON added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionMatrixPriceCadence added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionMatrixPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionPriceModelNewSubscriptionMatrixPriceCadenceAnnual     NewSubscriptionPriceModelNewSubscriptionMatrixPriceCadence = "annual"
	NewSubscriptionPriceModelNewSubscriptionMatrixPriceCadenceSemiAnnual NewSubscriptionPriceModelNewSubscriptionMatrixPriceCadence = "semi_annual"
	NewSubscriptionPriceModelNewSubscriptionMatrixPriceCadenceMonthly    NewSubscriptionPriceModelNewSubscriptionMatrixPriceCadence = "monthly"
	NewSubscriptionPriceModelNewSubscriptionMatrixPriceCadenceQuarterly  NewSubscriptionPriceModelNewSubscriptionMatrixPriceCadence = "quarterly"
	NewSubscriptionPriceModelNewSubscriptionMatrixPriceCadenceOneTime    NewSubscriptionPriceModelNewSubscriptionMatrixPriceCadence = "one_time"
	NewSubscriptionPriceModelNewSubscriptionMatrixPriceCadenceCustom     NewSubscriptionPriceModelNewSubscriptionMatrixPriceCadence = "custom"
)

func (NewSubscriptionPriceModelNewSubscriptionMatrixPriceCadence) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionMatrixPriceModelType added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionMatrixPriceModelType string
const (
	NewSubscriptionPriceModelNewSubscriptionMatrixPriceModelTypeMatrix NewSubscriptionPriceModelNewSubscriptionMatrixPriceModelType = "matrix"
)

func (NewSubscriptionPriceModelNewSubscriptionMatrixPriceModelType) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionMatrixPriceParam added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionMatrixPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionPriceModelNewSubscriptionMatrixPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID       param.Field[string]                                                       `json:"item_id,required"`
	MatrixConfig param.Field[MatrixConfigModelParam]                                       `json:"matrix_config,required"`
	ModelType    param.Field[NewSubscriptionPriceModelNewSubscriptionMatrixPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionPriceModelNewSubscriptionMatrixPriceParam) MarshalJSON added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionMatrixWithDisplayNamePriceCadence added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionMatrixWithDisplayNamePriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionPriceModelNewSubscriptionMatrixWithDisplayNamePriceCadenceAnnual     NewSubscriptionPriceModelNewSubscriptionMatrixWithDisplayNamePriceCadence = "annual"
	NewSubscriptionPriceModelNewSubscriptionMatrixWithDisplayNamePriceCadenceSemiAnnual NewSubscriptionPriceModelNewSubscriptionMatrixWithDisplayNamePriceCadence = "semi_annual"
	NewSubscriptionPriceModelNewSubscriptionMatrixWithDisplayNamePriceCadenceMonthly    NewSubscriptionPriceModelNewSubscriptionMatrixWithDisplayNamePriceCadence = "monthly"
	NewSubscriptionPriceModelNewSubscriptionMatrixWithDisplayNamePriceCadenceQuarterly  NewSubscriptionPriceModelNewSubscriptionMatrixWithDisplayNamePriceCadence = "quarterly"
	NewSubscriptionPriceModelNewSubscriptionMatrixWithDisplayNamePriceCadenceOneTime    NewSubscriptionPriceModelNewSubscriptionMatrixWithDisplayNamePriceCadence = "one_time"
	NewSubscriptionPriceModelNewSubscriptionMatrixWithDisplayNamePriceCadenceCustom     NewSubscriptionPriceModelNewSubscriptionMatrixWithDisplayNamePriceCadence = "custom"
)

func (NewSubscriptionPriceModelNewSubscriptionMatrixWithDisplayNamePriceCadence) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionMatrixWithDisplayNamePriceModelType added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionMatrixWithDisplayNamePriceModelType string
const (
	NewSubscriptionPriceModelNewSubscriptionMatrixWithDisplayNamePriceModelTypeMatrixWithDisplayName NewSubscriptionPriceModelNewSubscriptionMatrixWithDisplayNamePriceModelType = "matrix_with_display_name"
)

func (NewSubscriptionPriceModelNewSubscriptionMatrixWithDisplayNamePriceModelType) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionMatrixWithDisplayNamePriceParam added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionMatrixWithDisplayNamePriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionPriceModelNewSubscriptionMatrixWithDisplayNamePriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID                      param.Field[string]                                                                      `json:"item_id,required"`
	MatrixWithDisplayNameConfig param.Field[CustomRatingFunctionConfigModelParam]                                        `json:"matrix_with_display_name_config,required"`
	ModelType                   param.Field[NewSubscriptionPriceModelNewSubscriptionMatrixWithDisplayNamePriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionPriceModelNewSubscriptionMatrixWithDisplayNamePriceParam) MarshalJSON added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionMaxGroupTieredPackagePriceCadence added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionMaxGroupTieredPackagePriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionPriceModelNewSubscriptionMaxGroupTieredPackagePriceCadenceAnnual     NewSubscriptionPriceModelNewSubscriptionMaxGroupTieredPackagePriceCadence = "annual"
	NewSubscriptionPriceModelNewSubscriptionMaxGroupTieredPackagePriceCadenceSemiAnnual NewSubscriptionPriceModelNewSubscriptionMaxGroupTieredPackagePriceCadence = "semi_annual"
	NewSubscriptionPriceModelNewSubscriptionMaxGroupTieredPackagePriceCadenceMonthly    NewSubscriptionPriceModelNewSubscriptionMaxGroupTieredPackagePriceCadence = "monthly"
	NewSubscriptionPriceModelNewSubscriptionMaxGroupTieredPackagePriceCadenceQuarterly  NewSubscriptionPriceModelNewSubscriptionMaxGroupTieredPackagePriceCadence = "quarterly"
	NewSubscriptionPriceModelNewSubscriptionMaxGroupTieredPackagePriceCadenceOneTime    NewSubscriptionPriceModelNewSubscriptionMaxGroupTieredPackagePriceCadence = "one_time"
	NewSubscriptionPriceModelNewSubscriptionMaxGroupTieredPackagePriceCadenceCustom     NewSubscriptionPriceModelNewSubscriptionMaxGroupTieredPackagePriceCadence = "custom"
)

func (NewSubscriptionPriceModelNewSubscriptionMaxGroupTieredPackagePriceCadence) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionMaxGroupTieredPackagePriceModelType added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionMaxGroupTieredPackagePriceModelType string
const (
	NewSubscriptionPriceModelNewSubscriptionMaxGroupTieredPackagePriceModelTypeMaxGroupTieredPackage NewSubscriptionPriceModelNewSubscriptionMaxGroupTieredPackagePriceModelType = "max_group_tiered_package"
)

func (NewSubscriptionPriceModelNewSubscriptionMaxGroupTieredPackagePriceModelType) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionMaxGroupTieredPackagePriceParam added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionMaxGroupTieredPackagePriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionPriceModelNewSubscriptionMaxGroupTieredPackagePriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID                      param.Field[string]                                                                      `json:"item_id,required"`
	MaxGroupTieredPackageConfig param.Field[CustomRatingFunctionConfigModelParam]                                        `json:"max_group_tiered_package_config,required"`
	ModelType                   param.Field[NewSubscriptionPriceModelNewSubscriptionMaxGroupTieredPackagePriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionPriceModelNewSubscriptionMaxGroupTieredPackagePriceParam) MarshalJSON added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionPackagePriceCadence added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionPackagePriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionPriceModelNewSubscriptionPackagePriceCadenceAnnual     NewSubscriptionPriceModelNewSubscriptionPackagePriceCadence = "annual"
	NewSubscriptionPriceModelNewSubscriptionPackagePriceCadenceSemiAnnual NewSubscriptionPriceModelNewSubscriptionPackagePriceCadence = "semi_annual"
	NewSubscriptionPriceModelNewSubscriptionPackagePriceCadenceMonthly    NewSubscriptionPriceModelNewSubscriptionPackagePriceCadence = "monthly"
	NewSubscriptionPriceModelNewSubscriptionPackagePriceCadenceQuarterly  NewSubscriptionPriceModelNewSubscriptionPackagePriceCadence = "quarterly"
	NewSubscriptionPriceModelNewSubscriptionPackagePriceCadenceOneTime    NewSubscriptionPriceModelNewSubscriptionPackagePriceCadence = "one_time"
	NewSubscriptionPriceModelNewSubscriptionPackagePriceCadenceCustom     NewSubscriptionPriceModelNewSubscriptionPackagePriceCadence = "custom"
)

func (NewSubscriptionPriceModelNewSubscriptionPackagePriceCadence) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionPackagePriceModelType added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionPackagePriceModelType string
const (
	NewSubscriptionPriceModelNewSubscriptionPackagePriceModelTypePackage NewSubscriptionPriceModelNewSubscriptionPackagePriceModelType = "package"
)

func (NewSubscriptionPriceModelNewSubscriptionPackagePriceModelType) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionPackagePriceParam added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionPackagePriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionPriceModelNewSubscriptionPackagePriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                        `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionPriceModelNewSubscriptionPackagePriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name          param.Field[string]                  `json:"name,required"`
	PackageConfig param.Field[PackageConfigModelParam] `json:"package_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionPriceModelNewSubscriptionPackagePriceParam) MarshalJSON added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionPackageWithAllocationPriceCadence added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionPackageWithAllocationPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionPriceModelNewSubscriptionPackageWithAllocationPriceCadenceAnnual     NewSubscriptionPriceModelNewSubscriptionPackageWithAllocationPriceCadence = "annual"
	NewSubscriptionPriceModelNewSubscriptionPackageWithAllocationPriceCadenceSemiAnnual NewSubscriptionPriceModelNewSubscriptionPackageWithAllocationPriceCadence = "semi_annual"
	NewSubscriptionPriceModelNewSubscriptionPackageWithAllocationPriceCadenceMonthly    NewSubscriptionPriceModelNewSubscriptionPackageWithAllocationPriceCadence = "monthly"
	NewSubscriptionPriceModelNewSubscriptionPackageWithAllocationPriceCadenceQuarterly  NewSubscriptionPriceModelNewSubscriptionPackageWithAllocationPriceCadence = "quarterly"
	NewSubscriptionPriceModelNewSubscriptionPackageWithAllocationPriceCadenceOneTime    NewSubscriptionPriceModelNewSubscriptionPackageWithAllocationPriceCadence = "one_time"
	NewSubscriptionPriceModelNewSubscriptionPackageWithAllocationPriceCadenceCustom     NewSubscriptionPriceModelNewSubscriptionPackageWithAllocationPriceCadence = "custom"
)

func (NewSubscriptionPriceModelNewSubscriptionPackageWithAllocationPriceCadence) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionPackageWithAllocationPriceModelType added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionPackageWithAllocationPriceModelType string
const (
	NewSubscriptionPriceModelNewSubscriptionPackageWithAllocationPriceModelTypePackageWithAllocation NewSubscriptionPriceModelNewSubscriptionPackageWithAllocationPriceModelType = "package_with_allocation"
)

func (NewSubscriptionPriceModelNewSubscriptionPackageWithAllocationPriceModelType) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionPackageWithAllocationPriceParam added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionPackageWithAllocationPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionPriceModelNewSubscriptionPackageWithAllocationPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                                      `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionPriceModelNewSubscriptionPackageWithAllocationPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                        param.Field[string]                               `json:"name,required"`
	PackageWithAllocationConfig param.Field[CustomRatingFunctionConfigModelParam] `json:"package_with_allocation_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionPriceModelNewSubscriptionPackageWithAllocationPriceParam) MarshalJSON added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithTieredPricingPriceCadence added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithTieredPricingPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithTieredPricingPriceCadenceAnnual     NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithTieredPricingPriceCadence = "annual"
	NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithTieredPricingPriceCadenceSemiAnnual NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithTieredPricingPriceCadence = "semi_annual"
	NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithTieredPricingPriceCadenceMonthly    NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithTieredPricingPriceCadence = "monthly"
	NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithTieredPricingPriceCadenceQuarterly  NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithTieredPricingPriceCadence = "quarterly"
	NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithTieredPricingPriceCadenceOneTime    NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithTieredPricingPriceCadence = "one_time"
	NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithTieredPricingPriceCadenceCustom     NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithTieredPricingPriceCadence = "custom"
)

func (NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithTieredPricingPriceCadence) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithTieredPricingPriceModelType added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithTieredPricingPriceModelType string
const (
	NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithTieredPricingPriceModelTypeScalableMatrixWithTieredPricing NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithTieredPricingPriceModelType = "scalable_matrix_with_tiered_pricing"
)

func (NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithTieredPricingPriceModelType) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithTieredPricingPriceParam added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithTieredPricingPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithTieredPricingPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                                                `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithTieredPricingPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                                  param.Field[string]                               `json:"name,required"`
	ScalableMatrixWithTieredPricingConfig param.Field[CustomRatingFunctionConfigModelParam] `json:"scalable_matrix_with_tiered_pricing_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithTieredPricingPriceParam) MarshalJSON added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithUnitPricingPriceCadence added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithUnitPricingPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithUnitPricingPriceCadenceAnnual     NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithUnitPricingPriceCadence = "annual"
	NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithUnitPricingPriceCadenceSemiAnnual NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithUnitPricingPriceCadence = "semi_annual"
	NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithUnitPricingPriceCadenceMonthly    NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithUnitPricingPriceCadence = "monthly"
	NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithUnitPricingPriceCadenceQuarterly  NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithUnitPricingPriceCadence = "quarterly"
	NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithUnitPricingPriceCadenceOneTime    NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithUnitPricingPriceCadence = "one_time"
	NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithUnitPricingPriceCadenceCustom     NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithUnitPricingPriceCadence = "custom"
)

func (NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithUnitPricingPriceCadence) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithUnitPricingPriceModelType added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithUnitPricingPriceModelType string
const (
	NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithUnitPricingPriceModelTypeScalableMatrixWithUnitPricing NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithUnitPricingPriceModelType = "scalable_matrix_with_unit_pricing"
)

func (NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithUnitPricingPriceModelType) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithUnitPricingPriceParam added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithUnitPricingPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithUnitPricingPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                                              `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithUnitPricingPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                                param.Field[string]                               `json:"name,required"`
	ScalableMatrixWithUnitPricingConfig param.Field[CustomRatingFunctionConfigModelParam] `json:"scalable_matrix_with_unit_pricing_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithUnitPricingPriceParam) MarshalJSON added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionThresholdTotalAmountPriceCadence added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionThresholdTotalAmountPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionPriceModelNewSubscriptionThresholdTotalAmountPriceCadenceAnnual     NewSubscriptionPriceModelNewSubscriptionThresholdTotalAmountPriceCadence = "annual"
	NewSubscriptionPriceModelNewSubscriptionThresholdTotalAmountPriceCadenceSemiAnnual NewSubscriptionPriceModelNewSubscriptionThresholdTotalAmountPriceCadence = "semi_annual"
	NewSubscriptionPriceModelNewSubscriptionThresholdTotalAmountPriceCadenceMonthly    NewSubscriptionPriceModelNewSubscriptionThresholdTotalAmountPriceCadence = "monthly"
	NewSubscriptionPriceModelNewSubscriptionThresholdTotalAmountPriceCadenceQuarterly  NewSubscriptionPriceModelNewSubscriptionThresholdTotalAmountPriceCadence = "quarterly"
	NewSubscriptionPriceModelNewSubscriptionThresholdTotalAmountPriceCadenceOneTime    NewSubscriptionPriceModelNewSubscriptionThresholdTotalAmountPriceCadence = "one_time"
	NewSubscriptionPriceModelNewSubscriptionThresholdTotalAmountPriceCadenceCustom     NewSubscriptionPriceModelNewSubscriptionThresholdTotalAmountPriceCadence = "custom"
)

func (NewSubscriptionPriceModelNewSubscriptionThresholdTotalAmountPriceCadence) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionThresholdTotalAmountPriceModelType added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionThresholdTotalAmountPriceModelType string
const (
	NewSubscriptionPriceModelNewSubscriptionThresholdTotalAmountPriceModelTypeThresholdTotalAmount NewSubscriptionPriceModelNewSubscriptionThresholdTotalAmountPriceModelType = "threshold_total_amount"
)

func (NewSubscriptionPriceModelNewSubscriptionThresholdTotalAmountPriceModelType) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionThresholdTotalAmountPriceParam added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionThresholdTotalAmountPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionPriceModelNewSubscriptionThresholdTotalAmountPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                                     `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionPriceModelNewSubscriptionThresholdTotalAmountPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                       param.Field[string]                               `json:"name,required"`
	ThresholdTotalAmountConfig param.Field[CustomRatingFunctionConfigModelParam] `json:"threshold_total_amount_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionPriceModelNewSubscriptionThresholdTotalAmountPriceParam) MarshalJSON added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionTierWithProrationPriceCadence added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionTierWithProrationPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionPriceModelNewSubscriptionTierWithProrationPriceCadenceAnnual     NewSubscriptionPriceModelNewSubscriptionTierWithProrationPriceCadence = "annual"
	NewSubscriptionPriceModelNewSubscriptionTierWithProrationPriceCadenceSemiAnnual NewSubscriptionPriceModelNewSubscriptionTierWithProrationPriceCadence = "semi_annual"
	NewSubscriptionPriceModelNewSubscriptionTierWithProrationPriceCadenceMonthly    NewSubscriptionPriceModelNewSubscriptionTierWithProrationPriceCadence = "monthly"
	NewSubscriptionPriceModelNewSubscriptionTierWithProrationPriceCadenceQuarterly  NewSubscriptionPriceModelNewSubscriptionTierWithProrationPriceCadence = "quarterly"
	NewSubscriptionPriceModelNewSubscriptionTierWithProrationPriceCadenceOneTime    NewSubscriptionPriceModelNewSubscriptionTierWithProrationPriceCadence = "one_time"
	NewSubscriptionPriceModelNewSubscriptionTierWithProrationPriceCadenceCustom     NewSubscriptionPriceModelNewSubscriptionTierWithProrationPriceCadence = "custom"
)

func (NewSubscriptionPriceModelNewSubscriptionTierWithProrationPriceCadence) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionTierWithProrationPriceModelType added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionTierWithProrationPriceModelType string
const (
	NewSubscriptionPriceModelNewSubscriptionTierWithProrationPriceModelTypeTieredWithProration NewSubscriptionPriceModelNewSubscriptionTierWithProrationPriceModelType = "tiered_with_proration"
)

func (NewSubscriptionPriceModelNewSubscriptionTierWithProrationPriceModelType) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionTierWithProrationPriceParam added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionTierWithProrationPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionPriceModelNewSubscriptionTierWithProrationPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                                  `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionPriceModelNewSubscriptionTierWithProrationPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                      param.Field[string]                               `json:"name,required"`
	TieredWithProrationConfig param.Field[CustomRatingFunctionConfigModelParam] `json:"tiered_with_proration_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionPriceModelNewSubscriptionTierWithProrationPriceParam) MarshalJSON added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionTieredBpsPriceCadence added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionTieredBpsPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionPriceModelNewSubscriptionTieredBpsPriceCadenceAnnual     NewSubscriptionPriceModelNewSubscriptionTieredBpsPriceCadence = "annual"
	NewSubscriptionPriceModelNewSubscriptionTieredBpsPriceCadenceSemiAnnual NewSubscriptionPriceModelNewSubscriptionTieredBpsPriceCadence = "semi_annual"
	NewSubscriptionPriceModelNewSubscriptionTieredBpsPriceCadenceMonthly    NewSubscriptionPriceModelNewSubscriptionTieredBpsPriceCadence = "monthly"
	NewSubscriptionPriceModelNewSubscriptionTieredBpsPriceCadenceQuarterly  NewSubscriptionPriceModelNewSubscriptionTieredBpsPriceCadence = "quarterly"
	NewSubscriptionPriceModelNewSubscriptionTieredBpsPriceCadenceOneTime    NewSubscriptionPriceModelNewSubscriptionTieredBpsPriceCadence = "one_time"
	NewSubscriptionPriceModelNewSubscriptionTieredBpsPriceCadenceCustom     NewSubscriptionPriceModelNewSubscriptionTieredBpsPriceCadence = "custom"
)

func (NewSubscriptionPriceModelNewSubscriptionTieredBpsPriceCadence) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionTieredBpsPriceModelType added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionTieredBpsPriceModelType string
const (
	NewSubscriptionPriceModelNewSubscriptionTieredBpsPriceModelTypeTieredBps NewSubscriptionPriceModelNewSubscriptionTieredBpsPriceModelType = "tiered_bps"
)

func (NewSubscriptionPriceModelNewSubscriptionTieredBpsPriceModelType) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionTieredBpsPriceParam added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionTieredBpsPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionPriceModelNewSubscriptionTieredBpsPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                          `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionPriceModelNewSubscriptionTieredBpsPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name            param.Field[string]                    `json:"name,required"`
	TieredBpsConfig param.Field[TieredBpsConfigModelParam] `json:"tiered_bps_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionPriceModelNewSubscriptionTieredBpsPriceParam) MarshalJSON added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionTieredPackagePriceCadence added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionTieredPackagePriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionPriceModelNewSubscriptionTieredPackagePriceCadenceAnnual     NewSubscriptionPriceModelNewSubscriptionTieredPackagePriceCadence = "annual"
	NewSubscriptionPriceModelNewSubscriptionTieredPackagePriceCadenceSemiAnnual NewSubscriptionPriceModelNewSubscriptionTieredPackagePriceCadence = "semi_annual"
	NewSubscriptionPriceModelNewSubscriptionTieredPackagePriceCadenceMonthly    NewSubscriptionPriceModelNewSubscriptionTieredPackagePriceCadence = "monthly"
	NewSubscriptionPriceModelNewSubscriptionTieredPackagePriceCadenceQuarterly  NewSubscriptionPriceModelNewSubscriptionTieredPackagePriceCadence = "quarterly"
	NewSubscriptionPriceModelNewSubscriptionTieredPackagePriceCadenceOneTime    NewSubscriptionPriceModelNewSubscriptionTieredPackagePriceCadence = "one_time"
	NewSubscriptionPriceModelNewSubscriptionTieredPackagePriceCadenceCustom     NewSubscriptionPriceModelNewSubscriptionTieredPackagePriceCadence = "custom"
)

func (NewSubscriptionPriceModelNewSubscriptionTieredPackagePriceCadence) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionTieredPackagePriceModelType added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionTieredPackagePriceModelType string
const (
	NewSubscriptionPriceModelNewSubscriptionTieredPackagePriceModelTypeTieredPackage NewSubscriptionPriceModelNewSubscriptionTieredPackagePriceModelType = "tiered_package"
)

func (NewSubscriptionPriceModelNewSubscriptionTieredPackagePriceModelType) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionTieredPackagePriceParam added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionTieredPackagePriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionPriceModelNewSubscriptionTieredPackagePriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                              `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionPriceModelNewSubscriptionTieredPackagePriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                param.Field[string]                               `json:"name,required"`
	TieredPackageConfig param.Field[CustomRatingFunctionConfigModelParam] `json:"tiered_package_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionPriceModelNewSubscriptionTieredPackagePriceParam) MarshalJSON added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionTieredPriceCadence added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionTieredPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionPriceModelNewSubscriptionTieredPriceCadenceAnnual     NewSubscriptionPriceModelNewSubscriptionTieredPriceCadence = "annual"
	NewSubscriptionPriceModelNewSubscriptionTieredPriceCadenceSemiAnnual NewSubscriptionPriceModelNewSubscriptionTieredPriceCadence = "semi_annual"
	NewSubscriptionPriceModelNewSubscriptionTieredPriceCadenceMonthly    NewSubscriptionPriceModelNewSubscriptionTieredPriceCadence = "monthly"
	NewSubscriptionPriceModelNewSubscriptionTieredPriceCadenceQuarterly  NewSubscriptionPriceModelNewSubscriptionTieredPriceCadence = "quarterly"
	NewSubscriptionPriceModelNewSubscriptionTieredPriceCadenceOneTime    NewSubscriptionPriceModelNewSubscriptionTieredPriceCadence = "one_time"
	NewSubscriptionPriceModelNewSubscriptionTieredPriceCadenceCustom     NewSubscriptionPriceModelNewSubscriptionTieredPriceCadence = "custom"
)

func (NewSubscriptionPriceModelNewSubscriptionTieredPriceCadence) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionTieredPriceModelType added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionTieredPriceModelType string
const (
	NewSubscriptionPriceModelNewSubscriptionTieredPriceModelTypeTiered NewSubscriptionPriceModelNewSubscriptionTieredPriceModelType = "tiered"
)

func (NewSubscriptionPriceModelNewSubscriptionTieredPriceModelType) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionTieredPriceParam added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionTieredPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionPriceModelNewSubscriptionTieredPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                       `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionPriceModelNewSubscriptionTieredPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name         param.Field[string]                 `json:"name,required"`
	TieredConfig param.Field[TieredConfigModelParam] `json:"tiered_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionPriceModelNewSubscriptionTieredPriceParam) MarshalJSON added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionTieredWithMinimumPriceCadence added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionTieredWithMinimumPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionPriceModelNewSubscriptionTieredWithMinimumPriceCadenceAnnual     NewSubscriptionPriceModelNewSubscriptionTieredWithMinimumPriceCadence = "annual"
	NewSubscriptionPriceModelNewSubscriptionTieredWithMinimumPriceCadenceSemiAnnual NewSubscriptionPriceModelNewSubscriptionTieredWithMinimumPriceCadence = "semi_annual"
	NewSubscriptionPriceModelNewSubscriptionTieredWithMinimumPriceCadenceMonthly    NewSubscriptionPriceModelNewSubscriptionTieredWithMinimumPriceCadence = "monthly"
	NewSubscriptionPriceModelNewSubscriptionTieredWithMinimumPriceCadenceQuarterly  NewSubscriptionPriceModelNewSubscriptionTieredWithMinimumPriceCadence = "quarterly"
	NewSubscriptionPriceModelNewSubscriptionTieredWithMinimumPriceCadenceOneTime    NewSubscriptionPriceModelNewSubscriptionTieredWithMinimumPriceCadence = "one_time"
	NewSubscriptionPriceModelNewSubscriptionTieredWithMinimumPriceCadenceCustom     NewSubscriptionPriceModelNewSubscriptionTieredWithMinimumPriceCadence = "custom"
)

func (NewSubscriptionPriceModelNewSubscriptionTieredWithMinimumPriceCadence) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionTieredWithMinimumPriceModelType added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionTieredWithMinimumPriceModelType string
const (
	NewSubscriptionPriceModelNewSubscriptionTieredWithMinimumPriceModelTypeTieredWithMinimum NewSubscriptionPriceModelNewSubscriptionTieredWithMinimumPriceModelType = "tiered_with_minimum"
)

func (NewSubscriptionPriceModelNewSubscriptionTieredWithMinimumPriceModelType) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionTieredWithMinimumPriceParam added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionTieredWithMinimumPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionPriceModelNewSubscriptionTieredWithMinimumPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                                  `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionPriceModelNewSubscriptionTieredWithMinimumPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                    param.Field[string]                               `json:"name,required"`
	TieredWithMinimumConfig param.Field[CustomRatingFunctionConfigModelParam] `json:"tiered_with_minimum_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionPriceModelNewSubscriptionTieredWithMinimumPriceParam) MarshalJSON added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionUnitPriceCadence added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionUnitPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionPriceModelNewSubscriptionUnitPriceCadenceAnnual     NewSubscriptionPriceModelNewSubscriptionUnitPriceCadence = "annual"
	NewSubscriptionPriceModelNewSubscriptionUnitPriceCadenceSemiAnnual NewSubscriptionPriceModelNewSubscriptionUnitPriceCadence = "semi_annual"
	NewSubscriptionPriceModelNewSubscriptionUnitPriceCadenceMonthly    NewSubscriptionPriceModelNewSubscriptionUnitPriceCadence = "monthly"
	NewSubscriptionPriceModelNewSubscriptionUnitPriceCadenceQuarterly  NewSubscriptionPriceModelNewSubscriptionUnitPriceCadence = "quarterly"
	NewSubscriptionPriceModelNewSubscriptionUnitPriceCadenceOneTime    NewSubscriptionPriceModelNewSubscriptionUnitPriceCadence = "one_time"
	NewSubscriptionPriceModelNewSubscriptionUnitPriceCadenceCustom     NewSubscriptionPriceModelNewSubscriptionUnitPriceCadence = "custom"
)

func (NewSubscriptionPriceModelNewSubscriptionUnitPriceCadence) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionUnitPriceModelType added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionUnitPriceModelType string
const (
	NewSubscriptionPriceModelNewSubscriptionUnitPriceModelTypeUnit NewSubscriptionPriceModelNewSubscriptionUnitPriceModelType = "unit"
)

func (NewSubscriptionPriceModelNewSubscriptionUnitPriceModelType) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionUnitPriceParam added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionUnitPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionPriceModelNewSubscriptionUnitPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                     `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionPriceModelNewSubscriptionUnitPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name       param.Field[string]               `json:"name,required"`
	UnitConfig param.Field[UnitConfigModelParam] `json:"unit_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionPriceModelNewSubscriptionUnitPriceParam) MarshalJSON added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionUnitWithPercentPriceCadence added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionUnitWithPercentPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionPriceModelNewSubscriptionUnitWithPercentPriceCadenceAnnual     NewSubscriptionPriceModelNewSubscriptionUnitWithPercentPriceCadence = "annual"
	NewSubscriptionPriceModelNewSubscriptionUnitWithPercentPriceCadenceSemiAnnual NewSubscriptionPriceModelNewSubscriptionUnitWithPercentPriceCadence = "semi_annual"
	NewSubscriptionPriceModelNewSubscriptionUnitWithPercentPriceCadenceMonthly    NewSubscriptionPriceModelNewSubscriptionUnitWithPercentPriceCadence = "monthly"
	NewSubscriptionPriceModelNewSubscriptionUnitWithPercentPriceCadenceQuarterly  NewSubscriptionPriceModelNewSubscriptionUnitWithPercentPriceCadence = "quarterly"
	NewSubscriptionPriceModelNewSubscriptionUnitWithPercentPriceCadenceOneTime    NewSubscriptionPriceModelNewSubscriptionUnitWithPercentPriceCadence = "one_time"
	NewSubscriptionPriceModelNewSubscriptionUnitWithPercentPriceCadenceCustom     NewSubscriptionPriceModelNewSubscriptionUnitWithPercentPriceCadence = "custom"
)

func (NewSubscriptionPriceModelNewSubscriptionUnitWithPercentPriceCadence) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionUnitWithPercentPriceModelType added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionUnitWithPercentPriceModelType string
const (
	NewSubscriptionPriceModelNewSubscriptionUnitWithPercentPriceModelTypeUnitWithPercent NewSubscriptionPriceModelNewSubscriptionUnitWithPercentPriceModelType = "unit_with_percent"
)

func (NewSubscriptionPriceModelNewSubscriptionUnitWithPercentPriceModelType) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionUnitWithPercentPriceParam added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionUnitWithPercentPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionPriceModelNewSubscriptionUnitWithPercentPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                                `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionPriceModelNewSubscriptionUnitWithPercentPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                  param.Field[string]                               `json:"name,required"`
	UnitWithPercentConfig param.Field[CustomRatingFunctionConfigModelParam] `json:"unit_with_percent_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionPriceModelNewSubscriptionUnitWithPercentPriceParam) MarshalJSON added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionUnitWithProrationPriceCadence added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionUnitWithProrationPriceCadence string

The cadence to bill for this price on.

const (
	NewSubscriptionPriceModelNewSubscriptionUnitWithProrationPriceCadenceAnnual     NewSubscriptionPriceModelNewSubscriptionUnitWithProrationPriceCadence = "annual"
	NewSubscriptionPriceModelNewSubscriptionUnitWithProrationPriceCadenceSemiAnnual NewSubscriptionPriceModelNewSubscriptionUnitWithProrationPriceCadence = "semi_annual"
	NewSubscriptionPriceModelNewSubscriptionUnitWithProrationPriceCadenceMonthly    NewSubscriptionPriceModelNewSubscriptionUnitWithProrationPriceCadence = "monthly"
	NewSubscriptionPriceModelNewSubscriptionUnitWithProrationPriceCadenceQuarterly  NewSubscriptionPriceModelNewSubscriptionUnitWithProrationPriceCadence = "quarterly"
	NewSubscriptionPriceModelNewSubscriptionUnitWithProrationPriceCadenceOneTime    NewSubscriptionPriceModelNewSubscriptionUnitWithProrationPriceCadence = "one_time"
	NewSubscriptionPriceModelNewSubscriptionUnitWithProrationPriceCadenceCustom     NewSubscriptionPriceModelNewSubscriptionUnitWithProrationPriceCadence = "custom"
)

func (NewSubscriptionPriceModelNewSubscriptionUnitWithProrationPriceCadence) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionUnitWithProrationPriceModelType added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionUnitWithProrationPriceModelType string
const (
	NewSubscriptionPriceModelNewSubscriptionUnitWithProrationPriceModelTypeUnitWithProration NewSubscriptionPriceModelNewSubscriptionUnitWithProrationPriceModelType = "unit_with_proration"
)

func (NewSubscriptionPriceModelNewSubscriptionUnitWithProrationPriceModelType) IsKnown added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionUnitWithProrationPriceParam added in v0.103.0

type NewSubscriptionPriceModelNewSubscriptionUnitWithProrationPriceParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionPriceModelNewSubscriptionUnitWithProrationPriceCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                                                                  `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionPriceModelNewSubscriptionUnitWithProrationPriceModelType] `json:"model_type,required"`
	// The name of the price.
	Name                    param.Field[string]                               `json:"name,required"`
	UnitWithProrationConfig param.Field[CustomRatingFunctionConfigModelParam] `json:"unit_with_proration_config,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate param.Field[float64] `json:"conversion_rate"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	// User-specified key/value pairs for the resource. Individual keys can be removed
	// by setting the value to `null`, and the entire metadata mapping can be cleared
	// by setting `metadata` to `null`.
	Metadata param.Field[map[string]string] `json:"metadata"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID param.Field[string] `json:"reference_id"`
}

func (NewSubscriptionPriceModelNewSubscriptionUnitWithProrationPriceParam) MarshalJSON added in v0.103.0

type NewSubscriptionPriceModelParam added in v0.103.0

type NewSubscriptionPriceModelParam struct {
	// The cadence to bill for this price on.
	Cadence param.Field[NewSubscriptionPriceModelCadence] `json:"cadence,required"`
	// The id of the item the price will be associated with.
	ItemID    param.Field[string]                             `json:"item_id,required"`
	ModelType param.Field[NewSubscriptionPriceModelModelType] `json:"model_type,required"`
	// The name of the price.
	Name param.Field[string] `json:"name,required"`
	// The id of the billable metric for the price. Only needed if the price is
	// usage-based.
	BillableMetricID param.Field[string] `json:"billable_metric_id"`
	// If the Price represents a fixed cost, the price will be billed in-advance if
	// this is true, and in-arrears if this is false.
	BilledInAdvance param.Field[bool] `json:"billed_in_advance"`
	// For custom cadence: specifies the duration of the billing period in days or
	// months.
	BillingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"billing_cycle_configuration"`
	BpsConfig                 param.Field[BpsConfigModelParam]                    `json:"bps_config"`
	BulkBpsConfig             param.Field[BulkBpsConfigModelParam]                `json:"bulk_bps_config"`
	BulkConfig                param.Field[BulkConfigModelParam]                   `json:"bulk_config"`
	BulkWithProrationConfig   param.Field[CustomRatingFunctionConfigModelParam]   `json:"bulk_with_proration_config"`
	// The per unit conversion rate of the price currency to the invoicing currency.
	ConversionRate              param.Field[float64]                              `json:"conversion_rate"`
	CumulativeGroupedBulkConfig param.Field[CustomRatingFunctionConfigModelParam] `json:"cumulative_grouped_bulk_config"`
	// An ISO 4217 currency string, or custom pricing unit identifier, in which this
	// price is billed.
	Currency param.Field[string] `json:"currency"`
	// An alias for the price.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// If the Price represents a fixed cost, this represents the quantity of units
	// applied.
	FixedPriceQuantity               param.Field[float64]                              `json:"fixed_price_quantity"`
	GroupedAllocationConfig          param.Field[CustomRatingFunctionConfigModelParam] `json:"grouped_allocation_config"`
	GroupedTieredPackageConfig       param.Field[CustomRatingFunctionConfigModelParam] `json:"grouped_tiered_package_config"`
	GroupedWithMeteredMinimumConfig  param.Field[CustomRatingFunctionConfigModelParam] `json:"grouped_with_metered_minimum_config"`
	GroupedWithProratedMinimumConfig param.Field[CustomRatingFunctionConfigModelParam] `json:"grouped_with_prorated_minimum_config"`
	// The property used to group this price on an invoice
	InvoiceGroupingKey param.Field[string] `json:"invoice_grouping_key"`
	// Within each billing cycle, specifies the cadence at which invoices are produced.
	// If unspecified, a single invoice is produced per billing cycle.
	InvoicingCycleConfiguration param.Field[NewBillingCycleConfigurationModelParam] `json:"invoicing_cycle_configuration"`
	MatrixConfig                param.Field[MatrixConfigModelParam]                 `json:"matrix_config"`
	MatrixWithDisplayNameConfig param.Field[CustomRatingFunctionConfigModelParam]   `json:"matrix_with_display_name_config"`
	MaxGroupTieredPackageConfig param.Field[CustomRatingFunctionConfigModelParam]   `json:"max_group_tiered_package_config"`
	Metadata                    param.Field[interface{}]                            `json:"metadata"`
	PackageConfig               param.Field[PackageConfigModelParam]                `json:"package_config"`
	PackageWithAllocationConfig param.Field[CustomRatingFunctionConfigModelParam]   `json:"package_with_allocation_config"`
	// A transient ID that can be used to reference this price when adding adjustments
	// in the same API call.
	ReferenceID                           param.Field[string]                               `json:"reference_id"`
	ScalableMatrixWithTieredPricingConfig param.Field[CustomRatingFunctionConfigModelParam] `json:"scalable_matrix_with_tiered_pricing_config"`
	ScalableMatrixWithUnitPricingConfig   param.Field[CustomRatingFunctionConfigModelParam] `json:"scalable_matrix_with_unit_pricing_config"`
	ThresholdTotalAmountConfig            param.Field[CustomRatingFunctionConfigModelParam] `json:"threshold_total_amount_config"`
	TieredBpsConfig                       param.Field[TieredBpsConfigModelParam]            `json:"tiered_bps_config"`
	TieredConfig                          param.Field[TieredConfigModelParam]               `json:"tiered_config"`
	TieredPackageConfig                   param.Field[CustomRatingFunctionConfigModelParam] `json:"tiered_package_config"`
	TieredWithMinimumConfig               param.Field[CustomRatingFunctionConfigModelParam] `json:"tiered_with_minimum_config"`
	TieredWithProrationConfig             param.Field[CustomRatingFunctionConfigModelParam] `json:"tiered_with_proration_config"`
	UnitConfig                            param.Field[UnitConfigModelParam]                 `json:"unit_config"`
	UnitWithPercentConfig                 param.Field[CustomRatingFunctionConfigModelParam] `json:"unit_with_percent_config"`
	UnitWithProrationConfig               param.Field[CustomRatingFunctionConfigModelParam] `json:"unit_with_proration_config"`
}

func (NewSubscriptionPriceModelParam) MarshalJSON added in v0.103.0

func (r NewSubscriptionPriceModelParam) MarshalJSON() (data []byte, err error)

type NewSubscriptionPriceModelUnionParam added in v0.103.0

type NewSubscriptionPriceModelUnionParam interface {
	// contains filtered or unexported methods
}

Satisfied by shared.NewSubscriptionPriceModelNewSubscriptionUnitPriceParam, shared.NewSubscriptionPriceModelNewSubscriptionPackagePriceParam, shared.NewSubscriptionPriceModelNewSubscriptionMatrixPriceParam, shared.NewSubscriptionPriceModelNewSubscriptionTieredPriceParam, shared.NewSubscriptionPriceModelNewSubscriptionTieredBpsPriceParam, shared.NewSubscriptionPriceModelNewSubscriptionBpsPriceParam, shared.NewSubscriptionPriceModelNewSubscriptionBulkBpsPriceParam, shared.NewSubscriptionPriceModelNewSubscriptionBulkPriceParam, shared.NewSubscriptionPriceModelNewSubscriptionThresholdTotalAmountPriceParam, shared.NewSubscriptionPriceModelNewSubscriptionTieredPackagePriceParam, shared.NewSubscriptionPriceModelNewSubscriptionTieredWithMinimumPriceParam, shared.NewSubscriptionPriceModelNewSubscriptionUnitWithPercentPriceParam, shared.NewSubscriptionPriceModelNewSubscriptionPackageWithAllocationPriceParam, shared.NewSubscriptionPriceModelNewSubscriptionTierWithProrationPriceParam, shared.NewSubscriptionPriceModelNewSubscriptionUnitWithProrationPriceParam, shared.NewSubscriptionPriceModelNewSubscriptionGroupedAllocationPriceParam, shared.NewSubscriptionPriceModelNewSubscriptionGroupedWithProratedMinimumPriceParam, shared.NewSubscriptionPriceModelNewSubscriptionBulkWithProrationPriceParam, shared.NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithUnitPricingPriceParam, shared.NewSubscriptionPriceModelNewSubscriptionScalableMatrixWithTieredPricingPriceParam, shared.NewSubscriptionPriceModelNewSubscriptionCumulativeGroupedBulkPriceParam, shared.NewSubscriptionPriceModelNewSubscriptionMaxGroupTieredPackagePriceParam, shared.NewSubscriptionPriceModelNewSubscriptionGroupedWithMeteredMinimumPriceParam, shared.NewSubscriptionPriceModelNewSubscriptionMatrixWithDisplayNamePriceParam, shared.NewSubscriptionPriceModelNewSubscriptionGroupedTieredPackagePriceParam, NewSubscriptionPriceModelParam.

type NewTaxConfigurationModelNewAvalaraTaxConfigurationParam added in v0.103.0

type NewTaxConfigurationModelNewAvalaraTaxConfigurationParam struct {
	TaxExempt        param.Field[bool]                                                          `json:"tax_exempt,required"`
	TaxProvider      param.Field[NewTaxConfigurationModelNewAvalaraTaxConfigurationTaxProvider] `json:"tax_provider,required"`
	TaxExemptionCode param.Field[string]                                                        `json:"tax_exemption_code"`
}

func (NewTaxConfigurationModelNewAvalaraTaxConfigurationParam) MarshalJSON added in v0.103.0

type NewTaxConfigurationModelNewAvalaraTaxConfigurationTaxProvider added in v0.103.0

type NewTaxConfigurationModelNewAvalaraTaxConfigurationTaxProvider string
const (
	NewTaxConfigurationModelNewAvalaraTaxConfigurationTaxProviderAvalara NewTaxConfigurationModelNewAvalaraTaxConfigurationTaxProvider = "avalara"
)

func (NewTaxConfigurationModelNewAvalaraTaxConfigurationTaxProvider) IsKnown added in v0.103.0

type NewTaxConfigurationModelNewTaxJarConfigurationParam added in v0.103.0

type NewTaxConfigurationModelNewTaxJarConfigurationParam struct {
	TaxExempt   param.Field[bool]                                                      `json:"tax_exempt,required"`
	TaxProvider param.Field[NewTaxConfigurationModelNewTaxJarConfigurationTaxProvider] `json:"tax_provider,required"`
}

func (NewTaxConfigurationModelNewTaxJarConfigurationParam) MarshalJSON added in v0.103.0

func (r NewTaxConfigurationModelNewTaxJarConfigurationParam) MarshalJSON() (data []byte, err error)

type NewTaxConfigurationModelNewTaxJarConfigurationTaxProvider added in v0.103.0

type NewTaxConfigurationModelNewTaxJarConfigurationTaxProvider string
const (
	NewTaxConfigurationModelNewTaxJarConfigurationTaxProviderTaxjar NewTaxConfigurationModelNewTaxJarConfigurationTaxProvider = "taxjar"
)

func (NewTaxConfigurationModelNewTaxJarConfigurationTaxProvider) IsKnown added in v0.103.0

type NewTaxConfigurationModelParam added in v0.103.0

type NewTaxConfigurationModelParam struct {
	TaxExempt        param.Field[bool]                                `json:"tax_exempt,required"`
	TaxProvider      param.Field[NewTaxConfigurationModelTaxProvider] `json:"tax_provider,required"`
	TaxExemptionCode param.Field[string]                              `json:"tax_exemption_code"`
}

func (NewTaxConfigurationModelParam) MarshalJSON added in v0.103.0

func (r NewTaxConfigurationModelParam) MarshalJSON() (data []byte, err error)

type NewTaxConfigurationModelTaxProvider added in v0.103.0

type NewTaxConfigurationModelTaxProvider string
const (
	NewTaxConfigurationModelTaxProviderAvalara NewTaxConfigurationModelTaxProvider = "avalara"
	NewTaxConfigurationModelTaxProviderTaxjar  NewTaxConfigurationModelTaxProvider = "taxjar"
)

func (NewTaxConfigurationModelTaxProvider) IsKnown added in v0.103.0

type NewTaxConfigurationModelUnionParam added in v0.103.0

type NewTaxConfigurationModelUnionParam interface {
	// contains filtered or unexported methods
}

Satisfied by shared.NewTaxConfigurationModelNewAvalaraTaxConfigurationParam, shared.NewTaxConfigurationModelNewTaxJarConfigurationParam, NewTaxConfigurationModelParam.

type PackageConfigModel added in v0.103.0

type PackageConfigModel struct {
	// A currency amount to rate usage by
	PackageAmount string `json:"package_amount,required"`
	// An integer amount to represent package size. For example, 1000 here would divide
	// usage by 1000 before multiplying by package_amount in rating
	PackageSize int64                  `json:"package_size,required"`
	JSON        packageConfigModelJSON `json:"-"`
}

func (*PackageConfigModel) UnmarshalJSON added in v0.103.0

func (r *PackageConfigModel) UnmarshalJSON(data []byte) (err error)

type PackageConfigModelParam added in v0.103.0

type PackageConfigModelParam struct {
	// A currency amount to rate usage by
	PackageAmount param.Field[string] `json:"package_amount,required"`
	// An integer amount to represent package size. For example, 1000 here would divide
	// usage by 1000 before multiplying by package_amount in rating
	PackageSize param.Field[int64] `json:"package_size,required"`
}

func (PackageConfigModelParam) MarshalJSON added in v0.103.0

func (r PackageConfigModelParam) MarshalJSON() (data []byte, err error)

type PaginationMetadata

type PaginationMetadata struct {
	HasMore    bool                   `json:"has_more,required"`
	NextCursor string                 `json:"next_cursor,required,nullable"`
	JSON       paginationMetadataJSON `json:"-"`
}

func (*PaginationMetadata) UnmarshalJSON

func (r *PaginationMetadata) UnmarshalJSON(data []byte) (err error)

type PaymentAttemptModel added in v0.103.0

type PaymentAttemptModel struct {
	// The ID of the payment attempt.
	ID string `json:"id,required"`
	// The amount of the payment attempt.
	Amount string `json:"amount,required"`
	// The time at which the payment attempt was created.
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// The payment provider that attempted to collect the payment.
	PaymentProvider PaymentAttemptModelPaymentProvider `json:"payment_provider,required,nullable"`
	// The ID of the payment attempt in the payment provider.
	PaymentProviderID string `json:"payment_provider_id,required,nullable"`
	// Whether the payment attempt succeeded.
	Succeeded bool                    `json:"succeeded,required"`
	JSON      paymentAttemptModelJSON `json:"-"`
}

func (*PaymentAttemptModel) UnmarshalJSON added in v0.103.0

func (r *PaymentAttemptModel) UnmarshalJSON(data []byte) (err error)

type PaymentAttemptModelPaymentProvider added in v0.103.0

type PaymentAttemptModelPaymentProvider string

The payment provider that attempted to collect the payment.

const (
	PaymentAttemptModelPaymentProviderStripe PaymentAttemptModelPaymentProvider = "stripe"
)

func (PaymentAttemptModelPaymentProvider) IsKnown added in v0.103.0

type PercentageDiscount added in v0.67.0

type PercentageDiscount struct {
	// List of price_ids that this discount applies to. For plan/plan phase discounts,
	// this can be a subset of prices.
	AppliesToPriceIDs []string                       `json:"applies_to_price_ids,required"`
	DiscountType      PercentageDiscountDiscountType `json:"discount_type,required"`
	// Only available if discount_type is `percentage`. This is a number between 0
	// and 1.
	PercentageDiscount float64                `json:"percentage_discount,required"`
	Reason             string                 `json:"reason,nullable"`
	JSON               percentageDiscountJSON `json:"-"`
}

func (PercentageDiscount) ImplementsCouponModelDiscount added in v0.103.0

func (r PercentageDiscount) ImplementsCouponModelDiscount()

func (PercentageDiscount) ImplementsDiscount added in v0.89.1

func (r PercentageDiscount) ImplementsDiscount()

func (PercentageDiscount) ImplementsInvoiceLevelDiscount added in v0.89.1

func (r PercentageDiscount) ImplementsInvoiceLevelDiscount()

func (*PercentageDiscount) UnmarshalJSON added in v0.67.0

func (r *PercentageDiscount) UnmarshalJSON(data []byte) (err error)

type PercentageDiscountDiscountType added in v0.67.0

type PercentageDiscountDiscountType string
const (
	PercentageDiscountDiscountTypePercentage PercentageDiscountDiscountType = "percentage"
)

func (PercentageDiscountDiscountType) IsKnown added in v0.67.0

type PercentageDiscountIntervalModel added in v0.103.0

type PercentageDiscountIntervalModel struct {
	// The price ids that this discount interval applies to.
	AppliesToPriceIDs []string `json:"applies_to_price_ids,required"`
	// The price interval ids that this discount interval applies to.
	AppliesToPriceIntervalIDs []string                                    `json:"applies_to_price_interval_ids,required"`
	DiscountType              PercentageDiscountIntervalModelDiscountType `json:"discount_type,required"`
	// The end date of the discount interval.
	EndDate time.Time `json:"end_date,required,nullable" format:"date-time"`
	// Only available if discount_type is `percentage`.This is a number between 0
	// and 1.
	PercentageDiscount float64 `json:"percentage_discount,required"`
	// The start date of the discount interval.
	StartDate time.Time                           `json:"start_date,required" format:"date-time"`
	JSON      percentageDiscountIntervalModelJSON `json:"-"`
}

func (PercentageDiscountIntervalModel) ImplementsMutatedSubscriptionModelDiscountInterval added in v0.103.0

func (r PercentageDiscountIntervalModel) ImplementsMutatedSubscriptionModelDiscountInterval()

func (PercentageDiscountIntervalModel) ImplementsSubscriptionModelDiscountInterval added in v0.103.0

func (r PercentageDiscountIntervalModel) ImplementsSubscriptionModelDiscountInterval()

func (*PercentageDiscountIntervalModel) UnmarshalJSON added in v0.103.0

func (r *PercentageDiscountIntervalModel) UnmarshalJSON(data []byte) (err error)

type PercentageDiscountIntervalModelDiscountType added in v0.103.0

type PercentageDiscountIntervalModelDiscountType string
const (
	PercentageDiscountIntervalModelDiscountTypePercentage PercentageDiscountIntervalModelDiscountType = "percentage"
)

func (PercentageDiscountIntervalModelDiscountType) IsKnown added in v0.103.0

type PercentageDiscountParam added in v0.67.0

type PercentageDiscountParam struct {
	// List of price_ids that this discount applies to. For plan/plan phase discounts,
	// this can be a subset of prices.
	AppliesToPriceIDs param.Field[[]string]                       `json:"applies_to_price_ids,required"`
	DiscountType      param.Field[PercentageDiscountDiscountType] `json:"discount_type,required"`
	// Only available if discount_type is `percentage`. This is a number between 0
	// and 1.
	PercentageDiscount param.Field[float64] `json:"percentage_discount,required"`
	Reason             param.Field[string]  `json:"reason"`
}

func (PercentageDiscountParam) ImplementsDiscountUnionParam added in v0.89.1

func (r PercentageDiscountParam) ImplementsDiscountUnionParam()

func (PercentageDiscountParam) MarshalJSON added in v0.67.0

func (r PercentageDiscountParam) MarshalJSON() (data []byte, err error)

type PlanMinifiedModel added in v0.103.0

type PlanMinifiedModel struct {
	ID string `json:"id,required,nullable"`
	// An optional user-defined ID for this plan resource, used throughout the system
	// as an alias for this Plan. Use this field to identify a plan by an existing
	// identifier in your system.
	ExternalPlanID string                `json:"external_plan_id,required,nullable"`
	Name           string                `json:"name,required,nullable"`
	JSON           planMinifiedModelJSON `json:"-"`
}

func (*PlanMinifiedModel) UnmarshalJSON added in v0.103.0

func (r *PlanMinifiedModel) UnmarshalJSON(data []byte) (err error)

type PlanModel added in v0.103.0

type PlanModel struct {
	ID string `json:"id,required"`
	// Adjustments for this plan. If the plan has phases, this includes adjustments
	// across all phases of the plan.
	Adjustments []AdjustmentModel `json:"adjustments,required"`
	BasePlan    PlanMinifiedModel `json:"base_plan,required,nullable"`
	// The parent plan id if the given plan was created by overriding one or more of
	// the parent's prices
	BasePlanID string    `json:"base_plan_id,required,nullable"`
	CreatedAt  time.Time `json:"created_at,required" format:"date-time"`
	// An ISO 4217 currency string or custom pricing unit (`credits`) for this plan's
	// prices.
	//
	// Deprecated: deprecated
	Currency string `json:"currency,required"`
	// The default memo text on the invoices corresponding to subscriptions on this
	// plan. Note that each subscription may configure its own memo.
	DefaultInvoiceMemo string   `json:"default_invoice_memo,required,nullable"`
	Description        string   `json:"description,required"`
	Discount           Discount `json:"discount,required,nullable"`
	// An optional user-defined ID for this plan resource, used throughout the system
	// as an alias for this Plan. Use this field to identify a plan by an existing
	// identifier in your system.
	ExternalPlanID string `json:"external_plan_id,required,nullable"`
	// An ISO 4217 currency string for which this plan is billed in. Matches `currency`
	// unless `currency` is a custom pricing unit.
	InvoicingCurrency string       `json:"invoicing_currency,required"`
	Maximum           MaximumModel `json:"maximum,required,nullable"`
	MaximumAmount     string       `json:"maximum_amount,required,nullable"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata      map[string]string `json:"metadata,required"`
	Minimum       MinimumModel      `json:"minimum,required,nullable"`
	MinimumAmount string            `json:"minimum_amount,required,nullable"`
	Name          string            `json:"name,required"`
	// Determines the difference between the invoice issue date and the due date. A
	// value of "0" here signifies that invoices are due on issue, whereas a value of
	// "30" means that the customer has a month to pay the invoice before its overdue.
	// Note that individual subscriptions or invoices may set a different net terms
	// configuration.
	NetTerms   int64                `json:"net_terms,required,nullable"`
	PlanPhases []PlanModelPlanPhase `json:"plan_phases,required,nullable"`
	// Prices for this plan. If the plan has phases, this includes prices across all
	// phases of the plan.
	Prices      []PriceModel         `json:"prices,required"`
	Product     PlanModelProduct     `json:"product,required"`
	Status      PlanModelStatus      `json:"status,required"`
	TrialConfig PlanModelTrialConfig `json:"trial_config,required"`
	Version     int64                `json:"version,required"`
	JSON        planModelJSON        `json:"-"`
}

The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a customer. Plans define the billing behavior of the subscription. You can see more about how to configure prices in the [Price resource](/reference/price).

func (*PlanModel) UnmarshalJSON added in v0.103.0

func (r *PlanModel) UnmarshalJSON(data []byte) (err error)

type PlanModelPlanPhase added in v0.103.0

type PlanModelPlanPhase struct {
	ID          string   `json:"id,required"`
	Description string   `json:"description,required,nullable"`
	Discount    Discount `json:"discount,required,nullable"`
	// How many terms of length `duration_unit` this phase is active for. If null, this
	// phase is evergreen and active indefinitely
	Duration      int64                           `json:"duration,required,nullable"`
	DurationUnit  PlanModelPlanPhasesDurationUnit `json:"duration_unit,required,nullable"`
	Maximum       MaximumModel                    `json:"maximum,required,nullable"`
	MaximumAmount string                          `json:"maximum_amount,required,nullable"`
	Minimum       MinimumModel                    `json:"minimum,required,nullable"`
	MinimumAmount string                          `json:"minimum_amount,required,nullable"`
	Name          string                          `json:"name,required"`
	// Determines the ordering of the phase in a plan's lifecycle. 1 = first phase.
	Order int64                  `json:"order,required"`
	JSON  planModelPlanPhaseJSON `json:"-"`
}

func (*PlanModelPlanPhase) UnmarshalJSON added in v0.103.0

func (r *PlanModelPlanPhase) UnmarshalJSON(data []byte) (err error)

type PlanModelPlanPhasesDurationUnit added in v0.103.0

type PlanModelPlanPhasesDurationUnit string
const (
	PlanModelPlanPhasesDurationUnitDaily      PlanModelPlanPhasesDurationUnit = "daily"
	PlanModelPlanPhasesDurationUnitMonthly    PlanModelPlanPhasesDurationUnit = "monthly"
	PlanModelPlanPhasesDurationUnitQuarterly  PlanModelPlanPhasesDurationUnit = "quarterly"
	PlanModelPlanPhasesDurationUnitSemiAnnual PlanModelPlanPhasesDurationUnit = "semi_annual"
	PlanModelPlanPhasesDurationUnitAnnual     PlanModelPlanPhasesDurationUnit = "annual"
)

func (PlanModelPlanPhasesDurationUnit) IsKnown added in v0.103.0

type PlanModelProduct added in v0.103.0

type PlanModelProduct struct {
	ID        string               `json:"id,required"`
	CreatedAt time.Time            `json:"created_at,required" format:"date-time"`
	Name      string               `json:"name,required"`
	JSON      planModelProductJSON `json:"-"`
}

func (*PlanModelProduct) UnmarshalJSON added in v0.103.0

func (r *PlanModelProduct) UnmarshalJSON(data []byte) (err error)

type PlanModelStatus added in v0.103.0

type PlanModelStatus string
const (
	PlanModelStatusActive   PlanModelStatus = "active"
	PlanModelStatusArchived PlanModelStatus = "archived"
	PlanModelStatusDraft    PlanModelStatus = "draft"
)

func (PlanModelStatus) IsKnown added in v0.103.0

func (r PlanModelStatus) IsKnown() bool

type PlanModelTrialConfig added in v0.103.0

type PlanModelTrialConfig struct {
	TrialPeriod     int64                               `json:"trial_period,required,nullable"`
	TrialPeriodUnit PlanModelTrialConfigTrialPeriodUnit `json:"trial_period_unit,required"`
	JSON            planModelTrialConfigJSON            `json:"-"`
}

func (*PlanModelTrialConfig) UnmarshalJSON added in v0.103.0

func (r *PlanModelTrialConfig) UnmarshalJSON(data []byte) (err error)

type PlanModelTrialConfigTrialPeriodUnit added in v0.103.0

type PlanModelTrialConfigTrialPeriodUnit string
const (
	PlanModelTrialConfigTrialPeriodUnitDays PlanModelTrialConfigTrialPeriodUnit = "days"
)

func (PlanModelTrialConfigTrialPeriodUnit) IsKnown added in v0.103.0

type PriceIntervalFixedFeeQuantityTransitionModelParam added in v0.103.0

type PriceIntervalFixedFeeQuantityTransitionModelParam struct {
	// The date that the fixed fee quantity transition should take effect.
	EffectiveDate param.Field[time.Time] `json:"effective_date,required" format:"date-time"`
	// The quantity of the fixed fee quantity transition.
	Quantity param.Field[int64] `json:"quantity,required"`
}

func (PriceIntervalFixedFeeQuantityTransitionModelParam) MarshalJSON added in v0.103.0

func (r PriceIntervalFixedFeeQuantityTransitionModelParam) MarshalJSON() (data []byte, err error)

type PriceIntervalModel added in v0.103.0

type PriceIntervalModel struct {
	ID string `json:"id,required"`
	// The day of the month that Orb bills for this price
	BillingCycleDay int64 `json:"billing_cycle_day,required"`
	// The end of the current billing period. This is an exclusive timestamp, such that
	// the instant returned is exactly the end of the billing period. Set to null if
	// this price interval is not currently active.
	CurrentBillingPeriodEndDate time.Time `json:"current_billing_period_end_date,required,nullable" format:"date-time"`
	// The start date of the current billing period. This is an inclusive timestamp;
	// the instant returned is exactly the beginning of the billing period. Set to null
	// if this price interval is not currently active.
	CurrentBillingPeriodStartDate time.Time `json:"current_billing_period_start_date,required,nullable" format:"date-time"`
	// The end date of the price interval. This is the date that Orb stops billing for
	// this price.
	EndDate time.Time `json:"end_date,required,nullable" format:"date-time"`
	// An additional filter to apply to usage queries.
	Filter string `json:"filter,required,nullable"`
	// The fixed fee quantity transitions for this price interval. This is only
	// relevant for fixed fees.
	FixedFeeQuantityTransitions []PriceIntervalModelFixedFeeQuantityTransition `json:"fixed_fee_quantity_transitions,required,nullable"`
	// The Price resource represents a price that can be billed on a subscription,
	// resulting in a charge on an invoice in the form of an invoice line item. Prices
	// take a quantity and determine an amount to bill.
	//
	// Orb supports a few different pricing models out of the box. Each of these models
	// is serialized differently in a given Price object. The model_type field
	// determines the key for the configuration object that is present.
	//
	// For more on the types of prices, see
	// [the core concepts documentation](/core-concepts#plan-and-price)
	Price PriceModel `json:"price,required"`
	// The start date of the price interval. This is the date that Orb starts billing
	// for this price.
	StartDate time.Time `json:"start_date,required" format:"date-time"`
	// A list of customer IDs whose usage events will be aggregated and billed under
	// this price interval.
	UsageCustomerIDs []string               `json:"usage_customer_ids,required,nullable"`
	JSON             priceIntervalModelJSON `json:"-"`
}

The Price Interval resource represents a period of time for which a price will bill on a subscription. A subscription’s price intervals define its billing behavior.

func (*PriceIntervalModel) UnmarshalJSON added in v0.103.0

func (r *PriceIntervalModel) UnmarshalJSON(data []byte) (err error)

type PriceIntervalModelFixedFeeQuantityTransition added in v0.103.0

type PriceIntervalModelFixedFeeQuantityTransition struct {
	EffectiveDate time.Time                                        `json:"effective_date,required" format:"date-time"`
	PriceID       string                                           `json:"price_id,required"`
	Quantity      int64                                            `json:"quantity,required"`
	JSON          priceIntervalModelFixedFeeQuantityTransitionJSON `json:"-"`
}

func (*PriceIntervalModelFixedFeeQuantityTransition) UnmarshalJSON added in v0.103.0

func (r *PriceIntervalModelFixedFeeQuantityTransition) UnmarshalJSON(data []byte) (err error)

type PriceModel added in v0.103.0

type PriceModel struct {
	ID                          string                         `json:"id,required"`
	BillableMetric              BillableMetricTinyModel        `json:"billable_metric,required,nullable"`
	BillingCycleConfiguration   BillingCycleConfigurationModel `json:"billing_cycle_configuration,required"`
	Cadence                     PriceModelCadence              `json:"cadence,required"`
	ConversionRate              float64                        `json:"conversion_rate,required,nullable"`
	CreatedAt                   time.Time                      `json:"created_at,required" format:"date-time"`
	CreditAllocation            AllocationModel                `json:"credit_allocation,required,nullable"`
	Currency                    string                         `json:"currency,required"`
	Discount                    Discount                       `json:"discount,required,nullable"`
	ExternalPriceID             string                         `json:"external_price_id,required,nullable"`
	FixedPriceQuantity          float64                        `json:"fixed_price_quantity,required,nullable"`
	InvoicingCycleConfiguration BillingCycleConfigurationModel `json:"invoicing_cycle_configuration,required,nullable"`
	Item                        ItemSlimModel                  `json:"item,required"`
	Maximum                     MaximumModel                   `json:"maximum,required,nullable"`
	MaximumAmount               string                         `json:"maximum_amount,required,nullable"`
	// This field can have the runtime type of [map[string]string].
	Metadata                              interface{}                        `json:"metadata,required"`
	Minimum                               MinimumModel                       `json:"minimum,required,nullable"`
	MinimumAmount                         string                             `json:"minimum_amount,required,nullable"`
	ModelType                             PriceModelModelType                `json:"model_type,required"`
	Name                                  string                             `json:"name,required"`
	PlanPhaseOrder                        int64                              `json:"plan_phase_order,required,nullable"`
	PriceType                             PriceModelPriceType                `json:"price_type,required"`
	BpsConfig                             BpsConfigModel                     `json:"bps_config"`
	BulkBpsConfig                         BulkBpsConfigModel                 `json:"bulk_bps_config"`
	BulkConfig                            BulkConfigModel                    `json:"bulk_config"`
	BulkWithProrationConfig               CustomRatingFunctionConfigModel    `json:"bulk_with_proration_config"`
	CumulativeGroupedBulkConfig           CustomRatingFunctionConfigModel    `json:"cumulative_grouped_bulk_config"`
	DimensionalPriceConfiguration         DimensionalPriceConfigurationModel `json:"dimensional_price_configuration,nullable"`
	GroupedAllocationConfig               CustomRatingFunctionConfigModel    `json:"grouped_allocation_config"`
	GroupedTieredConfig                   CustomRatingFunctionConfigModel    `json:"grouped_tiered_config"`
	GroupedTieredPackageConfig            CustomRatingFunctionConfigModel    `json:"grouped_tiered_package_config"`
	GroupedWithMeteredMinimumConfig       CustomRatingFunctionConfigModel    `json:"grouped_with_metered_minimum_config"`
	GroupedWithProratedMinimumConfig      CustomRatingFunctionConfigModel    `json:"grouped_with_prorated_minimum_config"`
	MatrixConfig                          MatrixConfigModel                  `json:"matrix_config"`
	MatrixWithAllocationConfig            MatrixWithAllocationConfigModel    `json:"matrix_with_allocation_config"`
	MatrixWithDisplayNameConfig           CustomRatingFunctionConfigModel    `json:"matrix_with_display_name_config"`
	MaxGroupTieredPackageConfig           CustomRatingFunctionConfigModel    `json:"max_group_tiered_package_config"`
	PackageConfig                         PackageConfigModel                 `json:"package_config"`
	PackageWithAllocationConfig           CustomRatingFunctionConfigModel    `json:"package_with_allocation_config"`
	ScalableMatrixWithTieredPricingConfig CustomRatingFunctionConfigModel    `json:"scalable_matrix_with_tiered_pricing_config"`
	ScalableMatrixWithUnitPricingConfig   CustomRatingFunctionConfigModel    `json:"scalable_matrix_with_unit_pricing_config"`
	ThresholdTotalAmountConfig            CustomRatingFunctionConfigModel    `json:"threshold_total_amount_config"`
	TieredBpsConfig                       TieredBpsConfigModel               `json:"tiered_bps_config"`
	TieredConfig                          TieredConfigModel                  `json:"tiered_config"`
	TieredPackageConfig                   CustomRatingFunctionConfigModel    `json:"tiered_package_config"`
	TieredPackageWithMinimumConfig        CustomRatingFunctionConfigModel    `json:"tiered_package_with_minimum_config"`
	TieredWithMinimumConfig               CustomRatingFunctionConfigModel    `json:"tiered_with_minimum_config"`
	TieredWithProrationConfig             CustomRatingFunctionConfigModel    `json:"tiered_with_proration_config"`
	UnitConfig                            UnitConfigModel                    `json:"unit_config"`
	UnitWithPercentConfig                 CustomRatingFunctionConfigModel    `json:"unit_with_percent_config"`
	UnitWithProrationConfig               CustomRatingFunctionConfigModel    `json:"unit_with_proration_config"`
	JSON                                  priceModelJSON                     `json:"-"`
	// contains filtered or unexported fields
}

The Price resource represents a price that can be billed on a subscription, resulting in a charge on an invoice in the form of an invoice line item. Prices take a quantity and determine an amount to bill.

Orb supports a few different pricing models out of the box. Each of these models is serialized differently in a given Price object. The model_type field determines the key for the configuration object that is present.

For more on the types of prices, see [the core concepts documentation](/core-concepts#plan-and-price)

func (*PriceModel) UnmarshalJSON added in v0.103.0

func (r *PriceModel) UnmarshalJSON(data []byte) (err error)

type PriceModelBpsPrice added in v0.103.0

type PriceModelBpsPrice struct {
	ID                          string                         `json:"id,required"`
	BillableMetric              BillableMetricTinyModel        `json:"billable_metric,required,nullable"`
	BillingCycleConfiguration   BillingCycleConfigurationModel `json:"billing_cycle_configuration,required"`
	BpsConfig                   BpsConfigModel                 `json:"bps_config,required"`
	Cadence                     PriceModelBpsPriceCadence      `json:"cadence,required"`
	ConversionRate              float64                        `json:"conversion_rate,required,nullable"`
	CreatedAt                   time.Time                      `json:"created_at,required" format:"date-time"`
	CreditAllocation            AllocationModel                `json:"credit_allocation,required,nullable"`
	Currency                    string                         `json:"currency,required"`
	Discount                    Discount                       `json:"discount,required,nullable"`
	ExternalPriceID             string                         `json:"external_price_id,required,nullable"`
	FixedPriceQuantity          float64                        `json:"fixed_price_quantity,required,nullable"`
	InvoicingCycleConfiguration BillingCycleConfigurationModel `json:"invoicing_cycle_configuration,required,nullable"`
	Item                        ItemSlimModel                  `json:"item,required"`
	Maximum                     MaximumModel                   `json:"maximum,required,nullable"`
	MaximumAmount               string                         `json:"maximum_amount,required,nullable"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata                      map[string]string                  `json:"metadata,required"`
	Minimum                       MinimumModel                       `json:"minimum,required,nullable"`
	MinimumAmount                 string                             `json:"minimum_amount,required,nullable"`
	ModelType                     PriceModelBpsPriceModelType        `json:"model_type,required"`
	Name                          string                             `json:"name,required"`
	PlanPhaseOrder                int64                              `json:"plan_phase_order,required,nullable"`
	PriceType                     PriceModelBpsPricePriceType        `json:"price_type,required"`
	DimensionalPriceConfiguration DimensionalPriceConfigurationModel `json:"dimensional_price_configuration,nullable"`
	JSON                          priceModelBpsPriceJSON             `json:"-"`
}

func (*PriceModelBpsPrice) UnmarshalJSON added in v0.103.0

func (r *PriceModelBpsPrice) UnmarshalJSON(data []byte) (err error)

type PriceModelBpsPriceCadence added in v0.103.0

type PriceModelBpsPriceCadence string
const (
	PriceModelBpsPriceCadenceOneTime    PriceModelBpsPriceCadence = "one_time"
	PriceModelBpsPriceCadenceMonthly    PriceModelBpsPriceCadence = "monthly"
	PriceModelBpsPriceCadenceQuarterly  PriceModelBpsPriceCadence = "quarterly"
	PriceModelBpsPriceCadenceSemiAnnual PriceModelBpsPriceCadence = "semi_annual"
	PriceModelBpsPriceCadenceAnnual     PriceModelBpsPriceCadence = "annual"
	PriceModelBpsPriceCadenceCustom     PriceModelBpsPriceCadence = "custom"
)

func (PriceModelBpsPriceCadence) IsKnown added in v0.103.0

func (r PriceModelBpsPriceCadence) IsKnown() bool

type PriceModelBpsPriceModelType added in v0.103.0

type PriceModelBpsPriceModelType string
const (
	PriceModelBpsPriceModelTypeBps PriceModelBpsPriceModelType = "bps"
)

func (PriceModelBpsPriceModelType) IsKnown added in v0.103.0

func (r PriceModelBpsPriceModelType) IsKnown() bool

type PriceModelBpsPricePriceType added in v0.103.0

type PriceModelBpsPricePriceType string
const (
	PriceModelBpsPricePriceTypeUsagePrice PriceModelBpsPricePriceType = "usage_price"
	PriceModelBpsPricePriceTypeFixedPrice PriceModelBpsPricePriceType = "fixed_price"
)

func (PriceModelBpsPricePriceType) IsKnown added in v0.103.0

func (r PriceModelBpsPricePriceType) IsKnown() bool

type PriceModelBulkBpsPrice added in v0.103.0

type PriceModelBulkBpsPrice struct {
	ID                          string                         `json:"id,required"`
	BillableMetric              BillableMetricTinyModel        `json:"billable_metric,required,nullable"`
	BillingCycleConfiguration   BillingCycleConfigurationModel `json:"billing_cycle_configuration,required"`
	BulkBpsConfig               BulkBpsConfigModel             `json:"bulk_bps_config,required"`
	Cadence                     PriceModelBulkBpsPriceCadence  `json:"cadence,required"`
	ConversionRate              float64                        `json:"conversion_rate,required,nullable"`
	CreatedAt                   time.Time                      `json:"created_at,required" format:"date-time"`
	CreditAllocation            AllocationModel                `json:"credit_allocation,required,nullable"`
	Currency                    string                         `json:"currency,required"`
	Discount                    Discount                       `json:"discount,required,nullable"`
	ExternalPriceID             string                         `json:"external_price_id,required,nullable"`
	FixedPriceQuantity          float64                        `json:"fixed_price_quantity,required,nullable"`
	InvoicingCycleConfiguration BillingCycleConfigurationModel `json:"invoicing_cycle_configuration,required,nullable"`
	Item                        ItemSlimModel                  `json:"item,required"`
	Maximum                     MaximumModel                   `json:"maximum,required,nullable"`
	MaximumAmount               string                         `json:"maximum_amount,required,nullable"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata                      map[string]string                  `json:"metadata,required"`
	Minimum                       MinimumModel                       `json:"minimum,required,nullable"`
	MinimumAmount                 string                             `json:"minimum_amount,required,nullable"`
	ModelType                     PriceModelBulkBpsPriceModelType    `json:"model_type,required"`
	Name                          string                             `json:"name,required"`
	PlanPhaseOrder                int64                              `json:"plan_phase_order,required,nullable"`
	PriceType                     PriceModelBulkBpsPricePriceType    `json:"price_type,required"`
	DimensionalPriceConfiguration DimensionalPriceConfigurationModel `json:"dimensional_price_configuration,nullable"`
	JSON                          priceModelBulkBpsPriceJSON         `json:"-"`
}

func (*PriceModelBulkBpsPrice) UnmarshalJSON added in v0.103.0

func (r *PriceModelBulkBpsPrice) UnmarshalJSON(data []byte) (err error)

type PriceModelBulkBpsPriceCadence added in v0.103.0

type PriceModelBulkBpsPriceCadence string
const (
	PriceModelBulkBpsPriceCadenceOneTime    PriceModelBulkBpsPriceCadence = "one_time"
	PriceModelBulkBpsPriceCadenceMonthly    PriceModelBulkBpsPriceCadence = "monthly"
	PriceModelBulkBpsPriceCadenceQuarterly  PriceModelBulkBpsPriceCadence = "quarterly"
	PriceModelBulkBpsPriceCadenceSemiAnnual PriceModelBulkBpsPriceCadence = "semi_annual"
	PriceModelBulkBpsPriceCadenceAnnual     PriceModelBulkBpsPriceCadence = "annual"
	PriceModelBulkBpsPriceCadenceCustom     PriceModelBulkBpsPriceCadence = "custom"
)

func (PriceModelBulkBpsPriceCadence) IsKnown added in v0.103.0

func (r PriceModelBulkBpsPriceCadence) IsKnown() bool

type PriceModelBulkBpsPriceModelType added in v0.103.0

type PriceModelBulkBpsPriceModelType string
const (
	PriceModelBulkBpsPriceModelTypeBulkBps PriceModelBulkBpsPriceModelType = "bulk_bps"
)

func (PriceModelBulkBpsPriceModelType) IsKnown added in v0.103.0

type PriceModelBulkBpsPricePriceType added in v0.103.0

type PriceModelBulkBpsPricePriceType string
const (
	PriceModelBulkBpsPricePriceTypeUsagePrice PriceModelBulkBpsPricePriceType = "usage_price"
	PriceModelBulkBpsPricePriceTypeFixedPrice PriceModelBulkBpsPricePriceType = "fixed_price"
)

func (PriceModelBulkBpsPricePriceType) IsKnown added in v0.103.0

type PriceModelBulkPrice added in v0.103.0

type PriceModelBulkPrice struct {
	ID                          string                         `json:"id,required"`
	BillableMetric              BillableMetricTinyModel        `json:"billable_metric,required,nullable"`
	BillingCycleConfiguration   BillingCycleConfigurationModel `json:"billing_cycle_configuration,required"`
	BulkConfig                  BulkConfigModel                `json:"bulk_config,required"`
	Cadence                     PriceModelBulkPriceCadence     `json:"cadence,required"`
	ConversionRate              float64                        `json:"conversion_rate,required,nullable"`
	CreatedAt                   time.Time                      `json:"created_at,required" format:"date-time"`
	CreditAllocation            AllocationModel                `json:"credit_allocation,required,nullable"`
	Currency                    string                         `json:"currency,required"`
	Discount                    Discount                       `json:"discount,required,nullable"`
	ExternalPriceID             string                         `json:"external_price_id,required,nullable"`
	FixedPriceQuantity          float64                        `json:"fixed_price_quantity,required,nullable"`
	InvoicingCycleConfiguration BillingCycleConfigurationModel `json:"invoicing_cycle_configuration,required,nullable"`
	Item                        ItemSlimModel                  `json:"item,required"`
	Maximum                     MaximumModel                   `json:"maximum,required,nullable"`
	MaximumAmount               string                         `json:"maximum_amount,required,nullable"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata                      map[string]string                  `json:"metadata,required"`
	Minimum                       MinimumModel                       `json:"minimum,required,nullable"`
	MinimumAmount                 string                             `json:"minimum_amount,required,nullable"`
	ModelType                     PriceModelBulkPriceModelType       `json:"model_type,required"`
	Name                          string                             `json:"name,required"`
	PlanPhaseOrder                int64                              `json:"plan_phase_order,required,nullable"`
	PriceType                     PriceModelBulkPricePriceType       `json:"price_type,required"`
	DimensionalPriceConfiguration DimensionalPriceConfigurationModel `json:"dimensional_price_configuration,nullable"`
	JSON                          priceModelBulkPriceJSON            `json:"-"`
}

func (*PriceModelBulkPrice) UnmarshalJSON added in v0.103.0

func (r *PriceModelBulkPrice) UnmarshalJSON(data []byte) (err error)

type PriceModelBulkPriceCadence added in v0.103.0

type PriceModelBulkPriceCadence string
const (
	PriceModelBulkPriceCadenceOneTime    PriceModelBulkPriceCadence = "one_time"
	PriceModelBulkPriceCadenceMonthly    PriceModelBulkPriceCadence = "monthly"
	PriceModelBulkPriceCadenceQuarterly  PriceModelBulkPriceCadence = "quarterly"
	PriceModelBulkPriceCadenceSemiAnnual PriceModelBulkPriceCadence = "semi_annual"
	PriceModelBulkPriceCadenceAnnual     PriceModelBulkPriceCadence = "annual"
	PriceModelBulkPriceCadenceCustom     PriceModelBulkPriceCadence = "custom"
)

func (PriceModelBulkPriceCadence) IsKnown added in v0.103.0

func (r PriceModelBulkPriceCadence) IsKnown() bool

type PriceModelBulkPriceModelType added in v0.103.0

type PriceModelBulkPriceModelType string
const (
	PriceModelBulkPriceModelTypeBulk PriceModelBulkPriceModelType = "bulk"
)

func (PriceModelBulkPriceModelType) IsKnown added in v0.103.0

func (r PriceModelBulkPriceModelType) IsKnown() bool

type PriceModelBulkPricePriceType added in v0.103.0

type PriceModelBulkPricePriceType string
const (
	PriceModelBulkPricePriceTypeUsagePrice PriceModelBulkPricePriceType = "usage_price"
	PriceModelBulkPricePriceTypeFixedPrice PriceModelBulkPricePriceType = "fixed_price"
)

func (PriceModelBulkPricePriceType) IsKnown added in v0.103.0

func (r PriceModelBulkPricePriceType) IsKnown() bool

type PriceModelBulkWithProrationPrice added in v0.103.0

type PriceModelBulkWithProrationPrice struct {
	ID                          string                                  `json:"id,required"`
	BillableMetric              BillableMetricTinyModel                 `json:"billable_metric,required,nullable"`
	BillingCycleConfiguration   BillingCycleConfigurationModel          `json:"billing_cycle_configuration,required"`
	BulkWithProrationConfig     CustomRatingFunctionConfigModel         `json:"bulk_with_proration_config,required"`
	Cadence                     PriceModelBulkWithProrationPriceCadence `json:"cadence,required"`
	ConversionRate              float64                                 `json:"conversion_rate,required,nullable"`
	CreatedAt                   time.Time                               `json:"created_at,required" format:"date-time"`
	CreditAllocation            AllocationModel                         `json:"credit_allocation,required,nullable"`
	Currency                    string                                  `json:"currency,required"`
	Discount                    Discount                                `json:"discount,required,nullable"`
	ExternalPriceID             string                                  `json:"external_price_id,required,nullable"`
	FixedPriceQuantity          float64                                 `json:"fixed_price_quantity,required,nullable"`
	InvoicingCycleConfiguration BillingCycleConfigurationModel          `json:"invoicing_cycle_configuration,required,nullable"`
	Item                        ItemSlimModel                           `json:"item,required"`
	Maximum                     MaximumModel                            `json:"maximum,required,nullable"`
	MaximumAmount               string                                  `json:"maximum_amount,required,nullable"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata                      map[string]string                         `json:"metadata,required"`
	Minimum                       MinimumModel                              `json:"minimum,required,nullable"`
	MinimumAmount                 string                                    `json:"minimum_amount,required,nullable"`
	ModelType                     PriceModelBulkWithProrationPriceModelType `json:"model_type,required"`
	Name                          string                                    `json:"name,required"`
	PlanPhaseOrder                int64                                     `json:"plan_phase_order,required,nullable"`
	PriceType                     PriceModelBulkWithProrationPricePriceType `json:"price_type,required"`
	DimensionalPriceConfiguration DimensionalPriceConfigurationModel        `json:"dimensional_price_configuration,nullable"`
	JSON                          priceModelBulkWithProrationPriceJSON      `json:"-"`
}

func (*PriceModelBulkWithProrationPrice) UnmarshalJSON added in v0.103.0

func (r *PriceModelBulkWithProrationPrice) UnmarshalJSON(data []byte) (err error)

type PriceModelBulkWithProrationPriceCadence added in v0.103.0

type PriceModelBulkWithProrationPriceCadence string
const (
	PriceModelBulkWithProrationPriceCadenceOneTime    PriceModelBulkWithProrationPriceCadence = "one_time"
	PriceModelBulkWithProrationPriceCadenceMonthly    PriceModelBulkWithProrationPriceCadence = "monthly"
	PriceModelBulkWithProrationPriceCadenceQuarterly  PriceModelBulkWithProrationPriceCadence = "quarterly"
	PriceModelBulkWithProrationPriceCadenceSemiAnnual PriceModelBulkWithProrationPriceCadence = "semi_annual"
	PriceModelBulkWithProrationPriceCadenceAnnual     PriceModelBulkWithProrationPriceCadence = "annual"
	PriceModelBulkWithProrationPriceCadenceCustom     PriceModelBulkWithProrationPriceCadence = "custom"
)

func (PriceModelBulkWithProrationPriceCadence) IsKnown added in v0.103.0

type PriceModelBulkWithProrationPriceModelType added in v0.103.0

type PriceModelBulkWithProrationPriceModelType string
const (
	PriceModelBulkWithProrationPriceModelTypeBulkWithProration PriceModelBulkWithProrationPriceModelType = "bulk_with_proration"
)

func (PriceModelBulkWithProrationPriceModelType) IsKnown added in v0.103.0

type PriceModelBulkWithProrationPricePriceType added in v0.103.0

type PriceModelBulkWithProrationPricePriceType string
const (
	PriceModelBulkWithProrationPricePriceTypeUsagePrice PriceModelBulkWithProrationPricePriceType = "usage_price"
	PriceModelBulkWithProrationPricePriceTypeFixedPrice PriceModelBulkWithProrationPricePriceType = "fixed_price"
)

func (PriceModelBulkWithProrationPricePriceType) IsKnown added in v0.103.0

type PriceModelCadence added in v0.103.0

type PriceModelCadence string
const (
	PriceModelCadenceOneTime    PriceModelCadence = "one_time"
	PriceModelCadenceMonthly    PriceModelCadence = "monthly"
	PriceModelCadenceQuarterly  PriceModelCadence = "quarterly"
	PriceModelCadenceSemiAnnual PriceModelCadence = "semi_annual"
	PriceModelCadenceAnnual     PriceModelCadence = "annual"
	PriceModelCadenceCustom     PriceModelCadence = "custom"
)

func (PriceModelCadence) IsKnown added in v0.103.0

func (r PriceModelCadence) IsKnown() bool

type PriceModelCumulativeGroupedBulkPrice added in v0.103.0

type PriceModelCumulativeGroupedBulkPrice struct {
	ID                          string                                      `json:"id,required"`
	BillableMetric              BillableMetricTinyModel                     `json:"billable_metric,required,nullable"`
	BillingCycleConfiguration   BillingCycleConfigurationModel              `json:"billing_cycle_configuration,required"`
	Cadence                     PriceModelCumulativeGroupedBulkPriceCadence `json:"cadence,required"`
	ConversionRate              float64                                     `json:"conversion_rate,required,nullable"`
	CreatedAt                   time.Time                                   `json:"created_at,required" format:"date-time"`
	CreditAllocation            AllocationModel                             `json:"credit_allocation,required,nullable"`
	CumulativeGroupedBulkConfig CustomRatingFunctionConfigModel             `json:"cumulative_grouped_bulk_config,required"`
	Currency                    string                                      `json:"currency,required"`
	Discount                    Discount                                    `json:"discount,required,nullable"`
	ExternalPriceID             string                                      `json:"external_price_id,required,nullable"`
	FixedPriceQuantity          float64                                     `json:"fixed_price_quantity,required,nullable"`
	InvoicingCycleConfiguration BillingCycleConfigurationModel              `json:"invoicing_cycle_configuration,required,nullable"`
	Item                        ItemSlimModel                               `json:"item,required"`
	Maximum                     MaximumModel                                `json:"maximum,required,nullable"`
	MaximumAmount               string                                      `json:"maximum_amount,required,nullable"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata                      map[string]string                             `json:"metadata,required"`
	Minimum                       MinimumModel                                  `json:"minimum,required,nullable"`
	MinimumAmount                 string                                        `json:"minimum_amount,required,nullable"`
	ModelType                     PriceModelCumulativeGroupedBulkPriceModelType `json:"model_type,required"`
	Name                          string                                        `json:"name,required"`
	PlanPhaseOrder                int64                                         `json:"plan_phase_order,required,nullable"`
	PriceType                     PriceModelCumulativeGroupedBulkPricePriceType `json:"price_type,required"`
	DimensionalPriceConfiguration DimensionalPriceConfigurationModel            `json:"dimensional_price_configuration,nullable"`
	JSON                          priceModelCumulativeGroupedBulkPriceJSON      `json:"-"`
}

func (*PriceModelCumulativeGroupedBulkPrice) UnmarshalJSON added in v0.103.0

func (r *PriceModelCumulativeGroupedBulkPrice) UnmarshalJSON(data []byte) (err error)

type PriceModelCumulativeGroupedBulkPriceCadence added in v0.103.0

type PriceModelCumulativeGroupedBulkPriceCadence string
const (
	PriceModelCumulativeGroupedBulkPriceCadenceOneTime    PriceModelCumulativeGroupedBulkPriceCadence = "one_time"
	PriceModelCumulativeGroupedBulkPriceCadenceMonthly    PriceModelCumulativeGroupedBulkPriceCadence = "monthly"
	PriceModelCumulativeGroupedBulkPriceCadenceQuarterly  PriceModelCumulativeGroupedBulkPriceCadence = "quarterly"
	PriceModelCumulativeGroupedBulkPriceCadenceSemiAnnual PriceModelCumulativeGroupedBulkPriceCadence = "semi_annual"
	PriceModelCumulativeGroupedBulkPriceCadenceAnnual     PriceModelCumulativeGroupedBulkPriceCadence = "annual"
	PriceModelCumulativeGroupedBulkPriceCadenceCustom     PriceModelCumulativeGroupedBulkPriceCadence = "custom"
)

func (PriceModelCumulativeGroupedBulkPriceCadence) IsKnown added in v0.103.0

type PriceModelCumulativeGroupedBulkPriceModelType added in v0.103.0

type PriceModelCumulativeGroupedBulkPriceModelType string
const (
	PriceModelCumulativeGroupedBulkPriceModelTypeCumulativeGroupedBulk PriceModelCumulativeGroupedBulkPriceModelType = "cumulative_grouped_bulk"
)

func (PriceModelCumulativeGroupedBulkPriceModelType) IsKnown added in v0.103.0

type PriceModelCumulativeGroupedBulkPricePriceType added in v0.103.0

type PriceModelCumulativeGroupedBulkPricePriceType string
const (
	PriceModelCumulativeGroupedBulkPricePriceTypeUsagePrice PriceModelCumulativeGroupedBulkPricePriceType = "usage_price"
	PriceModelCumulativeGroupedBulkPricePriceTypeFixedPrice PriceModelCumulativeGroupedBulkPricePriceType = "fixed_price"
)

func (PriceModelCumulativeGroupedBulkPricePriceType) IsKnown added in v0.103.0

type PriceModelGroupedAllocationPrice added in v0.103.0

type PriceModelGroupedAllocationPrice struct {
	ID                          string                                  `json:"id,required"`
	BillableMetric              BillableMetricTinyModel                 `json:"billable_metric,required,nullable"`
	BillingCycleConfiguration   BillingCycleConfigurationModel          `json:"billing_cycle_configuration,required"`
	Cadence                     PriceModelGroupedAllocationPriceCadence `json:"cadence,required"`
	ConversionRate              float64                                 `json:"conversion_rate,required,nullable"`
	CreatedAt                   time.Time                               `json:"created_at,required" format:"date-time"`
	CreditAllocation            AllocationModel                         `json:"credit_allocation,required,nullable"`
	Currency                    string                                  `json:"currency,required"`
	Discount                    Discount                                `json:"discount,required,nullable"`
	ExternalPriceID             string                                  `json:"external_price_id,required,nullable"`
	FixedPriceQuantity          float64                                 `json:"fixed_price_quantity,required,nullable"`
	GroupedAllocationConfig     CustomRatingFunctionConfigModel         `json:"grouped_allocation_config,required"`
	InvoicingCycleConfiguration BillingCycleConfigurationModel          `json:"invoicing_cycle_configuration,required,nullable"`
	Item                        ItemSlimModel                           `json:"item,required"`
	Maximum                     MaximumModel                            `json:"maximum,required,nullable"`
	MaximumAmount               string                                  `json:"maximum_amount,required,nullable"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata                      map[string]string                         `json:"metadata,required"`
	Minimum                       MinimumModel                              `json:"minimum,required,nullable"`
	MinimumAmount                 string                                    `json:"minimum_amount,required,nullable"`
	ModelType                     PriceModelGroupedAllocationPriceModelType `json:"model_type,required"`
	Name                          string                                    `json:"name,required"`
	PlanPhaseOrder                int64                                     `json:"plan_phase_order,required,nullable"`
	PriceType                     PriceModelGroupedAllocationPricePriceType `json:"price_type,required"`
	DimensionalPriceConfiguration DimensionalPriceConfigurationModel        `json:"dimensional_price_configuration,nullable"`
	JSON                          priceModelGroupedAllocationPriceJSON      `json:"-"`
}

func (*PriceModelGroupedAllocationPrice) UnmarshalJSON added in v0.103.0

func (r *PriceModelGroupedAllocationPrice) UnmarshalJSON(data []byte) (err error)

type PriceModelGroupedAllocationPriceCadence added in v0.103.0

type PriceModelGroupedAllocationPriceCadence string
const (
	PriceModelGroupedAllocationPriceCadenceOneTime    PriceModelGroupedAllocationPriceCadence = "one_time"
	PriceModelGroupedAllocationPriceCadenceMonthly    PriceModelGroupedAllocationPriceCadence = "monthly"
	PriceModelGroupedAllocationPriceCadenceQuarterly  PriceModelGroupedAllocationPriceCadence = "quarterly"
	PriceModelGroupedAllocationPriceCadenceSemiAnnual PriceModelGroupedAllocationPriceCadence = "semi_annual"
	PriceModelGroupedAllocationPriceCadenceAnnual     PriceModelGroupedAllocationPriceCadence = "annual"
	PriceModelGroupedAllocationPriceCadenceCustom     PriceModelGroupedAllocationPriceCadence = "custom"
)

func (PriceModelGroupedAllocationPriceCadence) IsKnown added in v0.103.0

type PriceModelGroupedAllocationPriceModelType added in v0.103.0

type PriceModelGroupedAllocationPriceModelType string
const (
	PriceModelGroupedAllocationPriceModelTypeGroupedAllocation PriceModelGroupedAllocationPriceModelType = "grouped_allocation"
)

func (PriceModelGroupedAllocationPriceModelType) IsKnown added in v0.103.0

type PriceModelGroupedAllocationPricePriceType added in v0.103.0

type PriceModelGroupedAllocationPricePriceType string
const (
	PriceModelGroupedAllocationPricePriceTypeUsagePrice PriceModelGroupedAllocationPricePriceType = "usage_price"
	PriceModelGroupedAllocationPricePriceTypeFixedPrice PriceModelGroupedAllocationPricePriceType = "fixed_price"
)

func (PriceModelGroupedAllocationPricePriceType) IsKnown added in v0.103.0

type PriceModelGroupedTieredPackagePrice added in v0.103.0

type PriceModelGroupedTieredPackagePrice struct {
	ID                          string                                     `json:"id,required"`
	BillableMetric              BillableMetricTinyModel                    `json:"billable_metric,required,nullable"`
	BillingCycleConfiguration   BillingCycleConfigurationModel             `json:"billing_cycle_configuration,required"`
	Cadence                     PriceModelGroupedTieredPackagePriceCadence `json:"cadence,required"`
	ConversionRate              float64                                    `json:"conversion_rate,required,nullable"`
	CreatedAt                   time.Time                                  `json:"created_at,required" format:"date-time"`
	CreditAllocation            AllocationModel                            `json:"credit_allocation,required,nullable"`
	Currency                    string                                     `json:"currency,required"`
	Discount                    Discount                                   `json:"discount,required,nullable"`
	ExternalPriceID             string                                     `json:"external_price_id,required,nullable"`
	FixedPriceQuantity          float64                                    `json:"fixed_price_quantity,required,nullable"`
	GroupedTieredPackageConfig  CustomRatingFunctionConfigModel            `json:"grouped_tiered_package_config,required"`
	InvoicingCycleConfiguration BillingCycleConfigurationModel             `json:"invoicing_cycle_configuration,required,nullable"`
	Item                        ItemSlimModel                              `json:"item,required"`
	Maximum                     MaximumModel                               `json:"maximum,required,nullable"`
	MaximumAmount               string                                     `json:"maximum_amount,required,nullable"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata                      map[string]string                            `json:"metadata,required"`
	Minimum                       MinimumModel                                 `json:"minimum,required,nullable"`
	MinimumAmount                 string                                       `json:"minimum_amount,required,nullable"`
	ModelType                     PriceModelGroupedTieredPackagePriceModelType `json:"model_type,required"`
	Name                          string                                       `json:"name,required"`
	PlanPhaseOrder                int64                                        `json:"plan_phase_order,required,nullable"`
	PriceType                     PriceModelGroupedTieredPackagePricePriceType `json:"price_type,required"`
	DimensionalPriceConfiguration DimensionalPriceConfigurationModel           `json:"dimensional_price_configuration,nullable"`
	JSON                          priceModelGroupedTieredPackagePriceJSON      `json:"-"`
}

func (*PriceModelGroupedTieredPackagePrice) UnmarshalJSON added in v0.103.0

func (r *PriceModelGroupedTieredPackagePrice) UnmarshalJSON(data []byte) (err error)

type PriceModelGroupedTieredPackagePriceCadence added in v0.103.0

type PriceModelGroupedTieredPackagePriceCadence string
const (
	PriceModelGroupedTieredPackagePriceCadenceOneTime    PriceModelGroupedTieredPackagePriceCadence = "one_time"
	PriceModelGroupedTieredPackagePriceCadenceMonthly    PriceModelGroupedTieredPackagePriceCadence = "monthly"
	PriceModelGroupedTieredPackagePriceCadenceQuarterly  PriceModelGroupedTieredPackagePriceCadence = "quarterly"
	PriceModelGroupedTieredPackagePriceCadenceSemiAnnual PriceModelGroupedTieredPackagePriceCadence = "semi_annual"
	PriceModelGroupedTieredPackagePriceCadenceAnnual     PriceModelGroupedTieredPackagePriceCadence = "annual"
	PriceModelGroupedTieredPackagePriceCadenceCustom     PriceModelGroupedTieredPackagePriceCadence = "custom"
)

func (PriceModelGroupedTieredPackagePriceCadence) IsKnown added in v0.103.0

type PriceModelGroupedTieredPackagePriceModelType added in v0.103.0

type PriceModelGroupedTieredPackagePriceModelType string
const (
	PriceModelGroupedTieredPackagePriceModelTypeGroupedTieredPackage PriceModelGroupedTieredPackagePriceModelType = "grouped_tiered_package"
)

func (PriceModelGroupedTieredPackagePriceModelType) IsKnown added in v0.103.0

type PriceModelGroupedTieredPackagePricePriceType added in v0.103.0

type PriceModelGroupedTieredPackagePricePriceType string
const (
	PriceModelGroupedTieredPackagePricePriceTypeUsagePrice PriceModelGroupedTieredPackagePricePriceType = "usage_price"
	PriceModelGroupedTieredPackagePricePriceTypeFixedPrice PriceModelGroupedTieredPackagePricePriceType = "fixed_price"
)

func (PriceModelGroupedTieredPackagePricePriceType) IsKnown added in v0.103.0

type PriceModelGroupedTieredPrice added in v0.103.0

type PriceModelGroupedTieredPrice struct {
	ID                          string                              `json:"id,required"`
	BillableMetric              BillableMetricTinyModel             `json:"billable_metric,required,nullable"`
	BillingCycleConfiguration   BillingCycleConfigurationModel      `json:"billing_cycle_configuration,required"`
	Cadence                     PriceModelGroupedTieredPriceCadence `json:"cadence,required"`
	ConversionRate              float64                             `json:"conversion_rate,required,nullable"`
	CreatedAt                   time.Time                           `json:"created_at,required" format:"date-time"`
	CreditAllocation            AllocationModel                     `json:"credit_allocation,required,nullable"`
	Currency                    string                              `json:"currency,required"`
	Discount                    Discount                            `json:"discount,required,nullable"`
	ExternalPriceID             string                              `json:"external_price_id,required,nullable"`
	FixedPriceQuantity          float64                             `json:"fixed_price_quantity,required,nullable"`
	GroupedTieredConfig         CustomRatingFunctionConfigModel     `json:"grouped_tiered_config,required"`
	InvoicingCycleConfiguration BillingCycleConfigurationModel      `json:"invoicing_cycle_configuration,required,nullable"`
	Item                        ItemSlimModel                       `json:"item,required"`
	Maximum                     MaximumModel                        `json:"maximum,required,nullable"`
	MaximumAmount               string                              `json:"maximum_amount,required,nullable"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata                      map[string]string                     `json:"metadata,required"`
	Minimum                       MinimumModel                          `json:"minimum,required,nullable"`
	MinimumAmount                 string                                `json:"minimum_amount,required,nullable"`
	ModelType                     PriceModelGroupedTieredPriceModelType `json:"model_type,required"`
	Name                          string                                `json:"name,required"`
	PlanPhaseOrder                int64                                 `json:"plan_phase_order,required,nullable"`
	PriceType                     PriceModelGroupedTieredPricePriceType `json:"price_type,required"`
	DimensionalPriceConfiguration DimensionalPriceConfigurationModel    `json:"dimensional_price_configuration,nullable"`
	JSON                          priceModelGroupedTieredPriceJSON      `json:"-"`
}

func (*PriceModelGroupedTieredPrice) UnmarshalJSON added in v0.103.0

func (r *PriceModelGroupedTieredPrice) UnmarshalJSON(data []byte) (err error)

type PriceModelGroupedTieredPriceCadence added in v0.103.0

type PriceModelGroupedTieredPriceCadence string
const (
	PriceModelGroupedTieredPriceCadenceOneTime    PriceModelGroupedTieredPriceCadence = "one_time"
	PriceModelGroupedTieredPriceCadenceMonthly    PriceModelGroupedTieredPriceCadence = "monthly"
	PriceModelGroupedTieredPriceCadenceQuarterly  PriceModelGroupedTieredPriceCadence = "quarterly"
	PriceModelGroupedTieredPriceCadenceSemiAnnual PriceModelGroupedTieredPriceCadence = "semi_annual"
	PriceModelGroupedTieredPriceCadenceAnnual     PriceModelGroupedTieredPriceCadence = "annual"
	PriceModelGroupedTieredPriceCadenceCustom     PriceModelGroupedTieredPriceCadence = "custom"
)

func (PriceModelGroupedTieredPriceCadence) IsKnown added in v0.103.0

type PriceModelGroupedTieredPriceModelType added in v0.103.0

type PriceModelGroupedTieredPriceModelType string
const (
	PriceModelGroupedTieredPriceModelTypeGroupedTiered PriceModelGroupedTieredPriceModelType = "grouped_tiered"
)

func (PriceModelGroupedTieredPriceModelType) IsKnown added in v0.103.0

type PriceModelGroupedTieredPricePriceType added in v0.103.0

type PriceModelGroupedTieredPricePriceType string
const (
	PriceModelGroupedTieredPricePriceTypeUsagePrice PriceModelGroupedTieredPricePriceType = "usage_price"
	PriceModelGroupedTieredPricePriceTypeFixedPrice PriceModelGroupedTieredPricePriceType = "fixed_price"
)

func (PriceModelGroupedTieredPricePriceType) IsKnown added in v0.103.0

type PriceModelGroupedWithMeteredMinimumPrice added in v0.103.0

type PriceModelGroupedWithMeteredMinimumPrice struct {
	ID                              string                                          `json:"id,required"`
	BillableMetric                  BillableMetricTinyModel                         `json:"billable_metric,required,nullable"`
	BillingCycleConfiguration       BillingCycleConfigurationModel                  `json:"billing_cycle_configuration,required"`
	Cadence                         PriceModelGroupedWithMeteredMinimumPriceCadence `json:"cadence,required"`
	ConversionRate                  float64                                         `json:"conversion_rate,required,nullable"`
	CreatedAt                       time.Time                                       `json:"created_at,required" format:"date-time"`
	CreditAllocation                AllocationModel                                 `json:"credit_allocation,required,nullable"`
	Currency                        string                                          `json:"currency,required"`
	Discount                        Discount                                        `json:"discount,required,nullable"`
	ExternalPriceID                 string                                          `json:"external_price_id,required,nullable"`
	FixedPriceQuantity              float64                                         `json:"fixed_price_quantity,required,nullable"`
	GroupedWithMeteredMinimumConfig CustomRatingFunctionConfigModel                 `json:"grouped_with_metered_minimum_config,required"`
	InvoicingCycleConfiguration     BillingCycleConfigurationModel                  `json:"invoicing_cycle_configuration,required,nullable"`
	Item                            ItemSlimModel                                   `json:"item,required"`
	Maximum                         MaximumModel                                    `json:"maximum,required,nullable"`
	MaximumAmount                   string                                          `json:"maximum_amount,required,nullable"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata                      map[string]string                                 `json:"metadata,required"`
	Minimum                       MinimumModel                                      `json:"minimum,required,nullable"`
	MinimumAmount                 string                                            `json:"minimum_amount,required,nullable"`
	ModelType                     PriceModelGroupedWithMeteredMinimumPriceModelType `json:"model_type,required"`
	Name                          string                                            `json:"name,required"`
	PlanPhaseOrder                int64                                             `json:"plan_phase_order,required,nullable"`
	PriceType                     PriceModelGroupedWithMeteredMinimumPricePriceType `json:"price_type,required"`
	DimensionalPriceConfiguration DimensionalPriceConfigurationModel                `json:"dimensional_price_configuration,nullable"`
	JSON                          priceModelGroupedWithMeteredMinimumPriceJSON      `json:"-"`
}

func (*PriceModelGroupedWithMeteredMinimumPrice) UnmarshalJSON added in v0.103.0

func (r *PriceModelGroupedWithMeteredMinimumPrice) UnmarshalJSON(data []byte) (err error)

type PriceModelGroupedWithMeteredMinimumPriceCadence added in v0.103.0

type PriceModelGroupedWithMeteredMinimumPriceCadence string
const (
	PriceModelGroupedWithMeteredMinimumPriceCadenceOneTime    PriceModelGroupedWithMeteredMinimumPriceCadence = "one_time"
	PriceModelGroupedWithMeteredMinimumPriceCadenceMonthly    PriceModelGroupedWithMeteredMinimumPriceCadence = "monthly"
	PriceModelGroupedWithMeteredMinimumPriceCadenceQuarterly  PriceModelGroupedWithMeteredMinimumPriceCadence = "quarterly"
	PriceModelGroupedWithMeteredMinimumPriceCadenceSemiAnnual PriceModelGroupedWithMeteredMinimumPriceCadence = "semi_annual"
	PriceModelGroupedWithMeteredMinimumPriceCadenceAnnual     PriceModelGroupedWithMeteredMinimumPriceCadence = "annual"
	PriceModelGroupedWithMeteredMinimumPriceCadenceCustom     PriceModelGroupedWithMeteredMinimumPriceCadence = "custom"
)

func (PriceModelGroupedWithMeteredMinimumPriceCadence) IsKnown added in v0.103.0

type PriceModelGroupedWithMeteredMinimumPriceModelType added in v0.103.0

type PriceModelGroupedWithMeteredMinimumPriceModelType string
const (
	PriceModelGroupedWithMeteredMinimumPriceModelTypeGroupedWithMeteredMinimum PriceModelGroupedWithMeteredMinimumPriceModelType = "grouped_with_metered_minimum"
)

func (PriceModelGroupedWithMeteredMinimumPriceModelType) IsKnown added in v0.103.0

type PriceModelGroupedWithMeteredMinimumPricePriceType added in v0.103.0

type PriceModelGroupedWithMeteredMinimumPricePriceType string
const (
	PriceModelGroupedWithMeteredMinimumPricePriceTypeUsagePrice PriceModelGroupedWithMeteredMinimumPricePriceType = "usage_price"
	PriceModelGroupedWithMeteredMinimumPricePriceTypeFixedPrice PriceModelGroupedWithMeteredMinimumPricePriceType = "fixed_price"
)

func (PriceModelGroupedWithMeteredMinimumPricePriceType) IsKnown added in v0.103.0

type PriceModelGroupedWithProratedMinimumPrice added in v0.103.0

type PriceModelGroupedWithProratedMinimumPrice struct {
	ID                               string                                           `json:"id,required"`
	BillableMetric                   BillableMetricTinyModel                          `json:"billable_metric,required,nullable"`
	BillingCycleConfiguration        BillingCycleConfigurationModel                   `json:"billing_cycle_configuration,required"`
	Cadence                          PriceModelGroupedWithProratedMinimumPriceCadence `json:"cadence,required"`
	ConversionRate                   float64                                          `json:"conversion_rate,required,nullable"`
	CreatedAt                        time.Time                                        `json:"created_at,required" format:"date-time"`
	CreditAllocation                 AllocationModel                                  `json:"credit_allocation,required,nullable"`
	Currency                         string                                           `json:"currency,required"`
	Discount                         Discount                                         `json:"discount,required,nullable"`
	ExternalPriceID                  string                                           `json:"external_price_id,required,nullable"`
	FixedPriceQuantity               float64                                          `json:"fixed_price_quantity,required,nullable"`
	GroupedWithProratedMinimumConfig CustomRatingFunctionConfigModel                  `json:"grouped_with_prorated_minimum_config,required"`
	InvoicingCycleConfiguration      BillingCycleConfigurationModel                   `json:"invoicing_cycle_configuration,required,nullable"`
	Item                             ItemSlimModel                                    `json:"item,required"`
	Maximum                          MaximumModel                                     `json:"maximum,required,nullable"`
	MaximumAmount                    string                                           `json:"maximum_amount,required,nullable"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata                      map[string]string                                  `json:"metadata,required"`
	Minimum                       MinimumModel                                       `json:"minimum,required,nullable"`
	MinimumAmount                 string                                             `json:"minimum_amount,required,nullable"`
	ModelType                     PriceModelGroupedWithProratedMinimumPriceModelType `json:"model_type,required"`
	Name                          string                                             `json:"name,required"`
	PlanPhaseOrder                int64                                              `json:"plan_phase_order,required,nullable"`
	PriceType                     PriceModelGroupedWithProratedMinimumPricePriceType `json:"price_type,required"`
	DimensionalPriceConfiguration DimensionalPriceConfigurationModel                 `json:"dimensional_price_configuration,nullable"`
	JSON                          priceModelGroupedWithProratedMinimumPriceJSON      `json:"-"`
}

func (*PriceModelGroupedWithProratedMinimumPrice) UnmarshalJSON added in v0.103.0

func (r *PriceModelGroupedWithProratedMinimumPrice) UnmarshalJSON(data []byte) (err error)

type PriceModelGroupedWithProratedMinimumPriceCadence added in v0.103.0

type PriceModelGroupedWithProratedMinimumPriceCadence string
const (
	PriceModelGroupedWithProratedMinimumPriceCadenceOneTime    PriceModelGroupedWithProratedMinimumPriceCadence = "one_time"
	PriceModelGroupedWithProratedMinimumPriceCadenceMonthly    PriceModelGroupedWithProratedMinimumPriceCadence = "monthly"
	PriceModelGroupedWithProratedMinimumPriceCadenceQuarterly  PriceModelGroupedWithProratedMinimumPriceCadence = "quarterly"
	PriceModelGroupedWithProratedMinimumPriceCadenceSemiAnnual PriceModelGroupedWithProratedMinimumPriceCadence = "semi_annual"
	PriceModelGroupedWithProratedMinimumPriceCadenceAnnual     PriceModelGroupedWithProratedMinimumPriceCadence = "annual"
	PriceModelGroupedWithProratedMinimumPriceCadenceCustom     PriceModelGroupedWithProratedMinimumPriceCadence = "custom"
)

func (PriceModelGroupedWithProratedMinimumPriceCadence) IsKnown added in v0.103.0

type PriceModelGroupedWithProratedMinimumPriceModelType added in v0.103.0

type PriceModelGroupedWithProratedMinimumPriceModelType string
const (
	PriceModelGroupedWithProratedMinimumPriceModelTypeGroupedWithProratedMinimum PriceModelGroupedWithProratedMinimumPriceModelType = "grouped_with_prorated_minimum"
)

func (PriceModelGroupedWithProratedMinimumPriceModelType) IsKnown added in v0.103.0

type PriceModelGroupedWithProratedMinimumPricePriceType added in v0.103.0

type PriceModelGroupedWithProratedMinimumPricePriceType string
const (
	PriceModelGroupedWithProratedMinimumPricePriceTypeUsagePrice PriceModelGroupedWithProratedMinimumPricePriceType = "usage_price"
	PriceModelGroupedWithProratedMinimumPricePriceTypeFixedPrice PriceModelGroupedWithProratedMinimumPricePriceType = "fixed_price"
)

func (PriceModelGroupedWithProratedMinimumPricePriceType) IsKnown added in v0.103.0

type PriceModelMatrixPrice added in v0.103.0

type PriceModelMatrixPrice struct {
	ID                          string                         `json:"id,required"`
	BillableMetric              BillableMetricTinyModel        `json:"billable_metric,required,nullable"`
	BillingCycleConfiguration   BillingCycleConfigurationModel `json:"billing_cycle_configuration,required"`
	Cadence                     PriceModelMatrixPriceCadence   `json:"cadence,required"`
	ConversionRate              float64                        `json:"conversion_rate,required,nullable"`
	CreatedAt                   time.Time                      `json:"created_at,required" format:"date-time"`
	CreditAllocation            AllocationModel                `json:"credit_allocation,required,nullable"`
	Currency                    string                         `json:"currency,required"`
	Discount                    Discount                       `json:"discount,required,nullable"`
	ExternalPriceID             string                         `json:"external_price_id,required,nullable"`
	FixedPriceQuantity          float64                        `json:"fixed_price_quantity,required,nullable"`
	InvoicingCycleConfiguration BillingCycleConfigurationModel `json:"invoicing_cycle_configuration,required,nullable"`
	Item                        ItemSlimModel                  `json:"item,required"`
	MatrixConfig                MatrixConfigModel              `json:"matrix_config,required"`
	Maximum                     MaximumModel                   `json:"maximum,required,nullable"`
	MaximumAmount               string                         `json:"maximum_amount,required,nullable"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata                      map[string]string                  `json:"metadata,required"`
	Minimum                       MinimumModel                       `json:"minimum,required,nullable"`
	MinimumAmount                 string                             `json:"minimum_amount,required,nullable"`
	ModelType                     PriceModelMatrixPriceModelType     `json:"model_type,required"`
	Name                          string                             `json:"name,required"`
	PlanPhaseOrder                int64                              `json:"plan_phase_order,required,nullable"`
	PriceType                     PriceModelMatrixPricePriceType     `json:"price_type,required"`
	DimensionalPriceConfiguration DimensionalPriceConfigurationModel `json:"dimensional_price_configuration,nullable"`
	JSON                          priceModelMatrixPriceJSON          `json:"-"`
}

func (*PriceModelMatrixPrice) UnmarshalJSON added in v0.103.0

func (r *PriceModelMatrixPrice) UnmarshalJSON(data []byte) (err error)

type PriceModelMatrixPriceCadence added in v0.103.0

type PriceModelMatrixPriceCadence string
const (
	PriceModelMatrixPriceCadenceOneTime    PriceModelMatrixPriceCadence = "one_time"
	PriceModelMatrixPriceCadenceMonthly    PriceModelMatrixPriceCadence = "monthly"
	PriceModelMatrixPriceCadenceQuarterly  PriceModelMatrixPriceCadence = "quarterly"
	PriceModelMatrixPriceCadenceSemiAnnual PriceModelMatrixPriceCadence = "semi_annual"
	PriceModelMatrixPriceCadenceAnnual     PriceModelMatrixPriceCadence = "annual"
	PriceModelMatrixPriceCadenceCustom     PriceModelMatrixPriceCadence = "custom"
)

func (PriceModelMatrixPriceCadence) IsKnown added in v0.103.0

func (r PriceModelMatrixPriceCadence) IsKnown() bool

type PriceModelMatrixPriceModelType added in v0.103.0

type PriceModelMatrixPriceModelType string
const (
	PriceModelMatrixPriceModelTypeMatrix PriceModelMatrixPriceModelType = "matrix"
)

func (PriceModelMatrixPriceModelType) IsKnown added in v0.103.0

type PriceModelMatrixPricePriceType added in v0.103.0

type PriceModelMatrixPricePriceType string
const (
	PriceModelMatrixPricePriceTypeUsagePrice PriceModelMatrixPricePriceType = "usage_price"
	PriceModelMatrixPricePriceTypeFixedPrice PriceModelMatrixPricePriceType = "fixed_price"
)

func (PriceModelMatrixPricePriceType) IsKnown added in v0.103.0

type PriceModelMatrixWithAllocationPrice added in v0.103.0

type PriceModelMatrixWithAllocationPrice struct {
	ID                          string                                     `json:"id,required"`
	BillableMetric              BillableMetricTinyModel                    `json:"billable_metric,required,nullable"`
	BillingCycleConfiguration   BillingCycleConfigurationModel             `json:"billing_cycle_configuration,required"`
	Cadence                     PriceModelMatrixWithAllocationPriceCadence `json:"cadence,required"`
	ConversionRate              float64                                    `json:"conversion_rate,required,nullable"`
	CreatedAt                   time.Time                                  `json:"created_at,required" format:"date-time"`
	CreditAllocation            AllocationModel                            `json:"credit_allocation,required,nullable"`
	Currency                    string                                     `json:"currency,required"`
	Discount                    Discount                                   `json:"discount,required,nullable"`
	ExternalPriceID             string                                     `json:"external_price_id,required,nullable"`
	FixedPriceQuantity          float64                                    `json:"fixed_price_quantity,required,nullable"`
	InvoicingCycleConfiguration BillingCycleConfigurationModel             `json:"invoicing_cycle_configuration,required,nullable"`
	Item                        ItemSlimModel                              `json:"item,required"`
	MatrixWithAllocationConfig  MatrixWithAllocationConfigModel            `json:"matrix_with_allocation_config,required"`
	Maximum                     MaximumModel                               `json:"maximum,required,nullable"`
	MaximumAmount               string                                     `json:"maximum_amount,required,nullable"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata                      map[string]string                            `json:"metadata,required"`
	Minimum                       MinimumModel                                 `json:"minimum,required,nullable"`
	MinimumAmount                 string                                       `json:"minimum_amount,required,nullable"`
	ModelType                     PriceModelMatrixWithAllocationPriceModelType `json:"model_type,required"`
	Name                          string                                       `json:"name,required"`
	PlanPhaseOrder                int64                                        `json:"plan_phase_order,required,nullable"`
	PriceType                     PriceModelMatrixWithAllocationPricePriceType `json:"price_type,required"`
	DimensionalPriceConfiguration DimensionalPriceConfigurationModel           `json:"dimensional_price_configuration,nullable"`
	JSON                          priceModelMatrixWithAllocationPriceJSON      `json:"-"`
}

func (*PriceModelMatrixWithAllocationPrice) UnmarshalJSON added in v0.103.0

func (r *PriceModelMatrixWithAllocationPrice) UnmarshalJSON(data []byte) (err error)

type PriceModelMatrixWithAllocationPriceCadence added in v0.103.0

type PriceModelMatrixWithAllocationPriceCadence string
const (
	PriceModelMatrixWithAllocationPriceCadenceOneTime    PriceModelMatrixWithAllocationPriceCadence = "one_time"
	PriceModelMatrixWithAllocationPriceCadenceMonthly    PriceModelMatrixWithAllocationPriceCadence = "monthly"
	PriceModelMatrixWithAllocationPriceCadenceQuarterly  PriceModelMatrixWithAllocationPriceCadence = "quarterly"
	PriceModelMatrixWithAllocationPriceCadenceSemiAnnual PriceModelMatrixWithAllocationPriceCadence = "semi_annual"
	PriceModelMatrixWithAllocationPriceCadenceAnnual     PriceModelMatrixWithAllocationPriceCadence = "annual"
	PriceModelMatrixWithAllocationPriceCadenceCustom     PriceModelMatrixWithAllocationPriceCadence = "custom"
)

func (PriceModelMatrixWithAllocationPriceCadence) IsKnown added in v0.103.0

type PriceModelMatrixWithAllocationPriceModelType added in v0.103.0

type PriceModelMatrixWithAllocationPriceModelType string
const (
	PriceModelMatrixWithAllocationPriceModelTypeMatrixWithAllocation PriceModelMatrixWithAllocationPriceModelType = "matrix_with_allocation"
)

func (PriceModelMatrixWithAllocationPriceModelType) IsKnown added in v0.103.0

type PriceModelMatrixWithAllocationPricePriceType added in v0.103.0

type PriceModelMatrixWithAllocationPricePriceType string
const (
	PriceModelMatrixWithAllocationPricePriceTypeUsagePrice PriceModelMatrixWithAllocationPricePriceType = "usage_price"
	PriceModelMatrixWithAllocationPricePriceTypeFixedPrice PriceModelMatrixWithAllocationPricePriceType = "fixed_price"
)

func (PriceModelMatrixWithAllocationPricePriceType) IsKnown added in v0.103.0

type PriceModelMatrixWithDisplayNamePrice added in v0.103.0

type PriceModelMatrixWithDisplayNamePrice struct {
	ID                          string                                      `json:"id,required"`
	BillableMetric              BillableMetricTinyModel                     `json:"billable_metric,required,nullable"`
	BillingCycleConfiguration   BillingCycleConfigurationModel              `json:"billing_cycle_configuration,required"`
	Cadence                     PriceModelMatrixWithDisplayNamePriceCadence `json:"cadence,required"`
	ConversionRate              float64                                     `json:"conversion_rate,required,nullable"`
	CreatedAt                   time.Time                                   `json:"created_at,required" format:"date-time"`
	CreditAllocation            AllocationModel                             `json:"credit_allocation,required,nullable"`
	Currency                    string                                      `json:"currency,required"`
	Discount                    Discount                                    `json:"discount,required,nullable"`
	ExternalPriceID             string                                      `json:"external_price_id,required,nullable"`
	FixedPriceQuantity          float64                                     `json:"fixed_price_quantity,required,nullable"`
	InvoicingCycleConfiguration BillingCycleConfigurationModel              `json:"invoicing_cycle_configuration,required,nullable"`
	Item                        ItemSlimModel                               `json:"item,required"`
	MatrixWithDisplayNameConfig CustomRatingFunctionConfigModel             `json:"matrix_with_display_name_config,required"`
	Maximum                     MaximumModel                                `json:"maximum,required,nullable"`
	MaximumAmount               string                                      `json:"maximum_amount,required,nullable"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata                      map[string]string                             `json:"metadata,required"`
	Minimum                       MinimumModel                                  `json:"minimum,required,nullable"`
	MinimumAmount                 string                                        `json:"minimum_amount,required,nullable"`
	ModelType                     PriceModelMatrixWithDisplayNamePriceModelType `json:"model_type,required"`
	Name                          string                                        `json:"name,required"`
	PlanPhaseOrder                int64                                         `json:"plan_phase_order,required,nullable"`
	PriceType                     PriceModelMatrixWithDisplayNamePricePriceType `json:"price_type,required"`
	DimensionalPriceConfiguration DimensionalPriceConfigurationModel            `json:"dimensional_price_configuration,nullable"`
	JSON                          priceModelMatrixWithDisplayNamePriceJSON      `json:"-"`
}

func (*PriceModelMatrixWithDisplayNamePrice) UnmarshalJSON added in v0.103.0

func (r *PriceModelMatrixWithDisplayNamePrice) UnmarshalJSON(data []byte) (err error)

type PriceModelMatrixWithDisplayNamePriceCadence added in v0.103.0

type PriceModelMatrixWithDisplayNamePriceCadence string
const (
	PriceModelMatrixWithDisplayNamePriceCadenceOneTime    PriceModelMatrixWithDisplayNamePriceCadence = "one_time"
	PriceModelMatrixWithDisplayNamePriceCadenceMonthly    PriceModelMatrixWithDisplayNamePriceCadence = "monthly"
	PriceModelMatrixWithDisplayNamePriceCadenceQuarterly  PriceModelMatrixWithDisplayNamePriceCadence = "quarterly"
	PriceModelMatrixWithDisplayNamePriceCadenceSemiAnnual PriceModelMatrixWithDisplayNamePriceCadence = "semi_annual"
	PriceModelMatrixWithDisplayNamePriceCadenceAnnual     PriceModelMatrixWithDisplayNamePriceCadence = "annual"
	PriceModelMatrixWithDisplayNamePriceCadenceCustom     PriceModelMatrixWithDisplayNamePriceCadence = "custom"
)

func (PriceModelMatrixWithDisplayNamePriceCadence) IsKnown added in v0.103.0

type PriceModelMatrixWithDisplayNamePriceModelType added in v0.103.0

type PriceModelMatrixWithDisplayNamePriceModelType string
const (
	PriceModelMatrixWithDisplayNamePriceModelTypeMatrixWithDisplayName PriceModelMatrixWithDisplayNamePriceModelType = "matrix_with_display_name"
)

func (PriceModelMatrixWithDisplayNamePriceModelType) IsKnown added in v0.103.0

type PriceModelMatrixWithDisplayNamePricePriceType added in v0.103.0

type PriceModelMatrixWithDisplayNamePricePriceType string
const (
	PriceModelMatrixWithDisplayNamePricePriceTypeUsagePrice PriceModelMatrixWithDisplayNamePricePriceType = "usage_price"
	PriceModelMatrixWithDisplayNamePricePriceTypeFixedPrice PriceModelMatrixWithDisplayNamePricePriceType = "fixed_price"
)

func (PriceModelMatrixWithDisplayNamePricePriceType) IsKnown added in v0.103.0

type PriceModelMaxGroupTieredPackagePrice added in v0.103.0

type PriceModelMaxGroupTieredPackagePrice struct {
	ID                          string                                      `json:"id,required"`
	BillableMetric              BillableMetricTinyModel                     `json:"billable_metric,required,nullable"`
	BillingCycleConfiguration   BillingCycleConfigurationModel              `json:"billing_cycle_configuration,required"`
	Cadence                     PriceModelMaxGroupTieredPackagePriceCadence `json:"cadence,required"`
	ConversionRate              float64                                     `json:"conversion_rate,required,nullable"`
	CreatedAt                   time.Time                                   `json:"created_at,required" format:"date-time"`
	CreditAllocation            AllocationModel                             `json:"credit_allocation,required,nullable"`
	Currency                    string                                      `json:"currency,required"`
	Discount                    Discount                                    `json:"discount,required,nullable"`
	ExternalPriceID             string                                      `json:"external_price_id,required,nullable"`
	FixedPriceQuantity          float64                                     `json:"fixed_price_quantity,required,nullable"`
	InvoicingCycleConfiguration BillingCycleConfigurationModel              `json:"invoicing_cycle_configuration,required,nullable"`
	Item                        ItemSlimModel                               `json:"item,required"`
	MaxGroupTieredPackageConfig CustomRatingFunctionConfigModel             `json:"max_group_tiered_package_config,required"`
	Maximum                     MaximumModel                                `json:"maximum,required,nullable"`
	MaximumAmount               string                                      `json:"maximum_amount,required,nullable"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata                      map[string]string                             `json:"metadata,required"`
	Minimum                       MinimumModel                                  `json:"minimum,required,nullable"`
	MinimumAmount                 string                                        `json:"minimum_amount,required,nullable"`
	ModelType                     PriceModelMaxGroupTieredPackagePriceModelType `json:"model_type,required"`
	Name                          string                                        `json:"name,required"`
	PlanPhaseOrder                int64                                         `json:"plan_phase_order,required,nullable"`
	PriceType                     PriceModelMaxGroupTieredPackagePricePriceType `json:"price_type,required"`
	DimensionalPriceConfiguration DimensionalPriceConfigurationModel            `json:"dimensional_price_configuration,nullable"`
	JSON                          priceModelMaxGroupTieredPackagePriceJSON      `json:"-"`
}

func (*PriceModelMaxGroupTieredPackagePrice) UnmarshalJSON added in v0.103.0

func (r *PriceModelMaxGroupTieredPackagePrice) UnmarshalJSON(data []byte) (err error)

type PriceModelMaxGroupTieredPackagePriceCadence added in v0.103.0

type PriceModelMaxGroupTieredPackagePriceCadence string
const (
	PriceModelMaxGroupTieredPackagePriceCadenceOneTime    PriceModelMaxGroupTieredPackagePriceCadence = "one_time"
	PriceModelMaxGroupTieredPackagePriceCadenceMonthly    PriceModelMaxGroupTieredPackagePriceCadence = "monthly"
	PriceModelMaxGroupTieredPackagePriceCadenceQuarterly  PriceModelMaxGroupTieredPackagePriceCadence = "quarterly"
	PriceModelMaxGroupTieredPackagePriceCadenceSemiAnnual PriceModelMaxGroupTieredPackagePriceCadence = "semi_annual"
	PriceModelMaxGroupTieredPackagePriceCadenceAnnual     PriceModelMaxGroupTieredPackagePriceCadence = "annual"
	PriceModelMaxGroupTieredPackagePriceCadenceCustom     PriceModelMaxGroupTieredPackagePriceCadence = "custom"
)

func (PriceModelMaxGroupTieredPackagePriceCadence) IsKnown added in v0.103.0

type PriceModelMaxGroupTieredPackagePriceModelType added in v0.103.0

type PriceModelMaxGroupTieredPackagePriceModelType string
const (
	PriceModelMaxGroupTieredPackagePriceModelTypeMaxGroupTieredPackage PriceModelMaxGroupTieredPackagePriceModelType = "max_group_tiered_package"
)

func (PriceModelMaxGroupTieredPackagePriceModelType) IsKnown added in v0.103.0

type PriceModelMaxGroupTieredPackagePricePriceType added in v0.103.0

type PriceModelMaxGroupTieredPackagePricePriceType string
const (
	PriceModelMaxGroupTieredPackagePricePriceTypeUsagePrice PriceModelMaxGroupTieredPackagePricePriceType = "usage_price"
	PriceModelMaxGroupTieredPackagePricePriceTypeFixedPrice PriceModelMaxGroupTieredPackagePricePriceType = "fixed_price"
)

func (PriceModelMaxGroupTieredPackagePricePriceType) IsKnown added in v0.103.0

type PriceModelModelType added in v0.103.0

type PriceModelModelType string
const (
	PriceModelModelTypeUnit                            PriceModelModelType = "unit"
	PriceModelModelTypePackage                         PriceModelModelType = "package"
	PriceModelModelTypeMatrix                          PriceModelModelType = "matrix"
	PriceModelModelTypeTiered                          PriceModelModelType = "tiered"
	PriceModelModelTypeTieredBps                       PriceModelModelType = "tiered_bps"
	PriceModelModelTypeBps                             PriceModelModelType = "bps"
	PriceModelModelTypeBulkBps                         PriceModelModelType = "bulk_bps"
	PriceModelModelTypeBulk                            PriceModelModelType = "bulk"
	PriceModelModelTypeThresholdTotalAmount            PriceModelModelType = "threshold_total_amount"
	PriceModelModelTypeTieredPackage                   PriceModelModelType = "tiered_package"
	PriceModelModelTypeGroupedTiered                   PriceModelModelType = "grouped_tiered"
	PriceModelModelTypeTieredWithMinimum               PriceModelModelType = "tiered_with_minimum"
	PriceModelModelTypeTieredPackageWithMinimum        PriceModelModelType = "tiered_package_with_minimum"
	PriceModelModelTypePackageWithAllocation           PriceModelModelType = "package_with_allocation"
	PriceModelModelTypeUnitWithPercent                 PriceModelModelType = "unit_with_percent"
	PriceModelModelTypeMatrixWithAllocation            PriceModelModelType = "matrix_with_allocation"
	PriceModelModelTypeTieredWithProration             PriceModelModelType = "tiered_with_proration"
	PriceModelModelTypeUnitWithProration               PriceModelModelType = "unit_with_proration"
	PriceModelModelTypeGroupedAllocation               PriceModelModelType = "grouped_allocation"
	PriceModelModelTypeGroupedWithProratedMinimum      PriceModelModelType = "grouped_with_prorated_minimum"
	PriceModelModelTypeGroupedWithMeteredMinimum       PriceModelModelType = "grouped_with_metered_minimum"
	PriceModelModelTypeMatrixWithDisplayName           PriceModelModelType = "matrix_with_display_name"
	PriceModelModelTypeBulkWithProration               PriceModelModelType = "bulk_with_proration"
	PriceModelModelTypeGroupedTieredPackage            PriceModelModelType = "grouped_tiered_package"
	PriceModelModelTypeMaxGroupTieredPackage           PriceModelModelType = "max_group_tiered_package"
	PriceModelModelTypeScalableMatrixWithUnitPricing   PriceModelModelType = "scalable_matrix_with_unit_pricing"
	PriceModelModelTypeScalableMatrixWithTieredPricing PriceModelModelType = "scalable_matrix_with_tiered_pricing"
	PriceModelModelTypeCumulativeGroupedBulk           PriceModelModelType = "cumulative_grouped_bulk"
)

func (PriceModelModelType) IsKnown added in v0.103.0

func (r PriceModelModelType) IsKnown() bool

type PriceModelPackagePrice added in v0.103.0

type PriceModelPackagePrice struct {
	ID                          string                         `json:"id,required"`
	BillableMetric              BillableMetricTinyModel        `json:"billable_metric,required,nullable"`
	BillingCycleConfiguration   BillingCycleConfigurationModel `json:"billing_cycle_configuration,required"`
	Cadence                     PriceModelPackagePriceCadence  `json:"cadence,required"`
	ConversionRate              float64                        `json:"conversion_rate,required,nullable"`
	CreatedAt                   time.Time                      `json:"created_at,required" format:"date-time"`
	CreditAllocation            AllocationModel                `json:"credit_allocation,required,nullable"`
	Currency                    string                         `json:"currency,required"`
	Discount                    Discount                       `json:"discount,required,nullable"`
	ExternalPriceID             string                         `json:"external_price_id,required,nullable"`
	FixedPriceQuantity          float64                        `json:"fixed_price_quantity,required,nullable"`
	InvoicingCycleConfiguration BillingCycleConfigurationModel `json:"invoicing_cycle_configuration,required,nullable"`
	Item                        ItemSlimModel                  `json:"item,required"`
	Maximum                     MaximumModel                   `json:"maximum,required,nullable"`
	MaximumAmount               string                         `json:"maximum_amount,required,nullable"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata                      map[string]string                  `json:"metadata,required"`
	Minimum                       MinimumModel                       `json:"minimum,required,nullable"`
	MinimumAmount                 string                             `json:"minimum_amount,required,nullable"`
	ModelType                     PriceModelPackagePriceModelType    `json:"model_type,required"`
	Name                          string                             `json:"name,required"`
	PackageConfig                 PackageConfigModel                 `json:"package_config,required"`
	PlanPhaseOrder                int64                              `json:"plan_phase_order,required,nullable"`
	PriceType                     PriceModelPackagePricePriceType    `json:"price_type,required"`
	DimensionalPriceConfiguration DimensionalPriceConfigurationModel `json:"dimensional_price_configuration,nullable"`
	JSON                          priceModelPackagePriceJSON         `json:"-"`
}

func (*PriceModelPackagePrice) UnmarshalJSON added in v0.103.0

func (r *PriceModelPackagePrice) UnmarshalJSON(data []byte) (err error)

type PriceModelPackagePriceCadence added in v0.103.0

type PriceModelPackagePriceCadence string
const (
	PriceModelPackagePriceCadenceOneTime    PriceModelPackagePriceCadence = "one_time"
	PriceModelPackagePriceCadenceMonthly    PriceModelPackagePriceCadence = "monthly"
	PriceModelPackagePriceCadenceQuarterly  PriceModelPackagePriceCadence = "quarterly"
	PriceModelPackagePriceCadenceSemiAnnual PriceModelPackagePriceCadence = "semi_annual"
	PriceModelPackagePriceCadenceAnnual     PriceModelPackagePriceCadence = "annual"
	PriceModelPackagePriceCadenceCustom     PriceModelPackagePriceCadence = "custom"
)

func (PriceModelPackagePriceCadence) IsKnown added in v0.103.0

func (r PriceModelPackagePriceCadence) IsKnown() bool

type PriceModelPackagePriceModelType added in v0.103.0

type PriceModelPackagePriceModelType string
const (
	PriceModelPackagePriceModelTypePackage PriceModelPackagePriceModelType = "package"
)

func (PriceModelPackagePriceModelType) IsKnown added in v0.103.0

type PriceModelPackagePricePriceType added in v0.103.0

type PriceModelPackagePricePriceType string
const (
	PriceModelPackagePricePriceTypeUsagePrice PriceModelPackagePricePriceType = "usage_price"
	PriceModelPackagePricePriceTypeFixedPrice PriceModelPackagePricePriceType = "fixed_price"
)

func (PriceModelPackagePricePriceType) IsKnown added in v0.103.0

type PriceModelPackageWithAllocationPrice added in v0.103.0

type PriceModelPackageWithAllocationPrice struct {
	ID                          string                                      `json:"id,required"`
	BillableMetric              BillableMetricTinyModel                     `json:"billable_metric,required,nullable"`
	BillingCycleConfiguration   BillingCycleConfigurationModel              `json:"billing_cycle_configuration,required"`
	Cadence                     PriceModelPackageWithAllocationPriceCadence `json:"cadence,required"`
	ConversionRate              float64                                     `json:"conversion_rate,required,nullable"`
	CreatedAt                   time.Time                                   `json:"created_at,required" format:"date-time"`
	CreditAllocation            AllocationModel                             `json:"credit_allocation,required,nullable"`
	Currency                    string                                      `json:"currency,required"`
	Discount                    Discount                                    `json:"discount,required,nullable"`
	ExternalPriceID             string                                      `json:"external_price_id,required,nullable"`
	FixedPriceQuantity          float64                                     `json:"fixed_price_quantity,required,nullable"`
	InvoicingCycleConfiguration BillingCycleConfigurationModel              `json:"invoicing_cycle_configuration,required,nullable"`
	Item                        ItemSlimModel                               `json:"item,required"`
	Maximum                     MaximumModel                                `json:"maximum,required,nullable"`
	MaximumAmount               string                                      `json:"maximum_amount,required,nullable"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata                      map[string]string                             `json:"metadata,required"`
	Minimum                       MinimumModel                                  `json:"minimum,required,nullable"`
	MinimumAmount                 string                                        `json:"minimum_amount,required,nullable"`
	ModelType                     PriceModelPackageWithAllocationPriceModelType `json:"model_type,required"`
	Name                          string                                        `json:"name,required"`
	PackageWithAllocationConfig   CustomRatingFunctionConfigModel               `json:"package_with_allocation_config,required"`
	PlanPhaseOrder                int64                                         `json:"plan_phase_order,required,nullable"`
	PriceType                     PriceModelPackageWithAllocationPricePriceType `json:"price_type,required"`
	DimensionalPriceConfiguration DimensionalPriceConfigurationModel            `json:"dimensional_price_configuration,nullable"`
	JSON                          priceModelPackageWithAllocationPriceJSON      `json:"-"`
}

func (*PriceModelPackageWithAllocationPrice) UnmarshalJSON added in v0.103.0

func (r *PriceModelPackageWithAllocationPrice) UnmarshalJSON(data []byte) (err error)

type PriceModelPackageWithAllocationPriceCadence added in v0.103.0

type PriceModelPackageWithAllocationPriceCadence string
const (
	PriceModelPackageWithAllocationPriceCadenceOneTime    PriceModelPackageWithAllocationPriceCadence = "one_time"
	PriceModelPackageWithAllocationPriceCadenceMonthly    PriceModelPackageWithAllocationPriceCadence = "monthly"
	PriceModelPackageWithAllocationPriceCadenceQuarterly  PriceModelPackageWithAllocationPriceCadence = "quarterly"
	PriceModelPackageWithAllocationPriceCadenceSemiAnnual PriceModelPackageWithAllocationPriceCadence = "semi_annual"
	PriceModelPackageWithAllocationPriceCadenceAnnual     PriceModelPackageWithAllocationPriceCadence = "annual"
	PriceModelPackageWithAllocationPriceCadenceCustom     PriceModelPackageWithAllocationPriceCadence = "custom"
)

func (PriceModelPackageWithAllocationPriceCadence) IsKnown added in v0.103.0

type PriceModelPackageWithAllocationPriceModelType added in v0.103.0

type PriceModelPackageWithAllocationPriceModelType string
const (
	PriceModelPackageWithAllocationPriceModelTypePackageWithAllocation PriceModelPackageWithAllocationPriceModelType = "package_with_allocation"
)

func (PriceModelPackageWithAllocationPriceModelType) IsKnown added in v0.103.0

type PriceModelPackageWithAllocationPricePriceType added in v0.103.0

type PriceModelPackageWithAllocationPricePriceType string
const (
	PriceModelPackageWithAllocationPricePriceTypeUsagePrice PriceModelPackageWithAllocationPricePriceType = "usage_price"
	PriceModelPackageWithAllocationPricePriceTypeFixedPrice PriceModelPackageWithAllocationPricePriceType = "fixed_price"
)

func (PriceModelPackageWithAllocationPricePriceType) IsKnown added in v0.103.0

type PriceModelPriceType added in v0.103.0

type PriceModelPriceType string
const (
	PriceModelPriceTypeUsagePrice PriceModelPriceType = "usage_price"
	PriceModelPriceTypeFixedPrice PriceModelPriceType = "fixed_price"
)

func (PriceModelPriceType) IsKnown added in v0.103.0

func (r PriceModelPriceType) IsKnown() bool

type PriceModelScalableMatrixWithTieredPricingPrice added in v0.103.0

type PriceModelScalableMatrixWithTieredPricingPrice struct {
	ID                          string                                                `json:"id,required"`
	BillableMetric              BillableMetricTinyModel                               `json:"billable_metric,required,nullable"`
	BillingCycleConfiguration   BillingCycleConfigurationModel                        `json:"billing_cycle_configuration,required"`
	Cadence                     PriceModelScalableMatrixWithTieredPricingPriceCadence `json:"cadence,required"`
	ConversionRate              float64                                               `json:"conversion_rate,required,nullable"`
	CreatedAt                   time.Time                                             `json:"created_at,required" format:"date-time"`
	CreditAllocation            AllocationModel                                       `json:"credit_allocation,required,nullable"`
	Currency                    string                                                `json:"currency,required"`
	Discount                    Discount                                              `json:"discount,required,nullable"`
	ExternalPriceID             string                                                `json:"external_price_id,required,nullable"`
	FixedPriceQuantity          float64                                               `json:"fixed_price_quantity,required,nullable"`
	InvoicingCycleConfiguration BillingCycleConfigurationModel                        `json:"invoicing_cycle_configuration,required,nullable"`
	Item                        ItemSlimModel                                         `json:"item,required"`
	Maximum                     MaximumModel                                          `json:"maximum,required,nullable"`
	MaximumAmount               string                                                `json:"maximum_amount,required,nullable"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata                              map[string]string                                       `json:"metadata,required"`
	Minimum                               MinimumModel                                            `json:"minimum,required,nullable"`
	MinimumAmount                         string                                                  `json:"minimum_amount,required,nullable"`
	ModelType                             PriceModelScalableMatrixWithTieredPricingPriceModelType `json:"model_type,required"`
	Name                                  string                                                  `json:"name,required"`
	PlanPhaseOrder                        int64                                                   `json:"plan_phase_order,required,nullable"`
	PriceType                             PriceModelScalableMatrixWithTieredPricingPricePriceType `json:"price_type,required"`
	ScalableMatrixWithTieredPricingConfig CustomRatingFunctionConfigModel                         `json:"scalable_matrix_with_tiered_pricing_config,required"`
	DimensionalPriceConfiguration         DimensionalPriceConfigurationModel                      `json:"dimensional_price_configuration,nullable"`
	JSON                                  priceModelScalableMatrixWithTieredPricingPriceJSON      `json:"-"`
}

func (*PriceModelScalableMatrixWithTieredPricingPrice) UnmarshalJSON added in v0.103.0

func (r *PriceModelScalableMatrixWithTieredPricingPrice) UnmarshalJSON(data []byte) (err error)

type PriceModelScalableMatrixWithTieredPricingPriceCadence added in v0.103.0

type PriceModelScalableMatrixWithTieredPricingPriceCadence string
const (
	PriceModelScalableMatrixWithTieredPricingPriceCadenceOneTime    PriceModelScalableMatrixWithTieredPricingPriceCadence = "one_time"
	PriceModelScalableMatrixWithTieredPricingPriceCadenceMonthly    PriceModelScalableMatrixWithTieredPricingPriceCadence = "monthly"
	PriceModelScalableMatrixWithTieredPricingPriceCadenceQuarterly  PriceModelScalableMatrixWithTieredPricingPriceCadence = "quarterly"
	PriceModelScalableMatrixWithTieredPricingPriceCadenceSemiAnnual PriceModelScalableMatrixWithTieredPricingPriceCadence = "semi_annual"
	PriceModelScalableMatrixWithTieredPricingPriceCadenceAnnual     PriceModelScalableMatrixWithTieredPricingPriceCadence = "annual"
	PriceModelScalableMatrixWithTieredPricingPriceCadenceCustom     PriceModelScalableMatrixWithTieredPricingPriceCadence = "custom"
)

func (PriceModelScalableMatrixWithTieredPricingPriceCadence) IsKnown added in v0.103.0

type PriceModelScalableMatrixWithTieredPricingPriceModelType added in v0.103.0

type PriceModelScalableMatrixWithTieredPricingPriceModelType string
const (
	PriceModelScalableMatrixWithTieredPricingPriceModelTypeScalableMatrixWithTieredPricing PriceModelScalableMatrixWithTieredPricingPriceModelType = "scalable_matrix_with_tiered_pricing"
)

func (PriceModelScalableMatrixWithTieredPricingPriceModelType) IsKnown added in v0.103.0

type PriceModelScalableMatrixWithTieredPricingPricePriceType added in v0.103.0

type PriceModelScalableMatrixWithTieredPricingPricePriceType string
const (
	PriceModelScalableMatrixWithTieredPricingPricePriceTypeUsagePrice PriceModelScalableMatrixWithTieredPricingPricePriceType = "usage_price"
	PriceModelScalableMatrixWithTieredPricingPricePriceTypeFixedPrice PriceModelScalableMatrixWithTieredPricingPricePriceType = "fixed_price"
)

func (PriceModelScalableMatrixWithTieredPricingPricePriceType) IsKnown added in v0.103.0

type PriceModelScalableMatrixWithUnitPricingPrice added in v0.103.0

type PriceModelScalableMatrixWithUnitPricingPrice struct {
	ID                          string                                              `json:"id,required"`
	BillableMetric              BillableMetricTinyModel                             `json:"billable_metric,required,nullable"`
	BillingCycleConfiguration   BillingCycleConfigurationModel                      `json:"billing_cycle_configuration,required"`
	Cadence                     PriceModelScalableMatrixWithUnitPricingPriceCadence `json:"cadence,required"`
	ConversionRate              float64                                             `json:"conversion_rate,required,nullable"`
	CreatedAt                   time.Time                                           `json:"created_at,required" format:"date-time"`
	CreditAllocation            AllocationModel                                     `json:"credit_allocation,required,nullable"`
	Currency                    string                                              `json:"currency,required"`
	Discount                    Discount                                            `json:"discount,required,nullable"`
	ExternalPriceID             string                                              `json:"external_price_id,required,nullable"`
	FixedPriceQuantity          float64                                             `json:"fixed_price_quantity,required,nullable"`
	InvoicingCycleConfiguration BillingCycleConfigurationModel                      `json:"invoicing_cycle_configuration,required,nullable"`
	Item                        ItemSlimModel                                       `json:"item,required"`
	Maximum                     MaximumModel                                        `json:"maximum,required,nullable"`
	MaximumAmount               string                                              `json:"maximum_amount,required,nullable"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata                            map[string]string                                     `json:"metadata,required"`
	Minimum                             MinimumModel                                          `json:"minimum,required,nullable"`
	MinimumAmount                       string                                                `json:"minimum_amount,required,nullable"`
	ModelType                           PriceModelScalableMatrixWithUnitPricingPriceModelType `json:"model_type,required"`
	Name                                string                                                `json:"name,required"`
	PlanPhaseOrder                      int64                                                 `json:"plan_phase_order,required,nullable"`
	PriceType                           PriceModelScalableMatrixWithUnitPricingPricePriceType `json:"price_type,required"`
	ScalableMatrixWithUnitPricingConfig CustomRatingFunctionConfigModel                       `json:"scalable_matrix_with_unit_pricing_config,required"`
	DimensionalPriceConfiguration       DimensionalPriceConfigurationModel                    `json:"dimensional_price_configuration,nullable"`
	JSON                                priceModelScalableMatrixWithUnitPricingPriceJSON      `json:"-"`
}

func (*PriceModelScalableMatrixWithUnitPricingPrice) UnmarshalJSON added in v0.103.0

func (r *PriceModelScalableMatrixWithUnitPricingPrice) UnmarshalJSON(data []byte) (err error)

type PriceModelScalableMatrixWithUnitPricingPriceCadence added in v0.103.0

type PriceModelScalableMatrixWithUnitPricingPriceCadence string
const (
	PriceModelScalableMatrixWithUnitPricingPriceCadenceOneTime    PriceModelScalableMatrixWithUnitPricingPriceCadence = "one_time"
	PriceModelScalableMatrixWithUnitPricingPriceCadenceMonthly    PriceModelScalableMatrixWithUnitPricingPriceCadence = "monthly"
	PriceModelScalableMatrixWithUnitPricingPriceCadenceQuarterly  PriceModelScalableMatrixWithUnitPricingPriceCadence = "quarterly"
	PriceModelScalableMatrixWithUnitPricingPriceCadenceSemiAnnual PriceModelScalableMatrixWithUnitPricingPriceCadence = "semi_annual"
	PriceModelScalableMatrixWithUnitPricingPriceCadenceAnnual     PriceModelScalableMatrixWithUnitPricingPriceCadence = "annual"
	PriceModelScalableMatrixWithUnitPricingPriceCadenceCustom     PriceModelScalableMatrixWithUnitPricingPriceCadence = "custom"
)

func (PriceModelScalableMatrixWithUnitPricingPriceCadence) IsKnown added in v0.103.0

type PriceModelScalableMatrixWithUnitPricingPriceModelType added in v0.103.0

type PriceModelScalableMatrixWithUnitPricingPriceModelType string
const (
	PriceModelScalableMatrixWithUnitPricingPriceModelTypeScalableMatrixWithUnitPricing PriceModelScalableMatrixWithUnitPricingPriceModelType = "scalable_matrix_with_unit_pricing"
)

func (PriceModelScalableMatrixWithUnitPricingPriceModelType) IsKnown added in v0.103.0

type PriceModelScalableMatrixWithUnitPricingPricePriceType added in v0.103.0

type PriceModelScalableMatrixWithUnitPricingPricePriceType string
const (
	PriceModelScalableMatrixWithUnitPricingPricePriceTypeUsagePrice PriceModelScalableMatrixWithUnitPricingPricePriceType = "usage_price"
	PriceModelScalableMatrixWithUnitPricingPricePriceTypeFixedPrice PriceModelScalableMatrixWithUnitPricingPricePriceType = "fixed_price"
)

func (PriceModelScalableMatrixWithUnitPricingPricePriceType) IsKnown added in v0.103.0

type PriceModelThresholdTotalAmountPrice added in v0.103.0

type PriceModelThresholdTotalAmountPrice struct {
	ID                          string                                     `json:"id,required"`
	BillableMetric              BillableMetricTinyModel                    `json:"billable_metric,required,nullable"`
	BillingCycleConfiguration   BillingCycleConfigurationModel             `json:"billing_cycle_configuration,required"`
	Cadence                     PriceModelThresholdTotalAmountPriceCadence `json:"cadence,required"`
	ConversionRate              float64                                    `json:"conversion_rate,required,nullable"`
	CreatedAt                   time.Time                                  `json:"created_at,required" format:"date-time"`
	CreditAllocation            AllocationModel                            `json:"credit_allocation,required,nullable"`
	Currency                    string                                     `json:"currency,required"`
	Discount                    Discount                                   `json:"discount,required,nullable"`
	ExternalPriceID             string                                     `json:"external_price_id,required,nullable"`
	FixedPriceQuantity          float64                                    `json:"fixed_price_quantity,required,nullable"`
	InvoicingCycleConfiguration BillingCycleConfigurationModel             `json:"invoicing_cycle_configuration,required,nullable"`
	Item                        ItemSlimModel                              `json:"item,required"`
	Maximum                     MaximumModel                               `json:"maximum,required,nullable"`
	MaximumAmount               string                                     `json:"maximum_amount,required,nullable"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata                      map[string]string                            `json:"metadata,required"`
	Minimum                       MinimumModel                                 `json:"minimum,required,nullable"`
	MinimumAmount                 string                                       `json:"minimum_amount,required,nullable"`
	ModelType                     PriceModelThresholdTotalAmountPriceModelType `json:"model_type,required"`
	Name                          string                                       `json:"name,required"`
	PlanPhaseOrder                int64                                        `json:"plan_phase_order,required,nullable"`
	PriceType                     PriceModelThresholdTotalAmountPricePriceType `json:"price_type,required"`
	ThresholdTotalAmountConfig    CustomRatingFunctionConfigModel              `json:"threshold_total_amount_config,required"`
	DimensionalPriceConfiguration DimensionalPriceConfigurationModel           `json:"dimensional_price_configuration,nullable"`
	JSON                          priceModelThresholdTotalAmountPriceJSON      `json:"-"`
}

func (*PriceModelThresholdTotalAmountPrice) UnmarshalJSON added in v0.103.0

func (r *PriceModelThresholdTotalAmountPrice) UnmarshalJSON(data []byte) (err error)

type PriceModelThresholdTotalAmountPriceCadence added in v0.103.0

type PriceModelThresholdTotalAmountPriceCadence string
const (
	PriceModelThresholdTotalAmountPriceCadenceOneTime    PriceModelThresholdTotalAmountPriceCadence = "one_time"
	PriceModelThresholdTotalAmountPriceCadenceMonthly    PriceModelThresholdTotalAmountPriceCadence = "monthly"
	PriceModelThresholdTotalAmountPriceCadenceQuarterly  PriceModelThresholdTotalAmountPriceCadence = "quarterly"
	PriceModelThresholdTotalAmountPriceCadenceSemiAnnual PriceModelThresholdTotalAmountPriceCadence = "semi_annual"
	PriceModelThresholdTotalAmountPriceCadenceAnnual     PriceModelThresholdTotalAmountPriceCadence = "annual"
	PriceModelThresholdTotalAmountPriceCadenceCustom     PriceModelThresholdTotalAmountPriceCadence = "custom"
)

func (PriceModelThresholdTotalAmountPriceCadence) IsKnown added in v0.103.0

type PriceModelThresholdTotalAmountPriceModelType added in v0.103.0

type PriceModelThresholdTotalAmountPriceModelType string
const (
	PriceModelThresholdTotalAmountPriceModelTypeThresholdTotalAmount PriceModelThresholdTotalAmountPriceModelType = "threshold_total_amount"
)

func (PriceModelThresholdTotalAmountPriceModelType) IsKnown added in v0.103.0

type PriceModelThresholdTotalAmountPricePriceType added in v0.103.0

type PriceModelThresholdTotalAmountPricePriceType string
const (
	PriceModelThresholdTotalAmountPricePriceTypeUsagePrice PriceModelThresholdTotalAmountPricePriceType = "usage_price"
	PriceModelThresholdTotalAmountPricePriceTypeFixedPrice PriceModelThresholdTotalAmountPricePriceType = "fixed_price"
)

func (PriceModelThresholdTotalAmountPricePriceType) IsKnown added in v0.103.0

type PriceModelTieredBpsPrice added in v0.103.0

type PriceModelTieredBpsPrice struct {
	ID                          string                          `json:"id,required"`
	BillableMetric              BillableMetricTinyModel         `json:"billable_metric,required,nullable"`
	BillingCycleConfiguration   BillingCycleConfigurationModel  `json:"billing_cycle_configuration,required"`
	Cadence                     PriceModelTieredBpsPriceCadence `json:"cadence,required"`
	ConversionRate              float64                         `json:"conversion_rate,required,nullable"`
	CreatedAt                   time.Time                       `json:"created_at,required" format:"date-time"`
	CreditAllocation            AllocationModel                 `json:"credit_allocation,required,nullable"`
	Currency                    string                          `json:"currency,required"`
	Discount                    Discount                        `json:"discount,required,nullable"`
	ExternalPriceID             string                          `json:"external_price_id,required,nullable"`
	FixedPriceQuantity          float64                         `json:"fixed_price_quantity,required,nullable"`
	InvoicingCycleConfiguration BillingCycleConfigurationModel  `json:"invoicing_cycle_configuration,required,nullable"`
	Item                        ItemSlimModel                   `json:"item,required"`
	Maximum                     MaximumModel                    `json:"maximum,required,nullable"`
	MaximumAmount               string                          `json:"maximum_amount,required,nullable"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata                      map[string]string                  `json:"metadata,required"`
	Minimum                       MinimumModel                       `json:"minimum,required,nullable"`
	MinimumAmount                 string                             `json:"minimum_amount,required,nullable"`
	ModelType                     PriceModelTieredBpsPriceModelType  `json:"model_type,required"`
	Name                          string                             `json:"name,required"`
	PlanPhaseOrder                int64                              `json:"plan_phase_order,required,nullable"`
	PriceType                     PriceModelTieredBpsPricePriceType  `json:"price_type,required"`
	TieredBpsConfig               TieredBpsConfigModel               `json:"tiered_bps_config,required"`
	DimensionalPriceConfiguration DimensionalPriceConfigurationModel `json:"dimensional_price_configuration,nullable"`
	JSON                          priceModelTieredBpsPriceJSON       `json:"-"`
}

func (*PriceModelTieredBpsPrice) UnmarshalJSON added in v0.103.0

func (r *PriceModelTieredBpsPrice) UnmarshalJSON(data []byte) (err error)

type PriceModelTieredBpsPriceCadence added in v0.103.0

type PriceModelTieredBpsPriceCadence string
const (
	PriceModelTieredBpsPriceCadenceOneTime    PriceModelTieredBpsPriceCadence = "one_time"
	PriceModelTieredBpsPriceCadenceMonthly    PriceModelTieredBpsPriceCadence = "monthly"
	PriceModelTieredBpsPriceCadenceQuarterly  PriceModelTieredBpsPriceCadence = "quarterly"
	PriceModelTieredBpsPriceCadenceSemiAnnual PriceModelTieredBpsPriceCadence = "semi_annual"
	PriceModelTieredBpsPriceCadenceAnnual     PriceModelTieredBpsPriceCadence = "annual"
	PriceModelTieredBpsPriceCadenceCustom     PriceModelTieredBpsPriceCadence = "custom"
)

func (PriceModelTieredBpsPriceCadence) IsKnown added in v0.103.0

type PriceModelTieredBpsPriceModelType added in v0.103.0

type PriceModelTieredBpsPriceModelType string
const (
	PriceModelTieredBpsPriceModelTypeTieredBps PriceModelTieredBpsPriceModelType = "tiered_bps"
)

func (PriceModelTieredBpsPriceModelType) IsKnown added in v0.103.0

type PriceModelTieredBpsPricePriceType added in v0.103.0

type PriceModelTieredBpsPricePriceType string
const (
	PriceModelTieredBpsPricePriceTypeUsagePrice PriceModelTieredBpsPricePriceType = "usage_price"
	PriceModelTieredBpsPricePriceTypeFixedPrice PriceModelTieredBpsPricePriceType = "fixed_price"
)

func (PriceModelTieredBpsPricePriceType) IsKnown added in v0.103.0

type PriceModelTieredPackagePrice added in v0.103.0

type PriceModelTieredPackagePrice struct {
	ID                          string                              `json:"id,required"`
	BillableMetric              BillableMetricTinyModel             `json:"billable_metric,required,nullable"`
	BillingCycleConfiguration   BillingCycleConfigurationModel      `json:"billing_cycle_configuration,required"`
	Cadence                     PriceModelTieredPackagePriceCadence `json:"cadence,required"`
	ConversionRate              float64                             `json:"conversion_rate,required,nullable"`
	CreatedAt                   time.Time                           `json:"created_at,required" format:"date-time"`
	CreditAllocation            AllocationModel                     `json:"credit_allocation,required,nullable"`
	Currency                    string                              `json:"currency,required"`
	Discount                    Discount                            `json:"discount,required,nullable"`
	ExternalPriceID             string                              `json:"external_price_id,required,nullable"`
	FixedPriceQuantity          float64                             `json:"fixed_price_quantity,required,nullable"`
	InvoicingCycleConfiguration BillingCycleConfigurationModel      `json:"invoicing_cycle_configuration,required,nullable"`
	Item                        ItemSlimModel                       `json:"item,required"`
	Maximum                     MaximumModel                        `json:"maximum,required,nullable"`
	MaximumAmount               string                              `json:"maximum_amount,required,nullable"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata                      map[string]string                     `json:"metadata,required"`
	Minimum                       MinimumModel                          `json:"minimum,required,nullable"`
	MinimumAmount                 string                                `json:"minimum_amount,required,nullable"`
	ModelType                     PriceModelTieredPackagePriceModelType `json:"model_type,required"`
	Name                          string                                `json:"name,required"`
	PlanPhaseOrder                int64                                 `json:"plan_phase_order,required,nullable"`
	PriceType                     PriceModelTieredPackagePricePriceType `json:"price_type,required"`
	TieredPackageConfig           CustomRatingFunctionConfigModel       `json:"tiered_package_config,required"`
	DimensionalPriceConfiguration DimensionalPriceConfigurationModel    `json:"dimensional_price_configuration,nullable"`
	JSON                          priceModelTieredPackagePriceJSON      `json:"-"`
}

func (*PriceModelTieredPackagePrice) UnmarshalJSON added in v0.103.0

func (r *PriceModelTieredPackagePrice) UnmarshalJSON(data []byte) (err error)

type PriceModelTieredPackagePriceCadence added in v0.103.0

type PriceModelTieredPackagePriceCadence string
const (
	PriceModelTieredPackagePriceCadenceOneTime    PriceModelTieredPackagePriceCadence = "one_time"
	PriceModelTieredPackagePriceCadenceMonthly    PriceModelTieredPackagePriceCadence = "monthly"
	PriceModelTieredPackagePriceCadenceQuarterly  PriceModelTieredPackagePriceCadence = "quarterly"
	PriceModelTieredPackagePriceCadenceSemiAnnual PriceModelTieredPackagePriceCadence = "semi_annual"
	PriceModelTieredPackagePriceCadenceAnnual     PriceModelTieredPackagePriceCadence = "annual"
	PriceModelTieredPackagePriceCadenceCustom     PriceModelTieredPackagePriceCadence = "custom"
)

func (PriceModelTieredPackagePriceCadence) IsKnown added in v0.103.0

type PriceModelTieredPackagePriceModelType added in v0.103.0

type PriceModelTieredPackagePriceModelType string
const (
	PriceModelTieredPackagePriceModelTypeTieredPackage PriceModelTieredPackagePriceModelType = "tiered_package"
)

func (PriceModelTieredPackagePriceModelType) IsKnown added in v0.103.0

type PriceModelTieredPackagePricePriceType added in v0.103.0

type PriceModelTieredPackagePricePriceType string
const (
	PriceModelTieredPackagePricePriceTypeUsagePrice PriceModelTieredPackagePricePriceType = "usage_price"
	PriceModelTieredPackagePricePriceTypeFixedPrice PriceModelTieredPackagePricePriceType = "fixed_price"
)

func (PriceModelTieredPackagePricePriceType) IsKnown added in v0.103.0

type PriceModelTieredPackageWithMinimumPrice added in v0.103.0

type PriceModelTieredPackageWithMinimumPrice struct {
	ID                          string                                         `json:"id,required"`
	BillableMetric              BillableMetricTinyModel                        `json:"billable_metric,required,nullable"`
	BillingCycleConfiguration   BillingCycleConfigurationModel                 `json:"billing_cycle_configuration,required"`
	Cadence                     PriceModelTieredPackageWithMinimumPriceCadence `json:"cadence,required"`
	ConversionRate              float64                                        `json:"conversion_rate,required,nullable"`
	CreatedAt                   time.Time                                      `json:"created_at,required" format:"date-time"`
	CreditAllocation            AllocationModel                                `json:"credit_allocation,required,nullable"`
	Currency                    string                                         `json:"currency,required"`
	Discount                    Discount                                       `json:"discount,required,nullable"`
	ExternalPriceID             string                                         `json:"external_price_id,required,nullable"`
	FixedPriceQuantity          float64                                        `json:"fixed_price_quantity,required,nullable"`
	InvoicingCycleConfiguration BillingCycleConfigurationModel                 `json:"invoicing_cycle_configuration,required,nullable"`
	Item                        ItemSlimModel                                  `json:"item,required"`
	Maximum                     MaximumModel                                   `json:"maximum,required,nullable"`
	MaximumAmount               string                                         `json:"maximum_amount,required,nullable"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata                       map[string]string                                `json:"metadata,required"`
	Minimum                        MinimumModel                                     `json:"minimum,required,nullable"`
	MinimumAmount                  string                                           `json:"minimum_amount,required,nullable"`
	ModelType                      PriceModelTieredPackageWithMinimumPriceModelType `json:"model_type,required"`
	Name                           string                                           `json:"name,required"`
	PlanPhaseOrder                 int64                                            `json:"plan_phase_order,required,nullable"`
	PriceType                      PriceModelTieredPackageWithMinimumPricePriceType `json:"price_type,required"`
	TieredPackageWithMinimumConfig CustomRatingFunctionConfigModel                  `json:"tiered_package_with_minimum_config,required"`
	DimensionalPriceConfiguration  DimensionalPriceConfigurationModel               `json:"dimensional_price_configuration,nullable"`
	JSON                           priceModelTieredPackageWithMinimumPriceJSON      `json:"-"`
}

func (*PriceModelTieredPackageWithMinimumPrice) UnmarshalJSON added in v0.103.0

func (r *PriceModelTieredPackageWithMinimumPrice) UnmarshalJSON(data []byte) (err error)

type PriceModelTieredPackageWithMinimumPriceCadence added in v0.103.0

type PriceModelTieredPackageWithMinimumPriceCadence string
const (
	PriceModelTieredPackageWithMinimumPriceCadenceOneTime    PriceModelTieredPackageWithMinimumPriceCadence = "one_time"
	PriceModelTieredPackageWithMinimumPriceCadenceMonthly    PriceModelTieredPackageWithMinimumPriceCadence = "monthly"
	PriceModelTieredPackageWithMinimumPriceCadenceQuarterly  PriceModelTieredPackageWithMinimumPriceCadence = "quarterly"
	PriceModelTieredPackageWithMinimumPriceCadenceSemiAnnual PriceModelTieredPackageWithMinimumPriceCadence = "semi_annual"
	PriceModelTieredPackageWithMinimumPriceCadenceAnnual     PriceModelTieredPackageWithMinimumPriceCadence = "annual"
	PriceModelTieredPackageWithMinimumPriceCadenceCustom     PriceModelTieredPackageWithMinimumPriceCadence = "custom"
)

func (PriceModelTieredPackageWithMinimumPriceCadence) IsKnown added in v0.103.0

type PriceModelTieredPackageWithMinimumPriceModelType added in v0.103.0

type PriceModelTieredPackageWithMinimumPriceModelType string
const (
	PriceModelTieredPackageWithMinimumPriceModelTypeTieredPackageWithMinimum PriceModelTieredPackageWithMinimumPriceModelType = "tiered_package_with_minimum"
)

func (PriceModelTieredPackageWithMinimumPriceModelType) IsKnown added in v0.103.0

type PriceModelTieredPackageWithMinimumPricePriceType added in v0.103.0

type PriceModelTieredPackageWithMinimumPricePriceType string
const (
	PriceModelTieredPackageWithMinimumPricePriceTypeUsagePrice PriceModelTieredPackageWithMinimumPricePriceType = "usage_price"
	PriceModelTieredPackageWithMinimumPricePriceTypeFixedPrice PriceModelTieredPackageWithMinimumPricePriceType = "fixed_price"
)

func (PriceModelTieredPackageWithMinimumPricePriceType) IsKnown added in v0.103.0

type PriceModelTieredPrice added in v0.103.0

type PriceModelTieredPrice struct {
	ID                          string                         `json:"id,required"`
	BillableMetric              BillableMetricTinyModel        `json:"billable_metric,required,nullable"`
	BillingCycleConfiguration   BillingCycleConfigurationModel `json:"billing_cycle_configuration,required"`
	Cadence                     PriceModelTieredPriceCadence   `json:"cadence,required"`
	ConversionRate              float64                        `json:"conversion_rate,required,nullable"`
	CreatedAt                   time.Time                      `json:"created_at,required" format:"date-time"`
	CreditAllocation            AllocationModel                `json:"credit_allocation,required,nullable"`
	Currency                    string                         `json:"currency,required"`
	Discount                    Discount                       `json:"discount,required,nullable"`
	ExternalPriceID             string                         `json:"external_price_id,required,nullable"`
	FixedPriceQuantity          float64                        `json:"fixed_price_quantity,required,nullable"`
	InvoicingCycleConfiguration BillingCycleConfigurationModel `json:"invoicing_cycle_configuration,required,nullable"`
	Item                        ItemSlimModel                  `json:"item,required"`
	Maximum                     MaximumModel                   `json:"maximum,required,nullable"`
	MaximumAmount               string                         `json:"maximum_amount,required,nullable"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata                      map[string]string                  `json:"metadata,required"`
	Minimum                       MinimumModel                       `json:"minimum,required,nullable"`
	MinimumAmount                 string                             `json:"minimum_amount,required,nullable"`
	ModelType                     PriceModelTieredPriceModelType     `json:"model_type,required"`
	Name                          string                             `json:"name,required"`
	PlanPhaseOrder                int64                              `json:"plan_phase_order,required,nullable"`
	PriceType                     PriceModelTieredPricePriceType     `json:"price_type,required"`
	TieredConfig                  TieredConfigModel                  `json:"tiered_config,required"`
	DimensionalPriceConfiguration DimensionalPriceConfigurationModel `json:"dimensional_price_configuration,nullable"`
	JSON                          priceModelTieredPriceJSON          `json:"-"`
}

func (*PriceModelTieredPrice) UnmarshalJSON added in v0.103.0

func (r *PriceModelTieredPrice) UnmarshalJSON(data []byte) (err error)

type PriceModelTieredPriceCadence added in v0.103.0

type PriceModelTieredPriceCadence string
const (
	PriceModelTieredPriceCadenceOneTime    PriceModelTieredPriceCadence = "one_time"
	PriceModelTieredPriceCadenceMonthly    PriceModelTieredPriceCadence = "monthly"
	PriceModelTieredPriceCadenceQuarterly  PriceModelTieredPriceCadence = "quarterly"
	PriceModelTieredPriceCadenceSemiAnnual PriceModelTieredPriceCadence = "semi_annual"
	PriceModelTieredPriceCadenceAnnual     PriceModelTieredPriceCadence = "annual"
	PriceModelTieredPriceCadenceCustom     PriceModelTieredPriceCadence = "custom"
)

func (PriceModelTieredPriceCadence) IsKnown added in v0.103.0

func (r PriceModelTieredPriceCadence) IsKnown() bool

type PriceModelTieredPriceModelType added in v0.103.0

type PriceModelTieredPriceModelType string
const (
	PriceModelTieredPriceModelTypeTiered PriceModelTieredPriceModelType = "tiered"
)

func (PriceModelTieredPriceModelType) IsKnown added in v0.103.0

type PriceModelTieredPricePriceType added in v0.103.0

type PriceModelTieredPricePriceType string
const (
	PriceModelTieredPricePriceTypeUsagePrice PriceModelTieredPricePriceType = "usage_price"
	PriceModelTieredPricePriceTypeFixedPrice PriceModelTieredPricePriceType = "fixed_price"
)

func (PriceModelTieredPricePriceType) IsKnown added in v0.103.0

type PriceModelTieredWithMinimumPrice added in v0.103.0

type PriceModelTieredWithMinimumPrice struct {
	ID                          string                                  `json:"id,required"`
	BillableMetric              BillableMetricTinyModel                 `json:"billable_metric,required,nullable"`
	BillingCycleConfiguration   BillingCycleConfigurationModel          `json:"billing_cycle_configuration,required"`
	Cadence                     PriceModelTieredWithMinimumPriceCadence `json:"cadence,required"`
	ConversionRate              float64                                 `json:"conversion_rate,required,nullable"`
	CreatedAt                   time.Time                               `json:"created_at,required" format:"date-time"`
	CreditAllocation            AllocationModel                         `json:"credit_allocation,required,nullable"`
	Currency                    string                                  `json:"currency,required"`
	Discount                    Discount                                `json:"discount,required,nullable"`
	ExternalPriceID             string                                  `json:"external_price_id,required,nullable"`
	FixedPriceQuantity          float64                                 `json:"fixed_price_quantity,required,nullable"`
	InvoicingCycleConfiguration BillingCycleConfigurationModel          `json:"invoicing_cycle_configuration,required,nullable"`
	Item                        ItemSlimModel                           `json:"item,required"`
	Maximum                     MaximumModel                            `json:"maximum,required,nullable"`
	MaximumAmount               string                                  `json:"maximum_amount,required,nullable"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata                      map[string]string                         `json:"metadata,required"`
	Minimum                       MinimumModel                              `json:"minimum,required,nullable"`
	MinimumAmount                 string                                    `json:"minimum_amount,required,nullable"`
	ModelType                     PriceModelTieredWithMinimumPriceModelType `json:"model_type,required"`
	Name                          string                                    `json:"name,required"`
	PlanPhaseOrder                int64                                     `json:"plan_phase_order,required,nullable"`
	PriceType                     PriceModelTieredWithMinimumPricePriceType `json:"price_type,required"`
	TieredWithMinimumConfig       CustomRatingFunctionConfigModel           `json:"tiered_with_minimum_config,required"`
	DimensionalPriceConfiguration DimensionalPriceConfigurationModel        `json:"dimensional_price_configuration,nullable"`
	JSON                          priceModelTieredWithMinimumPriceJSON      `json:"-"`
}

func (*PriceModelTieredWithMinimumPrice) UnmarshalJSON added in v0.103.0

func (r *PriceModelTieredWithMinimumPrice) UnmarshalJSON(data []byte) (err error)

type PriceModelTieredWithMinimumPriceCadence added in v0.103.0

type PriceModelTieredWithMinimumPriceCadence string
const (
	PriceModelTieredWithMinimumPriceCadenceOneTime    PriceModelTieredWithMinimumPriceCadence = "one_time"
	PriceModelTieredWithMinimumPriceCadenceMonthly    PriceModelTieredWithMinimumPriceCadence = "monthly"
	PriceModelTieredWithMinimumPriceCadenceQuarterly  PriceModelTieredWithMinimumPriceCadence = "quarterly"
	PriceModelTieredWithMinimumPriceCadenceSemiAnnual PriceModelTieredWithMinimumPriceCadence = "semi_annual"
	PriceModelTieredWithMinimumPriceCadenceAnnual     PriceModelTieredWithMinimumPriceCadence = "annual"
	PriceModelTieredWithMinimumPriceCadenceCustom     PriceModelTieredWithMinimumPriceCadence = "custom"
)

func (PriceModelTieredWithMinimumPriceCadence) IsKnown added in v0.103.0

type PriceModelTieredWithMinimumPriceModelType added in v0.103.0

type PriceModelTieredWithMinimumPriceModelType string
const (
	PriceModelTieredWithMinimumPriceModelTypeTieredWithMinimum PriceModelTieredWithMinimumPriceModelType = "tiered_with_minimum"
)

func (PriceModelTieredWithMinimumPriceModelType) IsKnown added in v0.103.0

type PriceModelTieredWithMinimumPricePriceType added in v0.103.0

type PriceModelTieredWithMinimumPricePriceType string
const (
	PriceModelTieredWithMinimumPricePriceTypeUsagePrice PriceModelTieredWithMinimumPricePriceType = "usage_price"
	PriceModelTieredWithMinimumPricePriceTypeFixedPrice PriceModelTieredWithMinimumPricePriceType = "fixed_price"
)

func (PriceModelTieredWithMinimumPricePriceType) IsKnown added in v0.103.0

type PriceModelTieredWithProrationPrice added in v0.103.0

type PriceModelTieredWithProrationPrice struct {
	ID                          string                                    `json:"id,required"`
	BillableMetric              BillableMetricTinyModel                   `json:"billable_metric,required,nullable"`
	BillingCycleConfiguration   BillingCycleConfigurationModel            `json:"billing_cycle_configuration,required"`
	Cadence                     PriceModelTieredWithProrationPriceCadence `json:"cadence,required"`
	ConversionRate              float64                                   `json:"conversion_rate,required,nullable"`
	CreatedAt                   time.Time                                 `json:"created_at,required" format:"date-time"`
	CreditAllocation            AllocationModel                           `json:"credit_allocation,required,nullable"`
	Currency                    string                                    `json:"currency,required"`
	Discount                    Discount                                  `json:"discount,required,nullable"`
	ExternalPriceID             string                                    `json:"external_price_id,required,nullable"`
	FixedPriceQuantity          float64                                   `json:"fixed_price_quantity,required,nullable"`
	InvoicingCycleConfiguration BillingCycleConfigurationModel            `json:"invoicing_cycle_configuration,required,nullable"`
	Item                        ItemSlimModel                             `json:"item,required"`
	Maximum                     MaximumModel                              `json:"maximum,required,nullable"`
	MaximumAmount               string                                    `json:"maximum_amount,required,nullable"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata                      map[string]string                           `json:"metadata,required"`
	Minimum                       MinimumModel                                `json:"minimum,required,nullable"`
	MinimumAmount                 string                                      `json:"minimum_amount,required,nullable"`
	ModelType                     PriceModelTieredWithProrationPriceModelType `json:"model_type,required"`
	Name                          string                                      `json:"name,required"`
	PlanPhaseOrder                int64                                       `json:"plan_phase_order,required,nullable"`
	PriceType                     PriceModelTieredWithProrationPricePriceType `json:"price_type,required"`
	TieredWithProrationConfig     CustomRatingFunctionConfigModel             `json:"tiered_with_proration_config,required"`
	DimensionalPriceConfiguration DimensionalPriceConfigurationModel          `json:"dimensional_price_configuration,nullable"`
	JSON                          priceModelTieredWithProrationPriceJSON      `json:"-"`
}

func (*PriceModelTieredWithProrationPrice) UnmarshalJSON added in v0.103.0

func (r *PriceModelTieredWithProrationPrice) UnmarshalJSON(data []byte) (err error)

type PriceModelTieredWithProrationPriceCadence added in v0.103.0

type PriceModelTieredWithProrationPriceCadence string
const (
	PriceModelTieredWithProrationPriceCadenceOneTime    PriceModelTieredWithProrationPriceCadence = "one_time"
	PriceModelTieredWithProrationPriceCadenceMonthly    PriceModelTieredWithProrationPriceCadence = "monthly"
	PriceModelTieredWithProrationPriceCadenceQuarterly  PriceModelTieredWithProrationPriceCadence = "quarterly"
	PriceModelTieredWithProrationPriceCadenceSemiAnnual PriceModelTieredWithProrationPriceCadence = "semi_annual"
	PriceModelTieredWithProrationPriceCadenceAnnual     PriceModelTieredWithProrationPriceCadence = "annual"
	PriceModelTieredWithProrationPriceCadenceCustom     PriceModelTieredWithProrationPriceCadence = "custom"
)

func (PriceModelTieredWithProrationPriceCadence) IsKnown added in v0.103.0

type PriceModelTieredWithProrationPriceModelType added in v0.103.0

type PriceModelTieredWithProrationPriceModelType string
const (
	PriceModelTieredWithProrationPriceModelTypeTieredWithProration PriceModelTieredWithProrationPriceModelType = "tiered_with_proration"
)

func (PriceModelTieredWithProrationPriceModelType) IsKnown added in v0.103.0

type PriceModelTieredWithProrationPricePriceType added in v0.103.0

type PriceModelTieredWithProrationPricePriceType string
const (
	PriceModelTieredWithProrationPricePriceTypeUsagePrice PriceModelTieredWithProrationPricePriceType = "usage_price"
	PriceModelTieredWithProrationPricePriceTypeFixedPrice PriceModelTieredWithProrationPricePriceType = "fixed_price"
)

func (PriceModelTieredWithProrationPricePriceType) IsKnown added in v0.103.0

type PriceModelUnion added in v0.103.0

type PriceModelUnion interface {
	// contains filtered or unexported methods
}

The Price resource represents a price that can be billed on a subscription, resulting in a charge on an invoice in the form of an invoice line item. Prices take a quantity and determine an amount to bill.

Orb supports a few different pricing models out of the box. Each of these models is serialized differently in a given Price object. The model_type field determines the key for the configuration object that is present.

For more on the types of prices, see [the core concepts documentation](/core-concepts#plan-and-price)

Union satisfied by shared.PriceModelUnitPrice, shared.PriceModelPackagePrice, shared.PriceModelMatrixPrice, shared.PriceModelTieredPrice, shared.PriceModelTieredBpsPrice, shared.PriceModelBpsPrice, shared.PriceModelBulkBpsPrice, shared.PriceModelBulkPrice, shared.PriceModelThresholdTotalAmountPrice, shared.PriceModelTieredPackagePrice, shared.PriceModelGroupedTieredPrice, shared.PriceModelTieredWithMinimumPrice, shared.PriceModelTieredPackageWithMinimumPrice, shared.PriceModelPackageWithAllocationPrice, shared.PriceModelUnitWithPercentPrice, shared.PriceModelMatrixWithAllocationPrice, shared.PriceModelTieredWithProrationPrice, shared.PriceModelUnitWithProrationPrice, shared.PriceModelGroupedAllocationPrice, shared.PriceModelGroupedWithProratedMinimumPrice, shared.PriceModelGroupedWithMeteredMinimumPrice, shared.PriceModelMatrixWithDisplayNamePrice, shared.PriceModelBulkWithProrationPrice, shared.PriceModelGroupedTieredPackagePrice, shared.PriceModelMaxGroupTieredPackagePrice, shared.PriceModelScalableMatrixWithUnitPricingPrice, shared.PriceModelScalableMatrixWithTieredPricingPrice or shared.PriceModelCumulativeGroupedBulkPrice.

type PriceModelUnitPrice added in v0.103.0

type PriceModelUnitPrice struct {
	ID                          string                         `json:"id,required"`
	BillableMetric              BillableMetricTinyModel        `json:"billable_metric,required,nullable"`
	BillingCycleConfiguration   BillingCycleConfigurationModel `json:"billing_cycle_configuration,required"`
	Cadence                     PriceModelUnitPriceCadence     `json:"cadence,required"`
	ConversionRate              float64                        `json:"conversion_rate,required,nullable"`
	CreatedAt                   time.Time                      `json:"created_at,required" format:"date-time"`
	CreditAllocation            AllocationModel                `json:"credit_allocation,required,nullable"`
	Currency                    string                         `json:"currency,required"`
	Discount                    Discount                       `json:"discount,required,nullable"`
	ExternalPriceID             string                         `json:"external_price_id,required,nullable"`
	FixedPriceQuantity          float64                        `json:"fixed_price_quantity,required,nullable"`
	InvoicingCycleConfiguration BillingCycleConfigurationModel `json:"invoicing_cycle_configuration,required,nullable"`
	Item                        ItemSlimModel                  `json:"item,required"`
	Maximum                     MaximumModel                   `json:"maximum,required,nullable"`
	MaximumAmount               string                         `json:"maximum_amount,required,nullable"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata                      map[string]string                  `json:"metadata,required"`
	Minimum                       MinimumModel                       `json:"minimum,required,nullable"`
	MinimumAmount                 string                             `json:"minimum_amount,required,nullable"`
	ModelType                     PriceModelUnitPriceModelType       `json:"model_type,required"`
	Name                          string                             `json:"name,required"`
	PlanPhaseOrder                int64                              `json:"plan_phase_order,required,nullable"`
	PriceType                     PriceModelUnitPricePriceType       `json:"price_type,required"`
	UnitConfig                    UnitConfigModel                    `json:"unit_config,required"`
	DimensionalPriceConfiguration DimensionalPriceConfigurationModel `json:"dimensional_price_configuration,nullable"`
	JSON                          priceModelUnitPriceJSON            `json:"-"`
}

func (*PriceModelUnitPrice) UnmarshalJSON added in v0.103.0

func (r *PriceModelUnitPrice) UnmarshalJSON(data []byte) (err error)

type PriceModelUnitPriceCadence added in v0.103.0

type PriceModelUnitPriceCadence string
const (
	PriceModelUnitPriceCadenceOneTime    PriceModelUnitPriceCadence = "one_time"
	PriceModelUnitPriceCadenceMonthly    PriceModelUnitPriceCadence = "monthly"
	PriceModelUnitPriceCadenceQuarterly  PriceModelUnitPriceCadence = "quarterly"
	PriceModelUnitPriceCadenceSemiAnnual PriceModelUnitPriceCadence = "semi_annual"
	PriceModelUnitPriceCadenceAnnual     PriceModelUnitPriceCadence = "annual"
	PriceModelUnitPriceCadenceCustom     PriceModelUnitPriceCadence = "custom"
)

func (PriceModelUnitPriceCadence) IsKnown added in v0.103.0

func (r PriceModelUnitPriceCadence) IsKnown() bool

type PriceModelUnitPriceModelType added in v0.103.0

type PriceModelUnitPriceModelType string
const (
	PriceModelUnitPriceModelTypeUnit PriceModelUnitPriceModelType = "unit"
)

func (PriceModelUnitPriceModelType) IsKnown added in v0.103.0

func (r PriceModelUnitPriceModelType) IsKnown() bool

type PriceModelUnitPricePriceType added in v0.103.0

type PriceModelUnitPricePriceType string
const (
	PriceModelUnitPricePriceTypeUsagePrice PriceModelUnitPricePriceType = "usage_price"
	PriceModelUnitPricePriceTypeFixedPrice PriceModelUnitPricePriceType = "fixed_price"
)

func (PriceModelUnitPricePriceType) IsKnown added in v0.103.0

func (r PriceModelUnitPricePriceType) IsKnown() bool

type PriceModelUnitWithPercentPrice added in v0.103.0

type PriceModelUnitWithPercentPrice struct {
	ID                          string                                `json:"id,required"`
	BillableMetric              BillableMetricTinyModel               `json:"billable_metric,required,nullable"`
	BillingCycleConfiguration   BillingCycleConfigurationModel        `json:"billing_cycle_configuration,required"`
	Cadence                     PriceModelUnitWithPercentPriceCadence `json:"cadence,required"`
	ConversionRate              float64                               `json:"conversion_rate,required,nullable"`
	CreatedAt                   time.Time                             `json:"created_at,required" format:"date-time"`
	CreditAllocation            AllocationModel                       `json:"credit_allocation,required,nullable"`
	Currency                    string                                `json:"currency,required"`
	Discount                    Discount                              `json:"discount,required,nullable"`
	ExternalPriceID             string                                `json:"external_price_id,required,nullable"`
	FixedPriceQuantity          float64                               `json:"fixed_price_quantity,required,nullable"`
	InvoicingCycleConfiguration BillingCycleConfigurationModel        `json:"invoicing_cycle_configuration,required,nullable"`
	Item                        ItemSlimModel                         `json:"item,required"`
	Maximum                     MaximumModel                          `json:"maximum,required,nullable"`
	MaximumAmount               string                                `json:"maximum_amount,required,nullable"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata                      map[string]string                       `json:"metadata,required"`
	Minimum                       MinimumModel                            `json:"minimum,required,nullable"`
	MinimumAmount                 string                                  `json:"minimum_amount,required,nullable"`
	ModelType                     PriceModelUnitWithPercentPriceModelType `json:"model_type,required"`
	Name                          string                                  `json:"name,required"`
	PlanPhaseOrder                int64                                   `json:"plan_phase_order,required,nullable"`
	PriceType                     PriceModelUnitWithPercentPricePriceType `json:"price_type,required"`
	UnitWithPercentConfig         CustomRatingFunctionConfigModel         `json:"unit_with_percent_config,required"`
	DimensionalPriceConfiguration DimensionalPriceConfigurationModel      `json:"dimensional_price_configuration,nullable"`
	JSON                          priceModelUnitWithPercentPriceJSON      `json:"-"`
}

func (*PriceModelUnitWithPercentPrice) UnmarshalJSON added in v0.103.0

func (r *PriceModelUnitWithPercentPrice) UnmarshalJSON(data []byte) (err error)

type PriceModelUnitWithPercentPriceCadence added in v0.103.0

type PriceModelUnitWithPercentPriceCadence string
const (
	PriceModelUnitWithPercentPriceCadenceOneTime    PriceModelUnitWithPercentPriceCadence = "one_time"
	PriceModelUnitWithPercentPriceCadenceMonthly    PriceModelUnitWithPercentPriceCadence = "monthly"
	PriceModelUnitWithPercentPriceCadenceQuarterly  PriceModelUnitWithPercentPriceCadence = "quarterly"
	PriceModelUnitWithPercentPriceCadenceSemiAnnual PriceModelUnitWithPercentPriceCadence = "semi_annual"
	PriceModelUnitWithPercentPriceCadenceAnnual     PriceModelUnitWithPercentPriceCadence = "annual"
	PriceModelUnitWithPercentPriceCadenceCustom     PriceModelUnitWithPercentPriceCadence = "custom"
)

func (PriceModelUnitWithPercentPriceCadence) IsKnown added in v0.103.0

type PriceModelUnitWithPercentPriceModelType added in v0.103.0

type PriceModelUnitWithPercentPriceModelType string
const (
	PriceModelUnitWithPercentPriceModelTypeUnitWithPercent PriceModelUnitWithPercentPriceModelType = "unit_with_percent"
)

func (PriceModelUnitWithPercentPriceModelType) IsKnown added in v0.103.0

type PriceModelUnitWithPercentPricePriceType added in v0.103.0

type PriceModelUnitWithPercentPricePriceType string
const (
	PriceModelUnitWithPercentPricePriceTypeUsagePrice PriceModelUnitWithPercentPricePriceType = "usage_price"
	PriceModelUnitWithPercentPricePriceTypeFixedPrice PriceModelUnitWithPercentPricePriceType = "fixed_price"
)

func (PriceModelUnitWithPercentPricePriceType) IsKnown added in v0.103.0

type PriceModelUnitWithProrationPrice added in v0.103.0

type PriceModelUnitWithProrationPrice struct {
	ID                          string                                  `json:"id,required"`
	BillableMetric              BillableMetricTinyModel                 `json:"billable_metric,required,nullable"`
	BillingCycleConfiguration   BillingCycleConfigurationModel          `json:"billing_cycle_configuration,required"`
	Cadence                     PriceModelUnitWithProrationPriceCadence `json:"cadence,required"`
	ConversionRate              float64                                 `json:"conversion_rate,required,nullable"`
	CreatedAt                   time.Time                               `json:"created_at,required" format:"date-time"`
	CreditAllocation            AllocationModel                         `json:"credit_allocation,required,nullable"`
	Currency                    string                                  `json:"currency,required"`
	Discount                    Discount                                `json:"discount,required,nullable"`
	ExternalPriceID             string                                  `json:"external_price_id,required,nullable"`
	FixedPriceQuantity          float64                                 `json:"fixed_price_quantity,required,nullable"`
	InvoicingCycleConfiguration BillingCycleConfigurationModel          `json:"invoicing_cycle_configuration,required,nullable"`
	Item                        ItemSlimModel                           `json:"item,required"`
	Maximum                     MaximumModel                            `json:"maximum,required,nullable"`
	MaximumAmount               string                                  `json:"maximum_amount,required,nullable"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata                      map[string]string                         `json:"metadata,required"`
	Minimum                       MinimumModel                              `json:"minimum,required,nullable"`
	MinimumAmount                 string                                    `json:"minimum_amount,required,nullable"`
	ModelType                     PriceModelUnitWithProrationPriceModelType `json:"model_type,required"`
	Name                          string                                    `json:"name,required"`
	PlanPhaseOrder                int64                                     `json:"plan_phase_order,required,nullable"`
	PriceType                     PriceModelUnitWithProrationPricePriceType `json:"price_type,required"`
	UnitWithProrationConfig       CustomRatingFunctionConfigModel           `json:"unit_with_proration_config,required"`
	DimensionalPriceConfiguration DimensionalPriceConfigurationModel        `json:"dimensional_price_configuration,nullable"`
	JSON                          priceModelUnitWithProrationPriceJSON      `json:"-"`
}

func (*PriceModelUnitWithProrationPrice) UnmarshalJSON added in v0.103.0

func (r *PriceModelUnitWithProrationPrice) UnmarshalJSON(data []byte) (err error)

type PriceModelUnitWithProrationPriceCadence added in v0.103.0

type PriceModelUnitWithProrationPriceCadence string
const (
	PriceModelUnitWithProrationPriceCadenceOneTime    PriceModelUnitWithProrationPriceCadence = "one_time"
	PriceModelUnitWithProrationPriceCadenceMonthly    PriceModelUnitWithProrationPriceCadence = "monthly"
	PriceModelUnitWithProrationPriceCadenceQuarterly  PriceModelUnitWithProrationPriceCadence = "quarterly"
	PriceModelUnitWithProrationPriceCadenceSemiAnnual PriceModelUnitWithProrationPriceCadence = "semi_annual"
	PriceModelUnitWithProrationPriceCadenceAnnual     PriceModelUnitWithProrationPriceCadence = "annual"
	PriceModelUnitWithProrationPriceCadenceCustom     PriceModelUnitWithProrationPriceCadence = "custom"
)

func (PriceModelUnitWithProrationPriceCadence) IsKnown added in v0.103.0

type PriceModelUnitWithProrationPriceModelType added in v0.103.0

type PriceModelUnitWithProrationPriceModelType string
const (
	PriceModelUnitWithProrationPriceModelTypeUnitWithProration PriceModelUnitWithProrationPriceModelType = "unit_with_proration"
)

func (PriceModelUnitWithProrationPriceModelType) IsKnown added in v0.103.0

type PriceModelUnitWithProrationPricePriceType added in v0.103.0

type PriceModelUnitWithProrationPricePriceType string
const (
	PriceModelUnitWithProrationPricePriceTypeUsagePrice PriceModelUnitWithProrationPricePriceType = "usage_price"
	PriceModelUnitWithProrationPricePriceTypeFixedPrice PriceModelUnitWithProrationPricePriceType = "fixed_price"
)

func (PriceModelUnitWithProrationPricePriceType) IsKnown added in v0.103.0

type RemoveSubscriptionAdjustmentParams added in v0.103.0

type RemoveSubscriptionAdjustmentParams struct {
	// The id of the adjustment to remove on the subscription.
	AdjustmentID param.Field[string] `json:"adjustment_id,required"`
}

func (RemoveSubscriptionAdjustmentParams) MarshalJSON added in v0.103.0

func (r RemoveSubscriptionAdjustmentParams) MarshalJSON() (data []byte, err error)

type RemoveSubscriptionPriceParams added in v0.103.0

type RemoveSubscriptionPriceParams struct {
	// The external price id of the price to remove on the subscription.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// The id of the price to remove on the subscription.
	PriceID param.Field[string] `json:"price_id"`
}

func (RemoveSubscriptionPriceParams) MarshalJSON added in v0.103.0

func (r RemoveSubscriptionPriceParams) MarshalJSON() (data []byte, err error)

type ReplaceSubscriptionAdjustmentParams added in v0.103.0

type ReplaceSubscriptionAdjustmentParams struct {
	// The definition of a new adjustment to create and add to the subscription.
	Adjustment param.Field[NewAdjustmentModelUnionParam] `json:"adjustment,required"`
	// The id of the adjustment on the plan to replace in the subscription.
	ReplacesAdjustmentID param.Field[string] `json:"replaces_adjustment_id,required"`
}

func (ReplaceSubscriptionAdjustmentParams) MarshalJSON added in v0.103.0

func (r ReplaceSubscriptionAdjustmentParams) MarshalJSON() (data []byte, err error)

type ReplaceSubscriptionPriceParams added in v0.103.0

type ReplaceSubscriptionPriceParams struct {
	// The id of the price on the plan to replace in the subscription.
	ReplacesPriceID param.Field[string] `json:"replaces_price_id,required"`
	// The definition of a new allocation price to create and add to the subscription.
	AllocationPrice param.Field[NewAllocationPriceModelParam] `json:"allocation_price"`
	// [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the
	// replacement price.
	//
	// Deprecated: deprecated
	Discounts param.Field[[]DiscountOverrideModelParam] `json:"discounts"`
	// The external price id of the price to add to the subscription.
	ExternalPriceID param.Field[string] `json:"external_price_id"`
	// The new quantity of the price, if the price is a fixed price.
	FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"`
	// [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for
	// the replacement price.
	//
	// Deprecated: deprecated
	MaximumAmount param.Field[string] `json:"maximum_amount"`
	// [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for
	// the replacement price.
	//
	// Deprecated: deprecated
	MinimumAmount param.Field[string] `json:"minimum_amount"`
	// The definition of a new price to create and add to the subscription.
	Price param.Field[NewSubscriptionPriceModelUnionParam] `json:"price"`
	// The id of the price to add to the subscription.
	PriceID param.Field[string] `json:"price_id"`
}

func (ReplaceSubscriptionPriceParams) MarshalJSON added in v0.103.0

func (r ReplaceSubscriptionPriceParams) MarshalJSON() (data []byte, err error)

type SubLineItemGroupingModel added in v0.103.0

type SubLineItemGroupingModel struct {
	Key string `json:"key,required"`
	// No value indicates the default group
	Value string                       `json:"value,required,nullable"`
	JSON  subLineItemGroupingModelJSON `json:"-"`
}

func (*SubLineItemGroupingModel) UnmarshalJSON added in v0.103.0

func (r *SubLineItemGroupingModel) UnmarshalJSON(data []byte) (err error)

type SubscriptionMinifiedModel added in v0.103.0

type SubscriptionMinifiedModel struct {
	ID   string                        `json:"id,required"`
	JSON subscriptionMinifiedModelJSON `json:"-"`
}

func (*SubscriptionMinifiedModel) UnmarshalJSON added in v0.103.0

func (r *SubscriptionMinifiedModel) UnmarshalJSON(data []byte) (err error)

type SubscriptionModel added in v0.103.0

type SubscriptionModel struct {
	ID string `json:"id,required"`
	// The current plan phase that is active, only if the subscription's plan has
	// phases.
	ActivePlanPhaseOrder int64 `json:"active_plan_phase_order,required,nullable"`
	// The adjustment intervals for this subscription.
	AdjustmentIntervals []AdjustmentIntervalModel `json:"adjustment_intervals,required"`
	// Determines whether issued invoices for this subscription will automatically be
	// charged with the saved payment method on the due date. This property defaults to
	// the plan's behavior. If null, defaults to the customer's setting.
	AutoCollection                  bool                                 `json:"auto_collection,required,nullable"`
	BillingCycleAnchorConfiguration BillingCycleAnchorConfigurationModel `json:"billing_cycle_anchor_configuration,required"`
	// The day of the month on which the billing cycle is anchored. If the maximum
	// number of days in a month is greater than this value, the last day of the month
	// is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
	// period begins on the 30th.
	BillingCycleDay int64     `json:"billing_cycle_day,required"`
	CreatedAt       time.Time `json:"created_at,required" format:"date-time"`
	// The end of the current billing period. This is an exclusive timestamp, such that
	// the instant returned is not part of the billing period. Set to null for
	// subscriptions that are not currently active.
	CurrentBillingPeriodEndDate time.Time `json:"current_billing_period_end_date,required,nullable" format:"date-time"`
	// The start date of the current billing period. This is an inclusive timestamp;
	// the instant returned is exactly the beginning of the billing period. Set to null
	// if the subscription is not currently active.
	CurrentBillingPeriodStartDate time.Time `json:"current_billing_period_start_date,required,nullable" format:"date-time"`
	// A customer is a buyer of your products, and the other party to the billing
	// relationship.
	//
	// In Orb, customers are assigned system generated identifiers automatically, but
	// it's often desirable to have these match existing identifiers in your system. To
	// avoid having to denormalize Orb ID information, you can pass in an
	// `external_customer_id` with your own identifier. See
	// [Customer ID Aliases](/events-and-metrics/customer-aliases) for further
	// information about how these aliases work in Orb.
	//
	// In addition to having an identifier in your system, a customer may exist in a
	// payment provider solution like Stripe. Use the `payment_provider_id` and the
	// `payment_provider` enum field to express this mapping.
	//
	// A customer also has a timezone (from the standard
	// [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
	// your account's timezone. See [Timezone localization](/essentials/timezones) for
	// information on what this timezone parameter influences within Orb.
	Customer CustomerModel `json:"customer,required"`
	// Determines the default memo on this subscriptions' invoices. Note that if this
	// is not provided, it is determined by the plan configuration.
	DefaultInvoiceMemo string `json:"default_invoice_memo,required,nullable"`
	// The discount intervals for this subscription.
	DiscountIntervals []SubscriptionModelDiscountInterval `json:"discount_intervals,required"`
	// The date Orb stops billing for this subscription.
	EndDate                  time.Time                            `json:"end_date,required,nullable" format:"date-time"`
	FixedFeeQuantitySchedule []FixedFeeQuantityScheduleEntryModel `json:"fixed_fee_quantity_schedule,required"`
	InvoicingThreshold       string                               `json:"invoicing_threshold,required,nullable"`
	// The maximum intervals for this subscription.
	MaximumIntervals []MaximumIntervalModel `json:"maximum_intervals,required"`
	// User specified key-value pairs for the resource. If not present, this defaults
	// to an empty dictionary. Individual keys can be removed by setting the value to
	// `null`, and the entire metadata mapping can be cleared by setting `metadata` to
	// `null`.
	Metadata map[string]string `json:"metadata,required"`
	// The minimum intervals for this subscription.
	MinimumIntervals []MinimumIntervalModel `json:"minimum_intervals,required"`
	// Determines the difference between the invoice issue date for subscription
	// invoices as the date that they are due. A value of `0` here represents that the
	// invoice is due on issue, whereas a value of `30` represents that the customer
	// has a month to pay the invoice.
	NetTerms int64 `json:"net_terms,required"`
	// The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
	// subscribed to by a customer. Plans define the billing behavior of the
	// subscription. You can see more about how to configure prices in the
	// [Price resource](/reference/price).
	Plan PlanModel `json:"plan,required"`
	// The price intervals for this subscription.
	PriceIntervals []PriceIntervalModel  `json:"price_intervals,required"`
	RedeemedCoupon CouponRedemptionModel `json:"redeemed_coupon,required,nullable"`
	// The date Orb starts billing for this subscription.
	StartDate time.Time                  `json:"start_date,required" format:"date-time"`
	Status    SubscriptionModelStatus    `json:"status,required"`
	TrialInfo SubscriptionTrialInfoModel `json:"trial_info,required"`
	JSON      subscriptionModelJSON      `json:"-"`
}

A [subscription](/core-concepts#subscription) represents the purchase of a plan by a customer.

By default, subscriptions begin on the day that they're created and renew automatically for each billing cycle at the cadence that's configured in the plan definition.

Subscriptions also default to **beginning of month alignment**, which means the first invoice issued for the subscription will have pro-rated charges between the `start_date` and the first of the following month. Subsequent billing periods will always start and end on a month boundary (e.g. subsequent month starts for monthly billing).

Depending on the plan configuration, any _flat_ recurring fees will be billed either at the beginning (in-advance) or end (in-arrears) of each billing cycle. Plans default to **in-advance billing**. Usage-based fees are billed in arrears as usage is accumulated. In the normal course of events, you can expect an invoice to contain usage-based charges for the previous period, and a recurring fee for the following period.

func (*SubscriptionModel) UnmarshalJSON added in v0.103.0

func (r *SubscriptionModel) UnmarshalJSON(data []byte) (err error)

type SubscriptionModelDiscountInterval added in v0.103.0

type SubscriptionModelDiscountInterval struct {
	// This field can have the runtime type of [[]string].
	AppliesToPriceIDs interface{} `json:"applies_to_price_ids,required"`
	// This field can have the runtime type of [[]string].
	AppliesToPriceIntervalIDs interface{}                                    `json:"applies_to_price_interval_ids,required"`
	DiscountType              SubscriptionModelDiscountIntervalsDiscountType `json:"discount_type,required"`
	// The end date of the discount interval.
	EndDate time.Time `json:"end_date,required,nullable" format:"date-time"`
	// The start date of the discount interval.
	StartDate time.Time `json:"start_date,required" format:"date-time"`
	// Only available if discount_type is `amount`.
	AmountDiscount string `json:"amount_discount"`
	// Only available if discount_type is `percentage`.This is a number between 0
	// and 1.
	PercentageDiscount float64 `json:"percentage_discount"`
	// Only available if discount_type is `usage`. Number of usage units that this
	// discount is for
	UsageDiscount float64                               `json:"usage_discount"`
	JSON          subscriptionModelDiscountIntervalJSON `json:"-"`
	// contains filtered or unexported fields
}

func (SubscriptionModelDiscountInterval) AsUnion added in v0.103.0

AsUnion returns a SubscriptionModelDiscountIntervalsUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are shared.AmountDiscountIntervalModel, shared.PercentageDiscountIntervalModel, shared.UsageDiscountIntervalModel.

func (*SubscriptionModelDiscountInterval) UnmarshalJSON added in v0.103.0

func (r *SubscriptionModelDiscountInterval) UnmarshalJSON(data []byte) (err error)

type SubscriptionModelDiscountIntervalsDiscountType added in v0.103.0

type SubscriptionModelDiscountIntervalsDiscountType string
const (
	SubscriptionModelDiscountIntervalsDiscountTypeAmount     SubscriptionModelDiscountIntervalsDiscountType = "amount"
	SubscriptionModelDiscountIntervalsDiscountTypePercentage SubscriptionModelDiscountIntervalsDiscountType = "percentage"
	SubscriptionModelDiscountIntervalsDiscountTypeUsage      SubscriptionModelDiscountIntervalsDiscountType = "usage"
)

func (SubscriptionModelDiscountIntervalsDiscountType) IsKnown added in v0.103.0

type SubscriptionModelDiscountIntervalsUnion added in v0.103.0

type SubscriptionModelDiscountIntervalsUnion interface {
	ImplementsSubscriptionModelDiscountInterval()
}

Union satisfied by shared.AmountDiscountIntervalModel, shared.PercentageDiscountIntervalModel or shared.UsageDiscountIntervalModel.

type SubscriptionModelStatus added in v0.103.0

type SubscriptionModelStatus string
const (
	SubscriptionModelStatusActive   SubscriptionModelStatus = "active"
	SubscriptionModelStatusEnded    SubscriptionModelStatus = "ended"
	SubscriptionModelStatusUpcoming SubscriptionModelStatus = "upcoming"
)

func (SubscriptionModelStatus) IsKnown added in v0.103.0

func (r SubscriptionModelStatus) IsKnown() bool

type SubscriptionTrialInfoModel added in v0.103.0

type SubscriptionTrialInfoModel struct {
	EndDate time.Time                      `json:"end_date,required,nullable" format:"date-time"`
	JSON    subscriptionTrialInfoModelJSON `json:"-"`
}

func (*SubscriptionTrialInfoModel) UnmarshalJSON added in v0.103.0

func (r *SubscriptionTrialInfoModel) UnmarshalJSON(data []byte) (err error)

type SubscriptionsModel added in v0.103.0

type SubscriptionsModel struct {
	Data               []SubscriptionModel    `json:"data,required"`
	PaginationMetadata PaginationMetadata     `json:"pagination_metadata,required"`
	JSON               subscriptionsModelJSON `json:"-"`
}

func (*SubscriptionsModel) UnmarshalJSON added in v0.103.0

func (r *SubscriptionsModel) UnmarshalJSON(data []byte) (err error)

type TaxAmountModel added in v0.103.0

type TaxAmountModel struct {
	// The amount of additional tax incurred by this tax rate.
	Amount string `json:"amount,required"`
	// The human-readable description of the applied tax rate.
	TaxRateDescription string `json:"tax_rate_description,required"`
	// The tax rate percentage, out of 100.
	TaxRatePercentage string             `json:"tax_rate_percentage,required,nullable"`
	JSON              taxAmountModelJSON `json:"-"`
}

func (*TaxAmountModel) UnmarshalJSON added in v0.103.0

func (r *TaxAmountModel) UnmarshalJSON(data []byte) (err error)

type ThresholdModel added in v0.103.0

type ThresholdModel struct {
	// The value at which an alert will fire. For credit balance alerts, the alert will
	// fire at or below this value. For usage and cost alerts, the alert will fire at
	// or above this value.
	Value float64            `json:"value,required"`
	JSON  thresholdModelJSON `json:"-"`
}

Thresholds are used to define the conditions under which an alert will be triggered.

func (*ThresholdModel) UnmarshalJSON added in v0.103.0

func (r *ThresholdModel) UnmarshalJSON(data []byte) (err error)

type ThresholdModelParam added in v0.103.0

type ThresholdModelParam struct {
	// The value at which an alert will fire. For credit balance alerts, the alert will
	// fire at or below this value. For usage and cost alerts, the alert will fire at
	// or above this value.
	Value param.Field[float64] `json:"value,required"`
}

Thresholds are used to define the conditions under which an alert will be triggered.

func (ThresholdModelParam) MarshalJSON added in v0.103.0

func (r ThresholdModelParam) MarshalJSON() (data []byte, err error)

type TieredBpsConfigModel added in v0.103.0

type TieredBpsConfigModel struct {
	// Tiers for a Graduated BPS pricing model, where usage is bucketed into specified
	// tiers
	Tiers []TieredBpsConfigModelTier `json:"tiers,required"`
	JSON  tieredBpsConfigModelJSON   `json:"-"`
}

func (*TieredBpsConfigModel) UnmarshalJSON added in v0.103.0

func (r *TieredBpsConfigModel) UnmarshalJSON(data []byte) (err error)

type TieredBpsConfigModelParam added in v0.103.0

type TieredBpsConfigModelParam struct {
	// Tiers for a Graduated BPS pricing model, where usage is bucketed into specified
	// tiers
	Tiers param.Field[[]TieredBpsConfigModelTierParam] `json:"tiers,required"`
}

func (TieredBpsConfigModelParam) MarshalJSON added in v0.103.0

func (r TieredBpsConfigModelParam) MarshalJSON() (data []byte, err error)

type TieredBpsConfigModelTier added in v0.103.0

type TieredBpsConfigModelTier struct {
	// Per-event basis point rate
	Bps float64 `json:"bps,required"`
	// Inclusive tier starting value
	MinimumAmount string `json:"minimum_amount,required"`
	// Exclusive tier ending value
	MaximumAmount string `json:"maximum_amount,nullable"`
	// Per unit maximum to charge
	PerUnitMaximum string                       `json:"per_unit_maximum,nullable"`
	JSON           tieredBpsConfigModelTierJSON `json:"-"`
}

func (*TieredBpsConfigModelTier) UnmarshalJSON added in v0.103.0

func (r *TieredBpsConfigModelTier) UnmarshalJSON(data []byte) (err error)

type TieredBpsConfigModelTierParam added in v0.103.0

type TieredBpsConfigModelTierParam struct {
	// Per-event basis point rate
	Bps param.Field[float64] `json:"bps,required"`
	// Inclusive tier starting value
	MinimumAmount param.Field[string] `json:"minimum_amount,required"`
	// Exclusive tier ending value
	MaximumAmount param.Field[string] `json:"maximum_amount"`
	// Per unit maximum to charge
	PerUnitMaximum param.Field[string] `json:"per_unit_maximum"`
}

func (TieredBpsConfigModelTierParam) MarshalJSON added in v0.103.0

func (r TieredBpsConfigModelTierParam) MarshalJSON() (data []byte, err error)

type TieredConfigModel added in v0.103.0

type TieredConfigModel struct {
	// Tiers for rating based on total usage quantities into the specified tier
	Tiers []TieredConfigModelTier `json:"tiers,required"`
	JSON  tieredConfigModelJSON   `json:"-"`
}

func (*TieredConfigModel) UnmarshalJSON added in v0.103.0

func (r *TieredConfigModel) UnmarshalJSON(data []byte) (err error)

type TieredConfigModelParam added in v0.103.0

type TieredConfigModelParam struct {
	// Tiers for rating based on total usage quantities into the specified tier
	Tiers param.Field[[]TieredConfigModelTierParam] `json:"tiers,required"`
}

func (TieredConfigModelParam) MarshalJSON added in v0.103.0

func (r TieredConfigModelParam) MarshalJSON() (data []byte, err error)

type TieredConfigModelTier added in v0.103.0

type TieredConfigModelTier struct {
	// Inclusive tier starting value
	FirstUnit float64 `json:"first_unit,required"`
	// Amount per unit
	UnitAmount string `json:"unit_amount,required"`
	// Exclusive tier ending value. If null, this is treated as the last tier
	LastUnit float64                   `json:"last_unit,nullable"`
	JSON     tieredConfigModelTierJSON `json:"-"`
}

func (*TieredConfigModelTier) UnmarshalJSON added in v0.103.0

func (r *TieredConfigModelTier) UnmarshalJSON(data []byte) (err error)

type TieredConfigModelTierParam added in v0.103.0

type TieredConfigModelTierParam struct {
	// Inclusive tier starting value
	FirstUnit param.Field[float64] `json:"first_unit,required"`
	// Amount per unit
	UnitAmount param.Field[string] `json:"unit_amount,required"`
	// Exclusive tier ending value. If null, this is treated as the last tier
	LastUnit param.Field[float64] `json:"last_unit"`
}

func (TieredConfigModelTierParam) MarshalJSON added in v0.103.0

func (r TieredConfigModelTierParam) MarshalJSON() (data []byte, err error)

type TopUpModel added in v0.103.0

type TopUpModel struct {
	ID string `json:"id,required"`
	// The amount to increment when the threshold is reached.
	Amount string `json:"amount,required"`
	// The currency or custom pricing unit to use for this top-up. If this is a
	// real-world currency, it must match the customer's invoicing currency.
	Currency string `json:"currency,required"`
	// Settings for invoices generated by triggered top-ups.
	InvoiceSettings TopUpModelInvoiceSettings `json:"invoice_settings,required"`
	// How much, in the customer's currency, to charge for each unit.
	PerUnitCostBasis string `json:"per_unit_cost_basis,required"`
	// The threshold at which to trigger the top-up. If the balance is at or below this
	// threshold, the top-up will be triggered.
	Threshold string `json:"threshold,required"`
	// The number of days or months after which the top-up expires. If unspecified, it
	// does not expire.
	ExpiresAfter int64 `json:"expires_after,nullable"`
	// The unit of expires_after.
	ExpiresAfterUnit TopUpModelExpiresAfterUnit `json:"expires_after_unit,nullable"`
	JSON             topUpModelJSON             `json:"-"`
}

func (*TopUpModel) UnmarshalJSON added in v0.103.0

func (r *TopUpModel) UnmarshalJSON(data []byte) (err error)

type TopUpModelExpiresAfterUnit added in v0.103.0

type TopUpModelExpiresAfterUnit string

The unit of expires_after.

const (
	TopUpModelExpiresAfterUnitDay   TopUpModelExpiresAfterUnit = "day"
	TopUpModelExpiresAfterUnitMonth TopUpModelExpiresAfterUnit = "month"
)

func (TopUpModelExpiresAfterUnit) IsKnown added in v0.103.0

func (r TopUpModelExpiresAfterUnit) IsKnown() bool

type TopUpModelInvoiceSettings added in v0.103.0

type TopUpModelInvoiceSettings struct {
	// Whether the credits purchase invoice should auto collect with the customer's
	// saved payment method.
	AutoCollection bool `json:"auto_collection,required"`
	// The net terms determines the difference between the invoice date and the issue
	// date for the invoice. If you intend the invoice to be due on issue, set this
	// to 0.
	NetTerms int64 `json:"net_terms,required"`
	// An optional memo to display on the invoice.
	Memo string `json:"memo,nullable"`
	// If true, new credit blocks created by this top-up will require that the
	// corresponding invoice is paid before they can be drawn down from.
	RequireSuccessfulPayment bool                          `json:"require_successful_payment"`
	JSON                     topUpModelInvoiceSettingsJSON `json:"-"`
}

Settings for invoices generated by triggered top-ups.

func (*TopUpModelInvoiceSettings) UnmarshalJSON added in v0.103.0

func (r *TopUpModelInvoiceSettings) UnmarshalJSON(data []byte) (err error)

type TopUpsModel added in v0.103.0

type TopUpsModel struct {
	Data               []TopUpModel       `json:"data,required"`
	PaginationMetadata PaginationMetadata `json:"pagination_metadata,required"`
	JSON               topUpsModelJSON    `json:"-"`
}

func (*TopUpsModel) UnmarshalJSON added in v0.103.0

func (r *TopUpsModel) UnmarshalJSON(data []byte) (err error)

type TrialDiscount added in v0.67.0

type TrialDiscount struct {
	// List of price_ids that this discount applies to. For plan/plan phase discounts,
	// this can be a subset of prices.
	AppliesToPriceIDs []string                  `json:"applies_to_price_ids,required"`
	DiscountType      TrialDiscountDiscountType `json:"discount_type,required"`
	Reason            string                    `json:"reason,nullable"`
	// Only available if discount_type is `trial`
	TrialAmountDiscount string `json:"trial_amount_discount,nullable"`
	// Only available if discount_type is `trial`
	TrialPercentageDiscount float64           `json:"trial_percentage_discount,nullable"`
	JSON                    trialDiscountJSON `json:"-"`
}

func (TrialDiscount) ImplementsDiscount added in v0.89.1

func (r TrialDiscount) ImplementsDiscount()

func (TrialDiscount) ImplementsInvoiceLevelDiscount added in v0.89.1

func (r TrialDiscount) ImplementsInvoiceLevelDiscount()

func (*TrialDiscount) UnmarshalJSON added in v0.67.0

func (r *TrialDiscount) UnmarshalJSON(data []byte) (err error)

type TrialDiscountDiscountType added in v0.67.0

type TrialDiscountDiscountType string
const (
	TrialDiscountDiscountTypeTrial TrialDiscountDiscountType = "trial"
)

func (TrialDiscountDiscountType) IsKnown added in v0.67.0

func (r TrialDiscountDiscountType) IsKnown() bool

type TrialDiscountParam added in v0.67.0

type TrialDiscountParam struct {
	// List of price_ids that this discount applies to. For plan/plan phase discounts,
	// this can be a subset of prices.
	AppliesToPriceIDs param.Field[[]string]                  `json:"applies_to_price_ids,required"`
	DiscountType      param.Field[TrialDiscountDiscountType] `json:"discount_type,required"`
	Reason            param.Field[string]                    `json:"reason"`
	// Only available if discount_type is `trial`
	TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"`
	// Only available if discount_type is `trial`
	TrialPercentageDiscount param.Field[float64] `json:"trial_percentage_discount"`
}

func (TrialDiscountParam) ImplementsDiscountUnionParam added in v0.89.1

func (r TrialDiscountParam) ImplementsDiscountUnionParam()

func (TrialDiscountParam) MarshalJSON added in v0.67.0

func (r TrialDiscountParam) MarshalJSON() (data []byte, err error)

type UnionBool

type UnionBool bool

func (UnionBool) ImplementsEvaluatePriceGroupGroupingValuesUnion

func (UnionBool) ImplementsEvaluatePriceGroupGroupingValuesUnion()

type UnionFloat

type UnionFloat float64

func (UnionFloat) ImplementsEvaluatePriceGroupGroupingValuesUnion

func (UnionFloat) ImplementsEvaluatePriceGroupGroupingValuesUnion()

type UnionString

type UnionString string

func (UnionString) ImplementsEvaluatePriceGroupGroupingValuesUnion

func (UnionString) ImplementsEvaluatePriceGroupGroupingValuesUnion()

type UnionTime

type UnionTime time.Time

func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsAddAdjustmentsEndDateUnion added in v0.35.0

func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsAddAdjustmentsEndDateUnion()

func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsAddAdjustmentsStartDateUnion added in v0.35.0

func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsAddAdjustmentsStartDateUnion()

func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsAddEndDateUnion

func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsAddEndDateUnion()

func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsAddStartDateUnion

func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsAddStartDateUnion()

func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsEditAdjustmentsEndDateUnion added in v0.35.0

func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsEditAdjustmentsEndDateUnion()

func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsEditAdjustmentsStartDateUnion added in v0.35.0

func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsEditAdjustmentsStartDateUnion()

func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsEditEndDateUnion

func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsEditEndDateUnion()

func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsEditStartDateUnion

func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsEditStartDateUnion()

func (UnionTime) ImplementsSubscriptionUpdateTrialParamsTrialEndDateUnion added in v0.74.0

func (UnionTime) ImplementsSubscriptionUpdateTrialParamsTrialEndDateUnion()

type UnitConfigModel added in v0.103.0

type UnitConfigModel struct {
	// Rate per unit of usage
	UnitAmount string              `json:"unit_amount,required"`
	JSON       unitConfigModelJSON `json:"-"`
}

func (*UnitConfigModel) UnmarshalJSON added in v0.103.0

func (r *UnitConfigModel) UnmarshalJSON(data []byte) (err error)

type UnitConfigModelParam added in v0.103.0

type UnitConfigModelParam struct {
	// Rate per unit of usage
	UnitAmount param.Field[string] `json:"unit_amount,required"`
}

func (UnitConfigModelParam) MarshalJSON added in v0.103.0

func (r UnitConfigModelParam) MarshalJSON() (data []byte, err error)

type UsageDiscountIntervalModel added in v0.103.0

type UsageDiscountIntervalModel struct {
	// The price ids that this discount interval applies to.
	AppliesToPriceIDs []string `json:"applies_to_price_ids,required"`
	// The price interval ids that this discount interval applies to.
	AppliesToPriceIntervalIDs []string                               `json:"applies_to_price_interval_ids,required"`
	DiscountType              UsageDiscountIntervalModelDiscountType `json:"discount_type,required"`
	// The end date of the discount interval.
	EndDate time.Time `json:"end_date,required,nullable" format:"date-time"`
	// The start date of the discount interval.
	StartDate time.Time `json:"start_date,required" format:"date-time"`
	// Only available if discount_type is `usage`. Number of usage units that this
	// discount is for
	UsageDiscount float64                        `json:"usage_discount,required"`
	JSON          usageDiscountIntervalModelJSON `json:"-"`
}

func (UsageDiscountIntervalModel) ImplementsMutatedSubscriptionModelDiscountInterval added in v0.103.0

func (r UsageDiscountIntervalModel) ImplementsMutatedSubscriptionModelDiscountInterval()

func (UsageDiscountIntervalModel) ImplementsSubscriptionModelDiscountInterval added in v0.103.0

func (r UsageDiscountIntervalModel) ImplementsSubscriptionModelDiscountInterval()

func (*UsageDiscountIntervalModel) UnmarshalJSON added in v0.103.0

func (r *UsageDiscountIntervalModel) UnmarshalJSON(data []byte) (err error)

type UsageDiscountIntervalModelDiscountType added in v0.103.0

type UsageDiscountIntervalModelDiscountType string
const (
	UsageDiscountIntervalModelDiscountTypeUsage UsageDiscountIntervalModelDiscountType = "usage"
)

func (UsageDiscountIntervalModelDiscountType) IsKnown added in v0.103.0

type UsageModel added in v0.103.0

type UsageModel struct {
	Quantity       float64        `json:"quantity,required"`
	TimeframeEnd   time.Time      `json:"timeframe_end,required" format:"date-time"`
	TimeframeStart time.Time      `json:"timeframe_start,required" format:"date-time"`
	JSON           usageModelJSON `json:"-"`
}

func (*UsageModel) UnmarshalJSON added in v0.103.0

func (r *UsageModel) UnmarshalJSON(data []byte) (err error)

Jump to

Keyboard shortcuts

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