Class: Orb::Models::MutatedSubscription
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Orb::Models::MutatedSubscription
- Defined in:
- lib/orb/models/mutated_subscription.rb,
sig/orb/models/mutated_subscription.rbs
Defined Under Namespace
Modules: DiscountInterval, Status
Constant Summary collapse
- Orb =
Instance Attribute Summary collapse
-
#active_plan_phase_order ⇒ Integer?
The current plan phase that is active, only if the subscription's plan has phases.
-
#adjustment_intervals ⇒ Array<Orb::Models::AdjustmentInterval>
The adjustment intervals for this subscription sorted by the start_date of the adjustment interval.
-
#auto_collection ⇒ Boolean?
Determines whether issued invoices for this subscription will automatically be charged with the saved payment method on the due date.
-
#auto_issuance ⇒ Boolean?
Determines whether invoices for this subscription will be automatically issued.
- #billing_cycle_anchor_configuration ⇒ Orb::Models::BillingCycleAnchorConfiguration
-
#billing_cycle_day ⇒ Integer
The day of the month on which the billing cycle is anchored.
-
#changed_resources ⇒ Orb::Models::ChangedSubscriptionResources?
The resources that were changed as part of this operation.
- #created_at ⇒ Time
-
#current_billing_period_end_date ⇒ Time?
The end of the current billing period.
-
#current_billing_period_start_date ⇒ Time?
The start date of the current billing period.
-
#customer ⇒ Orb::Models::Customer
A customer is a buyer of your products, and the other party to the billing relationship.
-
#default_invoice_memo ⇒ String?
Determines the default memo on this subscriptions' invoices.
- #discount_intervals ⇒ Array<Orb::Models::AmountDiscountInterval, Orb::Models::PercentageDiscountInterval, Orb::Models::UsageDiscountInterval, Orb::Models::MutatedSubscription::DiscountInterval::TieredPercentage> deprecated Deprecated.
-
#end_date ⇒ Time?
The date Orb stops billing for this subscription.
- #fixed_fee_quantity_schedule ⇒ Array<Orb::Models::FixedFeeQuantityScheduleEntry>
- #id ⇒ String
- #invoicing_threshold ⇒ String?
- #maximum_intervals ⇒ Array<Orb::Models::MaximumInterval> deprecated Deprecated.
-
#metadata ⇒ Hash{Symbol=>String}
User specified key-value pairs for the resource.
- #minimum_intervals ⇒ Array<Orb::Models::MinimumInterval> deprecated Deprecated.
-
#name ⇒ String
The name of the subscription.
-
#net_terms ⇒ Integer
Determines the difference between the invoice issue date for subscription invoices as the date that they are due.
-
#pending_subscription_change ⇒ Orb::Models::SubscriptionChangeMinified?
A pending subscription change if one exists on this subscription.
-
#plan ⇒ Orb::Models::Plan?
The Plan resource represents a plan that can be subscribed to by a customer.
-
#price_intervals ⇒ Array<Orb::Models::PriceInterval>
The price intervals for this subscription.
- #redeemed_coupon ⇒ Orb::Models::CouponRedemption?
-
#start_date ⇒ Time
The date Orb starts billing for this subscription.
- #status ⇒ Symbol, Orb::Models::MutatedSubscription::Status
- #trial_info ⇒ Orb::Models::SubscriptionTrialInfo
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(lower_bound:, percentage:, upper_bound: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see DiscountInterval::TieredPercentage::Tier for more details.
- #to_hash ⇒ {
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(lower_bound:, percentage:, upper_bound: nil) ⇒ Object
Some parameter documentations has been truncated, see Orb::Models::MutatedSubscription::DiscountInterval::TieredPercentage::Tier for more details.
One band of a tiered percentage discount. Bounds are denominated in the
discount's currency. lower_bound is the exclusive start of the band and
upper_bound is the inclusive end; upper_bound is null only for the
open-ended final tier.
|
|
# File 'lib/orb/models/mutated_subscription.rb', line 435
|
Instance Attribute Details
#active_plan_phase_order ⇒ Integer?
The current plan phase that is active, only if the subscription's plan has phases.
16 |
# File 'lib/orb/models/mutated_subscription.rb', line 16 required :active_plan_phase_order, Integer, nil?: true |
#adjustment_intervals ⇒ Array<Orb::Models::AdjustmentInterval>
The adjustment intervals for this subscription sorted by the start_date of the adjustment interval.
23 |
# File 'lib/orb/models/mutated_subscription.rb', line 23 required :adjustment_intervals, -> { Orb::Internal::Type::ArrayOf[Orb::AdjustmentInterval] } |
#auto_collection ⇒ Boolean?
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.
31 |
# File 'lib/orb/models/mutated_subscription.rb', line 31 required :auto_collection, Orb::Internal::Type::Boolean, nil?: true |
#auto_issuance ⇒ Boolean?
Determines whether invoices for this subscription will be automatically issued. This resolves the effective setting for the subscription: a subscription-level override if set, otherwise the customer-level setting, otherwise the account-level default.
40 |
# File 'lib/orb/models/mutated_subscription.rb', line 40 required :auto_issuance, Orb::Internal::Type::Boolean, nil?: true |
#billing_cycle_anchor_configuration ⇒ Orb::Models::BillingCycleAnchorConfiguration
45 |
# File 'lib/orb/models/mutated_subscription.rb', line 45 required :billing_cycle_anchor_configuration, -> { Orb::BillingCycleAnchorConfiguration } |
#billing_cycle_day ⇒ Integer
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.
54 |
# File 'lib/orb/models/mutated_subscription.rb', line 54 required :billing_cycle_day, Integer |
#changed_resources ⇒ Orb::Models::ChangedSubscriptionResources?
The resources that were changed as part of this operation. Only present when
fetched through the subscription changes API or if the
include_changed_resources parameter was passed in the request.
224 |
# File 'lib/orb/models/mutated_subscription.rb', line 224 optional :changed_resources, -> { Orb::ChangedSubscriptionResources }, nil?: true |
#created_at ⇒ Time
59 |
# File 'lib/orb/models/mutated_subscription.rb', line 59 required :created_at, Time |
#current_billing_period_end_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.
67 |
# File 'lib/orb/models/mutated_subscription.rb', line 67 required :current_billing_period_end_date, Time, nil?: true |
#current_billing_period_start_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.
75 |
# File 'lib/orb/models/mutated_subscription.rb', line 75 required :current_billing_period_start_date, Time, nil?: true |
#customer ⇒ Orb::Models::Customer
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 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), which defaults to your account's timezone. See Timezone localization for information on what this timezone parameter influences within Orb.
98 |
# File 'lib/orb/models/mutated_subscription.rb', line 98 required :customer, -> { Orb::Customer } |
#default_invoice_memo ⇒ String?
Determines the default memo on this subscriptions' invoices. Note that if this is not provided, it is determined by the plan configuration.
105 |
# File 'lib/orb/models/mutated_subscription.rb', line 105 required :default_invoice_memo, String, nil?: true |
#discount_intervals ⇒ Array<Orb::Models::AmountDiscountInterval, Orb::Models::PercentageDiscountInterval, Orb::Models::UsageDiscountInterval, Orb::Models::MutatedSubscription::DiscountInterval::TieredPercentage>
The discount intervals for this subscription sorted by the start_date. This
field is deprecated in favor of adjustment_intervals.
114 115 |
# File 'lib/orb/models/mutated_subscription.rb', line 114 required :discount_intervals, -> { Orb::Internal::Type::ArrayOf[union: Orb::MutatedSubscription::DiscountInterval] } |
#end_date ⇒ Time?
The date Orb stops billing for this subscription.
121 |
# File 'lib/orb/models/mutated_subscription.rb', line 121 required :end_date, Time, nil?: true |
#fixed_fee_quantity_schedule ⇒ Array<Orb::Models::FixedFeeQuantityScheduleEntry>
126 127 |
# File 'lib/orb/models/mutated_subscription.rb', line 126 required :fixed_fee_quantity_schedule, -> { Orb::Internal::Type::ArrayOf[Orb::FixedFeeQuantityScheduleEntry] } |
#id ⇒ String
9 |
# File 'lib/orb/models/mutated_subscription.rb', line 9 required :id, String |
#invoicing_threshold ⇒ String?
132 |
# File 'lib/orb/models/mutated_subscription.rb', line 132 required :invoicing_threshold, String, nil?: true |
#maximum_intervals ⇒ Array<Orb::Models::MaximumInterval>
The maximum intervals for this subscription sorted by the start_date. This field
is deprecated in favor of adjustment_intervals.
141 |
# File 'lib/orb/models/mutated_subscription.rb', line 141 required :maximum_intervals, -> { Orb::Internal::Type::ArrayOf[Orb::MaximumInterval] } |
#metadata ⇒ Hash{Symbol=>String}
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.
150 |
# File 'lib/orb/models/mutated_subscription.rb', line 150 required :metadata, Orb::Internal::Type::HashOf[String] |
#minimum_intervals ⇒ Array<Orb::Models::MinimumInterval>
The minimum intervals for this subscription sorted by the start_date. This field
is deprecated in favor of adjustment_intervals.
159 |
# File 'lib/orb/models/mutated_subscription.rb', line 159 required :minimum_intervals, -> { Orb::Internal::Type::ArrayOf[Orb::MinimumInterval] } |
#name ⇒ String
The name of the subscription.
165 |
# File 'lib/orb/models/mutated_subscription.rb', line 165 required :name, String |
#net_terms ⇒ Integer
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.
174 |
# File 'lib/orb/models/mutated_subscription.rb', line 174 required :net_terms, Integer |
#pending_subscription_change ⇒ Orb::Models::SubscriptionChangeMinified?
A pending subscription change if one exists on this subscription.
180 |
# File 'lib/orb/models/mutated_subscription.rb', line 180 required :pending_subscription_change, -> { Orb::SubscriptionChangeMinified }, nil?: true |
#plan ⇒ Orb::Models::Plan?
The Plan 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.
189 |
# File 'lib/orb/models/mutated_subscription.rb', line 189 required :plan, -> { Orb::Plan }, nil?: true |
#price_intervals ⇒ Array<Orb::Models::PriceInterval>
The price intervals for this subscription.
195 |
# File 'lib/orb/models/mutated_subscription.rb', line 195 required :price_intervals, -> { Orb::Internal::Type::ArrayOf[Orb::PriceInterval] } |
#redeemed_coupon ⇒ Orb::Models::CouponRedemption?
200 |
# File 'lib/orb/models/mutated_subscription.rb', line 200 required :redeemed_coupon, -> { Orb::CouponRedemption }, nil?: true |
#start_date ⇒ Time
The date Orb starts billing for this subscription.
206 |
# File 'lib/orb/models/mutated_subscription.rb', line 206 required :start_date, Time |
#status ⇒ Symbol, Orb::Models::MutatedSubscription::Status
211 |
# File 'lib/orb/models/mutated_subscription.rb', line 211 required :status, enum: -> { Orb::MutatedSubscription::Status } |
#trial_info ⇒ Orb::Models::SubscriptionTrialInfo
216 |
# File 'lib/orb/models/mutated_subscription.rb', line 216 required :trial_info, -> { Orb::SubscriptionTrialInfo } |
Class Method Details
.variants ⇒ Array(Orb::Models::AmountDiscountInterval, Orb::Models::PercentageDiscountInterval, Orb::Models::UsageDiscountInterval, Orb::Models::MutatedSubscription::DiscountInterval::TieredPercentage)
|
|
# File 'lib/orb/models/mutated_subscription.rb', line 453
|
Instance Method Details
#to_hash ⇒ {
127 |
# File 'sig/orb/models/mutated_subscription.rbs', line 127
def to_hash: -> {
|