Documentation ¶
Index ¶
- Constants
- func Bool(value bool) param.Field[bool]
- func F[T any](value T) param.Field[T]
- func FileParam(reader io.Reader, filename string, contentType string) param.Field[io.Reader]
- func Float(value float64) param.Field[float64]
- func Int(value int64) param.Field[int64]
- func Null[T any]() param.Field[T]
- func Raw[T any](value any) param.Field[T]
- func String(value string) param.Field[string]
- type Alert
- type AlertListParams
- type AlertNewForCustomerParams
- type AlertNewForCustomerParamsThreshold
- type AlertNewForCustomerParamsType
- type AlertNewForExternalCustomerParams
- type AlertNewForExternalCustomerParamsThreshold
- type AlertNewForExternalCustomerParamsType
- type AlertNewForSubscriptionParams
- type AlertNewForSubscriptionParamsThreshold
- type AlertNewForSubscriptionParamsType
- type AlertService
- func (r *AlertService) Disable(ctx context.Context, alertConfigurationID string, opts ...option.RequestOption) (res *Alert, err error)
- func (r *AlertService) Enable(ctx context.Context, alertConfigurationID string, opts ...option.RequestOption) (res *Alert, err error)
- func (r *AlertService) Get(ctx context.Context, alertID string, opts ...option.RequestOption) (res *Alert, err error)
- func (r *AlertService) List(ctx context.Context, query AlertListParams, opts ...option.RequestOption) (res *pagination.Page[Alert], err error)
- func (r *AlertService) ListAutoPaging(ctx context.Context, query AlertListParams, opts ...option.RequestOption) *pagination.PageAutoPager[Alert]
- func (r *AlertService) NewForCustomer(ctx context.Context, customerID string, body AlertNewForCustomerParams, ...) (res *Alert, err error)
- func (r *AlertService) NewForExternalCustomer(ctx context.Context, externalCustomerID string, ...) (res *Alert, err error)
- func (r *AlertService) NewForSubscription(ctx context.Context, subscriptionID string, body AlertNewForSubscriptionParams, ...) (res *Alert, err error)
- func (r *AlertService) Update(ctx context.Context, alertConfigurationID string, body AlertUpdateParams, ...) (res *Alert, err error)
- type AlertThreshold
- type AlertType
- type AlertUpdateParams
- type AlertUpdateParamsThreshold
- type BillableMetric
- type BillableMetricStatus
- type BillingCycleRelativeDate
- type Client
- func (r *Client) Delete(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Execute(ctx context.Context, method string, path string, params interface{}, ...) error
- func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Post(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Put(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- type Coupon
- type CouponDiscount
- type CouponDiscountAmountDiscount
- type CouponDiscountAmountDiscountDiscountType
- type CouponDiscountDiscountType
- type CouponDiscountPercentageDiscount
- type CouponDiscountPercentageDiscountDiscountType
- type CouponDiscountUnion
- type CouponListParams
- type CouponNewParams
- type CouponNewParamsDiscount
- type CouponNewParamsDiscountDiscountType
- type CouponNewParamsDiscountNewCouponAmountDiscount
- type CouponNewParamsDiscountNewCouponAmountDiscountDiscountType
- type CouponNewParamsDiscountNewCouponPercentageDiscount
- type CouponNewParamsDiscountNewCouponPercentageDiscountDiscountType
- type CouponNewParamsDiscountUnion
- type CouponService
- func (r *CouponService) Archive(ctx context.Context, couponID string, opts ...option.RequestOption) (res *Coupon, err error)
- func (r *CouponService) Fetch(ctx context.Context, couponID string, opts ...option.RequestOption) (res *Coupon, err error)
- func (r *CouponService) List(ctx context.Context, query CouponListParams, opts ...option.RequestOption) (res *pagination.Page[Coupon], err error)
- func (r *CouponService) ListAutoPaging(ctx context.Context, query CouponListParams, opts ...option.RequestOption) *pagination.PageAutoPager[Coupon]
- func (r *CouponService) New(ctx context.Context, body CouponNewParams, opts ...option.RequestOption) (res *Coupon, err error)
- type CouponSubscriptionListParams
- type CouponSubscriptionService
- func (r *CouponSubscriptionService) List(ctx context.Context, couponID string, query CouponSubscriptionListParams, ...) (res *pagination.Page[Subscription], err error)
- func (r *CouponSubscriptionService) ListAutoPaging(ctx context.Context, couponID string, query CouponSubscriptionListParams, ...) *pagination.PageAutoPager[Subscription]
- type CreditNote
- type CreditNoteCustomer
- type CreditNoteDiscount
- type CreditNoteDiscountsAppliesToPrice
- type CreditNoteDiscountsDiscountType
- type CreditNoteLineItem
- type CreditNoteLineItemsDiscount
- type CreditNoteLineItemsDiscountsDiscountType
- type CreditNoteLineItemsTaxAmount
- type CreditNoteListParams
- type CreditNoteMaximumAmountAdjustment
- type CreditNoteMaximumAmountAdjustmentAppliesToPrice
- type CreditNoteMaximumAmountAdjustmentDiscountType
- type CreditNoteReason
- type CreditNoteService
- func (r *CreditNoteService) Fetch(ctx context.Context, creditNoteID string, opts ...option.RequestOption) (res *CreditNote, err error)
- func (r *CreditNoteService) List(ctx context.Context, query CreditNoteListParams, opts ...option.RequestOption) (res *pagination.Page[CreditNote], err error)
- func (r *CreditNoteService) ListAutoPaging(ctx context.Context, query CreditNoteListParams, opts ...option.RequestOption) *pagination.PageAutoPager[CreditNote]
- type CreditNoteType
- type Customer
- type CustomerAccountingSyncConfiguration
- type CustomerAccountingSyncConfigurationAccountingProvider
- type CustomerAccountingSyncConfigurationAccountingProvidersProviderType
- type CustomerBalanceTransactionListParams
- type CustomerBalanceTransactionListResponse
- type CustomerBalanceTransactionListResponseAction
- type CustomerBalanceTransactionListResponseCreditNote
- type CustomerBalanceTransactionListResponseInvoice
- type CustomerBalanceTransactionListResponseType
- type CustomerBalanceTransactionNewParams
- type CustomerBalanceTransactionNewParamsType
- type CustomerBalanceTransactionNewResponse
- type CustomerBalanceTransactionNewResponseAction
- type CustomerBalanceTransactionNewResponseCreditNote
- type CustomerBalanceTransactionNewResponseInvoice
- type CustomerBalanceTransactionNewResponseType
- type CustomerBalanceTransactionService
- func (r *CustomerBalanceTransactionService) List(ctx context.Context, customerID string, ...) (res *pagination.Page[CustomerBalanceTransactionListResponse], err error)
- func (r *CustomerBalanceTransactionService) ListAutoPaging(ctx context.Context, customerID string, ...) *pagination.PageAutoPager[CustomerBalanceTransactionListResponse]
- func (r *CustomerBalanceTransactionService) New(ctx context.Context, customerID string, ...) (res *CustomerBalanceTransactionNewResponse, err error)
- type CustomerBillingAddress
- type CustomerCostListByExternalIDParams
- type CustomerCostListByExternalIDParamsViewMode
- type CustomerCostListByExternalIDResponse
- type CustomerCostListByExternalIDResponseData
- type CustomerCostListByExternalIDResponseDataPerPriceCost
- type CustomerCostListParams
- type CustomerCostListParamsViewMode
- type CustomerCostListResponse
- type CustomerCostListResponseData
- type CustomerCostListResponseDataPerPriceCost
- type CustomerCostService
- func (r *CustomerCostService) List(ctx context.Context, customerID string, query CustomerCostListParams, ...) (res *CustomerCostListResponse, err error)
- func (r *CustomerCostService) ListByExternalID(ctx context.Context, externalCustomerID string, ...) (res *CustomerCostListByExternalIDResponse, err error)
- type CustomerCreditLedgerListByExternalIDParams
- type CustomerCreditLedgerListByExternalIDParamsEntryStatus
- type CustomerCreditLedgerListByExternalIDParamsEntryType
- type CustomerCreditLedgerListByExternalIDResponse
- type CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntry
- type CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntryCreditBlock
- type CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntryCustomer
- type CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntryEntryStatus
- type CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntryEntryType
- type CustomerCreditLedgerListByExternalIDResponseCreditBlockExpiryLedgerEntry
- type CustomerCreditLedgerListByExternalIDResponseCreditBlockExpiryLedgerEntryCreditBlock
- type CustomerCreditLedgerListByExternalIDResponseCreditBlockExpiryLedgerEntryCustomer
- type CustomerCreditLedgerListByExternalIDResponseCreditBlockExpiryLedgerEntryEntryStatus
- type CustomerCreditLedgerListByExternalIDResponseCreditBlockExpiryLedgerEntryEntryType
- type CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntry
- type CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntryCreditBlock
- type CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntryCustomer
- type CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntryEntryStatus
- type CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntryEntryType
- type CustomerCreditLedgerListByExternalIDResponseEntryStatus
- type CustomerCreditLedgerListByExternalIDResponseEntryType
- type CustomerCreditLedgerListByExternalIDResponseExpirationChangeLedgerEntry
- type CustomerCreditLedgerListByExternalIDResponseExpirationChangeLedgerEntryCreditBlock
- type CustomerCreditLedgerListByExternalIDResponseExpirationChangeLedgerEntryCustomer
- type CustomerCreditLedgerListByExternalIDResponseExpirationChangeLedgerEntryEntryStatus
- type CustomerCreditLedgerListByExternalIDResponseExpirationChangeLedgerEntryEntryType
- type CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntry
- type CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntryCreditBlock
- type CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntryCustomer
- type CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntryEntryStatus
- type CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntryEntryType
- type CustomerCreditLedgerListByExternalIDResponseUnion
- type CustomerCreditLedgerListByExternalIDResponseVoidInitiatedLedgerEntry
- type CustomerCreditLedgerListByExternalIDResponseVoidInitiatedLedgerEntryCreditBlock
- type CustomerCreditLedgerListByExternalIDResponseVoidInitiatedLedgerEntryCustomer
- type CustomerCreditLedgerListByExternalIDResponseVoidInitiatedLedgerEntryEntryStatus
- type CustomerCreditLedgerListByExternalIDResponseVoidInitiatedLedgerEntryEntryType
- type CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntry
- type CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntryCreditBlock
- type CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntryCustomer
- type CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntryEntryStatus
- type CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntryEntryType
- type CustomerCreditLedgerListParams
- type CustomerCreditLedgerListParamsEntryStatus
- type CustomerCreditLedgerListParamsEntryType
- type CustomerCreditLedgerListResponse
- type CustomerCreditLedgerListResponseAmendmentLedgerEntry
- type CustomerCreditLedgerListResponseAmendmentLedgerEntryCreditBlock
- type CustomerCreditLedgerListResponseAmendmentLedgerEntryCustomer
- type CustomerCreditLedgerListResponseAmendmentLedgerEntryEntryStatus
- type CustomerCreditLedgerListResponseAmendmentLedgerEntryEntryType
- type CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntry
- type CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntryCreditBlock
- type CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntryCustomer
- type CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntryEntryStatus
- type CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntryEntryType
- type CustomerCreditLedgerListResponseDecrementLedgerEntry
- type CustomerCreditLedgerListResponseDecrementLedgerEntryCreditBlock
- type CustomerCreditLedgerListResponseDecrementLedgerEntryCustomer
- type CustomerCreditLedgerListResponseDecrementLedgerEntryEntryStatus
- type CustomerCreditLedgerListResponseDecrementLedgerEntryEntryType
- type CustomerCreditLedgerListResponseEntryStatus
- type CustomerCreditLedgerListResponseEntryType
- type CustomerCreditLedgerListResponseExpirationChangeLedgerEntry
- type CustomerCreditLedgerListResponseExpirationChangeLedgerEntryCreditBlock
- type CustomerCreditLedgerListResponseExpirationChangeLedgerEntryCustomer
- type CustomerCreditLedgerListResponseExpirationChangeLedgerEntryEntryStatus
- type CustomerCreditLedgerListResponseExpirationChangeLedgerEntryEntryType
- type CustomerCreditLedgerListResponseIncrementLedgerEntry
- type CustomerCreditLedgerListResponseIncrementLedgerEntryCreditBlock
- type CustomerCreditLedgerListResponseIncrementLedgerEntryCustomer
- type CustomerCreditLedgerListResponseIncrementLedgerEntryEntryStatus
- type CustomerCreditLedgerListResponseIncrementLedgerEntryEntryType
- type CustomerCreditLedgerListResponseUnion
- type CustomerCreditLedgerListResponseVoidInitiatedLedgerEntry
- type CustomerCreditLedgerListResponseVoidInitiatedLedgerEntryCreditBlock
- type CustomerCreditLedgerListResponseVoidInitiatedLedgerEntryCustomer
- type CustomerCreditLedgerListResponseVoidInitiatedLedgerEntryEntryStatus
- type CustomerCreditLedgerListResponseVoidInitiatedLedgerEntryEntryType
- type CustomerCreditLedgerListResponseVoidLedgerEntry
- type CustomerCreditLedgerListResponseVoidLedgerEntryCreditBlock
- type CustomerCreditLedgerListResponseVoidLedgerEntryCustomer
- type CustomerCreditLedgerListResponseVoidLedgerEntryEntryStatus
- type CustomerCreditLedgerListResponseVoidLedgerEntryEntryType
- type CustomerCreditLedgerNewEntryByExternalIDParams
- type CustomerCreditLedgerNewEntryByExternalIDParamsAddAmendmentCreditLedgerEntryRequestParams
- type CustomerCreditLedgerNewEntryByExternalIDParamsAddAmendmentCreditLedgerEntryRequestParamsEntryType
- type CustomerCreditLedgerNewEntryByExternalIDParamsAddDecrementCreditLedgerEntryRequestParams
- type CustomerCreditLedgerNewEntryByExternalIDParamsAddDecrementCreditLedgerEntryRequestParamsEntryType
- type CustomerCreditLedgerNewEntryByExternalIDParamsAddExpirationChangeCreditLedgerEntryRequestParams
- func (CustomerCreditLedgerNewEntryByExternalIDParamsAddExpirationChangeCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryByExternalIDParams()
- func (r CustomerCreditLedgerNewEntryByExternalIDParamsAddExpirationChangeCreditLedgerEntryRequestParams) MarshalJSON() (data []byte, err error)
- type CustomerCreditLedgerNewEntryByExternalIDParamsAddExpirationChangeCreditLedgerEntryRequestParamsEntryType
- type CustomerCreditLedgerNewEntryByExternalIDParamsAddIncrementCreditLedgerEntryRequestParams
- type CustomerCreditLedgerNewEntryByExternalIDParamsAddIncrementCreditLedgerEntryRequestParamsEntryType
- type CustomerCreditLedgerNewEntryByExternalIDParamsAddIncrementCreditLedgerEntryRequestParamsInvoiceSettings
- type CustomerCreditLedgerNewEntryByExternalIDParamsAddVoidCreditLedgerEntryRequestParams
- type CustomerCreditLedgerNewEntryByExternalIDParamsAddVoidCreditLedgerEntryRequestParamsEntryType
- type CustomerCreditLedgerNewEntryByExternalIDParamsAddVoidCreditLedgerEntryRequestParamsVoidReason
- type CustomerCreditLedgerNewEntryByExternalIDResponse
- type CustomerCreditLedgerNewEntryByExternalIDResponseAmendmentLedgerEntry
- type CustomerCreditLedgerNewEntryByExternalIDResponseAmendmentLedgerEntryCreditBlock
- type CustomerCreditLedgerNewEntryByExternalIDResponseAmendmentLedgerEntryCustomer
- type CustomerCreditLedgerNewEntryByExternalIDResponseAmendmentLedgerEntryEntryStatus
- type CustomerCreditLedgerNewEntryByExternalIDResponseAmendmentLedgerEntryEntryType
- type CustomerCreditLedgerNewEntryByExternalIDResponseCreditBlockExpiryLedgerEntry
- type CustomerCreditLedgerNewEntryByExternalIDResponseCreditBlockExpiryLedgerEntryCreditBlock
- type CustomerCreditLedgerNewEntryByExternalIDResponseCreditBlockExpiryLedgerEntryCustomer
- type CustomerCreditLedgerNewEntryByExternalIDResponseCreditBlockExpiryLedgerEntryEntryStatus
- type CustomerCreditLedgerNewEntryByExternalIDResponseCreditBlockExpiryLedgerEntryEntryType
- type CustomerCreditLedgerNewEntryByExternalIDResponseDecrementLedgerEntry
- type CustomerCreditLedgerNewEntryByExternalIDResponseDecrementLedgerEntryCreditBlock
- type CustomerCreditLedgerNewEntryByExternalIDResponseDecrementLedgerEntryCustomer
- type CustomerCreditLedgerNewEntryByExternalIDResponseDecrementLedgerEntryEntryStatus
- type CustomerCreditLedgerNewEntryByExternalIDResponseDecrementLedgerEntryEntryType
- type CustomerCreditLedgerNewEntryByExternalIDResponseEntryStatus
- type CustomerCreditLedgerNewEntryByExternalIDResponseEntryType
- type CustomerCreditLedgerNewEntryByExternalIDResponseExpirationChangeLedgerEntry
- type CustomerCreditLedgerNewEntryByExternalIDResponseExpirationChangeLedgerEntryCreditBlock
- type CustomerCreditLedgerNewEntryByExternalIDResponseExpirationChangeLedgerEntryCustomer
- type CustomerCreditLedgerNewEntryByExternalIDResponseExpirationChangeLedgerEntryEntryStatus
- type CustomerCreditLedgerNewEntryByExternalIDResponseExpirationChangeLedgerEntryEntryType
- type CustomerCreditLedgerNewEntryByExternalIDResponseIncrementLedgerEntry
- type CustomerCreditLedgerNewEntryByExternalIDResponseIncrementLedgerEntryCreditBlock
- type CustomerCreditLedgerNewEntryByExternalIDResponseIncrementLedgerEntryCustomer
- type CustomerCreditLedgerNewEntryByExternalIDResponseIncrementLedgerEntryEntryStatus
- type CustomerCreditLedgerNewEntryByExternalIDResponseIncrementLedgerEntryEntryType
- type CustomerCreditLedgerNewEntryByExternalIDResponseUnion
- type CustomerCreditLedgerNewEntryByExternalIDResponseVoidInitiatedLedgerEntry
- type CustomerCreditLedgerNewEntryByExternalIDResponseVoidInitiatedLedgerEntryCreditBlock
- type CustomerCreditLedgerNewEntryByExternalIDResponseVoidInitiatedLedgerEntryCustomer
- type CustomerCreditLedgerNewEntryByExternalIDResponseVoidInitiatedLedgerEntryEntryStatus
- type CustomerCreditLedgerNewEntryByExternalIDResponseVoidInitiatedLedgerEntryEntryType
- type CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntry
- type CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntryCreditBlock
- type CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntryCustomer
- type CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntryEntryStatus
- type CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntryEntryType
- type CustomerCreditLedgerNewEntryParams
- type CustomerCreditLedgerNewEntryParamsAddAmendmentCreditLedgerEntryRequestParams
- type CustomerCreditLedgerNewEntryParamsAddAmendmentCreditLedgerEntryRequestParamsEntryType
- type CustomerCreditLedgerNewEntryParamsAddDecrementCreditLedgerEntryRequestParams
- type CustomerCreditLedgerNewEntryParamsAddDecrementCreditLedgerEntryRequestParamsEntryType
- type CustomerCreditLedgerNewEntryParamsAddExpirationChangeCreditLedgerEntryRequestParams
- type CustomerCreditLedgerNewEntryParamsAddExpirationChangeCreditLedgerEntryRequestParamsEntryType
- type CustomerCreditLedgerNewEntryParamsAddIncrementCreditLedgerEntryRequestParams
- type CustomerCreditLedgerNewEntryParamsAddIncrementCreditLedgerEntryRequestParamsEntryType
- type CustomerCreditLedgerNewEntryParamsAddIncrementCreditLedgerEntryRequestParamsInvoiceSettings
- type CustomerCreditLedgerNewEntryParamsAddVoidCreditLedgerEntryRequestParams
- type CustomerCreditLedgerNewEntryParamsAddVoidCreditLedgerEntryRequestParamsEntryType
- type CustomerCreditLedgerNewEntryParamsAddVoidCreditLedgerEntryRequestParamsVoidReason
- type CustomerCreditLedgerNewEntryResponse
- type CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntry
- type CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntryCreditBlock
- type CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntryCustomer
- type CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntryEntryStatus
- type CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntryEntryType
- type CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntry
- type CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntryCreditBlock
- type CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntryCustomer
- type CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntryEntryStatus
- type CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntryEntryType
- type CustomerCreditLedgerNewEntryResponseDecrementLedgerEntry
- type CustomerCreditLedgerNewEntryResponseDecrementLedgerEntryCreditBlock
- type CustomerCreditLedgerNewEntryResponseDecrementLedgerEntryCustomer
- type CustomerCreditLedgerNewEntryResponseDecrementLedgerEntryEntryStatus
- type CustomerCreditLedgerNewEntryResponseDecrementLedgerEntryEntryType
- type CustomerCreditLedgerNewEntryResponseEntryStatus
- type CustomerCreditLedgerNewEntryResponseEntryType
- type CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntry
- type CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntryCreditBlock
- type CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntryCustomer
- type CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntryEntryStatus
- type CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntryEntryType
- type CustomerCreditLedgerNewEntryResponseIncrementLedgerEntry
- type CustomerCreditLedgerNewEntryResponseIncrementLedgerEntryCreditBlock
- type CustomerCreditLedgerNewEntryResponseIncrementLedgerEntryCustomer
- type CustomerCreditLedgerNewEntryResponseIncrementLedgerEntryEntryStatus
- type CustomerCreditLedgerNewEntryResponseIncrementLedgerEntryEntryType
- type CustomerCreditLedgerNewEntryResponseUnion
- type CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntry
- type CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntryCreditBlock
- type CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntryCustomer
- type CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntryEntryStatus
- type CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntryEntryType
- type CustomerCreditLedgerNewEntryResponseVoidLedgerEntry
- type CustomerCreditLedgerNewEntryResponseVoidLedgerEntryCreditBlock
- type CustomerCreditLedgerNewEntryResponseVoidLedgerEntryCustomer
- type CustomerCreditLedgerNewEntryResponseVoidLedgerEntryEntryStatus
- type CustomerCreditLedgerNewEntryResponseVoidLedgerEntryEntryType
- type CustomerCreditLedgerService
- func (r *CustomerCreditLedgerService) List(ctx context.Context, customerID string, query CustomerCreditLedgerListParams, ...) (res *pagination.Page[CustomerCreditLedgerListResponse], err error)
- func (r *CustomerCreditLedgerService) ListAutoPaging(ctx context.Context, customerID string, query CustomerCreditLedgerListParams, ...) *pagination.PageAutoPager[CustomerCreditLedgerListResponse]
- func (r *CustomerCreditLedgerService) ListByExternalID(ctx context.Context, externalCustomerID string, ...) (res *pagination.Page[CustomerCreditLedgerListByExternalIDResponse], err error)
- func (r *CustomerCreditLedgerService) ListByExternalIDAutoPaging(ctx context.Context, externalCustomerID string, ...) *pagination.PageAutoPager[CustomerCreditLedgerListByExternalIDResponse]
- func (r *CustomerCreditLedgerService) NewEntry(ctx context.Context, customerID string, ...) (res *CustomerCreditLedgerNewEntryResponse, err error)
- func (r *CustomerCreditLedgerService) NewEntryByExternalID(ctx context.Context, externalCustomerID string, ...) (res *CustomerCreditLedgerNewEntryByExternalIDResponse, err error)
- type CustomerCreditListByExternalIDParams
- type CustomerCreditListByExternalIDResponse
- type CustomerCreditListByExternalIDResponseStatus
- type CustomerCreditListParams
- type CustomerCreditListResponse
- type CustomerCreditListResponseStatus
- type CustomerCreditService
- func (r *CustomerCreditService) List(ctx context.Context, customerID string, query CustomerCreditListParams, ...) (res *pagination.Page[CustomerCreditListResponse], err error)
- func (r *CustomerCreditService) ListAutoPaging(ctx context.Context, customerID string, query CustomerCreditListParams, ...) *pagination.PageAutoPager[CustomerCreditListResponse]
- func (r *CustomerCreditService) ListByExternalID(ctx context.Context, externalCustomerID string, ...) (res *pagination.Page[CustomerCreditListByExternalIDResponse], err error)
- func (r *CustomerCreditService) ListByExternalIDAutoPaging(ctx context.Context, externalCustomerID string, ...) *pagination.PageAutoPager[CustomerCreditListByExternalIDResponse]
- type CustomerCreditTopUpListByExternalIDParams
- type CustomerCreditTopUpListByExternalIDResponse
- type CustomerCreditTopUpListByExternalIDResponseExpiresAfterUnit
- type CustomerCreditTopUpListByExternalIDResponseInvoiceSettings
- type CustomerCreditTopUpListParams
- type CustomerCreditTopUpListResponse
- type CustomerCreditTopUpListResponseExpiresAfterUnit
- type CustomerCreditTopUpListResponseInvoiceSettings
- type CustomerCreditTopUpNewByExternalIDParams
- type CustomerCreditTopUpNewByExternalIDParamsExpiresAfterUnit
- type CustomerCreditTopUpNewByExternalIDParamsInvoiceSettings
- type CustomerCreditTopUpNewByExternalIDResponse
- type CustomerCreditTopUpNewByExternalIDResponseExpiresAfterUnit
- type CustomerCreditTopUpNewByExternalIDResponseInvoiceSettings
- type CustomerCreditTopUpNewParams
- type CustomerCreditTopUpNewParamsExpiresAfterUnit
- type CustomerCreditTopUpNewParamsInvoiceSettings
- type CustomerCreditTopUpNewResponse
- type CustomerCreditTopUpNewResponseExpiresAfterUnit
- type CustomerCreditTopUpNewResponseInvoiceSettings
- type CustomerCreditTopUpService
- func (r *CustomerCreditTopUpService) Delete(ctx context.Context, customerID string, topUpID string, ...) (err error)
- func (r *CustomerCreditTopUpService) DeleteByExternalID(ctx context.Context, externalCustomerID string, topUpID string, ...) (err error)
- func (r *CustomerCreditTopUpService) List(ctx context.Context, customerID string, query CustomerCreditTopUpListParams, ...) (res *pagination.Page[CustomerCreditTopUpListResponse], err error)
- func (r *CustomerCreditTopUpService) ListAutoPaging(ctx context.Context, customerID string, query CustomerCreditTopUpListParams, ...) *pagination.PageAutoPager[CustomerCreditTopUpListResponse]
- func (r *CustomerCreditTopUpService) ListByExternalID(ctx context.Context, externalCustomerID string, ...) (res *pagination.Page[CustomerCreditTopUpListByExternalIDResponse], err error)
- func (r *CustomerCreditTopUpService) ListByExternalIDAutoPaging(ctx context.Context, externalCustomerID string, ...) *pagination.PageAutoPager[CustomerCreditTopUpListByExternalIDResponse]
- func (r *CustomerCreditTopUpService) New(ctx context.Context, customerID string, body CustomerCreditTopUpNewParams, ...) (res *CustomerCreditTopUpNewResponse, err error)
- func (r *CustomerCreditTopUpService) NewByExternalID(ctx context.Context, externalCustomerID string, ...) (res *CustomerCreditTopUpNewByExternalIDResponse, err error)
- type CustomerListParams
- type CustomerNewParams
- type CustomerNewParamsAccountingSyncConfiguration
- type CustomerNewParamsAccountingSyncConfigurationAccountingProvider
- type CustomerNewParamsBillingAddress
- type CustomerNewParamsPaymentProvider
- type CustomerNewParamsReportingConfiguration
- type CustomerNewParamsShippingAddress
- type CustomerNewParamsTaxID
- type CustomerNewParamsTaxIDCountry
- type CustomerNewParamsTaxIDType
- type CustomerPaymentProvider
- type CustomerReportingConfiguration
- type CustomerService
- func (r *CustomerService) Delete(ctx context.Context, customerID string, opts ...option.RequestOption) (err error)
- func (r *CustomerService) Fetch(ctx context.Context, customerID string, opts ...option.RequestOption) (res *Customer, err error)
- func (r *CustomerService) FetchByExternalID(ctx context.Context, externalCustomerID string, opts ...option.RequestOption) (res *Customer, err error)
- func (r *CustomerService) List(ctx context.Context, query CustomerListParams, opts ...option.RequestOption) (res *pagination.Page[Customer], err error)
- func (r *CustomerService) ListAutoPaging(ctx context.Context, query CustomerListParams, opts ...option.RequestOption) *pagination.PageAutoPager[Customer]
- func (r *CustomerService) New(ctx context.Context, body CustomerNewParams, opts ...option.RequestOption) (res *Customer, err error)
- func (r *CustomerService) Update(ctx context.Context, customerID string, body CustomerUpdateParams, ...) (res *Customer, err error)
- func (r *CustomerService) UpdateByExternalID(ctx context.Context, id string, body CustomerUpdateByExternalIDParams, ...) (res *Customer, err error)
- type CustomerShippingAddress
- type CustomerTaxID
- type CustomerTaxIDCountry
- type CustomerTaxIDType
- type CustomerUpdateByExternalIDParams
- type CustomerUpdateByExternalIDParamsAccountingSyncConfiguration
- type CustomerUpdateByExternalIDParamsAccountingSyncConfigurationAccountingProvider
- type CustomerUpdateByExternalIDParamsBillingAddress
- type CustomerUpdateByExternalIDParamsPaymentProvider
- type CustomerUpdateByExternalIDParamsReportingConfiguration
- type CustomerUpdateByExternalIDParamsShippingAddress
- type CustomerUpdateByExternalIDParamsTaxConfiguration
- type CustomerUpdateByExternalIDParamsTaxConfigurationNewAvalaraTaxConfiguration
- type CustomerUpdateByExternalIDParamsTaxConfigurationNewAvalaraTaxConfigurationTaxProvider
- type CustomerUpdateByExternalIDParamsTaxConfigurationNewTaxJarConfiguration
- type CustomerUpdateByExternalIDParamsTaxConfigurationNewTaxJarConfigurationTaxProvider
- type CustomerUpdateByExternalIDParamsTaxConfigurationTaxProvider
- type CustomerUpdateByExternalIDParamsTaxConfigurationUnion
- type CustomerUpdateByExternalIDParamsTaxID
- type CustomerUpdateByExternalIDParamsTaxIDCountry
- type CustomerUpdateByExternalIDParamsTaxIDType
- type CustomerUpdateParams
- type CustomerUpdateParamsAccountingSyncConfiguration
- type CustomerUpdateParamsAccountingSyncConfigurationAccountingProvider
- type CustomerUpdateParamsBillingAddress
- type CustomerUpdateParamsPaymentProvider
- type CustomerUpdateParamsReportingConfiguration
- type CustomerUpdateParamsShippingAddress
- type CustomerUpdateParamsTaxConfiguration
- type CustomerUpdateParamsTaxConfigurationNewAvalaraTaxConfiguration
- type CustomerUpdateParamsTaxConfigurationNewAvalaraTaxConfigurationTaxProvider
- type CustomerUpdateParamsTaxConfigurationNewTaxJarConfiguration
- type CustomerUpdateParamsTaxConfigurationNewTaxJarConfigurationTaxProvider
- type CustomerUpdateParamsTaxConfigurationTaxProvider
- type CustomerUpdateParamsTaxConfigurationUnion
- type CustomerUpdateParamsTaxID
- type CustomerUpdateParamsTaxIDCountry
- type CustomerUpdateParamsTaxIDType
- type Discount
- type DiscountAmountDiscount
- type DiscountAmountDiscountDiscountType
- type DiscountAmountDiscountParam
- type DiscountDiscountType
- type DiscountPercentageDiscount
- type DiscountPercentageDiscountDiscountType
- type DiscountPercentageDiscountParam
- type DiscountTrialDiscount
- type DiscountTrialDiscountDiscountType
- type DiscountTrialDiscountParam
- type DiscountUnionParam
- type DiscountUsageDiscount
- type DiscountUsageDiscountDiscountType
- type DiscountUsageDiscountParam
- type Error
- type ErrorStatus
- type ErrorType
- type EvaluatePriceGroup
- type EvaluatePriceGroupGroupingValuesUnion
- type EventBackfillCloseResponse
- type EventBackfillCloseResponseStatus
- type EventBackfillFetchResponse
- type EventBackfillFetchResponseStatus
- type EventBackfillListParams
- type EventBackfillListResponse
- type EventBackfillListResponseStatus
- type EventBackfillNewParams
- type EventBackfillNewResponse
- type EventBackfillNewResponseStatus
- type EventBackfillRevertResponse
- type EventBackfillRevertResponseStatus
- type EventBackfillService
- func (r *EventBackfillService) Close(ctx context.Context, backfillID string, opts ...option.RequestOption) (res *EventBackfillCloseResponse, err error)
- func (r *EventBackfillService) Fetch(ctx context.Context, backfillID string, opts ...option.RequestOption) (res *EventBackfillFetchResponse, err error)
- func (r *EventBackfillService) List(ctx context.Context, query EventBackfillListParams, ...) (res *pagination.Page[EventBackfillListResponse], err error)
- func (r *EventBackfillService) ListAutoPaging(ctx context.Context, query EventBackfillListParams, ...) *pagination.PageAutoPager[EventBackfillListResponse]
- func (r *EventBackfillService) New(ctx context.Context, body EventBackfillNewParams, opts ...option.RequestOption) (res *EventBackfillNewResponse, err error)
- func (r *EventBackfillService) Revert(ctx context.Context, backfillID string, opts ...option.RequestOption) (res *EventBackfillRevertResponse, err error)
- type EventDeprecateResponse
- type EventIngestParams
- type EventIngestParamsEvent
- type EventIngestResponse
- type EventIngestResponseDebug
- type EventIngestResponseValidationFailed
- type EventSearchParams
- type EventSearchResponse
- type EventSearchResponseData
- type EventService
- func (r *EventService) Deprecate(ctx context.Context, eventID string, opts ...option.RequestOption) (res *EventDeprecateResponse, err error)
- func (r *EventService) Ingest(ctx context.Context, params EventIngestParams, opts ...option.RequestOption) (res *EventIngestResponse, err error)
- func (r *EventService) Search(ctx context.Context, body EventSearchParams, opts ...option.RequestOption) (res *EventSearchResponse, err error)
- func (r *EventService) Update(ctx context.Context, eventID string, body EventUpdateParams, ...) (res *EventUpdateResponse, err error)
- type EventUpdateParams
- type EventUpdateResponse
- type Invoice
- type InvoiceAutoCollection
- type InvoiceBillingAddress
- type InvoiceCreditNote
- type InvoiceCustomer
- type InvoiceCustomerBalanceTransaction
- type InvoiceCustomerBalanceTransactionsAction
- type InvoiceCustomerBalanceTransactionsCreditNote
- type InvoiceCustomerBalanceTransactionsInvoice
- type InvoiceCustomerBalanceTransactionsType
- type InvoiceCustomerTaxID
- type InvoiceCustomerTaxIDCountry
- type InvoiceCustomerTaxIDType
- type InvoiceDiscount
- type InvoiceDiscountAmountDiscount
- type InvoiceDiscountAmountDiscountDiscountType
- type InvoiceDiscountDiscountType
- type InvoiceDiscountPercentageDiscount
- type InvoiceDiscountPercentageDiscountDiscountType
- type InvoiceDiscountTrialDiscount
- type InvoiceDiscountTrialDiscountDiscountType
- type InvoiceDiscountUnion
- type InvoiceFetchUpcomingParams
- type InvoiceFetchUpcomingResponse
- type InvoiceFetchUpcomingResponseAutoCollection
- type InvoiceFetchUpcomingResponseBillingAddress
- type InvoiceFetchUpcomingResponseCreditNote
- type InvoiceFetchUpcomingResponseCustomer
- type InvoiceFetchUpcomingResponseCustomerBalanceTransaction
- type InvoiceFetchUpcomingResponseCustomerBalanceTransactionsAction
- type InvoiceFetchUpcomingResponseCustomerBalanceTransactionsCreditNote
- type InvoiceFetchUpcomingResponseCustomerBalanceTransactionsInvoice
- type InvoiceFetchUpcomingResponseCustomerBalanceTransactionsType
- type InvoiceFetchUpcomingResponseCustomerTaxID
- type InvoiceFetchUpcomingResponseCustomerTaxIDCountry
- type InvoiceFetchUpcomingResponseCustomerTaxIDType
- type InvoiceFetchUpcomingResponseDiscount
- type InvoiceFetchUpcomingResponseDiscountAmountDiscount
- type InvoiceFetchUpcomingResponseDiscountAmountDiscountDiscountType
- type InvoiceFetchUpcomingResponseDiscountDiscountType
- type InvoiceFetchUpcomingResponseDiscountPercentageDiscount
- type InvoiceFetchUpcomingResponseDiscountPercentageDiscountDiscountType
- type InvoiceFetchUpcomingResponseDiscountTrialDiscount
- type InvoiceFetchUpcomingResponseDiscountTrialDiscountDiscountType
- type InvoiceFetchUpcomingResponseDiscountUnion
- type InvoiceFetchUpcomingResponseInvoiceSource
- type InvoiceFetchUpcomingResponseLineItem
- type InvoiceFetchUpcomingResponseLineItemsMaximum
- type InvoiceFetchUpcomingResponseLineItemsMinimum
- type InvoiceFetchUpcomingResponseLineItemsSubLineItem
- type InvoiceFetchUpcomingResponseLineItemsSubLineItemsMatrixSubLineItem
- type InvoiceFetchUpcomingResponseLineItemsSubLineItemsMatrixSubLineItemGrouping
- type InvoiceFetchUpcomingResponseLineItemsSubLineItemsMatrixSubLineItemMatrixConfig
- type InvoiceFetchUpcomingResponseLineItemsSubLineItemsMatrixSubLineItemType
- type InvoiceFetchUpcomingResponseLineItemsSubLineItemsOtherSubLineItem
- type InvoiceFetchUpcomingResponseLineItemsSubLineItemsOtherSubLineItemGrouping
- type InvoiceFetchUpcomingResponseLineItemsSubLineItemsOtherSubLineItemType
- type InvoiceFetchUpcomingResponseLineItemsSubLineItemsTierSubLineItem
- type InvoiceFetchUpcomingResponseLineItemsSubLineItemsTierSubLineItemGrouping
- type InvoiceFetchUpcomingResponseLineItemsSubLineItemsTierSubLineItemTierConfig
- type InvoiceFetchUpcomingResponseLineItemsSubLineItemsTierSubLineItemType
- type InvoiceFetchUpcomingResponseLineItemsSubLineItemsType
- type InvoiceFetchUpcomingResponseLineItemsSubLineItemsUnion
- type InvoiceFetchUpcomingResponseLineItemsTaxAmount
- type InvoiceFetchUpcomingResponseMaximum
- type InvoiceFetchUpcomingResponseMinimum
- type InvoiceFetchUpcomingResponseShippingAddress
- type InvoiceFetchUpcomingResponseStatus
- type InvoiceFetchUpcomingResponseSubscription
- type InvoiceInvoiceSource
- type InvoiceLineItem
- type InvoiceLineItemNewParams
- type InvoiceLineItemNewResponse
- type InvoiceLineItemNewResponseMaximum
- type InvoiceLineItemNewResponseMinimum
- type InvoiceLineItemNewResponseSubLineItem
- type InvoiceLineItemNewResponseSubLineItemsMatrixSubLineItem
- type InvoiceLineItemNewResponseSubLineItemsMatrixSubLineItemGrouping
- type InvoiceLineItemNewResponseSubLineItemsMatrixSubLineItemMatrixConfig
- type InvoiceLineItemNewResponseSubLineItemsMatrixSubLineItemType
- type InvoiceLineItemNewResponseSubLineItemsOtherSubLineItem
- type InvoiceLineItemNewResponseSubLineItemsOtherSubLineItemGrouping
- type InvoiceLineItemNewResponseSubLineItemsOtherSubLineItemType
- type InvoiceLineItemNewResponseSubLineItemsTierSubLineItem
- type InvoiceLineItemNewResponseSubLineItemsTierSubLineItemGrouping
- type InvoiceLineItemNewResponseSubLineItemsTierSubLineItemTierConfig
- type InvoiceLineItemNewResponseSubLineItemsTierSubLineItemType
- type InvoiceLineItemNewResponseSubLineItemsType
- type InvoiceLineItemNewResponseSubLineItemsUnion
- type InvoiceLineItemNewResponseTaxAmount
- type InvoiceLineItemService
- type InvoiceLineItemsMaximum
- type InvoiceLineItemsMinimum
- type InvoiceLineItemsSubLineItem
- type InvoiceLineItemsSubLineItemsMatrixSubLineItem
- type InvoiceLineItemsSubLineItemsMatrixSubLineItemGrouping
- type InvoiceLineItemsSubLineItemsMatrixSubLineItemMatrixConfig
- type InvoiceLineItemsSubLineItemsMatrixSubLineItemType
- type InvoiceLineItemsSubLineItemsOtherSubLineItem
- type InvoiceLineItemsSubLineItemsOtherSubLineItemGrouping
- type InvoiceLineItemsSubLineItemsOtherSubLineItemType
- type InvoiceLineItemsSubLineItemsTierSubLineItem
- type InvoiceLineItemsSubLineItemsTierSubLineItemGrouping
- type InvoiceLineItemsSubLineItemsTierSubLineItemTierConfig
- type InvoiceLineItemsSubLineItemsTierSubLineItemType
- type InvoiceLineItemsSubLineItemsType
- type InvoiceLineItemsSubLineItemsUnion
- type InvoiceLineItemsTaxAmount
- type InvoiceListParams
- type InvoiceListParamsDateType
- type InvoiceListParamsStatus
- type InvoiceMarkPaidParams
- type InvoiceMaximum
- type InvoiceMinimum
- type InvoiceNewParams
- type InvoiceNewParamsLineItem
- type InvoiceNewParamsLineItemsModelType
- type InvoiceNewParamsLineItemsUnitConfig
- type InvoiceService
- func (r *InvoiceService) Fetch(ctx context.Context, invoiceID string, opts ...option.RequestOption) (res *Invoice, err error)
- func (r *InvoiceService) FetchUpcoming(ctx context.Context, query InvoiceFetchUpcomingParams, ...) (res *InvoiceFetchUpcomingResponse, err error)
- func (r *InvoiceService) Issue(ctx context.Context, invoiceID string, opts ...option.RequestOption) (res *Invoice, err error)
- func (r *InvoiceService) List(ctx context.Context, query InvoiceListParams, opts ...option.RequestOption) (res *pagination.Page[Invoice], err error)
- func (r *InvoiceService) ListAutoPaging(ctx context.Context, query InvoiceListParams, opts ...option.RequestOption) *pagination.PageAutoPager[Invoice]
- func (r *InvoiceService) MarkPaid(ctx context.Context, invoiceID string, body InvoiceMarkPaidParams, ...) (res *Invoice, err error)
- func (r *InvoiceService) New(ctx context.Context, body InvoiceNewParams, opts ...option.RequestOption) (res *Invoice, err error)
- func (r *InvoiceService) Update(ctx context.Context, invoiceID string, body InvoiceUpdateParams, ...) (res *Invoice, err error)
- func (r *InvoiceService) Void(ctx context.Context, invoiceID string, opts ...option.RequestOption) (res *Invoice, err error)
- type InvoiceShippingAddress
- type InvoiceStatus
- type InvoiceSubscription
- type InvoiceUpdateParams
- type Item
- type ItemExternalConnection
- type ItemExternalConnectionsExternalConnectionName
- type ItemListParams
- type ItemNewParams
- type ItemService
- func (r *ItemService) Fetch(ctx context.Context, itemID string, opts ...option.RequestOption) (res *Item, err error)
- func (r *ItemService) List(ctx context.Context, query ItemListParams, opts ...option.RequestOption) (res *pagination.Page[Item], err error)
- func (r *ItemService) ListAutoPaging(ctx context.Context, query ItemListParams, opts ...option.RequestOption) *pagination.PageAutoPager[Item]
- func (r *ItemService) New(ctx context.Context, body ItemNewParams, opts ...option.RequestOption) (res *Item, err error)
- func (r *ItemService) Update(ctx context.Context, itemID string, body ItemUpdateParams, ...) (res *Item, err error)
- type ItemUpdateParams
- type ItemUpdateParamsExternalConnection
- type ItemUpdateParamsExternalConnectionsExternalConnectionName
- type MetricListParams
- type MetricNewParams
- type MetricService
- func (r *MetricService) Fetch(ctx context.Context, metricID string, opts ...option.RequestOption) (res *BillableMetric, err error)
- func (r *MetricService) List(ctx context.Context, query MetricListParams, opts ...option.RequestOption) (res *pagination.Page[BillableMetric], err error)
- func (r *MetricService) ListAutoPaging(ctx context.Context, query MetricListParams, opts ...option.RequestOption) *pagination.PageAutoPager[BillableMetric]
- func (r *MetricService) New(ctx context.Context, body MetricNewParams, opts ...option.RequestOption) (res *BillableMetric, err error)
- func (r *MetricService) Update(ctx context.Context, metricID string, body MetricUpdateParams, ...) (res *BillableMetric, err error)
- type MetricUpdateParams
- type PaginationMetadata
- type Plan
- type PlanBasePlan
- type PlanExternalPlanIDService
- type PlanExternalPlanIDUpdateParams
- type PlanListParams
- type PlanListParamsStatus
- type PlanMaximum
- type PlanMinimum
- type PlanNewParams
- type PlanNewParamsPrice
- type PlanNewParamsPriceUnion
- type PlanNewParamsPricesCadence
- type PlanNewParamsPricesModelType
- type PlanNewParamsPricesNewPlanBpsPrice
- type PlanNewParamsPricesNewPlanBpsPriceBillingCycleConfiguration
- type PlanNewParamsPricesNewPlanBpsPriceBillingCycleConfigurationDurationUnit
- type PlanNewParamsPricesNewPlanBpsPriceBpsConfig
- type PlanNewParamsPricesNewPlanBpsPriceCadence
- type PlanNewParamsPricesNewPlanBpsPriceInvoicingCycleConfiguration
- type PlanNewParamsPricesNewPlanBpsPriceInvoicingCycleConfigurationDurationUnit
- type PlanNewParamsPricesNewPlanBpsPriceModelType
- type PlanNewParamsPricesNewPlanBulkBpsPrice
- type PlanNewParamsPricesNewPlanBulkBpsPriceBillingCycleConfiguration
- type PlanNewParamsPricesNewPlanBulkBpsPriceBillingCycleConfigurationDurationUnit
- type PlanNewParamsPricesNewPlanBulkBpsPriceBulkBpsConfig
- type PlanNewParamsPricesNewPlanBulkBpsPriceBulkBpsConfigTier
- type PlanNewParamsPricesNewPlanBulkBpsPriceCadence
- type PlanNewParamsPricesNewPlanBulkBpsPriceInvoicingCycleConfiguration
- type PlanNewParamsPricesNewPlanBulkBpsPriceInvoicingCycleConfigurationDurationUnit
- type PlanNewParamsPricesNewPlanBulkBpsPriceModelType
- type PlanNewParamsPricesNewPlanBulkPrice
- type PlanNewParamsPricesNewPlanBulkPriceBillingCycleConfiguration
- type PlanNewParamsPricesNewPlanBulkPriceBillingCycleConfigurationDurationUnit
- type PlanNewParamsPricesNewPlanBulkPriceBulkConfig
- type PlanNewParamsPricesNewPlanBulkPriceBulkConfigTier
- type PlanNewParamsPricesNewPlanBulkPriceCadence
- type PlanNewParamsPricesNewPlanBulkPriceInvoicingCycleConfiguration
- type PlanNewParamsPricesNewPlanBulkPriceInvoicingCycleConfigurationDurationUnit
- type PlanNewParamsPricesNewPlanBulkPriceModelType
- type PlanNewParamsPricesNewPlanBulkWithProrationPrice
- type PlanNewParamsPricesNewPlanBulkWithProrationPriceBillingCycleConfiguration
- type PlanNewParamsPricesNewPlanBulkWithProrationPriceBillingCycleConfigurationDurationUnit
- type PlanNewParamsPricesNewPlanBulkWithProrationPriceCadence
- type PlanNewParamsPricesNewPlanBulkWithProrationPriceInvoicingCycleConfiguration
- type PlanNewParamsPricesNewPlanBulkWithProrationPriceInvoicingCycleConfigurationDurationUnit
- type PlanNewParamsPricesNewPlanBulkWithProrationPriceModelType
- type PlanNewParamsPricesNewPlanGroupedAllocationPrice
- type PlanNewParamsPricesNewPlanGroupedAllocationPriceBillingCycleConfiguration
- type PlanNewParamsPricesNewPlanGroupedAllocationPriceBillingCycleConfigurationDurationUnit
- type PlanNewParamsPricesNewPlanGroupedAllocationPriceCadence
- type PlanNewParamsPricesNewPlanGroupedAllocationPriceInvoicingCycleConfiguration
- type PlanNewParamsPricesNewPlanGroupedAllocationPriceInvoicingCycleConfigurationDurationUnit
- type PlanNewParamsPricesNewPlanGroupedAllocationPriceModelType
- type PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPrice
- type PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceBillingCycleConfiguration
- type PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceBillingCycleConfigurationDurationUnit
- type PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceCadence
- type PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfiguration
- type PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfigurationDurationUnit
- type PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceModelType
- type PlanNewParamsPricesNewPlanMatrixPrice
- type PlanNewParamsPricesNewPlanMatrixPriceBillingCycleConfiguration
- type PlanNewParamsPricesNewPlanMatrixPriceBillingCycleConfigurationDurationUnit
- type PlanNewParamsPricesNewPlanMatrixPriceCadence
- type PlanNewParamsPricesNewPlanMatrixPriceInvoicingCycleConfiguration
- type PlanNewParamsPricesNewPlanMatrixPriceInvoicingCycleConfigurationDurationUnit
- type PlanNewParamsPricesNewPlanMatrixPriceMatrixConfig
- type PlanNewParamsPricesNewPlanMatrixPriceMatrixConfigMatrixValue
- type PlanNewParamsPricesNewPlanMatrixPriceModelType
- type PlanNewParamsPricesNewPlanPackagePrice
- type PlanNewParamsPricesNewPlanPackagePriceBillingCycleConfiguration
- type PlanNewParamsPricesNewPlanPackagePriceBillingCycleConfigurationDurationUnit
- type PlanNewParamsPricesNewPlanPackagePriceCadence
- type PlanNewParamsPricesNewPlanPackagePriceInvoicingCycleConfiguration
- type PlanNewParamsPricesNewPlanPackagePriceInvoicingCycleConfigurationDurationUnit
- type PlanNewParamsPricesNewPlanPackagePriceModelType
- type PlanNewParamsPricesNewPlanPackagePricePackageConfig
- type PlanNewParamsPricesNewPlanPackageWithAllocationPrice
- type PlanNewParamsPricesNewPlanPackageWithAllocationPriceBillingCycleConfiguration
- type PlanNewParamsPricesNewPlanPackageWithAllocationPriceBillingCycleConfigurationDurationUnit
- type PlanNewParamsPricesNewPlanPackageWithAllocationPriceCadence
- type PlanNewParamsPricesNewPlanPackageWithAllocationPriceInvoicingCycleConfiguration
- type PlanNewParamsPricesNewPlanPackageWithAllocationPriceInvoicingCycleConfigurationDurationUnit
- type PlanNewParamsPricesNewPlanPackageWithAllocationPriceModelType
- type PlanNewParamsPricesNewPlanThresholdTotalAmountPrice
- type PlanNewParamsPricesNewPlanThresholdTotalAmountPriceBillingCycleConfiguration
- type PlanNewParamsPricesNewPlanThresholdTotalAmountPriceBillingCycleConfigurationDurationUnit
- type PlanNewParamsPricesNewPlanThresholdTotalAmountPriceCadence
- type PlanNewParamsPricesNewPlanThresholdTotalAmountPriceInvoicingCycleConfiguration
- type PlanNewParamsPricesNewPlanThresholdTotalAmountPriceInvoicingCycleConfigurationDurationUnit
- type PlanNewParamsPricesNewPlanThresholdTotalAmountPriceModelType
- type PlanNewParamsPricesNewPlanTierWithProrationPrice
- type PlanNewParamsPricesNewPlanTierWithProrationPriceBillingCycleConfiguration
- type PlanNewParamsPricesNewPlanTierWithProrationPriceBillingCycleConfigurationDurationUnit
- type PlanNewParamsPricesNewPlanTierWithProrationPriceCadence
- type PlanNewParamsPricesNewPlanTierWithProrationPriceInvoicingCycleConfiguration
- type PlanNewParamsPricesNewPlanTierWithProrationPriceInvoicingCycleConfigurationDurationUnit
- type PlanNewParamsPricesNewPlanTierWithProrationPriceModelType
- type PlanNewParamsPricesNewPlanTieredBpsPrice
- type PlanNewParamsPricesNewPlanTieredBpsPriceBillingCycleConfiguration
- type PlanNewParamsPricesNewPlanTieredBpsPriceBillingCycleConfigurationDurationUnit
- type PlanNewParamsPricesNewPlanTieredBpsPriceCadence
- type PlanNewParamsPricesNewPlanTieredBpsPriceInvoicingCycleConfiguration
- type PlanNewParamsPricesNewPlanTieredBpsPriceInvoicingCycleConfigurationDurationUnit
- type PlanNewParamsPricesNewPlanTieredBpsPriceModelType
- type PlanNewParamsPricesNewPlanTieredBpsPriceTieredBpsConfig
- type PlanNewParamsPricesNewPlanTieredBpsPriceTieredBpsConfigTier
- type PlanNewParamsPricesNewPlanTieredPackagePrice
- type PlanNewParamsPricesNewPlanTieredPackagePriceBillingCycleConfiguration
- type PlanNewParamsPricesNewPlanTieredPackagePriceBillingCycleConfigurationDurationUnit
- type PlanNewParamsPricesNewPlanTieredPackagePriceCadence
- type PlanNewParamsPricesNewPlanTieredPackagePriceInvoicingCycleConfiguration
- type PlanNewParamsPricesNewPlanTieredPackagePriceInvoicingCycleConfigurationDurationUnit
- type PlanNewParamsPricesNewPlanTieredPackagePriceModelType
- type PlanNewParamsPricesNewPlanTieredPrice
- type PlanNewParamsPricesNewPlanTieredPriceBillingCycleConfiguration
- type PlanNewParamsPricesNewPlanTieredPriceBillingCycleConfigurationDurationUnit
- type PlanNewParamsPricesNewPlanTieredPriceCadence
- type PlanNewParamsPricesNewPlanTieredPriceInvoicingCycleConfiguration
- type PlanNewParamsPricesNewPlanTieredPriceInvoicingCycleConfigurationDurationUnit
- type PlanNewParamsPricesNewPlanTieredPriceModelType
- type PlanNewParamsPricesNewPlanTieredPriceTieredConfig
- type PlanNewParamsPricesNewPlanTieredPriceTieredConfigTier
- type PlanNewParamsPricesNewPlanTieredWithMinimumPrice
- type PlanNewParamsPricesNewPlanTieredWithMinimumPriceBillingCycleConfiguration
- type PlanNewParamsPricesNewPlanTieredWithMinimumPriceBillingCycleConfigurationDurationUnit
- type PlanNewParamsPricesNewPlanTieredWithMinimumPriceCadence
- type PlanNewParamsPricesNewPlanTieredWithMinimumPriceInvoicingCycleConfiguration
- type PlanNewParamsPricesNewPlanTieredWithMinimumPriceInvoicingCycleConfigurationDurationUnit
- type PlanNewParamsPricesNewPlanTieredWithMinimumPriceModelType
- type PlanNewParamsPricesNewPlanUnitPrice
- type PlanNewParamsPricesNewPlanUnitPriceBillingCycleConfiguration
- type PlanNewParamsPricesNewPlanUnitPriceBillingCycleConfigurationDurationUnit
- type PlanNewParamsPricesNewPlanUnitPriceCadence
- type PlanNewParamsPricesNewPlanUnitPriceInvoicingCycleConfiguration
- type PlanNewParamsPricesNewPlanUnitPriceInvoicingCycleConfigurationDurationUnit
- type PlanNewParamsPricesNewPlanUnitPriceModelType
- type PlanNewParamsPricesNewPlanUnitPriceUnitConfig
- type PlanNewParamsPricesNewPlanUnitWithPercentPrice
- type PlanNewParamsPricesNewPlanUnitWithPercentPriceBillingCycleConfiguration
- type PlanNewParamsPricesNewPlanUnitWithPercentPriceBillingCycleConfigurationDurationUnit
- type PlanNewParamsPricesNewPlanUnitWithPercentPriceCadence
- type PlanNewParamsPricesNewPlanUnitWithPercentPriceInvoicingCycleConfiguration
- type PlanNewParamsPricesNewPlanUnitWithPercentPriceInvoicingCycleConfigurationDurationUnit
- type PlanNewParamsPricesNewPlanUnitWithPercentPriceModelType
- type PlanNewParamsPricesNewPlanUnitWithProrationPrice
- type PlanNewParamsPricesNewPlanUnitWithProrationPriceBillingCycleConfiguration
- type PlanNewParamsPricesNewPlanUnitWithProrationPriceBillingCycleConfigurationDurationUnit
- type PlanNewParamsPricesNewPlanUnitWithProrationPriceCadence
- type PlanNewParamsPricesNewPlanUnitWithProrationPriceInvoicingCycleConfiguration
- type PlanNewParamsPricesNewPlanUnitWithProrationPriceInvoicingCycleConfigurationDurationUnit
- type PlanNewParamsPricesNewPlanUnitWithProrationPriceModelType
- type PlanNewParamsStatus
- type PlanPlanPhase
- type PlanPlanPhasesDurationUnit
- type PlanPlanPhasesMaximum
- type PlanPlanPhasesMinimum
- type PlanProduct
- type PlanService
- func (r *PlanService) Fetch(ctx context.Context, planID string, opts ...option.RequestOption) (res *Plan, err error)
- func (r *PlanService) List(ctx context.Context, query PlanListParams, opts ...option.RequestOption) (res *pagination.Page[Plan], err error)
- func (r *PlanService) ListAutoPaging(ctx context.Context, query PlanListParams, opts ...option.RequestOption) *pagination.PageAutoPager[Plan]
- func (r *PlanService) New(ctx context.Context, body PlanNewParams, opts ...option.RequestOption) (res *Plan, err error)
- func (r *PlanService) Update(ctx context.Context, planID string, body PlanUpdateParams, ...) (res *Plan, err error)
- type PlanStatus
- type PlanTrialConfig
- type PlanTrialConfigTrialPeriodUnit
- type PlanUpdateParams
- type Price
- type PriceBpsPrice
- type PriceBpsPriceBillableMetric
- type PriceBpsPriceBillingCycleConfiguration
- type PriceBpsPriceBillingCycleConfigurationDurationUnit
- type PriceBpsPriceBpsConfig
- type PriceBpsPriceCadence
- type PriceBpsPriceCreditAllocation
- type PriceBpsPriceInvoicingCycleConfiguration
- type PriceBpsPriceInvoicingCycleConfigurationDurationUnit
- type PriceBpsPriceItem
- type PriceBpsPriceMaximum
- type PriceBpsPriceMinimum
- type PriceBpsPriceModelType
- type PriceBpsPricePriceType
- type PriceBulkBpsPrice
- type PriceBulkBpsPriceBillableMetric
- type PriceBulkBpsPriceBillingCycleConfiguration
- type PriceBulkBpsPriceBillingCycleConfigurationDurationUnit
- type PriceBulkBpsPriceBulkBpsConfig
- type PriceBulkBpsPriceBulkBpsConfigTier
- type PriceBulkBpsPriceCadence
- type PriceBulkBpsPriceCreditAllocation
- type PriceBulkBpsPriceInvoicingCycleConfiguration
- type PriceBulkBpsPriceInvoicingCycleConfigurationDurationUnit
- type PriceBulkBpsPriceItem
- type PriceBulkBpsPriceMaximum
- type PriceBulkBpsPriceMinimum
- type PriceBulkBpsPriceModelType
- type PriceBulkBpsPricePriceType
- type PriceBulkPrice
- type PriceBulkPriceBillableMetric
- type PriceBulkPriceBillingCycleConfiguration
- type PriceBulkPriceBillingCycleConfigurationDurationUnit
- type PriceBulkPriceBulkConfig
- type PriceBulkPriceBulkConfigTier
- type PriceBulkPriceCadence
- type PriceBulkPriceCreditAllocation
- type PriceBulkPriceInvoicingCycleConfiguration
- type PriceBulkPriceInvoicingCycleConfigurationDurationUnit
- type PriceBulkPriceItem
- type PriceBulkPriceMaximum
- type PriceBulkPriceMinimum
- type PriceBulkPriceModelType
- type PriceBulkPricePriceType
- type PriceBulkWithProrationPrice
- type PriceBulkWithProrationPriceBillableMetric
- type PriceBulkWithProrationPriceBillingCycleConfiguration
- type PriceBulkWithProrationPriceBillingCycleConfigurationDurationUnit
- type PriceBulkWithProrationPriceCadence
- type PriceBulkWithProrationPriceCreditAllocation
- type PriceBulkWithProrationPriceInvoicingCycleConfiguration
- type PriceBulkWithProrationPriceInvoicingCycleConfigurationDurationUnit
- type PriceBulkWithProrationPriceItem
- type PriceBulkWithProrationPriceMaximum
- type PriceBulkWithProrationPriceMinimum
- type PriceBulkWithProrationPriceModelType
- type PriceBulkWithProrationPricePriceType
- type PriceCadence
- type PriceEvaluateParams
- type PriceEvaluateResponse
- type PriceExternalPriceIDService
- type PriceExternalPriceIDUpdateParams
- type PriceGroupedAllocationPrice
- type PriceGroupedAllocationPriceBillableMetric
- type PriceGroupedAllocationPriceBillingCycleConfiguration
- type PriceGroupedAllocationPriceBillingCycleConfigurationDurationUnit
- type PriceGroupedAllocationPriceCadence
- type PriceGroupedAllocationPriceCreditAllocation
- type PriceGroupedAllocationPriceInvoicingCycleConfiguration
- type PriceGroupedAllocationPriceInvoicingCycleConfigurationDurationUnit
- type PriceGroupedAllocationPriceItem
- type PriceGroupedAllocationPriceMaximum
- type PriceGroupedAllocationPriceMinimum
- type PriceGroupedAllocationPriceModelType
- type PriceGroupedAllocationPricePriceType
- type PriceGroupedTieredPrice
- type PriceGroupedTieredPriceBillableMetric
- type PriceGroupedTieredPriceBillingCycleConfiguration
- type PriceGroupedTieredPriceBillingCycleConfigurationDurationUnit
- type PriceGroupedTieredPriceCadence
- type PriceGroupedTieredPriceCreditAllocation
- type PriceGroupedTieredPriceInvoicingCycleConfiguration
- type PriceGroupedTieredPriceInvoicingCycleConfigurationDurationUnit
- type PriceGroupedTieredPriceItem
- type PriceGroupedTieredPriceMaximum
- type PriceGroupedTieredPriceMinimum
- type PriceGroupedTieredPriceModelType
- type PriceGroupedTieredPricePriceType
- type PriceGroupedWithProratedMinimumPrice
- type PriceGroupedWithProratedMinimumPriceBillableMetric
- type PriceGroupedWithProratedMinimumPriceBillingCycleConfiguration
- type PriceGroupedWithProratedMinimumPriceBillingCycleConfigurationDurationUnit
- type PriceGroupedWithProratedMinimumPriceCadence
- type PriceGroupedWithProratedMinimumPriceCreditAllocation
- type PriceGroupedWithProratedMinimumPriceInvoicingCycleConfiguration
- type PriceGroupedWithProratedMinimumPriceInvoicingCycleConfigurationDurationUnit
- type PriceGroupedWithProratedMinimumPriceItem
- type PriceGroupedWithProratedMinimumPriceMaximum
- type PriceGroupedWithProratedMinimumPriceMinimum
- type PriceGroupedWithProratedMinimumPriceModelType
- type PriceGroupedWithProratedMinimumPricePriceType
- type PriceListParams
- type PriceMatrixPrice
- type PriceMatrixPriceBillableMetric
- type PriceMatrixPriceBillingCycleConfiguration
- type PriceMatrixPriceBillingCycleConfigurationDurationUnit
- type PriceMatrixPriceCadence
- type PriceMatrixPriceCreditAllocation
- type PriceMatrixPriceInvoicingCycleConfiguration
- type PriceMatrixPriceInvoicingCycleConfigurationDurationUnit
- type PriceMatrixPriceItem
- type PriceMatrixPriceMatrixConfig
- type PriceMatrixPriceMatrixConfigMatrixValue
- type PriceMatrixPriceMaximum
- type PriceMatrixPriceMinimum
- type PriceMatrixPriceModelType
- type PriceMatrixPricePriceType
- type PriceMatrixWithAllocationPrice
- type PriceMatrixWithAllocationPriceBillableMetric
- type PriceMatrixWithAllocationPriceBillingCycleConfiguration
- type PriceMatrixWithAllocationPriceBillingCycleConfigurationDurationUnit
- type PriceMatrixWithAllocationPriceCadence
- type PriceMatrixWithAllocationPriceCreditAllocation
- type PriceMatrixWithAllocationPriceInvoicingCycleConfiguration
- type PriceMatrixWithAllocationPriceInvoicingCycleConfigurationDurationUnit
- type PriceMatrixWithAllocationPriceItem
- type PriceMatrixWithAllocationPriceMatrixWithAllocationConfig
- type PriceMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue
- type PriceMatrixWithAllocationPriceMaximum
- type PriceMatrixWithAllocationPriceMinimum
- type PriceMatrixWithAllocationPriceModelType
- type PriceMatrixWithAllocationPricePriceType
- type PriceModelType
- type PriceNewParams
- type PriceNewParamsNewFloatingBpsPrice
- type PriceNewParamsNewFloatingBpsPriceBillingCycleConfiguration
- type PriceNewParamsNewFloatingBpsPriceBillingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingBpsPriceBpsConfig
- type PriceNewParamsNewFloatingBpsPriceCadence
- type PriceNewParamsNewFloatingBpsPriceInvoicingCycleConfiguration
- type PriceNewParamsNewFloatingBpsPriceInvoicingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingBpsPriceModelType
- type PriceNewParamsNewFloatingBulkBpsPrice
- type PriceNewParamsNewFloatingBulkBpsPriceBillingCycleConfiguration
- type PriceNewParamsNewFloatingBulkBpsPriceBillingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingBulkBpsPriceBulkBpsConfig
- type PriceNewParamsNewFloatingBulkBpsPriceBulkBpsConfigTier
- type PriceNewParamsNewFloatingBulkBpsPriceCadence
- type PriceNewParamsNewFloatingBulkBpsPriceInvoicingCycleConfiguration
- type PriceNewParamsNewFloatingBulkBpsPriceInvoicingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingBulkBpsPriceModelType
- type PriceNewParamsNewFloatingBulkPrice
- type PriceNewParamsNewFloatingBulkPriceBillingCycleConfiguration
- type PriceNewParamsNewFloatingBulkPriceBillingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingBulkPriceBulkConfig
- type PriceNewParamsNewFloatingBulkPriceBulkConfigTier
- type PriceNewParamsNewFloatingBulkPriceCadence
- type PriceNewParamsNewFloatingBulkPriceInvoicingCycleConfiguration
- type PriceNewParamsNewFloatingBulkPriceInvoicingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingBulkPriceModelType
- type PriceNewParamsNewFloatingBulkWithProrationPrice
- type PriceNewParamsNewFloatingBulkWithProrationPriceBillingCycleConfiguration
- type PriceNewParamsNewFloatingBulkWithProrationPriceBillingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingBulkWithProrationPriceCadence
- type PriceNewParamsNewFloatingBulkWithProrationPriceInvoicingCycleConfiguration
- type PriceNewParamsNewFloatingBulkWithProrationPriceInvoicingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingBulkWithProrationPriceModelType
- type PriceNewParamsNewFloatingGroupedAllocationPrice
- type PriceNewParamsNewFloatingGroupedAllocationPriceBillingCycleConfiguration
- type PriceNewParamsNewFloatingGroupedAllocationPriceBillingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingGroupedAllocationPriceCadence
- type PriceNewParamsNewFloatingGroupedAllocationPriceInvoicingCycleConfiguration
- type PriceNewParamsNewFloatingGroupedAllocationPriceInvoicingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingGroupedAllocationPriceModelType
- type PriceNewParamsNewFloatingGroupedTieredPrice
- type PriceNewParamsNewFloatingGroupedTieredPriceBillingCycleConfiguration
- type PriceNewParamsNewFloatingGroupedTieredPriceBillingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingGroupedTieredPriceCadence
- type PriceNewParamsNewFloatingGroupedTieredPriceInvoicingCycleConfiguration
- type PriceNewParamsNewFloatingGroupedTieredPriceInvoicingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingGroupedTieredPriceModelType
- type PriceNewParamsNewFloatingGroupedWithProratedMinimumPrice
- type PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfiguration
- type PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceCadence
- type PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfiguration
- type PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceModelType
- type PriceNewParamsNewFloatingMatrixPrice
- type PriceNewParamsNewFloatingMatrixPriceBillingCycleConfiguration
- type PriceNewParamsNewFloatingMatrixPriceBillingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingMatrixPriceCadence
- type PriceNewParamsNewFloatingMatrixPriceInvoicingCycleConfiguration
- type PriceNewParamsNewFloatingMatrixPriceInvoicingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingMatrixPriceMatrixConfig
- type PriceNewParamsNewFloatingMatrixPriceMatrixConfigMatrixValue
- type PriceNewParamsNewFloatingMatrixPriceModelType
- type PriceNewParamsNewFloatingMatrixWithAllocationPrice
- type PriceNewParamsNewFloatingMatrixWithAllocationPriceBillingCycleConfiguration
- type PriceNewParamsNewFloatingMatrixWithAllocationPriceBillingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingMatrixWithAllocationPriceCadence
- type PriceNewParamsNewFloatingMatrixWithAllocationPriceInvoicingCycleConfiguration
- type PriceNewParamsNewFloatingMatrixWithAllocationPriceInvoicingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfig
- type PriceNewParamsNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue
- type PriceNewParamsNewFloatingMatrixWithAllocationPriceModelType
- type PriceNewParamsNewFloatingPackagePrice
- type PriceNewParamsNewFloatingPackagePriceBillingCycleConfiguration
- type PriceNewParamsNewFloatingPackagePriceBillingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingPackagePriceCadence
- type PriceNewParamsNewFloatingPackagePriceInvoicingCycleConfiguration
- type PriceNewParamsNewFloatingPackagePriceInvoicingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingPackagePriceModelType
- type PriceNewParamsNewFloatingPackagePricePackageConfig
- type PriceNewParamsNewFloatingPackageWithAllocationPrice
- type PriceNewParamsNewFloatingPackageWithAllocationPriceBillingCycleConfiguration
- type PriceNewParamsNewFloatingPackageWithAllocationPriceBillingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingPackageWithAllocationPriceCadence
- type PriceNewParamsNewFloatingPackageWithAllocationPriceInvoicingCycleConfiguration
- type PriceNewParamsNewFloatingPackageWithAllocationPriceInvoicingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingPackageWithAllocationPriceModelType
- type PriceNewParamsNewFloatingThresholdTotalAmountPrice
- type PriceNewParamsNewFloatingThresholdTotalAmountPriceBillingCycleConfiguration
- type PriceNewParamsNewFloatingThresholdTotalAmountPriceBillingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingThresholdTotalAmountPriceCadence
- type PriceNewParamsNewFloatingThresholdTotalAmountPriceInvoicingCycleConfiguration
- type PriceNewParamsNewFloatingThresholdTotalAmountPriceInvoicingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingThresholdTotalAmountPriceModelType
- type PriceNewParamsNewFloatingTieredBpsPrice
- type PriceNewParamsNewFloatingTieredBpsPriceBillingCycleConfiguration
- type PriceNewParamsNewFloatingTieredBpsPriceBillingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingTieredBpsPriceCadence
- type PriceNewParamsNewFloatingTieredBpsPriceInvoicingCycleConfiguration
- type PriceNewParamsNewFloatingTieredBpsPriceInvoicingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingTieredBpsPriceModelType
- type PriceNewParamsNewFloatingTieredBpsPriceTieredBpsConfig
- type PriceNewParamsNewFloatingTieredBpsPriceTieredBpsConfigTier
- type PriceNewParamsNewFloatingTieredPackagePrice
- type PriceNewParamsNewFloatingTieredPackagePriceBillingCycleConfiguration
- type PriceNewParamsNewFloatingTieredPackagePriceBillingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingTieredPackagePriceCadence
- type PriceNewParamsNewFloatingTieredPackagePriceInvoicingCycleConfiguration
- type PriceNewParamsNewFloatingTieredPackagePriceInvoicingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingTieredPackagePriceModelType
- type PriceNewParamsNewFloatingTieredPackageWithMinimumPrice
- type PriceNewParamsNewFloatingTieredPackageWithMinimumPriceBillingCycleConfiguration
- type PriceNewParamsNewFloatingTieredPackageWithMinimumPriceBillingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingTieredPackageWithMinimumPriceCadence
- type PriceNewParamsNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfiguration
- type PriceNewParamsNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingTieredPackageWithMinimumPriceModelType
- type PriceNewParamsNewFloatingTieredPrice
- type PriceNewParamsNewFloatingTieredPriceBillingCycleConfiguration
- type PriceNewParamsNewFloatingTieredPriceBillingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingTieredPriceCadence
- type PriceNewParamsNewFloatingTieredPriceInvoicingCycleConfiguration
- type PriceNewParamsNewFloatingTieredPriceInvoicingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingTieredPriceModelType
- type PriceNewParamsNewFloatingTieredPriceTieredConfig
- type PriceNewParamsNewFloatingTieredPriceTieredConfigTier
- type PriceNewParamsNewFloatingTieredWithMinimumPrice
- type PriceNewParamsNewFloatingTieredWithMinimumPriceBillingCycleConfiguration
- type PriceNewParamsNewFloatingTieredWithMinimumPriceBillingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingTieredWithMinimumPriceCadence
- type PriceNewParamsNewFloatingTieredWithMinimumPriceInvoicingCycleConfiguration
- type PriceNewParamsNewFloatingTieredWithMinimumPriceInvoicingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingTieredWithMinimumPriceModelType
- type PriceNewParamsNewFloatingTieredWithProrationPrice
- type PriceNewParamsNewFloatingTieredWithProrationPriceBillingCycleConfiguration
- type PriceNewParamsNewFloatingTieredWithProrationPriceBillingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingTieredWithProrationPriceCadence
- type PriceNewParamsNewFloatingTieredWithProrationPriceInvoicingCycleConfiguration
- type PriceNewParamsNewFloatingTieredWithProrationPriceInvoicingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingTieredWithProrationPriceModelType
- type PriceNewParamsNewFloatingUnitPrice
- type PriceNewParamsNewFloatingUnitPriceBillingCycleConfiguration
- type PriceNewParamsNewFloatingUnitPriceBillingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingUnitPriceCadence
- type PriceNewParamsNewFloatingUnitPriceInvoicingCycleConfiguration
- type PriceNewParamsNewFloatingUnitPriceInvoicingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingUnitPriceModelType
- type PriceNewParamsNewFloatingUnitPriceUnitConfig
- type PriceNewParamsNewFloatingUnitWithPercentPrice
- type PriceNewParamsNewFloatingUnitWithPercentPriceBillingCycleConfiguration
- type PriceNewParamsNewFloatingUnitWithPercentPriceBillingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingUnitWithPercentPriceCadence
- type PriceNewParamsNewFloatingUnitWithPercentPriceInvoicingCycleConfiguration
- type PriceNewParamsNewFloatingUnitWithPercentPriceInvoicingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingUnitWithPercentPriceModelType
- type PriceNewParamsNewFloatingUnitWithProrationPrice
- type PriceNewParamsNewFloatingUnitWithProrationPriceBillingCycleConfiguration
- type PriceNewParamsNewFloatingUnitWithProrationPriceBillingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingUnitWithProrationPriceCadence
- type PriceNewParamsNewFloatingUnitWithProrationPriceInvoicingCycleConfiguration
- type PriceNewParamsNewFloatingUnitWithProrationPriceInvoicingCycleConfigurationDurationUnit
- type PriceNewParamsNewFloatingUnitWithProrationPriceModelType
- type PricePackagePrice
- type PricePackagePriceBillableMetric
- type PricePackagePriceBillingCycleConfiguration
- type PricePackagePriceBillingCycleConfigurationDurationUnit
- type PricePackagePriceCadence
- type PricePackagePriceCreditAllocation
- type PricePackagePriceInvoicingCycleConfiguration
- type PricePackagePriceInvoicingCycleConfigurationDurationUnit
- type PricePackagePriceItem
- type PricePackagePriceMaximum
- type PricePackagePriceMinimum
- type PricePackagePriceModelType
- type PricePackagePricePackageConfig
- type PricePackagePricePriceType
- type PricePackageWithAllocationPrice
- type PricePackageWithAllocationPriceBillableMetric
- type PricePackageWithAllocationPriceBillingCycleConfiguration
- type PricePackageWithAllocationPriceBillingCycleConfigurationDurationUnit
- type PricePackageWithAllocationPriceCadence
- type PricePackageWithAllocationPriceCreditAllocation
- type PricePackageWithAllocationPriceInvoicingCycleConfiguration
- type PricePackageWithAllocationPriceInvoicingCycleConfigurationDurationUnit
- type PricePackageWithAllocationPriceItem
- type PricePackageWithAllocationPriceMaximum
- type PricePackageWithAllocationPriceMinimum
- type PricePackageWithAllocationPriceModelType
- type PricePackageWithAllocationPricePriceType
- type PricePriceType
- type PriceService
- func (r *PriceService) Evaluate(ctx context.Context, priceID string, body PriceEvaluateParams, ...) (res *PriceEvaluateResponse, err error)
- func (r *PriceService) Fetch(ctx context.Context, priceID string, opts ...option.RequestOption) (res *Price, err error)
- func (r *PriceService) List(ctx context.Context, query PriceListParams, opts ...option.RequestOption) (res *pagination.Page[Price], err error)
- func (r *PriceService) ListAutoPaging(ctx context.Context, query PriceListParams, opts ...option.RequestOption) *pagination.PageAutoPager[Price]
- func (r *PriceService) New(ctx context.Context, body PriceNewParams, opts ...option.RequestOption) (res *Price, err error)
- func (r *PriceService) Update(ctx context.Context, priceID string, body PriceUpdateParams, ...) (res *Price, err error)
- type PriceThresholdTotalAmountPrice
- type PriceThresholdTotalAmountPriceBillableMetric
- type PriceThresholdTotalAmountPriceBillingCycleConfiguration
- type PriceThresholdTotalAmountPriceBillingCycleConfigurationDurationUnit
- type PriceThresholdTotalAmountPriceCadence
- type PriceThresholdTotalAmountPriceCreditAllocation
- type PriceThresholdTotalAmountPriceInvoicingCycleConfiguration
- type PriceThresholdTotalAmountPriceInvoicingCycleConfigurationDurationUnit
- type PriceThresholdTotalAmountPriceItem
- type PriceThresholdTotalAmountPriceMaximum
- type PriceThresholdTotalAmountPriceMinimum
- type PriceThresholdTotalAmountPriceModelType
- type PriceThresholdTotalAmountPricePriceType
- type PriceTieredBpsPrice
- type PriceTieredBpsPriceBillableMetric
- type PriceTieredBpsPriceBillingCycleConfiguration
- type PriceTieredBpsPriceBillingCycleConfigurationDurationUnit
- type PriceTieredBpsPriceCadence
- type PriceTieredBpsPriceCreditAllocation
- type PriceTieredBpsPriceInvoicingCycleConfiguration
- type PriceTieredBpsPriceInvoicingCycleConfigurationDurationUnit
- type PriceTieredBpsPriceItem
- type PriceTieredBpsPriceMaximum
- type PriceTieredBpsPriceMinimum
- type PriceTieredBpsPriceModelType
- type PriceTieredBpsPricePriceType
- type PriceTieredBpsPriceTieredBpsConfig
- type PriceTieredBpsPriceTieredBpsConfigTier
- type PriceTieredPackagePrice
- type PriceTieredPackagePriceBillableMetric
- type PriceTieredPackagePriceBillingCycleConfiguration
- type PriceTieredPackagePriceBillingCycleConfigurationDurationUnit
- type PriceTieredPackagePriceCadence
- type PriceTieredPackagePriceCreditAllocation
- type PriceTieredPackagePriceInvoicingCycleConfiguration
- type PriceTieredPackagePriceInvoicingCycleConfigurationDurationUnit
- type PriceTieredPackagePriceItem
- type PriceTieredPackagePriceMaximum
- type PriceTieredPackagePriceMinimum
- type PriceTieredPackagePriceModelType
- type PriceTieredPackagePricePriceType
- type PriceTieredPackageWithMinimumPrice
- type PriceTieredPackageWithMinimumPriceBillableMetric
- type PriceTieredPackageWithMinimumPriceBillingCycleConfiguration
- type PriceTieredPackageWithMinimumPriceBillingCycleConfigurationDurationUnit
- type PriceTieredPackageWithMinimumPriceCadence
- type PriceTieredPackageWithMinimumPriceCreditAllocation
- type PriceTieredPackageWithMinimumPriceInvoicingCycleConfiguration
- type PriceTieredPackageWithMinimumPriceInvoicingCycleConfigurationDurationUnit
- type PriceTieredPackageWithMinimumPriceItem
- type PriceTieredPackageWithMinimumPriceMaximum
- type PriceTieredPackageWithMinimumPriceMinimum
- type PriceTieredPackageWithMinimumPriceModelType
- type PriceTieredPackageWithMinimumPricePriceType
- type PriceTieredPrice
- type PriceTieredPriceBillableMetric
- type PriceTieredPriceBillingCycleConfiguration
- type PriceTieredPriceBillingCycleConfigurationDurationUnit
- type PriceTieredPriceCadence
- type PriceTieredPriceCreditAllocation
- type PriceTieredPriceInvoicingCycleConfiguration
- type PriceTieredPriceInvoicingCycleConfigurationDurationUnit
- type PriceTieredPriceItem
- type PriceTieredPriceMaximum
- type PriceTieredPriceMinimum
- type PriceTieredPriceModelType
- type PriceTieredPricePriceType
- type PriceTieredPriceTieredConfig
- type PriceTieredPriceTieredConfigTier
- type PriceTieredWithMinimumPrice
- type PriceTieredWithMinimumPriceBillableMetric
- type PriceTieredWithMinimumPriceBillingCycleConfiguration
- type PriceTieredWithMinimumPriceBillingCycleConfigurationDurationUnit
- type PriceTieredWithMinimumPriceCadence
- type PriceTieredWithMinimumPriceCreditAllocation
- type PriceTieredWithMinimumPriceInvoicingCycleConfiguration
- type PriceTieredWithMinimumPriceInvoicingCycleConfigurationDurationUnit
- type PriceTieredWithMinimumPriceItem
- type PriceTieredWithMinimumPriceMaximum
- type PriceTieredWithMinimumPriceMinimum
- type PriceTieredWithMinimumPriceModelType
- type PriceTieredWithMinimumPricePriceType
- type PriceTieredWithProrationPrice
- type PriceTieredWithProrationPriceBillableMetric
- type PriceTieredWithProrationPriceBillingCycleConfiguration
- type PriceTieredWithProrationPriceBillingCycleConfigurationDurationUnit
- type PriceTieredWithProrationPriceCadence
- type PriceTieredWithProrationPriceCreditAllocation
- type PriceTieredWithProrationPriceInvoicingCycleConfiguration
- type PriceTieredWithProrationPriceInvoicingCycleConfigurationDurationUnit
- type PriceTieredWithProrationPriceItem
- type PriceTieredWithProrationPriceMaximum
- type PriceTieredWithProrationPriceMinimum
- type PriceTieredWithProrationPriceModelType
- type PriceTieredWithProrationPricePriceType
- type PriceUnion
- type PriceUnitPrice
- type PriceUnitPriceBillableMetric
- type PriceUnitPriceBillingCycleConfiguration
- type PriceUnitPriceBillingCycleConfigurationDurationUnit
- type PriceUnitPriceCadence
- type PriceUnitPriceCreditAllocation
- type PriceUnitPriceInvoicingCycleConfiguration
- type PriceUnitPriceInvoicingCycleConfigurationDurationUnit
- type PriceUnitPriceItem
- type PriceUnitPriceMaximum
- type PriceUnitPriceMinimum
- type PriceUnitPriceModelType
- type PriceUnitPricePriceType
- type PriceUnitPriceUnitConfig
- type PriceUnitWithPercentPrice
- type PriceUnitWithPercentPriceBillableMetric
- type PriceUnitWithPercentPriceBillingCycleConfiguration
- type PriceUnitWithPercentPriceBillingCycleConfigurationDurationUnit
- type PriceUnitWithPercentPriceCadence
- type PriceUnitWithPercentPriceCreditAllocation
- type PriceUnitWithPercentPriceInvoicingCycleConfiguration
- type PriceUnitWithPercentPriceInvoicingCycleConfigurationDurationUnit
- type PriceUnitWithPercentPriceItem
- type PriceUnitWithPercentPriceMaximum
- type PriceUnitWithPercentPriceMinimum
- type PriceUnitWithPercentPriceModelType
- type PriceUnitWithPercentPricePriceType
- type PriceUnitWithProrationPrice
- type PriceUnitWithProrationPriceBillableMetric
- type PriceUnitWithProrationPriceBillingCycleConfiguration
- type PriceUnitWithProrationPriceBillingCycleConfigurationDurationUnit
- type PriceUnitWithProrationPriceCadence
- type PriceUnitWithProrationPriceCreditAllocation
- type PriceUnitWithProrationPriceInvoicingCycleConfiguration
- type PriceUnitWithProrationPriceInvoicingCycleConfigurationDurationUnit
- type PriceUnitWithProrationPriceItem
- type PriceUnitWithProrationPriceMaximum
- type PriceUnitWithProrationPriceMinimum
- type PriceUnitWithProrationPriceModelType
- type PriceUnitWithProrationPricePriceType
- type PriceUpdateParams
- type Subscription
- type SubscriptionAdjustmentInterval
- type SubscriptionAdjustmentIntervalsAdjustment
- type SubscriptionAdjustmentIntervalsAdjustmentAdjustmentType
- type SubscriptionAdjustmentIntervalsAdjustmentAmountDiscountAdjustment
- type SubscriptionAdjustmentIntervalsAdjustmentAmountDiscountAdjustmentAdjustmentType
- type SubscriptionAdjustmentIntervalsAdjustmentMaximumAdjustment
- type SubscriptionAdjustmentIntervalsAdjustmentMaximumAdjustmentAdjustmentType
- type SubscriptionAdjustmentIntervalsAdjustmentMinimumAdjustment
- type SubscriptionAdjustmentIntervalsAdjustmentMinimumAdjustmentAdjustmentType
- type SubscriptionAdjustmentIntervalsAdjustmentPercentageDiscountAdjustment
- type SubscriptionAdjustmentIntervalsAdjustmentPercentageDiscountAdjustmentAdjustmentType
- type SubscriptionAdjustmentIntervalsAdjustmentUnion
- type SubscriptionAdjustmentIntervalsAdjustmentUsageDiscountAdjustment
- type SubscriptionAdjustmentIntervalsAdjustmentUsageDiscountAdjustmentAdjustmentType
- type SubscriptionBillingCycleAnchorConfiguration
- type SubscriptionCancelParams
- type SubscriptionCancelParamsCancelOption
- type SubscriptionDiscountInterval
- type SubscriptionDiscountIntervalsAmountDiscountInterval
- type SubscriptionDiscountIntervalsAmountDiscountIntervalDiscountType
- type SubscriptionDiscountIntervalsDiscountType
- type SubscriptionDiscountIntervalsPercentageDiscountInterval
- type SubscriptionDiscountIntervalsPercentageDiscountIntervalDiscountType
- type SubscriptionDiscountIntervalsUnion
- type SubscriptionDiscountIntervalsUsageDiscountInterval
- type SubscriptionDiscountIntervalsUsageDiscountIntervalDiscountType
- type SubscriptionFetchCostsParams
- type SubscriptionFetchCostsParamsViewMode
- type SubscriptionFetchCostsResponse
- type SubscriptionFetchCostsResponseData
- type SubscriptionFetchCostsResponseDataPerPriceCost
- type SubscriptionFetchScheduleParams
- type SubscriptionFetchScheduleResponse
- type SubscriptionFetchScheduleResponsePlan
- type SubscriptionFetchUsageParams
- type SubscriptionFetchUsageParamsGranularity
- type SubscriptionFetchUsageParamsViewMode
- type SubscriptionFixedFeeQuantitySchedule
- type SubscriptionListParams
- type SubscriptionListParamsStatus
- type SubscriptionMaximumInterval
- type SubscriptionMinimumInterval
- type SubscriptionNewParams
- type SubscriptionNewParamsBillingCycleAnchorConfiguration
- type SubscriptionNewParamsExternalMarketplace
- type SubscriptionNewParamsPriceOverride
- type SubscriptionNewParamsPriceOverrideUnion
- type SubscriptionNewParamsPriceOverridesModelType
- type SubscriptionNewParamsPriceOverridesOverrideBpsPrice
- type SubscriptionNewParamsPriceOverridesOverrideBpsPriceBpsConfig
- type SubscriptionNewParamsPriceOverridesOverrideBpsPriceDiscount
- type SubscriptionNewParamsPriceOverridesOverrideBpsPriceDiscountDiscountType
- type SubscriptionNewParamsPriceOverridesOverrideBpsPriceModelType
- type SubscriptionNewParamsPriceOverridesOverrideBulkBpsPrice
- type SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceBulkBpsConfig
- type SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceBulkBpsConfigTier
- type SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceDiscount
- type SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceDiscountDiscountType
- type SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceModelType
- type SubscriptionNewParamsPriceOverridesOverrideBulkPrice
- type SubscriptionNewParamsPriceOverridesOverrideBulkPriceBulkConfig
- type SubscriptionNewParamsPriceOverridesOverrideBulkPriceBulkConfigTier
- type SubscriptionNewParamsPriceOverridesOverrideBulkPriceDiscount
- type SubscriptionNewParamsPriceOverridesOverrideBulkPriceDiscountDiscountType
- type SubscriptionNewParamsPriceOverridesOverrideBulkPriceModelType
- type SubscriptionNewParamsPriceOverridesOverrideBulkWithProrationPrice
- type SubscriptionNewParamsPriceOverridesOverrideBulkWithProrationPriceDiscount
- type SubscriptionNewParamsPriceOverridesOverrideBulkWithProrationPriceDiscountDiscountType
- type SubscriptionNewParamsPriceOverridesOverrideBulkWithProrationPriceModelType
- type SubscriptionNewParamsPriceOverridesOverrideGroupedAllocationPrice
- type SubscriptionNewParamsPriceOverridesOverrideGroupedAllocationPriceDiscount
- type SubscriptionNewParamsPriceOverridesOverrideGroupedAllocationPriceDiscountDiscountType
- type SubscriptionNewParamsPriceOverridesOverrideGroupedAllocationPriceModelType
- type SubscriptionNewParamsPriceOverridesOverrideGroupedWithProratedMinimumPrice
- type SubscriptionNewParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceDiscount
- type SubscriptionNewParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceDiscountDiscountType
- type SubscriptionNewParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceModelType
- type SubscriptionNewParamsPriceOverridesOverrideMatrixPrice
- type SubscriptionNewParamsPriceOverridesOverrideMatrixPriceDiscount
- type SubscriptionNewParamsPriceOverridesOverrideMatrixPriceDiscountDiscountType
- type SubscriptionNewParamsPriceOverridesOverrideMatrixPriceMatrixConfig
- type SubscriptionNewParamsPriceOverridesOverrideMatrixPriceMatrixConfigMatrixValue
- type SubscriptionNewParamsPriceOverridesOverrideMatrixPriceModelType
- type SubscriptionNewParamsPriceOverridesOverridePackagePrice
- type SubscriptionNewParamsPriceOverridesOverridePackagePriceDiscount
- type SubscriptionNewParamsPriceOverridesOverridePackagePriceDiscountDiscountType
- type SubscriptionNewParamsPriceOverridesOverridePackagePriceModelType
- type SubscriptionNewParamsPriceOverridesOverridePackagePricePackageConfig
- type SubscriptionNewParamsPriceOverridesOverridePackageWithAllocationPrice
- type SubscriptionNewParamsPriceOverridesOverridePackageWithAllocationPriceDiscount
- type SubscriptionNewParamsPriceOverridesOverridePackageWithAllocationPriceDiscountDiscountType
- type SubscriptionNewParamsPriceOverridesOverridePackageWithAllocationPriceModelType
- type SubscriptionNewParamsPriceOverridesOverrideThresholdTotalAmountPrice
- type SubscriptionNewParamsPriceOverridesOverrideThresholdTotalAmountPriceDiscount
- type SubscriptionNewParamsPriceOverridesOverrideThresholdTotalAmountPriceDiscountDiscountType
- type SubscriptionNewParamsPriceOverridesOverrideThresholdTotalAmountPriceModelType
- type SubscriptionNewParamsPriceOverridesOverrideTieredBpsPrice
- type SubscriptionNewParamsPriceOverridesOverrideTieredBpsPriceDiscount
- type SubscriptionNewParamsPriceOverridesOverrideTieredBpsPriceDiscountDiscountType
- type SubscriptionNewParamsPriceOverridesOverrideTieredBpsPriceModelType
- type SubscriptionNewParamsPriceOverridesOverrideTieredBpsPriceTieredBpsConfig
- type SubscriptionNewParamsPriceOverridesOverrideTieredBpsPriceTieredBpsConfigTier
- type SubscriptionNewParamsPriceOverridesOverrideTieredPackagePrice
- type SubscriptionNewParamsPriceOverridesOverrideTieredPackagePriceDiscount
- type SubscriptionNewParamsPriceOverridesOverrideTieredPackagePriceDiscountDiscountType
- type SubscriptionNewParamsPriceOverridesOverrideTieredPackagePriceModelType
- type SubscriptionNewParamsPriceOverridesOverrideTieredPrice
- type SubscriptionNewParamsPriceOverridesOverrideTieredPriceDiscount
- type SubscriptionNewParamsPriceOverridesOverrideTieredPriceDiscountDiscountType
- type SubscriptionNewParamsPriceOverridesOverrideTieredPriceModelType
- type SubscriptionNewParamsPriceOverridesOverrideTieredPriceTieredConfig
- type SubscriptionNewParamsPriceOverridesOverrideTieredPriceTieredConfigTier
- type SubscriptionNewParamsPriceOverridesOverrideTieredWithMinimumPrice
- type SubscriptionNewParamsPriceOverridesOverrideTieredWithMinimumPriceDiscount
- type SubscriptionNewParamsPriceOverridesOverrideTieredWithMinimumPriceDiscountDiscountType
- type SubscriptionNewParamsPriceOverridesOverrideTieredWithMinimumPriceModelType
- type SubscriptionNewParamsPriceOverridesOverrideTieredWithProrationPrice
- type SubscriptionNewParamsPriceOverridesOverrideTieredWithProrationPriceDiscount
- type SubscriptionNewParamsPriceOverridesOverrideTieredWithProrationPriceDiscountDiscountType
- type SubscriptionNewParamsPriceOverridesOverrideTieredWithProrationPriceModelType
- type SubscriptionNewParamsPriceOverridesOverrideUnitPrice
- type SubscriptionNewParamsPriceOverridesOverrideUnitPriceDiscount
- type SubscriptionNewParamsPriceOverridesOverrideUnitPriceDiscountDiscountType
- type SubscriptionNewParamsPriceOverridesOverrideUnitPriceModelType
- type SubscriptionNewParamsPriceOverridesOverrideUnitPriceUnitConfig
- type SubscriptionNewParamsPriceOverridesOverrideUnitWithPercentPrice
- type SubscriptionNewParamsPriceOverridesOverrideUnitWithPercentPriceDiscount
- type SubscriptionNewParamsPriceOverridesOverrideUnitWithPercentPriceDiscountDiscountType
- type SubscriptionNewParamsPriceOverridesOverrideUnitWithPercentPriceModelType
- type SubscriptionNewParamsPriceOverridesOverrideUnitWithProrationPrice
- type SubscriptionNewParamsPriceOverridesOverrideUnitWithProrationPriceDiscount
- type SubscriptionNewParamsPriceOverridesOverrideUnitWithProrationPriceDiscountDiscountType
- type SubscriptionNewParamsPriceOverridesOverrideUnitWithProrationPriceModelType
- type SubscriptionPriceInterval
- type SubscriptionPriceIntervalsFixedFeeQuantityTransition
- type SubscriptionPriceIntervalsParams
- type SubscriptionPriceIntervalsParamsAdd
- type SubscriptionPriceIntervalsParamsAddAdjustment
- type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustment
- type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentAdjustmentType
- type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewAmountDiscount
- type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewAmountDiscountAdjustmentType
- type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewMaximum
- type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewMaximumAdjustmentType
- type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewMinimum
- type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewMinimumAdjustmentType
- type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewPercentageDiscount
- type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewPercentageDiscountAdjustmentType
- type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentUnion
- type SubscriptionPriceIntervalsParamsAddAdjustmentsEndDateUnion
- type SubscriptionPriceIntervalsParamsAddAdjustmentsStartDateUnion
- type SubscriptionPriceIntervalsParamsAddAllocationPrice
- type SubscriptionPriceIntervalsParamsAddAllocationPriceCadence
- type SubscriptionPriceIntervalsParamsAddDiscount
- type SubscriptionPriceIntervalsParamsAddDiscountUnion
- type SubscriptionPriceIntervalsParamsAddDiscountsAmountDiscountCreationParams
- type SubscriptionPriceIntervalsParamsAddDiscountsAmountDiscountCreationParamsDiscountType
- type SubscriptionPriceIntervalsParamsAddDiscountsDiscountType
- type SubscriptionPriceIntervalsParamsAddDiscountsPercentageDiscountCreationParams
- type SubscriptionPriceIntervalsParamsAddDiscountsPercentageDiscountCreationParamsDiscountType
- type SubscriptionPriceIntervalsParamsAddDiscountsUsageDiscountCreationParams
- type SubscriptionPriceIntervalsParamsAddDiscountsUsageDiscountCreationParamsDiscountType
- type SubscriptionPriceIntervalsParamsAddEndDateUnion
- type SubscriptionPriceIntervalsParamsAddFixedFeeQuantityTransition
- type SubscriptionPriceIntervalsParamsAddPrice
- type SubscriptionPriceIntervalsParamsAddPriceCadence
- type SubscriptionPriceIntervalsParamsAddPriceModelType
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPrice
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceBillingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceBillingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceBpsConfig
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceCadence
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceInvoicingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceInvoicingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceModelType
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPrice
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceBillingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceBillingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceBulkBpsConfig
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceBulkBpsConfigTier
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceCadence
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceInvoicingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceInvoicingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceModelType
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPrice
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceBillingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceBillingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceBulkConfig
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceBulkConfigTier
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceCadence
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceInvoicingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceInvoicingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceModelType
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPrice
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceBillingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceBillingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceCadence
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceInvoicingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceInvoicingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceModelType
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPrice
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceBillingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceBillingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceCadence
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceInvoicingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceInvoicingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceModelType
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPrice
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceBillingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceBillingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceCadence
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceInvoicingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceInvoicingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceModelType
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPrice
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceCadence
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceModelType
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPrice
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceBillingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceBillingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceCadence
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceInvoicingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceInvoicingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceMatrixConfig
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceMatrixConfigMatrixValue
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceModelType
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPrice
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceBillingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceBillingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceCadence
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceInvoicingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceInvoicingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfig
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceModelType
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePrice
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceBillingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceBillingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceCadence
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceInvoicingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceInvoicingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceModelType
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePricePackageConfig
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPrice
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceBillingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceBillingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceCadence
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceInvoicingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceInvoicingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceModelType
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPrice
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceBillingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceBillingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceCadence
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceInvoicingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceInvoicingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceModelType
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPrice
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceBillingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceBillingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceCadence
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceInvoicingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceInvoicingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceModelType
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceTieredBpsConfig
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceTieredBpsConfigTier
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePrice
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceBillingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceBillingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceCadence
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceInvoicingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceInvoicingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceModelType
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPrice
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceBillingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceBillingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceCadence
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceModelType
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPrice
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceBillingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceBillingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceCadence
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceInvoicingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceInvoicingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceModelType
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceTieredConfig
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceTieredConfigTier
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPrice
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceBillingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceBillingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceCadence
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceInvoicingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceInvoicingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceModelType
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPrice
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceBillingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceBillingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceCadence
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceInvoicingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceInvoicingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceModelType
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPrice
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceBillingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceBillingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceCadence
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceInvoicingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceInvoicingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceModelType
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceUnitConfig
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPrice
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceBillingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceBillingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceCadence
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceInvoicingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceInvoicingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceModelType
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPrice
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceBillingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceBillingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceCadence
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceInvoicingCycleConfiguration
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceInvoicingCycleConfigurationDurationUnit
- type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceModelType
- type SubscriptionPriceIntervalsParamsAddPriceUnion
- type SubscriptionPriceIntervalsParamsAddStartDateUnion
- type SubscriptionPriceIntervalsParamsEdit
- type SubscriptionPriceIntervalsParamsEditAdjustment
- type SubscriptionPriceIntervalsParamsEditAdjustmentsEndDateUnion
- type SubscriptionPriceIntervalsParamsEditAdjustmentsStartDateUnion
- type SubscriptionPriceIntervalsParamsEditEndDateUnion
- type SubscriptionPriceIntervalsParamsEditFixedFeeQuantityTransition
- type SubscriptionPriceIntervalsParamsEditStartDateUnion
- type SubscriptionRedeemedCoupon
- type SubscriptionSchedulePlanChangeParams
- type SubscriptionSchedulePlanChangeParamsBillingCycleAlignment
- type SubscriptionSchedulePlanChangeParamsChangeOption
- type SubscriptionSchedulePlanChangeParamsPriceOverride
- type SubscriptionSchedulePlanChangeParamsPriceOverrideUnion
- type SubscriptionSchedulePlanChangeParamsPriceOverridesModelType
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBpsPrice
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBpsPriceBpsConfig
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBpsPriceDiscount
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBpsPriceDiscountDiscountType
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBpsPriceModelType
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPrice
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPriceBulkBpsConfig
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPriceBulkBpsConfigTier
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPriceDiscount
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPriceDiscountDiscountType
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPriceModelType
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPrice
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPriceBulkConfig
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPriceBulkConfigTier
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPriceDiscount
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPriceDiscountDiscountType
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPriceModelType
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkWithProrationPrice
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkWithProrationPriceDiscount
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkWithProrationPriceDiscountDiscountType
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkWithProrationPriceModelType
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedAllocationPrice
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedAllocationPriceDiscount
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedAllocationPriceDiscountDiscountType
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedAllocationPriceModelType
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedWithProratedMinimumPrice
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceDiscount
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceDiscountDiscountType
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceModelType
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPrice
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPriceDiscount
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPriceDiscountDiscountType
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPriceMatrixConfig
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPriceMatrixConfigMatrixValue
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPriceModelType
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackagePrice
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackagePriceDiscount
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackagePriceDiscountDiscountType
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackagePriceModelType
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackagePricePackageConfig
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackageWithAllocationPrice
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackageWithAllocationPriceDiscount
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackageWithAllocationPriceDiscountDiscountType
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackageWithAllocationPriceModelType
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideThresholdTotalAmountPrice
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideThresholdTotalAmountPriceDiscount
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideThresholdTotalAmountPriceDiscountDiscountType
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideThresholdTotalAmountPriceModelType
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPrice
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPriceDiscount
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPriceDiscountDiscountType
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPriceModelType
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPriceTieredBpsConfig
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPriceTieredBpsConfigTier
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPackagePrice
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPackagePriceDiscount
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPackagePriceDiscountDiscountType
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPackagePriceModelType
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPrice
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPriceDiscount
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPriceDiscountDiscountType
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPriceModelType
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPriceTieredConfig
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPriceTieredConfigTier
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithMinimumPrice
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithMinimumPriceDiscount
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithMinimumPriceDiscountDiscountType
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithMinimumPriceModelType
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithProrationPrice
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithProrationPriceDiscount
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithProrationPriceDiscountDiscountType
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithProrationPriceModelType
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitPrice
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitPriceDiscount
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitPriceDiscountDiscountType
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitPriceModelType
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitPriceUnitConfig
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithPercentPrice
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithPercentPriceDiscount
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithPercentPriceDiscountDiscountType
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithPercentPriceModelType
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithProrationPrice
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithProrationPriceDiscount
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithProrationPriceDiscountDiscountType
- type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithProrationPriceModelType
- type SubscriptionService
- func (r *SubscriptionService) Cancel(ctx context.Context, subscriptionID string, body SubscriptionCancelParams, ...) (res *Subscription, err error)
- func (r *SubscriptionService) Fetch(ctx context.Context, subscriptionID string, opts ...option.RequestOption) (res *Subscription, err error)
- func (r *SubscriptionService) FetchCosts(ctx context.Context, subscriptionID string, query SubscriptionFetchCostsParams, ...) (res *SubscriptionFetchCostsResponse, err error)
- func (r *SubscriptionService) FetchSchedule(ctx context.Context, subscriptionID string, ...) (res *pagination.Page[SubscriptionFetchScheduleResponse], err error)
- func (r *SubscriptionService) FetchScheduleAutoPaging(ctx context.Context, subscriptionID string, ...) *pagination.PageAutoPager[SubscriptionFetchScheduleResponse]
- func (r *SubscriptionService) FetchUsage(ctx context.Context, subscriptionID string, query SubscriptionFetchUsageParams, ...) (res *SubscriptionUsage, err error)
- func (r *SubscriptionService) List(ctx context.Context, query SubscriptionListParams, ...) (res *pagination.Page[Subscription], err error)
- func (r *SubscriptionService) ListAutoPaging(ctx context.Context, query SubscriptionListParams, ...) *pagination.PageAutoPager[Subscription]
- func (r *SubscriptionService) New(ctx context.Context, body SubscriptionNewParams, opts ...option.RequestOption) (res *Subscription, err error)
- func (r *SubscriptionService) PriceIntervals(ctx context.Context, subscriptionID string, ...) (res *Subscription, err error)
- func (r *SubscriptionService) SchedulePlanChange(ctx context.Context, subscriptionID string, ...) (res *Subscription, err error)
- func (r *SubscriptionService) TriggerPhase(ctx context.Context, subscriptionID string, ...) (res *Subscription, err error)
- func (r *SubscriptionService) UnscheduleCancellation(ctx context.Context, subscriptionID string, opts ...option.RequestOption) (res *Subscription, err error)
- func (r *SubscriptionService) UnscheduleFixedFeeQuantityUpdates(ctx context.Context, subscriptionID string, ...) (res *Subscription, err error)
- func (r *SubscriptionService) UnschedulePendingPlanChanges(ctx context.Context, subscriptionID string, opts ...option.RequestOption) (res *Subscription, err error)
- func (r *SubscriptionService) Update(ctx context.Context, subscriptionID string, body SubscriptionUpdateParams, ...) (res *Subscription, err error)
- func (r *SubscriptionService) UpdateFixedFeeQuantity(ctx context.Context, subscriptionID string, ...) (res *Subscription, err error)
- type SubscriptionStatus
- type SubscriptionTrialInfo
- type SubscriptionTriggerPhaseParams
- type SubscriptionUnscheduleFixedFeeQuantityUpdatesParams
- type SubscriptionUpdateFixedFeeQuantityParams
- type SubscriptionUpdateFixedFeeQuantityParamsChangeOption
- type SubscriptionUpdateParams
- type SubscriptionUsage
- type SubscriptionUsageGroupedSubscriptionUsage
- type SubscriptionUsageGroupedSubscriptionUsageData
- type SubscriptionUsageGroupedSubscriptionUsageDataBillableMetric
- type SubscriptionUsageGroupedSubscriptionUsageDataMetricGroup
- type SubscriptionUsageGroupedSubscriptionUsageDataUsage
- type SubscriptionUsageGroupedSubscriptionUsageDataViewMode
- type SubscriptionUsageUngroupedSubscriptionUsage
- type SubscriptionUsageUngroupedSubscriptionUsageData
- type SubscriptionUsageUngroupedSubscriptionUsageDataBillableMetric
- type SubscriptionUsageUngroupedSubscriptionUsageDataUsage
- type SubscriptionUsageUngroupedSubscriptionUsageDataViewMode
- type SubscriptionUsageUnion
- type Subscriptions
- type TopLevelPingResponse
- type TopLevelService
- type WebhookService
- type WebhookVerifySignatureParams
Constants ¶
const BillingCycleRelativeDateEndOfTerm = shared.BillingCycleRelativeDateEndOfTerm
This is an alias to an internal value.
const BillingCycleRelativeDateStartOfTerm = shared.BillingCycleRelativeDateStartOfTerm
This is an alias to an internal value.
const DiscountAmountDiscountDiscountTypeAmount = shared.DiscountAmountDiscountDiscountTypeAmount
This is an alias to an internal value.
const DiscountDiscountTypeAmount = shared.DiscountDiscountTypeAmount
This is an alias to an internal value.
const DiscountDiscountTypePercentage = shared.DiscountDiscountTypePercentage
This is an alias to an internal value.
const DiscountDiscountTypeTrial = shared.DiscountDiscountTypeTrial
This is an alias to an internal value.
const DiscountDiscountTypeUsage = shared.DiscountDiscountTypeUsage
This is an alias to an internal value.
const DiscountPercentageDiscountDiscountTypePercentage = shared.DiscountPercentageDiscountDiscountTypePercentage
This is an alias to an internal value.
const DiscountTrialDiscountDiscountTypeTrial = shared.DiscountTrialDiscountDiscountTypeTrial
This is an alias to an internal value.
const DiscountUsageDiscountDiscountTypeUsage = shared.DiscountUsageDiscountDiscountTypeUsage
This is an alias to an internal value.
const ErrorStatus400 = apierror.ErrorStatus400
const ErrorStatus401 = apierror.ErrorStatus401
const ErrorStatus404 = apierror.ErrorStatus404
const ErrorStatus409 = apierror.ErrorStatus409
const ErrorStatus413 = apierror.ErrorStatus413
const ErrorStatus429 = apierror.ErrorStatus429
const ErrorStatus500 = apierror.ErrorStatus500
const ErrorTypeConstraintViolation = apierror.ErrorTypeConstraintViolation
const ErrorTypeDuplicateResourceCreation = apierror.ErrorTypeDuplicateResourceCreation
const ErrorTypeFeatureNotAvailable = apierror.ErrorTypeFeatureNotAvailable
const ErrorTypeOrbAuthenticationError = apierror.ErrorTypeOrbAuthenticationError
const ErrorTypeOrbInternalServerError = apierror.ErrorTypeOrbInternalServerError
const ErrorTypeRequestTooLarge = apierror.ErrorTypeRequestTooLarge
const ErrorTypeRequestValidationError = apierror.ErrorTypeRequestValidationError
const ErrorTypeResourceConflict = apierror.ErrorTypeResourceConflict
const ErrorTypeResourceNotFound = apierror.ErrorTypeResourceNotFound
const ErrorTypeResourceTooLarge = apierror.ErrorTypeResourceTooLarge
const ErrorTypeTooManyRequests = apierror.ErrorTypeTooManyRequests
const ErrorTypeURLNotFound = apierror.ErrorTypeURLNotFound
const WebhookHeaderTimestampFormat = "2006-01-02T15:04:05.999999999"
WebhookHeaderTimestampFormat is the format of the header X-Orb-Timestamp for webhook requests sent by Orb.
Variables ¶
This section is empty.
Functions ¶
func F ¶
F is a param field helper used to initialize a param.Field generic struct. This helps specify null, zero values, and overrides, as well as normal values. You can read more about this in our README.
func FileParam ¶ added in v0.24.0
FileParam is a param field helper which helps files with a mime content-type.
func Int ¶
Int is a param field helper which helps specify integers. This is particularly helpful when specifying integer constants for fields.
func Raw ¶
Raw is a param field helper for specifying values for fields when the type you are looking to send is different from the type that is specified in the SDK. For example, if the type of the field is an integer, but you want to send a float, you could do that by setting the corresponding field with Raw[int](0.5).
Types ¶
type Alert ¶ added in v0.26.0
type Alert 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 map[string]string `json:"customer,required,nullable"` // Whether the alert is enabled or disabled. Enabled bool `json:"enabled,required"` // The metric the alert applies to. Metric map[string]string `json:"metric,required,nullable"` // The plan the alert applies to. Plan map[string]string `json:"plan,required,nullable"` // The subscription the alert applies to. Subscription map[string]string `json:"subscription,required,nullable"` // The thresholds that define the conditions under which the alert will be // triggered. Thresholds []AlertThreshold `json:"thresholds,required,nullable"` // The type of alert. This must be a valid alert type. Type AlertType `json:"type,required"` JSON alertJSON `json:"-"` }
[Alerts within Orb](https://docs.withorb.com/guides/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.
| Scope | Monitors | Vaild Alert Types | | ------------ | ------------------------------ | ----------------------------------------------------------------------------------- | | Customer | A customer's credit balance | `credit_balance_depleted`, `credit_balance_recovered`, and `credit_balance_dropped` | | Subscription | A subscription's usage or cost | `usage_exceeded` and `cost_exceeded` |
func (*Alert) UnmarshalJSON ¶ added in v0.26.0
type AlertListParams ¶ added in v0.27.0
type AlertListParams struct { CreatedAtGt param.Field[time.Time] `query:"created_at[gt]" format:"date-time"` CreatedAtGte param.Field[time.Time] `query:"created_at[gte]" format:"date-time"` CreatedAtLt param.Field[time.Time] `query:"created_at[lt]" format:"date-time"` CreatedAtLte param.Field[time.Time] `query:"created_at[lte]" format:"date-time"` // Cursor for pagination. This can be populated by the `next_cursor` value returned // from the initial request. Cursor param.Field[string] `query:"cursor"` // Fetch alerts scoped to this customer_id CustomerID param.Field[string] `query:"customer_id"` // Fetch alerts scoped to this external_customer_id ExternalCustomerID param.Field[string] `query:"external_customer_id"` // The number of items to fetch. Defaults to 20. Limit param.Field[int64] `query:"limit"` // Fetch alerts scoped to this subscription_id SubscriptionID param.Field[string] `query:"subscription_id"` }
func (AlertListParams) URLQuery ¶ added in v0.27.0
func (r AlertListParams) URLQuery() (v url.Values)
URLQuery serializes AlertListParams's query parameters as `url.Values`.
type AlertNewForCustomerParams ¶ added in v0.27.0
type AlertNewForCustomerParams struct { // The case sensitive currency or custom pricing unit to use for this alert. Currency param.Field[string] `json:"currency,required"` // The type of alert to create. This must be a valid alert type. Type param.Field[AlertNewForCustomerParamsType] `json:"type,required"` // The thresholds that define the values at which the alert will be triggered. Thresholds param.Field[[]AlertNewForCustomerParamsThreshold] `json:"thresholds"` }
func (AlertNewForCustomerParams) MarshalJSON ¶ added in v0.27.0
func (r AlertNewForCustomerParams) MarshalJSON() (data []byte, err error)
type AlertNewForCustomerParamsThreshold ¶ added in v0.27.0
type AlertNewForCustomerParamsThreshold 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 (AlertNewForCustomerParamsThreshold) MarshalJSON ¶ added in v0.27.0
func (r AlertNewForCustomerParamsThreshold) MarshalJSON() (data []byte, err error)
type AlertNewForCustomerParamsType ¶ added in v0.45.0
type AlertNewForCustomerParamsType string
The type of alert to create. This must be a valid alert type.
const ( AlertNewForCustomerParamsTypeUsageExceeded AlertNewForCustomerParamsType = "usage_exceeded" AlertNewForCustomerParamsTypeCostExceeded AlertNewForCustomerParamsType = "cost_exceeded" AlertNewForCustomerParamsTypeCreditBalanceDepleted AlertNewForCustomerParamsType = "credit_balance_depleted" AlertNewForCustomerParamsTypeCreditBalanceDropped AlertNewForCustomerParamsType = "credit_balance_dropped" AlertNewForCustomerParamsTypeCreditBalanceRecovered AlertNewForCustomerParamsType = "credit_balance_recovered" )
func (AlertNewForCustomerParamsType) IsKnown ¶ added in v0.45.0
func (r AlertNewForCustomerParamsType) IsKnown() bool
type AlertNewForExternalCustomerParams ¶ added in v0.27.0
type AlertNewForExternalCustomerParams struct { // The case sensitive currency or custom pricing unit to use for this alert. Currency param.Field[string] `json:"currency,required"` // The type of alert to create. This must be a valid alert type. Type param.Field[AlertNewForExternalCustomerParamsType] `json:"type,required"` // The thresholds that define the values at which the alert will be triggered. Thresholds param.Field[[]AlertNewForExternalCustomerParamsThreshold] `json:"thresholds"` }
func (AlertNewForExternalCustomerParams) MarshalJSON ¶ added in v0.27.0
func (r AlertNewForExternalCustomerParams) MarshalJSON() (data []byte, err error)
type AlertNewForExternalCustomerParamsThreshold ¶ added in v0.27.0
type AlertNewForExternalCustomerParamsThreshold 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 (AlertNewForExternalCustomerParamsThreshold) MarshalJSON ¶ added in v0.27.0
func (r AlertNewForExternalCustomerParamsThreshold) MarshalJSON() (data []byte, err error)
type AlertNewForExternalCustomerParamsType ¶ added in v0.45.0
type AlertNewForExternalCustomerParamsType string
The type of alert to create. This must be a valid alert type.
const ( AlertNewForExternalCustomerParamsTypeUsageExceeded AlertNewForExternalCustomerParamsType = "usage_exceeded" AlertNewForExternalCustomerParamsTypeCostExceeded AlertNewForExternalCustomerParamsType = "cost_exceeded" AlertNewForExternalCustomerParamsTypeCreditBalanceDepleted AlertNewForExternalCustomerParamsType = "credit_balance_depleted" AlertNewForExternalCustomerParamsTypeCreditBalanceDropped AlertNewForExternalCustomerParamsType = "credit_balance_dropped" AlertNewForExternalCustomerParamsTypeCreditBalanceRecovered AlertNewForExternalCustomerParamsType = "credit_balance_recovered" )
func (AlertNewForExternalCustomerParamsType) IsKnown ¶ added in v0.45.0
func (r AlertNewForExternalCustomerParamsType) IsKnown() bool
type AlertNewForSubscriptionParams ¶ added in v0.27.0
type AlertNewForSubscriptionParams struct { // The thresholds that define the values at which the alert will be triggered. Thresholds param.Field[[]AlertNewForSubscriptionParamsThreshold] `json:"thresholds,required"` // The type of alert to create. This must be a valid alert type. Type param.Field[AlertNewForSubscriptionParamsType] `json:"type,required"` // The metric to track usage for. MetricID param.Field[string] `json:"metric_id"` }
func (AlertNewForSubscriptionParams) MarshalJSON ¶ added in v0.27.0
func (r AlertNewForSubscriptionParams) MarshalJSON() (data []byte, err error)
type AlertNewForSubscriptionParamsThreshold ¶ added in v0.27.0
type AlertNewForSubscriptionParamsThreshold 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 (AlertNewForSubscriptionParamsThreshold) MarshalJSON ¶ added in v0.27.0
func (r AlertNewForSubscriptionParamsThreshold) MarshalJSON() (data []byte, err error)
type AlertNewForSubscriptionParamsType ¶ added in v0.45.0
type AlertNewForSubscriptionParamsType string
The type of alert to create. This must be a valid alert type.
const ( AlertNewForSubscriptionParamsTypeUsageExceeded AlertNewForSubscriptionParamsType = "usage_exceeded" AlertNewForSubscriptionParamsTypeCostExceeded AlertNewForSubscriptionParamsType = "cost_exceeded" AlertNewForSubscriptionParamsTypeCreditBalanceDepleted AlertNewForSubscriptionParamsType = "credit_balance_depleted" AlertNewForSubscriptionParamsTypeCreditBalanceDropped AlertNewForSubscriptionParamsType = "credit_balance_dropped" AlertNewForSubscriptionParamsTypeCreditBalanceRecovered AlertNewForSubscriptionParamsType = "credit_balance_recovered" )
func (AlertNewForSubscriptionParamsType) IsKnown ¶ added in v0.45.0
func (r AlertNewForSubscriptionParamsType) IsKnown() bool
type AlertService ¶ added in v0.26.0
type AlertService struct {
Options []option.RequestOption
}
AlertService contains methods and other services that help with interacting with the orb API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAlertService method instead.
func NewAlertService ¶ added in v0.26.0
func NewAlertService(opts ...option.RequestOption) (r *AlertService)
NewAlertService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AlertService) Disable ¶ added in v0.27.0
func (r *AlertService) Disable(ctx context.Context, alertConfigurationID string, opts ...option.RequestOption) (res *Alert, err error)
This endpoint can be used to disable an alert.
func (*AlertService) Enable ¶ added in v0.26.0
func (r *AlertService) Enable(ctx context.Context, alertConfigurationID string, opts ...option.RequestOption) (res *Alert, err error)
This endpoint can be used to enable an alert.
func (*AlertService) Get ¶ added in v0.27.0
func (r *AlertService) Get(ctx context.Context, alertID string, opts ...option.RequestOption) (res *Alert, err error)
This endpoint retrieves an alert by its ID.
func (*AlertService) List ¶ added in v0.27.0
func (r *AlertService) List(ctx context.Context, query AlertListParams, opts ...option.RequestOption) (res *pagination.Page[Alert], err error)
This endpoint returns a list of alerts within Orb.
The request must specify one of `customer_id`, `external_customer_id`, or `subscription_id`.
If querying by subscripion_id, the endpoint will return the subscription level alerts as well as the plan level alerts associated with the subscription.
The list of alerts is ordered starting from the most recently created alert. This endpoint follows Orb's [standardized pagination format](../reference/pagination).
func (*AlertService) ListAutoPaging ¶ added in v0.27.0
func (r *AlertService) ListAutoPaging(ctx context.Context, query AlertListParams, opts ...option.RequestOption) *pagination.PageAutoPager[Alert]
This endpoint returns a list of alerts within Orb.
The request must specify one of `customer_id`, `external_customer_id`, or `subscription_id`.
If querying by subscripion_id, the endpoint will return the subscription level alerts as well as the plan level alerts associated with the subscription.
The list of alerts is ordered starting from the most recently created alert. This endpoint follows Orb's [standardized pagination format](../reference/pagination).
func (*AlertService) NewForCustomer ¶ added in v0.27.0
func (r *AlertService) NewForCustomer(ctx context.Context, customerID string, body AlertNewForCustomerParams, opts ...option.RequestOption) (res *Alert, err error)
This endpoint creates a new alert to monitor a customer's credit balance. There are three types of alerts that can be scoped to customers: `credit_balance_depleted`, `credit_balance_dropped`, and `credit_balance_recovered`. Customers can have a maximum of one of each type of alert per [credit balance currency](https://docs.withorb.com/guides/product-catalog/prepurchase). `credit_balance_dropped` alerts require a list of thresholds to be provided while `credit_balance_depleted` and `credit_balance_recovered` alerts do not require thresholds.
func (*AlertService) NewForExternalCustomer ¶ added in v0.27.0
func (r *AlertService) NewForExternalCustomer(ctx context.Context, externalCustomerID string, body AlertNewForExternalCustomerParams, opts ...option.RequestOption) (res *Alert, err error)
This endpoint creates a new alert to monitor a customer's credit balance. There are three types of alerts that can be scoped to customers: `credit_balance_depleted`, `credit_balance_dropped`, and `credit_balance_recovered`. Customers can have a maximum of one of each type of alert per [credit balance currency](https://docs.withorb.com/guides/product-catalog/prepurchase). `credit_balance_dropped` alerts require a list of thresholds to be provided while `credit_balance_depleted` and `credit_balance_recovered` alerts do not require thresholds.
func (*AlertService) NewForSubscription ¶ added in v0.27.0
func (r *AlertService) NewForSubscription(ctx context.Context, subscriptionID string, body AlertNewForSubscriptionParams, opts ...option.RequestOption) (res *Alert, err error)
This endpoint is used to create alerts at the subscription level.
Subscription level alerts can be one of two types: `usage_exceeded` or `cost_exceeded`. A `usage_exceeded` alert is scoped to a particular metric and is triggered when the usage of that metric exceeds predefined thresholds during the current billing cycle. A `cost_exceeded` alert is triggered when the total amount due during the current billing cycle surpasses predefined thresholds. `cost_exceeded` alerts do not include burndown of pre-purchase credits. Each subscription can have one `cost_exceeded` alert and one `usage_exceeded` alert per metric that is a part of the subscription. Alerts are triggered based on usage or cost conditions met during the current billing cycle.
func (*AlertService) Update ¶ added in v0.50.0
func (r *AlertService) Update(ctx context.Context, alertConfigurationID string, body AlertUpdateParams, opts ...option.RequestOption) (res *Alert, err error)
This endpoint updates the thresholds of an alert.
type AlertThreshold ¶ added in v0.26.0
type AlertThreshold 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 alertThresholdJSON `json:"-"` }
Thresholds are used to define the conditions under which an alert will be triggered.
func (*AlertThreshold) UnmarshalJSON ¶ added in v0.26.0
func (r *AlertThreshold) UnmarshalJSON(data []byte) (err error)
type AlertType ¶ added in v0.26.0
type AlertType string
The type of alert. This must be a valid alert type.
const ( AlertTypeUsageExceeded AlertType = "usage_exceeded" AlertTypeCostExceeded AlertType = "cost_exceeded" AlertTypeCreditBalanceDepleted AlertType = "credit_balance_depleted" AlertTypeCreditBalanceDropped AlertType = "credit_balance_dropped" AlertTypeCreditBalanceRecovered AlertType = "credit_balance_recovered" )
type AlertUpdateParams ¶ added in v0.50.0
type AlertUpdateParams struct { // The thresholds that define the values at which the alert will be triggered. Thresholds param.Field[[]AlertUpdateParamsThreshold] `json:"thresholds,required"` }
func (AlertUpdateParams) MarshalJSON ¶ added in v0.50.0
func (r AlertUpdateParams) MarshalJSON() (data []byte, err error)
type AlertUpdateParamsThreshold ¶ added in v0.50.0
type AlertUpdateParamsThreshold 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 (AlertUpdateParamsThreshold) MarshalJSON ¶ added in v0.50.0
func (r AlertUpdateParamsThreshold) MarshalJSON() (data []byte, err error)
type BillableMetric ¶ added in v0.50.0
type BillableMetric 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 Item `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 BillableMetricStatus `json:"status,required"` JSON billableMetricJSON `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 (*BillableMetric) UnmarshalJSON ¶ added in v0.50.0
func (r *BillableMetric) UnmarshalJSON(data []byte) (err error)
type BillableMetricStatus ¶ added in v0.50.0
type BillableMetricStatus string
const ( BillableMetricStatusActive BillableMetricStatus = "active" BillableMetricStatusDraft BillableMetricStatus = "draft" BillableMetricStatusArchived BillableMetricStatus = "archived" )
func (BillableMetricStatus) IsKnown ¶ added in v0.50.0
func (r BillableMetricStatus) IsKnown() bool
type BillingCycleRelativeDate ¶ added in v0.25.0
type BillingCycleRelativeDate = shared.BillingCycleRelativeDate
This is an alias to an internal type.
type Client ¶
type Client struct { Options []option.RequestOption TopLevel *TopLevelService Coupons *CouponService CreditNotes *CreditNoteService Customers *CustomerService Events *EventService InvoiceLineItems *InvoiceLineItemService Invoices *InvoiceService Items *ItemService Metrics *MetricService Plans *PlanService Prices *PriceService Subscriptions *SubscriptionService Webhooks *WebhookService Alerts *AlertService }
Client creates a struct with services and top level methods that help with interacting with the orb API. You should not instantiate this client directly, and instead use the NewClient method instead.
func NewClient ¶
func NewClient(opts ...option.RequestOption) (r *Client)
NewClient generates a new client with the default option read from the environment (ORB_API_KEY, ORB_WEBHOOK_SECRET). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.
func (*Client) Delete ¶ added in v0.25.0
func (r *Client) Delete(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Delete makes a DELETE request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Execute ¶ added in v0.25.0
func (r *Client) Execute(ctx context.Context, method string, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Execute makes a request with the given context, method, URL, request params, response, and request options. This is useful for hitting undocumented endpoints while retaining the base URL, auth, retries, and other options from the client.
If a byte slice or an io.Reader is supplied to params, it will be used as-is for the request body.
The params is by default serialized into the body using encoding/json. If your type implements a MarshalJSON function, it will be used instead to serialize the request. If a URLQuery method is implemented, the returned url.Values will be used as query strings to the url.
If your params struct uses param.Field, you must provide either [MarshalJSON], [URLQuery], and/or [MarshalForm] functions. It is undefined behavior to use a struct uses param.Field without specifying how it is serialized.
Any "…Params" object defined in this library can be used as the request argument. Note that 'path' arguments will not be forwarded into the url.
The response body will be deserialized into the res variable, depending on its type:
- A pointer to a *http.Response is populated by the raw response.
- A pointer to a byte array will be populated with the contents of the request body.
- A pointer to any other type uses this library's default JSON decoding, which respects UnmarshalJSON if it is defined on the type.
- A nil value will not read the response body.
For even greater flexibility, see option.WithResponseInto and option.WithResponseBodyInto.
func (*Client) Get ¶ added in v0.25.0
func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Get makes a GET request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Patch ¶ added in v0.25.0
func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Patch makes a PATCH request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Post ¶ added in v0.25.0
func (r *Client) Post(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Post makes a POST request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Put ¶ added in v0.25.0
func (r *Client) Put(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Put makes a PUT request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
type Coupon ¶
type Coupon 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 CouponDiscount `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 couponJSON `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.
## How to use coupons
Coupons can be created using the Orb dashboard or programmatically through the API. Once a coupon is created, it can be managed and applied programmatically via the API. To redeem a coupon, use the `redemption_code` property when [creating a subscription](create-subscription.api.mdx) or when scheduling a [plan change](schedule-plan-change.api.mdx).
## When to use coupons
A common use case for coupons is through self-serve signup or upgrade flows in your checkout experience or billing portal. Coupons can also be used as one-off to incentivize use for custom agreements.
Coupons are effective when launching new features and encouraging existing users to upgrade to a higher tier. For example, you could create a coupon code "UPGRADE20" that offers a 20% discount on the first month of the new plan. This code can be applied during the upgrade process in your billing portal, making it straightforward for users to benefit from the new features at a reduced cost.
## Coupon scoping
When a coupon is applied on a subscription, it creates a discount adjustment that applies to all of the prices on the subscription at the time of the coupon application. Notably, coupons do not scope in new price additions to a subscription automatically — if a new price is added to the subscription with a subscription edit or plan version migration, the discount created with the coupon will not apply to it automatically. If you'd like the coupon to apply to newly added prices, you can [edit the adjustment intervals](add-edit-price-intervals.api.mdx) to end the discount interval created by the coupon at the time of the migration and add a new one starting at the time of the migration that includes the newly added prices you'd like the coupon to apply to.
func (*Coupon) UnmarshalJSON ¶
type CouponDiscount ¶ added in v0.2.0
type CouponDiscount struct { DiscountType CouponDiscountDiscountType `json:"discount_type,required"` // This field can have the runtime type of [[]string]. AppliesToPriceIDs interface{} `json:"applies_to_price_ids"` Reason string `json:"reason,nullable"` // 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 `amount`. AmountDiscount string `json:"amount_discount"` JSON couponDiscountJSON `json:"-"` // contains filtered or unexported fields }
func (CouponDiscount) AsUnion ¶ added in v0.25.0
func (r CouponDiscount) AsUnion() CouponDiscountUnion
AsUnion returns a CouponDiscountUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are CouponDiscountPercentageDiscount, CouponDiscountAmountDiscount.
func (*CouponDiscount) UnmarshalJSON ¶ added in v0.25.0
func (r *CouponDiscount) UnmarshalJSON(data []byte) (err error)
type CouponDiscountAmountDiscount ¶ added in v0.2.0
type CouponDiscountAmountDiscount 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 CouponDiscountAmountDiscountDiscountType `json:"discount_type,required"` Reason string `json:"reason,nullable"` JSON couponDiscountAmountDiscountJSON `json:"-"` }
func (*CouponDiscountAmountDiscount) UnmarshalJSON ¶ added in v0.2.0
func (r *CouponDiscountAmountDiscount) UnmarshalJSON(data []byte) (err error)
type CouponDiscountAmountDiscountDiscountType ¶ added in v0.2.0
type CouponDiscountAmountDiscountDiscountType string
const (
CouponDiscountAmountDiscountDiscountTypeAmount CouponDiscountAmountDiscountDiscountType = "amount"
)
func (CouponDiscountAmountDiscountDiscountType) IsKnown ¶ added in v0.24.0
func (r CouponDiscountAmountDiscountDiscountType) IsKnown() bool
type CouponDiscountDiscountType ¶ added in v0.25.0
type CouponDiscountDiscountType string
const ( CouponDiscountDiscountTypePercentage CouponDiscountDiscountType = "percentage" CouponDiscountDiscountTypeAmount CouponDiscountDiscountType = "amount" )
func (CouponDiscountDiscountType) IsKnown ¶ added in v0.25.0
func (r CouponDiscountDiscountType) IsKnown() bool
type CouponDiscountPercentageDiscount ¶ added in v0.2.0
type CouponDiscountPercentageDiscount 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 CouponDiscountPercentageDiscountDiscountType `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 couponDiscountPercentageDiscountJSON `json:"-"` }
func (*CouponDiscountPercentageDiscount) UnmarshalJSON ¶ added in v0.2.0
func (r *CouponDiscountPercentageDiscount) UnmarshalJSON(data []byte) (err error)
type CouponDiscountPercentageDiscountDiscountType ¶ added in v0.2.0
type CouponDiscountPercentageDiscountDiscountType string
const (
CouponDiscountPercentageDiscountDiscountTypePercentage CouponDiscountPercentageDiscountDiscountType = "percentage"
)
func (CouponDiscountPercentageDiscountDiscountType) IsKnown ¶ added in v0.24.0
func (r CouponDiscountPercentageDiscountDiscountType) IsKnown() bool
type CouponDiscountUnion ¶ added in v0.25.0
type CouponDiscountUnion interface {
// contains filtered or unexported methods
}
Union satisfied by CouponDiscountPercentageDiscount or CouponDiscountAmountDiscount.
type CouponListParams ¶
type CouponListParams struct { // Cursor for pagination. This can be populated by the `next_cursor` value returned // from the initial request. Cursor param.Field[string] `query:"cursor"` // The number of items to fetch. Defaults to 20. Limit param.Field[int64] `query:"limit"` // Filter to coupons matching this redemption code. RedemptionCode param.Field[string] `query:"redemption_code"` // Show archived coupons as well (by default, this endpoint only returns active // coupons). ShowArchived param.Field[bool] `query:"show_archived"` }
func (CouponListParams) URLQuery ¶
func (r CouponListParams) URLQuery() (v url.Values)
URLQuery serializes CouponListParams's query parameters as `url.Values`.
type CouponNewParams ¶
type CouponNewParams struct { Discount param.Field[CouponNewParamsDiscountUnion] `json:"discount,required"` // This string can be used to redeem this coupon for a given subscription. RedemptionCode param.Field[string] `json:"redemption_code,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 param.Field[int64] `json:"duration_in_months"` // The maximum number of redemptions allowed for this coupon before it is // exhausted;`null` here means "unlimited". MaxRedemptions param.Field[int64] `json:"max_redemptions"` }
func (CouponNewParams) MarshalJSON ¶
func (r CouponNewParams) MarshalJSON() (data []byte, err error)
type CouponNewParamsDiscount ¶ added in v0.2.0
type CouponNewParamsDiscount struct { DiscountType param.Field[CouponNewParamsDiscountDiscountType] `json:"discount_type,required"` PercentageDiscount param.Field[float64] `json:"percentage_discount"` AmountDiscount param.Field[string] `json:"amount_discount"` }
func (CouponNewParamsDiscount) MarshalJSON ¶ added in v0.25.0
func (r CouponNewParamsDiscount) MarshalJSON() (data []byte, err error)
type CouponNewParamsDiscountDiscountType ¶ added in v0.25.0
type CouponNewParamsDiscountDiscountType string
const ( CouponNewParamsDiscountDiscountTypePercentage CouponNewParamsDiscountDiscountType = "percentage" CouponNewParamsDiscountDiscountTypeAmount CouponNewParamsDiscountDiscountType = "amount" )
func (CouponNewParamsDiscountDiscountType) IsKnown ¶ added in v0.25.0
func (r CouponNewParamsDiscountDiscountType) IsKnown() bool
type CouponNewParamsDiscountNewCouponAmountDiscount ¶ added in v0.25.0
type CouponNewParamsDiscountNewCouponAmountDiscount struct { AmountDiscount param.Field[string] `json:"amount_discount,required"` DiscountType param.Field[CouponNewParamsDiscountNewCouponAmountDiscountDiscountType] `json:"discount_type,required"` }
func (CouponNewParamsDiscountNewCouponAmountDiscount) MarshalJSON ¶ added in v0.25.0
func (r CouponNewParamsDiscountNewCouponAmountDiscount) MarshalJSON() (data []byte, err error)
type CouponNewParamsDiscountNewCouponAmountDiscountDiscountType ¶ added in v0.25.0
type CouponNewParamsDiscountNewCouponAmountDiscountDiscountType string
const (
CouponNewParamsDiscountNewCouponAmountDiscountDiscountTypeAmount CouponNewParamsDiscountNewCouponAmountDiscountDiscountType = "amount"
)
func (CouponNewParamsDiscountNewCouponAmountDiscountDiscountType) IsKnown ¶ added in v0.25.0
func (r CouponNewParamsDiscountNewCouponAmountDiscountDiscountType) IsKnown() bool
type CouponNewParamsDiscountNewCouponPercentageDiscount ¶ added in v0.25.0
type CouponNewParamsDiscountNewCouponPercentageDiscount struct { DiscountType param.Field[CouponNewParamsDiscountNewCouponPercentageDiscountDiscountType] `json:"discount_type,required"` PercentageDiscount param.Field[float64] `json:"percentage_discount,required"` }
func (CouponNewParamsDiscountNewCouponPercentageDiscount) MarshalJSON ¶ added in v0.25.0
func (r CouponNewParamsDiscountNewCouponPercentageDiscount) MarshalJSON() (data []byte, err error)
type CouponNewParamsDiscountNewCouponPercentageDiscountDiscountType ¶ added in v0.25.0
type CouponNewParamsDiscountNewCouponPercentageDiscountDiscountType string
const (
CouponNewParamsDiscountNewCouponPercentageDiscountDiscountTypePercentage CouponNewParamsDiscountNewCouponPercentageDiscountDiscountType = "percentage"
)
func (CouponNewParamsDiscountNewCouponPercentageDiscountDiscountType) IsKnown ¶ added in v0.25.0
func (r CouponNewParamsDiscountNewCouponPercentageDiscountDiscountType) IsKnown() bool
type CouponNewParamsDiscountUnion ¶ added in v0.25.0
type CouponNewParamsDiscountUnion interface {
// contains filtered or unexported methods
}
Satisfied by CouponNewParamsDiscountNewCouponPercentageDiscount, CouponNewParamsDiscountNewCouponAmountDiscount, CouponNewParamsDiscount.
type CouponService ¶
type CouponService struct { Options []option.RequestOption Subscriptions *CouponSubscriptionService }
CouponService contains methods and other services that help with interacting with the orb API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCouponService method instead.
func NewCouponService ¶
func NewCouponService(opts ...option.RequestOption) (r *CouponService)
NewCouponService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*CouponService) Archive ¶
func (r *CouponService) Archive(ctx context.Context, couponID string, opts ...option.RequestOption) (res *Coupon, err error)
This endpoint allows a coupon to be archived. Archived coupons can no longer be redeemed, and will be hidden from lists of active coupons. Additionally, once a coupon is archived, its redemption code can be reused for a different coupon.
func (*CouponService) Fetch ¶
func (r *CouponService) Fetch(ctx context.Context, couponID string, opts ...option.RequestOption) (res *Coupon, err error)
This endpoint retrieves a coupon by its ID. To fetch coupons by their redemption code, use the [List coupons](list-coupons) endpoint with the redemption_code parameter.
func (*CouponService) List ¶
func (r *CouponService) List(ctx context.Context, query CouponListParams, opts ...option.RequestOption) (res *pagination.Page[Coupon], err error)
This endpoint returns a list of all coupons for an account in a list format.
The list of coupons is ordered starting from the most recently created coupon. The response also includes `pagination_metadata`, which lets the caller retrieve the next page of results if they exist. More information about pagination can be found in the Pagination-metadata schema.
func (*CouponService) ListAutoPaging ¶
func (r *CouponService) ListAutoPaging(ctx context.Context, query CouponListParams, opts ...option.RequestOption) *pagination.PageAutoPager[Coupon]
This endpoint returns a list of all coupons for an account in a list format.
The list of coupons is ordered starting from the most recently created coupon. The response also includes `pagination_metadata`, which lets the caller retrieve the next page of results if they exist. More information about pagination can be found in the Pagination-metadata schema.
func (*CouponService) New ¶
func (r *CouponService) New(ctx context.Context, body CouponNewParams, opts ...option.RequestOption) (res *Coupon, err error)
This endpoint allows the creation of coupons, which can then be redeemed at subscription creation or plan change.
type CouponSubscriptionListParams ¶
type CouponSubscriptionListParams struct { // Cursor for pagination. This can be populated by the `next_cursor` value returned // from the initial request. Cursor param.Field[string] `query:"cursor"` // The number of items to fetch. Defaults to 20. Limit param.Field[int64] `query:"limit"` }
func (CouponSubscriptionListParams) URLQuery ¶
func (r CouponSubscriptionListParams) URLQuery() (v url.Values)
URLQuery serializes CouponSubscriptionListParams's query parameters as `url.Values`.
type CouponSubscriptionService ¶
type CouponSubscriptionService struct {
Options []option.RequestOption
}
CouponSubscriptionService contains methods and other services that help with interacting with the orb API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCouponSubscriptionService method instead.
func NewCouponSubscriptionService ¶
func NewCouponSubscriptionService(opts ...option.RequestOption) (r *CouponSubscriptionService)
NewCouponSubscriptionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*CouponSubscriptionService) List ¶
func (r *CouponSubscriptionService) List(ctx context.Context, couponID string, query CouponSubscriptionListParams, opts ...option.RequestOption) (res *pagination.Page[Subscription], err error)
This endpoint returns a list of all subscriptions that have redeemed a given coupon as a [paginated](../reference/pagination) list, ordered starting from the most recently created subscription. For a full discussion of the subscription resource, see Subscription(../guides/concepts#subscription).
func (*CouponSubscriptionService) ListAutoPaging ¶
func (r *CouponSubscriptionService) ListAutoPaging(ctx context.Context, couponID string, query CouponSubscriptionListParams, opts ...option.RequestOption) *pagination.PageAutoPager[Subscription]
This endpoint returns a list of all subscriptions that have redeemed a given coupon as a [paginated](../reference/pagination) list, ordered starting from the most recently created subscription. For a full discussion of the subscription resource, see Subscription(../guides/concepts#subscription).
type CreditNote ¶
type CreditNote 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 CreditNoteCustomer `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 []CreditNoteLineItem `json:"line_items,required"` // The maximum amount applied on the original invoice MaximumAmountAdjustment CreditNoteMaximumAmountAdjustment `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 CreditNoteReason `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 CreditNoteType `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 []CreditNoteDiscount `json:"discounts"` JSON creditNoteJSON `json:"-"` }
The [Credit Note](/guides/invoicing/credit-notes) resource represents a credit that has been applied to a particular invoice.
func (*CreditNote) UnmarshalJSON ¶
func (r *CreditNote) UnmarshalJSON(data []byte) (err error)
type CreditNoteCustomer ¶
type CreditNoteCustomer struct { ID string `json:"id,required"` ExternalCustomerID string `json:"external_customer_id,required,nullable"` JSON creditNoteCustomerJSON `json:"-"` }
func (*CreditNoteCustomer) UnmarshalJSON ¶
func (r *CreditNoteCustomer) UnmarshalJSON(data []byte) (err error)
type CreditNoteDiscount ¶ added in v0.2.0
type CreditNoteDiscount struct { AmountApplied string `json:"amount_applied,required"` DiscountType CreditNoteDiscountsDiscountType `json:"discount_type,required"` PercentageDiscount float64 `json:"percentage_discount,required"` AppliesToPrices []CreditNoteDiscountsAppliesToPrice `json:"applies_to_prices,nullable"` Reason string `json:"reason,nullable"` JSON creditNoteDiscountJSON `json:"-"` }
func (*CreditNoteDiscount) UnmarshalJSON ¶ added in v0.2.0
func (r *CreditNoteDiscount) UnmarshalJSON(data []byte) (err error)
type CreditNoteDiscountsAppliesToPrice ¶ added in v0.2.0
type CreditNoteDiscountsAppliesToPrice struct { ID string `json:"id,required"` Name string `json:"name,required"` JSON creditNoteDiscountsAppliesToPriceJSON `json:"-"` }
func (*CreditNoteDiscountsAppliesToPrice) UnmarshalJSON ¶ added in v0.2.0
func (r *CreditNoteDiscountsAppliesToPrice) UnmarshalJSON(data []byte) (err error)
type CreditNoteDiscountsDiscountType ¶ added in v0.2.0
type CreditNoteDiscountsDiscountType string
const (
CreditNoteDiscountsDiscountTypePercentage CreditNoteDiscountsDiscountType = "percentage"
)
func (CreditNoteDiscountsDiscountType) IsKnown ¶ added in v0.24.0
func (r CreditNoteDiscountsDiscountType) IsKnown() bool
type CreditNoteLineItem ¶
type CreditNoteLineItem 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 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 []CreditNoteLineItemsTaxAmount `json:"tax_amounts,required"` // Any line item discounts from the invoice's line item. Discounts []CreditNoteLineItemsDiscount `json:"discounts"` JSON creditNoteLineItemJSON `json:"-"` }
func (*CreditNoteLineItem) UnmarshalJSON ¶
func (r *CreditNoteLineItem) UnmarshalJSON(data []byte) (err error)
type CreditNoteLineItemsDiscount ¶ added in v0.2.0
type CreditNoteLineItemsDiscount struct { ID string `json:"id,required"` AmountApplied string `json:"amount_applied,required"` AppliesToPriceIDs []string `json:"applies_to_price_ids,required"` DiscountType CreditNoteLineItemsDiscountsDiscountType `json:"discount_type,required"` PercentageDiscount float64 `json:"percentage_discount,required"` AmountDiscount string `json:"amount_discount,nullable"` Reason string `json:"reason,nullable"` JSON creditNoteLineItemsDiscountJSON `json:"-"` }
func (*CreditNoteLineItemsDiscount) UnmarshalJSON ¶ added in v0.2.0
func (r *CreditNoteLineItemsDiscount) UnmarshalJSON(data []byte) (err error)
type CreditNoteLineItemsDiscountsDiscountType ¶ added in v0.2.0
type CreditNoteLineItemsDiscountsDiscountType string
const ( CreditNoteLineItemsDiscountsDiscountTypePercentage CreditNoteLineItemsDiscountsDiscountType = "percentage" CreditNoteLineItemsDiscountsDiscountTypeAmount CreditNoteLineItemsDiscountsDiscountType = "amount" )
func (CreditNoteLineItemsDiscountsDiscountType) IsKnown ¶ added in v0.24.0
func (r CreditNoteLineItemsDiscountsDiscountType) IsKnown() bool
type CreditNoteLineItemsTaxAmount ¶ added in v0.2.0
type CreditNoteLineItemsTaxAmount 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 creditNoteLineItemsTaxAmountJSON `json:"-"` }
func (*CreditNoteLineItemsTaxAmount) UnmarshalJSON ¶ added in v0.2.0
func (r *CreditNoteLineItemsTaxAmount) UnmarshalJSON(data []byte) (err error)
type CreditNoteListParams ¶
type CreditNoteListParams struct { // Cursor for pagination. This can be populated by the `next_cursor` value returned // from the initial request. Cursor param.Field[string] `query:"cursor"` // The number of items to fetch. Defaults to 20. Limit param.Field[int64] `query:"limit"` }
func (CreditNoteListParams) URLQuery ¶
func (r CreditNoteListParams) URLQuery() (v url.Values)
URLQuery serializes CreditNoteListParams's query parameters as `url.Values`.
type CreditNoteMaximumAmountAdjustment ¶ added in v0.2.0
type CreditNoteMaximumAmountAdjustment struct { AmountApplied string `json:"amount_applied,required"` DiscountType CreditNoteMaximumAmountAdjustmentDiscountType `json:"discount_type,required"` PercentageDiscount float64 `json:"percentage_discount,required"` AppliesToPrices []CreditNoteMaximumAmountAdjustmentAppliesToPrice `json:"applies_to_prices,nullable"` Reason string `json:"reason,nullable"` JSON creditNoteMaximumAmountAdjustmentJSON `json:"-"` }
The maximum amount applied on the original invoice
func (*CreditNoteMaximumAmountAdjustment) UnmarshalJSON ¶ added in v0.2.0
func (r *CreditNoteMaximumAmountAdjustment) UnmarshalJSON(data []byte) (err error)
type CreditNoteMaximumAmountAdjustmentAppliesToPrice ¶ added in v0.2.0
type CreditNoteMaximumAmountAdjustmentAppliesToPrice struct { ID string `json:"id,required"` Name string `json:"name,required"` JSON creditNoteMaximumAmountAdjustmentAppliesToPriceJSON `json:"-"` }
func (*CreditNoteMaximumAmountAdjustmentAppliesToPrice) UnmarshalJSON ¶ added in v0.2.0
func (r *CreditNoteMaximumAmountAdjustmentAppliesToPrice) UnmarshalJSON(data []byte) (err error)
type CreditNoteMaximumAmountAdjustmentDiscountType ¶ added in v0.2.0
type CreditNoteMaximumAmountAdjustmentDiscountType string
const (
CreditNoteMaximumAmountAdjustmentDiscountTypePercentage CreditNoteMaximumAmountAdjustmentDiscountType = "percentage"
)
func (CreditNoteMaximumAmountAdjustmentDiscountType) IsKnown ¶ added in v0.24.0
func (r CreditNoteMaximumAmountAdjustmentDiscountType) IsKnown() bool
type CreditNoteReason ¶
type CreditNoteReason string
const ( CreditNoteReasonDuplicate CreditNoteReason = "Duplicate" CreditNoteReasonFraudulent CreditNoteReason = "Fraudulent" CreditNoteReasonOrderChange CreditNoteReason = "Order change" CreditNoteReasonProductUnsatisfactory CreditNoteReason = "Product unsatisfactory" )
func (CreditNoteReason) IsKnown ¶ added in v0.24.0
func (r CreditNoteReason) IsKnown() bool
type CreditNoteService ¶
type CreditNoteService struct {
Options []option.RequestOption
}
CreditNoteService contains methods and other services that help with interacting with the orb API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCreditNoteService method instead.
func NewCreditNoteService ¶
func NewCreditNoteService(opts ...option.RequestOption) (r *CreditNoteService)
NewCreditNoteService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*CreditNoteService) Fetch ¶
func (r *CreditNoteService) Fetch(ctx context.Context, creditNoteID string, opts ...option.RequestOption) (res *CreditNote, err error)
This endpoint is used to fetch a single [`Credit Note`](../guides/invoicing/credit-notes) given an identifier.
func (*CreditNoteService) List ¶
func (r *CreditNoteService) List(ctx context.Context, query CreditNoteListParams, opts ...option.RequestOption) (res *pagination.Page[CreditNote], err error)
Get a paginated list of CreditNotes. Users can also filter by customer_id, subscription_id, or external_customer_id. The credit notes will be returned in reverse chronological order by `creation_time`.
func (*CreditNoteService) ListAutoPaging ¶
func (r *CreditNoteService) ListAutoPaging(ctx context.Context, query CreditNoteListParams, opts ...option.RequestOption) *pagination.PageAutoPager[CreditNote]
Get a paginated list of CreditNotes. Users can also filter by customer_id, subscription_id, or external_customer_id. The credit notes will be returned in reverse chronological order by `creation_time`.
type CreditNoteType ¶
type CreditNoteType string
const ( CreditNoteTypeRefund CreditNoteType = "refund" CreditNoteTypeAdjustment CreditNoteType = "adjustment" )
func (CreditNoteType) IsKnown ¶ added in v0.24.0
func (r CreditNoteType) IsKnown() bool
type Customer ¶
type Customer 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 CustomerBillingAddress `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"` // 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 CustomerPaymentProvider `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 CustomerShippingAddress `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 CustomerTaxID `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 CustomerAccountingSyncConfiguration `json:"accounting_sync_configuration,nullable"` ReportingConfiguration CustomerReportingConfiguration `json:"reporting_configuration,nullable"` JSON customerJSON `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](../guides/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](../guides/product-catalog/timezones.md) for information on what this timezone parameter influences within Orb.
func (*Customer) UnmarshalJSON ¶
type CustomerAccountingSyncConfiguration ¶
type CustomerAccountingSyncConfiguration struct { AccountingProviders []CustomerAccountingSyncConfigurationAccountingProvider `json:"accounting_providers,required"` Excluded bool `json:"excluded,required"` JSON customerAccountingSyncConfigurationJSON `json:"-"` }
func (*CustomerAccountingSyncConfiguration) UnmarshalJSON ¶
func (r *CustomerAccountingSyncConfiguration) UnmarshalJSON(data []byte) (err error)
type CustomerAccountingSyncConfigurationAccountingProvider ¶
type CustomerAccountingSyncConfigurationAccountingProvider struct { ExternalProviderID string `json:"external_provider_id,required,nullable"` ProviderType CustomerAccountingSyncConfigurationAccountingProvidersProviderType `json:"provider_type,required"` JSON customerAccountingSyncConfigurationAccountingProviderJSON `json:"-"` }
func (*CustomerAccountingSyncConfigurationAccountingProvider) UnmarshalJSON ¶
func (r *CustomerAccountingSyncConfigurationAccountingProvider) UnmarshalJSON(data []byte) (err error)
type CustomerAccountingSyncConfigurationAccountingProvidersProviderType ¶
type CustomerAccountingSyncConfigurationAccountingProvidersProviderType string
const ( CustomerAccountingSyncConfigurationAccountingProvidersProviderTypeQuickbooks CustomerAccountingSyncConfigurationAccountingProvidersProviderType = "quickbooks" CustomerAccountingSyncConfigurationAccountingProvidersProviderTypeNetsuite CustomerAccountingSyncConfigurationAccountingProvidersProviderType = "netsuite" )
func (CustomerAccountingSyncConfigurationAccountingProvidersProviderType) IsKnown ¶ added in v0.24.0
func (r CustomerAccountingSyncConfigurationAccountingProvidersProviderType) IsKnown() bool
type CustomerBalanceTransactionListParams ¶
type CustomerBalanceTransactionListParams struct { // Cursor for pagination. This can be populated by the `next_cursor` value returned // from the initial request. Cursor param.Field[string] `query:"cursor"` // The number of items to fetch. Defaults to 20. Limit param.Field[int64] `query:"limit"` OperationTimeGt param.Field[time.Time] `query:"operation_time[gt]" format:"date-time"` OperationTimeGte param.Field[time.Time] `query:"operation_time[gte]" format:"date-time"` OperationTimeLt param.Field[time.Time] `query:"operation_time[lt]" format:"date-time"` OperationTimeLte param.Field[time.Time] `query:"operation_time[lte]" format:"date-time"` }
func (CustomerBalanceTransactionListParams) URLQuery ¶
func (r CustomerBalanceTransactionListParams) URLQuery() (v url.Values)
URLQuery serializes CustomerBalanceTransactionListParams's query parameters as `url.Values`.
type CustomerBalanceTransactionListResponse ¶
type CustomerBalanceTransactionListResponse struct { // A unique id for this transaction. ID string `json:"id,required"` Action CustomerBalanceTransactionListResponseAction `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 CustomerBalanceTransactionListResponseCreditNote `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 CustomerBalanceTransactionListResponseInvoice `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 CustomerBalanceTransactionListResponseType `json:"type,required"` JSON customerBalanceTransactionListResponseJSON `json:"-"` }
func (*CustomerBalanceTransactionListResponse) UnmarshalJSON ¶
func (r *CustomerBalanceTransactionListResponse) UnmarshalJSON(data []byte) (err error)
type CustomerBalanceTransactionListResponseAction ¶
type CustomerBalanceTransactionListResponseAction string
const ( CustomerBalanceTransactionListResponseActionAppliedToInvoice CustomerBalanceTransactionListResponseAction = "applied_to_invoice" CustomerBalanceTransactionListResponseActionManualAdjustment CustomerBalanceTransactionListResponseAction = "manual_adjustment" CustomerBalanceTransactionListResponseActionProratedRefund CustomerBalanceTransactionListResponseAction = "prorated_refund" CustomerBalanceTransactionListResponseActionRevertProratedRefund CustomerBalanceTransactionListResponseAction = "revert_prorated_refund" CustomerBalanceTransactionListResponseActionReturnFromVoiding CustomerBalanceTransactionListResponseAction = "return_from_voiding" CustomerBalanceTransactionListResponseActionCreditNoteApplied CustomerBalanceTransactionListResponseAction = "credit_note_applied" CustomerBalanceTransactionListResponseActionCreditNoteVoided CustomerBalanceTransactionListResponseAction = "credit_note_voided" CustomerBalanceTransactionListResponseActionOverpaymentRefund CustomerBalanceTransactionListResponseAction = "overpayment_refund" )
func (CustomerBalanceTransactionListResponseAction) IsKnown ¶ added in v0.24.0
func (r CustomerBalanceTransactionListResponseAction) IsKnown() bool
type CustomerBalanceTransactionListResponseCreditNote ¶
type CustomerBalanceTransactionListResponseCreditNote struct { // The id of the Credit note ID string `json:"id,required"` JSON customerBalanceTransactionListResponseCreditNoteJSON `json:"-"` }
func (*CustomerBalanceTransactionListResponseCreditNote) UnmarshalJSON ¶
func (r *CustomerBalanceTransactionListResponseCreditNote) UnmarshalJSON(data []byte) (err error)
type CustomerBalanceTransactionListResponseInvoice ¶
type CustomerBalanceTransactionListResponseInvoice struct { // The Invoice id ID string `json:"id,required"` JSON customerBalanceTransactionListResponseInvoiceJSON `json:"-"` }
func (*CustomerBalanceTransactionListResponseInvoice) UnmarshalJSON ¶
func (r *CustomerBalanceTransactionListResponseInvoice) UnmarshalJSON(data []byte) (err error)
type CustomerBalanceTransactionListResponseType ¶
type CustomerBalanceTransactionListResponseType string
const ( CustomerBalanceTransactionListResponseTypeIncrement CustomerBalanceTransactionListResponseType = "increment" CustomerBalanceTransactionListResponseTypeDecrement CustomerBalanceTransactionListResponseType = "decrement" )
func (CustomerBalanceTransactionListResponseType) IsKnown ¶ added in v0.24.0
func (r CustomerBalanceTransactionListResponseType) IsKnown() bool
type CustomerBalanceTransactionNewParams ¶
type CustomerBalanceTransactionNewParams struct { Amount param.Field[string] `json:"amount,required"` Type param.Field[CustomerBalanceTransactionNewParamsType] `json:"type,required"` // An optional description that can be specified around this entry. Description param.Field[string] `json:"description"` }
func (CustomerBalanceTransactionNewParams) MarshalJSON ¶
func (r CustomerBalanceTransactionNewParams) MarshalJSON() (data []byte, err error)
type CustomerBalanceTransactionNewParamsType ¶
type CustomerBalanceTransactionNewParamsType string
const ( CustomerBalanceTransactionNewParamsTypeIncrement CustomerBalanceTransactionNewParamsType = "increment" CustomerBalanceTransactionNewParamsTypeDecrement CustomerBalanceTransactionNewParamsType = "decrement" )
func (CustomerBalanceTransactionNewParamsType) IsKnown ¶ added in v0.24.0
func (r CustomerBalanceTransactionNewParamsType) IsKnown() bool
type CustomerBalanceTransactionNewResponse ¶
type CustomerBalanceTransactionNewResponse struct { // A unique id for this transaction. ID string `json:"id,required"` Action CustomerBalanceTransactionNewResponseAction `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 CustomerBalanceTransactionNewResponseCreditNote `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 CustomerBalanceTransactionNewResponseInvoice `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 CustomerBalanceTransactionNewResponseType `json:"type,required"` JSON customerBalanceTransactionNewResponseJSON `json:"-"` }
func (*CustomerBalanceTransactionNewResponse) UnmarshalJSON ¶
func (r *CustomerBalanceTransactionNewResponse) UnmarshalJSON(data []byte) (err error)
type CustomerBalanceTransactionNewResponseAction ¶
type CustomerBalanceTransactionNewResponseAction string
const ( CustomerBalanceTransactionNewResponseActionAppliedToInvoice CustomerBalanceTransactionNewResponseAction = "applied_to_invoice" CustomerBalanceTransactionNewResponseActionManualAdjustment CustomerBalanceTransactionNewResponseAction = "manual_adjustment" CustomerBalanceTransactionNewResponseActionProratedRefund CustomerBalanceTransactionNewResponseAction = "prorated_refund" CustomerBalanceTransactionNewResponseActionRevertProratedRefund CustomerBalanceTransactionNewResponseAction = "revert_prorated_refund" CustomerBalanceTransactionNewResponseActionReturnFromVoiding CustomerBalanceTransactionNewResponseAction = "return_from_voiding" CustomerBalanceTransactionNewResponseActionCreditNoteApplied CustomerBalanceTransactionNewResponseAction = "credit_note_applied" CustomerBalanceTransactionNewResponseActionCreditNoteVoided CustomerBalanceTransactionNewResponseAction = "credit_note_voided" CustomerBalanceTransactionNewResponseActionOverpaymentRefund CustomerBalanceTransactionNewResponseAction = "overpayment_refund" )
func (CustomerBalanceTransactionNewResponseAction) IsKnown ¶ added in v0.24.0
func (r CustomerBalanceTransactionNewResponseAction) IsKnown() bool
type CustomerBalanceTransactionNewResponseCreditNote ¶
type CustomerBalanceTransactionNewResponseCreditNote struct { // The id of the Credit note ID string `json:"id,required"` JSON customerBalanceTransactionNewResponseCreditNoteJSON `json:"-"` }
func (*CustomerBalanceTransactionNewResponseCreditNote) UnmarshalJSON ¶
func (r *CustomerBalanceTransactionNewResponseCreditNote) UnmarshalJSON(data []byte) (err error)
type CustomerBalanceTransactionNewResponseInvoice ¶
type CustomerBalanceTransactionNewResponseInvoice struct { // The Invoice id ID string `json:"id,required"` JSON customerBalanceTransactionNewResponseInvoiceJSON `json:"-"` }
func (*CustomerBalanceTransactionNewResponseInvoice) UnmarshalJSON ¶
func (r *CustomerBalanceTransactionNewResponseInvoice) UnmarshalJSON(data []byte) (err error)
type CustomerBalanceTransactionNewResponseType ¶
type CustomerBalanceTransactionNewResponseType string
const ( CustomerBalanceTransactionNewResponseTypeIncrement CustomerBalanceTransactionNewResponseType = "increment" CustomerBalanceTransactionNewResponseTypeDecrement CustomerBalanceTransactionNewResponseType = "decrement" )
func (CustomerBalanceTransactionNewResponseType) IsKnown ¶ added in v0.24.0
func (r CustomerBalanceTransactionNewResponseType) IsKnown() bool
type CustomerBalanceTransactionService ¶
type CustomerBalanceTransactionService struct {
Options []option.RequestOption
}
CustomerBalanceTransactionService contains methods and other services that help with interacting with the orb API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCustomerBalanceTransactionService method instead.
func NewCustomerBalanceTransactionService ¶
func NewCustomerBalanceTransactionService(opts ...option.RequestOption) (r *CustomerBalanceTransactionService)
NewCustomerBalanceTransactionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*CustomerBalanceTransactionService) List ¶
func (r *CustomerBalanceTransactionService) List(ctx context.Context, customerID string, query CustomerBalanceTransactionListParams, opts ...option.RequestOption) (res *pagination.Page[CustomerBalanceTransactionListResponse], err error)
## The customer balance
The customer balance is an amount in the customer's currency, which Orb automatically applies to subsequent invoices. This balance can be adjusted manually via Orb's webapp on the customer details page. You can use this balance to provide a fixed mid-period credit to the customer. Commonly, this is done due to system downtime/SLA violation, or an adhoc adjustment discussed with the customer.
If the balance is a positive value at the time of invoicing, it represents that the customer has credit that should be used to offset the amount due on the next issued invoice. In this case, Orb will automatically reduce the next invoice by the balance amount, and roll over any remaining balance if the invoice is fully discounted.
If the balance is a negative value at the time of invoicing, Orb will increase the invoice's amount due with a positive adjustment, and reset the balance to 0.
This endpoint retrieves all customer balance transactions in reverse chronological order for a single customer, providing a complete audit trail of all adjustments and invoice applications.
## Eligibility
The customer balance can only be applied to invoices or adjusted manually if invoices are not synced to a separate invoicing provider. If a payment gateway such as Stripe is used, the balance will be applied to the invoice before forwarding payment to the gateway.
func (*CustomerBalanceTransactionService) ListAutoPaging ¶
func (r *CustomerBalanceTransactionService) ListAutoPaging(ctx context.Context, customerID string, query CustomerBalanceTransactionListParams, opts ...option.RequestOption) *pagination.PageAutoPager[CustomerBalanceTransactionListResponse]
## The customer balance
The customer balance is an amount in the customer's currency, which Orb automatically applies to subsequent invoices. This balance can be adjusted manually via Orb's webapp on the customer details page. You can use this balance to provide a fixed mid-period credit to the customer. Commonly, this is done due to system downtime/SLA violation, or an adhoc adjustment discussed with the customer.
If the balance is a positive value at the time of invoicing, it represents that the customer has credit that should be used to offset the amount due on the next issued invoice. In this case, Orb will automatically reduce the next invoice by the balance amount, and roll over any remaining balance if the invoice is fully discounted.
If the balance is a negative value at the time of invoicing, Orb will increase the invoice's amount due with a positive adjustment, and reset the balance to 0.
This endpoint retrieves all customer balance transactions in reverse chronological order for a single customer, providing a complete audit trail of all adjustments and invoice applications.
## Eligibility
The customer balance can only be applied to invoices or adjusted manually if invoices are not synced to a separate invoicing provider. If a payment gateway such as Stripe is used, the balance will be applied to the invoice before forwarding payment to the gateway.
func (*CustomerBalanceTransactionService) New ¶
func (r *CustomerBalanceTransactionService) New(ctx context.Context, customerID string, body CustomerBalanceTransactionNewParams, opts ...option.RequestOption) (res *CustomerBalanceTransactionNewResponse, err error)
Creates an immutable balance transaction that updates the customer's balance and returns back the newly created transaction.
type CustomerBillingAddress ¶
type CustomerBillingAddress 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 customerBillingAddressJSON `json:"-"` }
func (*CustomerBillingAddress) UnmarshalJSON ¶
func (r *CustomerBillingAddress) UnmarshalJSON(data []byte) (err error)
type CustomerCostListByExternalIDParams ¶
type CustomerCostListByExternalIDParams struct { // The currency or custom pricing unit to use. Currency param.Field[string] `query:"currency"` // Costs returned are exclusive of `timeframe_end`. TimeframeEnd param.Field[time.Time] `query:"timeframe_end" format:"date-time"` // Costs returned are inclusive of `timeframe_start`. TimeframeStart param.Field[time.Time] `query:"timeframe_start" format:"date-time"` // Controls whether Orb returns cumulative costs since the start of the billing // period, or incremental day-by-day costs. If your customer has minimums or // discounts, it's strongly recommended that you use the default cumulative // behavior. ViewMode param.Field[CustomerCostListByExternalIDParamsViewMode] `query:"view_mode"` }
func (CustomerCostListByExternalIDParams) URLQuery ¶
func (r CustomerCostListByExternalIDParams) URLQuery() (v url.Values)
URLQuery serializes CustomerCostListByExternalIDParams's query parameters as `url.Values`.
type CustomerCostListByExternalIDParamsViewMode ¶
type CustomerCostListByExternalIDParamsViewMode string
Controls whether Orb returns cumulative costs since the start of the billing period, or incremental day-by-day costs. If your customer has minimums or discounts, it's strongly recommended that you use the default cumulative behavior.
const ( CustomerCostListByExternalIDParamsViewModePeriodic CustomerCostListByExternalIDParamsViewMode = "periodic" CustomerCostListByExternalIDParamsViewModeCumulative CustomerCostListByExternalIDParamsViewMode = "cumulative" )
func (CustomerCostListByExternalIDParamsViewMode) IsKnown ¶ added in v0.24.0
func (r CustomerCostListByExternalIDParamsViewMode) IsKnown() bool
type CustomerCostListByExternalIDResponse ¶
type CustomerCostListByExternalIDResponse struct { Data []CustomerCostListByExternalIDResponseData `json:"data,required"` JSON customerCostListByExternalIDResponseJSON `json:"-"` }
func (*CustomerCostListByExternalIDResponse) UnmarshalJSON ¶
func (r *CustomerCostListByExternalIDResponse) UnmarshalJSON(data []byte) (err error)
type CustomerCostListByExternalIDResponseData ¶
type CustomerCostListByExternalIDResponseData struct { PerPriceCosts []CustomerCostListByExternalIDResponseDataPerPriceCost `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 customerCostListByExternalIDResponseDataJSON `json:"-"` }
func (*CustomerCostListByExternalIDResponseData) UnmarshalJSON ¶
func (r *CustomerCostListByExternalIDResponseData) UnmarshalJSON(data []byte) (err error)
type CustomerCostListByExternalIDResponseDataPerPriceCost ¶
type CustomerCostListByExternalIDResponseDataPerPriceCost struct { // 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. // // ## Unit pricing // // With unit pricing, each unit costs a fixed amount. // // “`json // // { // ... // "model_type": "unit", // "unit_config": { // "unit_amount": "0.50" // } // ... // } // // “` // // ## Tiered pricing // // In tiered pricing, the cost of a given unit depends on the tier range that it // falls into, where each tier range is defined by an upper and lower bound. For // example, the first ten units may cost $0.50 each and all units thereafter may // cost $0.10 each. // // “`json // // { // ... // "model_type": "tiered", // "tiered_config": { // "tiers": [ // { // "first_unit": 1, // "last_unit": 10, // "unit_amount": "0.50" // }, // { // "first_unit": 11, // "last_unit": null, // "unit_amount": "0.10" // } // ] // } // ... // // “` // // ## Bulk pricing // // Bulk pricing applies when the number of units determine the cost of all units. // For example, if you've bought less than 10 units, they may each be $0.50 for a // total of $5.00. Once you've bought more than 10 units, all units may now be // priced at $0.40 (i.e. 101 units total would be $40.40). // // “`json // // { // ... // "model_type": "bulk", // "bulk_config": { // "tiers": [ // { // "maximum_units": 10, // "unit_amount": "0.50" // }, // { // "maximum_units": 1000, // "unit_amount": "0.40" // } // ] // } // ... // } // // “` // // ## Package pricing // // Package pricing defines the size or granularity of a unit for billing purposes. // For example, if the package size is set to 5, then 4 units will be billed as 5 // and 6 units will be billed at 10. // // “`json // // { // ... // "model_type": "package", // "package_config": { // "package_amount": "0.80", // "package_size": 10 // } // ... // } // // “` // // ## BPS pricing // // BPS pricing specifies a per-event (e.g. per-payment) rate in one hundredth of a // percent (the number of basis points to charge), as well as a cap per event to // assess. For example, this would allow you to assess a fee of 0.25% on every // payment you process, with a maximum charge of $25 per payment. // // “`json // // { // ... // "model_type": "bps", // "bps_config": { // "bps": 125, // "per_unit_maximum": "11.00" // } // ... // } // // “` // // ## Bulk BPS pricing // // Bulk BPS pricing specifies BPS parameters in a tiered manner, dependent on the // total quantity across all events. Similar to bulk pricing, the BPS parameters of // a given event depends on the tier range that the billing period falls into. Each // tier range is defined by an upper bound. For example, after $1.5M of payment // volume is reached, each individual payment may have a lower cap or a smaller // take-rate. // // “`json // // ... // "model_type": "bulk_bps", // "bulk_bps_config": { // "tiers": [ // { // "maximum_amount": "1000000.00", // "bps": 125, // "per_unit_maximum": "19.00" // }, // { // "maximum_amount": null, // "bps": 115, // "per_unit_maximum": "4.00" // } // ] // } // ... // } // // “` // // ## Tiered BPS pricing // // Tiered BPS pricing specifies BPS parameters in a graduated manner, where an // event's applicable parameter is a function of its marginal addition to the // period total. Similar to tiered pricing, the BPS parameters of a given event // depends on the tier range that it falls into, where each tier range is defined // by an upper and lower bound. For example, the first few payments may have a 0.8 // BPS take-rate and all payments after a specific volume may incur a take-rate of // 0.5 BPS each. // // “`json // // ... // "model_type": "tiered_bps", // "tiered_bps_config": { // "tiers": [ // { // "minimum_amount": "0", // "maximum_amount": "1000000.00", // "bps": 125, // "per_unit_maximum": "19.00" // }, // { // "minimum_amount": "1000000.00", // "maximum_amount": null, // "bps": 115, // "per_unit_maximum": "4.00" // } // ] // } // ... // } // // “` // // ## Matrix pricing // // Matrix pricing defines a set of unit prices in a one or two-dimensional matrix. // `dimensions` defines the two event property values evaluated in this pricing // model. In a one-dimensional matrix, the second value is `null`. Every // configuration has a list of `matrix_values` which give the unit prices for // specified property values. In a one-dimensional matrix, the matrix values will // have `dimension_values` where the second value of the pair is null. If an event // does not match any of the dimension values in the matrix, it will resort to the // `default_unit_amount`. // // “`json // // { // "model_type": "matrix" // "matrix_config": { // "default_unit_amount": "3.00", // "dimensions": [ // "cluster_name", // "region" // ], // "matrix_values": [ // { // "dimension_values": [ // "alpha", // "west" // ], // "unit_amount": "2.00" // }, // ... // ] // } // } // // “` // // ## Fixed fees // // Fixed fees are prices that are applied independent of usage quantities, and // follow unit pricing. They also have an additional parameter // `fixed_price_quantity`. If the Price represents a fixed cost, this represents // the quantity of units applied. // // “`json // // { // ... // "id": "price_id", // "model_type": "unit", // "unit_config": { // "unit_amount": "2.00" // }, // "fixed_price_quantity": 3.0 // ... // } // // “` Price Price `json:"price,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 customerCostListByExternalIDResponseDataPerPriceCostJSON `json:"-"` }
func (*CustomerCostListByExternalIDResponseDataPerPriceCost) UnmarshalJSON ¶
func (r *CustomerCostListByExternalIDResponseDataPerPriceCost) UnmarshalJSON(data []byte) (err error)
type CustomerCostListParams ¶
type CustomerCostListParams struct { // The currency or custom pricing unit to use. Currency param.Field[string] `query:"currency"` // Costs returned are exclusive of `timeframe_end`. TimeframeEnd param.Field[time.Time] `query:"timeframe_end" format:"date-time"` // Costs returned are inclusive of `timeframe_start`. TimeframeStart param.Field[time.Time] `query:"timeframe_start" format:"date-time"` // Controls whether Orb returns cumulative costs since the start of the billing // period, or incremental day-by-day costs. If your customer has minimums or // discounts, it's strongly recommended that you use the default cumulative // behavior. ViewMode param.Field[CustomerCostListParamsViewMode] `query:"view_mode"` }
func (CustomerCostListParams) URLQuery ¶
func (r CustomerCostListParams) URLQuery() (v url.Values)
URLQuery serializes CustomerCostListParams's query parameters as `url.Values`.
type CustomerCostListParamsViewMode ¶
type CustomerCostListParamsViewMode string
Controls whether Orb returns cumulative costs since the start of the billing period, or incremental day-by-day costs. If your customer has minimums or discounts, it's strongly recommended that you use the default cumulative behavior.
const ( CustomerCostListParamsViewModePeriodic CustomerCostListParamsViewMode = "periodic" CustomerCostListParamsViewModeCumulative CustomerCostListParamsViewMode = "cumulative" )
func (CustomerCostListParamsViewMode) IsKnown ¶ added in v0.24.0
func (r CustomerCostListParamsViewMode) IsKnown() bool
type CustomerCostListResponse ¶
type CustomerCostListResponse struct { Data []CustomerCostListResponseData `json:"data,required"` JSON customerCostListResponseJSON `json:"-"` }
func (*CustomerCostListResponse) UnmarshalJSON ¶
func (r *CustomerCostListResponse) UnmarshalJSON(data []byte) (err error)
type CustomerCostListResponseData ¶
type CustomerCostListResponseData struct { PerPriceCosts []CustomerCostListResponseDataPerPriceCost `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 customerCostListResponseDataJSON `json:"-"` }
func (*CustomerCostListResponseData) UnmarshalJSON ¶
func (r *CustomerCostListResponseData) UnmarshalJSON(data []byte) (err error)
type CustomerCostListResponseDataPerPriceCost ¶
type CustomerCostListResponseDataPerPriceCost struct { // 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. // // ## Unit pricing // // With unit pricing, each unit costs a fixed amount. // // “`json // // { // ... // "model_type": "unit", // "unit_config": { // "unit_amount": "0.50" // } // ... // } // // “` // // ## Tiered pricing // // In tiered pricing, the cost of a given unit depends on the tier range that it // falls into, where each tier range is defined by an upper and lower bound. For // example, the first ten units may cost $0.50 each and all units thereafter may // cost $0.10 each. // // “`json // // { // ... // "model_type": "tiered", // "tiered_config": { // "tiers": [ // { // "first_unit": 1, // "last_unit": 10, // "unit_amount": "0.50" // }, // { // "first_unit": 11, // "last_unit": null, // "unit_amount": "0.10" // } // ] // } // ... // // “` // // ## Bulk pricing // // Bulk pricing applies when the number of units determine the cost of all units. // For example, if you've bought less than 10 units, they may each be $0.50 for a // total of $5.00. Once you've bought more than 10 units, all units may now be // priced at $0.40 (i.e. 101 units total would be $40.40). // // “`json // // { // ... // "model_type": "bulk", // "bulk_config": { // "tiers": [ // { // "maximum_units": 10, // "unit_amount": "0.50" // }, // { // "maximum_units": 1000, // "unit_amount": "0.40" // } // ] // } // ... // } // // “` // // ## Package pricing // // Package pricing defines the size or granularity of a unit for billing purposes. // For example, if the package size is set to 5, then 4 units will be billed as 5 // and 6 units will be billed at 10. // // “`json // // { // ... // "model_type": "package", // "package_config": { // "package_amount": "0.80", // "package_size": 10 // } // ... // } // // “` // // ## BPS pricing // // BPS pricing specifies a per-event (e.g. per-payment) rate in one hundredth of a // percent (the number of basis points to charge), as well as a cap per event to // assess. For example, this would allow you to assess a fee of 0.25% on every // payment you process, with a maximum charge of $25 per payment. // // “`json // // { // ... // "model_type": "bps", // "bps_config": { // "bps": 125, // "per_unit_maximum": "11.00" // } // ... // } // // “` // // ## Bulk BPS pricing // // Bulk BPS pricing specifies BPS parameters in a tiered manner, dependent on the // total quantity across all events. Similar to bulk pricing, the BPS parameters of // a given event depends on the tier range that the billing period falls into. Each // tier range is defined by an upper bound. For example, after $1.5M of payment // volume is reached, each individual payment may have a lower cap or a smaller // take-rate. // // “`json // // ... // "model_type": "bulk_bps", // "bulk_bps_config": { // "tiers": [ // { // "maximum_amount": "1000000.00", // "bps": 125, // "per_unit_maximum": "19.00" // }, // { // "maximum_amount": null, // "bps": 115, // "per_unit_maximum": "4.00" // } // ] // } // ... // } // // “` // // ## Tiered BPS pricing // // Tiered BPS pricing specifies BPS parameters in a graduated manner, where an // event's applicable parameter is a function of its marginal addition to the // period total. Similar to tiered pricing, the BPS parameters of a given event // depends on the tier range that it falls into, where each tier range is defined // by an upper and lower bound. For example, the first few payments may have a 0.8 // BPS take-rate and all payments after a specific volume may incur a take-rate of // 0.5 BPS each. // // “`json // // ... // "model_type": "tiered_bps", // "tiered_bps_config": { // "tiers": [ // { // "minimum_amount": "0", // "maximum_amount": "1000000.00", // "bps": 125, // "per_unit_maximum": "19.00" // }, // { // "minimum_amount": "1000000.00", // "maximum_amount": null, // "bps": 115, // "per_unit_maximum": "4.00" // } // ] // } // ... // } // // “` // // ## Matrix pricing // // Matrix pricing defines a set of unit prices in a one or two-dimensional matrix. // `dimensions` defines the two event property values evaluated in this pricing // model. In a one-dimensional matrix, the second value is `null`. Every // configuration has a list of `matrix_values` which give the unit prices for // specified property values. In a one-dimensional matrix, the matrix values will // have `dimension_values` where the second value of the pair is null. If an event // does not match any of the dimension values in the matrix, it will resort to the // `default_unit_amount`. // // “`json // // { // "model_type": "matrix" // "matrix_config": { // "default_unit_amount": "3.00", // "dimensions": [ // "cluster_name", // "region" // ], // "matrix_values": [ // { // "dimension_values": [ // "alpha", // "west" // ], // "unit_amount": "2.00" // }, // ... // ] // } // } // // “` // // ## Fixed fees // // Fixed fees are prices that are applied independent of usage quantities, and // follow unit pricing. They also have an additional parameter // `fixed_price_quantity`. If the Price represents a fixed cost, this represents // the quantity of units applied. // // “`json // // { // ... // "id": "price_id", // "model_type": "unit", // "unit_config": { // "unit_amount": "2.00" // }, // "fixed_price_quantity": 3.0 // ... // } // // “` Price Price `json:"price,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 customerCostListResponseDataPerPriceCostJSON `json:"-"` }
func (*CustomerCostListResponseDataPerPriceCost) UnmarshalJSON ¶
func (r *CustomerCostListResponseDataPerPriceCost) UnmarshalJSON(data []byte) (err error)
type CustomerCostService ¶
type CustomerCostService struct {
Options []option.RequestOption
}
CustomerCostService contains methods and other services that help with interacting with the orb API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCustomerCostService method instead.
func NewCustomerCostService ¶
func NewCustomerCostService(opts ...option.RequestOption) (r *CustomerCostService)
NewCustomerCostService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*CustomerCostService) List ¶
func (r *CustomerCostService) List(ctx context.Context, customerID string, query CustomerCostListParams, opts ...option.RequestOption) (res *CustomerCostListResponse, err error)
This endpoint is used to fetch a day-by-day snapshot of a customer's costs in Orb, calculated by applying pricing information to the underlying usage (see the [subscription usage endpoint](fetch-subscription-usage.api.mdx) to fetch usage per metric, in usage units rather than a currency).
This endpoint can be leveraged for internal tooling and to provide a more transparent billing experience for your end users:
- Understand the cost breakdown per line item historically and in real-time for the current billing period.
- Provide customer visibility into how different services are contributing to the overall invoice with a per-day timeseries (as compared to the [upcoming invoice](fetch-upcoming-invoice) resource, which represents a snapshot for the current period).
- Assess how minimums and discounts affect your customers by teasing apart costs directly as a result of usage, as opposed to minimums and discounts at the plan and price level.
- Gain insight into key customer health metrics, such as the percent utilization of the minimum committed spend.
## Fetching subscriptions
By default, this endpoint fetches the currently active subscription for the customer, and returns cost information for the subscription's current billing period, broken down by each participating price. If there are no currently active subscriptions, this will instead default to the most recently active subscription or return an empty series if none are found. For example, if your plan charges for compute hours, job runs, and data syncs, then this endpoint would provide a daily breakdown of your customer's cost for each of those axes.
If timeframe bounds are specified, Orb fetches all subscriptions that were active in that timeframe. If two subscriptions overlap on a single day, costs from each price will be summed, and prices for both subscriptions will be included in the breakdown.
## Prepaid plans
For plans that include prices which deduct credits rather than accrue in-arrears charges in a billable currency, this endpoint will return the total deduction amount, in credits, for the specified timeframe.
## Cumulative subtotals and totals
Since the subtotal and total must factor in any billing-period level discounts and minimums, it's most meaningful to consider costs relative to the start of the subscription's billing period. As a result, by default this endpoint returns cumulative totals since the beginning of the billing period. In particular, the `timeframe_start` of a returned timeframe window is _always_ the beginning of the billing period and `timeframe_end` is incremented one day at a time to build the result.
A customer that uses a few API calls a day but has a minimum commitment might exhibit the following pattern for their subtotal and total in the first few days of the month. Here, we assume that each API call is $2.50, the customer's plan has a monthly minimum of $50 for this price, and that the subscription's billing period bounds are aligned to the first of the month:
| timeframe_start | timeframe_end | Cumulative usage | Subtotal | Total (incl. commitment) | | --------------- | ------------- | ---------------- | -------- | ------------------------ | | 2023-02-01 | 2023-02-02 | 9 | $22.50 | $50.00 | | 2023-02-01 | 2023-02-03 | 19 | $47.50 | $50.00 | | 2023-02-01 | 2023-02-04 | 20 | $50.00 | $50.00 | | 2023-02-01 | 2023-02-05 | 28 | $70.00 | $70.00 | | 2023-02-01 | 2023-02-06 | 36 | $90.00 | $90.00 |
### Periodic values
When the query parameter `view_mode=periodic` is specified, Orb will return an incremental day-by-day view of costs. In this case, there will always be a one-day difference between `timeframe_start` and `timeframe_end` for the timeframes returned. This is a transform on top of the cumulative costs, calculated by taking the difference of each timeframe with the last. Note that in the above example, the `Total` value would be 0 for the second two data points, since the minimum commitment has not yet been hit and each day is not contributing anything to the total cost.
## Timeframe bounds
For an active subscription, both timeframes should be specified in the request. If a subscription starts or ends within the timeframe, the response will only include windows where the subscription is active. If a subscription has ended, no timeframe bounds need to be specified and the response will default to the billing period when the subscription was last active.
As noted above, `timeframe_start` for a given cumulative datapoint is always the beginning of the billing period, and `timeframe_end` is incremented one day at a time to construct the response. When a timeframe is passed in that is not aligned to the current subscription's billing period, the response will contain cumulative totals from multiple billing periods.
Suppose the queried customer has a subscription aligned to the 15th of every month. If this endpoint is queried with the date range `2023-06-01` - `2023-07-01`, the first data point will represent about half a billing period's worth of costs, accounting for accruals from the start of the billing period and inclusive of the first day of the timeframe (`timeframe_start = 2023-05-15 00:00:00`, `timeframe_end = 2023-06-02 00:00:00`)
| datapoint index | timeframe_start | timeframe_end | | --------------- | --------------- | ------------- | | 0 | 2023-05-15 | 2023-06-02 | | 1 | 2023-05-15 | 2023-06-03 | | 2 | ... | ... | | 3 | 2023-05-15 | 2023-06-14 | | 4 | 2023-06-15 | 2023-06-16 | | 5 | 2023-06-15 | 2023-06-17 | | 6 | ... | ... | | 7 | 2023-06-15 | 2023-07-01 |
You can see this sliced timeframe visualized [here](https://i.imgur.com/TXhYgme.png).
## Grouping by custom attributes
In order to view costs grouped by a specific _attribute_ that each event is tagged with (i.e. `cluster`), you can additionally specify a `group_by` key. The `group_by` key denotes the event property on which to group.
When returning grouped costs, a separate `price_group` object in the `per_price_costs` array is returned for each value of the `group_by` key present in your events. The `subtotal` value of the `per_price_costs` object is the sum of each `price_group`'s total.
Orb expects events will contain values in the `properties` dictionary that correspond to the `group_by` key specified. By default, Orb will return a `null` group (i.e. events that match the metric but do not have the key set). Currently, it is only possible to view costs grouped by a single attribute at a time.
### Matrix prices
When a price uses matrix pricing, it's important to view costs grouped by those matrix dimensions. Orb will return `price_groups` with the `grouping_key` and `secondary_grouping_key` based on the matrix price definition, for each `grouping_value` and `secondary_grouping_value` available.
func (*CustomerCostService) ListByExternalID ¶
func (r *CustomerCostService) ListByExternalID(ctx context.Context, externalCustomerID string, query CustomerCostListByExternalIDParams, opts ...option.RequestOption) (res *CustomerCostListByExternalIDResponse, err error)
This endpoint is used to fetch a day-by-day snapshot of a customer's costs in Orb, calculated by applying pricing information to the underlying usage (see the [subscription usage endpoint](fetch-subscription-usage.api.mdx) to fetch usage per metric, in usage units rather than a currency).
This endpoint can be leveraged for internal tooling and to provide a more transparent billing experience for your end users:
- Understand the cost breakdown per line item historically and in real-time for the current billing period.
- Provide customer visibility into how different services are contributing to the overall invoice with a per-day timeseries (as compared to the [upcoming invoice](fetch-upcoming-invoice) resource, which represents a snapshot for the current period).
- Assess how minimums and discounts affect your customers by teasing apart costs directly as a result of usage, as opposed to minimums and discounts at the plan and price level.
- Gain insight into key customer health metrics, such as the percent utilization of the minimum committed spend.
## Fetching subscriptions
By default, this endpoint fetches the currently active subscription for the customer, and returns cost information for the subscription's current billing period, broken down by each participating price. If there are no currently active subscriptions, this will instead default to the most recently active subscription or return an empty series if none are found. For example, if your plan charges for compute hours, job runs, and data syncs, then this endpoint would provide a daily breakdown of your customer's cost for each of those axes.
If timeframe bounds are specified, Orb fetches all subscriptions that were active in that timeframe. If two subscriptions overlap on a single day, costs from each price will be summed, and prices for both subscriptions will be included in the breakdown.
## Prepaid plans
For plans that include prices which deduct credits rather than accrue in-arrears charges in a billable currency, this endpoint will return the total deduction amount, in credits, for the specified timeframe.
## Cumulative subtotals and totals
Since the subtotal and total must factor in any billing-period level discounts and minimums, it's most meaningful to consider costs relative to the start of the subscription's billing period. As a result, by default this endpoint returns cumulative totals since the beginning of the billing period. In particular, the `timeframe_start` of a returned timeframe window is _always_ the beginning of the billing period and `timeframe_end` is incremented one day at a time to build the result.
A customer that uses a few API calls a day but has a minimum commitment might exhibit the following pattern for their subtotal and total in the first few days of the month. Here, we assume that each API call is $2.50, the customer's plan has a monthly minimum of $50 for this price, and that the subscription's billing period bounds are aligned to the first of the month:
| timeframe_start | timeframe_end | Cumulative usage | Subtotal | Total (incl. commitment) | | --------------- | ------------- | ---------------- | -------- | ------------------------ | | 2023-02-01 | 2023-02-02 | 9 | $22.50 | $50.00 | | 2023-02-01 | 2023-02-03 | 19 | $47.50 | $50.00 | | 2023-02-01 | 2023-02-04 | 20 | $50.00 | $50.00 | | 2023-02-01 | 2023-02-05 | 28 | $70.00 | $70.00 | | 2023-02-01 | 2023-02-06 | 36 | $90.00 | $90.00 |
### Periodic values
When the query parameter `view_mode=periodic` is specified, Orb will return an incremental day-by-day view of costs. In this case, there will always be a one-day difference between `timeframe_start` and `timeframe_end` for the timeframes returned. This is a transform on top of the cumulative costs, calculated by taking the difference of each timeframe with the last. Note that in the above example, the `Total` value would be 0 for the second two data points, since the minimum commitment has not yet been hit and each day is not contributing anything to the total cost.
## Timeframe bounds
For an active subscription, both timeframes should be specified in the request. If a subscription starts or ends within the timeframe, the response will only include windows where the subscription is active. If a subscription has ended, no timeframe bounds need to be specified and the response will default to the billing period when the subscription was last active.
As noted above, `timeframe_start` for a given cumulative datapoint is always the beginning of the billing period, and `timeframe_end` is incremented one day at a time to construct the response. When a timeframe is passed in that is not aligned to the current subscription's billing period, the response will contain cumulative totals from multiple billing periods.
Suppose the queried customer has a subscription aligned to the 15th of every month. If this endpoint is queried with the date range `2023-06-01` - `2023-07-01`, the first data point will represent about half a billing period's worth of costs, accounting for accruals from the start of the billing period and inclusive of the first day of the timeframe (`timeframe_start = 2023-05-15 00:00:00`, `timeframe_end = 2023-06-02 00:00:00`)
| datapoint index | timeframe_start | timeframe_end | | --------------- | --------------- | ------------- | | 0 | 2023-05-15 | 2023-06-02 | | 1 | 2023-05-15 | 2023-06-03 | | 2 | ... | ... | | 3 | 2023-05-15 | 2023-06-14 | | 4 | 2023-06-15 | 2023-06-16 | | 5 | 2023-06-15 | 2023-06-17 | | 6 | ... | ... | | 7 | 2023-06-15 | 2023-07-01 |
You can see this sliced timeframe visualized [here](https://i.imgur.com/TXhYgme.png).
## Grouping by custom attributes
In order to view costs grouped by a specific _attribute_ that each event is tagged with (i.e. `cluster`), you can additionally specify a `group_by` key. The `group_by` key denotes the event property on which to group.
When returning grouped costs, a separate `price_group` object in the `per_price_costs` array is returned for each value of the `group_by` key present in your events. The `subtotal` value of the `per_price_costs` object is the sum of each `price_group`'s total.
Orb expects events will contain values in the `properties` dictionary that correspond to the `group_by` key specified. By default, Orb will return a `null` group (i.e. events that match the metric but do not have the key set). Currently, it is only possible to view costs grouped by a single attribute at a time.
### Matrix prices
When a price uses matrix pricing, it's important to view costs grouped by those matrix dimensions. Orb will return `price_groups` with the `grouping_key` and `secondary_grouping_key` based on the matrix price definition, for each `grouping_value` and `secondary_grouping_value` available.
type CustomerCreditLedgerListByExternalIDParams ¶
type CustomerCreditLedgerListByExternalIDParams struct { CreatedAtGt param.Field[time.Time] `query:"created_at[gt]" format:"date-time"` CreatedAtGte param.Field[time.Time] `query:"created_at[gte]" format:"date-time"` CreatedAtLt param.Field[time.Time] `query:"created_at[lt]" format:"date-time"` CreatedAtLte param.Field[time.Time] `query:"created_at[lte]" format:"date-time"` // The ledger currency or custom pricing unit to use. Currency param.Field[string] `query:"currency"` // Cursor for pagination. This can be populated by the `next_cursor` value returned // from the initial request. Cursor param.Field[string] `query:"cursor"` EntryStatus param.Field[CustomerCreditLedgerListByExternalIDParamsEntryStatus] `query:"entry_status"` EntryType param.Field[CustomerCreditLedgerListByExternalIDParamsEntryType] `query:"entry_type"` // The number of items to fetch. Defaults to 20. Limit param.Field[int64] `query:"limit"` MinimumAmount param.Field[string] `query:"minimum_amount"` }
func (CustomerCreditLedgerListByExternalIDParams) URLQuery ¶
func (r CustomerCreditLedgerListByExternalIDParams) URLQuery() (v url.Values)
URLQuery serializes CustomerCreditLedgerListByExternalIDParams's query parameters as `url.Values`.
type CustomerCreditLedgerListByExternalIDParamsEntryStatus ¶
type CustomerCreditLedgerListByExternalIDParamsEntryStatus string
const ( CustomerCreditLedgerListByExternalIDParamsEntryStatusCommitted CustomerCreditLedgerListByExternalIDParamsEntryStatus = "committed" CustomerCreditLedgerListByExternalIDParamsEntryStatusPending CustomerCreditLedgerListByExternalIDParamsEntryStatus = "pending" )
func (CustomerCreditLedgerListByExternalIDParamsEntryStatus) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerListByExternalIDParamsEntryStatus) IsKnown() bool
type CustomerCreditLedgerListByExternalIDParamsEntryType ¶
type CustomerCreditLedgerListByExternalIDParamsEntryType string
const ( CustomerCreditLedgerListByExternalIDParamsEntryTypeIncrement CustomerCreditLedgerListByExternalIDParamsEntryType = "increment" CustomerCreditLedgerListByExternalIDParamsEntryTypeDecrement CustomerCreditLedgerListByExternalIDParamsEntryType = "decrement" CustomerCreditLedgerListByExternalIDParamsEntryTypeExpirationChange CustomerCreditLedgerListByExternalIDParamsEntryType = "expiration_change" CustomerCreditLedgerListByExternalIDParamsEntryTypeCreditBlockExpiry CustomerCreditLedgerListByExternalIDParamsEntryType = "credit_block_expiry" CustomerCreditLedgerListByExternalIDParamsEntryTypeVoid CustomerCreditLedgerListByExternalIDParamsEntryType = "void" CustomerCreditLedgerListByExternalIDParamsEntryTypeVoidInitiated CustomerCreditLedgerListByExternalIDParamsEntryType = "void_initiated" CustomerCreditLedgerListByExternalIDParamsEntryTypeAmendment CustomerCreditLedgerListByExternalIDParamsEntryType = "amendment" )
func (CustomerCreditLedgerListByExternalIDParamsEntryType) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerListByExternalIDParamsEntryType) IsKnown() bool
type CustomerCreditLedgerListByExternalIDResponse ¶
type CustomerCreditLedgerListByExternalIDResponse struct { // This field can have the runtime type of [map[string]string]. Metadata interface{} `json:"metadata"` ID string `json:"id,required"` LedgerSequenceNumber int64 `json:"ledger_sequence_number,required"` EntryStatus CustomerCreditLedgerListByExternalIDResponseEntryStatus `json:"entry_status,required"` // This field can have the runtime type of // [CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntryCustomer], // [CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntryCustomer], // [CustomerCreditLedgerListByExternalIDResponseExpirationChangeLedgerEntryCustomer], // [CustomerCreditLedgerListByExternalIDResponseCreditBlockExpiryLedgerEntryCustomer], // [CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntryCustomer], // [CustomerCreditLedgerListByExternalIDResponseVoidInitiatedLedgerEntryCustomer], // [CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntryCustomer]. Customer interface{} `json:"customer"` StartingBalance float64 `json:"starting_balance,required"` EndingBalance float64 `json:"ending_balance,required"` Amount float64 `json:"amount,required"` Currency string `json:"currency,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` Description string `json:"description,required,nullable"` // This field can have the runtime type of // [CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntryCreditBlock], // [CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntryCreditBlock], // [CustomerCreditLedgerListByExternalIDResponseExpirationChangeLedgerEntryCreditBlock], // [CustomerCreditLedgerListByExternalIDResponseCreditBlockExpiryLedgerEntryCreditBlock], // [CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntryCreditBlock], // [CustomerCreditLedgerListByExternalIDResponseVoidInitiatedLedgerEntryCreditBlock], // [CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntryCreditBlock]. CreditBlock interface{} `json:"credit_block"` EntryType CustomerCreditLedgerListByExternalIDResponseEntryType `json:"entry_type,required"` PriceID string `json:"price_id,nullable"` EventID string `json:"event_id,nullable"` InvoiceID string `json:"invoice_id,nullable"` NewBlockExpiryDate time.Time `json:"new_block_expiry_date" format:"date-time"` VoidReason string `json:"void_reason,nullable"` VoidAmount float64 `json:"void_amount"` JSON customerCreditLedgerListByExternalIDResponseJSON `json:"-"` // contains filtered or unexported fields }
The [Credit Ledger Entry resource](/guides/product-catalog/prepurchase) models prepaid credits within Orb.
func (CustomerCreditLedgerListByExternalIDResponse) AsUnion ¶ added in v0.25.0
func (r CustomerCreditLedgerListByExternalIDResponse) AsUnion() CustomerCreditLedgerListByExternalIDResponseUnion
AsUnion returns a CustomerCreditLedgerListByExternalIDResponseUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntry, CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntry, CustomerCreditLedgerListByExternalIDResponseExpirationChangeLedgerEntry, CustomerCreditLedgerListByExternalIDResponseCreditBlockExpiryLedgerEntry, CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntry, CustomerCreditLedgerListByExternalIDResponseVoidInitiatedLedgerEntry, CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntry.
func (*CustomerCreditLedgerListByExternalIDResponse) UnmarshalJSON ¶ added in v0.25.0
func (r *CustomerCreditLedgerListByExternalIDResponse) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntry ¶
type CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntry struct { ID string `json:"id,required"` Amount float64 `json:"amount,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditBlock CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntryCreditBlock `json:"credit_block,required"` Currency string `json:"currency,required"` Customer CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntryCustomer `json:"customer,required"` Description string `json:"description,required,nullable"` EndingBalance float64 `json:"ending_balance,required"` EntryStatus CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntryEntryStatus `json:"entry_status,required"` EntryType CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntryEntryType `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 customerCreditLedgerListByExternalIDResponseAmendmentLedgerEntryJSON `json:"-"` }
func (*CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntry) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntry) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntryCreditBlock ¶
type CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntryCreditBlock 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 customerCreditLedgerListByExternalIDResponseAmendmentLedgerEntryCreditBlockJSON `json:"-"` }
func (*CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntryCreditBlock) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntryCreditBlock) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntryCustomer ¶
type CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntryCustomer struct { ID string `json:"id,required"` ExternalCustomerID string `json:"external_customer_id,required,nullable"` JSON customerCreditLedgerListByExternalIDResponseAmendmentLedgerEntryCustomerJSON `json:"-"` }
func (*CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntryCustomer) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntryCustomer) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntryEntryStatus ¶
type CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntryEntryStatus string
const ( CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntryEntryStatusCommitted CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntryEntryStatus = "committed" CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntryEntryStatusPending CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntryEntryStatus = "pending" )
func (CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntryEntryStatus) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntryEntryStatus) IsKnown() bool
type CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntryEntryType ¶
type CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntryEntryType string
const (
CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntryEntryTypeAmendment CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntryEntryType = "amendment"
)
func (CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntryEntryType) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntryEntryType) IsKnown() bool
type CustomerCreditLedgerListByExternalIDResponseCreditBlockExpiryLedgerEntry ¶
type CustomerCreditLedgerListByExternalIDResponseCreditBlockExpiryLedgerEntry struct { ID string `json:"id,required"` Amount float64 `json:"amount,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditBlock CustomerCreditLedgerListByExternalIDResponseCreditBlockExpiryLedgerEntryCreditBlock `json:"credit_block,required"` Currency string `json:"currency,required"` Customer CustomerCreditLedgerListByExternalIDResponseCreditBlockExpiryLedgerEntryCustomer `json:"customer,required"` Description string `json:"description,required,nullable"` EndingBalance float64 `json:"ending_balance,required"` EntryStatus CustomerCreditLedgerListByExternalIDResponseCreditBlockExpiryLedgerEntryEntryStatus `json:"entry_status,required"` EntryType CustomerCreditLedgerListByExternalIDResponseCreditBlockExpiryLedgerEntryEntryType `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 customerCreditLedgerListByExternalIDResponseCreditBlockExpiryLedgerEntryJSON `json:"-"` }
func (*CustomerCreditLedgerListByExternalIDResponseCreditBlockExpiryLedgerEntry) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListByExternalIDResponseCreditBlockExpiryLedgerEntry) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListByExternalIDResponseCreditBlockExpiryLedgerEntryCreditBlock ¶
type CustomerCreditLedgerListByExternalIDResponseCreditBlockExpiryLedgerEntryCreditBlock 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 customerCreditLedgerListByExternalIDResponseCreditBlockExpiryLedgerEntryCreditBlockJSON `json:"-"` }
func (*CustomerCreditLedgerListByExternalIDResponseCreditBlockExpiryLedgerEntryCreditBlock) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListByExternalIDResponseCreditBlockExpiryLedgerEntryCreditBlock) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListByExternalIDResponseCreditBlockExpiryLedgerEntryCustomer ¶
type CustomerCreditLedgerListByExternalIDResponseCreditBlockExpiryLedgerEntryCustomer struct { ID string `json:"id,required"` ExternalCustomerID string `json:"external_customer_id,required,nullable"` JSON customerCreditLedgerListByExternalIDResponseCreditBlockExpiryLedgerEntryCustomerJSON `json:"-"` }
func (*CustomerCreditLedgerListByExternalIDResponseCreditBlockExpiryLedgerEntryCustomer) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListByExternalIDResponseCreditBlockExpiryLedgerEntryCustomer) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListByExternalIDResponseCreditBlockExpiryLedgerEntryEntryStatus ¶
type CustomerCreditLedgerListByExternalIDResponseCreditBlockExpiryLedgerEntryEntryStatus string
const ( CustomerCreditLedgerListByExternalIDResponseCreditBlockExpiryLedgerEntryEntryStatusCommitted CustomerCreditLedgerListByExternalIDResponseCreditBlockExpiryLedgerEntryEntryStatus = "committed" CustomerCreditLedgerListByExternalIDResponseCreditBlockExpiryLedgerEntryEntryStatusPending CustomerCreditLedgerListByExternalIDResponseCreditBlockExpiryLedgerEntryEntryStatus = "pending" )
type CustomerCreditLedgerListByExternalIDResponseCreditBlockExpiryLedgerEntryEntryType ¶
type CustomerCreditLedgerListByExternalIDResponseCreditBlockExpiryLedgerEntryEntryType string
const (
CustomerCreditLedgerListByExternalIDResponseCreditBlockExpiryLedgerEntryEntryTypeCreditBlockExpiry CustomerCreditLedgerListByExternalIDResponseCreditBlockExpiryLedgerEntryEntryType = "credit_block_expiry"
)
type CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntry ¶
type CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntry struct { ID string `json:"id,required"` Amount float64 `json:"amount,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditBlock CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntryCreditBlock `json:"credit_block,required"` Currency string `json:"currency,required"` Customer CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntryCustomer `json:"customer,required"` Description string `json:"description,required,nullable"` EndingBalance float64 `json:"ending_balance,required"` EntryStatus CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntryEntryStatus `json:"entry_status,required"` EntryType CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntryEntryType `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 customerCreditLedgerListByExternalIDResponseDecrementLedgerEntryJSON `json:"-"` }
func (*CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntry) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntry) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntryCreditBlock ¶
type CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntryCreditBlock 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 customerCreditLedgerListByExternalIDResponseDecrementLedgerEntryCreditBlockJSON `json:"-"` }
func (*CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntryCreditBlock) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntryCreditBlock) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntryCustomer ¶
type CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntryCustomer struct { ID string `json:"id,required"` ExternalCustomerID string `json:"external_customer_id,required,nullable"` JSON customerCreditLedgerListByExternalIDResponseDecrementLedgerEntryCustomerJSON `json:"-"` }
func (*CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntryCustomer) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntryCustomer) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntryEntryStatus ¶
type CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntryEntryStatus string
const ( CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntryEntryStatusCommitted CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntryEntryStatus = "committed" CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntryEntryStatusPending CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntryEntryStatus = "pending" )
func (CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntryEntryStatus) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntryEntryStatus) IsKnown() bool
type CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntryEntryType ¶
type CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntryEntryType string
const (
CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntryEntryTypeDecrement CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntryEntryType = "decrement"
)
func (CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntryEntryType) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntryEntryType) IsKnown() bool
type CustomerCreditLedgerListByExternalIDResponseEntryStatus ¶ added in v0.25.0
type CustomerCreditLedgerListByExternalIDResponseEntryStatus string
const ( CustomerCreditLedgerListByExternalIDResponseEntryStatusCommitted CustomerCreditLedgerListByExternalIDResponseEntryStatus = "committed" CustomerCreditLedgerListByExternalIDResponseEntryStatusPending CustomerCreditLedgerListByExternalIDResponseEntryStatus = "pending" )
func (CustomerCreditLedgerListByExternalIDResponseEntryStatus) IsKnown ¶ added in v0.25.0
func (r CustomerCreditLedgerListByExternalIDResponseEntryStatus) IsKnown() bool
type CustomerCreditLedgerListByExternalIDResponseEntryType ¶ added in v0.25.0
type CustomerCreditLedgerListByExternalIDResponseEntryType string
const ( CustomerCreditLedgerListByExternalIDResponseEntryTypeIncrement CustomerCreditLedgerListByExternalIDResponseEntryType = "increment" CustomerCreditLedgerListByExternalIDResponseEntryTypeDecrement CustomerCreditLedgerListByExternalIDResponseEntryType = "decrement" CustomerCreditLedgerListByExternalIDResponseEntryTypeExpirationChange CustomerCreditLedgerListByExternalIDResponseEntryType = "expiration_change" CustomerCreditLedgerListByExternalIDResponseEntryTypeCreditBlockExpiry CustomerCreditLedgerListByExternalIDResponseEntryType = "credit_block_expiry" CustomerCreditLedgerListByExternalIDResponseEntryTypeVoid CustomerCreditLedgerListByExternalIDResponseEntryType = "void" CustomerCreditLedgerListByExternalIDResponseEntryTypeVoidInitiated CustomerCreditLedgerListByExternalIDResponseEntryType = "void_initiated" CustomerCreditLedgerListByExternalIDResponseEntryTypeAmendment CustomerCreditLedgerListByExternalIDResponseEntryType = "amendment" )
func (CustomerCreditLedgerListByExternalIDResponseEntryType) IsKnown ¶ added in v0.25.0
func (r CustomerCreditLedgerListByExternalIDResponseEntryType) IsKnown() bool
type CustomerCreditLedgerListByExternalIDResponseExpirationChangeLedgerEntry ¶
type CustomerCreditLedgerListByExternalIDResponseExpirationChangeLedgerEntry struct { ID string `json:"id,required"` Amount float64 `json:"amount,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditBlock CustomerCreditLedgerListByExternalIDResponseExpirationChangeLedgerEntryCreditBlock `json:"credit_block,required"` Currency string `json:"currency,required"` Customer CustomerCreditLedgerListByExternalIDResponseExpirationChangeLedgerEntryCustomer `json:"customer,required"` Description string `json:"description,required,nullable"` EndingBalance float64 `json:"ending_balance,required"` EntryStatus CustomerCreditLedgerListByExternalIDResponseExpirationChangeLedgerEntryEntryStatus `json:"entry_status,required"` EntryType CustomerCreditLedgerListByExternalIDResponseExpirationChangeLedgerEntryEntryType `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"` JSON customerCreditLedgerListByExternalIDResponseExpirationChangeLedgerEntryJSON `json:"-"` }
func (*CustomerCreditLedgerListByExternalIDResponseExpirationChangeLedgerEntry) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListByExternalIDResponseExpirationChangeLedgerEntry) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListByExternalIDResponseExpirationChangeLedgerEntryCreditBlock ¶
type CustomerCreditLedgerListByExternalIDResponseExpirationChangeLedgerEntryCreditBlock 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 customerCreditLedgerListByExternalIDResponseExpirationChangeLedgerEntryCreditBlockJSON `json:"-"` }
func (*CustomerCreditLedgerListByExternalIDResponseExpirationChangeLedgerEntryCreditBlock) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListByExternalIDResponseExpirationChangeLedgerEntryCreditBlock) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListByExternalIDResponseExpirationChangeLedgerEntryCustomer ¶
type CustomerCreditLedgerListByExternalIDResponseExpirationChangeLedgerEntryCustomer struct { ID string `json:"id,required"` ExternalCustomerID string `json:"external_customer_id,required,nullable"` JSON customerCreditLedgerListByExternalIDResponseExpirationChangeLedgerEntryCustomerJSON `json:"-"` }
func (*CustomerCreditLedgerListByExternalIDResponseExpirationChangeLedgerEntryCustomer) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListByExternalIDResponseExpirationChangeLedgerEntryCustomer) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListByExternalIDResponseExpirationChangeLedgerEntryEntryStatus ¶
type CustomerCreditLedgerListByExternalIDResponseExpirationChangeLedgerEntryEntryStatus string
const ( CustomerCreditLedgerListByExternalIDResponseExpirationChangeLedgerEntryEntryStatusCommitted CustomerCreditLedgerListByExternalIDResponseExpirationChangeLedgerEntryEntryStatus = "committed" CustomerCreditLedgerListByExternalIDResponseExpirationChangeLedgerEntryEntryStatusPending CustomerCreditLedgerListByExternalIDResponseExpirationChangeLedgerEntryEntryStatus = "pending" )
type CustomerCreditLedgerListByExternalIDResponseExpirationChangeLedgerEntryEntryType ¶
type CustomerCreditLedgerListByExternalIDResponseExpirationChangeLedgerEntryEntryType string
const (
CustomerCreditLedgerListByExternalIDResponseExpirationChangeLedgerEntryEntryTypeExpirationChange CustomerCreditLedgerListByExternalIDResponseExpirationChangeLedgerEntryEntryType = "expiration_change"
)
type CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntry ¶
type CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntry struct { ID string `json:"id,required"` Amount float64 `json:"amount,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditBlock CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntryCreditBlock `json:"credit_block,required"` Currency string `json:"currency,required"` Customer CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntryCustomer `json:"customer,required"` Description string `json:"description,required,nullable"` EndingBalance float64 `json:"ending_balance,required"` EntryStatus CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntryEntryStatus `json:"entry_status,required"` EntryType CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntryEntryType `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 customerCreditLedgerListByExternalIDResponseIncrementLedgerEntryJSON `json:"-"` }
func (*CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntry) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntry) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntryCreditBlock ¶
type CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntryCreditBlock 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 customerCreditLedgerListByExternalIDResponseIncrementLedgerEntryCreditBlockJSON `json:"-"` }
func (*CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntryCreditBlock) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntryCreditBlock) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntryCustomer ¶
type CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntryCustomer struct { ID string `json:"id,required"` ExternalCustomerID string `json:"external_customer_id,required,nullable"` JSON customerCreditLedgerListByExternalIDResponseIncrementLedgerEntryCustomerJSON `json:"-"` }
func (*CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntryCustomer) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntryCustomer) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntryEntryStatus ¶
type CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntryEntryStatus string
const ( CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntryEntryStatusCommitted CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntryEntryStatus = "committed" CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntryEntryStatusPending CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntryEntryStatus = "pending" )
func (CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntryEntryStatus) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntryEntryStatus) IsKnown() bool
type CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntryEntryType ¶
type CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntryEntryType string
const (
CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntryEntryTypeIncrement CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntryEntryType = "increment"
)
func (CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntryEntryType) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntryEntryType) IsKnown() bool
type CustomerCreditLedgerListByExternalIDResponseUnion ¶ added in v0.25.0
type CustomerCreditLedgerListByExternalIDResponseUnion interface {
// contains filtered or unexported methods
}
The [Credit Ledger Entry resource](/guides/product-catalog/prepurchase) models prepaid credits within Orb.
Union satisfied by CustomerCreditLedgerListByExternalIDResponseIncrementLedgerEntry, CustomerCreditLedgerListByExternalIDResponseDecrementLedgerEntry, CustomerCreditLedgerListByExternalIDResponseExpirationChangeLedgerEntry, CustomerCreditLedgerListByExternalIDResponseCreditBlockExpiryLedgerEntry, CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntry, CustomerCreditLedgerListByExternalIDResponseVoidInitiatedLedgerEntry or CustomerCreditLedgerListByExternalIDResponseAmendmentLedgerEntry.
type CustomerCreditLedgerListByExternalIDResponseVoidInitiatedLedgerEntry ¶
type CustomerCreditLedgerListByExternalIDResponseVoidInitiatedLedgerEntry struct { ID string `json:"id,required"` Amount float64 `json:"amount,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditBlock CustomerCreditLedgerListByExternalIDResponseVoidInitiatedLedgerEntryCreditBlock `json:"credit_block,required"` Currency string `json:"currency,required"` Customer CustomerCreditLedgerListByExternalIDResponseVoidInitiatedLedgerEntryCustomer `json:"customer,required"` Description string `json:"description,required,nullable"` EndingBalance float64 `json:"ending_balance,required"` EntryStatus CustomerCreditLedgerListByExternalIDResponseVoidInitiatedLedgerEntryEntryStatus `json:"entry_status,required"` EntryType CustomerCreditLedgerListByExternalIDResponseVoidInitiatedLedgerEntryEntryType `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 customerCreditLedgerListByExternalIDResponseVoidInitiatedLedgerEntryJSON `json:"-"` }
func (*CustomerCreditLedgerListByExternalIDResponseVoidInitiatedLedgerEntry) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListByExternalIDResponseVoidInitiatedLedgerEntry) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListByExternalIDResponseVoidInitiatedLedgerEntryCreditBlock ¶
type CustomerCreditLedgerListByExternalIDResponseVoidInitiatedLedgerEntryCreditBlock 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 customerCreditLedgerListByExternalIDResponseVoidInitiatedLedgerEntryCreditBlockJSON `json:"-"` }
func (*CustomerCreditLedgerListByExternalIDResponseVoidInitiatedLedgerEntryCreditBlock) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListByExternalIDResponseVoidInitiatedLedgerEntryCreditBlock) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListByExternalIDResponseVoidInitiatedLedgerEntryCustomer ¶
type CustomerCreditLedgerListByExternalIDResponseVoidInitiatedLedgerEntryCustomer struct { ID string `json:"id,required"` ExternalCustomerID string `json:"external_customer_id,required,nullable"` JSON customerCreditLedgerListByExternalIDResponseVoidInitiatedLedgerEntryCustomerJSON `json:"-"` }
func (*CustomerCreditLedgerListByExternalIDResponseVoidInitiatedLedgerEntryCustomer) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListByExternalIDResponseVoidInitiatedLedgerEntryCustomer) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListByExternalIDResponseVoidInitiatedLedgerEntryEntryStatus ¶
type CustomerCreditLedgerListByExternalIDResponseVoidInitiatedLedgerEntryEntryStatus string
const ( CustomerCreditLedgerListByExternalIDResponseVoidInitiatedLedgerEntryEntryStatusCommitted CustomerCreditLedgerListByExternalIDResponseVoidInitiatedLedgerEntryEntryStatus = "committed" CustomerCreditLedgerListByExternalIDResponseVoidInitiatedLedgerEntryEntryStatusPending CustomerCreditLedgerListByExternalIDResponseVoidInitiatedLedgerEntryEntryStatus = "pending" )
type CustomerCreditLedgerListByExternalIDResponseVoidInitiatedLedgerEntryEntryType ¶
type CustomerCreditLedgerListByExternalIDResponseVoidInitiatedLedgerEntryEntryType string
const (
CustomerCreditLedgerListByExternalIDResponseVoidInitiatedLedgerEntryEntryTypeVoidInitiated CustomerCreditLedgerListByExternalIDResponseVoidInitiatedLedgerEntryEntryType = "void_initiated"
)
type CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntry ¶
type CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntry struct { ID string `json:"id,required"` Amount float64 `json:"amount,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditBlock CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntryCreditBlock `json:"credit_block,required"` Currency string `json:"currency,required"` Customer CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntryCustomer `json:"customer,required"` Description string `json:"description,required,nullable"` EndingBalance float64 `json:"ending_balance,required"` EntryStatus CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntryEntryStatus `json:"entry_status,required"` EntryType CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntryEntryType `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 customerCreditLedgerListByExternalIDResponseVoidLedgerEntryJSON `json:"-"` }
func (*CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntry) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntry) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntryCreditBlock ¶
type CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntryCreditBlock 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 customerCreditLedgerListByExternalIDResponseVoidLedgerEntryCreditBlockJSON `json:"-"` }
func (*CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntryCreditBlock) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntryCreditBlock) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntryCustomer ¶
type CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntryCustomer struct { ID string `json:"id,required"` ExternalCustomerID string `json:"external_customer_id,required,nullable"` JSON customerCreditLedgerListByExternalIDResponseVoidLedgerEntryCustomerJSON `json:"-"` }
func (*CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntryCustomer) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntryCustomer) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntryEntryStatus ¶
type CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntryEntryStatus string
const ( CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntryEntryStatusCommitted CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntryEntryStatus = "committed" CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntryEntryStatusPending CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntryEntryStatus = "pending" )
func (CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntryEntryStatus) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntryEntryStatus) IsKnown() bool
type CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntryEntryType ¶
type CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntryEntryType string
const (
CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntryEntryTypeVoid CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntryEntryType = "void"
)
func (CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntryEntryType) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerListByExternalIDResponseVoidLedgerEntryEntryType) IsKnown() bool
type CustomerCreditLedgerListParams ¶
type CustomerCreditLedgerListParams struct { CreatedAtGt param.Field[time.Time] `query:"created_at[gt]" format:"date-time"` CreatedAtGte param.Field[time.Time] `query:"created_at[gte]" format:"date-time"` CreatedAtLt param.Field[time.Time] `query:"created_at[lt]" format:"date-time"` CreatedAtLte param.Field[time.Time] `query:"created_at[lte]" format:"date-time"` // The ledger currency or custom pricing unit to use. Currency param.Field[string] `query:"currency"` // Cursor for pagination. This can be populated by the `next_cursor` value returned // from the initial request. Cursor param.Field[string] `query:"cursor"` EntryStatus param.Field[CustomerCreditLedgerListParamsEntryStatus] `query:"entry_status"` EntryType param.Field[CustomerCreditLedgerListParamsEntryType] `query:"entry_type"` // The number of items to fetch. Defaults to 20. Limit param.Field[int64] `query:"limit"` MinimumAmount param.Field[string] `query:"minimum_amount"` }
func (CustomerCreditLedgerListParams) URLQuery ¶
func (r CustomerCreditLedgerListParams) URLQuery() (v url.Values)
URLQuery serializes CustomerCreditLedgerListParams's query parameters as `url.Values`.
type CustomerCreditLedgerListParamsEntryStatus ¶
type CustomerCreditLedgerListParamsEntryStatus string
const ( CustomerCreditLedgerListParamsEntryStatusCommitted CustomerCreditLedgerListParamsEntryStatus = "committed" CustomerCreditLedgerListParamsEntryStatusPending CustomerCreditLedgerListParamsEntryStatus = "pending" )
func (CustomerCreditLedgerListParamsEntryStatus) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerListParamsEntryStatus) IsKnown() bool
type CustomerCreditLedgerListParamsEntryType ¶
type CustomerCreditLedgerListParamsEntryType string
const ( CustomerCreditLedgerListParamsEntryTypeIncrement CustomerCreditLedgerListParamsEntryType = "increment" CustomerCreditLedgerListParamsEntryTypeDecrement CustomerCreditLedgerListParamsEntryType = "decrement" CustomerCreditLedgerListParamsEntryTypeExpirationChange CustomerCreditLedgerListParamsEntryType = "expiration_change" CustomerCreditLedgerListParamsEntryTypeCreditBlockExpiry CustomerCreditLedgerListParamsEntryType = "credit_block_expiry" CustomerCreditLedgerListParamsEntryTypeVoid CustomerCreditLedgerListParamsEntryType = "void" CustomerCreditLedgerListParamsEntryTypeVoidInitiated CustomerCreditLedgerListParamsEntryType = "void_initiated" CustomerCreditLedgerListParamsEntryTypeAmendment CustomerCreditLedgerListParamsEntryType = "amendment" )
func (CustomerCreditLedgerListParamsEntryType) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerListParamsEntryType) IsKnown() bool
type CustomerCreditLedgerListResponse ¶
type CustomerCreditLedgerListResponse struct { // This field can have the runtime type of [map[string]string]. Metadata interface{} `json:"metadata"` ID string `json:"id,required"` LedgerSequenceNumber int64 `json:"ledger_sequence_number,required"` EntryStatus CustomerCreditLedgerListResponseEntryStatus `json:"entry_status,required"` // This field can have the runtime type of // [CustomerCreditLedgerListResponseIncrementLedgerEntryCustomer], // [CustomerCreditLedgerListResponseDecrementLedgerEntryCustomer], // [CustomerCreditLedgerListResponseExpirationChangeLedgerEntryCustomer], // [CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntryCustomer], // [CustomerCreditLedgerListResponseVoidLedgerEntryCustomer], // [CustomerCreditLedgerListResponseVoidInitiatedLedgerEntryCustomer], // [CustomerCreditLedgerListResponseAmendmentLedgerEntryCustomer]. Customer interface{} `json:"customer"` StartingBalance float64 `json:"starting_balance,required"` EndingBalance float64 `json:"ending_balance,required"` Amount float64 `json:"amount,required"` Currency string `json:"currency,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` Description string `json:"description,required,nullable"` // This field can have the runtime type of // [CustomerCreditLedgerListResponseIncrementLedgerEntryCreditBlock], // [CustomerCreditLedgerListResponseDecrementLedgerEntryCreditBlock], // [CustomerCreditLedgerListResponseExpirationChangeLedgerEntryCreditBlock], // [CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntryCreditBlock], // [CustomerCreditLedgerListResponseVoidLedgerEntryCreditBlock], // [CustomerCreditLedgerListResponseVoidInitiatedLedgerEntryCreditBlock], // [CustomerCreditLedgerListResponseAmendmentLedgerEntryCreditBlock]. CreditBlock interface{} `json:"credit_block"` EntryType CustomerCreditLedgerListResponseEntryType `json:"entry_type,required"` PriceID string `json:"price_id,nullable"` EventID string `json:"event_id,nullable"` InvoiceID string `json:"invoice_id,nullable"` NewBlockExpiryDate time.Time `json:"new_block_expiry_date" format:"date-time"` VoidReason string `json:"void_reason,nullable"` VoidAmount float64 `json:"void_amount"` JSON customerCreditLedgerListResponseJSON `json:"-"` // contains filtered or unexported fields }
The [Credit Ledger Entry resource](/guides/product-catalog/prepurchase) models prepaid credits within Orb.
func (CustomerCreditLedgerListResponse) AsUnion ¶ added in v0.25.0
func (r CustomerCreditLedgerListResponse) AsUnion() CustomerCreditLedgerListResponseUnion
AsUnion returns a CustomerCreditLedgerListResponseUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are CustomerCreditLedgerListResponseIncrementLedgerEntry, CustomerCreditLedgerListResponseDecrementLedgerEntry, CustomerCreditLedgerListResponseExpirationChangeLedgerEntry, CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntry, CustomerCreditLedgerListResponseVoidLedgerEntry, CustomerCreditLedgerListResponseVoidInitiatedLedgerEntry, CustomerCreditLedgerListResponseAmendmentLedgerEntry.
func (*CustomerCreditLedgerListResponse) UnmarshalJSON ¶ added in v0.25.0
func (r *CustomerCreditLedgerListResponse) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListResponseAmendmentLedgerEntry ¶
type CustomerCreditLedgerListResponseAmendmentLedgerEntry struct { ID string `json:"id,required"` Amount float64 `json:"amount,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditBlock CustomerCreditLedgerListResponseAmendmentLedgerEntryCreditBlock `json:"credit_block,required"` Currency string `json:"currency,required"` Customer CustomerCreditLedgerListResponseAmendmentLedgerEntryCustomer `json:"customer,required"` Description string `json:"description,required,nullable"` EndingBalance float64 `json:"ending_balance,required"` EntryStatus CustomerCreditLedgerListResponseAmendmentLedgerEntryEntryStatus `json:"entry_status,required"` EntryType CustomerCreditLedgerListResponseAmendmentLedgerEntryEntryType `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 customerCreditLedgerListResponseAmendmentLedgerEntryJSON `json:"-"` }
func (*CustomerCreditLedgerListResponseAmendmentLedgerEntry) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListResponseAmendmentLedgerEntry) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListResponseAmendmentLedgerEntryCreditBlock ¶
type CustomerCreditLedgerListResponseAmendmentLedgerEntryCreditBlock 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 customerCreditLedgerListResponseAmendmentLedgerEntryCreditBlockJSON `json:"-"` }
func (*CustomerCreditLedgerListResponseAmendmentLedgerEntryCreditBlock) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListResponseAmendmentLedgerEntryCreditBlock) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListResponseAmendmentLedgerEntryCustomer ¶
type CustomerCreditLedgerListResponseAmendmentLedgerEntryCustomer struct { ID string `json:"id,required"` ExternalCustomerID string `json:"external_customer_id,required,nullable"` JSON customerCreditLedgerListResponseAmendmentLedgerEntryCustomerJSON `json:"-"` }
func (*CustomerCreditLedgerListResponseAmendmentLedgerEntryCustomer) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListResponseAmendmentLedgerEntryCustomer) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListResponseAmendmentLedgerEntryEntryStatus ¶
type CustomerCreditLedgerListResponseAmendmentLedgerEntryEntryStatus string
const ( CustomerCreditLedgerListResponseAmendmentLedgerEntryEntryStatusCommitted CustomerCreditLedgerListResponseAmendmentLedgerEntryEntryStatus = "committed" CustomerCreditLedgerListResponseAmendmentLedgerEntryEntryStatusPending CustomerCreditLedgerListResponseAmendmentLedgerEntryEntryStatus = "pending" )
func (CustomerCreditLedgerListResponseAmendmentLedgerEntryEntryStatus) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerListResponseAmendmentLedgerEntryEntryStatus) IsKnown() bool
type CustomerCreditLedgerListResponseAmendmentLedgerEntryEntryType ¶
type CustomerCreditLedgerListResponseAmendmentLedgerEntryEntryType string
const (
CustomerCreditLedgerListResponseAmendmentLedgerEntryEntryTypeAmendment CustomerCreditLedgerListResponseAmendmentLedgerEntryEntryType = "amendment"
)
func (CustomerCreditLedgerListResponseAmendmentLedgerEntryEntryType) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerListResponseAmendmentLedgerEntryEntryType) IsKnown() bool
type CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntry ¶
type CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntry struct { ID string `json:"id,required"` Amount float64 `json:"amount,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditBlock CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntryCreditBlock `json:"credit_block,required"` Currency string `json:"currency,required"` Customer CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntryCustomer `json:"customer,required"` Description string `json:"description,required,nullable"` EndingBalance float64 `json:"ending_balance,required"` EntryStatus CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntryEntryStatus `json:"entry_status,required"` EntryType CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntryEntryType `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 customerCreditLedgerListResponseCreditBlockExpiryLedgerEntryJSON `json:"-"` }
func (*CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntry) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntry) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntryCreditBlock ¶
type CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntryCreditBlock 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 customerCreditLedgerListResponseCreditBlockExpiryLedgerEntryCreditBlockJSON `json:"-"` }
func (*CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntryCreditBlock) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntryCreditBlock) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntryCustomer ¶
type CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntryCustomer struct { ID string `json:"id,required"` ExternalCustomerID string `json:"external_customer_id,required,nullable"` JSON customerCreditLedgerListResponseCreditBlockExpiryLedgerEntryCustomerJSON `json:"-"` }
func (*CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntryCustomer) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntryCustomer) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntryEntryStatus ¶
type CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntryEntryStatus string
const ( CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntryEntryStatusCommitted CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntryEntryStatus = "committed" CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntryEntryStatusPending CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntryEntryStatus = "pending" )
func (CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntryEntryStatus) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntryEntryStatus) IsKnown() bool
type CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntryEntryType ¶
type CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntryEntryType string
const (
CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntryEntryTypeCreditBlockExpiry CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntryEntryType = "credit_block_expiry"
)
func (CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntryEntryType) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntryEntryType) IsKnown() bool
type CustomerCreditLedgerListResponseDecrementLedgerEntry ¶
type CustomerCreditLedgerListResponseDecrementLedgerEntry struct { ID string `json:"id,required"` Amount float64 `json:"amount,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditBlock CustomerCreditLedgerListResponseDecrementLedgerEntryCreditBlock `json:"credit_block,required"` Currency string `json:"currency,required"` Customer CustomerCreditLedgerListResponseDecrementLedgerEntryCustomer `json:"customer,required"` Description string `json:"description,required,nullable"` EndingBalance float64 `json:"ending_balance,required"` EntryStatus CustomerCreditLedgerListResponseDecrementLedgerEntryEntryStatus `json:"entry_status,required"` EntryType CustomerCreditLedgerListResponseDecrementLedgerEntryEntryType `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 customerCreditLedgerListResponseDecrementLedgerEntryJSON `json:"-"` }
func (*CustomerCreditLedgerListResponseDecrementLedgerEntry) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListResponseDecrementLedgerEntry) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListResponseDecrementLedgerEntryCreditBlock ¶
type CustomerCreditLedgerListResponseDecrementLedgerEntryCreditBlock 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 customerCreditLedgerListResponseDecrementLedgerEntryCreditBlockJSON `json:"-"` }
func (*CustomerCreditLedgerListResponseDecrementLedgerEntryCreditBlock) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListResponseDecrementLedgerEntryCreditBlock) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListResponseDecrementLedgerEntryCustomer ¶
type CustomerCreditLedgerListResponseDecrementLedgerEntryCustomer struct { ID string `json:"id,required"` ExternalCustomerID string `json:"external_customer_id,required,nullable"` JSON customerCreditLedgerListResponseDecrementLedgerEntryCustomerJSON `json:"-"` }
func (*CustomerCreditLedgerListResponseDecrementLedgerEntryCustomer) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListResponseDecrementLedgerEntryCustomer) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListResponseDecrementLedgerEntryEntryStatus ¶
type CustomerCreditLedgerListResponseDecrementLedgerEntryEntryStatus string
const ( CustomerCreditLedgerListResponseDecrementLedgerEntryEntryStatusCommitted CustomerCreditLedgerListResponseDecrementLedgerEntryEntryStatus = "committed" CustomerCreditLedgerListResponseDecrementLedgerEntryEntryStatusPending CustomerCreditLedgerListResponseDecrementLedgerEntryEntryStatus = "pending" )
func (CustomerCreditLedgerListResponseDecrementLedgerEntryEntryStatus) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerListResponseDecrementLedgerEntryEntryStatus) IsKnown() bool
type CustomerCreditLedgerListResponseDecrementLedgerEntryEntryType ¶
type CustomerCreditLedgerListResponseDecrementLedgerEntryEntryType string
const (
CustomerCreditLedgerListResponseDecrementLedgerEntryEntryTypeDecrement CustomerCreditLedgerListResponseDecrementLedgerEntryEntryType = "decrement"
)
func (CustomerCreditLedgerListResponseDecrementLedgerEntryEntryType) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerListResponseDecrementLedgerEntryEntryType) IsKnown() bool
type CustomerCreditLedgerListResponseEntryStatus ¶ added in v0.25.0
type CustomerCreditLedgerListResponseEntryStatus string
const ( CustomerCreditLedgerListResponseEntryStatusCommitted CustomerCreditLedgerListResponseEntryStatus = "committed" CustomerCreditLedgerListResponseEntryStatusPending CustomerCreditLedgerListResponseEntryStatus = "pending" )
func (CustomerCreditLedgerListResponseEntryStatus) IsKnown ¶ added in v0.25.0
func (r CustomerCreditLedgerListResponseEntryStatus) IsKnown() bool
type CustomerCreditLedgerListResponseEntryType ¶ added in v0.25.0
type CustomerCreditLedgerListResponseEntryType string
const ( CustomerCreditLedgerListResponseEntryTypeIncrement CustomerCreditLedgerListResponseEntryType = "increment" CustomerCreditLedgerListResponseEntryTypeDecrement CustomerCreditLedgerListResponseEntryType = "decrement" CustomerCreditLedgerListResponseEntryTypeExpirationChange CustomerCreditLedgerListResponseEntryType = "expiration_change" CustomerCreditLedgerListResponseEntryTypeCreditBlockExpiry CustomerCreditLedgerListResponseEntryType = "credit_block_expiry" CustomerCreditLedgerListResponseEntryTypeVoid CustomerCreditLedgerListResponseEntryType = "void" CustomerCreditLedgerListResponseEntryTypeVoidInitiated CustomerCreditLedgerListResponseEntryType = "void_initiated" CustomerCreditLedgerListResponseEntryTypeAmendment CustomerCreditLedgerListResponseEntryType = "amendment" )
func (CustomerCreditLedgerListResponseEntryType) IsKnown ¶ added in v0.25.0
func (r CustomerCreditLedgerListResponseEntryType) IsKnown() bool
type CustomerCreditLedgerListResponseExpirationChangeLedgerEntry ¶
type CustomerCreditLedgerListResponseExpirationChangeLedgerEntry struct { ID string `json:"id,required"` Amount float64 `json:"amount,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditBlock CustomerCreditLedgerListResponseExpirationChangeLedgerEntryCreditBlock `json:"credit_block,required"` Currency string `json:"currency,required"` Customer CustomerCreditLedgerListResponseExpirationChangeLedgerEntryCustomer `json:"customer,required"` Description string `json:"description,required,nullable"` EndingBalance float64 `json:"ending_balance,required"` EntryStatus CustomerCreditLedgerListResponseExpirationChangeLedgerEntryEntryStatus `json:"entry_status,required"` EntryType CustomerCreditLedgerListResponseExpirationChangeLedgerEntryEntryType `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"` JSON customerCreditLedgerListResponseExpirationChangeLedgerEntryJSON `json:"-"` }
func (*CustomerCreditLedgerListResponseExpirationChangeLedgerEntry) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListResponseExpirationChangeLedgerEntry) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListResponseExpirationChangeLedgerEntryCreditBlock ¶
type CustomerCreditLedgerListResponseExpirationChangeLedgerEntryCreditBlock 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 customerCreditLedgerListResponseExpirationChangeLedgerEntryCreditBlockJSON `json:"-"` }
func (*CustomerCreditLedgerListResponseExpirationChangeLedgerEntryCreditBlock) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListResponseExpirationChangeLedgerEntryCreditBlock) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListResponseExpirationChangeLedgerEntryCustomer ¶
type CustomerCreditLedgerListResponseExpirationChangeLedgerEntryCustomer struct { ID string `json:"id,required"` ExternalCustomerID string `json:"external_customer_id,required,nullable"` JSON customerCreditLedgerListResponseExpirationChangeLedgerEntryCustomerJSON `json:"-"` }
func (*CustomerCreditLedgerListResponseExpirationChangeLedgerEntryCustomer) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListResponseExpirationChangeLedgerEntryCustomer) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListResponseExpirationChangeLedgerEntryEntryStatus ¶
type CustomerCreditLedgerListResponseExpirationChangeLedgerEntryEntryStatus string
const ( CustomerCreditLedgerListResponseExpirationChangeLedgerEntryEntryStatusCommitted CustomerCreditLedgerListResponseExpirationChangeLedgerEntryEntryStatus = "committed" CustomerCreditLedgerListResponseExpirationChangeLedgerEntryEntryStatusPending CustomerCreditLedgerListResponseExpirationChangeLedgerEntryEntryStatus = "pending" )
func (CustomerCreditLedgerListResponseExpirationChangeLedgerEntryEntryStatus) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerListResponseExpirationChangeLedgerEntryEntryStatus) IsKnown() bool
type CustomerCreditLedgerListResponseExpirationChangeLedgerEntryEntryType ¶
type CustomerCreditLedgerListResponseExpirationChangeLedgerEntryEntryType string
const (
CustomerCreditLedgerListResponseExpirationChangeLedgerEntryEntryTypeExpirationChange CustomerCreditLedgerListResponseExpirationChangeLedgerEntryEntryType = "expiration_change"
)
func (CustomerCreditLedgerListResponseExpirationChangeLedgerEntryEntryType) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerListResponseExpirationChangeLedgerEntryEntryType) IsKnown() bool
type CustomerCreditLedgerListResponseIncrementLedgerEntry ¶
type CustomerCreditLedgerListResponseIncrementLedgerEntry struct { ID string `json:"id,required"` Amount float64 `json:"amount,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditBlock CustomerCreditLedgerListResponseIncrementLedgerEntryCreditBlock `json:"credit_block,required"` Currency string `json:"currency,required"` Customer CustomerCreditLedgerListResponseIncrementLedgerEntryCustomer `json:"customer,required"` Description string `json:"description,required,nullable"` EndingBalance float64 `json:"ending_balance,required"` EntryStatus CustomerCreditLedgerListResponseIncrementLedgerEntryEntryStatus `json:"entry_status,required"` EntryType CustomerCreditLedgerListResponseIncrementLedgerEntryEntryType `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 customerCreditLedgerListResponseIncrementLedgerEntryJSON `json:"-"` }
func (*CustomerCreditLedgerListResponseIncrementLedgerEntry) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListResponseIncrementLedgerEntry) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListResponseIncrementLedgerEntryCreditBlock ¶
type CustomerCreditLedgerListResponseIncrementLedgerEntryCreditBlock 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 customerCreditLedgerListResponseIncrementLedgerEntryCreditBlockJSON `json:"-"` }
func (*CustomerCreditLedgerListResponseIncrementLedgerEntryCreditBlock) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListResponseIncrementLedgerEntryCreditBlock) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListResponseIncrementLedgerEntryCustomer ¶
type CustomerCreditLedgerListResponseIncrementLedgerEntryCustomer struct { ID string `json:"id,required"` ExternalCustomerID string `json:"external_customer_id,required,nullable"` JSON customerCreditLedgerListResponseIncrementLedgerEntryCustomerJSON `json:"-"` }
func (*CustomerCreditLedgerListResponseIncrementLedgerEntryCustomer) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListResponseIncrementLedgerEntryCustomer) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListResponseIncrementLedgerEntryEntryStatus ¶
type CustomerCreditLedgerListResponseIncrementLedgerEntryEntryStatus string
const ( CustomerCreditLedgerListResponseIncrementLedgerEntryEntryStatusCommitted CustomerCreditLedgerListResponseIncrementLedgerEntryEntryStatus = "committed" CustomerCreditLedgerListResponseIncrementLedgerEntryEntryStatusPending CustomerCreditLedgerListResponseIncrementLedgerEntryEntryStatus = "pending" )
func (CustomerCreditLedgerListResponseIncrementLedgerEntryEntryStatus) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerListResponseIncrementLedgerEntryEntryStatus) IsKnown() bool
type CustomerCreditLedgerListResponseIncrementLedgerEntryEntryType ¶
type CustomerCreditLedgerListResponseIncrementLedgerEntryEntryType string
const (
CustomerCreditLedgerListResponseIncrementLedgerEntryEntryTypeIncrement CustomerCreditLedgerListResponseIncrementLedgerEntryEntryType = "increment"
)
func (CustomerCreditLedgerListResponseIncrementLedgerEntryEntryType) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerListResponseIncrementLedgerEntryEntryType) IsKnown() bool
type CustomerCreditLedgerListResponseUnion ¶ added in v0.25.0
type CustomerCreditLedgerListResponseUnion interface {
// contains filtered or unexported methods
}
The [Credit Ledger Entry resource](/guides/product-catalog/prepurchase) models prepaid credits within Orb.
Union satisfied by CustomerCreditLedgerListResponseIncrementLedgerEntry, CustomerCreditLedgerListResponseDecrementLedgerEntry, CustomerCreditLedgerListResponseExpirationChangeLedgerEntry, CustomerCreditLedgerListResponseCreditBlockExpiryLedgerEntry, CustomerCreditLedgerListResponseVoidLedgerEntry, CustomerCreditLedgerListResponseVoidInitiatedLedgerEntry or CustomerCreditLedgerListResponseAmendmentLedgerEntry.
type CustomerCreditLedgerListResponseVoidInitiatedLedgerEntry ¶
type CustomerCreditLedgerListResponseVoidInitiatedLedgerEntry struct { ID string `json:"id,required"` Amount float64 `json:"amount,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditBlock CustomerCreditLedgerListResponseVoidInitiatedLedgerEntryCreditBlock `json:"credit_block,required"` Currency string `json:"currency,required"` Customer CustomerCreditLedgerListResponseVoidInitiatedLedgerEntryCustomer `json:"customer,required"` Description string `json:"description,required,nullable"` EndingBalance float64 `json:"ending_balance,required"` EntryStatus CustomerCreditLedgerListResponseVoidInitiatedLedgerEntryEntryStatus `json:"entry_status,required"` EntryType CustomerCreditLedgerListResponseVoidInitiatedLedgerEntryEntryType `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 customerCreditLedgerListResponseVoidInitiatedLedgerEntryJSON `json:"-"` }
func (*CustomerCreditLedgerListResponseVoidInitiatedLedgerEntry) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListResponseVoidInitiatedLedgerEntry) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListResponseVoidInitiatedLedgerEntryCreditBlock ¶
type CustomerCreditLedgerListResponseVoidInitiatedLedgerEntryCreditBlock 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 customerCreditLedgerListResponseVoidInitiatedLedgerEntryCreditBlockJSON `json:"-"` }
func (*CustomerCreditLedgerListResponseVoidInitiatedLedgerEntryCreditBlock) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListResponseVoidInitiatedLedgerEntryCreditBlock) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListResponseVoidInitiatedLedgerEntryCustomer ¶
type CustomerCreditLedgerListResponseVoidInitiatedLedgerEntryCustomer struct { ID string `json:"id,required"` ExternalCustomerID string `json:"external_customer_id,required,nullable"` JSON customerCreditLedgerListResponseVoidInitiatedLedgerEntryCustomerJSON `json:"-"` }
func (*CustomerCreditLedgerListResponseVoidInitiatedLedgerEntryCustomer) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListResponseVoidInitiatedLedgerEntryCustomer) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListResponseVoidInitiatedLedgerEntryEntryStatus ¶
type CustomerCreditLedgerListResponseVoidInitiatedLedgerEntryEntryStatus string
const ( CustomerCreditLedgerListResponseVoidInitiatedLedgerEntryEntryStatusCommitted CustomerCreditLedgerListResponseVoidInitiatedLedgerEntryEntryStatus = "committed" CustomerCreditLedgerListResponseVoidInitiatedLedgerEntryEntryStatusPending CustomerCreditLedgerListResponseVoidInitiatedLedgerEntryEntryStatus = "pending" )
func (CustomerCreditLedgerListResponseVoidInitiatedLedgerEntryEntryStatus) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerListResponseVoidInitiatedLedgerEntryEntryStatus) IsKnown() bool
type CustomerCreditLedgerListResponseVoidInitiatedLedgerEntryEntryType ¶
type CustomerCreditLedgerListResponseVoidInitiatedLedgerEntryEntryType string
const (
CustomerCreditLedgerListResponseVoidInitiatedLedgerEntryEntryTypeVoidInitiated CustomerCreditLedgerListResponseVoidInitiatedLedgerEntryEntryType = "void_initiated"
)
func (CustomerCreditLedgerListResponseVoidInitiatedLedgerEntryEntryType) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerListResponseVoidInitiatedLedgerEntryEntryType) IsKnown() bool
type CustomerCreditLedgerListResponseVoidLedgerEntry ¶
type CustomerCreditLedgerListResponseVoidLedgerEntry struct { ID string `json:"id,required"` Amount float64 `json:"amount,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditBlock CustomerCreditLedgerListResponseVoidLedgerEntryCreditBlock `json:"credit_block,required"` Currency string `json:"currency,required"` Customer CustomerCreditLedgerListResponseVoidLedgerEntryCustomer `json:"customer,required"` Description string `json:"description,required,nullable"` EndingBalance float64 `json:"ending_balance,required"` EntryStatus CustomerCreditLedgerListResponseVoidLedgerEntryEntryStatus `json:"entry_status,required"` EntryType CustomerCreditLedgerListResponseVoidLedgerEntryEntryType `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 customerCreditLedgerListResponseVoidLedgerEntryJSON `json:"-"` }
func (*CustomerCreditLedgerListResponseVoidLedgerEntry) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListResponseVoidLedgerEntry) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListResponseVoidLedgerEntryCreditBlock ¶
type CustomerCreditLedgerListResponseVoidLedgerEntryCreditBlock 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 customerCreditLedgerListResponseVoidLedgerEntryCreditBlockJSON `json:"-"` }
func (*CustomerCreditLedgerListResponseVoidLedgerEntryCreditBlock) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListResponseVoidLedgerEntryCreditBlock) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListResponseVoidLedgerEntryCustomer ¶
type CustomerCreditLedgerListResponseVoidLedgerEntryCustomer struct { ID string `json:"id,required"` ExternalCustomerID string `json:"external_customer_id,required,nullable"` JSON customerCreditLedgerListResponseVoidLedgerEntryCustomerJSON `json:"-"` }
func (*CustomerCreditLedgerListResponseVoidLedgerEntryCustomer) UnmarshalJSON ¶
func (r *CustomerCreditLedgerListResponseVoidLedgerEntryCustomer) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerListResponseVoidLedgerEntryEntryStatus ¶
type CustomerCreditLedgerListResponseVoidLedgerEntryEntryStatus string
const ( CustomerCreditLedgerListResponseVoidLedgerEntryEntryStatusCommitted CustomerCreditLedgerListResponseVoidLedgerEntryEntryStatus = "committed" CustomerCreditLedgerListResponseVoidLedgerEntryEntryStatusPending CustomerCreditLedgerListResponseVoidLedgerEntryEntryStatus = "pending" )
func (CustomerCreditLedgerListResponseVoidLedgerEntryEntryStatus) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerListResponseVoidLedgerEntryEntryStatus) IsKnown() bool
type CustomerCreditLedgerListResponseVoidLedgerEntryEntryType ¶
type CustomerCreditLedgerListResponseVoidLedgerEntryEntryType string
const (
CustomerCreditLedgerListResponseVoidLedgerEntryEntryTypeVoid CustomerCreditLedgerListResponseVoidLedgerEntryEntryType = "void"
)
func (CustomerCreditLedgerListResponseVoidLedgerEntryEntryType) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerListResponseVoidLedgerEntryEntryType) IsKnown() bool
type CustomerCreditLedgerNewEntryByExternalIDParams ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDParams interface {
ImplementsCustomerCreditLedgerNewEntryByExternalIDParams()
}
This interface is a union satisfied by one of the following: CustomerCreditLedgerNewEntryByExternalIDParamsAddIncrementCreditLedgerEntryRequestParams, CustomerCreditLedgerNewEntryByExternalIDParamsAddDecrementCreditLedgerEntryRequestParams, CustomerCreditLedgerNewEntryByExternalIDParamsAddExpirationChangeCreditLedgerEntryRequestParams, CustomerCreditLedgerNewEntryByExternalIDParamsAddVoidCreditLedgerEntryRequestParams, CustomerCreditLedgerNewEntryByExternalIDParamsAddAmendmentCreditLedgerEntryRequestParams.
type CustomerCreditLedgerNewEntryByExternalIDParamsAddAmendmentCreditLedgerEntryRequestParams ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDParamsAddAmendmentCreditLedgerEntryRequestParams 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[CustomerCreditLedgerNewEntryByExternalIDParamsAddAmendmentCreditLedgerEntryRequestParamsEntryType] `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 (CustomerCreditLedgerNewEntryByExternalIDParamsAddAmendmentCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryByExternalIDParams ¶ added in v0.2.1
func (CustomerCreditLedgerNewEntryByExternalIDParamsAddAmendmentCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryByExternalIDParams()
func (CustomerCreditLedgerNewEntryByExternalIDParamsAddAmendmentCreditLedgerEntryRequestParams) MarshalJSON ¶ added in v0.2.1
func (r CustomerCreditLedgerNewEntryByExternalIDParamsAddAmendmentCreditLedgerEntryRequestParams) MarshalJSON() (data []byte, err error)
type CustomerCreditLedgerNewEntryByExternalIDParamsAddAmendmentCreditLedgerEntryRequestParamsEntryType ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDParamsAddAmendmentCreditLedgerEntryRequestParamsEntryType string
const (
CustomerCreditLedgerNewEntryByExternalIDParamsAddAmendmentCreditLedgerEntryRequestParamsEntryTypeAmendment CustomerCreditLedgerNewEntryByExternalIDParamsAddAmendmentCreditLedgerEntryRequestParamsEntryType = "amendment"
)
type CustomerCreditLedgerNewEntryByExternalIDParamsAddDecrementCreditLedgerEntryRequestParams ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDParamsAddDecrementCreditLedgerEntryRequestParams 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[CustomerCreditLedgerNewEntryByExternalIDParamsAddDecrementCreditLedgerEntryRequestParamsEntryType] `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 (CustomerCreditLedgerNewEntryByExternalIDParamsAddDecrementCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryByExternalIDParams ¶ added in v0.2.1
func (CustomerCreditLedgerNewEntryByExternalIDParamsAddDecrementCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryByExternalIDParams()
func (CustomerCreditLedgerNewEntryByExternalIDParamsAddDecrementCreditLedgerEntryRequestParams) MarshalJSON ¶ added in v0.2.1
func (r CustomerCreditLedgerNewEntryByExternalIDParamsAddDecrementCreditLedgerEntryRequestParams) MarshalJSON() (data []byte, err error)
type CustomerCreditLedgerNewEntryByExternalIDParamsAddDecrementCreditLedgerEntryRequestParamsEntryType ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDParamsAddDecrementCreditLedgerEntryRequestParamsEntryType string
const (
CustomerCreditLedgerNewEntryByExternalIDParamsAddDecrementCreditLedgerEntryRequestParamsEntryTypeDecrement CustomerCreditLedgerNewEntryByExternalIDParamsAddDecrementCreditLedgerEntryRequestParamsEntryType = "decrement"
)
type CustomerCreditLedgerNewEntryByExternalIDParamsAddExpirationChangeCreditLedgerEntryRequestParams ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDParamsAddExpirationChangeCreditLedgerEntryRequestParams struct { EntryType param.Field[CustomerCreditLedgerNewEntryByExternalIDParamsAddExpirationChangeCreditLedgerEntryRequestParamsEntryType] `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 (CustomerCreditLedgerNewEntryByExternalIDParamsAddExpirationChangeCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryByExternalIDParams ¶ added in v0.2.1
func (CustomerCreditLedgerNewEntryByExternalIDParamsAddExpirationChangeCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryByExternalIDParams()
func (CustomerCreditLedgerNewEntryByExternalIDParamsAddExpirationChangeCreditLedgerEntryRequestParams) MarshalJSON ¶ added in v0.2.1
func (r CustomerCreditLedgerNewEntryByExternalIDParamsAddExpirationChangeCreditLedgerEntryRequestParams) MarshalJSON() (data []byte, err error)
type CustomerCreditLedgerNewEntryByExternalIDParamsAddExpirationChangeCreditLedgerEntryRequestParamsEntryType ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDParamsAddExpirationChangeCreditLedgerEntryRequestParamsEntryType string
const (
CustomerCreditLedgerNewEntryByExternalIDParamsAddExpirationChangeCreditLedgerEntryRequestParamsEntryTypeExpirationChange CustomerCreditLedgerNewEntryByExternalIDParamsAddExpirationChangeCreditLedgerEntryRequestParamsEntryType = "expiration_change"
)
type CustomerCreditLedgerNewEntryByExternalIDParamsAddIncrementCreditLedgerEntryRequestParams ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDParamsAddIncrementCreditLedgerEntryRequestParams 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[CustomerCreditLedgerNewEntryByExternalIDParamsAddIncrementCreditLedgerEntryRequestParamsEntryType] `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[CustomerCreditLedgerNewEntryByExternalIDParamsAddIncrementCreditLedgerEntryRequestParamsInvoiceSettings] `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 (CustomerCreditLedgerNewEntryByExternalIDParamsAddIncrementCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryByExternalIDParams ¶ added in v0.2.1
func (CustomerCreditLedgerNewEntryByExternalIDParamsAddIncrementCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryByExternalIDParams()
func (CustomerCreditLedgerNewEntryByExternalIDParamsAddIncrementCreditLedgerEntryRequestParams) MarshalJSON ¶ added in v0.2.1
func (r CustomerCreditLedgerNewEntryByExternalIDParamsAddIncrementCreditLedgerEntryRequestParams) MarshalJSON() (data []byte, err error)
type CustomerCreditLedgerNewEntryByExternalIDParamsAddIncrementCreditLedgerEntryRequestParamsEntryType ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDParamsAddIncrementCreditLedgerEntryRequestParamsEntryType string
const (
CustomerCreditLedgerNewEntryByExternalIDParamsAddIncrementCreditLedgerEntryRequestParamsEntryTypeIncrement CustomerCreditLedgerNewEntryByExternalIDParamsAddIncrementCreditLedgerEntryRequestParamsEntryType = "increment"
)
type CustomerCreditLedgerNewEntryByExternalIDParamsAddIncrementCreditLedgerEntryRequestParamsInvoiceSettings ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDParamsAddIncrementCreditLedgerEntryRequestParamsInvoiceSettings 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 (CustomerCreditLedgerNewEntryByExternalIDParamsAddIncrementCreditLedgerEntryRequestParamsInvoiceSettings) MarshalJSON ¶ added in v0.2.1
func (r CustomerCreditLedgerNewEntryByExternalIDParamsAddIncrementCreditLedgerEntryRequestParamsInvoiceSettings) MarshalJSON() (data []byte, err error)
type CustomerCreditLedgerNewEntryByExternalIDParamsAddVoidCreditLedgerEntryRequestParams ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDParamsAddVoidCreditLedgerEntryRequestParams 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[CustomerCreditLedgerNewEntryByExternalIDParamsAddVoidCreditLedgerEntryRequestParamsEntryType] `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[CustomerCreditLedgerNewEntryByExternalIDParamsAddVoidCreditLedgerEntryRequestParamsVoidReason] `json:"void_reason"` }
func (CustomerCreditLedgerNewEntryByExternalIDParamsAddVoidCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryByExternalIDParams ¶ added in v0.2.1
func (CustomerCreditLedgerNewEntryByExternalIDParamsAddVoidCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryByExternalIDParams()
func (CustomerCreditLedgerNewEntryByExternalIDParamsAddVoidCreditLedgerEntryRequestParams) MarshalJSON ¶ added in v0.2.1
func (r CustomerCreditLedgerNewEntryByExternalIDParamsAddVoidCreditLedgerEntryRequestParams) MarshalJSON() (data []byte, err error)
type CustomerCreditLedgerNewEntryByExternalIDParamsAddVoidCreditLedgerEntryRequestParamsEntryType ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDParamsAddVoidCreditLedgerEntryRequestParamsEntryType string
const (
CustomerCreditLedgerNewEntryByExternalIDParamsAddVoidCreditLedgerEntryRequestParamsEntryTypeVoid CustomerCreditLedgerNewEntryByExternalIDParamsAddVoidCreditLedgerEntryRequestParamsEntryType = "void"
)
type CustomerCreditLedgerNewEntryByExternalIDParamsAddVoidCreditLedgerEntryRequestParamsVoidReason ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDParamsAddVoidCreditLedgerEntryRequestParamsVoidReason string
Can only be specified when `entry_type=void`. The reason for the void.
const (
CustomerCreditLedgerNewEntryByExternalIDParamsAddVoidCreditLedgerEntryRequestParamsVoidReasonRefund CustomerCreditLedgerNewEntryByExternalIDParamsAddVoidCreditLedgerEntryRequestParamsVoidReason = "refund"
)
type CustomerCreditLedgerNewEntryByExternalIDResponse ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDResponse struct { // This field can have the runtime type of [map[string]string]. Metadata interface{} `json:"metadata"` ID string `json:"id,required"` LedgerSequenceNumber int64 `json:"ledger_sequence_number,required"` EntryStatus CustomerCreditLedgerNewEntryByExternalIDResponseEntryStatus `json:"entry_status,required"` // This field can have the runtime type of // [CustomerCreditLedgerNewEntryByExternalIDResponseIncrementLedgerEntryCustomer], // [CustomerCreditLedgerNewEntryByExternalIDResponseDecrementLedgerEntryCustomer], // [CustomerCreditLedgerNewEntryByExternalIDResponseExpirationChangeLedgerEntryCustomer], // [CustomerCreditLedgerNewEntryByExternalIDResponseCreditBlockExpiryLedgerEntryCustomer], // [CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntryCustomer], // [CustomerCreditLedgerNewEntryByExternalIDResponseVoidInitiatedLedgerEntryCustomer], // [CustomerCreditLedgerNewEntryByExternalIDResponseAmendmentLedgerEntryCustomer]. Customer interface{} `json:"customer"` StartingBalance float64 `json:"starting_balance,required"` EndingBalance float64 `json:"ending_balance,required"` Amount float64 `json:"amount,required"` Currency string `json:"currency,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` Description string `json:"description,required,nullable"` // This field can have the runtime type of // [CustomerCreditLedgerNewEntryByExternalIDResponseIncrementLedgerEntryCreditBlock], // [CustomerCreditLedgerNewEntryByExternalIDResponseDecrementLedgerEntryCreditBlock], // [CustomerCreditLedgerNewEntryByExternalIDResponseExpirationChangeLedgerEntryCreditBlock], // [CustomerCreditLedgerNewEntryByExternalIDResponseCreditBlockExpiryLedgerEntryCreditBlock], // [CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntryCreditBlock], // [CustomerCreditLedgerNewEntryByExternalIDResponseVoidInitiatedLedgerEntryCreditBlock], // [CustomerCreditLedgerNewEntryByExternalIDResponseAmendmentLedgerEntryCreditBlock]. CreditBlock interface{} `json:"credit_block"` EntryType CustomerCreditLedgerNewEntryByExternalIDResponseEntryType `json:"entry_type,required"` PriceID string `json:"price_id,nullable"` EventID string `json:"event_id,nullable"` InvoiceID string `json:"invoice_id,nullable"` NewBlockExpiryDate time.Time `json:"new_block_expiry_date" format:"date-time"` VoidReason string `json:"void_reason,nullable"` VoidAmount float64 `json:"void_amount"` JSON customerCreditLedgerNewEntryByExternalIDResponseJSON `json:"-"` // contains filtered or unexported fields }
The [Credit Ledger Entry resource](/guides/product-catalog/prepurchase) models prepaid credits within Orb.
func (CustomerCreditLedgerNewEntryByExternalIDResponse) AsUnion ¶ added in v0.25.0
func (r CustomerCreditLedgerNewEntryByExternalIDResponse) AsUnion() CustomerCreditLedgerNewEntryByExternalIDResponseUnion
AsUnion returns a CustomerCreditLedgerNewEntryByExternalIDResponseUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are CustomerCreditLedgerNewEntryByExternalIDResponseIncrementLedgerEntry, CustomerCreditLedgerNewEntryByExternalIDResponseDecrementLedgerEntry, CustomerCreditLedgerNewEntryByExternalIDResponseExpirationChangeLedgerEntry, CustomerCreditLedgerNewEntryByExternalIDResponseCreditBlockExpiryLedgerEntry, CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntry, CustomerCreditLedgerNewEntryByExternalIDResponseVoidInitiatedLedgerEntry, CustomerCreditLedgerNewEntryByExternalIDResponseAmendmentLedgerEntry.
func (*CustomerCreditLedgerNewEntryByExternalIDResponse) UnmarshalJSON ¶ added in v0.25.0
func (r *CustomerCreditLedgerNewEntryByExternalIDResponse) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryByExternalIDResponseAmendmentLedgerEntry ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDResponseAmendmentLedgerEntry struct { ID string `json:"id,required"` Amount float64 `json:"amount,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditBlock CustomerCreditLedgerNewEntryByExternalIDResponseAmendmentLedgerEntryCreditBlock `json:"credit_block,required"` Currency string `json:"currency,required"` Customer CustomerCreditLedgerNewEntryByExternalIDResponseAmendmentLedgerEntryCustomer `json:"customer,required"` Description string `json:"description,required,nullable"` EndingBalance float64 `json:"ending_balance,required"` EntryStatus CustomerCreditLedgerNewEntryByExternalIDResponseAmendmentLedgerEntryEntryStatus `json:"entry_status,required"` EntryType CustomerCreditLedgerNewEntryByExternalIDResponseAmendmentLedgerEntryEntryType `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 customerCreditLedgerNewEntryByExternalIDResponseAmendmentLedgerEntryJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryByExternalIDResponseAmendmentLedgerEntry) UnmarshalJSON ¶ added in v0.2.1
func (r *CustomerCreditLedgerNewEntryByExternalIDResponseAmendmentLedgerEntry) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryByExternalIDResponseAmendmentLedgerEntryCreditBlock ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDResponseAmendmentLedgerEntryCreditBlock 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 customerCreditLedgerNewEntryByExternalIDResponseAmendmentLedgerEntryCreditBlockJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryByExternalIDResponseAmendmentLedgerEntryCreditBlock) UnmarshalJSON ¶ added in v0.2.1
func (r *CustomerCreditLedgerNewEntryByExternalIDResponseAmendmentLedgerEntryCreditBlock) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryByExternalIDResponseAmendmentLedgerEntryCustomer ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDResponseAmendmentLedgerEntryCustomer struct { ID string `json:"id,required"` ExternalCustomerID string `json:"external_customer_id,required,nullable"` JSON customerCreditLedgerNewEntryByExternalIDResponseAmendmentLedgerEntryCustomerJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryByExternalIDResponseAmendmentLedgerEntryCustomer) UnmarshalJSON ¶ added in v0.2.1
func (r *CustomerCreditLedgerNewEntryByExternalIDResponseAmendmentLedgerEntryCustomer) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryByExternalIDResponseAmendmentLedgerEntryEntryStatus ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDResponseAmendmentLedgerEntryEntryStatus string
const ( CustomerCreditLedgerNewEntryByExternalIDResponseAmendmentLedgerEntryEntryStatusCommitted CustomerCreditLedgerNewEntryByExternalIDResponseAmendmentLedgerEntryEntryStatus = "committed" CustomerCreditLedgerNewEntryByExternalIDResponseAmendmentLedgerEntryEntryStatusPending CustomerCreditLedgerNewEntryByExternalIDResponseAmendmentLedgerEntryEntryStatus = "pending" )
type CustomerCreditLedgerNewEntryByExternalIDResponseAmendmentLedgerEntryEntryType ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDResponseAmendmentLedgerEntryEntryType string
const (
CustomerCreditLedgerNewEntryByExternalIDResponseAmendmentLedgerEntryEntryTypeAmendment CustomerCreditLedgerNewEntryByExternalIDResponseAmendmentLedgerEntryEntryType = "amendment"
)
type CustomerCreditLedgerNewEntryByExternalIDResponseCreditBlockExpiryLedgerEntry ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDResponseCreditBlockExpiryLedgerEntry struct { ID string `json:"id,required"` Amount float64 `json:"amount,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditBlock CustomerCreditLedgerNewEntryByExternalIDResponseCreditBlockExpiryLedgerEntryCreditBlock `json:"credit_block,required"` Currency string `json:"currency,required"` Customer CustomerCreditLedgerNewEntryByExternalIDResponseCreditBlockExpiryLedgerEntryCustomer `json:"customer,required"` Description string `json:"description,required,nullable"` EndingBalance float64 `json:"ending_balance,required"` EntryStatus CustomerCreditLedgerNewEntryByExternalIDResponseCreditBlockExpiryLedgerEntryEntryStatus `json:"entry_status,required"` EntryType CustomerCreditLedgerNewEntryByExternalIDResponseCreditBlockExpiryLedgerEntryEntryType `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 customerCreditLedgerNewEntryByExternalIDResponseCreditBlockExpiryLedgerEntryJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryByExternalIDResponseCreditBlockExpiryLedgerEntry) UnmarshalJSON ¶ added in v0.2.1
func (r *CustomerCreditLedgerNewEntryByExternalIDResponseCreditBlockExpiryLedgerEntry) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryByExternalIDResponseCreditBlockExpiryLedgerEntryCreditBlock ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDResponseCreditBlockExpiryLedgerEntryCreditBlock 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 customerCreditLedgerNewEntryByExternalIDResponseCreditBlockExpiryLedgerEntryCreditBlockJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryByExternalIDResponseCreditBlockExpiryLedgerEntryCreditBlock) UnmarshalJSON ¶ added in v0.2.1
func (r *CustomerCreditLedgerNewEntryByExternalIDResponseCreditBlockExpiryLedgerEntryCreditBlock) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryByExternalIDResponseCreditBlockExpiryLedgerEntryCustomer ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDResponseCreditBlockExpiryLedgerEntryCustomer struct { ID string `json:"id,required"` ExternalCustomerID string `json:"external_customer_id,required,nullable"` JSON customerCreditLedgerNewEntryByExternalIDResponseCreditBlockExpiryLedgerEntryCustomerJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryByExternalIDResponseCreditBlockExpiryLedgerEntryCustomer) UnmarshalJSON ¶ added in v0.2.1
func (r *CustomerCreditLedgerNewEntryByExternalIDResponseCreditBlockExpiryLedgerEntryCustomer) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryByExternalIDResponseCreditBlockExpiryLedgerEntryEntryStatus ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDResponseCreditBlockExpiryLedgerEntryEntryStatus string
const ( CustomerCreditLedgerNewEntryByExternalIDResponseCreditBlockExpiryLedgerEntryEntryStatusCommitted CustomerCreditLedgerNewEntryByExternalIDResponseCreditBlockExpiryLedgerEntryEntryStatus = "committed" CustomerCreditLedgerNewEntryByExternalIDResponseCreditBlockExpiryLedgerEntryEntryStatusPending CustomerCreditLedgerNewEntryByExternalIDResponseCreditBlockExpiryLedgerEntryEntryStatus = "pending" )
type CustomerCreditLedgerNewEntryByExternalIDResponseCreditBlockExpiryLedgerEntryEntryType ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDResponseCreditBlockExpiryLedgerEntryEntryType string
const (
CustomerCreditLedgerNewEntryByExternalIDResponseCreditBlockExpiryLedgerEntryEntryTypeCreditBlockExpiry CustomerCreditLedgerNewEntryByExternalIDResponseCreditBlockExpiryLedgerEntryEntryType = "credit_block_expiry"
)
type CustomerCreditLedgerNewEntryByExternalIDResponseDecrementLedgerEntry ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDResponseDecrementLedgerEntry struct { ID string `json:"id,required"` Amount float64 `json:"amount,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditBlock CustomerCreditLedgerNewEntryByExternalIDResponseDecrementLedgerEntryCreditBlock `json:"credit_block,required"` Currency string `json:"currency,required"` Customer CustomerCreditLedgerNewEntryByExternalIDResponseDecrementLedgerEntryCustomer `json:"customer,required"` Description string `json:"description,required,nullable"` EndingBalance float64 `json:"ending_balance,required"` EntryStatus CustomerCreditLedgerNewEntryByExternalIDResponseDecrementLedgerEntryEntryStatus `json:"entry_status,required"` EntryType CustomerCreditLedgerNewEntryByExternalIDResponseDecrementLedgerEntryEntryType `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 customerCreditLedgerNewEntryByExternalIDResponseDecrementLedgerEntryJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryByExternalIDResponseDecrementLedgerEntry) UnmarshalJSON ¶ added in v0.2.1
func (r *CustomerCreditLedgerNewEntryByExternalIDResponseDecrementLedgerEntry) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryByExternalIDResponseDecrementLedgerEntryCreditBlock ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDResponseDecrementLedgerEntryCreditBlock 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 customerCreditLedgerNewEntryByExternalIDResponseDecrementLedgerEntryCreditBlockJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryByExternalIDResponseDecrementLedgerEntryCreditBlock) UnmarshalJSON ¶ added in v0.2.1
func (r *CustomerCreditLedgerNewEntryByExternalIDResponseDecrementLedgerEntryCreditBlock) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryByExternalIDResponseDecrementLedgerEntryCustomer ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDResponseDecrementLedgerEntryCustomer struct { ID string `json:"id,required"` ExternalCustomerID string `json:"external_customer_id,required,nullable"` JSON customerCreditLedgerNewEntryByExternalIDResponseDecrementLedgerEntryCustomerJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryByExternalIDResponseDecrementLedgerEntryCustomer) UnmarshalJSON ¶ added in v0.2.1
func (r *CustomerCreditLedgerNewEntryByExternalIDResponseDecrementLedgerEntryCustomer) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryByExternalIDResponseDecrementLedgerEntryEntryStatus ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDResponseDecrementLedgerEntryEntryStatus string
const ( CustomerCreditLedgerNewEntryByExternalIDResponseDecrementLedgerEntryEntryStatusCommitted CustomerCreditLedgerNewEntryByExternalIDResponseDecrementLedgerEntryEntryStatus = "committed" CustomerCreditLedgerNewEntryByExternalIDResponseDecrementLedgerEntryEntryStatusPending CustomerCreditLedgerNewEntryByExternalIDResponseDecrementLedgerEntryEntryStatus = "pending" )
type CustomerCreditLedgerNewEntryByExternalIDResponseDecrementLedgerEntryEntryType ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDResponseDecrementLedgerEntryEntryType string
const (
CustomerCreditLedgerNewEntryByExternalIDResponseDecrementLedgerEntryEntryTypeDecrement CustomerCreditLedgerNewEntryByExternalIDResponseDecrementLedgerEntryEntryType = "decrement"
)
type CustomerCreditLedgerNewEntryByExternalIDResponseEntryStatus ¶ added in v0.25.0
type CustomerCreditLedgerNewEntryByExternalIDResponseEntryStatus string
const ( CustomerCreditLedgerNewEntryByExternalIDResponseEntryStatusCommitted CustomerCreditLedgerNewEntryByExternalIDResponseEntryStatus = "committed" CustomerCreditLedgerNewEntryByExternalIDResponseEntryStatusPending CustomerCreditLedgerNewEntryByExternalIDResponseEntryStatus = "pending" )
func (CustomerCreditLedgerNewEntryByExternalIDResponseEntryStatus) IsKnown ¶ added in v0.25.0
func (r CustomerCreditLedgerNewEntryByExternalIDResponseEntryStatus) IsKnown() bool
type CustomerCreditLedgerNewEntryByExternalIDResponseEntryType ¶ added in v0.25.0
type CustomerCreditLedgerNewEntryByExternalIDResponseEntryType string
const ( CustomerCreditLedgerNewEntryByExternalIDResponseEntryTypeIncrement CustomerCreditLedgerNewEntryByExternalIDResponseEntryType = "increment" CustomerCreditLedgerNewEntryByExternalIDResponseEntryTypeDecrement CustomerCreditLedgerNewEntryByExternalIDResponseEntryType = "decrement" CustomerCreditLedgerNewEntryByExternalIDResponseEntryTypeExpirationChange CustomerCreditLedgerNewEntryByExternalIDResponseEntryType = "expiration_change" CustomerCreditLedgerNewEntryByExternalIDResponseEntryTypeCreditBlockExpiry CustomerCreditLedgerNewEntryByExternalIDResponseEntryType = "credit_block_expiry" CustomerCreditLedgerNewEntryByExternalIDResponseEntryTypeVoid CustomerCreditLedgerNewEntryByExternalIDResponseEntryType = "void" CustomerCreditLedgerNewEntryByExternalIDResponseEntryTypeVoidInitiated CustomerCreditLedgerNewEntryByExternalIDResponseEntryType = "void_initiated" CustomerCreditLedgerNewEntryByExternalIDResponseEntryTypeAmendment CustomerCreditLedgerNewEntryByExternalIDResponseEntryType = "amendment" )
func (CustomerCreditLedgerNewEntryByExternalIDResponseEntryType) IsKnown ¶ added in v0.25.0
func (r CustomerCreditLedgerNewEntryByExternalIDResponseEntryType) IsKnown() bool
type CustomerCreditLedgerNewEntryByExternalIDResponseExpirationChangeLedgerEntry ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDResponseExpirationChangeLedgerEntry struct { ID string `json:"id,required"` Amount float64 `json:"amount,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditBlock CustomerCreditLedgerNewEntryByExternalIDResponseExpirationChangeLedgerEntryCreditBlock `json:"credit_block,required"` Currency string `json:"currency,required"` Customer CustomerCreditLedgerNewEntryByExternalIDResponseExpirationChangeLedgerEntryCustomer `json:"customer,required"` Description string `json:"description,required,nullable"` EndingBalance float64 `json:"ending_balance,required"` EntryStatus CustomerCreditLedgerNewEntryByExternalIDResponseExpirationChangeLedgerEntryEntryStatus `json:"entry_status,required"` EntryType CustomerCreditLedgerNewEntryByExternalIDResponseExpirationChangeLedgerEntryEntryType `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"` JSON customerCreditLedgerNewEntryByExternalIDResponseExpirationChangeLedgerEntryJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryByExternalIDResponseExpirationChangeLedgerEntry) UnmarshalJSON ¶ added in v0.2.1
func (r *CustomerCreditLedgerNewEntryByExternalIDResponseExpirationChangeLedgerEntry) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryByExternalIDResponseExpirationChangeLedgerEntryCreditBlock ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDResponseExpirationChangeLedgerEntryCreditBlock 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 customerCreditLedgerNewEntryByExternalIDResponseExpirationChangeLedgerEntryCreditBlockJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryByExternalIDResponseExpirationChangeLedgerEntryCreditBlock) UnmarshalJSON ¶ added in v0.2.1
func (r *CustomerCreditLedgerNewEntryByExternalIDResponseExpirationChangeLedgerEntryCreditBlock) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryByExternalIDResponseExpirationChangeLedgerEntryCustomer ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDResponseExpirationChangeLedgerEntryCustomer struct { ID string `json:"id,required"` ExternalCustomerID string `json:"external_customer_id,required,nullable"` JSON customerCreditLedgerNewEntryByExternalIDResponseExpirationChangeLedgerEntryCustomerJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryByExternalIDResponseExpirationChangeLedgerEntryCustomer) UnmarshalJSON ¶ added in v0.2.1
func (r *CustomerCreditLedgerNewEntryByExternalIDResponseExpirationChangeLedgerEntryCustomer) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryByExternalIDResponseExpirationChangeLedgerEntryEntryStatus ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDResponseExpirationChangeLedgerEntryEntryStatus string
const ( CustomerCreditLedgerNewEntryByExternalIDResponseExpirationChangeLedgerEntryEntryStatusCommitted CustomerCreditLedgerNewEntryByExternalIDResponseExpirationChangeLedgerEntryEntryStatus = "committed" CustomerCreditLedgerNewEntryByExternalIDResponseExpirationChangeLedgerEntryEntryStatusPending CustomerCreditLedgerNewEntryByExternalIDResponseExpirationChangeLedgerEntryEntryStatus = "pending" )
type CustomerCreditLedgerNewEntryByExternalIDResponseExpirationChangeLedgerEntryEntryType ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDResponseExpirationChangeLedgerEntryEntryType string
const (
CustomerCreditLedgerNewEntryByExternalIDResponseExpirationChangeLedgerEntryEntryTypeExpirationChange CustomerCreditLedgerNewEntryByExternalIDResponseExpirationChangeLedgerEntryEntryType = "expiration_change"
)
type CustomerCreditLedgerNewEntryByExternalIDResponseIncrementLedgerEntry ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDResponseIncrementLedgerEntry struct { ID string `json:"id,required"` Amount float64 `json:"amount,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditBlock CustomerCreditLedgerNewEntryByExternalIDResponseIncrementLedgerEntryCreditBlock `json:"credit_block,required"` Currency string `json:"currency,required"` Customer CustomerCreditLedgerNewEntryByExternalIDResponseIncrementLedgerEntryCustomer `json:"customer,required"` Description string `json:"description,required,nullable"` EndingBalance float64 `json:"ending_balance,required"` EntryStatus CustomerCreditLedgerNewEntryByExternalIDResponseIncrementLedgerEntryEntryStatus `json:"entry_status,required"` EntryType CustomerCreditLedgerNewEntryByExternalIDResponseIncrementLedgerEntryEntryType `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 customerCreditLedgerNewEntryByExternalIDResponseIncrementLedgerEntryJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryByExternalIDResponseIncrementLedgerEntry) UnmarshalJSON ¶ added in v0.2.1
func (r *CustomerCreditLedgerNewEntryByExternalIDResponseIncrementLedgerEntry) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryByExternalIDResponseIncrementLedgerEntryCreditBlock ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDResponseIncrementLedgerEntryCreditBlock 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 customerCreditLedgerNewEntryByExternalIDResponseIncrementLedgerEntryCreditBlockJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryByExternalIDResponseIncrementLedgerEntryCreditBlock) UnmarshalJSON ¶ added in v0.2.1
func (r *CustomerCreditLedgerNewEntryByExternalIDResponseIncrementLedgerEntryCreditBlock) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryByExternalIDResponseIncrementLedgerEntryCustomer ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDResponseIncrementLedgerEntryCustomer struct { ID string `json:"id,required"` ExternalCustomerID string `json:"external_customer_id,required,nullable"` JSON customerCreditLedgerNewEntryByExternalIDResponseIncrementLedgerEntryCustomerJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryByExternalIDResponseIncrementLedgerEntryCustomer) UnmarshalJSON ¶ added in v0.2.1
func (r *CustomerCreditLedgerNewEntryByExternalIDResponseIncrementLedgerEntryCustomer) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryByExternalIDResponseIncrementLedgerEntryEntryStatus ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDResponseIncrementLedgerEntryEntryStatus string
const ( CustomerCreditLedgerNewEntryByExternalIDResponseIncrementLedgerEntryEntryStatusCommitted CustomerCreditLedgerNewEntryByExternalIDResponseIncrementLedgerEntryEntryStatus = "committed" CustomerCreditLedgerNewEntryByExternalIDResponseIncrementLedgerEntryEntryStatusPending CustomerCreditLedgerNewEntryByExternalIDResponseIncrementLedgerEntryEntryStatus = "pending" )
type CustomerCreditLedgerNewEntryByExternalIDResponseIncrementLedgerEntryEntryType ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDResponseIncrementLedgerEntryEntryType string
const (
CustomerCreditLedgerNewEntryByExternalIDResponseIncrementLedgerEntryEntryTypeIncrement CustomerCreditLedgerNewEntryByExternalIDResponseIncrementLedgerEntryEntryType = "increment"
)
type CustomerCreditLedgerNewEntryByExternalIDResponseUnion ¶ added in v0.25.0
type CustomerCreditLedgerNewEntryByExternalIDResponseUnion interface {
// contains filtered or unexported methods
}
The [Credit Ledger Entry resource](/guides/product-catalog/prepurchase) models prepaid credits within Orb.
Union satisfied by CustomerCreditLedgerNewEntryByExternalIDResponseIncrementLedgerEntry, CustomerCreditLedgerNewEntryByExternalIDResponseDecrementLedgerEntry, CustomerCreditLedgerNewEntryByExternalIDResponseExpirationChangeLedgerEntry, CustomerCreditLedgerNewEntryByExternalIDResponseCreditBlockExpiryLedgerEntry, CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntry, CustomerCreditLedgerNewEntryByExternalIDResponseVoidInitiatedLedgerEntry or CustomerCreditLedgerNewEntryByExternalIDResponseAmendmentLedgerEntry.
type CustomerCreditLedgerNewEntryByExternalIDResponseVoidInitiatedLedgerEntry ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDResponseVoidInitiatedLedgerEntry struct { ID string `json:"id,required"` Amount float64 `json:"amount,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditBlock CustomerCreditLedgerNewEntryByExternalIDResponseVoidInitiatedLedgerEntryCreditBlock `json:"credit_block,required"` Currency string `json:"currency,required"` Customer CustomerCreditLedgerNewEntryByExternalIDResponseVoidInitiatedLedgerEntryCustomer `json:"customer,required"` Description string `json:"description,required,nullable"` EndingBalance float64 `json:"ending_balance,required"` EntryStatus CustomerCreditLedgerNewEntryByExternalIDResponseVoidInitiatedLedgerEntryEntryStatus `json:"entry_status,required"` EntryType CustomerCreditLedgerNewEntryByExternalIDResponseVoidInitiatedLedgerEntryEntryType `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 customerCreditLedgerNewEntryByExternalIDResponseVoidInitiatedLedgerEntryJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryByExternalIDResponseVoidInitiatedLedgerEntry) UnmarshalJSON ¶ added in v0.2.1
func (r *CustomerCreditLedgerNewEntryByExternalIDResponseVoidInitiatedLedgerEntry) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryByExternalIDResponseVoidInitiatedLedgerEntryCreditBlock ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDResponseVoidInitiatedLedgerEntryCreditBlock 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 customerCreditLedgerNewEntryByExternalIDResponseVoidInitiatedLedgerEntryCreditBlockJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryByExternalIDResponseVoidInitiatedLedgerEntryCreditBlock) UnmarshalJSON ¶ added in v0.2.1
func (r *CustomerCreditLedgerNewEntryByExternalIDResponseVoidInitiatedLedgerEntryCreditBlock) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryByExternalIDResponseVoidInitiatedLedgerEntryCustomer ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDResponseVoidInitiatedLedgerEntryCustomer struct { ID string `json:"id,required"` ExternalCustomerID string `json:"external_customer_id,required,nullable"` JSON customerCreditLedgerNewEntryByExternalIDResponseVoidInitiatedLedgerEntryCustomerJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryByExternalIDResponseVoidInitiatedLedgerEntryCustomer) UnmarshalJSON ¶ added in v0.2.1
func (r *CustomerCreditLedgerNewEntryByExternalIDResponseVoidInitiatedLedgerEntryCustomer) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryByExternalIDResponseVoidInitiatedLedgerEntryEntryStatus ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDResponseVoidInitiatedLedgerEntryEntryStatus string
const ( CustomerCreditLedgerNewEntryByExternalIDResponseVoidInitiatedLedgerEntryEntryStatusCommitted CustomerCreditLedgerNewEntryByExternalIDResponseVoidInitiatedLedgerEntryEntryStatus = "committed" CustomerCreditLedgerNewEntryByExternalIDResponseVoidInitiatedLedgerEntryEntryStatusPending CustomerCreditLedgerNewEntryByExternalIDResponseVoidInitiatedLedgerEntryEntryStatus = "pending" )
type CustomerCreditLedgerNewEntryByExternalIDResponseVoidInitiatedLedgerEntryEntryType ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDResponseVoidInitiatedLedgerEntryEntryType string
const (
CustomerCreditLedgerNewEntryByExternalIDResponseVoidInitiatedLedgerEntryEntryTypeVoidInitiated CustomerCreditLedgerNewEntryByExternalIDResponseVoidInitiatedLedgerEntryEntryType = "void_initiated"
)
type CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntry ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntry struct { ID string `json:"id,required"` Amount float64 `json:"amount,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditBlock CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntryCreditBlock `json:"credit_block,required"` Currency string `json:"currency,required"` Customer CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntryCustomer `json:"customer,required"` Description string `json:"description,required,nullable"` EndingBalance float64 `json:"ending_balance,required"` EntryStatus CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntryEntryStatus `json:"entry_status,required"` EntryType CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntryEntryType `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 customerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntryJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntry) UnmarshalJSON ¶ added in v0.2.1
func (r *CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntry) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntryCreditBlock ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntryCreditBlock 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 customerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntryCreditBlockJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntryCreditBlock) UnmarshalJSON ¶ added in v0.2.1
func (r *CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntryCreditBlock) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntryCustomer ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntryCustomer struct { ID string `json:"id,required"` ExternalCustomerID string `json:"external_customer_id,required,nullable"` JSON customerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntryCustomerJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntryCustomer) UnmarshalJSON ¶ added in v0.2.1
func (r *CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntryCustomer) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntryEntryStatus ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntryEntryStatus string
const ( CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntryEntryStatusCommitted CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntryEntryStatus = "committed" CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntryEntryStatusPending CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntryEntryStatus = "pending" )
func (CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntryEntryStatus) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntryEntryStatus) IsKnown() bool
type CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntryEntryType ¶ added in v0.2.1
type CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntryEntryType string
const (
CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntryEntryTypeVoid CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntryEntryType = "void"
)
func (CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntryEntryType) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerNewEntryByExternalIDResponseVoidLedgerEntryEntryType) IsKnown() bool
type CustomerCreditLedgerNewEntryParams ¶
type CustomerCreditLedgerNewEntryParams interface {
ImplementsCustomerCreditLedgerNewEntryParams()
}
This interface is a union satisfied by one of the following: CustomerCreditLedgerNewEntryParamsAddIncrementCreditLedgerEntryRequestParams, CustomerCreditLedgerNewEntryParamsAddDecrementCreditLedgerEntryRequestParams, CustomerCreditLedgerNewEntryParamsAddExpirationChangeCreditLedgerEntryRequestParams, CustomerCreditLedgerNewEntryParamsAddVoidCreditLedgerEntryRequestParams, CustomerCreditLedgerNewEntryParamsAddAmendmentCreditLedgerEntryRequestParams.
type CustomerCreditLedgerNewEntryParamsAddAmendmentCreditLedgerEntryRequestParams ¶
type CustomerCreditLedgerNewEntryParamsAddAmendmentCreditLedgerEntryRequestParams 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[CustomerCreditLedgerNewEntryParamsAddAmendmentCreditLedgerEntryRequestParamsEntryType] `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 (CustomerCreditLedgerNewEntryParamsAddAmendmentCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryParams ¶
func (CustomerCreditLedgerNewEntryParamsAddAmendmentCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryParams()
func (CustomerCreditLedgerNewEntryParamsAddAmendmentCreditLedgerEntryRequestParams) MarshalJSON ¶
func (r CustomerCreditLedgerNewEntryParamsAddAmendmentCreditLedgerEntryRequestParams) MarshalJSON() (data []byte, err error)
type CustomerCreditLedgerNewEntryParamsAddAmendmentCreditLedgerEntryRequestParamsEntryType ¶
type CustomerCreditLedgerNewEntryParamsAddAmendmentCreditLedgerEntryRequestParamsEntryType string
const (
CustomerCreditLedgerNewEntryParamsAddAmendmentCreditLedgerEntryRequestParamsEntryTypeAmendment CustomerCreditLedgerNewEntryParamsAddAmendmentCreditLedgerEntryRequestParamsEntryType = "amendment"
)
type CustomerCreditLedgerNewEntryParamsAddDecrementCreditLedgerEntryRequestParams ¶
type CustomerCreditLedgerNewEntryParamsAddDecrementCreditLedgerEntryRequestParams 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[CustomerCreditLedgerNewEntryParamsAddDecrementCreditLedgerEntryRequestParamsEntryType] `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 (CustomerCreditLedgerNewEntryParamsAddDecrementCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryParams ¶
func (CustomerCreditLedgerNewEntryParamsAddDecrementCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryParams()
func (CustomerCreditLedgerNewEntryParamsAddDecrementCreditLedgerEntryRequestParams) MarshalJSON ¶
func (r CustomerCreditLedgerNewEntryParamsAddDecrementCreditLedgerEntryRequestParams) MarshalJSON() (data []byte, err error)
type CustomerCreditLedgerNewEntryParamsAddDecrementCreditLedgerEntryRequestParamsEntryType ¶
type CustomerCreditLedgerNewEntryParamsAddDecrementCreditLedgerEntryRequestParamsEntryType string
const (
CustomerCreditLedgerNewEntryParamsAddDecrementCreditLedgerEntryRequestParamsEntryTypeDecrement CustomerCreditLedgerNewEntryParamsAddDecrementCreditLedgerEntryRequestParamsEntryType = "decrement"
)
type CustomerCreditLedgerNewEntryParamsAddExpirationChangeCreditLedgerEntryRequestParams ¶
type CustomerCreditLedgerNewEntryParamsAddExpirationChangeCreditLedgerEntryRequestParams struct { EntryType param.Field[CustomerCreditLedgerNewEntryParamsAddExpirationChangeCreditLedgerEntryRequestParamsEntryType] `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 (CustomerCreditLedgerNewEntryParamsAddExpirationChangeCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryParams ¶
func (CustomerCreditLedgerNewEntryParamsAddExpirationChangeCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryParams()
func (CustomerCreditLedgerNewEntryParamsAddExpirationChangeCreditLedgerEntryRequestParams) MarshalJSON ¶
func (r CustomerCreditLedgerNewEntryParamsAddExpirationChangeCreditLedgerEntryRequestParams) MarshalJSON() (data []byte, err error)
type CustomerCreditLedgerNewEntryParamsAddExpirationChangeCreditLedgerEntryRequestParamsEntryType ¶
type CustomerCreditLedgerNewEntryParamsAddExpirationChangeCreditLedgerEntryRequestParamsEntryType string
const (
CustomerCreditLedgerNewEntryParamsAddExpirationChangeCreditLedgerEntryRequestParamsEntryTypeExpirationChange CustomerCreditLedgerNewEntryParamsAddExpirationChangeCreditLedgerEntryRequestParamsEntryType = "expiration_change"
)
type CustomerCreditLedgerNewEntryParamsAddIncrementCreditLedgerEntryRequestParams ¶
type CustomerCreditLedgerNewEntryParamsAddIncrementCreditLedgerEntryRequestParams 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[CustomerCreditLedgerNewEntryParamsAddIncrementCreditLedgerEntryRequestParamsEntryType] `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[CustomerCreditLedgerNewEntryParamsAddIncrementCreditLedgerEntryRequestParamsInvoiceSettings] `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 (CustomerCreditLedgerNewEntryParamsAddIncrementCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryParams ¶
func (CustomerCreditLedgerNewEntryParamsAddIncrementCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryParams()
func (CustomerCreditLedgerNewEntryParamsAddIncrementCreditLedgerEntryRequestParams) MarshalJSON ¶
func (r CustomerCreditLedgerNewEntryParamsAddIncrementCreditLedgerEntryRequestParams) MarshalJSON() (data []byte, err error)
type CustomerCreditLedgerNewEntryParamsAddIncrementCreditLedgerEntryRequestParamsEntryType ¶
type CustomerCreditLedgerNewEntryParamsAddIncrementCreditLedgerEntryRequestParamsEntryType string
const (
CustomerCreditLedgerNewEntryParamsAddIncrementCreditLedgerEntryRequestParamsEntryTypeIncrement CustomerCreditLedgerNewEntryParamsAddIncrementCreditLedgerEntryRequestParamsEntryType = "increment"
)
type CustomerCreditLedgerNewEntryParamsAddIncrementCreditLedgerEntryRequestParamsInvoiceSettings ¶
type CustomerCreditLedgerNewEntryParamsAddIncrementCreditLedgerEntryRequestParamsInvoiceSettings 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 (CustomerCreditLedgerNewEntryParamsAddIncrementCreditLedgerEntryRequestParamsInvoiceSettings) MarshalJSON ¶
func (r CustomerCreditLedgerNewEntryParamsAddIncrementCreditLedgerEntryRequestParamsInvoiceSettings) MarshalJSON() (data []byte, err error)
type CustomerCreditLedgerNewEntryParamsAddVoidCreditLedgerEntryRequestParams ¶
type CustomerCreditLedgerNewEntryParamsAddVoidCreditLedgerEntryRequestParams 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[CustomerCreditLedgerNewEntryParamsAddVoidCreditLedgerEntryRequestParamsEntryType] `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[CustomerCreditLedgerNewEntryParamsAddVoidCreditLedgerEntryRequestParamsVoidReason] `json:"void_reason"` }
func (CustomerCreditLedgerNewEntryParamsAddVoidCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryParams ¶
func (CustomerCreditLedgerNewEntryParamsAddVoidCreditLedgerEntryRequestParams) ImplementsCustomerCreditLedgerNewEntryParams()
func (CustomerCreditLedgerNewEntryParamsAddVoidCreditLedgerEntryRequestParams) MarshalJSON ¶
func (r CustomerCreditLedgerNewEntryParamsAddVoidCreditLedgerEntryRequestParams) MarshalJSON() (data []byte, err error)
type CustomerCreditLedgerNewEntryParamsAddVoidCreditLedgerEntryRequestParamsEntryType ¶
type CustomerCreditLedgerNewEntryParamsAddVoidCreditLedgerEntryRequestParamsEntryType string
const (
CustomerCreditLedgerNewEntryParamsAddVoidCreditLedgerEntryRequestParamsEntryTypeVoid CustomerCreditLedgerNewEntryParamsAddVoidCreditLedgerEntryRequestParamsEntryType = "void"
)
type CustomerCreditLedgerNewEntryParamsAddVoidCreditLedgerEntryRequestParamsVoidReason ¶
type CustomerCreditLedgerNewEntryParamsAddVoidCreditLedgerEntryRequestParamsVoidReason string
Can only be specified when `entry_type=void`. The reason for the void.
const (
CustomerCreditLedgerNewEntryParamsAddVoidCreditLedgerEntryRequestParamsVoidReasonRefund CustomerCreditLedgerNewEntryParamsAddVoidCreditLedgerEntryRequestParamsVoidReason = "refund"
)
type CustomerCreditLedgerNewEntryResponse ¶
type CustomerCreditLedgerNewEntryResponse struct { // This field can have the runtime type of [map[string]string]. Metadata interface{} `json:"metadata"` ID string `json:"id,required"` LedgerSequenceNumber int64 `json:"ledger_sequence_number,required"` EntryStatus CustomerCreditLedgerNewEntryResponseEntryStatus `json:"entry_status,required"` // This field can have the runtime type of // [CustomerCreditLedgerNewEntryResponseIncrementLedgerEntryCustomer], // [CustomerCreditLedgerNewEntryResponseDecrementLedgerEntryCustomer], // [CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntryCustomer], // [CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntryCustomer], // [CustomerCreditLedgerNewEntryResponseVoidLedgerEntryCustomer], // [CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntryCustomer], // [CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntryCustomer]. Customer interface{} `json:"customer"` StartingBalance float64 `json:"starting_balance,required"` EndingBalance float64 `json:"ending_balance,required"` Amount float64 `json:"amount,required"` Currency string `json:"currency,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` Description string `json:"description,required,nullable"` // This field can have the runtime type of // [CustomerCreditLedgerNewEntryResponseIncrementLedgerEntryCreditBlock], // [CustomerCreditLedgerNewEntryResponseDecrementLedgerEntryCreditBlock], // [CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntryCreditBlock], // [CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntryCreditBlock], // [CustomerCreditLedgerNewEntryResponseVoidLedgerEntryCreditBlock], // [CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntryCreditBlock], // [CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntryCreditBlock]. CreditBlock interface{} `json:"credit_block"` EntryType CustomerCreditLedgerNewEntryResponseEntryType `json:"entry_type,required"` PriceID string `json:"price_id,nullable"` EventID string `json:"event_id,nullable"` InvoiceID string `json:"invoice_id,nullable"` NewBlockExpiryDate time.Time `json:"new_block_expiry_date" format:"date-time"` VoidReason string `json:"void_reason,nullable"` VoidAmount float64 `json:"void_amount"` JSON customerCreditLedgerNewEntryResponseJSON `json:"-"` // contains filtered or unexported fields }
The [Credit Ledger Entry resource](/guides/product-catalog/prepurchase) models prepaid credits within Orb.
func (CustomerCreditLedgerNewEntryResponse) AsUnion ¶ added in v0.25.0
func (r CustomerCreditLedgerNewEntryResponse) AsUnion() CustomerCreditLedgerNewEntryResponseUnion
AsUnion returns a CustomerCreditLedgerNewEntryResponseUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are CustomerCreditLedgerNewEntryResponseIncrementLedgerEntry, CustomerCreditLedgerNewEntryResponseDecrementLedgerEntry, CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntry, CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntry, CustomerCreditLedgerNewEntryResponseVoidLedgerEntry, CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntry, CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntry.
func (*CustomerCreditLedgerNewEntryResponse) UnmarshalJSON ¶ added in v0.25.0
func (r *CustomerCreditLedgerNewEntryResponse) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntry ¶
type CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntry struct { ID string `json:"id,required"` Amount float64 `json:"amount,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditBlock CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntryCreditBlock `json:"credit_block,required"` Currency string `json:"currency,required"` Customer CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntryCustomer `json:"customer,required"` Description string `json:"description,required,nullable"` EndingBalance float64 `json:"ending_balance,required"` EntryStatus CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntryEntryStatus `json:"entry_status,required"` EntryType CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntryEntryType `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 customerCreditLedgerNewEntryResponseAmendmentLedgerEntryJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntry) UnmarshalJSON ¶
func (r *CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntry) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntryCreditBlock ¶
type CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntryCreditBlock 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 customerCreditLedgerNewEntryResponseAmendmentLedgerEntryCreditBlockJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntryCreditBlock) UnmarshalJSON ¶
func (r *CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntryCreditBlock) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntryCustomer ¶
type CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntryCustomer struct { ID string `json:"id,required"` ExternalCustomerID string `json:"external_customer_id,required,nullable"` JSON customerCreditLedgerNewEntryResponseAmendmentLedgerEntryCustomerJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntryCustomer) UnmarshalJSON ¶
func (r *CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntryCustomer) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntryEntryStatus ¶
type CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntryEntryStatus string
const ( CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntryEntryStatusCommitted CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntryEntryStatus = "committed" CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntryEntryStatusPending CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntryEntryStatus = "pending" )
func (CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntryEntryStatus) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntryEntryStatus) IsKnown() bool
type CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntryEntryType ¶
type CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntryEntryType string
const (
CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntryEntryTypeAmendment CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntryEntryType = "amendment"
)
func (CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntryEntryType) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntryEntryType) IsKnown() bool
type CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntry ¶
type CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntry struct { ID string `json:"id,required"` Amount float64 `json:"amount,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditBlock CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntryCreditBlock `json:"credit_block,required"` Currency string `json:"currency,required"` Customer CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntryCustomer `json:"customer,required"` Description string `json:"description,required,nullable"` EndingBalance float64 `json:"ending_balance,required"` EntryStatus CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntryEntryStatus `json:"entry_status,required"` EntryType CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntryEntryType `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 customerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntryJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntry) UnmarshalJSON ¶
func (r *CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntry) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntryCreditBlock ¶
type CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntryCreditBlock 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 customerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntryCreditBlockJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntryCreditBlock) UnmarshalJSON ¶
func (r *CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntryCreditBlock) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntryCustomer ¶
type CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntryCustomer struct { ID string `json:"id,required"` ExternalCustomerID string `json:"external_customer_id,required,nullable"` JSON customerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntryCustomerJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntryCustomer) UnmarshalJSON ¶
func (r *CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntryCustomer) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntryEntryStatus ¶
type CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntryEntryStatus string
const ( CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntryEntryStatusCommitted CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntryEntryStatus = "committed" CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntryEntryStatusPending CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntryEntryStatus = "pending" )
func (CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntryEntryStatus) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntryEntryStatus) IsKnown() bool
type CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntryEntryType ¶
type CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntryEntryType string
const (
CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntryEntryTypeCreditBlockExpiry CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntryEntryType = "credit_block_expiry"
)
func (CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntryEntryType) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntryEntryType) IsKnown() bool
type CustomerCreditLedgerNewEntryResponseDecrementLedgerEntry ¶
type CustomerCreditLedgerNewEntryResponseDecrementLedgerEntry struct { ID string `json:"id,required"` Amount float64 `json:"amount,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditBlock CustomerCreditLedgerNewEntryResponseDecrementLedgerEntryCreditBlock `json:"credit_block,required"` Currency string `json:"currency,required"` Customer CustomerCreditLedgerNewEntryResponseDecrementLedgerEntryCustomer `json:"customer,required"` Description string `json:"description,required,nullable"` EndingBalance float64 `json:"ending_balance,required"` EntryStatus CustomerCreditLedgerNewEntryResponseDecrementLedgerEntryEntryStatus `json:"entry_status,required"` EntryType CustomerCreditLedgerNewEntryResponseDecrementLedgerEntryEntryType `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 customerCreditLedgerNewEntryResponseDecrementLedgerEntryJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryResponseDecrementLedgerEntry) UnmarshalJSON ¶
func (r *CustomerCreditLedgerNewEntryResponseDecrementLedgerEntry) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryResponseDecrementLedgerEntryCreditBlock ¶
type CustomerCreditLedgerNewEntryResponseDecrementLedgerEntryCreditBlock 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 customerCreditLedgerNewEntryResponseDecrementLedgerEntryCreditBlockJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryResponseDecrementLedgerEntryCreditBlock) UnmarshalJSON ¶
func (r *CustomerCreditLedgerNewEntryResponseDecrementLedgerEntryCreditBlock) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryResponseDecrementLedgerEntryCustomer ¶
type CustomerCreditLedgerNewEntryResponseDecrementLedgerEntryCustomer struct { ID string `json:"id,required"` ExternalCustomerID string `json:"external_customer_id,required,nullable"` JSON customerCreditLedgerNewEntryResponseDecrementLedgerEntryCustomerJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryResponseDecrementLedgerEntryCustomer) UnmarshalJSON ¶
func (r *CustomerCreditLedgerNewEntryResponseDecrementLedgerEntryCustomer) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryResponseDecrementLedgerEntryEntryStatus ¶
type CustomerCreditLedgerNewEntryResponseDecrementLedgerEntryEntryStatus string
const ( CustomerCreditLedgerNewEntryResponseDecrementLedgerEntryEntryStatusCommitted CustomerCreditLedgerNewEntryResponseDecrementLedgerEntryEntryStatus = "committed" CustomerCreditLedgerNewEntryResponseDecrementLedgerEntryEntryStatusPending CustomerCreditLedgerNewEntryResponseDecrementLedgerEntryEntryStatus = "pending" )
func (CustomerCreditLedgerNewEntryResponseDecrementLedgerEntryEntryStatus) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerNewEntryResponseDecrementLedgerEntryEntryStatus) IsKnown() bool
type CustomerCreditLedgerNewEntryResponseDecrementLedgerEntryEntryType ¶
type CustomerCreditLedgerNewEntryResponseDecrementLedgerEntryEntryType string
const (
CustomerCreditLedgerNewEntryResponseDecrementLedgerEntryEntryTypeDecrement CustomerCreditLedgerNewEntryResponseDecrementLedgerEntryEntryType = "decrement"
)
func (CustomerCreditLedgerNewEntryResponseDecrementLedgerEntryEntryType) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerNewEntryResponseDecrementLedgerEntryEntryType) IsKnown() bool
type CustomerCreditLedgerNewEntryResponseEntryStatus ¶ added in v0.25.0
type CustomerCreditLedgerNewEntryResponseEntryStatus string
const ( CustomerCreditLedgerNewEntryResponseEntryStatusCommitted CustomerCreditLedgerNewEntryResponseEntryStatus = "committed" CustomerCreditLedgerNewEntryResponseEntryStatusPending CustomerCreditLedgerNewEntryResponseEntryStatus = "pending" )
func (CustomerCreditLedgerNewEntryResponseEntryStatus) IsKnown ¶ added in v0.25.0
func (r CustomerCreditLedgerNewEntryResponseEntryStatus) IsKnown() bool
type CustomerCreditLedgerNewEntryResponseEntryType ¶ added in v0.25.0
type CustomerCreditLedgerNewEntryResponseEntryType string
const ( CustomerCreditLedgerNewEntryResponseEntryTypeIncrement CustomerCreditLedgerNewEntryResponseEntryType = "increment" CustomerCreditLedgerNewEntryResponseEntryTypeDecrement CustomerCreditLedgerNewEntryResponseEntryType = "decrement" CustomerCreditLedgerNewEntryResponseEntryTypeExpirationChange CustomerCreditLedgerNewEntryResponseEntryType = "expiration_change" CustomerCreditLedgerNewEntryResponseEntryTypeCreditBlockExpiry CustomerCreditLedgerNewEntryResponseEntryType = "credit_block_expiry" CustomerCreditLedgerNewEntryResponseEntryTypeVoid CustomerCreditLedgerNewEntryResponseEntryType = "void" CustomerCreditLedgerNewEntryResponseEntryTypeVoidInitiated CustomerCreditLedgerNewEntryResponseEntryType = "void_initiated" CustomerCreditLedgerNewEntryResponseEntryTypeAmendment CustomerCreditLedgerNewEntryResponseEntryType = "amendment" )
func (CustomerCreditLedgerNewEntryResponseEntryType) IsKnown ¶ added in v0.25.0
func (r CustomerCreditLedgerNewEntryResponseEntryType) IsKnown() bool
type CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntry ¶
type CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntry struct { ID string `json:"id,required"` Amount float64 `json:"amount,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditBlock CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntryCreditBlock `json:"credit_block,required"` Currency string `json:"currency,required"` Customer CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntryCustomer `json:"customer,required"` Description string `json:"description,required,nullable"` EndingBalance float64 `json:"ending_balance,required"` EntryStatus CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntryEntryStatus `json:"entry_status,required"` EntryType CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntryEntryType `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"` JSON customerCreditLedgerNewEntryResponseExpirationChangeLedgerEntryJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntry) UnmarshalJSON ¶
func (r *CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntry) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntryCreditBlock ¶
type CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntryCreditBlock 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 customerCreditLedgerNewEntryResponseExpirationChangeLedgerEntryCreditBlockJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntryCreditBlock) UnmarshalJSON ¶
func (r *CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntryCreditBlock) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntryCustomer ¶
type CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntryCustomer struct { ID string `json:"id,required"` ExternalCustomerID string `json:"external_customer_id,required,nullable"` JSON customerCreditLedgerNewEntryResponseExpirationChangeLedgerEntryCustomerJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntryCustomer) UnmarshalJSON ¶
func (r *CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntryCustomer) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntryEntryStatus ¶
type CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntryEntryStatus string
const ( CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntryEntryStatusCommitted CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntryEntryStatus = "committed" CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntryEntryStatusPending CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntryEntryStatus = "pending" )
func (CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntryEntryStatus) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntryEntryStatus) IsKnown() bool
type CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntryEntryType ¶
type CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntryEntryType string
const (
CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntryEntryTypeExpirationChange CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntryEntryType = "expiration_change"
)
func (CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntryEntryType) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntryEntryType) IsKnown() bool
type CustomerCreditLedgerNewEntryResponseIncrementLedgerEntry ¶
type CustomerCreditLedgerNewEntryResponseIncrementLedgerEntry struct { ID string `json:"id,required"` Amount float64 `json:"amount,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditBlock CustomerCreditLedgerNewEntryResponseIncrementLedgerEntryCreditBlock `json:"credit_block,required"` Currency string `json:"currency,required"` Customer CustomerCreditLedgerNewEntryResponseIncrementLedgerEntryCustomer `json:"customer,required"` Description string `json:"description,required,nullable"` EndingBalance float64 `json:"ending_balance,required"` EntryStatus CustomerCreditLedgerNewEntryResponseIncrementLedgerEntryEntryStatus `json:"entry_status,required"` EntryType CustomerCreditLedgerNewEntryResponseIncrementLedgerEntryEntryType `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 customerCreditLedgerNewEntryResponseIncrementLedgerEntryJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryResponseIncrementLedgerEntry) UnmarshalJSON ¶
func (r *CustomerCreditLedgerNewEntryResponseIncrementLedgerEntry) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryResponseIncrementLedgerEntryCreditBlock ¶
type CustomerCreditLedgerNewEntryResponseIncrementLedgerEntryCreditBlock 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 customerCreditLedgerNewEntryResponseIncrementLedgerEntryCreditBlockJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryResponseIncrementLedgerEntryCreditBlock) UnmarshalJSON ¶
func (r *CustomerCreditLedgerNewEntryResponseIncrementLedgerEntryCreditBlock) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryResponseIncrementLedgerEntryCustomer ¶
type CustomerCreditLedgerNewEntryResponseIncrementLedgerEntryCustomer struct { ID string `json:"id,required"` ExternalCustomerID string `json:"external_customer_id,required,nullable"` JSON customerCreditLedgerNewEntryResponseIncrementLedgerEntryCustomerJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryResponseIncrementLedgerEntryCustomer) UnmarshalJSON ¶
func (r *CustomerCreditLedgerNewEntryResponseIncrementLedgerEntryCustomer) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryResponseIncrementLedgerEntryEntryStatus ¶
type CustomerCreditLedgerNewEntryResponseIncrementLedgerEntryEntryStatus string
const ( CustomerCreditLedgerNewEntryResponseIncrementLedgerEntryEntryStatusCommitted CustomerCreditLedgerNewEntryResponseIncrementLedgerEntryEntryStatus = "committed" CustomerCreditLedgerNewEntryResponseIncrementLedgerEntryEntryStatusPending CustomerCreditLedgerNewEntryResponseIncrementLedgerEntryEntryStatus = "pending" )
func (CustomerCreditLedgerNewEntryResponseIncrementLedgerEntryEntryStatus) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerNewEntryResponseIncrementLedgerEntryEntryStatus) IsKnown() bool
type CustomerCreditLedgerNewEntryResponseIncrementLedgerEntryEntryType ¶
type CustomerCreditLedgerNewEntryResponseIncrementLedgerEntryEntryType string
const (
CustomerCreditLedgerNewEntryResponseIncrementLedgerEntryEntryTypeIncrement CustomerCreditLedgerNewEntryResponseIncrementLedgerEntryEntryType = "increment"
)
func (CustomerCreditLedgerNewEntryResponseIncrementLedgerEntryEntryType) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerNewEntryResponseIncrementLedgerEntryEntryType) IsKnown() bool
type CustomerCreditLedgerNewEntryResponseUnion ¶ added in v0.25.0
type CustomerCreditLedgerNewEntryResponseUnion interface {
// contains filtered or unexported methods
}
The [Credit Ledger Entry resource](/guides/product-catalog/prepurchase) models prepaid credits within Orb.
Union satisfied by CustomerCreditLedgerNewEntryResponseIncrementLedgerEntry, CustomerCreditLedgerNewEntryResponseDecrementLedgerEntry, CustomerCreditLedgerNewEntryResponseExpirationChangeLedgerEntry, CustomerCreditLedgerNewEntryResponseCreditBlockExpiryLedgerEntry, CustomerCreditLedgerNewEntryResponseVoidLedgerEntry, CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntry or CustomerCreditLedgerNewEntryResponseAmendmentLedgerEntry.
type CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntry ¶
type CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntry struct { ID string `json:"id,required"` Amount float64 `json:"amount,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditBlock CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntryCreditBlock `json:"credit_block,required"` Currency string `json:"currency,required"` Customer CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntryCustomer `json:"customer,required"` Description string `json:"description,required,nullable"` EndingBalance float64 `json:"ending_balance,required"` EntryStatus CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntryEntryStatus `json:"entry_status,required"` EntryType CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntryEntryType `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 customerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntryJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntry) UnmarshalJSON ¶
func (r *CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntry) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntryCreditBlock ¶
type CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntryCreditBlock 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 customerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntryCreditBlockJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntryCreditBlock) UnmarshalJSON ¶
func (r *CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntryCreditBlock) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntryCustomer ¶
type CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntryCustomer struct { ID string `json:"id,required"` ExternalCustomerID string `json:"external_customer_id,required,nullable"` JSON customerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntryCustomerJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntryCustomer) UnmarshalJSON ¶
func (r *CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntryCustomer) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntryEntryStatus ¶
type CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntryEntryStatus string
const ( CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntryEntryStatusCommitted CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntryEntryStatus = "committed" CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntryEntryStatusPending CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntryEntryStatus = "pending" )
func (CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntryEntryStatus) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntryEntryStatus) IsKnown() bool
type CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntryEntryType ¶
type CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntryEntryType string
const (
CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntryEntryTypeVoidInitiated CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntryEntryType = "void_initiated"
)
func (CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntryEntryType) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerNewEntryResponseVoidInitiatedLedgerEntryEntryType) IsKnown() bool
type CustomerCreditLedgerNewEntryResponseVoidLedgerEntry ¶
type CustomerCreditLedgerNewEntryResponseVoidLedgerEntry struct { ID string `json:"id,required"` Amount float64 `json:"amount,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditBlock CustomerCreditLedgerNewEntryResponseVoidLedgerEntryCreditBlock `json:"credit_block,required"` Currency string `json:"currency,required"` Customer CustomerCreditLedgerNewEntryResponseVoidLedgerEntryCustomer `json:"customer,required"` Description string `json:"description,required,nullable"` EndingBalance float64 `json:"ending_balance,required"` EntryStatus CustomerCreditLedgerNewEntryResponseVoidLedgerEntryEntryStatus `json:"entry_status,required"` EntryType CustomerCreditLedgerNewEntryResponseVoidLedgerEntryEntryType `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 customerCreditLedgerNewEntryResponseVoidLedgerEntryJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryResponseVoidLedgerEntry) UnmarshalJSON ¶
func (r *CustomerCreditLedgerNewEntryResponseVoidLedgerEntry) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryResponseVoidLedgerEntryCreditBlock ¶
type CustomerCreditLedgerNewEntryResponseVoidLedgerEntryCreditBlock 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 customerCreditLedgerNewEntryResponseVoidLedgerEntryCreditBlockJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryResponseVoidLedgerEntryCreditBlock) UnmarshalJSON ¶
func (r *CustomerCreditLedgerNewEntryResponseVoidLedgerEntryCreditBlock) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryResponseVoidLedgerEntryCustomer ¶
type CustomerCreditLedgerNewEntryResponseVoidLedgerEntryCustomer struct { ID string `json:"id,required"` ExternalCustomerID string `json:"external_customer_id,required,nullable"` JSON customerCreditLedgerNewEntryResponseVoidLedgerEntryCustomerJSON `json:"-"` }
func (*CustomerCreditLedgerNewEntryResponseVoidLedgerEntryCustomer) UnmarshalJSON ¶
func (r *CustomerCreditLedgerNewEntryResponseVoidLedgerEntryCustomer) UnmarshalJSON(data []byte) (err error)
type CustomerCreditLedgerNewEntryResponseVoidLedgerEntryEntryStatus ¶
type CustomerCreditLedgerNewEntryResponseVoidLedgerEntryEntryStatus string
const ( CustomerCreditLedgerNewEntryResponseVoidLedgerEntryEntryStatusCommitted CustomerCreditLedgerNewEntryResponseVoidLedgerEntryEntryStatus = "committed" CustomerCreditLedgerNewEntryResponseVoidLedgerEntryEntryStatusPending CustomerCreditLedgerNewEntryResponseVoidLedgerEntryEntryStatus = "pending" )
func (CustomerCreditLedgerNewEntryResponseVoidLedgerEntryEntryStatus) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerNewEntryResponseVoidLedgerEntryEntryStatus) IsKnown() bool
type CustomerCreditLedgerNewEntryResponseVoidLedgerEntryEntryType ¶
type CustomerCreditLedgerNewEntryResponseVoidLedgerEntryEntryType string
const (
CustomerCreditLedgerNewEntryResponseVoidLedgerEntryEntryTypeVoid CustomerCreditLedgerNewEntryResponseVoidLedgerEntryEntryType = "void"
)
func (CustomerCreditLedgerNewEntryResponseVoidLedgerEntryEntryType) IsKnown ¶ added in v0.24.0
func (r CustomerCreditLedgerNewEntryResponseVoidLedgerEntryEntryType) IsKnown() bool
type CustomerCreditLedgerService ¶
type CustomerCreditLedgerService struct {
Options []option.RequestOption
}
CustomerCreditLedgerService contains methods and other services that help with interacting with the orb API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCustomerCreditLedgerService method instead.
func NewCustomerCreditLedgerService ¶
func NewCustomerCreditLedgerService(opts ...option.RequestOption) (r *CustomerCreditLedgerService)
NewCustomerCreditLedgerService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*CustomerCreditLedgerService) List ¶
func (r *CustomerCreditLedgerService) List(ctx context.Context, customerID string, query CustomerCreditLedgerListParams, opts ...option.RequestOption) (res *pagination.Page[CustomerCreditLedgerListResponse], err error)
The credits ledger provides _auditing_ functionality over Orb's credits system with a list of actions that have taken place to modify a customer's credit balance. This [paginated endpoint](../reference/pagination) lists these entries, starting from the most recent ledger entry.
More details on using Orb's real-time credit feature are [here](../guides/product-catalog/prepurchase.md).
There are four major types of modifications to credit balance, detailed below.
## Increment
Credits (which optionally expire on a future date) can be added via the API ([Add Ledger Entry](create-ledger-entry)). The ledger entry for such an action will always contain the total eligible starting and ending balance for the customer at the time the entry was added to the ledger.
## Decrement
Deductions can occur as a result of an API call to create a ledger entry (see [Add Ledger Entry](create-ledger-entry)), or automatically as a result of incurring usage. Both ledger entries present the `decrement` entry type.
As usage for a customer is reported into Orb, credits may be deducted according to the customer's plan configuration. An automated deduction of this type will result in a ledger entry, also with a starting and ending balance. In order to provide better tracing capabilities for automatic deductions, Orb always associates each automatic deduction with the `event_id` at the time of ingestion, used to pinpoint _why_ credit deduction took place and to ensure that credits are never deducted without an associated usage event.
By default, Orb uses an algorithm that automatically deducts from the _soonest expiring credit block_ first in order to ensure that all credits are utilized appropriately. As an example, if trial credits with an expiration date of 2 weeks from now are present for a customer, they will be used before any deductions take place from a non-expiring credit block.
If there are multiple blocks with the same expiration date, Orb will deduct from the block with the _lower cost basis_ first (e.g. trial credits with a $0 cost basis before paid credits with a $5.00 cost basis).
It's also possible for a single usage event's deduction to _span_ credit blocks. In this case, Orb will deduct from the next block, ending at the credit block which consists of unexpiring credits. Each of these deductions will lead to a _separate_ ledger entry, one per credit block that is deducted from. By default, the customer's total credit balance in Orb can be negative as a result of a decrement.
## Expiration change
The expiry of credits can be changed as a result of the API (See [Add Ledger Entry](create-ledger-entry)). This will create a ledger entry that specifies the balance as well as the initial and target expiry dates.
Note that for this entry type, `starting_balance` will equal `ending_balance`, and the `amount` represents the balance transferred. The credit block linked to the ledger entry is the source credit block from which there was an expiration change
## Credits expiry
When a set of credits expire on pre-set expiration date, the customer's balance automatically reflects this change and adds an entry to the ledger indicating this event. Note that credit expiry should always happen close to a date boundary in the customer's timezone.
## Void initiated
Credit blocks can be voided via the API. The `amount` on this entry corresponds to the number of credits that were remaining in the block at time of void. `void_reason` will be populated if the void is created with a reason.
## Void
When a set of credits is voided, the customer's balance automatically reflects this change and adds an entry to the ledger indicating this event.
## Amendment
When credits are added to a customer's balance as a result of a correction, this entry will be added to the ledger to indicate the adjustment of credits.
func (*CustomerCreditLedgerService) ListAutoPaging ¶
func (r *CustomerCreditLedgerService) ListAutoPaging(ctx context.Context, customerID string, query CustomerCreditLedgerListParams, opts ...option.RequestOption) *pagination.PageAutoPager[CustomerCreditLedgerListResponse]
The credits ledger provides _auditing_ functionality over Orb's credits system with a list of actions that have taken place to modify a customer's credit balance. This [paginated endpoint](../reference/pagination) lists these entries, starting from the most recent ledger entry.
More details on using Orb's real-time credit feature are [here](../guides/product-catalog/prepurchase.md).
There are four major types of modifications to credit balance, detailed below.
## Increment
Credits (which optionally expire on a future date) can be added via the API ([Add Ledger Entry](create-ledger-entry)). The ledger entry for such an action will always contain the total eligible starting and ending balance for the customer at the time the entry was added to the ledger.
## Decrement
Deductions can occur as a result of an API call to create a ledger entry (see [Add Ledger Entry](create-ledger-entry)), or automatically as a result of incurring usage. Both ledger entries present the `decrement` entry type.
As usage for a customer is reported into Orb, credits may be deducted according to the customer's plan configuration. An automated deduction of this type will result in a ledger entry, also with a starting and ending balance. In order to provide better tracing capabilities for automatic deductions, Orb always associates each automatic deduction with the `event_id` at the time of ingestion, used to pinpoint _why_ credit deduction took place and to ensure that credits are never deducted without an associated usage event.
By default, Orb uses an algorithm that automatically deducts from the _soonest expiring credit block_ first in order to ensure that all credits are utilized appropriately. As an example, if trial credits with an expiration date of 2 weeks from now are present for a customer, they will be used before any deductions take place from a non-expiring credit block.
If there are multiple blocks with the same expiration date, Orb will deduct from the block with the _lower cost basis_ first (e.g. trial credits with a $0 cost basis before paid credits with a $5.00 cost basis).
It's also possible for a single usage event's deduction to _span_ credit blocks. In this case, Orb will deduct from the next block, ending at the credit block which consists of unexpiring credits. Each of these deductions will lead to a _separate_ ledger entry, one per credit block that is deducted from. By default, the customer's total credit balance in Orb can be negative as a result of a decrement.
## Expiration change
The expiry of credits can be changed as a result of the API (See [Add Ledger Entry](create-ledger-entry)). This will create a ledger entry that specifies the balance as well as the initial and target expiry dates.
Note that for this entry type, `starting_balance` will equal `ending_balance`, and the `amount` represents the balance transferred. The credit block linked to the ledger entry is the source credit block from which there was an expiration change
## Credits expiry
When a set of credits expire on pre-set expiration date, the customer's balance automatically reflects this change and adds an entry to the ledger indicating this event. Note that credit expiry should always happen close to a date boundary in the customer's timezone.
## Void initiated
Credit blocks can be voided via the API. The `amount` on this entry corresponds to the number of credits that were remaining in the block at time of void. `void_reason` will be populated if the void is created with a reason.
## Void
When a set of credits is voided, the customer's balance automatically reflects this change and adds an entry to the ledger indicating this event.
## Amendment
When credits are added to a customer's balance as a result of a correction, this entry will be added to the ledger to indicate the adjustment of credits.
func (*CustomerCreditLedgerService) ListByExternalID ¶
func (r *CustomerCreditLedgerService) ListByExternalID(ctx context.Context, externalCustomerID string, query CustomerCreditLedgerListByExternalIDParams, opts ...option.RequestOption) (res *pagination.Page[CustomerCreditLedgerListByExternalIDResponse], err error)
The credits ledger provides _auditing_ functionality over Orb's credits system with a list of actions that have taken place to modify a customer's credit balance. This [paginated endpoint](../reference/pagination) lists these entries, starting from the most recent ledger entry.
More details on using Orb's real-time credit feature are [here](../guides/product-catalog/prepurchase.md).
There are four major types of modifications to credit balance, detailed below.
## Increment
Credits (which optionally expire on a future date) can be added via the API ([Add Ledger Entry](create-ledger-entry)). The ledger entry for such an action will always contain the total eligible starting and ending balance for the customer at the time the entry was added to the ledger.
## Decrement
Deductions can occur as a result of an API call to create a ledger entry (see [Add Ledger Entry](create-ledger-entry)), or automatically as a result of incurring usage. Both ledger entries present the `decrement` entry type.
As usage for a customer is reported into Orb, credits may be deducted according to the customer's plan configuration. An automated deduction of this type will result in a ledger entry, also with a starting and ending balance. In order to provide better tracing capabilities for automatic deductions, Orb always associates each automatic deduction with the `event_id` at the time of ingestion, used to pinpoint _why_ credit deduction took place and to ensure that credits are never deducted without an associated usage event.
By default, Orb uses an algorithm that automatically deducts from the _soonest expiring credit block_ first in order to ensure that all credits are utilized appropriately. As an example, if trial credits with an expiration date of 2 weeks from now are present for a customer, they will be used before any deductions take place from a non-expiring credit block.
If there are multiple blocks with the same expiration date, Orb will deduct from the block with the _lower cost basis_ first (e.g. trial credits with a $0 cost basis before paid credits with a $5.00 cost basis).
It's also possible for a single usage event's deduction to _span_ credit blocks. In this case, Orb will deduct from the next block, ending at the credit block which consists of unexpiring credits. Each of these deductions will lead to a _separate_ ledger entry, one per credit block that is deducted from. By default, the customer's total credit balance in Orb can be negative as a result of a decrement.
## Expiration change
The expiry of credits can be changed as a result of the API (See [Add Ledger Entry](create-ledger-entry)). This will create a ledger entry that specifies the balance as well as the initial and target expiry dates.
Note that for this entry type, `starting_balance` will equal `ending_balance`, and the `amount` represents the balance transferred. The credit block linked to the ledger entry is the source credit block from which there was an expiration change
## Credits expiry
When a set of credits expire on pre-set expiration date, the customer's balance automatically reflects this change and adds an entry to the ledger indicating this event. Note that credit expiry should always happen close to a date boundary in the customer's timezone.
## Void initiated
Credit blocks can be voided via the API. The `amount` on this entry corresponds to the number of credits that were remaining in the block at time of void. `void_reason` will be populated if the void is created with a reason.
## Void
When a set of credits is voided, the customer's balance automatically reflects this change and adds an entry to the ledger indicating this event.
## Amendment
When credits are added to a customer's balance as a result of a correction, this entry will be added to the ledger to indicate the adjustment of credits.
func (*CustomerCreditLedgerService) ListByExternalIDAutoPaging ¶
func (r *CustomerCreditLedgerService) ListByExternalIDAutoPaging(ctx context.Context, externalCustomerID string, query CustomerCreditLedgerListByExternalIDParams, opts ...option.RequestOption) *pagination.PageAutoPager[CustomerCreditLedgerListByExternalIDResponse]
The credits ledger provides _auditing_ functionality over Orb's credits system with a list of actions that have taken place to modify a customer's credit balance. This [paginated endpoint](../reference/pagination) lists these entries, starting from the most recent ledger entry.
More details on using Orb's real-time credit feature are [here](../guides/product-catalog/prepurchase.md).
There are four major types of modifications to credit balance, detailed below.
## Increment
Credits (which optionally expire on a future date) can be added via the API ([Add Ledger Entry](create-ledger-entry)). The ledger entry for such an action will always contain the total eligible starting and ending balance for the customer at the time the entry was added to the ledger.
## Decrement
Deductions can occur as a result of an API call to create a ledger entry (see [Add Ledger Entry](create-ledger-entry)), or automatically as a result of incurring usage. Both ledger entries present the `decrement` entry type.
As usage for a customer is reported into Orb, credits may be deducted according to the customer's plan configuration. An automated deduction of this type will result in a ledger entry, also with a starting and ending balance. In order to provide better tracing capabilities for automatic deductions, Orb always associates each automatic deduction with the `event_id` at the time of ingestion, used to pinpoint _why_ credit deduction took place and to ensure that credits are never deducted without an associated usage event.
By default, Orb uses an algorithm that automatically deducts from the _soonest expiring credit block_ first in order to ensure that all credits are utilized appropriately. As an example, if trial credits with an expiration date of 2 weeks from now are present for a customer, they will be used before any deductions take place from a non-expiring credit block.
If there are multiple blocks with the same expiration date, Orb will deduct from the block with the _lower cost basis_ first (e.g. trial credits with a $0 cost basis before paid credits with a $5.00 cost basis).
It's also possible for a single usage event's deduction to _span_ credit blocks. In this case, Orb will deduct from the next block, ending at the credit block which consists of unexpiring credits. Each of these deductions will lead to a _separate_ ledger entry, one per credit block that is deducted from. By default, the customer's total credit balance in Orb can be negative as a result of a decrement.
## Expiration change
The expiry of credits can be changed as a result of the API (See [Add Ledger Entry](create-ledger-entry)). This will create a ledger entry that specifies the balance as well as the initial and target expiry dates.
Note that for this entry type, `starting_balance` will equal `ending_balance`, and the `amount` represents the balance transferred. The credit block linked to the ledger entry is the source credit block from which there was an expiration change
## Credits expiry
When a set of credits expire on pre-set expiration date, the customer's balance automatically reflects this change and adds an entry to the ledger indicating this event. Note that credit expiry should always happen close to a date boundary in the customer's timezone.
## Void initiated
Credit blocks can be voided via the API. The `amount` on this entry corresponds to the number of credits that were remaining in the block at time of void. `void_reason` will be populated if the void is created with a reason.
## Void
When a set of credits is voided, the customer's balance automatically reflects this change and adds an entry to the ledger indicating this event.
## Amendment
When credits are added to a customer's balance as a result of a correction, this entry will be added to the ledger to indicate the adjustment of credits.
func (*CustomerCreditLedgerService) NewEntry ¶
func (r *CustomerCreditLedgerService) NewEntry(ctx context.Context, customerID string, body CustomerCreditLedgerNewEntryParams, opts ...option.RequestOption) (res *CustomerCreditLedgerNewEntryResponse, err error)
This endpoint allows you to create a new ledger entry for a specified customer's balance. This can be used to increment balance, deduct credits, and change the expiry date of existing credits.
## Effects of adding a ledger entry
- After calling this endpoint, [Fetch Credit Balance](fetch-customer-credits) will return a credit block that represents the changes (i.e. balance changes or transfers).
- A ledger entry will be added to the credits ledger for this customer, and therefore returned in the [View Credits Ledger](fetch-customer-credits) response as well as serialized in the response to this request. In the case of deductions without a specified block, multiple ledger entries may be created if the deduction spans credit blocks.
- If `invoice_settings` is specified, an invoice will be created that reflects the cost of the credits (based on `amount` and `per_unit_cost_basis`).
## Adding credits
Adding credits is done by creating an entry of type `increment`. This requires the caller to specify a number of credits as well as an optional expiry date in `YYYY-MM-DD` format. Orb also recommends specifying a description to assist with auditing. When adding credits, the caller can also specify a cost basis per-credit, to indicate how much in USD a customer paid for a single credit in a block. This can later be used for revenue recognition.
The following snippet illustrates a sample request body to increment credits which will expire in January of 2022.
```json
{ "entry_type": "increment", "amount": 100, "expiry_date": "2022-12-28", "per_unit_cost_basis": "0.20", "description": "Purchased 100 credits" }
```
Note that by default, Orb will always first increment any _negative_ balance in existing blocks before adding the remaining amount to the desired credit block.
### Invoicing for credits
By default, Orb manipulates the credit ledger but does not charge for credits. However, if you pass `invoice_settings` in the body of this request, Orb will also generate a one-off invoice for the customer for the credits pre-purchase. Note that you _must_ provide the `per_unit_cost_basis`, since the total charges on the invoice are calculated by multiplying the cost basis with the number of credit units added.
## Deducting Credits
Orb allows you to deduct credits from a customer by creating an entry of type `decrement`. Orb matches the algorithm for automatic deductions for determining which credit blocks to decrement from. In the case that the deduction leads to multiple ledger entries, the response from this endpoint will be the final deduction. Orb also optionally allows specifying a description to assist with auditing.
The following snippet illustrates a sample request body to decrement credits.
```json
{ "entry_type": "decrement", "amount": 20, "description": "Removing excess credits" }
```
## Changing credits expiry
If you'd like to change when existing credits expire, you should create a ledger entry of type `expiration_change`. For this entry, the required parameter `expiry_date` identifies the _originating_ block, and the required parameter `target_expiry_date` identifies when the transferred credits should now expire. A new credit block will be created with expiry date `target_expiry_date`, with the same cost basis data as the original credit block, if present.
Note that the balance of the block with the given `expiry_date` must be at least equal to the desired transfer amount determined by the `amount` parameter.
The following snippet illustrates a sample request body to extend the expiration date of credits by one year:
```json
{ "entry_type": "expiration_change", "amount": 10, "expiry_date": "2022-12-28", "block_id": "UiUhFWeLHPrBY4Ad", "target_expiry_date": "2023-12-28", "description": "Extending credit validity" }
```
## Voiding credits
If you'd like to void a credit block, create a ledger entry of type `void`. For this entry, `block_id` is required to identify the block, and `amount` indicates how many credits to void, up to the block's initial balance. Pass in a `void_reason` of `refund` if the void is due to a refund.
## Amendment
If you'd like to undo a decrement on a credit block, create a ledger entry of type `amendment`. For this entry, `block_id` is required to identify the block that was originally decremented from, and `amount` indicates how many credits to return to the customer, up to the block's initial balance.
func (*CustomerCreditLedgerService) NewEntryByExternalID ¶ added in v0.2.1
func (r *CustomerCreditLedgerService) NewEntryByExternalID(ctx context.Context, externalCustomerID string, body CustomerCreditLedgerNewEntryByExternalIDParams, opts ...option.RequestOption) (res *CustomerCreditLedgerNewEntryByExternalIDResponse, err error)
This endpoint allows you to create a new ledger entry for a specified customer's balance. This can be used to increment balance, deduct credits, and change the expiry date of existing credits.
## Effects of adding a ledger entry
- After calling this endpoint, [Fetch Credit Balance](fetch-customer-credits) will return a credit block that represents the changes (i.e. balance changes or transfers).
- A ledger entry will be added to the credits ledger for this customer, and therefore returned in the [View Credits Ledger](fetch-customer-credits) response as well as serialized in the response to this request. In the case of deductions without a specified block, multiple ledger entries may be created if the deduction spans credit blocks.
- If `invoice_settings` is specified, an invoice will be created that reflects the cost of the credits (based on `amount` and `per_unit_cost_basis`).
## Adding credits
Adding credits is done by creating an entry of type `increment`. This requires the caller to specify a number of credits as well as an optional expiry date in `YYYY-MM-DD` format. Orb also recommends specifying a description to assist with auditing. When adding credits, the caller can also specify a cost basis per-credit, to indicate how much in USD a customer paid for a single credit in a block. This can later be used for revenue recognition.
The following snippet illustrates a sample request body to increment credits which will expire in January of 2022.
```json
{ "entry_type": "increment", "amount": 100, "expiry_date": "2022-12-28", "per_unit_cost_basis": "0.20", "description": "Purchased 100 credits" }
```
Note that by default, Orb will always first increment any _negative_ balance in existing blocks before adding the remaining amount to the desired credit block.
### Invoicing for credits
By default, Orb manipulates the credit ledger but does not charge for credits. However, if you pass `invoice_settings` in the body of this request, Orb will also generate a one-off invoice for the customer for the credits pre-purchase. Note that you _must_ provide the `per_unit_cost_basis`, since the total charges on the invoice are calculated by multiplying the cost basis with the number of credit units added.
## Deducting Credits
Orb allows you to deduct credits from a customer by creating an entry of type `decrement`. Orb matches the algorithm for automatic deductions for determining which credit blocks to decrement from. In the case that the deduction leads to multiple ledger entries, the response from this endpoint will be the final deduction. Orb also optionally allows specifying a description to assist with auditing.
The following snippet illustrates a sample request body to decrement credits.
```json
{ "entry_type": "decrement", "amount": 20, "description": "Removing excess credits" }
```
## Changing credits expiry
If you'd like to change when existing credits expire, you should create a ledger entry of type `expiration_change`. For this entry, the required parameter `expiry_date` identifies the _originating_ block, and the required parameter `target_expiry_date` identifies when the transferred credits should now expire. A new credit block will be created with expiry date `target_expiry_date`, with the same cost basis data as the original credit block, if present.
Note that the balance of the block with the given `expiry_date` must be at least equal to the desired transfer amount determined by the `amount` parameter.
The following snippet illustrates a sample request body to extend the expiration date of credits by one year:
```json
{ "entry_type": "expiration_change", "amount": 10, "expiry_date": "2022-12-28", "block_id": "UiUhFWeLHPrBY4Ad", "target_expiry_date": "2023-12-28", "description": "Extending credit validity" }
```
## Voiding credits
If you'd like to void a credit block, create a ledger entry of type `void`. For this entry, `block_id` is required to identify the block, and `amount` indicates how many credits to void, up to the block's initial balance. Pass in a `void_reason` of `refund` if the void is due to a refund.
## Amendment
If you'd like to undo a decrement on a credit block, create a ledger entry of type `amendment`. For this entry, `block_id` is required to identify the block that was originally decremented from, and `amount` indicates how many credits to return to the customer, up to the block's initial balance.
type CustomerCreditListByExternalIDParams ¶
type CustomerCreditListByExternalIDParams struct { // The ledger currency or custom pricing unit to use. Currency param.Field[string] `query:"currency"` // Cursor for pagination. This can be populated by the `next_cursor` value returned // from the initial request. Cursor param.Field[string] `query:"cursor"` // Include all blocks, not just active ones. IncludeAllBlocks param.Field[bool] `query:"include_all_blocks"` // The number of items to fetch. Defaults to 20. Limit param.Field[int64] `query:"limit"` }
func (CustomerCreditListByExternalIDParams) URLQuery ¶
func (r CustomerCreditListByExternalIDParams) URLQuery() (v url.Values)
URLQuery serializes CustomerCreditListByExternalIDParams's query parameters as `url.Values`.
type CustomerCreditListByExternalIDResponse ¶
type CustomerCreditListByExternalIDResponse 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 CustomerCreditListByExternalIDResponseStatus `json:"status,required"` JSON customerCreditListByExternalIDResponseJSON `json:"-"` }
func (*CustomerCreditListByExternalIDResponse) UnmarshalJSON ¶
func (r *CustomerCreditListByExternalIDResponse) UnmarshalJSON(data []byte) (err error)
type CustomerCreditListByExternalIDResponseStatus ¶ added in v0.24.0
type CustomerCreditListByExternalIDResponseStatus string
const ( CustomerCreditListByExternalIDResponseStatusActive CustomerCreditListByExternalIDResponseStatus = "active" CustomerCreditListByExternalIDResponseStatusPendingPayment CustomerCreditListByExternalIDResponseStatus = "pending_payment" )
func (CustomerCreditListByExternalIDResponseStatus) IsKnown ¶ added in v0.24.0
func (r CustomerCreditListByExternalIDResponseStatus) IsKnown() bool
type CustomerCreditListParams ¶
type CustomerCreditListParams struct { // The ledger currency or custom pricing unit to use. Currency param.Field[string] `query:"currency"` // Cursor for pagination. This can be populated by the `next_cursor` value returned // from the initial request. Cursor param.Field[string] `query:"cursor"` // Include all blocks, not just active ones. IncludeAllBlocks param.Field[bool] `query:"include_all_blocks"` // The number of items to fetch. Defaults to 20. Limit param.Field[int64] `query:"limit"` }
func (CustomerCreditListParams) URLQuery ¶
func (r CustomerCreditListParams) URLQuery() (v url.Values)
URLQuery serializes CustomerCreditListParams's query parameters as `url.Values`.
type CustomerCreditListResponse ¶
type CustomerCreditListResponse 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 CustomerCreditListResponseStatus `json:"status,required"` JSON customerCreditListResponseJSON `json:"-"` }
func (*CustomerCreditListResponse) UnmarshalJSON ¶
func (r *CustomerCreditListResponse) UnmarshalJSON(data []byte) (err error)
type CustomerCreditListResponseStatus ¶ added in v0.24.0
type CustomerCreditListResponseStatus string
const ( CustomerCreditListResponseStatusActive CustomerCreditListResponseStatus = "active" CustomerCreditListResponseStatusPendingPayment CustomerCreditListResponseStatus = "pending_payment" )
func (CustomerCreditListResponseStatus) IsKnown ¶ added in v0.24.0
func (r CustomerCreditListResponseStatus) IsKnown() bool
type CustomerCreditService ¶
type CustomerCreditService struct { Options []option.RequestOption Ledger *CustomerCreditLedgerService TopUps *CustomerCreditTopUpService }
CustomerCreditService contains methods and other services that help with interacting with the orb API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCustomerCreditService method instead.
func NewCustomerCreditService ¶
func NewCustomerCreditService(opts ...option.RequestOption) (r *CustomerCreditService)
NewCustomerCreditService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*CustomerCreditService) List ¶
func (r *CustomerCreditService) List(ctx context.Context, customerID string, query CustomerCreditListParams, opts ...option.RequestOption) (res *pagination.Page[CustomerCreditListResponse], err error)
Returns a paginated list of unexpired, non-zero credit blocks for a customer.
Note that `currency` defaults to credits if not specified. To use a real world currency, set `currency` to an ISO 4217 string.
func (*CustomerCreditService) ListAutoPaging ¶
func (r *CustomerCreditService) ListAutoPaging(ctx context.Context, customerID string, query CustomerCreditListParams, opts ...option.RequestOption) *pagination.PageAutoPager[CustomerCreditListResponse]
Returns a paginated list of unexpired, non-zero credit blocks for a customer.
Note that `currency` defaults to credits if not specified. To use a real world currency, set `currency` to an ISO 4217 string.
func (*CustomerCreditService) ListByExternalID ¶
func (r *CustomerCreditService) ListByExternalID(ctx context.Context, externalCustomerID string, query CustomerCreditListByExternalIDParams, opts ...option.RequestOption) (res *pagination.Page[CustomerCreditListByExternalIDResponse], err error)
Returns a paginated list of unexpired, non-zero credit blocks for a customer.
Note that `currency` defaults to credits if not specified. To use a real world currency, set `currency` to an ISO 4217 string.
func (*CustomerCreditService) ListByExternalIDAutoPaging ¶
func (r *CustomerCreditService) ListByExternalIDAutoPaging(ctx context.Context, externalCustomerID string, query CustomerCreditListByExternalIDParams, opts ...option.RequestOption) *pagination.PageAutoPager[CustomerCreditListByExternalIDResponse]
Returns a paginated list of unexpired, non-zero credit blocks for a customer.
Note that `currency` defaults to credits if not specified. To use a real world currency, set `currency` to an ISO 4217 string.
type CustomerCreditTopUpListByExternalIDParams ¶ added in v0.15.0
type CustomerCreditTopUpListByExternalIDParams struct { // Cursor for pagination. This can be populated by the `next_cursor` value returned // from the initial request. Cursor param.Field[string] `query:"cursor"` // The number of items to fetch. Defaults to 20. Limit param.Field[int64] `query:"limit"` }
func (CustomerCreditTopUpListByExternalIDParams) URLQuery ¶ added in v0.15.0
func (r CustomerCreditTopUpListByExternalIDParams) URLQuery() (v url.Values)
URLQuery serializes CustomerCreditTopUpListByExternalIDParams's query parameters as `url.Values`.
type CustomerCreditTopUpListByExternalIDResponse ¶ added in v0.15.0
type CustomerCreditTopUpListByExternalIDResponse 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 CustomerCreditTopUpListByExternalIDResponseInvoiceSettings `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 CustomerCreditTopUpListByExternalIDResponseExpiresAfterUnit `json:"expires_after_unit,nullable"` JSON customerCreditTopUpListByExternalIDResponseJSON `json:"-"` }
func (*CustomerCreditTopUpListByExternalIDResponse) UnmarshalJSON ¶ added in v0.15.0
func (r *CustomerCreditTopUpListByExternalIDResponse) UnmarshalJSON(data []byte) (err error)
type CustomerCreditTopUpListByExternalIDResponseExpiresAfterUnit ¶ added in v0.15.0
type CustomerCreditTopUpListByExternalIDResponseExpiresAfterUnit string
The unit of expires_after.
const ( CustomerCreditTopUpListByExternalIDResponseExpiresAfterUnitDay CustomerCreditTopUpListByExternalIDResponseExpiresAfterUnit = "day" CustomerCreditTopUpListByExternalIDResponseExpiresAfterUnitMonth CustomerCreditTopUpListByExternalIDResponseExpiresAfterUnit = "month" )
func (CustomerCreditTopUpListByExternalIDResponseExpiresAfterUnit) IsKnown ¶ added in v0.24.0
func (r CustomerCreditTopUpListByExternalIDResponseExpiresAfterUnit) IsKnown() bool
type CustomerCreditTopUpListByExternalIDResponseInvoiceSettings ¶ added in v0.15.0
type CustomerCreditTopUpListByExternalIDResponseInvoiceSettings 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 customerCreditTopUpListByExternalIDResponseInvoiceSettingsJSON `json:"-"` }
Settings for invoices generated by triggered top-ups.
func (*CustomerCreditTopUpListByExternalIDResponseInvoiceSettings) UnmarshalJSON ¶ added in v0.15.0
func (r *CustomerCreditTopUpListByExternalIDResponseInvoiceSettings) UnmarshalJSON(data []byte) (err error)
type CustomerCreditTopUpListParams ¶ added in v0.15.0
type CustomerCreditTopUpListParams struct { // Cursor for pagination. This can be populated by the `next_cursor` value returned // from the initial request. Cursor param.Field[string] `query:"cursor"` // The number of items to fetch. Defaults to 20. Limit param.Field[int64] `query:"limit"` }
func (CustomerCreditTopUpListParams) URLQuery ¶ added in v0.15.0
func (r CustomerCreditTopUpListParams) URLQuery() (v url.Values)
URLQuery serializes CustomerCreditTopUpListParams's query parameters as `url.Values`.
type CustomerCreditTopUpListResponse ¶ added in v0.15.0
type CustomerCreditTopUpListResponse 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 CustomerCreditTopUpListResponseInvoiceSettings `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 CustomerCreditTopUpListResponseExpiresAfterUnit `json:"expires_after_unit,nullable"` JSON customerCreditTopUpListResponseJSON `json:"-"` }
func (*CustomerCreditTopUpListResponse) UnmarshalJSON ¶ added in v0.15.0
func (r *CustomerCreditTopUpListResponse) UnmarshalJSON(data []byte) (err error)
type CustomerCreditTopUpListResponseExpiresAfterUnit ¶ added in v0.15.0
type CustomerCreditTopUpListResponseExpiresAfterUnit string
The unit of expires_after.
const ( CustomerCreditTopUpListResponseExpiresAfterUnitDay CustomerCreditTopUpListResponseExpiresAfterUnit = "day" CustomerCreditTopUpListResponseExpiresAfterUnitMonth CustomerCreditTopUpListResponseExpiresAfterUnit = "month" )
func (CustomerCreditTopUpListResponseExpiresAfterUnit) IsKnown ¶ added in v0.24.0
func (r CustomerCreditTopUpListResponseExpiresAfterUnit) IsKnown() bool
type CustomerCreditTopUpListResponseInvoiceSettings ¶ added in v0.15.0
type CustomerCreditTopUpListResponseInvoiceSettings 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 customerCreditTopUpListResponseInvoiceSettingsJSON `json:"-"` }
Settings for invoices generated by triggered top-ups.
func (*CustomerCreditTopUpListResponseInvoiceSettings) UnmarshalJSON ¶ added in v0.15.0
func (r *CustomerCreditTopUpListResponseInvoiceSettings) UnmarshalJSON(data []byte) (err error)
type CustomerCreditTopUpNewByExternalIDParams ¶ added in v0.15.0
type CustomerCreditTopUpNewByExternalIDParams struct { // The amount to increment when the threshold is reached. Amount param.Field[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 param.Field[string] `json:"currency,required"` // Settings for invoices generated by triggered top-ups. InvoiceSettings param.Field[CustomerCreditTopUpNewByExternalIDParamsInvoiceSettings] `json:"invoice_settings,required"` // How much, in the customer's currency, to charge for each unit. PerUnitCostBasis param.Field[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 param.Field[string] `json:"threshold,required"` // The number of days or months after which the top-up expires. If unspecified, it // does not expire. ExpiresAfter param.Field[int64] `json:"expires_after"` // The unit of expires_after. ExpiresAfterUnit param.Field[CustomerCreditTopUpNewByExternalIDParamsExpiresAfterUnit] `json:"expires_after_unit"` }
func (CustomerCreditTopUpNewByExternalIDParams) MarshalJSON ¶ added in v0.15.0
func (r CustomerCreditTopUpNewByExternalIDParams) MarshalJSON() (data []byte, err error)
type CustomerCreditTopUpNewByExternalIDParamsExpiresAfterUnit ¶ added in v0.15.0
type CustomerCreditTopUpNewByExternalIDParamsExpiresAfterUnit string
The unit of expires_after.
const ( CustomerCreditTopUpNewByExternalIDParamsExpiresAfterUnitDay CustomerCreditTopUpNewByExternalIDParamsExpiresAfterUnit = "day" CustomerCreditTopUpNewByExternalIDParamsExpiresAfterUnitMonth CustomerCreditTopUpNewByExternalIDParamsExpiresAfterUnit = "month" )
func (CustomerCreditTopUpNewByExternalIDParamsExpiresAfterUnit) IsKnown ¶ added in v0.24.0
func (r CustomerCreditTopUpNewByExternalIDParamsExpiresAfterUnit) IsKnown() bool
type CustomerCreditTopUpNewByExternalIDParamsInvoiceSettings ¶ added in v0.15.0
type CustomerCreditTopUpNewByExternalIDParamsInvoiceSettings 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, new credit blocks created by this top-up will require that the // corresponding invoice is paid before they can be drawn down from. RequireSuccessfulPayment param.Field[bool] `json:"require_successful_payment"` }
Settings for invoices generated by triggered top-ups.
func (CustomerCreditTopUpNewByExternalIDParamsInvoiceSettings) MarshalJSON ¶ added in v0.15.0
func (r CustomerCreditTopUpNewByExternalIDParamsInvoiceSettings) MarshalJSON() (data []byte, err error)
type CustomerCreditTopUpNewByExternalIDResponse ¶ added in v0.15.0
type CustomerCreditTopUpNewByExternalIDResponse 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 CustomerCreditTopUpNewByExternalIDResponseInvoiceSettings `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 CustomerCreditTopUpNewByExternalIDResponseExpiresAfterUnit `json:"expires_after_unit,nullable"` JSON customerCreditTopUpNewByExternalIDResponseJSON `json:"-"` }
func (*CustomerCreditTopUpNewByExternalIDResponse) UnmarshalJSON ¶ added in v0.15.0
func (r *CustomerCreditTopUpNewByExternalIDResponse) UnmarshalJSON(data []byte) (err error)
type CustomerCreditTopUpNewByExternalIDResponseExpiresAfterUnit ¶ added in v0.15.0
type CustomerCreditTopUpNewByExternalIDResponseExpiresAfterUnit string
The unit of expires_after.
const ( CustomerCreditTopUpNewByExternalIDResponseExpiresAfterUnitDay CustomerCreditTopUpNewByExternalIDResponseExpiresAfterUnit = "day" CustomerCreditTopUpNewByExternalIDResponseExpiresAfterUnitMonth CustomerCreditTopUpNewByExternalIDResponseExpiresAfterUnit = "month" )
func (CustomerCreditTopUpNewByExternalIDResponseExpiresAfterUnit) IsKnown ¶ added in v0.24.0
func (r CustomerCreditTopUpNewByExternalIDResponseExpiresAfterUnit) IsKnown() bool
type CustomerCreditTopUpNewByExternalIDResponseInvoiceSettings ¶ added in v0.15.0
type CustomerCreditTopUpNewByExternalIDResponseInvoiceSettings 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 customerCreditTopUpNewByExternalIDResponseInvoiceSettingsJSON `json:"-"` }
Settings for invoices generated by triggered top-ups.
func (*CustomerCreditTopUpNewByExternalIDResponseInvoiceSettings) UnmarshalJSON ¶ added in v0.15.0
func (r *CustomerCreditTopUpNewByExternalIDResponseInvoiceSettings) UnmarshalJSON(data []byte) (err error)
type CustomerCreditTopUpNewParams ¶ added in v0.15.0
type CustomerCreditTopUpNewParams struct { // The amount to increment when the threshold is reached. Amount param.Field[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 param.Field[string] `json:"currency,required"` // Settings for invoices generated by triggered top-ups. InvoiceSettings param.Field[CustomerCreditTopUpNewParamsInvoiceSettings] `json:"invoice_settings,required"` // How much, in the customer's currency, to charge for each unit. PerUnitCostBasis param.Field[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 param.Field[string] `json:"threshold,required"` // The number of days or months after which the top-up expires. If unspecified, it // does not expire. ExpiresAfter param.Field[int64] `json:"expires_after"` // The unit of expires_after. ExpiresAfterUnit param.Field[CustomerCreditTopUpNewParamsExpiresAfterUnit] `json:"expires_after_unit"` }
func (CustomerCreditTopUpNewParams) MarshalJSON ¶ added in v0.15.0
func (r CustomerCreditTopUpNewParams) MarshalJSON() (data []byte, err error)
type CustomerCreditTopUpNewParamsExpiresAfterUnit ¶ added in v0.15.0
type CustomerCreditTopUpNewParamsExpiresAfterUnit string
The unit of expires_after.
const ( CustomerCreditTopUpNewParamsExpiresAfterUnitDay CustomerCreditTopUpNewParamsExpiresAfterUnit = "day" CustomerCreditTopUpNewParamsExpiresAfterUnitMonth CustomerCreditTopUpNewParamsExpiresAfterUnit = "month" )
func (CustomerCreditTopUpNewParamsExpiresAfterUnit) IsKnown ¶ added in v0.24.0
func (r CustomerCreditTopUpNewParamsExpiresAfterUnit) IsKnown() bool
type CustomerCreditTopUpNewParamsInvoiceSettings ¶ added in v0.15.0
type CustomerCreditTopUpNewParamsInvoiceSettings 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, new credit blocks created by this top-up will require that the // corresponding invoice is paid before they can be drawn down from. RequireSuccessfulPayment param.Field[bool] `json:"require_successful_payment"` }
Settings for invoices generated by triggered top-ups.
func (CustomerCreditTopUpNewParamsInvoiceSettings) MarshalJSON ¶ added in v0.15.0
func (r CustomerCreditTopUpNewParamsInvoiceSettings) MarshalJSON() (data []byte, err error)
type CustomerCreditTopUpNewResponse ¶ added in v0.15.0
type CustomerCreditTopUpNewResponse 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 CustomerCreditTopUpNewResponseInvoiceSettings `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 CustomerCreditTopUpNewResponseExpiresAfterUnit `json:"expires_after_unit,nullable"` JSON customerCreditTopUpNewResponseJSON `json:"-"` }
func (*CustomerCreditTopUpNewResponse) UnmarshalJSON ¶ added in v0.15.0
func (r *CustomerCreditTopUpNewResponse) UnmarshalJSON(data []byte) (err error)
type CustomerCreditTopUpNewResponseExpiresAfterUnit ¶ added in v0.15.0
type CustomerCreditTopUpNewResponseExpiresAfterUnit string
The unit of expires_after.
const ( CustomerCreditTopUpNewResponseExpiresAfterUnitDay CustomerCreditTopUpNewResponseExpiresAfterUnit = "day" CustomerCreditTopUpNewResponseExpiresAfterUnitMonth CustomerCreditTopUpNewResponseExpiresAfterUnit = "month" )
func (CustomerCreditTopUpNewResponseExpiresAfterUnit) IsKnown ¶ added in v0.24.0
func (r CustomerCreditTopUpNewResponseExpiresAfterUnit) IsKnown() bool
type CustomerCreditTopUpNewResponseInvoiceSettings ¶ added in v0.15.0
type CustomerCreditTopUpNewResponseInvoiceSettings 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 customerCreditTopUpNewResponseInvoiceSettingsJSON `json:"-"` }
Settings for invoices generated by triggered top-ups.
func (*CustomerCreditTopUpNewResponseInvoiceSettings) UnmarshalJSON ¶ added in v0.15.0
func (r *CustomerCreditTopUpNewResponseInvoiceSettings) UnmarshalJSON(data []byte) (err error)
type CustomerCreditTopUpService ¶ added in v0.15.0
type CustomerCreditTopUpService struct {
Options []option.RequestOption
}
CustomerCreditTopUpService contains methods and other services that help with interacting with the orb API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCustomerCreditTopUpService method instead.
func NewCustomerCreditTopUpService ¶ added in v0.15.0
func NewCustomerCreditTopUpService(opts ...option.RequestOption) (r *CustomerCreditTopUpService)
NewCustomerCreditTopUpService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*CustomerCreditTopUpService) Delete ¶ added in v0.15.0
func (r *CustomerCreditTopUpService) Delete(ctx context.Context, customerID string, topUpID string, opts ...option.RequestOption) (err error)
Delete top-up
func (*CustomerCreditTopUpService) DeleteByExternalID ¶ added in v0.15.0
func (r *CustomerCreditTopUpService) DeleteByExternalID(ctx context.Context, externalCustomerID string, topUpID string, opts ...option.RequestOption) (err error)
Delete top-up by external ID
func (*CustomerCreditTopUpService) List ¶ added in v0.15.0
func (r *CustomerCreditTopUpService) List(ctx context.Context, customerID string, query CustomerCreditTopUpListParams, opts ...option.RequestOption) (res *pagination.Page[CustomerCreditTopUpListResponse], err error)
List top-ups
func (*CustomerCreditTopUpService) ListAutoPaging ¶ added in v0.15.0
func (r *CustomerCreditTopUpService) ListAutoPaging(ctx context.Context, customerID string, query CustomerCreditTopUpListParams, opts ...option.RequestOption) *pagination.PageAutoPager[CustomerCreditTopUpListResponse]
List top-ups
func (*CustomerCreditTopUpService) ListByExternalID ¶ added in v0.15.0
func (r *CustomerCreditTopUpService) ListByExternalID(ctx context.Context, externalCustomerID string, query CustomerCreditTopUpListByExternalIDParams, opts ...option.RequestOption) (res *pagination.Page[CustomerCreditTopUpListByExternalIDResponse], err error)
List top-ups by external ID
func (*CustomerCreditTopUpService) ListByExternalIDAutoPaging ¶ added in v0.15.0
func (r *CustomerCreditTopUpService) ListByExternalIDAutoPaging(ctx context.Context, externalCustomerID string, query CustomerCreditTopUpListByExternalIDParams, opts ...option.RequestOption) *pagination.PageAutoPager[CustomerCreditTopUpListByExternalIDResponse]
List top-ups by external ID
func (*CustomerCreditTopUpService) New ¶ added in v0.15.0
func (r *CustomerCreditTopUpService) New(ctx context.Context, customerID string, body CustomerCreditTopUpNewParams, opts ...option.RequestOption) (res *CustomerCreditTopUpNewResponse, err error)
This endpoint allows you to create a new top-up for a specified customer's balance. While this top-up is active, the customer's balance will added in increments of the specified amount whenever the balance reaches the specified threshold.
If a top-up already exists for this customer in the same currency, the existing top-up will be replaced.
func (*CustomerCreditTopUpService) NewByExternalID ¶ added in v0.15.0
func (r *CustomerCreditTopUpService) NewByExternalID(ctx context.Context, externalCustomerID string, body CustomerCreditTopUpNewByExternalIDParams, opts ...option.RequestOption) (res *CustomerCreditTopUpNewByExternalIDResponse, err error)
This endpoint allows you to create a new top-up for a specified customer's balance. While this top-up is active, the customer's balance will added in increments of the specified amount whenever the balance reaches the specified threshold.
If a top-up already exists for this customer in the same currency, the existing top-up will be replaced.
type CustomerListParams ¶
type CustomerListParams struct { CreatedAtGt param.Field[time.Time] `query:"created_at[gt]" format:"date-time"` CreatedAtGte param.Field[time.Time] `query:"created_at[gte]" format:"date-time"` CreatedAtLt param.Field[time.Time] `query:"created_at[lt]" format:"date-time"` CreatedAtLte param.Field[time.Time] `query:"created_at[lte]" format:"date-time"` // Cursor for pagination. This can be populated by the `next_cursor` value returned // from the initial request. Cursor param.Field[string] `query:"cursor"` // The number of items to fetch. Defaults to 20. Limit param.Field[int64] `query:"limit"` }
func (CustomerListParams) URLQuery ¶
func (r CustomerListParams) URLQuery() (v url.Values)
URLQuery serializes CustomerListParams's query parameters as `url.Values`.
type CustomerNewParams ¶
type CustomerNewParams struct { // 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 param.Field[string] `json:"email,required"` // The full name of the customer Name param.Field[string] `json:"name,required"` AccountingSyncConfiguration param.Field[CustomerNewParamsAccountingSyncConfiguration] `json:"accounting_sync_configuration"` // Additional email addresses for this customer. If populated, these email // addresses will be CC'd for customer communications. AdditionalEmails param.Field[[]string] `json:"additional_emails"` // Used to determine if invoices for this customer will automatically attempt to // charge a saved payment method, if available. This parameter defaults to `True` // when a payment provider is provided on customer creation. AutoCollection param.Field[bool] `json:"auto_collection"` BillingAddress param.Field[CustomerNewParamsBillingAddress] `json:"billing_address"` // An ISO 4217 currency string used for the customer's invoices and balance. If not // set at creation time, will be set at subscription creation time. Currency param.Field[string] `json:"currency"` EmailDelivery param.Field[bool] `json:"email_delivery"` // 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 param.Field[string] `json:"external_customer_id"` // 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"` // 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 param.Field[CustomerNewParamsPaymentProvider] `json:"payment_provider"` // 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 param.Field[string] `json:"payment_provider_id"` ReportingConfiguration param.Field[CustomerNewParamsReportingConfiguration] `json:"reporting_configuration"` ShippingAddress param.Field[CustomerNewParamsShippingAddress] `json:"shipping_address"` // 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 param.Field[CustomerNewParamsTaxID] `json:"tax_id"` // 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 param.Field[string] `json:"timezone"` }
func (CustomerNewParams) MarshalJSON ¶
func (r CustomerNewParams) MarshalJSON() (data []byte, err error)
type CustomerNewParamsAccountingSyncConfiguration ¶
type CustomerNewParamsAccountingSyncConfiguration struct { AccountingProviders param.Field[[]CustomerNewParamsAccountingSyncConfigurationAccountingProvider] `json:"accounting_providers"` Excluded param.Field[bool] `json:"excluded"` }
func (CustomerNewParamsAccountingSyncConfiguration) MarshalJSON ¶
func (r CustomerNewParamsAccountingSyncConfiguration) MarshalJSON() (data []byte, err error)
type CustomerNewParamsAccountingSyncConfigurationAccountingProvider ¶
type CustomerNewParamsAccountingSyncConfigurationAccountingProvider struct { ExternalProviderID param.Field[string] `json:"external_provider_id,required"` ProviderType param.Field[string] `json:"provider_type,required"` }
func (CustomerNewParamsAccountingSyncConfigurationAccountingProvider) MarshalJSON ¶
func (r CustomerNewParamsAccountingSyncConfigurationAccountingProvider) MarshalJSON() (data []byte, err error)
type CustomerNewParamsBillingAddress ¶
type CustomerNewParamsBillingAddress 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 (CustomerNewParamsBillingAddress) MarshalJSON ¶
func (r CustomerNewParamsBillingAddress) MarshalJSON() (data []byte, err error)
type CustomerNewParamsPaymentProvider ¶
type CustomerNewParamsPaymentProvider 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 ( CustomerNewParamsPaymentProviderQuickbooks CustomerNewParamsPaymentProvider = "quickbooks" CustomerNewParamsPaymentProviderBillCom CustomerNewParamsPaymentProvider = "bill.com" CustomerNewParamsPaymentProviderStripeCharge CustomerNewParamsPaymentProvider = "stripe_charge" CustomerNewParamsPaymentProviderStripeInvoice CustomerNewParamsPaymentProvider = "stripe_invoice" CustomerNewParamsPaymentProviderNetsuite CustomerNewParamsPaymentProvider = "netsuite" )
func (CustomerNewParamsPaymentProvider) IsKnown ¶ added in v0.24.0
func (r CustomerNewParamsPaymentProvider) IsKnown() bool
type CustomerNewParamsReportingConfiguration ¶
type CustomerNewParamsReportingConfiguration struct {
Exempt param.Field[bool] `json:"exempt,required"`
}
func (CustomerNewParamsReportingConfiguration) MarshalJSON ¶
func (r CustomerNewParamsReportingConfiguration) MarshalJSON() (data []byte, err error)
type CustomerNewParamsShippingAddress ¶
type CustomerNewParamsShippingAddress 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 (CustomerNewParamsShippingAddress) MarshalJSON ¶
func (r CustomerNewParamsShippingAddress) MarshalJSON() (data []byte, err error)
type CustomerNewParamsTaxID ¶
type CustomerNewParamsTaxID struct { Country param.Field[CustomerNewParamsTaxIDCountry] `json:"country,required"` Type param.Field[CustomerNewParamsTaxIDType] `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 (CustomerNewParamsTaxID) MarshalJSON ¶
func (r CustomerNewParamsTaxID) MarshalJSON() (data []byte, err error)
type CustomerNewParamsTaxIDCountry ¶ added in v0.2.0
type CustomerNewParamsTaxIDCountry string
const ( CustomerNewParamsTaxIDCountryAd CustomerNewParamsTaxIDCountry = "AD" CustomerNewParamsTaxIDCountryAe CustomerNewParamsTaxIDCountry = "AE" CustomerNewParamsTaxIDCountryAr CustomerNewParamsTaxIDCountry = "AR" CustomerNewParamsTaxIDCountryAt CustomerNewParamsTaxIDCountry = "AT" CustomerNewParamsTaxIDCountryAu CustomerNewParamsTaxIDCountry = "AU" CustomerNewParamsTaxIDCountryBe CustomerNewParamsTaxIDCountry = "BE" CustomerNewParamsTaxIDCountryBg CustomerNewParamsTaxIDCountry = "BG" CustomerNewParamsTaxIDCountryBh CustomerNewParamsTaxIDCountry = "BH" CustomerNewParamsTaxIDCountryBo CustomerNewParamsTaxIDCountry = "BO" CustomerNewParamsTaxIDCountryBr CustomerNewParamsTaxIDCountry = "BR" CustomerNewParamsTaxIDCountryCa CustomerNewParamsTaxIDCountry = "CA" CustomerNewParamsTaxIDCountryCh CustomerNewParamsTaxIDCountry = "CH" CustomerNewParamsTaxIDCountryCl CustomerNewParamsTaxIDCountry = "CL" CustomerNewParamsTaxIDCountryCn CustomerNewParamsTaxIDCountry = "CN" CustomerNewParamsTaxIDCountryCo CustomerNewParamsTaxIDCountry = "CO" CustomerNewParamsTaxIDCountryCr CustomerNewParamsTaxIDCountry = "CR" CustomerNewParamsTaxIDCountryCy CustomerNewParamsTaxIDCountry = "CY" CustomerNewParamsTaxIDCountryCz CustomerNewParamsTaxIDCountry = "CZ" CustomerNewParamsTaxIDCountryDe CustomerNewParamsTaxIDCountry = "DE" CustomerNewParamsTaxIDCountryDk CustomerNewParamsTaxIDCountry = "DK" CustomerNewParamsTaxIDCountryEe CustomerNewParamsTaxIDCountry = "EE" CustomerNewParamsTaxIDCountryDo CustomerNewParamsTaxIDCountry = "DO" CustomerNewParamsTaxIDCountryEc CustomerNewParamsTaxIDCountry = "EC" CustomerNewParamsTaxIDCountryEg CustomerNewParamsTaxIDCountry = "EG" CustomerNewParamsTaxIDCountryEs CustomerNewParamsTaxIDCountry = "ES" CustomerNewParamsTaxIDCountryEu CustomerNewParamsTaxIDCountry = "EU" CustomerNewParamsTaxIDCountryFi CustomerNewParamsTaxIDCountry = "FI" CustomerNewParamsTaxIDCountryFr CustomerNewParamsTaxIDCountry = "FR" CustomerNewParamsTaxIDCountryGB CustomerNewParamsTaxIDCountry = "GB" CustomerNewParamsTaxIDCountryGe CustomerNewParamsTaxIDCountry = "GE" CustomerNewParamsTaxIDCountryGr CustomerNewParamsTaxIDCountry = "GR" CustomerNewParamsTaxIDCountryHk CustomerNewParamsTaxIDCountry = "HK" CustomerNewParamsTaxIDCountryHr CustomerNewParamsTaxIDCountry = "HR" CustomerNewParamsTaxIDCountryHu CustomerNewParamsTaxIDCountry = "HU" CustomerNewParamsTaxIDCountryID CustomerNewParamsTaxIDCountry = "ID" CustomerNewParamsTaxIDCountryIe CustomerNewParamsTaxIDCountry = "IE" CustomerNewParamsTaxIDCountryIl CustomerNewParamsTaxIDCountry = "IL" CustomerNewParamsTaxIDCountryIn CustomerNewParamsTaxIDCountry = "IN" CustomerNewParamsTaxIDCountryIs CustomerNewParamsTaxIDCountry = "IS" CustomerNewParamsTaxIDCountryIt CustomerNewParamsTaxIDCountry = "IT" CustomerNewParamsTaxIDCountryJp CustomerNewParamsTaxIDCountry = "JP" CustomerNewParamsTaxIDCountryKe CustomerNewParamsTaxIDCountry = "KE" CustomerNewParamsTaxIDCountryKr CustomerNewParamsTaxIDCountry = "KR" CustomerNewParamsTaxIDCountryKz CustomerNewParamsTaxIDCountry = "KZ" CustomerNewParamsTaxIDCountryLi CustomerNewParamsTaxIDCountry = "LI" CustomerNewParamsTaxIDCountryLt CustomerNewParamsTaxIDCountry = "LT" CustomerNewParamsTaxIDCountryLu CustomerNewParamsTaxIDCountry = "LU" CustomerNewParamsTaxIDCountryLv CustomerNewParamsTaxIDCountry = "LV" CustomerNewParamsTaxIDCountryMt CustomerNewParamsTaxIDCountry = "MT" CustomerNewParamsTaxIDCountryMx CustomerNewParamsTaxIDCountry = "MX" CustomerNewParamsTaxIDCountryMy CustomerNewParamsTaxIDCountry = "MY" CustomerNewParamsTaxIDCountryNg CustomerNewParamsTaxIDCountry = "NG" CustomerNewParamsTaxIDCountryNl CustomerNewParamsTaxIDCountry = "NL" CustomerNewParamsTaxIDCountryNo CustomerNewParamsTaxIDCountry = "NO" CustomerNewParamsTaxIDCountryNz CustomerNewParamsTaxIDCountry = "NZ" CustomerNewParamsTaxIDCountryOm CustomerNewParamsTaxIDCountry = "OM" CustomerNewParamsTaxIDCountryPe CustomerNewParamsTaxIDCountry = "PE" CustomerNewParamsTaxIDCountryPh CustomerNewParamsTaxIDCountry = "PH" CustomerNewParamsTaxIDCountryPl CustomerNewParamsTaxIDCountry = "PL" CustomerNewParamsTaxIDCountryPt CustomerNewParamsTaxIDCountry = "PT" CustomerNewParamsTaxIDCountryRo CustomerNewParamsTaxIDCountry = "RO" CustomerNewParamsTaxIDCountryRs CustomerNewParamsTaxIDCountry = "RS" CustomerNewParamsTaxIDCountryRu CustomerNewParamsTaxIDCountry = "RU" CustomerNewParamsTaxIDCountrySa CustomerNewParamsTaxIDCountry = "SA" CustomerNewParamsTaxIDCountrySe CustomerNewParamsTaxIDCountry = "SE" CustomerNewParamsTaxIDCountrySg CustomerNewParamsTaxIDCountry = "SG" CustomerNewParamsTaxIDCountrySi CustomerNewParamsTaxIDCountry = "SI" CustomerNewParamsTaxIDCountrySk CustomerNewParamsTaxIDCountry = "SK" CustomerNewParamsTaxIDCountrySv CustomerNewParamsTaxIDCountry = "SV" CustomerNewParamsTaxIDCountryTh CustomerNewParamsTaxIDCountry = "TH" CustomerNewParamsTaxIDCountryTr CustomerNewParamsTaxIDCountry = "TR" CustomerNewParamsTaxIDCountryTw CustomerNewParamsTaxIDCountry = "TW" CustomerNewParamsTaxIDCountryUa CustomerNewParamsTaxIDCountry = "UA" CustomerNewParamsTaxIDCountryUs CustomerNewParamsTaxIDCountry = "US" CustomerNewParamsTaxIDCountryUy CustomerNewParamsTaxIDCountry = "UY" CustomerNewParamsTaxIDCountryVe CustomerNewParamsTaxIDCountry = "VE" CustomerNewParamsTaxIDCountryVn CustomerNewParamsTaxIDCountry = "VN" CustomerNewParamsTaxIDCountryZa CustomerNewParamsTaxIDCountry = "ZA" )
func (CustomerNewParamsTaxIDCountry) IsKnown ¶ added in v0.24.0
func (r CustomerNewParamsTaxIDCountry) IsKnown() bool
type CustomerNewParamsTaxIDType ¶ added in v0.2.0
type CustomerNewParamsTaxIDType string
const ( CustomerNewParamsTaxIDTypeAdNrt CustomerNewParamsTaxIDType = "ad_nrt" CustomerNewParamsTaxIDTypeAeTrn CustomerNewParamsTaxIDType = "ae_trn" CustomerNewParamsTaxIDTypeArCuit CustomerNewParamsTaxIDType = "ar_cuit" CustomerNewParamsTaxIDTypeEuVat CustomerNewParamsTaxIDType = "eu_vat" CustomerNewParamsTaxIDTypeAuAbn CustomerNewParamsTaxIDType = "au_abn" CustomerNewParamsTaxIDTypeAuArn CustomerNewParamsTaxIDType = "au_arn" CustomerNewParamsTaxIDTypeBgUic CustomerNewParamsTaxIDType = "bg_uic" CustomerNewParamsTaxIDTypeBhVat CustomerNewParamsTaxIDType = "bh_vat" CustomerNewParamsTaxIDTypeBoTin CustomerNewParamsTaxIDType = "bo_tin" CustomerNewParamsTaxIDTypeBrCnpj CustomerNewParamsTaxIDType = "br_cnpj" CustomerNewParamsTaxIDTypeBrCpf CustomerNewParamsTaxIDType = "br_cpf" CustomerNewParamsTaxIDTypeCaBn CustomerNewParamsTaxIDType = "ca_bn" CustomerNewParamsTaxIDTypeCaGstHst CustomerNewParamsTaxIDType = "ca_gst_hst" CustomerNewParamsTaxIDTypeCaPstBc CustomerNewParamsTaxIDType = "ca_pst_bc" CustomerNewParamsTaxIDTypeCaPstMB CustomerNewParamsTaxIDType = "ca_pst_mb" CustomerNewParamsTaxIDTypeCaPstSk CustomerNewParamsTaxIDType = "ca_pst_sk" CustomerNewParamsTaxIDTypeCaQst CustomerNewParamsTaxIDType = "ca_qst" CustomerNewParamsTaxIDTypeChVat CustomerNewParamsTaxIDType = "ch_vat" CustomerNewParamsTaxIDTypeClTin CustomerNewParamsTaxIDType = "cl_tin" CustomerNewParamsTaxIDTypeCnTin CustomerNewParamsTaxIDType = "cn_tin" CustomerNewParamsTaxIDTypeCoNit CustomerNewParamsTaxIDType = "co_nit" CustomerNewParamsTaxIDTypeCrTin CustomerNewParamsTaxIDType = "cr_tin" CustomerNewParamsTaxIDTypeDoRcn CustomerNewParamsTaxIDType = "do_rcn" CustomerNewParamsTaxIDTypeEcRuc CustomerNewParamsTaxIDType = "ec_ruc" CustomerNewParamsTaxIDTypeEgTin CustomerNewParamsTaxIDType = "eg_tin" CustomerNewParamsTaxIDTypeEsCif CustomerNewParamsTaxIDType = "es_cif" CustomerNewParamsTaxIDTypeEuOssVat CustomerNewParamsTaxIDType = "eu_oss_vat" CustomerNewParamsTaxIDTypeGBVat CustomerNewParamsTaxIDType = "gb_vat" CustomerNewParamsTaxIDTypeGeVat CustomerNewParamsTaxIDType = "ge_vat" CustomerNewParamsTaxIDTypeHkBr CustomerNewParamsTaxIDType = "hk_br" CustomerNewParamsTaxIDTypeHuTin CustomerNewParamsTaxIDType = "hu_tin" CustomerNewParamsTaxIDTypeIDNpwp CustomerNewParamsTaxIDType = "id_npwp" CustomerNewParamsTaxIDTypeIlVat CustomerNewParamsTaxIDType = "il_vat" CustomerNewParamsTaxIDTypeInGst CustomerNewParamsTaxIDType = "in_gst" CustomerNewParamsTaxIDTypeIsVat CustomerNewParamsTaxIDType = "is_vat" CustomerNewParamsTaxIDTypeJpCn CustomerNewParamsTaxIDType = "jp_cn" CustomerNewParamsTaxIDTypeJpRn CustomerNewParamsTaxIDType = "jp_rn" CustomerNewParamsTaxIDTypeJpTrn CustomerNewParamsTaxIDType = "jp_trn" CustomerNewParamsTaxIDTypeKePin CustomerNewParamsTaxIDType = "ke_pin" CustomerNewParamsTaxIDTypeKrBrn CustomerNewParamsTaxIDType = "kr_brn" CustomerNewParamsTaxIDTypeKzBin CustomerNewParamsTaxIDType = "kz_bin" CustomerNewParamsTaxIDTypeLiUid CustomerNewParamsTaxIDType = "li_uid" CustomerNewParamsTaxIDTypeMxRfc CustomerNewParamsTaxIDType = "mx_rfc" CustomerNewParamsTaxIDTypeMyFrp CustomerNewParamsTaxIDType = "my_frp" CustomerNewParamsTaxIDTypeMyItn CustomerNewParamsTaxIDType = "my_itn" CustomerNewParamsTaxIDTypeMySst CustomerNewParamsTaxIDType = "my_sst" CustomerNewParamsTaxIDTypeNgTin CustomerNewParamsTaxIDType = "ng_tin" CustomerNewParamsTaxIDTypeNoVat CustomerNewParamsTaxIDType = "no_vat" CustomerNewParamsTaxIDTypeNoVoec CustomerNewParamsTaxIDType = "no_voec" CustomerNewParamsTaxIDTypeNzGst CustomerNewParamsTaxIDType = "nz_gst" CustomerNewParamsTaxIDTypeOmVat CustomerNewParamsTaxIDType = "om_vat" CustomerNewParamsTaxIDTypePeRuc CustomerNewParamsTaxIDType = "pe_ruc" CustomerNewParamsTaxIDTypePhTin CustomerNewParamsTaxIDType = "ph_tin" CustomerNewParamsTaxIDTypeRoTin CustomerNewParamsTaxIDType = "ro_tin" CustomerNewParamsTaxIDTypeRsPib CustomerNewParamsTaxIDType = "rs_pib" CustomerNewParamsTaxIDTypeRuInn CustomerNewParamsTaxIDType = "ru_inn" CustomerNewParamsTaxIDTypeRuKpp CustomerNewParamsTaxIDType = "ru_kpp" CustomerNewParamsTaxIDTypeSaVat CustomerNewParamsTaxIDType = "sa_vat" CustomerNewParamsTaxIDTypeSgGst CustomerNewParamsTaxIDType = "sg_gst" CustomerNewParamsTaxIDTypeSgUen CustomerNewParamsTaxIDType = "sg_uen" CustomerNewParamsTaxIDTypeSiTin CustomerNewParamsTaxIDType = "si_tin" CustomerNewParamsTaxIDTypeSvNit CustomerNewParamsTaxIDType = "sv_nit" CustomerNewParamsTaxIDTypeThVat CustomerNewParamsTaxIDType = "th_vat" CustomerNewParamsTaxIDTypeTrTin CustomerNewParamsTaxIDType = "tr_tin" CustomerNewParamsTaxIDTypeTwVat CustomerNewParamsTaxIDType = "tw_vat" CustomerNewParamsTaxIDTypeUaVat CustomerNewParamsTaxIDType = "ua_vat" CustomerNewParamsTaxIDTypeUsEin CustomerNewParamsTaxIDType = "us_ein" CustomerNewParamsTaxIDTypeUyRuc CustomerNewParamsTaxIDType = "uy_ruc" CustomerNewParamsTaxIDTypeVeRif CustomerNewParamsTaxIDType = "ve_rif" CustomerNewParamsTaxIDTypeVnTin CustomerNewParamsTaxIDType = "vn_tin" CustomerNewParamsTaxIDTypeZaVat CustomerNewParamsTaxIDType = "za_vat" )
func (CustomerNewParamsTaxIDType) IsKnown ¶ added in v0.24.0
func (r CustomerNewParamsTaxIDType) IsKnown() bool
type CustomerPaymentProvider ¶
type CustomerPaymentProvider 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 ( CustomerPaymentProviderQuickbooks CustomerPaymentProvider = "quickbooks" CustomerPaymentProviderBillCom CustomerPaymentProvider = "bill.com" CustomerPaymentProviderStripeCharge CustomerPaymentProvider = "stripe_charge" CustomerPaymentProviderStripeInvoice CustomerPaymentProvider = "stripe_invoice" CustomerPaymentProviderNetsuite CustomerPaymentProvider = "netsuite" )
func (CustomerPaymentProvider) IsKnown ¶ added in v0.24.0
func (r CustomerPaymentProvider) IsKnown() bool
type CustomerReportingConfiguration ¶
type CustomerReportingConfiguration struct { Exempt bool `json:"exempt,required"` JSON customerReportingConfigurationJSON `json:"-"` }
func (*CustomerReportingConfiguration) UnmarshalJSON ¶
func (r *CustomerReportingConfiguration) UnmarshalJSON(data []byte) (err error)
type CustomerService ¶
type CustomerService struct { Options []option.RequestOption Costs *CustomerCostService Credits *CustomerCreditService BalanceTransactions *CustomerBalanceTransactionService }
CustomerService contains methods and other services that help with interacting with the orb API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCustomerService method instead.
func NewCustomerService ¶
func NewCustomerService(opts ...option.RequestOption) (r *CustomerService)
NewCustomerService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*CustomerService) Delete ¶
func (r *CustomerService) Delete(ctx context.Context, customerID string, opts ...option.RequestOption) (err error)
This performs a deletion of this customer, its subscriptions, and its invoices, provided the customer does not have any issued invoices. Customers with issued invoices cannot be deleted. This operation is irreversible. Note that this is a _soft_ deletion, but the data will be inaccessible through the API and Orb dashboard. For a hard-deletion, please reach out to the Orb team directly.
**Note**: This operation happens asynchronously and can be expected to take a few minutes to propagate to related resources. However, querying for the customer on subsequent GET requests while deletion is in process will reflect its deletion with a `deleted: true` property. Once the customer deletion has been fully processed, the customer will not be returned in the API.
On successful processing, this returns an empty dictionary (`{}`) in the API.
func (*CustomerService) Fetch ¶
func (r *CustomerService) Fetch(ctx context.Context, customerID string, opts ...option.RequestOption) (res *Customer, err error)
This endpoint is used to fetch customer details given an identifier. If the `Customer` is in the process of being deleted, only the properties `id` and `deleted: true` will be returned.
See the [Customer resource](../guides/core-concepts.mdx#customer) for a full discussion of the Customer model.
func (*CustomerService) FetchByExternalID ¶
func (r *CustomerService) FetchByExternalID(ctx context.Context, externalCustomerID string, opts ...option.RequestOption) (res *Customer, err error)
This endpoint is used to fetch customer details given an `external_customer_id` (see [Customer ID Aliases](../guides/events-and-metrics/customer-aliases)).
Note that the resource and semantics of this endpoint exactly mirror [Get Customer](fetch-customer).
func (*CustomerService) List ¶
func (r *CustomerService) List(ctx context.Context, query CustomerListParams, opts ...option.RequestOption) (res *pagination.Page[Customer], err error)
This endpoint returns a list of all customers for an account. The list of customers is ordered starting from the most recently created customer. This endpoint follows Orb's [standardized pagination format](../reference/pagination).
See Customer(../guides/concepts#customer) for an overview of the customer model.
func (*CustomerService) ListAutoPaging ¶
func (r *CustomerService) ListAutoPaging(ctx context.Context, query CustomerListParams, opts ...option.RequestOption) *pagination.PageAutoPager[Customer]
This endpoint returns a list of all customers for an account. The list of customers is ordered starting from the most recently created customer. This endpoint follows Orb's [standardized pagination format](../reference/pagination).
See Customer(../guides/concepts#customer) for an overview of the customer model.
func (*CustomerService) New ¶
func (r *CustomerService) New(ctx context.Context, body CustomerNewParams, opts ...option.RequestOption) (res *Customer, err error)
This operation is used to create an Orb customer, who is party to the core billing relationship. See Customer(../guides/concepts#customer) for an overview of the customer resource.
This endpoint is critical in the following Orb functionality:
- Automated charges can be configured by setting `payment_provider` and `payment_provider_id` to automatically issue invoices
- [Customer ID Aliases](../guides/events-and-metrics/customer-aliases) can be configured by setting `external_customer_id`
- [Timezone localization](../guides/product-catalog/timezones.md) can be configured on a per-customer basis by setting the `timezone` parameter
func (*CustomerService) Update ¶
func (r *CustomerService) Update(ctx context.Context, customerID string, body CustomerUpdateParams, opts ...option.RequestOption) (res *Customer, err error)
This endpoint can be used to update the `payment_provider`, `payment_provider_id`, `name`, `email`, `email_delivery`, `tax_id`, `auto_collection`, `metadata`, `shipping_address`, `billing_address`, and `additional_emails` of an existing customer. Other fields on a customer are currently immutable.
func (*CustomerService) UpdateByExternalID ¶
func (r *CustomerService) UpdateByExternalID(ctx context.Context, id string, body CustomerUpdateByExternalIDParams, opts ...option.RequestOption) (res *Customer, err error)
This endpoint is used to update customer details given an `external_customer_id` (see [Customer ID Aliases](../guides/events-and-metrics/customer-aliases)). Note that the resource and semantics of this endpoint exactly mirror [Update Customer](update-customer).
type CustomerShippingAddress ¶
type CustomerShippingAddress 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 customerShippingAddressJSON `json:"-"` }
func (*CustomerShippingAddress) UnmarshalJSON ¶
func (r *CustomerShippingAddress) UnmarshalJSON(data []byte) (err error)
type CustomerTaxID ¶
type CustomerTaxID struct { Country CustomerTaxIDCountry `json:"country,required"` Type CustomerTaxIDType `json:"type,required"` Value string `json:"value,required"` JSON customerTaxIDJSON `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 (*CustomerTaxID) UnmarshalJSON ¶
func (r *CustomerTaxID) UnmarshalJSON(data []byte) (err error)
type CustomerTaxIDCountry ¶ added in v0.2.0
type CustomerTaxIDCountry string
const ( CustomerTaxIDCountryAd CustomerTaxIDCountry = "AD" CustomerTaxIDCountryAe CustomerTaxIDCountry = "AE" CustomerTaxIDCountryAr CustomerTaxIDCountry = "AR" CustomerTaxIDCountryAt CustomerTaxIDCountry = "AT" CustomerTaxIDCountryAu CustomerTaxIDCountry = "AU" CustomerTaxIDCountryBe CustomerTaxIDCountry = "BE" CustomerTaxIDCountryBg CustomerTaxIDCountry = "BG" CustomerTaxIDCountryBh CustomerTaxIDCountry = "BH" CustomerTaxIDCountryBo CustomerTaxIDCountry = "BO" CustomerTaxIDCountryBr CustomerTaxIDCountry = "BR" CustomerTaxIDCountryCa CustomerTaxIDCountry = "CA" CustomerTaxIDCountryCh CustomerTaxIDCountry = "CH" CustomerTaxIDCountryCl CustomerTaxIDCountry = "CL" CustomerTaxIDCountryCn CustomerTaxIDCountry = "CN" CustomerTaxIDCountryCo CustomerTaxIDCountry = "CO" CustomerTaxIDCountryCr CustomerTaxIDCountry = "CR" CustomerTaxIDCountryCy CustomerTaxIDCountry = "CY" CustomerTaxIDCountryCz CustomerTaxIDCountry = "CZ" CustomerTaxIDCountryDe CustomerTaxIDCountry = "DE" CustomerTaxIDCountryDk CustomerTaxIDCountry = "DK" CustomerTaxIDCountryEe CustomerTaxIDCountry = "EE" CustomerTaxIDCountryDo CustomerTaxIDCountry = "DO" CustomerTaxIDCountryEc CustomerTaxIDCountry = "EC" CustomerTaxIDCountryEg CustomerTaxIDCountry = "EG" CustomerTaxIDCountryEs CustomerTaxIDCountry = "ES" CustomerTaxIDCountryEu CustomerTaxIDCountry = "EU" CustomerTaxIDCountryFi CustomerTaxIDCountry = "FI" CustomerTaxIDCountryFr CustomerTaxIDCountry = "FR" CustomerTaxIDCountryGB CustomerTaxIDCountry = "GB" CustomerTaxIDCountryGe CustomerTaxIDCountry = "GE" CustomerTaxIDCountryGr CustomerTaxIDCountry = "GR" CustomerTaxIDCountryHk CustomerTaxIDCountry = "HK" CustomerTaxIDCountryHr CustomerTaxIDCountry = "HR" CustomerTaxIDCountryHu CustomerTaxIDCountry = "HU" CustomerTaxIDCountryID CustomerTaxIDCountry = "ID" CustomerTaxIDCountryIe CustomerTaxIDCountry = "IE" CustomerTaxIDCountryIl CustomerTaxIDCountry = "IL" CustomerTaxIDCountryIn CustomerTaxIDCountry = "IN" CustomerTaxIDCountryIs CustomerTaxIDCountry = "IS" CustomerTaxIDCountryIt CustomerTaxIDCountry = "IT" CustomerTaxIDCountryJp CustomerTaxIDCountry = "JP" CustomerTaxIDCountryKe CustomerTaxIDCountry = "KE" CustomerTaxIDCountryKr CustomerTaxIDCountry = "KR" CustomerTaxIDCountryKz CustomerTaxIDCountry = "KZ" CustomerTaxIDCountryLi CustomerTaxIDCountry = "LI" CustomerTaxIDCountryLt CustomerTaxIDCountry = "LT" CustomerTaxIDCountryLu CustomerTaxIDCountry = "LU" CustomerTaxIDCountryLv CustomerTaxIDCountry = "LV" CustomerTaxIDCountryMt CustomerTaxIDCountry = "MT" CustomerTaxIDCountryMx CustomerTaxIDCountry = "MX" CustomerTaxIDCountryMy CustomerTaxIDCountry = "MY" CustomerTaxIDCountryNg CustomerTaxIDCountry = "NG" CustomerTaxIDCountryNl CustomerTaxIDCountry = "NL" CustomerTaxIDCountryNo CustomerTaxIDCountry = "NO" CustomerTaxIDCountryNz CustomerTaxIDCountry = "NZ" CustomerTaxIDCountryOm CustomerTaxIDCountry = "OM" CustomerTaxIDCountryPe CustomerTaxIDCountry = "PE" CustomerTaxIDCountryPh CustomerTaxIDCountry = "PH" CustomerTaxIDCountryPl CustomerTaxIDCountry = "PL" CustomerTaxIDCountryPt CustomerTaxIDCountry = "PT" CustomerTaxIDCountryRo CustomerTaxIDCountry = "RO" CustomerTaxIDCountryRs CustomerTaxIDCountry = "RS" CustomerTaxIDCountryRu CustomerTaxIDCountry = "RU" CustomerTaxIDCountrySa CustomerTaxIDCountry = "SA" CustomerTaxIDCountrySe CustomerTaxIDCountry = "SE" CustomerTaxIDCountrySg CustomerTaxIDCountry = "SG" CustomerTaxIDCountrySi CustomerTaxIDCountry = "SI" CustomerTaxIDCountrySk CustomerTaxIDCountry = "SK" CustomerTaxIDCountrySv CustomerTaxIDCountry = "SV" CustomerTaxIDCountryTh CustomerTaxIDCountry = "TH" CustomerTaxIDCountryTr CustomerTaxIDCountry = "TR" CustomerTaxIDCountryTw CustomerTaxIDCountry = "TW" CustomerTaxIDCountryUa CustomerTaxIDCountry = "UA" CustomerTaxIDCountryUs CustomerTaxIDCountry = "US" CustomerTaxIDCountryUy CustomerTaxIDCountry = "UY" CustomerTaxIDCountryVe CustomerTaxIDCountry = "VE" CustomerTaxIDCountryVn CustomerTaxIDCountry = "VN" CustomerTaxIDCountryZa CustomerTaxIDCountry = "ZA" )
func (CustomerTaxIDCountry) IsKnown ¶ added in v0.24.0
func (r CustomerTaxIDCountry) IsKnown() bool
type CustomerTaxIDType ¶ added in v0.2.0
type CustomerTaxIDType string
const ( CustomerTaxIDTypeAdNrt CustomerTaxIDType = "ad_nrt" CustomerTaxIDTypeAeTrn CustomerTaxIDType = "ae_trn" CustomerTaxIDTypeArCuit CustomerTaxIDType = "ar_cuit" CustomerTaxIDTypeEuVat CustomerTaxIDType = "eu_vat" CustomerTaxIDTypeAuAbn CustomerTaxIDType = "au_abn" CustomerTaxIDTypeAuArn CustomerTaxIDType = "au_arn" CustomerTaxIDTypeBgUic CustomerTaxIDType = "bg_uic" CustomerTaxIDTypeBhVat CustomerTaxIDType = "bh_vat" CustomerTaxIDTypeBoTin CustomerTaxIDType = "bo_tin" CustomerTaxIDTypeBrCnpj CustomerTaxIDType = "br_cnpj" CustomerTaxIDTypeBrCpf CustomerTaxIDType = "br_cpf" CustomerTaxIDTypeCaBn CustomerTaxIDType = "ca_bn" CustomerTaxIDTypeCaGstHst CustomerTaxIDType = "ca_gst_hst" CustomerTaxIDTypeCaPstBc CustomerTaxIDType = "ca_pst_bc" CustomerTaxIDTypeCaPstMB CustomerTaxIDType = "ca_pst_mb" CustomerTaxIDTypeCaPstSk CustomerTaxIDType = "ca_pst_sk" CustomerTaxIDTypeCaQst CustomerTaxIDType = "ca_qst" CustomerTaxIDTypeChVat CustomerTaxIDType = "ch_vat" CustomerTaxIDTypeClTin CustomerTaxIDType = "cl_tin" CustomerTaxIDTypeCnTin CustomerTaxIDType = "cn_tin" CustomerTaxIDTypeCoNit CustomerTaxIDType = "co_nit" CustomerTaxIDTypeCrTin CustomerTaxIDType = "cr_tin" CustomerTaxIDTypeDoRcn CustomerTaxIDType = "do_rcn" CustomerTaxIDTypeEcRuc CustomerTaxIDType = "ec_ruc" CustomerTaxIDTypeEgTin CustomerTaxIDType = "eg_tin" CustomerTaxIDTypeEsCif CustomerTaxIDType = "es_cif" CustomerTaxIDTypeEuOssVat CustomerTaxIDType = "eu_oss_vat" CustomerTaxIDTypeGBVat CustomerTaxIDType = "gb_vat" CustomerTaxIDTypeGeVat CustomerTaxIDType = "ge_vat" CustomerTaxIDTypeHkBr CustomerTaxIDType = "hk_br" CustomerTaxIDTypeHuTin CustomerTaxIDType = "hu_tin" CustomerTaxIDTypeIDNpwp CustomerTaxIDType = "id_npwp" CustomerTaxIDTypeIlVat CustomerTaxIDType = "il_vat" CustomerTaxIDTypeInGst CustomerTaxIDType = "in_gst" CustomerTaxIDTypeIsVat CustomerTaxIDType = "is_vat" CustomerTaxIDTypeJpCn CustomerTaxIDType = "jp_cn" CustomerTaxIDTypeJpRn CustomerTaxIDType = "jp_rn" CustomerTaxIDTypeJpTrn CustomerTaxIDType = "jp_trn" CustomerTaxIDTypeKePin CustomerTaxIDType = "ke_pin" CustomerTaxIDTypeKrBrn CustomerTaxIDType = "kr_brn" CustomerTaxIDTypeKzBin CustomerTaxIDType = "kz_bin" CustomerTaxIDTypeLiUid CustomerTaxIDType = "li_uid" CustomerTaxIDTypeMxRfc CustomerTaxIDType = "mx_rfc" CustomerTaxIDTypeMyFrp CustomerTaxIDType = "my_frp" CustomerTaxIDTypeMyItn CustomerTaxIDType = "my_itn" CustomerTaxIDTypeMySst CustomerTaxIDType = "my_sst" CustomerTaxIDTypeNgTin CustomerTaxIDType = "ng_tin" CustomerTaxIDTypeNoVat CustomerTaxIDType = "no_vat" CustomerTaxIDTypeNoVoec CustomerTaxIDType = "no_voec" CustomerTaxIDTypeNzGst CustomerTaxIDType = "nz_gst" CustomerTaxIDTypeOmVat CustomerTaxIDType = "om_vat" CustomerTaxIDTypePeRuc CustomerTaxIDType = "pe_ruc" CustomerTaxIDTypePhTin CustomerTaxIDType = "ph_tin" CustomerTaxIDTypeRoTin CustomerTaxIDType = "ro_tin" CustomerTaxIDTypeRsPib CustomerTaxIDType = "rs_pib" CustomerTaxIDTypeRuInn CustomerTaxIDType = "ru_inn" CustomerTaxIDTypeRuKpp CustomerTaxIDType = "ru_kpp" CustomerTaxIDTypeSaVat CustomerTaxIDType = "sa_vat" CustomerTaxIDTypeSgGst CustomerTaxIDType = "sg_gst" CustomerTaxIDTypeSgUen CustomerTaxIDType = "sg_uen" CustomerTaxIDTypeSiTin CustomerTaxIDType = "si_tin" CustomerTaxIDTypeSvNit CustomerTaxIDType = "sv_nit" CustomerTaxIDTypeThVat CustomerTaxIDType = "th_vat" CustomerTaxIDTypeTrTin CustomerTaxIDType = "tr_tin" CustomerTaxIDTypeTwVat CustomerTaxIDType = "tw_vat" CustomerTaxIDTypeUaVat CustomerTaxIDType = "ua_vat" CustomerTaxIDTypeUsEin CustomerTaxIDType = "us_ein" CustomerTaxIDTypeUyRuc CustomerTaxIDType = "uy_ruc" CustomerTaxIDTypeVeRif CustomerTaxIDType = "ve_rif" CustomerTaxIDTypeVnTin CustomerTaxIDType = "vn_tin" CustomerTaxIDTypeZaVat CustomerTaxIDType = "za_vat" )
func (CustomerTaxIDType) IsKnown ¶ added in v0.24.0
func (r CustomerTaxIDType) IsKnown() bool
type CustomerUpdateByExternalIDParams ¶
type CustomerUpdateByExternalIDParams struct { AccountingSyncConfiguration param.Field[CustomerUpdateByExternalIDParamsAccountingSyncConfiguration] `json:"accounting_sync_configuration"` // Additional email addresses for this customer. If populated, these email // addresses will be CC'd for customer communications. AdditionalEmails param.Field[[]string] `json:"additional_emails"` // Used to determine if invoices for this customer will automatically attempt to // charge a saved payment method, if available. This parameter defaults to `True` // when a payment provider is provided on customer creation. AutoCollection param.Field[bool] `json:"auto_collection"` BillingAddress param.Field[CustomerUpdateByExternalIDParamsBillingAddress] `json:"billing_address"` // An ISO 4217 currency string used for the customer's invoices and balance. If not // set at creation time, will be set at subscription creation time. Currency param.Field[string] `json:"currency"` // A valid customer email, to be used for invoicing and notifications. Email param.Field[string] `json:"email"` EmailDelivery param.Field[bool] `json:"email_delivery"` // The external customer ID. This can only be set if empty and the customer has no // past or current subscriptions. ExternalCustomerID param.Field[string] `json:"external_customer_id"` // 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"` // The full name of the customer Name param.Field[string] `json:"name"` // 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. // - if the provider is an invoicing provider (`stripe_invoice`, `quickbooks`, // `bill.com`, `netsuite`), any product mappings must first be configured with // the Orb team. PaymentProvider param.Field[CustomerUpdateByExternalIDParamsPaymentProvider] `json:"payment_provider"` // 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 param.Field[string] `json:"payment_provider_id"` ReportingConfiguration param.Field[CustomerUpdateByExternalIDParamsReportingConfiguration] `json:"reporting_configuration"` ShippingAddress param.Field[CustomerUpdateByExternalIDParamsShippingAddress] `json:"shipping_address"` TaxConfiguration param.Field[CustomerUpdateByExternalIDParamsTaxConfigurationUnion] `json:"tax_configuration"` // 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 param.Field[CustomerUpdateByExternalIDParamsTaxID] `json:"tax_id"` }
func (CustomerUpdateByExternalIDParams) MarshalJSON ¶
func (r CustomerUpdateByExternalIDParams) MarshalJSON() (data []byte, err error)
type CustomerUpdateByExternalIDParamsAccountingSyncConfiguration ¶
type CustomerUpdateByExternalIDParamsAccountingSyncConfiguration struct { AccountingProviders param.Field[[]CustomerUpdateByExternalIDParamsAccountingSyncConfigurationAccountingProvider] `json:"accounting_providers"` Excluded param.Field[bool] `json:"excluded"` }
func (CustomerUpdateByExternalIDParamsAccountingSyncConfiguration) MarshalJSON ¶
func (r CustomerUpdateByExternalIDParamsAccountingSyncConfiguration) MarshalJSON() (data []byte, err error)
type CustomerUpdateByExternalIDParamsAccountingSyncConfigurationAccountingProvider ¶
type CustomerUpdateByExternalIDParamsAccountingSyncConfigurationAccountingProvider struct { ExternalProviderID param.Field[string] `json:"external_provider_id,required"` ProviderType param.Field[string] `json:"provider_type,required"` }
func (CustomerUpdateByExternalIDParamsAccountingSyncConfigurationAccountingProvider) MarshalJSON ¶
func (r CustomerUpdateByExternalIDParamsAccountingSyncConfigurationAccountingProvider) MarshalJSON() (data []byte, err error)
type CustomerUpdateByExternalIDParamsBillingAddress ¶
type CustomerUpdateByExternalIDParamsBillingAddress 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 (CustomerUpdateByExternalIDParamsBillingAddress) MarshalJSON ¶
func (r CustomerUpdateByExternalIDParamsBillingAddress) MarshalJSON() (data []byte, err error)
type CustomerUpdateByExternalIDParamsPaymentProvider ¶
type CustomerUpdateByExternalIDParamsPaymentProvider 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.
- if the provider is an invoicing provider (`stripe_invoice`, `quickbooks`, `bill.com`, `netsuite`), any product mappings must first be configured with the Orb team.
const ( CustomerUpdateByExternalIDParamsPaymentProviderQuickbooks CustomerUpdateByExternalIDParamsPaymentProvider = "quickbooks" CustomerUpdateByExternalIDParamsPaymentProviderBillCom CustomerUpdateByExternalIDParamsPaymentProvider = "bill.com" CustomerUpdateByExternalIDParamsPaymentProviderStripeCharge CustomerUpdateByExternalIDParamsPaymentProvider = "stripe_charge" CustomerUpdateByExternalIDParamsPaymentProviderStripeInvoice CustomerUpdateByExternalIDParamsPaymentProvider = "stripe_invoice" CustomerUpdateByExternalIDParamsPaymentProviderNetsuite CustomerUpdateByExternalIDParamsPaymentProvider = "netsuite" )
func (CustomerUpdateByExternalIDParamsPaymentProvider) IsKnown ¶ added in v0.24.0
func (r CustomerUpdateByExternalIDParamsPaymentProvider) IsKnown() bool
type CustomerUpdateByExternalIDParamsReportingConfiguration ¶
type CustomerUpdateByExternalIDParamsReportingConfiguration struct {
Exempt param.Field[bool] `json:"exempt,required"`
}
func (CustomerUpdateByExternalIDParamsReportingConfiguration) MarshalJSON ¶
func (r CustomerUpdateByExternalIDParamsReportingConfiguration) MarshalJSON() (data []byte, err error)
type CustomerUpdateByExternalIDParamsShippingAddress ¶
type CustomerUpdateByExternalIDParamsShippingAddress 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 (CustomerUpdateByExternalIDParamsShippingAddress) MarshalJSON ¶
func (r CustomerUpdateByExternalIDParamsShippingAddress) MarshalJSON() (data []byte, err error)
type CustomerUpdateByExternalIDParamsTaxConfiguration ¶ added in v0.64.0
type CustomerUpdateByExternalIDParamsTaxConfiguration struct { TaxProvider param.Field[CustomerUpdateByExternalIDParamsTaxConfigurationTaxProvider] `json:"tax_provider,required"` TaxExempt param.Field[bool] `json:"tax_exempt,required"` TaxExemptionCode param.Field[string] `json:"tax_exemption_code"` TaxExemptionName param.Field[string] `json:"tax_exemption_name"` }
func (CustomerUpdateByExternalIDParamsTaxConfiguration) MarshalJSON ¶ added in v0.64.0
func (r CustomerUpdateByExternalIDParamsTaxConfiguration) MarshalJSON() (data []byte, err error)
type CustomerUpdateByExternalIDParamsTaxConfigurationNewAvalaraTaxConfiguration ¶ added in v0.64.0
type CustomerUpdateByExternalIDParamsTaxConfigurationNewAvalaraTaxConfiguration struct { TaxExempt param.Field[bool] `json:"tax_exempt,required"` TaxProvider param.Field[CustomerUpdateByExternalIDParamsTaxConfigurationNewAvalaraTaxConfigurationTaxProvider] `json:"tax_provider,required"` TaxExemptionCode param.Field[string] `json:"tax_exemption_code"` TaxExemptionName param.Field[string] `json:"tax_exemption_name"` }
func (CustomerUpdateByExternalIDParamsTaxConfigurationNewAvalaraTaxConfiguration) MarshalJSON ¶ added in v0.64.0
func (r CustomerUpdateByExternalIDParamsTaxConfigurationNewAvalaraTaxConfiguration) MarshalJSON() (data []byte, err error)
type CustomerUpdateByExternalIDParamsTaxConfigurationNewAvalaraTaxConfigurationTaxProvider ¶ added in v0.64.0
type CustomerUpdateByExternalIDParamsTaxConfigurationNewAvalaraTaxConfigurationTaxProvider string
const (
CustomerUpdateByExternalIDParamsTaxConfigurationNewAvalaraTaxConfigurationTaxProviderAvalara CustomerUpdateByExternalIDParamsTaxConfigurationNewAvalaraTaxConfigurationTaxProvider = "avalara"
)
type CustomerUpdateByExternalIDParamsTaxConfigurationNewTaxJarConfiguration ¶ added in v0.64.0
type CustomerUpdateByExternalIDParamsTaxConfigurationNewTaxJarConfiguration struct { TaxExempt param.Field[bool] `json:"tax_exempt,required"` TaxProvider param.Field[CustomerUpdateByExternalIDParamsTaxConfigurationNewTaxJarConfigurationTaxProvider] `json:"tax_provider,required"` }
func (CustomerUpdateByExternalIDParamsTaxConfigurationNewTaxJarConfiguration) MarshalJSON ¶ added in v0.64.0
func (r CustomerUpdateByExternalIDParamsTaxConfigurationNewTaxJarConfiguration) MarshalJSON() (data []byte, err error)
type CustomerUpdateByExternalIDParamsTaxConfigurationNewTaxJarConfigurationTaxProvider ¶ added in v0.64.0
type CustomerUpdateByExternalIDParamsTaxConfigurationNewTaxJarConfigurationTaxProvider string
const (
CustomerUpdateByExternalIDParamsTaxConfigurationNewTaxJarConfigurationTaxProviderTaxjar CustomerUpdateByExternalIDParamsTaxConfigurationNewTaxJarConfigurationTaxProvider = "taxjar"
)
type CustomerUpdateByExternalIDParamsTaxConfigurationTaxProvider ¶ added in v0.64.0
type CustomerUpdateByExternalIDParamsTaxConfigurationTaxProvider string
const ( CustomerUpdateByExternalIDParamsTaxConfigurationTaxProviderAvalara CustomerUpdateByExternalIDParamsTaxConfigurationTaxProvider = "avalara" CustomerUpdateByExternalIDParamsTaxConfigurationTaxProviderTaxjar CustomerUpdateByExternalIDParamsTaxConfigurationTaxProvider = "taxjar" )
func (CustomerUpdateByExternalIDParamsTaxConfigurationTaxProvider) IsKnown ¶ added in v0.64.0
func (r CustomerUpdateByExternalIDParamsTaxConfigurationTaxProvider) IsKnown() bool
type CustomerUpdateByExternalIDParamsTaxConfigurationUnion ¶ added in v0.64.0
type CustomerUpdateByExternalIDParamsTaxConfigurationUnion interface {
// contains filtered or unexported methods
}
Satisfied by CustomerUpdateByExternalIDParamsTaxConfigurationNewAvalaraTaxConfiguration, CustomerUpdateByExternalIDParamsTaxConfigurationNewTaxJarConfiguration, CustomerUpdateByExternalIDParamsTaxConfiguration.
type CustomerUpdateByExternalIDParamsTaxID ¶
type CustomerUpdateByExternalIDParamsTaxID struct { Country param.Field[CustomerUpdateByExternalIDParamsTaxIDCountry] `json:"country,required"` Type param.Field[CustomerUpdateByExternalIDParamsTaxIDType] `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 (CustomerUpdateByExternalIDParamsTaxID) MarshalJSON ¶
func (r CustomerUpdateByExternalIDParamsTaxID) MarshalJSON() (data []byte, err error)
type CustomerUpdateByExternalIDParamsTaxIDCountry ¶ added in v0.2.0
type CustomerUpdateByExternalIDParamsTaxIDCountry string
const ( CustomerUpdateByExternalIDParamsTaxIDCountryAd CustomerUpdateByExternalIDParamsTaxIDCountry = "AD" CustomerUpdateByExternalIDParamsTaxIDCountryAe CustomerUpdateByExternalIDParamsTaxIDCountry = "AE" CustomerUpdateByExternalIDParamsTaxIDCountryAr CustomerUpdateByExternalIDParamsTaxIDCountry = "AR" CustomerUpdateByExternalIDParamsTaxIDCountryAt CustomerUpdateByExternalIDParamsTaxIDCountry = "AT" CustomerUpdateByExternalIDParamsTaxIDCountryAu CustomerUpdateByExternalIDParamsTaxIDCountry = "AU" CustomerUpdateByExternalIDParamsTaxIDCountryBe CustomerUpdateByExternalIDParamsTaxIDCountry = "BE" CustomerUpdateByExternalIDParamsTaxIDCountryBg CustomerUpdateByExternalIDParamsTaxIDCountry = "BG" CustomerUpdateByExternalIDParamsTaxIDCountryBh CustomerUpdateByExternalIDParamsTaxIDCountry = "BH" CustomerUpdateByExternalIDParamsTaxIDCountryBo CustomerUpdateByExternalIDParamsTaxIDCountry = "BO" CustomerUpdateByExternalIDParamsTaxIDCountryBr CustomerUpdateByExternalIDParamsTaxIDCountry = "BR" CustomerUpdateByExternalIDParamsTaxIDCountryCa CustomerUpdateByExternalIDParamsTaxIDCountry = "CA" CustomerUpdateByExternalIDParamsTaxIDCountryCh CustomerUpdateByExternalIDParamsTaxIDCountry = "CH" CustomerUpdateByExternalIDParamsTaxIDCountryCl CustomerUpdateByExternalIDParamsTaxIDCountry = "CL" CustomerUpdateByExternalIDParamsTaxIDCountryCn CustomerUpdateByExternalIDParamsTaxIDCountry = "CN" CustomerUpdateByExternalIDParamsTaxIDCountryCo CustomerUpdateByExternalIDParamsTaxIDCountry = "CO" CustomerUpdateByExternalIDParamsTaxIDCountryCr CustomerUpdateByExternalIDParamsTaxIDCountry = "CR" CustomerUpdateByExternalIDParamsTaxIDCountryCy CustomerUpdateByExternalIDParamsTaxIDCountry = "CY" CustomerUpdateByExternalIDParamsTaxIDCountryCz CustomerUpdateByExternalIDParamsTaxIDCountry = "CZ" CustomerUpdateByExternalIDParamsTaxIDCountryDe CustomerUpdateByExternalIDParamsTaxIDCountry = "DE" CustomerUpdateByExternalIDParamsTaxIDCountryDk CustomerUpdateByExternalIDParamsTaxIDCountry = "DK" CustomerUpdateByExternalIDParamsTaxIDCountryEe CustomerUpdateByExternalIDParamsTaxIDCountry = "EE" CustomerUpdateByExternalIDParamsTaxIDCountryDo CustomerUpdateByExternalIDParamsTaxIDCountry = "DO" CustomerUpdateByExternalIDParamsTaxIDCountryEc CustomerUpdateByExternalIDParamsTaxIDCountry = "EC" CustomerUpdateByExternalIDParamsTaxIDCountryEg CustomerUpdateByExternalIDParamsTaxIDCountry = "EG" CustomerUpdateByExternalIDParamsTaxIDCountryEs CustomerUpdateByExternalIDParamsTaxIDCountry = "ES" CustomerUpdateByExternalIDParamsTaxIDCountryEu CustomerUpdateByExternalIDParamsTaxIDCountry = "EU" CustomerUpdateByExternalIDParamsTaxIDCountryFi CustomerUpdateByExternalIDParamsTaxIDCountry = "FI" CustomerUpdateByExternalIDParamsTaxIDCountryFr CustomerUpdateByExternalIDParamsTaxIDCountry = "FR" CustomerUpdateByExternalIDParamsTaxIDCountryGB CustomerUpdateByExternalIDParamsTaxIDCountry = "GB" CustomerUpdateByExternalIDParamsTaxIDCountryGe CustomerUpdateByExternalIDParamsTaxIDCountry = "GE" CustomerUpdateByExternalIDParamsTaxIDCountryGr CustomerUpdateByExternalIDParamsTaxIDCountry = "GR" CustomerUpdateByExternalIDParamsTaxIDCountryHk CustomerUpdateByExternalIDParamsTaxIDCountry = "HK" CustomerUpdateByExternalIDParamsTaxIDCountryHr CustomerUpdateByExternalIDParamsTaxIDCountry = "HR" CustomerUpdateByExternalIDParamsTaxIDCountryHu CustomerUpdateByExternalIDParamsTaxIDCountry = "HU" CustomerUpdateByExternalIDParamsTaxIDCountryID CustomerUpdateByExternalIDParamsTaxIDCountry = "ID" CustomerUpdateByExternalIDParamsTaxIDCountryIe CustomerUpdateByExternalIDParamsTaxIDCountry = "IE" CustomerUpdateByExternalIDParamsTaxIDCountryIl CustomerUpdateByExternalIDParamsTaxIDCountry = "IL" CustomerUpdateByExternalIDParamsTaxIDCountryIn CustomerUpdateByExternalIDParamsTaxIDCountry = "IN" CustomerUpdateByExternalIDParamsTaxIDCountryIs CustomerUpdateByExternalIDParamsTaxIDCountry = "IS" CustomerUpdateByExternalIDParamsTaxIDCountryIt CustomerUpdateByExternalIDParamsTaxIDCountry = "IT" CustomerUpdateByExternalIDParamsTaxIDCountryJp CustomerUpdateByExternalIDParamsTaxIDCountry = "JP" CustomerUpdateByExternalIDParamsTaxIDCountryKe CustomerUpdateByExternalIDParamsTaxIDCountry = "KE" CustomerUpdateByExternalIDParamsTaxIDCountryKr CustomerUpdateByExternalIDParamsTaxIDCountry = "KR" CustomerUpdateByExternalIDParamsTaxIDCountryKz CustomerUpdateByExternalIDParamsTaxIDCountry = "KZ" CustomerUpdateByExternalIDParamsTaxIDCountryLi CustomerUpdateByExternalIDParamsTaxIDCountry = "LI" CustomerUpdateByExternalIDParamsTaxIDCountryLt CustomerUpdateByExternalIDParamsTaxIDCountry = "LT" CustomerUpdateByExternalIDParamsTaxIDCountryLu CustomerUpdateByExternalIDParamsTaxIDCountry = "LU" CustomerUpdateByExternalIDParamsTaxIDCountryLv CustomerUpdateByExternalIDParamsTaxIDCountry = "LV" CustomerUpdateByExternalIDParamsTaxIDCountryMt CustomerUpdateByExternalIDParamsTaxIDCountry = "MT" CustomerUpdateByExternalIDParamsTaxIDCountryMx CustomerUpdateByExternalIDParamsTaxIDCountry = "MX" CustomerUpdateByExternalIDParamsTaxIDCountryMy CustomerUpdateByExternalIDParamsTaxIDCountry = "MY" CustomerUpdateByExternalIDParamsTaxIDCountryNg CustomerUpdateByExternalIDParamsTaxIDCountry = "NG" CustomerUpdateByExternalIDParamsTaxIDCountryNl CustomerUpdateByExternalIDParamsTaxIDCountry = "NL" CustomerUpdateByExternalIDParamsTaxIDCountryNo CustomerUpdateByExternalIDParamsTaxIDCountry = "NO" CustomerUpdateByExternalIDParamsTaxIDCountryNz CustomerUpdateByExternalIDParamsTaxIDCountry = "NZ" CustomerUpdateByExternalIDParamsTaxIDCountryOm CustomerUpdateByExternalIDParamsTaxIDCountry = "OM" CustomerUpdateByExternalIDParamsTaxIDCountryPe CustomerUpdateByExternalIDParamsTaxIDCountry = "PE" CustomerUpdateByExternalIDParamsTaxIDCountryPh CustomerUpdateByExternalIDParamsTaxIDCountry = "PH" CustomerUpdateByExternalIDParamsTaxIDCountryPl CustomerUpdateByExternalIDParamsTaxIDCountry = "PL" CustomerUpdateByExternalIDParamsTaxIDCountryPt CustomerUpdateByExternalIDParamsTaxIDCountry = "PT" CustomerUpdateByExternalIDParamsTaxIDCountryRo CustomerUpdateByExternalIDParamsTaxIDCountry = "RO" CustomerUpdateByExternalIDParamsTaxIDCountryRs CustomerUpdateByExternalIDParamsTaxIDCountry = "RS" CustomerUpdateByExternalIDParamsTaxIDCountryRu CustomerUpdateByExternalIDParamsTaxIDCountry = "RU" CustomerUpdateByExternalIDParamsTaxIDCountrySa CustomerUpdateByExternalIDParamsTaxIDCountry = "SA" CustomerUpdateByExternalIDParamsTaxIDCountrySe CustomerUpdateByExternalIDParamsTaxIDCountry = "SE" CustomerUpdateByExternalIDParamsTaxIDCountrySg CustomerUpdateByExternalIDParamsTaxIDCountry = "SG" CustomerUpdateByExternalIDParamsTaxIDCountrySi CustomerUpdateByExternalIDParamsTaxIDCountry = "SI" CustomerUpdateByExternalIDParamsTaxIDCountrySk CustomerUpdateByExternalIDParamsTaxIDCountry = "SK" CustomerUpdateByExternalIDParamsTaxIDCountrySv CustomerUpdateByExternalIDParamsTaxIDCountry = "SV" CustomerUpdateByExternalIDParamsTaxIDCountryTh CustomerUpdateByExternalIDParamsTaxIDCountry = "TH" CustomerUpdateByExternalIDParamsTaxIDCountryTr CustomerUpdateByExternalIDParamsTaxIDCountry = "TR" CustomerUpdateByExternalIDParamsTaxIDCountryTw CustomerUpdateByExternalIDParamsTaxIDCountry = "TW" CustomerUpdateByExternalIDParamsTaxIDCountryUa CustomerUpdateByExternalIDParamsTaxIDCountry = "UA" CustomerUpdateByExternalIDParamsTaxIDCountryUs CustomerUpdateByExternalIDParamsTaxIDCountry = "US" CustomerUpdateByExternalIDParamsTaxIDCountryUy CustomerUpdateByExternalIDParamsTaxIDCountry = "UY" CustomerUpdateByExternalIDParamsTaxIDCountryVe CustomerUpdateByExternalIDParamsTaxIDCountry = "VE" CustomerUpdateByExternalIDParamsTaxIDCountryVn CustomerUpdateByExternalIDParamsTaxIDCountry = "VN" CustomerUpdateByExternalIDParamsTaxIDCountryZa CustomerUpdateByExternalIDParamsTaxIDCountry = "ZA" )
func (CustomerUpdateByExternalIDParamsTaxIDCountry) IsKnown ¶ added in v0.24.0
func (r CustomerUpdateByExternalIDParamsTaxIDCountry) IsKnown() bool
type CustomerUpdateByExternalIDParamsTaxIDType ¶ added in v0.2.0
type CustomerUpdateByExternalIDParamsTaxIDType string
const ( CustomerUpdateByExternalIDParamsTaxIDTypeAdNrt CustomerUpdateByExternalIDParamsTaxIDType = "ad_nrt" CustomerUpdateByExternalIDParamsTaxIDTypeAeTrn CustomerUpdateByExternalIDParamsTaxIDType = "ae_trn" CustomerUpdateByExternalIDParamsTaxIDTypeArCuit CustomerUpdateByExternalIDParamsTaxIDType = "ar_cuit" CustomerUpdateByExternalIDParamsTaxIDTypeEuVat CustomerUpdateByExternalIDParamsTaxIDType = "eu_vat" CustomerUpdateByExternalIDParamsTaxIDTypeAuAbn CustomerUpdateByExternalIDParamsTaxIDType = "au_abn" CustomerUpdateByExternalIDParamsTaxIDTypeAuArn CustomerUpdateByExternalIDParamsTaxIDType = "au_arn" CustomerUpdateByExternalIDParamsTaxIDTypeBgUic CustomerUpdateByExternalIDParamsTaxIDType = "bg_uic" CustomerUpdateByExternalIDParamsTaxIDTypeBhVat CustomerUpdateByExternalIDParamsTaxIDType = "bh_vat" CustomerUpdateByExternalIDParamsTaxIDTypeBoTin CustomerUpdateByExternalIDParamsTaxIDType = "bo_tin" CustomerUpdateByExternalIDParamsTaxIDTypeBrCnpj CustomerUpdateByExternalIDParamsTaxIDType = "br_cnpj" CustomerUpdateByExternalIDParamsTaxIDTypeBrCpf CustomerUpdateByExternalIDParamsTaxIDType = "br_cpf" CustomerUpdateByExternalIDParamsTaxIDTypeCaBn CustomerUpdateByExternalIDParamsTaxIDType = "ca_bn" CustomerUpdateByExternalIDParamsTaxIDTypeCaGstHst CustomerUpdateByExternalIDParamsTaxIDType = "ca_gst_hst" CustomerUpdateByExternalIDParamsTaxIDTypeCaPstBc CustomerUpdateByExternalIDParamsTaxIDType = "ca_pst_bc" CustomerUpdateByExternalIDParamsTaxIDTypeCaPstMB CustomerUpdateByExternalIDParamsTaxIDType = "ca_pst_mb" CustomerUpdateByExternalIDParamsTaxIDTypeCaPstSk CustomerUpdateByExternalIDParamsTaxIDType = "ca_pst_sk" CustomerUpdateByExternalIDParamsTaxIDTypeCaQst CustomerUpdateByExternalIDParamsTaxIDType = "ca_qst" CustomerUpdateByExternalIDParamsTaxIDTypeChVat CustomerUpdateByExternalIDParamsTaxIDType = "ch_vat" CustomerUpdateByExternalIDParamsTaxIDTypeClTin CustomerUpdateByExternalIDParamsTaxIDType = "cl_tin" CustomerUpdateByExternalIDParamsTaxIDTypeCnTin CustomerUpdateByExternalIDParamsTaxIDType = "cn_tin" CustomerUpdateByExternalIDParamsTaxIDTypeCoNit CustomerUpdateByExternalIDParamsTaxIDType = "co_nit" CustomerUpdateByExternalIDParamsTaxIDTypeCrTin CustomerUpdateByExternalIDParamsTaxIDType = "cr_tin" CustomerUpdateByExternalIDParamsTaxIDTypeDoRcn CustomerUpdateByExternalIDParamsTaxIDType = "do_rcn" CustomerUpdateByExternalIDParamsTaxIDTypeEcRuc CustomerUpdateByExternalIDParamsTaxIDType = "ec_ruc" CustomerUpdateByExternalIDParamsTaxIDTypeEgTin CustomerUpdateByExternalIDParamsTaxIDType = "eg_tin" CustomerUpdateByExternalIDParamsTaxIDTypeEsCif CustomerUpdateByExternalIDParamsTaxIDType = "es_cif" CustomerUpdateByExternalIDParamsTaxIDTypeEuOssVat CustomerUpdateByExternalIDParamsTaxIDType = "eu_oss_vat" CustomerUpdateByExternalIDParamsTaxIDTypeGBVat CustomerUpdateByExternalIDParamsTaxIDType = "gb_vat" CustomerUpdateByExternalIDParamsTaxIDTypeGeVat CustomerUpdateByExternalIDParamsTaxIDType = "ge_vat" CustomerUpdateByExternalIDParamsTaxIDTypeHkBr CustomerUpdateByExternalIDParamsTaxIDType = "hk_br" CustomerUpdateByExternalIDParamsTaxIDTypeHuTin CustomerUpdateByExternalIDParamsTaxIDType = "hu_tin" CustomerUpdateByExternalIDParamsTaxIDTypeIDNpwp CustomerUpdateByExternalIDParamsTaxIDType = "id_npwp" CustomerUpdateByExternalIDParamsTaxIDTypeIlVat CustomerUpdateByExternalIDParamsTaxIDType = "il_vat" CustomerUpdateByExternalIDParamsTaxIDTypeInGst CustomerUpdateByExternalIDParamsTaxIDType = "in_gst" CustomerUpdateByExternalIDParamsTaxIDTypeIsVat CustomerUpdateByExternalIDParamsTaxIDType = "is_vat" CustomerUpdateByExternalIDParamsTaxIDTypeJpCn CustomerUpdateByExternalIDParamsTaxIDType = "jp_cn" CustomerUpdateByExternalIDParamsTaxIDTypeJpRn CustomerUpdateByExternalIDParamsTaxIDType = "jp_rn" CustomerUpdateByExternalIDParamsTaxIDTypeJpTrn CustomerUpdateByExternalIDParamsTaxIDType = "jp_trn" CustomerUpdateByExternalIDParamsTaxIDTypeKePin CustomerUpdateByExternalIDParamsTaxIDType = "ke_pin" CustomerUpdateByExternalIDParamsTaxIDTypeKrBrn CustomerUpdateByExternalIDParamsTaxIDType = "kr_brn" CustomerUpdateByExternalIDParamsTaxIDTypeKzBin CustomerUpdateByExternalIDParamsTaxIDType = "kz_bin" CustomerUpdateByExternalIDParamsTaxIDTypeLiUid CustomerUpdateByExternalIDParamsTaxIDType = "li_uid" CustomerUpdateByExternalIDParamsTaxIDTypeMxRfc CustomerUpdateByExternalIDParamsTaxIDType = "mx_rfc" CustomerUpdateByExternalIDParamsTaxIDTypeMyFrp CustomerUpdateByExternalIDParamsTaxIDType = "my_frp" CustomerUpdateByExternalIDParamsTaxIDTypeMyItn CustomerUpdateByExternalIDParamsTaxIDType = "my_itn" CustomerUpdateByExternalIDParamsTaxIDTypeMySst CustomerUpdateByExternalIDParamsTaxIDType = "my_sst" CustomerUpdateByExternalIDParamsTaxIDTypeNgTin CustomerUpdateByExternalIDParamsTaxIDType = "ng_tin" CustomerUpdateByExternalIDParamsTaxIDTypeNoVat CustomerUpdateByExternalIDParamsTaxIDType = "no_vat" CustomerUpdateByExternalIDParamsTaxIDTypeNoVoec CustomerUpdateByExternalIDParamsTaxIDType = "no_voec" CustomerUpdateByExternalIDParamsTaxIDTypeNzGst CustomerUpdateByExternalIDParamsTaxIDType = "nz_gst" CustomerUpdateByExternalIDParamsTaxIDTypeOmVat CustomerUpdateByExternalIDParamsTaxIDType = "om_vat" CustomerUpdateByExternalIDParamsTaxIDTypePeRuc CustomerUpdateByExternalIDParamsTaxIDType = "pe_ruc" CustomerUpdateByExternalIDParamsTaxIDTypePhTin CustomerUpdateByExternalIDParamsTaxIDType = "ph_tin" CustomerUpdateByExternalIDParamsTaxIDTypeRoTin CustomerUpdateByExternalIDParamsTaxIDType = "ro_tin" CustomerUpdateByExternalIDParamsTaxIDTypeRsPib CustomerUpdateByExternalIDParamsTaxIDType = "rs_pib" CustomerUpdateByExternalIDParamsTaxIDTypeRuInn CustomerUpdateByExternalIDParamsTaxIDType = "ru_inn" CustomerUpdateByExternalIDParamsTaxIDTypeRuKpp CustomerUpdateByExternalIDParamsTaxIDType = "ru_kpp" CustomerUpdateByExternalIDParamsTaxIDTypeSaVat CustomerUpdateByExternalIDParamsTaxIDType = "sa_vat" CustomerUpdateByExternalIDParamsTaxIDTypeSgGst CustomerUpdateByExternalIDParamsTaxIDType = "sg_gst" CustomerUpdateByExternalIDParamsTaxIDTypeSgUen CustomerUpdateByExternalIDParamsTaxIDType = "sg_uen" CustomerUpdateByExternalIDParamsTaxIDTypeSiTin CustomerUpdateByExternalIDParamsTaxIDType = "si_tin" CustomerUpdateByExternalIDParamsTaxIDTypeSvNit CustomerUpdateByExternalIDParamsTaxIDType = "sv_nit" CustomerUpdateByExternalIDParamsTaxIDTypeThVat CustomerUpdateByExternalIDParamsTaxIDType = "th_vat" CustomerUpdateByExternalIDParamsTaxIDTypeTrTin CustomerUpdateByExternalIDParamsTaxIDType = "tr_tin" CustomerUpdateByExternalIDParamsTaxIDTypeTwVat CustomerUpdateByExternalIDParamsTaxIDType = "tw_vat" CustomerUpdateByExternalIDParamsTaxIDTypeUaVat CustomerUpdateByExternalIDParamsTaxIDType = "ua_vat" CustomerUpdateByExternalIDParamsTaxIDTypeUsEin CustomerUpdateByExternalIDParamsTaxIDType = "us_ein" CustomerUpdateByExternalIDParamsTaxIDTypeUyRuc CustomerUpdateByExternalIDParamsTaxIDType = "uy_ruc" CustomerUpdateByExternalIDParamsTaxIDTypeVeRif CustomerUpdateByExternalIDParamsTaxIDType = "ve_rif" CustomerUpdateByExternalIDParamsTaxIDTypeVnTin CustomerUpdateByExternalIDParamsTaxIDType = "vn_tin" CustomerUpdateByExternalIDParamsTaxIDTypeZaVat CustomerUpdateByExternalIDParamsTaxIDType = "za_vat" )
func (CustomerUpdateByExternalIDParamsTaxIDType) IsKnown ¶ added in v0.24.0
func (r CustomerUpdateByExternalIDParamsTaxIDType) IsKnown() bool
type CustomerUpdateParams ¶
type CustomerUpdateParams struct { AccountingSyncConfiguration param.Field[CustomerUpdateParamsAccountingSyncConfiguration] `json:"accounting_sync_configuration"` // Additional email addresses for this customer. If populated, these email // addresses will be CC'd for customer communications. AdditionalEmails param.Field[[]string] `json:"additional_emails"` // Used to determine if invoices for this customer will automatically attempt to // charge a saved payment method, if available. This parameter defaults to `True` // when a payment provider is provided on customer creation. AutoCollection param.Field[bool] `json:"auto_collection"` BillingAddress param.Field[CustomerUpdateParamsBillingAddress] `json:"billing_address"` // An ISO 4217 currency string used for the customer's invoices and balance. If not // set at creation time, will be set at subscription creation time. Currency param.Field[string] `json:"currency"` // A valid customer email, to be used for invoicing and notifications. Email param.Field[string] `json:"email"` EmailDelivery param.Field[bool] `json:"email_delivery"` // The external customer ID. This can only be set if empty and the customer has no // past or current subscriptions. ExternalCustomerID param.Field[string] `json:"external_customer_id"` // 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"` // The full name of the customer Name param.Field[string] `json:"name"` // 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. // - if the provider is an invoicing provider (`stripe_invoice`, `quickbooks`, // `bill.com`, `netsuite`), any product mappings must first be configured with // the Orb team. PaymentProvider param.Field[CustomerUpdateParamsPaymentProvider] `json:"payment_provider"` // 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 param.Field[string] `json:"payment_provider_id"` ReportingConfiguration param.Field[CustomerUpdateParamsReportingConfiguration] `json:"reporting_configuration"` ShippingAddress param.Field[CustomerUpdateParamsShippingAddress] `json:"shipping_address"` TaxConfiguration param.Field[CustomerUpdateParamsTaxConfigurationUnion] `json:"tax_configuration"` // 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 param.Field[CustomerUpdateParamsTaxID] `json:"tax_id"` }
func (CustomerUpdateParams) MarshalJSON ¶
func (r CustomerUpdateParams) MarshalJSON() (data []byte, err error)
type CustomerUpdateParamsAccountingSyncConfiguration ¶
type CustomerUpdateParamsAccountingSyncConfiguration struct { AccountingProviders param.Field[[]CustomerUpdateParamsAccountingSyncConfigurationAccountingProvider] `json:"accounting_providers"` Excluded param.Field[bool] `json:"excluded"` }
func (CustomerUpdateParamsAccountingSyncConfiguration) MarshalJSON ¶
func (r CustomerUpdateParamsAccountingSyncConfiguration) MarshalJSON() (data []byte, err error)
type CustomerUpdateParamsAccountingSyncConfigurationAccountingProvider ¶
type CustomerUpdateParamsAccountingSyncConfigurationAccountingProvider struct { ExternalProviderID param.Field[string] `json:"external_provider_id,required"` ProviderType param.Field[string] `json:"provider_type,required"` }
func (CustomerUpdateParamsAccountingSyncConfigurationAccountingProvider) MarshalJSON ¶
func (r CustomerUpdateParamsAccountingSyncConfigurationAccountingProvider) MarshalJSON() (data []byte, err error)
type CustomerUpdateParamsBillingAddress ¶
type CustomerUpdateParamsBillingAddress 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 (CustomerUpdateParamsBillingAddress) MarshalJSON ¶
func (r CustomerUpdateParamsBillingAddress) MarshalJSON() (data []byte, err error)
type CustomerUpdateParamsPaymentProvider ¶
type CustomerUpdateParamsPaymentProvider 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.
- if the provider is an invoicing provider (`stripe_invoice`, `quickbooks`, `bill.com`, `netsuite`), any product mappings must first be configured with the Orb team.
const ( CustomerUpdateParamsPaymentProviderQuickbooks CustomerUpdateParamsPaymentProvider = "quickbooks" CustomerUpdateParamsPaymentProviderBillCom CustomerUpdateParamsPaymentProvider = "bill.com" CustomerUpdateParamsPaymentProviderStripeCharge CustomerUpdateParamsPaymentProvider = "stripe_charge" CustomerUpdateParamsPaymentProviderStripeInvoice CustomerUpdateParamsPaymentProvider = "stripe_invoice" CustomerUpdateParamsPaymentProviderNetsuite CustomerUpdateParamsPaymentProvider = "netsuite" )
func (CustomerUpdateParamsPaymentProvider) IsKnown ¶ added in v0.24.0
func (r CustomerUpdateParamsPaymentProvider) IsKnown() bool
type CustomerUpdateParamsReportingConfiguration ¶
type CustomerUpdateParamsReportingConfiguration struct {
Exempt param.Field[bool] `json:"exempt,required"`
}
func (CustomerUpdateParamsReportingConfiguration) MarshalJSON ¶
func (r CustomerUpdateParamsReportingConfiguration) MarshalJSON() (data []byte, err error)
type CustomerUpdateParamsShippingAddress ¶
type CustomerUpdateParamsShippingAddress 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 (CustomerUpdateParamsShippingAddress) MarshalJSON ¶
func (r CustomerUpdateParamsShippingAddress) MarshalJSON() (data []byte, err error)
type CustomerUpdateParamsTaxConfiguration ¶ added in v0.64.0
type CustomerUpdateParamsTaxConfiguration struct { TaxProvider param.Field[CustomerUpdateParamsTaxConfigurationTaxProvider] `json:"tax_provider,required"` TaxExempt param.Field[bool] `json:"tax_exempt,required"` TaxExemptionCode param.Field[string] `json:"tax_exemption_code"` TaxExemptionName param.Field[string] `json:"tax_exemption_name"` }
func (CustomerUpdateParamsTaxConfiguration) MarshalJSON ¶ added in v0.64.0
func (r CustomerUpdateParamsTaxConfiguration) MarshalJSON() (data []byte, err error)
type CustomerUpdateParamsTaxConfigurationNewAvalaraTaxConfiguration ¶ added in v0.64.0
type CustomerUpdateParamsTaxConfigurationNewAvalaraTaxConfiguration struct { TaxExempt param.Field[bool] `json:"tax_exempt,required"` TaxProvider param.Field[CustomerUpdateParamsTaxConfigurationNewAvalaraTaxConfigurationTaxProvider] `json:"tax_provider,required"` TaxExemptionCode param.Field[string] `json:"tax_exemption_code"` TaxExemptionName param.Field[string] `json:"tax_exemption_name"` }
func (CustomerUpdateParamsTaxConfigurationNewAvalaraTaxConfiguration) MarshalJSON ¶ added in v0.64.0
func (r CustomerUpdateParamsTaxConfigurationNewAvalaraTaxConfiguration) MarshalJSON() (data []byte, err error)
type CustomerUpdateParamsTaxConfigurationNewAvalaraTaxConfigurationTaxProvider ¶ added in v0.64.0
type CustomerUpdateParamsTaxConfigurationNewAvalaraTaxConfigurationTaxProvider string
const (
CustomerUpdateParamsTaxConfigurationNewAvalaraTaxConfigurationTaxProviderAvalara CustomerUpdateParamsTaxConfigurationNewAvalaraTaxConfigurationTaxProvider = "avalara"
)
func (CustomerUpdateParamsTaxConfigurationNewAvalaraTaxConfigurationTaxProvider) IsKnown ¶ added in v0.64.0
func (r CustomerUpdateParamsTaxConfigurationNewAvalaraTaxConfigurationTaxProvider) IsKnown() bool
type CustomerUpdateParamsTaxConfigurationNewTaxJarConfiguration ¶ added in v0.64.0
type CustomerUpdateParamsTaxConfigurationNewTaxJarConfiguration struct { TaxExempt param.Field[bool] `json:"tax_exempt,required"` TaxProvider param.Field[CustomerUpdateParamsTaxConfigurationNewTaxJarConfigurationTaxProvider] `json:"tax_provider,required"` }
func (CustomerUpdateParamsTaxConfigurationNewTaxJarConfiguration) MarshalJSON ¶ added in v0.64.0
func (r CustomerUpdateParamsTaxConfigurationNewTaxJarConfiguration) MarshalJSON() (data []byte, err error)
type CustomerUpdateParamsTaxConfigurationNewTaxJarConfigurationTaxProvider ¶ added in v0.64.0
type CustomerUpdateParamsTaxConfigurationNewTaxJarConfigurationTaxProvider string
const (
CustomerUpdateParamsTaxConfigurationNewTaxJarConfigurationTaxProviderTaxjar CustomerUpdateParamsTaxConfigurationNewTaxJarConfigurationTaxProvider = "taxjar"
)
func (CustomerUpdateParamsTaxConfigurationNewTaxJarConfigurationTaxProvider) IsKnown ¶ added in v0.64.0
func (r CustomerUpdateParamsTaxConfigurationNewTaxJarConfigurationTaxProvider) IsKnown() bool
type CustomerUpdateParamsTaxConfigurationTaxProvider ¶ added in v0.64.0
type CustomerUpdateParamsTaxConfigurationTaxProvider string
const ( CustomerUpdateParamsTaxConfigurationTaxProviderAvalara CustomerUpdateParamsTaxConfigurationTaxProvider = "avalara" CustomerUpdateParamsTaxConfigurationTaxProviderTaxjar CustomerUpdateParamsTaxConfigurationTaxProvider = "taxjar" )
func (CustomerUpdateParamsTaxConfigurationTaxProvider) IsKnown ¶ added in v0.64.0
func (r CustomerUpdateParamsTaxConfigurationTaxProvider) IsKnown() bool
type CustomerUpdateParamsTaxConfigurationUnion ¶ added in v0.64.0
type CustomerUpdateParamsTaxConfigurationUnion interface {
// contains filtered or unexported methods
}
Satisfied by CustomerUpdateParamsTaxConfigurationNewAvalaraTaxConfiguration, CustomerUpdateParamsTaxConfigurationNewTaxJarConfiguration, CustomerUpdateParamsTaxConfiguration.
type CustomerUpdateParamsTaxID ¶
type CustomerUpdateParamsTaxID struct { Country param.Field[CustomerUpdateParamsTaxIDCountry] `json:"country,required"` Type param.Field[CustomerUpdateParamsTaxIDType] `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 (CustomerUpdateParamsTaxID) MarshalJSON ¶
func (r CustomerUpdateParamsTaxID) MarshalJSON() (data []byte, err error)
type CustomerUpdateParamsTaxIDCountry ¶ added in v0.2.0
type CustomerUpdateParamsTaxIDCountry string
const ( CustomerUpdateParamsTaxIDCountryAd CustomerUpdateParamsTaxIDCountry = "AD" CustomerUpdateParamsTaxIDCountryAe CustomerUpdateParamsTaxIDCountry = "AE" CustomerUpdateParamsTaxIDCountryAr CustomerUpdateParamsTaxIDCountry = "AR" CustomerUpdateParamsTaxIDCountryAt CustomerUpdateParamsTaxIDCountry = "AT" CustomerUpdateParamsTaxIDCountryAu CustomerUpdateParamsTaxIDCountry = "AU" CustomerUpdateParamsTaxIDCountryBe CustomerUpdateParamsTaxIDCountry = "BE" CustomerUpdateParamsTaxIDCountryBg CustomerUpdateParamsTaxIDCountry = "BG" CustomerUpdateParamsTaxIDCountryBh CustomerUpdateParamsTaxIDCountry = "BH" CustomerUpdateParamsTaxIDCountryBo CustomerUpdateParamsTaxIDCountry = "BO" CustomerUpdateParamsTaxIDCountryBr CustomerUpdateParamsTaxIDCountry = "BR" CustomerUpdateParamsTaxIDCountryCa CustomerUpdateParamsTaxIDCountry = "CA" CustomerUpdateParamsTaxIDCountryCh CustomerUpdateParamsTaxIDCountry = "CH" CustomerUpdateParamsTaxIDCountryCl CustomerUpdateParamsTaxIDCountry = "CL" CustomerUpdateParamsTaxIDCountryCn CustomerUpdateParamsTaxIDCountry = "CN" CustomerUpdateParamsTaxIDCountryCo CustomerUpdateParamsTaxIDCountry = "CO" CustomerUpdateParamsTaxIDCountryCr CustomerUpdateParamsTaxIDCountry = "CR" CustomerUpdateParamsTaxIDCountryCy CustomerUpdateParamsTaxIDCountry = "CY" CustomerUpdateParamsTaxIDCountryCz CustomerUpdateParamsTaxIDCountry = "CZ" CustomerUpdateParamsTaxIDCountryDe CustomerUpdateParamsTaxIDCountry = "DE" CustomerUpdateParamsTaxIDCountryDk CustomerUpdateParamsTaxIDCountry = "DK" CustomerUpdateParamsTaxIDCountryEe CustomerUpdateParamsTaxIDCountry = "EE" CustomerUpdateParamsTaxIDCountryDo CustomerUpdateParamsTaxIDCountry = "DO" CustomerUpdateParamsTaxIDCountryEc CustomerUpdateParamsTaxIDCountry = "EC" CustomerUpdateParamsTaxIDCountryEg CustomerUpdateParamsTaxIDCountry = "EG" CustomerUpdateParamsTaxIDCountryEs CustomerUpdateParamsTaxIDCountry = "ES" CustomerUpdateParamsTaxIDCountryEu CustomerUpdateParamsTaxIDCountry = "EU" CustomerUpdateParamsTaxIDCountryFi CustomerUpdateParamsTaxIDCountry = "FI" CustomerUpdateParamsTaxIDCountryFr CustomerUpdateParamsTaxIDCountry = "FR" CustomerUpdateParamsTaxIDCountryGB CustomerUpdateParamsTaxIDCountry = "GB" CustomerUpdateParamsTaxIDCountryGe CustomerUpdateParamsTaxIDCountry = "GE" CustomerUpdateParamsTaxIDCountryGr CustomerUpdateParamsTaxIDCountry = "GR" CustomerUpdateParamsTaxIDCountryHk CustomerUpdateParamsTaxIDCountry = "HK" CustomerUpdateParamsTaxIDCountryHr CustomerUpdateParamsTaxIDCountry = "HR" CustomerUpdateParamsTaxIDCountryHu CustomerUpdateParamsTaxIDCountry = "HU" CustomerUpdateParamsTaxIDCountryID CustomerUpdateParamsTaxIDCountry = "ID" CustomerUpdateParamsTaxIDCountryIe CustomerUpdateParamsTaxIDCountry = "IE" CustomerUpdateParamsTaxIDCountryIl CustomerUpdateParamsTaxIDCountry = "IL" CustomerUpdateParamsTaxIDCountryIn CustomerUpdateParamsTaxIDCountry = "IN" CustomerUpdateParamsTaxIDCountryIs CustomerUpdateParamsTaxIDCountry = "IS" CustomerUpdateParamsTaxIDCountryIt CustomerUpdateParamsTaxIDCountry = "IT" CustomerUpdateParamsTaxIDCountryJp CustomerUpdateParamsTaxIDCountry = "JP" CustomerUpdateParamsTaxIDCountryKe CustomerUpdateParamsTaxIDCountry = "KE" CustomerUpdateParamsTaxIDCountryKr CustomerUpdateParamsTaxIDCountry = "KR" CustomerUpdateParamsTaxIDCountryKz CustomerUpdateParamsTaxIDCountry = "KZ" CustomerUpdateParamsTaxIDCountryLi CustomerUpdateParamsTaxIDCountry = "LI" CustomerUpdateParamsTaxIDCountryLt CustomerUpdateParamsTaxIDCountry = "LT" CustomerUpdateParamsTaxIDCountryLu CustomerUpdateParamsTaxIDCountry = "LU" CustomerUpdateParamsTaxIDCountryLv CustomerUpdateParamsTaxIDCountry = "LV" CustomerUpdateParamsTaxIDCountryMt CustomerUpdateParamsTaxIDCountry = "MT" CustomerUpdateParamsTaxIDCountryMx CustomerUpdateParamsTaxIDCountry = "MX" CustomerUpdateParamsTaxIDCountryMy CustomerUpdateParamsTaxIDCountry = "MY" CustomerUpdateParamsTaxIDCountryNg CustomerUpdateParamsTaxIDCountry = "NG" CustomerUpdateParamsTaxIDCountryNl CustomerUpdateParamsTaxIDCountry = "NL" CustomerUpdateParamsTaxIDCountryNo CustomerUpdateParamsTaxIDCountry = "NO" CustomerUpdateParamsTaxIDCountryNz CustomerUpdateParamsTaxIDCountry = "NZ" CustomerUpdateParamsTaxIDCountryOm CustomerUpdateParamsTaxIDCountry = "OM" CustomerUpdateParamsTaxIDCountryPe CustomerUpdateParamsTaxIDCountry = "PE" CustomerUpdateParamsTaxIDCountryPh CustomerUpdateParamsTaxIDCountry = "PH" CustomerUpdateParamsTaxIDCountryPl CustomerUpdateParamsTaxIDCountry = "PL" CustomerUpdateParamsTaxIDCountryPt CustomerUpdateParamsTaxIDCountry = "PT" CustomerUpdateParamsTaxIDCountryRo CustomerUpdateParamsTaxIDCountry = "RO" CustomerUpdateParamsTaxIDCountryRs CustomerUpdateParamsTaxIDCountry = "RS" CustomerUpdateParamsTaxIDCountryRu CustomerUpdateParamsTaxIDCountry = "RU" CustomerUpdateParamsTaxIDCountrySa CustomerUpdateParamsTaxIDCountry = "SA" CustomerUpdateParamsTaxIDCountrySe CustomerUpdateParamsTaxIDCountry = "SE" CustomerUpdateParamsTaxIDCountrySg CustomerUpdateParamsTaxIDCountry = "SG" CustomerUpdateParamsTaxIDCountrySi CustomerUpdateParamsTaxIDCountry = "SI" CustomerUpdateParamsTaxIDCountrySk CustomerUpdateParamsTaxIDCountry = "SK" CustomerUpdateParamsTaxIDCountrySv CustomerUpdateParamsTaxIDCountry = "SV" CustomerUpdateParamsTaxIDCountryTh CustomerUpdateParamsTaxIDCountry = "TH" CustomerUpdateParamsTaxIDCountryTr CustomerUpdateParamsTaxIDCountry = "TR" CustomerUpdateParamsTaxIDCountryTw CustomerUpdateParamsTaxIDCountry = "TW" CustomerUpdateParamsTaxIDCountryUa CustomerUpdateParamsTaxIDCountry = "UA" CustomerUpdateParamsTaxIDCountryUs CustomerUpdateParamsTaxIDCountry = "US" CustomerUpdateParamsTaxIDCountryUy CustomerUpdateParamsTaxIDCountry = "UY" CustomerUpdateParamsTaxIDCountryVe CustomerUpdateParamsTaxIDCountry = "VE" CustomerUpdateParamsTaxIDCountryVn CustomerUpdateParamsTaxIDCountry = "VN" CustomerUpdateParamsTaxIDCountryZa CustomerUpdateParamsTaxIDCountry = "ZA" )
func (CustomerUpdateParamsTaxIDCountry) IsKnown ¶ added in v0.24.0
func (r CustomerUpdateParamsTaxIDCountry) IsKnown() bool
type CustomerUpdateParamsTaxIDType ¶ added in v0.2.0
type CustomerUpdateParamsTaxIDType string
const ( CustomerUpdateParamsTaxIDTypeAdNrt CustomerUpdateParamsTaxIDType = "ad_nrt" CustomerUpdateParamsTaxIDTypeAeTrn CustomerUpdateParamsTaxIDType = "ae_trn" CustomerUpdateParamsTaxIDTypeArCuit CustomerUpdateParamsTaxIDType = "ar_cuit" CustomerUpdateParamsTaxIDTypeEuVat CustomerUpdateParamsTaxIDType = "eu_vat" CustomerUpdateParamsTaxIDTypeAuAbn CustomerUpdateParamsTaxIDType = "au_abn" CustomerUpdateParamsTaxIDTypeAuArn CustomerUpdateParamsTaxIDType = "au_arn" CustomerUpdateParamsTaxIDTypeBgUic CustomerUpdateParamsTaxIDType = "bg_uic" CustomerUpdateParamsTaxIDTypeBhVat CustomerUpdateParamsTaxIDType = "bh_vat" CustomerUpdateParamsTaxIDTypeBoTin CustomerUpdateParamsTaxIDType = "bo_tin" CustomerUpdateParamsTaxIDTypeBrCnpj CustomerUpdateParamsTaxIDType = "br_cnpj" CustomerUpdateParamsTaxIDTypeBrCpf CustomerUpdateParamsTaxIDType = "br_cpf" CustomerUpdateParamsTaxIDTypeCaBn CustomerUpdateParamsTaxIDType = "ca_bn" CustomerUpdateParamsTaxIDTypeCaGstHst CustomerUpdateParamsTaxIDType = "ca_gst_hst" CustomerUpdateParamsTaxIDTypeCaPstBc CustomerUpdateParamsTaxIDType = "ca_pst_bc" CustomerUpdateParamsTaxIDTypeCaPstMB CustomerUpdateParamsTaxIDType = "ca_pst_mb" CustomerUpdateParamsTaxIDTypeCaPstSk CustomerUpdateParamsTaxIDType = "ca_pst_sk" CustomerUpdateParamsTaxIDTypeCaQst CustomerUpdateParamsTaxIDType = "ca_qst" CustomerUpdateParamsTaxIDTypeChVat CustomerUpdateParamsTaxIDType = "ch_vat" CustomerUpdateParamsTaxIDTypeClTin CustomerUpdateParamsTaxIDType = "cl_tin" CustomerUpdateParamsTaxIDTypeCnTin CustomerUpdateParamsTaxIDType = "cn_tin" CustomerUpdateParamsTaxIDTypeCoNit CustomerUpdateParamsTaxIDType = "co_nit" CustomerUpdateParamsTaxIDTypeCrTin CustomerUpdateParamsTaxIDType = "cr_tin" CustomerUpdateParamsTaxIDTypeDoRcn CustomerUpdateParamsTaxIDType = "do_rcn" CustomerUpdateParamsTaxIDTypeEcRuc CustomerUpdateParamsTaxIDType = "ec_ruc" CustomerUpdateParamsTaxIDTypeEgTin CustomerUpdateParamsTaxIDType = "eg_tin" CustomerUpdateParamsTaxIDTypeEsCif CustomerUpdateParamsTaxIDType = "es_cif" CustomerUpdateParamsTaxIDTypeEuOssVat CustomerUpdateParamsTaxIDType = "eu_oss_vat" CustomerUpdateParamsTaxIDTypeGBVat CustomerUpdateParamsTaxIDType = "gb_vat" CustomerUpdateParamsTaxIDTypeGeVat CustomerUpdateParamsTaxIDType = "ge_vat" CustomerUpdateParamsTaxIDTypeHkBr CustomerUpdateParamsTaxIDType = "hk_br" CustomerUpdateParamsTaxIDTypeHuTin CustomerUpdateParamsTaxIDType = "hu_tin" CustomerUpdateParamsTaxIDTypeIDNpwp CustomerUpdateParamsTaxIDType = "id_npwp" CustomerUpdateParamsTaxIDTypeIlVat CustomerUpdateParamsTaxIDType = "il_vat" CustomerUpdateParamsTaxIDTypeInGst CustomerUpdateParamsTaxIDType = "in_gst" CustomerUpdateParamsTaxIDTypeIsVat CustomerUpdateParamsTaxIDType = "is_vat" CustomerUpdateParamsTaxIDTypeJpCn CustomerUpdateParamsTaxIDType = "jp_cn" CustomerUpdateParamsTaxIDTypeJpRn CustomerUpdateParamsTaxIDType = "jp_rn" CustomerUpdateParamsTaxIDTypeJpTrn CustomerUpdateParamsTaxIDType = "jp_trn" CustomerUpdateParamsTaxIDTypeKePin CustomerUpdateParamsTaxIDType = "ke_pin" CustomerUpdateParamsTaxIDTypeKrBrn CustomerUpdateParamsTaxIDType = "kr_brn" CustomerUpdateParamsTaxIDTypeKzBin CustomerUpdateParamsTaxIDType = "kz_bin" CustomerUpdateParamsTaxIDTypeLiUid CustomerUpdateParamsTaxIDType = "li_uid" CustomerUpdateParamsTaxIDTypeMxRfc CustomerUpdateParamsTaxIDType = "mx_rfc" CustomerUpdateParamsTaxIDTypeMyFrp CustomerUpdateParamsTaxIDType = "my_frp" CustomerUpdateParamsTaxIDTypeMyItn CustomerUpdateParamsTaxIDType = "my_itn" CustomerUpdateParamsTaxIDTypeMySst CustomerUpdateParamsTaxIDType = "my_sst" CustomerUpdateParamsTaxIDTypeNgTin CustomerUpdateParamsTaxIDType = "ng_tin" CustomerUpdateParamsTaxIDTypeNoVat CustomerUpdateParamsTaxIDType = "no_vat" CustomerUpdateParamsTaxIDTypeNoVoec CustomerUpdateParamsTaxIDType = "no_voec" CustomerUpdateParamsTaxIDTypeNzGst CustomerUpdateParamsTaxIDType = "nz_gst" CustomerUpdateParamsTaxIDTypeOmVat CustomerUpdateParamsTaxIDType = "om_vat" CustomerUpdateParamsTaxIDTypePeRuc CustomerUpdateParamsTaxIDType = "pe_ruc" CustomerUpdateParamsTaxIDTypePhTin CustomerUpdateParamsTaxIDType = "ph_tin" CustomerUpdateParamsTaxIDTypeRoTin CustomerUpdateParamsTaxIDType = "ro_tin" CustomerUpdateParamsTaxIDTypeRsPib CustomerUpdateParamsTaxIDType = "rs_pib" CustomerUpdateParamsTaxIDTypeRuInn CustomerUpdateParamsTaxIDType = "ru_inn" CustomerUpdateParamsTaxIDTypeRuKpp CustomerUpdateParamsTaxIDType = "ru_kpp" CustomerUpdateParamsTaxIDTypeSaVat CustomerUpdateParamsTaxIDType = "sa_vat" CustomerUpdateParamsTaxIDTypeSgGst CustomerUpdateParamsTaxIDType = "sg_gst" CustomerUpdateParamsTaxIDTypeSgUen CustomerUpdateParamsTaxIDType = "sg_uen" CustomerUpdateParamsTaxIDTypeSiTin CustomerUpdateParamsTaxIDType = "si_tin" CustomerUpdateParamsTaxIDTypeSvNit CustomerUpdateParamsTaxIDType = "sv_nit" CustomerUpdateParamsTaxIDTypeThVat CustomerUpdateParamsTaxIDType = "th_vat" CustomerUpdateParamsTaxIDTypeTrTin CustomerUpdateParamsTaxIDType = "tr_tin" CustomerUpdateParamsTaxIDTypeTwVat CustomerUpdateParamsTaxIDType = "tw_vat" CustomerUpdateParamsTaxIDTypeUaVat CustomerUpdateParamsTaxIDType = "ua_vat" CustomerUpdateParamsTaxIDTypeUsEin CustomerUpdateParamsTaxIDType = "us_ein" CustomerUpdateParamsTaxIDTypeUyRuc CustomerUpdateParamsTaxIDType = "uy_ruc" CustomerUpdateParamsTaxIDTypeVeRif CustomerUpdateParamsTaxIDType = "ve_rif" CustomerUpdateParamsTaxIDTypeVnTin CustomerUpdateParamsTaxIDType = "vn_tin" CustomerUpdateParamsTaxIDTypeZaVat CustomerUpdateParamsTaxIDType = "za_vat" )
func (CustomerUpdateParamsTaxIDType) IsKnown ¶ added in v0.24.0
func (r CustomerUpdateParamsTaxIDType) IsKnown() bool
type DiscountAmountDiscount ¶ added in v0.2.0
type DiscountAmountDiscount = shared.DiscountAmountDiscount
This is an alias to an internal type.
type DiscountAmountDiscountDiscountType ¶ added in v0.2.0
type DiscountAmountDiscountDiscountType = shared.DiscountAmountDiscountDiscountType
This is an alias to an internal type.
type DiscountAmountDiscountParam ¶ added in v0.35.0
type DiscountAmountDiscountParam = shared.DiscountAmountDiscountParam
This is an alias to an internal type.
type DiscountDiscountType ¶
type DiscountDiscountType = shared.DiscountDiscountType
This is an alias to an internal type.
type DiscountPercentageDiscount ¶ added in v0.2.0
type DiscountPercentageDiscount = shared.DiscountPercentageDiscount
This is an alias to an internal type.
type DiscountPercentageDiscountDiscountType ¶ added in v0.2.0
type DiscountPercentageDiscountDiscountType = shared.DiscountPercentageDiscountDiscountType
This is an alias to an internal type.
type DiscountPercentageDiscountParam ¶ added in v0.35.0
type DiscountPercentageDiscountParam = shared.DiscountPercentageDiscountParam
This is an alias to an internal type.
type DiscountTrialDiscount ¶ added in v0.2.0
type DiscountTrialDiscount = shared.DiscountTrialDiscount
This is an alias to an internal type.
type DiscountTrialDiscountDiscountType ¶ added in v0.2.0
type DiscountTrialDiscountDiscountType = shared.DiscountTrialDiscountDiscountType
This is an alias to an internal type.
type DiscountTrialDiscountParam ¶ added in v0.35.0
type DiscountTrialDiscountParam = shared.DiscountTrialDiscountParam
This is an alias to an internal type.
type DiscountUnionParam ¶ added in v0.35.0
type DiscountUnionParam = shared.DiscountUnionParam
This is an alias to an internal type.
type DiscountUsageDiscount ¶ added in v0.2.0
type DiscountUsageDiscount = shared.DiscountUsageDiscount
This is an alias to an internal type.
type DiscountUsageDiscountDiscountType ¶ added in v0.2.0
type DiscountUsageDiscountDiscountType = shared.DiscountUsageDiscountDiscountType
This is an alias to an internal type.
type DiscountUsageDiscountParam ¶ added in v0.35.0
type DiscountUsageDiscountParam = shared.DiscountUsageDiscountParam
This is an alias to an internal type.
type ErrorStatus ¶ added in v0.32.0
type ErrorStatus = apierror.ErrorStatus
type EvaluatePriceGroup ¶ added in v0.12.0
type EvaluatePriceGroup struct { // The price's output for the group Amount string `json:"amount,required"` // The values for the group in the order specified by `grouping_keys` GroupingValues []EvaluatePriceGroupGroupingValuesUnion `json:"grouping_values,required"` // The price's usage quantity for the group Quantity float64 `json:"quantity,required"` JSON evaluatePriceGroupJSON `json:"-"` }
func (*EvaluatePriceGroup) UnmarshalJSON ¶ added in v0.12.0
func (r *EvaluatePriceGroup) UnmarshalJSON(data []byte) (err error)
type EvaluatePriceGroupGroupingValuesUnion ¶ added in v0.25.0
type EvaluatePriceGroupGroupingValuesUnion interface {
ImplementsEvaluatePriceGroupGroupingValuesUnion()
}
Union satisfied by shared.UnionString, shared.UnionFloat or shared.UnionBool.
type EventBackfillCloseResponse ¶
type EventBackfillCloseResponse 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"` // 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 EventBackfillCloseResponseStatus `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](../guides/extensibility/advanced-metrics#computed-properties) // used to filter the set of events to deprecate DeprecationFilter string `json:"deprecation_filter,nullable"` JSON eventBackfillCloseResponseJSON `json:"-"` }
A backfill represents an update to historical usage data, adding or replacing events in a timeframe.
func (*EventBackfillCloseResponse) UnmarshalJSON ¶
func (r *EventBackfillCloseResponse) UnmarshalJSON(data []byte) (err error)
type EventBackfillCloseResponseStatus ¶
type EventBackfillCloseResponseStatus string
The status of the backfill.
const ( EventBackfillCloseResponseStatusPending EventBackfillCloseResponseStatus = "pending" EventBackfillCloseResponseStatusReflected EventBackfillCloseResponseStatus = "reflected" EventBackfillCloseResponseStatusPendingRevert EventBackfillCloseResponseStatus = "pending_revert" EventBackfillCloseResponseStatusReverted EventBackfillCloseResponseStatus = "reverted" )
func (EventBackfillCloseResponseStatus) IsKnown ¶ added in v0.24.0
func (r EventBackfillCloseResponseStatus) IsKnown() bool
type EventBackfillFetchResponse ¶
type EventBackfillFetchResponse 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"` // 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 EventBackfillFetchResponseStatus `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](../guides/extensibility/advanced-metrics#computed-properties) // used to filter the set of events to deprecate DeprecationFilter string `json:"deprecation_filter,nullable"` JSON eventBackfillFetchResponseJSON `json:"-"` }
A backfill represents an update to historical usage data, adding or replacing events in a timeframe.
func (*EventBackfillFetchResponse) UnmarshalJSON ¶
func (r *EventBackfillFetchResponse) UnmarshalJSON(data []byte) (err error)
type EventBackfillFetchResponseStatus ¶
type EventBackfillFetchResponseStatus string
The status of the backfill.
const ( EventBackfillFetchResponseStatusPending EventBackfillFetchResponseStatus = "pending" EventBackfillFetchResponseStatusReflected EventBackfillFetchResponseStatus = "reflected" EventBackfillFetchResponseStatusPendingRevert EventBackfillFetchResponseStatus = "pending_revert" EventBackfillFetchResponseStatusReverted EventBackfillFetchResponseStatus = "reverted" )
func (EventBackfillFetchResponseStatus) IsKnown ¶ added in v0.24.0
func (r EventBackfillFetchResponseStatus) IsKnown() bool
type EventBackfillListParams ¶
type EventBackfillListParams struct { // Cursor for pagination. This can be populated by the `next_cursor` value returned // from the initial request. Cursor param.Field[string] `query:"cursor"` // The number of items to fetch. Defaults to 20. Limit param.Field[int64] `query:"limit"` }
func (EventBackfillListParams) URLQuery ¶
func (r EventBackfillListParams) URLQuery() (v url.Values)
URLQuery serializes EventBackfillListParams's query parameters as `url.Values`.
type EventBackfillListResponse ¶
type EventBackfillListResponse 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"` // 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 EventBackfillListResponseStatus `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](../guides/extensibility/advanced-metrics#computed-properties) // used to filter the set of events to deprecate DeprecationFilter string `json:"deprecation_filter,nullable"` JSON eventBackfillListResponseJSON `json:"-"` }
A backfill represents an update to historical usage data, adding or replacing events in a timeframe.
func (*EventBackfillListResponse) UnmarshalJSON ¶
func (r *EventBackfillListResponse) UnmarshalJSON(data []byte) (err error)
type EventBackfillListResponseStatus ¶
type EventBackfillListResponseStatus string
The status of the backfill.
const ( EventBackfillListResponseStatusPending EventBackfillListResponseStatus = "pending" EventBackfillListResponseStatusReflected EventBackfillListResponseStatus = "reflected" EventBackfillListResponseStatusPendingRevert EventBackfillListResponseStatus = "pending_revert" EventBackfillListResponseStatusReverted EventBackfillListResponseStatus = "reverted" )
func (EventBackfillListResponseStatus) IsKnown ¶ added in v0.24.0
func (r EventBackfillListResponseStatus) IsKnown() bool
type EventBackfillNewParams ¶
type EventBackfillNewParams struct { // The (exclusive) end of the usage timeframe affected by this backfill. TimeframeEnd param.Field[time.Time] `json:"timeframe_end,required" format:"date-time"` // The (inclusive) start of the usage timeframe affected by this backfill. TimeframeStart param.Field[time.Time] `json:"timeframe_start,required" format:"date-time"` // The time at which no more events will be accepted for this backfill. The // backfill will automatically begin reflecting throughout Orb at the close time. // If not specified, it will default to 1 day after the creation of the backfill. CloseTime param.Field[time.Time] `json:"close_time" format:"date-time"` // The Orb-generated ID of the customer to which this backfill is scoped. Omitting // this field will scope the backfill to all customers. CustomerID param.Field[string] `json:"customer_id"` // A boolean // [computed property](../guides/extensibility/advanced-metrics#computed-properties) // used to filter the set of events to deprecate DeprecationFilter param.Field[string] `json:"deprecation_filter"` // The external customer ID of the customer to which this backfill is scoped. // Omitting this field will scope the backfill to all customers. ExternalCustomerID param.Field[string] `json:"external_customer_id"` // If true, replaces all existing events in the timeframe with the newly ingested // events. If false, adds the newly ingested events to the existing events. ReplaceExistingEvents param.Field[bool] `json:"replace_existing_events"` }
func (EventBackfillNewParams) MarshalJSON ¶
func (r EventBackfillNewParams) MarshalJSON() (data []byte, err error)
type EventBackfillNewResponse ¶
type EventBackfillNewResponse 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"` // 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 EventBackfillNewResponseStatus `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](../guides/extensibility/advanced-metrics#computed-properties) // used to filter the set of events to deprecate DeprecationFilter string `json:"deprecation_filter,nullable"` JSON eventBackfillNewResponseJSON `json:"-"` }
A backfill represents an update to historical usage data, adding or replacing events in a timeframe.
func (*EventBackfillNewResponse) UnmarshalJSON ¶
func (r *EventBackfillNewResponse) UnmarshalJSON(data []byte) (err error)
type EventBackfillNewResponseStatus ¶
type EventBackfillNewResponseStatus string
The status of the backfill.
const ( EventBackfillNewResponseStatusPending EventBackfillNewResponseStatus = "pending" EventBackfillNewResponseStatusReflected EventBackfillNewResponseStatus = "reflected" EventBackfillNewResponseStatusPendingRevert EventBackfillNewResponseStatus = "pending_revert" EventBackfillNewResponseStatusReverted EventBackfillNewResponseStatus = "reverted" )
func (EventBackfillNewResponseStatus) IsKnown ¶ added in v0.24.0
func (r EventBackfillNewResponseStatus) IsKnown() bool
type EventBackfillRevertResponse ¶
type EventBackfillRevertResponse 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"` // 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 EventBackfillRevertResponseStatus `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](../guides/extensibility/advanced-metrics#computed-properties) // used to filter the set of events to deprecate DeprecationFilter string `json:"deprecation_filter,nullable"` JSON eventBackfillRevertResponseJSON `json:"-"` }
A backfill represents an update to historical usage data, adding or replacing events in a timeframe.
func (*EventBackfillRevertResponse) UnmarshalJSON ¶
func (r *EventBackfillRevertResponse) UnmarshalJSON(data []byte) (err error)
type EventBackfillRevertResponseStatus ¶
type EventBackfillRevertResponseStatus string
The status of the backfill.
const ( EventBackfillRevertResponseStatusPending EventBackfillRevertResponseStatus = "pending" EventBackfillRevertResponseStatusReflected EventBackfillRevertResponseStatus = "reflected" EventBackfillRevertResponseStatusPendingRevert EventBackfillRevertResponseStatus = "pending_revert" EventBackfillRevertResponseStatusReverted EventBackfillRevertResponseStatus = "reverted" )
func (EventBackfillRevertResponseStatus) IsKnown ¶ added in v0.24.0
func (r EventBackfillRevertResponseStatus) IsKnown() bool
type EventBackfillService ¶
type EventBackfillService struct {
Options []option.RequestOption
}
EventBackfillService contains methods and other services that help with interacting with the orb API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEventBackfillService method instead.
func NewEventBackfillService ¶
func NewEventBackfillService(opts ...option.RequestOption) (r *EventBackfillService)
NewEventBackfillService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*EventBackfillService) Close ¶
func (r *EventBackfillService) Close(ctx context.Context, backfillID string, opts ...option.RequestOption) (res *EventBackfillCloseResponse, err error)
Closing a backfill makes the updated usage visible in Orb. Upon closing a backfill, Orb will asynchronously reflect the updated usage in invoice amounts and usage graphs. Once all of the updates are complete, the backfill's status will transition to `reflected`.
func (*EventBackfillService) Fetch ¶
func (r *EventBackfillService) Fetch(ctx context.Context, backfillID string, opts ...option.RequestOption) (res *EventBackfillFetchResponse, err error)
This endpoint is used to fetch a backfill given an identifier.
func (*EventBackfillService) List ¶
func (r *EventBackfillService) List(ctx context.Context, query EventBackfillListParams, opts ...option.RequestOption) (res *pagination.Page[EventBackfillListResponse], err error)
This endpoint returns a list of all backfills in a list format.
The list of backfills is ordered starting from the most recently created backfill. The response also includes [`pagination_metadata`](../reference/pagination), which lets the caller retrieve the next page of results if they exist. More information about pagination can be found in the [Pagination-metadata schema](pagination).
func (*EventBackfillService) ListAutoPaging ¶
func (r *EventBackfillService) ListAutoPaging(ctx context.Context, query EventBackfillListParams, opts ...option.RequestOption) *pagination.PageAutoPager[EventBackfillListResponse]
This endpoint returns a list of all backfills in a list format.
The list of backfills is ordered starting from the most recently created backfill. The response also includes [`pagination_metadata`](../reference/pagination), which lets the caller retrieve the next page of results if they exist. More information about pagination can be found in the [Pagination-metadata schema](pagination).
func (*EventBackfillService) New ¶
func (r *EventBackfillService) New(ctx context.Context, body EventBackfillNewParams, opts ...option.RequestOption) (res *EventBackfillNewResponse, err error)
Creating the backfill enables adding or replacing past events, even those that are older than the ingestion grace period. Performing a backfill in Orb involves 3 steps:
- Create the backfill, specifying its parameters.
- [Ingest](ingest) usage events, referencing the backfill (query parameter `backfill_id`).
- [Close](close-backfill) the backfill, propagating the update in past usage throughout Orb.
Changes from a backfill are not reflected until the backfill is closed, so you won’t need to worry about your customers seeing partially updated usage data. Backfills are also reversible, so you’ll be able to revert a backfill if you’ve made a mistake.
This endpoint will return a backfill object, which contains an `id`. That `id` can then be used as the `backfill_id` query parameter to the event ingestion endpoint to associate ingested events with this backfill. The effects (e.g. updated usage graphs) of this backfill will not take place until the backfill is closed.
If the `replace_existing_events` is `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.
If a `customer_id` or `external_customer_id` is specified, the backfill will only affect events for that customer. If neither is specified, the backfill will affect all customers.
When `replace_existing_events` is `true`, the field `filter` can be optionally added which enables filtering using [computed properties](../guides/extensibility/advanced-metrics#computed-properties). The expressiveness of computed properties allows you to deprecate existing events based on both a period of time and specific property values.
func (*EventBackfillService) Revert ¶
func (r *EventBackfillService) Revert(ctx context.Context, backfillID string, opts ...option.RequestOption) (res *EventBackfillRevertResponse, err error)
Reverting a backfill undoes all the effects of closing the backfill. If the backfill is reflected, the status will transition to `pending_revert` while the effects of the backfill are undone. Once all effects are undone, the backfill will transition to `reverted`.
If a backfill is reverted before its closed, no usage will be updated as a result of the backfill and it will immediately transition to `reverted`.
type EventDeprecateResponse ¶
type EventDeprecateResponse struct { // event_id of the deprecated event, if successfully updated Deprecated string `json:"deprecated,required"` JSON eventDeprecateResponseJSON `json:"-"` }
func (*EventDeprecateResponse) UnmarshalJSON ¶
func (r *EventDeprecateResponse) UnmarshalJSON(data []byte) (err error)
type EventIngestParams ¶
type EventIngestParams struct { Events param.Field[[]EventIngestParamsEvent] `json:"events,required"` // If this ingestion request is part of a backfill, this parameter ties the // ingested events to the backfill BackfillID param.Field[string] `query:"backfill_id"` // Flag to enable additional debug information in the endpoint response Debug param.Field[bool] `query:"debug"` }
func (EventIngestParams) MarshalJSON ¶
func (r EventIngestParams) MarshalJSON() (data []byte, err error)
func (EventIngestParams) URLQuery ¶
func (r EventIngestParams) URLQuery() (v url.Values)
URLQuery serializes EventIngestParams's query parameters as `url.Values`.
type EventIngestParamsEvent ¶
type EventIngestParamsEvent struct { // A name to meaningfully identify the action or event type. EventName param.Field[string] `json:"event_name,required"` // A unique value, generated by the client, that is used to de-duplicate events. // Exactly one event with a given idempotency key will be ingested, which allows // for safe request retries. IdempotencyKey param.Field[string] `json:"idempotency_key,required"` // A dictionary of custom properties. Values in this dictionary must be numeric, // boolean, or strings. Nested dictionaries are disallowed. Properties param.Field[interface{}] `json:"properties,required"` // An ISO 8601 format date with no timezone offset (i.e. UTC). This should // represent the time that usage was recorded, and is particularly important to // attribute usage to a given billing period. Timestamp param.Field[time.Time] `json:"timestamp,required" format:"date-time"` // The Orb Customer identifier CustomerID param.Field[string] `json:"customer_id"` // An alias for the Orb customer, whose mapping is specified when creating the // customer ExternalCustomerID param.Field[string] `json:"external_customer_id"` }
func (EventIngestParamsEvent) MarshalJSON ¶
func (r EventIngestParamsEvent) MarshalJSON() (data []byte, err error)
type EventIngestResponse ¶
type EventIngestResponse struct { // Contains all failing validation events. In the case of a 200, this array will // always be empty. This field will always be present. ValidationFailed []EventIngestResponseValidationFailed `json:"validation_failed,required"` // Optional debug information (only present when debug=true is passed to the // endpoint). Contains ingested and duplicate event idempotency keys. Debug EventIngestResponseDebug `json:"debug,nullable"` JSON eventIngestResponseJSON `json:"-"` }
func (*EventIngestResponse) UnmarshalJSON ¶
func (r *EventIngestResponse) UnmarshalJSON(data []byte) (err error)
type EventIngestResponseDebug ¶
type EventIngestResponseDebug struct { Duplicate []string `json:"duplicate,required"` Ingested []string `json:"ingested,required"` JSON eventIngestResponseDebugJSON `json:"-"` }
Optional debug information (only present when debug=true is passed to the endpoint). Contains ingested and duplicate event idempotency keys.
func (*EventIngestResponseDebug) UnmarshalJSON ¶
func (r *EventIngestResponseDebug) UnmarshalJSON(data []byte) (err error)
type EventIngestResponseValidationFailed ¶
type EventIngestResponseValidationFailed struct { // The passed idempotency_key corresponding to the validation_errors IdempotencyKey string `json:"idempotency_key,required"` // An array of strings corresponding to validation failures for this // idempotency_key. ValidationErrors []string `json:"validation_errors,required"` JSON eventIngestResponseValidationFailedJSON `json:"-"` }
func (*EventIngestResponseValidationFailed) UnmarshalJSON ¶
func (r *EventIngestResponseValidationFailed) UnmarshalJSON(data []byte) (err error)
type EventSearchParams ¶
type EventSearchParams struct { // This is an explicit array of IDs to filter by. Note that an event's ID is the // idempotency_key that was originally used for ingestion, and this only supports // events that have not been amended. Values in this array will be treated case // sensitively. EventIDs param.Field[[]string] `json:"event_ids,required"` // The end of the timeframe, exclusive, in which to search events. If not // specified, the current time is used. TimeframeEnd param.Field[time.Time] `json:"timeframe_end" format:"date-time"` // The start of the timeframe, inclusive, in which to search events. If not // specified, the one week ago is used. TimeframeStart param.Field[time.Time] `json:"timeframe_start" format:"date-time"` }
func (EventSearchParams) MarshalJSON ¶
func (r EventSearchParams) MarshalJSON() (data []byte, err error)
type EventSearchResponse ¶
type EventSearchResponse struct { Data []EventSearchResponseData `json:"data,required"` JSON eventSearchResponseJSON `json:"-"` }
func (*EventSearchResponse) UnmarshalJSON ¶
func (r *EventSearchResponse) UnmarshalJSON(data []byte) (err error)
type EventSearchResponseData ¶
type EventSearchResponseData struct { // A unique value, generated by the client, that is used to de-duplicate events. // Exactly one event with a given idempotency key will be ingested, which allows // for safe request retries. ID string `json:"id,required"` // The Orb Customer identifier CustomerID string `json:"customer_id,required,nullable"` // A boolean indicating whether the event is currently deprecated. Deprecated bool `json:"deprecated,required"` // A name to meaningfully identify the action or event type. EventName string `json:"event_name,required"` // An alias for the Orb customer, whose mapping is specified when creating the // customer ExternalCustomerID string `json:"external_customer_id,required,nullable"` // A dictionary of custom properties. Values in this dictionary must be numeric, // boolean, or strings. Nested dictionaries are disallowed. Properties interface{} `json:"properties,required"` // An ISO 8601 format date with no timezone offset (i.e. UTC). This should // represent the time that usage was recorded, and is particularly important to // attribute usage to a given billing period. Timestamp time.Time `json:"timestamp,required" format:"date-time"` JSON eventSearchResponseDataJSON `json:"-"` }
The [Event](../guides/core-concepts.mdx#event) resource represents a usage event that has been created for a customer. Events are the core of Orb's usage-based billing model, and are used to calculate the usage charges for a given billing period.
func (*EventSearchResponseData) UnmarshalJSON ¶
func (r *EventSearchResponseData) UnmarshalJSON(data []byte) (err error)
type EventService ¶
type EventService struct { Options []option.RequestOption Backfills *EventBackfillService }
EventService contains methods and other services that help with interacting with the orb API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEventService method instead.
func NewEventService ¶
func NewEventService(opts ...option.RequestOption) (r *EventService)
NewEventService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*EventService) Deprecate ¶
func (r *EventService) Deprecate(ctx context.Context, eventID string, opts ...option.RequestOption) (res *EventDeprecateResponse, err error)
This endpoint is used to deprecate a single usage event with a given `event_id`. `event_id` refers to the `idempotency_key` passed in during ingestion.
This endpoint will mark the existing event as ignored. Note that if you attempt to re-ingest an event with the same `event_id` as a deprecated event, Orb will return an error.
This is a powerful and audit-safe mechanism to retroactively deprecate a single event in cases where you need to:
- no longer bill for an event that was improperly reported
- no longer bill for an event based on the result of an external API call (e.g. call to a payment gateway failed and the user should not be billed)
If you want to only change specific properties of an event, but keep the event as part of the billing calculation, use the [Amend single event](amend-event) endpoint instead.
This API is always audit-safe. The process will still retain the deprecated event, though it will be ignored for billing calculations. For auditing and data fidelity purposes, Orb never overwrites or permanently deletes ingested usage data.
## Request validation
- Orb does not accept an `idempotency_key` with the event in this endpoint, since this request is by design idempotent. On retryable errors, you should retry the request and assume the deprecation operation has not succeeded until receipt of a 2xx.
- The event's `timestamp` must fall within the customer's current subscription's billing period, or within the grace period of the customer's current subscription's previous billing period. Orb does not allow deprecating events for billing periods that have already invoiced customers.
- The `customer_id` or the `external_customer_id` of the original event ingestion request must identify a Customer resource within Orb, even if this event was ingested during the initial integration period. We do not allow deprecating events for customers not in the Orb system.
- By default, no more than 100 events can be deprecated for a single customer in a 100 day period. For higher volume updates, consider using the [event backfill](create-backfill) endpoint.
func (*EventService) Ingest ¶
func (r *EventService) Ingest(ctx context.Context, params EventIngestParams, opts ...option.RequestOption) (res *EventIngestResponse, err error)
Orb's event ingestion model and API is designed around two core principles:
- **Data fidelity**: The accuracy of your billing model depends on a robust foundation of events. Orb's API protocol encourages usage patterns that ensure that your data is consistently complete and correct.
- **Fast integration**: Sending events into Orb requires no tedious setup steps or explicit field schema for your event shape, making it instant to start streaming in usage in real-time.
## Event shape
Events are the starting point for all usage calculations in the system, and are simple at their core:
```ts
{ // customer_id and external_customer_id are used to // attribute usage to a given Customer. Exactly one of these // should be specified in a given ingestion event. // `customer_id` is the Orb generated identifier for the Customer, // which is returned from the Create customer API call. customer_id: string, // external_customer_id is an alternate identifier which is associated // with a Customer at creation time. This is treated as an alias for // customer_id, and is usually set to an identifier native to your system. external_customer_id: string, // A string name identifying the event, usually a usage // action. By convention, this should not contain any whitespace. event_name: string, // An ISO 8601 format date with no timezone offset. // This should represent the time that usage occurred // and is important to attribute usage to a given // billing period. See the notes below on determining the timestamp. // e.g. 2020-12-09T16:09:53Z timestamp: string, // A unique value, generated by the client, that is // used to de-duplicate events. // Exactly one event with a given // idempotency key will be ingested, which allows for // safe request retries. idempotency_key: string // Optional custom metadata to attach to the event. // This might include a numeric value used for aggregation, // or a string/boolean value used for filtering. // The schema of this dictionary need not be pre-declared, and // properties can be added at any time. properties: { [key: string]?: string | number | boolean, }, }
```
## Required fields
Because events streamed to Orb are meant to be as flexible as possible, there are only a few required fields in every event.
- We recommend that `idempotency_key` are unique strings that you generated with V4 UUIDs, but only require that they uniquely identify an event (i.e. don’t collide).
- The `timestamp` field in the event body will be used to determine which billable period a given event falls into. For example, with a monthly billing cycle starting from the first of December, Orb will calculate metrics based on events that fall into the range `12-01 00:00:00 <= timestamp < 01-01 00:00:00`.
## Logging metadata
Orb allows tagging events with metadata using a flexible properties dictionary. Since Orb does not enforce a rigid schema for this field-set, key-value pairs can be added dynamically as your events evolve.
This dictionary can be helpful for a wide variety of use cases:
- Numeric properties on events like `compute_time_ms` can later be inputs to our flexible query engine to determine usage.
- Logging a region or cluster with each event can help you provide customers more granular visibility into their usage.
We encourage logging this metadata with an eye towards future use cases to ensure full coverage for historical data. The datatype of the value in the properties dictionary is important for metric creation from an event source. Values that you wish to numerically aggregate should be of numeric type in the event.
## Determining event timestamp
For cases where usage is being reported in real time as it is occurring, timestamp should correspond to the time that usage occurred.
In cases where usage is reported in aggregate for a historical timeframe at a regular interval, we recommend setting the event `timestamp` to the midpoint of the interval. As an example, if you have an hourly reporter that sends data once an hour for the previous hour of usage, setting the `timestamp` to the half-hour mark will ensure that the usage is counted within the correct period.
Note that other time-related fields (e.g. time elapsed) can be added to the properties dictionary as necessary.
In cases where usage is reported in aggregate for a historical timeframe, the timestamp must be within the grace period set for your account. Events with `timestamp < current_time - grace_period` will not be accepted as a valid event, and will throw validation errors. Enforcing the grace period enables Orb to accurately map usage to the correct billing cycle and ensure that all usage is billed for in the corresponding billing period.
In general, Orb does not expect events with future dated timestamps. In cases where the timestamp is at least 24 hours ahead of the current time, the event will not be accepted as a valid event, and will throw validation errors.
## Event validation
Orb’s validation ensures that you recognize errors in your events as quickly as possible, and the API provides informative error messages to help you fix problems quickly.
We validate the following:
- Exactly one of `customer_id` and `external_customer_id` should be specified.
- If the `customer_id` is specified, the customer in Orb must exist.
- If the `external_customer_id` is specified, the customer in Orb does not need to exist. Events will be attributed to any future customers with the `external_customer_id` on subscription creation.
- `timestamp` must conform to ISO 8601 and represent a timestamp at most 1 hour in the future. This timestamp should be sent in UTC timezone (no timezone offset).
## Idempotency and retry semantics
Orb's idempotency guarantees allow you to implement safe retry logic in the event of network or machine failures, ensuring data fidelity. Each event in the request payload is associated with an idempotency key, and Orb guarantees that a single idempotency key will be successfully ingested at most once. Note that when Orb encounters events with duplicate idempotency keys and differing event bodies in a batch of events, the entire batch will be rejected.
- Successful responses return a 200 HTTP status code. The response contains information about previously processed events.
- Requests that return a `4xx` HTTP status code indicate a payload error and contain at least one event with a validation failure. An event with a validation failure can be re-sent to the ingestion endpoint (after the payload is fixed) with the original idempotency key since that key is not marked as processed.
- Requests that return a `5xx` HTTP status code indicate a server-side failure. These requests should be retried in their entirety.
## API usage and limits
The ingestion API is designed made for real-time streaming ingestion and architected for high throughput. Even if events are later deemed unnecessary or filtered out, we encourage you to log them to Orb if they may be relevant to billing calculations in the future.
To take advantage of the real-time features of the Orb platform and avoid any chance of dropped events by producers, we recommend reporting events to Orb frequently. Optionally, events can also be briefly aggregated at the source, as this API accepts an array of event bodies.
Orb does not currently enforce a hard rate-limit for API usage or a maximum request payload size, but please give us a heads up if you’re changing either of these factors by an order of magnitude from initial setup.
## Testing in debug mode
The ingestion API supports a debug mode, which returns additional verbose output to indicate which event idempotency keys were newly ingested or duplicates from previous requests. To enable this mode, mark `debug=true` as a query parameter.
If `debug=true` is not specified, the response will only contain `validation_failed`. Orb will still honor the idempotency guarantees set [here](../guides/events-and-metrics/event-ingestion#event-volume-and-concurrency) in all cases.
We strongly recommend that you only use debug mode as part of testing your initial Orb integration. Once you're ready to switch to production, disable debug mode to take advantage of improved performance and maximal throughput.
#### Example: ingestion response with `debug=true`
```json
{ "debug": { "duplicate": [], "ingested": ["B7E83HDMfJPAunXW", "SJs5DQJ3TnwSqEZE", "8SivfDsNKwCeAXim"] }, "validation_failed": [] }
```
#### Example: ingestion response with `debug=false`
```json
{ "validation_failed": [] }
```
func (*EventService) Search ¶
func (r *EventService) Search(ctx context.Context, body EventSearchParams, opts ...option.RequestOption) (res *EventSearchResponse, err error)
This endpoint returns a filtered set of events for an account in a [paginated list format](../reference/pagination).
Note that this is a `POST` endpoint rather than a `GET` endpoint because it employs a JSON body for search criteria rather than query parameters, allowing for a more flexible search syntax.
Note that a search criteria _must_ be specified. Currently, Orb supports the following criteria:
- `event_ids`: This is an explicit array of IDs to filter by. Note that an event's ID is the `idempotency_key` that was originally used for ingestion.
By default, Orb will not throw a `404` if no events matched, Orb will return an empty array for `data` instead.
func (*EventService) Update ¶
func (r *EventService) Update(ctx context.Context, eventID string, body EventUpdateParams, opts ...option.RequestOption) (res *EventUpdateResponse, err error)
This endpoint is used to amend a single usage event with a given `event_id`. `event_id` refers to the `idempotency_key` passed in during ingestion. The event will maintain its existing `event_id` after the amendment.
This endpoint will mark the existing event as ignored, and Orb will only use the new event passed in the body of this request as the source of truth for that `event_id`. Note that a single event can be amended any number of times, so the same event can be overwritten in subsequent calls to this endpoint. Only a single event with a given `event_id` will be considered the source of truth at any given time.
This is a powerful and audit-safe mechanism to retroactively update a single event in cases where you need to:
- update an event with new metadata as you iterate on your pricing model
- update an event based on the result of an external API call (e.g. call to a payment gateway succeeded or failed)
This amendment API is always audit-safe. The process will still retain the original event, though it will be ignored for billing calculations. For auditing and data fidelity purposes, Orb never overwrites or permanently deletes ingested usage data.
## Request validation
- The `timestamp` of the new event must match the `timestamp` of the existing event already ingested. As with ingestion, all timestamps must be sent in ISO8601 format with UTC timezone offset.
- The `customer_id` or `external_customer_id` of the new event must match the `customer_id` or `external_customer_id` of the existing event already ingested. Exactly one of `customer_id` and `external_customer_id` should be specified, and similar to ingestion, the ID must identify a Customer resource within Orb. Unlike ingestion, for event amendment, we strictly enforce that the Customer must be in the Orb system, even during the initial integration period. We do not allow updating the `Customer` an event is associated with.
- Orb does not accept an `idempotency_key` with the event in this endpoint, since this request is by design idempotent. On retryable errors, you should retry the request and assume the amendment operation has not succeeded until receipt of a 2xx.
- The event's `timestamp` must fall within the customer's current subscription's billing period, or within the grace period of the customer's current subscription's previous billing period.
- By default, no more than 100 events can be amended for a single customer in a 100 day period. For higher volume updates, consider using the [event backfill](create-backfill) endpoint.
type EventUpdateParams ¶
type EventUpdateParams struct { // A name to meaningfully identify the action or event type. EventName param.Field[string] `json:"event_name,required"` // A dictionary of custom properties. Values in this dictionary must be numeric, // boolean, or strings. Nested dictionaries are disallowed. Properties param.Field[interface{}] `json:"properties,required"` // An ISO 8601 format date with no timezone offset (i.e. UTC). This should // represent the time that usage was recorded, and is particularly important to // attribute usage to a given billing period. Timestamp param.Field[time.Time] `json:"timestamp,required" format:"date-time"` // The Orb Customer identifier CustomerID param.Field[string] `json:"customer_id"` // An alias for the Orb customer, whose mapping is specified when creating the // customer ExternalCustomerID param.Field[string] `json:"external_customer_id"` }
func (EventUpdateParams) MarshalJSON ¶
func (r EventUpdateParams) MarshalJSON() (data []byte, err error)
type EventUpdateResponse ¶
type EventUpdateResponse struct { // event_id of the amended event, if successfully ingested Amended string `json:"amended,required"` JSON eventUpdateResponseJSON `json:"-"` }
func (*EventUpdateResponse) UnmarshalJSON ¶
func (r *EventUpdateResponse) UnmarshalJSON(data []byte) (err error)
type Invoice ¶
type Invoice 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 InvoiceAutoCollection `json:"auto_collection,required"` BillingAddress InvoiceBillingAddress `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 []InvoiceCreditNote `json:"credit_notes,required"` // An ISO 4217 currency string or `credits` Currency string `json:"currency,required"` Customer InvoiceCustomer `json:"customer,required"` CustomerBalanceTransactions []InvoiceCustomerBalanceTransaction `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 InvoiceCustomerTaxID `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. Discount InvoiceDiscount `json:"discount,required,nullable"` Discounts []InvoiceDiscount `json:"discounts,required"` // When the invoice payment is due. DueDate time.Time `json:"due_date,required" 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 InvoiceInvoiceSource `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 []InvoiceLineItem `json:"line_items,required"` Maximum InvoiceMaximum `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 InvoiceMinimum `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"` // 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 InvoiceShippingAddress `json:"shipping_address,required,nullable"` Status InvoiceStatus `json:"status,required"` Subscription InvoiceSubscription `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 invoiceJSON `json:"-"` }
An [`Invoice`](../guides/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 (*Invoice) UnmarshalJSON ¶
type InvoiceAutoCollection ¶
type InvoiceAutoCollection 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 invoiceAutoCollectionJSON `json:"-"` }
func (*InvoiceAutoCollection) UnmarshalJSON ¶
func (r *InvoiceAutoCollection) UnmarshalJSON(data []byte) (err error)
type InvoiceBillingAddress ¶
type InvoiceBillingAddress 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 invoiceBillingAddressJSON `json:"-"` }
func (*InvoiceBillingAddress) UnmarshalJSON ¶
func (r *InvoiceBillingAddress) UnmarshalJSON(data []byte) (err error)
type InvoiceCreditNote ¶
type InvoiceCreditNote 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 invoiceCreditNoteJSON `json:"-"` }
func (*InvoiceCreditNote) UnmarshalJSON ¶
func (r *InvoiceCreditNote) UnmarshalJSON(data []byte) (err error)
type InvoiceCustomer ¶
type InvoiceCustomer struct { ID string `json:"id,required"` ExternalCustomerID string `json:"external_customer_id,required,nullable"` JSON invoiceCustomerJSON `json:"-"` }
func (*InvoiceCustomer) UnmarshalJSON ¶
func (r *InvoiceCustomer) UnmarshalJSON(data []byte) (err error)
type InvoiceCustomerBalanceTransaction ¶
type InvoiceCustomerBalanceTransaction struct { // A unique id for this transaction. ID string `json:"id,required"` Action InvoiceCustomerBalanceTransactionsAction `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 InvoiceCustomerBalanceTransactionsCreditNote `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 InvoiceCustomerBalanceTransactionsInvoice `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 InvoiceCustomerBalanceTransactionsType `json:"type,required"` JSON invoiceCustomerBalanceTransactionJSON `json:"-"` }
func (*InvoiceCustomerBalanceTransaction) UnmarshalJSON ¶
func (r *InvoiceCustomerBalanceTransaction) UnmarshalJSON(data []byte) (err error)
type InvoiceCustomerBalanceTransactionsAction ¶
type InvoiceCustomerBalanceTransactionsAction string
const ( InvoiceCustomerBalanceTransactionsActionAppliedToInvoice InvoiceCustomerBalanceTransactionsAction = "applied_to_invoice" InvoiceCustomerBalanceTransactionsActionManualAdjustment InvoiceCustomerBalanceTransactionsAction = "manual_adjustment" InvoiceCustomerBalanceTransactionsActionProratedRefund InvoiceCustomerBalanceTransactionsAction = "prorated_refund" InvoiceCustomerBalanceTransactionsActionRevertProratedRefund InvoiceCustomerBalanceTransactionsAction = "revert_prorated_refund" InvoiceCustomerBalanceTransactionsActionReturnFromVoiding InvoiceCustomerBalanceTransactionsAction = "return_from_voiding" InvoiceCustomerBalanceTransactionsActionCreditNoteApplied InvoiceCustomerBalanceTransactionsAction = "credit_note_applied" InvoiceCustomerBalanceTransactionsActionCreditNoteVoided InvoiceCustomerBalanceTransactionsAction = "credit_note_voided" InvoiceCustomerBalanceTransactionsActionOverpaymentRefund InvoiceCustomerBalanceTransactionsAction = "overpayment_refund" )
func (InvoiceCustomerBalanceTransactionsAction) IsKnown ¶ added in v0.24.0
func (r InvoiceCustomerBalanceTransactionsAction) IsKnown() bool
type InvoiceCustomerBalanceTransactionsCreditNote ¶
type InvoiceCustomerBalanceTransactionsCreditNote struct { // The id of the Credit note ID string `json:"id,required"` JSON invoiceCustomerBalanceTransactionsCreditNoteJSON `json:"-"` }
func (*InvoiceCustomerBalanceTransactionsCreditNote) UnmarshalJSON ¶
func (r *InvoiceCustomerBalanceTransactionsCreditNote) UnmarshalJSON(data []byte) (err error)
type InvoiceCustomerBalanceTransactionsInvoice ¶
type InvoiceCustomerBalanceTransactionsInvoice struct { // The Invoice id ID string `json:"id,required"` JSON invoiceCustomerBalanceTransactionsInvoiceJSON `json:"-"` }
func (*InvoiceCustomerBalanceTransactionsInvoice) UnmarshalJSON ¶
func (r *InvoiceCustomerBalanceTransactionsInvoice) UnmarshalJSON(data []byte) (err error)
type InvoiceCustomerBalanceTransactionsType ¶
type InvoiceCustomerBalanceTransactionsType string
const ( InvoiceCustomerBalanceTransactionsTypeIncrement InvoiceCustomerBalanceTransactionsType = "increment" InvoiceCustomerBalanceTransactionsTypeDecrement InvoiceCustomerBalanceTransactionsType = "decrement" )
func (InvoiceCustomerBalanceTransactionsType) IsKnown ¶ added in v0.24.0
func (r InvoiceCustomerBalanceTransactionsType) IsKnown() bool
type InvoiceCustomerTaxID ¶
type InvoiceCustomerTaxID struct { Country InvoiceCustomerTaxIDCountry `json:"country,required"` Type InvoiceCustomerTaxIDType `json:"type,required"` Value string `json:"value,required"` JSON invoiceCustomerTaxIDJSON `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 (*InvoiceCustomerTaxID) UnmarshalJSON ¶
func (r *InvoiceCustomerTaxID) UnmarshalJSON(data []byte) (err error)
type InvoiceCustomerTaxIDCountry ¶ added in v0.2.0
type InvoiceCustomerTaxIDCountry string
const ( InvoiceCustomerTaxIDCountryAd InvoiceCustomerTaxIDCountry = "AD" InvoiceCustomerTaxIDCountryAe InvoiceCustomerTaxIDCountry = "AE" InvoiceCustomerTaxIDCountryAr InvoiceCustomerTaxIDCountry = "AR" InvoiceCustomerTaxIDCountryAt InvoiceCustomerTaxIDCountry = "AT" InvoiceCustomerTaxIDCountryAu InvoiceCustomerTaxIDCountry = "AU" InvoiceCustomerTaxIDCountryBe InvoiceCustomerTaxIDCountry = "BE" InvoiceCustomerTaxIDCountryBg InvoiceCustomerTaxIDCountry = "BG" InvoiceCustomerTaxIDCountryBh InvoiceCustomerTaxIDCountry = "BH" InvoiceCustomerTaxIDCountryBo InvoiceCustomerTaxIDCountry = "BO" InvoiceCustomerTaxIDCountryBr InvoiceCustomerTaxIDCountry = "BR" InvoiceCustomerTaxIDCountryCa InvoiceCustomerTaxIDCountry = "CA" InvoiceCustomerTaxIDCountryCh InvoiceCustomerTaxIDCountry = "CH" InvoiceCustomerTaxIDCountryCl InvoiceCustomerTaxIDCountry = "CL" InvoiceCustomerTaxIDCountryCn InvoiceCustomerTaxIDCountry = "CN" InvoiceCustomerTaxIDCountryCo InvoiceCustomerTaxIDCountry = "CO" InvoiceCustomerTaxIDCountryCr InvoiceCustomerTaxIDCountry = "CR" InvoiceCustomerTaxIDCountryCy InvoiceCustomerTaxIDCountry = "CY" InvoiceCustomerTaxIDCountryCz InvoiceCustomerTaxIDCountry = "CZ" InvoiceCustomerTaxIDCountryDe InvoiceCustomerTaxIDCountry = "DE" InvoiceCustomerTaxIDCountryDk InvoiceCustomerTaxIDCountry = "DK" InvoiceCustomerTaxIDCountryEe InvoiceCustomerTaxIDCountry = "EE" InvoiceCustomerTaxIDCountryDo InvoiceCustomerTaxIDCountry = "DO" InvoiceCustomerTaxIDCountryEc InvoiceCustomerTaxIDCountry = "EC" InvoiceCustomerTaxIDCountryEg InvoiceCustomerTaxIDCountry = "EG" InvoiceCustomerTaxIDCountryEs InvoiceCustomerTaxIDCountry = "ES" InvoiceCustomerTaxIDCountryEu InvoiceCustomerTaxIDCountry = "EU" InvoiceCustomerTaxIDCountryFi InvoiceCustomerTaxIDCountry = "FI" InvoiceCustomerTaxIDCountryFr InvoiceCustomerTaxIDCountry = "FR" InvoiceCustomerTaxIDCountryGB InvoiceCustomerTaxIDCountry = "GB" InvoiceCustomerTaxIDCountryGe InvoiceCustomerTaxIDCountry = "GE" InvoiceCustomerTaxIDCountryGr InvoiceCustomerTaxIDCountry = "GR" InvoiceCustomerTaxIDCountryHk InvoiceCustomerTaxIDCountry = "HK" InvoiceCustomerTaxIDCountryHr InvoiceCustomerTaxIDCountry = "HR" InvoiceCustomerTaxIDCountryHu InvoiceCustomerTaxIDCountry = "HU" InvoiceCustomerTaxIDCountryID InvoiceCustomerTaxIDCountry = "ID" InvoiceCustomerTaxIDCountryIe InvoiceCustomerTaxIDCountry = "IE" InvoiceCustomerTaxIDCountryIl InvoiceCustomerTaxIDCountry = "IL" InvoiceCustomerTaxIDCountryIn InvoiceCustomerTaxIDCountry = "IN" InvoiceCustomerTaxIDCountryIs InvoiceCustomerTaxIDCountry = "IS" InvoiceCustomerTaxIDCountryIt InvoiceCustomerTaxIDCountry = "IT" InvoiceCustomerTaxIDCountryJp InvoiceCustomerTaxIDCountry = "JP" InvoiceCustomerTaxIDCountryKe InvoiceCustomerTaxIDCountry = "KE" InvoiceCustomerTaxIDCountryKr InvoiceCustomerTaxIDCountry = "KR" InvoiceCustomerTaxIDCountryKz InvoiceCustomerTaxIDCountry = "KZ" InvoiceCustomerTaxIDCountryLi InvoiceCustomerTaxIDCountry = "LI" InvoiceCustomerTaxIDCountryLt InvoiceCustomerTaxIDCountry = "LT" InvoiceCustomerTaxIDCountryLu InvoiceCustomerTaxIDCountry = "LU" InvoiceCustomerTaxIDCountryLv InvoiceCustomerTaxIDCountry = "LV" InvoiceCustomerTaxIDCountryMt InvoiceCustomerTaxIDCountry = "MT" InvoiceCustomerTaxIDCountryMx InvoiceCustomerTaxIDCountry = "MX" InvoiceCustomerTaxIDCountryMy InvoiceCustomerTaxIDCountry = "MY" InvoiceCustomerTaxIDCountryNg InvoiceCustomerTaxIDCountry = "NG" InvoiceCustomerTaxIDCountryNl InvoiceCustomerTaxIDCountry = "NL" InvoiceCustomerTaxIDCountryNo InvoiceCustomerTaxIDCountry = "NO" InvoiceCustomerTaxIDCountryNz InvoiceCustomerTaxIDCountry = "NZ" InvoiceCustomerTaxIDCountryOm InvoiceCustomerTaxIDCountry = "OM" InvoiceCustomerTaxIDCountryPe InvoiceCustomerTaxIDCountry = "PE" InvoiceCustomerTaxIDCountryPh InvoiceCustomerTaxIDCountry = "PH" InvoiceCustomerTaxIDCountryPl InvoiceCustomerTaxIDCountry = "PL" InvoiceCustomerTaxIDCountryPt InvoiceCustomerTaxIDCountry = "PT" InvoiceCustomerTaxIDCountryRo InvoiceCustomerTaxIDCountry = "RO" InvoiceCustomerTaxIDCountryRs InvoiceCustomerTaxIDCountry = "RS" InvoiceCustomerTaxIDCountryRu InvoiceCustomerTaxIDCountry = "RU" InvoiceCustomerTaxIDCountrySa InvoiceCustomerTaxIDCountry = "SA" InvoiceCustomerTaxIDCountrySe InvoiceCustomerTaxIDCountry = "SE" InvoiceCustomerTaxIDCountrySg InvoiceCustomerTaxIDCountry = "SG" InvoiceCustomerTaxIDCountrySi InvoiceCustomerTaxIDCountry = "SI" InvoiceCustomerTaxIDCountrySk InvoiceCustomerTaxIDCountry = "SK" InvoiceCustomerTaxIDCountrySv InvoiceCustomerTaxIDCountry = "SV" InvoiceCustomerTaxIDCountryTh InvoiceCustomerTaxIDCountry = "TH" InvoiceCustomerTaxIDCountryTr InvoiceCustomerTaxIDCountry = "TR" InvoiceCustomerTaxIDCountryTw InvoiceCustomerTaxIDCountry = "TW" InvoiceCustomerTaxIDCountryUa InvoiceCustomerTaxIDCountry = "UA" InvoiceCustomerTaxIDCountryUs InvoiceCustomerTaxIDCountry = "US" InvoiceCustomerTaxIDCountryUy InvoiceCustomerTaxIDCountry = "UY" InvoiceCustomerTaxIDCountryVe InvoiceCustomerTaxIDCountry = "VE" InvoiceCustomerTaxIDCountryVn InvoiceCustomerTaxIDCountry = "VN" InvoiceCustomerTaxIDCountryZa InvoiceCustomerTaxIDCountry = "ZA" )
func (InvoiceCustomerTaxIDCountry) IsKnown ¶ added in v0.24.0
func (r InvoiceCustomerTaxIDCountry) IsKnown() bool
type InvoiceCustomerTaxIDType ¶ added in v0.2.0
type InvoiceCustomerTaxIDType string
const ( InvoiceCustomerTaxIDTypeAdNrt InvoiceCustomerTaxIDType = "ad_nrt" InvoiceCustomerTaxIDTypeAeTrn InvoiceCustomerTaxIDType = "ae_trn" InvoiceCustomerTaxIDTypeArCuit InvoiceCustomerTaxIDType = "ar_cuit" InvoiceCustomerTaxIDTypeEuVat InvoiceCustomerTaxIDType = "eu_vat" InvoiceCustomerTaxIDTypeAuAbn InvoiceCustomerTaxIDType = "au_abn" InvoiceCustomerTaxIDTypeAuArn InvoiceCustomerTaxIDType = "au_arn" InvoiceCustomerTaxIDTypeBgUic InvoiceCustomerTaxIDType = "bg_uic" InvoiceCustomerTaxIDTypeBhVat InvoiceCustomerTaxIDType = "bh_vat" InvoiceCustomerTaxIDTypeBoTin InvoiceCustomerTaxIDType = "bo_tin" InvoiceCustomerTaxIDTypeBrCnpj InvoiceCustomerTaxIDType = "br_cnpj" InvoiceCustomerTaxIDTypeBrCpf InvoiceCustomerTaxIDType = "br_cpf" InvoiceCustomerTaxIDTypeCaBn InvoiceCustomerTaxIDType = "ca_bn" InvoiceCustomerTaxIDTypeCaGstHst InvoiceCustomerTaxIDType = "ca_gst_hst" InvoiceCustomerTaxIDTypeCaPstBc InvoiceCustomerTaxIDType = "ca_pst_bc" InvoiceCustomerTaxIDTypeCaPstMB InvoiceCustomerTaxIDType = "ca_pst_mb" InvoiceCustomerTaxIDTypeCaPstSk InvoiceCustomerTaxIDType = "ca_pst_sk" InvoiceCustomerTaxIDTypeCaQst InvoiceCustomerTaxIDType = "ca_qst" InvoiceCustomerTaxIDTypeChVat InvoiceCustomerTaxIDType = "ch_vat" InvoiceCustomerTaxIDTypeClTin InvoiceCustomerTaxIDType = "cl_tin" InvoiceCustomerTaxIDTypeCnTin InvoiceCustomerTaxIDType = "cn_tin" InvoiceCustomerTaxIDTypeCoNit InvoiceCustomerTaxIDType = "co_nit" InvoiceCustomerTaxIDTypeCrTin InvoiceCustomerTaxIDType = "cr_tin" InvoiceCustomerTaxIDTypeDoRcn InvoiceCustomerTaxIDType = "do_rcn" InvoiceCustomerTaxIDTypeEcRuc InvoiceCustomerTaxIDType = "ec_ruc" InvoiceCustomerTaxIDTypeEgTin InvoiceCustomerTaxIDType = "eg_tin" InvoiceCustomerTaxIDTypeEsCif InvoiceCustomerTaxIDType = "es_cif" InvoiceCustomerTaxIDTypeEuOssVat InvoiceCustomerTaxIDType = "eu_oss_vat" InvoiceCustomerTaxIDTypeGBVat InvoiceCustomerTaxIDType = "gb_vat" InvoiceCustomerTaxIDTypeGeVat InvoiceCustomerTaxIDType = "ge_vat" InvoiceCustomerTaxIDTypeHkBr InvoiceCustomerTaxIDType = "hk_br" InvoiceCustomerTaxIDTypeHuTin InvoiceCustomerTaxIDType = "hu_tin" InvoiceCustomerTaxIDTypeIDNpwp InvoiceCustomerTaxIDType = "id_npwp" InvoiceCustomerTaxIDTypeIlVat InvoiceCustomerTaxIDType = "il_vat" InvoiceCustomerTaxIDTypeInGst InvoiceCustomerTaxIDType = "in_gst" InvoiceCustomerTaxIDTypeIsVat InvoiceCustomerTaxIDType = "is_vat" InvoiceCustomerTaxIDTypeJpCn InvoiceCustomerTaxIDType = "jp_cn" InvoiceCustomerTaxIDTypeJpRn InvoiceCustomerTaxIDType = "jp_rn" InvoiceCustomerTaxIDTypeJpTrn InvoiceCustomerTaxIDType = "jp_trn" InvoiceCustomerTaxIDTypeKePin InvoiceCustomerTaxIDType = "ke_pin" InvoiceCustomerTaxIDTypeKrBrn InvoiceCustomerTaxIDType = "kr_brn" InvoiceCustomerTaxIDTypeKzBin InvoiceCustomerTaxIDType = "kz_bin" InvoiceCustomerTaxIDTypeLiUid InvoiceCustomerTaxIDType = "li_uid" InvoiceCustomerTaxIDTypeMxRfc InvoiceCustomerTaxIDType = "mx_rfc" InvoiceCustomerTaxIDTypeMyFrp InvoiceCustomerTaxIDType = "my_frp" InvoiceCustomerTaxIDTypeMyItn InvoiceCustomerTaxIDType = "my_itn" InvoiceCustomerTaxIDTypeMySst InvoiceCustomerTaxIDType = "my_sst" InvoiceCustomerTaxIDTypeNgTin InvoiceCustomerTaxIDType = "ng_tin" InvoiceCustomerTaxIDTypeNoVat InvoiceCustomerTaxIDType = "no_vat" InvoiceCustomerTaxIDTypeNoVoec InvoiceCustomerTaxIDType = "no_voec" InvoiceCustomerTaxIDTypeNzGst InvoiceCustomerTaxIDType = "nz_gst" InvoiceCustomerTaxIDTypeOmVat InvoiceCustomerTaxIDType = "om_vat" InvoiceCustomerTaxIDTypePeRuc InvoiceCustomerTaxIDType = "pe_ruc" InvoiceCustomerTaxIDTypePhTin InvoiceCustomerTaxIDType = "ph_tin" InvoiceCustomerTaxIDTypeRoTin InvoiceCustomerTaxIDType = "ro_tin" InvoiceCustomerTaxIDTypeRsPib InvoiceCustomerTaxIDType = "rs_pib" InvoiceCustomerTaxIDTypeRuInn InvoiceCustomerTaxIDType = "ru_inn" InvoiceCustomerTaxIDTypeRuKpp InvoiceCustomerTaxIDType = "ru_kpp" InvoiceCustomerTaxIDTypeSaVat InvoiceCustomerTaxIDType = "sa_vat" InvoiceCustomerTaxIDTypeSgGst InvoiceCustomerTaxIDType = "sg_gst" InvoiceCustomerTaxIDTypeSgUen InvoiceCustomerTaxIDType = "sg_uen" InvoiceCustomerTaxIDTypeSiTin InvoiceCustomerTaxIDType = "si_tin" InvoiceCustomerTaxIDTypeSvNit InvoiceCustomerTaxIDType = "sv_nit" InvoiceCustomerTaxIDTypeThVat InvoiceCustomerTaxIDType = "th_vat" InvoiceCustomerTaxIDTypeTrTin InvoiceCustomerTaxIDType = "tr_tin" InvoiceCustomerTaxIDTypeTwVat InvoiceCustomerTaxIDType = "tw_vat" InvoiceCustomerTaxIDTypeUaVat InvoiceCustomerTaxIDType = "ua_vat" InvoiceCustomerTaxIDTypeUsEin InvoiceCustomerTaxIDType = "us_ein" InvoiceCustomerTaxIDTypeUyRuc InvoiceCustomerTaxIDType = "uy_ruc" InvoiceCustomerTaxIDTypeVeRif InvoiceCustomerTaxIDType = "ve_rif" InvoiceCustomerTaxIDTypeVnTin InvoiceCustomerTaxIDType = "vn_tin" InvoiceCustomerTaxIDTypeZaVat InvoiceCustomerTaxIDType = "za_vat" )
func (InvoiceCustomerTaxIDType) IsKnown ¶ added in v0.24.0
func (r InvoiceCustomerTaxIDType) IsKnown() bool
type InvoiceDiscount ¶
type InvoiceDiscount struct { DiscountType InvoiceDiscountDiscountType `json:"discount_type,required"` // This field can have the runtime type of [[]string]. AppliesToPriceIDs interface{} `json:"applies_to_price_ids"` Reason string `json:"reason,nullable"` // 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 `amount`. AmountDiscount string `json:"amount_discount"` // 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 invoiceDiscountJSON `json:"-"` // contains filtered or unexported fields }
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.
func (InvoiceDiscount) AsUnion ¶ added in v0.63.0
func (r InvoiceDiscount) AsUnion() InvoiceDiscountUnion
AsUnion returns a InvoiceDiscountUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are InvoiceDiscountPercentageDiscount, InvoiceDiscountAmountDiscount, InvoiceDiscountTrialDiscount.
func (*InvoiceDiscount) UnmarshalJSON ¶ added in v0.63.0
func (r *InvoiceDiscount) UnmarshalJSON(data []byte) (err error)
type InvoiceDiscountAmountDiscount ¶
type InvoiceDiscountAmountDiscount 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 InvoiceDiscountAmountDiscountDiscountType `json:"discount_type,required"` Reason string `json:"reason,nullable"` JSON invoiceDiscountAmountDiscountJSON `json:"-"` }
func (*InvoiceDiscountAmountDiscount) UnmarshalJSON ¶
func (r *InvoiceDiscountAmountDiscount) UnmarshalJSON(data []byte) (err error)
type InvoiceDiscountAmountDiscountDiscountType ¶
type InvoiceDiscountAmountDiscountDiscountType string
const (
InvoiceDiscountAmountDiscountDiscountTypeAmount InvoiceDiscountAmountDiscountDiscountType = "amount"
)
func (InvoiceDiscountAmountDiscountDiscountType) IsKnown ¶ added in v0.63.0
func (r InvoiceDiscountAmountDiscountDiscountType) IsKnown() bool
type InvoiceDiscountDiscountType ¶ added in v0.63.0
type InvoiceDiscountDiscountType string
const ( InvoiceDiscountDiscountTypePercentage InvoiceDiscountDiscountType = "percentage" InvoiceDiscountDiscountTypeAmount InvoiceDiscountDiscountType = "amount" InvoiceDiscountDiscountTypeTrial InvoiceDiscountDiscountType = "trial" )
func (InvoiceDiscountDiscountType) IsKnown ¶ added in v0.63.0
func (r InvoiceDiscountDiscountType) IsKnown() bool
type InvoiceDiscountPercentageDiscount ¶
type InvoiceDiscountPercentageDiscount 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 InvoiceDiscountPercentageDiscountDiscountType `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 invoiceDiscountPercentageDiscountJSON `json:"-"` }
func (*InvoiceDiscountPercentageDiscount) UnmarshalJSON ¶
func (r *InvoiceDiscountPercentageDiscount) UnmarshalJSON(data []byte) (err error)
type InvoiceDiscountPercentageDiscountDiscountType ¶
type InvoiceDiscountPercentageDiscountDiscountType string
const (
InvoiceDiscountPercentageDiscountDiscountTypePercentage InvoiceDiscountPercentageDiscountDiscountType = "percentage"
)
func (InvoiceDiscountPercentageDiscountDiscountType) IsKnown ¶ added in v0.63.0
func (r InvoiceDiscountPercentageDiscountDiscountType) IsKnown() bool
type InvoiceDiscountTrialDiscount ¶
type InvoiceDiscountTrialDiscount 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 InvoiceDiscountTrialDiscountDiscountType `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 invoiceDiscountTrialDiscountJSON `json:"-"` }
func (*InvoiceDiscountTrialDiscount) UnmarshalJSON ¶
func (r *InvoiceDiscountTrialDiscount) UnmarshalJSON(data []byte) (err error)
type InvoiceDiscountTrialDiscountDiscountType ¶
type InvoiceDiscountTrialDiscountDiscountType string
const (
InvoiceDiscountTrialDiscountDiscountTypeTrial InvoiceDiscountTrialDiscountDiscountType = "trial"
)
func (InvoiceDiscountTrialDiscountDiscountType) IsKnown ¶ added in v0.63.0
func (r InvoiceDiscountTrialDiscountDiscountType) IsKnown() bool
type InvoiceDiscountUnion ¶ added in v0.63.0
type InvoiceDiscountUnion interface {
// contains filtered or unexported methods
}
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.
Union satisfied by InvoiceDiscountPercentageDiscount, InvoiceDiscountAmountDiscount or InvoiceDiscountTrialDiscount.
type InvoiceFetchUpcomingParams ¶
type InvoiceFetchUpcomingParams struct {
SubscriptionID param.Field[string] `query:"subscription_id"`
}
func (InvoiceFetchUpcomingParams) URLQuery ¶
func (r InvoiceFetchUpcomingParams) URLQuery() (v url.Values)
URLQuery serializes InvoiceFetchUpcomingParams's query parameters as `url.Values`.
type InvoiceFetchUpcomingResponse ¶
type InvoiceFetchUpcomingResponse 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 InvoiceFetchUpcomingResponseAutoCollection `json:"auto_collection,required"` BillingAddress InvoiceFetchUpcomingResponseBillingAddress `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 []InvoiceFetchUpcomingResponseCreditNote `json:"credit_notes,required"` // An ISO 4217 currency string or `credits` Currency string `json:"currency,required"` Customer InvoiceFetchUpcomingResponseCustomer `json:"customer,required"` CustomerBalanceTransactions []InvoiceFetchUpcomingResponseCustomerBalanceTransaction `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 InvoiceFetchUpcomingResponseCustomerTaxID `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. Discount InvoiceFetchUpcomingResponseDiscount `json:"discount,required,nullable"` Discounts []InvoiceFetchUpcomingResponseDiscount `json:"discounts,required"` // When the invoice payment is due. DueDate time.Time `json:"due_date,required" 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"` // 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 InvoiceFetchUpcomingResponseInvoiceSource `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 []InvoiceFetchUpcomingResponseLineItem `json:"line_items,required"` Maximum InvoiceFetchUpcomingResponseMaximum `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 InvoiceFetchUpcomingResponseMinimum `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"` // 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 InvoiceFetchUpcomingResponseShippingAddress `json:"shipping_address,required,nullable"` Status InvoiceFetchUpcomingResponseStatus `json:"status,required"` Subscription InvoiceFetchUpcomingResponseSubscription `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 scheduled date of the invoice TargetDate time.Time `json:"target_date,required" 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 invoiceFetchUpcomingResponseJSON `json:"-"` }
func (*InvoiceFetchUpcomingResponse) UnmarshalJSON ¶
func (r *InvoiceFetchUpcomingResponse) UnmarshalJSON(data []byte) (err error)
type InvoiceFetchUpcomingResponseAutoCollection ¶
type InvoiceFetchUpcomingResponseAutoCollection 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 invoiceFetchUpcomingResponseAutoCollectionJSON `json:"-"` }
func (*InvoiceFetchUpcomingResponseAutoCollection) UnmarshalJSON ¶
func (r *InvoiceFetchUpcomingResponseAutoCollection) UnmarshalJSON(data []byte) (err error)
type InvoiceFetchUpcomingResponseBillingAddress ¶
type InvoiceFetchUpcomingResponseBillingAddress 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 invoiceFetchUpcomingResponseBillingAddressJSON `json:"-"` }
func (*InvoiceFetchUpcomingResponseBillingAddress) UnmarshalJSON ¶
func (r *InvoiceFetchUpcomingResponseBillingAddress) UnmarshalJSON(data []byte) (err error)
type InvoiceFetchUpcomingResponseCreditNote ¶
type InvoiceFetchUpcomingResponseCreditNote 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 invoiceFetchUpcomingResponseCreditNoteJSON `json:"-"` }
func (*InvoiceFetchUpcomingResponseCreditNote) UnmarshalJSON ¶
func (r *InvoiceFetchUpcomingResponseCreditNote) UnmarshalJSON(data []byte) (err error)
type InvoiceFetchUpcomingResponseCustomer ¶
type InvoiceFetchUpcomingResponseCustomer struct { ID string `json:"id,required"` ExternalCustomerID string `json:"external_customer_id,required,nullable"` JSON invoiceFetchUpcomingResponseCustomerJSON `json:"-"` }
func (*InvoiceFetchUpcomingResponseCustomer) UnmarshalJSON ¶
func (r *InvoiceFetchUpcomingResponseCustomer) UnmarshalJSON(data []byte) (err error)
type InvoiceFetchUpcomingResponseCustomerBalanceTransaction ¶
type InvoiceFetchUpcomingResponseCustomerBalanceTransaction struct { // A unique id for this transaction. ID string `json:"id,required"` Action InvoiceFetchUpcomingResponseCustomerBalanceTransactionsAction `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 InvoiceFetchUpcomingResponseCustomerBalanceTransactionsCreditNote `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 InvoiceFetchUpcomingResponseCustomerBalanceTransactionsInvoice `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 InvoiceFetchUpcomingResponseCustomerBalanceTransactionsType `json:"type,required"` JSON invoiceFetchUpcomingResponseCustomerBalanceTransactionJSON `json:"-"` }
func (*InvoiceFetchUpcomingResponseCustomerBalanceTransaction) UnmarshalJSON ¶
func (r *InvoiceFetchUpcomingResponseCustomerBalanceTransaction) UnmarshalJSON(data []byte) (err error)
type InvoiceFetchUpcomingResponseCustomerBalanceTransactionsAction ¶
type InvoiceFetchUpcomingResponseCustomerBalanceTransactionsAction string
const ( InvoiceFetchUpcomingResponseCustomerBalanceTransactionsActionAppliedToInvoice InvoiceFetchUpcomingResponseCustomerBalanceTransactionsAction = "applied_to_invoice" InvoiceFetchUpcomingResponseCustomerBalanceTransactionsActionManualAdjustment InvoiceFetchUpcomingResponseCustomerBalanceTransactionsAction = "manual_adjustment" InvoiceFetchUpcomingResponseCustomerBalanceTransactionsActionProratedRefund InvoiceFetchUpcomingResponseCustomerBalanceTransactionsAction = "prorated_refund" InvoiceFetchUpcomingResponseCustomerBalanceTransactionsActionRevertProratedRefund InvoiceFetchUpcomingResponseCustomerBalanceTransactionsAction = "revert_prorated_refund" InvoiceFetchUpcomingResponseCustomerBalanceTransactionsActionReturnFromVoiding InvoiceFetchUpcomingResponseCustomerBalanceTransactionsAction = "return_from_voiding" InvoiceFetchUpcomingResponseCustomerBalanceTransactionsActionCreditNoteApplied InvoiceFetchUpcomingResponseCustomerBalanceTransactionsAction = "credit_note_applied" InvoiceFetchUpcomingResponseCustomerBalanceTransactionsActionCreditNoteVoided InvoiceFetchUpcomingResponseCustomerBalanceTransactionsAction = "credit_note_voided" InvoiceFetchUpcomingResponseCustomerBalanceTransactionsActionOverpaymentRefund InvoiceFetchUpcomingResponseCustomerBalanceTransactionsAction = "overpayment_refund" )
func (InvoiceFetchUpcomingResponseCustomerBalanceTransactionsAction) IsKnown ¶ added in v0.24.0
func (r InvoiceFetchUpcomingResponseCustomerBalanceTransactionsAction) IsKnown() bool
type InvoiceFetchUpcomingResponseCustomerBalanceTransactionsCreditNote ¶
type InvoiceFetchUpcomingResponseCustomerBalanceTransactionsCreditNote struct { // The id of the Credit note ID string `json:"id,required"` JSON invoiceFetchUpcomingResponseCustomerBalanceTransactionsCreditNoteJSON `json:"-"` }
func (*InvoiceFetchUpcomingResponseCustomerBalanceTransactionsCreditNote) UnmarshalJSON ¶
func (r *InvoiceFetchUpcomingResponseCustomerBalanceTransactionsCreditNote) UnmarshalJSON(data []byte) (err error)
type InvoiceFetchUpcomingResponseCustomerBalanceTransactionsInvoice ¶
type InvoiceFetchUpcomingResponseCustomerBalanceTransactionsInvoice struct { // The Invoice id ID string `json:"id,required"` JSON invoiceFetchUpcomingResponseCustomerBalanceTransactionsInvoiceJSON `json:"-"` }
func (*InvoiceFetchUpcomingResponseCustomerBalanceTransactionsInvoice) UnmarshalJSON ¶
func (r *InvoiceFetchUpcomingResponseCustomerBalanceTransactionsInvoice) UnmarshalJSON(data []byte) (err error)
type InvoiceFetchUpcomingResponseCustomerBalanceTransactionsType ¶
type InvoiceFetchUpcomingResponseCustomerBalanceTransactionsType string
const ( InvoiceFetchUpcomingResponseCustomerBalanceTransactionsTypeIncrement InvoiceFetchUpcomingResponseCustomerBalanceTransactionsType = "increment" InvoiceFetchUpcomingResponseCustomerBalanceTransactionsTypeDecrement InvoiceFetchUpcomingResponseCustomerBalanceTransactionsType = "decrement" )
func (InvoiceFetchUpcomingResponseCustomerBalanceTransactionsType) IsKnown ¶ added in v0.24.0
func (r InvoiceFetchUpcomingResponseCustomerBalanceTransactionsType) IsKnown() bool
type InvoiceFetchUpcomingResponseCustomerTaxID ¶
type InvoiceFetchUpcomingResponseCustomerTaxID struct { Country InvoiceFetchUpcomingResponseCustomerTaxIDCountry `json:"country,required"` Type InvoiceFetchUpcomingResponseCustomerTaxIDType `json:"type,required"` Value string `json:"value,required"` JSON invoiceFetchUpcomingResponseCustomerTaxIDJSON `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 (*InvoiceFetchUpcomingResponseCustomerTaxID) UnmarshalJSON ¶
func (r *InvoiceFetchUpcomingResponseCustomerTaxID) UnmarshalJSON(data []byte) (err error)
type InvoiceFetchUpcomingResponseCustomerTaxIDCountry ¶ added in v0.2.0
type InvoiceFetchUpcomingResponseCustomerTaxIDCountry string
const ( InvoiceFetchUpcomingResponseCustomerTaxIDCountryAd InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "AD" InvoiceFetchUpcomingResponseCustomerTaxIDCountryAe InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "AE" InvoiceFetchUpcomingResponseCustomerTaxIDCountryAr InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "AR" InvoiceFetchUpcomingResponseCustomerTaxIDCountryAt InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "AT" InvoiceFetchUpcomingResponseCustomerTaxIDCountryAu InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "AU" InvoiceFetchUpcomingResponseCustomerTaxIDCountryBe InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "BE" InvoiceFetchUpcomingResponseCustomerTaxIDCountryBg InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "BG" InvoiceFetchUpcomingResponseCustomerTaxIDCountryBh InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "BH" InvoiceFetchUpcomingResponseCustomerTaxIDCountryBo InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "BO" InvoiceFetchUpcomingResponseCustomerTaxIDCountryBr InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "BR" InvoiceFetchUpcomingResponseCustomerTaxIDCountryCa InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "CA" InvoiceFetchUpcomingResponseCustomerTaxIDCountryCh InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "CH" InvoiceFetchUpcomingResponseCustomerTaxIDCountryCl InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "CL" InvoiceFetchUpcomingResponseCustomerTaxIDCountryCn InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "CN" InvoiceFetchUpcomingResponseCustomerTaxIDCountryCo InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "CO" InvoiceFetchUpcomingResponseCustomerTaxIDCountryCr InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "CR" InvoiceFetchUpcomingResponseCustomerTaxIDCountryCy InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "CY" InvoiceFetchUpcomingResponseCustomerTaxIDCountryCz InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "CZ" InvoiceFetchUpcomingResponseCustomerTaxIDCountryDe InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "DE" InvoiceFetchUpcomingResponseCustomerTaxIDCountryDk InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "DK" InvoiceFetchUpcomingResponseCustomerTaxIDCountryEe InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "EE" InvoiceFetchUpcomingResponseCustomerTaxIDCountryDo InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "DO" InvoiceFetchUpcomingResponseCustomerTaxIDCountryEc InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "EC" InvoiceFetchUpcomingResponseCustomerTaxIDCountryEg InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "EG" InvoiceFetchUpcomingResponseCustomerTaxIDCountryEs InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "ES" InvoiceFetchUpcomingResponseCustomerTaxIDCountryEu InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "EU" InvoiceFetchUpcomingResponseCustomerTaxIDCountryFi InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "FI" InvoiceFetchUpcomingResponseCustomerTaxIDCountryFr InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "FR" InvoiceFetchUpcomingResponseCustomerTaxIDCountryGB InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "GB" InvoiceFetchUpcomingResponseCustomerTaxIDCountryGe InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "GE" InvoiceFetchUpcomingResponseCustomerTaxIDCountryGr InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "GR" InvoiceFetchUpcomingResponseCustomerTaxIDCountryHk InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "HK" InvoiceFetchUpcomingResponseCustomerTaxIDCountryHr InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "HR" InvoiceFetchUpcomingResponseCustomerTaxIDCountryHu InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "HU" InvoiceFetchUpcomingResponseCustomerTaxIDCountryID InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "ID" InvoiceFetchUpcomingResponseCustomerTaxIDCountryIe InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "IE" InvoiceFetchUpcomingResponseCustomerTaxIDCountryIl InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "IL" InvoiceFetchUpcomingResponseCustomerTaxIDCountryIn InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "IN" InvoiceFetchUpcomingResponseCustomerTaxIDCountryIs InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "IS" InvoiceFetchUpcomingResponseCustomerTaxIDCountryIt InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "IT" InvoiceFetchUpcomingResponseCustomerTaxIDCountryJp InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "JP" InvoiceFetchUpcomingResponseCustomerTaxIDCountryKe InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "KE" InvoiceFetchUpcomingResponseCustomerTaxIDCountryKr InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "KR" InvoiceFetchUpcomingResponseCustomerTaxIDCountryKz InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "KZ" InvoiceFetchUpcomingResponseCustomerTaxIDCountryLi InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "LI" InvoiceFetchUpcomingResponseCustomerTaxIDCountryLt InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "LT" InvoiceFetchUpcomingResponseCustomerTaxIDCountryLu InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "LU" InvoiceFetchUpcomingResponseCustomerTaxIDCountryLv InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "LV" InvoiceFetchUpcomingResponseCustomerTaxIDCountryMt InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "MT" InvoiceFetchUpcomingResponseCustomerTaxIDCountryMx InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "MX" InvoiceFetchUpcomingResponseCustomerTaxIDCountryMy InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "MY" InvoiceFetchUpcomingResponseCustomerTaxIDCountryNg InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "NG" InvoiceFetchUpcomingResponseCustomerTaxIDCountryNl InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "NL" InvoiceFetchUpcomingResponseCustomerTaxIDCountryNo InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "NO" InvoiceFetchUpcomingResponseCustomerTaxIDCountryNz InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "NZ" InvoiceFetchUpcomingResponseCustomerTaxIDCountryOm InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "OM" InvoiceFetchUpcomingResponseCustomerTaxIDCountryPe InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "PE" InvoiceFetchUpcomingResponseCustomerTaxIDCountryPh InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "PH" InvoiceFetchUpcomingResponseCustomerTaxIDCountryPl InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "PL" InvoiceFetchUpcomingResponseCustomerTaxIDCountryPt InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "PT" InvoiceFetchUpcomingResponseCustomerTaxIDCountryRo InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "RO" InvoiceFetchUpcomingResponseCustomerTaxIDCountryRs InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "RS" InvoiceFetchUpcomingResponseCustomerTaxIDCountryRu InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "RU" InvoiceFetchUpcomingResponseCustomerTaxIDCountrySa InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "SA" InvoiceFetchUpcomingResponseCustomerTaxIDCountrySe InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "SE" InvoiceFetchUpcomingResponseCustomerTaxIDCountrySg InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "SG" InvoiceFetchUpcomingResponseCustomerTaxIDCountrySi InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "SI" InvoiceFetchUpcomingResponseCustomerTaxIDCountrySk InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "SK" InvoiceFetchUpcomingResponseCustomerTaxIDCountrySv InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "SV" InvoiceFetchUpcomingResponseCustomerTaxIDCountryTh InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "TH" InvoiceFetchUpcomingResponseCustomerTaxIDCountryTr InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "TR" InvoiceFetchUpcomingResponseCustomerTaxIDCountryTw InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "TW" InvoiceFetchUpcomingResponseCustomerTaxIDCountryUa InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "UA" InvoiceFetchUpcomingResponseCustomerTaxIDCountryUs InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "US" InvoiceFetchUpcomingResponseCustomerTaxIDCountryUy InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "UY" InvoiceFetchUpcomingResponseCustomerTaxIDCountryVe InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "VE" InvoiceFetchUpcomingResponseCustomerTaxIDCountryVn InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "VN" InvoiceFetchUpcomingResponseCustomerTaxIDCountryZa InvoiceFetchUpcomingResponseCustomerTaxIDCountry = "ZA" )
func (InvoiceFetchUpcomingResponseCustomerTaxIDCountry) IsKnown ¶ added in v0.24.0
func (r InvoiceFetchUpcomingResponseCustomerTaxIDCountry) IsKnown() bool
type InvoiceFetchUpcomingResponseCustomerTaxIDType ¶ added in v0.2.0
type InvoiceFetchUpcomingResponseCustomerTaxIDType string
const ( InvoiceFetchUpcomingResponseCustomerTaxIDTypeAdNrt InvoiceFetchUpcomingResponseCustomerTaxIDType = "ad_nrt" InvoiceFetchUpcomingResponseCustomerTaxIDTypeAeTrn InvoiceFetchUpcomingResponseCustomerTaxIDType = "ae_trn" InvoiceFetchUpcomingResponseCustomerTaxIDTypeArCuit InvoiceFetchUpcomingResponseCustomerTaxIDType = "ar_cuit" InvoiceFetchUpcomingResponseCustomerTaxIDTypeEuVat InvoiceFetchUpcomingResponseCustomerTaxIDType = "eu_vat" InvoiceFetchUpcomingResponseCustomerTaxIDTypeAuAbn InvoiceFetchUpcomingResponseCustomerTaxIDType = "au_abn" InvoiceFetchUpcomingResponseCustomerTaxIDTypeAuArn InvoiceFetchUpcomingResponseCustomerTaxIDType = "au_arn" InvoiceFetchUpcomingResponseCustomerTaxIDTypeBgUic InvoiceFetchUpcomingResponseCustomerTaxIDType = "bg_uic" InvoiceFetchUpcomingResponseCustomerTaxIDTypeBhVat InvoiceFetchUpcomingResponseCustomerTaxIDType = "bh_vat" InvoiceFetchUpcomingResponseCustomerTaxIDTypeBoTin InvoiceFetchUpcomingResponseCustomerTaxIDType = "bo_tin" InvoiceFetchUpcomingResponseCustomerTaxIDTypeBrCnpj InvoiceFetchUpcomingResponseCustomerTaxIDType = "br_cnpj" InvoiceFetchUpcomingResponseCustomerTaxIDTypeBrCpf InvoiceFetchUpcomingResponseCustomerTaxIDType = "br_cpf" InvoiceFetchUpcomingResponseCustomerTaxIDTypeCaBn InvoiceFetchUpcomingResponseCustomerTaxIDType = "ca_bn" InvoiceFetchUpcomingResponseCustomerTaxIDTypeCaGstHst InvoiceFetchUpcomingResponseCustomerTaxIDType = "ca_gst_hst" InvoiceFetchUpcomingResponseCustomerTaxIDTypeCaPstBc InvoiceFetchUpcomingResponseCustomerTaxIDType = "ca_pst_bc" InvoiceFetchUpcomingResponseCustomerTaxIDTypeCaPstMB InvoiceFetchUpcomingResponseCustomerTaxIDType = "ca_pst_mb" InvoiceFetchUpcomingResponseCustomerTaxIDTypeCaPstSk InvoiceFetchUpcomingResponseCustomerTaxIDType = "ca_pst_sk" InvoiceFetchUpcomingResponseCustomerTaxIDTypeCaQst InvoiceFetchUpcomingResponseCustomerTaxIDType = "ca_qst" InvoiceFetchUpcomingResponseCustomerTaxIDTypeChVat InvoiceFetchUpcomingResponseCustomerTaxIDType = "ch_vat" InvoiceFetchUpcomingResponseCustomerTaxIDTypeClTin InvoiceFetchUpcomingResponseCustomerTaxIDType = "cl_tin" InvoiceFetchUpcomingResponseCustomerTaxIDTypeCnTin InvoiceFetchUpcomingResponseCustomerTaxIDType = "cn_tin" InvoiceFetchUpcomingResponseCustomerTaxIDTypeCoNit InvoiceFetchUpcomingResponseCustomerTaxIDType = "co_nit" InvoiceFetchUpcomingResponseCustomerTaxIDTypeCrTin InvoiceFetchUpcomingResponseCustomerTaxIDType = "cr_tin" InvoiceFetchUpcomingResponseCustomerTaxIDTypeDoRcn InvoiceFetchUpcomingResponseCustomerTaxIDType = "do_rcn" InvoiceFetchUpcomingResponseCustomerTaxIDTypeEcRuc InvoiceFetchUpcomingResponseCustomerTaxIDType = "ec_ruc" InvoiceFetchUpcomingResponseCustomerTaxIDTypeEgTin InvoiceFetchUpcomingResponseCustomerTaxIDType = "eg_tin" InvoiceFetchUpcomingResponseCustomerTaxIDTypeEsCif InvoiceFetchUpcomingResponseCustomerTaxIDType = "es_cif" InvoiceFetchUpcomingResponseCustomerTaxIDTypeEuOssVat InvoiceFetchUpcomingResponseCustomerTaxIDType = "eu_oss_vat" InvoiceFetchUpcomingResponseCustomerTaxIDTypeGBVat InvoiceFetchUpcomingResponseCustomerTaxIDType = "gb_vat" InvoiceFetchUpcomingResponseCustomerTaxIDTypeGeVat InvoiceFetchUpcomingResponseCustomerTaxIDType = "ge_vat" InvoiceFetchUpcomingResponseCustomerTaxIDTypeHkBr InvoiceFetchUpcomingResponseCustomerTaxIDType = "hk_br" InvoiceFetchUpcomingResponseCustomerTaxIDTypeHuTin InvoiceFetchUpcomingResponseCustomerTaxIDType = "hu_tin" InvoiceFetchUpcomingResponseCustomerTaxIDTypeIDNpwp InvoiceFetchUpcomingResponseCustomerTaxIDType = "id_npwp" InvoiceFetchUpcomingResponseCustomerTaxIDTypeIlVat InvoiceFetchUpcomingResponseCustomerTaxIDType = "il_vat" InvoiceFetchUpcomingResponseCustomerTaxIDTypeInGst InvoiceFetchUpcomingResponseCustomerTaxIDType = "in_gst" InvoiceFetchUpcomingResponseCustomerTaxIDTypeIsVat InvoiceFetchUpcomingResponseCustomerTaxIDType = "is_vat" InvoiceFetchUpcomingResponseCustomerTaxIDTypeJpCn InvoiceFetchUpcomingResponseCustomerTaxIDType = "jp_cn" InvoiceFetchUpcomingResponseCustomerTaxIDTypeJpRn InvoiceFetchUpcomingResponseCustomerTaxIDType = "jp_rn" InvoiceFetchUpcomingResponseCustomerTaxIDTypeJpTrn InvoiceFetchUpcomingResponseCustomerTaxIDType = "jp_trn" InvoiceFetchUpcomingResponseCustomerTaxIDTypeKePin InvoiceFetchUpcomingResponseCustomerTaxIDType = "ke_pin" InvoiceFetchUpcomingResponseCustomerTaxIDTypeKrBrn InvoiceFetchUpcomingResponseCustomerTaxIDType = "kr_brn" InvoiceFetchUpcomingResponseCustomerTaxIDTypeKzBin InvoiceFetchUpcomingResponseCustomerTaxIDType = "kz_bin" InvoiceFetchUpcomingResponseCustomerTaxIDTypeLiUid InvoiceFetchUpcomingResponseCustomerTaxIDType = "li_uid" InvoiceFetchUpcomingResponseCustomerTaxIDTypeMxRfc InvoiceFetchUpcomingResponseCustomerTaxIDType = "mx_rfc" InvoiceFetchUpcomingResponseCustomerTaxIDTypeMyFrp InvoiceFetchUpcomingResponseCustomerTaxIDType = "my_frp" InvoiceFetchUpcomingResponseCustomerTaxIDTypeMyItn InvoiceFetchUpcomingResponseCustomerTaxIDType = "my_itn" InvoiceFetchUpcomingResponseCustomerTaxIDTypeMySst InvoiceFetchUpcomingResponseCustomerTaxIDType = "my_sst" InvoiceFetchUpcomingResponseCustomerTaxIDTypeNgTin InvoiceFetchUpcomingResponseCustomerTaxIDType = "ng_tin" InvoiceFetchUpcomingResponseCustomerTaxIDTypeNoVat InvoiceFetchUpcomingResponseCustomerTaxIDType = "no_vat" InvoiceFetchUpcomingResponseCustomerTaxIDTypeNoVoec InvoiceFetchUpcomingResponseCustomerTaxIDType = "no_voec" InvoiceFetchUpcomingResponseCustomerTaxIDTypeNzGst InvoiceFetchUpcomingResponseCustomerTaxIDType = "nz_gst" InvoiceFetchUpcomingResponseCustomerTaxIDTypeOmVat InvoiceFetchUpcomingResponseCustomerTaxIDType = "om_vat" InvoiceFetchUpcomingResponseCustomerTaxIDTypePeRuc InvoiceFetchUpcomingResponseCustomerTaxIDType = "pe_ruc" InvoiceFetchUpcomingResponseCustomerTaxIDTypePhTin InvoiceFetchUpcomingResponseCustomerTaxIDType = "ph_tin" InvoiceFetchUpcomingResponseCustomerTaxIDTypeRoTin InvoiceFetchUpcomingResponseCustomerTaxIDType = "ro_tin" InvoiceFetchUpcomingResponseCustomerTaxIDTypeRsPib InvoiceFetchUpcomingResponseCustomerTaxIDType = "rs_pib" InvoiceFetchUpcomingResponseCustomerTaxIDTypeRuInn InvoiceFetchUpcomingResponseCustomerTaxIDType = "ru_inn" InvoiceFetchUpcomingResponseCustomerTaxIDTypeRuKpp InvoiceFetchUpcomingResponseCustomerTaxIDType = "ru_kpp" InvoiceFetchUpcomingResponseCustomerTaxIDTypeSaVat InvoiceFetchUpcomingResponseCustomerTaxIDType = "sa_vat" InvoiceFetchUpcomingResponseCustomerTaxIDTypeSgGst InvoiceFetchUpcomingResponseCustomerTaxIDType = "sg_gst" InvoiceFetchUpcomingResponseCustomerTaxIDTypeSgUen InvoiceFetchUpcomingResponseCustomerTaxIDType = "sg_uen" InvoiceFetchUpcomingResponseCustomerTaxIDTypeSiTin InvoiceFetchUpcomingResponseCustomerTaxIDType = "si_tin" InvoiceFetchUpcomingResponseCustomerTaxIDTypeSvNit InvoiceFetchUpcomingResponseCustomerTaxIDType = "sv_nit" InvoiceFetchUpcomingResponseCustomerTaxIDTypeThVat InvoiceFetchUpcomingResponseCustomerTaxIDType = "th_vat" InvoiceFetchUpcomingResponseCustomerTaxIDTypeTrTin InvoiceFetchUpcomingResponseCustomerTaxIDType = "tr_tin" InvoiceFetchUpcomingResponseCustomerTaxIDTypeTwVat InvoiceFetchUpcomingResponseCustomerTaxIDType = "tw_vat" InvoiceFetchUpcomingResponseCustomerTaxIDTypeUaVat InvoiceFetchUpcomingResponseCustomerTaxIDType = "ua_vat" InvoiceFetchUpcomingResponseCustomerTaxIDTypeUsEin InvoiceFetchUpcomingResponseCustomerTaxIDType = "us_ein" InvoiceFetchUpcomingResponseCustomerTaxIDTypeUyRuc InvoiceFetchUpcomingResponseCustomerTaxIDType = "uy_ruc" InvoiceFetchUpcomingResponseCustomerTaxIDTypeVeRif InvoiceFetchUpcomingResponseCustomerTaxIDType = "ve_rif" InvoiceFetchUpcomingResponseCustomerTaxIDTypeVnTin InvoiceFetchUpcomingResponseCustomerTaxIDType = "vn_tin" InvoiceFetchUpcomingResponseCustomerTaxIDTypeZaVat InvoiceFetchUpcomingResponseCustomerTaxIDType = "za_vat" )
func (InvoiceFetchUpcomingResponseCustomerTaxIDType) IsKnown ¶ added in v0.24.0
func (r InvoiceFetchUpcomingResponseCustomerTaxIDType) IsKnown() bool
type InvoiceFetchUpcomingResponseDiscount ¶ added in v0.63.0
type InvoiceFetchUpcomingResponseDiscount struct { DiscountType InvoiceFetchUpcomingResponseDiscountDiscountType `json:"discount_type,required"` // This field can have the runtime type of [[]string]. AppliesToPriceIDs interface{} `json:"applies_to_price_ids"` Reason string `json:"reason,nullable"` // 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 `amount`. AmountDiscount string `json:"amount_discount"` // 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 invoiceFetchUpcomingResponseDiscountJSON `json:"-"` // contains filtered or unexported fields }
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.
func (InvoiceFetchUpcomingResponseDiscount) AsUnion ¶ added in v0.63.0
func (r InvoiceFetchUpcomingResponseDiscount) AsUnion() InvoiceFetchUpcomingResponseDiscountUnion
AsUnion returns a InvoiceFetchUpcomingResponseDiscountUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are InvoiceFetchUpcomingResponseDiscountPercentageDiscount, InvoiceFetchUpcomingResponseDiscountAmountDiscount, InvoiceFetchUpcomingResponseDiscountTrialDiscount.
func (*InvoiceFetchUpcomingResponseDiscount) UnmarshalJSON ¶ added in v0.63.0
func (r *InvoiceFetchUpcomingResponseDiscount) UnmarshalJSON(data []byte) (err error)
type InvoiceFetchUpcomingResponseDiscountAmountDiscount ¶ added in v0.63.0
type InvoiceFetchUpcomingResponseDiscountAmountDiscount 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 InvoiceFetchUpcomingResponseDiscountAmountDiscountDiscountType `json:"discount_type,required"` Reason string `json:"reason,nullable"` JSON invoiceFetchUpcomingResponseDiscountAmountDiscountJSON `json:"-"` }
func (*InvoiceFetchUpcomingResponseDiscountAmountDiscount) UnmarshalJSON ¶ added in v0.63.0
func (r *InvoiceFetchUpcomingResponseDiscountAmountDiscount) UnmarshalJSON(data []byte) (err error)
type InvoiceFetchUpcomingResponseDiscountAmountDiscountDiscountType ¶ added in v0.63.0
type InvoiceFetchUpcomingResponseDiscountAmountDiscountDiscountType string
const (
InvoiceFetchUpcomingResponseDiscountAmountDiscountDiscountTypeAmount InvoiceFetchUpcomingResponseDiscountAmountDiscountDiscountType = "amount"
)
func (InvoiceFetchUpcomingResponseDiscountAmountDiscountDiscountType) IsKnown ¶ added in v0.63.0
func (r InvoiceFetchUpcomingResponseDiscountAmountDiscountDiscountType) IsKnown() bool
type InvoiceFetchUpcomingResponseDiscountDiscountType ¶ added in v0.63.0
type InvoiceFetchUpcomingResponseDiscountDiscountType string
const ( InvoiceFetchUpcomingResponseDiscountDiscountTypePercentage InvoiceFetchUpcomingResponseDiscountDiscountType = "percentage" InvoiceFetchUpcomingResponseDiscountDiscountTypeAmount InvoiceFetchUpcomingResponseDiscountDiscountType = "amount" InvoiceFetchUpcomingResponseDiscountDiscountTypeTrial InvoiceFetchUpcomingResponseDiscountDiscountType = "trial" )
func (InvoiceFetchUpcomingResponseDiscountDiscountType) IsKnown ¶ added in v0.63.0
func (r InvoiceFetchUpcomingResponseDiscountDiscountType) IsKnown() bool
type InvoiceFetchUpcomingResponseDiscountPercentageDiscount ¶ added in v0.63.0
type InvoiceFetchUpcomingResponseDiscountPercentageDiscount 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 InvoiceFetchUpcomingResponseDiscountPercentageDiscountDiscountType `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 invoiceFetchUpcomingResponseDiscountPercentageDiscountJSON `json:"-"` }
func (*InvoiceFetchUpcomingResponseDiscountPercentageDiscount) UnmarshalJSON ¶ added in v0.63.0
func (r *InvoiceFetchUpcomingResponseDiscountPercentageDiscount) UnmarshalJSON(data []byte) (err error)
type InvoiceFetchUpcomingResponseDiscountPercentageDiscountDiscountType ¶ added in v0.63.0
type InvoiceFetchUpcomingResponseDiscountPercentageDiscountDiscountType string
const (
InvoiceFetchUpcomingResponseDiscountPercentageDiscountDiscountTypePercentage InvoiceFetchUpcomingResponseDiscountPercentageDiscountDiscountType = "percentage"
)
func (InvoiceFetchUpcomingResponseDiscountPercentageDiscountDiscountType) IsKnown ¶ added in v0.63.0
func (r InvoiceFetchUpcomingResponseDiscountPercentageDiscountDiscountType) IsKnown() bool
type InvoiceFetchUpcomingResponseDiscountTrialDiscount ¶ added in v0.63.0
type InvoiceFetchUpcomingResponseDiscountTrialDiscount 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 InvoiceFetchUpcomingResponseDiscountTrialDiscountDiscountType `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 invoiceFetchUpcomingResponseDiscountTrialDiscountJSON `json:"-"` }
func (*InvoiceFetchUpcomingResponseDiscountTrialDiscount) UnmarshalJSON ¶ added in v0.63.0
func (r *InvoiceFetchUpcomingResponseDiscountTrialDiscount) UnmarshalJSON(data []byte) (err error)
type InvoiceFetchUpcomingResponseDiscountTrialDiscountDiscountType ¶ added in v0.63.0
type InvoiceFetchUpcomingResponseDiscountTrialDiscountDiscountType string
const (
InvoiceFetchUpcomingResponseDiscountTrialDiscountDiscountTypeTrial InvoiceFetchUpcomingResponseDiscountTrialDiscountDiscountType = "trial"
)
func (InvoiceFetchUpcomingResponseDiscountTrialDiscountDiscountType) IsKnown ¶ added in v0.63.0
func (r InvoiceFetchUpcomingResponseDiscountTrialDiscountDiscountType) IsKnown() bool
type InvoiceFetchUpcomingResponseDiscountUnion ¶ added in v0.63.0
type InvoiceFetchUpcomingResponseDiscountUnion interface {
// contains filtered or unexported methods
}
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.
Union satisfied by InvoiceFetchUpcomingResponseDiscountPercentageDiscount, InvoiceFetchUpcomingResponseDiscountAmountDiscount or InvoiceFetchUpcomingResponseDiscountTrialDiscount.
type InvoiceFetchUpcomingResponseInvoiceSource ¶ added in v0.25.0
type InvoiceFetchUpcomingResponseInvoiceSource string
const ( InvoiceFetchUpcomingResponseInvoiceSourceSubscription InvoiceFetchUpcomingResponseInvoiceSource = "subscription" InvoiceFetchUpcomingResponseInvoiceSourcePartial InvoiceFetchUpcomingResponseInvoiceSource = "partial" InvoiceFetchUpcomingResponseInvoiceSourceOneOff InvoiceFetchUpcomingResponseInvoiceSource = "one_off" )
func (InvoiceFetchUpcomingResponseInvoiceSource) IsKnown ¶ added in v0.25.0
func (r InvoiceFetchUpcomingResponseInvoiceSource) IsKnown() bool
type InvoiceFetchUpcomingResponseLineItem ¶
type InvoiceFetchUpcomingResponseLineItem struct { // A unique ID for this line item. ID string `json:"id,required"` // The final amount after any discounts or minimums. Amount string `json:"amount,required"` Discount shared.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"` // [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"` Maximum InvoiceFetchUpcomingResponseLineItemsMaximum `json:"maximum,required,nullable"` MaximumAmount string `json:"maximum_amount,required,nullable"` Minimum InvoiceFetchUpcomingResponseLineItemsMinimum `json:"minimum,required,nullable"` MinimumAmount string `json:"minimum_amount,required,nullable"` // The name of the price associated with this line item. Name string `json:"name,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. // // ## Unit pricing // // With unit pricing, each unit costs a fixed amount. // // “`json // // { // ... // "model_type": "unit", // "unit_config": { // "unit_amount": "0.50" // } // ... // } // // “` // // ## Tiered pricing // // In tiered pricing, the cost of a given unit depends on the tier range that it // falls into, where each tier range is defined by an upper and lower bound. For // example, the first ten units may cost $0.50 each and all units thereafter may // cost $0.10 each. // // “`json // // { // ... // "model_type": "tiered", // "tiered_config": { // "tiers": [ // { // "first_unit": 1, // "last_unit": 10, // "unit_amount": "0.50" // }, // { // "first_unit": 11, // "last_unit": null, // "unit_amount": "0.10" // } // ] // } // ... // // “` // // ## Bulk pricing // // Bulk pricing applies when the number of units determine the cost of all units. // For example, if you've bought less than 10 units, they may each be $0.50 for a // total of $5.00. Once you've bought more than 10 units, all units may now be // priced at $0.40 (i.e. 101 units total would be $40.40). // // “`json // // { // ... // "model_type": "bulk", // "bulk_config": { // "tiers": [ // { // "maximum_units": 10, // "unit_amount": "0.50" // }, // { // "maximum_units": 1000, // "unit_amount": "0.40" // } // ] // } // ... // } // // “` // // ## Package pricing // // Package pricing defines the size or granularity of a unit for billing purposes. // For example, if the package size is set to 5, then 4 units will be billed as 5 // and 6 units will be billed at 10. // // “`json // // { // ... // "model_type": "package", // "package_config": { // "package_amount": "0.80", // "package_size": 10 // } // ... // } // // “` // // ## BPS pricing // // BPS pricing specifies a per-event (e.g. per-payment) rate in one hundredth of a // percent (the number of basis points to charge), as well as a cap per event to // assess. For example, this would allow you to assess a fee of 0.25% on every // payment you process, with a maximum charge of $25 per payment. // // “`json // // { // ... // "model_type": "bps", // "bps_config": { // "bps": 125, // "per_unit_maximum": "11.00" // } // ... // } // // “` // // ## Bulk BPS pricing // // Bulk BPS pricing specifies BPS parameters in a tiered manner, dependent on the // total quantity across all events. Similar to bulk pricing, the BPS parameters of // a given event depends on the tier range that the billing period falls into. Each // tier range is defined by an upper bound. For example, after $1.5M of payment // volume is reached, each individual payment may have a lower cap or a smaller // take-rate. // // “`json // // ... // "model_type": "bulk_bps", // "bulk_bps_config": { // "tiers": [ // { // "maximum_amount": "1000000.00", // "bps": 125, // "per_unit_maximum": "19.00" // }, // { // "maximum_amount": null, // "bps": 115, // "per_unit_maximum": "4.00" // } // ] // } // ... // } // // “` // // ## Tiered BPS pricing // // Tiered BPS pricing specifies BPS parameters in a graduated manner, where an // event's applicable parameter is a function of its marginal addition to the // period total. Similar to tiered pricing, the BPS parameters of a given event // depends on the tier range that it falls into, where each tier range is defined // by an upper and lower bound. For example, the first few payments may have a 0.8 // BPS take-rate and all payments after a specific volume may incur a take-rate of // 0.5 BPS each. // // “`json // // ... // "model_type": "tiered_bps", // "tiered_bps_config": { // "tiers": [ // { // "minimum_amount": "0", // "maximum_amount": "1000000.00", // "bps": 125, // "per_unit_maximum": "19.00" // }, // { // "minimum_amount": "1000000.00", // "maximum_amount": null, // "bps": 115, // "per_unit_maximum": "4.00" // } // ] // } // ... // } // // “` // // ## Matrix pricing // // Matrix pricing defines a set of unit prices in a one or two-dimensional matrix. // `dimensions` defines the two event property values evaluated in this pricing // model. In a one-dimensional matrix, the second value is `null`. Every // configuration has a list of `matrix_values` which give the unit prices for // specified property values. In a one-dimensional matrix, the matrix values will // have `dimension_values` where the second value of the pair is null. If an event // does not match any of the dimension values in the matrix, it will resort to the // `default_unit_amount`. // // “`json // // { // "model_type": "matrix" // "matrix_config": { // "default_unit_amount": "3.00", // "dimensions": [ // "cluster_name", // "region" // ], // "matrix_values": [ // { // "dimension_values": [ // "alpha", // "west" // ], // "unit_amount": "2.00" // }, // ... // ] // } // } // // “` // // ## Fixed fees // // Fixed fees are prices that are applied independent of usage quantities, and // follow unit pricing. They also have an additional parameter // `fixed_price_quantity`. If the Price represents a fixed cost, this represents // the quantity of units applied. // // “`json // // { // ... // "id": "price_id", // "model_type": "unit", // "unit_config": { // "unit_amount": "2.00" // }, // "fixed_price_quantity": 3.0 // ... // } // // “` Price Price `json:"price,required,nullable"` 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 []InvoiceFetchUpcomingResponseLineItemsSubLineItem `json:"sub_line_items,required"` // The line amount before any line item-specific discounts or minimums. Subtotal string `json:"subtotal,required"` // An array of tax rates and their incurred tax amounts. Empty if no tax // integration is configured. TaxAmounts []InvoiceFetchUpcomingResponseLineItemsTaxAmount `json:"tax_amounts,required"` JSON invoiceFetchUpcomingResponseLineItemJSON `json:"-"` }
func (*InvoiceFetchUpcomingResponseLineItem) UnmarshalJSON ¶
func (r *InvoiceFetchUpcomingResponseLineItem) UnmarshalJSON(data []byte) (err error)
type InvoiceFetchUpcomingResponseLineItemsMaximum ¶
type InvoiceFetchUpcomingResponseLineItemsMaximum 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 invoiceFetchUpcomingResponseLineItemsMaximumJSON `json:"-"` }
func (*InvoiceFetchUpcomingResponseLineItemsMaximum) UnmarshalJSON ¶
func (r *InvoiceFetchUpcomingResponseLineItemsMaximum) UnmarshalJSON(data []byte) (err error)
type InvoiceFetchUpcomingResponseLineItemsMinimum ¶
type InvoiceFetchUpcomingResponseLineItemsMinimum 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 invoiceFetchUpcomingResponseLineItemsMinimumJSON `json:"-"` }
func (*InvoiceFetchUpcomingResponseLineItemsMinimum) UnmarshalJSON ¶
func (r *InvoiceFetchUpcomingResponseLineItemsMinimum) UnmarshalJSON(data []byte) (err error)
type InvoiceFetchUpcomingResponseLineItemsSubLineItem ¶
type InvoiceFetchUpcomingResponseLineItemsSubLineItem struct { // The total amount for this sub line item. Amount string `json:"amount,required"` Name string `json:"name,required"` Quantity float64 `json:"quantity,required"` // This field can have the runtime type of // [InvoiceFetchUpcomingResponseLineItemsSubLineItemsMatrixSubLineItemGrouping], // [InvoiceFetchUpcomingResponseLineItemsSubLineItemsTierSubLineItemGrouping], // [InvoiceFetchUpcomingResponseLineItemsSubLineItemsOtherSubLineItemGrouping]. Grouping interface{} `json:"grouping"` Type InvoiceFetchUpcomingResponseLineItemsSubLineItemsType `json:"type,required"` // This field can have the runtime type of // [InvoiceFetchUpcomingResponseLineItemsSubLineItemsMatrixSubLineItemMatrixConfig]. MatrixConfig interface{} `json:"matrix_config,required"` // This field can have the runtime type of // [InvoiceFetchUpcomingResponseLineItemsSubLineItemsTierSubLineItemTierConfig]. TierConfig interface{} `json:"tier_config,required"` JSON invoiceFetchUpcomingResponseLineItemsSubLineItemJSON `json:"-"` // contains filtered or unexported fields }
func (InvoiceFetchUpcomingResponseLineItemsSubLineItem) AsUnion ¶ added in v0.25.0
func (r InvoiceFetchUpcomingResponseLineItemsSubLineItem) AsUnion() InvoiceFetchUpcomingResponseLineItemsSubLineItemsUnion
AsUnion returns a InvoiceFetchUpcomingResponseLineItemsSubLineItemsUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are InvoiceFetchUpcomingResponseLineItemsSubLineItemsMatrixSubLineItem, InvoiceFetchUpcomingResponseLineItemsSubLineItemsTierSubLineItem, InvoiceFetchUpcomingResponseLineItemsSubLineItemsOtherSubLineItem.
func (*InvoiceFetchUpcomingResponseLineItemsSubLineItem) UnmarshalJSON ¶ added in v0.25.0
func (r *InvoiceFetchUpcomingResponseLineItemsSubLineItem) UnmarshalJSON(data []byte) (err error)
type InvoiceFetchUpcomingResponseLineItemsSubLineItemsMatrixSubLineItem ¶
type InvoiceFetchUpcomingResponseLineItemsSubLineItemsMatrixSubLineItem struct { // The total amount for this sub line item. Amount string `json:"amount,required"` Grouping InvoiceFetchUpcomingResponseLineItemsSubLineItemsMatrixSubLineItemGrouping `json:"grouping,required,nullable"` MatrixConfig InvoiceFetchUpcomingResponseLineItemsSubLineItemsMatrixSubLineItemMatrixConfig `json:"matrix_config,required"` Name string `json:"name,required"` Quantity float64 `json:"quantity,required"` Type InvoiceFetchUpcomingResponseLineItemsSubLineItemsMatrixSubLineItemType `json:"type,required"` JSON invoiceFetchUpcomingResponseLineItemsSubLineItemsMatrixSubLineItemJSON `json:"-"` }
func (*InvoiceFetchUpcomingResponseLineItemsSubLineItemsMatrixSubLineItem) UnmarshalJSON ¶
func (r *InvoiceFetchUpcomingResponseLineItemsSubLineItemsMatrixSubLineItem) UnmarshalJSON(data []byte) (err error)
type InvoiceFetchUpcomingResponseLineItemsSubLineItemsMatrixSubLineItemGrouping ¶
type InvoiceFetchUpcomingResponseLineItemsSubLineItemsMatrixSubLineItemGrouping struct { Key string `json:"key,required"` // No value indicates the default group Value string `json:"value,required,nullable"` JSON invoiceFetchUpcomingResponseLineItemsSubLineItemsMatrixSubLineItemGroupingJSON `json:"-"` }
func (*InvoiceFetchUpcomingResponseLineItemsSubLineItemsMatrixSubLineItemGrouping) UnmarshalJSON ¶
func (r *InvoiceFetchUpcomingResponseLineItemsSubLineItemsMatrixSubLineItemGrouping) UnmarshalJSON(data []byte) (err error)
type InvoiceFetchUpcomingResponseLineItemsSubLineItemsMatrixSubLineItemMatrixConfig ¶
type InvoiceFetchUpcomingResponseLineItemsSubLineItemsMatrixSubLineItemMatrixConfig struct { // The ordered dimension values for this line item. DimensionValues []string `json:"dimension_values,required"` JSON invoiceFetchUpcomingResponseLineItemsSubLineItemsMatrixSubLineItemMatrixConfigJSON `json:"-"` }
func (*InvoiceFetchUpcomingResponseLineItemsSubLineItemsMatrixSubLineItemMatrixConfig) UnmarshalJSON ¶
func (r *InvoiceFetchUpcomingResponseLineItemsSubLineItemsMatrixSubLineItemMatrixConfig) UnmarshalJSON(data []byte) (err error)
type InvoiceFetchUpcomingResponseLineItemsSubLineItemsMatrixSubLineItemType ¶
type InvoiceFetchUpcomingResponseLineItemsSubLineItemsMatrixSubLineItemType string
const (
InvoiceFetchUpcomingResponseLineItemsSubLineItemsMatrixSubLineItemTypeMatrix InvoiceFetchUpcomingResponseLineItemsSubLineItemsMatrixSubLineItemType = "matrix"
)
func (InvoiceFetchUpcomingResponseLineItemsSubLineItemsMatrixSubLineItemType) IsKnown ¶ added in v0.24.0
func (r InvoiceFetchUpcomingResponseLineItemsSubLineItemsMatrixSubLineItemType) IsKnown() bool
type InvoiceFetchUpcomingResponseLineItemsSubLineItemsOtherSubLineItem ¶
type InvoiceFetchUpcomingResponseLineItemsSubLineItemsOtherSubLineItem struct { // The total amount for this sub line item. Amount string `json:"amount,required"` Grouping InvoiceFetchUpcomingResponseLineItemsSubLineItemsOtherSubLineItemGrouping `json:"grouping,required,nullable"` Name string `json:"name,required"` Quantity float64 `json:"quantity,required"` Type InvoiceFetchUpcomingResponseLineItemsSubLineItemsOtherSubLineItemType `json:"type,required"` JSON invoiceFetchUpcomingResponseLineItemsSubLineItemsOtherSubLineItemJSON `json:"-"` }
func (*InvoiceFetchUpcomingResponseLineItemsSubLineItemsOtherSubLineItem) UnmarshalJSON ¶
func (r *InvoiceFetchUpcomingResponseLineItemsSubLineItemsOtherSubLineItem) UnmarshalJSON(data []byte) (err error)
type InvoiceFetchUpcomingResponseLineItemsSubLineItemsOtherSubLineItemGrouping ¶
type InvoiceFetchUpcomingResponseLineItemsSubLineItemsOtherSubLineItemGrouping struct { Key string `json:"key,required"` // No value indicates the default group Value string `json:"value,required,nullable"` JSON invoiceFetchUpcomingResponseLineItemsSubLineItemsOtherSubLineItemGroupingJSON `json:"-"` }
func (*InvoiceFetchUpcomingResponseLineItemsSubLineItemsOtherSubLineItemGrouping) UnmarshalJSON ¶
func (r *InvoiceFetchUpcomingResponseLineItemsSubLineItemsOtherSubLineItemGrouping) UnmarshalJSON(data []byte) (err error)
type InvoiceFetchUpcomingResponseLineItemsSubLineItemsOtherSubLineItemType ¶
type InvoiceFetchUpcomingResponseLineItemsSubLineItemsOtherSubLineItemType string
const (
InvoiceFetchUpcomingResponseLineItemsSubLineItemsOtherSubLineItemTypeNull InvoiceFetchUpcomingResponseLineItemsSubLineItemsOtherSubLineItemType = "'null'"
)
func (InvoiceFetchUpcomingResponseLineItemsSubLineItemsOtherSubLineItemType) IsKnown ¶ added in v0.24.0
func (r InvoiceFetchUpcomingResponseLineItemsSubLineItemsOtherSubLineItemType) IsKnown() bool
type InvoiceFetchUpcomingResponseLineItemsSubLineItemsTierSubLineItem ¶
type InvoiceFetchUpcomingResponseLineItemsSubLineItemsTierSubLineItem struct { // The total amount for this sub line item. Amount string `json:"amount,required"` Grouping InvoiceFetchUpcomingResponseLineItemsSubLineItemsTierSubLineItemGrouping `json:"grouping,required,nullable"` Name string `json:"name,required"` Quantity float64 `json:"quantity,required"` TierConfig InvoiceFetchUpcomingResponseLineItemsSubLineItemsTierSubLineItemTierConfig `json:"tier_config,required"` Type InvoiceFetchUpcomingResponseLineItemsSubLineItemsTierSubLineItemType `json:"type,required"` JSON invoiceFetchUpcomingResponseLineItemsSubLineItemsTierSubLineItemJSON `json:"-"` }
func (*InvoiceFetchUpcomingResponseLineItemsSubLineItemsTierSubLineItem) UnmarshalJSON ¶
func (r *InvoiceFetchUpcomingResponseLineItemsSubLineItemsTierSubLineItem) UnmarshalJSON(data []byte) (err error)
type InvoiceFetchUpcomingResponseLineItemsSubLineItemsTierSubLineItemGrouping ¶
type InvoiceFetchUpcomingResponseLineItemsSubLineItemsTierSubLineItemGrouping struct { Key string `json:"key,required"` // No value indicates the default group Value string `json:"value,required,nullable"` JSON invoiceFetchUpcomingResponseLineItemsSubLineItemsTierSubLineItemGroupingJSON `json:"-"` }
func (*InvoiceFetchUpcomingResponseLineItemsSubLineItemsTierSubLineItemGrouping) UnmarshalJSON ¶
func (r *InvoiceFetchUpcomingResponseLineItemsSubLineItemsTierSubLineItemGrouping) UnmarshalJSON(data []byte) (err error)
type InvoiceFetchUpcomingResponseLineItemsSubLineItemsTierSubLineItemTierConfig ¶
type InvoiceFetchUpcomingResponseLineItemsSubLineItemsTierSubLineItemTierConfig struct { FirstUnit float64 `json:"first_unit,required"` LastUnit float64 `json:"last_unit,required,nullable"` UnitAmount string `json:"unit_amount,required"` JSON invoiceFetchUpcomingResponseLineItemsSubLineItemsTierSubLineItemTierConfigJSON `json:"-"` }
func (*InvoiceFetchUpcomingResponseLineItemsSubLineItemsTierSubLineItemTierConfig) UnmarshalJSON ¶
func (r *InvoiceFetchUpcomingResponseLineItemsSubLineItemsTierSubLineItemTierConfig) UnmarshalJSON(data []byte) (err error)
type InvoiceFetchUpcomingResponseLineItemsSubLineItemsTierSubLineItemType ¶
type InvoiceFetchUpcomingResponseLineItemsSubLineItemsTierSubLineItemType string
const (
InvoiceFetchUpcomingResponseLineItemsSubLineItemsTierSubLineItemTypeTier InvoiceFetchUpcomingResponseLineItemsSubLineItemsTierSubLineItemType = "tier"
)
func (InvoiceFetchUpcomingResponseLineItemsSubLineItemsTierSubLineItemType) IsKnown ¶ added in v0.24.0
func (r InvoiceFetchUpcomingResponseLineItemsSubLineItemsTierSubLineItemType) IsKnown() bool
type InvoiceFetchUpcomingResponseLineItemsSubLineItemsType ¶ added in v0.25.0
type InvoiceFetchUpcomingResponseLineItemsSubLineItemsType string
const ( InvoiceFetchUpcomingResponseLineItemsSubLineItemsTypeMatrix InvoiceFetchUpcomingResponseLineItemsSubLineItemsType = "matrix" InvoiceFetchUpcomingResponseLineItemsSubLineItemsTypeTier InvoiceFetchUpcomingResponseLineItemsSubLineItemsType = "tier" InvoiceFetchUpcomingResponseLineItemsSubLineItemsTypeNull InvoiceFetchUpcomingResponseLineItemsSubLineItemsType = "'null'" )
func (InvoiceFetchUpcomingResponseLineItemsSubLineItemsType) IsKnown ¶ added in v0.25.0
func (r InvoiceFetchUpcomingResponseLineItemsSubLineItemsType) IsKnown() bool
type InvoiceFetchUpcomingResponseLineItemsSubLineItemsUnion ¶ added in v0.25.0
type InvoiceFetchUpcomingResponseLineItemsSubLineItemsUnion interface {
// contains filtered or unexported methods
}
Union satisfied by InvoiceFetchUpcomingResponseLineItemsSubLineItemsMatrixSubLineItem, InvoiceFetchUpcomingResponseLineItemsSubLineItemsTierSubLineItem or InvoiceFetchUpcomingResponseLineItemsSubLineItemsOtherSubLineItem.
type InvoiceFetchUpcomingResponseLineItemsTaxAmount ¶
type InvoiceFetchUpcomingResponseLineItemsTaxAmount 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 invoiceFetchUpcomingResponseLineItemsTaxAmountJSON `json:"-"` }
func (*InvoiceFetchUpcomingResponseLineItemsTaxAmount) UnmarshalJSON ¶
func (r *InvoiceFetchUpcomingResponseLineItemsTaxAmount) UnmarshalJSON(data []byte) (err error)
type InvoiceFetchUpcomingResponseMaximum ¶
type InvoiceFetchUpcomingResponseMaximum 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 invoiceFetchUpcomingResponseMaximumJSON `json:"-"` }
func (*InvoiceFetchUpcomingResponseMaximum) UnmarshalJSON ¶
func (r *InvoiceFetchUpcomingResponseMaximum) UnmarshalJSON(data []byte) (err error)
type InvoiceFetchUpcomingResponseMinimum ¶
type InvoiceFetchUpcomingResponseMinimum 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 invoiceFetchUpcomingResponseMinimumJSON `json:"-"` }
func (*InvoiceFetchUpcomingResponseMinimum) UnmarshalJSON ¶
func (r *InvoiceFetchUpcomingResponseMinimum) UnmarshalJSON(data []byte) (err error)
type InvoiceFetchUpcomingResponseShippingAddress ¶
type InvoiceFetchUpcomingResponseShippingAddress 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 invoiceFetchUpcomingResponseShippingAddressJSON `json:"-"` }
func (*InvoiceFetchUpcomingResponseShippingAddress) UnmarshalJSON ¶
func (r *InvoiceFetchUpcomingResponseShippingAddress) UnmarshalJSON(data []byte) (err error)
type InvoiceFetchUpcomingResponseStatus ¶
type InvoiceFetchUpcomingResponseStatus string
const ( InvoiceFetchUpcomingResponseStatusIssued InvoiceFetchUpcomingResponseStatus = "issued" InvoiceFetchUpcomingResponseStatusPaid InvoiceFetchUpcomingResponseStatus = "paid" InvoiceFetchUpcomingResponseStatusSynced InvoiceFetchUpcomingResponseStatus = "synced" InvoiceFetchUpcomingResponseStatusVoid InvoiceFetchUpcomingResponseStatus = "void" InvoiceFetchUpcomingResponseStatusDraft InvoiceFetchUpcomingResponseStatus = "draft" )
func (InvoiceFetchUpcomingResponseStatus) IsKnown ¶ added in v0.24.0
func (r InvoiceFetchUpcomingResponseStatus) IsKnown() bool
type InvoiceFetchUpcomingResponseSubscription ¶
type InvoiceFetchUpcomingResponseSubscription struct { ID string `json:"id,required"` JSON invoiceFetchUpcomingResponseSubscriptionJSON `json:"-"` }
func (*InvoiceFetchUpcomingResponseSubscription) UnmarshalJSON ¶
func (r *InvoiceFetchUpcomingResponseSubscription) UnmarshalJSON(data []byte) (err error)
type InvoiceInvoiceSource ¶ added in v0.25.0
type InvoiceInvoiceSource string
const ( InvoiceInvoiceSourceSubscription InvoiceInvoiceSource = "subscription" InvoiceInvoiceSourcePartial InvoiceInvoiceSource = "partial" InvoiceInvoiceSourceOneOff InvoiceInvoiceSource = "one_off" )
func (InvoiceInvoiceSource) IsKnown ¶ added in v0.25.0
func (r InvoiceInvoiceSource) IsKnown() bool
type InvoiceLineItem ¶
type InvoiceLineItem struct { // A unique ID for this line item. ID string `json:"id,required"` // The final amount after any discounts or minimums. Amount string `json:"amount,required"` Discount shared.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"` // [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"` Maximum InvoiceLineItemsMaximum `json:"maximum,required,nullable"` MaximumAmount string `json:"maximum_amount,required,nullable"` Minimum InvoiceLineItemsMinimum `json:"minimum,required,nullable"` MinimumAmount string `json:"minimum_amount,required,nullable"` // The name of the price associated with this line item. Name string `json:"name,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. // // ## Unit pricing // // With unit pricing, each unit costs a fixed amount. // // “`json // // { // ... // "model_type": "unit", // "unit_config": { // "unit_amount": "0.50" // } // ... // } // // “` // // ## Tiered pricing // // In tiered pricing, the cost of a given unit depends on the tier range that it // falls into, where each tier range is defined by an upper and lower bound. For // example, the first ten units may cost $0.50 each and all units thereafter may // cost $0.10 each. // // “`json // // { // ... // "model_type": "tiered", // "tiered_config": { // "tiers": [ // { // "first_unit": 1, // "last_unit": 10, // "unit_amount": "0.50" // }, // { // "first_unit": 11, // "last_unit": null, // "unit_amount": "0.10" // } // ] // } // ... // // “` // // ## Bulk pricing // // Bulk pricing applies when the number of units determine the cost of all units. // For example, if you've bought less than 10 units, they may each be $0.50 for a // total of $5.00. Once you've bought more than 10 units, all units may now be // priced at $0.40 (i.e. 101 units total would be $40.40). // // “`json // // { // ... // "model_type": "bulk", // "bulk_config": { // "tiers": [ // { // "maximum_units": 10, // "unit_amount": "0.50" // }, // { // "maximum_units": 1000, // "unit_amount": "0.40" // } // ] // } // ... // } // // “` // // ## Package pricing // // Package pricing defines the size or granularity of a unit for billing purposes. // For example, if the package size is set to 5, then 4 units will be billed as 5 // and 6 units will be billed at 10. // // “`json // // { // ... // "model_type": "package", // "package_config": { // "package_amount": "0.80", // "package_size": 10 // } // ... // } // // “` // // ## BPS pricing // // BPS pricing specifies a per-event (e.g. per-payment) rate in one hundredth of a // percent (the number of basis points to charge), as well as a cap per event to // assess. For example, this would allow you to assess a fee of 0.25% on every // payment you process, with a maximum charge of $25 per payment. // // “`json // // { // ... // "model_type": "bps", // "bps_config": { // "bps": 125, // "per_unit_maximum": "11.00" // } // ... // } // // “` // // ## Bulk BPS pricing // // Bulk BPS pricing specifies BPS parameters in a tiered manner, dependent on the // total quantity across all events. Similar to bulk pricing, the BPS parameters of // a given event depends on the tier range that the billing period falls into. Each // tier range is defined by an upper bound. For example, after $1.5M of payment // volume is reached, each individual payment may have a lower cap or a smaller // take-rate. // // “`json // // ... // "model_type": "bulk_bps", // "bulk_bps_config": { // "tiers": [ // { // "maximum_amount": "1000000.00", // "bps": 125, // "per_unit_maximum": "19.00" // }, // { // "maximum_amount": null, // "bps": 115, // "per_unit_maximum": "4.00" // } // ] // } // ... // } // // “` // // ## Tiered BPS pricing // // Tiered BPS pricing specifies BPS parameters in a graduated manner, where an // event's applicable parameter is a function of its marginal addition to the // period total. Similar to tiered pricing, the BPS parameters of a given event // depends on the tier range that it falls into, where each tier range is defined // by an upper and lower bound. For example, the first few payments may have a 0.8 // BPS take-rate and all payments after a specific volume may incur a take-rate of // 0.5 BPS each. // // “`json // // ... // "model_type": "tiered_bps", // "tiered_bps_config": { // "tiers": [ // { // "minimum_amount": "0", // "maximum_amount": "1000000.00", // "bps": 125, // "per_unit_maximum": "19.00" // }, // { // "minimum_amount": "1000000.00", // "maximum_amount": null, // "bps": 115, // "per_unit_maximum": "4.00" // } // ] // } // ... // } // // “` // // ## Matrix pricing // // Matrix pricing defines a set of unit prices in a one or two-dimensional matrix. // `dimensions` defines the two event property values evaluated in this pricing // model. In a one-dimensional matrix, the second value is `null`. Every // configuration has a list of `matrix_values` which give the unit prices for // specified property values. In a one-dimensional matrix, the matrix values will // have `dimension_values` where the second value of the pair is null. If an event // does not match any of the dimension values in the matrix, it will resort to the // `default_unit_amount`. // // “`json // // { // "model_type": "matrix" // "matrix_config": { // "default_unit_amount": "3.00", // "dimensions": [ // "cluster_name", // "region" // ], // "matrix_values": [ // { // "dimension_values": [ // "alpha", // "west" // ], // "unit_amount": "2.00" // }, // ... // ] // } // } // // “` // // ## Fixed fees // // Fixed fees are prices that are applied independent of usage quantities, and // follow unit pricing. They also have an additional parameter // `fixed_price_quantity`. If the Price represents a fixed cost, this represents // the quantity of units applied. // // “`json // // { // ... // "id": "price_id", // "model_type": "unit", // "unit_config": { // "unit_amount": "2.00" // }, // "fixed_price_quantity": 3.0 // ... // } // // “` Price Price `json:"price,required,nullable"` 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 []InvoiceLineItemsSubLineItem `json:"sub_line_items,required"` // The line amount before any line item-specific discounts or minimums. Subtotal string `json:"subtotal,required"` // An array of tax rates and their incurred tax amounts. Empty if no tax // integration is configured. TaxAmounts []InvoiceLineItemsTaxAmount `json:"tax_amounts,required"` JSON invoiceLineItemJSON `json:"-"` }
func (*InvoiceLineItem) UnmarshalJSON ¶
func (r *InvoiceLineItem) UnmarshalJSON(data []byte) (err error)
type InvoiceLineItemNewParams ¶
type InvoiceLineItemNewParams struct { // The total amount in the invoice's currency to add to the line item. Amount param.Field[string] `json:"amount,required"` // A date string to specify the line item's end date in the customer's timezone. EndDate param.Field[time.Time] `json:"end_date,required" format:"date"` // The id of the Invoice to add this line item. InvoiceID param.Field[string] `json:"invoice_id,required"` // The item name associated with this line item. If an item with the same name // exists in Orb, that item will be associated with the line item. Name param.Field[string] `json:"name,required"` // The number of units on the line item Quantity param.Field[float64] `json:"quantity,required"` // A date string to specify the line item's start date in the customer's timezone. StartDate param.Field[time.Time] `json:"start_date,required" format:"date"` }
func (InvoiceLineItemNewParams) MarshalJSON ¶
func (r InvoiceLineItemNewParams) MarshalJSON() (data []byte, err error)
type InvoiceLineItemNewResponse ¶
type InvoiceLineItemNewResponse struct { // A unique ID for this line item. ID string `json:"id,required"` // The final amount after any discounts or minimums. Amount string `json:"amount,required"` Discount shared.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"` // [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"` Maximum InvoiceLineItemNewResponseMaximum `json:"maximum,required,nullable"` MaximumAmount string `json:"maximum_amount,required,nullable"` Minimum InvoiceLineItemNewResponseMinimum `json:"minimum,required,nullable"` MinimumAmount string `json:"minimum_amount,required,nullable"` // The name of the price associated with this line item. Name string `json:"name,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. // // ## Unit pricing // // With unit pricing, each unit costs a fixed amount. // // “`json // // { // ... // "model_type": "unit", // "unit_config": { // "unit_amount": "0.50" // } // ... // } // // “` // // ## Tiered pricing // // In tiered pricing, the cost of a given unit depends on the tier range that it // falls into, where each tier range is defined by an upper and lower bound. For // example, the first ten units may cost $0.50 each and all units thereafter may // cost $0.10 each. // // “`json // // { // ... // "model_type": "tiered", // "tiered_config": { // "tiers": [ // { // "first_unit": 1, // "last_unit": 10, // "unit_amount": "0.50" // }, // { // "first_unit": 11, // "last_unit": null, // "unit_amount": "0.10" // } // ] // } // ... // // “` // // ## Bulk pricing // // Bulk pricing applies when the number of units determine the cost of all units. // For example, if you've bought less than 10 units, they may each be $0.50 for a // total of $5.00. Once you've bought more than 10 units, all units may now be // priced at $0.40 (i.e. 101 units total would be $40.40). // // “`json // // { // ... // "model_type": "bulk", // "bulk_config": { // "tiers": [ // { // "maximum_units": 10, // "unit_amount": "0.50" // }, // { // "maximum_units": 1000, // "unit_amount": "0.40" // } // ] // } // ... // } // // “` // // ## Package pricing // // Package pricing defines the size or granularity of a unit for billing purposes. // For example, if the package size is set to 5, then 4 units will be billed as 5 // and 6 units will be billed at 10. // // “`json // // { // ... // "model_type": "package", // "package_config": { // "package_amount": "0.80", // "package_size": 10 // } // ... // } // // “` // // ## BPS pricing // // BPS pricing specifies a per-event (e.g. per-payment) rate in one hundredth of a // percent (the number of basis points to charge), as well as a cap per event to // assess. For example, this would allow you to assess a fee of 0.25% on every // payment you process, with a maximum charge of $25 per payment. // // “`json // // { // ... // "model_type": "bps", // "bps_config": { // "bps": 125, // "per_unit_maximum": "11.00" // } // ... // } // // “` // // ## Bulk BPS pricing // // Bulk BPS pricing specifies BPS parameters in a tiered manner, dependent on the // total quantity across all events. Similar to bulk pricing, the BPS parameters of // a given event depends on the tier range that the billing period falls into. Each // tier range is defined by an upper bound. For example, after $1.5M of payment // volume is reached, each individual payment may have a lower cap or a smaller // take-rate. // // “`json // // ... // "model_type": "bulk_bps", // "bulk_bps_config": { // "tiers": [ // { // "maximum_amount": "1000000.00", // "bps": 125, // "per_unit_maximum": "19.00" // }, // { // "maximum_amount": null, // "bps": 115, // "per_unit_maximum": "4.00" // } // ] // } // ... // } // // “` // // ## Tiered BPS pricing // // Tiered BPS pricing specifies BPS parameters in a graduated manner, where an // event's applicable parameter is a function of its marginal addition to the // period total. Similar to tiered pricing, the BPS parameters of a given event // depends on the tier range that it falls into, where each tier range is defined // by an upper and lower bound. For example, the first few payments may have a 0.8 // BPS take-rate and all payments after a specific volume may incur a take-rate of // 0.5 BPS each. // // “`json // // ... // "model_type": "tiered_bps", // "tiered_bps_config": { // "tiers": [ // { // "minimum_amount": "0", // "maximum_amount": "1000000.00", // "bps": 125, // "per_unit_maximum": "19.00" // }, // { // "minimum_amount": "1000000.00", // "maximum_amount": null, // "bps": 115, // "per_unit_maximum": "4.00" // } // ] // } // ... // } // // “` // // ## Matrix pricing // // Matrix pricing defines a set of unit prices in a one or two-dimensional matrix. // `dimensions` defines the two event property values evaluated in this pricing // model. In a one-dimensional matrix, the second value is `null`. Every // configuration has a list of `matrix_values` which give the unit prices for // specified property values. In a one-dimensional matrix, the matrix values will // have `dimension_values` where the second value of the pair is null. If an event // does not match any of the dimension values in the matrix, it will resort to the // `default_unit_amount`. // // “`json // // { // "model_type": "matrix" // "matrix_config": { // "default_unit_amount": "3.00", // "dimensions": [ // "cluster_name", // "region" // ], // "matrix_values": [ // { // "dimension_values": [ // "alpha", // "west" // ], // "unit_amount": "2.00" // }, // ... // ] // } // } // // “` // // ## Fixed fees // // Fixed fees are prices that are applied independent of usage quantities, and // follow unit pricing. They also have an additional parameter // `fixed_price_quantity`. If the Price represents a fixed cost, this represents // the quantity of units applied. // // “`json // // { // ... // "id": "price_id", // "model_type": "unit", // "unit_config": { // "unit_amount": "2.00" // }, // "fixed_price_quantity": 3.0 // ... // } // // “` Price Price `json:"price,required,nullable"` 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 []InvoiceLineItemNewResponseSubLineItem `json:"sub_line_items,required"` // The line amount before any line item-specific discounts or minimums. Subtotal string `json:"subtotal,required"` // An array of tax rates and their incurred tax amounts. Empty if no tax // integration is configured. TaxAmounts []InvoiceLineItemNewResponseTaxAmount `json:"tax_amounts,required"` JSON invoiceLineItemNewResponseJSON `json:"-"` }
func (*InvoiceLineItemNewResponse) UnmarshalJSON ¶
func (r *InvoiceLineItemNewResponse) UnmarshalJSON(data []byte) (err error)
type InvoiceLineItemNewResponseMaximum ¶
type InvoiceLineItemNewResponseMaximum 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 invoiceLineItemNewResponseMaximumJSON `json:"-"` }
func (*InvoiceLineItemNewResponseMaximum) UnmarshalJSON ¶
func (r *InvoiceLineItemNewResponseMaximum) UnmarshalJSON(data []byte) (err error)
type InvoiceLineItemNewResponseMinimum ¶
type InvoiceLineItemNewResponseMinimum 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 invoiceLineItemNewResponseMinimumJSON `json:"-"` }
func (*InvoiceLineItemNewResponseMinimum) UnmarshalJSON ¶
func (r *InvoiceLineItemNewResponseMinimum) UnmarshalJSON(data []byte) (err error)
type InvoiceLineItemNewResponseSubLineItem ¶
type InvoiceLineItemNewResponseSubLineItem struct { // The total amount for this sub line item. Amount string `json:"amount,required"` Name string `json:"name,required"` Quantity float64 `json:"quantity,required"` // This field can have the runtime type of // [InvoiceLineItemNewResponseSubLineItemsMatrixSubLineItemGrouping], // [InvoiceLineItemNewResponseSubLineItemsTierSubLineItemGrouping], // [InvoiceLineItemNewResponseSubLineItemsOtherSubLineItemGrouping]. Grouping interface{} `json:"grouping"` Type InvoiceLineItemNewResponseSubLineItemsType `json:"type,required"` // This field can have the runtime type of // [InvoiceLineItemNewResponseSubLineItemsMatrixSubLineItemMatrixConfig]. MatrixConfig interface{} `json:"matrix_config,required"` // This field can have the runtime type of // [InvoiceLineItemNewResponseSubLineItemsTierSubLineItemTierConfig]. TierConfig interface{} `json:"tier_config,required"` JSON invoiceLineItemNewResponseSubLineItemJSON `json:"-"` // contains filtered or unexported fields }
func (InvoiceLineItemNewResponseSubLineItem) AsUnion ¶ added in v0.25.0
func (r InvoiceLineItemNewResponseSubLineItem) AsUnion() InvoiceLineItemNewResponseSubLineItemsUnion
AsUnion returns a InvoiceLineItemNewResponseSubLineItemsUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are InvoiceLineItemNewResponseSubLineItemsMatrixSubLineItem, InvoiceLineItemNewResponseSubLineItemsTierSubLineItem, InvoiceLineItemNewResponseSubLineItemsOtherSubLineItem.
func (*InvoiceLineItemNewResponseSubLineItem) UnmarshalJSON ¶ added in v0.25.0
func (r *InvoiceLineItemNewResponseSubLineItem) UnmarshalJSON(data []byte) (err error)
type InvoiceLineItemNewResponseSubLineItemsMatrixSubLineItem ¶
type InvoiceLineItemNewResponseSubLineItemsMatrixSubLineItem struct { // The total amount for this sub line item. Amount string `json:"amount,required"` Grouping InvoiceLineItemNewResponseSubLineItemsMatrixSubLineItemGrouping `json:"grouping,required,nullable"` MatrixConfig InvoiceLineItemNewResponseSubLineItemsMatrixSubLineItemMatrixConfig `json:"matrix_config,required"` Name string `json:"name,required"` Quantity float64 `json:"quantity,required"` Type InvoiceLineItemNewResponseSubLineItemsMatrixSubLineItemType `json:"type,required"` JSON invoiceLineItemNewResponseSubLineItemsMatrixSubLineItemJSON `json:"-"` }
func (*InvoiceLineItemNewResponseSubLineItemsMatrixSubLineItem) UnmarshalJSON ¶
func (r *InvoiceLineItemNewResponseSubLineItemsMatrixSubLineItem) UnmarshalJSON(data []byte) (err error)
type InvoiceLineItemNewResponseSubLineItemsMatrixSubLineItemGrouping ¶
type InvoiceLineItemNewResponseSubLineItemsMatrixSubLineItemGrouping struct { Key string `json:"key,required"` // No value indicates the default group Value string `json:"value,required,nullable"` JSON invoiceLineItemNewResponseSubLineItemsMatrixSubLineItemGroupingJSON `json:"-"` }
func (*InvoiceLineItemNewResponseSubLineItemsMatrixSubLineItemGrouping) UnmarshalJSON ¶
func (r *InvoiceLineItemNewResponseSubLineItemsMatrixSubLineItemGrouping) UnmarshalJSON(data []byte) (err error)
type InvoiceLineItemNewResponseSubLineItemsMatrixSubLineItemMatrixConfig ¶
type InvoiceLineItemNewResponseSubLineItemsMatrixSubLineItemMatrixConfig struct { // The ordered dimension values for this line item. DimensionValues []string `json:"dimension_values,required"` JSON invoiceLineItemNewResponseSubLineItemsMatrixSubLineItemMatrixConfigJSON `json:"-"` }
func (*InvoiceLineItemNewResponseSubLineItemsMatrixSubLineItemMatrixConfig) UnmarshalJSON ¶
func (r *InvoiceLineItemNewResponseSubLineItemsMatrixSubLineItemMatrixConfig) UnmarshalJSON(data []byte) (err error)
type InvoiceLineItemNewResponseSubLineItemsMatrixSubLineItemType ¶
type InvoiceLineItemNewResponseSubLineItemsMatrixSubLineItemType string
const (
InvoiceLineItemNewResponseSubLineItemsMatrixSubLineItemTypeMatrix InvoiceLineItemNewResponseSubLineItemsMatrixSubLineItemType = "matrix"
)
func (InvoiceLineItemNewResponseSubLineItemsMatrixSubLineItemType) IsKnown ¶ added in v0.24.0
func (r InvoiceLineItemNewResponseSubLineItemsMatrixSubLineItemType) IsKnown() bool
type InvoiceLineItemNewResponseSubLineItemsOtherSubLineItem ¶
type InvoiceLineItemNewResponseSubLineItemsOtherSubLineItem struct { // The total amount for this sub line item. Amount string `json:"amount,required"` Grouping InvoiceLineItemNewResponseSubLineItemsOtherSubLineItemGrouping `json:"grouping,required,nullable"` Name string `json:"name,required"` Quantity float64 `json:"quantity,required"` Type InvoiceLineItemNewResponseSubLineItemsOtherSubLineItemType `json:"type,required"` JSON invoiceLineItemNewResponseSubLineItemsOtherSubLineItemJSON `json:"-"` }
func (*InvoiceLineItemNewResponseSubLineItemsOtherSubLineItem) UnmarshalJSON ¶
func (r *InvoiceLineItemNewResponseSubLineItemsOtherSubLineItem) UnmarshalJSON(data []byte) (err error)
type InvoiceLineItemNewResponseSubLineItemsOtherSubLineItemGrouping ¶
type InvoiceLineItemNewResponseSubLineItemsOtherSubLineItemGrouping struct { Key string `json:"key,required"` // No value indicates the default group Value string `json:"value,required,nullable"` JSON invoiceLineItemNewResponseSubLineItemsOtherSubLineItemGroupingJSON `json:"-"` }
func (*InvoiceLineItemNewResponseSubLineItemsOtherSubLineItemGrouping) UnmarshalJSON ¶
func (r *InvoiceLineItemNewResponseSubLineItemsOtherSubLineItemGrouping) UnmarshalJSON(data []byte) (err error)
type InvoiceLineItemNewResponseSubLineItemsOtherSubLineItemType ¶
type InvoiceLineItemNewResponseSubLineItemsOtherSubLineItemType string
const (
InvoiceLineItemNewResponseSubLineItemsOtherSubLineItemTypeNull InvoiceLineItemNewResponseSubLineItemsOtherSubLineItemType = "'null'"
)
func (InvoiceLineItemNewResponseSubLineItemsOtherSubLineItemType) IsKnown ¶ added in v0.24.0
func (r InvoiceLineItemNewResponseSubLineItemsOtherSubLineItemType) IsKnown() bool
type InvoiceLineItemNewResponseSubLineItemsTierSubLineItem ¶
type InvoiceLineItemNewResponseSubLineItemsTierSubLineItem struct { // The total amount for this sub line item. Amount string `json:"amount,required"` Grouping InvoiceLineItemNewResponseSubLineItemsTierSubLineItemGrouping `json:"grouping,required,nullable"` Name string `json:"name,required"` Quantity float64 `json:"quantity,required"` TierConfig InvoiceLineItemNewResponseSubLineItemsTierSubLineItemTierConfig `json:"tier_config,required"` Type InvoiceLineItemNewResponseSubLineItemsTierSubLineItemType `json:"type,required"` JSON invoiceLineItemNewResponseSubLineItemsTierSubLineItemJSON `json:"-"` }
func (*InvoiceLineItemNewResponseSubLineItemsTierSubLineItem) UnmarshalJSON ¶
func (r *InvoiceLineItemNewResponseSubLineItemsTierSubLineItem) UnmarshalJSON(data []byte) (err error)
type InvoiceLineItemNewResponseSubLineItemsTierSubLineItemGrouping ¶
type InvoiceLineItemNewResponseSubLineItemsTierSubLineItemGrouping struct { Key string `json:"key,required"` // No value indicates the default group Value string `json:"value,required,nullable"` JSON invoiceLineItemNewResponseSubLineItemsTierSubLineItemGroupingJSON `json:"-"` }
func (*InvoiceLineItemNewResponseSubLineItemsTierSubLineItemGrouping) UnmarshalJSON ¶
func (r *InvoiceLineItemNewResponseSubLineItemsTierSubLineItemGrouping) UnmarshalJSON(data []byte) (err error)
type InvoiceLineItemNewResponseSubLineItemsTierSubLineItemTierConfig ¶
type InvoiceLineItemNewResponseSubLineItemsTierSubLineItemTierConfig struct { FirstUnit float64 `json:"first_unit,required"` LastUnit float64 `json:"last_unit,required,nullable"` UnitAmount string `json:"unit_amount,required"` JSON invoiceLineItemNewResponseSubLineItemsTierSubLineItemTierConfigJSON `json:"-"` }
func (*InvoiceLineItemNewResponseSubLineItemsTierSubLineItemTierConfig) UnmarshalJSON ¶
func (r *InvoiceLineItemNewResponseSubLineItemsTierSubLineItemTierConfig) UnmarshalJSON(data []byte) (err error)
type InvoiceLineItemNewResponseSubLineItemsTierSubLineItemType ¶
type InvoiceLineItemNewResponseSubLineItemsTierSubLineItemType string
const (
InvoiceLineItemNewResponseSubLineItemsTierSubLineItemTypeTier InvoiceLineItemNewResponseSubLineItemsTierSubLineItemType = "tier"
)
func (InvoiceLineItemNewResponseSubLineItemsTierSubLineItemType) IsKnown ¶ added in v0.24.0
func (r InvoiceLineItemNewResponseSubLineItemsTierSubLineItemType) IsKnown() bool
type InvoiceLineItemNewResponseSubLineItemsType ¶ added in v0.25.0
type InvoiceLineItemNewResponseSubLineItemsType string
const ( InvoiceLineItemNewResponseSubLineItemsTypeMatrix InvoiceLineItemNewResponseSubLineItemsType = "matrix" InvoiceLineItemNewResponseSubLineItemsTypeTier InvoiceLineItemNewResponseSubLineItemsType = "tier" InvoiceLineItemNewResponseSubLineItemsTypeNull InvoiceLineItemNewResponseSubLineItemsType = "'null'" )
func (InvoiceLineItemNewResponseSubLineItemsType) IsKnown ¶ added in v0.25.0
func (r InvoiceLineItemNewResponseSubLineItemsType) IsKnown() bool
type InvoiceLineItemNewResponseSubLineItemsUnion ¶ added in v0.25.0
type InvoiceLineItemNewResponseSubLineItemsUnion interface {
// contains filtered or unexported methods
}
Union satisfied by InvoiceLineItemNewResponseSubLineItemsMatrixSubLineItem, InvoiceLineItemNewResponseSubLineItemsTierSubLineItem or InvoiceLineItemNewResponseSubLineItemsOtherSubLineItem.
type InvoiceLineItemNewResponseTaxAmount ¶
type InvoiceLineItemNewResponseTaxAmount 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 invoiceLineItemNewResponseTaxAmountJSON `json:"-"` }
func (*InvoiceLineItemNewResponseTaxAmount) UnmarshalJSON ¶
func (r *InvoiceLineItemNewResponseTaxAmount) UnmarshalJSON(data []byte) (err error)
type InvoiceLineItemService ¶
type InvoiceLineItemService struct {
Options []option.RequestOption
}
InvoiceLineItemService contains methods and other services that help with interacting with the orb API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewInvoiceLineItemService method instead.
func NewInvoiceLineItemService ¶
func NewInvoiceLineItemService(opts ...option.RequestOption) (r *InvoiceLineItemService)
NewInvoiceLineItemService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*InvoiceLineItemService) New ¶
func (r *InvoiceLineItemService) New(ctx context.Context, body InvoiceLineItemNewParams, opts ...option.RequestOption) (res *InvoiceLineItemNewResponse, err error)
This creates a one-off fixed fee invoice line item on an Invoice. This can only be done for invoices that are in a `draft` status.
type InvoiceLineItemsMaximum ¶
type InvoiceLineItemsMaximum 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 invoiceLineItemsMaximumJSON `json:"-"` }
func (*InvoiceLineItemsMaximum) UnmarshalJSON ¶
func (r *InvoiceLineItemsMaximum) UnmarshalJSON(data []byte) (err error)
type InvoiceLineItemsMinimum ¶
type InvoiceLineItemsMinimum 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 invoiceLineItemsMinimumJSON `json:"-"` }
func (*InvoiceLineItemsMinimum) UnmarshalJSON ¶
func (r *InvoiceLineItemsMinimum) UnmarshalJSON(data []byte) (err error)
type InvoiceLineItemsSubLineItem ¶
type InvoiceLineItemsSubLineItem struct { // The total amount for this sub line item. Amount string `json:"amount,required"` Name string `json:"name,required"` Quantity float64 `json:"quantity,required"` // This field can have the runtime type of // [InvoiceLineItemsSubLineItemsMatrixSubLineItemGrouping], // [InvoiceLineItemsSubLineItemsTierSubLineItemGrouping], // [InvoiceLineItemsSubLineItemsOtherSubLineItemGrouping]. Grouping interface{} `json:"grouping"` Type InvoiceLineItemsSubLineItemsType `json:"type,required"` // This field can have the runtime type of // [InvoiceLineItemsSubLineItemsMatrixSubLineItemMatrixConfig]. MatrixConfig interface{} `json:"matrix_config,required"` // This field can have the runtime type of // [InvoiceLineItemsSubLineItemsTierSubLineItemTierConfig]. TierConfig interface{} `json:"tier_config,required"` JSON invoiceLineItemsSubLineItemJSON `json:"-"` // contains filtered or unexported fields }
func (InvoiceLineItemsSubLineItem) AsUnion ¶ added in v0.25.0
func (r InvoiceLineItemsSubLineItem) AsUnion() InvoiceLineItemsSubLineItemsUnion
AsUnion returns a InvoiceLineItemsSubLineItemsUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are InvoiceLineItemsSubLineItemsMatrixSubLineItem, InvoiceLineItemsSubLineItemsTierSubLineItem, InvoiceLineItemsSubLineItemsOtherSubLineItem.
func (*InvoiceLineItemsSubLineItem) UnmarshalJSON ¶ added in v0.25.0
func (r *InvoiceLineItemsSubLineItem) UnmarshalJSON(data []byte) (err error)
type InvoiceLineItemsSubLineItemsMatrixSubLineItem ¶
type InvoiceLineItemsSubLineItemsMatrixSubLineItem struct { // The total amount for this sub line item. Amount string `json:"amount,required"` Grouping InvoiceLineItemsSubLineItemsMatrixSubLineItemGrouping `json:"grouping,required,nullable"` MatrixConfig InvoiceLineItemsSubLineItemsMatrixSubLineItemMatrixConfig `json:"matrix_config,required"` Name string `json:"name,required"` Quantity float64 `json:"quantity,required"` Type InvoiceLineItemsSubLineItemsMatrixSubLineItemType `json:"type,required"` JSON invoiceLineItemsSubLineItemsMatrixSubLineItemJSON `json:"-"` }
func (*InvoiceLineItemsSubLineItemsMatrixSubLineItem) UnmarshalJSON ¶
func (r *InvoiceLineItemsSubLineItemsMatrixSubLineItem) UnmarshalJSON(data []byte) (err error)
type InvoiceLineItemsSubLineItemsMatrixSubLineItemGrouping ¶
type InvoiceLineItemsSubLineItemsMatrixSubLineItemGrouping struct { Key string `json:"key,required"` // No value indicates the default group Value string `json:"value,required,nullable"` JSON invoiceLineItemsSubLineItemsMatrixSubLineItemGroupingJSON `json:"-"` }
func (*InvoiceLineItemsSubLineItemsMatrixSubLineItemGrouping) UnmarshalJSON ¶
func (r *InvoiceLineItemsSubLineItemsMatrixSubLineItemGrouping) UnmarshalJSON(data []byte) (err error)
type InvoiceLineItemsSubLineItemsMatrixSubLineItemMatrixConfig ¶
type InvoiceLineItemsSubLineItemsMatrixSubLineItemMatrixConfig struct { // The ordered dimension values for this line item. DimensionValues []string `json:"dimension_values,required"` JSON invoiceLineItemsSubLineItemsMatrixSubLineItemMatrixConfigJSON `json:"-"` }
func (*InvoiceLineItemsSubLineItemsMatrixSubLineItemMatrixConfig) UnmarshalJSON ¶
func (r *InvoiceLineItemsSubLineItemsMatrixSubLineItemMatrixConfig) UnmarshalJSON(data []byte) (err error)
type InvoiceLineItemsSubLineItemsMatrixSubLineItemType ¶
type InvoiceLineItemsSubLineItemsMatrixSubLineItemType string
const (
InvoiceLineItemsSubLineItemsMatrixSubLineItemTypeMatrix InvoiceLineItemsSubLineItemsMatrixSubLineItemType = "matrix"
)
func (InvoiceLineItemsSubLineItemsMatrixSubLineItemType) IsKnown ¶ added in v0.24.0
func (r InvoiceLineItemsSubLineItemsMatrixSubLineItemType) IsKnown() bool
type InvoiceLineItemsSubLineItemsOtherSubLineItem ¶
type InvoiceLineItemsSubLineItemsOtherSubLineItem struct { // The total amount for this sub line item. Amount string `json:"amount,required"` Grouping InvoiceLineItemsSubLineItemsOtherSubLineItemGrouping `json:"grouping,required,nullable"` Name string `json:"name,required"` Quantity float64 `json:"quantity,required"` Type InvoiceLineItemsSubLineItemsOtherSubLineItemType `json:"type,required"` JSON invoiceLineItemsSubLineItemsOtherSubLineItemJSON `json:"-"` }
func (*InvoiceLineItemsSubLineItemsOtherSubLineItem) UnmarshalJSON ¶
func (r *InvoiceLineItemsSubLineItemsOtherSubLineItem) UnmarshalJSON(data []byte) (err error)
type InvoiceLineItemsSubLineItemsOtherSubLineItemGrouping ¶
type InvoiceLineItemsSubLineItemsOtherSubLineItemGrouping struct { Key string `json:"key,required"` // No value indicates the default group Value string `json:"value,required,nullable"` JSON invoiceLineItemsSubLineItemsOtherSubLineItemGroupingJSON `json:"-"` }
func (*InvoiceLineItemsSubLineItemsOtherSubLineItemGrouping) UnmarshalJSON ¶
func (r *InvoiceLineItemsSubLineItemsOtherSubLineItemGrouping) UnmarshalJSON(data []byte) (err error)
type InvoiceLineItemsSubLineItemsOtherSubLineItemType ¶
type InvoiceLineItemsSubLineItemsOtherSubLineItemType string
const (
InvoiceLineItemsSubLineItemsOtherSubLineItemTypeNull InvoiceLineItemsSubLineItemsOtherSubLineItemType = "'null'"
)
func (InvoiceLineItemsSubLineItemsOtherSubLineItemType) IsKnown ¶ added in v0.24.0
func (r InvoiceLineItemsSubLineItemsOtherSubLineItemType) IsKnown() bool
type InvoiceLineItemsSubLineItemsTierSubLineItem ¶
type InvoiceLineItemsSubLineItemsTierSubLineItem struct { // The total amount for this sub line item. Amount string `json:"amount,required"` Grouping InvoiceLineItemsSubLineItemsTierSubLineItemGrouping `json:"grouping,required,nullable"` Name string `json:"name,required"` Quantity float64 `json:"quantity,required"` TierConfig InvoiceLineItemsSubLineItemsTierSubLineItemTierConfig `json:"tier_config,required"` Type InvoiceLineItemsSubLineItemsTierSubLineItemType `json:"type,required"` JSON invoiceLineItemsSubLineItemsTierSubLineItemJSON `json:"-"` }
func (*InvoiceLineItemsSubLineItemsTierSubLineItem) UnmarshalJSON ¶
func (r *InvoiceLineItemsSubLineItemsTierSubLineItem) UnmarshalJSON(data []byte) (err error)
type InvoiceLineItemsSubLineItemsTierSubLineItemGrouping ¶
type InvoiceLineItemsSubLineItemsTierSubLineItemGrouping struct { Key string `json:"key,required"` // No value indicates the default group Value string `json:"value,required,nullable"` JSON invoiceLineItemsSubLineItemsTierSubLineItemGroupingJSON `json:"-"` }
func (*InvoiceLineItemsSubLineItemsTierSubLineItemGrouping) UnmarshalJSON ¶
func (r *InvoiceLineItemsSubLineItemsTierSubLineItemGrouping) UnmarshalJSON(data []byte) (err error)
type InvoiceLineItemsSubLineItemsTierSubLineItemTierConfig ¶
type InvoiceLineItemsSubLineItemsTierSubLineItemTierConfig struct { FirstUnit float64 `json:"first_unit,required"` LastUnit float64 `json:"last_unit,required,nullable"` UnitAmount string `json:"unit_amount,required"` JSON invoiceLineItemsSubLineItemsTierSubLineItemTierConfigJSON `json:"-"` }
func (*InvoiceLineItemsSubLineItemsTierSubLineItemTierConfig) UnmarshalJSON ¶
func (r *InvoiceLineItemsSubLineItemsTierSubLineItemTierConfig) UnmarshalJSON(data []byte) (err error)
type InvoiceLineItemsSubLineItemsTierSubLineItemType ¶
type InvoiceLineItemsSubLineItemsTierSubLineItemType string
const (
InvoiceLineItemsSubLineItemsTierSubLineItemTypeTier InvoiceLineItemsSubLineItemsTierSubLineItemType = "tier"
)
func (InvoiceLineItemsSubLineItemsTierSubLineItemType) IsKnown ¶ added in v0.24.0
func (r InvoiceLineItemsSubLineItemsTierSubLineItemType) IsKnown() bool
type InvoiceLineItemsSubLineItemsType ¶ added in v0.25.0
type InvoiceLineItemsSubLineItemsType string
const ( InvoiceLineItemsSubLineItemsTypeMatrix InvoiceLineItemsSubLineItemsType = "matrix" InvoiceLineItemsSubLineItemsTypeTier InvoiceLineItemsSubLineItemsType = "tier" InvoiceLineItemsSubLineItemsTypeNull InvoiceLineItemsSubLineItemsType = "'null'" )
func (InvoiceLineItemsSubLineItemsType) IsKnown ¶ added in v0.25.0
func (r InvoiceLineItemsSubLineItemsType) IsKnown() bool
type InvoiceLineItemsSubLineItemsUnion ¶ added in v0.25.0
type InvoiceLineItemsSubLineItemsUnion interface {
// contains filtered or unexported methods
}
Union satisfied by InvoiceLineItemsSubLineItemsMatrixSubLineItem, InvoiceLineItemsSubLineItemsTierSubLineItem or InvoiceLineItemsSubLineItemsOtherSubLineItem.
type InvoiceLineItemsTaxAmount ¶
type InvoiceLineItemsTaxAmount 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 invoiceLineItemsTaxAmountJSON `json:"-"` }
func (*InvoiceLineItemsTaxAmount) UnmarshalJSON ¶
func (r *InvoiceLineItemsTaxAmount) UnmarshalJSON(data []byte) (err error)
type InvoiceListParams ¶
type InvoiceListParams struct { Amount param.Field[string] `query:"amount"` AmountGt param.Field[string] `query:"amount[gt]"` AmountLt param.Field[string] `query:"amount[lt]"` // Cursor for pagination. This can be populated by the `next_cursor` value returned // from the initial request. Cursor param.Field[string] `query:"cursor"` CustomerID param.Field[string] `query:"customer_id"` DateType param.Field[InvoiceListParamsDateType] `query:"date_type"` DueDate param.Field[time.Time] `query:"due_date" format:"date"` DueDateWindow param.Field[string] `query:"due_date_window"` DueDateGt param.Field[time.Time] `query:"due_date[gt]" format:"date"` DueDateLt param.Field[time.Time] `query:"due_date[lt]" format:"date"` ExternalCustomerID param.Field[string] `query:"external_customer_id"` InvoiceDateGt param.Field[time.Time] `query:"invoice_date[gt]" format:"date-time"` InvoiceDateGte param.Field[time.Time] `query:"invoice_date[gte]" format:"date-time"` InvoiceDateLt param.Field[time.Time] `query:"invoice_date[lt]" format:"date-time"` InvoiceDateLte param.Field[time.Time] `query:"invoice_date[lte]" format:"date-time"` IsRecurring param.Field[bool] `query:"is_recurring"` // The number of items to fetch. Defaults to 20. Limit param.Field[int64] `query:"limit"` Status param.Field[[]InvoiceListParamsStatus] `query:"status"` SubscriptionID param.Field[string] `query:"subscription_id"` }
func (InvoiceListParams) URLQuery ¶
func (r InvoiceListParams) URLQuery() (v url.Values)
URLQuery serializes InvoiceListParams's query parameters as `url.Values`.
type InvoiceListParamsDateType ¶
type InvoiceListParamsDateType string
const ( InvoiceListParamsDateTypeDueDate InvoiceListParamsDateType = "due_date" InvoiceListParamsDateTypeInvoiceDate InvoiceListParamsDateType = "invoice_date" )
func (InvoiceListParamsDateType) IsKnown ¶ added in v0.24.0
func (r InvoiceListParamsDateType) IsKnown() bool
type InvoiceListParamsStatus ¶
type InvoiceListParamsStatus string
const ( InvoiceListParamsStatusDraft InvoiceListParamsStatus = "draft" InvoiceListParamsStatusIssued InvoiceListParamsStatus = "issued" InvoiceListParamsStatusPaid InvoiceListParamsStatus = "paid" InvoiceListParamsStatusSynced InvoiceListParamsStatus = "synced" InvoiceListParamsStatusVoid InvoiceListParamsStatus = "void" )
func (InvoiceListParamsStatus) IsKnown ¶ added in v0.24.0
func (r InvoiceListParamsStatus) IsKnown() bool
type InvoiceMarkPaidParams ¶
type InvoiceMarkPaidParams struct { // A date string to specify the date of the payment. PaymentReceivedDate param.Field[time.Time] `json:"payment_received_date,required" format:"date"` // An optional external ID to associate with the payment. ExternalID param.Field[string] `json:"external_id"` // An optional note to associate with the payment. Notes param.Field[string] `json:"notes"` }
func (InvoiceMarkPaidParams) MarshalJSON ¶
func (r InvoiceMarkPaidParams) MarshalJSON() (data []byte, err error)
type InvoiceMaximum ¶
type InvoiceMaximum 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 invoiceMaximumJSON `json:"-"` }
func (*InvoiceMaximum) UnmarshalJSON ¶
func (r *InvoiceMaximum) UnmarshalJSON(data []byte) (err error)
type InvoiceMinimum ¶
type InvoiceMinimum 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 invoiceMinimumJSON `json:"-"` }
func (*InvoiceMinimum) UnmarshalJSON ¶
func (r *InvoiceMinimum) UnmarshalJSON(data []byte) (err error)
type InvoiceNewParams ¶
type InvoiceNewParams struct { // An ISO 4217 currency string. Must be the same as the customer's currency if it // is set. Currency param.Field[string] `json:"currency,required"` // Optional invoice date to set. Must be in the past, if not set, `invoice_date` is // set to the current time in the customer's timezone. InvoiceDate param.Field[time.Time] `json:"invoice_date,required" format:"date-time"` LineItems param.Field[[]InvoiceNewParamsLineItem] `json:"line_items,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 // 30 days to pay the invoice. NetTerms param.Field[int64] `json:"net_terms,required"` // The id of the `Customer` to create this invoice for. One of `customer_id` and // `external_customer_id` are required. CustomerID param.Field[string] `json:"customer_id"` // An optional discount to attach to the invoice. Discount param.Field[shared.DiscountUnionParam] `json:"discount"` // The `external_customer_id` of the `Customer` to create this invoice for. One of // `customer_id` and `external_customer_id` are required. ExternalCustomerID param.Field[string] `json:"external_customer_id"` // An optional memo to attach to the invoice. Memo param.Field[string] `json:"memo"` // 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"` // When true, this invoice will automatically be issued upon creation. When false, // the resulting invoice will require manual review to issue. Defaulted to false. WillAutoIssue param.Field[bool] `json:"will_auto_issue"` }
func (InvoiceNewParams) MarshalJSON ¶
func (r InvoiceNewParams) MarshalJSON() (data []byte, err error)
type InvoiceNewParamsLineItem ¶
type InvoiceNewParamsLineItem struct { // A date string to specify the line item's end date in the customer's timezone. EndDate param.Field[time.Time] `json:"end_date,required" format:"date"` ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[InvoiceNewParamsLineItemsModelType] `json:"model_type,required"` // The name of the line item. Name param.Field[string] `json:"name,required"` // The number of units on the line item Quantity param.Field[float64] `json:"quantity,required"` // A date string to specify the line item's start date in the customer's timezone. StartDate param.Field[time.Time] `json:"start_date,required" format:"date"` UnitConfig param.Field[InvoiceNewParamsLineItemsUnitConfig] `json:"unit_config,required"` }
func (InvoiceNewParamsLineItem) MarshalJSON ¶
func (r InvoiceNewParamsLineItem) MarshalJSON() (data []byte, err error)
type InvoiceNewParamsLineItemsModelType ¶
type InvoiceNewParamsLineItemsModelType string
const (
InvoiceNewParamsLineItemsModelTypeUnit InvoiceNewParamsLineItemsModelType = "unit"
)
func (InvoiceNewParamsLineItemsModelType) IsKnown ¶ added in v0.24.0
func (r InvoiceNewParamsLineItemsModelType) IsKnown() bool
type InvoiceNewParamsLineItemsUnitConfig ¶
type InvoiceNewParamsLineItemsUnitConfig struct { // Rate per unit of usage UnitAmount param.Field[string] `json:"unit_amount,required"` }
func (InvoiceNewParamsLineItemsUnitConfig) MarshalJSON ¶
func (r InvoiceNewParamsLineItemsUnitConfig) MarshalJSON() (data []byte, err error)
type InvoiceService ¶
type InvoiceService struct {
Options []option.RequestOption
}
InvoiceService contains methods and other services that help with interacting with the orb API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewInvoiceService method instead.
func NewInvoiceService ¶
func NewInvoiceService(opts ...option.RequestOption) (r *InvoiceService)
NewInvoiceService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*InvoiceService) Fetch ¶
func (r *InvoiceService) Fetch(ctx context.Context, invoiceID string, opts ...option.RequestOption) (res *Invoice, err error)
This endpoint is used to fetch an [`Invoice`](../guides/concepts#invoice) given an identifier.
func (*InvoiceService) FetchUpcoming ¶
func (r *InvoiceService) FetchUpcoming(ctx context.Context, query InvoiceFetchUpcomingParams, opts ...option.RequestOption) (res *InvoiceFetchUpcomingResponse, err error)
This endpoint can be used to fetch the upcoming [invoice](../guides/concepts#invoice) for the current billing period given a subscription.
func (*InvoiceService) Issue ¶
func (r *InvoiceService) Issue(ctx context.Context, invoiceID string, opts ...option.RequestOption) (res *Invoice, err error)
This endpoint allows an eligible invoice to be issued manually. This is only possible with invoices where status is `draft`, `will_auto_issue` is false, and an `eligible_to_issue_at` is a time in the past. Issuing an invoice could possibly trigger side effects, some of which could be customer-visible (e.g. sending emails, auto-collecting payment, syncing the invoice to external providers, etc).
func (*InvoiceService) List ¶
func (r *InvoiceService) List(ctx context.Context, query InvoiceListParams, opts ...option.RequestOption) (res *pagination.Page[Invoice], err error)
This endpoint returns a list of all [`Invoice`](../guides/concepts#invoice)s for an account in a list format.
The list of invoices is ordered starting from the most recently issued invoice date. The response also includes [`pagination_metadata`](../reference/pagination), which lets the caller retrieve the next page of results if they exist.
By default, this only returns invoices that are `issued`, `paid`, or `synced`.
When fetching any `draft` invoices, this returns the last-computed invoice values for each draft invoice, which may not always be up-to-date since Orb regularly refreshes invoices asynchronously.
func (*InvoiceService) ListAutoPaging ¶
func (r *InvoiceService) ListAutoPaging(ctx context.Context, query InvoiceListParams, opts ...option.RequestOption) *pagination.PageAutoPager[Invoice]
This endpoint returns a list of all [`Invoice`](../guides/concepts#invoice)s for an account in a list format.
The list of invoices is ordered starting from the most recently issued invoice date. The response also includes [`pagination_metadata`](../reference/pagination), which lets the caller retrieve the next page of results if they exist.
By default, this only returns invoices that are `issued`, `paid`, or `synced`.
When fetching any `draft` invoices, this returns the last-computed invoice values for each draft invoice, which may not always be up-to-date since Orb regularly refreshes invoices asynchronously.
func (*InvoiceService) MarkPaid ¶
func (r *InvoiceService) MarkPaid(ctx context.Context, invoiceID string, body InvoiceMarkPaidParams, opts ...option.RequestOption) (res *Invoice, err error)
This endpoint allows an invoice's status to be set the `paid` status. This can only be done to invoices that are in the `issued` status.
func (*InvoiceService) New ¶
func (r *InvoiceService) New(ctx context.Context, body InvoiceNewParams, opts ...option.RequestOption) (res *Invoice, err error)
This endpoint is used to create a one-off invoice for a customer.
func (*InvoiceService) Update ¶ added in v0.42.0
func (r *InvoiceService) Update(ctx context.Context, invoiceID string, body InvoiceUpdateParams, opts ...option.RequestOption) (res *Invoice, err error)
This endpoint allows you to update the `metadata` property on an invoice. If you pass null for the metadata value, it will clear any existing metadata for that invoice.
`metadata` can be modified regardless of invoice state.
func (*InvoiceService) Void ¶
func (r *InvoiceService) Void(ctx context.Context, invoiceID string, opts ...option.RequestOption) (res *Invoice, err error)
This endpoint allows an invoice's status to be set the `void` status. This can only be done to invoices that are in the `issued` status.
If the associated invoice has used the customer balance to change the amount due, the customer balance operation will be reverted. For example, if the invoice used $10 of customer balance, that amount will be added back to the customer balance upon voiding.
type InvoiceShippingAddress ¶
type InvoiceShippingAddress 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 invoiceShippingAddressJSON `json:"-"` }
func (*InvoiceShippingAddress) UnmarshalJSON ¶
func (r *InvoiceShippingAddress) UnmarshalJSON(data []byte) (err error)
type InvoiceStatus ¶
type InvoiceStatus string
const ( InvoiceStatusIssued InvoiceStatus = "issued" InvoiceStatusPaid InvoiceStatus = "paid" InvoiceStatusSynced InvoiceStatus = "synced" InvoiceStatusVoid InvoiceStatus = "void" InvoiceStatusDraft InvoiceStatus = "draft" )
func (InvoiceStatus) IsKnown ¶ added in v0.24.0
func (r InvoiceStatus) IsKnown() bool
type InvoiceSubscription ¶
type InvoiceSubscription struct { ID string `json:"id,required"` JSON invoiceSubscriptionJSON `json:"-"` }
func (*InvoiceSubscription) UnmarshalJSON ¶
func (r *InvoiceSubscription) UnmarshalJSON(data []byte) (err error)
type InvoiceUpdateParams ¶ added in v0.42.0
type InvoiceUpdateParams struct { // 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 (InvoiceUpdateParams) MarshalJSON ¶ added in v0.42.0
func (r InvoiceUpdateParams) MarshalJSON() (data []byte, err error)
type Item ¶ added in v0.3.0
type Item struct { ID string `json:"id,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` ExternalConnections []ItemExternalConnection `json:"external_connections,required"` Name string `json:"name,required"` JSON itemJSON `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 (*Item) UnmarshalJSON ¶ added in v0.3.0
type ItemExternalConnection ¶ added in v0.3.0
type ItemExternalConnection struct { ExternalConnectionName ItemExternalConnectionsExternalConnectionName `json:"external_connection_name,required"` ExternalEntityID string `json:"external_entity_id,required"` JSON itemExternalConnectionJSON `json:"-"` }
func (*ItemExternalConnection) UnmarshalJSON ¶ added in v0.3.0
func (r *ItemExternalConnection) UnmarshalJSON(data []byte) (err error)
type ItemExternalConnectionsExternalConnectionName ¶ added in v0.3.0
type ItemExternalConnectionsExternalConnectionName string
const ( ItemExternalConnectionsExternalConnectionNameStripe ItemExternalConnectionsExternalConnectionName = "stripe" ItemExternalConnectionsExternalConnectionNameQuickbooks ItemExternalConnectionsExternalConnectionName = "quickbooks" ItemExternalConnectionsExternalConnectionNameBillCom ItemExternalConnectionsExternalConnectionName = "bill.com" ItemExternalConnectionsExternalConnectionNameNetsuite ItemExternalConnectionsExternalConnectionName = "netsuite" ItemExternalConnectionsExternalConnectionNameTaxjar ItemExternalConnectionsExternalConnectionName = "taxjar" ItemExternalConnectionsExternalConnectionNameAvalara ItemExternalConnectionsExternalConnectionName = "avalara" ItemExternalConnectionsExternalConnectionNameAnrok ItemExternalConnectionsExternalConnectionName = "anrok" )
func (ItemExternalConnectionsExternalConnectionName) IsKnown ¶ added in v0.24.0
func (r ItemExternalConnectionsExternalConnectionName) IsKnown() bool
type ItemListParams ¶
type ItemListParams struct { // Cursor for pagination. This can be populated by the `next_cursor` value returned // from the initial request. Cursor param.Field[string] `query:"cursor"` // The number of items to fetch. Defaults to 20. Limit param.Field[int64] `query:"limit"` }
func (ItemListParams) URLQuery ¶
func (r ItemListParams) URLQuery() (v url.Values)
URLQuery serializes ItemListParams's query parameters as `url.Values`.
type ItemNewParams ¶ added in v0.3.0
type ItemNewParams struct { // The name of the item. Name param.Field[string] `json:"name,required"` }
func (ItemNewParams) MarshalJSON ¶ added in v0.3.0
func (r ItemNewParams) MarshalJSON() (data []byte, err error)
type ItemService ¶
type ItemService struct {
Options []option.RequestOption
}
ItemService contains methods and other services that help with interacting with the orb API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewItemService method instead.
func NewItemService ¶
func NewItemService(opts ...option.RequestOption) (r *ItemService)
NewItemService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ItemService) Fetch ¶
func (r *ItemService) Fetch(ctx context.Context, itemID string, opts ...option.RequestOption) (res *Item, err error)
This endpoint returns an item identified by its item_id.
func (*ItemService) List ¶
func (r *ItemService) List(ctx context.Context, query ItemListParams, opts ...option.RequestOption) (res *pagination.Page[Item], err error)
This endpoint returns a list of all Items, ordered in descending order by creation time.
func (*ItemService) ListAutoPaging ¶
func (r *ItemService) ListAutoPaging(ctx context.Context, query ItemListParams, opts ...option.RequestOption) *pagination.PageAutoPager[Item]
This endpoint returns a list of all Items, ordered in descending order by creation time.
func (*ItemService) New ¶ added in v0.3.0
func (r *ItemService) New(ctx context.Context, body ItemNewParams, opts ...option.RequestOption) (res *Item, err error)
This endpoint is used to create an Item(../guides/concepts#item).
func (*ItemService) Update ¶ added in v0.34.0
func (r *ItemService) Update(ctx context.Context, itemID string, body ItemUpdateParams, opts ...option.RequestOption) (res *Item, err error)
This endpoint can be used to update properties on the Item.
type ItemUpdateParams ¶ added in v0.34.0
type ItemUpdateParams struct { ExternalConnections param.Field[[]ItemUpdateParamsExternalConnection] `json:"external_connections"` Name param.Field[string] `json:"name"` }
func (ItemUpdateParams) MarshalJSON ¶ added in v0.34.0
func (r ItemUpdateParams) MarshalJSON() (data []byte, err error)
type ItemUpdateParamsExternalConnection ¶ added in v0.34.0
type ItemUpdateParamsExternalConnection struct { ExternalConnectionName param.Field[ItemUpdateParamsExternalConnectionsExternalConnectionName] `json:"external_connection_name,required"` ExternalEntityID param.Field[string] `json:"external_entity_id,required"` }
func (ItemUpdateParamsExternalConnection) MarshalJSON ¶ added in v0.34.0
func (r ItemUpdateParamsExternalConnection) MarshalJSON() (data []byte, err error)
type ItemUpdateParamsExternalConnectionsExternalConnectionName ¶ added in v0.34.0
type ItemUpdateParamsExternalConnectionsExternalConnectionName string
const ( ItemUpdateParamsExternalConnectionsExternalConnectionNameStripe ItemUpdateParamsExternalConnectionsExternalConnectionName = "stripe" ItemUpdateParamsExternalConnectionsExternalConnectionNameQuickbooks ItemUpdateParamsExternalConnectionsExternalConnectionName = "quickbooks" ItemUpdateParamsExternalConnectionsExternalConnectionNameBillCom ItemUpdateParamsExternalConnectionsExternalConnectionName = "bill.com" ItemUpdateParamsExternalConnectionsExternalConnectionNameNetsuite ItemUpdateParamsExternalConnectionsExternalConnectionName = "netsuite" ItemUpdateParamsExternalConnectionsExternalConnectionNameTaxjar ItemUpdateParamsExternalConnectionsExternalConnectionName = "taxjar" ItemUpdateParamsExternalConnectionsExternalConnectionNameAvalara ItemUpdateParamsExternalConnectionsExternalConnectionName = "avalara" ItemUpdateParamsExternalConnectionsExternalConnectionNameAnrok ItemUpdateParamsExternalConnectionsExternalConnectionName = "anrok" )
func (ItemUpdateParamsExternalConnectionsExternalConnectionName) IsKnown ¶ added in v0.34.0
func (r ItemUpdateParamsExternalConnectionsExternalConnectionName) IsKnown() bool
type MetricListParams ¶
type MetricListParams struct { CreatedAtGt param.Field[time.Time] `query:"created_at[gt]" format:"date-time"` CreatedAtGte param.Field[time.Time] `query:"created_at[gte]" format:"date-time"` CreatedAtLt param.Field[time.Time] `query:"created_at[lt]" format:"date-time"` CreatedAtLte param.Field[time.Time] `query:"created_at[lte]" format:"date-time"` // Cursor for pagination. This can be populated by the `next_cursor` value returned // from the initial request. Cursor param.Field[string] `query:"cursor"` // The number of items to fetch. Defaults to 20. Limit param.Field[int64] `query:"limit"` }
func (MetricListParams) URLQuery ¶
func (r MetricListParams) URLQuery() (v url.Values)
URLQuery serializes MetricListParams's query parameters as `url.Values`.
type MetricNewParams ¶
type MetricNewParams struct { // A description of the metric. Description param.Field[string] `json:"description,required"` // The id of the item ItemID param.Field[string] `json:"item_id,required"` // The name of the metric. Name param.Field[string] `json:"name,required"` // A sql string defining the metric. Sql param.Field[string] `json:"sql,required"` // 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 (MetricNewParams) MarshalJSON ¶
func (r MetricNewParams) MarshalJSON() (data []byte, err error)
type MetricService ¶
type MetricService struct {
Options []option.RequestOption
}
MetricService contains methods and other services that help with interacting with the orb API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewMetricService method instead.
func NewMetricService ¶
func NewMetricService(opts ...option.RequestOption) (r *MetricService)
NewMetricService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*MetricService) Fetch ¶
func (r *MetricService) Fetch(ctx context.Context, metricID string, opts ...option.RequestOption) (res *BillableMetric, err error)
This endpoint is used to list [metrics](../guides/concepts##metric). It returns information about the metrics including its name, description, and item.
func (*MetricService) List ¶
func (r *MetricService) List(ctx context.Context, query MetricListParams, opts ...option.RequestOption) (res *pagination.Page[BillableMetric], err error)
This endpoint is used to fetch [metric](../guides/concepts#metric) details given a metric identifier. It returns information about the metrics including its name, description, and item.
func (*MetricService) ListAutoPaging ¶
func (r *MetricService) ListAutoPaging(ctx context.Context, query MetricListParams, opts ...option.RequestOption) *pagination.PageAutoPager[BillableMetric]
This endpoint is used to fetch [metric](../guides/concepts#metric) details given a metric identifier. It returns information about the metrics including its name, description, and item.
func (*MetricService) New ¶
func (r *MetricService) New(ctx context.Context, body MetricNewParams, opts ...option.RequestOption) (res *BillableMetric, err error)
This endpoint is used to create a [metric](../guides/concepts##metric) using a SQL string. See [SQL support](../guides/extensibility/advanced-metrics#sql-support) for a description of constructing SQL queries with examples.
func (*MetricService) Update ¶ added in v0.50.0
func (r *MetricService) Update(ctx context.Context, metricID string, body MetricUpdateParams, opts ...option.RequestOption) (res *BillableMetric, err error)
This endpoint allows you to update the `metadata` property on a metric. If you pass `null` for the metadata value, it will clear any existing metadata for that invoice.
type MetricUpdateParams ¶ added in v0.50.0
type MetricUpdateParams struct { // 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 (MetricUpdateParams) MarshalJSON ¶ added in v0.50.0
func (r MetricUpdateParams) MarshalJSON() (data []byte, err error)
type PaginationMetadata ¶ added in v0.25.0
type PaginationMetadata = shared.PaginationMetadata
This is an alias to an internal type.
type Plan ¶
type Plan struct { ID string `json:"id,required"` BasePlan PlanBasePlan `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. 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 shared.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 PlanMaximum `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 PlanMinimum `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 []PlanPlanPhase `json:"plan_phases,required,nullable"` // Prices for this plan. If the plan has phases, this includes prices across all // phases of the plan. Prices []Price `json:"prices,required"` Product PlanProduct `json:"product,required"` Status PlanStatus `json:"status,required"` TrialConfig PlanTrialConfig `json:"trial_config,required"` Version int64 `json:"version,required"` JSON planJSON `json:"-"` }
The Plan(../guides/core-concepts.mdx#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 (*Plan) UnmarshalJSON ¶
type PlanBasePlan ¶
type PlanBasePlan 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 planBasePlanJSON `json:"-"` }
func (*PlanBasePlan) UnmarshalJSON ¶
func (r *PlanBasePlan) UnmarshalJSON(data []byte) (err error)
type PlanExternalPlanIDService ¶
type PlanExternalPlanIDService struct {
Options []option.RequestOption
}
PlanExternalPlanIDService contains methods and other services that help with interacting with the orb API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPlanExternalPlanIDService method instead.
func NewPlanExternalPlanIDService ¶
func NewPlanExternalPlanIDService(opts ...option.RequestOption) (r *PlanExternalPlanIDService)
NewPlanExternalPlanIDService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*PlanExternalPlanIDService) Fetch ¶
func (r *PlanExternalPlanIDService) Fetch(ctx context.Context, externalPlanID string, opts ...option.RequestOption) (res *Plan, err error)
This endpoint is used to fetch [plan](../guides/concepts##plan-and-price) details given an external_plan_id identifier. It returns information about the prices included in the plan and their configuration, as well as the product that the plan is attached to.
If multiple plans are found to contain the specified external_plan_id, the active plans will take priority over archived ones, and among those, the endpoint will return the most recently created plan.
## Serialized prices
Orb supports a few different pricing models out of the box. Each of these models is serialized differently in a given Price(../guides/concepts#plan-and-price) object. The `model_type` field determines the key for the configuration object that is present. A detailed explanation of price types can be found in the [Price schema](../guides/concepts#plan-and-price). "
func (*PlanExternalPlanIDService) Update ¶
func (r *PlanExternalPlanIDService) Update(ctx context.Context, otherExternalPlanID string, body PlanExternalPlanIDUpdateParams, opts ...option.RequestOption) (res *Plan, err error)
This endpoint can be used to update the `external_plan_id`, and `metadata` of an existing plan.
Other fields on a customer are currently immutable.
type PlanExternalPlanIDUpdateParams ¶
type PlanExternalPlanIDUpdateParams struct { // 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 param.Field[string] `json:"external_plan_id"` // 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 (PlanExternalPlanIDUpdateParams) MarshalJSON ¶
func (r PlanExternalPlanIDUpdateParams) MarshalJSON() (data []byte, err error)
type PlanListParams ¶
type PlanListParams struct { CreatedAtGt param.Field[time.Time] `query:"created_at[gt]" format:"date-time"` CreatedAtGte param.Field[time.Time] `query:"created_at[gte]" format:"date-time"` CreatedAtLt param.Field[time.Time] `query:"created_at[lt]" format:"date-time"` CreatedAtLte param.Field[time.Time] `query:"created_at[lte]" format:"date-time"` // Cursor for pagination. This can be populated by the `next_cursor` value returned // from the initial request. Cursor param.Field[string] `query:"cursor"` // The number of items to fetch. Defaults to 20. Limit param.Field[int64] `query:"limit"` // The plan status to filter to ('active', 'archived', or 'draft'). Status param.Field[PlanListParamsStatus] `query:"status"` }
func (PlanListParams) URLQuery ¶
func (r PlanListParams) URLQuery() (v url.Values)
URLQuery serializes PlanListParams's query parameters as `url.Values`.
type PlanListParamsStatus ¶
type PlanListParamsStatus string
The plan status to filter to ('active', 'archived', or 'draft').
const ( PlanListParamsStatusActive PlanListParamsStatus = "active" PlanListParamsStatusArchived PlanListParamsStatus = "archived" PlanListParamsStatusDraft PlanListParamsStatus = "draft" )
func (PlanListParamsStatus) IsKnown ¶ added in v0.24.0
func (r PlanListParamsStatus) IsKnown() bool
type PlanMaximum ¶
type PlanMaximum 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 planMaximumJSON `json:"-"` }
func (*PlanMaximum) UnmarshalJSON ¶
func (r *PlanMaximum) UnmarshalJSON(data []byte) (err error)
type PlanMinimum ¶
type PlanMinimum 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 planMinimumJSON `json:"-"` }
func (*PlanMinimum) UnmarshalJSON ¶
func (r *PlanMinimum) UnmarshalJSON(data []byte) (err error)
type PlanNewParams ¶
type PlanNewParams struct { // An ISO 4217 currency string for invoices generated by subscriptions on this // plan. Currency param.Field[string] `json:"currency,required"` Name param.Field[string] `json:"name,required"` // Prices for this plan. If the plan has phases, this includes prices across all // phases of the plan. Prices param.Field[[]PlanNewParamsPriceUnion] `json:"prices,required"` // Free-form text which is available on the invoice PDF and the Orb invoice portal. DefaultInvoiceMemo param.Field[string] `json:"default_invoice_memo"` ExternalPlanID param.Field[string] `json:"external_plan_id"` // 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"` // 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"` // The status of the plan to create (either active or draft). If not specified, // this defaults to active. Status param.Field[PlanNewParamsStatus] `json:"status"` }
func (PlanNewParams) MarshalJSON ¶
func (r PlanNewParams) MarshalJSON() (data []byte, err error)
type PlanNewParamsPrice ¶ added in v0.2.0
type PlanNewParamsPrice struct { Metadata param.Field[interface{}] `json:"metadata,required"` // An alias for the price. ExternalPriceID param.Field[string] `json:"external_price_id"` // 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"` // The id of the item the plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` // 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"` // 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"` // The cadence to bill for this price on. Cadence param.Field[PlanNewParamsPricesCadence] `json:"cadence,required"` BillingCycleConfiguration param.Field[interface{}] `json:"billing_cycle_configuration,required"` InvoicingCycleConfiguration param.Field[interface{}] `json:"invoicing_cycle_configuration,required"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` ModelType param.Field[PlanNewParamsPricesModelType] `json:"model_type,required"` UnitConfig param.Field[interface{}] `json:"unit_config,required"` // An ISO 4217 currency string, or custom pricing unit identifier, in which this // price is billed. Currency param.Field[string] `json:"currency"` PackageConfig param.Field[interface{}] `json:"package_config,required"` MatrixConfig param.Field[interface{}] `json:"matrix_config,required"` TieredConfig param.Field[interface{}] `json:"tiered_config,required"` TieredBpsConfig param.Field[interface{}] `json:"tiered_bps_config,required"` BpsConfig param.Field[interface{}] `json:"bps_config,required"` BulkBpsConfig param.Field[interface{}] `json:"bulk_bps_config,required"` BulkConfig param.Field[interface{}] `json:"bulk_config,required"` ThresholdTotalAmountConfig param.Field[interface{}] `json:"threshold_total_amount_config,required"` TieredPackageConfig param.Field[interface{}] `json:"tiered_package_config,required"` TieredWithMinimumConfig param.Field[interface{}] `json:"tiered_with_minimum_config,required"` UnitWithPercentConfig param.Field[interface{}] `json:"unit_with_percent_config,required"` PackageWithAllocationConfig param.Field[interface{}] `json:"package_with_allocation_config,required"` TieredWithProrationConfig param.Field[interface{}] `json:"tiered_with_proration_config,required"` UnitWithProrationConfig param.Field[interface{}] `json:"unit_with_proration_config,required"` GroupedAllocationConfig param.Field[interface{}] `json:"grouped_allocation_config,required"` GroupedWithProratedMinimumConfig param.Field[interface{}] `json:"grouped_with_prorated_minimum_config,required"` BulkWithProrationConfig param.Field[interface{}] `json:"bulk_with_proration_config,required"` }
func (PlanNewParamsPrice) MarshalJSON ¶ added in v0.25.0
func (r PlanNewParamsPrice) MarshalJSON() (data []byte, err error)
type PlanNewParamsPriceUnion ¶ added in v0.25.0
type PlanNewParamsPriceUnion interface {
// contains filtered or unexported methods
}
Satisfied by PlanNewParamsPricesNewPlanUnitPrice, PlanNewParamsPricesNewPlanPackagePrice, PlanNewParamsPricesNewPlanMatrixPrice, PlanNewParamsPricesNewPlanTieredPrice, PlanNewParamsPricesNewPlanTieredBpsPrice, PlanNewParamsPricesNewPlanBpsPrice, PlanNewParamsPricesNewPlanBulkBpsPrice, PlanNewParamsPricesNewPlanBulkPrice, PlanNewParamsPricesNewPlanThresholdTotalAmountPrice, PlanNewParamsPricesNewPlanTieredPackagePrice, PlanNewParamsPricesNewPlanTieredWithMinimumPrice, PlanNewParamsPricesNewPlanUnitWithPercentPrice, PlanNewParamsPricesNewPlanPackageWithAllocationPrice, PlanNewParamsPricesNewPlanTierWithProrationPrice, PlanNewParamsPricesNewPlanUnitWithProrationPrice, PlanNewParamsPricesNewPlanGroupedAllocationPrice, PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPrice, PlanNewParamsPricesNewPlanBulkWithProrationPrice, PlanNewParamsPrice.
type PlanNewParamsPricesCadence ¶ added in v0.25.0
type PlanNewParamsPricesCadence string
The cadence to bill for this price on.
const ( PlanNewParamsPricesCadenceAnnual PlanNewParamsPricesCadence = "annual" PlanNewParamsPricesCadenceSemiAnnual PlanNewParamsPricesCadence = "semi_annual" PlanNewParamsPricesCadenceMonthly PlanNewParamsPricesCadence = "monthly" PlanNewParamsPricesCadenceQuarterly PlanNewParamsPricesCadence = "quarterly" PlanNewParamsPricesCadenceOneTime PlanNewParamsPricesCadence = "one_time" PlanNewParamsPricesCadenceCustom PlanNewParamsPricesCadence = "custom" )
func (PlanNewParamsPricesCadence) IsKnown ¶ added in v0.25.0
func (r PlanNewParamsPricesCadence) IsKnown() bool
type PlanNewParamsPricesModelType ¶ added in v0.25.0
type PlanNewParamsPricesModelType string
const ( PlanNewParamsPricesModelTypeUnit PlanNewParamsPricesModelType = "unit" PlanNewParamsPricesModelTypePackage PlanNewParamsPricesModelType = "package" PlanNewParamsPricesModelTypeMatrix PlanNewParamsPricesModelType = "matrix" PlanNewParamsPricesModelTypeTiered PlanNewParamsPricesModelType = "tiered" PlanNewParamsPricesModelTypeTieredBps PlanNewParamsPricesModelType = "tiered_bps" PlanNewParamsPricesModelTypeBps PlanNewParamsPricesModelType = "bps" PlanNewParamsPricesModelTypeBulkBps PlanNewParamsPricesModelType = "bulk_bps" PlanNewParamsPricesModelTypeBulk PlanNewParamsPricesModelType = "bulk" PlanNewParamsPricesModelTypeThresholdTotalAmount PlanNewParamsPricesModelType = "threshold_total_amount" PlanNewParamsPricesModelTypeTieredPackage PlanNewParamsPricesModelType = "tiered_package" PlanNewParamsPricesModelTypeTieredWithMinimum PlanNewParamsPricesModelType = "tiered_with_minimum" PlanNewParamsPricesModelTypeUnitWithPercent PlanNewParamsPricesModelType = "unit_with_percent" PlanNewParamsPricesModelTypePackageWithAllocation PlanNewParamsPricesModelType = "package_with_allocation" PlanNewParamsPricesModelTypeTieredWithProration PlanNewParamsPricesModelType = "tiered_with_proration" PlanNewParamsPricesModelTypeUnitWithProration PlanNewParamsPricesModelType = "unit_with_proration" PlanNewParamsPricesModelTypeGroupedAllocation PlanNewParamsPricesModelType = "grouped_allocation" PlanNewParamsPricesModelTypeGroupedWithProratedMinimum PlanNewParamsPricesModelType = "grouped_with_prorated_minimum" PlanNewParamsPricesModelTypeBulkWithProration PlanNewParamsPricesModelType = "bulk_with_proration" )
func (PlanNewParamsPricesModelType) IsKnown ¶ added in v0.25.0
func (r PlanNewParamsPricesModelType) IsKnown() bool
type PlanNewParamsPricesNewPlanBpsPrice ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanBpsPrice struct { BpsConfig param.Field[PlanNewParamsPricesNewPlanBpsPriceBpsConfig] `json:"bps_config,required"` // The cadence to bill for this price on. Cadence param.Field[PlanNewParamsPricesNewPlanBpsPriceCadence] `json:"cadence,required"` // The id of the item the plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[PlanNewParamsPricesNewPlanBpsPriceModelType] `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[PlanNewParamsPricesNewPlanBpsPriceBillingCycleConfiguration] `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[PlanNewParamsPricesNewPlanBpsPriceInvoicingCycleConfiguration] `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 (PlanNewParamsPricesNewPlanBpsPrice) MarshalJSON ¶ added in v0.2.0
func (r PlanNewParamsPricesNewPlanBpsPrice) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanBpsPriceBillingCycleConfiguration ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanBpsPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PlanNewParamsPricesNewPlanBpsPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PlanNewParamsPricesNewPlanBpsPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanBpsPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanBpsPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanBpsPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PlanNewParamsPricesNewPlanBpsPriceBillingCycleConfigurationDurationUnitDay PlanNewParamsPricesNewPlanBpsPriceBillingCycleConfigurationDurationUnit = "day" PlanNewParamsPricesNewPlanBpsPriceBillingCycleConfigurationDurationUnitMonth PlanNewParamsPricesNewPlanBpsPriceBillingCycleConfigurationDurationUnit = "month" )
func (PlanNewParamsPricesNewPlanBpsPriceBillingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanBpsPriceBillingCycleConfigurationDurationUnit) IsKnown() bool
type PlanNewParamsPricesNewPlanBpsPriceBpsConfig ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanBpsPriceBpsConfig 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 (PlanNewParamsPricesNewPlanBpsPriceBpsConfig) MarshalJSON ¶ added in v0.2.0
func (r PlanNewParamsPricesNewPlanBpsPriceBpsConfig) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanBpsPriceCadence ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanBpsPriceCadence string
The cadence to bill for this price on.
const ( PlanNewParamsPricesNewPlanBpsPriceCadenceAnnual PlanNewParamsPricesNewPlanBpsPriceCadence = "annual" PlanNewParamsPricesNewPlanBpsPriceCadenceSemiAnnual PlanNewParamsPricesNewPlanBpsPriceCadence = "semi_annual" PlanNewParamsPricesNewPlanBpsPriceCadenceMonthly PlanNewParamsPricesNewPlanBpsPriceCadence = "monthly" PlanNewParamsPricesNewPlanBpsPriceCadenceQuarterly PlanNewParamsPricesNewPlanBpsPriceCadence = "quarterly" PlanNewParamsPricesNewPlanBpsPriceCadenceOneTime PlanNewParamsPricesNewPlanBpsPriceCadence = "one_time" PlanNewParamsPricesNewPlanBpsPriceCadenceCustom PlanNewParamsPricesNewPlanBpsPriceCadence = "custom" )
func (PlanNewParamsPricesNewPlanBpsPriceCadence) IsKnown ¶ added in v0.24.0
func (r PlanNewParamsPricesNewPlanBpsPriceCadence) IsKnown() bool
type PlanNewParamsPricesNewPlanBpsPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanBpsPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PlanNewParamsPricesNewPlanBpsPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PlanNewParamsPricesNewPlanBpsPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanBpsPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanBpsPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanBpsPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PlanNewParamsPricesNewPlanBpsPriceInvoicingCycleConfigurationDurationUnitDay PlanNewParamsPricesNewPlanBpsPriceInvoicingCycleConfigurationDurationUnit = "day" PlanNewParamsPricesNewPlanBpsPriceInvoicingCycleConfigurationDurationUnitMonth PlanNewParamsPricesNewPlanBpsPriceInvoicingCycleConfigurationDurationUnit = "month" )
func (PlanNewParamsPricesNewPlanBpsPriceInvoicingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanBpsPriceInvoicingCycleConfigurationDurationUnit) IsKnown() bool
type PlanNewParamsPricesNewPlanBpsPriceModelType ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanBpsPriceModelType string
const (
PlanNewParamsPricesNewPlanBpsPriceModelTypeBps PlanNewParamsPricesNewPlanBpsPriceModelType = "bps"
)
func (PlanNewParamsPricesNewPlanBpsPriceModelType) IsKnown ¶ added in v0.24.0
func (r PlanNewParamsPricesNewPlanBpsPriceModelType) IsKnown() bool
type PlanNewParamsPricesNewPlanBulkBpsPrice ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanBulkBpsPrice struct { BulkBpsConfig param.Field[PlanNewParamsPricesNewPlanBulkBpsPriceBulkBpsConfig] `json:"bulk_bps_config,required"` // The cadence to bill for this price on. Cadence param.Field[PlanNewParamsPricesNewPlanBulkBpsPriceCadence] `json:"cadence,required"` // The id of the item the plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[PlanNewParamsPricesNewPlanBulkBpsPriceModelType] `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[PlanNewParamsPricesNewPlanBulkBpsPriceBillingCycleConfiguration] `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[PlanNewParamsPricesNewPlanBulkBpsPriceInvoicingCycleConfiguration] `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 (PlanNewParamsPricesNewPlanBulkBpsPrice) MarshalJSON ¶ added in v0.2.0
func (r PlanNewParamsPricesNewPlanBulkBpsPrice) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanBulkBpsPriceBillingCycleConfiguration ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanBulkBpsPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PlanNewParamsPricesNewPlanBulkBpsPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PlanNewParamsPricesNewPlanBulkBpsPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanBulkBpsPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanBulkBpsPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanBulkBpsPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PlanNewParamsPricesNewPlanBulkBpsPriceBillingCycleConfigurationDurationUnitDay PlanNewParamsPricesNewPlanBulkBpsPriceBillingCycleConfigurationDurationUnit = "day" PlanNewParamsPricesNewPlanBulkBpsPriceBillingCycleConfigurationDurationUnitMonth PlanNewParamsPricesNewPlanBulkBpsPriceBillingCycleConfigurationDurationUnit = "month" )
func (PlanNewParamsPricesNewPlanBulkBpsPriceBillingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanBulkBpsPriceBillingCycleConfigurationDurationUnit) IsKnown() bool
type PlanNewParamsPricesNewPlanBulkBpsPriceBulkBpsConfig ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanBulkBpsPriceBulkBpsConfig struct { // Tiers for a bulk BPS pricing model where all usage is aggregated to a single // tier based on total volume Tiers param.Field[[]PlanNewParamsPricesNewPlanBulkBpsPriceBulkBpsConfigTier] `json:"tiers,required"` }
func (PlanNewParamsPricesNewPlanBulkBpsPriceBulkBpsConfig) MarshalJSON ¶ added in v0.2.0
func (r PlanNewParamsPricesNewPlanBulkBpsPriceBulkBpsConfig) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanBulkBpsPriceBulkBpsConfigTier ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanBulkBpsPriceBulkBpsConfigTier 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 (PlanNewParamsPricesNewPlanBulkBpsPriceBulkBpsConfigTier) MarshalJSON ¶ added in v0.2.0
func (r PlanNewParamsPricesNewPlanBulkBpsPriceBulkBpsConfigTier) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanBulkBpsPriceCadence ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanBulkBpsPriceCadence string
The cadence to bill for this price on.
const ( PlanNewParamsPricesNewPlanBulkBpsPriceCadenceAnnual PlanNewParamsPricesNewPlanBulkBpsPriceCadence = "annual" PlanNewParamsPricesNewPlanBulkBpsPriceCadenceSemiAnnual PlanNewParamsPricesNewPlanBulkBpsPriceCadence = "semi_annual" PlanNewParamsPricesNewPlanBulkBpsPriceCadenceMonthly PlanNewParamsPricesNewPlanBulkBpsPriceCadence = "monthly" PlanNewParamsPricesNewPlanBulkBpsPriceCadenceQuarterly PlanNewParamsPricesNewPlanBulkBpsPriceCadence = "quarterly" PlanNewParamsPricesNewPlanBulkBpsPriceCadenceOneTime PlanNewParamsPricesNewPlanBulkBpsPriceCadence = "one_time" PlanNewParamsPricesNewPlanBulkBpsPriceCadenceCustom PlanNewParamsPricesNewPlanBulkBpsPriceCadence = "custom" )
func (PlanNewParamsPricesNewPlanBulkBpsPriceCadence) IsKnown ¶ added in v0.24.0
func (r PlanNewParamsPricesNewPlanBulkBpsPriceCadence) IsKnown() bool
type PlanNewParamsPricesNewPlanBulkBpsPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanBulkBpsPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PlanNewParamsPricesNewPlanBulkBpsPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PlanNewParamsPricesNewPlanBulkBpsPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanBulkBpsPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanBulkBpsPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanBulkBpsPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PlanNewParamsPricesNewPlanBulkBpsPriceInvoicingCycleConfigurationDurationUnitDay PlanNewParamsPricesNewPlanBulkBpsPriceInvoicingCycleConfigurationDurationUnit = "day" PlanNewParamsPricesNewPlanBulkBpsPriceInvoicingCycleConfigurationDurationUnitMonth PlanNewParamsPricesNewPlanBulkBpsPriceInvoicingCycleConfigurationDurationUnit = "month" )
type PlanNewParamsPricesNewPlanBulkBpsPriceModelType ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanBulkBpsPriceModelType string
const (
PlanNewParamsPricesNewPlanBulkBpsPriceModelTypeBulkBps PlanNewParamsPricesNewPlanBulkBpsPriceModelType = "bulk_bps"
)
func (PlanNewParamsPricesNewPlanBulkBpsPriceModelType) IsKnown ¶ added in v0.24.0
func (r PlanNewParamsPricesNewPlanBulkBpsPriceModelType) IsKnown() bool
type PlanNewParamsPricesNewPlanBulkPrice ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanBulkPrice struct { BulkConfig param.Field[PlanNewParamsPricesNewPlanBulkPriceBulkConfig] `json:"bulk_config,required"` // The cadence to bill for this price on. Cadence param.Field[PlanNewParamsPricesNewPlanBulkPriceCadence] `json:"cadence,required"` // The id of the item the plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[PlanNewParamsPricesNewPlanBulkPriceModelType] `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[PlanNewParamsPricesNewPlanBulkPriceBillingCycleConfiguration] `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[PlanNewParamsPricesNewPlanBulkPriceInvoicingCycleConfiguration] `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 (PlanNewParamsPricesNewPlanBulkPrice) MarshalJSON ¶ added in v0.2.0
func (r PlanNewParamsPricesNewPlanBulkPrice) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanBulkPriceBillingCycleConfiguration ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanBulkPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PlanNewParamsPricesNewPlanBulkPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PlanNewParamsPricesNewPlanBulkPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanBulkPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanBulkPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanBulkPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PlanNewParamsPricesNewPlanBulkPriceBillingCycleConfigurationDurationUnitDay PlanNewParamsPricesNewPlanBulkPriceBillingCycleConfigurationDurationUnit = "day" PlanNewParamsPricesNewPlanBulkPriceBillingCycleConfigurationDurationUnitMonth PlanNewParamsPricesNewPlanBulkPriceBillingCycleConfigurationDurationUnit = "month" )
func (PlanNewParamsPricesNewPlanBulkPriceBillingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanBulkPriceBillingCycleConfigurationDurationUnit) IsKnown() bool
type PlanNewParamsPricesNewPlanBulkPriceBulkConfig ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanBulkPriceBulkConfig struct { // Bulk tiers for rating based on total usage volume Tiers param.Field[[]PlanNewParamsPricesNewPlanBulkPriceBulkConfigTier] `json:"tiers,required"` }
func (PlanNewParamsPricesNewPlanBulkPriceBulkConfig) MarshalJSON ¶ added in v0.2.0
func (r PlanNewParamsPricesNewPlanBulkPriceBulkConfig) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanBulkPriceBulkConfigTier ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanBulkPriceBulkConfigTier 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 (PlanNewParamsPricesNewPlanBulkPriceBulkConfigTier) MarshalJSON ¶ added in v0.2.0
func (r PlanNewParamsPricesNewPlanBulkPriceBulkConfigTier) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanBulkPriceCadence ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanBulkPriceCadence string
The cadence to bill for this price on.
const ( PlanNewParamsPricesNewPlanBulkPriceCadenceAnnual PlanNewParamsPricesNewPlanBulkPriceCadence = "annual" PlanNewParamsPricesNewPlanBulkPriceCadenceSemiAnnual PlanNewParamsPricesNewPlanBulkPriceCadence = "semi_annual" PlanNewParamsPricesNewPlanBulkPriceCadenceMonthly PlanNewParamsPricesNewPlanBulkPriceCadence = "monthly" PlanNewParamsPricesNewPlanBulkPriceCadenceQuarterly PlanNewParamsPricesNewPlanBulkPriceCadence = "quarterly" PlanNewParamsPricesNewPlanBulkPriceCadenceOneTime PlanNewParamsPricesNewPlanBulkPriceCadence = "one_time" PlanNewParamsPricesNewPlanBulkPriceCadenceCustom PlanNewParamsPricesNewPlanBulkPriceCadence = "custom" )
func (PlanNewParamsPricesNewPlanBulkPriceCadence) IsKnown ¶ added in v0.24.0
func (r PlanNewParamsPricesNewPlanBulkPriceCadence) IsKnown() bool
type PlanNewParamsPricesNewPlanBulkPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanBulkPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PlanNewParamsPricesNewPlanBulkPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PlanNewParamsPricesNewPlanBulkPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanBulkPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanBulkPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanBulkPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PlanNewParamsPricesNewPlanBulkPriceInvoicingCycleConfigurationDurationUnitDay PlanNewParamsPricesNewPlanBulkPriceInvoicingCycleConfigurationDurationUnit = "day" PlanNewParamsPricesNewPlanBulkPriceInvoicingCycleConfigurationDurationUnitMonth PlanNewParamsPricesNewPlanBulkPriceInvoicingCycleConfigurationDurationUnit = "month" )
func (PlanNewParamsPricesNewPlanBulkPriceInvoicingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanBulkPriceInvoicingCycleConfigurationDurationUnit) IsKnown() bool
type PlanNewParamsPricesNewPlanBulkPriceModelType ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanBulkPriceModelType string
const (
PlanNewParamsPricesNewPlanBulkPriceModelTypeBulk PlanNewParamsPricesNewPlanBulkPriceModelType = "bulk"
)
func (PlanNewParamsPricesNewPlanBulkPriceModelType) IsKnown ¶ added in v0.24.0
func (r PlanNewParamsPricesNewPlanBulkPriceModelType) IsKnown() bool
type PlanNewParamsPricesNewPlanBulkWithProrationPrice ¶ added in v0.49.0
type PlanNewParamsPricesNewPlanBulkWithProrationPrice struct { BulkWithProrationConfig param.Field[map[string]interface{}] `json:"bulk_with_proration_config,required"` // The cadence to bill for this price on. Cadence param.Field[PlanNewParamsPricesNewPlanBulkWithProrationPriceCadence] `json:"cadence,required"` // The id of the item the plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[PlanNewParamsPricesNewPlanBulkWithProrationPriceModelType] `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[PlanNewParamsPricesNewPlanBulkWithProrationPriceBillingCycleConfiguration] `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[PlanNewParamsPricesNewPlanBulkWithProrationPriceInvoicingCycleConfiguration] `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 (PlanNewParamsPricesNewPlanBulkWithProrationPrice) MarshalJSON ¶ added in v0.49.0
func (r PlanNewParamsPricesNewPlanBulkWithProrationPrice) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanBulkWithProrationPriceBillingCycleConfiguration ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanBulkWithProrationPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PlanNewParamsPricesNewPlanBulkWithProrationPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PlanNewParamsPricesNewPlanBulkWithProrationPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanBulkWithProrationPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanBulkWithProrationPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanBulkWithProrationPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PlanNewParamsPricesNewPlanBulkWithProrationPriceBillingCycleConfigurationDurationUnitDay PlanNewParamsPricesNewPlanBulkWithProrationPriceBillingCycleConfigurationDurationUnit = "day" PlanNewParamsPricesNewPlanBulkWithProrationPriceBillingCycleConfigurationDurationUnitMonth PlanNewParamsPricesNewPlanBulkWithProrationPriceBillingCycleConfigurationDurationUnit = "month" )
type PlanNewParamsPricesNewPlanBulkWithProrationPriceCadence ¶ added in v0.49.0
type PlanNewParamsPricesNewPlanBulkWithProrationPriceCadence string
The cadence to bill for this price on.
const ( PlanNewParamsPricesNewPlanBulkWithProrationPriceCadenceAnnual PlanNewParamsPricesNewPlanBulkWithProrationPriceCadence = "annual" PlanNewParamsPricesNewPlanBulkWithProrationPriceCadenceSemiAnnual PlanNewParamsPricesNewPlanBulkWithProrationPriceCadence = "semi_annual" PlanNewParamsPricesNewPlanBulkWithProrationPriceCadenceMonthly PlanNewParamsPricesNewPlanBulkWithProrationPriceCadence = "monthly" PlanNewParamsPricesNewPlanBulkWithProrationPriceCadenceQuarterly PlanNewParamsPricesNewPlanBulkWithProrationPriceCadence = "quarterly" PlanNewParamsPricesNewPlanBulkWithProrationPriceCadenceOneTime PlanNewParamsPricesNewPlanBulkWithProrationPriceCadence = "one_time" PlanNewParamsPricesNewPlanBulkWithProrationPriceCadenceCustom PlanNewParamsPricesNewPlanBulkWithProrationPriceCadence = "custom" )
func (PlanNewParamsPricesNewPlanBulkWithProrationPriceCadence) IsKnown ¶ added in v0.49.0
func (r PlanNewParamsPricesNewPlanBulkWithProrationPriceCadence) IsKnown() bool
type PlanNewParamsPricesNewPlanBulkWithProrationPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanBulkWithProrationPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PlanNewParamsPricesNewPlanBulkWithProrationPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PlanNewParamsPricesNewPlanBulkWithProrationPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanBulkWithProrationPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanBulkWithProrationPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanBulkWithProrationPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PlanNewParamsPricesNewPlanBulkWithProrationPriceInvoicingCycleConfigurationDurationUnitDay PlanNewParamsPricesNewPlanBulkWithProrationPriceInvoicingCycleConfigurationDurationUnit = "day" PlanNewParamsPricesNewPlanBulkWithProrationPriceInvoicingCycleConfigurationDurationUnitMonth PlanNewParamsPricesNewPlanBulkWithProrationPriceInvoicingCycleConfigurationDurationUnit = "month" )
type PlanNewParamsPricesNewPlanBulkWithProrationPriceModelType ¶ added in v0.49.0
type PlanNewParamsPricesNewPlanBulkWithProrationPriceModelType string
const (
PlanNewParamsPricesNewPlanBulkWithProrationPriceModelTypeBulkWithProration PlanNewParamsPricesNewPlanBulkWithProrationPriceModelType = "bulk_with_proration"
)
func (PlanNewParamsPricesNewPlanBulkWithProrationPriceModelType) IsKnown ¶ added in v0.49.0
func (r PlanNewParamsPricesNewPlanBulkWithProrationPriceModelType) IsKnown() bool
type PlanNewParamsPricesNewPlanGroupedAllocationPrice ¶ added in v0.48.0
type PlanNewParamsPricesNewPlanGroupedAllocationPrice struct { // The cadence to bill for this price on. Cadence param.Field[PlanNewParamsPricesNewPlanGroupedAllocationPriceCadence] `json:"cadence,required"` GroupedAllocationConfig param.Field[map[string]interface{}] `json:"grouped_allocation_config,required"` // The id of the item the plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[PlanNewParamsPricesNewPlanGroupedAllocationPriceModelType] `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[PlanNewParamsPricesNewPlanGroupedAllocationPriceBillingCycleConfiguration] `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[PlanNewParamsPricesNewPlanGroupedAllocationPriceInvoicingCycleConfiguration] `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 (PlanNewParamsPricesNewPlanGroupedAllocationPrice) MarshalJSON ¶ added in v0.48.0
func (r PlanNewParamsPricesNewPlanGroupedAllocationPrice) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanGroupedAllocationPriceBillingCycleConfiguration ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanGroupedAllocationPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PlanNewParamsPricesNewPlanGroupedAllocationPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PlanNewParamsPricesNewPlanGroupedAllocationPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanGroupedAllocationPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanGroupedAllocationPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanGroupedAllocationPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PlanNewParamsPricesNewPlanGroupedAllocationPriceBillingCycleConfigurationDurationUnitDay PlanNewParamsPricesNewPlanGroupedAllocationPriceBillingCycleConfigurationDurationUnit = "day" PlanNewParamsPricesNewPlanGroupedAllocationPriceBillingCycleConfigurationDurationUnitMonth PlanNewParamsPricesNewPlanGroupedAllocationPriceBillingCycleConfigurationDurationUnit = "month" )
type PlanNewParamsPricesNewPlanGroupedAllocationPriceCadence ¶ added in v0.48.0
type PlanNewParamsPricesNewPlanGroupedAllocationPriceCadence string
The cadence to bill for this price on.
const ( PlanNewParamsPricesNewPlanGroupedAllocationPriceCadenceAnnual PlanNewParamsPricesNewPlanGroupedAllocationPriceCadence = "annual" PlanNewParamsPricesNewPlanGroupedAllocationPriceCadenceSemiAnnual PlanNewParamsPricesNewPlanGroupedAllocationPriceCadence = "semi_annual" PlanNewParamsPricesNewPlanGroupedAllocationPriceCadenceMonthly PlanNewParamsPricesNewPlanGroupedAllocationPriceCadence = "monthly" PlanNewParamsPricesNewPlanGroupedAllocationPriceCadenceQuarterly PlanNewParamsPricesNewPlanGroupedAllocationPriceCadence = "quarterly" PlanNewParamsPricesNewPlanGroupedAllocationPriceCadenceOneTime PlanNewParamsPricesNewPlanGroupedAllocationPriceCadence = "one_time" PlanNewParamsPricesNewPlanGroupedAllocationPriceCadenceCustom PlanNewParamsPricesNewPlanGroupedAllocationPriceCadence = "custom" )
func (PlanNewParamsPricesNewPlanGroupedAllocationPriceCadence) IsKnown ¶ added in v0.48.0
func (r PlanNewParamsPricesNewPlanGroupedAllocationPriceCadence) IsKnown() bool
type PlanNewParamsPricesNewPlanGroupedAllocationPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanGroupedAllocationPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PlanNewParamsPricesNewPlanGroupedAllocationPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PlanNewParamsPricesNewPlanGroupedAllocationPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanGroupedAllocationPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanGroupedAllocationPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanGroupedAllocationPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PlanNewParamsPricesNewPlanGroupedAllocationPriceInvoicingCycleConfigurationDurationUnitDay PlanNewParamsPricesNewPlanGroupedAllocationPriceInvoicingCycleConfigurationDurationUnit = "day" PlanNewParamsPricesNewPlanGroupedAllocationPriceInvoicingCycleConfigurationDurationUnitMonth PlanNewParamsPricesNewPlanGroupedAllocationPriceInvoicingCycleConfigurationDurationUnit = "month" )
type PlanNewParamsPricesNewPlanGroupedAllocationPriceModelType ¶ added in v0.48.0
type PlanNewParamsPricesNewPlanGroupedAllocationPriceModelType string
const (
PlanNewParamsPricesNewPlanGroupedAllocationPriceModelTypeGroupedAllocation PlanNewParamsPricesNewPlanGroupedAllocationPriceModelType = "grouped_allocation"
)
func (PlanNewParamsPricesNewPlanGroupedAllocationPriceModelType) IsKnown ¶ added in v0.48.0
func (r PlanNewParamsPricesNewPlanGroupedAllocationPriceModelType) IsKnown() bool
type PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPrice ¶ added in v0.58.0
type PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPrice struct { // The cadence to bill for this price on. Cadence param.Field[PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceCadence] `json:"cadence,required"` GroupedWithProratedMinimumConfig param.Field[map[string]interface{}] `json:"grouped_with_prorated_minimum_config,required"` // The id of the item the plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceModelType] `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[PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceBillingCycleConfiguration] `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[PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfiguration] `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 (PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPrice) MarshalJSON ¶ added in v0.58.0
func (r PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPrice) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceBillingCycleConfiguration ¶ added in v0.58.0
type PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.58.0
func (r PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceBillingCycleConfigurationDurationUnit ¶ added in v0.58.0
type PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceBillingCycleConfigurationDurationUnitDay PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceBillingCycleConfigurationDurationUnit = "day" PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceBillingCycleConfigurationDurationUnitMonth PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceBillingCycleConfigurationDurationUnit = "month" )
type PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceCadence ¶ added in v0.58.0
type PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceCadence string
The cadence to bill for this price on.
const ( PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceCadenceAnnual PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceCadence = "annual" PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceCadenceSemiAnnual PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceCadence = "semi_annual" PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceCadenceMonthly PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceCadence = "monthly" PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceCadenceQuarterly PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceCadence = "quarterly" PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceCadenceOneTime PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceCadence = "one_time" PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceCadenceCustom PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceCadence = "custom" )
func (PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceCadence) IsKnown ¶ added in v0.58.0
func (r PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceCadence) IsKnown() bool
type PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfiguration ¶ added in v0.58.0
type PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.58.0
func (r PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.58.0
type PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfigurationDurationUnitDay PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfigurationDurationUnit = "day" PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfigurationDurationUnitMonth PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceInvoicingCycleConfigurationDurationUnit = "month" )
type PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceModelType ¶ added in v0.58.0
type PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceModelType string
const (
PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceModelTypeGroupedWithProratedMinimum PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceModelType = "grouped_with_prorated_minimum"
)
func (PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceModelType) IsKnown ¶ added in v0.58.0
func (r PlanNewParamsPricesNewPlanGroupedWithProratedMinimumPriceModelType) IsKnown() bool
type PlanNewParamsPricesNewPlanMatrixPrice ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanMatrixPrice struct { // The cadence to bill for this price on. Cadence param.Field[PlanNewParamsPricesNewPlanMatrixPriceCadence] `json:"cadence,required"` // The id of the item the plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` MatrixConfig param.Field[PlanNewParamsPricesNewPlanMatrixPriceMatrixConfig] `json:"matrix_config,required"` ModelType param.Field[PlanNewParamsPricesNewPlanMatrixPriceModelType] `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[PlanNewParamsPricesNewPlanMatrixPriceBillingCycleConfiguration] `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[PlanNewParamsPricesNewPlanMatrixPriceInvoicingCycleConfiguration] `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 (PlanNewParamsPricesNewPlanMatrixPrice) MarshalJSON ¶ added in v0.2.0
func (r PlanNewParamsPricesNewPlanMatrixPrice) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanMatrixPriceBillingCycleConfiguration ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanMatrixPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PlanNewParamsPricesNewPlanMatrixPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PlanNewParamsPricesNewPlanMatrixPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanMatrixPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanMatrixPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanMatrixPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PlanNewParamsPricesNewPlanMatrixPriceBillingCycleConfigurationDurationUnitDay PlanNewParamsPricesNewPlanMatrixPriceBillingCycleConfigurationDurationUnit = "day" PlanNewParamsPricesNewPlanMatrixPriceBillingCycleConfigurationDurationUnitMonth PlanNewParamsPricesNewPlanMatrixPriceBillingCycleConfigurationDurationUnit = "month" )
func (PlanNewParamsPricesNewPlanMatrixPriceBillingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanMatrixPriceBillingCycleConfigurationDurationUnit) IsKnown() bool
type PlanNewParamsPricesNewPlanMatrixPriceCadence ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanMatrixPriceCadence string
The cadence to bill for this price on.
const ( PlanNewParamsPricesNewPlanMatrixPriceCadenceAnnual PlanNewParamsPricesNewPlanMatrixPriceCadence = "annual" PlanNewParamsPricesNewPlanMatrixPriceCadenceSemiAnnual PlanNewParamsPricesNewPlanMatrixPriceCadence = "semi_annual" PlanNewParamsPricesNewPlanMatrixPriceCadenceMonthly PlanNewParamsPricesNewPlanMatrixPriceCadence = "monthly" PlanNewParamsPricesNewPlanMatrixPriceCadenceQuarterly PlanNewParamsPricesNewPlanMatrixPriceCadence = "quarterly" PlanNewParamsPricesNewPlanMatrixPriceCadenceOneTime PlanNewParamsPricesNewPlanMatrixPriceCadence = "one_time" PlanNewParamsPricesNewPlanMatrixPriceCadenceCustom PlanNewParamsPricesNewPlanMatrixPriceCadence = "custom" )
func (PlanNewParamsPricesNewPlanMatrixPriceCadence) IsKnown ¶ added in v0.24.0
func (r PlanNewParamsPricesNewPlanMatrixPriceCadence) IsKnown() bool
type PlanNewParamsPricesNewPlanMatrixPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanMatrixPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PlanNewParamsPricesNewPlanMatrixPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PlanNewParamsPricesNewPlanMatrixPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanMatrixPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanMatrixPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanMatrixPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PlanNewParamsPricesNewPlanMatrixPriceInvoicingCycleConfigurationDurationUnitDay PlanNewParamsPricesNewPlanMatrixPriceInvoicingCycleConfigurationDurationUnit = "day" PlanNewParamsPricesNewPlanMatrixPriceInvoicingCycleConfigurationDurationUnitMonth PlanNewParamsPricesNewPlanMatrixPriceInvoicingCycleConfigurationDurationUnit = "month" )
func (PlanNewParamsPricesNewPlanMatrixPriceInvoicingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanMatrixPriceInvoicingCycleConfigurationDurationUnit) IsKnown() bool
type PlanNewParamsPricesNewPlanMatrixPriceMatrixConfig ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanMatrixPriceMatrixConfig 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[[]PlanNewParamsPricesNewPlanMatrixPriceMatrixConfigMatrixValue] `json:"matrix_values,required"` }
func (PlanNewParamsPricesNewPlanMatrixPriceMatrixConfig) MarshalJSON ¶ added in v0.2.0
func (r PlanNewParamsPricesNewPlanMatrixPriceMatrixConfig) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanMatrixPriceMatrixConfigMatrixValue ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanMatrixPriceMatrixConfigMatrixValue 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 (PlanNewParamsPricesNewPlanMatrixPriceMatrixConfigMatrixValue) MarshalJSON ¶ added in v0.2.0
func (r PlanNewParamsPricesNewPlanMatrixPriceMatrixConfigMatrixValue) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanMatrixPriceModelType ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanMatrixPriceModelType string
const (
PlanNewParamsPricesNewPlanMatrixPriceModelTypeMatrix PlanNewParamsPricesNewPlanMatrixPriceModelType = "matrix"
)
func (PlanNewParamsPricesNewPlanMatrixPriceModelType) IsKnown ¶ added in v0.24.0
func (r PlanNewParamsPricesNewPlanMatrixPriceModelType) IsKnown() bool
type PlanNewParamsPricesNewPlanPackagePrice ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanPackagePrice struct { // The cadence to bill for this price on. Cadence param.Field[PlanNewParamsPricesNewPlanPackagePriceCadence] `json:"cadence,required"` // The id of the item the plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[PlanNewParamsPricesNewPlanPackagePriceModelType] `json:"model_type,required"` // The name of the price. Name param.Field[string] `json:"name,required"` PackageConfig param.Field[PlanNewParamsPricesNewPlanPackagePricePackageConfig] `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[PlanNewParamsPricesNewPlanPackagePriceBillingCycleConfiguration] `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[PlanNewParamsPricesNewPlanPackagePriceInvoicingCycleConfiguration] `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 (PlanNewParamsPricesNewPlanPackagePrice) MarshalJSON ¶ added in v0.2.0
func (r PlanNewParamsPricesNewPlanPackagePrice) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanPackagePriceBillingCycleConfiguration ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanPackagePriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PlanNewParamsPricesNewPlanPackagePriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PlanNewParamsPricesNewPlanPackagePriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanPackagePriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanPackagePriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanPackagePriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PlanNewParamsPricesNewPlanPackagePriceBillingCycleConfigurationDurationUnitDay PlanNewParamsPricesNewPlanPackagePriceBillingCycleConfigurationDurationUnit = "day" PlanNewParamsPricesNewPlanPackagePriceBillingCycleConfigurationDurationUnitMonth PlanNewParamsPricesNewPlanPackagePriceBillingCycleConfigurationDurationUnit = "month" )
func (PlanNewParamsPricesNewPlanPackagePriceBillingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanPackagePriceBillingCycleConfigurationDurationUnit) IsKnown() bool
type PlanNewParamsPricesNewPlanPackagePriceCadence ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanPackagePriceCadence string
The cadence to bill for this price on.
const ( PlanNewParamsPricesNewPlanPackagePriceCadenceAnnual PlanNewParamsPricesNewPlanPackagePriceCadence = "annual" PlanNewParamsPricesNewPlanPackagePriceCadenceSemiAnnual PlanNewParamsPricesNewPlanPackagePriceCadence = "semi_annual" PlanNewParamsPricesNewPlanPackagePriceCadenceMonthly PlanNewParamsPricesNewPlanPackagePriceCadence = "monthly" PlanNewParamsPricesNewPlanPackagePriceCadenceQuarterly PlanNewParamsPricesNewPlanPackagePriceCadence = "quarterly" PlanNewParamsPricesNewPlanPackagePriceCadenceOneTime PlanNewParamsPricesNewPlanPackagePriceCadence = "one_time" PlanNewParamsPricesNewPlanPackagePriceCadenceCustom PlanNewParamsPricesNewPlanPackagePriceCadence = "custom" )
func (PlanNewParamsPricesNewPlanPackagePriceCadence) IsKnown ¶ added in v0.24.0
func (r PlanNewParamsPricesNewPlanPackagePriceCadence) IsKnown() bool
type PlanNewParamsPricesNewPlanPackagePriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanPackagePriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PlanNewParamsPricesNewPlanPackagePriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PlanNewParamsPricesNewPlanPackagePriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanPackagePriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanPackagePriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanPackagePriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PlanNewParamsPricesNewPlanPackagePriceInvoicingCycleConfigurationDurationUnitDay PlanNewParamsPricesNewPlanPackagePriceInvoicingCycleConfigurationDurationUnit = "day" PlanNewParamsPricesNewPlanPackagePriceInvoicingCycleConfigurationDurationUnitMonth PlanNewParamsPricesNewPlanPackagePriceInvoicingCycleConfigurationDurationUnit = "month" )
type PlanNewParamsPricesNewPlanPackagePriceModelType ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanPackagePriceModelType string
const (
PlanNewParamsPricesNewPlanPackagePriceModelTypePackage PlanNewParamsPricesNewPlanPackagePriceModelType = "package"
)
func (PlanNewParamsPricesNewPlanPackagePriceModelType) IsKnown ¶ added in v0.24.0
func (r PlanNewParamsPricesNewPlanPackagePriceModelType) IsKnown() bool
type PlanNewParamsPricesNewPlanPackagePricePackageConfig ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanPackagePricePackageConfig 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 (PlanNewParamsPricesNewPlanPackagePricePackageConfig) MarshalJSON ¶ added in v0.2.0
func (r PlanNewParamsPricesNewPlanPackagePricePackageConfig) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanPackageWithAllocationPrice ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanPackageWithAllocationPrice struct { // The cadence to bill for this price on. Cadence param.Field[PlanNewParamsPricesNewPlanPackageWithAllocationPriceCadence] `json:"cadence,required"` // The id of the item the plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[PlanNewParamsPricesNewPlanPackageWithAllocationPriceModelType] `json:"model_type,required"` // The name of the price. Name param.Field[string] `json:"name,required"` PackageWithAllocationConfig param.Field[map[string]interface{}] `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[PlanNewParamsPricesNewPlanPackageWithAllocationPriceBillingCycleConfiguration] `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[PlanNewParamsPricesNewPlanPackageWithAllocationPriceInvoicingCycleConfiguration] `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 (PlanNewParamsPricesNewPlanPackageWithAllocationPrice) MarshalJSON ¶ added in v0.2.0
func (r PlanNewParamsPricesNewPlanPackageWithAllocationPrice) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanPackageWithAllocationPriceBillingCycleConfiguration ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanPackageWithAllocationPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PlanNewParamsPricesNewPlanPackageWithAllocationPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PlanNewParamsPricesNewPlanPackageWithAllocationPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanPackageWithAllocationPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanPackageWithAllocationPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanPackageWithAllocationPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PlanNewParamsPricesNewPlanPackageWithAllocationPriceBillingCycleConfigurationDurationUnitDay PlanNewParamsPricesNewPlanPackageWithAllocationPriceBillingCycleConfigurationDurationUnit = "day" PlanNewParamsPricesNewPlanPackageWithAllocationPriceBillingCycleConfigurationDurationUnitMonth PlanNewParamsPricesNewPlanPackageWithAllocationPriceBillingCycleConfigurationDurationUnit = "month" )
type PlanNewParamsPricesNewPlanPackageWithAllocationPriceCadence ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanPackageWithAllocationPriceCadence string
The cadence to bill for this price on.
const ( PlanNewParamsPricesNewPlanPackageWithAllocationPriceCadenceAnnual PlanNewParamsPricesNewPlanPackageWithAllocationPriceCadence = "annual" PlanNewParamsPricesNewPlanPackageWithAllocationPriceCadenceSemiAnnual PlanNewParamsPricesNewPlanPackageWithAllocationPriceCadence = "semi_annual" PlanNewParamsPricesNewPlanPackageWithAllocationPriceCadenceMonthly PlanNewParamsPricesNewPlanPackageWithAllocationPriceCadence = "monthly" PlanNewParamsPricesNewPlanPackageWithAllocationPriceCadenceQuarterly PlanNewParamsPricesNewPlanPackageWithAllocationPriceCadence = "quarterly" PlanNewParamsPricesNewPlanPackageWithAllocationPriceCadenceOneTime PlanNewParamsPricesNewPlanPackageWithAllocationPriceCadence = "one_time" PlanNewParamsPricesNewPlanPackageWithAllocationPriceCadenceCustom PlanNewParamsPricesNewPlanPackageWithAllocationPriceCadence = "custom" )
func (PlanNewParamsPricesNewPlanPackageWithAllocationPriceCadence) IsKnown ¶ added in v0.24.0
func (r PlanNewParamsPricesNewPlanPackageWithAllocationPriceCadence) IsKnown() bool
type PlanNewParamsPricesNewPlanPackageWithAllocationPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanPackageWithAllocationPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PlanNewParamsPricesNewPlanPackageWithAllocationPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PlanNewParamsPricesNewPlanPackageWithAllocationPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanPackageWithAllocationPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanPackageWithAllocationPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanPackageWithAllocationPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PlanNewParamsPricesNewPlanPackageWithAllocationPriceInvoicingCycleConfigurationDurationUnitDay PlanNewParamsPricesNewPlanPackageWithAllocationPriceInvoicingCycleConfigurationDurationUnit = "day" PlanNewParamsPricesNewPlanPackageWithAllocationPriceInvoicingCycleConfigurationDurationUnitMonth PlanNewParamsPricesNewPlanPackageWithAllocationPriceInvoicingCycleConfigurationDurationUnit = "month" )
type PlanNewParamsPricesNewPlanPackageWithAllocationPriceModelType ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanPackageWithAllocationPriceModelType string
const (
PlanNewParamsPricesNewPlanPackageWithAllocationPriceModelTypePackageWithAllocation PlanNewParamsPricesNewPlanPackageWithAllocationPriceModelType = "package_with_allocation"
)
func (PlanNewParamsPricesNewPlanPackageWithAllocationPriceModelType) IsKnown ¶ added in v0.24.0
func (r PlanNewParamsPricesNewPlanPackageWithAllocationPriceModelType) IsKnown() bool
type PlanNewParamsPricesNewPlanThresholdTotalAmountPrice ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanThresholdTotalAmountPrice struct { // The cadence to bill for this price on. Cadence param.Field[PlanNewParamsPricesNewPlanThresholdTotalAmountPriceCadence] `json:"cadence,required"` // The id of the item the plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[PlanNewParamsPricesNewPlanThresholdTotalAmountPriceModelType] `json:"model_type,required"` // The name of the price. Name param.Field[string] `json:"name,required"` ThresholdTotalAmountConfig param.Field[map[string]interface{}] `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[PlanNewParamsPricesNewPlanThresholdTotalAmountPriceBillingCycleConfiguration] `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[PlanNewParamsPricesNewPlanThresholdTotalAmountPriceInvoicingCycleConfiguration] `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 (PlanNewParamsPricesNewPlanThresholdTotalAmountPrice) MarshalJSON ¶ added in v0.2.0
func (r PlanNewParamsPricesNewPlanThresholdTotalAmountPrice) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanThresholdTotalAmountPriceBillingCycleConfiguration ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanThresholdTotalAmountPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PlanNewParamsPricesNewPlanThresholdTotalAmountPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PlanNewParamsPricesNewPlanThresholdTotalAmountPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanThresholdTotalAmountPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanThresholdTotalAmountPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanThresholdTotalAmountPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PlanNewParamsPricesNewPlanThresholdTotalAmountPriceBillingCycleConfigurationDurationUnitDay PlanNewParamsPricesNewPlanThresholdTotalAmountPriceBillingCycleConfigurationDurationUnit = "day" PlanNewParamsPricesNewPlanThresholdTotalAmountPriceBillingCycleConfigurationDurationUnitMonth PlanNewParamsPricesNewPlanThresholdTotalAmountPriceBillingCycleConfigurationDurationUnit = "month" )
type PlanNewParamsPricesNewPlanThresholdTotalAmountPriceCadence ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanThresholdTotalAmountPriceCadence string
The cadence to bill for this price on.
const ( PlanNewParamsPricesNewPlanThresholdTotalAmountPriceCadenceAnnual PlanNewParamsPricesNewPlanThresholdTotalAmountPriceCadence = "annual" PlanNewParamsPricesNewPlanThresholdTotalAmountPriceCadenceSemiAnnual PlanNewParamsPricesNewPlanThresholdTotalAmountPriceCadence = "semi_annual" PlanNewParamsPricesNewPlanThresholdTotalAmountPriceCadenceMonthly PlanNewParamsPricesNewPlanThresholdTotalAmountPriceCadence = "monthly" PlanNewParamsPricesNewPlanThresholdTotalAmountPriceCadenceQuarterly PlanNewParamsPricesNewPlanThresholdTotalAmountPriceCadence = "quarterly" PlanNewParamsPricesNewPlanThresholdTotalAmountPriceCadenceOneTime PlanNewParamsPricesNewPlanThresholdTotalAmountPriceCadence = "one_time" PlanNewParamsPricesNewPlanThresholdTotalAmountPriceCadenceCustom PlanNewParamsPricesNewPlanThresholdTotalAmountPriceCadence = "custom" )
func (PlanNewParamsPricesNewPlanThresholdTotalAmountPriceCadence) IsKnown ¶ added in v0.24.0
func (r PlanNewParamsPricesNewPlanThresholdTotalAmountPriceCadence) IsKnown() bool
type PlanNewParamsPricesNewPlanThresholdTotalAmountPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanThresholdTotalAmountPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PlanNewParamsPricesNewPlanThresholdTotalAmountPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PlanNewParamsPricesNewPlanThresholdTotalAmountPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanThresholdTotalAmountPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanThresholdTotalAmountPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanThresholdTotalAmountPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PlanNewParamsPricesNewPlanThresholdTotalAmountPriceInvoicingCycleConfigurationDurationUnitDay PlanNewParamsPricesNewPlanThresholdTotalAmountPriceInvoicingCycleConfigurationDurationUnit = "day" PlanNewParamsPricesNewPlanThresholdTotalAmountPriceInvoicingCycleConfigurationDurationUnitMonth PlanNewParamsPricesNewPlanThresholdTotalAmountPriceInvoicingCycleConfigurationDurationUnit = "month" )
type PlanNewParamsPricesNewPlanThresholdTotalAmountPriceModelType ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanThresholdTotalAmountPriceModelType string
const (
PlanNewParamsPricesNewPlanThresholdTotalAmountPriceModelTypeThresholdTotalAmount PlanNewParamsPricesNewPlanThresholdTotalAmountPriceModelType = "threshold_total_amount"
)
func (PlanNewParamsPricesNewPlanThresholdTotalAmountPriceModelType) IsKnown ¶ added in v0.24.0
func (r PlanNewParamsPricesNewPlanThresholdTotalAmountPriceModelType) IsKnown() bool
type PlanNewParamsPricesNewPlanTierWithProrationPrice ¶ added in v0.34.0
type PlanNewParamsPricesNewPlanTierWithProrationPrice struct { // The cadence to bill for this price on. Cadence param.Field[PlanNewParamsPricesNewPlanTierWithProrationPriceCadence] `json:"cadence,required"` // The id of the item the plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[PlanNewParamsPricesNewPlanTierWithProrationPriceModelType] `json:"model_type,required"` // The name of the price. Name param.Field[string] `json:"name,required"` TieredWithProrationConfig param.Field[map[string]interface{}] `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[PlanNewParamsPricesNewPlanTierWithProrationPriceBillingCycleConfiguration] `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[PlanNewParamsPricesNewPlanTierWithProrationPriceInvoicingCycleConfiguration] `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 (PlanNewParamsPricesNewPlanTierWithProrationPrice) MarshalJSON ¶ added in v0.34.0
func (r PlanNewParamsPricesNewPlanTierWithProrationPrice) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanTierWithProrationPriceBillingCycleConfiguration ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanTierWithProrationPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PlanNewParamsPricesNewPlanTierWithProrationPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PlanNewParamsPricesNewPlanTierWithProrationPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanTierWithProrationPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanTierWithProrationPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanTierWithProrationPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PlanNewParamsPricesNewPlanTierWithProrationPriceBillingCycleConfigurationDurationUnitDay PlanNewParamsPricesNewPlanTierWithProrationPriceBillingCycleConfigurationDurationUnit = "day" PlanNewParamsPricesNewPlanTierWithProrationPriceBillingCycleConfigurationDurationUnitMonth PlanNewParamsPricesNewPlanTierWithProrationPriceBillingCycleConfigurationDurationUnit = "month" )
type PlanNewParamsPricesNewPlanTierWithProrationPriceCadence ¶ added in v0.34.0
type PlanNewParamsPricesNewPlanTierWithProrationPriceCadence string
The cadence to bill for this price on.
const ( PlanNewParamsPricesNewPlanTierWithProrationPriceCadenceAnnual PlanNewParamsPricesNewPlanTierWithProrationPriceCadence = "annual" PlanNewParamsPricesNewPlanTierWithProrationPriceCadenceSemiAnnual PlanNewParamsPricesNewPlanTierWithProrationPriceCadence = "semi_annual" PlanNewParamsPricesNewPlanTierWithProrationPriceCadenceMonthly PlanNewParamsPricesNewPlanTierWithProrationPriceCadence = "monthly" PlanNewParamsPricesNewPlanTierWithProrationPriceCadenceQuarterly PlanNewParamsPricesNewPlanTierWithProrationPriceCadence = "quarterly" PlanNewParamsPricesNewPlanTierWithProrationPriceCadenceOneTime PlanNewParamsPricesNewPlanTierWithProrationPriceCadence = "one_time" PlanNewParamsPricesNewPlanTierWithProrationPriceCadenceCustom PlanNewParamsPricesNewPlanTierWithProrationPriceCadence = "custom" )
func (PlanNewParamsPricesNewPlanTierWithProrationPriceCadence) IsKnown ¶ added in v0.34.0
func (r PlanNewParamsPricesNewPlanTierWithProrationPriceCadence) IsKnown() bool
type PlanNewParamsPricesNewPlanTierWithProrationPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanTierWithProrationPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PlanNewParamsPricesNewPlanTierWithProrationPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PlanNewParamsPricesNewPlanTierWithProrationPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanTierWithProrationPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanTierWithProrationPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanTierWithProrationPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PlanNewParamsPricesNewPlanTierWithProrationPriceInvoicingCycleConfigurationDurationUnitDay PlanNewParamsPricesNewPlanTierWithProrationPriceInvoicingCycleConfigurationDurationUnit = "day" PlanNewParamsPricesNewPlanTierWithProrationPriceInvoicingCycleConfigurationDurationUnitMonth PlanNewParamsPricesNewPlanTierWithProrationPriceInvoicingCycleConfigurationDurationUnit = "month" )
type PlanNewParamsPricesNewPlanTierWithProrationPriceModelType ¶ added in v0.34.0
type PlanNewParamsPricesNewPlanTierWithProrationPriceModelType string
const (
PlanNewParamsPricesNewPlanTierWithProrationPriceModelTypeTieredWithProration PlanNewParamsPricesNewPlanTierWithProrationPriceModelType = "tiered_with_proration"
)
func (PlanNewParamsPricesNewPlanTierWithProrationPriceModelType) IsKnown ¶ added in v0.34.0
func (r PlanNewParamsPricesNewPlanTierWithProrationPriceModelType) IsKnown() bool
type PlanNewParamsPricesNewPlanTieredBpsPrice ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanTieredBpsPrice struct { // The cadence to bill for this price on. Cadence param.Field[PlanNewParamsPricesNewPlanTieredBpsPriceCadence] `json:"cadence,required"` // The id of the item the plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[PlanNewParamsPricesNewPlanTieredBpsPriceModelType] `json:"model_type,required"` // The name of the price. Name param.Field[string] `json:"name,required"` TieredBpsConfig param.Field[PlanNewParamsPricesNewPlanTieredBpsPriceTieredBpsConfig] `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[PlanNewParamsPricesNewPlanTieredBpsPriceBillingCycleConfiguration] `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[PlanNewParamsPricesNewPlanTieredBpsPriceInvoicingCycleConfiguration] `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 (PlanNewParamsPricesNewPlanTieredBpsPrice) MarshalJSON ¶ added in v0.2.0
func (r PlanNewParamsPricesNewPlanTieredBpsPrice) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanTieredBpsPriceBillingCycleConfiguration ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanTieredBpsPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PlanNewParamsPricesNewPlanTieredBpsPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PlanNewParamsPricesNewPlanTieredBpsPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanTieredBpsPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanTieredBpsPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanTieredBpsPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PlanNewParamsPricesNewPlanTieredBpsPriceBillingCycleConfigurationDurationUnitDay PlanNewParamsPricesNewPlanTieredBpsPriceBillingCycleConfigurationDurationUnit = "day" PlanNewParamsPricesNewPlanTieredBpsPriceBillingCycleConfigurationDurationUnitMonth PlanNewParamsPricesNewPlanTieredBpsPriceBillingCycleConfigurationDurationUnit = "month" )
type PlanNewParamsPricesNewPlanTieredBpsPriceCadence ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanTieredBpsPriceCadence string
The cadence to bill for this price on.
const ( PlanNewParamsPricesNewPlanTieredBpsPriceCadenceAnnual PlanNewParamsPricesNewPlanTieredBpsPriceCadence = "annual" PlanNewParamsPricesNewPlanTieredBpsPriceCadenceSemiAnnual PlanNewParamsPricesNewPlanTieredBpsPriceCadence = "semi_annual" PlanNewParamsPricesNewPlanTieredBpsPriceCadenceMonthly PlanNewParamsPricesNewPlanTieredBpsPriceCadence = "monthly" PlanNewParamsPricesNewPlanTieredBpsPriceCadenceQuarterly PlanNewParamsPricesNewPlanTieredBpsPriceCadence = "quarterly" PlanNewParamsPricesNewPlanTieredBpsPriceCadenceOneTime PlanNewParamsPricesNewPlanTieredBpsPriceCadence = "one_time" PlanNewParamsPricesNewPlanTieredBpsPriceCadenceCustom PlanNewParamsPricesNewPlanTieredBpsPriceCadence = "custom" )
func (PlanNewParamsPricesNewPlanTieredBpsPriceCadence) IsKnown ¶ added in v0.24.0
func (r PlanNewParamsPricesNewPlanTieredBpsPriceCadence) IsKnown() bool
type PlanNewParamsPricesNewPlanTieredBpsPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanTieredBpsPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PlanNewParamsPricesNewPlanTieredBpsPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PlanNewParamsPricesNewPlanTieredBpsPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanTieredBpsPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanTieredBpsPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanTieredBpsPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PlanNewParamsPricesNewPlanTieredBpsPriceInvoicingCycleConfigurationDurationUnitDay PlanNewParamsPricesNewPlanTieredBpsPriceInvoicingCycleConfigurationDurationUnit = "day" PlanNewParamsPricesNewPlanTieredBpsPriceInvoicingCycleConfigurationDurationUnitMonth PlanNewParamsPricesNewPlanTieredBpsPriceInvoicingCycleConfigurationDurationUnit = "month" )
type PlanNewParamsPricesNewPlanTieredBpsPriceModelType ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanTieredBpsPriceModelType string
const (
PlanNewParamsPricesNewPlanTieredBpsPriceModelTypeTieredBps PlanNewParamsPricesNewPlanTieredBpsPriceModelType = "tiered_bps"
)
func (PlanNewParamsPricesNewPlanTieredBpsPriceModelType) IsKnown ¶ added in v0.24.0
func (r PlanNewParamsPricesNewPlanTieredBpsPriceModelType) IsKnown() bool
type PlanNewParamsPricesNewPlanTieredBpsPriceTieredBpsConfig ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanTieredBpsPriceTieredBpsConfig struct { // Tiers for a Graduated BPS pricing model, where usage is bucketed into specified // tiers Tiers param.Field[[]PlanNewParamsPricesNewPlanTieredBpsPriceTieredBpsConfigTier] `json:"tiers,required"` }
func (PlanNewParamsPricesNewPlanTieredBpsPriceTieredBpsConfig) MarshalJSON ¶ added in v0.2.0
func (r PlanNewParamsPricesNewPlanTieredBpsPriceTieredBpsConfig) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanTieredBpsPriceTieredBpsConfigTier ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanTieredBpsPriceTieredBpsConfigTier 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 (PlanNewParamsPricesNewPlanTieredBpsPriceTieredBpsConfigTier) MarshalJSON ¶ added in v0.2.0
func (r PlanNewParamsPricesNewPlanTieredBpsPriceTieredBpsConfigTier) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanTieredPackagePrice ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanTieredPackagePrice struct { // The cadence to bill for this price on. Cadence param.Field[PlanNewParamsPricesNewPlanTieredPackagePriceCadence] `json:"cadence,required"` // The id of the item the plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[PlanNewParamsPricesNewPlanTieredPackagePriceModelType] `json:"model_type,required"` // The name of the price. Name param.Field[string] `json:"name,required"` TieredPackageConfig param.Field[map[string]interface{}] `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[PlanNewParamsPricesNewPlanTieredPackagePriceBillingCycleConfiguration] `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[PlanNewParamsPricesNewPlanTieredPackagePriceInvoicingCycleConfiguration] `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 (PlanNewParamsPricesNewPlanTieredPackagePrice) MarshalJSON ¶ added in v0.2.0
func (r PlanNewParamsPricesNewPlanTieredPackagePrice) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanTieredPackagePriceBillingCycleConfiguration ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanTieredPackagePriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PlanNewParamsPricesNewPlanTieredPackagePriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PlanNewParamsPricesNewPlanTieredPackagePriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanTieredPackagePriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanTieredPackagePriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanTieredPackagePriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PlanNewParamsPricesNewPlanTieredPackagePriceBillingCycleConfigurationDurationUnitDay PlanNewParamsPricesNewPlanTieredPackagePriceBillingCycleConfigurationDurationUnit = "day" PlanNewParamsPricesNewPlanTieredPackagePriceBillingCycleConfigurationDurationUnitMonth PlanNewParamsPricesNewPlanTieredPackagePriceBillingCycleConfigurationDurationUnit = "month" )
type PlanNewParamsPricesNewPlanTieredPackagePriceCadence ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanTieredPackagePriceCadence string
The cadence to bill for this price on.
const ( PlanNewParamsPricesNewPlanTieredPackagePriceCadenceAnnual PlanNewParamsPricesNewPlanTieredPackagePriceCadence = "annual" PlanNewParamsPricesNewPlanTieredPackagePriceCadenceSemiAnnual PlanNewParamsPricesNewPlanTieredPackagePriceCadence = "semi_annual" PlanNewParamsPricesNewPlanTieredPackagePriceCadenceMonthly PlanNewParamsPricesNewPlanTieredPackagePriceCadence = "monthly" PlanNewParamsPricesNewPlanTieredPackagePriceCadenceQuarterly PlanNewParamsPricesNewPlanTieredPackagePriceCadence = "quarterly" PlanNewParamsPricesNewPlanTieredPackagePriceCadenceOneTime PlanNewParamsPricesNewPlanTieredPackagePriceCadence = "one_time" PlanNewParamsPricesNewPlanTieredPackagePriceCadenceCustom PlanNewParamsPricesNewPlanTieredPackagePriceCadence = "custom" )
func (PlanNewParamsPricesNewPlanTieredPackagePriceCadence) IsKnown ¶ added in v0.24.0
func (r PlanNewParamsPricesNewPlanTieredPackagePriceCadence) IsKnown() bool
type PlanNewParamsPricesNewPlanTieredPackagePriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanTieredPackagePriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PlanNewParamsPricesNewPlanTieredPackagePriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PlanNewParamsPricesNewPlanTieredPackagePriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanTieredPackagePriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanTieredPackagePriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanTieredPackagePriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PlanNewParamsPricesNewPlanTieredPackagePriceInvoicingCycleConfigurationDurationUnitDay PlanNewParamsPricesNewPlanTieredPackagePriceInvoicingCycleConfigurationDurationUnit = "day" PlanNewParamsPricesNewPlanTieredPackagePriceInvoicingCycleConfigurationDurationUnitMonth PlanNewParamsPricesNewPlanTieredPackagePriceInvoicingCycleConfigurationDurationUnit = "month" )
type PlanNewParamsPricesNewPlanTieredPackagePriceModelType ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanTieredPackagePriceModelType string
const (
PlanNewParamsPricesNewPlanTieredPackagePriceModelTypeTieredPackage PlanNewParamsPricesNewPlanTieredPackagePriceModelType = "tiered_package"
)
func (PlanNewParamsPricesNewPlanTieredPackagePriceModelType) IsKnown ¶ added in v0.24.0
func (r PlanNewParamsPricesNewPlanTieredPackagePriceModelType) IsKnown() bool
type PlanNewParamsPricesNewPlanTieredPrice ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanTieredPrice struct { // The cadence to bill for this price on. Cadence param.Field[PlanNewParamsPricesNewPlanTieredPriceCadence] `json:"cadence,required"` // The id of the item the plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[PlanNewParamsPricesNewPlanTieredPriceModelType] `json:"model_type,required"` // The name of the price. Name param.Field[string] `json:"name,required"` TieredConfig param.Field[PlanNewParamsPricesNewPlanTieredPriceTieredConfig] `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[PlanNewParamsPricesNewPlanTieredPriceBillingCycleConfiguration] `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[PlanNewParamsPricesNewPlanTieredPriceInvoicingCycleConfiguration] `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 (PlanNewParamsPricesNewPlanTieredPrice) MarshalJSON ¶ added in v0.2.0
func (r PlanNewParamsPricesNewPlanTieredPrice) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanTieredPriceBillingCycleConfiguration ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanTieredPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PlanNewParamsPricesNewPlanTieredPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PlanNewParamsPricesNewPlanTieredPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanTieredPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanTieredPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanTieredPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PlanNewParamsPricesNewPlanTieredPriceBillingCycleConfigurationDurationUnitDay PlanNewParamsPricesNewPlanTieredPriceBillingCycleConfigurationDurationUnit = "day" PlanNewParamsPricesNewPlanTieredPriceBillingCycleConfigurationDurationUnitMonth PlanNewParamsPricesNewPlanTieredPriceBillingCycleConfigurationDurationUnit = "month" )
func (PlanNewParamsPricesNewPlanTieredPriceBillingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanTieredPriceBillingCycleConfigurationDurationUnit) IsKnown() bool
type PlanNewParamsPricesNewPlanTieredPriceCadence ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanTieredPriceCadence string
The cadence to bill for this price on.
const ( PlanNewParamsPricesNewPlanTieredPriceCadenceAnnual PlanNewParamsPricesNewPlanTieredPriceCadence = "annual" PlanNewParamsPricesNewPlanTieredPriceCadenceSemiAnnual PlanNewParamsPricesNewPlanTieredPriceCadence = "semi_annual" PlanNewParamsPricesNewPlanTieredPriceCadenceMonthly PlanNewParamsPricesNewPlanTieredPriceCadence = "monthly" PlanNewParamsPricesNewPlanTieredPriceCadenceQuarterly PlanNewParamsPricesNewPlanTieredPriceCadence = "quarterly" PlanNewParamsPricesNewPlanTieredPriceCadenceOneTime PlanNewParamsPricesNewPlanTieredPriceCadence = "one_time" PlanNewParamsPricesNewPlanTieredPriceCadenceCustom PlanNewParamsPricesNewPlanTieredPriceCadence = "custom" )
func (PlanNewParamsPricesNewPlanTieredPriceCadence) IsKnown ¶ added in v0.24.0
func (r PlanNewParamsPricesNewPlanTieredPriceCadence) IsKnown() bool
type PlanNewParamsPricesNewPlanTieredPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanTieredPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PlanNewParamsPricesNewPlanTieredPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PlanNewParamsPricesNewPlanTieredPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanTieredPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanTieredPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanTieredPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PlanNewParamsPricesNewPlanTieredPriceInvoicingCycleConfigurationDurationUnitDay PlanNewParamsPricesNewPlanTieredPriceInvoicingCycleConfigurationDurationUnit = "day" PlanNewParamsPricesNewPlanTieredPriceInvoicingCycleConfigurationDurationUnitMonth PlanNewParamsPricesNewPlanTieredPriceInvoicingCycleConfigurationDurationUnit = "month" )
func (PlanNewParamsPricesNewPlanTieredPriceInvoicingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanTieredPriceInvoicingCycleConfigurationDurationUnit) IsKnown() bool
type PlanNewParamsPricesNewPlanTieredPriceModelType ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanTieredPriceModelType string
const (
PlanNewParamsPricesNewPlanTieredPriceModelTypeTiered PlanNewParamsPricesNewPlanTieredPriceModelType = "tiered"
)
func (PlanNewParamsPricesNewPlanTieredPriceModelType) IsKnown ¶ added in v0.24.0
func (r PlanNewParamsPricesNewPlanTieredPriceModelType) IsKnown() bool
type PlanNewParamsPricesNewPlanTieredPriceTieredConfig ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanTieredPriceTieredConfig struct { // Tiers for rating based on total usage quantities into the specified tier Tiers param.Field[[]PlanNewParamsPricesNewPlanTieredPriceTieredConfigTier] `json:"tiers,required"` }
func (PlanNewParamsPricesNewPlanTieredPriceTieredConfig) MarshalJSON ¶ added in v0.2.0
func (r PlanNewParamsPricesNewPlanTieredPriceTieredConfig) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanTieredPriceTieredConfigTier ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanTieredPriceTieredConfigTier 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 (PlanNewParamsPricesNewPlanTieredPriceTieredConfigTier) MarshalJSON ¶ added in v0.2.0
func (r PlanNewParamsPricesNewPlanTieredPriceTieredConfigTier) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanTieredWithMinimumPrice ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanTieredWithMinimumPrice struct { // The cadence to bill for this price on. Cadence param.Field[PlanNewParamsPricesNewPlanTieredWithMinimumPriceCadence] `json:"cadence,required"` // The id of the item the plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[PlanNewParamsPricesNewPlanTieredWithMinimumPriceModelType] `json:"model_type,required"` // The name of the price. Name param.Field[string] `json:"name,required"` TieredWithMinimumConfig param.Field[map[string]interface{}] `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[PlanNewParamsPricesNewPlanTieredWithMinimumPriceBillingCycleConfiguration] `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[PlanNewParamsPricesNewPlanTieredWithMinimumPriceInvoicingCycleConfiguration] `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 (PlanNewParamsPricesNewPlanTieredWithMinimumPrice) MarshalJSON ¶ added in v0.2.0
func (r PlanNewParamsPricesNewPlanTieredWithMinimumPrice) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanTieredWithMinimumPriceBillingCycleConfiguration ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanTieredWithMinimumPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PlanNewParamsPricesNewPlanTieredWithMinimumPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PlanNewParamsPricesNewPlanTieredWithMinimumPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanTieredWithMinimumPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanTieredWithMinimumPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanTieredWithMinimumPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PlanNewParamsPricesNewPlanTieredWithMinimumPriceBillingCycleConfigurationDurationUnitDay PlanNewParamsPricesNewPlanTieredWithMinimumPriceBillingCycleConfigurationDurationUnit = "day" PlanNewParamsPricesNewPlanTieredWithMinimumPriceBillingCycleConfigurationDurationUnitMonth PlanNewParamsPricesNewPlanTieredWithMinimumPriceBillingCycleConfigurationDurationUnit = "month" )
type PlanNewParamsPricesNewPlanTieredWithMinimumPriceCadence ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanTieredWithMinimumPriceCadence string
The cadence to bill for this price on.
const ( PlanNewParamsPricesNewPlanTieredWithMinimumPriceCadenceAnnual PlanNewParamsPricesNewPlanTieredWithMinimumPriceCadence = "annual" PlanNewParamsPricesNewPlanTieredWithMinimumPriceCadenceSemiAnnual PlanNewParamsPricesNewPlanTieredWithMinimumPriceCadence = "semi_annual" PlanNewParamsPricesNewPlanTieredWithMinimumPriceCadenceMonthly PlanNewParamsPricesNewPlanTieredWithMinimumPriceCadence = "monthly" PlanNewParamsPricesNewPlanTieredWithMinimumPriceCadenceQuarterly PlanNewParamsPricesNewPlanTieredWithMinimumPriceCadence = "quarterly" PlanNewParamsPricesNewPlanTieredWithMinimumPriceCadenceOneTime PlanNewParamsPricesNewPlanTieredWithMinimumPriceCadence = "one_time" PlanNewParamsPricesNewPlanTieredWithMinimumPriceCadenceCustom PlanNewParamsPricesNewPlanTieredWithMinimumPriceCadence = "custom" )
func (PlanNewParamsPricesNewPlanTieredWithMinimumPriceCadence) IsKnown ¶ added in v0.24.0
func (r PlanNewParamsPricesNewPlanTieredWithMinimumPriceCadence) IsKnown() bool
type PlanNewParamsPricesNewPlanTieredWithMinimumPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanTieredWithMinimumPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PlanNewParamsPricesNewPlanTieredWithMinimumPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PlanNewParamsPricesNewPlanTieredWithMinimumPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanTieredWithMinimumPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanTieredWithMinimumPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanTieredWithMinimumPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PlanNewParamsPricesNewPlanTieredWithMinimumPriceInvoicingCycleConfigurationDurationUnitDay PlanNewParamsPricesNewPlanTieredWithMinimumPriceInvoicingCycleConfigurationDurationUnit = "day" PlanNewParamsPricesNewPlanTieredWithMinimumPriceInvoicingCycleConfigurationDurationUnitMonth PlanNewParamsPricesNewPlanTieredWithMinimumPriceInvoicingCycleConfigurationDurationUnit = "month" )
type PlanNewParamsPricesNewPlanTieredWithMinimumPriceModelType ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanTieredWithMinimumPriceModelType string
const (
PlanNewParamsPricesNewPlanTieredWithMinimumPriceModelTypeTieredWithMinimum PlanNewParamsPricesNewPlanTieredWithMinimumPriceModelType = "tiered_with_minimum"
)
func (PlanNewParamsPricesNewPlanTieredWithMinimumPriceModelType) IsKnown ¶ added in v0.24.0
func (r PlanNewParamsPricesNewPlanTieredWithMinimumPriceModelType) IsKnown() bool
type PlanNewParamsPricesNewPlanUnitPrice ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanUnitPrice struct { // The cadence to bill for this price on. Cadence param.Field[PlanNewParamsPricesNewPlanUnitPriceCadence] `json:"cadence,required"` // The id of the item the plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[PlanNewParamsPricesNewPlanUnitPriceModelType] `json:"model_type,required"` // The name of the price. Name param.Field[string] `json:"name,required"` UnitConfig param.Field[PlanNewParamsPricesNewPlanUnitPriceUnitConfig] `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[PlanNewParamsPricesNewPlanUnitPriceBillingCycleConfiguration] `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[PlanNewParamsPricesNewPlanUnitPriceInvoicingCycleConfiguration] `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 (PlanNewParamsPricesNewPlanUnitPrice) MarshalJSON ¶ added in v0.2.0
func (r PlanNewParamsPricesNewPlanUnitPrice) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanUnitPriceBillingCycleConfiguration ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanUnitPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PlanNewParamsPricesNewPlanUnitPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PlanNewParamsPricesNewPlanUnitPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanUnitPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanUnitPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanUnitPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PlanNewParamsPricesNewPlanUnitPriceBillingCycleConfigurationDurationUnitDay PlanNewParamsPricesNewPlanUnitPriceBillingCycleConfigurationDurationUnit = "day" PlanNewParamsPricesNewPlanUnitPriceBillingCycleConfigurationDurationUnitMonth PlanNewParamsPricesNewPlanUnitPriceBillingCycleConfigurationDurationUnit = "month" )
func (PlanNewParamsPricesNewPlanUnitPriceBillingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanUnitPriceBillingCycleConfigurationDurationUnit) IsKnown() bool
type PlanNewParamsPricesNewPlanUnitPriceCadence ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanUnitPriceCadence string
The cadence to bill for this price on.
const ( PlanNewParamsPricesNewPlanUnitPriceCadenceAnnual PlanNewParamsPricesNewPlanUnitPriceCadence = "annual" PlanNewParamsPricesNewPlanUnitPriceCadenceSemiAnnual PlanNewParamsPricesNewPlanUnitPriceCadence = "semi_annual" PlanNewParamsPricesNewPlanUnitPriceCadenceMonthly PlanNewParamsPricesNewPlanUnitPriceCadence = "monthly" PlanNewParamsPricesNewPlanUnitPriceCadenceQuarterly PlanNewParamsPricesNewPlanUnitPriceCadence = "quarterly" PlanNewParamsPricesNewPlanUnitPriceCadenceOneTime PlanNewParamsPricesNewPlanUnitPriceCadence = "one_time" PlanNewParamsPricesNewPlanUnitPriceCadenceCustom PlanNewParamsPricesNewPlanUnitPriceCadence = "custom" )
func (PlanNewParamsPricesNewPlanUnitPriceCadence) IsKnown ¶ added in v0.24.0
func (r PlanNewParamsPricesNewPlanUnitPriceCadence) IsKnown() bool
type PlanNewParamsPricesNewPlanUnitPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanUnitPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PlanNewParamsPricesNewPlanUnitPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PlanNewParamsPricesNewPlanUnitPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanUnitPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanUnitPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanUnitPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PlanNewParamsPricesNewPlanUnitPriceInvoicingCycleConfigurationDurationUnitDay PlanNewParamsPricesNewPlanUnitPriceInvoicingCycleConfigurationDurationUnit = "day" PlanNewParamsPricesNewPlanUnitPriceInvoicingCycleConfigurationDurationUnitMonth PlanNewParamsPricesNewPlanUnitPriceInvoicingCycleConfigurationDurationUnit = "month" )
func (PlanNewParamsPricesNewPlanUnitPriceInvoicingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanUnitPriceInvoicingCycleConfigurationDurationUnit) IsKnown() bool
type PlanNewParamsPricesNewPlanUnitPriceModelType ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanUnitPriceModelType string
const (
PlanNewParamsPricesNewPlanUnitPriceModelTypeUnit PlanNewParamsPricesNewPlanUnitPriceModelType = "unit"
)
func (PlanNewParamsPricesNewPlanUnitPriceModelType) IsKnown ¶ added in v0.24.0
func (r PlanNewParamsPricesNewPlanUnitPriceModelType) IsKnown() bool
type PlanNewParamsPricesNewPlanUnitPriceUnitConfig ¶ added in v0.2.0
type PlanNewParamsPricesNewPlanUnitPriceUnitConfig struct { // Rate per unit of usage UnitAmount param.Field[string] `json:"unit_amount,required"` }
func (PlanNewParamsPricesNewPlanUnitPriceUnitConfig) MarshalJSON ¶ added in v0.2.0
func (r PlanNewParamsPricesNewPlanUnitPriceUnitConfig) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanUnitWithPercentPrice ¶ added in v0.20.0
type PlanNewParamsPricesNewPlanUnitWithPercentPrice struct { // The cadence to bill for this price on. Cadence param.Field[PlanNewParamsPricesNewPlanUnitWithPercentPriceCadence] `json:"cadence,required"` // The id of the item the plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[PlanNewParamsPricesNewPlanUnitWithPercentPriceModelType] `json:"model_type,required"` // The name of the price. Name param.Field[string] `json:"name,required"` UnitWithPercentConfig param.Field[map[string]interface{}] `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[PlanNewParamsPricesNewPlanUnitWithPercentPriceBillingCycleConfiguration] `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[PlanNewParamsPricesNewPlanUnitWithPercentPriceInvoicingCycleConfiguration] `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 (PlanNewParamsPricesNewPlanUnitWithPercentPrice) MarshalJSON ¶ added in v0.20.0
func (r PlanNewParamsPricesNewPlanUnitWithPercentPrice) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanUnitWithPercentPriceBillingCycleConfiguration ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanUnitWithPercentPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PlanNewParamsPricesNewPlanUnitWithPercentPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PlanNewParamsPricesNewPlanUnitWithPercentPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanUnitWithPercentPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanUnitWithPercentPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanUnitWithPercentPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PlanNewParamsPricesNewPlanUnitWithPercentPriceBillingCycleConfigurationDurationUnitDay PlanNewParamsPricesNewPlanUnitWithPercentPriceBillingCycleConfigurationDurationUnit = "day" PlanNewParamsPricesNewPlanUnitWithPercentPriceBillingCycleConfigurationDurationUnitMonth PlanNewParamsPricesNewPlanUnitWithPercentPriceBillingCycleConfigurationDurationUnit = "month" )
type PlanNewParamsPricesNewPlanUnitWithPercentPriceCadence ¶ added in v0.20.0
type PlanNewParamsPricesNewPlanUnitWithPercentPriceCadence string
The cadence to bill for this price on.
const ( PlanNewParamsPricesNewPlanUnitWithPercentPriceCadenceAnnual PlanNewParamsPricesNewPlanUnitWithPercentPriceCadence = "annual" PlanNewParamsPricesNewPlanUnitWithPercentPriceCadenceSemiAnnual PlanNewParamsPricesNewPlanUnitWithPercentPriceCadence = "semi_annual" PlanNewParamsPricesNewPlanUnitWithPercentPriceCadenceMonthly PlanNewParamsPricesNewPlanUnitWithPercentPriceCadence = "monthly" PlanNewParamsPricesNewPlanUnitWithPercentPriceCadenceQuarterly PlanNewParamsPricesNewPlanUnitWithPercentPriceCadence = "quarterly" PlanNewParamsPricesNewPlanUnitWithPercentPriceCadenceOneTime PlanNewParamsPricesNewPlanUnitWithPercentPriceCadence = "one_time" PlanNewParamsPricesNewPlanUnitWithPercentPriceCadenceCustom PlanNewParamsPricesNewPlanUnitWithPercentPriceCadence = "custom" )
func (PlanNewParamsPricesNewPlanUnitWithPercentPriceCadence) IsKnown ¶ added in v0.24.0
func (r PlanNewParamsPricesNewPlanUnitWithPercentPriceCadence) IsKnown() bool
type PlanNewParamsPricesNewPlanUnitWithPercentPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanUnitWithPercentPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PlanNewParamsPricesNewPlanUnitWithPercentPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PlanNewParamsPricesNewPlanUnitWithPercentPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanUnitWithPercentPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanUnitWithPercentPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanUnitWithPercentPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PlanNewParamsPricesNewPlanUnitWithPercentPriceInvoicingCycleConfigurationDurationUnitDay PlanNewParamsPricesNewPlanUnitWithPercentPriceInvoicingCycleConfigurationDurationUnit = "day" PlanNewParamsPricesNewPlanUnitWithPercentPriceInvoicingCycleConfigurationDurationUnitMonth PlanNewParamsPricesNewPlanUnitWithPercentPriceInvoicingCycleConfigurationDurationUnit = "month" )
type PlanNewParamsPricesNewPlanUnitWithPercentPriceModelType ¶ added in v0.20.0
type PlanNewParamsPricesNewPlanUnitWithPercentPriceModelType string
const (
PlanNewParamsPricesNewPlanUnitWithPercentPriceModelTypeUnitWithPercent PlanNewParamsPricesNewPlanUnitWithPercentPriceModelType = "unit_with_percent"
)
func (PlanNewParamsPricesNewPlanUnitWithPercentPriceModelType) IsKnown ¶ added in v0.24.0
func (r PlanNewParamsPricesNewPlanUnitWithPercentPriceModelType) IsKnown() bool
type PlanNewParamsPricesNewPlanUnitWithProrationPrice ¶ added in v0.34.0
type PlanNewParamsPricesNewPlanUnitWithProrationPrice struct { // The cadence to bill for this price on. Cadence param.Field[PlanNewParamsPricesNewPlanUnitWithProrationPriceCadence] `json:"cadence,required"` // The id of the item the plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[PlanNewParamsPricesNewPlanUnitWithProrationPriceModelType] `json:"model_type,required"` // The name of the price. Name param.Field[string] `json:"name,required"` UnitWithProrationConfig param.Field[map[string]interface{}] `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[PlanNewParamsPricesNewPlanUnitWithProrationPriceBillingCycleConfiguration] `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[PlanNewParamsPricesNewPlanUnitWithProrationPriceInvoicingCycleConfiguration] `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 (PlanNewParamsPricesNewPlanUnitWithProrationPrice) MarshalJSON ¶ added in v0.34.0
func (r PlanNewParamsPricesNewPlanUnitWithProrationPrice) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanUnitWithProrationPriceBillingCycleConfiguration ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanUnitWithProrationPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PlanNewParamsPricesNewPlanUnitWithProrationPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PlanNewParamsPricesNewPlanUnitWithProrationPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanUnitWithProrationPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanUnitWithProrationPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanUnitWithProrationPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PlanNewParamsPricesNewPlanUnitWithProrationPriceBillingCycleConfigurationDurationUnitDay PlanNewParamsPricesNewPlanUnitWithProrationPriceBillingCycleConfigurationDurationUnit = "day" PlanNewParamsPricesNewPlanUnitWithProrationPriceBillingCycleConfigurationDurationUnitMonth PlanNewParamsPricesNewPlanUnitWithProrationPriceBillingCycleConfigurationDurationUnit = "month" )
type PlanNewParamsPricesNewPlanUnitWithProrationPriceCadence ¶ added in v0.34.0
type PlanNewParamsPricesNewPlanUnitWithProrationPriceCadence string
The cadence to bill for this price on.
const ( PlanNewParamsPricesNewPlanUnitWithProrationPriceCadenceAnnual PlanNewParamsPricesNewPlanUnitWithProrationPriceCadence = "annual" PlanNewParamsPricesNewPlanUnitWithProrationPriceCadenceSemiAnnual PlanNewParamsPricesNewPlanUnitWithProrationPriceCadence = "semi_annual" PlanNewParamsPricesNewPlanUnitWithProrationPriceCadenceMonthly PlanNewParamsPricesNewPlanUnitWithProrationPriceCadence = "monthly" PlanNewParamsPricesNewPlanUnitWithProrationPriceCadenceQuarterly PlanNewParamsPricesNewPlanUnitWithProrationPriceCadence = "quarterly" PlanNewParamsPricesNewPlanUnitWithProrationPriceCadenceOneTime PlanNewParamsPricesNewPlanUnitWithProrationPriceCadence = "one_time" PlanNewParamsPricesNewPlanUnitWithProrationPriceCadenceCustom PlanNewParamsPricesNewPlanUnitWithProrationPriceCadence = "custom" )
func (PlanNewParamsPricesNewPlanUnitWithProrationPriceCadence) IsKnown ¶ added in v0.34.0
func (r PlanNewParamsPricesNewPlanUnitWithProrationPriceCadence) IsKnown() bool
type PlanNewParamsPricesNewPlanUnitWithProrationPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanUnitWithProrationPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PlanNewParamsPricesNewPlanUnitWithProrationPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PlanNewParamsPricesNewPlanUnitWithProrationPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PlanNewParamsPricesNewPlanUnitWithProrationPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PlanNewParamsPricesNewPlanUnitWithProrationPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PlanNewParamsPricesNewPlanUnitWithProrationPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PlanNewParamsPricesNewPlanUnitWithProrationPriceInvoicingCycleConfigurationDurationUnitDay PlanNewParamsPricesNewPlanUnitWithProrationPriceInvoicingCycleConfigurationDurationUnit = "day" PlanNewParamsPricesNewPlanUnitWithProrationPriceInvoicingCycleConfigurationDurationUnitMonth PlanNewParamsPricesNewPlanUnitWithProrationPriceInvoicingCycleConfigurationDurationUnit = "month" )
type PlanNewParamsPricesNewPlanUnitWithProrationPriceModelType ¶ added in v0.34.0
type PlanNewParamsPricesNewPlanUnitWithProrationPriceModelType string
const (
PlanNewParamsPricesNewPlanUnitWithProrationPriceModelTypeUnitWithProration PlanNewParamsPricesNewPlanUnitWithProrationPriceModelType = "unit_with_proration"
)
func (PlanNewParamsPricesNewPlanUnitWithProrationPriceModelType) IsKnown ¶ added in v0.34.0
func (r PlanNewParamsPricesNewPlanUnitWithProrationPriceModelType) IsKnown() bool
type PlanNewParamsStatus ¶ added in v0.41.0
type PlanNewParamsStatus string
The status of the plan to create (either active or draft). If not specified, this defaults to active.
const ( PlanNewParamsStatusActive PlanNewParamsStatus = "active" PlanNewParamsStatusDraft PlanNewParamsStatus = "draft" )
func (PlanNewParamsStatus) IsKnown ¶ added in v0.41.0
func (r PlanNewParamsStatus) IsKnown() bool
type PlanPlanPhase ¶
type PlanPlanPhase struct { ID string `json:"id,required"` Description string `json:"description,required,nullable"` Discount shared.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 PlanPlanPhasesDurationUnit `json:"duration_unit,required,nullable"` Maximum PlanPlanPhasesMaximum `json:"maximum,required,nullable"` MaximumAmount string `json:"maximum_amount,required,nullable"` Minimum PlanPlanPhasesMinimum `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 planPlanPhaseJSON `json:"-"` }
func (*PlanPlanPhase) UnmarshalJSON ¶
func (r *PlanPlanPhase) UnmarshalJSON(data []byte) (err error)
type PlanPlanPhasesDurationUnit ¶
type PlanPlanPhasesDurationUnit string
const ( PlanPlanPhasesDurationUnitDaily PlanPlanPhasesDurationUnit = "daily" PlanPlanPhasesDurationUnitMonthly PlanPlanPhasesDurationUnit = "monthly" PlanPlanPhasesDurationUnitQuarterly PlanPlanPhasesDurationUnit = "quarterly" PlanPlanPhasesDurationUnitSemiAnnual PlanPlanPhasesDurationUnit = "semi_annual" PlanPlanPhasesDurationUnitAnnual PlanPlanPhasesDurationUnit = "annual" )
func (PlanPlanPhasesDurationUnit) IsKnown ¶ added in v0.24.0
func (r PlanPlanPhasesDurationUnit) IsKnown() bool
type PlanPlanPhasesMaximum ¶
type PlanPlanPhasesMaximum 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 planPlanPhasesMaximumJSON `json:"-"` }
func (*PlanPlanPhasesMaximum) UnmarshalJSON ¶
func (r *PlanPlanPhasesMaximum) UnmarshalJSON(data []byte) (err error)
type PlanPlanPhasesMinimum ¶
type PlanPlanPhasesMinimum 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 planPlanPhasesMinimumJSON `json:"-"` }
func (*PlanPlanPhasesMinimum) UnmarshalJSON ¶
func (r *PlanPlanPhasesMinimum) UnmarshalJSON(data []byte) (err error)
type PlanProduct ¶
type PlanProduct struct { ID string `json:"id,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` Name string `json:"name,required"` JSON planProductJSON `json:"-"` }
func (*PlanProduct) UnmarshalJSON ¶
func (r *PlanProduct) UnmarshalJSON(data []byte) (err error)
type PlanService ¶
type PlanService struct { Options []option.RequestOption ExternalPlanID *PlanExternalPlanIDService }
PlanService contains methods and other services that help with interacting with the orb API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPlanService method instead.
func NewPlanService ¶
func NewPlanService(opts ...option.RequestOption) (r *PlanService)
NewPlanService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*PlanService) Fetch ¶
func (r *PlanService) Fetch(ctx context.Context, planID string, opts ...option.RequestOption) (res *Plan, err error)
This endpoint is used to fetch [plan](../guides/concepts##plan-and-price) details given a plan identifier. It returns information about the prices included in the plan and their configuration, as well as the product that the plan is attached to.
## Serialized prices
Orb supports a few different pricing models out of the box. Each of these models is serialized differently in a given Price(../guides/concepts#plan-and-price) object. The `model_type` field determines the key for the configuration object that is present. A detailed explanation of price types can be found in the [Price schema](../guides/concepts#plan-and-price).
## Phases
Orb supports plan phases, also known as contract ramps. For plans with phases, the serialized prices refer to all prices across all phases.
func (*PlanService) List ¶
func (r *PlanService) List(ctx context.Context, query PlanListParams, opts ...option.RequestOption) (res *pagination.Page[Plan], err error)
This endpoint returns a list of all [plans](../guides/concepts##plan-and-price) for an account in a list format. The list of plans is ordered starting from the most recently created plan. The response also includes [`pagination_metadata`](../reference/pagination), which lets the caller retrieve the next page of results if they exist.
func (*PlanService) ListAutoPaging ¶
func (r *PlanService) ListAutoPaging(ctx context.Context, query PlanListParams, opts ...option.RequestOption) *pagination.PageAutoPager[Plan]
This endpoint returns a list of all [plans](../guides/concepts##plan-and-price) for an account in a list format. The list of plans is ordered starting from the most recently created plan. The response also includes [`pagination_metadata`](../reference/pagination), which lets the caller retrieve the next page of results if they exist.
func (*PlanService) New ¶
func (r *PlanService) New(ctx context.Context, body PlanNewParams, opts ...option.RequestOption) (res *Plan, err error)
This endpoint allows creation of plans including their prices.
func (*PlanService) Update ¶
func (r *PlanService) Update(ctx context.Context, planID string, body PlanUpdateParams, opts ...option.RequestOption) (res *Plan, err error)
This endpoint can be used to update the `external_plan_id`, and `metadata` of an existing plan.
Other fields on a customer are currently immutable.
type PlanStatus ¶
type PlanStatus string
const ( PlanStatusActive PlanStatus = "active" PlanStatusArchived PlanStatus = "archived" PlanStatusDraft PlanStatus = "draft" )
func (PlanStatus) IsKnown ¶ added in v0.24.0
func (r PlanStatus) IsKnown() bool
type PlanTrialConfig ¶
type PlanTrialConfig struct { TrialPeriod int64 `json:"trial_period,required,nullable"` TrialPeriodUnit PlanTrialConfigTrialPeriodUnit `json:"trial_period_unit,required"` JSON planTrialConfigJSON `json:"-"` }
func (*PlanTrialConfig) UnmarshalJSON ¶
func (r *PlanTrialConfig) UnmarshalJSON(data []byte) (err error)
type PlanTrialConfigTrialPeriodUnit ¶
type PlanTrialConfigTrialPeriodUnit string
const (
PlanTrialConfigTrialPeriodUnitDays PlanTrialConfigTrialPeriodUnit = "days"
)
func (PlanTrialConfigTrialPeriodUnit) IsKnown ¶ added in v0.24.0
func (r PlanTrialConfigTrialPeriodUnit) IsKnown() bool
type PlanUpdateParams ¶
type PlanUpdateParams struct { // 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 param.Field[string] `json:"external_plan_id"` // 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 (PlanUpdateParams) MarshalJSON ¶
func (r PlanUpdateParams) MarshalJSON() (data []byte, err error)
type Price ¶
type Price struct { // This field can have the runtime type of [map[string]string]. Metadata interface{} `json:"metadata"` ID string `json:"id,required"` Name string `json:"name,required"` ExternalPriceID string `json:"external_price_id,required,nullable"` PriceType PricePriceType `json:"price_type,required"` ModelType PriceModelType `json:"model_type,required"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` Cadence PriceCadence `json:"cadence,required"` // This field can have the runtime type of // [PriceUnitPriceBillingCycleConfiguration], // [PricePackagePriceBillingCycleConfiguration], // [PriceMatrixPriceBillingCycleConfiguration], // [PriceTieredPriceBillingCycleConfiguration], // [PriceTieredBpsPriceBillingCycleConfiguration], // [PriceBpsPriceBillingCycleConfiguration], // [PriceBulkBpsPriceBillingCycleConfiguration], // [PriceBulkPriceBillingCycleConfiguration], // [PriceThresholdTotalAmountPriceBillingCycleConfiguration], // [PriceTieredPackagePriceBillingCycleConfiguration], // [PriceGroupedTieredPriceBillingCycleConfiguration], // [PriceTieredWithMinimumPriceBillingCycleConfiguration], // [PriceTieredPackageWithMinimumPriceBillingCycleConfiguration], // [PricePackageWithAllocationPriceBillingCycleConfiguration], // [PriceUnitWithPercentPriceBillingCycleConfiguration], // [PriceMatrixWithAllocationPriceBillingCycleConfiguration], // [PriceTieredWithProrationPriceBillingCycleConfiguration], // [PriceUnitWithProrationPriceBillingCycleConfiguration], // [PriceGroupedAllocationPriceBillingCycleConfiguration], // [PriceGroupedWithProratedMinimumPriceBillingCycleConfiguration], // [PriceBulkWithProrationPriceBillingCycleConfiguration]. BillingCycleConfiguration interface{} `json:"billing_cycle_configuration"` // This field can have the runtime type of // [PriceUnitPriceInvoicingCycleConfiguration], // [PricePackagePriceInvoicingCycleConfiguration], // [PriceMatrixPriceInvoicingCycleConfiguration], // [PriceTieredPriceInvoicingCycleConfiguration], // [PriceTieredBpsPriceInvoicingCycleConfiguration], // [PriceBpsPriceInvoicingCycleConfiguration], // [PriceBulkBpsPriceInvoicingCycleConfiguration], // [PriceBulkPriceInvoicingCycleConfiguration], // [PriceThresholdTotalAmountPriceInvoicingCycleConfiguration], // [PriceTieredPackagePriceInvoicingCycleConfiguration], // [PriceGroupedTieredPriceInvoicingCycleConfiguration], // [PriceTieredWithMinimumPriceInvoicingCycleConfiguration], // [PriceTieredPackageWithMinimumPriceInvoicingCycleConfiguration], // [PricePackageWithAllocationPriceInvoicingCycleConfiguration], // [PriceUnitWithPercentPriceInvoicingCycleConfiguration], // [PriceMatrixWithAllocationPriceInvoicingCycleConfiguration], // [PriceTieredWithProrationPriceInvoicingCycleConfiguration], // [PriceUnitWithProrationPriceInvoicingCycleConfiguration], // [PriceGroupedAllocationPriceInvoicingCycleConfiguration], // [PriceGroupedWithProratedMinimumPriceInvoicingCycleConfiguration], // [PriceBulkWithProrationPriceInvoicingCycleConfiguration]. InvoicingCycleConfiguration interface{} `json:"invoicing_cycle_configuration"` // This field can have the runtime type of [PriceUnitPriceBillableMetric], // [PricePackagePriceBillableMetric], [PriceMatrixPriceBillableMetric], // [PriceTieredPriceBillableMetric], [PriceTieredBpsPriceBillableMetric], // [PriceBpsPriceBillableMetric], [PriceBulkBpsPriceBillableMetric], // [PriceBulkPriceBillableMetric], [PriceThresholdTotalAmountPriceBillableMetric], // [PriceTieredPackagePriceBillableMetric], // [PriceGroupedTieredPriceBillableMetric], // [PriceTieredWithMinimumPriceBillableMetric], // [PriceTieredPackageWithMinimumPriceBillableMetric], // [PricePackageWithAllocationPriceBillableMetric], // [PriceUnitWithPercentPriceBillableMetric], // [PriceMatrixWithAllocationPriceBillableMetric], // [PriceTieredWithProrationPriceBillableMetric], // [PriceUnitWithProrationPriceBillableMetric], // [PriceGroupedAllocationPriceBillableMetric], // [PriceGroupedWithProratedMinimumPriceBillableMetric], // [PriceBulkWithProrationPriceBillableMetric]. BillableMetric interface{} `json:"billable_metric"` FixedPriceQuantity float64 `json:"fixed_price_quantity,required,nullable"` PlanPhaseOrder int64 `json:"plan_phase_order,required,nullable"` Currency string `json:"currency,required"` ConversionRate float64 `json:"conversion_rate,required,nullable"` // This field can have the runtime type of [PriceUnitPriceItem], // [PricePackagePriceItem], [PriceMatrixPriceItem], [PriceTieredPriceItem], // [PriceTieredBpsPriceItem], [PriceBpsPriceItem], [PriceBulkBpsPriceItem], // [PriceBulkPriceItem], [PriceThresholdTotalAmountPriceItem], // [PriceTieredPackagePriceItem], [PriceGroupedTieredPriceItem], // [PriceTieredWithMinimumPriceItem], [PriceTieredPackageWithMinimumPriceItem], // [PricePackageWithAllocationPriceItem], [PriceUnitWithPercentPriceItem], // [PriceMatrixWithAllocationPriceItem], [PriceTieredWithProrationPriceItem], // [PriceUnitWithProrationPriceItem], [PriceGroupedAllocationPriceItem], // [PriceGroupedWithProratedMinimumPriceItem], [PriceBulkWithProrationPriceItem]. Item interface{} `json:"item"` // This field can have the runtime type of [PriceUnitPriceCreditAllocation], // [PricePackagePriceCreditAllocation], [PriceMatrixPriceCreditAllocation], // [PriceTieredPriceCreditAllocation], [PriceTieredBpsPriceCreditAllocation], // [PriceBpsPriceCreditAllocation], [PriceBulkBpsPriceCreditAllocation], // [PriceBulkPriceCreditAllocation], // [PriceThresholdTotalAmountPriceCreditAllocation], // [PriceTieredPackagePriceCreditAllocation], // [PriceGroupedTieredPriceCreditAllocation], // [PriceTieredWithMinimumPriceCreditAllocation], // [PriceTieredPackageWithMinimumPriceCreditAllocation], // [PricePackageWithAllocationPriceCreditAllocation], // [PriceUnitWithPercentPriceCreditAllocation], // [PriceMatrixWithAllocationPriceCreditAllocation], // [PriceTieredWithProrationPriceCreditAllocation], // [PriceUnitWithProrationPriceCreditAllocation], // [PriceGroupedAllocationPriceCreditAllocation], // [PriceGroupedWithProratedMinimumPriceCreditAllocation], // [PriceBulkWithProrationPriceCreditAllocation]. CreditAllocation interface{} `json:"credit_allocation"` Discount shared.Discount `json:"discount,required,nullable"` // This field can have the runtime type of [PriceUnitPriceMinimum], // [PricePackagePriceMinimum], [PriceMatrixPriceMinimum], // [PriceTieredPriceMinimum], [PriceTieredBpsPriceMinimum], [PriceBpsPriceMinimum], // [PriceBulkBpsPriceMinimum], [PriceBulkPriceMinimum], // [PriceThresholdTotalAmountPriceMinimum], [PriceTieredPackagePriceMinimum], // [PriceGroupedTieredPriceMinimum], [PriceTieredWithMinimumPriceMinimum], // [PriceTieredPackageWithMinimumPriceMinimum], // [PricePackageWithAllocationPriceMinimum], [PriceUnitWithPercentPriceMinimum], // [PriceMatrixWithAllocationPriceMinimum], [PriceTieredWithProrationPriceMinimum], // [PriceUnitWithProrationPriceMinimum], [PriceGroupedAllocationPriceMinimum], // [PriceGroupedWithProratedMinimumPriceMinimum], // [PriceBulkWithProrationPriceMinimum]. Minimum interface{} `json:"minimum"` MinimumAmount string `json:"minimum_amount,required,nullable"` // This field can have the runtime type of [PriceUnitPriceMaximum], // [PricePackagePriceMaximum], [PriceMatrixPriceMaximum], // [PriceTieredPriceMaximum], [PriceTieredBpsPriceMaximum], [PriceBpsPriceMaximum], // [PriceBulkBpsPriceMaximum], [PriceBulkPriceMaximum], // [PriceThresholdTotalAmountPriceMaximum], [PriceTieredPackagePriceMaximum], // [PriceGroupedTieredPriceMaximum], [PriceTieredWithMinimumPriceMaximum], // [PriceTieredPackageWithMinimumPriceMaximum], // [PricePackageWithAllocationPriceMaximum], [PriceUnitWithPercentPriceMaximum], // [PriceMatrixWithAllocationPriceMaximum], [PriceTieredWithProrationPriceMaximum], // [PriceUnitWithProrationPriceMaximum], [PriceGroupedAllocationPriceMaximum], // [PriceGroupedWithProratedMinimumPriceMaximum], // [PriceBulkWithProrationPriceMaximum]. Maximum interface{} `json:"maximum"` MaximumAmount string `json:"maximum_amount,required,nullable"` // This field can have the runtime type of [PriceUnitPriceUnitConfig]. UnitConfig interface{} `json:"unit_config,required"` // This field can have the runtime type of [PricePackagePricePackageConfig]. PackageConfig interface{} `json:"package_config,required"` // This field can have the runtime type of [PriceMatrixPriceMatrixConfig]. MatrixConfig interface{} `json:"matrix_config,required"` // This field can have the runtime type of [PriceTieredPriceTieredConfig]. TieredConfig interface{} `json:"tiered_config,required"` // This field can have the runtime type of [PriceTieredBpsPriceTieredBpsConfig]. TieredBpsConfig interface{} `json:"tiered_bps_config,required"` // This field can have the runtime type of [PriceBpsPriceBpsConfig]. BpsConfig interface{} `json:"bps_config,required"` // This field can have the runtime type of [PriceBulkBpsPriceBulkBpsConfig]. BulkBpsConfig interface{} `json:"bulk_bps_config,required"` // This field can have the runtime type of [PriceBulkPriceBulkConfig]. BulkConfig interface{} `json:"bulk_config,required"` // This field can have the runtime type of [map[string]interface{}]. ThresholdTotalAmountConfig interface{} `json:"threshold_total_amount_config,required"` // This field can have the runtime type of [map[string]interface{}]. TieredPackageConfig interface{} `json:"tiered_package_config,required"` // This field can have the runtime type of [map[string]interface{}]. GroupedTieredConfig interface{} `json:"grouped_tiered_config,required"` // This field can have the runtime type of [map[string]interface{}]. TieredWithMinimumConfig interface{} `json:"tiered_with_minimum_config,required"` // This field can have the runtime type of [map[string]interface{}]. TieredPackageWithMinimumConfig interface{} `json:"tiered_package_with_minimum_config,required"` // This field can have the runtime type of [map[string]interface{}]. PackageWithAllocationConfig interface{} `json:"package_with_allocation_config,required"` // This field can have the runtime type of [map[string]interface{}]. UnitWithPercentConfig interface{} `json:"unit_with_percent_config,required"` // This field can have the runtime type of // [PriceMatrixWithAllocationPriceMatrixWithAllocationConfig]. MatrixWithAllocationConfig interface{} `json:"matrix_with_allocation_config,required"` // This field can have the runtime type of [map[string]interface{}]. TieredWithProrationConfig interface{} `json:"tiered_with_proration_config,required"` // This field can have the runtime type of [map[string]interface{}]. UnitWithProrationConfig interface{} `json:"unit_with_proration_config,required"` // This field can have the runtime type of [map[string]interface{}]. GroupedAllocationConfig interface{} `json:"grouped_allocation_config,required"` // This field can have the runtime type of [map[string]interface{}]. GroupedWithProratedMinimumConfig interface{} `json:"grouped_with_prorated_minimum_config,required"` // This field can have the runtime type of [map[string]interface{}]. BulkWithProrationConfig interface{} `json:"bulk_with_proration_config,required"` JSON priceJSON `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.
## Unit pricing
With unit pricing, each unit costs a fixed amount.
```json
{ ... "model_type": "unit", "unit_config": { "unit_amount": "0.50" } ... }
```
## Tiered pricing
In tiered pricing, the cost of a given unit depends on the tier range that it falls into, where each tier range is defined by an upper and lower bound. For example, the first ten units may cost $0.50 each and all units thereafter may cost $0.10 each.
```json
{ ... "model_type": "tiered", "tiered_config": { "tiers": [ { "first_unit": 1, "last_unit": 10, "unit_amount": "0.50" }, { "first_unit": 11, "last_unit": null, "unit_amount": "0.10" } ] } ...
```
## Bulk pricing
Bulk pricing applies when the number of units determine the cost of all units. For example, if you've bought less than 10 units, they may each be $0.50 for a total of $5.00. Once you've bought more than 10 units, all units may now be priced at $0.40 (i.e. 101 units total would be $40.40).
```json
{ ... "model_type": "bulk", "bulk_config": { "tiers": [ { "maximum_units": 10, "unit_amount": "0.50" }, { "maximum_units": 1000, "unit_amount": "0.40" } ] } ... }
```
## Package pricing
Package pricing defines the size or granularity of a unit for billing purposes. For example, if the package size is set to 5, then 4 units will be billed as 5 and 6 units will be billed at 10.
```json
{ ... "model_type": "package", "package_config": { "package_amount": "0.80", "package_size": 10 } ... }
```
## BPS pricing
BPS pricing specifies a per-event (e.g. per-payment) rate in one hundredth of a percent (the number of basis points to charge), as well as a cap per event to assess. For example, this would allow you to assess a fee of 0.25% on every payment you process, with a maximum charge of $25 per payment.
```json
{ ... "model_type": "bps", "bps_config": { "bps": 125, "per_unit_maximum": "11.00" } ... }
```
## Bulk BPS pricing
Bulk BPS pricing specifies BPS parameters in a tiered manner, dependent on the total quantity across all events. Similar to bulk pricing, the BPS parameters of a given event depends on the tier range that the billing period falls into. Each tier range is defined by an upper bound. For example, after $1.5M of payment volume is reached, each individual payment may have a lower cap or a smaller take-rate.
```json
... "model_type": "bulk_bps", "bulk_bps_config": { "tiers": [ { "maximum_amount": "1000000.00", "bps": 125, "per_unit_maximum": "19.00" }, { "maximum_amount": null, "bps": 115, "per_unit_maximum": "4.00" } ] } ... }
```
## Tiered BPS pricing
Tiered BPS pricing specifies BPS parameters in a graduated manner, where an event's applicable parameter is a function of its marginal addition to the period total. Similar to tiered pricing, the BPS parameters of a given event depends on the tier range that it falls into, where each tier range is defined by an upper and lower bound. For example, the first few payments may have a 0.8 BPS take-rate and all payments after a specific volume may incur a take-rate of 0.5 BPS each.
```json
... "model_type": "tiered_bps", "tiered_bps_config": { "tiers": [ { "minimum_amount": "0", "maximum_amount": "1000000.00", "bps": 125, "per_unit_maximum": "19.00" }, { "minimum_amount": "1000000.00", "maximum_amount": null, "bps": 115, "per_unit_maximum": "4.00" } ] } ... }
```
## Matrix pricing
Matrix pricing defines a set of unit prices in a one or two-dimensional matrix. `dimensions` defines the two event property values evaluated in this pricing model. In a one-dimensional matrix, the second value is `null`. Every configuration has a list of `matrix_values` which give the unit prices for specified property values. In a one-dimensional matrix, the matrix values will have `dimension_values` where the second value of the pair is null. If an event does not match any of the dimension values in the matrix, it will resort to the `default_unit_amount`.
```json
{ "model_type": "matrix" "matrix_config": { "default_unit_amount": "3.00", "dimensions": [ "cluster_name", "region" ], "matrix_values": [ { "dimension_values": [ "alpha", "west" ], "unit_amount": "2.00" }, ... ] } }
```
## Fixed fees
Fixed fees are prices that are applied independent of usage quantities, and follow unit pricing. They also have an additional parameter `fixed_price_quantity`. If the Price represents a fixed cost, this represents the quantity of units applied.
```json
{ ... "id": "price_id", "model_type": "unit", "unit_config": { "unit_amount": "2.00" }, "fixed_price_quantity": 3.0 ... }
```
func (Price) AsUnion ¶ added in v0.25.0
func (r Price) AsUnion() PriceUnion
AsUnion returns a PriceUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are PriceUnitPrice, PricePackagePrice, PriceMatrixPrice, PriceTieredPrice, PriceTieredBpsPrice, PriceBpsPrice, PriceBulkBpsPrice, PriceBulkPrice, PriceThresholdTotalAmountPrice, PriceTieredPackagePrice, PriceGroupedTieredPrice, PriceTieredWithMinimumPrice, PriceTieredPackageWithMinimumPrice, PricePackageWithAllocationPrice, PriceUnitWithPercentPrice, PriceMatrixWithAllocationPrice, PriceTieredWithProrationPrice, PriceUnitWithProrationPrice, PriceGroupedAllocationPrice, PriceGroupedWithProratedMinimumPrice, PriceBulkWithProrationPrice.
func (*Price) UnmarshalJSON ¶ added in v0.25.0
type PriceBpsPrice ¶
type PriceBpsPrice struct { ID string `json:"id,required"` BillableMetric PriceBpsPriceBillableMetric `json:"billable_metric,required,nullable"` BillingCycleConfiguration PriceBpsPriceBillingCycleConfiguration `json:"billing_cycle_configuration,required"` BpsConfig PriceBpsPriceBpsConfig `json:"bps_config,required"` Cadence PriceBpsPriceCadence `json:"cadence,required"` ConversionRate float64 `json:"conversion_rate,required,nullable"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditAllocation PriceBpsPriceCreditAllocation `json:"credit_allocation,required,nullable"` Currency string `json:"currency,required"` Discount shared.Discount `json:"discount,required,nullable"` ExternalPriceID string `json:"external_price_id,required,nullable"` FixedPriceQuantity float64 `json:"fixed_price_quantity,required,nullable"` InvoicingCycleConfiguration PriceBpsPriceInvoicingCycleConfiguration `json:"invoicing_cycle_configuration,required,nullable"` Item PriceBpsPriceItem `json:"item,required"` Maximum PriceBpsPriceMaximum `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 PriceBpsPriceMinimum `json:"minimum,required,nullable"` MinimumAmount string `json:"minimum_amount,required,nullable"` ModelType PriceBpsPriceModelType `json:"model_type,required"` Name string `json:"name,required"` PlanPhaseOrder int64 `json:"plan_phase_order,required,nullable"` PriceType PriceBpsPricePriceType `json:"price_type,required"` JSON priceBpsPriceJSON `json:"-"` }
func (*PriceBpsPrice) UnmarshalJSON ¶
func (r *PriceBpsPrice) UnmarshalJSON(data []byte) (err error)
type PriceBpsPriceBillableMetric ¶
type PriceBpsPriceBillableMetric struct { ID string `json:"id,required"` JSON priceBpsPriceBillableMetricJSON `json:"-"` }
func (*PriceBpsPriceBillableMetric) UnmarshalJSON ¶
func (r *PriceBpsPriceBillableMetric) UnmarshalJSON(data []byte) (err error)
type PriceBpsPriceBillingCycleConfiguration ¶ added in v0.44.0
type PriceBpsPriceBillingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PriceBpsPriceBillingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON priceBpsPriceBillingCycleConfigurationJSON `json:"-"` }
func (*PriceBpsPriceBillingCycleConfiguration) UnmarshalJSON ¶ added in v0.44.0
func (r *PriceBpsPriceBillingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PriceBpsPriceBillingCycleConfigurationDurationUnit ¶ added in v0.44.0
type PriceBpsPriceBillingCycleConfigurationDurationUnit string
const ( PriceBpsPriceBillingCycleConfigurationDurationUnitDay PriceBpsPriceBillingCycleConfigurationDurationUnit = "day" PriceBpsPriceBillingCycleConfigurationDurationUnitMonth PriceBpsPriceBillingCycleConfigurationDurationUnit = "month" )
func (PriceBpsPriceBillingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.44.0
func (r PriceBpsPriceBillingCycleConfigurationDurationUnit) IsKnown() bool
type PriceBpsPriceBpsConfig ¶
type PriceBpsPriceBpsConfig 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 priceBpsPriceBpsConfigJSON `json:"-"` }
func (*PriceBpsPriceBpsConfig) UnmarshalJSON ¶
func (r *PriceBpsPriceBpsConfig) UnmarshalJSON(data []byte) (err error)
type PriceBpsPriceCadence ¶
type PriceBpsPriceCadence string
const ( PriceBpsPriceCadenceOneTime PriceBpsPriceCadence = "one_time" PriceBpsPriceCadenceMonthly PriceBpsPriceCadence = "monthly" PriceBpsPriceCadenceQuarterly PriceBpsPriceCadence = "quarterly" PriceBpsPriceCadenceSemiAnnual PriceBpsPriceCadence = "semi_annual" PriceBpsPriceCadenceAnnual PriceBpsPriceCadence = "annual" PriceBpsPriceCadenceCustom PriceBpsPriceCadence = "custom" )
func (PriceBpsPriceCadence) IsKnown ¶ added in v0.24.0
func (r PriceBpsPriceCadence) IsKnown() bool
type PriceBpsPriceCreditAllocation ¶ added in v0.25.0
type PriceBpsPriceCreditAllocation struct { AllowsRollover bool `json:"allows_rollover,required"` Currency string `json:"currency,required"` JSON priceBpsPriceCreditAllocationJSON `json:"-"` }
func (*PriceBpsPriceCreditAllocation) UnmarshalJSON ¶ added in v0.25.0
func (r *PriceBpsPriceCreditAllocation) UnmarshalJSON(data []byte) (err error)
type PriceBpsPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PriceBpsPriceInvoicingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PriceBpsPriceInvoicingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON priceBpsPriceInvoicingCycleConfigurationJSON `json:"-"` }
func (*PriceBpsPriceInvoicingCycleConfiguration) UnmarshalJSON ¶ added in v0.56.0
func (r *PriceBpsPriceInvoicingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PriceBpsPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceBpsPriceInvoicingCycleConfigurationDurationUnit string
const ( PriceBpsPriceInvoicingCycleConfigurationDurationUnitDay PriceBpsPriceInvoicingCycleConfigurationDurationUnit = "day" PriceBpsPriceInvoicingCycleConfigurationDurationUnitMonth PriceBpsPriceInvoicingCycleConfigurationDurationUnit = "month" )
func (PriceBpsPriceInvoicingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PriceBpsPriceInvoicingCycleConfigurationDurationUnit) IsKnown() bool
type PriceBpsPriceItem ¶
type PriceBpsPriceItem struct { ID string `json:"id,required"` Name string `json:"name,required"` JSON priceBpsPriceItemJSON `json:"-"` }
func (*PriceBpsPriceItem) UnmarshalJSON ¶
func (r *PriceBpsPriceItem) UnmarshalJSON(data []byte) (err error)
type PriceBpsPriceMaximum ¶
type PriceBpsPriceMaximum 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 priceBpsPriceMaximumJSON `json:"-"` }
func (*PriceBpsPriceMaximum) UnmarshalJSON ¶
func (r *PriceBpsPriceMaximum) UnmarshalJSON(data []byte) (err error)
type PriceBpsPriceMinimum ¶
type PriceBpsPriceMinimum 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 priceBpsPriceMinimumJSON `json:"-"` }
func (*PriceBpsPriceMinimum) UnmarshalJSON ¶
func (r *PriceBpsPriceMinimum) UnmarshalJSON(data []byte) (err error)
type PriceBpsPriceModelType ¶
type PriceBpsPriceModelType string
const (
PriceBpsPriceModelTypeBps PriceBpsPriceModelType = "bps"
)
func (PriceBpsPriceModelType) IsKnown ¶ added in v0.24.0
func (r PriceBpsPriceModelType) IsKnown() bool
type PriceBpsPricePriceType ¶
type PriceBpsPricePriceType string
const ( PriceBpsPricePriceTypeUsagePrice PriceBpsPricePriceType = "usage_price" PriceBpsPricePriceTypeFixedPrice PriceBpsPricePriceType = "fixed_price" )
func (PriceBpsPricePriceType) IsKnown ¶ added in v0.24.0
func (r PriceBpsPricePriceType) IsKnown() bool
type PriceBulkBpsPrice ¶
type PriceBulkBpsPrice struct { ID string `json:"id,required"` BillableMetric PriceBulkBpsPriceBillableMetric `json:"billable_metric,required,nullable"` BillingCycleConfiguration PriceBulkBpsPriceBillingCycleConfiguration `json:"billing_cycle_configuration,required"` BulkBpsConfig PriceBulkBpsPriceBulkBpsConfig `json:"bulk_bps_config,required"` Cadence PriceBulkBpsPriceCadence `json:"cadence,required"` ConversionRate float64 `json:"conversion_rate,required,nullable"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditAllocation PriceBulkBpsPriceCreditAllocation `json:"credit_allocation,required,nullable"` Currency string `json:"currency,required"` Discount shared.Discount `json:"discount,required,nullable"` ExternalPriceID string `json:"external_price_id,required,nullable"` FixedPriceQuantity float64 `json:"fixed_price_quantity,required,nullable"` InvoicingCycleConfiguration PriceBulkBpsPriceInvoicingCycleConfiguration `json:"invoicing_cycle_configuration,required,nullable"` Item PriceBulkBpsPriceItem `json:"item,required"` Maximum PriceBulkBpsPriceMaximum `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 PriceBulkBpsPriceMinimum `json:"minimum,required,nullable"` MinimumAmount string `json:"minimum_amount,required,nullable"` ModelType PriceBulkBpsPriceModelType `json:"model_type,required"` Name string `json:"name,required"` PlanPhaseOrder int64 `json:"plan_phase_order,required,nullable"` PriceType PriceBulkBpsPricePriceType `json:"price_type,required"` JSON priceBulkBpsPriceJSON `json:"-"` }
func (*PriceBulkBpsPrice) UnmarshalJSON ¶
func (r *PriceBulkBpsPrice) UnmarshalJSON(data []byte) (err error)
type PriceBulkBpsPriceBillableMetric ¶
type PriceBulkBpsPriceBillableMetric struct { ID string `json:"id,required"` JSON priceBulkBpsPriceBillableMetricJSON `json:"-"` }
func (*PriceBulkBpsPriceBillableMetric) UnmarshalJSON ¶
func (r *PriceBulkBpsPriceBillableMetric) UnmarshalJSON(data []byte) (err error)
type PriceBulkBpsPriceBillingCycleConfiguration ¶ added in v0.44.0
type PriceBulkBpsPriceBillingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PriceBulkBpsPriceBillingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON priceBulkBpsPriceBillingCycleConfigurationJSON `json:"-"` }
func (*PriceBulkBpsPriceBillingCycleConfiguration) UnmarshalJSON ¶ added in v0.44.0
func (r *PriceBulkBpsPriceBillingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PriceBulkBpsPriceBillingCycleConfigurationDurationUnit ¶ added in v0.44.0
type PriceBulkBpsPriceBillingCycleConfigurationDurationUnit string
const ( PriceBulkBpsPriceBillingCycleConfigurationDurationUnitDay PriceBulkBpsPriceBillingCycleConfigurationDurationUnit = "day" PriceBulkBpsPriceBillingCycleConfigurationDurationUnitMonth PriceBulkBpsPriceBillingCycleConfigurationDurationUnit = "month" )
func (PriceBulkBpsPriceBillingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.44.0
func (r PriceBulkBpsPriceBillingCycleConfigurationDurationUnit) IsKnown() bool
type PriceBulkBpsPriceBulkBpsConfig ¶
type PriceBulkBpsPriceBulkBpsConfig struct { // Tiers for a bulk BPS pricing model where all usage is aggregated to a single // tier based on total volume Tiers []PriceBulkBpsPriceBulkBpsConfigTier `json:"tiers,required"` JSON priceBulkBpsPriceBulkBpsConfigJSON `json:"-"` }
func (*PriceBulkBpsPriceBulkBpsConfig) UnmarshalJSON ¶
func (r *PriceBulkBpsPriceBulkBpsConfig) UnmarshalJSON(data []byte) (err error)
type PriceBulkBpsPriceBulkBpsConfigTier ¶
type PriceBulkBpsPriceBulkBpsConfigTier 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 priceBulkBpsPriceBulkBpsConfigTierJSON `json:"-"` }
func (*PriceBulkBpsPriceBulkBpsConfigTier) UnmarshalJSON ¶
func (r *PriceBulkBpsPriceBulkBpsConfigTier) UnmarshalJSON(data []byte) (err error)
type PriceBulkBpsPriceCadence ¶
type PriceBulkBpsPriceCadence string
const ( PriceBulkBpsPriceCadenceOneTime PriceBulkBpsPriceCadence = "one_time" PriceBulkBpsPriceCadenceMonthly PriceBulkBpsPriceCadence = "monthly" PriceBulkBpsPriceCadenceQuarterly PriceBulkBpsPriceCadence = "quarterly" PriceBulkBpsPriceCadenceSemiAnnual PriceBulkBpsPriceCadence = "semi_annual" PriceBulkBpsPriceCadenceAnnual PriceBulkBpsPriceCadence = "annual" PriceBulkBpsPriceCadenceCustom PriceBulkBpsPriceCadence = "custom" )
func (PriceBulkBpsPriceCadence) IsKnown ¶ added in v0.24.0
func (r PriceBulkBpsPriceCadence) IsKnown() bool
type PriceBulkBpsPriceCreditAllocation ¶ added in v0.25.0
type PriceBulkBpsPriceCreditAllocation struct { AllowsRollover bool `json:"allows_rollover,required"` Currency string `json:"currency,required"` JSON priceBulkBpsPriceCreditAllocationJSON `json:"-"` }
func (*PriceBulkBpsPriceCreditAllocation) UnmarshalJSON ¶ added in v0.25.0
func (r *PriceBulkBpsPriceCreditAllocation) UnmarshalJSON(data []byte) (err error)
type PriceBulkBpsPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PriceBulkBpsPriceInvoicingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PriceBulkBpsPriceInvoicingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON priceBulkBpsPriceInvoicingCycleConfigurationJSON `json:"-"` }
func (*PriceBulkBpsPriceInvoicingCycleConfiguration) UnmarshalJSON ¶ added in v0.56.0
func (r *PriceBulkBpsPriceInvoicingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PriceBulkBpsPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceBulkBpsPriceInvoicingCycleConfigurationDurationUnit string
const ( PriceBulkBpsPriceInvoicingCycleConfigurationDurationUnitDay PriceBulkBpsPriceInvoicingCycleConfigurationDurationUnit = "day" PriceBulkBpsPriceInvoicingCycleConfigurationDurationUnitMonth PriceBulkBpsPriceInvoicingCycleConfigurationDurationUnit = "month" )
func (PriceBulkBpsPriceInvoicingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PriceBulkBpsPriceInvoicingCycleConfigurationDurationUnit) IsKnown() bool
type PriceBulkBpsPriceItem ¶
type PriceBulkBpsPriceItem struct { ID string `json:"id,required"` Name string `json:"name,required"` JSON priceBulkBpsPriceItemJSON `json:"-"` }
func (*PriceBulkBpsPriceItem) UnmarshalJSON ¶
func (r *PriceBulkBpsPriceItem) UnmarshalJSON(data []byte) (err error)
type PriceBulkBpsPriceMaximum ¶
type PriceBulkBpsPriceMaximum 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 priceBulkBpsPriceMaximumJSON `json:"-"` }
func (*PriceBulkBpsPriceMaximum) UnmarshalJSON ¶
func (r *PriceBulkBpsPriceMaximum) UnmarshalJSON(data []byte) (err error)
type PriceBulkBpsPriceMinimum ¶
type PriceBulkBpsPriceMinimum 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 priceBulkBpsPriceMinimumJSON `json:"-"` }
func (*PriceBulkBpsPriceMinimum) UnmarshalJSON ¶
func (r *PriceBulkBpsPriceMinimum) UnmarshalJSON(data []byte) (err error)
type PriceBulkBpsPriceModelType ¶
type PriceBulkBpsPriceModelType string
const (
PriceBulkBpsPriceModelTypeBulkBps PriceBulkBpsPriceModelType = "bulk_bps"
)
func (PriceBulkBpsPriceModelType) IsKnown ¶ added in v0.24.0
func (r PriceBulkBpsPriceModelType) IsKnown() bool
type PriceBulkBpsPricePriceType ¶
type PriceBulkBpsPricePriceType string
const ( PriceBulkBpsPricePriceTypeUsagePrice PriceBulkBpsPricePriceType = "usage_price" PriceBulkBpsPricePriceTypeFixedPrice PriceBulkBpsPricePriceType = "fixed_price" )
func (PriceBulkBpsPricePriceType) IsKnown ¶ added in v0.24.0
func (r PriceBulkBpsPricePriceType) IsKnown() bool
type PriceBulkPrice ¶
type PriceBulkPrice struct { ID string `json:"id,required"` BillableMetric PriceBulkPriceBillableMetric `json:"billable_metric,required,nullable"` BillingCycleConfiguration PriceBulkPriceBillingCycleConfiguration `json:"billing_cycle_configuration,required"` BulkConfig PriceBulkPriceBulkConfig `json:"bulk_config,required"` Cadence PriceBulkPriceCadence `json:"cadence,required"` ConversionRate float64 `json:"conversion_rate,required,nullable"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditAllocation PriceBulkPriceCreditAllocation `json:"credit_allocation,required,nullable"` Currency string `json:"currency,required"` Discount shared.Discount `json:"discount,required,nullable"` ExternalPriceID string `json:"external_price_id,required,nullable"` FixedPriceQuantity float64 `json:"fixed_price_quantity,required,nullable"` InvoicingCycleConfiguration PriceBulkPriceInvoicingCycleConfiguration `json:"invoicing_cycle_configuration,required,nullable"` Item PriceBulkPriceItem `json:"item,required"` Maximum PriceBulkPriceMaximum `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 PriceBulkPriceMinimum `json:"minimum,required,nullable"` MinimumAmount string `json:"minimum_amount,required,nullable"` ModelType PriceBulkPriceModelType `json:"model_type,required"` Name string `json:"name,required"` PlanPhaseOrder int64 `json:"plan_phase_order,required,nullable"` PriceType PriceBulkPricePriceType `json:"price_type,required"` JSON priceBulkPriceJSON `json:"-"` }
func (*PriceBulkPrice) UnmarshalJSON ¶
func (r *PriceBulkPrice) UnmarshalJSON(data []byte) (err error)
type PriceBulkPriceBillableMetric ¶
type PriceBulkPriceBillableMetric struct { ID string `json:"id,required"` JSON priceBulkPriceBillableMetricJSON `json:"-"` }
func (*PriceBulkPriceBillableMetric) UnmarshalJSON ¶
func (r *PriceBulkPriceBillableMetric) UnmarshalJSON(data []byte) (err error)
type PriceBulkPriceBillingCycleConfiguration ¶ added in v0.44.0
type PriceBulkPriceBillingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PriceBulkPriceBillingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON priceBulkPriceBillingCycleConfigurationJSON `json:"-"` }
func (*PriceBulkPriceBillingCycleConfiguration) UnmarshalJSON ¶ added in v0.44.0
func (r *PriceBulkPriceBillingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PriceBulkPriceBillingCycleConfigurationDurationUnit ¶ added in v0.44.0
type PriceBulkPriceBillingCycleConfigurationDurationUnit string
const ( PriceBulkPriceBillingCycleConfigurationDurationUnitDay PriceBulkPriceBillingCycleConfigurationDurationUnit = "day" PriceBulkPriceBillingCycleConfigurationDurationUnitMonth PriceBulkPriceBillingCycleConfigurationDurationUnit = "month" )
func (PriceBulkPriceBillingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.44.0
func (r PriceBulkPriceBillingCycleConfigurationDurationUnit) IsKnown() bool
type PriceBulkPriceBulkConfig ¶
type PriceBulkPriceBulkConfig struct { // Bulk tiers for rating based on total usage volume Tiers []PriceBulkPriceBulkConfigTier `json:"tiers,required"` JSON priceBulkPriceBulkConfigJSON `json:"-"` }
func (*PriceBulkPriceBulkConfig) UnmarshalJSON ¶
func (r *PriceBulkPriceBulkConfig) UnmarshalJSON(data []byte) (err error)
type PriceBulkPriceBulkConfigTier ¶
type PriceBulkPriceBulkConfigTier struct { // Amount per unit UnitAmount string `json:"unit_amount,required"` // Upper bound for this tier MaximumUnits float64 `json:"maximum_units,nullable"` JSON priceBulkPriceBulkConfigTierJSON `json:"-"` }
func (*PriceBulkPriceBulkConfigTier) UnmarshalJSON ¶
func (r *PriceBulkPriceBulkConfigTier) UnmarshalJSON(data []byte) (err error)
type PriceBulkPriceCadence ¶
type PriceBulkPriceCadence string
const ( PriceBulkPriceCadenceOneTime PriceBulkPriceCadence = "one_time" PriceBulkPriceCadenceMonthly PriceBulkPriceCadence = "monthly" PriceBulkPriceCadenceQuarterly PriceBulkPriceCadence = "quarterly" PriceBulkPriceCadenceSemiAnnual PriceBulkPriceCadence = "semi_annual" PriceBulkPriceCadenceAnnual PriceBulkPriceCadence = "annual" PriceBulkPriceCadenceCustom PriceBulkPriceCadence = "custom" )
func (PriceBulkPriceCadence) IsKnown ¶ added in v0.24.0
func (r PriceBulkPriceCadence) IsKnown() bool
type PriceBulkPriceCreditAllocation ¶ added in v0.25.0
type PriceBulkPriceCreditAllocation struct { AllowsRollover bool `json:"allows_rollover,required"` Currency string `json:"currency,required"` JSON priceBulkPriceCreditAllocationJSON `json:"-"` }
func (*PriceBulkPriceCreditAllocation) UnmarshalJSON ¶ added in v0.25.0
func (r *PriceBulkPriceCreditAllocation) UnmarshalJSON(data []byte) (err error)
type PriceBulkPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PriceBulkPriceInvoicingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PriceBulkPriceInvoicingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON priceBulkPriceInvoicingCycleConfigurationJSON `json:"-"` }
func (*PriceBulkPriceInvoicingCycleConfiguration) UnmarshalJSON ¶ added in v0.56.0
func (r *PriceBulkPriceInvoicingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PriceBulkPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceBulkPriceInvoicingCycleConfigurationDurationUnit string
const ( PriceBulkPriceInvoicingCycleConfigurationDurationUnitDay PriceBulkPriceInvoicingCycleConfigurationDurationUnit = "day" PriceBulkPriceInvoicingCycleConfigurationDurationUnitMonth PriceBulkPriceInvoicingCycleConfigurationDurationUnit = "month" )
func (PriceBulkPriceInvoicingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PriceBulkPriceInvoicingCycleConfigurationDurationUnit) IsKnown() bool
type PriceBulkPriceItem ¶
type PriceBulkPriceItem struct { ID string `json:"id,required"` Name string `json:"name,required"` JSON priceBulkPriceItemJSON `json:"-"` }
func (*PriceBulkPriceItem) UnmarshalJSON ¶
func (r *PriceBulkPriceItem) UnmarshalJSON(data []byte) (err error)
type PriceBulkPriceMaximum ¶
type PriceBulkPriceMaximum 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 priceBulkPriceMaximumJSON `json:"-"` }
func (*PriceBulkPriceMaximum) UnmarshalJSON ¶
func (r *PriceBulkPriceMaximum) UnmarshalJSON(data []byte) (err error)
type PriceBulkPriceMinimum ¶
type PriceBulkPriceMinimum 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 priceBulkPriceMinimumJSON `json:"-"` }
func (*PriceBulkPriceMinimum) UnmarshalJSON ¶
func (r *PriceBulkPriceMinimum) UnmarshalJSON(data []byte) (err error)
type PriceBulkPriceModelType ¶
type PriceBulkPriceModelType string
const (
PriceBulkPriceModelTypeBulk PriceBulkPriceModelType = "bulk"
)
func (PriceBulkPriceModelType) IsKnown ¶ added in v0.24.0
func (r PriceBulkPriceModelType) IsKnown() bool
type PriceBulkPricePriceType ¶
type PriceBulkPricePriceType string
const ( PriceBulkPricePriceTypeUsagePrice PriceBulkPricePriceType = "usage_price" PriceBulkPricePriceTypeFixedPrice PriceBulkPricePriceType = "fixed_price" )
func (PriceBulkPricePriceType) IsKnown ¶ added in v0.24.0
func (r PriceBulkPricePriceType) IsKnown() bool
type PriceBulkWithProrationPrice ¶ added in v0.49.0
type PriceBulkWithProrationPrice struct { ID string `json:"id,required"` BillableMetric PriceBulkWithProrationPriceBillableMetric `json:"billable_metric,required,nullable"` BillingCycleConfiguration PriceBulkWithProrationPriceBillingCycleConfiguration `json:"billing_cycle_configuration,required"` BulkWithProrationConfig map[string]interface{} `json:"bulk_with_proration_config,required"` Cadence PriceBulkWithProrationPriceCadence `json:"cadence,required"` ConversionRate float64 `json:"conversion_rate,required,nullable"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditAllocation PriceBulkWithProrationPriceCreditAllocation `json:"credit_allocation,required,nullable"` Currency string `json:"currency,required"` Discount shared.Discount `json:"discount,required,nullable"` ExternalPriceID string `json:"external_price_id,required,nullable"` FixedPriceQuantity float64 `json:"fixed_price_quantity,required,nullable"` InvoicingCycleConfiguration PriceBulkWithProrationPriceInvoicingCycleConfiguration `json:"invoicing_cycle_configuration,required,nullable"` Item PriceBulkWithProrationPriceItem `json:"item,required"` Maximum PriceBulkWithProrationPriceMaximum `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 PriceBulkWithProrationPriceMinimum `json:"minimum,required,nullable"` MinimumAmount string `json:"minimum_amount,required,nullable"` ModelType PriceBulkWithProrationPriceModelType `json:"model_type,required"` Name string `json:"name,required"` PlanPhaseOrder int64 `json:"plan_phase_order,required,nullable"` PriceType PriceBulkWithProrationPricePriceType `json:"price_type,required"` JSON priceBulkWithProrationPriceJSON `json:"-"` }
func (*PriceBulkWithProrationPrice) UnmarshalJSON ¶ added in v0.49.0
func (r *PriceBulkWithProrationPrice) UnmarshalJSON(data []byte) (err error)
type PriceBulkWithProrationPriceBillableMetric ¶ added in v0.49.0
type PriceBulkWithProrationPriceBillableMetric struct { ID string `json:"id,required"` JSON priceBulkWithProrationPriceBillableMetricJSON `json:"-"` }
func (*PriceBulkWithProrationPriceBillableMetric) UnmarshalJSON ¶ added in v0.49.0
func (r *PriceBulkWithProrationPriceBillableMetric) UnmarshalJSON(data []byte) (err error)
type PriceBulkWithProrationPriceBillingCycleConfiguration ¶ added in v0.49.0
type PriceBulkWithProrationPriceBillingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PriceBulkWithProrationPriceBillingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON priceBulkWithProrationPriceBillingCycleConfigurationJSON `json:"-"` }
func (*PriceBulkWithProrationPriceBillingCycleConfiguration) UnmarshalJSON ¶ added in v0.49.0
func (r *PriceBulkWithProrationPriceBillingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PriceBulkWithProrationPriceBillingCycleConfigurationDurationUnit ¶ added in v0.49.0
type PriceBulkWithProrationPriceBillingCycleConfigurationDurationUnit string
const ( PriceBulkWithProrationPriceBillingCycleConfigurationDurationUnitDay PriceBulkWithProrationPriceBillingCycleConfigurationDurationUnit = "day" PriceBulkWithProrationPriceBillingCycleConfigurationDurationUnitMonth PriceBulkWithProrationPriceBillingCycleConfigurationDurationUnit = "month" )
func (PriceBulkWithProrationPriceBillingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.49.0
func (r PriceBulkWithProrationPriceBillingCycleConfigurationDurationUnit) IsKnown() bool
type PriceBulkWithProrationPriceCadence ¶ added in v0.49.0
type PriceBulkWithProrationPriceCadence string
const ( PriceBulkWithProrationPriceCadenceOneTime PriceBulkWithProrationPriceCadence = "one_time" PriceBulkWithProrationPriceCadenceMonthly PriceBulkWithProrationPriceCadence = "monthly" PriceBulkWithProrationPriceCadenceQuarterly PriceBulkWithProrationPriceCadence = "quarterly" PriceBulkWithProrationPriceCadenceSemiAnnual PriceBulkWithProrationPriceCadence = "semi_annual" PriceBulkWithProrationPriceCadenceAnnual PriceBulkWithProrationPriceCadence = "annual" PriceBulkWithProrationPriceCadenceCustom PriceBulkWithProrationPriceCadence = "custom" )
func (PriceBulkWithProrationPriceCadence) IsKnown ¶ added in v0.49.0
func (r PriceBulkWithProrationPriceCadence) IsKnown() bool
type PriceBulkWithProrationPriceCreditAllocation ¶ added in v0.49.0
type PriceBulkWithProrationPriceCreditAllocation struct { AllowsRollover bool `json:"allows_rollover,required"` Currency string `json:"currency,required"` JSON priceBulkWithProrationPriceCreditAllocationJSON `json:"-"` }
func (*PriceBulkWithProrationPriceCreditAllocation) UnmarshalJSON ¶ added in v0.49.0
func (r *PriceBulkWithProrationPriceCreditAllocation) UnmarshalJSON(data []byte) (err error)
type PriceBulkWithProrationPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PriceBulkWithProrationPriceInvoicingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PriceBulkWithProrationPriceInvoicingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON priceBulkWithProrationPriceInvoicingCycleConfigurationJSON `json:"-"` }
func (*PriceBulkWithProrationPriceInvoicingCycleConfiguration) UnmarshalJSON ¶ added in v0.56.0
func (r *PriceBulkWithProrationPriceInvoicingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PriceBulkWithProrationPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceBulkWithProrationPriceInvoicingCycleConfigurationDurationUnit string
const ( PriceBulkWithProrationPriceInvoicingCycleConfigurationDurationUnitDay PriceBulkWithProrationPriceInvoicingCycleConfigurationDurationUnit = "day" PriceBulkWithProrationPriceInvoicingCycleConfigurationDurationUnitMonth PriceBulkWithProrationPriceInvoicingCycleConfigurationDurationUnit = "month" )
func (PriceBulkWithProrationPriceInvoicingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PriceBulkWithProrationPriceInvoicingCycleConfigurationDurationUnit) IsKnown() bool
type PriceBulkWithProrationPriceItem ¶ added in v0.49.0
type PriceBulkWithProrationPriceItem struct { ID string `json:"id,required"` Name string `json:"name,required"` JSON priceBulkWithProrationPriceItemJSON `json:"-"` }
func (*PriceBulkWithProrationPriceItem) UnmarshalJSON ¶ added in v0.49.0
func (r *PriceBulkWithProrationPriceItem) UnmarshalJSON(data []byte) (err error)
type PriceBulkWithProrationPriceMaximum ¶ added in v0.49.0
type PriceBulkWithProrationPriceMaximum 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 priceBulkWithProrationPriceMaximumJSON `json:"-"` }
func (*PriceBulkWithProrationPriceMaximum) UnmarshalJSON ¶ added in v0.49.0
func (r *PriceBulkWithProrationPriceMaximum) UnmarshalJSON(data []byte) (err error)
type PriceBulkWithProrationPriceMinimum ¶ added in v0.49.0
type PriceBulkWithProrationPriceMinimum 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 priceBulkWithProrationPriceMinimumJSON `json:"-"` }
func (*PriceBulkWithProrationPriceMinimum) UnmarshalJSON ¶ added in v0.49.0
func (r *PriceBulkWithProrationPriceMinimum) UnmarshalJSON(data []byte) (err error)
type PriceBulkWithProrationPriceModelType ¶ added in v0.49.0
type PriceBulkWithProrationPriceModelType string
const (
PriceBulkWithProrationPriceModelTypeBulkWithProration PriceBulkWithProrationPriceModelType = "bulk_with_proration"
)
func (PriceBulkWithProrationPriceModelType) IsKnown ¶ added in v0.49.0
func (r PriceBulkWithProrationPriceModelType) IsKnown() bool
type PriceBulkWithProrationPricePriceType ¶ added in v0.49.0
type PriceBulkWithProrationPricePriceType string
const ( PriceBulkWithProrationPricePriceTypeUsagePrice PriceBulkWithProrationPricePriceType = "usage_price" PriceBulkWithProrationPricePriceTypeFixedPrice PriceBulkWithProrationPricePriceType = "fixed_price" )
func (PriceBulkWithProrationPricePriceType) IsKnown ¶ added in v0.49.0
func (r PriceBulkWithProrationPricePriceType) IsKnown() bool
type PriceCadence ¶ added in v0.25.0
type PriceCadence string
const ( PriceCadenceOneTime PriceCadence = "one_time" PriceCadenceMonthly PriceCadence = "monthly" PriceCadenceQuarterly PriceCadence = "quarterly" PriceCadenceSemiAnnual PriceCadence = "semi_annual" PriceCadenceAnnual PriceCadence = "annual" PriceCadenceCustom PriceCadence = "custom" )
func (PriceCadence) IsKnown ¶ added in v0.25.0
func (r PriceCadence) IsKnown() bool
type PriceEvaluateParams ¶ added in v0.25.0
type PriceEvaluateParams struct { // The exclusive upper bound for event timestamps TimeframeEnd param.Field[time.Time] `json:"timeframe_end,required" format:"date-time"` // The inclusive lower bound for event timestamps TimeframeStart param.Field[time.Time] `json:"timeframe_start,required" format:"date-time"` // The ID of the customer to which this evaluation is scoped. CustomerID param.Field[string] `json:"customer_id"` // The external customer ID of the customer to which this evaluation is scoped. ExternalCustomerID param.Field[string] `json:"external_customer_id"` // A boolean // [computed property](../guides/extensibility/advanced-metrics#computed-properties) // used to filter the underlying billable metric Filter param.Field[string] `json:"filter"` // Properties (or // [computed properties](../guides/extensibility/advanced-metrics#computed-properties)) // used to group the underlying billable metric GroupingKeys param.Field[[]string] `json:"grouping_keys"` }
func (PriceEvaluateParams) MarshalJSON ¶ added in v0.25.0
func (r PriceEvaluateParams) MarshalJSON() (data []byte, err error)
type PriceEvaluateResponse ¶ added in v0.25.0
type PriceEvaluateResponse struct { Data []EvaluatePriceGroup `json:"data,required"` JSON priceEvaluateResponseJSON `json:"-"` }
func (*PriceEvaluateResponse) UnmarshalJSON ¶ added in v0.25.0
func (r *PriceEvaluateResponse) UnmarshalJSON(data []byte) (err error)
type PriceExternalPriceIDService ¶
type PriceExternalPriceIDService struct {
Options []option.RequestOption
}
PriceExternalPriceIDService contains methods and other services that help with interacting with the orb API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPriceExternalPriceIDService method instead.
func NewPriceExternalPriceIDService ¶
func NewPriceExternalPriceIDService(opts ...option.RequestOption) (r *PriceExternalPriceIDService)
NewPriceExternalPriceIDService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*PriceExternalPriceIDService) Fetch ¶
func (r *PriceExternalPriceIDService) Fetch(ctx context.Context, externalPriceID string, opts ...option.RequestOption) (res *Price, err error)
This endpoint returns a price given an external price id. See the [price creation API](../reference/create-price) for more information about external price aliases.
func (*PriceExternalPriceIDService) Update ¶ added in v0.42.0
func (r *PriceExternalPriceIDService) Update(ctx context.Context, externalPriceID string, body PriceExternalPriceIDUpdateParams, opts ...option.RequestOption) (res *Price, err error)
This endpoint allows you to update the `metadata` property on a price. If you pass null for the metadata value, it will clear any existing metadata for that price.
type PriceExternalPriceIDUpdateParams ¶ added in v0.42.0
type PriceExternalPriceIDUpdateParams struct { // 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 (PriceExternalPriceIDUpdateParams) MarshalJSON ¶ added in v0.42.0
func (r PriceExternalPriceIDUpdateParams) MarshalJSON() (data []byte, err error)
type PriceGroupedAllocationPrice ¶ added in v0.48.0
type PriceGroupedAllocationPrice struct { ID string `json:"id,required"` BillableMetric PriceGroupedAllocationPriceBillableMetric `json:"billable_metric,required,nullable"` BillingCycleConfiguration PriceGroupedAllocationPriceBillingCycleConfiguration `json:"billing_cycle_configuration,required"` Cadence PriceGroupedAllocationPriceCadence `json:"cadence,required"` ConversionRate float64 `json:"conversion_rate,required,nullable"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditAllocation PriceGroupedAllocationPriceCreditAllocation `json:"credit_allocation,required,nullable"` Currency string `json:"currency,required"` Discount shared.Discount `json:"discount,required,nullable"` ExternalPriceID string `json:"external_price_id,required,nullable"` FixedPriceQuantity float64 `json:"fixed_price_quantity,required,nullable"` GroupedAllocationConfig map[string]interface{} `json:"grouped_allocation_config,required"` InvoicingCycleConfiguration PriceGroupedAllocationPriceInvoicingCycleConfiguration `json:"invoicing_cycle_configuration,required,nullable"` Item PriceGroupedAllocationPriceItem `json:"item,required"` Maximum PriceGroupedAllocationPriceMaximum `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 PriceGroupedAllocationPriceMinimum `json:"minimum,required,nullable"` MinimumAmount string `json:"minimum_amount,required,nullable"` ModelType PriceGroupedAllocationPriceModelType `json:"model_type,required"` Name string `json:"name,required"` PlanPhaseOrder int64 `json:"plan_phase_order,required,nullable"` PriceType PriceGroupedAllocationPricePriceType `json:"price_type,required"` JSON priceGroupedAllocationPriceJSON `json:"-"` }
func (*PriceGroupedAllocationPrice) UnmarshalJSON ¶ added in v0.48.0
func (r *PriceGroupedAllocationPrice) UnmarshalJSON(data []byte) (err error)
type PriceGroupedAllocationPriceBillableMetric ¶ added in v0.48.0
type PriceGroupedAllocationPriceBillableMetric struct { ID string `json:"id,required"` JSON priceGroupedAllocationPriceBillableMetricJSON `json:"-"` }
func (*PriceGroupedAllocationPriceBillableMetric) UnmarshalJSON ¶ added in v0.48.0
func (r *PriceGroupedAllocationPriceBillableMetric) UnmarshalJSON(data []byte) (err error)
type PriceGroupedAllocationPriceBillingCycleConfiguration ¶ added in v0.48.0
type PriceGroupedAllocationPriceBillingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PriceGroupedAllocationPriceBillingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON priceGroupedAllocationPriceBillingCycleConfigurationJSON `json:"-"` }
func (*PriceGroupedAllocationPriceBillingCycleConfiguration) UnmarshalJSON ¶ added in v0.48.0
func (r *PriceGroupedAllocationPriceBillingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PriceGroupedAllocationPriceBillingCycleConfigurationDurationUnit ¶ added in v0.48.0
type PriceGroupedAllocationPriceBillingCycleConfigurationDurationUnit string
const ( PriceGroupedAllocationPriceBillingCycleConfigurationDurationUnitDay PriceGroupedAllocationPriceBillingCycleConfigurationDurationUnit = "day" PriceGroupedAllocationPriceBillingCycleConfigurationDurationUnitMonth PriceGroupedAllocationPriceBillingCycleConfigurationDurationUnit = "month" )
func (PriceGroupedAllocationPriceBillingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.48.0
func (r PriceGroupedAllocationPriceBillingCycleConfigurationDurationUnit) IsKnown() bool
type PriceGroupedAllocationPriceCadence ¶ added in v0.48.0
type PriceGroupedAllocationPriceCadence string
const ( PriceGroupedAllocationPriceCadenceOneTime PriceGroupedAllocationPriceCadence = "one_time" PriceGroupedAllocationPriceCadenceMonthly PriceGroupedAllocationPriceCadence = "monthly" PriceGroupedAllocationPriceCadenceQuarterly PriceGroupedAllocationPriceCadence = "quarterly" PriceGroupedAllocationPriceCadenceSemiAnnual PriceGroupedAllocationPriceCadence = "semi_annual" PriceGroupedAllocationPriceCadenceAnnual PriceGroupedAllocationPriceCadence = "annual" PriceGroupedAllocationPriceCadenceCustom PriceGroupedAllocationPriceCadence = "custom" )
func (PriceGroupedAllocationPriceCadence) IsKnown ¶ added in v0.48.0
func (r PriceGroupedAllocationPriceCadence) IsKnown() bool
type PriceGroupedAllocationPriceCreditAllocation ¶ added in v0.48.0
type PriceGroupedAllocationPriceCreditAllocation struct { AllowsRollover bool `json:"allows_rollover,required"` Currency string `json:"currency,required"` JSON priceGroupedAllocationPriceCreditAllocationJSON `json:"-"` }
func (*PriceGroupedAllocationPriceCreditAllocation) UnmarshalJSON ¶ added in v0.48.0
func (r *PriceGroupedAllocationPriceCreditAllocation) UnmarshalJSON(data []byte) (err error)
type PriceGroupedAllocationPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PriceGroupedAllocationPriceInvoicingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PriceGroupedAllocationPriceInvoicingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON priceGroupedAllocationPriceInvoicingCycleConfigurationJSON `json:"-"` }
func (*PriceGroupedAllocationPriceInvoicingCycleConfiguration) UnmarshalJSON ¶ added in v0.56.0
func (r *PriceGroupedAllocationPriceInvoicingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PriceGroupedAllocationPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceGroupedAllocationPriceInvoicingCycleConfigurationDurationUnit string
const ( PriceGroupedAllocationPriceInvoicingCycleConfigurationDurationUnitDay PriceGroupedAllocationPriceInvoicingCycleConfigurationDurationUnit = "day" PriceGroupedAllocationPriceInvoicingCycleConfigurationDurationUnitMonth PriceGroupedAllocationPriceInvoicingCycleConfigurationDurationUnit = "month" )
func (PriceGroupedAllocationPriceInvoicingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PriceGroupedAllocationPriceInvoicingCycleConfigurationDurationUnit) IsKnown() bool
type PriceGroupedAllocationPriceItem ¶ added in v0.48.0
type PriceGroupedAllocationPriceItem struct { ID string `json:"id,required"` Name string `json:"name,required"` JSON priceGroupedAllocationPriceItemJSON `json:"-"` }
func (*PriceGroupedAllocationPriceItem) UnmarshalJSON ¶ added in v0.48.0
func (r *PriceGroupedAllocationPriceItem) UnmarshalJSON(data []byte) (err error)
type PriceGroupedAllocationPriceMaximum ¶ added in v0.48.0
type PriceGroupedAllocationPriceMaximum 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 priceGroupedAllocationPriceMaximumJSON `json:"-"` }
func (*PriceGroupedAllocationPriceMaximum) UnmarshalJSON ¶ added in v0.48.0
func (r *PriceGroupedAllocationPriceMaximum) UnmarshalJSON(data []byte) (err error)
type PriceGroupedAllocationPriceMinimum ¶ added in v0.48.0
type PriceGroupedAllocationPriceMinimum 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 priceGroupedAllocationPriceMinimumJSON `json:"-"` }
func (*PriceGroupedAllocationPriceMinimum) UnmarshalJSON ¶ added in v0.48.0
func (r *PriceGroupedAllocationPriceMinimum) UnmarshalJSON(data []byte) (err error)
type PriceGroupedAllocationPriceModelType ¶ added in v0.48.0
type PriceGroupedAllocationPriceModelType string
const (
PriceGroupedAllocationPriceModelTypeGroupedAllocation PriceGroupedAllocationPriceModelType = "grouped_allocation"
)
func (PriceGroupedAllocationPriceModelType) IsKnown ¶ added in v0.48.0
func (r PriceGroupedAllocationPriceModelType) IsKnown() bool
type PriceGroupedAllocationPricePriceType ¶ added in v0.48.0
type PriceGroupedAllocationPricePriceType string
const ( PriceGroupedAllocationPricePriceTypeUsagePrice PriceGroupedAllocationPricePriceType = "usage_price" PriceGroupedAllocationPricePriceTypeFixedPrice PriceGroupedAllocationPricePriceType = "fixed_price" )
func (PriceGroupedAllocationPricePriceType) IsKnown ¶ added in v0.48.0
func (r PriceGroupedAllocationPricePriceType) IsKnown() bool
type PriceGroupedTieredPrice ¶ added in v0.25.0
type PriceGroupedTieredPrice struct { ID string `json:"id,required"` BillableMetric PriceGroupedTieredPriceBillableMetric `json:"billable_metric,required,nullable"` BillingCycleConfiguration PriceGroupedTieredPriceBillingCycleConfiguration `json:"billing_cycle_configuration,required"` Cadence PriceGroupedTieredPriceCadence `json:"cadence,required"` ConversionRate float64 `json:"conversion_rate,required,nullable"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditAllocation PriceGroupedTieredPriceCreditAllocation `json:"credit_allocation,required,nullable"` Currency string `json:"currency,required"` Discount shared.Discount `json:"discount,required,nullable"` ExternalPriceID string `json:"external_price_id,required,nullable"` FixedPriceQuantity float64 `json:"fixed_price_quantity,required,nullable"` GroupedTieredConfig map[string]interface{} `json:"grouped_tiered_config,required"` InvoicingCycleConfiguration PriceGroupedTieredPriceInvoicingCycleConfiguration `json:"invoicing_cycle_configuration,required,nullable"` Item PriceGroupedTieredPriceItem `json:"item,required"` Maximum PriceGroupedTieredPriceMaximum `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 PriceGroupedTieredPriceMinimum `json:"minimum,required,nullable"` MinimumAmount string `json:"minimum_amount,required,nullable"` ModelType PriceGroupedTieredPriceModelType `json:"model_type,required"` Name string `json:"name,required"` PlanPhaseOrder int64 `json:"plan_phase_order,required,nullable"` PriceType PriceGroupedTieredPricePriceType `json:"price_type,required"` JSON priceGroupedTieredPriceJSON `json:"-"` }
func (*PriceGroupedTieredPrice) UnmarshalJSON ¶ added in v0.25.0
func (r *PriceGroupedTieredPrice) UnmarshalJSON(data []byte) (err error)
type PriceGroupedTieredPriceBillableMetric ¶ added in v0.25.0
type PriceGroupedTieredPriceBillableMetric struct { ID string `json:"id,required"` JSON priceGroupedTieredPriceBillableMetricJSON `json:"-"` }
func (*PriceGroupedTieredPriceBillableMetric) UnmarshalJSON ¶ added in v0.25.0
func (r *PriceGroupedTieredPriceBillableMetric) UnmarshalJSON(data []byte) (err error)
type PriceGroupedTieredPriceBillingCycleConfiguration ¶ added in v0.44.0
type PriceGroupedTieredPriceBillingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PriceGroupedTieredPriceBillingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON priceGroupedTieredPriceBillingCycleConfigurationJSON `json:"-"` }
func (*PriceGroupedTieredPriceBillingCycleConfiguration) UnmarshalJSON ¶ added in v0.44.0
func (r *PriceGroupedTieredPriceBillingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PriceGroupedTieredPriceBillingCycleConfigurationDurationUnit ¶ added in v0.44.0
type PriceGroupedTieredPriceBillingCycleConfigurationDurationUnit string
const ( PriceGroupedTieredPriceBillingCycleConfigurationDurationUnitDay PriceGroupedTieredPriceBillingCycleConfigurationDurationUnit = "day" PriceGroupedTieredPriceBillingCycleConfigurationDurationUnitMonth PriceGroupedTieredPriceBillingCycleConfigurationDurationUnit = "month" )
func (PriceGroupedTieredPriceBillingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.44.0
func (r PriceGroupedTieredPriceBillingCycleConfigurationDurationUnit) IsKnown() bool
type PriceGroupedTieredPriceCadence ¶ added in v0.25.0
type PriceGroupedTieredPriceCadence string
const ( PriceGroupedTieredPriceCadenceOneTime PriceGroupedTieredPriceCadence = "one_time" PriceGroupedTieredPriceCadenceMonthly PriceGroupedTieredPriceCadence = "monthly" PriceGroupedTieredPriceCadenceQuarterly PriceGroupedTieredPriceCadence = "quarterly" PriceGroupedTieredPriceCadenceSemiAnnual PriceGroupedTieredPriceCadence = "semi_annual" PriceGroupedTieredPriceCadenceAnnual PriceGroupedTieredPriceCadence = "annual" PriceGroupedTieredPriceCadenceCustom PriceGroupedTieredPriceCadence = "custom" )
func (PriceGroupedTieredPriceCadence) IsKnown ¶ added in v0.25.0
func (r PriceGroupedTieredPriceCadence) IsKnown() bool
type PriceGroupedTieredPriceCreditAllocation ¶ added in v0.25.0
type PriceGroupedTieredPriceCreditAllocation struct { AllowsRollover bool `json:"allows_rollover,required"` Currency string `json:"currency,required"` JSON priceGroupedTieredPriceCreditAllocationJSON `json:"-"` }
func (*PriceGroupedTieredPriceCreditAllocation) UnmarshalJSON ¶ added in v0.25.0
func (r *PriceGroupedTieredPriceCreditAllocation) UnmarshalJSON(data []byte) (err error)
type PriceGroupedTieredPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PriceGroupedTieredPriceInvoicingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PriceGroupedTieredPriceInvoicingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON priceGroupedTieredPriceInvoicingCycleConfigurationJSON `json:"-"` }
func (*PriceGroupedTieredPriceInvoicingCycleConfiguration) UnmarshalJSON ¶ added in v0.56.0
func (r *PriceGroupedTieredPriceInvoicingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PriceGroupedTieredPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceGroupedTieredPriceInvoicingCycleConfigurationDurationUnit string
const ( PriceGroupedTieredPriceInvoicingCycleConfigurationDurationUnitDay PriceGroupedTieredPriceInvoicingCycleConfigurationDurationUnit = "day" PriceGroupedTieredPriceInvoicingCycleConfigurationDurationUnitMonth PriceGroupedTieredPriceInvoicingCycleConfigurationDurationUnit = "month" )
func (PriceGroupedTieredPriceInvoicingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PriceGroupedTieredPriceInvoicingCycleConfigurationDurationUnit) IsKnown() bool
type PriceGroupedTieredPriceItem ¶ added in v0.25.0
type PriceGroupedTieredPriceItem struct { ID string `json:"id,required"` Name string `json:"name,required"` JSON priceGroupedTieredPriceItemJSON `json:"-"` }
func (*PriceGroupedTieredPriceItem) UnmarshalJSON ¶ added in v0.25.0
func (r *PriceGroupedTieredPriceItem) UnmarshalJSON(data []byte) (err error)
type PriceGroupedTieredPriceMaximum ¶ added in v0.25.0
type PriceGroupedTieredPriceMaximum 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 priceGroupedTieredPriceMaximumJSON `json:"-"` }
func (*PriceGroupedTieredPriceMaximum) UnmarshalJSON ¶ added in v0.25.0
func (r *PriceGroupedTieredPriceMaximum) UnmarshalJSON(data []byte) (err error)
type PriceGroupedTieredPriceMinimum ¶ added in v0.25.0
type PriceGroupedTieredPriceMinimum 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 priceGroupedTieredPriceMinimumJSON `json:"-"` }
func (*PriceGroupedTieredPriceMinimum) UnmarshalJSON ¶ added in v0.25.0
func (r *PriceGroupedTieredPriceMinimum) UnmarshalJSON(data []byte) (err error)
type PriceGroupedTieredPriceModelType ¶ added in v0.25.0
type PriceGroupedTieredPriceModelType string
const (
PriceGroupedTieredPriceModelTypeGroupedTiered PriceGroupedTieredPriceModelType = "grouped_tiered"
)
func (PriceGroupedTieredPriceModelType) IsKnown ¶ added in v0.25.0
func (r PriceGroupedTieredPriceModelType) IsKnown() bool
type PriceGroupedTieredPricePriceType ¶ added in v0.25.0
type PriceGroupedTieredPricePriceType string
const ( PriceGroupedTieredPricePriceTypeUsagePrice PriceGroupedTieredPricePriceType = "usage_price" PriceGroupedTieredPricePriceTypeFixedPrice PriceGroupedTieredPricePriceType = "fixed_price" )
func (PriceGroupedTieredPricePriceType) IsKnown ¶ added in v0.25.0
func (r PriceGroupedTieredPricePriceType) IsKnown() bool
type PriceGroupedWithProratedMinimumPrice ¶ added in v0.58.0
type PriceGroupedWithProratedMinimumPrice struct { ID string `json:"id,required"` BillableMetric PriceGroupedWithProratedMinimumPriceBillableMetric `json:"billable_metric,required,nullable"` BillingCycleConfiguration PriceGroupedWithProratedMinimumPriceBillingCycleConfiguration `json:"billing_cycle_configuration,required"` Cadence PriceGroupedWithProratedMinimumPriceCadence `json:"cadence,required"` ConversionRate float64 `json:"conversion_rate,required,nullable"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditAllocation PriceGroupedWithProratedMinimumPriceCreditAllocation `json:"credit_allocation,required,nullable"` Currency string `json:"currency,required"` Discount shared.Discount `json:"discount,required,nullable"` ExternalPriceID string `json:"external_price_id,required,nullable"` FixedPriceQuantity float64 `json:"fixed_price_quantity,required,nullable"` GroupedWithProratedMinimumConfig map[string]interface{} `json:"grouped_with_prorated_minimum_config,required"` InvoicingCycleConfiguration PriceGroupedWithProratedMinimumPriceInvoicingCycleConfiguration `json:"invoicing_cycle_configuration,required,nullable"` Item PriceGroupedWithProratedMinimumPriceItem `json:"item,required"` Maximum PriceGroupedWithProratedMinimumPriceMaximum `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 PriceGroupedWithProratedMinimumPriceMinimum `json:"minimum,required,nullable"` MinimumAmount string `json:"minimum_amount,required,nullable"` ModelType PriceGroupedWithProratedMinimumPriceModelType `json:"model_type,required"` Name string `json:"name,required"` PlanPhaseOrder int64 `json:"plan_phase_order,required,nullable"` PriceType PriceGroupedWithProratedMinimumPricePriceType `json:"price_type,required"` JSON priceGroupedWithProratedMinimumPriceJSON `json:"-"` }
func (*PriceGroupedWithProratedMinimumPrice) UnmarshalJSON ¶ added in v0.58.0
func (r *PriceGroupedWithProratedMinimumPrice) UnmarshalJSON(data []byte) (err error)
type PriceGroupedWithProratedMinimumPriceBillableMetric ¶ added in v0.58.0
type PriceGroupedWithProratedMinimumPriceBillableMetric struct { ID string `json:"id,required"` JSON priceGroupedWithProratedMinimumPriceBillableMetricJSON `json:"-"` }
func (*PriceGroupedWithProratedMinimumPriceBillableMetric) UnmarshalJSON ¶ added in v0.58.0
func (r *PriceGroupedWithProratedMinimumPriceBillableMetric) UnmarshalJSON(data []byte) (err error)
type PriceGroupedWithProratedMinimumPriceBillingCycleConfiguration ¶ added in v0.58.0
type PriceGroupedWithProratedMinimumPriceBillingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PriceGroupedWithProratedMinimumPriceBillingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON priceGroupedWithProratedMinimumPriceBillingCycleConfigurationJSON `json:"-"` }
func (*PriceGroupedWithProratedMinimumPriceBillingCycleConfiguration) UnmarshalJSON ¶ added in v0.58.0
func (r *PriceGroupedWithProratedMinimumPriceBillingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PriceGroupedWithProratedMinimumPriceBillingCycleConfigurationDurationUnit ¶ added in v0.58.0
type PriceGroupedWithProratedMinimumPriceBillingCycleConfigurationDurationUnit string
const ( PriceGroupedWithProratedMinimumPriceBillingCycleConfigurationDurationUnitDay PriceGroupedWithProratedMinimumPriceBillingCycleConfigurationDurationUnit = "day" PriceGroupedWithProratedMinimumPriceBillingCycleConfigurationDurationUnitMonth PriceGroupedWithProratedMinimumPriceBillingCycleConfigurationDurationUnit = "month" )
func (PriceGroupedWithProratedMinimumPriceBillingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.58.0
func (r PriceGroupedWithProratedMinimumPriceBillingCycleConfigurationDurationUnit) IsKnown() bool
type PriceGroupedWithProratedMinimumPriceCadence ¶ added in v0.58.0
type PriceGroupedWithProratedMinimumPriceCadence string
const ( PriceGroupedWithProratedMinimumPriceCadenceOneTime PriceGroupedWithProratedMinimumPriceCadence = "one_time" PriceGroupedWithProratedMinimumPriceCadenceMonthly PriceGroupedWithProratedMinimumPriceCadence = "monthly" PriceGroupedWithProratedMinimumPriceCadenceQuarterly PriceGroupedWithProratedMinimumPriceCadence = "quarterly" PriceGroupedWithProratedMinimumPriceCadenceSemiAnnual PriceGroupedWithProratedMinimumPriceCadence = "semi_annual" PriceGroupedWithProratedMinimumPriceCadenceAnnual PriceGroupedWithProratedMinimumPriceCadence = "annual" PriceGroupedWithProratedMinimumPriceCadenceCustom PriceGroupedWithProratedMinimumPriceCadence = "custom" )
func (PriceGroupedWithProratedMinimumPriceCadence) IsKnown ¶ added in v0.58.0
func (r PriceGroupedWithProratedMinimumPriceCadence) IsKnown() bool
type PriceGroupedWithProratedMinimumPriceCreditAllocation ¶ added in v0.58.0
type PriceGroupedWithProratedMinimumPriceCreditAllocation struct { AllowsRollover bool `json:"allows_rollover,required"` Currency string `json:"currency,required"` JSON priceGroupedWithProratedMinimumPriceCreditAllocationJSON `json:"-"` }
func (*PriceGroupedWithProratedMinimumPriceCreditAllocation) UnmarshalJSON ¶ added in v0.58.0
func (r *PriceGroupedWithProratedMinimumPriceCreditAllocation) UnmarshalJSON(data []byte) (err error)
type PriceGroupedWithProratedMinimumPriceInvoicingCycleConfiguration ¶ added in v0.58.0
type PriceGroupedWithProratedMinimumPriceInvoicingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PriceGroupedWithProratedMinimumPriceInvoicingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON priceGroupedWithProratedMinimumPriceInvoicingCycleConfigurationJSON `json:"-"` }
func (*PriceGroupedWithProratedMinimumPriceInvoicingCycleConfiguration) UnmarshalJSON ¶ added in v0.58.0
func (r *PriceGroupedWithProratedMinimumPriceInvoicingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PriceGroupedWithProratedMinimumPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.58.0
type PriceGroupedWithProratedMinimumPriceInvoicingCycleConfigurationDurationUnit string
const ( PriceGroupedWithProratedMinimumPriceInvoicingCycleConfigurationDurationUnitDay PriceGroupedWithProratedMinimumPriceInvoicingCycleConfigurationDurationUnit = "day" PriceGroupedWithProratedMinimumPriceInvoicingCycleConfigurationDurationUnitMonth PriceGroupedWithProratedMinimumPriceInvoicingCycleConfigurationDurationUnit = "month" )
func (PriceGroupedWithProratedMinimumPriceInvoicingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.58.0
func (r PriceGroupedWithProratedMinimumPriceInvoicingCycleConfigurationDurationUnit) IsKnown() bool
type PriceGroupedWithProratedMinimumPriceItem ¶ added in v0.58.0
type PriceGroupedWithProratedMinimumPriceItem struct { ID string `json:"id,required"` Name string `json:"name,required"` JSON priceGroupedWithProratedMinimumPriceItemJSON `json:"-"` }
func (*PriceGroupedWithProratedMinimumPriceItem) UnmarshalJSON ¶ added in v0.58.0
func (r *PriceGroupedWithProratedMinimumPriceItem) UnmarshalJSON(data []byte) (err error)
type PriceGroupedWithProratedMinimumPriceMaximum ¶ added in v0.58.0
type PriceGroupedWithProratedMinimumPriceMaximum 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 priceGroupedWithProratedMinimumPriceMaximumJSON `json:"-"` }
func (*PriceGroupedWithProratedMinimumPriceMaximum) UnmarshalJSON ¶ added in v0.58.0
func (r *PriceGroupedWithProratedMinimumPriceMaximum) UnmarshalJSON(data []byte) (err error)
type PriceGroupedWithProratedMinimumPriceMinimum ¶ added in v0.58.0
type PriceGroupedWithProratedMinimumPriceMinimum 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 priceGroupedWithProratedMinimumPriceMinimumJSON `json:"-"` }
func (*PriceGroupedWithProratedMinimumPriceMinimum) UnmarshalJSON ¶ added in v0.58.0
func (r *PriceGroupedWithProratedMinimumPriceMinimum) UnmarshalJSON(data []byte) (err error)
type PriceGroupedWithProratedMinimumPriceModelType ¶ added in v0.58.0
type PriceGroupedWithProratedMinimumPriceModelType string
const (
PriceGroupedWithProratedMinimumPriceModelTypeGroupedWithProratedMinimum PriceGroupedWithProratedMinimumPriceModelType = "grouped_with_prorated_minimum"
)
func (PriceGroupedWithProratedMinimumPriceModelType) IsKnown ¶ added in v0.58.0
func (r PriceGroupedWithProratedMinimumPriceModelType) IsKnown() bool
type PriceGroupedWithProratedMinimumPricePriceType ¶ added in v0.58.0
type PriceGroupedWithProratedMinimumPricePriceType string
const ( PriceGroupedWithProratedMinimumPricePriceTypeUsagePrice PriceGroupedWithProratedMinimumPricePriceType = "usage_price" PriceGroupedWithProratedMinimumPricePriceTypeFixedPrice PriceGroupedWithProratedMinimumPricePriceType = "fixed_price" )
func (PriceGroupedWithProratedMinimumPricePriceType) IsKnown ¶ added in v0.58.0
func (r PriceGroupedWithProratedMinimumPricePriceType) IsKnown() bool
type PriceListParams ¶
type PriceListParams struct { // Cursor for pagination. This can be populated by the `next_cursor` value returned // from the initial request. Cursor param.Field[string] `query:"cursor"` // The number of items to fetch. Defaults to 20. Limit param.Field[int64] `query:"limit"` }
func (PriceListParams) URLQuery ¶
func (r PriceListParams) URLQuery() (v url.Values)
URLQuery serializes PriceListParams's query parameters as `url.Values`.
type PriceMatrixPrice ¶
type PriceMatrixPrice struct { ID string `json:"id,required"` BillableMetric PriceMatrixPriceBillableMetric `json:"billable_metric,required,nullable"` BillingCycleConfiguration PriceMatrixPriceBillingCycleConfiguration `json:"billing_cycle_configuration,required"` Cadence PriceMatrixPriceCadence `json:"cadence,required"` ConversionRate float64 `json:"conversion_rate,required,nullable"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditAllocation PriceMatrixPriceCreditAllocation `json:"credit_allocation,required,nullable"` Currency string `json:"currency,required"` Discount shared.Discount `json:"discount,required,nullable"` ExternalPriceID string `json:"external_price_id,required,nullable"` FixedPriceQuantity float64 `json:"fixed_price_quantity,required,nullable"` InvoicingCycleConfiguration PriceMatrixPriceInvoicingCycleConfiguration `json:"invoicing_cycle_configuration,required,nullable"` Item PriceMatrixPriceItem `json:"item,required"` MatrixConfig PriceMatrixPriceMatrixConfig `json:"matrix_config,required"` Maximum PriceMatrixPriceMaximum `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 PriceMatrixPriceMinimum `json:"minimum,required,nullable"` MinimumAmount string `json:"minimum_amount,required,nullable"` ModelType PriceMatrixPriceModelType `json:"model_type,required"` Name string `json:"name,required"` PlanPhaseOrder int64 `json:"plan_phase_order,required,nullable"` PriceType PriceMatrixPricePriceType `json:"price_type,required"` JSON priceMatrixPriceJSON `json:"-"` }
func (*PriceMatrixPrice) UnmarshalJSON ¶
func (r *PriceMatrixPrice) UnmarshalJSON(data []byte) (err error)
type PriceMatrixPriceBillableMetric ¶
type PriceMatrixPriceBillableMetric struct { ID string `json:"id,required"` JSON priceMatrixPriceBillableMetricJSON `json:"-"` }
func (*PriceMatrixPriceBillableMetric) UnmarshalJSON ¶
func (r *PriceMatrixPriceBillableMetric) UnmarshalJSON(data []byte) (err error)
type PriceMatrixPriceBillingCycleConfiguration ¶ added in v0.44.0
type PriceMatrixPriceBillingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PriceMatrixPriceBillingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON priceMatrixPriceBillingCycleConfigurationJSON `json:"-"` }
func (*PriceMatrixPriceBillingCycleConfiguration) UnmarshalJSON ¶ added in v0.44.0
func (r *PriceMatrixPriceBillingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PriceMatrixPriceBillingCycleConfigurationDurationUnit ¶ added in v0.44.0
type PriceMatrixPriceBillingCycleConfigurationDurationUnit string
const ( PriceMatrixPriceBillingCycleConfigurationDurationUnitDay PriceMatrixPriceBillingCycleConfigurationDurationUnit = "day" PriceMatrixPriceBillingCycleConfigurationDurationUnitMonth PriceMatrixPriceBillingCycleConfigurationDurationUnit = "month" )
func (PriceMatrixPriceBillingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.44.0
func (r PriceMatrixPriceBillingCycleConfigurationDurationUnit) IsKnown() bool
type PriceMatrixPriceCadence ¶
type PriceMatrixPriceCadence string
const ( PriceMatrixPriceCadenceOneTime PriceMatrixPriceCadence = "one_time" PriceMatrixPriceCadenceMonthly PriceMatrixPriceCadence = "monthly" PriceMatrixPriceCadenceQuarterly PriceMatrixPriceCadence = "quarterly" PriceMatrixPriceCadenceSemiAnnual PriceMatrixPriceCadence = "semi_annual" PriceMatrixPriceCadenceAnnual PriceMatrixPriceCadence = "annual" PriceMatrixPriceCadenceCustom PriceMatrixPriceCadence = "custom" )
func (PriceMatrixPriceCadence) IsKnown ¶ added in v0.24.0
func (r PriceMatrixPriceCadence) IsKnown() bool
type PriceMatrixPriceCreditAllocation ¶ added in v0.25.0
type PriceMatrixPriceCreditAllocation struct { AllowsRollover bool `json:"allows_rollover,required"` Currency string `json:"currency,required"` JSON priceMatrixPriceCreditAllocationJSON `json:"-"` }
func (*PriceMatrixPriceCreditAllocation) UnmarshalJSON ¶ added in v0.25.0
func (r *PriceMatrixPriceCreditAllocation) UnmarshalJSON(data []byte) (err error)
type PriceMatrixPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PriceMatrixPriceInvoicingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PriceMatrixPriceInvoicingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON priceMatrixPriceInvoicingCycleConfigurationJSON `json:"-"` }
func (*PriceMatrixPriceInvoicingCycleConfiguration) UnmarshalJSON ¶ added in v0.56.0
func (r *PriceMatrixPriceInvoicingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PriceMatrixPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceMatrixPriceInvoicingCycleConfigurationDurationUnit string
const ( PriceMatrixPriceInvoicingCycleConfigurationDurationUnitDay PriceMatrixPriceInvoicingCycleConfigurationDurationUnit = "day" PriceMatrixPriceInvoicingCycleConfigurationDurationUnitMonth PriceMatrixPriceInvoicingCycleConfigurationDurationUnit = "month" )
func (PriceMatrixPriceInvoicingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PriceMatrixPriceInvoicingCycleConfigurationDurationUnit) IsKnown() bool
type PriceMatrixPriceItem ¶
type PriceMatrixPriceItem struct { ID string `json:"id,required"` Name string `json:"name,required"` JSON priceMatrixPriceItemJSON `json:"-"` }
func (*PriceMatrixPriceItem) UnmarshalJSON ¶
func (r *PriceMatrixPriceItem) UnmarshalJSON(data []byte) (err error)
type PriceMatrixPriceMatrixConfig ¶
type PriceMatrixPriceMatrixConfig 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 []PriceMatrixPriceMatrixConfigMatrixValue `json:"matrix_values,required"` JSON priceMatrixPriceMatrixConfigJSON `json:"-"` }
func (*PriceMatrixPriceMatrixConfig) UnmarshalJSON ¶
func (r *PriceMatrixPriceMatrixConfig) UnmarshalJSON(data []byte) (err error)
type PriceMatrixPriceMatrixConfigMatrixValue ¶
type PriceMatrixPriceMatrixConfigMatrixValue 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 priceMatrixPriceMatrixConfigMatrixValueJSON `json:"-"` }
func (*PriceMatrixPriceMatrixConfigMatrixValue) UnmarshalJSON ¶
func (r *PriceMatrixPriceMatrixConfigMatrixValue) UnmarshalJSON(data []byte) (err error)
type PriceMatrixPriceMaximum ¶
type PriceMatrixPriceMaximum 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 priceMatrixPriceMaximumJSON `json:"-"` }
func (*PriceMatrixPriceMaximum) UnmarshalJSON ¶
func (r *PriceMatrixPriceMaximum) UnmarshalJSON(data []byte) (err error)
type PriceMatrixPriceMinimum ¶
type PriceMatrixPriceMinimum 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 priceMatrixPriceMinimumJSON `json:"-"` }
func (*PriceMatrixPriceMinimum) UnmarshalJSON ¶
func (r *PriceMatrixPriceMinimum) UnmarshalJSON(data []byte) (err error)
type PriceMatrixPriceModelType ¶
type PriceMatrixPriceModelType string
const (
PriceMatrixPriceModelTypeMatrix PriceMatrixPriceModelType = "matrix"
)
func (PriceMatrixPriceModelType) IsKnown ¶ added in v0.24.0
func (r PriceMatrixPriceModelType) IsKnown() bool
type PriceMatrixPricePriceType ¶
type PriceMatrixPricePriceType string
const ( PriceMatrixPricePriceTypeUsagePrice PriceMatrixPricePriceType = "usage_price" PriceMatrixPricePriceTypeFixedPrice PriceMatrixPricePriceType = "fixed_price" )
func (PriceMatrixPricePriceType) IsKnown ¶ added in v0.24.0
func (r PriceMatrixPricePriceType) IsKnown() bool
type PriceMatrixWithAllocationPrice ¶ added in v0.22.0
type PriceMatrixWithAllocationPrice struct { ID string `json:"id,required"` BillableMetric PriceMatrixWithAllocationPriceBillableMetric `json:"billable_metric,required,nullable"` BillingCycleConfiguration PriceMatrixWithAllocationPriceBillingCycleConfiguration `json:"billing_cycle_configuration,required"` Cadence PriceMatrixWithAllocationPriceCadence `json:"cadence,required"` ConversionRate float64 `json:"conversion_rate,required,nullable"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditAllocation PriceMatrixWithAllocationPriceCreditAllocation `json:"credit_allocation,required,nullable"` Currency string `json:"currency,required"` Discount shared.Discount `json:"discount,required,nullable"` ExternalPriceID string `json:"external_price_id,required,nullable"` FixedPriceQuantity float64 `json:"fixed_price_quantity,required,nullable"` InvoicingCycleConfiguration PriceMatrixWithAllocationPriceInvoicingCycleConfiguration `json:"invoicing_cycle_configuration,required,nullable"` Item PriceMatrixWithAllocationPriceItem `json:"item,required"` MatrixWithAllocationConfig PriceMatrixWithAllocationPriceMatrixWithAllocationConfig `json:"matrix_with_allocation_config,required"` Maximum PriceMatrixWithAllocationPriceMaximum `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 PriceMatrixWithAllocationPriceMinimum `json:"minimum,required,nullable"` MinimumAmount string `json:"minimum_amount,required,nullable"` ModelType PriceMatrixWithAllocationPriceModelType `json:"model_type,required"` Name string `json:"name,required"` PlanPhaseOrder int64 `json:"plan_phase_order,required,nullable"` PriceType PriceMatrixWithAllocationPricePriceType `json:"price_type,required"` JSON priceMatrixWithAllocationPriceJSON `json:"-"` }
func (*PriceMatrixWithAllocationPrice) UnmarshalJSON ¶ added in v0.22.0
func (r *PriceMatrixWithAllocationPrice) UnmarshalJSON(data []byte) (err error)
type PriceMatrixWithAllocationPriceBillableMetric ¶ added in v0.22.0
type PriceMatrixWithAllocationPriceBillableMetric struct { ID string `json:"id,required"` JSON priceMatrixWithAllocationPriceBillableMetricJSON `json:"-"` }
func (*PriceMatrixWithAllocationPriceBillableMetric) UnmarshalJSON ¶ added in v0.22.0
func (r *PriceMatrixWithAllocationPriceBillableMetric) UnmarshalJSON(data []byte) (err error)
type PriceMatrixWithAllocationPriceBillingCycleConfiguration ¶ added in v0.44.0
type PriceMatrixWithAllocationPriceBillingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PriceMatrixWithAllocationPriceBillingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON priceMatrixWithAllocationPriceBillingCycleConfigurationJSON `json:"-"` }
func (*PriceMatrixWithAllocationPriceBillingCycleConfiguration) UnmarshalJSON ¶ added in v0.44.0
func (r *PriceMatrixWithAllocationPriceBillingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PriceMatrixWithAllocationPriceBillingCycleConfigurationDurationUnit ¶ added in v0.44.0
type PriceMatrixWithAllocationPriceBillingCycleConfigurationDurationUnit string
const ( PriceMatrixWithAllocationPriceBillingCycleConfigurationDurationUnitDay PriceMatrixWithAllocationPriceBillingCycleConfigurationDurationUnit = "day" PriceMatrixWithAllocationPriceBillingCycleConfigurationDurationUnitMonth PriceMatrixWithAllocationPriceBillingCycleConfigurationDurationUnit = "month" )
func (PriceMatrixWithAllocationPriceBillingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.44.0
func (r PriceMatrixWithAllocationPriceBillingCycleConfigurationDurationUnit) IsKnown() bool
type PriceMatrixWithAllocationPriceCadence ¶ added in v0.22.0
type PriceMatrixWithAllocationPriceCadence string
const ( PriceMatrixWithAllocationPriceCadenceOneTime PriceMatrixWithAllocationPriceCadence = "one_time" PriceMatrixWithAllocationPriceCadenceMonthly PriceMatrixWithAllocationPriceCadence = "monthly" PriceMatrixWithAllocationPriceCadenceQuarterly PriceMatrixWithAllocationPriceCadence = "quarterly" PriceMatrixWithAllocationPriceCadenceSemiAnnual PriceMatrixWithAllocationPriceCadence = "semi_annual" PriceMatrixWithAllocationPriceCadenceAnnual PriceMatrixWithAllocationPriceCadence = "annual" PriceMatrixWithAllocationPriceCadenceCustom PriceMatrixWithAllocationPriceCadence = "custom" )
func (PriceMatrixWithAllocationPriceCadence) IsKnown ¶ added in v0.24.0
func (r PriceMatrixWithAllocationPriceCadence) IsKnown() bool
type PriceMatrixWithAllocationPriceCreditAllocation ¶ added in v0.25.0
type PriceMatrixWithAllocationPriceCreditAllocation struct { AllowsRollover bool `json:"allows_rollover,required"` Currency string `json:"currency,required"` JSON priceMatrixWithAllocationPriceCreditAllocationJSON `json:"-"` }
func (*PriceMatrixWithAllocationPriceCreditAllocation) UnmarshalJSON ¶ added in v0.25.0
func (r *PriceMatrixWithAllocationPriceCreditAllocation) UnmarshalJSON(data []byte) (err error)
type PriceMatrixWithAllocationPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PriceMatrixWithAllocationPriceInvoicingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PriceMatrixWithAllocationPriceInvoicingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON priceMatrixWithAllocationPriceInvoicingCycleConfigurationJSON `json:"-"` }
func (*PriceMatrixWithAllocationPriceInvoicingCycleConfiguration) UnmarshalJSON ¶ added in v0.56.0
func (r *PriceMatrixWithAllocationPriceInvoicingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PriceMatrixWithAllocationPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceMatrixWithAllocationPriceInvoicingCycleConfigurationDurationUnit string
const ( PriceMatrixWithAllocationPriceInvoicingCycleConfigurationDurationUnitDay PriceMatrixWithAllocationPriceInvoicingCycleConfigurationDurationUnit = "day" PriceMatrixWithAllocationPriceInvoicingCycleConfigurationDurationUnitMonth PriceMatrixWithAllocationPriceInvoicingCycleConfigurationDurationUnit = "month" )
func (PriceMatrixWithAllocationPriceInvoicingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PriceMatrixWithAllocationPriceInvoicingCycleConfigurationDurationUnit) IsKnown() bool
type PriceMatrixWithAllocationPriceItem ¶ added in v0.22.0
type PriceMatrixWithAllocationPriceItem struct { ID string `json:"id,required"` Name string `json:"name,required"` JSON priceMatrixWithAllocationPriceItemJSON `json:"-"` }
func (*PriceMatrixWithAllocationPriceItem) UnmarshalJSON ¶ added in v0.22.0
func (r *PriceMatrixWithAllocationPriceItem) UnmarshalJSON(data []byte) (err error)
type PriceMatrixWithAllocationPriceMatrixWithAllocationConfig ¶ added in v0.22.0
type PriceMatrixWithAllocationPriceMatrixWithAllocationConfig 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 []PriceMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue `json:"matrix_values,required"` JSON priceMatrixWithAllocationPriceMatrixWithAllocationConfigJSON `json:"-"` }
func (*PriceMatrixWithAllocationPriceMatrixWithAllocationConfig) UnmarshalJSON ¶ added in v0.22.0
func (r *PriceMatrixWithAllocationPriceMatrixWithAllocationConfig) UnmarshalJSON(data []byte) (err error)
type PriceMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue ¶ added in v0.22.0
type PriceMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue 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 priceMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValueJSON `json:"-"` }
func (*PriceMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue) UnmarshalJSON ¶ added in v0.22.0
func (r *PriceMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue) UnmarshalJSON(data []byte) (err error)
type PriceMatrixWithAllocationPriceMaximum ¶ added in v0.22.0
type PriceMatrixWithAllocationPriceMaximum 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 priceMatrixWithAllocationPriceMaximumJSON `json:"-"` }
func (*PriceMatrixWithAllocationPriceMaximum) UnmarshalJSON ¶ added in v0.22.0
func (r *PriceMatrixWithAllocationPriceMaximum) UnmarshalJSON(data []byte) (err error)
type PriceMatrixWithAllocationPriceMinimum ¶ added in v0.22.0
type PriceMatrixWithAllocationPriceMinimum 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 priceMatrixWithAllocationPriceMinimumJSON `json:"-"` }
func (*PriceMatrixWithAllocationPriceMinimum) UnmarshalJSON ¶ added in v0.22.0
func (r *PriceMatrixWithAllocationPriceMinimum) UnmarshalJSON(data []byte) (err error)
type PriceMatrixWithAllocationPriceModelType ¶ added in v0.22.0
type PriceMatrixWithAllocationPriceModelType string
const (
PriceMatrixWithAllocationPriceModelTypeMatrixWithAllocation PriceMatrixWithAllocationPriceModelType = "matrix_with_allocation"
)
func (PriceMatrixWithAllocationPriceModelType) IsKnown ¶ added in v0.24.0
func (r PriceMatrixWithAllocationPriceModelType) IsKnown() bool
type PriceMatrixWithAllocationPricePriceType ¶ added in v0.22.0
type PriceMatrixWithAllocationPricePriceType string
const ( PriceMatrixWithAllocationPricePriceTypeUsagePrice PriceMatrixWithAllocationPricePriceType = "usage_price" PriceMatrixWithAllocationPricePriceTypeFixedPrice PriceMatrixWithAllocationPricePriceType = "fixed_price" )
func (PriceMatrixWithAllocationPricePriceType) IsKnown ¶ added in v0.24.0
func (r PriceMatrixWithAllocationPricePriceType) IsKnown() bool
type PriceModelType ¶ added in v0.25.0
type PriceModelType string
const ( PriceModelTypeUnit PriceModelType = "unit" PriceModelTypePackage PriceModelType = "package" PriceModelTypeMatrix PriceModelType = "matrix" PriceModelTypeTiered PriceModelType = "tiered" PriceModelTypeTieredBps PriceModelType = "tiered_bps" PriceModelTypeBps PriceModelType = "bps" PriceModelTypeBulkBps PriceModelType = "bulk_bps" PriceModelTypeBulk PriceModelType = "bulk" PriceModelTypeThresholdTotalAmount PriceModelType = "threshold_total_amount" PriceModelTypeTieredPackage PriceModelType = "tiered_package" PriceModelTypeGroupedTiered PriceModelType = "grouped_tiered" PriceModelTypeTieredWithMinimum PriceModelType = "tiered_with_minimum" PriceModelTypeTieredPackageWithMinimum PriceModelType = "tiered_package_with_minimum" PriceModelTypePackageWithAllocation PriceModelType = "package_with_allocation" PriceModelTypeUnitWithPercent PriceModelType = "unit_with_percent" PriceModelTypeMatrixWithAllocation PriceModelType = "matrix_with_allocation" PriceModelTypeTieredWithProration PriceModelType = "tiered_with_proration" PriceModelTypeUnitWithProration PriceModelType = "unit_with_proration" PriceModelTypeGroupedAllocation PriceModelType = "grouped_allocation" PriceModelTypeGroupedWithProratedMinimum PriceModelType = "grouped_with_prorated_minimum" PriceModelTypeBulkWithProration PriceModelType = "bulk_with_proration" )
func (PriceModelType) IsKnown ¶ added in v0.25.0
func (r PriceModelType) IsKnown() bool
type PriceNewParams ¶
type PriceNewParams interface {
ImplementsPriceNewParams()
}
This interface is a union satisfied by one of the following: PriceNewParamsNewFloatingUnitPrice, PriceNewParamsNewFloatingPackagePrice, PriceNewParamsNewFloatingMatrixPrice, PriceNewParamsNewFloatingMatrixWithAllocationPrice, PriceNewParamsNewFloatingTieredPrice, PriceNewParamsNewFloatingTieredBpsPrice, PriceNewParamsNewFloatingBpsPrice, PriceNewParamsNewFloatingBulkBpsPrice, PriceNewParamsNewFloatingBulkPrice, PriceNewParamsNewFloatingThresholdTotalAmountPrice, PriceNewParamsNewFloatingTieredPackagePrice, PriceNewParamsNewFloatingGroupedTieredPrice, PriceNewParamsNewFloatingTieredWithMinimumPrice, PriceNewParamsNewFloatingPackageWithAllocationPrice, PriceNewParamsNewFloatingTieredPackageWithMinimumPrice, PriceNewParamsNewFloatingUnitWithPercentPrice, PriceNewParamsNewFloatingTieredWithProrationPrice, PriceNewParamsNewFloatingUnitWithProrationPrice, PriceNewParamsNewFloatingGroupedAllocationPrice, PriceNewParamsNewFloatingGroupedWithProratedMinimumPrice, PriceNewParamsNewFloatingBulkWithProrationPrice.
type PriceNewParamsNewFloatingBpsPrice ¶ added in v0.2.0
type PriceNewParamsNewFloatingBpsPrice struct { BpsConfig param.Field[PriceNewParamsNewFloatingBpsPriceBpsConfig] `json:"bps_config,required"` // The cadence to bill for this price on. Cadence param.Field[PriceNewParamsNewFloatingBpsPriceCadence] `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 plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[PriceNewParamsNewFloatingBpsPriceModelType] `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[PriceNewParamsNewFloatingBpsPriceBillingCycleConfiguration] `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[PriceNewParamsNewFloatingBpsPriceInvoicingCycleConfiguration] `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 (PriceNewParamsNewFloatingBpsPrice) ImplementsPriceNewParams ¶ added in v0.2.0
func (PriceNewParamsNewFloatingBpsPrice) ImplementsPriceNewParams()
func (PriceNewParamsNewFloatingBpsPrice) MarshalJSON ¶ added in v0.2.0
func (r PriceNewParamsNewFloatingBpsPrice) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingBpsPriceBillingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingBpsPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingBpsPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PriceNewParamsNewFloatingBpsPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingBpsPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingBpsPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingBpsPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingBpsPriceBillingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingBpsPriceBillingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingBpsPriceBillingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingBpsPriceBillingCycleConfigurationDurationUnit = "month" )
func (PriceNewParamsNewFloatingBpsPriceBillingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingBpsPriceBillingCycleConfigurationDurationUnit) IsKnown() bool
type PriceNewParamsNewFloatingBpsPriceBpsConfig ¶ added in v0.2.0
type PriceNewParamsNewFloatingBpsPriceBpsConfig 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 (PriceNewParamsNewFloatingBpsPriceBpsConfig) MarshalJSON ¶ added in v0.2.0
func (r PriceNewParamsNewFloatingBpsPriceBpsConfig) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingBpsPriceCadence ¶ added in v0.2.0
type PriceNewParamsNewFloatingBpsPriceCadence string
The cadence to bill for this price on.
const ( PriceNewParamsNewFloatingBpsPriceCadenceAnnual PriceNewParamsNewFloatingBpsPriceCadence = "annual" PriceNewParamsNewFloatingBpsPriceCadenceSemiAnnual PriceNewParamsNewFloatingBpsPriceCadence = "semi_annual" PriceNewParamsNewFloatingBpsPriceCadenceMonthly PriceNewParamsNewFloatingBpsPriceCadence = "monthly" PriceNewParamsNewFloatingBpsPriceCadenceQuarterly PriceNewParamsNewFloatingBpsPriceCadence = "quarterly" PriceNewParamsNewFloatingBpsPriceCadenceOneTime PriceNewParamsNewFloatingBpsPriceCadence = "one_time" PriceNewParamsNewFloatingBpsPriceCadenceCustom PriceNewParamsNewFloatingBpsPriceCadence = "custom" )
func (PriceNewParamsNewFloatingBpsPriceCadence) IsKnown ¶ added in v0.24.0
func (r PriceNewParamsNewFloatingBpsPriceCadence) IsKnown() bool
type PriceNewParamsNewFloatingBpsPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingBpsPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingBpsPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PriceNewParamsNewFloatingBpsPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingBpsPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingBpsPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingBpsPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingBpsPriceInvoicingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingBpsPriceInvoicingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingBpsPriceInvoicingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingBpsPriceInvoicingCycleConfigurationDurationUnit = "month" )
func (PriceNewParamsNewFloatingBpsPriceInvoicingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingBpsPriceInvoicingCycleConfigurationDurationUnit) IsKnown() bool
type PriceNewParamsNewFloatingBpsPriceModelType ¶ added in v0.2.0
type PriceNewParamsNewFloatingBpsPriceModelType string
const (
PriceNewParamsNewFloatingBpsPriceModelTypeBps PriceNewParamsNewFloatingBpsPriceModelType = "bps"
)
func (PriceNewParamsNewFloatingBpsPriceModelType) IsKnown ¶ added in v0.24.0
func (r PriceNewParamsNewFloatingBpsPriceModelType) IsKnown() bool
type PriceNewParamsNewFloatingBulkBpsPrice ¶ added in v0.2.0
type PriceNewParamsNewFloatingBulkBpsPrice struct { BulkBpsConfig param.Field[PriceNewParamsNewFloatingBulkBpsPriceBulkBpsConfig] `json:"bulk_bps_config,required"` // The cadence to bill for this price on. Cadence param.Field[PriceNewParamsNewFloatingBulkBpsPriceCadence] `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 plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[PriceNewParamsNewFloatingBulkBpsPriceModelType] `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[PriceNewParamsNewFloatingBulkBpsPriceBillingCycleConfiguration] `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[PriceNewParamsNewFloatingBulkBpsPriceInvoicingCycleConfiguration] `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 (PriceNewParamsNewFloatingBulkBpsPrice) ImplementsPriceNewParams ¶ added in v0.2.0
func (PriceNewParamsNewFloatingBulkBpsPrice) ImplementsPriceNewParams()
func (PriceNewParamsNewFloatingBulkBpsPrice) MarshalJSON ¶ added in v0.2.0
func (r PriceNewParamsNewFloatingBulkBpsPrice) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingBulkBpsPriceBillingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingBulkBpsPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingBulkBpsPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PriceNewParamsNewFloatingBulkBpsPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingBulkBpsPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingBulkBpsPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingBulkBpsPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingBulkBpsPriceBillingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingBulkBpsPriceBillingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingBulkBpsPriceBillingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingBulkBpsPriceBillingCycleConfigurationDurationUnit = "month" )
func (PriceNewParamsNewFloatingBulkBpsPriceBillingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingBulkBpsPriceBillingCycleConfigurationDurationUnit) IsKnown() bool
type PriceNewParamsNewFloatingBulkBpsPriceBulkBpsConfig ¶ added in v0.2.0
type PriceNewParamsNewFloatingBulkBpsPriceBulkBpsConfig struct { // Tiers for a bulk BPS pricing model where all usage is aggregated to a single // tier based on total volume Tiers param.Field[[]PriceNewParamsNewFloatingBulkBpsPriceBulkBpsConfigTier] `json:"tiers,required"` }
func (PriceNewParamsNewFloatingBulkBpsPriceBulkBpsConfig) MarshalJSON ¶ added in v0.2.0
func (r PriceNewParamsNewFloatingBulkBpsPriceBulkBpsConfig) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingBulkBpsPriceBulkBpsConfigTier ¶ added in v0.2.0
type PriceNewParamsNewFloatingBulkBpsPriceBulkBpsConfigTier 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 (PriceNewParamsNewFloatingBulkBpsPriceBulkBpsConfigTier) MarshalJSON ¶ added in v0.2.0
func (r PriceNewParamsNewFloatingBulkBpsPriceBulkBpsConfigTier) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingBulkBpsPriceCadence ¶ added in v0.2.0
type PriceNewParamsNewFloatingBulkBpsPriceCadence string
The cadence to bill for this price on.
const ( PriceNewParamsNewFloatingBulkBpsPriceCadenceAnnual PriceNewParamsNewFloatingBulkBpsPriceCadence = "annual" PriceNewParamsNewFloatingBulkBpsPriceCadenceSemiAnnual PriceNewParamsNewFloatingBulkBpsPriceCadence = "semi_annual" PriceNewParamsNewFloatingBulkBpsPriceCadenceMonthly PriceNewParamsNewFloatingBulkBpsPriceCadence = "monthly" PriceNewParamsNewFloatingBulkBpsPriceCadenceQuarterly PriceNewParamsNewFloatingBulkBpsPriceCadence = "quarterly" PriceNewParamsNewFloatingBulkBpsPriceCadenceOneTime PriceNewParamsNewFloatingBulkBpsPriceCadence = "one_time" PriceNewParamsNewFloatingBulkBpsPriceCadenceCustom PriceNewParamsNewFloatingBulkBpsPriceCadence = "custom" )
func (PriceNewParamsNewFloatingBulkBpsPriceCadence) IsKnown ¶ added in v0.24.0
func (r PriceNewParamsNewFloatingBulkBpsPriceCadence) IsKnown() bool
type PriceNewParamsNewFloatingBulkBpsPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingBulkBpsPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingBulkBpsPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PriceNewParamsNewFloatingBulkBpsPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingBulkBpsPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingBulkBpsPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingBulkBpsPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingBulkBpsPriceInvoicingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingBulkBpsPriceInvoicingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingBulkBpsPriceInvoicingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingBulkBpsPriceInvoicingCycleConfigurationDurationUnit = "month" )
func (PriceNewParamsNewFloatingBulkBpsPriceInvoicingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingBulkBpsPriceInvoicingCycleConfigurationDurationUnit) IsKnown() bool
type PriceNewParamsNewFloatingBulkBpsPriceModelType ¶ added in v0.2.0
type PriceNewParamsNewFloatingBulkBpsPriceModelType string
const (
PriceNewParamsNewFloatingBulkBpsPriceModelTypeBulkBps PriceNewParamsNewFloatingBulkBpsPriceModelType = "bulk_bps"
)
func (PriceNewParamsNewFloatingBulkBpsPriceModelType) IsKnown ¶ added in v0.24.0
func (r PriceNewParamsNewFloatingBulkBpsPriceModelType) IsKnown() bool
type PriceNewParamsNewFloatingBulkPrice ¶ added in v0.2.0
type PriceNewParamsNewFloatingBulkPrice struct { BulkConfig param.Field[PriceNewParamsNewFloatingBulkPriceBulkConfig] `json:"bulk_config,required"` // The cadence to bill for this price on. Cadence param.Field[PriceNewParamsNewFloatingBulkPriceCadence] `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 plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[PriceNewParamsNewFloatingBulkPriceModelType] `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[PriceNewParamsNewFloatingBulkPriceBillingCycleConfiguration] `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[PriceNewParamsNewFloatingBulkPriceInvoicingCycleConfiguration] `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 (PriceNewParamsNewFloatingBulkPrice) ImplementsPriceNewParams ¶ added in v0.2.0
func (PriceNewParamsNewFloatingBulkPrice) ImplementsPriceNewParams()
func (PriceNewParamsNewFloatingBulkPrice) MarshalJSON ¶ added in v0.2.0
func (r PriceNewParamsNewFloatingBulkPrice) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingBulkPriceBillingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingBulkPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingBulkPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PriceNewParamsNewFloatingBulkPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingBulkPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingBulkPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingBulkPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingBulkPriceBillingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingBulkPriceBillingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingBulkPriceBillingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingBulkPriceBillingCycleConfigurationDurationUnit = "month" )
func (PriceNewParamsNewFloatingBulkPriceBillingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingBulkPriceBillingCycleConfigurationDurationUnit) IsKnown() bool
type PriceNewParamsNewFloatingBulkPriceBulkConfig ¶ added in v0.2.0
type PriceNewParamsNewFloatingBulkPriceBulkConfig struct { // Bulk tiers for rating based on total usage volume Tiers param.Field[[]PriceNewParamsNewFloatingBulkPriceBulkConfigTier] `json:"tiers,required"` }
func (PriceNewParamsNewFloatingBulkPriceBulkConfig) MarshalJSON ¶ added in v0.2.0
func (r PriceNewParamsNewFloatingBulkPriceBulkConfig) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingBulkPriceBulkConfigTier ¶ added in v0.2.0
type PriceNewParamsNewFloatingBulkPriceBulkConfigTier 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 (PriceNewParamsNewFloatingBulkPriceBulkConfigTier) MarshalJSON ¶ added in v0.2.0
func (r PriceNewParamsNewFloatingBulkPriceBulkConfigTier) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingBulkPriceCadence ¶ added in v0.2.0
type PriceNewParamsNewFloatingBulkPriceCadence string
The cadence to bill for this price on.
const ( PriceNewParamsNewFloatingBulkPriceCadenceAnnual PriceNewParamsNewFloatingBulkPriceCadence = "annual" PriceNewParamsNewFloatingBulkPriceCadenceSemiAnnual PriceNewParamsNewFloatingBulkPriceCadence = "semi_annual" PriceNewParamsNewFloatingBulkPriceCadenceMonthly PriceNewParamsNewFloatingBulkPriceCadence = "monthly" PriceNewParamsNewFloatingBulkPriceCadenceQuarterly PriceNewParamsNewFloatingBulkPriceCadence = "quarterly" PriceNewParamsNewFloatingBulkPriceCadenceOneTime PriceNewParamsNewFloatingBulkPriceCadence = "one_time" PriceNewParamsNewFloatingBulkPriceCadenceCustom PriceNewParamsNewFloatingBulkPriceCadence = "custom" )
func (PriceNewParamsNewFloatingBulkPriceCadence) IsKnown ¶ added in v0.24.0
func (r PriceNewParamsNewFloatingBulkPriceCadence) IsKnown() bool
type PriceNewParamsNewFloatingBulkPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingBulkPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingBulkPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PriceNewParamsNewFloatingBulkPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingBulkPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingBulkPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingBulkPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingBulkPriceInvoicingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingBulkPriceInvoicingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingBulkPriceInvoicingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingBulkPriceInvoicingCycleConfigurationDurationUnit = "month" )
func (PriceNewParamsNewFloatingBulkPriceInvoicingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingBulkPriceInvoicingCycleConfigurationDurationUnit) IsKnown() bool
type PriceNewParamsNewFloatingBulkPriceModelType ¶ added in v0.2.0
type PriceNewParamsNewFloatingBulkPriceModelType string
const (
PriceNewParamsNewFloatingBulkPriceModelTypeBulk PriceNewParamsNewFloatingBulkPriceModelType = "bulk"
)
func (PriceNewParamsNewFloatingBulkPriceModelType) IsKnown ¶ added in v0.24.0
func (r PriceNewParamsNewFloatingBulkPriceModelType) IsKnown() bool
type PriceNewParamsNewFloatingBulkWithProrationPrice ¶ added in v0.49.0
type PriceNewParamsNewFloatingBulkWithProrationPrice struct { BulkWithProrationConfig param.Field[map[string]interface{}] `json:"bulk_with_proration_config,required"` // The cadence to bill for this price on. Cadence param.Field[PriceNewParamsNewFloatingBulkWithProrationPriceCadence] `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 plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[PriceNewParamsNewFloatingBulkWithProrationPriceModelType] `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[PriceNewParamsNewFloatingBulkWithProrationPriceBillingCycleConfiguration] `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[PriceNewParamsNewFloatingBulkWithProrationPriceInvoicingCycleConfiguration] `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 (PriceNewParamsNewFloatingBulkWithProrationPrice) ImplementsPriceNewParams ¶ added in v0.49.0
func (PriceNewParamsNewFloatingBulkWithProrationPrice) ImplementsPriceNewParams()
func (PriceNewParamsNewFloatingBulkWithProrationPrice) MarshalJSON ¶ added in v0.49.0
func (r PriceNewParamsNewFloatingBulkWithProrationPrice) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingBulkWithProrationPriceBillingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingBulkWithProrationPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingBulkWithProrationPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PriceNewParamsNewFloatingBulkWithProrationPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingBulkWithProrationPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingBulkWithProrationPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingBulkWithProrationPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingBulkWithProrationPriceBillingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingBulkWithProrationPriceBillingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingBulkWithProrationPriceBillingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingBulkWithProrationPriceBillingCycleConfigurationDurationUnit = "month" )
type PriceNewParamsNewFloatingBulkWithProrationPriceCadence ¶ added in v0.49.0
type PriceNewParamsNewFloatingBulkWithProrationPriceCadence string
The cadence to bill for this price on.
const ( PriceNewParamsNewFloatingBulkWithProrationPriceCadenceAnnual PriceNewParamsNewFloatingBulkWithProrationPriceCadence = "annual" PriceNewParamsNewFloatingBulkWithProrationPriceCadenceSemiAnnual PriceNewParamsNewFloatingBulkWithProrationPriceCadence = "semi_annual" PriceNewParamsNewFloatingBulkWithProrationPriceCadenceMonthly PriceNewParamsNewFloatingBulkWithProrationPriceCadence = "monthly" PriceNewParamsNewFloatingBulkWithProrationPriceCadenceQuarterly PriceNewParamsNewFloatingBulkWithProrationPriceCadence = "quarterly" PriceNewParamsNewFloatingBulkWithProrationPriceCadenceOneTime PriceNewParamsNewFloatingBulkWithProrationPriceCadence = "one_time" PriceNewParamsNewFloatingBulkWithProrationPriceCadenceCustom PriceNewParamsNewFloatingBulkWithProrationPriceCadence = "custom" )
func (PriceNewParamsNewFloatingBulkWithProrationPriceCadence) IsKnown ¶ added in v0.49.0
func (r PriceNewParamsNewFloatingBulkWithProrationPriceCadence) IsKnown() bool
type PriceNewParamsNewFloatingBulkWithProrationPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingBulkWithProrationPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingBulkWithProrationPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PriceNewParamsNewFloatingBulkWithProrationPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingBulkWithProrationPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingBulkWithProrationPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingBulkWithProrationPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingBulkWithProrationPriceInvoicingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingBulkWithProrationPriceInvoicingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingBulkWithProrationPriceInvoicingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingBulkWithProrationPriceInvoicingCycleConfigurationDurationUnit = "month" )
type PriceNewParamsNewFloatingBulkWithProrationPriceModelType ¶ added in v0.49.0
type PriceNewParamsNewFloatingBulkWithProrationPriceModelType string
const (
PriceNewParamsNewFloatingBulkWithProrationPriceModelTypeBulkWithProration PriceNewParamsNewFloatingBulkWithProrationPriceModelType = "bulk_with_proration"
)
func (PriceNewParamsNewFloatingBulkWithProrationPriceModelType) IsKnown ¶ added in v0.49.0
func (r PriceNewParamsNewFloatingBulkWithProrationPriceModelType) IsKnown() bool
type PriceNewParamsNewFloatingGroupedAllocationPrice ¶ added in v0.48.0
type PriceNewParamsNewFloatingGroupedAllocationPrice struct { // The cadence to bill for this price on. Cadence param.Field[PriceNewParamsNewFloatingGroupedAllocationPriceCadence] `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[map[string]interface{}] `json:"grouped_allocation_config,required"` // The id of the item the plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[PriceNewParamsNewFloatingGroupedAllocationPriceModelType] `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[PriceNewParamsNewFloatingGroupedAllocationPriceBillingCycleConfiguration] `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[PriceNewParamsNewFloatingGroupedAllocationPriceInvoicingCycleConfiguration] `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 (PriceNewParamsNewFloatingGroupedAllocationPrice) ImplementsPriceNewParams ¶ added in v0.48.0
func (PriceNewParamsNewFloatingGroupedAllocationPrice) ImplementsPriceNewParams()
func (PriceNewParamsNewFloatingGroupedAllocationPrice) MarshalJSON ¶ added in v0.48.0
func (r PriceNewParamsNewFloatingGroupedAllocationPrice) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingGroupedAllocationPriceBillingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingGroupedAllocationPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingGroupedAllocationPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PriceNewParamsNewFloatingGroupedAllocationPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingGroupedAllocationPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingGroupedAllocationPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingGroupedAllocationPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingGroupedAllocationPriceBillingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingGroupedAllocationPriceBillingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingGroupedAllocationPriceBillingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingGroupedAllocationPriceBillingCycleConfigurationDurationUnit = "month" )
type PriceNewParamsNewFloatingGroupedAllocationPriceCadence ¶ added in v0.48.0
type PriceNewParamsNewFloatingGroupedAllocationPriceCadence string
The cadence to bill for this price on.
const ( PriceNewParamsNewFloatingGroupedAllocationPriceCadenceAnnual PriceNewParamsNewFloatingGroupedAllocationPriceCadence = "annual" PriceNewParamsNewFloatingGroupedAllocationPriceCadenceSemiAnnual PriceNewParamsNewFloatingGroupedAllocationPriceCadence = "semi_annual" PriceNewParamsNewFloatingGroupedAllocationPriceCadenceMonthly PriceNewParamsNewFloatingGroupedAllocationPriceCadence = "monthly" PriceNewParamsNewFloatingGroupedAllocationPriceCadenceQuarterly PriceNewParamsNewFloatingGroupedAllocationPriceCadence = "quarterly" PriceNewParamsNewFloatingGroupedAllocationPriceCadenceOneTime PriceNewParamsNewFloatingGroupedAllocationPriceCadence = "one_time" PriceNewParamsNewFloatingGroupedAllocationPriceCadenceCustom PriceNewParamsNewFloatingGroupedAllocationPriceCadence = "custom" )
func (PriceNewParamsNewFloatingGroupedAllocationPriceCadence) IsKnown ¶ added in v0.48.0
func (r PriceNewParamsNewFloatingGroupedAllocationPriceCadence) IsKnown() bool
type PriceNewParamsNewFloatingGroupedAllocationPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingGroupedAllocationPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingGroupedAllocationPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PriceNewParamsNewFloatingGroupedAllocationPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingGroupedAllocationPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingGroupedAllocationPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingGroupedAllocationPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingGroupedAllocationPriceInvoicingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingGroupedAllocationPriceInvoicingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingGroupedAllocationPriceInvoicingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingGroupedAllocationPriceInvoicingCycleConfigurationDurationUnit = "month" )
type PriceNewParamsNewFloatingGroupedAllocationPriceModelType ¶ added in v0.48.0
type PriceNewParamsNewFloatingGroupedAllocationPriceModelType string
const (
PriceNewParamsNewFloatingGroupedAllocationPriceModelTypeGroupedAllocation PriceNewParamsNewFloatingGroupedAllocationPriceModelType = "grouped_allocation"
)
func (PriceNewParamsNewFloatingGroupedAllocationPriceModelType) IsKnown ¶ added in v0.48.0
func (r PriceNewParamsNewFloatingGroupedAllocationPriceModelType) IsKnown() bool
type PriceNewParamsNewFloatingGroupedTieredPrice ¶ added in v0.25.0
type PriceNewParamsNewFloatingGroupedTieredPrice struct { // The cadence to bill for this price on. Cadence param.Field[PriceNewParamsNewFloatingGroupedTieredPriceCadence] `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[map[string]interface{}] `json:"grouped_tiered_config,required"` // The id of the item the plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[PriceNewParamsNewFloatingGroupedTieredPriceModelType] `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[PriceNewParamsNewFloatingGroupedTieredPriceBillingCycleConfiguration] `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[PriceNewParamsNewFloatingGroupedTieredPriceInvoicingCycleConfiguration] `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 (PriceNewParamsNewFloatingGroupedTieredPrice) ImplementsPriceNewParams ¶ added in v0.25.0
func (PriceNewParamsNewFloatingGroupedTieredPrice) ImplementsPriceNewParams()
func (PriceNewParamsNewFloatingGroupedTieredPrice) MarshalJSON ¶ added in v0.25.0
func (r PriceNewParamsNewFloatingGroupedTieredPrice) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingGroupedTieredPriceBillingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingGroupedTieredPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingGroupedTieredPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PriceNewParamsNewFloatingGroupedTieredPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingGroupedTieredPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingGroupedTieredPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingGroupedTieredPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingGroupedTieredPriceBillingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingGroupedTieredPriceBillingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingGroupedTieredPriceBillingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingGroupedTieredPriceBillingCycleConfigurationDurationUnit = "month" )
type PriceNewParamsNewFloatingGroupedTieredPriceCadence ¶ added in v0.25.0
type PriceNewParamsNewFloatingGroupedTieredPriceCadence string
The cadence to bill for this price on.
const ( PriceNewParamsNewFloatingGroupedTieredPriceCadenceAnnual PriceNewParamsNewFloatingGroupedTieredPriceCadence = "annual" PriceNewParamsNewFloatingGroupedTieredPriceCadenceSemiAnnual PriceNewParamsNewFloatingGroupedTieredPriceCadence = "semi_annual" PriceNewParamsNewFloatingGroupedTieredPriceCadenceMonthly PriceNewParamsNewFloatingGroupedTieredPriceCadence = "monthly" PriceNewParamsNewFloatingGroupedTieredPriceCadenceQuarterly PriceNewParamsNewFloatingGroupedTieredPriceCadence = "quarterly" PriceNewParamsNewFloatingGroupedTieredPriceCadenceOneTime PriceNewParamsNewFloatingGroupedTieredPriceCadence = "one_time" PriceNewParamsNewFloatingGroupedTieredPriceCadenceCustom PriceNewParamsNewFloatingGroupedTieredPriceCadence = "custom" )
func (PriceNewParamsNewFloatingGroupedTieredPriceCadence) IsKnown ¶ added in v0.25.0
func (r PriceNewParamsNewFloatingGroupedTieredPriceCadence) IsKnown() bool
type PriceNewParamsNewFloatingGroupedTieredPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingGroupedTieredPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingGroupedTieredPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PriceNewParamsNewFloatingGroupedTieredPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingGroupedTieredPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingGroupedTieredPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingGroupedTieredPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingGroupedTieredPriceInvoicingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingGroupedTieredPriceInvoicingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingGroupedTieredPriceInvoicingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingGroupedTieredPriceInvoicingCycleConfigurationDurationUnit = "month" )
type PriceNewParamsNewFloatingGroupedTieredPriceModelType ¶ added in v0.25.0
type PriceNewParamsNewFloatingGroupedTieredPriceModelType string
const (
PriceNewParamsNewFloatingGroupedTieredPriceModelTypeGroupedTiered PriceNewParamsNewFloatingGroupedTieredPriceModelType = "grouped_tiered"
)
func (PriceNewParamsNewFloatingGroupedTieredPriceModelType) IsKnown ¶ added in v0.25.0
func (r PriceNewParamsNewFloatingGroupedTieredPriceModelType) IsKnown() bool
type PriceNewParamsNewFloatingGroupedWithProratedMinimumPrice ¶ added in v0.58.0
type PriceNewParamsNewFloatingGroupedWithProratedMinimumPrice struct { // The cadence to bill for this price on. Cadence param.Field[PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceCadence] `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[map[string]interface{}] `json:"grouped_with_prorated_minimum_config,required"` // The id of the item the plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceModelType] `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[PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfiguration] `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[PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfiguration] `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 (PriceNewParamsNewFloatingGroupedWithProratedMinimumPrice) ImplementsPriceNewParams ¶ added in v0.58.0
func (PriceNewParamsNewFloatingGroupedWithProratedMinimumPrice) ImplementsPriceNewParams()
func (PriceNewParamsNewFloatingGroupedWithProratedMinimumPrice) MarshalJSON ¶ added in v0.58.0
func (r PriceNewParamsNewFloatingGroupedWithProratedMinimumPrice) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfiguration ¶ added in v0.58.0
type PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.58.0
func (r PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfigurationDurationUnit ¶ added in v0.58.0
type PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfigurationDurationUnit = "month" )
type PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceCadence ¶ added in v0.58.0
type PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceCadence string
The cadence to bill for this price on.
const ( PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceCadenceAnnual PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceCadence = "annual" PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceCadenceSemiAnnual PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceCadence = "semi_annual" PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceCadenceMonthly PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceCadence = "monthly" PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceCadenceQuarterly PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceCadence = "quarterly" PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceCadenceOneTime PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceCadence = "one_time" PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceCadenceCustom PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceCadence = "custom" )
func (PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceCadence) IsKnown ¶ added in v0.58.0
func (r PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceCadence) IsKnown() bool
type PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfiguration ¶ added in v0.58.0
type PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.58.0
func (r PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.58.0
type PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfigurationDurationUnit = "month" )
type PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceModelType ¶ added in v0.58.0
type PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceModelType string
const (
PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceModelTypeGroupedWithProratedMinimum PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceModelType = "grouped_with_prorated_minimum"
)
func (PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceModelType) IsKnown ¶ added in v0.58.0
func (r PriceNewParamsNewFloatingGroupedWithProratedMinimumPriceModelType) IsKnown() bool
type PriceNewParamsNewFloatingMatrixPrice ¶ added in v0.2.0
type PriceNewParamsNewFloatingMatrixPrice struct { // The cadence to bill for this price on. Cadence param.Field[PriceNewParamsNewFloatingMatrixPriceCadence] `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 plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` MatrixConfig param.Field[PriceNewParamsNewFloatingMatrixPriceMatrixConfig] `json:"matrix_config,required"` ModelType param.Field[PriceNewParamsNewFloatingMatrixPriceModelType] `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[PriceNewParamsNewFloatingMatrixPriceBillingCycleConfiguration] `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[PriceNewParamsNewFloatingMatrixPriceInvoicingCycleConfiguration] `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 (PriceNewParamsNewFloatingMatrixPrice) ImplementsPriceNewParams ¶ added in v0.2.0
func (PriceNewParamsNewFloatingMatrixPrice) ImplementsPriceNewParams()
func (PriceNewParamsNewFloatingMatrixPrice) MarshalJSON ¶ added in v0.2.0
func (r PriceNewParamsNewFloatingMatrixPrice) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingMatrixPriceBillingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingMatrixPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingMatrixPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PriceNewParamsNewFloatingMatrixPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingMatrixPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingMatrixPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingMatrixPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingMatrixPriceBillingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingMatrixPriceBillingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingMatrixPriceBillingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingMatrixPriceBillingCycleConfigurationDurationUnit = "month" )
func (PriceNewParamsNewFloatingMatrixPriceBillingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingMatrixPriceBillingCycleConfigurationDurationUnit) IsKnown() bool
type PriceNewParamsNewFloatingMatrixPriceCadence ¶ added in v0.2.0
type PriceNewParamsNewFloatingMatrixPriceCadence string
The cadence to bill for this price on.
const ( PriceNewParamsNewFloatingMatrixPriceCadenceAnnual PriceNewParamsNewFloatingMatrixPriceCadence = "annual" PriceNewParamsNewFloatingMatrixPriceCadenceSemiAnnual PriceNewParamsNewFloatingMatrixPriceCadence = "semi_annual" PriceNewParamsNewFloatingMatrixPriceCadenceMonthly PriceNewParamsNewFloatingMatrixPriceCadence = "monthly" PriceNewParamsNewFloatingMatrixPriceCadenceQuarterly PriceNewParamsNewFloatingMatrixPriceCadence = "quarterly" PriceNewParamsNewFloatingMatrixPriceCadenceOneTime PriceNewParamsNewFloatingMatrixPriceCadence = "one_time" PriceNewParamsNewFloatingMatrixPriceCadenceCustom PriceNewParamsNewFloatingMatrixPriceCadence = "custom" )
func (PriceNewParamsNewFloatingMatrixPriceCadence) IsKnown ¶ added in v0.24.0
func (r PriceNewParamsNewFloatingMatrixPriceCadence) IsKnown() bool
type PriceNewParamsNewFloatingMatrixPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingMatrixPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingMatrixPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PriceNewParamsNewFloatingMatrixPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingMatrixPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingMatrixPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingMatrixPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingMatrixPriceInvoicingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingMatrixPriceInvoicingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingMatrixPriceInvoicingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingMatrixPriceInvoicingCycleConfigurationDurationUnit = "month" )
func (PriceNewParamsNewFloatingMatrixPriceInvoicingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingMatrixPriceInvoicingCycleConfigurationDurationUnit) IsKnown() bool
type PriceNewParamsNewFloatingMatrixPriceMatrixConfig ¶ added in v0.2.0
type PriceNewParamsNewFloatingMatrixPriceMatrixConfig 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[[]PriceNewParamsNewFloatingMatrixPriceMatrixConfigMatrixValue] `json:"matrix_values,required"` }
func (PriceNewParamsNewFloatingMatrixPriceMatrixConfig) MarshalJSON ¶ added in v0.2.0
func (r PriceNewParamsNewFloatingMatrixPriceMatrixConfig) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingMatrixPriceMatrixConfigMatrixValue ¶ added in v0.2.0
type PriceNewParamsNewFloatingMatrixPriceMatrixConfigMatrixValue 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 (PriceNewParamsNewFloatingMatrixPriceMatrixConfigMatrixValue) MarshalJSON ¶ added in v0.2.0
func (r PriceNewParamsNewFloatingMatrixPriceMatrixConfigMatrixValue) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingMatrixPriceModelType ¶ added in v0.2.0
type PriceNewParamsNewFloatingMatrixPriceModelType string
const (
PriceNewParamsNewFloatingMatrixPriceModelTypeMatrix PriceNewParamsNewFloatingMatrixPriceModelType = "matrix"
)
func (PriceNewParamsNewFloatingMatrixPriceModelType) IsKnown ¶ added in v0.24.0
func (r PriceNewParamsNewFloatingMatrixPriceModelType) IsKnown() bool
type PriceNewParamsNewFloatingMatrixWithAllocationPrice ¶ added in v0.22.0
type PriceNewParamsNewFloatingMatrixWithAllocationPrice struct { // The cadence to bill for this price on. Cadence param.Field[PriceNewParamsNewFloatingMatrixWithAllocationPriceCadence] `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 plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` MatrixWithAllocationConfig param.Field[PriceNewParamsNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfig] `json:"matrix_with_allocation_config,required"` ModelType param.Field[PriceNewParamsNewFloatingMatrixWithAllocationPriceModelType] `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[PriceNewParamsNewFloatingMatrixWithAllocationPriceBillingCycleConfiguration] `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[PriceNewParamsNewFloatingMatrixWithAllocationPriceInvoicingCycleConfiguration] `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 (PriceNewParamsNewFloatingMatrixWithAllocationPrice) ImplementsPriceNewParams ¶ added in v0.22.0
func (PriceNewParamsNewFloatingMatrixWithAllocationPrice) ImplementsPriceNewParams()
func (PriceNewParamsNewFloatingMatrixWithAllocationPrice) MarshalJSON ¶ added in v0.22.0
func (r PriceNewParamsNewFloatingMatrixWithAllocationPrice) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingMatrixWithAllocationPriceBillingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingMatrixWithAllocationPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingMatrixWithAllocationPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PriceNewParamsNewFloatingMatrixWithAllocationPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingMatrixWithAllocationPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingMatrixWithAllocationPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingMatrixWithAllocationPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingMatrixWithAllocationPriceBillingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingMatrixWithAllocationPriceBillingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingMatrixWithAllocationPriceBillingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingMatrixWithAllocationPriceBillingCycleConfigurationDurationUnit = "month" )
type PriceNewParamsNewFloatingMatrixWithAllocationPriceCadence ¶ added in v0.22.0
type PriceNewParamsNewFloatingMatrixWithAllocationPriceCadence string
The cadence to bill for this price on.
const ( PriceNewParamsNewFloatingMatrixWithAllocationPriceCadenceAnnual PriceNewParamsNewFloatingMatrixWithAllocationPriceCadence = "annual" PriceNewParamsNewFloatingMatrixWithAllocationPriceCadenceSemiAnnual PriceNewParamsNewFloatingMatrixWithAllocationPriceCadence = "semi_annual" PriceNewParamsNewFloatingMatrixWithAllocationPriceCadenceMonthly PriceNewParamsNewFloatingMatrixWithAllocationPriceCadence = "monthly" PriceNewParamsNewFloatingMatrixWithAllocationPriceCadenceQuarterly PriceNewParamsNewFloatingMatrixWithAllocationPriceCadence = "quarterly" PriceNewParamsNewFloatingMatrixWithAllocationPriceCadenceOneTime PriceNewParamsNewFloatingMatrixWithAllocationPriceCadence = "one_time" PriceNewParamsNewFloatingMatrixWithAllocationPriceCadenceCustom PriceNewParamsNewFloatingMatrixWithAllocationPriceCadence = "custom" )
func (PriceNewParamsNewFloatingMatrixWithAllocationPriceCadence) IsKnown ¶ added in v0.24.0
func (r PriceNewParamsNewFloatingMatrixWithAllocationPriceCadence) IsKnown() bool
type PriceNewParamsNewFloatingMatrixWithAllocationPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingMatrixWithAllocationPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingMatrixWithAllocationPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PriceNewParamsNewFloatingMatrixWithAllocationPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingMatrixWithAllocationPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingMatrixWithAllocationPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingMatrixWithAllocationPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingMatrixWithAllocationPriceInvoicingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingMatrixWithAllocationPriceInvoicingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingMatrixWithAllocationPriceInvoicingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingMatrixWithAllocationPriceInvoicingCycleConfigurationDurationUnit = "month" )
type PriceNewParamsNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfig ¶ added in v0.22.0
type PriceNewParamsNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfig 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[[]PriceNewParamsNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue] `json:"matrix_values,required"` }
func (PriceNewParamsNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfig) MarshalJSON ¶ added in v0.22.0
func (r PriceNewParamsNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfig) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue ¶ added in v0.22.0
type PriceNewParamsNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue 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 (PriceNewParamsNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue) MarshalJSON ¶ added in v0.22.0
func (r PriceNewParamsNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingMatrixWithAllocationPriceModelType ¶ added in v0.22.0
type PriceNewParamsNewFloatingMatrixWithAllocationPriceModelType string
const (
PriceNewParamsNewFloatingMatrixWithAllocationPriceModelTypeMatrixWithAllocation PriceNewParamsNewFloatingMatrixWithAllocationPriceModelType = "matrix_with_allocation"
)
func (PriceNewParamsNewFloatingMatrixWithAllocationPriceModelType) IsKnown ¶ added in v0.24.0
func (r PriceNewParamsNewFloatingMatrixWithAllocationPriceModelType) IsKnown() bool
type PriceNewParamsNewFloatingPackagePrice ¶ added in v0.2.0
type PriceNewParamsNewFloatingPackagePrice struct { // The cadence to bill for this price on. Cadence param.Field[PriceNewParamsNewFloatingPackagePriceCadence] `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 plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[PriceNewParamsNewFloatingPackagePriceModelType] `json:"model_type,required"` // The name of the price. Name param.Field[string] `json:"name,required"` PackageConfig param.Field[PriceNewParamsNewFloatingPackagePricePackageConfig] `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[PriceNewParamsNewFloatingPackagePriceBillingCycleConfiguration] `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[PriceNewParamsNewFloatingPackagePriceInvoicingCycleConfiguration] `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 (PriceNewParamsNewFloatingPackagePrice) ImplementsPriceNewParams ¶ added in v0.2.0
func (PriceNewParamsNewFloatingPackagePrice) ImplementsPriceNewParams()
func (PriceNewParamsNewFloatingPackagePrice) MarshalJSON ¶ added in v0.2.0
func (r PriceNewParamsNewFloatingPackagePrice) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingPackagePriceBillingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingPackagePriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingPackagePriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PriceNewParamsNewFloatingPackagePriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingPackagePriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingPackagePriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingPackagePriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingPackagePriceBillingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingPackagePriceBillingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingPackagePriceBillingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingPackagePriceBillingCycleConfigurationDurationUnit = "month" )
func (PriceNewParamsNewFloatingPackagePriceBillingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingPackagePriceBillingCycleConfigurationDurationUnit) IsKnown() bool
type PriceNewParamsNewFloatingPackagePriceCadence ¶ added in v0.2.0
type PriceNewParamsNewFloatingPackagePriceCadence string
The cadence to bill for this price on.
const ( PriceNewParamsNewFloatingPackagePriceCadenceAnnual PriceNewParamsNewFloatingPackagePriceCadence = "annual" PriceNewParamsNewFloatingPackagePriceCadenceSemiAnnual PriceNewParamsNewFloatingPackagePriceCadence = "semi_annual" PriceNewParamsNewFloatingPackagePriceCadenceMonthly PriceNewParamsNewFloatingPackagePriceCadence = "monthly" PriceNewParamsNewFloatingPackagePriceCadenceQuarterly PriceNewParamsNewFloatingPackagePriceCadence = "quarterly" PriceNewParamsNewFloatingPackagePriceCadenceOneTime PriceNewParamsNewFloatingPackagePriceCadence = "one_time" PriceNewParamsNewFloatingPackagePriceCadenceCustom PriceNewParamsNewFloatingPackagePriceCadence = "custom" )
func (PriceNewParamsNewFloatingPackagePriceCadence) IsKnown ¶ added in v0.24.0
func (r PriceNewParamsNewFloatingPackagePriceCadence) IsKnown() bool
type PriceNewParamsNewFloatingPackagePriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingPackagePriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingPackagePriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PriceNewParamsNewFloatingPackagePriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingPackagePriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingPackagePriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingPackagePriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingPackagePriceInvoicingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingPackagePriceInvoicingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingPackagePriceInvoicingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingPackagePriceInvoicingCycleConfigurationDurationUnit = "month" )
func (PriceNewParamsNewFloatingPackagePriceInvoicingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingPackagePriceInvoicingCycleConfigurationDurationUnit) IsKnown() bool
type PriceNewParamsNewFloatingPackagePriceModelType ¶ added in v0.2.0
type PriceNewParamsNewFloatingPackagePriceModelType string
const (
PriceNewParamsNewFloatingPackagePriceModelTypePackage PriceNewParamsNewFloatingPackagePriceModelType = "package"
)
func (PriceNewParamsNewFloatingPackagePriceModelType) IsKnown ¶ added in v0.24.0
func (r PriceNewParamsNewFloatingPackagePriceModelType) IsKnown() bool
type PriceNewParamsNewFloatingPackagePricePackageConfig ¶ added in v0.2.0
type PriceNewParamsNewFloatingPackagePricePackageConfig 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 (PriceNewParamsNewFloatingPackagePricePackageConfig) MarshalJSON ¶ added in v0.2.0
func (r PriceNewParamsNewFloatingPackagePricePackageConfig) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingPackageWithAllocationPrice ¶ added in v0.2.0
type PriceNewParamsNewFloatingPackageWithAllocationPrice struct { // The cadence to bill for this price on. Cadence param.Field[PriceNewParamsNewFloatingPackageWithAllocationPriceCadence] `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 plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[PriceNewParamsNewFloatingPackageWithAllocationPriceModelType] `json:"model_type,required"` // The name of the price. Name param.Field[string] `json:"name,required"` PackageWithAllocationConfig param.Field[map[string]interface{}] `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[PriceNewParamsNewFloatingPackageWithAllocationPriceBillingCycleConfiguration] `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[PriceNewParamsNewFloatingPackageWithAllocationPriceInvoicingCycleConfiguration] `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 (PriceNewParamsNewFloatingPackageWithAllocationPrice) ImplementsPriceNewParams ¶ added in v0.2.0
func (PriceNewParamsNewFloatingPackageWithAllocationPrice) ImplementsPriceNewParams()
func (PriceNewParamsNewFloatingPackageWithAllocationPrice) MarshalJSON ¶ added in v0.2.0
func (r PriceNewParamsNewFloatingPackageWithAllocationPrice) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingPackageWithAllocationPriceBillingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingPackageWithAllocationPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingPackageWithAllocationPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PriceNewParamsNewFloatingPackageWithAllocationPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingPackageWithAllocationPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingPackageWithAllocationPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingPackageWithAllocationPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingPackageWithAllocationPriceBillingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingPackageWithAllocationPriceBillingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingPackageWithAllocationPriceBillingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingPackageWithAllocationPriceBillingCycleConfigurationDurationUnit = "month" )
type PriceNewParamsNewFloatingPackageWithAllocationPriceCadence ¶ added in v0.2.0
type PriceNewParamsNewFloatingPackageWithAllocationPriceCadence string
The cadence to bill for this price on.
const ( PriceNewParamsNewFloatingPackageWithAllocationPriceCadenceAnnual PriceNewParamsNewFloatingPackageWithAllocationPriceCadence = "annual" PriceNewParamsNewFloatingPackageWithAllocationPriceCadenceSemiAnnual PriceNewParamsNewFloatingPackageWithAllocationPriceCadence = "semi_annual" PriceNewParamsNewFloatingPackageWithAllocationPriceCadenceMonthly PriceNewParamsNewFloatingPackageWithAllocationPriceCadence = "monthly" PriceNewParamsNewFloatingPackageWithAllocationPriceCadenceQuarterly PriceNewParamsNewFloatingPackageWithAllocationPriceCadence = "quarterly" PriceNewParamsNewFloatingPackageWithAllocationPriceCadenceOneTime PriceNewParamsNewFloatingPackageWithAllocationPriceCadence = "one_time" PriceNewParamsNewFloatingPackageWithAllocationPriceCadenceCustom PriceNewParamsNewFloatingPackageWithAllocationPriceCadence = "custom" )
func (PriceNewParamsNewFloatingPackageWithAllocationPriceCadence) IsKnown ¶ added in v0.24.0
func (r PriceNewParamsNewFloatingPackageWithAllocationPriceCadence) IsKnown() bool
type PriceNewParamsNewFloatingPackageWithAllocationPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingPackageWithAllocationPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingPackageWithAllocationPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PriceNewParamsNewFloatingPackageWithAllocationPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingPackageWithAllocationPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingPackageWithAllocationPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingPackageWithAllocationPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingPackageWithAllocationPriceInvoicingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingPackageWithAllocationPriceInvoicingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingPackageWithAllocationPriceInvoicingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingPackageWithAllocationPriceInvoicingCycleConfigurationDurationUnit = "month" )
type PriceNewParamsNewFloatingPackageWithAllocationPriceModelType ¶ added in v0.2.0
type PriceNewParamsNewFloatingPackageWithAllocationPriceModelType string
const (
PriceNewParamsNewFloatingPackageWithAllocationPriceModelTypePackageWithAllocation PriceNewParamsNewFloatingPackageWithAllocationPriceModelType = "package_with_allocation"
)
func (PriceNewParamsNewFloatingPackageWithAllocationPriceModelType) IsKnown ¶ added in v0.24.0
func (r PriceNewParamsNewFloatingPackageWithAllocationPriceModelType) IsKnown() bool
type PriceNewParamsNewFloatingThresholdTotalAmountPrice ¶ added in v0.2.0
type PriceNewParamsNewFloatingThresholdTotalAmountPrice struct { // The cadence to bill for this price on. Cadence param.Field[PriceNewParamsNewFloatingThresholdTotalAmountPriceCadence] `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 plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[PriceNewParamsNewFloatingThresholdTotalAmountPriceModelType] `json:"model_type,required"` // The name of the price. Name param.Field[string] `json:"name,required"` ThresholdTotalAmountConfig param.Field[map[string]interface{}] `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[PriceNewParamsNewFloatingThresholdTotalAmountPriceBillingCycleConfiguration] `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[PriceNewParamsNewFloatingThresholdTotalAmountPriceInvoicingCycleConfiguration] `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 (PriceNewParamsNewFloatingThresholdTotalAmountPrice) ImplementsPriceNewParams ¶ added in v0.2.0
func (PriceNewParamsNewFloatingThresholdTotalAmountPrice) ImplementsPriceNewParams()
func (PriceNewParamsNewFloatingThresholdTotalAmountPrice) MarshalJSON ¶ added in v0.2.0
func (r PriceNewParamsNewFloatingThresholdTotalAmountPrice) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingThresholdTotalAmountPriceBillingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingThresholdTotalAmountPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingThresholdTotalAmountPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PriceNewParamsNewFloatingThresholdTotalAmountPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingThresholdTotalAmountPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingThresholdTotalAmountPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingThresholdTotalAmountPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingThresholdTotalAmountPriceBillingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingThresholdTotalAmountPriceBillingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingThresholdTotalAmountPriceBillingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingThresholdTotalAmountPriceBillingCycleConfigurationDurationUnit = "month" )
type PriceNewParamsNewFloatingThresholdTotalAmountPriceCadence ¶ added in v0.2.0
type PriceNewParamsNewFloatingThresholdTotalAmountPriceCadence string
The cadence to bill for this price on.
const ( PriceNewParamsNewFloatingThresholdTotalAmountPriceCadenceAnnual PriceNewParamsNewFloatingThresholdTotalAmountPriceCadence = "annual" PriceNewParamsNewFloatingThresholdTotalAmountPriceCadenceSemiAnnual PriceNewParamsNewFloatingThresholdTotalAmountPriceCadence = "semi_annual" PriceNewParamsNewFloatingThresholdTotalAmountPriceCadenceMonthly PriceNewParamsNewFloatingThresholdTotalAmountPriceCadence = "monthly" PriceNewParamsNewFloatingThresholdTotalAmountPriceCadenceQuarterly PriceNewParamsNewFloatingThresholdTotalAmountPriceCadence = "quarterly" PriceNewParamsNewFloatingThresholdTotalAmountPriceCadenceOneTime PriceNewParamsNewFloatingThresholdTotalAmountPriceCadence = "one_time" PriceNewParamsNewFloatingThresholdTotalAmountPriceCadenceCustom PriceNewParamsNewFloatingThresholdTotalAmountPriceCadence = "custom" )
func (PriceNewParamsNewFloatingThresholdTotalAmountPriceCadence) IsKnown ¶ added in v0.24.0
func (r PriceNewParamsNewFloatingThresholdTotalAmountPriceCadence) IsKnown() bool
type PriceNewParamsNewFloatingThresholdTotalAmountPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingThresholdTotalAmountPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingThresholdTotalAmountPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PriceNewParamsNewFloatingThresholdTotalAmountPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingThresholdTotalAmountPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingThresholdTotalAmountPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingThresholdTotalAmountPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingThresholdTotalAmountPriceInvoicingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingThresholdTotalAmountPriceInvoicingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingThresholdTotalAmountPriceInvoicingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingThresholdTotalAmountPriceInvoicingCycleConfigurationDurationUnit = "month" )
type PriceNewParamsNewFloatingThresholdTotalAmountPriceModelType ¶ added in v0.2.0
type PriceNewParamsNewFloatingThresholdTotalAmountPriceModelType string
const (
PriceNewParamsNewFloatingThresholdTotalAmountPriceModelTypeThresholdTotalAmount PriceNewParamsNewFloatingThresholdTotalAmountPriceModelType = "threshold_total_amount"
)
func (PriceNewParamsNewFloatingThresholdTotalAmountPriceModelType) IsKnown ¶ added in v0.24.0
func (r PriceNewParamsNewFloatingThresholdTotalAmountPriceModelType) IsKnown() bool
type PriceNewParamsNewFloatingTieredBpsPrice ¶ added in v0.2.0
type PriceNewParamsNewFloatingTieredBpsPrice struct { // The cadence to bill for this price on. Cadence param.Field[PriceNewParamsNewFloatingTieredBpsPriceCadence] `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 plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[PriceNewParamsNewFloatingTieredBpsPriceModelType] `json:"model_type,required"` // The name of the price. Name param.Field[string] `json:"name,required"` TieredBpsConfig param.Field[PriceNewParamsNewFloatingTieredBpsPriceTieredBpsConfig] `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[PriceNewParamsNewFloatingTieredBpsPriceBillingCycleConfiguration] `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[PriceNewParamsNewFloatingTieredBpsPriceInvoicingCycleConfiguration] `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 (PriceNewParamsNewFloatingTieredBpsPrice) ImplementsPriceNewParams ¶ added in v0.2.0
func (PriceNewParamsNewFloatingTieredBpsPrice) ImplementsPriceNewParams()
func (PriceNewParamsNewFloatingTieredBpsPrice) MarshalJSON ¶ added in v0.2.0
func (r PriceNewParamsNewFloatingTieredBpsPrice) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingTieredBpsPriceBillingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingTieredBpsPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingTieredBpsPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PriceNewParamsNewFloatingTieredBpsPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingTieredBpsPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingTieredBpsPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingTieredBpsPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingTieredBpsPriceBillingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingTieredBpsPriceBillingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingTieredBpsPriceBillingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingTieredBpsPriceBillingCycleConfigurationDurationUnit = "month" )
func (PriceNewParamsNewFloatingTieredBpsPriceBillingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingTieredBpsPriceBillingCycleConfigurationDurationUnit) IsKnown() bool
type PriceNewParamsNewFloatingTieredBpsPriceCadence ¶ added in v0.2.0
type PriceNewParamsNewFloatingTieredBpsPriceCadence string
The cadence to bill for this price on.
const ( PriceNewParamsNewFloatingTieredBpsPriceCadenceAnnual PriceNewParamsNewFloatingTieredBpsPriceCadence = "annual" PriceNewParamsNewFloatingTieredBpsPriceCadenceSemiAnnual PriceNewParamsNewFloatingTieredBpsPriceCadence = "semi_annual" PriceNewParamsNewFloatingTieredBpsPriceCadenceMonthly PriceNewParamsNewFloatingTieredBpsPriceCadence = "monthly" PriceNewParamsNewFloatingTieredBpsPriceCadenceQuarterly PriceNewParamsNewFloatingTieredBpsPriceCadence = "quarterly" PriceNewParamsNewFloatingTieredBpsPriceCadenceOneTime PriceNewParamsNewFloatingTieredBpsPriceCadence = "one_time" PriceNewParamsNewFloatingTieredBpsPriceCadenceCustom PriceNewParamsNewFloatingTieredBpsPriceCadence = "custom" )
func (PriceNewParamsNewFloatingTieredBpsPriceCadence) IsKnown ¶ added in v0.24.0
func (r PriceNewParamsNewFloatingTieredBpsPriceCadence) IsKnown() bool
type PriceNewParamsNewFloatingTieredBpsPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingTieredBpsPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingTieredBpsPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PriceNewParamsNewFloatingTieredBpsPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingTieredBpsPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingTieredBpsPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingTieredBpsPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingTieredBpsPriceInvoicingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingTieredBpsPriceInvoicingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingTieredBpsPriceInvoicingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingTieredBpsPriceInvoicingCycleConfigurationDurationUnit = "month" )
type PriceNewParamsNewFloatingTieredBpsPriceModelType ¶ added in v0.2.0
type PriceNewParamsNewFloatingTieredBpsPriceModelType string
const (
PriceNewParamsNewFloatingTieredBpsPriceModelTypeTieredBps PriceNewParamsNewFloatingTieredBpsPriceModelType = "tiered_bps"
)
func (PriceNewParamsNewFloatingTieredBpsPriceModelType) IsKnown ¶ added in v0.24.0
func (r PriceNewParamsNewFloatingTieredBpsPriceModelType) IsKnown() bool
type PriceNewParamsNewFloatingTieredBpsPriceTieredBpsConfig ¶ added in v0.2.0
type PriceNewParamsNewFloatingTieredBpsPriceTieredBpsConfig struct { // Tiers for a Graduated BPS pricing model, where usage is bucketed into specified // tiers Tiers param.Field[[]PriceNewParamsNewFloatingTieredBpsPriceTieredBpsConfigTier] `json:"tiers,required"` }
func (PriceNewParamsNewFloatingTieredBpsPriceTieredBpsConfig) MarshalJSON ¶ added in v0.2.0
func (r PriceNewParamsNewFloatingTieredBpsPriceTieredBpsConfig) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingTieredBpsPriceTieredBpsConfigTier ¶ added in v0.2.0
type PriceNewParamsNewFloatingTieredBpsPriceTieredBpsConfigTier 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 (PriceNewParamsNewFloatingTieredBpsPriceTieredBpsConfigTier) MarshalJSON ¶ added in v0.2.0
func (r PriceNewParamsNewFloatingTieredBpsPriceTieredBpsConfigTier) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingTieredPackagePrice ¶ added in v0.2.0
type PriceNewParamsNewFloatingTieredPackagePrice struct { // The cadence to bill for this price on. Cadence param.Field[PriceNewParamsNewFloatingTieredPackagePriceCadence] `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 plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[PriceNewParamsNewFloatingTieredPackagePriceModelType] `json:"model_type,required"` // The name of the price. Name param.Field[string] `json:"name,required"` TieredPackageConfig param.Field[map[string]interface{}] `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[PriceNewParamsNewFloatingTieredPackagePriceBillingCycleConfiguration] `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[PriceNewParamsNewFloatingTieredPackagePriceInvoicingCycleConfiguration] `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 (PriceNewParamsNewFloatingTieredPackagePrice) ImplementsPriceNewParams ¶ added in v0.2.0
func (PriceNewParamsNewFloatingTieredPackagePrice) ImplementsPriceNewParams()
func (PriceNewParamsNewFloatingTieredPackagePrice) MarshalJSON ¶ added in v0.2.0
func (r PriceNewParamsNewFloatingTieredPackagePrice) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingTieredPackagePriceBillingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingTieredPackagePriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingTieredPackagePriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PriceNewParamsNewFloatingTieredPackagePriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingTieredPackagePriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingTieredPackagePriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingTieredPackagePriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingTieredPackagePriceBillingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingTieredPackagePriceBillingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingTieredPackagePriceBillingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingTieredPackagePriceBillingCycleConfigurationDurationUnit = "month" )
type PriceNewParamsNewFloatingTieredPackagePriceCadence ¶ added in v0.2.0
type PriceNewParamsNewFloatingTieredPackagePriceCadence string
The cadence to bill for this price on.
const ( PriceNewParamsNewFloatingTieredPackagePriceCadenceAnnual PriceNewParamsNewFloatingTieredPackagePriceCadence = "annual" PriceNewParamsNewFloatingTieredPackagePriceCadenceSemiAnnual PriceNewParamsNewFloatingTieredPackagePriceCadence = "semi_annual" PriceNewParamsNewFloatingTieredPackagePriceCadenceMonthly PriceNewParamsNewFloatingTieredPackagePriceCadence = "monthly" PriceNewParamsNewFloatingTieredPackagePriceCadenceQuarterly PriceNewParamsNewFloatingTieredPackagePriceCadence = "quarterly" PriceNewParamsNewFloatingTieredPackagePriceCadenceOneTime PriceNewParamsNewFloatingTieredPackagePriceCadence = "one_time" PriceNewParamsNewFloatingTieredPackagePriceCadenceCustom PriceNewParamsNewFloatingTieredPackagePriceCadence = "custom" )
func (PriceNewParamsNewFloatingTieredPackagePriceCadence) IsKnown ¶ added in v0.24.0
func (r PriceNewParamsNewFloatingTieredPackagePriceCadence) IsKnown() bool
type PriceNewParamsNewFloatingTieredPackagePriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingTieredPackagePriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingTieredPackagePriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PriceNewParamsNewFloatingTieredPackagePriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingTieredPackagePriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingTieredPackagePriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingTieredPackagePriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingTieredPackagePriceInvoicingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingTieredPackagePriceInvoicingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingTieredPackagePriceInvoicingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingTieredPackagePriceInvoicingCycleConfigurationDurationUnit = "month" )
type PriceNewParamsNewFloatingTieredPackagePriceModelType ¶ added in v0.2.0
type PriceNewParamsNewFloatingTieredPackagePriceModelType string
const (
PriceNewParamsNewFloatingTieredPackagePriceModelTypeTieredPackage PriceNewParamsNewFloatingTieredPackagePriceModelType = "tiered_package"
)
func (PriceNewParamsNewFloatingTieredPackagePriceModelType) IsKnown ¶ added in v0.24.0
func (r PriceNewParamsNewFloatingTieredPackagePriceModelType) IsKnown() bool
type PriceNewParamsNewFloatingTieredPackageWithMinimumPrice ¶ added in v0.20.0
type PriceNewParamsNewFloatingTieredPackageWithMinimumPrice struct { // The cadence to bill for this price on. Cadence param.Field[PriceNewParamsNewFloatingTieredPackageWithMinimumPriceCadence] `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 plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[PriceNewParamsNewFloatingTieredPackageWithMinimumPriceModelType] `json:"model_type,required"` // The name of the price. Name param.Field[string] `json:"name,required"` TieredPackageWithMinimumConfig param.Field[map[string]interface{}] `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[PriceNewParamsNewFloatingTieredPackageWithMinimumPriceBillingCycleConfiguration] `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[PriceNewParamsNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfiguration] `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 (PriceNewParamsNewFloatingTieredPackageWithMinimumPrice) ImplementsPriceNewParams ¶ added in v0.20.0
func (PriceNewParamsNewFloatingTieredPackageWithMinimumPrice) ImplementsPriceNewParams()
func (PriceNewParamsNewFloatingTieredPackageWithMinimumPrice) MarshalJSON ¶ added in v0.20.0
func (r PriceNewParamsNewFloatingTieredPackageWithMinimumPrice) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingTieredPackageWithMinimumPriceBillingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingTieredPackageWithMinimumPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingTieredPackageWithMinimumPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PriceNewParamsNewFloatingTieredPackageWithMinimumPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingTieredPackageWithMinimumPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingTieredPackageWithMinimumPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingTieredPackageWithMinimumPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingTieredPackageWithMinimumPriceBillingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingTieredPackageWithMinimumPriceBillingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingTieredPackageWithMinimumPriceBillingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingTieredPackageWithMinimumPriceBillingCycleConfigurationDurationUnit = "month" )
type PriceNewParamsNewFloatingTieredPackageWithMinimumPriceCadence ¶ added in v0.20.0
type PriceNewParamsNewFloatingTieredPackageWithMinimumPriceCadence string
The cadence to bill for this price on.
const ( PriceNewParamsNewFloatingTieredPackageWithMinimumPriceCadenceAnnual PriceNewParamsNewFloatingTieredPackageWithMinimumPriceCadence = "annual" PriceNewParamsNewFloatingTieredPackageWithMinimumPriceCadenceSemiAnnual PriceNewParamsNewFloatingTieredPackageWithMinimumPriceCadence = "semi_annual" PriceNewParamsNewFloatingTieredPackageWithMinimumPriceCadenceMonthly PriceNewParamsNewFloatingTieredPackageWithMinimumPriceCadence = "monthly" PriceNewParamsNewFloatingTieredPackageWithMinimumPriceCadenceQuarterly PriceNewParamsNewFloatingTieredPackageWithMinimumPriceCadence = "quarterly" PriceNewParamsNewFloatingTieredPackageWithMinimumPriceCadenceOneTime PriceNewParamsNewFloatingTieredPackageWithMinimumPriceCadence = "one_time" PriceNewParamsNewFloatingTieredPackageWithMinimumPriceCadenceCustom PriceNewParamsNewFloatingTieredPackageWithMinimumPriceCadence = "custom" )
func (PriceNewParamsNewFloatingTieredPackageWithMinimumPriceCadence) IsKnown ¶ added in v0.24.0
func (r PriceNewParamsNewFloatingTieredPackageWithMinimumPriceCadence) IsKnown() bool
type PriceNewParamsNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PriceNewParamsNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfigurationDurationUnit = "month" )
type PriceNewParamsNewFloatingTieredPackageWithMinimumPriceModelType ¶ added in v0.20.0
type PriceNewParamsNewFloatingTieredPackageWithMinimumPriceModelType string
const (
PriceNewParamsNewFloatingTieredPackageWithMinimumPriceModelTypeTieredPackageWithMinimum PriceNewParamsNewFloatingTieredPackageWithMinimumPriceModelType = "tiered_package_with_minimum"
)
func (PriceNewParamsNewFloatingTieredPackageWithMinimumPriceModelType) IsKnown ¶ added in v0.24.0
func (r PriceNewParamsNewFloatingTieredPackageWithMinimumPriceModelType) IsKnown() bool
type PriceNewParamsNewFloatingTieredPrice ¶ added in v0.2.0
type PriceNewParamsNewFloatingTieredPrice struct { // The cadence to bill for this price on. Cadence param.Field[PriceNewParamsNewFloatingTieredPriceCadence] `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 plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[PriceNewParamsNewFloatingTieredPriceModelType] `json:"model_type,required"` // The name of the price. Name param.Field[string] `json:"name,required"` TieredConfig param.Field[PriceNewParamsNewFloatingTieredPriceTieredConfig] `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[PriceNewParamsNewFloatingTieredPriceBillingCycleConfiguration] `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[PriceNewParamsNewFloatingTieredPriceInvoicingCycleConfiguration] `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 (PriceNewParamsNewFloatingTieredPrice) ImplementsPriceNewParams ¶ added in v0.2.0
func (PriceNewParamsNewFloatingTieredPrice) ImplementsPriceNewParams()
func (PriceNewParamsNewFloatingTieredPrice) MarshalJSON ¶ added in v0.2.0
func (r PriceNewParamsNewFloatingTieredPrice) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingTieredPriceBillingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingTieredPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingTieredPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PriceNewParamsNewFloatingTieredPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingTieredPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingTieredPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingTieredPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingTieredPriceBillingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingTieredPriceBillingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingTieredPriceBillingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingTieredPriceBillingCycleConfigurationDurationUnit = "month" )
func (PriceNewParamsNewFloatingTieredPriceBillingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingTieredPriceBillingCycleConfigurationDurationUnit) IsKnown() bool
type PriceNewParamsNewFloatingTieredPriceCadence ¶ added in v0.2.0
type PriceNewParamsNewFloatingTieredPriceCadence string
The cadence to bill for this price on.
const ( PriceNewParamsNewFloatingTieredPriceCadenceAnnual PriceNewParamsNewFloatingTieredPriceCadence = "annual" PriceNewParamsNewFloatingTieredPriceCadenceSemiAnnual PriceNewParamsNewFloatingTieredPriceCadence = "semi_annual" PriceNewParamsNewFloatingTieredPriceCadenceMonthly PriceNewParamsNewFloatingTieredPriceCadence = "monthly" PriceNewParamsNewFloatingTieredPriceCadenceQuarterly PriceNewParamsNewFloatingTieredPriceCadence = "quarterly" PriceNewParamsNewFloatingTieredPriceCadenceOneTime PriceNewParamsNewFloatingTieredPriceCadence = "one_time" PriceNewParamsNewFloatingTieredPriceCadenceCustom PriceNewParamsNewFloatingTieredPriceCadence = "custom" )
func (PriceNewParamsNewFloatingTieredPriceCadence) IsKnown ¶ added in v0.24.0
func (r PriceNewParamsNewFloatingTieredPriceCadence) IsKnown() bool
type PriceNewParamsNewFloatingTieredPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingTieredPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingTieredPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PriceNewParamsNewFloatingTieredPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingTieredPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingTieredPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingTieredPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingTieredPriceInvoicingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingTieredPriceInvoicingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingTieredPriceInvoicingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingTieredPriceInvoicingCycleConfigurationDurationUnit = "month" )
func (PriceNewParamsNewFloatingTieredPriceInvoicingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingTieredPriceInvoicingCycleConfigurationDurationUnit) IsKnown() bool
type PriceNewParamsNewFloatingTieredPriceModelType ¶ added in v0.2.0
type PriceNewParamsNewFloatingTieredPriceModelType string
const (
PriceNewParamsNewFloatingTieredPriceModelTypeTiered PriceNewParamsNewFloatingTieredPriceModelType = "tiered"
)
func (PriceNewParamsNewFloatingTieredPriceModelType) IsKnown ¶ added in v0.24.0
func (r PriceNewParamsNewFloatingTieredPriceModelType) IsKnown() bool
type PriceNewParamsNewFloatingTieredPriceTieredConfig ¶ added in v0.2.0
type PriceNewParamsNewFloatingTieredPriceTieredConfig struct { // Tiers for rating based on total usage quantities into the specified tier Tiers param.Field[[]PriceNewParamsNewFloatingTieredPriceTieredConfigTier] `json:"tiers,required"` }
func (PriceNewParamsNewFloatingTieredPriceTieredConfig) MarshalJSON ¶ added in v0.2.0
func (r PriceNewParamsNewFloatingTieredPriceTieredConfig) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingTieredPriceTieredConfigTier ¶ added in v0.2.0
type PriceNewParamsNewFloatingTieredPriceTieredConfigTier 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 (PriceNewParamsNewFloatingTieredPriceTieredConfigTier) MarshalJSON ¶ added in v0.2.0
func (r PriceNewParamsNewFloatingTieredPriceTieredConfigTier) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingTieredWithMinimumPrice ¶ added in v0.2.0
type PriceNewParamsNewFloatingTieredWithMinimumPrice struct { // The cadence to bill for this price on. Cadence param.Field[PriceNewParamsNewFloatingTieredWithMinimumPriceCadence] `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 plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[PriceNewParamsNewFloatingTieredWithMinimumPriceModelType] `json:"model_type,required"` // The name of the price. Name param.Field[string] `json:"name,required"` TieredWithMinimumConfig param.Field[map[string]interface{}] `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[PriceNewParamsNewFloatingTieredWithMinimumPriceBillingCycleConfiguration] `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[PriceNewParamsNewFloatingTieredWithMinimumPriceInvoicingCycleConfiguration] `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 (PriceNewParamsNewFloatingTieredWithMinimumPrice) ImplementsPriceNewParams ¶ added in v0.2.0
func (PriceNewParamsNewFloatingTieredWithMinimumPrice) ImplementsPriceNewParams()
func (PriceNewParamsNewFloatingTieredWithMinimumPrice) MarshalJSON ¶ added in v0.2.0
func (r PriceNewParamsNewFloatingTieredWithMinimumPrice) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingTieredWithMinimumPriceBillingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingTieredWithMinimumPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingTieredWithMinimumPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PriceNewParamsNewFloatingTieredWithMinimumPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingTieredWithMinimumPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingTieredWithMinimumPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingTieredWithMinimumPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingTieredWithMinimumPriceBillingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingTieredWithMinimumPriceBillingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingTieredWithMinimumPriceBillingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingTieredWithMinimumPriceBillingCycleConfigurationDurationUnit = "month" )
type PriceNewParamsNewFloatingTieredWithMinimumPriceCadence ¶ added in v0.2.0
type PriceNewParamsNewFloatingTieredWithMinimumPriceCadence string
The cadence to bill for this price on.
const ( PriceNewParamsNewFloatingTieredWithMinimumPriceCadenceAnnual PriceNewParamsNewFloatingTieredWithMinimumPriceCadence = "annual" PriceNewParamsNewFloatingTieredWithMinimumPriceCadenceSemiAnnual PriceNewParamsNewFloatingTieredWithMinimumPriceCadence = "semi_annual" PriceNewParamsNewFloatingTieredWithMinimumPriceCadenceMonthly PriceNewParamsNewFloatingTieredWithMinimumPriceCadence = "monthly" PriceNewParamsNewFloatingTieredWithMinimumPriceCadenceQuarterly PriceNewParamsNewFloatingTieredWithMinimumPriceCadence = "quarterly" PriceNewParamsNewFloatingTieredWithMinimumPriceCadenceOneTime PriceNewParamsNewFloatingTieredWithMinimumPriceCadence = "one_time" PriceNewParamsNewFloatingTieredWithMinimumPriceCadenceCustom PriceNewParamsNewFloatingTieredWithMinimumPriceCadence = "custom" )
func (PriceNewParamsNewFloatingTieredWithMinimumPriceCadence) IsKnown ¶ added in v0.24.0
func (r PriceNewParamsNewFloatingTieredWithMinimumPriceCadence) IsKnown() bool
type PriceNewParamsNewFloatingTieredWithMinimumPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingTieredWithMinimumPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingTieredWithMinimumPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PriceNewParamsNewFloatingTieredWithMinimumPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingTieredWithMinimumPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingTieredWithMinimumPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingTieredWithMinimumPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingTieredWithMinimumPriceInvoicingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingTieredWithMinimumPriceInvoicingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingTieredWithMinimumPriceInvoicingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingTieredWithMinimumPriceInvoicingCycleConfigurationDurationUnit = "month" )
type PriceNewParamsNewFloatingTieredWithMinimumPriceModelType ¶ added in v0.2.0
type PriceNewParamsNewFloatingTieredWithMinimumPriceModelType string
const (
PriceNewParamsNewFloatingTieredWithMinimumPriceModelTypeTieredWithMinimum PriceNewParamsNewFloatingTieredWithMinimumPriceModelType = "tiered_with_minimum"
)
func (PriceNewParamsNewFloatingTieredWithMinimumPriceModelType) IsKnown ¶ added in v0.24.0
func (r PriceNewParamsNewFloatingTieredWithMinimumPriceModelType) IsKnown() bool
type PriceNewParamsNewFloatingTieredWithProrationPrice ¶ added in v0.34.0
type PriceNewParamsNewFloatingTieredWithProrationPrice struct { // The cadence to bill for this price on. Cadence param.Field[PriceNewParamsNewFloatingTieredWithProrationPriceCadence] `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 plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[PriceNewParamsNewFloatingTieredWithProrationPriceModelType] `json:"model_type,required"` // The name of the price. Name param.Field[string] `json:"name,required"` TieredWithProrationConfig param.Field[map[string]interface{}] `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[PriceNewParamsNewFloatingTieredWithProrationPriceBillingCycleConfiguration] `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[PriceNewParamsNewFloatingTieredWithProrationPriceInvoicingCycleConfiguration] `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 (PriceNewParamsNewFloatingTieredWithProrationPrice) ImplementsPriceNewParams ¶ added in v0.34.0
func (PriceNewParamsNewFloatingTieredWithProrationPrice) ImplementsPriceNewParams()
func (PriceNewParamsNewFloatingTieredWithProrationPrice) MarshalJSON ¶ added in v0.34.0
func (r PriceNewParamsNewFloatingTieredWithProrationPrice) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingTieredWithProrationPriceBillingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingTieredWithProrationPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingTieredWithProrationPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PriceNewParamsNewFloatingTieredWithProrationPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingTieredWithProrationPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingTieredWithProrationPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingTieredWithProrationPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingTieredWithProrationPriceBillingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingTieredWithProrationPriceBillingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingTieredWithProrationPriceBillingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingTieredWithProrationPriceBillingCycleConfigurationDurationUnit = "month" )
type PriceNewParamsNewFloatingTieredWithProrationPriceCadence ¶ added in v0.34.0
type PriceNewParamsNewFloatingTieredWithProrationPriceCadence string
The cadence to bill for this price on.
const ( PriceNewParamsNewFloatingTieredWithProrationPriceCadenceAnnual PriceNewParamsNewFloatingTieredWithProrationPriceCadence = "annual" PriceNewParamsNewFloatingTieredWithProrationPriceCadenceSemiAnnual PriceNewParamsNewFloatingTieredWithProrationPriceCadence = "semi_annual" PriceNewParamsNewFloatingTieredWithProrationPriceCadenceMonthly PriceNewParamsNewFloatingTieredWithProrationPriceCadence = "monthly" PriceNewParamsNewFloatingTieredWithProrationPriceCadenceQuarterly PriceNewParamsNewFloatingTieredWithProrationPriceCadence = "quarterly" PriceNewParamsNewFloatingTieredWithProrationPriceCadenceOneTime PriceNewParamsNewFloatingTieredWithProrationPriceCadence = "one_time" PriceNewParamsNewFloatingTieredWithProrationPriceCadenceCustom PriceNewParamsNewFloatingTieredWithProrationPriceCadence = "custom" )
func (PriceNewParamsNewFloatingTieredWithProrationPriceCadence) IsKnown ¶ added in v0.34.0
func (r PriceNewParamsNewFloatingTieredWithProrationPriceCadence) IsKnown() bool
type PriceNewParamsNewFloatingTieredWithProrationPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingTieredWithProrationPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingTieredWithProrationPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PriceNewParamsNewFloatingTieredWithProrationPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingTieredWithProrationPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingTieredWithProrationPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingTieredWithProrationPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingTieredWithProrationPriceInvoicingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingTieredWithProrationPriceInvoicingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingTieredWithProrationPriceInvoicingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingTieredWithProrationPriceInvoicingCycleConfigurationDurationUnit = "month" )
type PriceNewParamsNewFloatingTieredWithProrationPriceModelType ¶ added in v0.34.0
type PriceNewParamsNewFloatingTieredWithProrationPriceModelType string
const (
PriceNewParamsNewFloatingTieredWithProrationPriceModelTypeTieredWithProration PriceNewParamsNewFloatingTieredWithProrationPriceModelType = "tiered_with_proration"
)
func (PriceNewParamsNewFloatingTieredWithProrationPriceModelType) IsKnown ¶ added in v0.34.0
func (r PriceNewParamsNewFloatingTieredWithProrationPriceModelType) IsKnown() bool
type PriceNewParamsNewFloatingUnitPrice ¶ added in v0.2.0
type PriceNewParamsNewFloatingUnitPrice struct { // The cadence to bill for this price on. Cadence param.Field[PriceNewParamsNewFloatingUnitPriceCadence] `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 plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[PriceNewParamsNewFloatingUnitPriceModelType] `json:"model_type,required"` // The name of the price. Name param.Field[string] `json:"name,required"` UnitConfig param.Field[PriceNewParamsNewFloatingUnitPriceUnitConfig] `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[PriceNewParamsNewFloatingUnitPriceBillingCycleConfiguration] `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[PriceNewParamsNewFloatingUnitPriceInvoicingCycleConfiguration] `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 (PriceNewParamsNewFloatingUnitPrice) ImplementsPriceNewParams ¶ added in v0.2.0
func (PriceNewParamsNewFloatingUnitPrice) ImplementsPriceNewParams()
func (PriceNewParamsNewFloatingUnitPrice) MarshalJSON ¶ added in v0.2.0
func (r PriceNewParamsNewFloatingUnitPrice) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingUnitPriceBillingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingUnitPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingUnitPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PriceNewParamsNewFloatingUnitPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingUnitPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingUnitPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingUnitPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingUnitPriceBillingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingUnitPriceBillingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingUnitPriceBillingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingUnitPriceBillingCycleConfigurationDurationUnit = "month" )
func (PriceNewParamsNewFloatingUnitPriceBillingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingUnitPriceBillingCycleConfigurationDurationUnit) IsKnown() bool
type PriceNewParamsNewFloatingUnitPriceCadence ¶ added in v0.2.0
type PriceNewParamsNewFloatingUnitPriceCadence string
The cadence to bill for this price on.
const ( PriceNewParamsNewFloatingUnitPriceCadenceAnnual PriceNewParamsNewFloatingUnitPriceCadence = "annual" PriceNewParamsNewFloatingUnitPriceCadenceSemiAnnual PriceNewParamsNewFloatingUnitPriceCadence = "semi_annual" PriceNewParamsNewFloatingUnitPriceCadenceMonthly PriceNewParamsNewFloatingUnitPriceCadence = "monthly" PriceNewParamsNewFloatingUnitPriceCadenceQuarterly PriceNewParamsNewFloatingUnitPriceCadence = "quarterly" PriceNewParamsNewFloatingUnitPriceCadenceOneTime PriceNewParamsNewFloatingUnitPriceCadence = "one_time" PriceNewParamsNewFloatingUnitPriceCadenceCustom PriceNewParamsNewFloatingUnitPriceCadence = "custom" )
func (PriceNewParamsNewFloatingUnitPriceCadence) IsKnown ¶ added in v0.24.0
func (r PriceNewParamsNewFloatingUnitPriceCadence) IsKnown() bool
type PriceNewParamsNewFloatingUnitPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingUnitPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingUnitPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PriceNewParamsNewFloatingUnitPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingUnitPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingUnitPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingUnitPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingUnitPriceInvoicingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingUnitPriceInvoicingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingUnitPriceInvoicingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingUnitPriceInvoicingCycleConfigurationDurationUnit = "month" )
func (PriceNewParamsNewFloatingUnitPriceInvoicingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingUnitPriceInvoicingCycleConfigurationDurationUnit) IsKnown() bool
type PriceNewParamsNewFloatingUnitPriceModelType ¶ added in v0.2.0
type PriceNewParamsNewFloatingUnitPriceModelType string
const (
PriceNewParamsNewFloatingUnitPriceModelTypeUnit PriceNewParamsNewFloatingUnitPriceModelType = "unit"
)
func (PriceNewParamsNewFloatingUnitPriceModelType) IsKnown ¶ added in v0.24.0
func (r PriceNewParamsNewFloatingUnitPriceModelType) IsKnown() bool
type PriceNewParamsNewFloatingUnitPriceUnitConfig ¶ added in v0.2.0
type PriceNewParamsNewFloatingUnitPriceUnitConfig struct { // Rate per unit of usage UnitAmount param.Field[string] `json:"unit_amount,required"` }
func (PriceNewParamsNewFloatingUnitPriceUnitConfig) MarshalJSON ¶ added in v0.2.0
func (r PriceNewParamsNewFloatingUnitPriceUnitConfig) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingUnitWithPercentPrice ¶ added in v0.20.0
type PriceNewParamsNewFloatingUnitWithPercentPrice struct { // The cadence to bill for this price on. Cadence param.Field[PriceNewParamsNewFloatingUnitWithPercentPriceCadence] `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 plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[PriceNewParamsNewFloatingUnitWithPercentPriceModelType] `json:"model_type,required"` // The name of the price. Name param.Field[string] `json:"name,required"` UnitWithPercentConfig param.Field[map[string]interface{}] `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[PriceNewParamsNewFloatingUnitWithPercentPriceBillingCycleConfiguration] `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[PriceNewParamsNewFloatingUnitWithPercentPriceInvoicingCycleConfiguration] `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 (PriceNewParamsNewFloatingUnitWithPercentPrice) ImplementsPriceNewParams ¶ added in v0.20.0
func (PriceNewParamsNewFloatingUnitWithPercentPrice) ImplementsPriceNewParams()
func (PriceNewParamsNewFloatingUnitWithPercentPrice) MarshalJSON ¶ added in v0.20.0
func (r PriceNewParamsNewFloatingUnitWithPercentPrice) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingUnitWithPercentPriceBillingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingUnitWithPercentPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingUnitWithPercentPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PriceNewParamsNewFloatingUnitWithPercentPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingUnitWithPercentPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingUnitWithPercentPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingUnitWithPercentPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingUnitWithPercentPriceBillingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingUnitWithPercentPriceBillingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingUnitWithPercentPriceBillingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingUnitWithPercentPriceBillingCycleConfigurationDurationUnit = "month" )
type PriceNewParamsNewFloatingUnitWithPercentPriceCadence ¶ added in v0.20.0
type PriceNewParamsNewFloatingUnitWithPercentPriceCadence string
The cadence to bill for this price on.
const ( PriceNewParamsNewFloatingUnitWithPercentPriceCadenceAnnual PriceNewParamsNewFloatingUnitWithPercentPriceCadence = "annual" PriceNewParamsNewFloatingUnitWithPercentPriceCadenceSemiAnnual PriceNewParamsNewFloatingUnitWithPercentPriceCadence = "semi_annual" PriceNewParamsNewFloatingUnitWithPercentPriceCadenceMonthly PriceNewParamsNewFloatingUnitWithPercentPriceCadence = "monthly" PriceNewParamsNewFloatingUnitWithPercentPriceCadenceQuarterly PriceNewParamsNewFloatingUnitWithPercentPriceCadence = "quarterly" PriceNewParamsNewFloatingUnitWithPercentPriceCadenceOneTime PriceNewParamsNewFloatingUnitWithPercentPriceCadence = "one_time" PriceNewParamsNewFloatingUnitWithPercentPriceCadenceCustom PriceNewParamsNewFloatingUnitWithPercentPriceCadence = "custom" )
func (PriceNewParamsNewFloatingUnitWithPercentPriceCadence) IsKnown ¶ added in v0.24.0
func (r PriceNewParamsNewFloatingUnitWithPercentPriceCadence) IsKnown() bool
type PriceNewParamsNewFloatingUnitWithPercentPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingUnitWithPercentPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingUnitWithPercentPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PriceNewParamsNewFloatingUnitWithPercentPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingUnitWithPercentPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingUnitWithPercentPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingUnitWithPercentPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingUnitWithPercentPriceInvoicingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingUnitWithPercentPriceInvoicingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingUnitWithPercentPriceInvoicingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingUnitWithPercentPriceInvoicingCycleConfigurationDurationUnit = "month" )
type PriceNewParamsNewFloatingUnitWithPercentPriceModelType ¶ added in v0.20.0
type PriceNewParamsNewFloatingUnitWithPercentPriceModelType string
const (
PriceNewParamsNewFloatingUnitWithPercentPriceModelTypeUnitWithPercent PriceNewParamsNewFloatingUnitWithPercentPriceModelType = "unit_with_percent"
)
func (PriceNewParamsNewFloatingUnitWithPercentPriceModelType) IsKnown ¶ added in v0.24.0
func (r PriceNewParamsNewFloatingUnitWithPercentPriceModelType) IsKnown() bool
type PriceNewParamsNewFloatingUnitWithProrationPrice ¶ added in v0.34.0
type PriceNewParamsNewFloatingUnitWithProrationPrice struct { // The cadence to bill for this price on. Cadence param.Field[PriceNewParamsNewFloatingUnitWithProrationPriceCadence] `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 plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[PriceNewParamsNewFloatingUnitWithProrationPriceModelType] `json:"model_type,required"` // The name of the price. Name param.Field[string] `json:"name,required"` UnitWithProrationConfig param.Field[map[string]interface{}] `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[PriceNewParamsNewFloatingUnitWithProrationPriceBillingCycleConfiguration] `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[PriceNewParamsNewFloatingUnitWithProrationPriceInvoicingCycleConfiguration] `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 (PriceNewParamsNewFloatingUnitWithProrationPrice) ImplementsPriceNewParams ¶ added in v0.34.0
func (PriceNewParamsNewFloatingUnitWithProrationPrice) ImplementsPriceNewParams()
func (PriceNewParamsNewFloatingUnitWithProrationPrice) MarshalJSON ¶ added in v0.34.0
func (r PriceNewParamsNewFloatingUnitWithProrationPrice) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingUnitWithProrationPriceBillingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingUnitWithProrationPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingUnitWithProrationPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (PriceNewParamsNewFloatingUnitWithProrationPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingUnitWithProrationPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingUnitWithProrationPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingUnitWithProrationPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingUnitWithProrationPriceBillingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingUnitWithProrationPriceBillingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingUnitWithProrationPriceBillingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingUnitWithProrationPriceBillingCycleConfigurationDurationUnit = "month" )
type PriceNewParamsNewFloatingUnitWithProrationPriceCadence ¶ added in v0.34.0
type PriceNewParamsNewFloatingUnitWithProrationPriceCadence string
The cadence to bill for this price on.
const ( PriceNewParamsNewFloatingUnitWithProrationPriceCadenceAnnual PriceNewParamsNewFloatingUnitWithProrationPriceCadence = "annual" PriceNewParamsNewFloatingUnitWithProrationPriceCadenceSemiAnnual PriceNewParamsNewFloatingUnitWithProrationPriceCadence = "semi_annual" PriceNewParamsNewFloatingUnitWithProrationPriceCadenceMonthly PriceNewParamsNewFloatingUnitWithProrationPriceCadence = "monthly" PriceNewParamsNewFloatingUnitWithProrationPriceCadenceQuarterly PriceNewParamsNewFloatingUnitWithProrationPriceCadence = "quarterly" PriceNewParamsNewFloatingUnitWithProrationPriceCadenceOneTime PriceNewParamsNewFloatingUnitWithProrationPriceCadence = "one_time" PriceNewParamsNewFloatingUnitWithProrationPriceCadenceCustom PriceNewParamsNewFloatingUnitWithProrationPriceCadence = "custom" )
func (PriceNewParamsNewFloatingUnitWithProrationPriceCadence) IsKnown ¶ added in v0.34.0
func (r PriceNewParamsNewFloatingUnitWithProrationPriceCadence) IsKnown() bool
type PriceNewParamsNewFloatingUnitWithProrationPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PriceNewParamsNewFloatingUnitWithProrationPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[PriceNewParamsNewFloatingUnitWithProrationPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (PriceNewParamsNewFloatingUnitWithProrationPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r PriceNewParamsNewFloatingUnitWithProrationPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type PriceNewParamsNewFloatingUnitWithProrationPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceNewParamsNewFloatingUnitWithProrationPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( PriceNewParamsNewFloatingUnitWithProrationPriceInvoicingCycleConfigurationDurationUnitDay PriceNewParamsNewFloatingUnitWithProrationPriceInvoicingCycleConfigurationDurationUnit = "day" PriceNewParamsNewFloatingUnitWithProrationPriceInvoicingCycleConfigurationDurationUnitMonth PriceNewParamsNewFloatingUnitWithProrationPriceInvoicingCycleConfigurationDurationUnit = "month" )
type PriceNewParamsNewFloatingUnitWithProrationPriceModelType ¶ added in v0.34.0
type PriceNewParamsNewFloatingUnitWithProrationPriceModelType string
const (
PriceNewParamsNewFloatingUnitWithProrationPriceModelTypeUnitWithProration PriceNewParamsNewFloatingUnitWithProrationPriceModelType = "unit_with_proration"
)
func (PriceNewParamsNewFloatingUnitWithProrationPriceModelType) IsKnown ¶ added in v0.34.0
func (r PriceNewParamsNewFloatingUnitWithProrationPriceModelType) IsKnown() bool
type PricePackagePrice ¶
type PricePackagePrice struct { ID string `json:"id,required"` BillableMetric PricePackagePriceBillableMetric `json:"billable_metric,required,nullable"` BillingCycleConfiguration PricePackagePriceBillingCycleConfiguration `json:"billing_cycle_configuration,required"` Cadence PricePackagePriceCadence `json:"cadence,required"` ConversionRate float64 `json:"conversion_rate,required,nullable"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditAllocation PricePackagePriceCreditAllocation `json:"credit_allocation,required,nullable"` Currency string `json:"currency,required"` Discount shared.Discount `json:"discount,required,nullable"` ExternalPriceID string `json:"external_price_id,required,nullable"` FixedPriceQuantity float64 `json:"fixed_price_quantity,required,nullable"` InvoicingCycleConfiguration PricePackagePriceInvoicingCycleConfiguration `json:"invoicing_cycle_configuration,required,nullable"` Item PricePackagePriceItem `json:"item,required"` Maximum PricePackagePriceMaximum `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 PricePackagePriceMinimum `json:"minimum,required,nullable"` MinimumAmount string `json:"minimum_amount,required,nullable"` ModelType PricePackagePriceModelType `json:"model_type,required"` Name string `json:"name,required"` PackageConfig PricePackagePricePackageConfig `json:"package_config,required"` PlanPhaseOrder int64 `json:"plan_phase_order,required,nullable"` PriceType PricePackagePricePriceType `json:"price_type,required"` JSON pricePackagePriceJSON `json:"-"` }
func (*PricePackagePrice) UnmarshalJSON ¶
func (r *PricePackagePrice) UnmarshalJSON(data []byte) (err error)
type PricePackagePriceBillableMetric ¶
type PricePackagePriceBillableMetric struct { ID string `json:"id,required"` JSON pricePackagePriceBillableMetricJSON `json:"-"` }
func (*PricePackagePriceBillableMetric) UnmarshalJSON ¶
func (r *PricePackagePriceBillableMetric) UnmarshalJSON(data []byte) (err error)
type PricePackagePriceBillingCycleConfiguration ¶ added in v0.44.0
type PricePackagePriceBillingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PricePackagePriceBillingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON pricePackagePriceBillingCycleConfigurationJSON `json:"-"` }
func (*PricePackagePriceBillingCycleConfiguration) UnmarshalJSON ¶ added in v0.44.0
func (r *PricePackagePriceBillingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PricePackagePriceBillingCycleConfigurationDurationUnit ¶ added in v0.44.0
type PricePackagePriceBillingCycleConfigurationDurationUnit string
const ( PricePackagePriceBillingCycleConfigurationDurationUnitDay PricePackagePriceBillingCycleConfigurationDurationUnit = "day" PricePackagePriceBillingCycleConfigurationDurationUnitMonth PricePackagePriceBillingCycleConfigurationDurationUnit = "month" )
func (PricePackagePriceBillingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.44.0
func (r PricePackagePriceBillingCycleConfigurationDurationUnit) IsKnown() bool
type PricePackagePriceCadence ¶
type PricePackagePriceCadence string
const ( PricePackagePriceCadenceOneTime PricePackagePriceCadence = "one_time" PricePackagePriceCadenceMonthly PricePackagePriceCadence = "monthly" PricePackagePriceCadenceQuarterly PricePackagePriceCadence = "quarterly" PricePackagePriceCadenceSemiAnnual PricePackagePriceCadence = "semi_annual" PricePackagePriceCadenceAnnual PricePackagePriceCadence = "annual" PricePackagePriceCadenceCustom PricePackagePriceCadence = "custom" )
func (PricePackagePriceCadence) IsKnown ¶ added in v0.24.0
func (r PricePackagePriceCadence) IsKnown() bool
type PricePackagePriceCreditAllocation ¶ added in v0.25.0
type PricePackagePriceCreditAllocation struct { AllowsRollover bool `json:"allows_rollover,required"` Currency string `json:"currency,required"` JSON pricePackagePriceCreditAllocationJSON `json:"-"` }
func (*PricePackagePriceCreditAllocation) UnmarshalJSON ¶ added in v0.25.0
func (r *PricePackagePriceCreditAllocation) UnmarshalJSON(data []byte) (err error)
type PricePackagePriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PricePackagePriceInvoicingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PricePackagePriceInvoicingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON pricePackagePriceInvoicingCycleConfigurationJSON `json:"-"` }
func (*PricePackagePriceInvoicingCycleConfiguration) UnmarshalJSON ¶ added in v0.56.0
func (r *PricePackagePriceInvoicingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PricePackagePriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PricePackagePriceInvoicingCycleConfigurationDurationUnit string
const ( PricePackagePriceInvoicingCycleConfigurationDurationUnitDay PricePackagePriceInvoicingCycleConfigurationDurationUnit = "day" PricePackagePriceInvoicingCycleConfigurationDurationUnitMonth PricePackagePriceInvoicingCycleConfigurationDurationUnit = "month" )
func (PricePackagePriceInvoicingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PricePackagePriceInvoicingCycleConfigurationDurationUnit) IsKnown() bool
type PricePackagePriceItem ¶
type PricePackagePriceItem struct { ID string `json:"id,required"` Name string `json:"name,required"` JSON pricePackagePriceItemJSON `json:"-"` }
func (*PricePackagePriceItem) UnmarshalJSON ¶
func (r *PricePackagePriceItem) UnmarshalJSON(data []byte) (err error)
type PricePackagePriceMaximum ¶
type PricePackagePriceMaximum 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 pricePackagePriceMaximumJSON `json:"-"` }
func (*PricePackagePriceMaximum) UnmarshalJSON ¶
func (r *PricePackagePriceMaximum) UnmarshalJSON(data []byte) (err error)
type PricePackagePriceMinimum ¶
type PricePackagePriceMinimum 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 pricePackagePriceMinimumJSON `json:"-"` }
func (*PricePackagePriceMinimum) UnmarshalJSON ¶
func (r *PricePackagePriceMinimum) UnmarshalJSON(data []byte) (err error)
type PricePackagePriceModelType ¶
type PricePackagePriceModelType string
const (
PricePackagePriceModelTypePackage PricePackagePriceModelType = "package"
)
func (PricePackagePriceModelType) IsKnown ¶ added in v0.24.0
func (r PricePackagePriceModelType) IsKnown() bool
type PricePackagePricePackageConfig ¶
type PricePackagePricePackageConfig 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 pricePackagePricePackageConfigJSON `json:"-"` }
func (*PricePackagePricePackageConfig) UnmarshalJSON ¶
func (r *PricePackagePricePackageConfig) UnmarshalJSON(data []byte) (err error)
type PricePackagePricePriceType ¶
type PricePackagePricePriceType string
const ( PricePackagePricePriceTypeUsagePrice PricePackagePricePriceType = "usage_price" PricePackagePricePriceTypeFixedPrice PricePackagePricePriceType = "fixed_price" )
func (PricePackagePricePriceType) IsKnown ¶ added in v0.24.0
func (r PricePackagePricePriceType) IsKnown() bool
type PricePackageWithAllocationPrice ¶
type PricePackageWithAllocationPrice struct { ID string `json:"id,required"` BillableMetric PricePackageWithAllocationPriceBillableMetric `json:"billable_metric,required,nullable"` BillingCycleConfiguration PricePackageWithAllocationPriceBillingCycleConfiguration `json:"billing_cycle_configuration,required"` Cadence PricePackageWithAllocationPriceCadence `json:"cadence,required"` ConversionRate float64 `json:"conversion_rate,required,nullable"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditAllocation PricePackageWithAllocationPriceCreditAllocation `json:"credit_allocation,required,nullable"` Currency string `json:"currency,required"` Discount shared.Discount `json:"discount,required,nullable"` ExternalPriceID string `json:"external_price_id,required,nullable"` FixedPriceQuantity float64 `json:"fixed_price_quantity,required,nullable"` InvoicingCycleConfiguration PricePackageWithAllocationPriceInvoicingCycleConfiguration `json:"invoicing_cycle_configuration,required,nullable"` Item PricePackageWithAllocationPriceItem `json:"item,required"` Maximum PricePackageWithAllocationPriceMaximum `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 PricePackageWithAllocationPriceMinimum `json:"minimum,required,nullable"` MinimumAmount string `json:"minimum_amount,required,nullable"` ModelType PricePackageWithAllocationPriceModelType `json:"model_type,required"` Name string `json:"name,required"` PackageWithAllocationConfig map[string]interface{} `json:"package_with_allocation_config,required"` PlanPhaseOrder int64 `json:"plan_phase_order,required,nullable"` PriceType PricePackageWithAllocationPricePriceType `json:"price_type,required"` JSON pricePackageWithAllocationPriceJSON `json:"-"` }
func (*PricePackageWithAllocationPrice) UnmarshalJSON ¶
func (r *PricePackageWithAllocationPrice) UnmarshalJSON(data []byte) (err error)
type PricePackageWithAllocationPriceBillableMetric ¶
type PricePackageWithAllocationPriceBillableMetric struct { ID string `json:"id,required"` JSON pricePackageWithAllocationPriceBillableMetricJSON `json:"-"` }
func (*PricePackageWithAllocationPriceBillableMetric) UnmarshalJSON ¶
func (r *PricePackageWithAllocationPriceBillableMetric) UnmarshalJSON(data []byte) (err error)
type PricePackageWithAllocationPriceBillingCycleConfiguration ¶ added in v0.44.0
type PricePackageWithAllocationPriceBillingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PricePackageWithAllocationPriceBillingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON pricePackageWithAllocationPriceBillingCycleConfigurationJSON `json:"-"` }
func (*PricePackageWithAllocationPriceBillingCycleConfiguration) UnmarshalJSON ¶ added in v0.44.0
func (r *PricePackageWithAllocationPriceBillingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PricePackageWithAllocationPriceBillingCycleConfigurationDurationUnit ¶ added in v0.44.0
type PricePackageWithAllocationPriceBillingCycleConfigurationDurationUnit string
const ( PricePackageWithAllocationPriceBillingCycleConfigurationDurationUnitDay PricePackageWithAllocationPriceBillingCycleConfigurationDurationUnit = "day" PricePackageWithAllocationPriceBillingCycleConfigurationDurationUnitMonth PricePackageWithAllocationPriceBillingCycleConfigurationDurationUnit = "month" )
func (PricePackageWithAllocationPriceBillingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.44.0
func (r PricePackageWithAllocationPriceBillingCycleConfigurationDurationUnit) IsKnown() bool
type PricePackageWithAllocationPriceCadence ¶
type PricePackageWithAllocationPriceCadence string
const ( PricePackageWithAllocationPriceCadenceOneTime PricePackageWithAllocationPriceCadence = "one_time" PricePackageWithAllocationPriceCadenceMonthly PricePackageWithAllocationPriceCadence = "monthly" PricePackageWithAllocationPriceCadenceQuarterly PricePackageWithAllocationPriceCadence = "quarterly" PricePackageWithAllocationPriceCadenceSemiAnnual PricePackageWithAllocationPriceCadence = "semi_annual" PricePackageWithAllocationPriceCadenceAnnual PricePackageWithAllocationPriceCadence = "annual" PricePackageWithAllocationPriceCadenceCustom PricePackageWithAllocationPriceCadence = "custom" )
func (PricePackageWithAllocationPriceCadence) IsKnown ¶ added in v0.24.0
func (r PricePackageWithAllocationPriceCadence) IsKnown() bool
type PricePackageWithAllocationPriceCreditAllocation ¶ added in v0.25.0
type PricePackageWithAllocationPriceCreditAllocation struct { AllowsRollover bool `json:"allows_rollover,required"` Currency string `json:"currency,required"` JSON pricePackageWithAllocationPriceCreditAllocationJSON `json:"-"` }
func (*PricePackageWithAllocationPriceCreditAllocation) UnmarshalJSON ¶ added in v0.25.0
func (r *PricePackageWithAllocationPriceCreditAllocation) UnmarshalJSON(data []byte) (err error)
type PricePackageWithAllocationPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PricePackageWithAllocationPriceInvoicingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PricePackageWithAllocationPriceInvoicingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON pricePackageWithAllocationPriceInvoicingCycleConfigurationJSON `json:"-"` }
func (*PricePackageWithAllocationPriceInvoicingCycleConfiguration) UnmarshalJSON ¶ added in v0.56.0
func (r *PricePackageWithAllocationPriceInvoicingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PricePackageWithAllocationPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PricePackageWithAllocationPriceInvoicingCycleConfigurationDurationUnit string
const ( PricePackageWithAllocationPriceInvoicingCycleConfigurationDurationUnitDay PricePackageWithAllocationPriceInvoicingCycleConfigurationDurationUnit = "day" PricePackageWithAllocationPriceInvoicingCycleConfigurationDurationUnitMonth PricePackageWithAllocationPriceInvoicingCycleConfigurationDurationUnit = "month" )
func (PricePackageWithAllocationPriceInvoicingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PricePackageWithAllocationPriceInvoicingCycleConfigurationDurationUnit) IsKnown() bool
type PricePackageWithAllocationPriceItem ¶
type PricePackageWithAllocationPriceItem struct { ID string `json:"id,required"` Name string `json:"name,required"` JSON pricePackageWithAllocationPriceItemJSON `json:"-"` }
func (*PricePackageWithAllocationPriceItem) UnmarshalJSON ¶
func (r *PricePackageWithAllocationPriceItem) UnmarshalJSON(data []byte) (err error)
type PricePackageWithAllocationPriceMaximum ¶
type PricePackageWithAllocationPriceMaximum 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 pricePackageWithAllocationPriceMaximumJSON `json:"-"` }
func (*PricePackageWithAllocationPriceMaximum) UnmarshalJSON ¶
func (r *PricePackageWithAllocationPriceMaximum) UnmarshalJSON(data []byte) (err error)
type PricePackageWithAllocationPriceMinimum ¶
type PricePackageWithAllocationPriceMinimum 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 pricePackageWithAllocationPriceMinimumJSON `json:"-"` }
func (*PricePackageWithAllocationPriceMinimum) UnmarshalJSON ¶
func (r *PricePackageWithAllocationPriceMinimum) UnmarshalJSON(data []byte) (err error)
type PricePackageWithAllocationPriceModelType ¶
type PricePackageWithAllocationPriceModelType string
const (
PricePackageWithAllocationPriceModelTypePackageWithAllocation PricePackageWithAllocationPriceModelType = "package_with_allocation"
)
func (PricePackageWithAllocationPriceModelType) IsKnown ¶ added in v0.24.0
func (r PricePackageWithAllocationPriceModelType) IsKnown() bool
type PricePackageWithAllocationPricePriceType ¶
type PricePackageWithAllocationPricePriceType string
const ( PricePackageWithAllocationPricePriceTypeUsagePrice PricePackageWithAllocationPricePriceType = "usage_price" PricePackageWithAllocationPricePriceTypeFixedPrice PricePackageWithAllocationPricePriceType = "fixed_price" )
func (PricePackageWithAllocationPricePriceType) IsKnown ¶ added in v0.24.0
func (r PricePackageWithAllocationPricePriceType) IsKnown() bool
type PricePriceType ¶ added in v0.25.0
type PricePriceType string
const ( PricePriceTypeUsagePrice PricePriceType = "usage_price" PricePriceTypeFixedPrice PricePriceType = "fixed_price" )
func (PricePriceType) IsKnown ¶ added in v0.25.0
func (r PricePriceType) IsKnown() bool
type PriceService ¶
type PriceService struct { Options []option.RequestOption ExternalPriceID *PriceExternalPriceIDService }
PriceService contains methods and other services that help with interacting with the orb API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPriceService method instead.
func NewPriceService ¶
func NewPriceService(opts ...option.RequestOption) (r *PriceService)
NewPriceService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*PriceService) Evaluate ¶ added in v0.25.0
func (r *PriceService) Evaluate(ctx context.Context, priceID string, body PriceEvaluateParams, opts ...option.RequestOption) (res *PriceEvaluateResponse, err error)
This endpoint is used to evaluate the output of a price for a given customer and time range. It enables filtering and grouping the output using [computed properties](../guides/extensibility/advanced-metrics#computed-properties), supporting the following workflows:
1. Showing detailed usage and costs to the end customer. 2. Auditing subtotals on invoice line items.
For these workflows, the expressiveness of computed properties in both the filters and grouping is critical. For example, if you'd like to show your customer their usage grouped by hour and another property, you can do so with the following `grouping_keys`: `["hour_floor_timestamp_millis(timestamp_millis)", "my_property"]`. If you'd like to examine a customer's usage for a specific property value, you can do so with the following `filter`: `my_property = 'foo' AND my_other_property = 'bar'`.
By default, the start of the time range must be no more than 100 days ago and the length of the results must be no greater than 1000. Note that this is a POST endpoint rather than a GET endpoint because it employs a JSON body rather than query parameters.
func (*PriceService) Fetch ¶
func (r *PriceService) Fetch(ctx context.Context, priceID string, opts ...option.RequestOption) (res *Price, err error)
This endpoint returns a price given an identifier.
func (*PriceService) List ¶
func (r *PriceService) List(ctx context.Context, query PriceListParams, opts ...option.RequestOption) (res *pagination.Page[Price], err error)
This endpoint is used to list all add-on prices created using the [price creation endpoint](../reference/create-price).
func (*PriceService) ListAutoPaging ¶
func (r *PriceService) ListAutoPaging(ctx context.Context, query PriceListParams, opts ...option.RequestOption) *pagination.PageAutoPager[Price]
This endpoint is used to list all add-on prices created using the [price creation endpoint](../reference/create-price).
func (*PriceService) New ¶
func (r *PriceService) New(ctx context.Context, body PriceNewParams, opts ...option.RequestOption) (res *Price, err error)
This endpoint is used to create a [price](../reference/price). A price created using this endpoint is always an add-on, meaning that it’s not associated with a specific plan and can instead be individually added to subscriptions, including subscriptions on different plans.
An `external_price_id` can be optionally specified as an alias to allow ergonomic interaction with prices in the Orb API.
See the [Price resource](../reference/price) for the specification of different price model configurations possible in this endpoint.
func (*PriceService) Update ¶ added in v0.42.0
func (r *PriceService) Update(ctx context.Context, priceID string, body PriceUpdateParams, opts ...option.RequestOption) (res *Price, err error)
This endpoint allows you to update the `metadata` property on a price. If you pass null for the metadata value, it will clear any existing metadata for that price.
type PriceThresholdTotalAmountPrice ¶
type PriceThresholdTotalAmountPrice struct { ID string `json:"id,required"` BillableMetric PriceThresholdTotalAmountPriceBillableMetric `json:"billable_metric,required,nullable"` BillingCycleConfiguration PriceThresholdTotalAmountPriceBillingCycleConfiguration `json:"billing_cycle_configuration,required"` Cadence PriceThresholdTotalAmountPriceCadence `json:"cadence,required"` ConversionRate float64 `json:"conversion_rate,required,nullable"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditAllocation PriceThresholdTotalAmountPriceCreditAllocation `json:"credit_allocation,required,nullable"` Currency string `json:"currency,required"` Discount shared.Discount `json:"discount,required,nullable"` ExternalPriceID string `json:"external_price_id,required,nullable"` FixedPriceQuantity float64 `json:"fixed_price_quantity,required,nullable"` InvoicingCycleConfiguration PriceThresholdTotalAmountPriceInvoicingCycleConfiguration `json:"invoicing_cycle_configuration,required,nullable"` Item PriceThresholdTotalAmountPriceItem `json:"item,required"` Maximum PriceThresholdTotalAmountPriceMaximum `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 PriceThresholdTotalAmountPriceMinimum `json:"minimum,required,nullable"` MinimumAmount string `json:"minimum_amount,required,nullable"` ModelType PriceThresholdTotalAmountPriceModelType `json:"model_type,required"` Name string `json:"name,required"` PlanPhaseOrder int64 `json:"plan_phase_order,required,nullable"` PriceType PriceThresholdTotalAmountPricePriceType `json:"price_type,required"` ThresholdTotalAmountConfig map[string]interface{} `json:"threshold_total_amount_config,required"` JSON priceThresholdTotalAmountPriceJSON `json:"-"` }
func (*PriceThresholdTotalAmountPrice) UnmarshalJSON ¶
func (r *PriceThresholdTotalAmountPrice) UnmarshalJSON(data []byte) (err error)
type PriceThresholdTotalAmountPriceBillableMetric ¶
type PriceThresholdTotalAmountPriceBillableMetric struct { ID string `json:"id,required"` JSON priceThresholdTotalAmountPriceBillableMetricJSON `json:"-"` }
func (*PriceThresholdTotalAmountPriceBillableMetric) UnmarshalJSON ¶
func (r *PriceThresholdTotalAmountPriceBillableMetric) UnmarshalJSON(data []byte) (err error)
type PriceThresholdTotalAmountPriceBillingCycleConfiguration ¶ added in v0.44.0
type PriceThresholdTotalAmountPriceBillingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PriceThresholdTotalAmountPriceBillingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON priceThresholdTotalAmountPriceBillingCycleConfigurationJSON `json:"-"` }
func (*PriceThresholdTotalAmountPriceBillingCycleConfiguration) UnmarshalJSON ¶ added in v0.44.0
func (r *PriceThresholdTotalAmountPriceBillingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PriceThresholdTotalAmountPriceBillingCycleConfigurationDurationUnit ¶ added in v0.44.0
type PriceThresholdTotalAmountPriceBillingCycleConfigurationDurationUnit string
const ( PriceThresholdTotalAmountPriceBillingCycleConfigurationDurationUnitDay PriceThresholdTotalAmountPriceBillingCycleConfigurationDurationUnit = "day" PriceThresholdTotalAmountPriceBillingCycleConfigurationDurationUnitMonth PriceThresholdTotalAmountPriceBillingCycleConfigurationDurationUnit = "month" )
func (PriceThresholdTotalAmountPriceBillingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.44.0
func (r PriceThresholdTotalAmountPriceBillingCycleConfigurationDurationUnit) IsKnown() bool
type PriceThresholdTotalAmountPriceCadence ¶
type PriceThresholdTotalAmountPriceCadence string
const ( PriceThresholdTotalAmountPriceCadenceOneTime PriceThresholdTotalAmountPriceCadence = "one_time" PriceThresholdTotalAmountPriceCadenceMonthly PriceThresholdTotalAmountPriceCadence = "monthly" PriceThresholdTotalAmountPriceCadenceQuarterly PriceThresholdTotalAmountPriceCadence = "quarterly" PriceThresholdTotalAmountPriceCadenceSemiAnnual PriceThresholdTotalAmountPriceCadence = "semi_annual" PriceThresholdTotalAmountPriceCadenceAnnual PriceThresholdTotalAmountPriceCadence = "annual" PriceThresholdTotalAmountPriceCadenceCustom PriceThresholdTotalAmountPriceCadence = "custom" )
func (PriceThresholdTotalAmountPriceCadence) IsKnown ¶ added in v0.24.0
func (r PriceThresholdTotalAmountPriceCadence) IsKnown() bool
type PriceThresholdTotalAmountPriceCreditAllocation ¶ added in v0.25.0
type PriceThresholdTotalAmountPriceCreditAllocation struct { AllowsRollover bool `json:"allows_rollover,required"` Currency string `json:"currency,required"` JSON priceThresholdTotalAmountPriceCreditAllocationJSON `json:"-"` }
func (*PriceThresholdTotalAmountPriceCreditAllocation) UnmarshalJSON ¶ added in v0.25.0
func (r *PriceThresholdTotalAmountPriceCreditAllocation) UnmarshalJSON(data []byte) (err error)
type PriceThresholdTotalAmountPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PriceThresholdTotalAmountPriceInvoicingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PriceThresholdTotalAmountPriceInvoicingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON priceThresholdTotalAmountPriceInvoicingCycleConfigurationJSON `json:"-"` }
func (*PriceThresholdTotalAmountPriceInvoicingCycleConfiguration) UnmarshalJSON ¶ added in v0.56.0
func (r *PriceThresholdTotalAmountPriceInvoicingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PriceThresholdTotalAmountPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceThresholdTotalAmountPriceInvoicingCycleConfigurationDurationUnit string
const ( PriceThresholdTotalAmountPriceInvoicingCycleConfigurationDurationUnitDay PriceThresholdTotalAmountPriceInvoicingCycleConfigurationDurationUnit = "day" PriceThresholdTotalAmountPriceInvoicingCycleConfigurationDurationUnitMonth PriceThresholdTotalAmountPriceInvoicingCycleConfigurationDurationUnit = "month" )
func (PriceThresholdTotalAmountPriceInvoicingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PriceThresholdTotalAmountPriceInvoicingCycleConfigurationDurationUnit) IsKnown() bool
type PriceThresholdTotalAmountPriceItem ¶
type PriceThresholdTotalAmountPriceItem struct { ID string `json:"id,required"` Name string `json:"name,required"` JSON priceThresholdTotalAmountPriceItemJSON `json:"-"` }
func (*PriceThresholdTotalAmountPriceItem) UnmarshalJSON ¶
func (r *PriceThresholdTotalAmountPriceItem) UnmarshalJSON(data []byte) (err error)
type PriceThresholdTotalAmountPriceMaximum ¶
type PriceThresholdTotalAmountPriceMaximum 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 priceThresholdTotalAmountPriceMaximumJSON `json:"-"` }
func (*PriceThresholdTotalAmountPriceMaximum) UnmarshalJSON ¶
func (r *PriceThresholdTotalAmountPriceMaximum) UnmarshalJSON(data []byte) (err error)
type PriceThresholdTotalAmountPriceMinimum ¶
type PriceThresholdTotalAmountPriceMinimum 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 priceThresholdTotalAmountPriceMinimumJSON `json:"-"` }
func (*PriceThresholdTotalAmountPriceMinimum) UnmarshalJSON ¶
func (r *PriceThresholdTotalAmountPriceMinimum) UnmarshalJSON(data []byte) (err error)
type PriceThresholdTotalAmountPriceModelType ¶
type PriceThresholdTotalAmountPriceModelType string
const (
PriceThresholdTotalAmountPriceModelTypeThresholdTotalAmount PriceThresholdTotalAmountPriceModelType = "threshold_total_amount"
)
func (PriceThresholdTotalAmountPriceModelType) IsKnown ¶ added in v0.24.0
func (r PriceThresholdTotalAmountPriceModelType) IsKnown() bool
type PriceThresholdTotalAmountPricePriceType ¶
type PriceThresholdTotalAmountPricePriceType string
const ( PriceThresholdTotalAmountPricePriceTypeUsagePrice PriceThresholdTotalAmountPricePriceType = "usage_price" PriceThresholdTotalAmountPricePriceTypeFixedPrice PriceThresholdTotalAmountPricePriceType = "fixed_price" )
func (PriceThresholdTotalAmountPricePriceType) IsKnown ¶ added in v0.24.0
func (r PriceThresholdTotalAmountPricePriceType) IsKnown() bool
type PriceTieredBpsPrice ¶
type PriceTieredBpsPrice struct { ID string `json:"id,required"` BillableMetric PriceTieredBpsPriceBillableMetric `json:"billable_metric,required,nullable"` BillingCycleConfiguration PriceTieredBpsPriceBillingCycleConfiguration `json:"billing_cycle_configuration,required"` Cadence PriceTieredBpsPriceCadence `json:"cadence,required"` ConversionRate float64 `json:"conversion_rate,required,nullable"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditAllocation PriceTieredBpsPriceCreditAllocation `json:"credit_allocation,required,nullable"` Currency string `json:"currency,required"` Discount shared.Discount `json:"discount,required,nullable"` ExternalPriceID string `json:"external_price_id,required,nullable"` FixedPriceQuantity float64 `json:"fixed_price_quantity,required,nullable"` InvoicingCycleConfiguration PriceTieredBpsPriceInvoicingCycleConfiguration `json:"invoicing_cycle_configuration,required,nullable"` Item PriceTieredBpsPriceItem `json:"item,required"` Maximum PriceTieredBpsPriceMaximum `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 PriceTieredBpsPriceMinimum `json:"minimum,required,nullable"` MinimumAmount string `json:"minimum_amount,required,nullable"` ModelType PriceTieredBpsPriceModelType `json:"model_type,required"` Name string `json:"name,required"` PlanPhaseOrder int64 `json:"plan_phase_order,required,nullable"` PriceType PriceTieredBpsPricePriceType `json:"price_type,required"` TieredBpsConfig PriceTieredBpsPriceTieredBpsConfig `json:"tiered_bps_config,required"` JSON priceTieredBpsPriceJSON `json:"-"` }
func (*PriceTieredBpsPrice) UnmarshalJSON ¶
func (r *PriceTieredBpsPrice) UnmarshalJSON(data []byte) (err error)
type PriceTieredBpsPriceBillableMetric ¶
type PriceTieredBpsPriceBillableMetric struct { ID string `json:"id,required"` JSON priceTieredBpsPriceBillableMetricJSON `json:"-"` }
func (*PriceTieredBpsPriceBillableMetric) UnmarshalJSON ¶
func (r *PriceTieredBpsPriceBillableMetric) UnmarshalJSON(data []byte) (err error)
type PriceTieredBpsPriceBillingCycleConfiguration ¶ added in v0.44.0
type PriceTieredBpsPriceBillingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PriceTieredBpsPriceBillingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON priceTieredBpsPriceBillingCycleConfigurationJSON `json:"-"` }
func (*PriceTieredBpsPriceBillingCycleConfiguration) UnmarshalJSON ¶ added in v0.44.0
func (r *PriceTieredBpsPriceBillingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PriceTieredBpsPriceBillingCycleConfigurationDurationUnit ¶ added in v0.44.0
type PriceTieredBpsPriceBillingCycleConfigurationDurationUnit string
const ( PriceTieredBpsPriceBillingCycleConfigurationDurationUnitDay PriceTieredBpsPriceBillingCycleConfigurationDurationUnit = "day" PriceTieredBpsPriceBillingCycleConfigurationDurationUnitMonth PriceTieredBpsPriceBillingCycleConfigurationDurationUnit = "month" )
func (PriceTieredBpsPriceBillingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.44.0
func (r PriceTieredBpsPriceBillingCycleConfigurationDurationUnit) IsKnown() bool
type PriceTieredBpsPriceCadence ¶
type PriceTieredBpsPriceCadence string
const ( PriceTieredBpsPriceCadenceOneTime PriceTieredBpsPriceCadence = "one_time" PriceTieredBpsPriceCadenceMonthly PriceTieredBpsPriceCadence = "monthly" PriceTieredBpsPriceCadenceQuarterly PriceTieredBpsPriceCadence = "quarterly" PriceTieredBpsPriceCadenceSemiAnnual PriceTieredBpsPriceCadence = "semi_annual" PriceTieredBpsPriceCadenceAnnual PriceTieredBpsPriceCadence = "annual" PriceTieredBpsPriceCadenceCustom PriceTieredBpsPriceCadence = "custom" )
func (PriceTieredBpsPriceCadence) IsKnown ¶ added in v0.24.0
func (r PriceTieredBpsPriceCadence) IsKnown() bool
type PriceTieredBpsPriceCreditAllocation ¶ added in v0.25.0
type PriceTieredBpsPriceCreditAllocation struct { AllowsRollover bool `json:"allows_rollover,required"` Currency string `json:"currency,required"` JSON priceTieredBpsPriceCreditAllocationJSON `json:"-"` }
func (*PriceTieredBpsPriceCreditAllocation) UnmarshalJSON ¶ added in v0.25.0
func (r *PriceTieredBpsPriceCreditAllocation) UnmarshalJSON(data []byte) (err error)
type PriceTieredBpsPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PriceTieredBpsPriceInvoicingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PriceTieredBpsPriceInvoicingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON priceTieredBpsPriceInvoicingCycleConfigurationJSON `json:"-"` }
func (*PriceTieredBpsPriceInvoicingCycleConfiguration) UnmarshalJSON ¶ added in v0.56.0
func (r *PriceTieredBpsPriceInvoicingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PriceTieredBpsPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceTieredBpsPriceInvoicingCycleConfigurationDurationUnit string
const ( PriceTieredBpsPriceInvoicingCycleConfigurationDurationUnitDay PriceTieredBpsPriceInvoicingCycleConfigurationDurationUnit = "day" PriceTieredBpsPriceInvoicingCycleConfigurationDurationUnitMonth PriceTieredBpsPriceInvoicingCycleConfigurationDurationUnit = "month" )
func (PriceTieredBpsPriceInvoicingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PriceTieredBpsPriceInvoicingCycleConfigurationDurationUnit) IsKnown() bool
type PriceTieredBpsPriceItem ¶
type PriceTieredBpsPriceItem struct { ID string `json:"id,required"` Name string `json:"name,required"` JSON priceTieredBpsPriceItemJSON `json:"-"` }
func (*PriceTieredBpsPriceItem) UnmarshalJSON ¶
func (r *PriceTieredBpsPriceItem) UnmarshalJSON(data []byte) (err error)
type PriceTieredBpsPriceMaximum ¶
type PriceTieredBpsPriceMaximum 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 priceTieredBpsPriceMaximumJSON `json:"-"` }
func (*PriceTieredBpsPriceMaximum) UnmarshalJSON ¶
func (r *PriceTieredBpsPriceMaximum) UnmarshalJSON(data []byte) (err error)
type PriceTieredBpsPriceMinimum ¶
type PriceTieredBpsPriceMinimum 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 priceTieredBpsPriceMinimumJSON `json:"-"` }
func (*PriceTieredBpsPriceMinimum) UnmarshalJSON ¶
func (r *PriceTieredBpsPriceMinimum) UnmarshalJSON(data []byte) (err error)
type PriceTieredBpsPriceModelType ¶
type PriceTieredBpsPriceModelType string
const (
PriceTieredBpsPriceModelTypeTieredBps PriceTieredBpsPriceModelType = "tiered_bps"
)
func (PriceTieredBpsPriceModelType) IsKnown ¶ added in v0.24.0
func (r PriceTieredBpsPriceModelType) IsKnown() bool
type PriceTieredBpsPricePriceType ¶
type PriceTieredBpsPricePriceType string
const ( PriceTieredBpsPricePriceTypeUsagePrice PriceTieredBpsPricePriceType = "usage_price" PriceTieredBpsPricePriceTypeFixedPrice PriceTieredBpsPricePriceType = "fixed_price" )
func (PriceTieredBpsPricePriceType) IsKnown ¶ added in v0.24.0
func (r PriceTieredBpsPricePriceType) IsKnown() bool
type PriceTieredBpsPriceTieredBpsConfig ¶
type PriceTieredBpsPriceTieredBpsConfig struct { // Tiers for a Graduated BPS pricing model, where usage is bucketed into specified // tiers Tiers []PriceTieredBpsPriceTieredBpsConfigTier `json:"tiers,required"` JSON priceTieredBpsPriceTieredBpsConfigJSON `json:"-"` }
func (*PriceTieredBpsPriceTieredBpsConfig) UnmarshalJSON ¶
func (r *PriceTieredBpsPriceTieredBpsConfig) UnmarshalJSON(data []byte) (err error)
type PriceTieredBpsPriceTieredBpsConfigTier ¶
type PriceTieredBpsPriceTieredBpsConfigTier 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 priceTieredBpsPriceTieredBpsConfigTierJSON `json:"-"` }
func (*PriceTieredBpsPriceTieredBpsConfigTier) UnmarshalJSON ¶
func (r *PriceTieredBpsPriceTieredBpsConfigTier) UnmarshalJSON(data []byte) (err error)
type PriceTieredPackagePrice ¶
type PriceTieredPackagePrice struct { ID string `json:"id,required"` BillableMetric PriceTieredPackagePriceBillableMetric `json:"billable_metric,required,nullable"` BillingCycleConfiguration PriceTieredPackagePriceBillingCycleConfiguration `json:"billing_cycle_configuration,required"` Cadence PriceTieredPackagePriceCadence `json:"cadence,required"` ConversionRate float64 `json:"conversion_rate,required,nullable"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditAllocation PriceTieredPackagePriceCreditAllocation `json:"credit_allocation,required,nullable"` Currency string `json:"currency,required"` Discount shared.Discount `json:"discount,required,nullable"` ExternalPriceID string `json:"external_price_id,required,nullable"` FixedPriceQuantity float64 `json:"fixed_price_quantity,required,nullable"` InvoicingCycleConfiguration PriceTieredPackagePriceInvoicingCycleConfiguration `json:"invoicing_cycle_configuration,required,nullable"` Item PriceTieredPackagePriceItem `json:"item,required"` Maximum PriceTieredPackagePriceMaximum `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 PriceTieredPackagePriceMinimum `json:"minimum,required,nullable"` MinimumAmount string `json:"minimum_amount,required,nullable"` ModelType PriceTieredPackagePriceModelType `json:"model_type,required"` Name string `json:"name,required"` PlanPhaseOrder int64 `json:"plan_phase_order,required,nullable"` PriceType PriceTieredPackagePricePriceType `json:"price_type,required"` TieredPackageConfig map[string]interface{} `json:"tiered_package_config,required"` JSON priceTieredPackagePriceJSON `json:"-"` }
func (*PriceTieredPackagePrice) UnmarshalJSON ¶
func (r *PriceTieredPackagePrice) UnmarshalJSON(data []byte) (err error)
type PriceTieredPackagePriceBillableMetric ¶
type PriceTieredPackagePriceBillableMetric struct { ID string `json:"id,required"` JSON priceTieredPackagePriceBillableMetricJSON `json:"-"` }
func (*PriceTieredPackagePriceBillableMetric) UnmarshalJSON ¶
func (r *PriceTieredPackagePriceBillableMetric) UnmarshalJSON(data []byte) (err error)
type PriceTieredPackagePriceBillingCycleConfiguration ¶ added in v0.44.0
type PriceTieredPackagePriceBillingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PriceTieredPackagePriceBillingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON priceTieredPackagePriceBillingCycleConfigurationJSON `json:"-"` }
func (*PriceTieredPackagePriceBillingCycleConfiguration) UnmarshalJSON ¶ added in v0.44.0
func (r *PriceTieredPackagePriceBillingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PriceTieredPackagePriceBillingCycleConfigurationDurationUnit ¶ added in v0.44.0
type PriceTieredPackagePriceBillingCycleConfigurationDurationUnit string
const ( PriceTieredPackagePriceBillingCycleConfigurationDurationUnitDay PriceTieredPackagePriceBillingCycleConfigurationDurationUnit = "day" PriceTieredPackagePriceBillingCycleConfigurationDurationUnitMonth PriceTieredPackagePriceBillingCycleConfigurationDurationUnit = "month" )
func (PriceTieredPackagePriceBillingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.44.0
func (r PriceTieredPackagePriceBillingCycleConfigurationDurationUnit) IsKnown() bool
type PriceTieredPackagePriceCadence ¶
type PriceTieredPackagePriceCadence string
const ( PriceTieredPackagePriceCadenceOneTime PriceTieredPackagePriceCadence = "one_time" PriceTieredPackagePriceCadenceMonthly PriceTieredPackagePriceCadence = "monthly" PriceTieredPackagePriceCadenceQuarterly PriceTieredPackagePriceCadence = "quarterly" PriceTieredPackagePriceCadenceSemiAnnual PriceTieredPackagePriceCadence = "semi_annual" PriceTieredPackagePriceCadenceAnnual PriceTieredPackagePriceCadence = "annual" PriceTieredPackagePriceCadenceCustom PriceTieredPackagePriceCadence = "custom" )
func (PriceTieredPackagePriceCadence) IsKnown ¶ added in v0.24.0
func (r PriceTieredPackagePriceCadence) IsKnown() bool
type PriceTieredPackagePriceCreditAllocation ¶ added in v0.25.0
type PriceTieredPackagePriceCreditAllocation struct { AllowsRollover bool `json:"allows_rollover,required"` Currency string `json:"currency,required"` JSON priceTieredPackagePriceCreditAllocationJSON `json:"-"` }
func (*PriceTieredPackagePriceCreditAllocation) UnmarshalJSON ¶ added in v0.25.0
func (r *PriceTieredPackagePriceCreditAllocation) UnmarshalJSON(data []byte) (err error)
type PriceTieredPackagePriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PriceTieredPackagePriceInvoicingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PriceTieredPackagePriceInvoicingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON priceTieredPackagePriceInvoicingCycleConfigurationJSON `json:"-"` }
func (*PriceTieredPackagePriceInvoicingCycleConfiguration) UnmarshalJSON ¶ added in v0.56.0
func (r *PriceTieredPackagePriceInvoicingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PriceTieredPackagePriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceTieredPackagePriceInvoicingCycleConfigurationDurationUnit string
const ( PriceTieredPackagePriceInvoicingCycleConfigurationDurationUnitDay PriceTieredPackagePriceInvoicingCycleConfigurationDurationUnit = "day" PriceTieredPackagePriceInvoicingCycleConfigurationDurationUnitMonth PriceTieredPackagePriceInvoicingCycleConfigurationDurationUnit = "month" )
func (PriceTieredPackagePriceInvoicingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PriceTieredPackagePriceInvoicingCycleConfigurationDurationUnit) IsKnown() bool
type PriceTieredPackagePriceItem ¶
type PriceTieredPackagePriceItem struct { ID string `json:"id,required"` Name string `json:"name,required"` JSON priceTieredPackagePriceItemJSON `json:"-"` }
func (*PriceTieredPackagePriceItem) UnmarshalJSON ¶
func (r *PriceTieredPackagePriceItem) UnmarshalJSON(data []byte) (err error)
type PriceTieredPackagePriceMaximum ¶
type PriceTieredPackagePriceMaximum 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 priceTieredPackagePriceMaximumJSON `json:"-"` }
func (*PriceTieredPackagePriceMaximum) UnmarshalJSON ¶
func (r *PriceTieredPackagePriceMaximum) UnmarshalJSON(data []byte) (err error)
type PriceTieredPackagePriceMinimum ¶
type PriceTieredPackagePriceMinimum 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 priceTieredPackagePriceMinimumJSON `json:"-"` }
func (*PriceTieredPackagePriceMinimum) UnmarshalJSON ¶
func (r *PriceTieredPackagePriceMinimum) UnmarshalJSON(data []byte) (err error)
type PriceTieredPackagePriceModelType ¶
type PriceTieredPackagePriceModelType string
const (
PriceTieredPackagePriceModelTypeTieredPackage PriceTieredPackagePriceModelType = "tiered_package"
)
func (PriceTieredPackagePriceModelType) IsKnown ¶ added in v0.24.0
func (r PriceTieredPackagePriceModelType) IsKnown() bool
type PriceTieredPackagePricePriceType ¶
type PriceTieredPackagePricePriceType string
const ( PriceTieredPackagePricePriceTypeUsagePrice PriceTieredPackagePricePriceType = "usage_price" PriceTieredPackagePricePriceTypeFixedPrice PriceTieredPackagePricePriceType = "fixed_price" )
func (PriceTieredPackagePricePriceType) IsKnown ¶ added in v0.24.0
func (r PriceTieredPackagePricePriceType) IsKnown() bool
type PriceTieredPackageWithMinimumPrice ¶ added in v0.25.0
type PriceTieredPackageWithMinimumPrice struct { ID string `json:"id,required"` BillableMetric PriceTieredPackageWithMinimumPriceBillableMetric `json:"billable_metric,required,nullable"` BillingCycleConfiguration PriceTieredPackageWithMinimumPriceBillingCycleConfiguration `json:"billing_cycle_configuration,required"` Cadence PriceTieredPackageWithMinimumPriceCadence `json:"cadence,required"` ConversionRate float64 `json:"conversion_rate,required,nullable"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditAllocation PriceTieredPackageWithMinimumPriceCreditAllocation `json:"credit_allocation,required,nullable"` Currency string `json:"currency,required"` Discount shared.Discount `json:"discount,required,nullable"` ExternalPriceID string `json:"external_price_id,required,nullable"` FixedPriceQuantity float64 `json:"fixed_price_quantity,required,nullable"` InvoicingCycleConfiguration PriceTieredPackageWithMinimumPriceInvoicingCycleConfiguration `json:"invoicing_cycle_configuration,required,nullable"` Item PriceTieredPackageWithMinimumPriceItem `json:"item,required"` Maximum PriceTieredPackageWithMinimumPriceMaximum `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 PriceTieredPackageWithMinimumPriceMinimum `json:"minimum,required,nullable"` MinimumAmount string `json:"minimum_amount,required,nullable"` ModelType PriceTieredPackageWithMinimumPriceModelType `json:"model_type,required"` Name string `json:"name,required"` PlanPhaseOrder int64 `json:"plan_phase_order,required,nullable"` PriceType PriceTieredPackageWithMinimumPricePriceType `json:"price_type,required"` TieredPackageWithMinimumConfig map[string]interface{} `json:"tiered_package_with_minimum_config,required"` JSON priceTieredPackageWithMinimumPriceJSON `json:"-"` }
func (*PriceTieredPackageWithMinimumPrice) UnmarshalJSON ¶ added in v0.25.0
func (r *PriceTieredPackageWithMinimumPrice) UnmarshalJSON(data []byte) (err error)
type PriceTieredPackageWithMinimumPriceBillableMetric ¶ added in v0.25.0
type PriceTieredPackageWithMinimumPriceBillableMetric struct { ID string `json:"id,required"` JSON priceTieredPackageWithMinimumPriceBillableMetricJSON `json:"-"` }
func (*PriceTieredPackageWithMinimumPriceBillableMetric) UnmarshalJSON ¶ added in v0.25.0
func (r *PriceTieredPackageWithMinimumPriceBillableMetric) UnmarshalJSON(data []byte) (err error)
type PriceTieredPackageWithMinimumPriceBillingCycleConfiguration ¶ added in v0.44.0
type PriceTieredPackageWithMinimumPriceBillingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PriceTieredPackageWithMinimumPriceBillingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON priceTieredPackageWithMinimumPriceBillingCycleConfigurationJSON `json:"-"` }
func (*PriceTieredPackageWithMinimumPriceBillingCycleConfiguration) UnmarshalJSON ¶ added in v0.44.0
func (r *PriceTieredPackageWithMinimumPriceBillingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PriceTieredPackageWithMinimumPriceBillingCycleConfigurationDurationUnit ¶ added in v0.44.0
type PriceTieredPackageWithMinimumPriceBillingCycleConfigurationDurationUnit string
const ( PriceTieredPackageWithMinimumPriceBillingCycleConfigurationDurationUnitDay PriceTieredPackageWithMinimumPriceBillingCycleConfigurationDurationUnit = "day" PriceTieredPackageWithMinimumPriceBillingCycleConfigurationDurationUnitMonth PriceTieredPackageWithMinimumPriceBillingCycleConfigurationDurationUnit = "month" )
func (PriceTieredPackageWithMinimumPriceBillingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.44.0
func (r PriceTieredPackageWithMinimumPriceBillingCycleConfigurationDurationUnit) IsKnown() bool
type PriceTieredPackageWithMinimumPriceCadence ¶ added in v0.25.0
type PriceTieredPackageWithMinimumPriceCadence string
const ( PriceTieredPackageWithMinimumPriceCadenceOneTime PriceTieredPackageWithMinimumPriceCadence = "one_time" PriceTieredPackageWithMinimumPriceCadenceMonthly PriceTieredPackageWithMinimumPriceCadence = "monthly" PriceTieredPackageWithMinimumPriceCadenceQuarterly PriceTieredPackageWithMinimumPriceCadence = "quarterly" PriceTieredPackageWithMinimumPriceCadenceSemiAnnual PriceTieredPackageWithMinimumPriceCadence = "semi_annual" PriceTieredPackageWithMinimumPriceCadenceAnnual PriceTieredPackageWithMinimumPriceCadence = "annual" PriceTieredPackageWithMinimumPriceCadenceCustom PriceTieredPackageWithMinimumPriceCadence = "custom" )
func (PriceTieredPackageWithMinimumPriceCadence) IsKnown ¶ added in v0.25.0
func (r PriceTieredPackageWithMinimumPriceCadence) IsKnown() bool
type PriceTieredPackageWithMinimumPriceCreditAllocation ¶ added in v0.25.0
type PriceTieredPackageWithMinimumPriceCreditAllocation struct { AllowsRollover bool `json:"allows_rollover,required"` Currency string `json:"currency,required"` JSON priceTieredPackageWithMinimumPriceCreditAllocationJSON `json:"-"` }
func (*PriceTieredPackageWithMinimumPriceCreditAllocation) UnmarshalJSON ¶ added in v0.25.0
func (r *PriceTieredPackageWithMinimumPriceCreditAllocation) UnmarshalJSON(data []byte) (err error)
type PriceTieredPackageWithMinimumPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PriceTieredPackageWithMinimumPriceInvoicingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PriceTieredPackageWithMinimumPriceInvoicingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON priceTieredPackageWithMinimumPriceInvoicingCycleConfigurationJSON `json:"-"` }
func (*PriceTieredPackageWithMinimumPriceInvoicingCycleConfiguration) UnmarshalJSON ¶ added in v0.56.0
func (r *PriceTieredPackageWithMinimumPriceInvoicingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PriceTieredPackageWithMinimumPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceTieredPackageWithMinimumPriceInvoicingCycleConfigurationDurationUnit string
const ( PriceTieredPackageWithMinimumPriceInvoicingCycleConfigurationDurationUnitDay PriceTieredPackageWithMinimumPriceInvoicingCycleConfigurationDurationUnit = "day" PriceTieredPackageWithMinimumPriceInvoicingCycleConfigurationDurationUnitMonth PriceTieredPackageWithMinimumPriceInvoicingCycleConfigurationDurationUnit = "month" )
func (PriceTieredPackageWithMinimumPriceInvoicingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PriceTieredPackageWithMinimumPriceInvoicingCycleConfigurationDurationUnit) IsKnown() bool
type PriceTieredPackageWithMinimumPriceItem ¶ added in v0.25.0
type PriceTieredPackageWithMinimumPriceItem struct { ID string `json:"id,required"` Name string `json:"name,required"` JSON priceTieredPackageWithMinimumPriceItemJSON `json:"-"` }
func (*PriceTieredPackageWithMinimumPriceItem) UnmarshalJSON ¶ added in v0.25.0
func (r *PriceTieredPackageWithMinimumPriceItem) UnmarshalJSON(data []byte) (err error)
type PriceTieredPackageWithMinimumPriceMaximum ¶ added in v0.25.0
type PriceTieredPackageWithMinimumPriceMaximum 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 priceTieredPackageWithMinimumPriceMaximumJSON `json:"-"` }
func (*PriceTieredPackageWithMinimumPriceMaximum) UnmarshalJSON ¶ added in v0.25.0
func (r *PriceTieredPackageWithMinimumPriceMaximum) UnmarshalJSON(data []byte) (err error)
type PriceTieredPackageWithMinimumPriceMinimum ¶ added in v0.25.0
type PriceTieredPackageWithMinimumPriceMinimum 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 priceTieredPackageWithMinimumPriceMinimumJSON `json:"-"` }
func (*PriceTieredPackageWithMinimumPriceMinimum) UnmarshalJSON ¶ added in v0.25.0
func (r *PriceTieredPackageWithMinimumPriceMinimum) UnmarshalJSON(data []byte) (err error)
type PriceTieredPackageWithMinimumPriceModelType ¶ added in v0.25.0
type PriceTieredPackageWithMinimumPriceModelType string
const (
PriceTieredPackageWithMinimumPriceModelTypeTieredPackageWithMinimum PriceTieredPackageWithMinimumPriceModelType = "tiered_package_with_minimum"
)
func (PriceTieredPackageWithMinimumPriceModelType) IsKnown ¶ added in v0.25.0
func (r PriceTieredPackageWithMinimumPriceModelType) IsKnown() bool
type PriceTieredPackageWithMinimumPricePriceType ¶ added in v0.25.0
type PriceTieredPackageWithMinimumPricePriceType string
const ( PriceTieredPackageWithMinimumPricePriceTypeUsagePrice PriceTieredPackageWithMinimumPricePriceType = "usage_price" PriceTieredPackageWithMinimumPricePriceTypeFixedPrice PriceTieredPackageWithMinimumPricePriceType = "fixed_price" )
func (PriceTieredPackageWithMinimumPricePriceType) IsKnown ¶ added in v0.25.0
func (r PriceTieredPackageWithMinimumPricePriceType) IsKnown() bool
type PriceTieredPrice ¶
type PriceTieredPrice struct { ID string `json:"id,required"` BillableMetric PriceTieredPriceBillableMetric `json:"billable_metric,required,nullable"` BillingCycleConfiguration PriceTieredPriceBillingCycleConfiguration `json:"billing_cycle_configuration,required"` Cadence PriceTieredPriceCadence `json:"cadence,required"` ConversionRate float64 `json:"conversion_rate,required,nullable"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditAllocation PriceTieredPriceCreditAllocation `json:"credit_allocation,required,nullable"` Currency string `json:"currency,required"` Discount shared.Discount `json:"discount,required,nullable"` ExternalPriceID string `json:"external_price_id,required,nullable"` FixedPriceQuantity float64 `json:"fixed_price_quantity,required,nullable"` InvoicingCycleConfiguration PriceTieredPriceInvoicingCycleConfiguration `json:"invoicing_cycle_configuration,required,nullable"` Item PriceTieredPriceItem `json:"item,required"` Maximum PriceTieredPriceMaximum `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 PriceTieredPriceMinimum `json:"minimum,required,nullable"` MinimumAmount string `json:"minimum_amount,required,nullable"` ModelType PriceTieredPriceModelType `json:"model_type,required"` Name string `json:"name,required"` PlanPhaseOrder int64 `json:"plan_phase_order,required,nullable"` PriceType PriceTieredPricePriceType `json:"price_type,required"` TieredConfig PriceTieredPriceTieredConfig `json:"tiered_config,required"` JSON priceTieredPriceJSON `json:"-"` }
func (*PriceTieredPrice) UnmarshalJSON ¶
func (r *PriceTieredPrice) UnmarshalJSON(data []byte) (err error)
type PriceTieredPriceBillableMetric ¶
type PriceTieredPriceBillableMetric struct { ID string `json:"id,required"` JSON priceTieredPriceBillableMetricJSON `json:"-"` }
func (*PriceTieredPriceBillableMetric) UnmarshalJSON ¶
func (r *PriceTieredPriceBillableMetric) UnmarshalJSON(data []byte) (err error)
type PriceTieredPriceBillingCycleConfiguration ¶ added in v0.44.0
type PriceTieredPriceBillingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PriceTieredPriceBillingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON priceTieredPriceBillingCycleConfigurationJSON `json:"-"` }
func (*PriceTieredPriceBillingCycleConfiguration) UnmarshalJSON ¶ added in v0.44.0
func (r *PriceTieredPriceBillingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PriceTieredPriceBillingCycleConfigurationDurationUnit ¶ added in v0.44.0
type PriceTieredPriceBillingCycleConfigurationDurationUnit string
const ( PriceTieredPriceBillingCycleConfigurationDurationUnitDay PriceTieredPriceBillingCycleConfigurationDurationUnit = "day" PriceTieredPriceBillingCycleConfigurationDurationUnitMonth PriceTieredPriceBillingCycleConfigurationDurationUnit = "month" )
func (PriceTieredPriceBillingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.44.0
func (r PriceTieredPriceBillingCycleConfigurationDurationUnit) IsKnown() bool
type PriceTieredPriceCadence ¶
type PriceTieredPriceCadence string
const ( PriceTieredPriceCadenceOneTime PriceTieredPriceCadence = "one_time" PriceTieredPriceCadenceMonthly PriceTieredPriceCadence = "monthly" PriceTieredPriceCadenceQuarterly PriceTieredPriceCadence = "quarterly" PriceTieredPriceCadenceSemiAnnual PriceTieredPriceCadence = "semi_annual" PriceTieredPriceCadenceAnnual PriceTieredPriceCadence = "annual" PriceTieredPriceCadenceCustom PriceTieredPriceCadence = "custom" )
func (PriceTieredPriceCadence) IsKnown ¶ added in v0.24.0
func (r PriceTieredPriceCadence) IsKnown() bool
type PriceTieredPriceCreditAllocation ¶ added in v0.25.0
type PriceTieredPriceCreditAllocation struct { AllowsRollover bool `json:"allows_rollover,required"` Currency string `json:"currency,required"` JSON priceTieredPriceCreditAllocationJSON `json:"-"` }
func (*PriceTieredPriceCreditAllocation) UnmarshalJSON ¶ added in v0.25.0
func (r *PriceTieredPriceCreditAllocation) UnmarshalJSON(data []byte) (err error)
type PriceTieredPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PriceTieredPriceInvoicingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PriceTieredPriceInvoicingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON priceTieredPriceInvoicingCycleConfigurationJSON `json:"-"` }
func (*PriceTieredPriceInvoicingCycleConfiguration) UnmarshalJSON ¶ added in v0.56.0
func (r *PriceTieredPriceInvoicingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PriceTieredPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceTieredPriceInvoicingCycleConfigurationDurationUnit string
const ( PriceTieredPriceInvoicingCycleConfigurationDurationUnitDay PriceTieredPriceInvoicingCycleConfigurationDurationUnit = "day" PriceTieredPriceInvoicingCycleConfigurationDurationUnitMonth PriceTieredPriceInvoicingCycleConfigurationDurationUnit = "month" )
func (PriceTieredPriceInvoicingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PriceTieredPriceInvoicingCycleConfigurationDurationUnit) IsKnown() bool
type PriceTieredPriceItem ¶
type PriceTieredPriceItem struct { ID string `json:"id,required"` Name string `json:"name,required"` JSON priceTieredPriceItemJSON `json:"-"` }
func (*PriceTieredPriceItem) UnmarshalJSON ¶
func (r *PriceTieredPriceItem) UnmarshalJSON(data []byte) (err error)
type PriceTieredPriceMaximum ¶
type PriceTieredPriceMaximum 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 priceTieredPriceMaximumJSON `json:"-"` }
func (*PriceTieredPriceMaximum) UnmarshalJSON ¶
func (r *PriceTieredPriceMaximum) UnmarshalJSON(data []byte) (err error)
type PriceTieredPriceMinimum ¶
type PriceTieredPriceMinimum 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 priceTieredPriceMinimumJSON `json:"-"` }
func (*PriceTieredPriceMinimum) UnmarshalJSON ¶
func (r *PriceTieredPriceMinimum) UnmarshalJSON(data []byte) (err error)
type PriceTieredPriceModelType ¶
type PriceTieredPriceModelType string
const (
PriceTieredPriceModelTypeTiered PriceTieredPriceModelType = "tiered"
)
func (PriceTieredPriceModelType) IsKnown ¶ added in v0.24.0
func (r PriceTieredPriceModelType) IsKnown() bool
type PriceTieredPricePriceType ¶
type PriceTieredPricePriceType string
const ( PriceTieredPricePriceTypeUsagePrice PriceTieredPricePriceType = "usage_price" PriceTieredPricePriceTypeFixedPrice PriceTieredPricePriceType = "fixed_price" )
func (PriceTieredPricePriceType) IsKnown ¶ added in v0.24.0
func (r PriceTieredPricePriceType) IsKnown() bool
type PriceTieredPriceTieredConfig ¶
type PriceTieredPriceTieredConfig struct { // Tiers for rating based on total usage quantities into the specified tier Tiers []PriceTieredPriceTieredConfigTier `json:"tiers,required"` JSON priceTieredPriceTieredConfigJSON `json:"-"` }
func (*PriceTieredPriceTieredConfig) UnmarshalJSON ¶
func (r *PriceTieredPriceTieredConfig) UnmarshalJSON(data []byte) (err error)
type PriceTieredPriceTieredConfigTier ¶
type PriceTieredPriceTieredConfigTier 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 priceTieredPriceTieredConfigTierJSON `json:"-"` }
func (*PriceTieredPriceTieredConfigTier) UnmarshalJSON ¶
func (r *PriceTieredPriceTieredConfigTier) UnmarshalJSON(data []byte) (err error)
type PriceTieredWithMinimumPrice ¶
type PriceTieredWithMinimumPrice struct { ID string `json:"id,required"` BillableMetric PriceTieredWithMinimumPriceBillableMetric `json:"billable_metric,required,nullable"` BillingCycleConfiguration PriceTieredWithMinimumPriceBillingCycleConfiguration `json:"billing_cycle_configuration,required"` Cadence PriceTieredWithMinimumPriceCadence `json:"cadence,required"` ConversionRate float64 `json:"conversion_rate,required,nullable"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditAllocation PriceTieredWithMinimumPriceCreditAllocation `json:"credit_allocation,required,nullable"` Currency string `json:"currency,required"` Discount shared.Discount `json:"discount,required,nullable"` ExternalPriceID string `json:"external_price_id,required,nullable"` FixedPriceQuantity float64 `json:"fixed_price_quantity,required,nullable"` InvoicingCycleConfiguration PriceTieredWithMinimumPriceInvoicingCycleConfiguration `json:"invoicing_cycle_configuration,required,nullable"` Item PriceTieredWithMinimumPriceItem `json:"item,required"` Maximum PriceTieredWithMinimumPriceMaximum `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 PriceTieredWithMinimumPriceMinimum `json:"minimum,required,nullable"` MinimumAmount string `json:"minimum_amount,required,nullable"` ModelType PriceTieredWithMinimumPriceModelType `json:"model_type,required"` Name string `json:"name,required"` PlanPhaseOrder int64 `json:"plan_phase_order,required,nullable"` PriceType PriceTieredWithMinimumPricePriceType `json:"price_type,required"` TieredWithMinimumConfig map[string]interface{} `json:"tiered_with_minimum_config,required"` JSON priceTieredWithMinimumPriceJSON `json:"-"` }
func (*PriceTieredWithMinimumPrice) UnmarshalJSON ¶
func (r *PriceTieredWithMinimumPrice) UnmarshalJSON(data []byte) (err error)
type PriceTieredWithMinimumPriceBillableMetric ¶
type PriceTieredWithMinimumPriceBillableMetric struct { ID string `json:"id,required"` JSON priceTieredWithMinimumPriceBillableMetricJSON `json:"-"` }
func (*PriceTieredWithMinimumPriceBillableMetric) UnmarshalJSON ¶
func (r *PriceTieredWithMinimumPriceBillableMetric) UnmarshalJSON(data []byte) (err error)
type PriceTieredWithMinimumPriceBillingCycleConfiguration ¶ added in v0.44.0
type PriceTieredWithMinimumPriceBillingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PriceTieredWithMinimumPriceBillingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON priceTieredWithMinimumPriceBillingCycleConfigurationJSON `json:"-"` }
func (*PriceTieredWithMinimumPriceBillingCycleConfiguration) UnmarshalJSON ¶ added in v0.44.0
func (r *PriceTieredWithMinimumPriceBillingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PriceTieredWithMinimumPriceBillingCycleConfigurationDurationUnit ¶ added in v0.44.0
type PriceTieredWithMinimumPriceBillingCycleConfigurationDurationUnit string
const ( PriceTieredWithMinimumPriceBillingCycleConfigurationDurationUnitDay PriceTieredWithMinimumPriceBillingCycleConfigurationDurationUnit = "day" PriceTieredWithMinimumPriceBillingCycleConfigurationDurationUnitMonth PriceTieredWithMinimumPriceBillingCycleConfigurationDurationUnit = "month" )
func (PriceTieredWithMinimumPriceBillingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.44.0
func (r PriceTieredWithMinimumPriceBillingCycleConfigurationDurationUnit) IsKnown() bool
type PriceTieredWithMinimumPriceCadence ¶
type PriceTieredWithMinimumPriceCadence string
const ( PriceTieredWithMinimumPriceCadenceOneTime PriceTieredWithMinimumPriceCadence = "one_time" PriceTieredWithMinimumPriceCadenceMonthly PriceTieredWithMinimumPriceCadence = "monthly" PriceTieredWithMinimumPriceCadenceQuarterly PriceTieredWithMinimumPriceCadence = "quarterly" PriceTieredWithMinimumPriceCadenceSemiAnnual PriceTieredWithMinimumPriceCadence = "semi_annual" PriceTieredWithMinimumPriceCadenceAnnual PriceTieredWithMinimumPriceCadence = "annual" PriceTieredWithMinimumPriceCadenceCustom PriceTieredWithMinimumPriceCadence = "custom" )
func (PriceTieredWithMinimumPriceCadence) IsKnown ¶ added in v0.24.0
func (r PriceTieredWithMinimumPriceCadence) IsKnown() bool
type PriceTieredWithMinimumPriceCreditAllocation ¶ added in v0.25.0
type PriceTieredWithMinimumPriceCreditAllocation struct { AllowsRollover bool `json:"allows_rollover,required"` Currency string `json:"currency,required"` JSON priceTieredWithMinimumPriceCreditAllocationJSON `json:"-"` }
func (*PriceTieredWithMinimumPriceCreditAllocation) UnmarshalJSON ¶ added in v0.25.0
func (r *PriceTieredWithMinimumPriceCreditAllocation) UnmarshalJSON(data []byte) (err error)
type PriceTieredWithMinimumPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PriceTieredWithMinimumPriceInvoicingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PriceTieredWithMinimumPriceInvoicingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON priceTieredWithMinimumPriceInvoicingCycleConfigurationJSON `json:"-"` }
func (*PriceTieredWithMinimumPriceInvoicingCycleConfiguration) UnmarshalJSON ¶ added in v0.56.0
func (r *PriceTieredWithMinimumPriceInvoicingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PriceTieredWithMinimumPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceTieredWithMinimumPriceInvoicingCycleConfigurationDurationUnit string
const ( PriceTieredWithMinimumPriceInvoicingCycleConfigurationDurationUnitDay PriceTieredWithMinimumPriceInvoicingCycleConfigurationDurationUnit = "day" PriceTieredWithMinimumPriceInvoicingCycleConfigurationDurationUnitMonth PriceTieredWithMinimumPriceInvoicingCycleConfigurationDurationUnit = "month" )
func (PriceTieredWithMinimumPriceInvoicingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PriceTieredWithMinimumPriceInvoicingCycleConfigurationDurationUnit) IsKnown() bool
type PriceTieredWithMinimumPriceItem ¶
type PriceTieredWithMinimumPriceItem struct { ID string `json:"id,required"` Name string `json:"name,required"` JSON priceTieredWithMinimumPriceItemJSON `json:"-"` }
func (*PriceTieredWithMinimumPriceItem) UnmarshalJSON ¶
func (r *PriceTieredWithMinimumPriceItem) UnmarshalJSON(data []byte) (err error)
type PriceTieredWithMinimumPriceMaximum ¶
type PriceTieredWithMinimumPriceMaximum 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 priceTieredWithMinimumPriceMaximumJSON `json:"-"` }
func (*PriceTieredWithMinimumPriceMaximum) UnmarshalJSON ¶
func (r *PriceTieredWithMinimumPriceMaximum) UnmarshalJSON(data []byte) (err error)
type PriceTieredWithMinimumPriceMinimum ¶
type PriceTieredWithMinimumPriceMinimum 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 priceTieredWithMinimumPriceMinimumJSON `json:"-"` }
func (*PriceTieredWithMinimumPriceMinimum) UnmarshalJSON ¶
func (r *PriceTieredWithMinimumPriceMinimum) UnmarshalJSON(data []byte) (err error)
type PriceTieredWithMinimumPriceModelType ¶
type PriceTieredWithMinimumPriceModelType string
const (
PriceTieredWithMinimumPriceModelTypeTieredWithMinimum PriceTieredWithMinimumPriceModelType = "tiered_with_minimum"
)
func (PriceTieredWithMinimumPriceModelType) IsKnown ¶ added in v0.24.0
func (r PriceTieredWithMinimumPriceModelType) IsKnown() bool
type PriceTieredWithMinimumPricePriceType ¶
type PriceTieredWithMinimumPricePriceType string
const ( PriceTieredWithMinimumPricePriceTypeUsagePrice PriceTieredWithMinimumPricePriceType = "usage_price" PriceTieredWithMinimumPricePriceTypeFixedPrice PriceTieredWithMinimumPricePriceType = "fixed_price" )
func (PriceTieredWithMinimumPricePriceType) IsKnown ¶ added in v0.24.0
func (r PriceTieredWithMinimumPricePriceType) IsKnown() bool
type PriceTieredWithProrationPrice ¶ added in v0.34.0
type PriceTieredWithProrationPrice struct { ID string `json:"id,required"` BillableMetric PriceTieredWithProrationPriceBillableMetric `json:"billable_metric,required,nullable"` BillingCycleConfiguration PriceTieredWithProrationPriceBillingCycleConfiguration `json:"billing_cycle_configuration,required"` Cadence PriceTieredWithProrationPriceCadence `json:"cadence,required"` ConversionRate float64 `json:"conversion_rate,required,nullable"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditAllocation PriceTieredWithProrationPriceCreditAllocation `json:"credit_allocation,required,nullable"` Currency string `json:"currency,required"` Discount shared.Discount `json:"discount,required,nullable"` ExternalPriceID string `json:"external_price_id,required,nullable"` FixedPriceQuantity float64 `json:"fixed_price_quantity,required,nullable"` InvoicingCycleConfiguration PriceTieredWithProrationPriceInvoicingCycleConfiguration `json:"invoicing_cycle_configuration,required,nullable"` Item PriceTieredWithProrationPriceItem `json:"item,required"` Maximum PriceTieredWithProrationPriceMaximum `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 PriceTieredWithProrationPriceMinimum `json:"minimum,required,nullable"` MinimumAmount string `json:"minimum_amount,required,nullable"` ModelType PriceTieredWithProrationPriceModelType `json:"model_type,required"` Name string `json:"name,required"` PlanPhaseOrder int64 `json:"plan_phase_order,required,nullable"` PriceType PriceTieredWithProrationPricePriceType `json:"price_type,required"` TieredWithProrationConfig map[string]interface{} `json:"tiered_with_proration_config,required"` JSON priceTieredWithProrationPriceJSON `json:"-"` }
func (*PriceTieredWithProrationPrice) UnmarshalJSON ¶ added in v0.34.0
func (r *PriceTieredWithProrationPrice) UnmarshalJSON(data []byte) (err error)
type PriceTieredWithProrationPriceBillableMetric ¶ added in v0.34.0
type PriceTieredWithProrationPriceBillableMetric struct { ID string `json:"id,required"` JSON priceTieredWithProrationPriceBillableMetricJSON `json:"-"` }
func (*PriceTieredWithProrationPriceBillableMetric) UnmarshalJSON ¶ added in v0.34.0
func (r *PriceTieredWithProrationPriceBillableMetric) UnmarshalJSON(data []byte) (err error)
type PriceTieredWithProrationPriceBillingCycleConfiguration ¶ added in v0.44.0
type PriceTieredWithProrationPriceBillingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PriceTieredWithProrationPriceBillingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON priceTieredWithProrationPriceBillingCycleConfigurationJSON `json:"-"` }
func (*PriceTieredWithProrationPriceBillingCycleConfiguration) UnmarshalJSON ¶ added in v0.44.0
func (r *PriceTieredWithProrationPriceBillingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PriceTieredWithProrationPriceBillingCycleConfigurationDurationUnit ¶ added in v0.44.0
type PriceTieredWithProrationPriceBillingCycleConfigurationDurationUnit string
const ( PriceTieredWithProrationPriceBillingCycleConfigurationDurationUnitDay PriceTieredWithProrationPriceBillingCycleConfigurationDurationUnit = "day" PriceTieredWithProrationPriceBillingCycleConfigurationDurationUnitMonth PriceTieredWithProrationPriceBillingCycleConfigurationDurationUnit = "month" )
func (PriceTieredWithProrationPriceBillingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.44.0
func (r PriceTieredWithProrationPriceBillingCycleConfigurationDurationUnit) IsKnown() bool
type PriceTieredWithProrationPriceCadence ¶ added in v0.34.0
type PriceTieredWithProrationPriceCadence string
const ( PriceTieredWithProrationPriceCadenceOneTime PriceTieredWithProrationPriceCadence = "one_time" PriceTieredWithProrationPriceCadenceMonthly PriceTieredWithProrationPriceCadence = "monthly" PriceTieredWithProrationPriceCadenceQuarterly PriceTieredWithProrationPriceCadence = "quarterly" PriceTieredWithProrationPriceCadenceSemiAnnual PriceTieredWithProrationPriceCadence = "semi_annual" PriceTieredWithProrationPriceCadenceAnnual PriceTieredWithProrationPriceCadence = "annual" PriceTieredWithProrationPriceCadenceCustom PriceTieredWithProrationPriceCadence = "custom" )
func (PriceTieredWithProrationPriceCadence) IsKnown ¶ added in v0.34.0
func (r PriceTieredWithProrationPriceCadence) IsKnown() bool
type PriceTieredWithProrationPriceCreditAllocation ¶ added in v0.34.0
type PriceTieredWithProrationPriceCreditAllocation struct { AllowsRollover bool `json:"allows_rollover,required"` Currency string `json:"currency,required"` JSON priceTieredWithProrationPriceCreditAllocationJSON `json:"-"` }
func (*PriceTieredWithProrationPriceCreditAllocation) UnmarshalJSON ¶ added in v0.34.0
func (r *PriceTieredWithProrationPriceCreditAllocation) UnmarshalJSON(data []byte) (err error)
type PriceTieredWithProrationPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PriceTieredWithProrationPriceInvoicingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PriceTieredWithProrationPriceInvoicingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON priceTieredWithProrationPriceInvoicingCycleConfigurationJSON `json:"-"` }
func (*PriceTieredWithProrationPriceInvoicingCycleConfiguration) UnmarshalJSON ¶ added in v0.56.0
func (r *PriceTieredWithProrationPriceInvoicingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PriceTieredWithProrationPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceTieredWithProrationPriceInvoicingCycleConfigurationDurationUnit string
const ( PriceTieredWithProrationPriceInvoicingCycleConfigurationDurationUnitDay PriceTieredWithProrationPriceInvoicingCycleConfigurationDurationUnit = "day" PriceTieredWithProrationPriceInvoicingCycleConfigurationDurationUnitMonth PriceTieredWithProrationPriceInvoicingCycleConfigurationDurationUnit = "month" )
func (PriceTieredWithProrationPriceInvoicingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PriceTieredWithProrationPriceInvoicingCycleConfigurationDurationUnit) IsKnown() bool
type PriceTieredWithProrationPriceItem ¶ added in v0.34.0
type PriceTieredWithProrationPriceItem struct { ID string `json:"id,required"` Name string `json:"name,required"` JSON priceTieredWithProrationPriceItemJSON `json:"-"` }
func (*PriceTieredWithProrationPriceItem) UnmarshalJSON ¶ added in v0.34.0
func (r *PriceTieredWithProrationPriceItem) UnmarshalJSON(data []byte) (err error)
type PriceTieredWithProrationPriceMaximum ¶ added in v0.34.0
type PriceTieredWithProrationPriceMaximum 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 priceTieredWithProrationPriceMaximumJSON `json:"-"` }
func (*PriceTieredWithProrationPriceMaximum) UnmarshalJSON ¶ added in v0.34.0
func (r *PriceTieredWithProrationPriceMaximum) UnmarshalJSON(data []byte) (err error)
type PriceTieredWithProrationPriceMinimum ¶ added in v0.34.0
type PriceTieredWithProrationPriceMinimum 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 priceTieredWithProrationPriceMinimumJSON `json:"-"` }
func (*PriceTieredWithProrationPriceMinimum) UnmarshalJSON ¶ added in v0.34.0
func (r *PriceTieredWithProrationPriceMinimum) UnmarshalJSON(data []byte) (err error)
type PriceTieredWithProrationPriceModelType ¶ added in v0.34.0
type PriceTieredWithProrationPriceModelType string
const (
PriceTieredWithProrationPriceModelTypeTieredWithProration PriceTieredWithProrationPriceModelType = "tiered_with_proration"
)
func (PriceTieredWithProrationPriceModelType) IsKnown ¶ added in v0.34.0
func (r PriceTieredWithProrationPriceModelType) IsKnown() bool
type PriceTieredWithProrationPricePriceType ¶ added in v0.34.0
type PriceTieredWithProrationPricePriceType string
const ( PriceTieredWithProrationPricePriceTypeUsagePrice PriceTieredWithProrationPricePriceType = "usage_price" PriceTieredWithProrationPricePriceTypeFixedPrice PriceTieredWithProrationPricePriceType = "fixed_price" )
func (PriceTieredWithProrationPricePriceType) IsKnown ¶ added in v0.34.0
func (r PriceTieredWithProrationPricePriceType) IsKnown() bool
type PriceUnion ¶ added in v0.25.0
type PriceUnion 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.
## Unit pricing
With unit pricing, each unit costs a fixed amount.
```json
{ ... "model_type": "unit", "unit_config": { "unit_amount": "0.50" } ... }
```
## Tiered pricing
In tiered pricing, the cost of a given unit depends on the tier range that it falls into, where each tier range is defined by an upper and lower bound. For example, the first ten units may cost $0.50 each and all units thereafter may cost $0.10 each.
```json
{ ... "model_type": "tiered", "tiered_config": { "tiers": [ { "first_unit": 1, "last_unit": 10, "unit_amount": "0.50" }, { "first_unit": 11, "last_unit": null, "unit_amount": "0.10" } ] } ...
```
## Bulk pricing
Bulk pricing applies when the number of units determine the cost of all units. For example, if you've bought less than 10 units, they may each be $0.50 for a total of $5.00. Once you've bought more than 10 units, all units may now be priced at $0.40 (i.e. 101 units total would be $40.40).
```json
{ ... "model_type": "bulk", "bulk_config": { "tiers": [ { "maximum_units": 10, "unit_amount": "0.50" }, { "maximum_units": 1000, "unit_amount": "0.40" } ] } ... }
```
## Package pricing
Package pricing defines the size or granularity of a unit for billing purposes. For example, if the package size is set to 5, then 4 units will be billed as 5 and 6 units will be billed at 10.
```json
{ ... "model_type": "package", "package_config": { "package_amount": "0.80", "package_size": 10 } ... }
```
## BPS pricing
BPS pricing specifies a per-event (e.g. per-payment) rate in one hundredth of a percent (the number of basis points to charge), as well as a cap per event to assess. For example, this would allow you to assess a fee of 0.25% on every payment you process, with a maximum charge of $25 per payment.
```json
{ ... "model_type": "bps", "bps_config": { "bps": 125, "per_unit_maximum": "11.00" } ... }
```
## Bulk BPS pricing
Bulk BPS pricing specifies BPS parameters in a tiered manner, dependent on the total quantity across all events. Similar to bulk pricing, the BPS parameters of a given event depends on the tier range that the billing period falls into. Each tier range is defined by an upper bound. For example, after $1.5M of payment volume is reached, each individual payment may have a lower cap or a smaller take-rate.
```json
... "model_type": "bulk_bps", "bulk_bps_config": { "tiers": [ { "maximum_amount": "1000000.00", "bps": 125, "per_unit_maximum": "19.00" }, { "maximum_amount": null, "bps": 115, "per_unit_maximum": "4.00" } ] } ... }
```
## Tiered BPS pricing
Tiered BPS pricing specifies BPS parameters in a graduated manner, where an event's applicable parameter is a function of its marginal addition to the period total. Similar to tiered pricing, the BPS parameters of a given event depends on the tier range that it falls into, where each tier range is defined by an upper and lower bound. For example, the first few payments may have a 0.8 BPS take-rate and all payments after a specific volume may incur a take-rate of 0.5 BPS each.
```json
... "model_type": "tiered_bps", "tiered_bps_config": { "tiers": [ { "minimum_amount": "0", "maximum_amount": "1000000.00", "bps": 125, "per_unit_maximum": "19.00" }, { "minimum_amount": "1000000.00", "maximum_amount": null, "bps": 115, "per_unit_maximum": "4.00" } ] } ... }
```
## Matrix pricing
Matrix pricing defines a set of unit prices in a one or two-dimensional matrix. `dimensions` defines the two event property values evaluated in this pricing model. In a one-dimensional matrix, the second value is `null`. Every configuration has a list of `matrix_values` which give the unit prices for specified property values. In a one-dimensional matrix, the matrix values will have `dimension_values` where the second value of the pair is null. If an event does not match any of the dimension values in the matrix, it will resort to the `default_unit_amount`.
```json
{ "model_type": "matrix" "matrix_config": { "default_unit_amount": "3.00", "dimensions": [ "cluster_name", "region" ], "matrix_values": [ { "dimension_values": [ "alpha", "west" ], "unit_amount": "2.00" }, ... ] } }
```
## Fixed fees
Fixed fees are prices that are applied independent of usage quantities, and follow unit pricing. They also have an additional parameter `fixed_price_quantity`. If the Price represents a fixed cost, this represents the quantity of units applied.
```json
{ ... "id": "price_id", "model_type": "unit", "unit_config": { "unit_amount": "2.00" }, "fixed_price_quantity": 3.0 ... }
```
Union satisfied by PriceUnitPrice, PricePackagePrice, PriceMatrixPrice, PriceTieredPrice, PriceTieredBpsPrice, PriceBpsPrice, PriceBulkBpsPrice, PriceBulkPrice, PriceThresholdTotalAmountPrice, PriceTieredPackagePrice, PriceGroupedTieredPrice, PriceTieredWithMinimumPrice, PriceTieredPackageWithMinimumPrice, PricePackageWithAllocationPrice, PriceUnitWithPercentPrice, PriceMatrixWithAllocationPrice, PriceTieredWithProrationPrice, PriceUnitWithProrationPrice, PriceGroupedAllocationPrice, PriceGroupedWithProratedMinimumPrice or PriceBulkWithProrationPrice.
type PriceUnitPrice ¶
type PriceUnitPrice struct { ID string `json:"id,required"` BillableMetric PriceUnitPriceBillableMetric `json:"billable_metric,required,nullable"` BillingCycleConfiguration PriceUnitPriceBillingCycleConfiguration `json:"billing_cycle_configuration,required"` Cadence PriceUnitPriceCadence `json:"cadence,required"` ConversionRate float64 `json:"conversion_rate,required,nullable"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditAllocation PriceUnitPriceCreditAllocation `json:"credit_allocation,required,nullable"` Currency string `json:"currency,required"` Discount shared.Discount `json:"discount,required,nullable"` ExternalPriceID string `json:"external_price_id,required,nullable"` FixedPriceQuantity float64 `json:"fixed_price_quantity,required,nullable"` InvoicingCycleConfiguration PriceUnitPriceInvoicingCycleConfiguration `json:"invoicing_cycle_configuration,required,nullable"` Item PriceUnitPriceItem `json:"item,required"` Maximum PriceUnitPriceMaximum `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 PriceUnitPriceMinimum `json:"minimum,required,nullable"` MinimumAmount string `json:"minimum_amount,required,nullable"` ModelType PriceUnitPriceModelType `json:"model_type,required"` Name string `json:"name,required"` PlanPhaseOrder int64 `json:"plan_phase_order,required,nullable"` PriceType PriceUnitPricePriceType `json:"price_type,required"` UnitConfig PriceUnitPriceUnitConfig `json:"unit_config,required"` JSON priceUnitPriceJSON `json:"-"` }
func (*PriceUnitPrice) UnmarshalJSON ¶
func (r *PriceUnitPrice) UnmarshalJSON(data []byte) (err error)
type PriceUnitPriceBillableMetric ¶
type PriceUnitPriceBillableMetric struct { ID string `json:"id,required"` JSON priceUnitPriceBillableMetricJSON `json:"-"` }
func (*PriceUnitPriceBillableMetric) UnmarshalJSON ¶
func (r *PriceUnitPriceBillableMetric) UnmarshalJSON(data []byte) (err error)
type PriceUnitPriceBillingCycleConfiguration ¶ added in v0.44.0
type PriceUnitPriceBillingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PriceUnitPriceBillingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON priceUnitPriceBillingCycleConfigurationJSON `json:"-"` }
func (*PriceUnitPriceBillingCycleConfiguration) UnmarshalJSON ¶ added in v0.44.0
func (r *PriceUnitPriceBillingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PriceUnitPriceBillingCycleConfigurationDurationUnit ¶ added in v0.44.0
type PriceUnitPriceBillingCycleConfigurationDurationUnit string
const ( PriceUnitPriceBillingCycleConfigurationDurationUnitDay PriceUnitPriceBillingCycleConfigurationDurationUnit = "day" PriceUnitPriceBillingCycleConfigurationDurationUnitMonth PriceUnitPriceBillingCycleConfigurationDurationUnit = "month" )
func (PriceUnitPriceBillingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.44.0
func (r PriceUnitPriceBillingCycleConfigurationDurationUnit) IsKnown() bool
type PriceUnitPriceCadence ¶
type PriceUnitPriceCadence string
const ( PriceUnitPriceCadenceOneTime PriceUnitPriceCadence = "one_time" PriceUnitPriceCadenceMonthly PriceUnitPriceCadence = "monthly" PriceUnitPriceCadenceQuarterly PriceUnitPriceCadence = "quarterly" PriceUnitPriceCadenceSemiAnnual PriceUnitPriceCadence = "semi_annual" PriceUnitPriceCadenceAnnual PriceUnitPriceCadence = "annual" PriceUnitPriceCadenceCustom PriceUnitPriceCadence = "custom" )
func (PriceUnitPriceCadence) IsKnown ¶ added in v0.24.0
func (r PriceUnitPriceCadence) IsKnown() bool
type PriceUnitPriceCreditAllocation ¶ added in v0.25.0
type PriceUnitPriceCreditAllocation struct { AllowsRollover bool `json:"allows_rollover,required"` Currency string `json:"currency,required"` JSON priceUnitPriceCreditAllocationJSON `json:"-"` }
func (*PriceUnitPriceCreditAllocation) UnmarshalJSON ¶ added in v0.25.0
func (r *PriceUnitPriceCreditAllocation) UnmarshalJSON(data []byte) (err error)
type PriceUnitPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PriceUnitPriceInvoicingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PriceUnitPriceInvoicingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON priceUnitPriceInvoicingCycleConfigurationJSON `json:"-"` }
func (*PriceUnitPriceInvoicingCycleConfiguration) UnmarshalJSON ¶ added in v0.56.0
func (r *PriceUnitPriceInvoicingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PriceUnitPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceUnitPriceInvoicingCycleConfigurationDurationUnit string
const ( PriceUnitPriceInvoicingCycleConfigurationDurationUnitDay PriceUnitPriceInvoicingCycleConfigurationDurationUnit = "day" PriceUnitPriceInvoicingCycleConfigurationDurationUnitMonth PriceUnitPriceInvoicingCycleConfigurationDurationUnit = "month" )
func (PriceUnitPriceInvoicingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PriceUnitPriceInvoicingCycleConfigurationDurationUnit) IsKnown() bool
type PriceUnitPriceItem ¶
type PriceUnitPriceItem struct { ID string `json:"id,required"` Name string `json:"name,required"` JSON priceUnitPriceItemJSON `json:"-"` }
func (*PriceUnitPriceItem) UnmarshalJSON ¶
func (r *PriceUnitPriceItem) UnmarshalJSON(data []byte) (err error)
type PriceUnitPriceMaximum ¶
type PriceUnitPriceMaximum 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 priceUnitPriceMaximumJSON `json:"-"` }
func (*PriceUnitPriceMaximum) UnmarshalJSON ¶
func (r *PriceUnitPriceMaximum) UnmarshalJSON(data []byte) (err error)
type PriceUnitPriceMinimum ¶
type PriceUnitPriceMinimum 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 priceUnitPriceMinimumJSON `json:"-"` }
func (*PriceUnitPriceMinimum) UnmarshalJSON ¶
func (r *PriceUnitPriceMinimum) UnmarshalJSON(data []byte) (err error)
type PriceUnitPriceModelType ¶
type PriceUnitPriceModelType string
const (
PriceUnitPriceModelTypeUnit PriceUnitPriceModelType = "unit"
)
func (PriceUnitPriceModelType) IsKnown ¶ added in v0.24.0
func (r PriceUnitPriceModelType) IsKnown() bool
type PriceUnitPricePriceType ¶
type PriceUnitPricePriceType string
const ( PriceUnitPricePriceTypeUsagePrice PriceUnitPricePriceType = "usage_price" PriceUnitPricePriceTypeFixedPrice PriceUnitPricePriceType = "fixed_price" )
func (PriceUnitPricePriceType) IsKnown ¶ added in v0.24.0
func (r PriceUnitPricePriceType) IsKnown() bool
type PriceUnitPriceUnitConfig ¶
type PriceUnitPriceUnitConfig struct { // Rate per unit of usage UnitAmount string `json:"unit_amount,required"` JSON priceUnitPriceUnitConfigJSON `json:"-"` }
func (*PriceUnitPriceUnitConfig) UnmarshalJSON ¶
func (r *PriceUnitPriceUnitConfig) UnmarshalJSON(data []byte) (err error)
type PriceUnitWithPercentPrice ¶ added in v0.20.0
type PriceUnitWithPercentPrice struct { ID string `json:"id,required"` BillableMetric PriceUnitWithPercentPriceBillableMetric `json:"billable_metric,required,nullable"` BillingCycleConfiguration PriceUnitWithPercentPriceBillingCycleConfiguration `json:"billing_cycle_configuration,required"` Cadence PriceUnitWithPercentPriceCadence `json:"cadence,required"` ConversionRate float64 `json:"conversion_rate,required,nullable"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditAllocation PriceUnitWithPercentPriceCreditAllocation `json:"credit_allocation,required,nullable"` Currency string `json:"currency,required"` Discount shared.Discount `json:"discount,required,nullable"` ExternalPriceID string `json:"external_price_id,required,nullable"` FixedPriceQuantity float64 `json:"fixed_price_quantity,required,nullable"` InvoicingCycleConfiguration PriceUnitWithPercentPriceInvoicingCycleConfiguration `json:"invoicing_cycle_configuration,required,nullable"` Item PriceUnitWithPercentPriceItem `json:"item,required"` Maximum PriceUnitWithPercentPriceMaximum `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 PriceUnitWithPercentPriceMinimum `json:"minimum,required,nullable"` MinimumAmount string `json:"minimum_amount,required,nullable"` ModelType PriceUnitWithPercentPriceModelType `json:"model_type,required"` Name string `json:"name,required"` PlanPhaseOrder int64 `json:"plan_phase_order,required,nullable"` PriceType PriceUnitWithPercentPricePriceType `json:"price_type,required"` UnitWithPercentConfig map[string]interface{} `json:"unit_with_percent_config,required"` JSON priceUnitWithPercentPriceJSON `json:"-"` }
func (*PriceUnitWithPercentPrice) UnmarshalJSON ¶ added in v0.20.0
func (r *PriceUnitWithPercentPrice) UnmarshalJSON(data []byte) (err error)
type PriceUnitWithPercentPriceBillableMetric ¶ added in v0.20.0
type PriceUnitWithPercentPriceBillableMetric struct { ID string `json:"id,required"` JSON priceUnitWithPercentPriceBillableMetricJSON `json:"-"` }
func (*PriceUnitWithPercentPriceBillableMetric) UnmarshalJSON ¶ added in v0.20.0
func (r *PriceUnitWithPercentPriceBillableMetric) UnmarshalJSON(data []byte) (err error)
type PriceUnitWithPercentPriceBillingCycleConfiguration ¶ added in v0.44.0
type PriceUnitWithPercentPriceBillingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PriceUnitWithPercentPriceBillingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON priceUnitWithPercentPriceBillingCycleConfigurationJSON `json:"-"` }
func (*PriceUnitWithPercentPriceBillingCycleConfiguration) UnmarshalJSON ¶ added in v0.44.0
func (r *PriceUnitWithPercentPriceBillingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PriceUnitWithPercentPriceBillingCycleConfigurationDurationUnit ¶ added in v0.44.0
type PriceUnitWithPercentPriceBillingCycleConfigurationDurationUnit string
const ( PriceUnitWithPercentPriceBillingCycleConfigurationDurationUnitDay PriceUnitWithPercentPriceBillingCycleConfigurationDurationUnit = "day" PriceUnitWithPercentPriceBillingCycleConfigurationDurationUnitMonth PriceUnitWithPercentPriceBillingCycleConfigurationDurationUnit = "month" )
func (PriceUnitWithPercentPriceBillingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.44.0
func (r PriceUnitWithPercentPriceBillingCycleConfigurationDurationUnit) IsKnown() bool
type PriceUnitWithPercentPriceCadence ¶ added in v0.20.0
type PriceUnitWithPercentPriceCadence string
const ( PriceUnitWithPercentPriceCadenceOneTime PriceUnitWithPercentPriceCadence = "one_time" PriceUnitWithPercentPriceCadenceMonthly PriceUnitWithPercentPriceCadence = "monthly" PriceUnitWithPercentPriceCadenceQuarterly PriceUnitWithPercentPriceCadence = "quarterly" PriceUnitWithPercentPriceCadenceSemiAnnual PriceUnitWithPercentPriceCadence = "semi_annual" PriceUnitWithPercentPriceCadenceAnnual PriceUnitWithPercentPriceCadence = "annual" PriceUnitWithPercentPriceCadenceCustom PriceUnitWithPercentPriceCadence = "custom" )
func (PriceUnitWithPercentPriceCadence) IsKnown ¶ added in v0.24.0
func (r PriceUnitWithPercentPriceCadence) IsKnown() bool
type PriceUnitWithPercentPriceCreditAllocation ¶ added in v0.25.0
type PriceUnitWithPercentPriceCreditAllocation struct { AllowsRollover bool `json:"allows_rollover,required"` Currency string `json:"currency,required"` JSON priceUnitWithPercentPriceCreditAllocationJSON `json:"-"` }
func (*PriceUnitWithPercentPriceCreditAllocation) UnmarshalJSON ¶ added in v0.25.0
func (r *PriceUnitWithPercentPriceCreditAllocation) UnmarshalJSON(data []byte) (err error)
type PriceUnitWithPercentPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PriceUnitWithPercentPriceInvoicingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PriceUnitWithPercentPriceInvoicingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON priceUnitWithPercentPriceInvoicingCycleConfigurationJSON `json:"-"` }
func (*PriceUnitWithPercentPriceInvoicingCycleConfiguration) UnmarshalJSON ¶ added in v0.56.0
func (r *PriceUnitWithPercentPriceInvoicingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PriceUnitWithPercentPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceUnitWithPercentPriceInvoicingCycleConfigurationDurationUnit string
const ( PriceUnitWithPercentPriceInvoicingCycleConfigurationDurationUnitDay PriceUnitWithPercentPriceInvoicingCycleConfigurationDurationUnit = "day" PriceUnitWithPercentPriceInvoicingCycleConfigurationDurationUnitMonth PriceUnitWithPercentPriceInvoicingCycleConfigurationDurationUnit = "month" )
func (PriceUnitWithPercentPriceInvoicingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PriceUnitWithPercentPriceInvoicingCycleConfigurationDurationUnit) IsKnown() bool
type PriceUnitWithPercentPriceItem ¶ added in v0.20.0
type PriceUnitWithPercentPriceItem struct { ID string `json:"id,required"` Name string `json:"name,required"` JSON priceUnitWithPercentPriceItemJSON `json:"-"` }
func (*PriceUnitWithPercentPriceItem) UnmarshalJSON ¶ added in v0.20.0
func (r *PriceUnitWithPercentPriceItem) UnmarshalJSON(data []byte) (err error)
type PriceUnitWithPercentPriceMaximum ¶ added in v0.20.0
type PriceUnitWithPercentPriceMaximum 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 priceUnitWithPercentPriceMaximumJSON `json:"-"` }
func (*PriceUnitWithPercentPriceMaximum) UnmarshalJSON ¶ added in v0.20.0
func (r *PriceUnitWithPercentPriceMaximum) UnmarshalJSON(data []byte) (err error)
type PriceUnitWithPercentPriceMinimum ¶ added in v0.20.0
type PriceUnitWithPercentPriceMinimum 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 priceUnitWithPercentPriceMinimumJSON `json:"-"` }
func (*PriceUnitWithPercentPriceMinimum) UnmarshalJSON ¶ added in v0.20.0
func (r *PriceUnitWithPercentPriceMinimum) UnmarshalJSON(data []byte) (err error)
type PriceUnitWithPercentPriceModelType ¶ added in v0.20.0
type PriceUnitWithPercentPriceModelType string
const (
PriceUnitWithPercentPriceModelTypeUnitWithPercent PriceUnitWithPercentPriceModelType = "unit_with_percent"
)
func (PriceUnitWithPercentPriceModelType) IsKnown ¶ added in v0.24.0
func (r PriceUnitWithPercentPriceModelType) IsKnown() bool
type PriceUnitWithPercentPricePriceType ¶ added in v0.20.0
type PriceUnitWithPercentPricePriceType string
const ( PriceUnitWithPercentPricePriceTypeUsagePrice PriceUnitWithPercentPricePriceType = "usage_price" PriceUnitWithPercentPricePriceTypeFixedPrice PriceUnitWithPercentPricePriceType = "fixed_price" )
func (PriceUnitWithPercentPricePriceType) IsKnown ¶ added in v0.24.0
func (r PriceUnitWithPercentPricePriceType) IsKnown() bool
type PriceUnitWithProrationPrice ¶ added in v0.34.0
type PriceUnitWithProrationPrice struct { ID string `json:"id,required"` BillableMetric PriceUnitWithProrationPriceBillableMetric `json:"billable_metric,required,nullable"` BillingCycleConfiguration PriceUnitWithProrationPriceBillingCycleConfiguration `json:"billing_cycle_configuration,required"` Cadence PriceUnitWithProrationPriceCadence `json:"cadence,required"` ConversionRate float64 `json:"conversion_rate,required,nullable"` CreatedAt time.Time `json:"created_at,required" format:"date-time"` CreditAllocation PriceUnitWithProrationPriceCreditAllocation `json:"credit_allocation,required,nullable"` Currency string `json:"currency,required"` Discount shared.Discount `json:"discount,required,nullable"` ExternalPriceID string `json:"external_price_id,required,nullable"` FixedPriceQuantity float64 `json:"fixed_price_quantity,required,nullable"` InvoicingCycleConfiguration PriceUnitWithProrationPriceInvoicingCycleConfiguration `json:"invoicing_cycle_configuration,required,nullable"` Item PriceUnitWithProrationPriceItem `json:"item,required"` Maximum PriceUnitWithProrationPriceMaximum `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 PriceUnitWithProrationPriceMinimum `json:"minimum,required,nullable"` MinimumAmount string `json:"minimum_amount,required,nullable"` ModelType PriceUnitWithProrationPriceModelType `json:"model_type,required"` Name string `json:"name,required"` PlanPhaseOrder int64 `json:"plan_phase_order,required,nullable"` PriceType PriceUnitWithProrationPricePriceType `json:"price_type,required"` UnitWithProrationConfig map[string]interface{} `json:"unit_with_proration_config,required"` JSON priceUnitWithProrationPriceJSON `json:"-"` }
func (*PriceUnitWithProrationPrice) UnmarshalJSON ¶ added in v0.34.0
func (r *PriceUnitWithProrationPrice) UnmarshalJSON(data []byte) (err error)
type PriceUnitWithProrationPriceBillableMetric ¶ added in v0.34.0
type PriceUnitWithProrationPriceBillableMetric struct { ID string `json:"id,required"` JSON priceUnitWithProrationPriceBillableMetricJSON `json:"-"` }
func (*PriceUnitWithProrationPriceBillableMetric) UnmarshalJSON ¶ added in v0.34.0
func (r *PriceUnitWithProrationPriceBillableMetric) UnmarshalJSON(data []byte) (err error)
type PriceUnitWithProrationPriceBillingCycleConfiguration ¶ added in v0.44.0
type PriceUnitWithProrationPriceBillingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PriceUnitWithProrationPriceBillingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON priceUnitWithProrationPriceBillingCycleConfigurationJSON `json:"-"` }
func (*PriceUnitWithProrationPriceBillingCycleConfiguration) UnmarshalJSON ¶ added in v0.44.0
func (r *PriceUnitWithProrationPriceBillingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PriceUnitWithProrationPriceBillingCycleConfigurationDurationUnit ¶ added in v0.44.0
type PriceUnitWithProrationPriceBillingCycleConfigurationDurationUnit string
const ( PriceUnitWithProrationPriceBillingCycleConfigurationDurationUnitDay PriceUnitWithProrationPriceBillingCycleConfigurationDurationUnit = "day" PriceUnitWithProrationPriceBillingCycleConfigurationDurationUnitMonth PriceUnitWithProrationPriceBillingCycleConfigurationDurationUnit = "month" )
func (PriceUnitWithProrationPriceBillingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.44.0
func (r PriceUnitWithProrationPriceBillingCycleConfigurationDurationUnit) IsKnown() bool
type PriceUnitWithProrationPriceCadence ¶ added in v0.34.0
type PriceUnitWithProrationPriceCadence string
const ( PriceUnitWithProrationPriceCadenceOneTime PriceUnitWithProrationPriceCadence = "one_time" PriceUnitWithProrationPriceCadenceMonthly PriceUnitWithProrationPriceCadence = "monthly" PriceUnitWithProrationPriceCadenceQuarterly PriceUnitWithProrationPriceCadence = "quarterly" PriceUnitWithProrationPriceCadenceSemiAnnual PriceUnitWithProrationPriceCadence = "semi_annual" PriceUnitWithProrationPriceCadenceAnnual PriceUnitWithProrationPriceCadence = "annual" PriceUnitWithProrationPriceCadenceCustom PriceUnitWithProrationPriceCadence = "custom" )
func (PriceUnitWithProrationPriceCadence) IsKnown ¶ added in v0.34.0
func (r PriceUnitWithProrationPriceCadence) IsKnown() bool
type PriceUnitWithProrationPriceCreditAllocation ¶ added in v0.34.0
type PriceUnitWithProrationPriceCreditAllocation struct { AllowsRollover bool `json:"allows_rollover,required"` Currency string `json:"currency,required"` JSON priceUnitWithProrationPriceCreditAllocationJSON `json:"-"` }
func (*PriceUnitWithProrationPriceCreditAllocation) UnmarshalJSON ¶ added in v0.34.0
func (r *PriceUnitWithProrationPriceCreditAllocation) UnmarshalJSON(data []byte) (err error)
type PriceUnitWithProrationPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type PriceUnitWithProrationPriceInvoicingCycleConfiguration struct { Duration int64 `json:"duration,required"` DurationUnit PriceUnitWithProrationPriceInvoicingCycleConfigurationDurationUnit `json:"duration_unit,required"` JSON priceUnitWithProrationPriceInvoicingCycleConfigurationJSON `json:"-"` }
func (*PriceUnitWithProrationPriceInvoicingCycleConfiguration) UnmarshalJSON ¶ added in v0.56.0
func (r *PriceUnitWithProrationPriceInvoicingCycleConfiguration) UnmarshalJSON(data []byte) (err error)
type PriceUnitWithProrationPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type PriceUnitWithProrationPriceInvoicingCycleConfigurationDurationUnit string
const ( PriceUnitWithProrationPriceInvoicingCycleConfigurationDurationUnitDay PriceUnitWithProrationPriceInvoicingCycleConfigurationDurationUnit = "day" PriceUnitWithProrationPriceInvoicingCycleConfigurationDurationUnitMonth PriceUnitWithProrationPriceInvoicingCycleConfigurationDurationUnit = "month" )
func (PriceUnitWithProrationPriceInvoicingCycleConfigurationDurationUnit) IsKnown ¶ added in v0.56.0
func (r PriceUnitWithProrationPriceInvoicingCycleConfigurationDurationUnit) IsKnown() bool
type PriceUnitWithProrationPriceItem ¶ added in v0.34.0
type PriceUnitWithProrationPriceItem struct { ID string `json:"id,required"` Name string `json:"name,required"` JSON priceUnitWithProrationPriceItemJSON `json:"-"` }
func (*PriceUnitWithProrationPriceItem) UnmarshalJSON ¶ added in v0.34.0
func (r *PriceUnitWithProrationPriceItem) UnmarshalJSON(data []byte) (err error)
type PriceUnitWithProrationPriceMaximum ¶ added in v0.34.0
type PriceUnitWithProrationPriceMaximum 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 priceUnitWithProrationPriceMaximumJSON `json:"-"` }
func (*PriceUnitWithProrationPriceMaximum) UnmarshalJSON ¶ added in v0.34.0
func (r *PriceUnitWithProrationPriceMaximum) UnmarshalJSON(data []byte) (err error)
type PriceUnitWithProrationPriceMinimum ¶ added in v0.34.0
type PriceUnitWithProrationPriceMinimum 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 priceUnitWithProrationPriceMinimumJSON `json:"-"` }
func (*PriceUnitWithProrationPriceMinimum) UnmarshalJSON ¶ added in v0.34.0
func (r *PriceUnitWithProrationPriceMinimum) UnmarshalJSON(data []byte) (err error)
type PriceUnitWithProrationPriceModelType ¶ added in v0.34.0
type PriceUnitWithProrationPriceModelType string
const (
PriceUnitWithProrationPriceModelTypeUnitWithProration PriceUnitWithProrationPriceModelType = "unit_with_proration"
)
func (PriceUnitWithProrationPriceModelType) IsKnown ¶ added in v0.34.0
func (r PriceUnitWithProrationPriceModelType) IsKnown() bool
type PriceUnitWithProrationPricePriceType ¶ added in v0.34.0
type PriceUnitWithProrationPricePriceType string
const ( PriceUnitWithProrationPricePriceTypeUsagePrice PriceUnitWithProrationPricePriceType = "usage_price" PriceUnitWithProrationPricePriceTypeFixedPrice PriceUnitWithProrationPricePriceType = "fixed_price" )
func (PriceUnitWithProrationPricePriceType) IsKnown ¶ added in v0.34.0
func (r PriceUnitWithProrationPricePriceType) IsKnown() bool
type PriceUpdateParams ¶ added in v0.42.0
type PriceUpdateParams struct { // 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 (PriceUpdateParams) MarshalJSON ¶ added in v0.42.0
func (r PriceUpdateParams) MarshalJSON() (data []byte, err error)
type Subscription ¶
type Subscription 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 []SubscriptionAdjustmentInterval `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 SubscriptionBillingCycleAnchorConfiguration `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](../guides/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](../guides/product-catalog/timezones.md) for information // on what this timezone parameter influences within Orb. Customer Customer `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 []SubscriptionDiscountInterval `json:"discount_intervals,required"` // The date Orb stops billing for this subscription. EndDate time.Time `json:"end_date,required,nullable" format:"date-time"` FixedFeeQuantitySchedule []SubscriptionFixedFeeQuantitySchedule `json:"fixed_fee_quantity_schedule,required"` InvoicingThreshold string `json:"invoicing_threshold,required,nullable"` // The maximum intervals for this subscription. MaximumIntervals []SubscriptionMaximumInterval `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 []SubscriptionMinimumInterval `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](../guides/core-concepts.mdx#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 Plan `json:"plan,required"` // The price intervals for this subscription. PriceIntervals []SubscriptionPriceInterval `json:"price_intervals,required"` RedeemedCoupon SubscriptionRedeemedCoupon `json:"redeemed_coupon,required,nullable"` // The date Orb starts billing for this subscription. StartDate time.Time `json:"start_date,required" format:"date-time"` Status SubscriptionStatus `json:"status,required"` TrialInfo SubscriptionTrialInfo `json:"trial_info,required"` JSON subscriptionJSON `json:"-"` }
A [subscription](../guides/core-concepts.mdx#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 (*Subscription) UnmarshalJSON ¶
func (r *Subscription) UnmarshalJSON(data []byte) (err error)
type SubscriptionAdjustmentInterval ¶ added in v0.31.0
type SubscriptionAdjustmentInterval struct { ID string `json:"id,required"` Adjustment SubscriptionAdjustmentIntervalsAdjustment `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 subscriptionAdjustmentIntervalJSON `json:"-"` }
func (*SubscriptionAdjustmentInterval) UnmarshalJSON ¶ added in v0.31.0
func (r *SubscriptionAdjustmentInterval) UnmarshalJSON(data []byte) (err error)
type SubscriptionAdjustmentIntervalsAdjustment ¶ added in v0.31.0
type SubscriptionAdjustmentIntervalsAdjustment struct { // This field can have the runtime type of [[]string]. AppliesToPriceIDs interface{} `json:"applies_to_price_ids"` // The reason for the adjustment. Reason string `json:"reason,required,nullable"` AdjustmentType SubscriptionAdjustmentIntervalsAdjustmentAdjustmentType `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"` // 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"` // The minimum amount to charge in a given billing period for the prices this // adjustment applies to. MinimumAmount string `json:"minimum_amount"` // 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"` JSON subscriptionAdjustmentIntervalsAdjustmentJSON `json:"-"` // contains filtered or unexported fields }
func (SubscriptionAdjustmentIntervalsAdjustment) AsUnion ¶ added in v0.31.0
func (r SubscriptionAdjustmentIntervalsAdjustment) AsUnion() SubscriptionAdjustmentIntervalsAdjustmentUnion
AsUnion returns a SubscriptionAdjustmentIntervalsAdjustmentUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are SubscriptionAdjustmentIntervalsAdjustmentAmountDiscountAdjustment, SubscriptionAdjustmentIntervalsAdjustmentPercentageDiscountAdjustment, SubscriptionAdjustmentIntervalsAdjustmentUsageDiscountAdjustment, SubscriptionAdjustmentIntervalsAdjustmentMinimumAdjustment, SubscriptionAdjustmentIntervalsAdjustmentMaximumAdjustment.
func (*SubscriptionAdjustmentIntervalsAdjustment) UnmarshalJSON ¶ added in v0.31.0
func (r *SubscriptionAdjustmentIntervalsAdjustment) UnmarshalJSON(data []byte) (err error)
type SubscriptionAdjustmentIntervalsAdjustmentAdjustmentType ¶ added in v0.31.0
type SubscriptionAdjustmentIntervalsAdjustmentAdjustmentType string
const ( SubscriptionAdjustmentIntervalsAdjustmentAdjustmentTypeAmountDiscount SubscriptionAdjustmentIntervalsAdjustmentAdjustmentType = "amount_discount" SubscriptionAdjustmentIntervalsAdjustmentAdjustmentTypePercentageDiscount SubscriptionAdjustmentIntervalsAdjustmentAdjustmentType = "percentage_discount" SubscriptionAdjustmentIntervalsAdjustmentAdjustmentTypeUsageDiscount SubscriptionAdjustmentIntervalsAdjustmentAdjustmentType = "usage_discount" SubscriptionAdjustmentIntervalsAdjustmentAdjustmentTypeMinimum SubscriptionAdjustmentIntervalsAdjustmentAdjustmentType = "minimum" SubscriptionAdjustmentIntervalsAdjustmentAdjustmentTypeMaximum SubscriptionAdjustmentIntervalsAdjustmentAdjustmentType = "maximum" )
func (SubscriptionAdjustmentIntervalsAdjustmentAdjustmentType) IsKnown ¶ added in v0.31.0
func (r SubscriptionAdjustmentIntervalsAdjustmentAdjustmentType) IsKnown() bool
type SubscriptionAdjustmentIntervalsAdjustmentAmountDiscountAdjustment ¶ added in v0.31.0
type SubscriptionAdjustmentIntervalsAdjustmentAmountDiscountAdjustment struct { AdjustmentType SubscriptionAdjustmentIntervalsAdjustmentAmountDiscountAdjustmentAdjustmentType `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"` // The reason for the adjustment. Reason string `json:"reason,required,nullable"` JSON subscriptionAdjustmentIntervalsAdjustmentAmountDiscountAdjustmentJSON `json:"-"` }
func (*SubscriptionAdjustmentIntervalsAdjustmentAmountDiscountAdjustment) UnmarshalJSON ¶ added in v0.31.0
func (r *SubscriptionAdjustmentIntervalsAdjustmentAmountDiscountAdjustment) UnmarshalJSON(data []byte) (err error)
type SubscriptionAdjustmentIntervalsAdjustmentAmountDiscountAdjustmentAdjustmentType ¶ added in v0.31.0
type SubscriptionAdjustmentIntervalsAdjustmentAmountDiscountAdjustmentAdjustmentType string
const (
SubscriptionAdjustmentIntervalsAdjustmentAmountDiscountAdjustmentAdjustmentTypeAmountDiscount SubscriptionAdjustmentIntervalsAdjustmentAmountDiscountAdjustmentAdjustmentType = "amount_discount"
)
type SubscriptionAdjustmentIntervalsAdjustmentMaximumAdjustment ¶ added in v0.31.0
type SubscriptionAdjustmentIntervalsAdjustmentMaximumAdjustment struct { AdjustmentType SubscriptionAdjustmentIntervalsAdjustmentMaximumAdjustmentAdjustmentType `json:"adjustment_type,required"` // The price IDs that this adjustment applies to. AppliesToPriceIDs []string `json:"applies_to_price_ids,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 subscriptionAdjustmentIntervalsAdjustmentMaximumAdjustmentJSON `json:"-"` }
func (*SubscriptionAdjustmentIntervalsAdjustmentMaximumAdjustment) UnmarshalJSON ¶ added in v0.31.0
func (r *SubscriptionAdjustmentIntervalsAdjustmentMaximumAdjustment) UnmarshalJSON(data []byte) (err error)
type SubscriptionAdjustmentIntervalsAdjustmentMaximumAdjustmentAdjustmentType ¶ added in v0.31.0
type SubscriptionAdjustmentIntervalsAdjustmentMaximumAdjustmentAdjustmentType string
const (
SubscriptionAdjustmentIntervalsAdjustmentMaximumAdjustmentAdjustmentTypeMaximum SubscriptionAdjustmentIntervalsAdjustmentMaximumAdjustmentAdjustmentType = "maximum"
)
func (SubscriptionAdjustmentIntervalsAdjustmentMaximumAdjustmentAdjustmentType) IsKnown ¶ added in v0.31.0
func (r SubscriptionAdjustmentIntervalsAdjustmentMaximumAdjustmentAdjustmentType) IsKnown() bool
type SubscriptionAdjustmentIntervalsAdjustmentMinimumAdjustment ¶ added in v0.31.0
type SubscriptionAdjustmentIntervalsAdjustmentMinimumAdjustment struct { AdjustmentType SubscriptionAdjustmentIntervalsAdjustmentMinimumAdjustmentAdjustmentType `json:"adjustment_type,required"` // The price IDs that this adjustment applies to. AppliesToPriceIDs []string `json:"applies_to_price_ids,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 subscriptionAdjustmentIntervalsAdjustmentMinimumAdjustmentJSON `json:"-"` }
func (*SubscriptionAdjustmentIntervalsAdjustmentMinimumAdjustment) UnmarshalJSON ¶ added in v0.31.0
func (r *SubscriptionAdjustmentIntervalsAdjustmentMinimumAdjustment) UnmarshalJSON(data []byte) (err error)
type SubscriptionAdjustmentIntervalsAdjustmentMinimumAdjustmentAdjustmentType ¶ added in v0.31.0
type SubscriptionAdjustmentIntervalsAdjustmentMinimumAdjustmentAdjustmentType string
const (
SubscriptionAdjustmentIntervalsAdjustmentMinimumAdjustmentAdjustmentTypeMinimum SubscriptionAdjustmentIntervalsAdjustmentMinimumAdjustmentAdjustmentType = "minimum"
)
func (SubscriptionAdjustmentIntervalsAdjustmentMinimumAdjustmentAdjustmentType) IsKnown ¶ added in v0.31.0
func (r SubscriptionAdjustmentIntervalsAdjustmentMinimumAdjustmentAdjustmentType) IsKnown() bool
type SubscriptionAdjustmentIntervalsAdjustmentPercentageDiscountAdjustment ¶ added in v0.31.0
type SubscriptionAdjustmentIntervalsAdjustmentPercentageDiscountAdjustment struct { AdjustmentType SubscriptionAdjustmentIntervalsAdjustmentPercentageDiscountAdjustmentAdjustmentType `json:"adjustment_type,required"` // The price IDs that this adjustment applies to. AppliesToPriceIDs []string `json:"applies_to_price_ids,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 subscriptionAdjustmentIntervalsAdjustmentPercentageDiscountAdjustmentJSON `json:"-"` }
func (*SubscriptionAdjustmentIntervalsAdjustmentPercentageDiscountAdjustment) UnmarshalJSON ¶ added in v0.31.0
func (r *SubscriptionAdjustmentIntervalsAdjustmentPercentageDiscountAdjustment) UnmarshalJSON(data []byte) (err error)
type SubscriptionAdjustmentIntervalsAdjustmentPercentageDiscountAdjustmentAdjustmentType ¶ added in v0.31.0
type SubscriptionAdjustmentIntervalsAdjustmentPercentageDiscountAdjustmentAdjustmentType string
const (
SubscriptionAdjustmentIntervalsAdjustmentPercentageDiscountAdjustmentAdjustmentTypePercentageDiscount SubscriptionAdjustmentIntervalsAdjustmentPercentageDiscountAdjustmentAdjustmentType = "percentage_discount"
)
type SubscriptionAdjustmentIntervalsAdjustmentUnion ¶ added in v0.31.0
type SubscriptionAdjustmentIntervalsAdjustmentUnion interface {
// contains filtered or unexported methods
}
Union satisfied by SubscriptionAdjustmentIntervalsAdjustmentAmountDiscountAdjustment, SubscriptionAdjustmentIntervalsAdjustmentPercentageDiscountAdjustment, SubscriptionAdjustmentIntervalsAdjustmentUsageDiscountAdjustment, SubscriptionAdjustmentIntervalsAdjustmentMinimumAdjustment or SubscriptionAdjustmentIntervalsAdjustmentMaximumAdjustment.
type SubscriptionAdjustmentIntervalsAdjustmentUsageDiscountAdjustment ¶ added in v0.31.0
type SubscriptionAdjustmentIntervalsAdjustmentUsageDiscountAdjustment struct { AdjustmentType SubscriptionAdjustmentIntervalsAdjustmentUsageDiscountAdjustmentAdjustmentType `json:"adjustment_type,required"` // The price IDs that this adjustment applies to. AppliesToPriceIDs []string `json:"applies_to_price_ids,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 subscriptionAdjustmentIntervalsAdjustmentUsageDiscountAdjustmentJSON `json:"-"` }
func (*SubscriptionAdjustmentIntervalsAdjustmentUsageDiscountAdjustment) UnmarshalJSON ¶ added in v0.31.0
func (r *SubscriptionAdjustmentIntervalsAdjustmentUsageDiscountAdjustment) UnmarshalJSON(data []byte) (err error)
type SubscriptionAdjustmentIntervalsAdjustmentUsageDiscountAdjustmentAdjustmentType ¶ added in v0.31.0
type SubscriptionAdjustmentIntervalsAdjustmentUsageDiscountAdjustmentAdjustmentType string
const (
SubscriptionAdjustmentIntervalsAdjustmentUsageDiscountAdjustmentAdjustmentTypeUsageDiscount SubscriptionAdjustmentIntervalsAdjustmentUsageDiscountAdjustmentAdjustmentType = "usage_discount"
)
type SubscriptionBillingCycleAnchorConfiguration ¶ added in v0.56.0
type SubscriptionBillingCycleAnchorConfiguration 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 subscriptionBillingCycleAnchorConfigurationJSON `json:"-"` }
func (*SubscriptionBillingCycleAnchorConfiguration) UnmarshalJSON ¶ added in v0.56.0
func (r *SubscriptionBillingCycleAnchorConfiguration) UnmarshalJSON(data []byte) (err error)
type SubscriptionCancelParams ¶
type SubscriptionCancelParams struct { // Determines the timing of subscription cancellation CancelOption param.Field[SubscriptionCancelParamsCancelOption] `json:"cancel_option,required"` // The date that the cancellation should take effect. This parameter can only be // passed if the `cancel_option` is `requested_date`. CancellationDate param.Field[time.Time] `json:"cancellation_date" format:"date-time"` }
func (SubscriptionCancelParams) MarshalJSON ¶
func (r SubscriptionCancelParams) MarshalJSON() (data []byte, err error)
type SubscriptionCancelParamsCancelOption ¶
type SubscriptionCancelParamsCancelOption string
Determines the timing of subscription cancellation
const ( SubscriptionCancelParamsCancelOptionEndOfSubscriptionTerm SubscriptionCancelParamsCancelOption = "end_of_subscription_term" SubscriptionCancelParamsCancelOptionImmediate SubscriptionCancelParamsCancelOption = "immediate" SubscriptionCancelParamsCancelOptionRequestedDate SubscriptionCancelParamsCancelOption = "requested_date" )
func (SubscriptionCancelParamsCancelOption) IsKnown ¶ added in v0.24.0
func (r SubscriptionCancelParamsCancelOption) IsKnown() bool
type SubscriptionDiscountInterval ¶
type SubscriptionDiscountInterval struct { DiscountType SubscriptionDiscountIntervalsDiscountType `json:"discount_type,required"` // Only available if discount_type is `amount`. AmountDiscount string `json:"amount_discount"` // The start date of the discount interval. StartDate time.Time `json:"start_date,required" format:"date-time"` // The end date of the discount interval. EndDate time.Time `json:"end_date,required,nullable" format:"date-time"` // This field can have the runtime type of [[]string]. AppliesToPriceIDs interface{} `json:"applies_to_price_ids"` // This field can have the runtime type of [[]string]. AppliesToPriceIntervalIDs interface{} `json:"applies_to_price_interval_ids"` // 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 subscriptionDiscountIntervalJSON `json:"-"` // contains filtered or unexported fields }
func (SubscriptionDiscountInterval) AsUnion ¶ added in v0.25.0
func (r SubscriptionDiscountInterval) AsUnion() SubscriptionDiscountIntervalsUnion
AsUnion returns a SubscriptionDiscountIntervalsUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are SubscriptionDiscountIntervalsAmountDiscountInterval, SubscriptionDiscountIntervalsPercentageDiscountInterval, SubscriptionDiscountIntervalsUsageDiscountInterval.
func (*SubscriptionDiscountInterval) UnmarshalJSON ¶ added in v0.25.0
func (r *SubscriptionDiscountInterval) UnmarshalJSON(data []byte) (err error)
type SubscriptionDiscountIntervalsAmountDiscountInterval ¶
type SubscriptionDiscountIntervalsAmountDiscountInterval 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 SubscriptionDiscountIntervalsAmountDiscountIntervalDiscountType `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 subscriptionDiscountIntervalsAmountDiscountIntervalJSON `json:"-"` }
func (*SubscriptionDiscountIntervalsAmountDiscountInterval) UnmarshalJSON ¶
func (r *SubscriptionDiscountIntervalsAmountDiscountInterval) UnmarshalJSON(data []byte) (err error)
type SubscriptionDiscountIntervalsAmountDiscountIntervalDiscountType ¶
type SubscriptionDiscountIntervalsAmountDiscountIntervalDiscountType string
const (
SubscriptionDiscountIntervalsAmountDiscountIntervalDiscountTypeAmount SubscriptionDiscountIntervalsAmountDiscountIntervalDiscountType = "amount"
)
func (SubscriptionDiscountIntervalsAmountDiscountIntervalDiscountType) IsKnown ¶ added in v0.24.0
func (r SubscriptionDiscountIntervalsAmountDiscountIntervalDiscountType) IsKnown() bool
type SubscriptionDiscountIntervalsDiscountType ¶ added in v0.25.0
type SubscriptionDiscountIntervalsDiscountType string
const ( SubscriptionDiscountIntervalsDiscountTypeAmount SubscriptionDiscountIntervalsDiscountType = "amount" SubscriptionDiscountIntervalsDiscountTypePercentage SubscriptionDiscountIntervalsDiscountType = "percentage" SubscriptionDiscountIntervalsDiscountTypeUsage SubscriptionDiscountIntervalsDiscountType = "usage" )
func (SubscriptionDiscountIntervalsDiscountType) IsKnown ¶ added in v0.25.0
func (r SubscriptionDiscountIntervalsDiscountType) IsKnown() bool
type SubscriptionDiscountIntervalsPercentageDiscountInterval ¶
type SubscriptionDiscountIntervalsPercentageDiscountInterval 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 SubscriptionDiscountIntervalsPercentageDiscountIntervalDiscountType `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 subscriptionDiscountIntervalsPercentageDiscountIntervalJSON `json:"-"` }
func (*SubscriptionDiscountIntervalsPercentageDiscountInterval) UnmarshalJSON ¶
func (r *SubscriptionDiscountIntervalsPercentageDiscountInterval) UnmarshalJSON(data []byte) (err error)
type SubscriptionDiscountIntervalsPercentageDiscountIntervalDiscountType ¶
type SubscriptionDiscountIntervalsPercentageDiscountIntervalDiscountType string
const (
SubscriptionDiscountIntervalsPercentageDiscountIntervalDiscountTypePercentage SubscriptionDiscountIntervalsPercentageDiscountIntervalDiscountType = "percentage"
)
func (SubscriptionDiscountIntervalsPercentageDiscountIntervalDiscountType) IsKnown ¶ added in v0.24.0
func (r SubscriptionDiscountIntervalsPercentageDiscountIntervalDiscountType) IsKnown() bool
type SubscriptionDiscountIntervalsUnion ¶ added in v0.25.0
type SubscriptionDiscountIntervalsUnion interface {
// contains filtered or unexported methods
}
Union satisfied by SubscriptionDiscountIntervalsAmountDiscountInterval, SubscriptionDiscountIntervalsPercentageDiscountInterval or SubscriptionDiscountIntervalsUsageDiscountInterval.
type SubscriptionDiscountIntervalsUsageDiscountInterval ¶
type SubscriptionDiscountIntervalsUsageDiscountInterval 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 SubscriptionDiscountIntervalsUsageDiscountIntervalDiscountType `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 subscriptionDiscountIntervalsUsageDiscountIntervalJSON `json:"-"` }
func (*SubscriptionDiscountIntervalsUsageDiscountInterval) UnmarshalJSON ¶
func (r *SubscriptionDiscountIntervalsUsageDiscountInterval) UnmarshalJSON(data []byte) (err error)
type SubscriptionDiscountIntervalsUsageDiscountIntervalDiscountType ¶
type SubscriptionDiscountIntervalsUsageDiscountIntervalDiscountType string
const (
SubscriptionDiscountIntervalsUsageDiscountIntervalDiscountTypeUsage SubscriptionDiscountIntervalsUsageDiscountIntervalDiscountType = "usage"
)
func (SubscriptionDiscountIntervalsUsageDiscountIntervalDiscountType) IsKnown ¶ added in v0.24.0
func (r SubscriptionDiscountIntervalsUsageDiscountIntervalDiscountType) IsKnown() bool
type SubscriptionFetchCostsParams ¶
type SubscriptionFetchCostsParams struct { // The currency or custom pricing unit to use. Currency param.Field[string] `query:"currency"` // Costs returned are exclusive of `timeframe_end`. TimeframeEnd param.Field[time.Time] `query:"timeframe_end" format:"date-time"` // Costs returned are inclusive of `timeframe_start`. TimeframeStart param.Field[time.Time] `query:"timeframe_start" format:"date-time"` // Controls whether Orb returns cumulative costs since the start of the billing // period, or incremental day-by-day costs. If your customer has minimums or // discounts, it's strongly recommended that you use the default cumulative // behavior. ViewMode param.Field[SubscriptionFetchCostsParamsViewMode] `query:"view_mode"` }
func (SubscriptionFetchCostsParams) URLQuery ¶
func (r SubscriptionFetchCostsParams) URLQuery() (v url.Values)
URLQuery serializes SubscriptionFetchCostsParams's query parameters as `url.Values`.
type SubscriptionFetchCostsParamsViewMode ¶
type SubscriptionFetchCostsParamsViewMode string
Controls whether Orb returns cumulative costs since the start of the billing period, or incremental day-by-day costs. If your customer has minimums or discounts, it's strongly recommended that you use the default cumulative behavior.
const ( SubscriptionFetchCostsParamsViewModePeriodic SubscriptionFetchCostsParamsViewMode = "periodic" SubscriptionFetchCostsParamsViewModeCumulative SubscriptionFetchCostsParamsViewMode = "cumulative" )
func (SubscriptionFetchCostsParamsViewMode) IsKnown ¶ added in v0.24.0
func (r SubscriptionFetchCostsParamsViewMode) IsKnown() bool
type SubscriptionFetchCostsResponse ¶
type SubscriptionFetchCostsResponse struct { Data []SubscriptionFetchCostsResponseData `json:"data,required"` JSON subscriptionFetchCostsResponseJSON `json:"-"` }
func (*SubscriptionFetchCostsResponse) UnmarshalJSON ¶
func (r *SubscriptionFetchCostsResponse) UnmarshalJSON(data []byte) (err error)
type SubscriptionFetchCostsResponseData ¶
type SubscriptionFetchCostsResponseData struct { PerPriceCosts []SubscriptionFetchCostsResponseDataPerPriceCost `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 subscriptionFetchCostsResponseDataJSON `json:"-"` }
func (*SubscriptionFetchCostsResponseData) UnmarshalJSON ¶
func (r *SubscriptionFetchCostsResponseData) UnmarshalJSON(data []byte) (err error)
type SubscriptionFetchCostsResponseDataPerPriceCost ¶
type SubscriptionFetchCostsResponseDataPerPriceCost struct { // 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. // // ## Unit pricing // // With unit pricing, each unit costs a fixed amount. // // “`json // // { // ... // "model_type": "unit", // "unit_config": { // "unit_amount": "0.50" // } // ... // } // // “` // // ## Tiered pricing // // In tiered pricing, the cost of a given unit depends on the tier range that it // falls into, where each tier range is defined by an upper and lower bound. For // example, the first ten units may cost $0.50 each and all units thereafter may // cost $0.10 each. // // “`json // // { // ... // "model_type": "tiered", // "tiered_config": { // "tiers": [ // { // "first_unit": 1, // "last_unit": 10, // "unit_amount": "0.50" // }, // { // "first_unit": 11, // "last_unit": null, // "unit_amount": "0.10" // } // ] // } // ... // // “` // // ## Bulk pricing // // Bulk pricing applies when the number of units determine the cost of all units. // For example, if you've bought less than 10 units, they may each be $0.50 for a // total of $5.00. Once you've bought more than 10 units, all units may now be // priced at $0.40 (i.e. 101 units total would be $40.40). // // “`json // // { // ... // "model_type": "bulk", // "bulk_config": { // "tiers": [ // { // "maximum_units": 10, // "unit_amount": "0.50" // }, // { // "maximum_units": 1000, // "unit_amount": "0.40" // } // ] // } // ... // } // // “` // // ## Package pricing // // Package pricing defines the size or granularity of a unit for billing purposes. // For example, if the package size is set to 5, then 4 units will be billed as 5 // and 6 units will be billed at 10. // // “`json // // { // ... // "model_type": "package", // "package_config": { // "package_amount": "0.80", // "package_size": 10 // } // ... // } // // “` // // ## BPS pricing // // BPS pricing specifies a per-event (e.g. per-payment) rate in one hundredth of a // percent (the number of basis points to charge), as well as a cap per event to // assess. For example, this would allow you to assess a fee of 0.25% on every // payment you process, with a maximum charge of $25 per payment. // // “`json // // { // ... // "model_type": "bps", // "bps_config": { // "bps": 125, // "per_unit_maximum": "11.00" // } // ... // } // // “` // // ## Bulk BPS pricing // // Bulk BPS pricing specifies BPS parameters in a tiered manner, dependent on the // total quantity across all events. Similar to bulk pricing, the BPS parameters of // a given event depends on the tier range that the billing period falls into. Each // tier range is defined by an upper bound. For example, after $1.5M of payment // volume is reached, each individual payment may have a lower cap or a smaller // take-rate. // // “`json // // ... // "model_type": "bulk_bps", // "bulk_bps_config": { // "tiers": [ // { // "maximum_amount": "1000000.00", // "bps": 125, // "per_unit_maximum": "19.00" // }, // { // "maximum_amount": null, // "bps": 115, // "per_unit_maximum": "4.00" // } // ] // } // ... // } // // “` // // ## Tiered BPS pricing // // Tiered BPS pricing specifies BPS parameters in a graduated manner, where an // event's applicable parameter is a function of its marginal addition to the // period total. Similar to tiered pricing, the BPS parameters of a given event // depends on the tier range that it falls into, where each tier range is defined // by an upper and lower bound. For example, the first few payments may have a 0.8 // BPS take-rate and all payments after a specific volume may incur a take-rate of // 0.5 BPS each. // // “`json // // ... // "model_type": "tiered_bps", // "tiered_bps_config": { // "tiers": [ // { // "minimum_amount": "0", // "maximum_amount": "1000000.00", // "bps": 125, // "per_unit_maximum": "19.00" // }, // { // "minimum_amount": "1000000.00", // "maximum_amount": null, // "bps": 115, // "per_unit_maximum": "4.00" // } // ] // } // ... // } // // “` // // ## Matrix pricing // // Matrix pricing defines a set of unit prices in a one or two-dimensional matrix. // `dimensions` defines the two event property values evaluated in this pricing // model. In a one-dimensional matrix, the second value is `null`. Every // configuration has a list of `matrix_values` which give the unit prices for // specified property values. In a one-dimensional matrix, the matrix values will // have `dimension_values` where the second value of the pair is null. If an event // does not match any of the dimension values in the matrix, it will resort to the // `default_unit_amount`. // // “`json // // { // "model_type": "matrix" // "matrix_config": { // "default_unit_amount": "3.00", // "dimensions": [ // "cluster_name", // "region" // ], // "matrix_values": [ // { // "dimension_values": [ // "alpha", // "west" // ], // "unit_amount": "2.00" // }, // ... // ] // } // } // // “` // // ## Fixed fees // // Fixed fees are prices that are applied independent of usage quantities, and // follow unit pricing. They also have an additional parameter // `fixed_price_quantity`. If the Price represents a fixed cost, this represents // the quantity of units applied. // // “`json // // { // ... // "id": "price_id", // "model_type": "unit", // "unit_config": { // "unit_amount": "2.00" // }, // "fixed_price_quantity": 3.0 // ... // } // // “` Price Price `json:"price,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 subscriptionFetchCostsResponseDataPerPriceCostJSON `json:"-"` }
func (*SubscriptionFetchCostsResponseDataPerPriceCost) UnmarshalJSON ¶
func (r *SubscriptionFetchCostsResponseDataPerPriceCost) UnmarshalJSON(data []byte) (err error)
type SubscriptionFetchScheduleParams ¶
type SubscriptionFetchScheduleParams struct { // Cursor for pagination. This can be populated by the `next_cursor` value returned // from the initial request. Cursor param.Field[string] `query:"cursor"` // The number of items to fetch. Defaults to 20. Limit param.Field[int64] `query:"limit"` StartDateGt param.Field[time.Time] `query:"start_date[gt]" format:"date-time"` StartDateGte param.Field[time.Time] `query:"start_date[gte]" format:"date-time"` StartDateLt param.Field[time.Time] `query:"start_date[lt]" format:"date-time"` StartDateLte param.Field[time.Time] `query:"start_date[lte]" format:"date-time"` }
func (SubscriptionFetchScheduleParams) URLQuery ¶
func (r SubscriptionFetchScheduleParams) URLQuery() (v url.Values)
URLQuery serializes SubscriptionFetchScheduleParams's query parameters as `url.Values`.
type SubscriptionFetchScheduleResponse ¶
type SubscriptionFetchScheduleResponse struct { CreatedAt time.Time `json:"created_at,required" format:"date-time"` EndDate time.Time `json:"end_date,required,nullable" format:"date-time"` Plan SubscriptionFetchScheduleResponsePlan `json:"plan,required"` StartDate time.Time `json:"start_date,required" format:"date-time"` JSON subscriptionFetchScheduleResponseJSON `json:"-"` }
func (*SubscriptionFetchScheduleResponse) UnmarshalJSON ¶
func (r *SubscriptionFetchScheduleResponse) UnmarshalJSON(data []byte) (err error)
type SubscriptionFetchScheduleResponsePlan ¶
type SubscriptionFetchScheduleResponsePlan 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 subscriptionFetchScheduleResponsePlanJSON `json:"-"` }
func (*SubscriptionFetchScheduleResponsePlan) UnmarshalJSON ¶
func (r *SubscriptionFetchScheduleResponsePlan) UnmarshalJSON(data []byte) (err error)
type SubscriptionFetchUsageParams ¶
type SubscriptionFetchUsageParams struct { // When specified in conjunction with `group_by`, this parameter filters usage to a // single billable metric. Note that both `group_by` and `billable_metric_id` must // be specified together. BillableMetricID param.Field[string] `query:"billable_metric_id"` FirstDimensionKey param.Field[string] `query:"first_dimension_key"` FirstDimensionValue param.Field[string] `query:"first_dimension_value"` // This determines the windowing of usage reporting. Granularity param.Field[SubscriptionFetchUsageParamsGranularity] `query:"granularity"` // Groups per-price usage by the key provided. GroupBy param.Field[string] `query:"group_by"` SecondDimensionKey param.Field[string] `query:"second_dimension_key"` SecondDimensionValue param.Field[string] `query:"second_dimension_value"` // Usage returned is exclusive of `timeframe_end`. TimeframeEnd param.Field[time.Time] `query:"timeframe_end" format:"date-time"` // Usage returned is inclusive of `timeframe_start`. TimeframeStart param.Field[time.Time] `query:"timeframe_start" format:"date-time"` // Controls whether Orb returns cumulative usage since the start of the billing // period, or incremental day-by-day usage. If your customer has minimums or // discounts, it's strongly recommended that you use the default cumulative // behavior. ViewMode param.Field[SubscriptionFetchUsageParamsViewMode] `query:"view_mode"` }
func (SubscriptionFetchUsageParams) URLQuery ¶
func (r SubscriptionFetchUsageParams) URLQuery() (v url.Values)
URLQuery serializes SubscriptionFetchUsageParams's query parameters as `url.Values`.
type SubscriptionFetchUsageParamsGranularity ¶
type SubscriptionFetchUsageParamsGranularity string
This determines the windowing of usage reporting.
const (
SubscriptionFetchUsageParamsGranularityDay SubscriptionFetchUsageParamsGranularity = "day"
)
func (SubscriptionFetchUsageParamsGranularity) IsKnown ¶ added in v0.24.0
func (r SubscriptionFetchUsageParamsGranularity) IsKnown() bool
type SubscriptionFetchUsageParamsViewMode ¶
type SubscriptionFetchUsageParamsViewMode string
Controls whether Orb returns cumulative usage since the start of the billing period, or incremental day-by-day usage. If your customer has minimums or discounts, it's strongly recommended that you use the default cumulative behavior.
const ( SubscriptionFetchUsageParamsViewModePeriodic SubscriptionFetchUsageParamsViewMode = "periodic" SubscriptionFetchUsageParamsViewModeCumulative SubscriptionFetchUsageParamsViewMode = "cumulative" )
func (SubscriptionFetchUsageParamsViewMode) IsKnown ¶ added in v0.24.0
func (r SubscriptionFetchUsageParamsViewMode) IsKnown() bool
type SubscriptionFixedFeeQuantitySchedule ¶
type SubscriptionFixedFeeQuantitySchedule 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 subscriptionFixedFeeQuantityScheduleJSON `json:"-"` }
func (*SubscriptionFixedFeeQuantitySchedule) UnmarshalJSON ¶
func (r *SubscriptionFixedFeeQuantitySchedule) UnmarshalJSON(data []byte) (err error)
type SubscriptionListParams ¶
type SubscriptionListParams struct { CreatedAtGt param.Field[time.Time] `query:"created_at[gt]" format:"date-time"` CreatedAtGte param.Field[time.Time] `query:"created_at[gte]" format:"date-time"` CreatedAtLt param.Field[time.Time] `query:"created_at[lt]" format:"date-time"` CreatedAtLte param.Field[time.Time] `query:"created_at[lte]" format:"date-time"` // Cursor for pagination. This can be populated by the `next_cursor` value returned // from the initial request. Cursor param.Field[string] `query:"cursor"` CustomerID param.Field[[]string] `query:"customer_id"` ExternalCustomerID param.Field[string] `query:"external_customer_id"` // The number of items to fetch. Defaults to 20. Limit param.Field[int64] `query:"limit"` Status param.Field[SubscriptionListParamsStatus] `query:"status"` }
func (SubscriptionListParams) URLQuery ¶
func (r SubscriptionListParams) URLQuery() (v url.Values)
URLQuery serializes SubscriptionListParams's query parameters as `url.Values`.
type SubscriptionListParamsStatus ¶
type SubscriptionListParamsStatus string
const ( SubscriptionListParamsStatusActive SubscriptionListParamsStatus = "active" SubscriptionListParamsStatusEnded SubscriptionListParamsStatus = "ended" SubscriptionListParamsStatusUpcoming SubscriptionListParamsStatus = "upcoming" )
func (SubscriptionListParamsStatus) IsKnown ¶ added in v0.24.0
func (r SubscriptionListParamsStatus) IsKnown() bool
type SubscriptionMaximumInterval ¶
type SubscriptionMaximumInterval 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 subscriptionMaximumIntervalJSON `json:"-"` }
func (*SubscriptionMaximumInterval) UnmarshalJSON ¶
func (r *SubscriptionMaximumInterval) UnmarshalJSON(data []byte) (err error)
type SubscriptionMinimumInterval ¶
type SubscriptionMinimumInterval 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 subscriptionMinimumIntervalJSON `json:"-"` }
func (*SubscriptionMinimumInterval) UnmarshalJSON ¶
func (r *SubscriptionMinimumInterval) UnmarshalJSON(data []byte) (err error)
type SubscriptionNewParams ¶
type SubscriptionNewParams struct { AlignBillingWithSubscriptionStartDate param.Field[bool] `json:"align_billing_with_subscription_start_date"` // Determines whether issued invoices for this subscription will automatically be // charged with the saved payment method on the due date. If not specified, this // defaults to the behavior configured for this customer. AutoCollection param.Field[bool] `json:"auto_collection"` AwsRegion param.Field[string] `json:"aws_region"` BillingCycleAnchorConfiguration param.Field[SubscriptionNewParamsBillingCycleAnchorConfiguration] `json:"billing_cycle_anchor_configuration"` // Redemption code to be used for this subscription. If the coupon cannot be found // by its redemption code, or cannot be redeemed, an error response will be // returned and the subscription creation or plan change will not be scheduled. CouponRedemptionCode param.Field[string] `json:"coupon_redemption_code"` CreditsOverageRate param.Field[float64] `json:"credits_overage_rate"` CustomerID param.Field[string] `json:"customer_id"` // Determines the default memo on this subscription's invoices. Note that if this // is not provided, it is determined by the plan configuration. DefaultInvoiceMemo param.Field[string] `json:"default_invoice_memo"` EndDate param.Field[time.Time] `json:"end_date" format:"date-time"` ExternalCustomerID param.Field[string] `json:"external_customer_id"` ExternalMarketplace param.Field[SubscriptionNewParamsExternalMarketplace] `json:"external_marketplace"` ExternalMarketplaceReportingID param.Field[string] `json:"external_marketplace_reporting_id"` // The external_plan_id of the plan that the given subscription should be switched // to. Note that either this property or `plan_id` must be specified. ExternalPlanID param.Field[string] `json:"external_plan_id"` // The phase of the plan to start with InitialPhaseOrder param.Field[int64] `json:"initial_phase_order"` // When this subscription's accrued usage reaches this threshold, an invoice will // be issued for the subscription. If not specified, invoices will only be issued // at the end of the billing period. InvoicingThreshold param.Field[string] `json:"invoicing_threshold"` // 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"` // 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. If not provided, this defaults to the value specified in the plan. NetTerms param.Field[int64] `json:"net_terms"` PerCreditOverageAmount param.Field[float64] `json:"per_credit_overage_amount"` // The plan that the given subscription should be switched to. Note that either // this property or `external_plan_id` must be specified. PlanID param.Field[string] `json:"plan_id"` // Optionally provide a list of overrides for prices on the plan PriceOverrides param.Field[[]SubscriptionNewParamsPriceOverrideUnion] `json:"price_overrides"` StartDate param.Field[time.Time] `json:"start_date" format:"date-time"` }
func (SubscriptionNewParams) MarshalJSON ¶
func (r SubscriptionNewParams) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsBillingCycleAnchorConfiguration ¶ added in v0.56.0
type SubscriptionNewParamsBillingCycleAnchorConfiguration 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 (SubscriptionNewParamsBillingCycleAnchorConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionNewParamsBillingCycleAnchorConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsExternalMarketplace ¶
type SubscriptionNewParamsExternalMarketplace string
const ( SubscriptionNewParamsExternalMarketplaceGoogle SubscriptionNewParamsExternalMarketplace = "google" SubscriptionNewParamsExternalMarketplaceAws SubscriptionNewParamsExternalMarketplace = "aws" SubscriptionNewParamsExternalMarketplaceAzure SubscriptionNewParamsExternalMarketplace = "azure" )
func (SubscriptionNewParamsExternalMarketplace) IsKnown ¶ added in v0.24.0
func (r SubscriptionNewParamsExternalMarketplace) IsKnown() bool
type SubscriptionNewParamsPriceOverride ¶
type SubscriptionNewParamsPriceOverride struct { ID param.Field[string] `json:"id,required"` ModelType param.Field[SubscriptionNewParamsPriceOverridesModelType] `json:"model_type,required"` // The subscription's override minimum amount for the plan. MinimumAmount param.Field[string] `json:"minimum_amount"` // The subscription's override maximum amount for the plan. MaximumAmount param.Field[string] `json:"maximum_amount"` // The currency of the price. If not provided, the currency of the plan will be // used. Currency param.Field[string] `json:"currency"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` Discount param.Field[interface{}] `json:"discount,required"` // The starting quantity of the price, if the price is a fixed price. FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"` UnitConfig param.Field[interface{}] `json:"unit_config,required"` PackageConfig param.Field[interface{}] `json:"package_config,required"` MatrixConfig param.Field[interface{}] `json:"matrix_config,required"` TieredConfig param.Field[interface{}] `json:"tiered_config,required"` TieredBpsConfig param.Field[interface{}] `json:"tiered_bps_config,required"` BpsConfig param.Field[interface{}] `json:"bps_config,required"` BulkBpsConfig param.Field[interface{}] `json:"bulk_bps_config,required"` BulkConfig param.Field[interface{}] `json:"bulk_config,required"` ThresholdTotalAmountConfig param.Field[interface{}] `json:"threshold_total_amount_config,required"` TieredPackageConfig param.Field[interface{}] `json:"tiered_package_config,required"` TieredWithMinimumConfig param.Field[interface{}] `json:"tiered_with_minimum_config,required"` PackageWithAllocationConfig param.Field[interface{}] `json:"package_with_allocation_config,required"` UnitWithPercentConfig param.Field[interface{}] `json:"unit_with_percent_config,required"` GroupedAllocationConfig param.Field[interface{}] `json:"grouped_allocation_config,required"` GroupedWithProratedMinimumConfig param.Field[interface{}] `json:"grouped_with_prorated_minimum_config,required"` BulkWithProrationConfig param.Field[interface{}] `json:"bulk_with_proration_config,required"` UnitWithProrationConfig param.Field[interface{}] `json:"unit_with_proration_config,required"` TieredWithProrationConfig param.Field[interface{}] `json:"tiered_with_proration_config,required"` }
func (SubscriptionNewParamsPriceOverride) MarshalJSON ¶ added in v0.25.0
func (r SubscriptionNewParamsPriceOverride) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverrideUnion ¶ added in v0.25.0
type SubscriptionNewParamsPriceOverrideUnion interface {
// contains filtered or unexported methods
}
Satisfied by SubscriptionNewParamsPriceOverridesOverrideUnitPrice, SubscriptionNewParamsPriceOverridesOverridePackagePrice, SubscriptionNewParamsPriceOverridesOverrideMatrixPrice, SubscriptionNewParamsPriceOverridesOverrideTieredPrice, SubscriptionNewParamsPriceOverridesOverrideTieredBpsPrice, SubscriptionNewParamsPriceOverridesOverrideBpsPrice, SubscriptionNewParamsPriceOverridesOverrideBulkBpsPrice, SubscriptionNewParamsPriceOverridesOverrideBulkPrice, SubscriptionNewParamsPriceOverridesOverrideThresholdTotalAmountPrice, SubscriptionNewParamsPriceOverridesOverrideTieredPackagePrice, SubscriptionNewParamsPriceOverridesOverrideTieredWithMinimumPrice, SubscriptionNewParamsPriceOverridesOverridePackageWithAllocationPrice, SubscriptionNewParamsPriceOverridesOverrideUnitWithPercentPrice, SubscriptionNewParamsPriceOverridesOverrideGroupedAllocationPrice, SubscriptionNewParamsPriceOverridesOverrideGroupedWithProratedMinimumPrice, SubscriptionNewParamsPriceOverridesOverrideBulkWithProrationPrice, SubscriptionNewParamsPriceOverridesOverrideUnitWithProrationPrice, SubscriptionNewParamsPriceOverridesOverrideTieredWithProrationPrice, SubscriptionNewParamsPriceOverride.
type SubscriptionNewParamsPriceOverridesModelType ¶ added in v0.25.0
type SubscriptionNewParamsPriceOverridesModelType string
const ( SubscriptionNewParamsPriceOverridesModelTypeUnit SubscriptionNewParamsPriceOverridesModelType = "unit" SubscriptionNewParamsPriceOverridesModelTypePackage SubscriptionNewParamsPriceOverridesModelType = "package" SubscriptionNewParamsPriceOverridesModelTypeMatrix SubscriptionNewParamsPriceOverridesModelType = "matrix" SubscriptionNewParamsPriceOverridesModelTypeTiered SubscriptionNewParamsPriceOverridesModelType = "tiered" SubscriptionNewParamsPriceOverridesModelTypeTieredBps SubscriptionNewParamsPriceOverridesModelType = "tiered_bps" SubscriptionNewParamsPriceOverridesModelTypeBps SubscriptionNewParamsPriceOverridesModelType = "bps" SubscriptionNewParamsPriceOverridesModelTypeBulkBps SubscriptionNewParamsPriceOverridesModelType = "bulk_bps" SubscriptionNewParamsPriceOverridesModelTypeBulk SubscriptionNewParamsPriceOverridesModelType = "bulk" SubscriptionNewParamsPriceOverridesModelTypeThresholdTotalAmount SubscriptionNewParamsPriceOverridesModelType = "threshold_total_amount" SubscriptionNewParamsPriceOverridesModelTypeTieredPackage SubscriptionNewParamsPriceOverridesModelType = "tiered_package" SubscriptionNewParamsPriceOverridesModelTypeTieredWithMinimum SubscriptionNewParamsPriceOverridesModelType = "tiered_with_minimum" SubscriptionNewParamsPriceOverridesModelTypePackageWithAllocation SubscriptionNewParamsPriceOverridesModelType = "package_with_allocation" SubscriptionNewParamsPriceOverridesModelTypeUnitWithPercent SubscriptionNewParamsPriceOverridesModelType = "unit_with_percent" SubscriptionNewParamsPriceOverridesModelTypeGroupedAllocation SubscriptionNewParamsPriceOverridesModelType = "grouped_allocation" SubscriptionNewParamsPriceOverridesModelTypeGroupedWithProratedMinimum SubscriptionNewParamsPriceOverridesModelType = "grouped_with_prorated_minimum" SubscriptionNewParamsPriceOverridesModelTypeBulkWithProration SubscriptionNewParamsPriceOverridesModelType = "bulk_with_proration" SubscriptionNewParamsPriceOverridesModelTypeUnitWithProration SubscriptionNewParamsPriceOverridesModelType = "unit_with_proration" SubscriptionNewParamsPriceOverridesModelTypeTieredWithProration SubscriptionNewParamsPriceOverridesModelType = "tiered_with_proration" )
func (SubscriptionNewParamsPriceOverridesModelType) IsKnown ¶ added in v0.25.0
func (r SubscriptionNewParamsPriceOverridesModelType) IsKnown() bool
type SubscriptionNewParamsPriceOverridesOverrideBpsPrice ¶
type SubscriptionNewParamsPriceOverridesOverrideBpsPrice struct { ID param.Field[string] `json:"id,required"` BpsConfig param.Field[SubscriptionNewParamsPriceOverridesOverrideBpsPriceBpsConfig] `json:"bps_config,required"` ModelType param.Field[SubscriptionNewParamsPriceOverridesOverrideBpsPriceModelType] `json:"model_type,required"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` // The currency of the price. If not provided, the currency of the plan will be // used. Currency param.Field[string] `json:"currency"` // The subscription's override discount for the plan. Discount param.Field[SubscriptionNewParamsPriceOverridesOverrideBpsPriceDiscount] `json:"discount"` // The starting quantity of the price, if the price is a fixed price. FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"` // The subscription's override maximum amount for the plan. MaximumAmount param.Field[string] `json:"maximum_amount"` // The subscription's override minimum amount for the plan. MinimumAmount param.Field[string] `json:"minimum_amount"` }
func (SubscriptionNewParamsPriceOverridesOverrideBpsPrice) MarshalJSON ¶
func (r SubscriptionNewParamsPriceOverridesOverrideBpsPrice) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideBpsPriceBpsConfig ¶
type SubscriptionNewParamsPriceOverridesOverrideBpsPriceBpsConfig 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 (SubscriptionNewParamsPriceOverridesOverrideBpsPriceBpsConfig) MarshalJSON ¶
func (r SubscriptionNewParamsPriceOverridesOverrideBpsPriceBpsConfig) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideBpsPriceDiscount ¶ added in v0.2.0
type SubscriptionNewParamsPriceOverridesOverrideBpsPriceDiscount struct { DiscountType param.Field[SubscriptionNewParamsPriceOverridesOverrideBpsPriceDiscountDiscountType] `json:"discount_type,required"` // Only available if discount_type is `amount`. AmountDiscount param.Field[string] `json:"amount_discount"` // 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"` // 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 `trial` TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount param.Field[float64] `json:"usage_discount"` }
The subscription's override discount for the plan.
func (SubscriptionNewParamsPriceOverridesOverrideBpsPriceDiscount) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionNewParamsPriceOverridesOverrideBpsPriceDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideBpsPriceDiscountDiscountType ¶ added in v0.2.0
type SubscriptionNewParamsPriceOverridesOverrideBpsPriceDiscountDiscountType string
const ( SubscriptionNewParamsPriceOverridesOverrideBpsPriceDiscountDiscountTypePercentage SubscriptionNewParamsPriceOverridesOverrideBpsPriceDiscountDiscountType = "percentage" SubscriptionNewParamsPriceOverridesOverrideBpsPriceDiscountDiscountTypeTrial SubscriptionNewParamsPriceOverridesOverrideBpsPriceDiscountDiscountType = "trial" SubscriptionNewParamsPriceOverridesOverrideBpsPriceDiscountDiscountTypeUsage SubscriptionNewParamsPriceOverridesOverrideBpsPriceDiscountDiscountType = "usage" SubscriptionNewParamsPriceOverridesOverrideBpsPriceDiscountDiscountTypeAmount SubscriptionNewParamsPriceOverridesOverrideBpsPriceDiscountDiscountType = "amount" )
func (SubscriptionNewParamsPriceOverridesOverrideBpsPriceDiscountDiscountType) IsKnown ¶ added in v0.24.0
func (r SubscriptionNewParamsPriceOverridesOverrideBpsPriceDiscountDiscountType) IsKnown() bool
type SubscriptionNewParamsPriceOverridesOverrideBpsPriceModelType ¶
type SubscriptionNewParamsPriceOverridesOverrideBpsPriceModelType string
const (
SubscriptionNewParamsPriceOverridesOverrideBpsPriceModelTypeBps SubscriptionNewParamsPriceOverridesOverrideBpsPriceModelType = "bps"
)
func (SubscriptionNewParamsPriceOverridesOverrideBpsPriceModelType) IsKnown ¶ added in v0.24.0
func (r SubscriptionNewParamsPriceOverridesOverrideBpsPriceModelType) IsKnown() bool
type SubscriptionNewParamsPriceOverridesOverrideBulkBpsPrice ¶
type SubscriptionNewParamsPriceOverridesOverrideBulkBpsPrice struct { ID param.Field[string] `json:"id,required"` BulkBpsConfig param.Field[SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceBulkBpsConfig] `json:"bulk_bps_config,required"` ModelType param.Field[SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceModelType] `json:"model_type,required"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` // The currency of the price. If not provided, the currency of the plan will be // used. Currency param.Field[string] `json:"currency"` // The subscription's override discount for the plan. Discount param.Field[SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceDiscount] `json:"discount"` // The starting quantity of the price, if the price is a fixed price. FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"` // The subscription's override maximum amount for the plan. MaximumAmount param.Field[string] `json:"maximum_amount"` // The subscription's override minimum amount for the plan. MinimumAmount param.Field[string] `json:"minimum_amount"` }
func (SubscriptionNewParamsPriceOverridesOverrideBulkBpsPrice) MarshalJSON ¶
func (r SubscriptionNewParamsPriceOverridesOverrideBulkBpsPrice) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceBulkBpsConfig ¶
type SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceBulkBpsConfig struct { // Tiers for a bulk BPS pricing model where all usage is aggregated to a single // tier based on total volume Tiers param.Field[[]SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceBulkBpsConfigTier] `json:"tiers,required"` }
func (SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceBulkBpsConfig) MarshalJSON ¶
func (r SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceBulkBpsConfig) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceBulkBpsConfigTier ¶
type SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceBulkBpsConfigTier 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 (SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceBulkBpsConfigTier) MarshalJSON ¶
func (r SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceBulkBpsConfigTier) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceDiscount ¶ added in v0.2.0
type SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceDiscount struct { DiscountType param.Field[SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceDiscountDiscountType] `json:"discount_type,required"` // Only available if discount_type is `amount`. AmountDiscount param.Field[string] `json:"amount_discount"` // 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"` // 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 `trial` TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount param.Field[float64] `json:"usage_discount"` }
The subscription's override discount for the plan.
func (SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceDiscount) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceDiscountDiscountType ¶ added in v0.2.0
type SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceDiscountDiscountType string
const ( SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceDiscountDiscountTypePercentage SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceDiscountDiscountType = "percentage" SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceDiscountDiscountTypeTrial SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceDiscountDiscountType = "trial" SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceDiscountDiscountTypeUsage SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceDiscountDiscountType = "usage" SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceDiscountDiscountTypeAmount SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceDiscountDiscountType = "amount" )
func (SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceDiscountDiscountType) IsKnown ¶ added in v0.24.0
func (r SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceDiscountDiscountType) IsKnown() bool
type SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceModelType ¶
type SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceModelType string
const (
SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceModelTypeBulkBps SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceModelType = "bulk_bps"
)
func (SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceModelType) IsKnown ¶ added in v0.24.0
func (r SubscriptionNewParamsPriceOverridesOverrideBulkBpsPriceModelType) IsKnown() bool
type SubscriptionNewParamsPriceOverridesOverrideBulkPrice ¶
type SubscriptionNewParamsPriceOverridesOverrideBulkPrice struct { ID param.Field[string] `json:"id,required"` BulkConfig param.Field[SubscriptionNewParamsPriceOverridesOverrideBulkPriceBulkConfig] `json:"bulk_config,required"` ModelType param.Field[SubscriptionNewParamsPriceOverridesOverrideBulkPriceModelType] `json:"model_type,required"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` // The currency of the price. If not provided, the currency of the plan will be // used. Currency param.Field[string] `json:"currency"` // The subscription's override discount for the plan. Discount param.Field[SubscriptionNewParamsPriceOverridesOverrideBulkPriceDiscount] `json:"discount"` // The starting quantity of the price, if the price is a fixed price. FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"` // The subscription's override maximum amount for the plan. MaximumAmount param.Field[string] `json:"maximum_amount"` // The subscription's override minimum amount for the plan. MinimumAmount param.Field[string] `json:"minimum_amount"` }
func (SubscriptionNewParamsPriceOverridesOverrideBulkPrice) MarshalJSON ¶
func (r SubscriptionNewParamsPriceOverridesOverrideBulkPrice) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideBulkPriceBulkConfig ¶
type SubscriptionNewParamsPriceOverridesOverrideBulkPriceBulkConfig struct { // Bulk tiers for rating based on total usage volume Tiers param.Field[[]SubscriptionNewParamsPriceOverridesOverrideBulkPriceBulkConfigTier] `json:"tiers,required"` }
func (SubscriptionNewParamsPriceOverridesOverrideBulkPriceBulkConfig) MarshalJSON ¶
func (r SubscriptionNewParamsPriceOverridesOverrideBulkPriceBulkConfig) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideBulkPriceBulkConfigTier ¶
type SubscriptionNewParamsPriceOverridesOverrideBulkPriceBulkConfigTier 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 (SubscriptionNewParamsPriceOverridesOverrideBulkPriceBulkConfigTier) MarshalJSON ¶
func (r SubscriptionNewParamsPriceOverridesOverrideBulkPriceBulkConfigTier) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideBulkPriceDiscount ¶ added in v0.2.0
type SubscriptionNewParamsPriceOverridesOverrideBulkPriceDiscount struct { DiscountType param.Field[SubscriptionNewParamsPriceOverridesOverrideBulkPriceDiscountDiscountType] `json:"discount_type,required"` // Only available if discount_type is `amount`. AmountDiscount param.Field[string] `json:"amount_discount"` // 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"` // 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 `trial` TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount param.Field[float64] `json:"usage_discount"` }
The subscription's override discount for the plan.
func (SubscriptionNewParamsPriceOverridesOverrideBulkPriceDiscount) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionNewParamsPriceOverridesOverrideBulkPriceDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideBulkPriceDiscountDiscountType ¶ added in v0.2.0
type SubscriptionNewParamsPriceOverridesOverrideBulkPriceDiscountDiscountType string
const ( SubscriptionNewParamsPriceOverridesOverrideBulkPriceDiscountDiscountTypePercentage SubscriptionNewParamsPriceOverridesOverrideBulkPriceDiscountDiscountType = "percentage" SubscriptionNewParamsPriceOverridesOverrideBulkPriceDiscountDiscountTypeTrial SubscriptionNewParamsPriceOverridesOverrideBulkPriceDiscountDiscountType = "trial" SubscriptionNewParamsPriceOverridesOverrideBulkPriceDiscountDiscountTypeUsage SubscriptionNewParamsPriceOverridesOverrideBulkPriceDiscountDiscountType = "usage" SubscriptionNewParamsPriceOverridesOverrideBulkPriceDiscountDiscountTypeAmount SubscriptionNewParamsPriceOverridesOverrideBulkPriceDiscountDiscountType = "amount" )
func (SubscriptionNewParamsPriceOverridesOverrideBulkPriceDiscountDiscountType) IsKnown ¶ added in v0.24.0
func (r SubscriptionNewParamsPriceOverridesOverrideBulkPriceDiscountDiscountType) IsKnown() bool
type SubscriptionNewParamsPriceOverridesOverrideBulkPriceModelType ¶
type SubscriptionNewParamsPriceOverridesOverrideBulkPriceModelType string
const (
SubscriptionNewParamsPriceOverridesOverrideBulkPriceModelTypeBulk SubscriptionNewParamsPriceOverridesOverrideBulkPriceModelType = "bulk"
)
func (SubscriptionNewParamsPriceOverridesOverrideBulkPriceModelType) IsKnown ¶ added in v0.24.0
func (r SubscriptionNewParamsPriceOverridesOverrideBulkPriceModelType) IsKnown() bool
type SubscriptionNewParamsPriceOverridesOverrideBulkWithProrationPrice ¶ added in v0.56.0
type SubscriptionNewParamsPriceOverridesOverrideBulkWithProrationPrice struct { ID param.Field[string] `json:"id,required"` BulkWithProrationConfig param.Field[map[string]interface{}] `json:"bulk_with_proration_config,required"` ModelType param.Field[SubscriptionNewParamsPriceOverridesOverrideBulkWithProrationPriceModelType] `json:"model_type,required"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` // The currency of the price. If not provided, the currency of the plan will be // used. Currency param.Field[string] `json:"currency"` // The subscription's override discount for the plan. Discount param.Field[SubscriptionNewParamsPriceOverridesOverrideBulkWithProrationPriceDiscount] `json:"discount"` // The starting quantity of the price, if the price is a fixed price. FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"` // The subscription's override maximum amount for the plan. MaximumAmount param.Field[string] `json:"maximum_amount"` // The subscription's override minimum amount for the plan. MinimumAmount param.Field[string] `json:"minimum_amount"` }
func (SubscriptionNewParamsPriceOverridesOverrideBulkWithProrationPrice) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionNewParamsPriceOverridesOverrideBulkWithProrationPrice) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideBulkWithProrationPriceDiscount ¶ added in v0.56.0
type SubscriptionNewParamsPriceOverridesOverrideBulkWithProrationPriceDiscount struct { DiscountType param.Field[SubscriptionNewParamsPriceOverridesOverrideBulkWithProrationPriceDiscountDiscountType] `json:"discount_type,required"` // Only available if discount_type is `amount`. AmountDiscount param.Field[string] `json:"amount_discount"` // 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"` // 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 `trial` TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount param.Field[float64] `json:"usage_discount"` }
The subscription's override discount for the plan.
func (SubscriptionNewParamsPriceOverridesOverrideBulkWithProrationPriceDiscount) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionNewParamsPriceOverridesOverrideBulkWithProrationPriceDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideBulkWithProrationPriceDiscountDiscountType ¶ added in v0.56.0
type SubscriptionNewParamsPriceOverridesOverrideBulkWithProrationPriceDiscountDiscountType string
const ( SubscriptionNewParamsPriceOverridesOverrideBulkWithProrationPriceDiscountDiscountTypePercentage SubscriptionNewParamsPriceOverridesOverrideBulkWithProrationPriceDiscountDiscountType = "percentage" SubscriptionNewParamsPriceOverridesOverrideBulkWithProrationPriceDiscountDiscountTypeTrial SubscriptionNewParamsPriceOverridesOverrideBulkWithProrationPriceDiscountDiscountType = "trial" SubscriptionNewParamsPriceOverridesOverrideBulkWithProrationPriceDiscountDiscountTypeUsage SubscriptionNewParamsPriceOverridesOverrideBulkWithProrationPriceDiscountDiscountType = "usage" SubscriptionNewParamsPriceOverridesOverrideBulkWithProrationPriceDiscountDiscountTypeAmount SubscriptionNewParamsPriceOverridesOverrideBulkWithProrationPriceDiscountDiscountType = "amount" )
type SubscriptionNewParamsPriceOverridesOverrideBulkWithProrationPriceModelType ¶ added in v0.56.0
type SubscriptionNewParamsPriceOverridesOverrideBulkWithProrationPriceModelType string
const (
SubscriptionNewParamsPriceOverridesOverrideBulkWithProrationPriceModelTypeBulkWithProration SubscriptionNewParamsPriceOverridesOverrideBulkWithProrationPriceModelType = "bulk_with_proration"
)
func (SubscriptionNewParamsPriceOverridesOverrideBulkWithProrationPriceModelType) IsKnown ¶ added in v0.56.0
func (r SubscriptionNewParamsPriceOverridesOverrideBulkWithProrationPriceModelType) IsKnown() bool
type SubscriptionNewParamsPriceOverridesOverrideGroupedAllocationPrice ¶ added in v0.56.0
type SubscriptionNewParamsPriceOverridesOverrideGroupedAllocationPrice struct { ID param.Field[string] `json:"id,required"` GroupedAllocationConfig param.Field[map[string]interface{}] `json:"grouped_allocation_config,required"` ModelType param.Field[SubscriptionNewParamsPriceOverridesOverrideGroupedAllocationPriceModelType] `json:"model_type,required"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` // The currency of the price. If not provided, the currency of the plan will be // used. Currency param.Field[string] `json:"currency"` // The subscription's override discount for the plan. Discount param.Field[SubscriptionNewParamsPriceOverridesOverrideGroupedAllocationPriceDiscount] `json:"discount"` // The starting quantity of the price, if the price is a fixed price. FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"` // The subscription's override maximum amount for the plan. MaximumAmount param.Field[string] `json:"maximum_amount"` // The subscription's override minimum amount for the plan. MinimumAmount param.Field[string] `json:"minimum_amount"` }
func (SubscriptionNewParamsPriceOverridesOverrideGroupedAllocationPrice) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionNewParamsPriceOverridesOverrideGroupedAllocationPrice) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideGroupedAllocationPriceDiscount ¶ added in v0.56.0
type SubscriptionNewParamsPriceOverridesOverrideGroupedAllocationPriceDiscount struct { DiscountType param.Field[SubscriptionNewParamsPriceOverridesOverrideGroupedAllocationPriceDiscountDiscountType] `json:"discount_type,required"` // Only available if discount_type is `amount`. AmountDiscount param.Field[string] `json:"amount_discount"` // 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"` // 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 `trial` TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount param.Field[float64] `json:"usage_discount"` }
The subscription's override discount for the plan.
func (SubscriptionNewParamsPriceOverridesOverrideGroupedAllocationPriceDiscount) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionNewParamsPriceOverridesOverrideGroupedAllocationPriceDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideGroupedAllocationPriceDiscountDiscountType ¶ added in v0.56.0
type SubscriptionNewParamsPriceOverridesOverrideGroupedAllocationPriceDiscountDiscountType string
const ( SubscriptionNewParamsPriceOverridesOverrideGroupedAllocationPriceDiscountDiscountTypePercentage SubscriptionNewParamsPriceOverridesOverrideGroupedAllocationPriceDiscountDiscountType = "percentage" SubscriptionNewParamsPriceOverridesOverrideGroupedAllocationPriceDiscountDiscountTypeTrial SubscriptionNewParamsPriceOverridesOverrideGroupedAllocationPriceDiscountDiscountType = "trial" SubscriptionNewParamsPriceOverridesOverrideGroupedAllocationPriceDiscountDiscountTypeUsage SubscriptionNewParamsPriceOverridesOverrideGroupedAllocationPriceDiscountDiscountType = "usage" SubscriptionNewParamsPriceOverridesOverrideGroupedAllocationPriceDiscountDiscountTypeAmount SubscriptionNewParamsPriceOverridesOverrideGroupedAllocationPriceDiscountDiscountType = "amount" )
type SubscriptionNewParamsPriceOverridesOverrideGroupedAllocationPriceModelType ¶ added in v0.56.0
type SubscriptionNewParamsPriceOverridesOverrideGroupedAllocationPriceModelType string
const (
SubscriptionNewParamsPriceOverridesOverrideGroupedAllocationPriceModelTypeGroupedAllocation SubscriptionNewParamsPriceOverridesOverrideGroupedAllocationPriceModelType = "grouped_allocation"
)
func (SubscriptionNewParamsPriceOverridesOverrideGroupedAllocationPriceModelType) IsKnown ¶ added in v0.56.0
func (r SubscriptionNewParamsPriceOverridesOverrideGroupedAllocationPriceModelType) IsKnown() bool
type SubscriptionNewParamsPriceOverridesOverrideGroupedWithProratedMinimumPrice ¶ added in v0.58.0
type SubscriptionNewParamsPriceOverridesOverrideGroupedWithProratedMinimumPrice struct { ID param.Field[string] `json:"id,required"` GroupedWithProratedMinimumConfig param.Field[map[string]interface{}] `json:"grouped_with_prorated_minimum_config,required"` ModelType param.Field[SubscriptionNewParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceModelType] `json:"model_type,required"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` // The currency of the price. If not provided, the currency of the plan will be // used. Currency param.Field[string] `json:"currency"` // The subscription's override discount for the plan. Discount param.Field[SubscriptionNewParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceDiscount] `json:"discount"` // The starting quantity of the price, if the price is a fixed price. FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"` // The subscription's override maximum amount for the plan. MaximumAmount param.Field[string] `json:"maximum_amount"` // The subscription's override minimum amount for the plan. MinimumAmount param.Field[string] `json:"minimum_amount"` }
func (SubscriptionNewParamsPriceOverridesOverrideGroupedWithProratedMinimumPrice) MarshalJSON ¶ added in v0.58.0
func (r SubscriptionNewParamsPriceOverridesOverrideGroupedWithProratedMinimumPrice) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceDiscount ¶ added in v0.58.0
type SubscriptionNewParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceDiscount struct { DiscountType param.Field[SubscriptionNewParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceDiscountDiscountType] `json:"discount_type,required"` // Only available if discount_type is `amount`. AmountDiscount param.Field[string] `json:"amount_discount"` // 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"` // 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 `trial` TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount param.Field[float64] `json:"usage_discount"` }
The subscription's override discount for the plan.
func (SubscriptionNewParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceDiscount) MarshalJSON ¶ added in v0.58.0
func (r SubscriptionNewParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceDiscountDiscountType ¶ added in v0.58.0
type SubscriptionNewParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceDiscountDiscountType string
const ( SubscriptionNewParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceDiscountDiscountTypePercentage SubscriptionNewParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceDiscountDiscountType = "percentage" SubscriptionNewParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceDiscountDiscountTypeTrial SubscriptionNewParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceDiscountDiscountType = "trial" SubscriptionNewParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceDiscountDiscountTypeUsage SubscriptionNewParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceDiscountDiscountType = "usage" SubscriptionNewParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceDiscountDiscountTypeAmount SubscriptionNewParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceDiscountDiscountType = "amount" )
type SubscriptionNewParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceModelType ¶ added in v0.58.0
type SubscriptionNewParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceModelType string
const (
SubscriptionNewParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceModelTypeGroupedWithProratedMinimum SubscriptionNewParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceModelType = "grouped_with_prorated_minimum"
)
type SubscriptionNewParamsPriceOverridesOverrideMatrixPrice ¶
type SubscriptionNewParamsPriceOverridesOverrideMatrixPrice struct { ID param.Field[string] `json:"id,required"` MatrixConfig param.Field[SubscriptionNewParamsPriceOverridesOverrideMatrixPriceMatrixConfig] `json:"matrix_config,required"` ModelType param.Field[SubscriptionNewParamsPriceOverridesOverrideMatrixPriceModelType] `json:"model_type,required"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` // The currency of the price. If not provided, the currency of the plan will be // used. Currency param.Field[string] `json:"currency"` // The subscription's override discount for the plan. Discount param.Field[SubscriptionNewParamsPriceOverridesOverrideMatrixPriceDiscount] `json:"discount"` // The starting quantity of the price, if the price is a fixed price. FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"` // The subscription's override maximum amount for the plan. MaximumAmount param.Field[string] `json:"maximum_amount"` // The subscription's override minimum amount for the plan. MinimumAmount param.Field[string] `json:"minimum_amount"` }
func (SubscriptionNewParamsPriceOverridesOverrideMatrixPrice) MarshalJSON ¶
func (r SubscriptionNewParamsPriceOverridesOverrideMatrixPrice) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideMatrixPriceDiscount ¶ added in v0.2.0
type SubscriptionNewParamsPriceOverridesOverrideMatrixPriceDiscount struct { DiscountType param.Field[SubscriptionNewParamsPriceOverridesOverrideMatrixPriceDiscountDiscountType] `json:"discount_type,required"` // Only available if discount_type is `amount`. AmountDiscount param.Field[string] `json:"amount_discount"` // 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"` // 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 `trial` TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount param.Field[float64] `json:"usage_discount"` }
The subscription's override discount for the plan.
func (SubscriptionNewParamsPriceOverridesOverrideMatrixPriceDiscount) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionNewParamsPriceOverridesOverrideMatrixPriceDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideMatrixPriceDiscountDiscountType ¶ added in v0.2.0
type SubscriptionNewParamsPriceOverridesOverrideMatrixPriceDiscountDiscountType string
const ( SubscriptionNewParamsPriceOverridesOverrideMatrixPriceDiscountDiscountTypePercentage SubscriptionNewParamsPriceOverridesOverrideMatrixPriceDiscountDiscountType = "percentage" SubscriptionNewParamsPriceOverridesOverrideMatrixPriceDiscountDiscountTypeTrial SubscriptionNewParamsPriceOverridesOverrideMatrixPriceDiscountDiscountType = "trial" SubscriptionNewParamsPriceOverridesOverrideMatrixPriceDiscountDiscountTypeUsage SubscriptionNewParamsPriceOverridesOverrideMatrixPriceDiscountDiscountType = "usage" SubscriptionNewParamsPriceOverridesOverrideMatrixPriceDiscountDiscountTypeAmount SubscriptionNewParamsPriceOverridesOverrideMatrixPriceDiscountDiscountType = "amount" )
func (SubscriptionNewParamsPriceOverridesOverrideMatrixPriceDiscountDiscountType) IsKnown ¶ added in v0.24.0
func (r SubscriptionNewParamsPriceOverridesOverrideMatrixPriceDiscountDiscountType) IsKnown() bool
type SubscriptionNewParamsPriceOverridesOverrideMatrixPriceMatrixConfig ¶
type SubscriptionNewParamsPriceOverridesOverrideMatrixPriceMatrixConfig 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[[]SubscriptionNewParamsPriceOverridesOverrideMatrixPriceMatrixConfigMatrixValue] `json:"matrix_values,required"` }
func (SubscriptionNewParamsPriceOverridesOverrideMatrixPriceMatrixConfig) MarshalJSON ¶
func (r SubscriptionNewParamsPriceOverridesOverrideMatrixPriceMatrixConfig) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideMatrixPriceMatrixConfigMatrixValue ¶
type SubscriptionNewParamsPriceOverridesOverrideMatrixPriceMatrixConfigMatrixValue 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 (SubscriptionNewParamsPriceOverridesOverrideMatrixPriceMatrixConfigMatrixValue) MarshalJSON ¶
func (r SubscriptionNewParamsPriceOverridesOverrideMatrixPriceMatrixConfigMatrixValue) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideMatrixPriceModelType ¶
type SubscriptionNewParamsPriceOverridesOverrideMatrixPriceModelType string
const (
SubscriptionNewParamsPriceOverridesOverrideMatrixPriceModelTypeMatrix SubscriptionNewParamsPriceOverridesOverrideMatrixPriceModelType = "matrix"
)
func (SubscriptionNewParamsPriceOverridesOverrideMatrixPriceModelType) IsKnown ¶ added in v0.24.0
func (r SubscriptionNewParamsPriceOverridesOverrideMatrixPriceModelType) IsKnown() bool
type SubscriptionNewParamsPriceOverridesOverridePackagePrice ¶
type SubscriptionNewParamsPriceOverridesOverridePackagePrice struct { ID param.Field[string] `json:"id,required"` ModelType param.Field[SubscriptionNewParamsPriceOverridesOverridePackagePriceModelType] `json:"model_type,required"` PackageConfig param.Field[SubscriptionNewParamsPriceOverridesOverridePackagePricePackageConfig] `json:"package_config,required"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` // The currency of the price. If not provided, the currency of the plan will be // used. Currency param.Field[string] `json:"currency"` // The subscription's override discount for the plan. Discount param.Field[SubscriptionNewParamsPriceOverridesOverridePackagePriceDiscount] `json:"discount"` // The starting quantity of the price, if the price is a fixed price. FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"` // The subscription's override maximum amount for the plan. MaximumAmount param.Field[string] `json:"maximum_amount"` // The subscription's override minimum amount for the plan. MinimumAmount param.Field[string] `json:"minimum_amount"` }
func (SubscriptionNewParamsPriceOverridesOverridePackagePrice) MarshalJSON ¶
func (r SubscriptionNewParamsPriceOverridesOverridePackagePrice) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverridePackagePriceDiscount ¶ added in v0.2.0
type SubscriptionNewParamsPriceOverridesOverridePackagePriceDiscount struct { DiscountType param.Field[SubscriptionNewParamsPriceOverridesOverridePackagePriceDiscountDiscountType] `json:"discount_type,required"` // Only available if discount_type is `amount`. AmountDiscount param.Field[string] `json:"amount_discount"` // 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"` // 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 `trial` TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount param.Field[float64] `json:"usage_discount"` }
The subscription's override discount for the plan.
func (SubscriptionNewParamsPriceOverridesOverridePackagePriceDiscount) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionNewParamsPriceOverridesOverridePackagePriceDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverridePackagePriceDiscountDiscountType ¶ added in v0.2.0
type SubscriptionNewParamsPriceOverridesOverridePackagePriceDiscountDiscountType string
const ( SubscriptionNewParamsPriceOverridesOverridePackagePriceDiscountDiscountTypePercentage SubscriptionNewParamsPriceOverridesOverridePackagePriceDiscountDiscountType = "percentage" SubscriptionNewParamsPriceOverridesOverridePackagePriceDiscountDiscountTypeTrial SubscriptionNewParamsPriceOverridesOverridePackagePriceDiscountDiscountType = "trial" SubscriptionNewParamsPriceOverridesOverridePackagePriceDiscountDiscountTypeUsage SubscriptionNewParamsPriceOverridesOverridePackagePriceDiscountDiscountType = "usage" SubscriptionNewParamsPriceOverridesOverridePackagePriceDiscountDiscountTypeAmount SubscriptionNewParamsPriceOverridesOverridePackagePriceDiscountDiscountType = "amount" )
func (SubscriptionNewParamsPriceOverridesOverridePackagePriceDiscountDiscountType) IsKnown ¶ added in v0.24.0
func (r SubscriptionNewParamsPriceOverridesOverridePackagePriceDiscountDiscountType) IsKnown() bool
type SubscriptionNewParamsPriceOverridesOverridePackagePriceModelType ¶
type SubscriptionNewParamsPriceOverridesOverridePackagePriceModelType string
const (
SubscriptionNewParamsPriceOverridesOverridePackagePriceModelTypePackage SubscriptionNewParamsPriceOverridesOverridePackagePriceModelType = "package"
)
func (SubscriptionNewParamsPriceOverridesOverridePackagePriceModelType) IsKnown ¶ added in v0.24.0
func (r SubscriptionNewParamsPriceOverridesOverridePackagePriceModelType) IsKnown() bool
type SubscriptionNewParamsPriceOverridesOverridePackagePricePackageConfig ¶
type SubscriptionNewParamsPriceOverridesOverridePackagePricePackageConfig 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 (SubscriptionNewParamsPriceOverridesOverridePackagePricePackageConfig) MarshalJSON ¶
func (r SubscriptionNewParamsPriceOverridesOverridePackagePricePackageConfig) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverridePackageWithAllocationPrice ¶
type SubscriptionNewParamsPriceOverridesOverridePackageWithAllocationPrice struct { ID param.Field[string] `json:"id,required"` ModelType param.Field[SubscriptionNewParamsPriceOverridesOverridePackageWithAllocationPriceModelType] `json:"model_type,required"` PackageWithAllocationConfig param.Field[map[string]interface{}] `json:"package_with_allocation_config,required"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` // The currency of the price. If not provided, the currency of the plan will be // used. Currency param.Field[string] `json:"currency"` // The subscription's override discount for the plan. Discount param.Field[SubscriptionNewParamsPriceOverridesOverridePackageWithAllocationPriceDiscount] `json:"discount"` // The starting quantity of the price, if the price is a fixed price. FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"` // The subscription's override maximum amount for the plan. MaximumAmount param.Field[string] `json:"maximum_amount"` // The subscription's override minimum amount for the plan. MinimumAmount param.Field[string] `json:"minimum_amount"` }
func (SubscriptionNewParamsPriceOverridesOverridePackageWithAllocationPrice) MarshalJSON ¶
func (r SubscriptionNewParamsPriceOverridesOverridePackageWithAllocationPrice) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverridePackageWithAllocationPriceDiscount ¶ added in v0.2.0
type SubscriptionNewParamsPriceOverridesOverridePackageWithAllocationPriceDiscount struct { DiscountType param.Field[SubscriptionNewParamsPriceOverridesOverridePackageWithAllocationPriceDiscountDiscountType] `json:"discount_type,required"` // Only available if discount_type is `amount`. AmountDiscount param.Field[string] `json:"amount_discount"` // 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"` // 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 `trial` TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount param.Field[float64] `json:"usage_discount"` }
The subscription's override discount for the plan.
func (SubscriptionNewParamsPriceOverridesOverridePackageWithAllocationPriceDiscount) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionNewParamsPriceOverridesOverridePackageWithAllocationPriceDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverridePackageWithAllocationPriceDiscountDiscountType ¶ added in v0.2.0
type SubscriptionNewParamsPriceOverridesOverridePackageWithAllocationPriceDiscountDiscountType string
const ( SubscriptionNewParamsPriceOverridesOverridePackageWithAllocationPriceDiscountDiscountTypePercentage SubscriptionNewParamsPriceOverridesOverridePackageWithAllocationPriceDiscountDiscountType = "percentage" SubscriptionNewParamsPriceOverridesOverridePackageWithAllocationPriceDiscountDiscountTypeTrial SubscriptionNewParamsPriceOverridesOverridePackageWithAllocationPriceDiscountDiscountType = "trial" SubscriptionNewParamsPriceOverridesOverridePackageWithAllocationPriceDiscountDiscountTypeUsage SubscriptionNewParamsPriceOverridesOverridePackageWithAllocationPriceDiscountDiscountType = "usage" SubscriptionNewParamsPriceOverridesOverridePackageWithAllocationPriceDiscountDiscountTypeAmount SubscriptionNewParamsPriceOverridesOverridePackageWithAllocationPriceDiscountDiscountType = "amount" )
type SubscriptionNewParamsPriceOverridesOverridePackageWithAllocationPriceModelType ¶
type SubscriptionNewParamsPriceOverridesOverridePackageWithAllocationPriceModelType string
const (
SubscriptionNewParamsPriceOverridesOverridePackageWithAllocationPriceModelTypePackageWithAllocation SubscriptionNewParamsPriceOverridesOverridePackageWithAllocationPriceModelType = "package_with_allocation"
)
type SubscriptionNewParamsPriceOverridesOverrideThresholdTotalAmountPrice ¶
type SubscriptionNewParamsPriceOverridesOverrideThresholdTotalAmountPrice struct { ID param.Field[string] `json:"id,required"` ModelType param.Field[SubscriptionNewParamsPriceOverridesOverrideThresholdTotalAmountPriceModelType] `json:"model_type,required"` ThresholdTotalAmountConfig param.Field[map[string]interface{}] `json:"threshold_total_amount_config,required"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` // The currency of the price. If not provided, the currency of the plan will be // used. Currency param.Field[string] `json:"currency"` // The subscription's override discount for the plan. Discount param.Field[SubscriptionNewParamsPriceOverridesOverrideThresholdTotalAmountPriceDiscount] `json:"discount"` // The starting quantity of the price, if the price is a fixed price. FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"` // The subscription's override maximum amount for the plan. MaximumAmount param.Field[string] `json:"maximum_amount"` // The subscription's override minimum amount for the plan. MinimumAmount param.Field[string] `json:"minimum_amount"` }
func (SubscriptionNewParamsPriceOverridesOverrideThresholdTotalAmountPrice) MarshalJSON ¶
func (r SubscriptionNewParamsPriceOverridesOverrideThresholdTotalAmountPrice) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideThresholdTotalAmountPriceDiscount ¶ added in v0.2.0
type SubscriptionNewParamsPriceOverridesOverrideThresholdTotalAmountPriceDiscount struct { DiscountType param.Field[SubscriptionNewParamsPriceOverridesOverrideThresholdTotalAmountPriceDiscountDiscountType] `json:"discount_type,required"` // Only available if discount_type is `amount`. AmountDiscount param.Field[string] `json:"amount_discount"` // 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"` // 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 `trial` TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount param.Field[float64] `json:"usage_discount"` }
The subscription's override discount for the plan.
func (SubscriptionNewParamsPriceOverridesOverrideThresholdTotalAmountPriceDiscount) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionNewParamsPriceOverridesOverrideThresholdTotalAmountPriceDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideThresholdTotalAmountPriceDiscountDiscountType ¶ added in v0.2.0
type SubscriptionNewParamsPriceOverridesOverrideThresholdTotalAmountPriceDiscountDiscountType string
const ( SubscriptionNewParamsPriceOverridesOverrideThresholdTotalAmountPriceDiscountDiscountTypePercentage SubscriptionNewParamsPriceOverridesOverrideThresholdTotalAmountPriceDiscountDiscountType = "percentage" SubscriptionNewParamsPriceOverridesOverrideThresholdTotalAmountPriceDiscountDiscountTypeTrial SubscriptionNewParamsPriceOverridesOverrideThresholdTotalAmountPriceDiscountDiscountType = "trial" SubscriptionNewParamsPriceOverridesOverrideThresholdTotalAmountPriceDiscountDiscountTypeUsage SubscriptionNewParamsPriceOverridesOverrideThresholdTotalAmountPriceDiscountDiscountType = "usage" SubscriptionNewParamsPriceOverridesOverrideThresholdTotalAmountPriceDiscountDiscountTypeAmount SubscriptionNewParamsPriceOverridesOverrideThresholdTotalAmountPriceDiscountDiscountType = "amount" )
type SubscriptionNewParamsPriceOverridesOverrideThresholdTotalAmountPriceModelType ¶
type SubscriptionNewParamsPriceOverridesOverrideThresholdTotalAmountPriceModelType string
const (
SubscriptionNewParamsPriceOverridesOverrideThresholdTotalAmountPriceModelTypeThresholdTotalAmount SubscriptionNewParamsPriceOverridesOverrideThresholdTotalAmountPriceModelType = "threshold_total_amount"
)
type SubscriptionNewParamsPriceOverridesOverrideTieredBpsPrice ¶
type SubscriptionNewParamsPriceOverridesOverrideTieredBpsPrice struct { ID param.Field[string] `json:"id,required"` ModelType param.Field[SubscriptionNewParamsPriceOverridesOverrideTieredBpsPriceModelType] `json:"model_type,required"` TieredBpsConfig param.Field[SubscriptionNewParamsPriceOverridesOverrideTieredBpsPriceTieredBpsConfig] `json:"tiered_bps_config,required"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` // The currency of the price. If not provided, the currency of the plan will be // used. Currency param.Field[string] `json:"currency"` // The subscription's override discount for the plan. Discount param.Field[SubscriptionNewParamsPriceOverridesOverrideTieredBpsPriceDiscount] `json:"discount"` // The starting quantity of the price, if the price is a fixed price. FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"` // The subscription's override maximum amount for the plan. MaximumAmount param.Field[string] `json:"maximum_amount"` // The subscription's override minimum amount for the plan. MinimumAmount param.Field[string] `json:"minimum_amount"` }
func (SubscriptionNewParamsPriceOverridesOverrideTieredBpsPrice) MarshalJSON ¶
func (r SubscriptionNewParamsPriceOverridesOverrideTieredBpsPrice) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideTieredBpsPriceDiscount ¶ added in v0.2.0
type SubscriptionNewParamsPriceOverridesOverrideTieredBpsPriceDiscount struct { DiscountType param.Field[SubscriptionNewParamsPriceOverridesOverrideTieredBpsPriceDiscountDiscountType] `json:"discount_type,required"` // Only available if discount_type is `amount`. AmountDiscount param.Field[string] `json:"amount_discount"` // 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"` // 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 `trial` TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount param.Field[float64] `json:"usage_discount"` }
The subscription's override discount for the plan.
func (SubscriptionNewParamsPriceOverridesOverrideTieredBpsPriceDiscount) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionNewParamsPriceOverridesOverrideTieredBpsPriceDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideTieredBpsPriceDiscountDiscountType ¶ added in v0.2.0
type SubscriptionNewParamsPriceOverridesOverrideTieredBpsPriceDiscountDiscountType string
const ( SubscriptionNewParamsPriceOverridesOverrideTieredBpsPriceDiscountDiscountTypePercentage SubscriptionNewParamsPriceOverridesOverrideTieredBpsPriceDiscountDiscountType = "percentage" SubscriptionNewParamsPriceOverridesOverrideTieredBpsPriceDiscountDiscountTypeTrial SubscriptionNewParamsPriceOverridesOverrideTieredBpsPriceDiscountDiscountType = "trial" SubscriptionNewParamsPriceOverridesOverrideTieredBpsPriceDiscountDiscountTypeUsage SubscriptionNewParamsPriceOverridesOverrideTieredBpsPriceDiscountDiscountType = "usage" SubscriptionNewParamsPriceOverridesOverrideTieredBpsPriceDiscountDiscountTypeAmount SubscriptionNewParamsPriceOverridesOverrideTieredBpsPriceDiscountDiscountType = "amount" )
type SubscriptionNewParamsPriceOverridesOverrideTieredBpsPriceModelType ¶
type SubscriptionNewParamsPriceOverridesOverrideTieredBpsPriceModelType string
const (
SubscriptionNewParamsPriceOverridesOverrideTieredBpsPriceModelTypeTieredBps SubscriptionNewParamsPriceOverridesOverrideTieredBpsPriceModelType = "tiered_bps"
)
func (SubscriptionNewParamsPriceOverridesOverrideTieredBpsPriceModelType) IsKnown ¶ added in v0.24.0
func (r SubscriptionNewParamsPriceOverridesOverrideTieredBpsPriceModelType) IsKnown() bool
type SubscriptionNewParamsPriceOverridesOverrideTieredBpsPriceTieredBpsConfig ¶
type SubscriptionNewParamsPriceOverridesOverrideTieredBpsPriceTieredBpsConfig struct { // Tiers for a Graduated BPS pricing model, where usage is bucketed into specified // tiers Tiers param.Field[[]SubscriptionNewParamsPriceOverridesOverrideTieredBpsPriceTieredBpsConfigTier] `json:"tiers,required"` }
func (SubscriptionNewParamsPriceOverridesOverrideTieredBpsPriceTieredBpsConfig) MarshalJSON ¶
func (r SubscriptionNewParamsPriceOverridesOverrideTieredBpsPriceTieredBpsConfig) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideTieredBpsPriceTieredBpsConfigTier ¶
type SubscriptionNewParamsPriceOverridesOverrideTieredBpsPriceTieredBpsConfigTier 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 (SubscriptionNewParamsPriceOverridesOverrideTieredBpsPriceTieredBpsConfigTier) MarshalJSON ¶
func (r SubscriptionNewParamsPriceOverridesOverrideTieredBpsPriceTieredBpsConfigTier) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideTieredPackagePrice ¶
type SubscriptionNewParamsPriceOverridesOverrideTieredPackagePrice struct { ID param.Field[string] `json:"id,required"` ModelType param.Field[SubscriptionNewParamsPriceOverridesOverrideTieredPackagePriceModelType] `json:"model_type,required"` TieredPackageConfig param.Field[map[string]interface{}] `json:"tiered_package_config,required"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` // The currency of the price. If not provided, the currency of the plan will be // used. Currency param.Field[string] `json:"currency"` // The subscription's override discount for the plan. Discount param.Field[SubscriptionNewParamsPriceOverridesOverrideTieredPackagePriceDiscount] `json:"discount"` // The starting quantity of the price, if the price is a fixed price. FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"` // The subscription's override maximum amount for the plan. MaximumAmount param.Field[string] `json:"maximum_amount"` // The subscription's override minimum amount for the plan. MinimumAmount param.Field[string] `json:"minimum_amount"` }
func (SubscriptionNewParamsPriceOverridesOverrideTieredPackagePrice) MarshalJSON ¶
func (r SubscriptionNewParamsPriceOverridesOverrideTieredPackagePrice) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideTieredPackagePriceDiscount ¶ added in v0.2.0
type SubscriptionNewParamsPriceOverridesOverrideTieredPackagePriceDiscount struct { DiscountType param.Field[SubscriptionNewParamsPriceOverridesOverrideTieredPackagePriceDiscountDiscountType] `json:"discount_type,required"` // Only available if discount_type is `amount`. AmountDiscount param.Field[string] `json:"amount_discount"` // 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"` // 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 `trial` TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount param.Field[float64] `json:"usage_discount"` }
The subscription's override discount for the plan.
func (SubscriptionNewParamsPriceOverridesOverrideTieredPackagePriceDiscount) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionNewParamsPriceOverridesOverrideTieredPackagePriceDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideTieredPackagePriceDiscountDiscountType ¶ added in v0.2.0
type SubscriptionNewParamsPriceOverridesOverrideTieredPackagePriceDiscountDiscountType string
const ( SubscriptionNewParamsPriceOverridesOverrideTieredPackagePriceDiscountDiscountTypePercentage SubscriptionNewParamsPriceOverridesOverrideTieredPackagePriceDiscountDiscountType = "percentage" SubscriptionNewParamsPriceOverridesOverrideTieredPackagePriceDiscountDiscountTypeTrial SubscriptionNewParamsPriceOverridesOverrideTieredPackagePriceDiscountDiscountType = "trial" SubscriptionNewParamsPriceOverridesOverrideTieredPackagePriceDiscountDiscountTypeUsage SubscriptionNewParamsPriceOverridesOverrideTieredPackagePriceDiscountDiscountType = "usage" SubscriptionNewParamsPriceOverridesOverrideTieredPackagePriceDiscountDiscountTypeAmount SubscriptionNewParamsPriceOverridesOverrideTieredPackagePriceDiscountDiscountType = "amount" )
type SubscriptionNewParamsPriceOverridesOverrideTieredPackagePriceModelType ¶
type SubscriptionNewParamsPriceOverridesOverrideTieredPackagePriceModelType string
const (
SubscriptionNewParamsPriceOverridesOverrideTieredPackagePriceModelTypeTieredPackage SubscriptionNewParamsPriceOverridesOverrideTieredPackagePriceModelType = "tiered_package"
)
func (SubscriptionNewParamsPriceOverridesOverrideTieredPackagePriceModelType) IsKnown ¶ added in v0.24.0
func (r SubscriptionNewParamsPriceOverridesOverrideTieredPackagePriceModelType) IsKnown() bool
type SubscriptionNewParamsPriceOverridesOverrideTieredPrice ¶
type SubscriptionNewParamsPriceOverridesOverrideTieredPrice struct { ID param.Field[string] `json:"id,required"` ModelType param.Field[SubscriptionNewParamsPriceOverridesOverrideTieredPriceModelType] `json:"model_type,required"` TieredConfig param.Field[SubscriptionNewParamsPriceOverridesOverrideTieredPriceTieredConfig] `json:"tiered_config,required"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` // The currency of the price. If not provided, the currency of the plan will be // used. Currency param.Field[string] `json:"currency"` // The subscription's override discount for the plan. Discount param.Field[SubscriptionNewParamsPriceOverridesOverrideTieredPriceDiscount] `json:"discount"` // The starting quantity of the price, if the price is a fixed price. FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"` // The subscription's override maximum amount for the plan. MaximumAmount param.Field[string] `json:"maximum_amount"` // The subscription's override minimum amount for the plan. MinimumAmount param.Field[string] `json:"minimum_amount"` }
func (SubscriptionNewParamsPriceOverridesOverrideTieredPrice) MarshalJSON ¶
func (r SubscriptionNewParamsPriceOverridesOverrideTieredPrice) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideTieredPriceDiscount ¶ added in v0.2.0
type SubscriptionNewParamsPriceOverridesOverrideTieredPriceDiscount struct { DiscountType param.Field[SubscriptionNewParamsPriceOverridesOverrideTieredPriceDiscountDiscountType] `json:"discount_type,required"` // Only available if discount_type is `amount`. AmountDiscount param.Field[string] `json:"amount_discount"` // 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"` // 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 `trial` TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount param.Field[float64] `json:"usage_discount"` }
The subscription's override discount for the plan.
func (SubscriptionNewParamsPriceOverridesOverrideTieredPriceDiscount) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionNewParamsPriceOverridesOverrideTieredPriceDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideTieredPriceDiscountDiscountType ¶ added in v0.2.0
type SubscriptionNewParamsPriceOverridesOverrideTieredPriceDiscountDiscountType string
const ( SubscriptionNewParamsPriceOverridesOverrideTieredPriceDiscountDiscountTypePercentage SubscriptionNewParamsPriceOverridesOverrideTieredPriceDiscountDiscountType = "percentage" SubscriptionNewParamsPriceOverridesOverrideTieredPriceDiscountDiscountTypeTrial SubscriptionNewParamsPriceOverridesOverrideTieredPriceDiscountDiscountType = "trial" SubscriptionNewParamsPriceOverridesOverrideTieredPriceDiscountDiscountTypeUsage SubscriptionNewParamsPriceOverridesOverrideTieredPriceDiscountDiscountType = "usage" SubscriptionNewParamsPriceOverridesOverrideTieredPriceDiscountDiscountTypeAmount SubscriptionNewParamsPriceOverridesOverrideTieredPriceDiscountDiscountType = "amount" )
func (SubscriptionNewParamsPriceOverridesOverrideTieredPriceDiscountDiscountType) IsKnown ¶ added in v0.24.0
func (r SubscriptionNewParamsPriceOverridesOverrideTieredPriceDiscountDiscountType) IsKnown() bool
type SubscriptionNewParamsPriceOverridesOverrideTieredPriceModelType ¶
type SubscriptionNewParamsPriceOverridesOverrideTieredPriceModelType string
const (
SubscriptionNewParamsPriceOverridesOverrideTieredPriceModelTypeTiered SubscriptionNewParamsPriceOverridesOverrideTieredPriceModelType = "tiered"
)
func (SubscriptionNewParamsPriceOverridesOverrideTieredPriceModelType) IsKnown ¶ added in v0.24.0
func (r SubscriptionNewParamsPriceOverridesOverrideTieredPriceModelType) IsKnown() bool
type SubscriptionNewParamsPriceOverridesOverrideTieredPriceTieredConfig ¶
type SubscriptionNewParamsPriceOverridesOverrideTieredPriceTieredConfig struct { // Tiers for rating based on total usage quantities into the specified tier Tiers param.Field[[]SubscriptionNewParamsPriceOverridesOverrideTieredPriceTieredConfigTier] `json:"tiers,required"` }
func (SubscriptionNewParamsPriceOverridesOverrideTieredPriceTieredConfig) MarshalJSON ¶
func (r SubscriptionNewParamsPriceOverridesOverrideTieredPriceTieredConfig) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideTieredPriceTieredConfigTier ¶
type SubscriptionNewParamsPriceOverridesOverrideTieredPriceTieredConfigTier 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 (SubscriptionNewParamsPriceOverridesOverrideTieredPriceTieredConfigTier) MarshalJSON ¶
func (r SubscriptionNewParamsPriceOverridesOverrideTieredPriceTieredConfigTier) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideTieredWithMinimumPrice ¶
type SubscriptionNewParamsPriceOverridesOverrideTieredWithMinimumPrice struct { ID param.Field[string] `json:"id,required"` ModelType param.Field[SubscriptionNewParamsPriceOverridesOverrideTieredWithMinimumPriceModelType] `json:"model_type,required"` TieredWithMinimumConfig param.Field[map[string]interface{}] `json:"tiered_with_minimum_config,required"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` // The currency of the price. If not provided, the currency of the plan will be // used. Currency param.Field[string] `json:"currency"` // The subscription's override discount for the plan. Discount param.Field[SubscriptionNewParamsPriceOverridesOverrideTieredWithMinimumPriceDiscount] `json:"discount"` // The starting quantity of the price, if the price is a fixed price. FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"` // The subscription's override maximum amount for the plan. MaximumAmount param.Field[string] `json:"maximum_amount"` // The subscription's override minimum amount for the plan. MinimumAmount param.Field[string] `json:"minimum_amount"` }
func (SubscriptionNewParamsPriceOverridesOverrideTieredWithMinimumPrice) MarshalJSON ¶
func (r SubscriptionNewParamsPriceOverridesOverrideTieredWithMinimumPrice) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideTieredWithMinimumPriceDiscount ¶ added in v0.2.0
type SubscriptionNewParamsPriceOverridesOverrideTieredWithMinimumPriceDiscount struct { DiscountType param.Field[SubscriptionNewParamsPriceOverridesOverrideTieredWithMinimumPriceDiscountDiscountType] `json:"discount_type,required"` // Only available if discount_type is `amount`. AmountDiscount param.Field[string] `json:"amount_discount"` // 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"` // 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 `trial` TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount param.Field[float64] `json:"usage_discount"` }
The subscription's override discount for the plan.
func (SubscriptionNewParamsPriceOverridesOverrideTieredWithMinimumPriceDiscount) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionNewParamsPriceOverridesOverrideTieredWithMinimumPriceDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideTieredWithMinimumPriceDiscountDiscountType ¶ added in v0.2.0
type SubscriptionNewParamsPriceOverridesOverrideTieredWithMinimumPriceDiscountDiscountType string
const ( SubscriptionNewParamsPriceOverridesOverrideTieredWithMinimumPriceDiscountDiscountTypePercentage SubscriptionNewParamsPriceOverridesOverrideTieredWithMinimumPriceDiscountDiscountType = "percentage" SubscriptionNewParamsPriceOverridesOverrideTieredWithMinimumPriceDiscountDiscountTypeTrial SubscriptionNewParamsPriceOverridesOverrideTieredWithMinimumPriceDiscountDiscountType = "trial" SubscriptionNewParamsPriceOverridesOverrideTieredWithMinimumPriceDiscountDiscountTypeUsage SubscriptionNewParamsPriceOverridesOverrideTieredWithMinimumPriceDiscountDiscountType = "usage" SubscriptionNewParamsPriceOverridesOverrideTieredWithMinimumPriceDiscountDiscountTypeAmount SubscriptionNewParamsPriceOverridesOverrideTieredWithMinimumPriceDiscountDiscountType = "amount" )
type SubscriptionNewParamsPriceOverridesOverrideTieredWithMinimumPriceModelType ¶
type SubscriptionNewParamsPriceOverridesOverrideTieredWithMinimumPriceModelType string
const (
SubscriptionNewParamsPriceOverridesOverrideTieredWithMinimumPriceModelTypeTieredWithMinimum SubscriptionNewParamsPriceOverridesOverrideTieredWithMinimumPriceModelType = "tiered_with_minimum"
)
func (SubscriptionNewParamsPriceOverridesOverrideTieredWithMinimumPriceModelType) IsKnown ¶ added in v0.24.0
func (r SubscriptionNewParamsPriceOverridesOverrideTieredWithMinimumPriceModelType) IsKnown() bool
type SubscriptionNewParamsPriceOverridesOverrideTieredWithProrationPrice ¶ added in v0.60.0
type SubscriptionNewParamsPriceOverridesOverrideTieredWithProrationPrice struct { ID param.Field[string] `json:"id,required"` ModelType param.Field[SubscriptionNewParamsPriceOverridesOverrideTieredWithProrationPriceModelType] `json:"model_type,required"` TieredWithProrationConfig param.Field[map[string]interface{}] `json:"tiered_with_proration_config,required"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` // The currency of the price. If not provided, the currency of the plan will be // used. Currency param.Field[string] `json:"currency"` // The subscription's override discount for the plan. Discount param.Field[SubscriptionNewParamsPriceOverridesOverrideTieredWithProrationPriceDiscount] `json:"discount"` // The starting quantity of the price, if the price is a fixed price. FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"` // The subscription's override maximum amount for the plan. MaximumAmount param.Field[string] `json:"maximum_amount"` // The subscription's override minimum amount for the plan. MinimumAmount param.Field[string] `json:"minimum_amount"` }
func (SubscriptionNewParamsPriceOverridesOverrideTieredWithProrationPrice) MarshalJSON ¶ added in v0.60.0
func (r SubscriptionNewParamsPriceOverridesOverrideTieredWithProrationPrice) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideTieredWithProrationPriceDiscount ¶ added in v0.60.0
type SubscriptionNewParamsPriceOverridesOverrideTieredWithProrationPriceDiscount struct { DiscountType param.Field[SubscriptionNewParamsPriceOverridesOverrideTieredWithProrationPriceDiscountDiscountType] `json:"discount_type,required"` // Only available if discount_type is `amount`. AmountDiscount param.Field[string] `json:"amount_discount"` // 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"` // 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 `trial` TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount param.Field[float64] `json:"usage_discount"` }
The subscription's override discount for the plan.
func (SubscriptionNewParamsPriceOverridesOverrideTieredWithProrationPriceDiscount) MarshalJSON ¶ added in v0.60.0
func (r SubscriptionNewParamsPriceOverridesOverrideTieredWithProrationPriceDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideTieredWithProrationPriceDiscountDiscountType ¶ added in v0.60.0
type SubscriptionNewParamsPriceOverridesOverrideTieredWithProrationPriceDiscountDiscountType string
const ( SubscriptionNewParamsPriceOverridesOverrideTieredWithProrationPriceDiscountDiscountTypePercentage SubscriptionNewParamsPriceOverridesOverrideTieredWithProrationPriceDiscountDiscountType = "percentage" SubscriptionNewParamsPriceOverridesOverrideTieredWithProrationPriceDiscountDiscountTypeTrial SubscriptionNewParamsPriceOverridesOverrideTieredWithProrationPriceDiscountDiscountType = "trial" SubscriptionNewParamsPriceOverridesOverrideTieredWithProrationPriceDiscountDiscountTypeUsage SubscriptionNewParamsPriceOverridesOverrideTieredWithProrationPriceDiscountDiscountType = "usage" SubscriptionNewParamsPriceOverridesOverrideTieredWithProrationPriceDiscountDiscountTypeAmount SubscriptionNewParamsPriceOverridesOverrideTieredWithProrationPriceDiscountDiscountType = "amount" )
type SubscriptionNewParamsPriceOverridesOverrideTieredWithProrationPriceModelType ¶ added in v0.60.0
type SubscriptionNewParamsPriceOverridesOverrideTieredWithProrationPriceModelType string
const (
SubscriptionNewParamsPriceOverridesOverrideTieredWithProrationPriceModelTypeTieredWithProration SubscriptionNewParamsPriceOverridesOverrideTieredWithProrationPriceModelType = "tiered_with_proration"
)
func (SubscriptionNewParamsPriceOverridesOverrideTieredWithProrationPriceModelType) IsKnown ¶ added in v0.60.0
func (r SubscriptionNewParamsPriceOverridesOverrideTieredWithProrationPriceModelType) IsKnown() bool
type SubscriptionNewParamsPriceOverridesOverrideUnitPrice ¶
type SubscriptionNewParamsPriceOverridesOverrideUnitPrice struct { ID param.Field[string] `json:"id,required"` ModelType param.Field[SubscriptionNewParamsPriceOverridesOverrideUnitPriceModelType] `json:"model_type,required"` UnitConfig param.Field[SubscriptionNewParamsPriceOverridesOverrideUnitPriceUnitConfig] `json:"unit_config,required"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` // The currency of the price. If not provided, the currency of the plan will be // used. Currency param.Field[string] `json:"currency"` // The subscription's override discount for the plan. Discount param.Field[SubscriptionNewParamsPriceOverridesOverrideUnitPriceDiscount] `json:"discount"` // The starting quantity of the price, if the price is a fixed price. FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"` // The subscription's override maximum amount for the plan. MaximumAmount param.Field[string] `json:"maximum_amount"` // The subscription's override minimum amount for the plan. MinimumAmount param.Field[string] `json:"minimum_amount"` }
func (SubscriptionNewParamsPriceOverridesOverrideUnitPrice) MarshalJSON ¶
func (r SubscriptionNewParamsPriceOverridesOverrideUnitPrice) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideUnitPriceDiscount ¶ added in v0.2.0
type SubscriptionNewParamsPriceOverridesOverrideUnitPriceDiscount struct { DiscountType param.Field[SubscriptionNewParamsPriceOverridesOverrideUnitPriceDiscountDiscountType] `json:"discount_type,required"` // Only available if discount_type is `amount`. AmountDiscount param.Field[string] `json:"amount_discount"` // 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"` // 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 `trial` TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount param.Field[float64] `json:"usage_discount"` }
The subscription's override discount for the plan.
func (SubscriptionNewParamsPriceOverridesOverrideUnitPriceDiscount) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionNewParamsPriceOverridesOverrideUnitPriceDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideUnitPriceDiscountDiscountType ¶ added in v0.2.0
type SubscriptionNewParamsPriceOverridesOverrideUnitPriceDiscountDiscountType string
const ( SubscriptionNewParamsPriceOverridesOverrideUnitPriceDiscountDiscountTypePercentage SubscriptionNewParamsPriceOverridesOverrideUnitPriceDiscountDiscountType = "percentage" SubscriptionNewParamsPriceOverridesOverrideUnitPriceDiscountDiscountTypeTrial SubscriptionNewParamsPriceOverridesOverrideUnitPriceDiscountDiscountType = "trial" SubscriptionNewParamsPriceOverridesOverrideUnitPriceDiscountDiscountTypeUsage SubscriptionNewParamsPriceOverridesOverrideUnitPriceDiscountDiscountType = "usage" SubscriptionNewParamsPriceOverridesOverrideUnitPriceDiscountDiscountTypeAmount SubscriptionNewParamsPriceOverridesOverrideUnitPriceDiscountDiscountType = "amount" )
func (SubscriptionNewParamsPriceOverridesOverrideUnitPriceDiscountDiscountType) IsKnown ¶ added in v0.24.0
func (r SubscriptionNewParamsPriceOverridesOverrideUnitPriceDiscountDiscountType) IsKnown() bool
type SubscriptionNewParamsPriceOverridesOverrideUnitPriceModelType ¶
type SubscriptionNewParamsPriceOverridesOverrideUnitPriceModelType string
const (
SubscriptionNewParamsPriceOverridesOverrideUnitPriceModelTypeUnit SubscriptionNewParamsPriceOverridesOverrideUnitPriceModelType = "unit"
)
func (SubscriptionNewParamsPriceOverridesOverrideUnitPriceModelType) IsKnown ¶ added in v0.24.0
func (r SubscriptionNewParamsPriceOverridesOverrideUnitPriceModelType) IsKnown() bool
type SubscriptionNewParamsPriceOverridesOverrideUnitPriceUnitConfig ¶
type SubscriptionNewParamsPriceOverridesOverrideUnitPriceUnitConfig struct { // Rate per unit of usage UnitAmount param.Field[string] `json:"unit_amount,required"` }
func (SubscriptionNewParamsPriceOverridesOverrideUnitPriceUnitConfig) MarshalJSON ¶
func (r SubscriptionNewParamsPriceOverridesOverrideUnitPriceUnitConfig) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideUnitWithPercentPrice ¶ added in v0.20.0
type SubscriptionNewParamsPriceOverridesOverrideUnitWithPercentPrice struct { ID param.Field[string] `json:"id,required"` ModelType param.Field[SubscriptionNewParamsPriceOverridesOverrideUnitWithPercentPriceModelType] `json:"model_type,required"` UnitWithPercentConfig param.Field[map[string]interface{}] `json:"unit_with_percent_config,required"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` // The currency of the price. If not provided, the currency of the plan will be // used. Currency param.Field[string] `json:"currency"` // The subscription's override discount for the plan. Discount param.Field[SubscriptionNewParamsPriceOverridesOverrideUnitWithPercentPriceDiscount] `json:"discount"` // The starting quantity of the price, if the price is a fixed price. FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"` // The subscription's override maximum amount for the plan. MaximumAmount param.Field[string] `json:"maximum_amount"` // The subscription's override minimum amount for the plan. MinimumAmount param.Field[string] `json:"minimum_amount"` }
func (SubscriptionNewParamsPriceOverridesOverrideUnitWithPercentPrice) MarshalJSON ¶ added in v0.20.0
func (r SubscriptionNewParamsPriceOverridesOverrideUnitWithPercentPrice) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideUnitWithPercentPriceDiscount ¶ added in v0.20.0
type SubscriptionNewParamsPriceOverridesOverrideUnitWithPercentPriceDiscount struct { DiscountType param.Field[SubscriptionNewParamsPriceOverridesOverrideUnitWithPercentPriceDiscountDiscountType] `json:"discount_type,required"` // Only available if discount_type is `amount`. AmountDiscount param.Field[string] `json:"amount_discount"` // 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"` // 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 `trial` TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount param.Field[float64] `json:"usage_discount"` }
The subscription's override discount for the plan.
func (SubscriptionNewParamsPriceOverridesOverrideUnitWithPercentPriceDiscount) MarshalJSON ¶ added in v0.20.0
func (r SubscriptionNewParamsPriceOverridesOverrideUnitWithPercentPriceDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideUnitWithPercentPriceDiscountDiscountType ¶ added in v0.20.0
type SubscriptionNewParamsPriceOverridesOverrideUnitWithPercentPriceDiscountDiscountType string
const ( SubscriptionNewParamsPriceOverridesOverrideUnitWithPercentPriceDiscountDiscountTypePercentage SubscriptionNewParamsPriceOverridesOverrideUnitWithPercentPriceDiscountDiscountType = "percentage" SubscriptionNewParamsPriceOverridesOverrideUnitWithPercentPriceDiscountDiscountTypeTrial SubscriptionNewParamsPriceOverridesOverrideUnitWithPercentPriceDiscountDiscountType = "trial" SubscriptionNewParamsPriceOverridesOverrideUnitWithPercentPriceDiscountDiscountTypeUsage SubscriptionNewParamsPriceOverridesOverrideUnitWithPercentPriceDiscountDiscountType = "usage" SubscriptionNewParamsPriceOverridesOverrideUnitWithPercentPriceDiscountDiscountTypeAmount SubscriptionNewParamsPriceOverridesOverrideUnitWithPercentPriceDiscountDiscountType = "amount" )
type SubscriptionNewParamsPriceOverridesOverrideUnitWithPercentPriceModelType ¶ added in v0.20.0
type SubscriptionNewParamsPriceOverridesOverrideUnitWithPercentPriceModelType string
const (
SubscriptionNewParamsPriceOverridesOverrideUnitWithPercentPriceModelTypeUnitWithPercent SubscriptionNewParamsPriceOverridesOverrideUnitWithPercentPriceModelType = "unit_with_percent"
)
func (SubscriptionNewParamsPriceOverridesOverrideUnitWithPercentPriceModelType) IsKnown ¶ added in v0.24.0
func (r SubscriptionNewParamsPriceOverridesOverrideUnitWithPercentPriceModelType) IsKnown() bool
type SubscriptionNewParamsPriceOverridesOverrideUnitWithProrationPrice ¶ added in v0.60.0
type SubscriptionNewParamsPriceOverridesOverrideUnitWithProrationPrice struct { ID param.Field[string] `json:"id,required"` ModelType param.Field[SubscriptionNewParamsPriceOverridesOverrideUnitWithProrationPriceModelType] `json:"model_type,required"` UnitWithProrationConfig param.Field[map[string]interface{}] `json:"unit_with_proration_config,required"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` // The currency of the price. If not provided, the currency of the plan will be // used. Currency param.Field[string] `json:"currency"` // The subscription's override discount for the plan. Discount param.Field[SubscriptionNewParamsPriceOverridesOverrideUnitWithProrationPriceDiscount] `json:"discount"` // The starting quantity of the price, if the price is a fixed price. FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"` // The subscription's override maximum amount for the plan. MaximumAmount param.Field[string] `json:"maximum_amount"` // The subscription's override minimum amount for the plan. MinimumAmount param.Field[string] `json:"minimum_amount"` }
func (SubscriptionNewParamsPriceOverridesOverrideUnitWithProrationPrice) MarshalJSON ¶ added in v0.60.0
func (r SubscriptionNewParamsPriceOverridesOverrideUnitWithProrationPrice) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideUnitWithProrationPriceDiscount ¶ added in v0.60.0
type SubscriptionNewParamsPriceOverridesOverrideUnitWithProrationPriceDiscount struct { DiscountType param.Field[SubscriptionNewParamsPriceOverridesOverrideUnitWithProrationPriceDiscountDiscountType] `json:"discount_type,required"` // Only available if discount_type is `amount`. AmountDiscount param.Field[string] `json:"amount_discount"` // 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"` // 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 `trial` TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount param.Field[float64] `json:"usage_discount"` }
The subscription's override discount for the plan.
func (SubscriptionNewParamsPriceOverridesOverrideUnitWithProrationPriceDiscount) MarshalJSON ¶ added in v0.60.0
func (r SubscriptionNewParamsPriceOverridesOverrideUnitWithProrationPriceDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionNewParamsPriceOverridesOverrideUnitWithProrationPriceDiscountDiscountType ¶ added in v0.60.0
type SubscriptionNewParamsPriceOverridesOverrideUnitWithProrationPriceDiscountDiscountType string
const ( SubscriptionNewParamsPriceOverridesOverrideUnitWithProrationPriceDiscountDiscountTypePercentage SubscriptionNewParamsPriceOverridesOverrideUnitWithProrationPriceDiscountDiscountType = "percentage" SubscriptionNewParamsPriceOverridesOverrideUnitWithProrationPriceDiscountDiscountTypeTrial SubscriptionNewParamsPriceOverridesOverrideUnitWithProrationPriceDiscountDiscountType = "trial" SubscriptionNewParamsPriceOverridesOverrideUnitWithProrationPriceDiscountDiscountTypeUsage SubscriptionNewParamsPriceOverridesOverrideUnitWithProrationPriceDiscountDiscountType = "usage" SubscriptionNewParamsPriceOverridesOverrideUnitWithProrationPriceDiscountDiscountTypeAmount SubscriptionNewParamsPriceOverridesOverrideUnitWithProrationPriceDiscountDiscountType = "amount" )
type SubscriptionNewParamsPriceOverridesOverrideUnitWithProrationPriceModelType ¶ added in v0.60.0
type SubscriptionNewParamsPriceOverridesOverrideUnitWithProrationPriceModelType string
const (
SubscriptionNewParamsPriceOverridesOverrideUnitWithProrationPriceModelTypeUnitWithProration SubscriptionNewParamsPriceOverridesOverrideUnitWithProrationPriceModelType = "unit_with_proration"
)
func (SubscriptionNewParamsPriceOverridesOverrideUnitWithProrationPriceModelType) IsKnown ¶ added in v0.60.0
func (r SubscriptionNewParamsPriceOverridesOverrideUnitWithProrationPriceModelType) IsKnown() bool
type SubscriptionPriceInterval ¶
type SubscriptionPriceInterval 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"` // The fixed fee quantity transitions for this price interval. This is only // relevant for fixed fees. FixedFeeQuantityTransitions []SubscriptionPriceIntervalsFixedFeeQuantityTransition `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. // // ## Unit pricing // // With unit pricing, each unit costs a fixed amount. // // “`json // // { // ... // "model_type": "unit", // "unit_config": { // "unit_amount": "0.50" // } // ... // } // // “` // // ## Tiered pricing // // In tiered pricing, the cost of a given unit depends on the tier range that it // falls into, where each tier range is defined by an upper and lower bound. For // example, the first ten units may cost $0.50 each and all units thereafter may // cost $0.10 each. // // “`json // // { // ... // "model_type": "tiered", // "tiered_config": { // "tiers": [ // { // "first_unit": 1, // "last_unit": 10, // "unit_amount": "0.50" // }, // { // "first_unit": 11, // "last_unit": null, // "unit_amount": "0.10" // } // ] // } // ... // // “` // // ## Bulk pricing // // Bulk pricing applies when the number of units determine the cost of all units. // For example, if you've bought less than 10 units, they may each be $0.50 for a // total of $5.00. Once you've bought more than 10 units, all units may now be // priced at $0.40 (i.e. 101 units total would be $40.40). // // “`json // // { // ... // "model_type": "bulk", // "bulk_config": { // "tiers": [ // { // "maximum_units": 10, // "unit_amount": "0.50" // }, // { // "maximum_units": 1000, // "unit_amount": "0.40" // } // ] // } // ... // } // // “` // // ## Package pricing // // Package pricing defines the size or granularity of a unit for billing purposes. // For example, if the package size is set to 5, then 4 units will be billed as 5 // and 6 units will be billed at 10. // // “`json // // { // ... // "model_type": "package", // "package_config": { // "package_amount": "0.80", // "package_size": 10 // } // ... // } // // “` // // ## BPS pricing // // BPS pricing specifies a per-event (e.g. per-payment) rate in one hundredth of a // percent (the number of basis points to charge), as well as a cap per event to // assess. For example, this would allow you to assess a fee of 0.25% on every // payment you process, with a maximum charge of $25 per payment. // // “`json // // { // ... // "model_type": "bps", // "bps_config": { // "bps": 125, // "per_unit_maximum": "11.00" // } // ... // } // // “` // // ## Bulk BPS pricing // // Bulk BPS pricing specifies BPS parameters in a tiered manner, dependent on the // total quantity across all events. Similar to bulk pricing, the BPS parameters of // a given event depends on the tier range that the billing period falls into. Each // tier range is defined by an upper bound. For example, after $1.5M of payment // volume is reached, each individual payment may have a lower cap or a smaller // take-rate. // // “`json // // ... // "model_type": "bulk_bps", // "bulk_bps_config": { // "tiers": [ // { // "maximum_amount": "1000000.00", // "bps": 125, // "per_unit_maximum": "19.00" // }, // { // "maximum_amount": null, // "bps": 115, // "per_unit_maximum": "4.00" // } // ] // } // ... // } // // “` // // ## Tiered BPS pricing // // Tiered BPS pricing specifies BPS parameters in a graduated manner, where an // event's applicable parameter is a function of its marginal addition to the // period total. Similar to tiered pricing, the BPS parameters of a given event // depends on the tier range that it falls into, where each tier range is defined // by an upper and lower bound. For example, the first few payments may have a 0.8 // BPS take-rate and all payments after a specific volume may incur a take-rate of // 0.5 BPS each. // // “`json // // ... // "model_type": "tiered_bps", // "tiered_bps_config": { // "tiers": [ // { // "minimum_amount": "0", // "maximum_amount": "1000000.00", // "bps": 125, // "per_unit_maximum": "19.00" // }, // { // "minimum_amount": "1000000.00", // "maximum_amount": null, // "bps": 115, // "per_unit_maximum": "4.00" // } // ] // } // ... // } // // “` // // ## Matrix pricing // // Matrix pricing defines a set of unit prices in a one or two-dimensional matrix. // `dimensions` defines the two event property values evaluated in this pricing // model. In a one-dimensional matrix, the second value is `null`. Every // configuration has a list of `matrix_values` which give the unit prices for // specified property values. In a one-dimensional matrix, the matrix values will // have `dimension_values` where the second value of the pair is null. If an event // does not match any of the dimension values in the matrix, it will resort to the // `default_unit_amount`. // // “`json // // { // "model_type": "matrix" // "matrix_config": { // "default_unit_amount": "3.00", // "dimensions": [ // "cluster_name", // "region" // ], // "matrix_values": [ // { // "dimension_values": [ // "alpha", // "west" // ], // "unit_amount": "2.00" // }, // ... // ] // } // } // // “` // // ## Fixed fees // // Fixed fees are prices that are applied independent of usage quantities, and // follow unit pricing. They also have an additional parameter // `fixed_price_quantity`. If the Price represents a fixed cost, this represents // the quantity of units applied. // // “`json // // { // ... // "id": "price_id", // "model_type": "unit", // "unit_config": { // "unit_amount": "2.00" // }, // "fixed_price_quantity": 3.0 // ... // } // // “` Price Price `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"` JSON subscriptionPriceIntervalJSON `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 (*SubscriptionPriceInterval) UnmarshalJSON ¶
func (r *SubscriptionPriceInterval) UnmarshalJSON(data []byte) (err error)
type SubscriptionPriceIntervalsFixedFeeQuantityTransition ¶
type SubscriptionPriceIntervalsFixedFeeQuantityTransition struct { EffectiveDate time.Time `json:"effective_date,required" format:"date-time"` PriceID string `json:"price_id,required"` Quantity int64 `json:"quantity,required"` JSON subscriptionPriceIntervalsFixedFeeQuantityTransitionJSON `json:"-"` }
func (*SubscriptionPriceIntervalsFixedFeeQuantityTransition) UnmarshalJSON ¶
func (r *SubscriptionPriceIntervalsFixedFeeQuantityTransition) UnmarshalJSON(data []byte) (err error)
type SubscriptionPriceIntervalsParams ¶
type SubscriptionPriceIntervalsParams struct { // A list of price intervals to add to the subscription. Add param.Field[[]SubscriptionPriceIntervalsParamsAdd] `json:"add"` // A list of adjustments to add to the subscription. AddAdjustments param.Field[[]SubscriptionPriceIntervalsParamsAddAdjustment] `json:"add_adjustments"` // A list of price intervals to edit on the subscription. Edit param.Field[[]SubscriptionPriceIntervalsParamsEdit] `json:"edit"` // A list of adjustments to edit on the subscription. EditAdjustments param.Field[[]SubscriptionPriceIntervalsParamsEditAdjustment] `json:"edit_adjustments"` }
func (SubscriptionPriceIntervalsParams) MarshalJSON ¶
func (r SubscriptionPriceIntervalsParams) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAdd ¶
type SubscriptionPriceIntervalsParamsAdd struct { // The start date of the price interval. This is the date that the price will start // billing on the subscription. StartDate param.Field[SubscriptionPriceIntervalsParamsAddStartDateUnion] `json:"start_date,required" format:"date-time"` // The definition of a new allocation price to create and add to the subscription. AllocationPrice param.Field[SubscriptionPriceIntervalsParamsAddAllocationPrice] `json:"allocation_price"` // A list of discounts to initialize on the price interval. Discounts param.Field[[]SubscriptionPriceIntervalsParamsAddDiscountUnion] `json:"discounts"` // The end date of the price interval. This is the date that the price will stop // billing on the subscription. EndDate param.Field[SubscriptionPriceIntervalsParamsAddEndDateUnion] `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"` // A list of fixed fee quantity transitions to initialize on the price interval. FixedFeeQuantityTransitions param.Field[[]SubscriptionPriceIntervalsParamsAddFixedFeeQuantityTransition] `json:"fixed_fee_quantity_transitions"` // The maximum amount that will be billed for this price interval for a given // billing period. MaximumAmount param.Field[float64] `json:"maximum_amount"` // The minimum amount that will be billed for this price interval for a given // billing period. MinimumAmount param.Field[float64] `json:"minimum_amount"` // The definition of a new price to create and add to the subscription. Price param.Field[SubscriptionPriceIntervalsParamsAddPriceUnion] `json:"price"` // The id of the price to add to the subscription. PriceID param.Field[string] `json:"price_id"` }
func (SubscriptionPriceIntervalsParamsAdd) MarshalJSON ¶
func (r SubscriptionPriceIntervalsParamsAdd) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddAdjustment ¶ added in v0.35.0
type SubscriptionPriceIntervalsParamsAddAdjustment struct { // The definition of a new adjustment to create and add to the subscription. Adjustment param.Field[SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentUnion] `json:"adjustment,required"` // The start date of the adjustment interval. This is the date that the adjustment // will start affecting prices on the subscription. StartDate param.Field[SubscriptionPriceIntervalsParamsAddAdjustmentsStartDateUnion] `json:"start_date,required" format:"date-time"` // The end date of the adjustment interval. This is the date that the adjustment // will stop affecting prices on the subscription. EndDate param.Field[SubscriptionPriceIntervalsParamsAddAdjustmentsEndDateUnion] `json:"end_date" format:"date-time"` }
func (SubscriptionPriceIntervalsParamsAddAdjustment) MarshalJSON ¶ added in v0.35.0
func (r SubscriptionPriceIntervalsParamsAddAdjustment) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustment ¶ added in v0.35.0
type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustment struct { AppliesToPriceIDs param.Field[interface{}] `json:"applies_to_price_ids"` AdjustmentType param.Field[SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentAdjustmentType] `json:"adjustment_type,required"` PercentageDiscount param.Field[float64] `json:"percentage_discount"` AmountDiscount param.Field[string] `json:"amount_discount"` MinimumAmount param.Field[string] `json:"minimum_amount"` // 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"` }
The definition of a new adjustment to create and add to the subscription.
func (SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustment) MarshalJSON ¶ added in v0.35.0
func (r SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustment) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentAdjustmentType ¶ added in v0.35.0
type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentAdjustmentType string
const ( SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentAdjustmentTypePercentageDiscount SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentAdjustmentType = "percentage_discount" SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentAdjustmentTypeAmountDiscount SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentAdjustmentType = "amount_discount" SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentAdjustmentTypeMinimum SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentAdjustmentType = "minimum" SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentAdjustmentTypeMaximum SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentAdjustmentType = "maximum" )
func (SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentAdjustmentType) IsKnown ¶ added in v0.35.0
func (r SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentAdjustmentType) IsKnown() bool
type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewAmountDiscount ¶ added in v0.35.0
type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewAmountDiscount struct { AdjustmentType param.Field[SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewAmountDiscountAdjustmentType] `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"` }
func (SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewAmountDiscount) MarshalJSON ¶ added in v0.35.0
func (r SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewAmountDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewAmountDiscountAdjustmentType ¶ added in v0.35.0
type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewAmountDiscountAdjustmentType string
const (
SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewAmountDiscountAdjustmentTypeAmountDiscount SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewAmountDiscountAdjustmentType = "amount_discount"
)
type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewMaximum ¶ added in v0.35.0
type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewMaximum struct { AdjustmentType param.Field[SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewMaximumAdjustmentType] `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"` }
func (SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewMaximum) MarshalJSON ¶ added in v0.35.0
func (r SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewMaximum) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewMaximumAdjustmentType ¶ added in v0.35.0
type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewMaximumAdjustmentType string
const (
SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewMaximumAdjustmentTypeMaximum SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewMaximumAdjustmentType = "maximum"
)
type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewMinimum ¶ added in v0.35.0
type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewMinimum struct { AdjustmentType param.Field[SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewMinimumAdjustmentType] `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"` }
func (SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewMinimum) MarshalJSON ¶ added in v0.35.0
func (r SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewMinimum) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewMinimumAdjustmentType ¶ added in v0.35.0
type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewMinimumAdjustmentType string
const (
SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewMinimumAdjustmentTypeMinimum SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewMinimumAdjustmentType = "minimum"
)
type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewPercentageDiscount ¶ added in v0.35.0
type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewPercentageDiscount struct { AdjustmentType param.Field[SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewPercentageDiscountAdjustmentType] `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"` }
func (SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewPercentageDiscount) MarshalJSON ¶ added in v0.35.0
func (r SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewPercentageDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewPercentageDiscountAdjustmentType ¶ added in v0.35.0
type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewPercentageDiscountAdjustmentType string
const (
SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewPercentageDiscountAdjustmentTypePercentageDiscount SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewPercentageDiscountAdjustmentType = "percentage_discount"
)
type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentUnion ¶ added in v0.35.0
type SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentUnion interface {
// contains filtered or unexported methods
}
The definition of a new adjustment to create and add to the subscription.
Satisfied by SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewPercentageDiscount, SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewAmountDiscount, SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewMinimum, SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustmentNewMaximum, SubscriptionPriceIntervalsParamsAddAdjustmentsAdjustment.
type SubscriptionPriceIntervalsParamsAddAdjustmentsEndDateUnion ¶ added in v0.35.0
type SubscriptionPriceIntervalsParamsAddAdjustmentsEndDateUnion interface {
ImplementsSubscriptionPriceIntervalsParamsAddAdjustmentsEndDateUnion()
}
The end date of the adjustment interval. This is the date that the adjustment will stop affecting prices on the subscription.
Satisfied by shared.UnionTime, shared.BillingCycleRelativeDate.
type SubscriptionPriceIntervalsParamsAddAdjustmentsStartDateUnion ¶ added in v0.35.0
type SubscriptionPriceIntervalsParamsAddAdjustmentsStartDateUnion interface {
ImplementsSubscriptionPriceIntervalsParamsAddAdjustmentsStartDateUnion()
}
The start date of the adjustment interval. This is the date that the adjustment will start affecting prices on the subscription.
Satisfied by shared.UnionTime, shared.BillingCycleRelativeDate.
type SubscriptionPriceIntervalsParamsAddAllocationPrice ¶ added in v0.37.0
type SubscriptionPriceIntervalsParamsAddAllocationPrice 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[SubscriptionPriceIntervalsParamsAddAllocationPriceCadence] `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"` }
The definition of a new allocation price to create and add to the subscription.
func (SubscriptionPriceIntervalsParamsAddAllocationPrice) MarshalJSON ¶ added in v0.37.0
func (r SubscriptionPriceIntervalsParamsAddAllocationPrice) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddAllocationPriceCadence ¶ added in v0.37.0
type SubscriptionPriceIntervalsParamsAddAllocationPriceCadence string
The cadence at which to allocate the amount to the customer.
const ( SubscriptionPriceIntervalsParamsAddAllocationPriceCadenceOneTime SubscriptionPriceIntervalsParamsAddAllocationPriceCadence = "one_time" SubscriptionPriceIntervalsParamsAddAllocationPriceCadenceMonthly SubscriptionPriceIntervalsParamsAddAllocationPriceCadence = "monthly" SubscriptionPriceIntervalsParamsAddAllocationPriceCadenceQuarterly SubscriptionPriceIntervalsParamsAddAllocationPriceCadence = "quarterly" SubscriptionPriceIntervalsParamsAddAllocationPriceCadenceSemiAnnual SubscriptionPriceIntervalsParamsAddAllocationPriceCadence = "semi_annual" SubscriptionPriceIntervalsParamsAddAllocationPriceCadenceAnnual SubscriptionPriceIntervalsParamsAddAllocationPriceCadence = "annual" SubscriptionPriceIntervalsParamsAddAllocationPriceCadenceCustom SubscriptionPriceIntervalsParamsAddAllocationPriceCadence = "custom" )
func (SubscriptionPriceIntervalsParamsAddAllocationPriceCadence) IsKnown ¶ added in v0.37.0
func (r SubscriptionPriceIntervalsParamsAddAllocationPriceCadence) IsKnown() bool
type SubscriptionPriceIntervalsParamsAddDiscount ¶
type SubscriptionPriceIntervalsParamsAddDiscount struct { DiscountType param.Field[SubscriptionPriceIntervalsParamsAddDiscountsDiscountType] `json:"discount_type,required"` // Only available if discount_type is `amount`. AmountDiscount param.Field[float64] `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 (SubscriptionPriceIntervalsParamsAddDiscount) MarshalJSON ¶ added in v0.25.0
func (r SubscriptionPriceIntervalsParamsAddDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddDiscountUnion ¶ added in v0.25.0
type SubscriptionPriceIntervalsParamsAddDiscountUnion interface {
// contains filtered or unexported methods
}
Satisfied by SubscriptionPriceIntervalsParamsAddDiscountsAmountDiscountCreationParams, SubscriptionPriceIntervalsParamsAddDiscountsPercentageDiscountCreationParams, SubscriptionPriceIntervalsParamsAddDiscountsUsageDiscountCreationParams, SubscriptionPriceIntervalsParamsAddDiscount.
type SubscriptionPriceIntervalsParamsAddDiscountsAmountDiscountCreationParams ¶
type SubscriptionPriceIntervalsParamsAddDiscountsAmountDiscountCreationParams struct { // Only available if discount_type is `amount`. AmountDiscount param.Field[float64] `json:"amount_discount,required"` DiscountType param.Field[SubscriptionPriceIntervalsParamsAddDiscountsAmountDiscountCreationParamsDiscountType] `json:"discount_type,required"` }
func (SubscriptionPriceIntervalsParamsAddDiscountsAmountDiscountCreationParams) MarshalJSON ¶
func (r SubscriptionPriceIntervalsParamsAddDiscountsAmountDiscountCreationParams) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddDiscountsAmountDiscountCreationParamsDiscountType ¶
type SubscriptionPriceIntervalsParamsAddDiscountsAmountDiscountCreationParamsDiscountType string
const (
SubscriptionPriceIntervalsParamsAddDiscountsAmountDiscountCreationParamsDiscountTypeAmount SubscriptionPriceIntervalsParamsAddDiscountsAmountDiscountCreationParamsDiscountType = "amount"
)
type SubscriptionPriceIntervalsParamsAddDiscountsDiscountType ¶ added in v0.25.0
type SubscriptionPriceIntervalsParamsAddDiscountsDiscountType string
const ( SubscriptionPriceIntervalsParamsAddDiscountsDiscountTypeAmount SubscriptionPriceIntervalsParamsAddDiscountsDiscountType = "amount" SubscriptionPriceIntervalsParamsAddDiscountsDiscountTypePercentage SubscriptionPriceIntervalsParamsAddDiscountsDiscountType = "percentage" SubscriptionPriceIntervalsParamsAddDiscountsDiscountTypeUsage SubscriptionPriceIntervalsParamsAddDiscountsDiscountType = "usage" )
func (SubscriptionPriceIntervalsParamsAddDiscountsDiscountType) IsKnown ¶ added in v0.25.0
func (r SubscriptionPriceIntervalsParamsAddDiscountsDiscountType) IsKnown() bool
type SubscriptionPriceIntervalsParamsAddDiscountsPercentageDiscountCreationParams ¶
type SubscriptionPriceIntervalsParamsAddDiscountsPercentageDiscountCreationParams struct { DiscountType param.Field[SubscriptionPriceIntervalsParamsAddDiscountsPercentageDiscountCreationParamsDiscountType] `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"` }
func (SubscriptionPriceIntervalsParamsAddDiscountsPercentageDiscountCreationParams) MarshalJSON ¶
func (r SubscriptionPriceIntervalsParamsAddDiscountsPercentageDiscountCreationParams) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddDiscountsPercentageDiscountCreationParamsDiscountType ¶
type SubscriptionPriceIntervalsParamsAddDiscountsPercentageDiscountCreationParamsDiscountType string
const (
SubscriptionPriceIntervalsParamsAddDiscountsPercentageDiscountCreationParamsDiscountTypePercentage SubscriptionPriceIntervalsParamsAddDiscountsPercentageDiscountCreationParamsDiscountType = "percentage"
)
type SubscriptionPriceIntervalsParamsAddDiscountsUsageDiscountCreationParams ¶
type SubscriptionPriceIntervalsParamsAddDiscountsUsageDiscountCreationParams struct { DiscountType param.Field[SubscriptionPriceIntervalsParamsAddDiscountsUsageDiscountCreationParamsDiscountType] `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"` }
func (SubscriptionPriceIntervalsParamsAddDiscountsUsageDiscountCreationParams) MarshalJSON ¶
func (r SubscriptionPriceIntervalsParamsAddDiscountsUsageDiscountCreationParams) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddDiscountsUsageDiscountCreationParamsDiscountType ¶
type SubscriptionPriceIntervalsParamsAddDiscountsUsageDiscountCreationParamsDiscountType string
const (
SubscriptionPriceIntervalsParamsAddDiscountsUsageDiscountCreationParamsDiscountTypeUsage SubscriptionPriceIntervalsParamsAddDiscountsUsageDiscountCreationParamsDiscountType = "usage"
)
type SubscriptionPriceIntervalsParamsAddEndDateUnion ¶ added in v0.25.0
type SubscriptionPriceIntervalsParamsAddEndDateUnion interface {
ImplementsSubscriptionPriceIntervalsParamsAddEndDateUnion()
}
The end date of the price interval. This is the date that the price will stop billing on the subscription.
Satisfied by shared.UnionTime, shared.BillingCycleRelativeDate.
type SubscriptionPriceIntervalsParamsAddFixedFeeQuantityTransition ¶
type SubscriptionPriceIntervalsParamsAddFixedFeeQuantityTransition 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 (SubscriptionPriceIntervalsParamsAddFixedFeeQuantityTransition) MarshalJSON ¶
func (r SubscriptionPriceIntervalsParamsAddFixedFeeQuantityTransition) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPrice ¶
type SubscriptionPriceIntervalsParamsAddPrice struct { Metadata param.Field[interface{}] `json:"metadata,required"` // An alias for the price. ExternalPriceID param.Field[string] `json:"external_price_id"` // 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"` // The id of the item the plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` // 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"` // 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"` // The cadence to bill for this price on. Cadence param.Field[SubscriptionPriceIntervalsParamsAddPriceCadence] `json:"cadence,required"` BillingCycleConfiguration param.Field[interface{}] `json:"billing_cycle_configuration,required"` InvoicingCycleConfiguration param.Field[interface{}] `json:"invoicing_cycle_configuration,required"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` ModelType param.Field[SubscriptionPriceIntervalsParamsAddPriceModelType] `json:"model_type,required"` UnitConfig param.Field[interface{}] `json:"unit_config,required"` // An ISO 4217 currency string for which this price is billed in. Currency param.Field[string] `json:"currency,required"` PackageConfig param.Field[interface{}] `json:"package_config,required"` MatrixConfig param.Field[interface{}] `json:"matrix_config,required"` MatrixWithAllocationConfig param.Field[interface{}] `json:"matrix_with_allocation_config,required"` TieredConfig param.Field[interface{}] `json:"tiered_config,required"` TieredBpsConfig param.Field[interface{}] `json:"tiered_bps_config,required"` BpsConfig param.Field[interface{}] `json:"bps_config,required"` BulkBpsConfig param.Field[interface{}] `json:"bulk_bps_config,required"` BulkConfig param.Field[interface{}] `json:"bulk_config,required"` ThresholdTotalAmountConfig param.Field[interface{}] `json:"threshold_total_amount_config,required"` TieredPackageConfig param.Field[interface{}] `json:"tiered_package_config,required"` GroupedTieredConfig param.Field[interface{}] `json:"grouped_tiered_config,required"` TieredWithMinimumConfig param.Field[interface{}] `json:"tiered_with_minimum_config,required"` PackageWithAllocationConfig param.Field[interface{}] `json:"package_with_allocation_config,required"` TieredPackageWithMinimumConfig param.Field[interface{}] `json:"tiered_package_with_minimum_config,required"` UnitWithPercentConfig param.Field[interface{}] `json:"unit_with_percent_config,required"` TieredWithProrationConfig param.Field[interface{}] `json:"tiered_with_proration_config,required"` UnitWithProrationConfig param.Field[interface{}] `json:"unit_with_proration_config,required"` GroupedAllocationConfig param.Field[interface{}] `json:"grouped_allocation_config,required"` GroupedWithProratedMinimumConfig param.Field[interface{}] `json:"grouped_with_prorated_minimum_config,required"` BulkWithProrationConfig param.Field[interface{}] `json:"bulk_with_proration_config,required"` }
The definition of a new price to create and add to the subscription.
func (SubscriptionPriceIntervalsParamsAddPrice) MarshalJSON ¶ added in v0.25.0
func (r SubscriptionPriceIntervalsParamsAddPrice) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceCadence ¶ added in v0.25.0
type SubscriptionPriceIntervalsParamsAddPriceCadence string
The cadence to bill for this price on.
const ( SubscriptionPriceIntervalsParamsAddPriceCadenceAnnual SubscriptionPriceIntervalsParamsAddPriceCadence = "annual" SubscriptionPriceIntervalsParamsAddPriceCadenceSemiAnnual SubscriptionPriceIntervalsParamsAddPriceCadence = "semi_annual" SubscriptionPriceIntervalsParamsAddPriceCadenceMonthly SubscriptionPriceIntervalsParamsAddPriceCadence = "monthly" SubscriptionPriceIntervalsParamsAddPriceCadenceQuarterly SubscriptionPriceIntervalsParamsAddPriceCadence = "quarterly" SubscriptionPriceIntervalsParamsAddPriceCadenceOneTime SubscriptionPriceIntervalsParamsAddPriceCadence = "one_time" SubscriptionPriceIntervalsParamsAddPriceCadenceCustom SubscriptionPriceIntervalsParamsAddPriceCadence = "custom" )
func (SubscriptionPriceIntervalsParamsAddPriceCadence) IsKnown ¶ added in v0.25.0
func (r SubscriptionPriceIntervalsParamsAddPriceCadence) IsKnown() bool
type SubscriptionPriceIntervalsParamsAddPriceModelType ¶ added in v0.25.0
type SubscriptionPriceIntervalsParamsAddPriceModelType string
const ( SubscriptionPriceIntervalsParamsAddPriceModelTypeUnit SubscriptionPriceIntervalsParamsAddPriceModelType = "unit" SubscriptionPriceIntervalsParamsAddPriceModelTypePackage SubscriptionPriceIntervalsParamsAddPriceModelType = "package" SubscriptionPriceIntervalsParamsAddPriceModelTypeMatrix SubscriptionPriceIntervalsParamsAddPriceModelType = "matrix" SubscriptionPriceIntervalsParamsAddPriceModelTypeMatrixWithAllocation SubscriptionPriceIntervalsParamsAddPriceModelType = "matrix_with_allocation" SubscriptionPriceIntervalsParamsAddPriceModelTypeTiered SubscriptionPriceIntervalsParamsAddPriceModelType = "tiered" SubscriptionPriceIntervalsParamsAddPriceModelTypeTieredBps SubscriptionPriceIntervalsParamsAddPriceModelType = "tiered_bps" SubscriptionPriceIntervalsParamsAddPriceModelTypeBps SubscriptionPriceIntervalsParamsAddPriceModelType = "bps" SubscriptionPriceIntervalsParamsAddPriceModelTypeBulkBps SubscriptionPriceIntervalsParamsAddPriceModelType = "bulk_bps" SubscriptionPriceIntervalsParamsAddPriceModelTypeBulk SubscriptionPriceIntervalsParamsAddPriceModelType = "bulk" SubscriptionPriceIntervalsParamsAddPriceModelTypeThresholdTotalAmount SubscriptionPriceIntervalsParamsAddPriceModelType = "threshold_total_amount" SubscriptionPriceIntervalsParamsAddPriceModelTypeTieredPackage SubscriptionPriceIntervalsParamsAddPriceModelType = "tiered_package" SubscriptionPriceIntervalsParamsAddPriceModelTypeGroupedTiered SubscriptionPriceIntervalsParamsAddPriceModelType = "grouped_tiered" SubscriptionPriceIntervalsParamsAddPriceModelTypeTieredWithMinimum SubscriptionPriceIntervalsParamsAddPriceModelType = "tiered_with_minimum" SubscriptionPriceIntervalsParamsAddPriceModelTypePackageWithAllocation SubscriptionPriceIntervalsParamsAddPriceModelType = "package_with_allocation" SubscriptionPriceIntervalsParamsAddPriceModelTypeTieredPackageWithMinimum SubscriptionPriceIntervalsParamsAddPriceModelType = "tiered_package_with_minimum" SubscriptionPriceIntervalsParamsAddPriceModelTypeUnitWithPercent SubscriptionPriceIntervalsParamsAddPriceModelType = "unit_with_percent" SubscriptionPriceIntervalsParamsAddPriceModelTypeTieredWithProration SubscriptionPriceIntervalsParamsAddPriceModelType = "tiered_with_proration" SubscriptionPriceIntervalsParamsAddPriceModelTypeUnitWithProration SubscriptionPriceIntervalsParamsAddPriceModelType = "unit_with_proration" SubscriptionPriceIntervalsParamsAddPriceModelTypeGroupedAllocation SubscriptionPriceIntervalsParamsAddPriceModelType = "grouped_allocation" SubscriptionPriceIntervalsParamsAddPriceModelTypeGroupedWithProratedMinimum SubscriptionPriceIntervalsParamsAddPriceModelType = "grouped_with_prorated_minimum" SubscriptionPriceIntervalsParamsAddPriceModelTypeBulkWithProration SubscriptionPriceIntervalsParamsAddPriceModelType = "bulk_with_proration" )
func (SubscriptionPriceIntervalsParamsAddPriceModelType) IsKnown ¶ added in v0.25.0
func (r SubscriptionPriceIntervalsParamsAddPriceModelType) IsKnown() bool
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPrice ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPrice struct { BpsConfig param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceBpsConfig] `json:"bps_config,required"` // The cadence to bill for this price on. Cadence param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceCadence] `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 plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceModelType] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceBillingCycleConfiguration] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceInvoicingCycleConfiguration] `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 (SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPrice) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPrice) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceBillingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceBillingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceBillingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceBillingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceBillingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceBpsConfig ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceBpsConfig 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 (SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceBpsConfig) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceBpsConfig) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceCadence ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceCadence string
The cadence to bill for this price on.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceCadenceAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceCadence = "annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceCadenceSemiAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceCadence = "semi_annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceCadenceMonthly SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceCadence = "monthly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceCadenceQuarterly SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceCadence = "quarterly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceCadenceOneTime SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceCadence = "one_time" SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceCadenceCustom SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceCadence = "custom" )
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceCadence) IsKnown ¶ added in v0.24.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceCadence) IsKnown() bool
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceInvoicingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceInvoicingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceInvoicingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceInvoicingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceModelType ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceModelType string
const (
SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceModelTypeBps SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceModelType = "bps"
)
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceModelType) IsKnown ¶ added in v0.24.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPriceModelType) IsKnown() bool
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPrice ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPrice struct { BulkBpsConfig param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceBulkBpsConfig] `json:"bulk_bps_config,required"` // The cadence to bill for this price on. Cadence param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceCadence] `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 plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceModelType] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceBillingCycleConfiguration] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceInvoicingCycleConfiguration] `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 (SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPrice) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPrice) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceBillingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceBillingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceBillingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceBillingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceBillingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceBulkBpsConfig ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceBulkBpsConfig struct { // Tiers for a bulk BPS pricing model where all usage is aggregated to a single // tier based on total volume Tiers param.Field[[]SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceBulkBpsConfigTier] `json:"tiers,required"` }
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceBulkBpsConfig) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceBulkBpsConfig) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceBulkBpsConfigTier ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceBulkBpsConfigTier 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 (SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceBulkBpsConfigTier) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceBulkBpsConfigTier) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceCadence ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceCadence string
The cadence to bill for this price on.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceCadenceAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceCadence = "annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceCadenceSemiAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceCadence = "semi_annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceCadenceMonthly SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceCadence = "monthly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceCadenceQuarterly SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceCadence = "quarterly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceCadenceOneTime SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceCadence = "one_time" SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceCadenceCustom SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceCadence = "custom" )
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceCadence) IsKnown ¶ added in v0.24.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceCadence) IsKnown() bool
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceInvoicingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceInvoicingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceInvoicingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceInvoicingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceModelType ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceModelType string
const (
SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceModelTypeBulkBps SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceModelType = "bulk_bps"
)
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceModelType) IsKnown ¶ added in v0.24.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPriceModelType) IsKnown() bool
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPrice ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPrice struct { BulkConfig param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceBulkConfig] `json:"bulk_config,required"` // The cadence to bill for this price on. Cadence param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceCadence] `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 plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceModelType] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceBillingCycleConfiguration] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceInvoicingCycleConfiguration] `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 (SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPrice) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPrice) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceBillingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceBillingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceBillingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceBillingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceBillingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceBulkConfig ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceBulkConfig struct { // Bulk tiers for rating based on total usage volume Tiers param.Field[[]SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceBulkConfigTier] `json:"tiers,required"` }
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceBulkConfig) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceBulkConfig) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceBulkConfigTier ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceBulkConfigTier 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 (SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceBulkConfigTier) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceBulkConfigTier) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceCadence ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceCadence string
The cadence to bill for this price on.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceCadenceAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceCadence = "annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceCadenceSemiAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceCadence = "semi_annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceCadenceMonthly SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceCadence = "monthly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceCadenceQuarterly SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceCadence = "quarterly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceCadenceOneTime SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceCadence = "one_time" SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceCadenceCustom SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceCadence = "custom" )
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceCadence) IsKnown ¶ added in v0.24.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceCadence) IsKnown() bool
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceInvoicingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceInvoicingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceInvoicingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceInvoicingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceModelType ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceModelType string
const (
SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceModelTypeBulk SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceModelType = "bulk"
)
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceModelType) IsKnown ¶ added in v0.24.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPriceModelType) IsKnown() bool
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPrice ¶ added in v0.49.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPrice struct { BulkWithProrationConfig param.Field[map[string]interface{}] `json:"bulk_with_proration_config,required"` // The cadence to bill for this price on. Cadence param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceCadence] `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 plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceModelType] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceBillingCycleConfiguration] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceInvoicingCycleConfiguration] `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 (SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPrice) MarshalJSON ¶ added in v0.49.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPrice) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceBillingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceBillingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceBillingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceBillingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceBillingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceCadence ¶ added in v0.49.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceCadence string
The cadence to bill for this price on.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceCadenceAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceCadence = "annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceCadenceSemiAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceCadence = "semi_annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceCadenceMonthly SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceCadence = "monthly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceCadenceQuarterly SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceCadence = "quarterly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceCadenceOneTime SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceCadence = "one_time" SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceCadenceCustom SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceCadence = "custom" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceInvoicingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceInvoicingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceInvoicingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceInvoicingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceModelType ¶ added in v0.49.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceModelType string
const (
SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceModelTypeBulkWithProration SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPriceModelType = "bulk_with_proration"
)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPrice ¶ added in v0.48.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPrice struct { // The cadence to bill for this price on. Cadence param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceCadence] `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[map[string]interface{}] `json:"grouped_allocation_config,required"` // The id of the item the plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceModelType] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceBillingCycleConfiguration] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceInvoicingCycleConfiguration] `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 (SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPrice) MarshalJSON ¶ added in v0.48.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPrice) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceBillingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceBillingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceBillingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceBillingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceBillingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceCadence ¶ added in v0.48.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceCadence string
The cadence to bill for this price on.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceCadenceAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceCadence = "annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceCadenceSemiAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceCadence = "semi_annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceCadenceMonthly SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceCadence = "monthly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceCadenceQuarterly SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceCadence = "quarterly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceCadenceOneTime SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceCadence = "one_time" SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceCadenceCustom SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceCadence = "custom" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceInvoicingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceInvoicingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceInvoicingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceInvoicingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceModelType ¶ added in v0.48.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceModelType string
const (
SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceModelTypeGroupedAllocation SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPriceModelType = "grouped_allocation"
)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPrice ¶ added in v0.25.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPrice struct { // The cadence to bill for this price on. Cadence param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceCadence] `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[map[string]interface{}] `json:"grouped_tiered_config,required"` // The id of the item the plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceModelType] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceBillingCycleConfiguration] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceInvoicingCycleConfiguration] `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 (SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPrice) MarshalJSON ¶ added in v0.25.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPrice) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceBillingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceBillingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceBillingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceBillingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceBillingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceCadence ¶ added in v0.25.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceCadence string
The cadence to bill for this price on.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceCadenceAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceCadence = "annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceCadenceSemiAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceCadence = "semi_annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceCadenceMonthly SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceCadence = "monthly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceCadenceQuarterly SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceCadence = "quarterly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceCadenceOneTime SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceCadence = "one_time" SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceCadenceCustom SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceCadence = "custom" )
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceCadence) IsKnown ¶ added in v0.25.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceCadence) IsKnown() bool
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceInvoicingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceInvoicingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceInvoicingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceInvoicingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceModelType ¶ added in v0.25.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceModelType string
const (
SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceModelTypeGroupedTiered SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPriceModelType = "grouped_tiered"
)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPrice ¶ added in v0.58.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPrice struct { // The cadence to bill for this price on. Cadence param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceCadence] `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[map[string]interface{}] `json:"grouped_with_prorated_minimum_config,required"` // The id of the item the plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceModelType] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfiguration] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfiguration] `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 (SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPrice) MarshalJSON ¶ added in v0.58.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPrice) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfiguration ¶ added in v0.58.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.58.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfigurationDurationUnit ¶ added in v0.58.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceBillingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceCadence ¶ added in v0.58.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceCadence string
The cadence to bill for this price on.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceCadenceAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceCadence = "annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceCadenceSemiAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceCadence = "semi_annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceCadenceMonthly SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceCadence = "monthly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceCadenceQuarterly SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceCadence = "quarterly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceCadenceOneTime SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceCadence = "one_time" SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceCadenceCustom SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceCadence = "custom" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfiguration ¶ added in v0.58.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.58.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.58.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceInvoicingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceModelType ¶ added in v0.58.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceModelType string
const (
SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceModelTypeGroupedWithProratedMinimum SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPriceModelType = "grouped_with_prorated_minimum"
)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPrice ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPrice struct { // The cadence to bill for this price on. Cadence param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceCadence] `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 plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` MatrixConfig param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceMatrixConfig] `json:"matrix_config,required"` ModelType param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceModelType] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceBillingCycleConfiguration] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceInvoicingCycleConfiguration] `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 (SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPrice) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPrice) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceBillingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceBillingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceBillingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceBillingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceBillingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceCadence ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceCadence string
The cadence to bill for this price on.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceCadenceAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceCadence = "annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceCadenceSemiAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceCadence = "semi_annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceCadenceMonthly SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceCadence = "monthly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceCadenceQuarterly SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceCadence = "quarterly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceCadenceOneTime SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceCadence = "one_time" SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceCadenceCustom SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceCadence = "custom" )
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceCadence) IsKnown ¶ added in v0.24.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceCadence) IsKnown() bool
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceInvoicingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceInvoicingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceInvoicingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceInvoicingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceMatrixConfig ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceMatrixConfig 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[[]SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceMatrixConfigMatrixValue] `json:"matrix_values,required"` }
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceMatrixConfig) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceMatrixConfig) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceMatrixConfigMatrixValue ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceMatrixConfigMatrixValue 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 (SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceMatrixConfigMatrixValue) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceMatrixConfigMatrixValue) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceModelType ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceModelType string
const (
SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceModelTypeMatrix SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceModelType = "matrix"
)
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceModelType) IsKnown ¶ added in v0.24.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPriceModelType) IsKnown() bool
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPrice ¶ added in v0.22.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPrice struct { // The cadence to bill for this price on. Cadence param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceCadence] `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 plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` MatrixWithAllocationConfig param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfig] `json:"matrix_with_allocation_config,required"` ModelType param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceModelType] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceBillingCycleConfiguration] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceInvoicingCycleConfiguration] `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 (SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPrice) MarshalJSON ¶ added in v0.22.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPrice) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceBillingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceBillingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceBillingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceBillingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceBillingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceCadence ¶ added in v0.22.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceCadence string
The cadence to bill for this price on.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceCadenceAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceCadence = "annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceCadenceSemiAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceCadence = "semi_annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceCadenceMonthly SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceCadence = "monthly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceCadenceQuarterly SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceCadence = "quarterly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceCadenceOneTime SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceCadence = "one_time" SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceCadenceCustom SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceCadence = "custom" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceInvoicingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceInvoicingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceInvoicingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceInvoicingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfig ¶ added in v0.22.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfig 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[[]SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue] `json:"matrix_values,required"` }
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfig) MarshalJSON ¶ added in v0.22.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfig) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue ¶ added in v0.22.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue 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 (SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue) MarshalJSON ¶ added in v0.22.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceMatrixWithAllocationConfigMatrixValue) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceModelType ¶ added in v0.22.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceModelType string
const (
SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceModelTypeMatrixWithAllocation SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPriceModelType = "matrix_with_allocation"
)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePrice ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePrice struct { // The cadence to bill for this price on. Cadence param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceCadence] `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 plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceModelType] `json:"model_type,required"` // The name of the price. Name param.Field[string] `json:"name,required"` PackageConfig param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePricePackageConfig] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceBillingCycleConfiguration] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceInvoicingCycleConfiguration] `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 (SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePrice) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePrice) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceBillingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceBillingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceBillingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceBillingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceBillingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceCadence ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceCadence string
The cadence to bill for this price on.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceCadenceAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceCadence = "annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceCadenceSemiAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceCadence = "semi_annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceCadenceMonthly SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceCadence = "monthly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceCadenceQuarterly SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceCadence = "quarterly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceCadenceOneTime SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceCadence = "one_time" SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceCadenceCustom SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceCadence = "custom" )
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceCadence) IsKnown ¶ added in v0.24.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceCadence) IsKnown() bool
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceInvoicingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceInvoicingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceInvoicingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceInvoicingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceInvoicingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceModelType ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceModelType string
const (
SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceModelTypePackage SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceModelType = "package"
)
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceModelType) IsKnown ¶ added in v0.24.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePriceModelType) IsKnown() bool
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePricePackageConfig ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePricePackageConfig 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 (SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePricePackageConfig) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePricePackageConfig) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPrice ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPrice struct { // The cadence to bill for this price on. Cadence param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceCadence] `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 plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceModelType] `json:"model_type,required"` // The name of the price. Name param.Field[string] `json:"name,required"` PackageWithAllocationConfig param.Field[map[string]interface{}] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceBillingCycleConfiguration] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceInvoicingCycleConfiguration] `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 (SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPrice) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPrice) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceBillingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceBillingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceBillingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceBillingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceBillingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceCadence ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceCadence string
The cadence to bill for this price on.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceCadenceAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceCadence = "annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceCadenceSemiAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceCadence = "semi_annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceCadenceMonthly SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceCadence = "monthly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceCadenceQuarterly SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceCadence = "quarterly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceCadenceOneTime SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceCadence = "one_time" SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceCadenceCustom SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceCadence = "custom" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceInvoicingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceInvoicingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceInvoicingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceInvoicingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceModelType ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceModelType string
const (
SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceModelTypePackageWithAllocation SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPriceModelType = "package_with_allocation"
)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPrice ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPrice struct { // The cadence to bill for this price on. Cadence param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceCadence] `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 plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceModelType] `json:"model_type,required"` // The name of the price. Name param.Field[string] `json:"name,required"` ThresholdTotalAmountConfig param.Field[map[string]interface{}] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceBillingCycleConfiguration] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceInvoicingCycleConfiguration] `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 (SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPrice) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPrice) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceBillingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceBillingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceBillingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceBillingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceBillingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceCadence ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceCadence string
The cadence to bill for this price on.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceCadenceAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceCadence = "annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceCadenceSemiAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceCadence = "semi_annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceCadenceMonthly SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceCadence = "monthly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceCadenceQuarterly SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceCadence = "quarterly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceCadenceOneTime SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceCadence = "one_time" SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceCadenceCustom SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceCadence = "custom" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceInvoicingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceInvoicingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceInvoicingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceInvoicingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceModelType ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceModelType string
const (
SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceModelTypeThresholdTotalAmount SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPriceModelType = "threshold_total_amount"
)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPrice ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPrice struct { // The cadence to bill for this price on. Cadence param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceCadence] `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 plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceModelType] `json:"model_type,required"` // The name of the price. Name param.Field[string] `json:"name,required"` TieredBpsConfig param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceTieredBpsConfig] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceBillingCycleConfiguration] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceInvoicingCycleConfiguration] `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 (SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPrice) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPrice) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceBillingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceBillingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceBillingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceBillingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceBillingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceCadence ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceCadence string
The cadence to bill for this price on.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceCadenceAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceCadence = "annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceCadenceSemiAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceCadence = "semi_annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceCadenceMonthly SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceCadence = "monthly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceCadenceQuarterly SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceCadence = "quarterly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceCadenceOneTime SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceCadence = "one_time" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceCadenceCustom SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceCadence = "custom" )
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceCadence) IsKnown ¶ added in v0.24.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceCadence) IsKnown() bool
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceInvoicingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceInvoicingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceInvoicingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceInvoicingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceModelType ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceModelType string
const (
SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceModelTypeTieredBps SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceModelType = "tiered_bps"
)
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceModelType) IsKnown ¶ added in v0.24.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceModelType) IsKnown() bool
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceTieredBpsConfig ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceTieredBpsConfig struct { // Tiers for a Graduated BPS pricing model, where usage is bucketed into specified // tiers Tiers param.Field[[]SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceTieredBpsConfigTier] `json:"tiers,required"` }
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceTieredBpsConfig) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceTieredBpsConfig) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceTieredBpsConfigTier ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceTieredBpsConfigTier 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 (SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceTieredBpsConfigTier) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPriceTieredBpsConfigTier) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePrice ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePrice struct { // The cadence to bill for this price on. Cadence param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceCadence] `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 plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceModelType] `json:"model_type,required"` // The name of the price. Name param.Field[string] `json:"name,required"` TieredPackageConfig param.Field[map[string]interface{}] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceBillingCycleConfiguration] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceInvoicingCycleConfiguration] `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 (SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePrice) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePrice) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceBillingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceBillingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceBillingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceBillingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceBillingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceCadence ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceCadence string
The cadence to bill for this price on.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceCadenceAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceCadence = "annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceCadenceSemiAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceCadence = "semi_annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceCadenceMonthly SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceCadence = "monthly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceCadenceQuarterly SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceCadence = "quarterly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceCadenceOneTime SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceCadence = "one_time" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceCadenceCustom SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceCadence = "custom" )
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceCadence) IsKnown ¶ added in v0.24.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceCadence) IsKnown() bool
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceInvoicingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceInvoicingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceInvoicingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceInvoicingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceInvoicingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceModelType ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceModelType string
const (
SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceModelTypeTieredPackage SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePriceModelType = "tiered_package"
)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPrice ¶ added in v0.20.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPrice struct { // The cadence to bill for this price on. Cadence param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceCadence] `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 plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceModelType] `json:"model_type,required"` // The name of the price. Name param.Field[string] `json:"name,required"` TieredPackageWithMinimumConfig param.Field[map[string]interface{}] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceBillingCycleConfiguration] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfiguration] `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 (SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPrice) MarshalJSON ¶ added in v0.20.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPrice) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceBillingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceBillingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceBillingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceBillingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceBillingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceCadence ¶ added in v0.20.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceCadence string
The cadence to bill for this price on.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceCadenceAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceCadence = "annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceCadenceSemiAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceCadence = "semi_annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceCadenceMonthly SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceCadence = "monthly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceCadenceQuarterly SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceCadence = "quarterly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceCadenceOneTime SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceCadence = "one_time" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceCadenceCustom SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceCadence = "custom" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceInvoicingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceModelType ¶ added in v0.20.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceModelType string
const (
SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceModelTypeTieredPackageWithMinimum SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPriceModelType = "tiered_package_with_minimum"
)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPrice ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPrice struct { // The cadence to bill for this price on. Cadence param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceCadence] `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 plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceModelType] `json:"model_type,required"` // The name of the price. Name param.Field[string] `json:"name,required"` TieredConfig param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceTieredConfig] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceBillingCycleConfiguration] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceInvoicingCycleConfiguration] `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 (SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPrice) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPrice) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceBillingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceBillingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceBillingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceBillingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceBillingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceCadence ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceCadence string
The cadence to bill for this price on.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceCadenceAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceCadence = "annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceCadenceSemiAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceCadence = "semi_annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceCadenceMonthly SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceCadence = "monthly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceCadenceQuarterly SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceCadence = "quarterly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceCadenceOneTime SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceCadence = "one_time" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceCadenceCustom SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceCadence = "custom" )
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceCadence) IsKnown ¶ added in v0.24.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceCadence) IsKnown() bool
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceInvoicingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceInvoicingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceInvoicingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceInvoicingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceModelType ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceModelType string
const (
SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceModelTypeTiered SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceModelType = "tiered"
)
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceModelType) IsKnown ¶ added in v0.24.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceModelType) IsKnown() bool
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceTieredConfig ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceTieredConfig struct { // Tiers for rating based on total usage quantities into the specified tier Tiers param.Field[[]SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceTieredConfigTier] `json:"tiers,required"` }
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceTieredConfig) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceTieredConfig) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceTieredConfigTier ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceTieredConfigTier 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 (SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceTieredConfigTier) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPriceTieredConfigTier) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPrice ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPrice struct { // The cadence to bill for this price on. Cadence param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceCadence] `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 plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceModelType] `json:"model_type,required"` // The name of the price. Name param.Field[string] `json:"name,required"` TieredWithMinimumConfig param.Field[map[string]interface{}] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceBillingCycleConfiguration] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceInvoicingCycleConfiguration] `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 (SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPrice) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPrice) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceBillingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceBillingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceBillingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceBillingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceBillingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceCadence ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceCadence string
The cadence to bill for this price on.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceCadenceAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceCadence = "annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceCadenceSemiAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceCadence = "semi_annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceCadenceMonthly SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceCadence = "monthly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceCadenceQuarterly SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceCadence = "quarterly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceCadenceOneTime SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceCadence = "one_time" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceCadenceCustom SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceCadence = "custom" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceInvoicingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceInvoicingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceInvoicingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceInvoicingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceModelType ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceModelType string
const (
SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceModelTypeTieredWithMinimum SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPriceModelType = "tiered_with_minimum"
)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPrice ¶ added in v0.34.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPrice struct { // The cadence to bill for this price on. Cadence param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceCadence] `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 plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceModelType] `json:"model_type,required"` // The name of the price. Name param.Field[string] `json:"name,required"` TieredWithProrationConfig param.Field[map[string]interface{}] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceBillingCycleConfiguration] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceInvoicingCycleConfiguration] `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 (SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPrice) MarshalJSON ¶ added in v0.34.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPrice) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceBillingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceBillingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceBillingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceBillingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceBillingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceCadence ¶ added in v0.34.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceCadence string
The cadence to bill for this price on.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceCadenceAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceCadence = "annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceCadenceSemiAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceCadence = "semi_annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceCadenceMonthly SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceCadence = "monthly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceCadenceQuarterly SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceCadence = "quarterly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceCadenceOneTime SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceCadence = "one_time" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceCadenceCustom SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceCadence = "custom" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceInvoicingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceInvoicingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceInvoicingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceInvoicingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceModelType ¶ added in v0.34.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceModelType string
const (
SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceModelTypeTieredWithProration SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPriceModelType = "tiered_with_proration"
)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPrice ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPrice struct { // The cadence to bill for this price on. Cadence param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceCadence] `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 plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceModelType] `json:"model_type,required"` // The name of the price. Name param.Field[string] `json:"name,required"` UnitConfig param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceUnitConfig] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceBillingCycleConfiguration] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceInvoicingCycleConfiguration] `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 (SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPrice) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPrice) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceBillingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceBillingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceBillingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceBillingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceBillingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceCadence ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceCadence string
The cadence to bill for this price on.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceCadenceAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceCadence = "annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceCadenceSemiAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceCadence = "semi_annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceCadenceMonthly SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceCadence = "monthly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceCadenceQuarterly SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceCadence = "quarterly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceCadenceOneTime SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceCadence = "one_time" SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceCadenceCustom SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceCadence = "custom" )
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceCadence) IsKnown ¶ added in v0.24.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceCadence) IsKnown() bool
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceInvoicingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceInvoicingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceInvoicingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceInvoicingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceModelType ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceModelType string
const (
SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceModelTypeUnit SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceModelType = "unit"
)
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceModelType) IsKnown ¶ added in v0.24.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceModelType) IsKnown() bool
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceUnitConfig ¶ added in v0.2.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceUnitConfig struct { // Rate per unit of usage UnitAmount param.Field[string] `json:"unit_amount,required"` }
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceUnitConfig) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPriceUnitConfig) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPrice ¶ added in v0.20.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPrice struct { // The cadence to bill for this price on. Cadence param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceCadence] `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 plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceModelType] `json:"model_type,required"` // The name of the price. Name param.Field[string] `json:"name,required"` UnitWithPercentConfig param.Field[map[string]interface{}] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceBillingCycleConfiguration] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceInvoicingCycleConfiguration] `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 (SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPrice) MarshalJSON ¶ added in v0.20.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPrice) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceBillingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceBillingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceBillingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceBillingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceBillingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceCadence ¶ added in v0.20.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceCadence string
The cadence to bill for this price on.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceCadenceAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceCadence = "annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceCadenceSemiAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceCadence = "semi_annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceCadenceMonthly SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceCadence = "monthly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceCadenceQuarterly SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceCadence = "quarterly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceCadenceOneTime SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceCadence = "one_time" SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceCadenceCustom SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceCadence = "custom" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceInvoicingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceInvoicingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceInvoicingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceInvoicingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceModelType ¶ added in v0.20.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceModelType string
const (
SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceModelTypeUnitWithPercent SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPriceModelType = "unit_with_percent"
)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPrice ¶ added in v0.34.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPrice struct { // The cadence to bill for this price on. Cadence param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceCadence] `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 plan will be associated with. ItemID param.Field[string] `json:"item_id,required"` ModelType param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceModelType] `json:"model_type,required"` // The name of the price. Name param.Field[string] `json:"name,required"` UnitWithProrationConfig param.Field[map[string]interface{}] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceBillingCycleConfiguration] `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[SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceInvoicingCycleConfiguration] `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 (SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPrice) MarshalJSON ¶ added in v0.34.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPrice) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceBillingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceBillingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceBillingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
For custom cadence: specifies the duration of the billing period in days or months.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceBillingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceBillingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceBillingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceBillingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceBillingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceBillingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceBillingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceBillingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceCadence ¶ added in v0.34.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceCadence string
The cadence to bill for this price on.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceCadenceAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceCadence = "annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceCadenceSemiAnnual SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceCadence = "semi_annual" SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceCadenceMonthly SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceCadence = "monthly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceCadenceQuarterly SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceCadence = "quarterly" SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceCadenceOneTime SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceCadence = "one_time" SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceCadenceCustom SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceCadence = "custom" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceInvoicingCycleConfiguration ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceInvoicingCycleConfiguration struct { // The duration of the billing period. Duration param.Field[int64] `json:"duration,required"` // The unit of billing period duration. DurationUnit param.Field[SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceInvoicingCycleConfigurationDurationUnit] `json:"duration_unit,required"` }
Within each billing cycle, specifies the cadence at which invoices are produced. If unspecified, a single invoice is produced per billing cycle.
func (SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceInvoicingCycleConfiguration) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceInvoicingCycleConfiguration) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceInvoicingCycleConfigurationDurationUnit ¶ added in v0.56.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceInvoicingCycleConfigurationDurationUnit string
The unit of billing period duration.
const ( SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceInvoicingCycleConfigurationDurationUnitDay SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceInvoicingCycleConfigurationDurationUnit = "day" SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceInvoicingCycleConfigurationDurationUnitMonth SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceInvoicingCycleConfigurationDurationUnit = "month" )
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceModelType ¶ added in v0.34.0
type SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceModelType string
const (
SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceModelTypeUnitWithProration SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPriceModelType = "unit_with_proration"
)
type SubscriptionPriceIntervalsParamsAddPriceUnion ¶ added in v0.25.0
type SubscriptionPriceIntervalsParamsAddPriceUnion interface {
// contains filtered or unexported methods
}
The definition of a new price to create and add to the subscription.
Satisfied by SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitPrice, SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackagePrice, SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixPrice, SubscriptionPriceIntervalsParamsAddPriceNewFloatingMatrixWithAllocationPrice, SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPrice, SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredBpsPrice, SubscriptionPriceIntervalsParamsAddPriceNewFloatingBpsPrice, SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkBpsPrice, SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkPrice, SubscriptionPriceIntervalsParamsAddPriceNewFloatingThresholdTotalAmountPrice, SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackagePrice, SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedTieredPrice, SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithMinimumPrice, SubscriptionPriceIntervalsParamsAddPriceNewFloatingPackageWithAllocationPrice, SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredPackageWithMinimumPrice, SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithPercentPrice, SubscriptionPriceIntervalsParamsAddPriceNewFloatingTieredWithProrationPrice, SubscriptionPriceIntervalsParamsAddPriceNewFloatingUnitWithProrationPrice, SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedAllocationPrice, SubscriptionPriceIntervalsParamsAddPriceNewFloatingGroupedWithProratedMinimumPrice, SubscriptionPriceIntervalsParamsAddPriceNewFloatingBulkWithProrationPrice, SubscriptionPriceIntervalsParamsAddPrice.
type SubscriptionPriceIntervalsParamsAddStartDateUnion ¶ added in v0.25.0
type SubscriptionPriceIntervalsParamsAddStartDateUnion interface {
ImplementsSubscriptionPriceIntervalsParamsAddStartDateUnion()
}
The start date of the price interval. This is the date that the price will start billing on the subscription.
Satisfied by shared.UnionTime, shared.BillingCycleRelativeDate.
type SubscriptionPriceIntervalsParamsEdit ¶
type SubscriptionPriceIntervalsParamsEdit struct { // The id of the price interval to edit. PriceIntervalID param.Field[string] `json:"price_interval_id,required"` // The updated billing cycle day for this price interval. If not specified, the // billing cycle day will not be updated. Note that overlapping price intervals // must have the same billing cycle day. BillingCycleDay param.Field[int64] `json:"billing_cycle_day"` // The updated end date of this price interval. If not specified, the start date // will not be updated. EndDate param.Field[SubscriptionPriceIntervalsParamsEditEndDateUnion] `json:"end_date" format:"date-time"` // A list of fixed fee quantity transitions to use for this price interval. Note // that this list will overwrite all existing fixed fee quantity transitions on the // price interval. FixedFeeQuantityTransitions param.Field[[]SubscriptionPriceIntervalsParamsEditFixedFeeQuantityTransition] `json:"fixed_fee_quantity_transitions"` // The updated start date of this price interval. If not specified, the start date // will not be updated. StartDate param.Field[SubscriptionPriceIntervalsParamsEditStartDateUnion] `json:"start_date" format:"date-time"` }
func (SubscriptionPriceIntervalsParamsEdit) MarshalJSON ¶
func (r SubscriptionPriceIntervalsParamsEdit) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsEditAdjustment ¶ added in v0.35.0
type SubscriptionPriceIntervalsParamsEditAdjustment struct { // The id of the adjustment interval to edit. AdjustmentIntervalID param.Field[string] `json:"adjustment_interval_id,required"` // The updated end date of this adjustment interval. If not specified, the start // date will not be updated. EndDate param.Field[SubscriptionPriceIntervalsParamsEditAdjustmentsEndDateUnion] `json:"end_date" format:"date-time"` // The updated start date of this adjustment interval. If not specified, the start // date will not be updated. StartDate param.Field[SubscriptionPriceIntervalsParamsEditAdjustmentsStartDateUnion] `json:"start_date" format:"date-time"` }
func (SubscriptionPriceIntervalsParamsEditAdjustment) MarshalJSON ¶ added in v0.35.0
func (r SubscriptionPriceIntervalsParamsEditAdjustment) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsEditAdjustmentsEndDateUnion ¶ added in v0.35.0
type SubscriptionPriceIntervalsParamsEditAdjustmentsEndDateUnion interface {
ImplementsSubscriptionPriceIntervalsParamsEditAdjustmentsEndDateUnion()
}
The updated end date of this adjustment interval. If not specified, the start date will not be updated.
Satisfied by shared.UnionTime, shared.BillingCycleRelativeDate.
type SubscriptionPriceIntervalsParamsEditAdjustmentsStartDateUnion ¶ added in v0.35.0
type SubscriptionPriceIntervalsParamsEditAdjustmentsStartDateUnion interface {
ImplementsSubscriptionPriceIntervalsParamsEditAdjustmentsStartDateUnion()
}
The updated start date of this adjustment interval. If not specified, the start date will not be updated.
Satisfied by shared.UnionTime, shared.BillingCycleRelativeDate.
type SubscriptionPriceIntervalsParamsEditEndDateUnion ¶ added in v0.25.0
type SubscriptionPriceIntervalsParamsEditEndDateUnion interface {
ImplementsSubscriptionPriceIntervalsParamsEditEndDateUnion()
}
The updated end date of this price interval. If not specified, the start date will not be updated.
Satisfied by shared.UnionTime, shared.BillingCycleRelativeDate.
type SubscriptionPriceIntervalsParamsEditFixedFeeQuantityTransition ¶
type SubscriptionPriceIntervalsParamsEditFixedFeeQuantityTransition 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 (SubscriptionPriceIntervalsParamsEditFixedFeeQuantityTransition) MarshalJSON ¶
func (r SubscriptionPriceIntervalsParamsEditFixedFeeQuantityTransition) MarshalJSON() (data []byte, err error)
type SubscriptionPriceIntervalsParamsEditStartDateUnion ¶ added in v0.25.0
type SubscriptionPriceIntervalsParamsEditStartDateUnion interface {
ImplementsSubscriptionPriceIntervalsParamsEditStartDateUnion()
}
The updated start date of this price interval. If not specified, the start date will not be updated.
Satisfied by shared.UnionTime, shared.BillingCycleRelativeDate.
type SubscriptionRedeemedCoupon ¶
type SubscriptionRedeemedCoupon 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 subscriptionRedeemedCouponJSON `json:"-"` }
func (*SubscriptionRedeemedCoupon) UnmarshalJSON ¶
func (r *SubscriptionRedeemedCoupon) UnmarshalJSON(data []byte) (err error)
type SubscriptionSchedulePlanChangeParams ¶
type SubscriptionSchedulePlanChangeParams struct { ChangeOption param.Field[SubscriptionSchedulePlanChangeParamsChangeOption] `json:"change_option,required"` // [DEPRECATED] Use billing_cycle_alignment instead. Reset billing periods to be // aligned with the plan change's effective date. AlignBillingWithPlanChangeDate param.Field[bool] `json:"align_billing_with_plan_change_date"` // Determines whether issued invoices for this subscription will automatically be // charged with the saved payment method on the due date. If not specified, this // defaults to the behavior configured for this customer. AutoCollection param.Field[bool] `json:"auto_collection"` // Reset billing periods to be aligned with the plan change's effective date or // start of the month. Defaults to `unchanged` which keeps subscription's existing // billing cycle alignment. BillingCycleAlignment param.Field[SubscriptionSchedulePlanChangeParamsBillingCycleAlignment] `json:"billing_cycle_alignment"` // The date that the plan change should take effect. This parameter can only be // passed if the `change_option` is `requested_date`. ChangeDate param.Field[time.Time] `json:"change_date" format:"date-time"` // Redemption code to be used for this subscription. If the coupon cannot be found // by its redemption code, or cannot be redeemed, an error response will be // returned and the subscription creation or plan change will not be scheduled. CouponRedemptionCode param.Field[string] `json:"coupon_redemption_code"` CreditsOverageRate param.Field[float64] `json:"credits_overage_rate"` // Determines the default memo on this subscription's invoices. Note that if this // is not provided, it is determined by the plan configuration. DefaultInvoiceMemo param.Field[string] `json:"default_invoice_memo"` // The external_plan_id of the plan that the given subscription should be switched // to. Note that either this property or `plan_id` must be specified. ExternalPlanID param.Field[string] `json:"external_plan_id"` // The phase of the plan to start with InitialPhaseOrder param.Field[int64] `json:"initial_phase_order"` // When this subscription's accrued usage reaches this threshold, an invoice will // be issued for the subscription. If not specified, invoices will only be issued // at the end of the billing period. InvoicingThreshold param.Field[string] `json:"invoicing_threshold"` // 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. If not provided, this defaults to the value specified in the plan. NetTerms param.Field[int64] `json:"net_terms"` PerCreditOverageAmount param.Field[float64] `json:"per_credit_overage_amount"` // The plan that the given subscription should be switched to. Note that either // this property or `external_plan_id` must be specified. PlanID param.Field[string] `json:"plan_id"` // Optionally provide a list of overrides for prices on the plan PriceOverrides param.Field[[]SubscriptionSchedulePlanChangeParamsPriceOverrideUnion] `json:"price_overrides"` }
func (SubscriptionSchedulePlanChangeParams) MarshalJSON ¶
func (r SubscriptionSchedulePlanChangeParams) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsBillingCycleAlignment ¶
type SubscriptionSchedulePlanChangeParamsBillingCycleAlignment string
Reset billing periods to be aligned with the plan change's effective date or start of the month. Defaults to `unchanged` which keeps subscription's existing billing cycle alignment.
const ( SubscriptionSchedulePlanChangeParamsBillingCycleAlignmentUnchanged SubscriptionSchedulePlanChangeParamsBillingCycleAlignment = "unchanged" SubscriptionSchedulePlanChangeParamsBillingCycleAlignmentPlanChangeDate SubscriptionSchedulePlanChangeParamsBillingCycleAlignment = "plan_change_date" SubscriptionSchedulePlanChangeParamsBillingCycleAlignmentStartOfMonth SubscriptionSchedulePlanChangeParamsBillingCycleAlignment = "start_of_month" )
func (SubscriptionSchedulePlanChangeParamsBillingCycleAlignment) IsKnown ¶ added in v0.24.0
func (r SubscriptionSchedulePlanChangeParamsBillingCycleAlignment) IsKnown() bool
type SubscriptionSchedulePlanChangeParamsChangeOption ¶
type SubscriptionSchedulePlanChangeParamsChangeOption string
const ( SubscriptionSchedulePlanChangeParamsChangeOptionRequestedDate SubscriptionSchedulePlanChangeParamsChangeOption = "requested_date" SubscriptionSchedulePlanChangeParamsChangeOptionEndOfSubscriptionTerm SubscriptionSchedulePlanChangeParamsChangeOption = "end_of_subscription_term" SubscriptionSchedulePlanChangeParamsChangeOptionImmediate SubscriptionSchedulePlanChangeParamsChangeOption = "immediate" )
func (SubscriptionSchedulePlanChangeParamsChangeOption) IsKnown ¶ added in v0.24.0
func (r SubscriptionSchedulePlanChangeParamsChangeOption) IsKnown() bool
type SubscriptionSchedulePlanChangeParamsPriceOverride ¶
type SubscriptionSchedulePlanChangeParamsPriceOverride struct { ID param.Field[string] `json:"id,required"` ModelType param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesModelType] `json:"model_type,required"` // The subscription's override minimum amount for the plan. MinimumAmount param.Field[string] `json:"minimum_amount"` // The subscription's override maximum amount for the plan. MaximumAmount param.Field[string] `json:"maximum_amount"` // The currency of the price. If not provided, the currency of the plan will be // used. Currency param.Field[string] `json:"currency"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` Discount param.Field[interface{}] `json:"discount,required"` // The starting quantity of the price, if the price is a fixed price. FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"` UnitConfig param.Field[interface{}] `json:"unit_config,required"` PackageConfig param.Field[interface{}] `json:"package_config,required"` MatrixConfig param.Field[interface{}] `json:"matrix_config,required"` TieredConfig param.Field[interface{}] `json:"tiered_config,required"` TieredBpsConfig param.Field[interface{}] `json:"tiered_bps_config,required"` BpsConfig param.Field[interface{}] `json:"bps_config,required"` BulkBpsConfig param.Field[interface{}] `json:"bulk_bps_config,required"` BulkConfig param.Field[interface{}] `json:"bulk_config,required"` ThresholdTotalAmountConfig param.Field[interface{}] `json:"threshold_total_amount_config,required"` TieredPackageConfig param.Field[interface{}] `json:"tiered_package_config,required"` TieredWithMinimumConfig param.Field[interface{}] `json:"tiered_with_minimum_config,required"` PackageWithAllocationConfig param.Field[interface{}] `json:"package_with_allocation_config,required"` UnitWithPercentConfig param.Field[interface{}] `json:"unit_with_percent_config,required"` GroupedAllocationConfig param.Field[interface{}] `json:"grouped_allocation_config,required"` GroupedWithProratedMinimumConfig param.Field[interface{}] `json:"grouped_with_prorated_minimum_config,required"` BulkWithProrationConfig param.Field[interface{}] `json:"bulk_with_proration_config,required"` UnitWithProrationConfig param.Field[interface{}] `json:"unit_with_proration_config,required"` TieredWithProrationConfig param.Field[interface{}] `json:"tiered_with_proration_config,required"` }
func (SubscriptionSchedulePlanChangeParamsPriceOverride) MarshalJSON ¶ added in v0.25.0
func (r SubscriptionSchedulePlanChangeParamsPriceOverride) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverrideUnion ¶ added in v0.25.0
type SubscriptionSchedulePlanChangeParamsPriceOverrideUnion interface {
// contains filtered or unexported methods
}
Satisfied by SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitPrice, SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackagePrice, SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPrice, SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPrice, SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPrice, SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBpsPrice, SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPrice, SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPrice, SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideThresholdTotalAmountPrice, SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPackagePrice, SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithMinimumPrice, SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackageWithAllocationPrice, SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithPercentPrice, SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedAllocationPrice, SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedWithProratedMinimumPrice, SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkWithProrationPrice, SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithProrationPrice, SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithProrationPrice, SubscriptionSchedulePlanChangeParamsPriceOverride.
type SubscriptionSchedulePlanChangeParamsPriceOverridesModelType ¶ added in v0.25.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesModelType string
const ( SubscriptionSchedulePlanChangeParamsPriceOverridesModelTypeUnit SubscriptionSchedulePlanChangeParamsPriceOverridesModelType = "unit" SubscriptionSchedulePlanChangeParamsPriceOverridesModelTypePackage SubscriptionSchedulePlanChangeParamsPriceOverridesModelType = "package" SubscriptionSchedulePlanChangeParamsPriceOverridesModelTypeMatrix SubscriptionSchedulePlanChangeParamsPriceOverridesModelType = "matrix" SubscriptionSchedulePlanChangeParamsPriceOverridesModelTypeTiered SubscriptionSchedulePlanChangeParamsPriceOverridesModelType = "tiered" SubscriptionSchedulePlanChangeParamsPriceOverridesModelTypeTieredBps SubscriptionSchedulePlanChangeParamsPriceOverridesModelType = "tiered_bps" SubscriptionSchedulePlanChangeParamsPriceOverridesModelTypeBps SubscriptionSchedulePlanChangeParamsPriceOverridesModelType = "bps" SubscriptionSchedulePlanChangeParamsPriceOverridesModelTypeBulkBps SubscriptionSchedulePlanChangeParamsPriceOverridesModelType = "bulk_bps" SubscriptionSchedulePlanChangeParamsPriceOverridesModelTypeBulk SubscriptionSchedulePlanChangeParamsPriceOverridesModelType = "bulk" SubscriptionSchedulePlanChangeParamsPriceOverridesModelTypeThresholdTotalAmount SubscriptionSchedulePlanChangeParamsPriceOverridesModelType = "threshold_total_amount" SubscriptionSchedulePlanChangeParamsPriceOverridesModelTypeTieredPackage SubscriptionSchedulePlanChangeParamsPriceOverridesModelType = "tiered_package" SubscriptionSchedulePlanChangeParamsPriceOverridesModelTypeTieredWithMinimum SubscriptionSchedulePlanChangeParamsPriceOverridesModelType = "tiered_with_minimum" SubscriptionSchedulePlanChangeParamsPriceOverridesModelTypePackageWithAllocation SubscriptionSchedulePlanChangeParamsPriceOverridesModelType = "package_with_allocation" SubscriptionSchedulePlanChangeParamsPriceOverridesModelTypeUnitWithPercent SubscriptionSchedulePlanChangeParamsPriceOverridesModelType = "unit_with_percent" SubscriptionSchedulePlanChangeParamsPriceOverridesModelTypeGroupedAllocation SubscriptionSchedulePlanChangeParamsPriceOverridesModelType = "grouped_allocation" SubscriptionSchedulePlanChangeParamsPriceOverridesModelTypeGroupedWithProratedMinimum SubscriptionSchedulePlanChangeParamsPriceOverridesModelType = "grouped_with_prorated_minimum" SubscriptionSchedulePlanChangeParamsPriceOverridesModelTypeBulkWithProration SubscriptionSchedulePlanChangeParamsPriceOverridesModelType = "bulk_with_proration" SubscriptionSchedulePlanChangeParamsPriceOverridesModelTypeUnitWithProration SubscriptionSchedulePlanChangeParamsPriceOverridesModelType = "unit_with_proration" SubscriptionSchedulePlanChangeParamsPriceOverridesModelTypeTieredWithProration SubscriptionSchedulePlanChangeParamsPriceOverridesModelType = "tiered_with_proration" )
func (SubscriptionSchedulePlanChangeParamsPriceOverridesModelType) IsKnown ¶ added in v0.25.0
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesModelType) IsKnown() bool
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBpsPrice ¶
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBpsPrice struct { ID param.Field[string] `json:"id,required"` BpsConfig param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBpsPriceBpsConfig] `json:"bps_config,required"` ModelType param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBpsPriceModelType] `json:"model_type,required"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` // The currency of the price. If not provided, the currency of the plan will be // used. Currency param.Field[string] `json:"currency"` // The subscription's override discount for the plan. Discount param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBpsPriceDiscount] `json:"discount"` // The starting quantity of the price, if the price is a fixed price. FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"` // The subscription's override maximum amount for the plan. MaximumAmount param.Field[string] `json:"maximum_amount"` // The subscription's override minimum amount for the plan. MinimumAmount param.Field[string] `json:"minimum_amount"` }
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBpsPrice) MarshalJSON ¶
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBpsPrice) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBpsPriceBpsConfig ¶
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBpsPriceBpsConfig 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 (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBpsPriceBpsConfig) MarshalJSON ¶
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBpsPriceBpsConfig) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBpsPriceDiscount ¶ added in v0.2.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBpsPriceDiscount struct { DiscountType param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBpsPriceDiscountDiscountType] `json:"discount_type,required"` // Only available if discount_type is `amount`. AmountDiscount param.Field[string] `json:"amount_discount"` // 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"` // 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 `trial` TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount param.Field[float64] `json:"usage_discount"` }
The subscription's override discount for the plan.
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBpsPriceDiscount) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBpsPriceDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBpsPriceDiscountDiscountType ¶ added in v0.2.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBpsPriceDiscountDiscountType string
const ( SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBpsPriceDiscountDiscountTypePercentage SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBpsPriceDiscountDiscountType = "percentage" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBpsPriceDiscountDiscountTypeTrial SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBpsPriceDiscountDiscountType = "trial" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBpsPriceDiscountDiscountTypeUsage SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBpsPriceDiscountDiscountType = "usage" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBpsPriceDiscountDiscountTypeAmount SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBpsPriceDiscountDiscountType = "amount" )
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBpsPriceModelType ¶
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBpsPriceModelType string
const (
SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBpsPriceModelTypeBps SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBpsPriceModelType = "bps"
)
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBpsPriceModelType) IsKnown ¶ added in v0.24.0
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBpsPriceModelType) IsKnown() bool
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPrice ¶
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPrice struct { ID param.Field[string] `json:"id,required"` BulkBpsConfig param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPriceBulkBpsConfig] `json:"bulk_bps_config,required"` ModelType param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPriceModelType] `json:"model_type,required"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` // The currency of the price. If not provided, the currency of the plan will be // used. Currency param.Field[string] `json:"currency"` // The subscription's override discount for the plan. Discount param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPriceDiscount] `json:"discount"` // The starting quantity of the price, if the price is a fixed price. FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"` // The subscription's override maximum amount for the plan. MaximumAmount param.Field[string] `json:"maximum_amount"` // The subscription's override minimum amount for the plan. MinimumAmount param.Field[string] `json:"minimum_amount"` }
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPrice) MarshalJSON ¶
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPrice) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPriceBulkBpsConfig ¶
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPriceBulkBpsConfig struct { // Tiers for a bulk BPS pricing model where all usage is aggregated to a single // tier based on total volume Tiers param.Field[[]SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPriceBulkBpsConfigTier] `json:"tiers,required"` }
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPriceBulkBpsConfig) MarshalJSON ¶
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPriceBulkBpsConfig) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPriceBulkBpsConfigTier ¶
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPriceBulkBpsConfigTier 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 (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPriceBulkBpsConfigTier) MarshalJSON ¶
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPriceBulkBpsConfigTier) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPriceDiscount ¶ added in v0.2.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPriceDiscount struct { DiscountType param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPriceDiscountDiscountType] `json:"discount_type,required"` // Only available if discount_type is `amount`. AmountDiscount param.Field[string] `json:"amount_discount"` // 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"` // 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 `trial` TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount param.Field[float64] `json:"usage_discount"` }
The subscription's override discount for the plan.
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPriceDiscount) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPriceDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPriceDiscountDiscountType ¶ added in v0.2.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPriceDiscountDiscountType string
const ( SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPriceDiscountDiscountTypePercentage SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPriceDiscountDiscountType = "percentage" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPriceDiscountDiscountTypeTrial SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPriceDiscountDiscountType = "trial" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPriceDiscountDiscountTypeUsage SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPriceDiscountDiscountType = "usage" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPriceDiscountDiscountTypeAmount SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPriceDiscountDiscountType = "amount" )
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPriceModelType ¶
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPriceModelType string
const (
SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPriceModelTypeBulkBps SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkBpsPriceModelType = "bulk_bps"
)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPrice ¶
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPrice struct { ID param.Field[string] `json:"id,required"` BulkConfig param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPriceBulkConfig] `json:"bulk_config,required"` ModelType param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPriceModelType] `json:"model_type,required"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` // The currency of the price. If not provided, the currency of the plan will be // used. Currency param.Field[string] `json:"currency"` // The subscription's override discount for the plan. Discount param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPriceDiscount] `json:"discount"` // The starting quantity of the price, if the price is a fixed price. FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"` // The subscription's override maximum amount for the plan. MaximumAmount param.Field[string] `json:"maximum_amount"` // The subscription's override minimum amount for the plan. MinimumAmount param.Field[string] `json:"minimum_amount"` }
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPrice) MarshalJSON ¶
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPrice) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPriceBulkConfig ¶
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPriceBulkConfig struct { // Bulk tiers for rating based on total usage volume Tiers param.Field[[]SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPriceBulkConfigTier] `json:"tiers,required"` }
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPriceBulkConfig) MarshalJSON ¶
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPriceBulkConfig) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPriceBulkConfigTier ¶
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPriceBulkConfigTier 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 (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPriceBulkConfigTier) MarshalJSON ¶
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPriceBulkConfigTier) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPriceDiscount ¶ added in v0.2.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPriceDiscount struct { DiscountType param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPriceDiscountDiscountType] `json:"discount_type,required"` // Only available if discount_type is `amount`. AmountDiscount param.Field[string] `json:"amount_discount"` // 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"` // 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 `trial` TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount param.Field[float64] `json:"usage_discount"` }
The subscription's override discount for the plan.
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPriceDiscount) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPriceDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPriceDiscountDiscountType ¶ added in v0.2.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPriceDiscountDiscountType string
const ( SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPriceDiscountDiscountTypePercentage SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPriceDiscountDiscountType = "percentage" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPriceDiscountDiscountTypeTrial SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPriceDiscountDiscountType = "trial" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPriceDiscountDiscountTypeUsage SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPriceDiscountDiscountType = "usage" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPriceDiscountDiscountTypeAmount SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPriceDiscountDiscountType = "amount" )
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPriceModelType ¶
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPriceModelType string
const (
SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPriceModelTypeBulk SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPriceModelType = "bulk"
)
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPriceModelType) IsKnown ¶ added in v0.24.0
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkPriceModelType) IsKnown() bool
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkWithProrationPrice ¶ added in v0.56.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkWithProrationPrice struct { ID param.Field[string] `json:"id,required"` BulkWithProrationConfig param.Field[map[string]interface{}] `json:"bulk_with_proration_config,required"` ModelType param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkWithProrationPriceModelType] `json:"model_type,required"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` // The currency of the price. If not provided, the currency of the plan will be // used. Currency param.Field[string] `json:"currency"` // The subscription's override discount for the plan. Discount param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkWithProrationPriceDiscount] `json:"discount"` // The starting quantity of the price, if the price is a fixed price. FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"` // The subscription's override maximum amount for the plan. MaximumAmount param.Field[string] `json:"maximum_amount"` // The subscription's override minimum amount for the plan. MinimumAmount param.Field[string] `json:"minimum_amount"` }
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkWithProrationPrice) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkWithProrationPrice) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkWithProrationPriceDiscount ¶ added in v0.56.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkWithProrationPriceDiscount struct { DiscountType param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkWithProrationPriceDiscountDiscountType] `json:"discount_type,required"` // Only available if discount_type is `amount`. AmountDiscount param.Field[string] `json:"amount_discount"` // 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"` // 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 `trial` TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount param.Field[float64] `json:"usage_discount"` }
The subscription's override discount for the plan.
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkWithProrationPriceDiscount) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkWithProrationPriceDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkWithProrationPriceDiscountDiscountType ¶ added in v0.56.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkWithProrationPriceDiscountDiscountType string
const ( SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkWithProrationPriceDiscountDiscountTypePercentage SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkWithProrationPriceDiscountDiscountType = "percentage" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkWithProrationPriceDiscountDiscountTypeTrial SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkWithProrationPriceDiscountDiscountType = "trial" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkWithProrationPriceDiscountDiscountTypeUsage SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkWithProrationPriceDiscountDiscountType = "usage" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkWithProrationPriceDiscountDiscountTypeAmount SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkWithProrationPriceDiscountDiscountType = "amount" )
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkWithProrationPriceModelType ¶ added in v0.56.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkWithProrationPriceModelType string
const (
SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkWithProrationPriceModelTypeBulkWithProration SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideBulkWithProrationPriceModelType = "bulk_with_proration"
)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedAllocationPrice ¶ added in v0.56.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedAllocationPrice struct { ID param.Field[string] `json:"id,required"` GroupedAllocationConfig param.Field[map[string]interface{}] `json:"grouped_allocation_config,required"` ModelType param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedAllocationPriceModelType] `json:"model_type,required"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` // The currency of the price. If not provided, the currency of the plan will be // used. Currency param.Field[string] `json:"currency"` // The subscription's override discount for the plan. Discount param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedAllocationPriceDiscount] `json:"discount"` // The starting quantity of the price, if the price is a fixed price. FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"` // The subscription's override maximum amount for the plan. MaximumAmount param.Field[string] `json:"maximum_amount"` // The subscription's override minimum amount for the plan. MinimumAmount param.Field[string] `json:"minimum_amount"` }
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedAllocationPrice) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedAllocationPrice) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedAllocationPriceDiscount ¶ added in v0.56.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedAllocationPriceDiscount struct { DiscountType param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedAllocationPriceDiscountDiscountType] `json:"discount_type,required"` // Only available if discount_type is `amount`. AmountDiscount param.Field[string] `json:"amount_discount"` // 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"` // 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 `trial` TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount param.Field[float64] `json:"usage_discount"` }
The subscription's override discount for the plan.
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedAllocationPriceDiscount) MarshalJSON ¶ added in v0.56.0
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedAllocationPriceDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedAllocationPriceDiscountDiscountType ¶ added in v0.56.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedAllocationPriceDiscountDiscountType string
const ( SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedAllocationPriceDiscountDiscountTypePercentage SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedAllocationPriceDiscountDiscountType = "percentage" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedAllocationPriceDiscountDiscountTypeTrial SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedAllocationPriceDiscountDiscountType = "trial" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedAllocationPriceDiscountDiscountTypeUsage SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedAllocationPriceDiscountDiscountType = "usage" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedAllocationPriceDiscountDiscountTypeAmount SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedAllocationPriceDiscountDiscountType = "amount" )
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedAllocationPriceModelType ¶ added in v0.56.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedAllocationPriceModelType string
const (
SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedAllocationPriceModelTypeGroupedAllocation SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedAllocationPriceModelType = "grouped_allocation"
)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedWithProratedMinimumPrice ¶ added in v0.58.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedWithProratedMinimumPrice struct { ID param.Field[string] `json:"id,required"` GroupedWithProratedMinimumConfig param.Field[map[string]interface{}] `json:"grouped_with_prorated_minimum_config,required"` ModelType param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceModelType] `json:"model_type,required"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` // The currency of the price. If not provided, the currency of the plan will be // used. Currency param.Field[string] `json:"currency"` // The subscription's override discount for the plan. Discount param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceDiscount] `json:"discount"` // The starting quantity of the price, if the price is a fixed price. FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"` // The subscription's override maximum amount for the plan. MaximumAmount param.Field[string] `json:"maximum_amount"` // The subscription's override minimum amount for the plan. MinimumAmount param.Field[string] `json:"minimum_amount"` }
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedWithProratedMinimumPrice) MarshalJSON ¶ added in v0.58.0
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedWithProratedMinimumPrice) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceDiscount ¶ added in v0.58.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceDiscount struct { DiscountType param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceDiscountDiscountType] `json:"discount_type,required"` // Only available if discount_type is `amount`. AmountDiscount param.Field[string] `json:"amount_discount"` // 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"` // 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 `trial` TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount param.Field[float64] `json:"usage_discount"` }
The subscription's override discount for the plan.
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceDiscount) MarshalJSON ¶ added in v0.58.0
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceDiscountDiscountType ¶ added in v0.58.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceDiscountDiscountType string
const ( SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceDiscountDiscountTypePercentage SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceDiscountDiscountType = "percentage" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceDiscountDiscountTypeTrial SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceDiscountDiscountType = "trial" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceDiscountDiscountTypeUsage SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceDiscountDiscountType = "usage" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceDiscountDiscountTypeAmount SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceDiscountDiscountType = "amount" )
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceModelType ¶ added in v0.58.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceModelType string
const (
SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceModelTypeGroupedWithProratedMinimum SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideGroupedWithProratedMinimumPriceModelType = "grouped_with_prorated_minimum"
)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPrice ¶
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPrice struct { ID param.Field[string] `json:"id,required"` MatrixConfig param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPriceMatrixConfig] `json:"matrix_config,required"` ModelType param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPriceModelType] `json:"model_type,required"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` // The currency of the price. If not provided, the currency of the plan will be // used. Currency param.Field[string] `json:"currency"` // The subscription's override discount for the plan. Discount param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPriceDiscount] `json:"discount"` // The starting quantity of the price, if the price is a fixed price. FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"` // The subscription's override maximum amount for the plan. MaximumAmount param.Field[string] `json:"maximum_amount"` // The subscription's override minimum amount for the plan. MinimumAmount param.Field[string] `json:"minimum_amount"` }
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPrice) MarshalJSON ¶
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPrice) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPriceDiscount ¶ added in v0.2.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPriceDiscount struct { DiscountType param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPriceDiscountDiscountType] `json:"discount_type,required"` // Only available if discount_type is `amount`. AmountDiscount param.Field[string] `json:"amount_discount"` // 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"` // 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 `trial` TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount param.Field[float64] `json:"usage_discount"` }
The subscription's override discount for the plan.
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPriceDiscount) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPriceDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPriceDiscountDiscountType ¶ added in v0.2.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPriceDiscountDiscountType string
const ( SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPriceDiscountDiscountTypePercentage SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPriceDiscountDiscountType = "percentage" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPriceDiscountDiscountTypeTrial SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPriceDiscountDiscountType = "trial" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPriceDiscountDiscountTypeUsage SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPriceDiscountDiscountType = "usage" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPriceDiscountDiscountTypeAmount SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPriceDiscountDiscountType = "amount" )
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPriceMatrixConfig ¶
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPriceMatrixConfig 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[[]SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPriceMatrixConfigMatrixValue] `json:"matrix_values,required"` }
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPriceMatrixConfig) MarshalJSON ¶
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPriceMatrixConfig) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPriceMatrixConfigMatrixValue ¶
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPriceMatrixConfigMatrixValue 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 (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPriceMatrixConfigMatrixValue) MarshalJSON ¶
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPriceMatrixConfigMatrixValue) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPriceModelType ¶
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPriceModelType string
const (
SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPriceModelTypeMatrix SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideMatrixPriceModelType = "matrix"
)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackagePrice ¶
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackagePrice struct { ID param.Field[string] `json:"id,required"` ModelType param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackagePriceModelType] `json:"model_type,required"` PackageConfig param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackagePricePackageConfig] `json:"package_config,required"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` // The currency of the price. If not provided, the currency of the plan will be // used. Currency param.Field[string] `json:"currency"` // The subscription's override discount for the plan. Discount param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackagePriceDiscount] `json:"discount"` // The starting quantity of the price, if the price is a fixed price. FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"` // The subscription's override maximum amount for the plan. MaximumAmount param.Field[string] `json:"maximum_amount"` // The subscription's override minimum amount for the plan. MinimumAmount param.Field[string] `json:"minimum_amount"` }
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackagePrice) MarshalJSON ¶
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackagePrice) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackagePriceDiscount ¶ added in v0.2.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackagePriceDiscount struct { DiscountType param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackagePriceDiscountDiscountType] `json:"discount_type,required"` // Only available if discount_type is `amount`. AmountDiscount param.Field[string] `json:"amount_discount"` // 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"` // 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 `trial` TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount param.Field[float64] `json:"usage_discount"` }
The subscription's override discount for the plan.
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackagePriceDiscount) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackagePriceDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackagePriceDiscountDiscountType ¶ added in v0.2.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackagePriceDiscountDiscountType string
const ( SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackagePriceDiscountDiscountTypePercentage SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackagePriceDiscountDiscountType = "percentage" SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackagePriceDiscountDiscountTypeTrial SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackagePriceDiscountDiscountType = "trial" SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackagePriceDiscountDiscountTypeUsage SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackagePriceDiscountDiscountType = "usage" SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackagePriceDiscountDiscountTypeAmount SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackagePriceDiscountDiscountType = "amount" )
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackagePriceModelType ¶
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackagePriceModelType string
const (
SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackagePriceModelTypePackage SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackagePriceModelType = "package"
)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackagePricePackageConfig ¶
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackagePricePackageConfig 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 (SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackagePricePackageConfig) MarshalJSON ¶
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackagePricePackageConfig) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackageWithAllocationPrice ¶
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackageWithAllocationPrice struct { ID param.Field[string] `json:"id,required"` ModelType param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackageWithAllocationPriceModelType] `json:"model_type,required"` PackageWithAllocationConfig param.Field[map[string]interface{}] `json:"package_with_allocation_config,required"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` // The currency of the price. If not provided, the currency of the plan will be // used. Currency param.Field[string] `json:"currency"` // The subscription's override discount for the plan. Discount param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackageWithAllocationPriceDiscount] `json:"discount"` // The starting quantity of the price, if the price is a fixed price. FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"` // The subscription's override maximum amount for the plan. MaximumAmount param.Field[string] `json:"maximum_amount"` // The subscription's override minimum amount for the plan. MinimumAmount param.Field[string] `json:"minimum_amount"` }
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackageWithAllocationPrice) MarshalJSON ¶
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackageWithAllocationPrice) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackageWithAllocationPriceDiscount ¶ added in v0.2.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackageWithAllocationPriceDiscount struct { DiscountType param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackageWithAllocationPriceDiscountDiscountType] `json:"discount_type,required"` // Only available if discount_type is `amount`. AmountDiscount param.Field[string] `json:"amount_discount"` // 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"` // 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 `trial` TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount param.Field[float64] `json:"usage_discount"` }
The subscription's override discount for the plan.
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackageWithAllocationPriceDiscount) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackageWithAllocationPriceDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackageWithAllocationPriceDiscountDiscountType ¶ added in v0.2.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackageWithAllocationPriceDiscountDiscountType string
const ( SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackageWithAllocationPriceDiscountDiscountTypePercentage SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackageWithAllocationPriceDiscountDiscountType = "percentage" SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackageWithAllocationPriceDiscountDiscountTypeTrial SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackageWithAllocationPriceDiscountDiscountType = "trial" SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackageWithAllocationPriceDiscountDiscountTypeUsage SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackageWithAllocationPriceDiscountDiscountType = "usage" SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackageWithAllocationPriceDiscountDiscountTypeAmount SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackageWithAllocationPriceDiscountDiscountType = "amount" )
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackageWithAllocationPriceModelType ¶
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackageWithAllocationPriceModelType string
const (
SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackageWithAllocationPriceModelTypePackageWithAllocation SubscriptionSchedulePlanChangeParamsPriceOverridesOverridePackageWithAllocationPriceModelType = "package_with_allocation"
)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideThresholdTotalAmountPrice ¶
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideThresholdTotalAmountPrice struct { ID param.Field[string] `json:"id,required"` ModelType param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideThresholdTotalAmountPriceModelType] `json:"model_type,required"` ThresholdTotalAmountConfig param.Field[map[string]interface{}] `json:"threshold_total_amount_config,required"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` // The currency of the price. If not provided, the currency of the plan will be // used. Currency param.Field[string] `json:"currency"` // The subscription's override discount for the plan. Discount param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideThresholdTotalAmountPriceDiscount] `json:"discount"` // The starting quantity of the price, if the price is a fixed price. FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"` // The subscription's override maximum amount for the plan. MaximumAmount param.Field[string] `json:"maximum_amount"` // The subscription's override minimum amount for the plan. MinimumAmount param.Field[string] `json:"minimum_amount"` }
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideThresholdTotalAmountPrice) MarshalJSON ¶
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideThresholdTotalAmountPrice) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideThresholdTotalAmountPriceDiscount ¶ added in v0.2.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideThresholdTotalAmountPriceDiscount struct { DiscountType param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideThresholdTotalAmountPriceDiscountDiscountType] `json:"discount_type,required"` // Only available if discount_type is `amount`. AmountDiscount param.Field[string] `json:"amount_discount"` // 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"` // 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 `trial` TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount param.Field[float64] `json:"usage_discount"` }
The subscription's override discount for the plan.
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideThresholdTotalAmountPriceDiscount) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideThresholdTotalAmountPriceDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideThresholdTotalAmountPriceDiscountDiscountType ¶ added in v0.2.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideThresholdTotalAmountPriceDiscountDiscountType string
const ( SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideThresholdTotalAmountPriceDiscountDiscountTypePercentage SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideThresholdTotalAmountPriceDiscountDiscountType = "percentage" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideThresholdTotalAmountPriceDiscountDiscountTypeTrial SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideThresholdTotalAmountPriceDiscountDiscountType = "trial" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideThresholdTotalAmountPriceDiscountDiscountTypeUsage SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideThresholdTotalAmountPriceDiscountDiscountType = "usage" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideThresholdTotalAmountPriceDiscountDiscountTypeAmount SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideThresholdTotalAmountPriceDiscountDiscountType = "amount" )
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideThresholdTotalAmountPriceModelType ¶
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideThresholdTotalAmountPriceModelType string
const (
SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideThresholdTotalAmountPriceModelTypeThresholdTotalAmount SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideThresholdTotalAmountPriceModelType = "threshold_total_amount"
)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPrice ¶
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPrice struct { ID param.Field[string] `json:"id,required"` ModelType param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPriceModelType] `json:"model_type,required"` TieredBpsConfig param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPriceTieredBpsConfig] `json:"tiered_bps_config,required"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` // The currency of the price. If not provided, the currency of the plan will be // used. Currency param.Field[string] `json:"currency"` // The subscription's override discount for the plan. Discount param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPriceDiscount] `json:"discount"` // The starting quantity of the price, if the price is a fixed price. FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"` // The subscription's override maximum amount for the plan. MaximumAmount param.Field[string] `json:"maximum_amount"` // The subscription's override minimum amount for the plan. MinimumAmount param.Field[string] `json:"minimum_amount"` }
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPrice) MarshalJSON ¶
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPrice) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPriceDiscount ¶ added in v0.2.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPriceDiscount struct { DiscountType param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPriceDiscountDiscountType] `json:"discount_type,required"` // Only available if discount_type is `amount`. AmountDiscount param.Field[string] `json:"amount_discount"` // 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"` // 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 `trial` TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount param.Field[float64] `json:"usage_discount"` }
The subscription's override discount for the plan.
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPriceDiscount) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPriceDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPriceDiscountDiscountType ¶ added in v0.2.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPriceDiscountDiscountType string
const ( SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPriceDiscountDiscountTypePercentage SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPriceDiscountDiscountType = "percentage" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPriceDiscountDiscountTypeTrial SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPriceDiscountDiscountType = "trial" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPriceDiscountDiscountTypeUsage SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPriceDiscountDiscountType = "usage" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPriceDiscountDiscountTypeAmount SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPriceDiscountDiscountType = "amount" )
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPriceModelType ¶
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPriceModelType string
const (
SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPriceModelTypeTieredBps SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPriceModelType = "tiered_bps"
)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPriceTieredBpsConfig ¶
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPriceTieredBpsConfig struct { // Tiers for a Graduated BPS pricing model, where usage is bucketed into specified // tiers Tiers param.Field[[]SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPriceTieredBpsConfigTier] `json:"tiers,required"` }
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPriceTieredBpsConfig) MarshalJSON ¶
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPriceTieredBpsConfig) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPriceTieredBpsConfigTier ¶
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPriceTieredBpsConfigTier 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 (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPriceTieredBpsConfigTier) MarshalJSON ¶
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredBpsPriceTieredBpsConfigTier) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPackagePrice ¶
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPackagePrice struct { ID param.Field[string] `json:"id,required"` ModelType param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPackagePriceModelType] `json:"model_type,required"` TieredPackageConfig param.Field[map[string]interface{}] `json:"tiered_package_config,required"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` // The currency of the price. If not provided, the currency of the plan will be // used. Currency param.Field[string] `json:"currency"` // The subscription's override discount for the plan. Discount param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPackagePriceDiscount] `json:"discount"` // The starting quantity of the price, if the price is a fixed price. FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"` // The subscription's override maximum amount for the plan. MaximumAmount param.Field[string] `json:"maximum_amount"` // The subscription's override minimum amount for the plan. MinimumAmount param.Field[string] `json:"minimum_amount"` }
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPackagePrice) MarshalJSON ¶
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPackagePrice) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPackagePriceDiscount ¶ added in v0.2.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPackagePriceDiscount struct { DiscountType param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPackagePriceDiscountDiscountType] `json:"discount_type,required"` // Only available if discount_type is `amount`. AmountDiscount param.Field[string] `json:"amount_discount"` // 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"` // 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 `trial` TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount param.Field[float64] `json:"usage_discount"` }
The subscription's override discount for the plan.
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPackagePriceDiscount) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPackagePriceDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPackagePriceDiscountDiscountType ¶ added in v0.2.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPackagePriceDiscountDiscountType string
const ( SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPackagePriceDiscountDiscountTypePercentage SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPackagePriceDiscountDiscountType = "percentage" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPackagePriceDiscountDiscountTypeTrial SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPackagePriceDiscountDiscountType = "trial" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPackagePriceDiscountDiscountTypeUsage SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPackagePriceDiscountDiscountType = "usage" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPackagePriceDiscountDiscountTypeAmount SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPackagePriceDiscountDiscountType = "amount" )
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPackagePriceModelType ¶
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPackagePriceModelType string
const (
SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPackagePriceModelTypeTieredPackage SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPackagePriceModelType = "tiered_package"
)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPrice ¶
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPrice struct { ID param.Field[string] `json:"id,required"` ModelType param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPriceModelType] `json:"model_type,required"` TieredConfig param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPriceTieredConfig] `json:"tiered_config,required"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` // The currency of the price. If not provided, the currency of the plan will be // used. Currency param.Field[string] `json:"currency"` // The subscription's override discount for the plan. Discount param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPriceDiscount] `json:"discount"` // The starting quantity of the price, if the price is a fixed price. FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"` // The subscription's override maximum amount for the plan. MaximumAmount param.Field[string] `json:"maximum_amount"` // The subscription's override minimum amount for the plan. MinimumAmount param.Field[string] `json:"minimum_amount"` }
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPrice) MarshalJSON ¶
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPrice) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPriceDiscount ¶ added in v0.2.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPriceDiscount struct { DiscountType param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPriceDiscountDiscountType] `json:"discount_type,required"` // Only available if discount_type is `amount`. AmountDiscount param.Field[string] `json:"amount_discount"` // 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"` // 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 `trial` TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount param.Field[float64] `json:"usage_discount"` }
The subscription's override discount for the plan.
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPriceDiscount) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPriceDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPriceDiscountDiscountType ¶ added in v0.2.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPriceDiscountDiscountType string
const ( SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPriceDiscountDiscountTypePercentage SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPriceDiscountDiscountType = "percentage" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPriceDiscountDiscountTypeTrial SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPriceDiscountDiscountType = "trial" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPriceDiscountDiscountTypeUsage SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPriceDiscountDiscountType = "usage" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPriceDiscountDiscountTypeAmount SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPriceDiscountDiscountType = "amount" )
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPriceModelType ¶
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPriceModelType string
const (
SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPriceModelTypeTiered SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPriceModelType = "tiered"
)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPriceTieredConfig ¶
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPriceTieredConfig struct { // Tiers for rating based on total usage quantities into the specified tier Tiers param.Field[[]SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPriceTieredConfigTier] `json:"tiers,required"` }
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPriceTieredConfig) MarshalJSON ¶
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPriceTieredConfig) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPriceTieredConfigTier ¶
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPriceTieredConfigTier 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 (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPriceTieredConfigTier) MarshalJSON ¶
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredPriceTieredConfigTier) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithMinimumPrice ¶
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithMinimumPrice struct { ID param.Field[string] `json:"id,required"` ModelType param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithMinimumPriceModelType] `json:"model_type,required"` TieredWithMinimumConfig param.Field[map[string]interface{}] `json:"tiered_with_minimum_config,required"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` // The currency of the price. If not provided, the currency of the plan will be // used. Currency param.Field[string] `json:"currency"` // The subscription's override discount for the plan. Discount param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithMinimumPriceDiscount] `json:"discount"` // The starting quantity of the price, if the price is a fixed price. FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"` // The subscription's override maximum amount for the plan. MaximumAmount param.Field[string] `json:"maximum_amount"` // The subscription's override minimum amount for the plan. MinimumAmount param.Field[string] `json:"minimum_amount"` }
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithMinimumPrice) MarshalJSON ¶
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithMinimumPrice) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithMinimumPriceDiscount ¶ added in v0.2.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithMinimumPriceDiscount struct { DiscountType param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithMinimumPriceDiscountDiscountType] `json:"discount_type,required"` // Only available if discount_type is `amount`. AmountDiscount param.Field[string] `json:"amount_discount"` // 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"` // 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 `trial` TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount param.Field[float64] `json:"usage_discount"` }
The subscription's override discount for the plan.
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithMinimumPriceDiscount) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithMinimumPriceDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithMinimumPriceDiscountDiscountType ¶ added in v0.2.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithMinimumPriceDiscountDiscountType string
const ( SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithMinimumPriceDiscountDiscountTypePercentage SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithMinimumPriceDiscountDiscountType = "percentage" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithMinimumPriceDiscountDiscountTypeTrial SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithMinimumPriceDiscountDiscountType = "trial" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithMinimumPriceDiscountDiscountTypeUsage SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithMinimumPriceDiscountDiscountType = "usage" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithMinimumPriceDiscountDiscountTypeAmount SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithMinimumPriceDiscountDiscountType = "amount" )
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithMinimumPriceModelType ¶
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithMinimumPriceModelType string
const (
SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithMinimumPriceModelTypeTieredWithMinimum SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithMinimumPriceModelType = "tiered_with_minimum"
)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithProrationPrice ¶ added in v0.60.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithProrationPrice struct { ID param.Field[string] `json:"id,required"` ModelType param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithProrationPriceModelType] `json:"model_type,required"` TieredWithProrationConfig param.Field[map[string]interface{}] `json:"tiered_with_proration_config,required"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` // The currency of the price. If not provided, the currency of the plan will be // used. Currency param.Field[string] `json:"currency"` // The subscription's override discount for the plan. Discount param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithProrationPriceDiscount] `json:"discount"` // The starting quantity of the price, if the price is a fixed price. FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"` // The subscription's override maximum amount for the plan. MaximumAmount param.Field[string] `json:"maximum_amount"` // The subscription's override minimum amount for the plan. MinimumAmount param.Field[string] `json:"minimum_amount"` }
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithProrationPrice) MarshalJSON ¶ added in v0.60.0
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithProrationPrice) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithProrationPriceDiscount ¶ added in v0.60.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithProrationPriceDiscount struct { DiscountType param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithProrationPriceDiscountDiscountType] `json:"discount_type,required"` // Only available if discount_type is `amount`. AmountDiscount param.Field[string] `json:"amount_discount"` // 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"` // 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 `trial` TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount param.Field[float64] `json:"usage_discount"` }
The subscription's override discount for the plan.
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithProrationPriceDiscount) MarshalJSON ¶ added in v0.60.0
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithProrationPriceDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithProrationPriceDiscountDiscountType ¶ added in v0.60.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithProrationPriceDiscountDiscountType string
const ( SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithProrationPriceDiscountDiscountTypePercentage SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithProrationPriceDiscountDiscountType = "percentage" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithProrationPriceDiscountDiscountTypeTrial SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithProrationPriceDiscountDiscountType = "trial" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithProrationPriceDiscountDiscountTypeUsage SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithProrationPriceDiscountDiscountType = "usage" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithProrationPriceDiscountDiscountTypeAmount SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithProrationPriceDiscountDiscountType = "amount" )
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithProrationPriceModelType ¶ added in v0.60.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithProrationPriceModelType string
const (
SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithProrationPriceModelTypeTieredWithProration SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideTieredWithProrationPriceModelType = "tiered_with_proration"
)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitPrice ¶
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitPrice struct { ID param.Field[string] `json:"id,required"` ModelType param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitPriceModelType] `json:"model_type,required"` UnitConfig param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitPriceUnitConfig] `json:"unit_config,required"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` // The currency of the price. If not provided, the currency of the plan will be // used. Currency param.Field[string] `json:"currency"` // The subscription's override discount for the plan. Discount param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitPriceDiscount] `json:"discount"` // The starting quantity of the price, if the price is a fixed price. FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"` // The subscription's override maximum amount for the plan. MaximumAmount param.Field[string] `json:"maximum_amount"` // The subscription's override minimum amount for the plan. MinimumAmount param.Field[string] `json:"minimum_amount"` }
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitPrice) MarshalJSON ¶
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitPrice) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitPriceDiscount ¶ added in v0.2.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitPriceDiscount struct { DiscountType param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitPriceDiscountDiscountType] `json:"discount_type,required"` // Only available if discount_type is `amount`. AmountDiscount param.Field[string] `json:"amount_discount"` // 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"` // 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 `trial` TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount param.Field[float64] `json:"usage_discount"` }
The subscription's override discount for the plan.
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitPriceDiscount) MarshalJSON ¶ added in v0.2.0
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitPriceDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitPriceDiscountDiscountType ¶ added in v0.2.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitPriceDiscountDiscountType string
const ( SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitPriceDiscountDiscountTypePercentage SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitPriceDiscountDiscountType = "percentage" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitPriceDiscountDiscountTypeTrial SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitPriceDiscountDiscountType = "trial" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitPriceDiscountDiscountTypeUsage SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitPriceDiscountDiscountType = "usage" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitPriceDiscountDiscountTypeAmount SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitPriceDiscountDiscountType = "amount" )
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitPriceModelType ¶
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitPriceModelType string
const (
SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitPriceModelTypeUnit SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitPriceModelType = "unit"
)
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitPriceModelType) IsKnown ¶ added in v0.24.0
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitPriceModelType) IsKnown() bool
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitPriceUnitConfig ¶
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitPriceUnitConfig struct { // Rate per unit of usage UnitAmount param.Field[string] `json:"unit_amount,required"` }
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitPriceUnitConfig) MarshalJSON ¶
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitPriceUnitConfig) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithPercentPrice ¶ added in v0.20.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithPercentPrice struct { ID param.Field[string] `json:"id,required"` ModelType param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithPercentPriceModelType] `json:"model_type,required"` UnitWithPercentConfig param.Field[map[string]interface{}] `json:"unit_with_percent_config,required"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` // The currency of the price. If not provided, the currency of the plan will be // used. Currency param.Field[string] `json:"currency"` // The subscription's override discount for the plan. Discount param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithPercentPriceDiscount] `json:"discount"` // The starting quantity of the price, if the price is a fixed price. FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"` // The subscription's override maximum amount for the plan. MaximumAmount param.Field[string] `json:"maximum_amount"` // The subscription's override minimum amount for the plan. MinimumAmount param.Field[string] `json:"minimum_amount"` }
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithPercentPrice) MarshalJSON ¶ added in v0.20.0
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithPercentPrice) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithPercentPriceDiscount ¶ added in v0.20.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithPercentPriceDiscount struct { DiscountType param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithPercentPriceDiscountDiscountType] `json:"discount_type,required"` // Only available if discount_type is `amount`. AmountDiscount param.Field[string] `json:"amount_discount"` // 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"` // 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 `trial` TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount param.Field[float64] `json:"usage_discount"` }
The subscription's override discount for the plan.
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithPercentPriceDiscount) MarshalJSON ¶ added in v0.20.0
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithPercentPriceDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithPercentPriceDiscountDiscountType ¶ added in v0.20.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithPercentPriceDiscountDiscountType string
const ( SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithPercentPriceDiscountDiscountTypePercentage SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithPercentPriceDiscountDiscountType = "percentage" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithPercentPriceDiscountDiscountTypeTrial SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithPercentPriceDiscountDiscountType = "trial" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithPercentPriceDiscountDiscountTypeUsage SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithPercentPriceDiscountDiscountType = "usage" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithPercentPriceDiscountDiscountTypeAmount SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithPercentPriceDiscountDiscountType = "amount" )
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithPercentPriceModelType ¶ added in v0.20.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithPercentPriceModelType string
const (
SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithPercentPriceModelTypeUnitWithPercent SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithPercentPriceModelType = "unit_with_percent"
)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithProrationPrice ¶ added in v0.60.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithProrationPrice struct { ID param.Field[string] `json:"id,required"` ModelType param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithProrationPriceModelType] `json:"model_type,required"` UnitWithProrationConfig param.Field[map[string]interface{}] `json:"unit_with_proration_config,required"` // The per unit conversion rate of the price currency to the invoicing currency. ConversionRate param.Field[float64] `json:"conversion_rate"` // The currency of the price. If not provided, the currency of the plan will be // used. Currency param.Field[string] `json:"currency"` // The subscription's override discount for the plan. Discount param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithProrationPriceDiscount] `json:"discount"` // The starting quantity of the price, if the price is a fixed price. FixedPriceQuantity param.Field[float64] `json:"fixed_price_quantity"` // The subscription's override maximum amount for the plan. MaximumAmount param.Field[string] `json:"maximum_amount"` // The subscription's override minimum amount for the plan. MinimumAmount param.Field[string] `json:"minimum_amount"` }
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithProrationPrice) MarshalJSON ¶ added in v0.60.0
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithProrationPrice) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithProrationPriceDiscount ¶ added in v0.60.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithProrationPriceDiscount struct { DiscountType param.Field[SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithProrationPriceDiscountDiscountType] `json:"discount_type,required"` // Only available if discount_type is `amount`. AmountDiscount param.Field[string] `json:"amount_discount"` // 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"` // 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 `trial` TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount param.Field[float64] `json:"usage_discount"` }
The subscription's override discount for the plan.
func (SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithProrationPriceDiscount) MarshalJSON ¶ added in v0.60.0
func (r SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithProrationPriceDiscount) MarshalJSON() (data []byte, err error)
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithProrationPriceDiscountDiscountType ¶ added in v0.60.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithProrationPriceDiscountDiscountType string
const ( SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithProrationPriceDiscountDiscountTypePercentage SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithProrationPriceDiscountDiscountType = "percentage" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithProrationPriceDiscountDiscountTypeTrial SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithProrationPriceDiscountDiscountType = "trial" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithProrationPriceDiscountDiscountTypeUsage SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithProrationPriceDiscountDiscountType = "usage" SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithProrationPriceDiscountDiscountTypeAmount SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithProrationPriceDiscountDiscountType = "amount" )
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithProrationPriceModelType ¶ added in v0.60.0
type SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithProrationPriceModelType string
const (
SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithProrationPriceModelTypeUnitWithProration SubscriptionSchedulePlanChangeParamsPriceOverridesOverrideUnitWithProrationPriceModelType = "unit_with_proration"
)
type SubscriptionService ¶
type SubscriptionService struct {
Options []option.RequestOption
}
SubscriptionService contains methods and other services that help with interacting with the orb API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSubscriptionService method instead.
func NewSubscriptionService ¶
func NewSubscriptionService(opts ...option.RequestOption) (r *SubscriptionService)
NewSubscriptionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*SubscriptionService) Cancel ¶
func (r *SubscriptionService) Cancel(ctx context.Context, subscriptionID string, body SubscriptionCancelParams, opts ...option.RequestOption) (res *Subscription, err error)
This endpoint can be used to cancel an existing subscription. It returns the serialized subscription object with an `end_date` parameter that signifies when the subscription will transition to an ended state.
The body parameter `cancel_option` determines the cancellation behavior. Orb supports three cancellation options:
`end_of_subscription_term`: stops the subscription from auto-renewing. Subscriptions that have been cancelled with this option can still incur charges for the remainder of their term:
Issuing this cancellation request for a monthly subscription will keep the subscription active until the start of the subsequent month, and potentially issue an invoice for any usage charges incurred in the intervening period.
Issuing this cancellation request for a quarterly subscription will keep the subscription active until the end of the quarter and potentially issue an invoice for any usage charges incurred in the intervening period.
Issuing this cancellation request for a yearly subscription will keep the subscription active for the full year. For example, a yearly subscription starting on 2021-11-01 and cancelled on 2021-12-08 will remain active until 2022-11-01 and potentially issue charges in the intervening months for any recurring monthly usage charges in its plan.
**Note**: If a subscription's plan contains prices with difference cadences, the end of term date will be determined by the largest cadence value. For example, cancelling end of term for a subscription with a quarterly fixed fee with a monthly usage fee will result in the subscription ending at the end of the quarter.
`immediate`: ends the subscription immediately, setting the `end_date` to the current time:
Subscriptions that have been cancelled with this option will be invoiced immediately. This invoice will include any usage fees incurred in the billing period up to the cancellation, along with any prorated recurring fees for the billing period, if applicable.
**Note**: If the subscription has a recurring fee that was paid in-advance, the prorated amount for the remaining time period will be added to the [customer's balance](list-balance-transactions) upon immediate cancellation. However, if the customer is ineligible to use the customer balance, the subscription cannot be cancelled immediately.
`requested_date`: ends the subscription on a specified date, which requires a `cancellation_date` to be passed in. If no timezone is provided, the customer's timezone is used. For example, a subscription starting on January 1st with a monthly price can be set to be cancelled on the first of any month after January 1st (e.g. March 1st, April 1st, May 1st). A subscription with multiple prices with different cadences defines the "term" to be the highest cadence of the prices.
Upcoming subscriptions are only eligible for immediate cancellation, which will set the `end_date` equal to the `start_date` upon cancellation.
## Backdated cancellations
Orb allows you to cancel a subscription in the past as long as there are no paid invoices between the `requested_date` and the current time. If the cancellation is after the latest issued invoice, Orb will generate a balance refund for the current period. If the cancellation is before the most recently issued invoice, Orb will void the intervening invoice and generate a new one based on the new dates for the subscription. See the section on [cancellation behaviors](../guides/product-catalog/creating-subscriptions.md#cancellation-behaviors).
func (*SubscriptionService) Fetch ¶
func (r *SubscriptionService) Fetch(ctx context.Context, subscriptionID string, opts ...option.RequestOption) (res *Subscription, err error)
This endpoint is used to fetch a Subscription(../guides/concepts#subscription) given an identifier.
func (*SubscriptionService) FetchCosts ¶
func (r *SubscriptionService) FetchCosts(ctx context.Context, subscriptionID string, query SubscriptionFetchCostsParams, opts ...option.RequestOption) (res *SubscriptionFetchCostsResponse, err error)
This endpoint is used to fetch a day-by-day snapshot of a subscription's costs in Orb, calculated by applying pricing information to the underlying usage (see the [subscription usage endpoint](fetch-subscription-usage) to fetch usage per metric, in usage units rather than a currency).
The semantics of this endpoint exactly mirror those of [fetching a customer's costs](fetch-customer-costs). Use this endpoint to limit your analysis of costs to a specific subscription for the customer (e.g. to de-aggregate costs when a customer's subscription has started and stopped on the same day).
func (*SubscriptionService) FetchSchedule ¶
func (r *SubscriptionService) FetchSchedule(ctx context.Context, subscriptionID string, query SubscriptionFetchScheduleParams, opts ...option.RequestOption) (res *pagination.Page[SubscriptionFetchScheduleResponse], err error)
This endpoint returns a [paginated](../reference/pagination) list of all plans associated with a subscription along with their start and end dates. This list contains the subscription's initial plan along with past and future plan changes.
func (*SubscriptionService) FetchScheduleAutoPaging ¶
func (r *SubscriptionService) FetchScheduleAutoPaging(ctx context.Context, subscriptionID string, query SubscriptionFetchScheduleParams, opts ...option.RequestOption) *pagination.PageAutoPager[SubscriptionFetchScheduleResponse]
This endpoint returns a [paginated](../reference/pagination) list of all plans associated with a subscription along with their start and end dates. This list contains the subscription's initial plan along with past and future plan changes.
func (*SubscriptionService) FetchUsage ¶
func (r *SubscriptionService) FetchUsage(ctx context.Context, subscriptionID string, query SubscriptionFetchUsageParams, opts ...option.RequestOption) (res *SubscriptionUsage, err error)
This endpoint is used to fetch a subscription's usage in Orb. Especially when combined with optional query parameters, this endpoint is a powerful way to build visualizations on top of Orb's event data and metrics.
With no query parameters specified, this endpoint returns usage for the subscription's _current billing period_ across each billable metric that participates in the subscription. Usage quantities returned are the result of evaluating the metric definition for the entirety of the customer's billing period.
### Default response shape
Orb returns a `data` array with an object corresponding to each billable metric. Nested within this object is a `usage` array which has a `quantity` value and a corresponding `timeframe_start` and `timeframe_end`. The `quantity` value represents the calculated usage value for the billable metric over the specified timeframe (inclusive of the `timeframe_start` timestamp and exclusive of the `timeframe_end` timestamp).
Orb will include _every_ window in the response starting from the beginning of the billing period, even when there were no events (and therefore no usage) in the window. This increases the size of the response but prevents the caller from filling in gaps and handling cumbersome time-based logic.
The query parameters in this endpoint serve to override this behavior and provide some key functionality, as listed below. Note that this functionality can also be used _in conjunction_ with each other, e.g. to display grouped usage on a custom timeframe.
## Custom timeframe
In order to view usage for a custom timeframe rather than the current billing period, specify a `timeframe_start` and `timeframe_end`. This will calculate quantities for usage incurred between timeframe_start (inclusive) and timeframe_end (exclusive), i.e. `[timeframe_start, timeframe_end)`.
Note:
- These timestamps must be specified in ISO 8601 format and UTC timezone, e.g. `2022-02-01T05:00:00Z`.
- Both parameters must be specified if either is specified.
## Grouping by custom attributes
In order to view a single metric grouped by a specific _attribute_ that each event is tagged with (e.g. `cluster`), you must additionally specify a `billable_metric_id` and a `group_by` key. The `group_by` key denotes the event property on which to group.
When returning grouped usage, only usage for `billable_metric_id` is returned, and a separate object in the `data` array is returned for each value of the `group_by` key present in your events. The `quantity` value is the result of evaluating the billable metric for events filtered to a single value of the `group_by` key.
Orb expects that events that match the billable metric will contain values in the `properties` dictionary that correspond to the `group_by` key specified. By default, Orb will not return a `null` group (i.e. events that match the metric but do not have the key set). Currently, it is only possible to view usage grouped by a single attribute at a time.
When viewing grouped usage, Orb uses pagination to limit the response size to 1000 groups by default. If there are more groups for a given subscription, pagination metadata in the response can be used to fetch all of the data.
The following example shows usage for an "API Requests" billable metric grouped by `region`. Note the extra `metric_group` dictionary in the response, which provides metadata about the group:
```json
{ "data": [ { "usage": [ { "quantity": 0.19291, "timeframe_start": "2021-10-01T07:00:00Z", "timeframe_end": "2021-10-02T07:00:00Z", }, ... ], "metric_group": { "property_key": "region", "property_value": "asia/pacific" }, "billable_metric": { "id": "Fe9pbpMk86xpwdGB", "name": "API Requests" }, "view_mode": "periodic" }, ... ] }
```
## Windowed usage
The `granularity` parameter can be used to _window_ the usage `quantity` value into periods. When not specified, usage is returned for the entirety of the time range.
When `granularity = day` is specified with a timeframe longer than a day, Orb will return a `quantity` value for each full day between `timeframe_start` and `timeframe_end`. Note that the days are demarcated by the _customer's local midnight_.
For example, with `timeframe_start = 2022-02-01T05:00:00Z`, `timeframe_end = 2022-02-04T01:00:00Z` and `granularity=day`, the following windows will be returned for a customer in the `America/Los_Angeles` timezone since local midnight is `08:00` UTC:
- `[2022-02-01T05:00:00Z, 2022-02-01T08:00:00Z)` - `[2022-02-01T08:00:00, 2022-02-02T08:00:00Z)` - `[2022-02-02T08:00:00, 2022-02-03T08:00:00Z)` - `[2022-02-03T08:00:00, 2022-02-04T01:00:00Z)`
```json
{ "data": [ { "billable_metric": { "id": "Q8w89wjTtBdejXKsm", "name": "API Requests" }, "usage": [ { "quantity": 0, "timeframe_end": "2022-02-01T08:00:00+00:00", "timeframe_start": "2022-02-01T05:00:00+00:00" }, { "quantity": 0, "timeframe_end": "2022-02-02T08:00:00+00:00", "timeframe_start": "2022-02-01T08:00:00+00:00" }, { "quantity": 0, "timeframe_end": "2022-02-03T08:00:00+00:00", "timeframe_start": "2022-02-02T08:00:00+00:00" }, { "quantity": 0, "timeframe_end": "2022-02-04T01:00:00+00:00", "timeframe_start": "2022-02-03T08:00:00+00:00" } ], "view_mode": "periodic" }, ... ] }
```
## Decomposable vs. non-decomposable metrics
Billable metrics fall into one of two categories: decomposable and non-decomposable. A decomposable billable metric, such as a sum or a count, can be displayed and aggregated across arbitrary timescales. On the other hand, a non-decomposable metric is not meaningful when only a slice of the billing window is considered.
As an example, if we have a billable metric that's defined to count unique users, displaying a graph of unique users for each day is not representative of the billable metric value over the month (days could have an overlapping set of 'unique' users). Instead, what's useful for any given day is the number of unique users in the billing period so far, which are the _cumulative_ unique users.
Accordingly, this endpoint returns treats these two types of metrics differently when `group_by` is specified:
- Decomposable metrics can be grouped by any event property.
- Non-decomposable metrics can only be grouped by the corresponding price's invoice grouping key. If no invoice grouping key is present, the metric does not support `group_by`.
## Matrix prices
When a billable metric is attached to a price that uses matrix pricing, it's important to view usage grouped by those matrix dimensions. In this case, use the query parameters `first_dimension_key`, `first_dimension_value` and `second_dimension_key`, `second_dimension_value` while filtering to a specific `billable_metric_id`.
For example, if your compute metric has a separate unit price (i.e. a matrix pricing model) per `region` and `provider`, your request might provide the following parameters:
- `first_dimension_key`: `region` - `first_dimension_value`: `us-east-1` - `second_dimension_key`: `provider` - `second_dimension_value`: `aws`
func (*SubscriptionService) List ¶
func (r *SubscriptionService) List(ctx context.Context, query SubscriptionListParams, opts ...option.RequestOption) (res *pagination.Page[Subscription], err error)
This endpoint returns a list of all subscriptions for an account as a [paginated](../reference/pagination) list, ordered starting from the most recently created subscription. For a full discussion of the subscription resource, see Subscription(../guides/concepts#subscription).
Subscriptions can be filtered for a specific customer by using either the customer_id or external_customer_id query parameters. To filter subscriptions for multiple customers, use the customer_id[] or external_customer_id[] query parameters.
func (*SubscriptionService) ListAutoPaging ¶
func (r *SubscriptionService) ListAutoPaging(ctx context.Context, query SubscriptionListParams, opts ...option.RequestOption) *pagination.PageAutoPager[Subscription]
This endpoint returns a list of all subscriptions for an account as a [paginated](../reference/pagination) list, ordered starting from the most recently created subscription. For a full discussion of the subscription resource, see Subscription(../guides/concepts#subscription).
Subscriptions can be filtered for a specific customer by using either the customer_id or external_customer_id query parameters. To filter subscriptions for multiple customers, use the customer_id[] or external_customer_id[] query parameters.
func (*SubscriptionService) New ¶
func (r *SubscriptionService) New(ctx context.Context, body SubscriptionNewParams, opts ...option.RequestOption) (res *Subscription, err error)
A subscription represents the purchase of a plan by a customer. The customer is identified by either the `customer_id` or the `external_customer_id`, and exactly one of these fields must be provided.
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.
The default configuration for subscriptions in Orb is **In-advance billing** and **Beginning of month alignment** (see Subscription(../guides/concepts#subscription) for more details).
In order to change the alignment behavior, Orb also supports billing subscriptions on the day of the month they are created. If `align_billing_with_subscription_start_date = true` is specified, subscriptions have billing cycles that are aligned with their `start_date`. For example, a subscription that begins on January 15th will have a billing cycle from January 15th to February 15th. Every subsequent billing cycle will continue to start and invoice on the 15th.
If the "day" value is greater than the number of days in the month, the next billing cycle will start at the end of the month. For example, if the start_date is January 31st, the next billing cycle will start on February 28th.
If a customer was created with a currency, Orb only allows subscribing the customer to a plan with a matching `invoicing_currency`. If the customer does not have a currency set, on subscription creation, we set the customer's currency to be the `invoicing_currency` of the plan.
## Price overrides
Price overrides are used to update some or all prices in a plan for the specific subscription being created. This is useful when a new customer has negotiated one or more different prices for a specific plan than the plan's default prices. Any type of price can be overridden, if the correct data is provided. The billable metric, cadence, type, and name of a price can not be overridden.
To override prices, provide a list of objects with the key `price_overrides`. The price object in the list of overrides is expected to contain the existing price id, the `model_type` and config value in the format below. The specific numerical values can be updated, but the config value and `model_type` must match the existing price that is being overridden
### Request format for price overrides
Orb supports a few different pricing models out of the box. The `model_type` field determines the key for the configuration object that is present.
### Unit pricing
With unit pricing, each unit costs a fixed amount.
```json
{ ... "id": "price_id", "model_type": "unit", "unit_config": { "unit_amount": "0.50" } ... }
```
### Tiered pricing
In tiered pricing, the cost of a given unit depends on the tier range that it falls into, where each tier range is defined by an upper and lower bound. For example, the first ten units may cost $0.50 each and all units thereafter may cost $0.10 each. Tiered prices can be overridden with a new number of tiers or new values for `first_unit`, `last_unit`, or `unit_amount`.
```json
{ ... "id": "price_id", "model_type": "tiered", "tiered_config": { "tiers": [ { "first_unit":"1", "last_unit": "11", "unit_amount": "0.50" }, { "first_unit": "11", "last_unit": null, "unit_amount": "0.10" } ] } ... }
```
### Bulk pricing
Bulk pricing applies when the number of units determine the cost of _all_ units. For example, if you've bought less than 10 units, they may each be $0.50 for a total of $5.00. Once you've bought more than 10 units, all units may now be priced at $0.40 (i.e. 101 units total would be $40.40). Bulk prices can be overridden with a new number of tiers or new values for `maximum_units`, or `unit_amount`.
```json
{ ... "id": "price_id", "model_type": "bulk", "bulk_config": { "tiers": [ { "maximum_units": "10", "unit_amount": "0.50" }, { "maximum_units": "1000", "unit_amount": "0.40" } ] } ... }
```
### Package pricing
Package pricing defines the size or granularity of a unit for billing purposes. For example, if the package size is set to 5, then 4 units will be billed as 5 and 6 units will be billed at 10.
```json
{ ... "id": "price_id", "model_type": "package", "package_config": { "package_amount": "0.80", "package_size": 10 } ... }
```
### BPS pricing
BPS pricing specifies a per-event (e.g. per-payment) rate in one hundredth of a percent (the number of basis points to charge), as well as a cap per event to assess. For example, this would allow you to assess a fee of 0.25% on every payment you process, with a maximum charge of $25 per payment.
```json
{ ... "id": "price_id" "model_type": "bps", "bps_config": { "bps": 125, "per_event_cap": "11.00" } ... }
```
### Bulk BPS pricing
Bulk BPS pricing specifies BPS parameters in a tiered manner, dependent on the total quantity across all events. Similar to bulk pricing, the BPS parameters of a given event depends on the tier range that the billing period falls into. Each tier range is defined by an upper and lower bound. For example, after $1.5M of payment volume is reached, each individual payment may have a lower cap or a smaller take-rate.
```json
{ ... "id": "price_id" "model_type": "bulk_bps", "bulk_bps_config": { "tiers": [ { "minimum_amount": "0.00", "maximum_amount": "1000000.00", "bps": 125, "per_event_cap": "19.00" }, { "minimum_amount":"1000000.00", "maximum_amount": null, "bps": 115, "per_event_cap": "4.00" } ] }
... } ```
### Tiered BPS pricing
Tiered BPS pricing specifies BPS parameters in a graduated manner, where an event's applicable parameter is a function of its marginal addition to the period total. Similar to tiered pricing, the BPS parameters of a given event depends on the tier range that it falls into, where each tier range is defined by an upper and lower bound. For example, the first few payments may have a 0.8 BPS take-rate and all payments after a specific volume may incur a take-rate of 0.5 BPS each.
```json
{ ... "id": "price_id" "model_type": "tiered_bps", "tiered_bps_config": { "tiers": [ { "minimum_amount": "0.00", "maximum_amount": "1000000.00", "bps": 125, "per_event_cap": "19.00" }, { "minimum_amount":"1000000", "maximum_amount": null, "bps": 115, "per_event_cap": "4.00" } ] } ... }
```
### Matrix pricing
Matrix pricing defines a set of unit prices in a one or two-dimensional matrix. `dimensions` defines the two event property values evaluated in this pricing model. In a one-dimensional matrix, the second value is `null`. Every configuration has a list of `matrix_values` which give the unit prices for specified property values. In a one-dimensional matrix, the matrix values will have `dimension_values` where the second value of the pair is null. If an event does not match any of the dimension values in the matrix, it will resort to the `default_unit_amount`.
```json
{ ... "model_type": "matrix", "matrix_config": { "default_unit_amount": "3.00", "dimensions": [ "cluster_name", "region" ], "matrix_values": [ { "dimension_values": [ "alpha", "west" ], "unit_amount": "2.00" }, ... ] } }
```
### Fixed fees
Fixed fees follow unit pricing, and also have an additional parameter `fixed_price_quantity` that indicates how many of a fixed fee that should be applied for a subscription. This parameter defaults to 1.
```json
{ ... "id": "price_id", "model_type": "unit", "unit_config": { "unit_amount": "2.00" }, "fixed_price_quantity": 3.0 ... }
```
## Maximums and Minimums
Minimums and maximums, much like price overrides, can be useful when a new customer has negotiated a new or different minimum or maximum spend cap than the default for a given price. If one exists for a price and null is provided for the minimum/maximum override on creation, then there will be no minimum/maximum on the new subscription. If no value is provided, then the default price maximum or minimum is used.
To add a minimum for a specific price, add `minimum_amount` to the specific price in the `price_overrides` object.
To add a maximum for a specific price, add `maximum_amount` to the specific price in the `price_overrides` object.
### Minimum override example
Price minimum override example:
```json
{ ... "id": "price_id", "model_type": "unit", "unit_config": { "unit_amount": "0.50" }, "minimum_amount": "100.00" ... }
```
Removing an existing minimum example ¶
```json
{ ... "id": "price_id", "model_type": "unit", "unit_config": { "unit_amount": "0.50" }, "minimum_amount": null ... }
```
## Discounts
Discounts, like price overrides, can be useful when a new customer has negotiated a new or different discount than the default for a price. A single price price can have at most one discount. If a discount exists for a price and a null discount is provided on creation, then there will be no discount on the new subscription.
To add a discount for a specific price, add `discount` to the price in the `price_overrides` object. Discount should be a dictionary of the format:
```ts
{ "discount_type": "amount" | "percentage" | "usage", "amount_discount": string, "percentage_discount": string, "usage_discount": string }
```
where either `amount_discount`, `percentage_discount`, or `usage_discount` is provided.
Price discount example ¶
```json
{ ... "id": "price_id", "model_type": "unit", "unit_config": { "unit_amount": "0.50" }, "discount": {"discount_type": "amount", "amount_discount": "175"}, }
```
Removing an existing discount example ¶
```json
{ "customer_id": "customer_id", "plan_id": "plan_id", "discount": null, "price_overrides": [ ... ] ... }
```
## Threshold Billing
Orb supports invoicing for a subscription when a preconfigured usage threshold is hit. To enable threshold billing, pass in an `invoicing_threshold`, which is specified in the subscription's invoicing currency, when creating a subscription. E.g. pass in `10.00` to issue an invoice when usage amounts hit $10.00 for a subscription that invoices in USD.
func (*SubscriptionService) PriceIntervals ¶
func (r *SubscriptionService) PriceIntervals(ctx context.Context, subscriptionID string, body SubscriptionPriceIntervalsParams, opts ...option.RequestOption) (res *Subscription, err error)
This endpoint is used to add and edit subscription [price intervals](../reference/price-interval). By making modifications to a subscription’s price intervals, you can [flexibly and atomically control the billing behavior of a subscription](../guides/product-catalog/modifying-subscriptions).
## Adding price intervals
Prices can be added as price intervals to a subscription by specifying them in the `add` array. A `price_id` or `external_price_id` from an add-on price or previously removed plan price can be specified to reuse an existing price definition (however, please note that prices from other plans cannot be added to the subscription). Additionally, a new price can be specified using the `price` field — this price will be created automatically.
A `start_date` must be specified for the price interval. This is the date when the price will start billing on the subscription, so this will notably result in an immediate charge at this time for any billed in advance fixed fees. The `end_date` will default to null, resulting in a price interval that will bill on a continually recurring basis. Both of these dates can be set in the past or the future and Orb will generate or modify invoices to ensure the subscription’s invoicing behavior is correct.
Additionally, a discount, minimum, or maximum can be specified on the price interval. This will only apply to this price interval, not any other price intervals on the subscription.
## Adjustment intervals
An adjustment interval represents the time period that a particular adjustment (a discount, minimum, or maximum) applies to the prices on a subscription. Adjustment intervals can be added to a subscription by specifying them in the `add_adjustments` array, or modified via the `edit_adjustments` array. When creating an adjustment interval, you'll need to provide the definition of the new adjustment (the type of adjustment, and which prices it applies to), as well as the start and end dates for the adjustment interval. The start and end dates of an existing adjustment interval can be edited via the `edit_adjustments` field (just like price intervals). (To "change" the amount of a discount, minimum, or maximum, then, you'll need to end the existing interval, and create a new adjustment interval with the new amount and a start date that matches the end date of the previous interval.)
## Editing price intervals
Price intervals can be adjusted by specifying edits to make in the `edit` array. A `price_interval_id` to edit must be specified — this can be retrieved from the `price_intervals` field on the subscription.
A new `start_date` or `end_date` can be specified to change the range of the price interval, which will modify past or future invoices to ensure correctness. If either of these dates are unspecified, they will default to the existing date on the price interval. To remove a price interval entirely from a subscription, set the `end_date` to be equivalent to the `start_date`.
## Fixed fee quantity transitions
The fixed fee quantity transitions for a fixed fee price interval can also be specified when adding or editing by passing an array for `fixed_fee_quantity_transitions`. A fixed fee quantity transition must have a `quantity` and an `effective_date`, which is the date after which the new quantity will be used for billing. If a fixed fee quantity transition is scheduled at a billing period boundary, the full quantity will be billed on an invoice with the other prices on the subscription. If the fixed fee quantity transition is scheduled mid-billing period, the difference between the existing quantity and quantity specified in the transition will be prorated for the rest of the billing period and billed immediately, which will generate a new invoice.
Notably, the list of fixed fee quantity transitions passed will overwrite the existing fixed fee quantity transitions on the price interval, so the entire list of transitions must be specified to add additional transitions. The existing list of transitions can be retrieved using the `fixed_fee_quantity_transitions` property on a subscription’s serialized price intervals.
func (*SubscriptionService) SchedulePlanChange ¶
func (r *SubscriptionService) SchedulePlanChange(ctx context.Context, subscriptionID string, body SubscriptionSchedulePlanChangeParams, opts ...option.RequestOption) (res *Subscription, err error)
This endpoint can be used to change the plan on an existing subscription. It returns the serialized updated subscription object.
The body parameter `change_option` determines the timing of the plan change. Orb supports three options:
- `end_of_subscription_term`: changes the plan at the end of the existing plan's term.
- Issuing this plan change request for a monthly subscription will keep the existing plan active until the start of the subsequent month, and potentially issue an invoice for any usage charges incurred in the intervening period.
- Issuing this plan change request for a yearly subscription will keep the existing plan active for the full year.
- `immediate`: changes the plan immediately. Subscriptions that have their plan changed with this option will be invoiced immediately. This invoice will include any usage fees incurred in the billing period up to the change, along with any prorated recurring fees for the billing period, if applicable.
- `requested_date`: changes the plan on the requested date (`change_date`). If no timezone is provided, the customer's timezone is used. The `change_date` body parameter is required if this option is chosen.
Note that one of `plan_id` or `external_plan_id` is required in the request body for this operation.
## Price overrides, maximums, and minimums
Price overrides are used to update some or all prices in the target plan. Minimums and maximums, much like price overrides, can be useful when a new customer has negotiated a new or different minimum or maximum spend cap than the default for the plan. The request format for price overrides, maximums, and minimums are the same as those in [subscription creation](create-subscription).
## Scheduling multiple plan changes
When scheduling multiple plan changes with the same date, the latest plan change on that day takes effect.
## Prorations for in-advance fees
By default, Orb calculates the prorated difference in any fixed fees when making a plan change, adjusting the customer balance as needed. For details on this behavior, see [Modifying subscriptions](../guides/product-catalog/modifying-subscriptions.md#prorations-for-in-advance-fees).
func (*SubscriptionService) TriggerPhase ¶
func (r *SubscriptionService) TriggerPhase(ctx context.Context, subscriptionID string, body SubscriptionTriggerPhaseParams, opts ...option.RequestOption) (res *Subscription, err error)
Manually trigger a phase, effective the given date (or the current time, if not specified).
func (*SubscriptionService) UnscheduleCancellation ¶
func (r *SubscriptionService) UnscheduleCancellation(ctx context.Context, subscriptionID string, opts ...option.RequestOption) (res *Subscription, err error)
This endpoint can be used to unschedule any pending cancellations for a subscription.
To be eligible, the subscription must currently be active and have a future cancellation. This operation will turn on auto-renew, ensuring that the subscription does not end at the currently scheduled cancellation time.
func (*SubscriptionService) UnscheduleFixedFeeQuantityUpdates ¶
func (r *SubscriptionService) UnscheduleFixedFeeQuantityUpdates(ctx context.Context, subscriptionID string, body SubscriptionUnscheduleFixedFeeQuantityUpdatesParams, opts ...option.RequestOption) (res *Subscription, err error)
This endpoint can be used to clear scheduled updates to the quantity for a fixed fee.
If there are no updates scheduled, a request validation error will be returned with a 400 status code.
func (*SubscriptionService) UnschedulePendingPlanChanges ¶
func (r *SubscriptionService) UnschedulePendingPlanChanges(ctx context.Context, subscriptionID string, opts ...option.RequestOption) (res *Subscription, err error)
This endpoint can be used to unschedule any pending plan changes on an existing subscription.
func (*SubscriptionService) Update ¶ added in v0.25.0
func (r *SubscriptionService) Update(ctx context.Context, subscriptionID string, body SubscriptionUpdateParams, opts ...option.RequestOption) (res *Subscription, err error)
This endpoint can be used to update the `metadata`, `net terms`, `auto_collection`, `invoicing_threshold`, and `default_invoice_memo` properties on a subscription.
func (*SubscriptionService) UpdateFixedFeeQuantity ¶
func (r *SubscriptionService) UpdateFixedFeeQuantity(ctx context.Context, subscriptionID string, body SubscriptionUpdateFixedFeeQuantityParams, opts ...option.RequestOption) (res *Subscription, err error)
This endpoint can be used to update the quantity for a fixed fee.
To be eligible, the subscription must currently be active and the price specified must be a fixed fee (not usage-based). This operation will immediately update the quantity for the fee, or if a `effective_date` is passed in, will update the quantity on the requested date at midnight in the customer's timezone.
In order to change the fixed fee quantity as of the next draft invoice for this subscription, pass `change_option=upcoming_invoice` without an `effective_date` specified.
If the fee is an in-advance fixed fee, it will also issue an immediate invoice for the difference for the remainder of the billing period.
type SubscriptionStatus ¶
type SubscriptionStatus string
const ( SubscriptionStatusActive SubscriptionStatus = "active" SubscriptionStatusEnded SubscriptionStatus = "ended" SubscriptionStatusUpcoming SubscriptionStatus = "upcoming" )
func (SubscriptionStatus) IsKnown ¶ added in v0.24.0
func (r SubscriptionStatus) IsKnown() bool
type SubscriptionTrialInfo ¶
type SubscriptionTrialInfo struct { EndDate time.Time `json:"end_date,required,nullable" format:"date-time"` JSON subscriptionTrialInfoJSON `json:"-"` }
func (*SubscriptionTrialInfo) UnmarshalJSON ¶
func (r *SubscriptionTrialInfo) UnmarshalJSON(data []byte) (err error)
type SubscriptionTriggerPhaseParams ¶
type SubscriptionTriggerPhaseParams struct { // The date on which the phase change should take effect. If not provided, defaults // to today in the customer's timezone. EffectiveDate param.Field[time.Time] `json:"effective_date" format:"date"` }
func (SubscriptionTriggerPhaseParams) MarshalJSON ¶
func (r SubscriptionTriggerPhaseParams) MarshalJSON() (data []byte, err error)
type SubscriptionUnscheduleFixedFeeQuantityUpdatesParams ¶
type SubscriptionUnscheduleFixedFeeQuantityUpdatesParams struct { // Price for which the updates should be cleared. Must be a fixed fee. PriceID param.Field[string] `json:"price_id,required"` }
func (SubscriptionUnscheduleFixedFeeQuantityUpdatesParams) MarshalJSON ¶
func (r SubscriptionUnscheduleFixedFeeQuantityUpdatesParams) MarshalJSON() (data []byte, err error)
type SubscriptionUpdateFixedFeeQuantityParams ¶
type SubscriptionUpdateFixedFeeQuantityParams struct { // Price for which the quantity should be updated. Must be a fixed fee. PriceID param.Field[string] `json:"price_id,required"` Quantity param.Field[float64] `json:"quantity,required"` // Determines when the change takes effect. Note that if `effective_date` is // specified, this defaults to `effective_date`. Otherwise, this defaults to // `immediate` unless it's explicitly set to `upcoming_invoice. ChangeOption param.Field[SubscriptionUpdateFixedFeeQuantityParamsChangeOption] `json:"change_option"` // The date that the quantity change should take effect, localized to the // customer's timezone. Ifthis parameter is not passed in, the quantity change is // effective according to `change_option`. EffectiveDate param.Field[time.Time] `json:"effective_date" format:"date"` }
func (SubscriptionUpdateFixedFeeQuantityParams) MarshalJSON ¶
func (r SubscriptionUpdateFixedFeeQuantityParams) MarshalJSON() (data []byte, err error)
type SubscriptionUpdateFixedFeeQuantityParamsChangeOption ¶
type SubscriptionUpdateFixedFeeQuantityParamsChangeOption string
Determines when the change takes effect. Note that if `effective_date` is specified, this defaults to `effective_date`. Otherwise, this defaults to `immediate` unless it's explicitly set to `upcoming_invoice.
const ( SubscriptionUpdateFixedFeeQuantityParamsChangeOptionImmediate SubscriptionUpdateFixedFeeQuantityParamsChangeOption = "immediate" SubscriptionUpdateFixedFeeQuantityParamsChangeOptionUpcomingInvoice SubscriptionUpdateFixedFeeQuantityParamsChangeOption = "upcoming_invoice" SubscriptionUpdateFixedFeeQuantityParamsChangeOptionEffectiveDate SubscriptionUpdateFixedFeeQuantityParamsChangeOption = "effective_date" )
func (SubscriptionUpdateFixedFeeQuantityParamsChangeOption) IsKnown ¶ added in v0.24.0
func (r SubscriptionUpdateFixedFeeQuantityParamsChangeOption) IsKnown() bool
type SubscriptionUpdateParams ¶ added in v0.25.0
type SubscriptionUpdateParams struct { // 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. AutoCollection param.Field[bool] `json:"auto_collection"` // Determines the default memo on this subscription's invoices. Note that if this // is not provided, it is determined by the plan configuration. DefaultInvoiceMemo param.Field[string] `json:"default_invoice_memo"` // When this subscription's accrued usage reaches this threshold, an invoice will // be issued for the subscription. If not specified, invoices will only be issued // at the end of the billing period. InvoicingThreshold param.Field[string] `json:"invoicing_threshold"` // 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"` // 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 param.Field[int64] `json:"net_terms"` }
func (SubscriptionUpdateParams) MarshalJSON ¶ added in v0.25.0
func (r SubscriptionUpdateParams) MarshalJSON() (data []byte, err error)
type SubscriptionUsage ¶
type SubscriptionUsage struct { // This field can have the runtime type of // [[]SubscriptionUsageUngroupedSubscriptionUsageData], // [[]SubscriptionUsageGroupedSubscriptionUsageData]. Data interface{} `json:"data"` PaginationMetadata shared.PaginationMetadata `json:"pagination_metadata,nullable"` JSON subscriptionUsageJSON `json:"-"` // contains filtered or unexported fields }
func (SubscriptionUsage) AsUnion ¶ added in v0.25.0
func (r SubscriptionUsage) AsUnion() SubscriptionUsageUnion
AsUnion returns a SubscriptionUsageUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are SubscriptionUsageUngroupedSubscriptionUsage, SubscriptionUsageGroupedSubscriptionUsage.
func (*SubscriptionUsage) UnmarshalJSON ¶ added in v0.25.0
func (r *SubscriptionUsage) UnmarshalJSON(data []byte) (err error)
type SubscriptionUsageGroupedSubscriptionUsage ¶
type SubscriptionUsageGroupedSubscriptionUsage struct { Data []SubscriptionUsageGroupedSubscriptionUsageData `json:"data,required"` PaginationMetadata shared.PaginationMetadata `json:"pagination_metadata,nullable"` JSON subscriptionUsageGroupedSubscriptionUsageJSON `json:"-"` }
func (*SubscriptionUsageGroupedSubscriptionUsage) UnmarshalJSON ¶
func (r *SubscriptionUsageGroupedSubscriptionUsage) UnmarshalJSON(data []byte) (err error)
type SubscriptionUsageGroupedSubscriptionUsageData ¶
type SubscriptionUsageGroupedSubscriptionUsageData struct { BillableMetric SubscriptionUsageGroupedSubscriptionUsageDataBillableMetric `json:"billable_metric,required"` MetricGroup SubscriptionUsageGroupedSubscriptionUsageDataMetricGroup `json:"metric_group,required"` Usage []SubscriptionUsageGroupedSubscriptionUsageDataUsage `json:"usage,required"` ViewMode SubscriptionUsageGroupedSubscriptionUsageDataViewMode `json:"view_mode,required"` JSON subscriptionUsageGroupedSubscriptionUsageDataJSON `json:"-"` }
func (*SubscriptionUsageGroupedSubscriptionUsageData) UnmarshalJSON ¶
func (r *SubscriptionUsageGroupedSubscriptionUsageData) UnmarshalJSON(data []byte) (err error)
type SubscriptionUsageGroupedSubscriptionUsageDataBillableMetric ¶
type SubscriptionUsageGroupedSubscriptionUsageDataBillableMetric struct { ID string `json:"id,required"` Name string `json:"name,required"` JSON subscriptionUsageGroupedSubscriptionUsageDataBillableMetricJSON `json:"-"` }
func (*SubscriptionUsageGroupedSubscriptionUsageDataBillableMetric) UnmarshalJSON ¶
func (r *SubscriptionUsageGroupedSubscriptionUsageDataBillableMetric) UnmarshalJSON(data []byte) (err error)
type SubscriptionUsageGroupedSubscriptionUsageDataMetricGroup ¶
type SubscriptionUsageGroupedSubscriptionUsageDataMetricGroup struct { PropertyKey string `json:"property_key,required"` PropertyValue string `json:"property_value,required"` JSON subscriptionUsageGroupedSubscriptionUsageDataMetricGroupJSON `json:"-"` }
func (*SubscriptionUsageGroupedSubscriptionUsageDataMetricGroup) UnmarshalJSON ¶
func (r *SubscriptionUsageGroupedSubscriptionUsageDataMetricGroup) UnmarshalJSON(data []byte) (err error)
type SubscriptionUsageGroupedSubscriptionUsageDataUsage ¶
type SubscriptionUsageGroupedSubscriptionUsageDataUsage 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 subscriptionUsageGroupedSubscriptionUsageDataUsageJSON `json:"-"` }
func (*SubscriptionUsageGroupedSubscriptionUsageDataUsage) UnmarshalJSON ¶
func (r *SubscriptionUsageGroupedSubscriptionUsageDataUsage) UnmarshalJSON(data []byte) (err error)
type SubscriptionUsageGroupedSubscriptionUsageDataViewMode ¶
type SubscriptionUsageGroupedSubscriptionUsageDataViewMode string
const ( SubscriptionUsageGroupedSubscriptionUsageDataViewModePeriodic SubscriptionUsageGroupedSubscriptionUsageDataViewMode = "periodic" SubscriptionUsageGroupedSubscriptionUsageDataViewModeCumulative SubscriptionUsageGroupedSubscriptionUsageDataViewMode = "cumulative" )
func (SubscriptionUsageGroupedSubscriptionUsageDataViewMode) IsKnown ¶ added in v0.24.0
func (r SubscriptionUsageGroupedSubscriptionUsageDataViewMode) IsKnown() bool
type SubscriptionUsageUngroupedSubscriptionUsage ¶
type SubscriptionUsageUngroupedSubscriptionUsage struct { Data []SubscriptionUsageUngroupedSubscriptionUsageData `json:"data,required"` JSON subscriptionUsageUngroupedSubscriptionUsageJSON `json:"-"` }
func (*SubscriptionUsageUngroupedSubscriptionUsage) UnmarshalJSON ¶
func (r *SubscriptionUsageUngroupedSubscriptionUsage) UnmarshalJSON(data []byte) (err error)
type SubscriptionUsageUngroupedSubscriptionUsageData ¶
type SubscriptionUsageUngroupedSubscriptionUsageData struct { BillableMetric SubscriptionUsageUngroupedSubscriptionUsageDataBillableMetric `json:"billable_metric,required"` Usage []SubscriptionUsageUngroupedSubscriptionUsageDataUsage `json:"usage,required"` ViewMode SubscriptionUsageUngroupedSubscriptionUsageDataViewMode `json:"view_mode,required"` JSON subscriptionUsageUngroupedSubscriptionUsageDataJSON `json:"-"` }
func (*SubscriptionUsageUngroupedSubscriptionUsageData) UnmarshalJSON ¶
func (r *SubscriptionUsageUngroupedSubscriptionUsageData) UnmarshalJSON(data []byte) (err error)
type SubscriptionUsageUngroupedSubscriptionUsageDataBillableMetric ¶
type SubscriptionUsageUngroupedSubscriptionUsageDataBillableMetric struct { ID string `json:"id,required"` Name string `json:"name,required"` JSON subscriptionUsageUngroupedSubscriptionUsageDataBillableMetricJSON `json:"-"` }
func (*SubscriptionUsageUngroupedSubscriptionUsageDataBillableMetric) UnmarshalJSON ¶
func (r *SubscriptionUsageUngroupedSubscriptionUsageDataBillableMetric) UnmarshalJSON(data []byte) (err error)
type SubscriptionUsageUngroupedSubscriptionUsageDataUsage ¶
type SubscriptionUsageUngroupedSubscriptionUsageDataUsage 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 subscriptionUsageUngroupedSubscriptionUsageDataUsageJSON `json:"-"` }
func (*SubscriptionUsageUngroupedSubscriptionUsageDataUsage) UnmarshalJSON ¶
func (r *SubscriptionUsageUngroupedSubscriptionUsageDataUsage) UnmarshalJSON(data []byte) (err error)
type SubscriptionUsageUngroupedSubscriptionUsageDataViewMode ¶
type SubscriptionUsageUngroupedSubscriptionUsageDataViewMode string
const ( SubscriptionUsageUngroupedSubscriptionUsageDataViewModePeriodic SubscriptionUsageUngroupedSubscriptionUsageDataViewMode = "periodic" SubscriptionUsageUngroupedSubscriptionUsageDataViewModeCumulative SubscriptionUsageUngroupedSubscriptionUsageDataViewMode = "cumulative" )
func (SubscriptionUsageUngroupedSubscriptionUsageDataViewMode) IsKnown ¶ added in v0.24.0
func (r SubscriptionUsageUngroupedSubscriptionUsageDataViewMode) IsKnown() bool
type SubscriptionUsageUnion ¶ added in v0.25.0
type SubscriptionUsageUnion interface {
// contains filtered or unexported methods
}
Union satisfied by SubscriptionUsageUngroupedSubscriptionUsage or SubscriptionUsageGroupedSubscriptionUsage.
type Subscriptions ¶
type Subscriptions struct { Data []Subscription `json:"data,required"` PaginationMetadata shared.PaginationMetadata `json:"pagination_metadata,required"` JSON subscriptionsJSON `json:"-"` }
func (*Subscriptions) UnmarshalJSON ¶
func (r *Subscriptions) UnmarshalJSON(data []byte) (err error)
type TopLevelPingResponse ¶
type TopLevelPingResponse struct { Response string `json:"response,required"` JSON topLevelPingResponseJSON `json:"-"` }
func (*TopLevelPingResponse) UnmarshalJSON ¶
func (r *TopLevelPingResponse) UnmarshalJSON(data []byte) (err error)
type TopLevelService ¶
type TopLevelService struct {
Options []option.RequestOption
}
TopLevelService contains methods and other services that help with interacting with the orb API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTopLevelService method instead.
func NewTopLevelService ¶
func NewTopLevelService(opts ...option.RequestOption) (r *TopLevelService)
NewTopLevelService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*TopLevelService) Ping ¶
func (r *TopLevelService) Ping(ctx context.Context, opts ...option.RequestOption) (res *TopLevelPingResponse, err error)
This endpoint allows you to test your connection to the Orb API and check the validity of your API key, passed in the Authorization header. This is particularly useful for checking that your environment is set up properly, and is a great choice for connectors and integrations.
This API does not have any side-effects or return any Orb resources.
type WebhookService ¶ added in v0.25.0
type WebhookService struct { Options []option.RequestOption // contains filtered or unexported fields }
WebhookService contains methods and other services that help with interacting with the Orb API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewWebhookService method instead.
func NewWebhookService ¶ added in v0.25.0
func NewWebhookService(opts ...option.RequestOption) (r *WebhookService)
NewWebhookService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*WebhookService) VerifySignature ¶ added in v0.25.0
func (r *WebhookService) VerifySignature(payload []byte, headers http.Header, secret string, now time.Time) (err error)
Validates whether or not the webhook payload was sent by Orb. Pass an empty string to use the secret defined at the client level.
An error will be raised if the webhook payload was not sent by Orb.
type WebhookVerifySignatureParams ¶ added in v0.25.0
type WebhookVerifySignatureParams struct { }
Source Files ¶
- alert.go
- aliases.go
- client.go
- coupon.go
- couponsubscription.go
- creditnote.go
- customer.go
- customerbalancetransaction.go
- customercost.go
- customercredit.go
- customercreditledger.go
- customercredittopup.go
- event.go
- eventbackfill.go
- field.go
- invoice.go
- invoicelineitem.go
- item.go
- metric.go
- plan.go
- planexternalplanid.go
- price.go
- priceexternalpriceid.go
- subscription.go
- toplevel.go
- webhook.go