Documentation ¶
Index ¶
- type AmountDiscount
- type AmountDiscountDiscountType
- type AmountDiscountParam
- type BillingCycleRelativeDate
- func (r BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsAddAdjustmentsEndDateUnion()
- func (r BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsAddAdjustmentsStartDateUnion()
- func (r BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsAddEndDateUnion()
- func (r BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsAddStartDateUnion()
- func (r BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsEditAdjustmentsEndDateUnion()
- func (r BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsEditAdjustmentsStartDateUnion()
- func (r BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsEditEndDateUnion()
- func (r BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsEditStartDateUnion()
- func (r BillingCycleRelativeDate) IsKnown() bool
- type Discount
- type DiscountDiscountType
- type DiscountParam
- type DiscountUnion
- type DiscountUnionParam
- type DiscountUsageDiscount
- type DiscountUsageDiscountDiscountType
- type DiscountUsageDiscountParam
- type InvoiceLevelDiscount
- type InvoiceLevelDiscountDiscountType
- type InvoiceLevelDiscountUnion
- type PaginationMetadata
- type PercentageDiscount
- type PercentageDiscountDiscountType
- type PercentageDiscountParam
- type TrialDiscount
- type TrialDiscountDiscountType
- type TrialDiscountParam
- type UnionBool
- type UnionFloat
- type UnionString
- type UnionTime
- func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsAddAdjustmentsEndDateUnion()
- func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsAddAdjustmentsStartDateUnion()
- func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsAddEndDateUnion()
- func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsAddStartDateUnion()
- func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsEditAdjustmentsEndDateUnion()
- func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsEditAdjustmentsStartDateUnion()
- func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsEditEndDateUnion()
- func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsEditStartDateUnion()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AmountDiscount ¶ added in v0.67.0
type AmountDiscount struct { // Only available if discount_type is `amount`. AmountDiscount string `json:"amount_discount,required"` // List of price_ids that this discount applies to. For plan/plan phase discounts, // this can be a subset of prices. AppliesToPriceIDs []string `json:"applies_to_price_ids,required"` DiscountType AmountDiscountDiscountType `json:"discount_type,required"` Reason string `json:"reason,nullable"` JSON amountDiscountJSON `json:"-"` }
func (AmountDiscount) ImplementsCouponDiscount ¶ added in v0.67.0
func (r AmountDiscount) ImplementsCouponDiscount()
func (AmountDiscount) ImplementsSharedDiscount ¶ added in v0.67.0
func (r AmountDiscount) ImplementsSharedDiscount()
func (AmountDiscount) ImplementsSharedInvoiceLevelDiscount ¶ added in v0.67.0
func (r AmountDiscount) ImplementsSharedInvoiceLevelDiscount()
func (*AmountDiscount) UnmarshalJSON ¶ added in v0.67.0
func (r *AmountDiscount) UnmarshalJSON(data []byte) (err error)
type AmountDiscountDiscountType ¶ added in v0.67.0
type AmountDiscountDiscountType string
const (
AmountDiscountDiscountTypeAmount AmountDiscountDiscountType = "amount"
)
func (AmountDiscountDiscountType) IsKnown ¶ added in v0.67.0
func (r AmountDiscountDiscountType) IsKnown() bool
type AmountDiscountParam ¶ added in v0.67.0
type AmountDiscountParam struct { // Only available if discount_type is `amount`. AmountDiscount param.Field[string] `json:"amount_discount,required"` // List of price_ids that this discount applies to. For plan/plan phase discounts, // this can be a subset of prices. AppliesToPriceIDs param.Field[[]string] `json:"applies_to_price_ids,required"` DiscountType param.Field[AmountDiscountDiscountType] `json:"discount_type,required"` Reason param.Field[string] `json:"reason"` }
func (AmountDiscountParam) ImplementsSharedDiscountUnionParam ¶ added in v0.67.0
func (r AmountDiscountParam) ImplementsSharedDiscountUnionParam()
func (AmountDiscountParam) MarshalJSON ¶ added in v0.67.0
func (r AmountDiscountParam) MarshalJSON() (data []byte, err error)
type BillingCycleRelativeDate ¶
type BillingCycleRelativeDate string
const ( BillingCycleRelativeDateStartOfTerm BillingCycleRelativeDate = "start_of_term" BillingCycleRelativeDateEndOfTerm BillingCycleRelativeDate = "end_of_term" )
func (BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsAddAdjustmentsEndDateUnion ¶ added in v0.37.1
func (r BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsAddAdjustmentsEndDateUnion()
func (BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsAddAdjustmentsStartDateUnion ¶ added in v0.37.1
func (r BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsAddAdjustmentsStartDateUnion()
func (BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsAddEndDateUnion ¶ added in v0.37.1
func (r BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsAddEndDateUnion()
func (BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsAddStartDateUnion ¶ added in v0.37.1
func (r BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsAddStartDateUnion()
func (BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsEditAdjustmentsEndDateUnion ¶ added in v0.37.1
func (r BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsEditAdjustmentsEndDateUnion()
func (BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsEditAdjustmentsStartDateUnion ¶ added in v0.37.1
func (r BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsEditAdjustmentsStartDateUnion()
func (BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsEditEndDateUnion ¶ added in v0.37.1
func (r BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsEditEndDateUnion()
func (BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsEditStartDateUnion ¶ added in v0.37.1
func (r BillingCycleRelativeDate) ImplementsSubscriptionPriceIntervalsParamsEditStartDateUnion()
func (BillingCycleRelativeDate) IsKnown ¶
func (r BillingCycleRelativeDate) IsKnown() bool
type Discount ¶
type Discount struct { DiscountType DiscountDiscountType `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 `trial` TrialAmountDiscount string `json:"trial_amount_discount,nullable"` // Only available if discount_type is `trial` TrialPercentageDiscount float64 `json:"trial_percentage_discount,nullable"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount float64 `json:"usage_discount"` // Only available if discount_type is `amount`. AmountDiscount string `json:"amount_discount"` JSON discountJSON `json:"-"` // contains filtered or unexported fields }
func (Discount) AsUnion ¶
func (r Discount) AsUnion() DiscountUnion
AsUnion returns a DiscountUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are shared.PercentageDiscount, shared.TrialDiscount, shared.DiscountUsageDiscount, shared.AmountDiscount.
func (*Discount) UnmarshalJSON ¶
type DiscountDiscountType ¶
type DiscountDiscountType string
const ( DiscountDiscountTypePercentage DiscountDiscountType = "percentage" DiscountDiscountTypeTrial DiscountDiscountType = "trial" DiscountDiscountTypeUsage DiscountDiscountType = "usage" DiscountDiscountTypeAmount DiscountDiscountType = "amount" )
func (DiscountDiscountType) IsKnown ¶
func (r DiscountDiscountType) IsKnown() bool
type DiscountParam ¶ added in v0.35.0
type DiscountParam struct { DiscountType param.Field[DiscountDiscountType] `json:"discount_type,required"` AppliesToPriceIDs param.Field[interface{}] `json:"applies_to_price_ids"` Reason param.Field[string] `json:"reason"` // 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 `trial` TrialPercentageDiscount param.Field[float64] `json:"trial_percentage_discount"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount param.Field[float64] `json:"usage_discount"` // Only available if discount_type is `amount`. AmountDiscount param.Field[string] `json:"amount_discount"` }
func (DiscountParam) ImplementsSharedDiscountUnionParam ¶ added in v0.67.0
func (r DiscountParam) ImplementsSharedDiscountUnionParam()
func (DiscountParam) MarshalJSON ¶ added in v0.35.0
func (r DiscountParam) MarshalJSON() (data []byte, err error)
type DiscountUnion ¶
type DiscountUnion interface {
}Union satisfied by shared.PercentageDiscount, shared.TrialDiscount, shared.DiscountUsageDiscount or shared.AmountDiscount.
type DiscountUnionParam ¶ added in v0.35.0
type DiscountUnionParam interface {
}Satisfied by shared.PercentageDiscountParam, shared.TrialDiscountParam, shared.DiscountUsageDiscountParam, shared.AmountDiscountParam, DiscountParam.
type DiscountUsageDiscount ¶
type DiscountUsageDiscount struct { // List of price_ids that this discount applies to. For plan/plan phase discounts, // this can be a subset of prices. AppliesToPriceIDs []string `json:"applies_to_price_ids,required"` DiscountType DiscountUsageDiscountDiscountType `json:"discount_type,required"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount float64 `json:"usage_discount,required"` Reason string `json:"reason,nullable"` JSON discountUsageDiscountJSON `json:"-"` }
func (DiscountUsageDiscount) ImplementsSharedDiscount ¶ added in v0.67.0
func (r DiscountUsageDiscount) ImplementsSharedDiscount()
func (*DiscountUsageDiscount) UnmarshalJSON ¶
func (r *DiscountUsageDiscount) UnmarshalJSON(data []byte) (err error)
type DiscountUsageDiscountDiscountType ¶
type DiscountUsageDiscountDiscountType string
const (
DiscountUsageDiscountDiscountTypeUsage DiscountUsageDiscountDiscountType = "usage"
)
func (DiscountUsageDiscountDiscountType) IsKnown ¶
func (r DiscountUsageDiscountDiscountType) IsKnown() bool
type DiscountUsageDiscountParam ¶ added in v0.35.0
type DiscountUsageDiscountParam struct { // List of price_ids that this discount applies to. For plan/plan phase discounts, // this can be a subset of prices. AppliesToPriceIDs param.Field[[]string] `json:"applies_to_price_ids,required"` DiscountType param.Field[DiscountUsageDiscountDiscountType] `json:"discount_type,required"` // Only available if discount_type is `usage`. Number of usage units that this // discount is for UsageDiscount param.Field[float64] `json:"usage_discount,required"` Reason param.Field[string] `json:"reason"` }
func (DiscountUsageDiscountParam) ImplementsSharedDiscountUnionParam ¶ added in v0.67.0
func (r DiscountUsageDiscountParam) ImplementsSharedDiscountUnionParam()
func (DiscountUsageDiscountParam) MarshalJSON ¶ added in v0.35.0
func (r DiscountUsageDiscountParam) MarshalJSON() (data []byte, err error)
type InvoiceLevelDiscount ¶ added in v0.67.0
type InvoiceLevelDiscount struct { DiscountType InvoiceLevelDiscountDiscountType `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 invoiceLevelDiscountJSON `json:"-"` // contains filtered or unexported fields }
func (InvoiceLevelDiscount) AsUnion ¶ added in v0.67.0
func (r InvoiceLevelDiscount) AsUnion() InvoiceLevelDiscountUnion
AsUnion returns a InvoiceLevelDiscountUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are shared.PercentageDiscount, shared.AmountDiscount, shared.TrialDiscount.
func (*InvoiceLevelDiscount) UnmarshalJSON ¶ added in v0.67.0
func (r *InvoiceLevelDiscount) UnmarshalJSON(data []byte) (err error)
type InvoiceLevelDiscountDiscountType ¶ added in v0.67.0
type InvoiceLevelDiscountDiscountType string
const ( InvoiceLevelDiscountDiscountTypePercentage InvoiceLevelDiscountDiscountType = "percentage" InvoiceLevelDiscountDiscountTypeAmount InvoiceLevelDiscountDiscountType = "amount" InvoiceLevelDiscountDiscountTypeTrial InvoiceLevelDiscountDiscountType = "trial" )
func (InvoiceLevelDiscountDiscountType) IsKnown ¶ added in v0.67.0
func (r InvoiceLevelDiscountDiscountType) IsKnown() bool
type InvoiceLevelDiscountUnion ¶ added in v0.67.0
type InvoiceLevelDiscountUnion interface {
}Union satisfied by shared.PercentageDiscount, shared.AmountDiscount or shared.TrialDiscount.
type PaginationMetadata ¶
type PaginationMetadata struct { HasMore bool `json:"has_more,required"` NextCursor string `json:"next_cursor,required,nullable"` JSON paginationMetadataJSON `json:"-"` }
func (*PaginationMetadata) UnmarshalJSON ¶
func (r *PaginationMetadata) UnmarshalJSON(data []byte) (err error)
type PercentageDiscount ¶ added in v0.67.0
type PercentageDiscount struct { // List of price_ids that this discount applies to. For plan/plan phase discounts, // this can be a subset of prices. AppliesToPriceIDs []string `json:"applies_to_price_ids,required"` DiscountType PercentageDiscountDiscountType `json:"discount_type,required"` // Only available if discount_type is `percentage`. This is a number between 0 // and 1. PercentageDiscount float64 `json:"percentage_discount,required"` Reason string `json:"reason,nullable"` JSON percentageDiscountJSON `json:"-"` }
func (PercentageDiscount) ImplementsCouponDiscount ¶ added in v0.67.0
func (r PercentageDiscount) ImplementsCouponDiscount()
func (PercentageDiscount) ImplementsSharedDiscount ¶ added in v0.67.0
func (r PercentageDiscount) ImplementsSharedDiscount()
func (PercentageDiscount) ImplementsSharedInvoiceLevelDiscount ¶ added in v0.67.0
func (r PercentageDiscount) ImplementsSharedInvoiceLevelDiscount()
func (*PercentageDiscount) UnmarshalJSON ¶ added in v0.67.0
func (r *PercentageDiscount) UnmarshalJSON(data []byte) (err error)
type PercentageDiscountDiscountType ¶ added in v0.67.0
type PercentageDiscountDiscountType string
const (
PercentageDiscountDiscountTypePercentage PercentageDiscountDiscountType = "percentage"
)
func (PercentageDiscountDiscountType) IsKnown ¶ added in v0.67.0
func (r PercentageDiscountDiscountType) IsKnown() bool
type PercentageDiscountParam ¶ added in v0.67.0
type PercentageDiscountParam struct { // List of price_ids that this discount applies to. For plan/plan phase discounts, // this can be a subset of prices. AppliesToPriceIDs param.Field[[]string] `json:"applies_to_price_ids,required"` DiscountType param.Field[PercentageDiscountDiscountType] `json:"discount_type,required"` // Only available if discount_type is `percentage`. This is a number between 0 // and 1. PercentageDiscount param.Field[float64] `json:"percentage_discount,required"` Reason param.Field[string] `json:"reason"` }
func (PercentageDiscountParam) ImplementsSharedDiscountUnionParam ¶ added in v0.67.0
func (r PercentageDiscountParam) ImplementsSharedDiscountUnionParam()
func (PercentageDiscountParam) MarshalJSON ¶ added in v0.67.0
func (r PercentageDiscountParam) MarshalJSON() (data []byte, err error)
type TrialDiscount ¶ added in v0.67.0
type TrialDiscount struct { // List of price_ids that this discount applies to. For plan/plan phase discounts, // this can be a subset of prices. AppliesToPriceIDs []string `json:"applies_to_price_ids,required"` DiscountType TrialDiscountDiscountType `json:"discount_type,required"` Reason string `json:"reason,nullable"` // Only available if discount_type is `trial` TrialAmountDiscount string `json:"trial_amount_discount,nullable"` // Only available if discount_type is `trial` TrialPercentageDiscount float64 `json:"trial_percentage_discount,nullable"` JSON trialDiscountJSON `json:"-"` }
func (TrialDiscount) ImplementsSharedDiscount ¶ added in v0.67.0
func (r TrialDiscount) ImplementsSharedDiscount()
func (TrialDiscount) ImplementsSharedInvoiceLevelDiscount ¶ added in v0.67.0
func (r TrialDiscount) ImplementsSharedInvoiceLevelDiscount()
func (*TrialDiscount) UnmarshalJSON ¶ added in v0.67.0
func (r *TrialDiscount) UnmarshalJSON(data []byte) (err error)
type TrialDiscountDiscountType ¶ added in v0.67.0
type TrialDiscountDiscountType string
const (
TrialDiscountDiscountTypeTrial TrialDiscountDiscountType = "trial"
)
func (TrialDiscountDiscountType) IsKnown ¶ added in v0.67.0
func (r TrialDiscountDiscountType) IsKnown() bool
type TrialDiscountParam ¶ added in v0.67.0
type TrialDiscountParam struct { // List of price_ids that this discount applies to. For plan/plan phase discounts, // this can be a subset of prices. AppliesToPriceIDs param.Field[[]string] `json:"applies_to_price_ids,required"` DiscountType param.Field[TrialDiscountDiscountType] `json:"discount_type,required"` Reason param.Field[string] `json:"reason"` // Only available if discount_type is `trial` TrialAmountDiscount param.Field[string] `json:"trial_amount_discount"` // Only available if discount_type is `trial` TrialPercentageDiscount param.Field[float64] `json:"trial_percentage_discount"` }
func (TrialDiscountParam) ImplementsSharedDiscountUnionParam ¶ added in v0.67.0
func (r TrialDiscountParam) ImplementsSharedDiscountUnionParam()
func (TrialDiscountParam) MarshalJSON ¶ added in v0.67.0
func (r TrialDiscountParam) MarshalJSON() (data []byte, err error)
type UnionBool ¶
type UnionBool bool
func (UnionBool) ImplementsEvaluatePriceGroupGroupingValuesUnion ¶
func (UnionBool) ImplementsEvaluatePriceGroupGroupingValuesUnion()
type UnionFloat ¶
type UnionFloat float64
func (UnionFloat) ImplementsEvaluatePriceGroupGroupingValuesUnion ¶
func (UnionFloat) ImplementsEvaluatePriceGroupGroupingValuesUnion()
type UnionString ¶
type UnionString string
func (UnionString) ImplementsEvaluatePriceGroupGroupingValuesUnion ¶
func (UnionString) ImplementsEvaluatePriceGroupGroupingValuesUnion()
type UnionTime ¶
func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsAddAdjustmentsEndDateUnion ¶ added in v0.35.0
func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsAddAdjustmentsEndDateUnion()
func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsAddAdjustmentsStartDateUnion ¶ added in v0.35.0
func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsAddAdjustmentsStartDateUnion()
func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsAddEndDateUnion ¶
func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsAddEndDateUnion()
func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsAddStartDateUnion ¶
func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsAddStartDateUnion()
func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsEditAdjustmentsEndDateUnion ¶ added in v0.35.0
func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsEditAdjustmentsEndDateUnion()
func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsEditAdjustmentsStartDateUnion ¶ added in v0.35.0
func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsEditAdjustmentsStartDateUnion()
func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsEditEndDateUnion ¶
func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsEditEndDateUnion()
func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsEditStartDateUnion ¶
func (UnionTime) ImplementsSubscriptionPriceIntervalsParamsEditStartDateUnion()