Documentation
¶
Index ¶
- Constants
- Variables
- type Addon
- type AddonMeta
- type AddonStatus
- type Alignment
- type AlignmentUpdate
- type BooleanEntitlementTemplate
- type Commitments
- type Discount
- func (d *Discount) AsPercentage() (PercentageDiscount, error)
- func (d *Discount) AsUsage() (UsageDiscount, error)
- func (d *Discount) Clone() Discount
- func (d *Discount) FromPercentage(discount PercentageDiscount)
- func (d *Discount) FromUsage(discount UsageDiscount)
- func (d *Discount) Hash() hasher.Hash
- func (d *Discount) MarshalJSON() ([]byte, error)
- func (d *Discount) Type() DiscountType
- func (d *Discount) UnmarshalJSON(bytes []byte) error
- func (d *Discount) Validate() error
- func (d *Discount) ValidateForPrice(price *Price) error
- type DiscountType
- type Discounts
- type DynamicPrice
- type EffectivePeriod
- type EntitlementTemplate
- func (e *EntitlementTemplate) AsBoolean() (BooleanEntitlementTemplate, error)
- func (e *EntitlementTemplate) AsMetered() (MeteredEntitlementTemplate, error)
- func (e *EntitlementTemplate) AsStatic() (StaticEntitlementTemplate, error)
- func (e *EntitlementTemplate) Equal(v *EntitlementTemplate) bool
- func (e *EntitlementTemplate) FromBoolean(t BooleanEntitlementTemplate)
- func (e *EntitlementTemplate) FromMetered(t MeteredEntitlementTemplate)
- func (e *EntitlementTemplate) FromStatic(t StaticEntitlementTemplate)
- func (e *EntitlementTemplate) MarshalJSON() ([]byte, error)
- func (e *EntitlementTemplate) Type() entitlement.EntitlementType
- func (e *EntitlementTemplate) UnmarshalJSON(bytes []byte) error
- func (e *EntitlementTemplate) Validate() error
- type FlatFeeRateCard
- func (r *FlatFeeRateCard) AsMeta() RateCardMeta
- func (r *FlatFeeRateCard) Equal(v RateCard) bool
- func (r *FlatFeeRateCard) Feature() *feature.Feature
- func (r *FlatFeeRateCard) GetBillingCadence() *isodate.Period
- func (r *FlatFeeRateCard) Key() string
- func (r *FlatFeeRateCard) Merge(v RateCard) error
- func (r *FlatFeeRateCard) Type() RateCardType
- func (r *FlatFeeRateCard) Validate() error
- type FlatPrice
- type MeteredEntitlementTemplate
- type PackagePrice
- type PaymentTermType
- type PercentageDiscount
- type Phase
- type PhaseMeta
- type Plan
- type PlanMeta
- type PlanStatus
- type Price
- func (p *Price) AsDynamic() (DynamicPrice, error)
- func (p *Price) AsFlat() (FlatPrice, error)
- func (p *Price) AsPackage() (PackagePrice, error)
- func (p *Price) AsTiered() (TieredPrice, error)
- func (p *Price) AsUnit() (UnitPrice, error)
- func (p *Price) Equal(v *Price) bool
- func (p *Price) FromDynamic(price DynamicPrice)
- func (p *Price) FromFlat(price FlatPrice)
- func (p *Price) FromPackage(price PackagePrice)
- func (p *Price) FromTiered(price TieredPrice)
- func (p *Price) FromUnit(price UnitPrice)
- func (p *Price) MarshalJSON() ([]byte, error)
- func (p *Price) Type() PriceType
- func (p *Price) UnmarshalJSON(bytes []byte) error
- func (p *Price) Validate() error
- type PriceTier
- type PriceTierFlatPrice
- type PriceTierUnitPrice
- type PriceType
- type RateCard
- type RateCardMeta
- type RateCardSerde
- type RateCardType
- type RateCards
- type StaticEntitlementTemplate
- type StripeTaxConfig
- type TaxBehavior
- type TaxConfig
- type TieredPrice
- type TieredPriceMode
- type UnitPrice
- type UsageBasedRateCard
- func (r *UsageBasedRateCard) AsMeta() RateCardMeta
- func (r *UsageBasedRateCard) Equal(v RateCard) bool
- func (r *UsageBasedRateCard) Feature() *feature.Feature
- func (r *UsageBasedRateCard) GetBillingCadence() *isodate.Period
- func (r *UsageBasedRateCard) Key() string
- func (r *UsageBasedRateCard) Merge(v RateCard) error
- func (r *UsageBasedRateCard) Type() RateCardType
- func (r *UsageBasedRateCard) Validate() error
- type UsageDiscount
Constants ¶
View Source
const DefaultPaymentTerm = InAdvancePaymentTerm
Variables ¶
View Source
var DynamicPriceDefaultMultiplier = decimal.NewFromFloat(1)
View Source
var StripeProductTaxCodeRegexp = regexp.MustCompile(`^txcd_\d{8}$`)
Functions ¶
This section is empty.
Types ¶
type AddonMeta ¶
type AddonMeta struct {
EffectivePeriod
// Key is the unique key for Add-on.
Key string `json:"key"`
// Version
Version int `json:"version"`
// Name
Name string `json:"name"`
// Description
Description *string `json:"description,omitempty"`
// Currency
Currency currency.Code `json:"currency"`
// Metadata
Metadata models.Metadata `json:"metadata,omitempty"`
// Annotations
Annotations models.Annotations `json:"annotations,omitempty"`
}
func (AddonMeta) Status ¶
func (a AddonMeta) Status() AddonStatus
Status returns the current status of the Addons
type AddonStatus ¶
type AddonStatus string
const ( AddonStatusDraft AddonStatus = "draft" AddonStatusActive AddonStatus = "active" AddonStatusArchived AddonStatus = "archived" AddonStatusInvalid AddonStatus = "invalid" )
func (AddonStatus) Values ¶
func (s AddonStatus) Values() []string
type Alignment ¶
type Alignment struct {
// BillablesMustAlign indicates whether all billable items in a given phase must share the same BillingPeriodDuration.
BillablesMustAlign bool `json:"billablesMustAlign"`
}
type AlignmentUpdate ¶
type AlignmentUpdate struct {
BillablesMustAlign *bool `json:"billablesMustAlign,omitempty"`
}
AlignmentUpdate is used for the nil-ish comparison of the plan service only
type BooleanEntitlementTemplate ¶
type BooleanEntitlementTemplate struct {
// Metadata a set of key/value pairs describing metadata for the RateCard.
Metadata models.Metadata `json:"metadata,omitempty"`
}
func (*BooleanEntitlementTemplate) Equal ¶
func (t *BooleanEntitlementTemplate) Equal(v *BooleanEntitlementTemplate) bool
func (*BooleanEntitlementTemplate) Validate ¶
func (t *BooleanEntitlementTemplate) Validate() error
type Commitments ¶
type Commitments struct {
// MinimumAmount defines the least amount the customer committed to spend.
MinimumAmount *decimal.Decimal `json:"minimumAmount,omitempty"`
// MaximumAmount defines the upper limit of amount the customer entitled to spend.
MaximumAmount *decimal.Decimal `json:"maximumAmount,omitempty"`
}
func (Commitments) Equal ¶
func (c Commitments) Equal(v Commitments) bool
func (Commitments) Validate ¶
func (c Commitments) Validate() error
type Discount ¶
type Discount struct {
// contains filtered or unexported fields
}
func NewDiscountFrom ¶
func NewDiscountFrom[T PercentageDiscount | UsageDiscount](v T) Discount
func (*Discount) AsPercentage ¶
func (d *Discount) AsPercentage() (PercentageDiscount, error)
func (*Discount) AsUsage ¶
func (d *Discount) AsUsage() (UsageDiscount, error)
func (*Discount) FromPercentage ¶
func (d *Discount) FromPercentage(discount PercentageDiscount)
func (*Discount) FromUsage ¶
func (d *Discount) FromUsage(discount UsageDiscount)
func (*Discount) MarshalJSON ¶
func (*Discount) Type ¶
func (d *Discount) Type() DiscountType
func (*Discount) UnmarshalJSON ¶
func (*Discount) ValidateForPrice ¶
type DiscountType ¶
type DiscountType string
const ( PercentageDiscountType DiscountType = "percentage" UsageDiscountType DiscountType = "usage" )
func (DiscountType) StringValues ¶
func (p DiscountType) StringValues() []string
func (DiscountType) Values ¶
func (p DiscountType) Values() []DiscountType
type DynamicPrice ¶
type DynamicPrice struct {
Commitments `json:",inline"`
// Multiplier defines the multiplier applied to the price.
Multiplier decimal.Decimal `json:"multiplier"`
}
func (*DynamicPrice) Equal ¶
func (p *DynamicPrice) Equal(v *DynamicPrice) bool
func (DynamicPrice) Validate ¶
func (p DynamicPrice) Validate() error
type EffectivePeriod ¶
type EffectivePeriod struct {
// EffectiveFrom defines the time from the Plan or Addon becomes active.
EffectiveFrom *time.Time `json:"effectiveFrom,omitempty"`
// EffectiveTo defines the time from the Plan or Addon becomes archived.
EffectiveTo *time.Time `json:"effectiveTo,omitempty"`
}
EffectivePeriod describes lifecycle of resource based on the time period defined by it.
func (EffectivePeriod) Equal ¶
func (p EffectivePeriod) Equal(o EffectivePeriod) bool
Equal returns true if the two EffectivePeriod objects are equal.
func (EffectivePeriod) Validate ¶
func (p EffectivePeriod) Validate() error
type EntitlementTemplate ¶
type EntitlementTemplate struct {
// contains filtered or unexported fields
}
EntitlementTemplate is the template used for instantiating entitlement.Entitlement for RateCard.
func NewEntitlementTemplateFrom ¶
func NewEntitlementTemplateFrom[T MeteredEntitlementTemplate | StaticEntitlementTemplate | BooleanEntitlementTemplate](c T) *EntitlementTemplate
func (*EntitlementTemplate) AsBoolean ¶
func (e *EntitlementTemplate) AsBoolean() (BooleanEntitlementTemplate, error)
func (*EntitlementTemplate) AsMetered ¶
func (e *EntitlementTemplate) AsMetered() (MeteredEntitlementTemplate, error)
func (*EntitlementTemplate) AsStatic ¶
func (e *EntitlementTemplate) AsStatic() (StaticEntitlementTemplate, error)
func (*EntitlementTemplate) Equal ¶
func (e *EntitlementTemplate) Equal(v *EntitlementTemplate) bool
func (*EntitlementTemplate) FromBoolean ¶
func (e *EntitlementTemplate) FromBoolean(t BooleanEntitlementTemplate)
func (*EntitlementTemplate) FromMetered ¶
func (e *EntitlementTemplate) FromMetered(t MeteredEntitlementTemplate)
func (*EntitlementTemplate) FromStatic ¶
func (e *EntitlementTemplate) FromStatic(t StaticEntitlementTemplate)
func (*EntitlementTemplate) MarshalJSON ¶
func (e *EntitlementTemplate) MarshalJSON() ([]byte, error)
func (*EntitlementTemplate) Type ¶
func (e *EntitlementTemplate) Type() entitlement.EntitlementType
func (*EntitlementTemplate) UnmarshalJSON ¶
func (e *EntitlementTemplate) UnmarshalJSON(bytes []byte) error
func (*EntitlementTemplate) Validate ¶
func (e *EntitlementTemplate) Validate() error
type FlatFeeRateCard ¶
type FlatFeeRateCard struct {
RateCardMeta
// BillingCadence defines the billing cadence of the RateCard in ISO8601 format.
// When nil (null) it means it is a one time fee.
// Example: "P1D12H"
BillingCadence *isodate.Period `json:"billingCadence"`
}
func (*FlatFeeRateCard) AsMeta ¶
func (r *FlatFeeRateCard) AsMeta() RateCardMeta
func (*FlatFeeRateCard) Equal ¶
func (r *FlatFeeRateCard) Equal(v RateCard) bool
func (*FlatFeeRateCard) Feature ¶
func (r *FlatFeeRateCard) Feature() *feature.Feature
func (*FlatFeeRateCard) GetBillingCadence ¶
func (r *FlatFeeRateCard) GetBillingCadence() *isodate.Period
func (*FlatFeeRateCard) Key ¶
func (r *FlatFeeRateCard) Key() string
func (*FlatFeeRateCard) Merge ¶
func (r *FlatFeeRateCard) Merge(v RateCard) error
func (*FlatFeeRateCard) Type ¶
func (r *FlatFeeRateCard) Type() RateCardType
func (*FlatFeeRateCard) Validate ¶
func (r *FlatFeeRateCard) Validate() error
type FlatPrice ¶
type FlatPrice struct {
// Amount of the flat price.
Amount decimal.Decimal `json:"amount"`
// PaymentTerm defines the payment term of the flat price.
// Defaults to InAdvancePaymentTerm.
PaymentTerm PaymentTermType `json:"paymentTerm,omitempty"`
}
type MeteredEntitlementTemplate ¶
type MeteredEntitlementTemplate struct {
// Metadata a set of key/value pairs describing metadata for the RateCard.
Metadata models.Metadata `json:"metadata,omitempty"`
// IsSoftLimit set to `true` for allowing the subject to use the feature even if the entitlement is exhausted.
IsSoftLimit bool `json:"isSoftLimit,omitempty"`
// IssueAfterReset defines the amount to be automatically granted at entitlement.Entitlement creation or reset.
IssueAfterReset *float64 `json:"issueAfterReset,omitempty"`
// IssueAfterResetPriority defines the grant priority for the default grant.
IssueAfterResetPriority *uint8 `json:"issueAfterResetPriority,omitempty"`
// PreserveOverageAtReset defines whether the overage is preserved after reset.
PreserveOverageAtReset *bool `json:"preserveOverageAtReset,omitempty"`
// UsagePeriod defines the interval of the entitlement in ISO8601 format.
// Defaults to the billing cadence of the rate card.
// Example: "P1D12H"
UsagePeriod isodate.Period `json:"usagePeriod,omitempty"`
}
func (*MeteredEntitlementTemplate) Equal ¶
func (t *MeteredEntitlementTemplate) Equal(v *MeteredEntitlementTemplate) bool
func (*MeteredEntitlementTemplate) Validate ¶
func (t *MeteredEntitlementTemplate) Validate() error
type PackagePrice ¶
type PackagePrice struct {
Commitments `json:",inline"`
Amount decimal.Decimal `json:"amount"`
QuantityPerPackage decimal.Decimal `json:"quantityPerPackage"`
}
func (*PackagePrice) Equal ¶
func (p *PackagePrice) Equal(v *PackagePrice) bool
func (PackagePrice) Validate ¶
func (p PackagePrice) Validate() error
type PaymentTermType ¶
type PaymentTermType string
const ( InAdvancePaymentTerm PaymentTermType = "in_advance" InArrearsPaymentTerm PaymentTermType = "in_arrears" )
func (PaymentTermType) StringValues ¶
func (p PaymentTermType) StringValues() []string
func (PaymentTermType) Values ¶
func (p PaymentTermType) Values() []string
type PercentageDiscount ¶
type PercentageDiscount struct {
// Percentage defines percentage of the discount.
Percentage models.Percentage `json:"percentage"`
}
func (PercentageDiscount) Clone ¶
func (f PercentageDiscount) Clone() PercentageDiscount
func (PercentageDiscount) Hash ¶
func (f PercentageDiscount) Hash() hasher.Hash
func (PercentageDiscount) Validate ¶
func (f PercentageDiscount) Validate() error
func (PercentageDiscount) ValidateForPrice ¶
func (f PercentageDiscount) ValidateForPrice(price *Price) error
type PhaseMeta ¶
type PhaseMeta struct {
// Key is the unique key for Phase.
Key string `json:"key"`
// Name is the name of the Phase.
Name string `json:"name"`
// Description is the detailed description of the Phase.
Description *string `json:"description,omitempty"`
// Metadata stores user defined metadata for Phase.
Metadata models.Metadata `json:"metadata,omitempty"`
// Duration is the duration of the Phase.
Duration *isodate.Period `json:"duration"`
}
type Plan ¶
func (Plan) ValidForCreatingSubscriptions ¶
ValidForCreatingSubscriptions checks if the Plan is valid for creating Subscriptions, a stricter version of Validate
type PlanMeta ¶
type PlanMeta struct {
EffectivePeriod
Alignment
// Key is the unique key for Plan.
Key string `json:"key"`
// Version
Version int `json:"version"`
// Name
Name string `json:"name"`
// Description
Description *string `json:"description,omitempty"`
// Currency
Currency currency.Code `json:"currency"`
// Metadata
Metadata models.Metadata `json:"metadata,omitempty"`
}
func (PlanMeta) Status ¶
func (p PlanMeta) Status() PlanStatus
Status returns the current status of the Plan
type PlanStatus ¶
type PlanStatus string
const ( DraftStatus PlanStatus = "draft" ActiveStatus PlanStatus = "active" ArchivedStatus PlanStatus = "archived" ScheduledStatus PlanStatus = "scheduled" InvalidStatus PlanStatus = "invalid" )
func (PlanStatus) Values ¶
func (s PlanStatus) Values() []string
type Price ¶
type Price struct {
// contains filtered or unexported fields
}
func NewPriceFrom ¶
func NewPriceFrom[T FlatPrice | UnitPrice | TieredPrice | DynamicPrice | PackagePrice](v T) *Price
func (*Price) AsDynamic ¶
func (p *Price) AsDynamic() (DynamicPrice, error)
func (*Price) AsPackage ¶
func (p *Price) AsPackage() (PackagePrice, error)
func (*Price) AsTiered ¶
func (p *Price) AsTiered() (TieredPrice, error)
func (*Price) FromDynamic ¶
func (p *Price) FromDynamic(price DynamicPrice)
func (*Price) FromPackage ¶
func (p *Price) FromPackage(price PackagePrice)
func (*Price) FromTiered ¶
func (p *Price) FromTiered(price TieredPrice)
func (*Price) MarshalJSON ¶
func (*Price) UnmarshalJSON ¶
type PriceTier ¶
type PriceTier struct {
// UpToAmount defines the quantity will be contained in the tier. Inclusive.
// If null, the tier is open-ended.
UpToAmount *decimal.Decimal `json:"upToAmount,omitempty"`
// FlatPrice defines the flat price component of the tier.
FlatPrice *PriceTierFlatPrice `json:"flatPrice,omitempty"`
// UnitPrice defines the unit price component of the tier.
UnitPrice *PriceTierUnitPrice `json:"unitPrice,omitempty"`
}
PriceTier describes a tier of price(s).
type PriceTierFlatPrice ¶
type PriceTierFlatPrice struct {
// Amount of the flat price.
Amount decimal.Decimal `json:"amount"`
}
func (PriceTierFlatPrice) Equal ¶
func (f PriceTierFlatPrice) Equal(v PriceTierFlatPrice) bool
func (PriceTierFlatPrice) Validate ¶
func (f PriceTierFlatPrice) Validate() error
type PriceTierUnitPrice ¶
type PriceTierUnitPrice struct {
// Amount of the flat price.
Amount decimal.Decimal `json:"amount"`
}
func (PriceTierUnitPrice) Equal ¶
func (u PriceTierUnitPrice) Equal(v PriceTierUnitPrice) bool
func (PriceTierUnitPrice) Validate ¶
func (u PriceTierUnitPrice) Validate() error
type RateCardMeta ¶
type RateCardMeta struct {
// Key is the unique key for Plan.
Key string `json:"key"`
// Name of the RateCard
Name string `json:"name"`
// Description for the RateCard
Description *string `json:"description,omitempty"`
// Metadata a set of key/value pairs describing metadata for the RateCard
Metadata models.Metadata `json:"metadata,omitempty"`
// Feature defines optional Feature assigned to RateCard
Feature *feature.Feature `json:"feature,omitempty"`
// EntitlementTemplate defines the template used for instantiating entitlement.Entitlement.
// If Feature is set then template must be provided as well.
EntitlementTemplate *EntitlementTemplate `json:"entitlementTemplate,omitempty"`
// TaxConfig defines provider specific tax information.
TaxConfig *TaxConfig `json:"taxConfig,omitempty"`
// Price defines the price for the RateCard
Price *Price `json:"price"`
// Discounts defines a list of discounts for the RateCard
Discounts Discounts `json:"discounts,omitempty"`
}
func (RateCardMeta) Equal ¶
func (r RateCardMeta) Equal(v RateCardMeta) bool
func (RateCardMeta) Validate ¶
func (r RateCardMeta) Validate() error
type RateCardSerde ¶
type RateCardSerde struct {
Type RateCardType `json:"type"`
}
type RateCardType ¶
type RateCardType string
const ( FlatFeeRateCardType RateCardType = "flat_fee" UsageBasedRateCardType RateCardType = "usage_based" )
func (RateCardType) Values ¶
func (s RateCardType) Values() []string
type StaticEntitlementTemplate ¶
type StaticEntitlementTemplate struct {
// Metadata a set of key/value pairs describing metadata for the RateCard.
Metadata models.Metadata `json:"metadata,omitempty"`
// Config stores a JSON parsable configuration for the entitlement.Entitlement.
// This value is also returned when checking entitlement access, and
// it is useful for configuring fine-grained access settings to the feature implemented in customers own system.
Config json.RawMessage `json:"config,omitempty"`
}
func (*StaticEntitlementTemplate) Equal ¶
func (t *StaticEntitlementTemplate) Equal(v *StaticEntitlementTemplate) bool
func (*StaticEntitlementTemplate) Validate ¶
func (t *StaticEntitlementTemplate) Validate() error
type StripeTaxConfig ¶
type StripeTaxConfig struct {
// Code stores the product tax code.
// See: https://docs.stripe.com/tax/tax-codes
// Example:"txcd_10000000"
Code string `json:"code"`
}
func (*StripeTaxConfig) Equal ¶
func (s *StripeTaxConfig) Equal(v *StripeTaxConfig) bool
func (*StripeTaxConfig) Validate ¶
func (s *StripeTaxConfig) Validate() error
type TaxBehavior ¶
type TaxBehavior string
const ( InclusiveTaxBehavior TaxBehavior = "inclusive" ExclusiveTaxBehavior TaxBehavior = "exclusive" )
func (TaxBehavior) Validate ¶
func (t TaxBehavior) Validate() error
func (TaxBehavior) Values ¶
func (t TaxBehavior) Values() []string
type TaxConfig ¶
type TaxConfig struct {
Behavior *TaxBehavior `json:"behavior,omitempty"`
Stripe *StripeTaxConfig `json:"stripe,omitempty"`
}
TaxConfig stores the provider specific tax configs.
func MergeTaxConfigs ¶
type TieredPrice ¶
type TieredPrice struct {
Commitments `json:",inline"`
// Mode defines whether the tier is volume-based or graduated.
// * VolumeTieredPrice: the maximum quantity within a period determines the per-unit price
// * GraduatedTieredPrice: pricing can change as the quantity grows
Mode TieredPriceMode `json:"mode"`
// Tiers defines the list of PriceTier.
Tiers []PriceTier `json:"tiers"`
}
func (*TieredPrice) Equal ¶
func (t *TieredPrice) Equal(v *TieredPrice) bool
func (*TieredPrice) Validate ¶
func (t *TieredPrice) Validate() error
func (*TieredPrice) WithSortedTiers ¶
func (t *TieredPrice) WithSortedTiers() TieredPrice
type TieredPriceMode ¶
type TieredPriceMode string
const ( // In `volume`-based tiering, the maximum quantity within a period determines the per unit price. VolumeTieredPrice TieredPriceMode = "volume" // In `graduated` tiering, pricing can change as the quantity grows. GraduatedTieredPrice TieredPriceMode = "graduated" )
func NewTieredPriceMode ¶
func NewTieredPriceMode(s string) (TieredPriceMode, error)
func (TieredPriceMode) StringValues ¶
func (p TieredPriceMode) StringValues() []string
func (TieredPriceMode) Values ¶
func (p TieredPriceMode) Values() []TieredPriceMode
type UnitPrice ¶
type UnitPrice struct {
Commitments `json:",inline"`
// Amount of the unit price.
Amount decimal.Decimal `json:"amount"`
}
type UsageBasedRateCard ¶
type UsageBasedRateCard struct {
RateCardMeta
// BillingCadence defines the billing cadence of the RateCard in ISO8601 format.
// Example: "P1D12H"
BillingCadence isodate.Period `json:"billingCadence"`
}
func (*UsageBasedRateCard) AsMeta ¶
func (r *UsageBasedRateCard) AsMeta() RateCardMeta
func (*UsageBasedRateCard) Equal ¶
func (r *UsageBasedRateCard) Equal(v RateCard) bool
func (*UsageBasedRateCard) Feature ¶
func (r *UsageBasedRateCard) Feature() *feature.Feature
func (*UsageBasedRateCard) GetBillingCadence ¶
func (r *UsageBasedRateCard) GetBillingCadence() *isodate.Period
func (*UsageBasedRateCard) Key ¶
func (r *UsageBasedRateCard) Key() string
func (*UsageBasedRateCard) Merge ¶
func (r *UsageBasedRateCard) Merge(v RateCard) error
func (*UsageBasedRateCard) Type ¶
func (r *UsageBasedRateCard) Type() RateCardType
func (*UsageBasedRateCard) Validate ¶
func (r *UsageBasedRateCard) Validate() error
type UsageDiscount ¶
func (UsageDiscount) Clone ¶
func (f UsageDiscount) Clone() UsageDiscount
func (UsageDiscount) Hash ¶
func (f UsageDiscount) Hash() hasher.Hash
func (UsageDiscount) Validate ¶
func (f UsageDiscount) Validate() error
func (UsageDiscount) ValidateForPrice ¶
func (f UsageDiscount) ValidateForPrice(price *Price) error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.