Module: Orb::Models::Subscription::DiscountInterval
- Extended by:
- Internal::Type::Union
- Defined in:
- lib/orb/models/subscription.rb
Instance Method Summary collapse
-
#initialize(id: , active_plan_phase_order: , adjustment_intervals: , auto_collection: , billing_cycle_anchor_configuration: , billing_cycle_day: , created_at: , current_billing_period_end_date: , current_billing_period_start_date: , customer: , default_invoice_memo: , discount_intervals: , end_date: , fixed_fee_quantity_schedule: , invoicing_threshold: , maximum_intervals: , metadata: , minimum_intervals: , name: , net_terms: , pending_subscription_change: , plan: , price_intervals: , redeemed_coupon: , start_date: , status: , trial_info: ) ⇒ Object
Some parameter documentations has been truncated, see Orb::Models::Subscription for more details.
Methods included from Internal::Type::Union
==, ===, coerce, dump, hash, inspect, to_sorbet_type, variants
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info
Instance Method Details
#initialize(id: , active_plan_phase_order: , adjustment_intervals: , auto_collection: , billing_cycle_anchor_configuration: , billing_cycle_day: , created_at: , current_billing_period_end_date: , current_billing_period_start_date: , customer: , default_invoice_memo: , discount_intervals: , end_date: , fixed_fee_quantity_schedule: , invoicing_threshold: , maximum_intervals: , metadata: , minimum_intervals: , name: , net_terms: , pending_subscription_change: , plan: , price_intervals: , redeemed_coupon: , start_date: , status: , trial_info: ) ⇒ Object
Some parameter documentations has been truncated, see Orb::Models::Subscription for more details.
A [subscription](/core-concepts#subscription) represents the purchase of a plan by a customer.
By default, subscriptions begin on the day that they’re created and renew automatically for each billing cycle at the cadence that’s configured in the plan definition.
Subscriptions also default to **beginning of month alignment**, which means the first invoice issued for the subscription will have pro-rated charges between the ‘start_date` and the first of the following month. Subsequent billing periods will always start and end on a month boundary (e.g. subsequent month starts for monthly billing).
Depending on the plan configuration, any flat recurring fees will be billed either at the beginning (in-advance) or end (in-arrears) of each billing cycle. Plans default to **in-advance billing**. Usage-based fees are billed in arrears as usage is accumulated. In the normal course of events, you can expect an invoice to contain usage-based charges for the previous period, and a recurring fee for the following period.
288 289 290 291 292 293 294 295 296 297 298 299 300 301 |
# File 'lib/orb/models/subscription.rb', line 288 module DiscountInterval extend Orb::Internal::Type::Union discriminator :discount_type variant :amount, -> { Orb::AmountDiscountInterval } variant :percentage, -> { Orb::PercentageDiscountInterval } variant :usage, -> { Orb::UsageDiscountInterval } # @!method self.variants # @return [Array(Orb::Models::AmountDiscountInterval, Orb::Models::PercentageDiscountInterval, Orb::Models::UsageDiscountInterval)] end |