Class: Orb::Models::Plan
Overview
Defined Under Namespace
Modules: Adjustment, Status
Classes: BasePlan, PlanPhase, Product, TrialConfig
Constant Summary
collapse
- Orb =
Instance Attribute Summary collapse
-
#adjustments ⇒ Array<Orb::Models::PlanPhaseUsageDiscountAdjustment, Orb::Models::PlanPhaseAmountDiscountAdjustment, Orb::Models::PlanPhasePercentageDiscountAdjustment, Orb::Models::Plan::Adjustment::TieredPercentageDiscount, Orb::Models::PlanPhaseMinimumAdjustment, Orb::Models::PlanPhaseMaximumAdjustment>
Adjustments for this plan.
-
#base_plan ⇒ Orb::Models::Plan::BasePlan?
deprecated
Deprecated.
-
#base_plan_id ⇒ String?
deprecated
Deprecated.
-
#created_at ⇒ Time
-
#currency ⇒ String
deprecated
Deprecated.
-
#default_invoice_memo ⇒ String?
The default memo text on the invoices corresponding to subscriptions on this plan.
-
#description ⇒ String
-
#discount ⇒ Orb::Models::PercentageDiscount, ...
deprecated
Deprecated.
-
#external_plan_id ⇒ String?
An optional user-defined ID for this plan resource, used throughout the system as an alias for this Plan.
-
#id ⇒ String
-
#invoicing_currency ⇒ String
An ISO 4217 currency string for which this plan is billed in.
-
#maximum ⇒ Orb::Models::Maximum?
deprecated
Deprecated.
-
#maximum_amount ⇒ String?
deprecated
Deprecated.
-
#metadata ⇒ Hash{Symbol=>String}
User specified key-value pairs for the resource.
-
#minimum ⇒ Orb::Models::Minimum?
deprecated
Deprecated.
-
#minimum_amount ⇒ String?
deprecated
Deprecated.
-
#name ⇒ String
-
#net_terms ⇒ Integer?
Determines the difference between the invoice issue date and the due date.
-
#plan_phases ⇒ Array<Orb::Models::Plan::PlanPhase>?
-
#prices ⇒ Array<Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput>
-
#product ⇒ Orb::Models::Plan::Product
-
#status ⇒ Symbol, Orb::Models::Plan::Status
-
#trial_config ⇒ Orb::Models::Plan::TrialConfig
-
#version ⇒ Integer
Class Method Summary
collapse
Instance Method Summary
collapse
==, #==, #[], 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
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(id:, created_at:, name:) ⇒ Object
|
# File 'lib/orb/models/plan.rb', line 398
|
Instance Attribute Details
Adjustments for this plan. If the plan has phases, this includes adjustments
across all phases of the plan.
17
|
# File 'lib/orb/models/plan.rb', line 17
required :adjustments, -> { Orb::Internal::Type::ArrayOf[union: Orb::Plan::Adjustment] }
|
Legacy field representing the parent plan if the current plan is a 'child plan',
overriding prices from the parent.
26
|
# File 'lib/orb/models/plan.rb', line 26
required :base_plan, -> { Orb::Plan::BasePlan }, nil?: true
|
#base_plan_id ⇒ String?
Legacy field representing the parent plan ID if the current plan is a 'child
plan', overriding prices from the parent.
35
|
# File 'lib/orb/models/plan.rb', line 35
required :base_plan_id, String, nil?: true
|
#created_at ⇒ Time
40
|
# File 'lib/orb/models/plan.rb', line 40
required :created_at, Time
|
#currency ⇒ String
An ISO 4217 currency string or custom pricing unit (credits) for this plan's
prices.
49
|
# File 'lib/orb/models/plan.rb', line 49
required :currency, String
|
#default_invoice_memo ⇒ String?
The default memo text on the invoices corresponding to subscriptions on this
plan. Note that each subscription may configure its own memo.
56
|
# File 'lib/orb/models/plan.rb', line 56
required :default_invoice_memo, String, nil?: true
|
#description ⇒ String
61
|
# File 'lib/orb/models/plan.rb', line 61
required :description, String
|
67
|
# File 'lib/orb/models/plan.rb', line 67
required :discount, union: -> { Orb::Discount }, nil?: true
|
#external_plan_id ⇒ String?
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.
75
|
# File 'lib/orb/models/plan.rb', line 75
required :external_plan_id, String, nil?: true
|
#id ⇒ String
10
|
# File 'lib/orb/models/plan.rb', line 10
required :id, String
|
#invoicing_currency ⇒ String
An ISO 4217 currency string for which this plan is billed in. Matches currency
unless currency is a custom pricing unit.
82
|
# File 'lib/orb/models/plan.rb', line 82
required :invoicing_currency, String
|
88
|
# File 'lib/orb/models/plan.rb', line 88
required :maximum, -> { Orb::Maximum }, nil?: true
|
#maximum_amount ⇒ String?
94
|
# File 'lib/orb/models/plan.rb', line 94
required :maximum_amount, String, nil?: true
|
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.
103
|
# File 'lib/orb/models/plan.rb', line 103
required :metadata, Orb::Internal::Type::HashOf[String]
|
109
|
# File 'lib/orb/models/plan.rb', line 109
required :minimum, -> { Orb::Minimum }, nil?: true
|
#minimum_amount ⇒ String?
115
|
# File 'lib/orb/models/plan.rb', line 115
required :minimum_amount, String, nil?: true
|
#name ⇒ String
120
|
# File 'lib/orb/models/plan.rb', line 120
required :name, String
|
#net_terms ⇒ Integer?
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.
130
|
# File 'lib/orb/models/plan.rb', line 130
required :net_terms, Integer, nil?: true
|
135
|
# File 'lib/orb/models/plan.rb', line 135
required :plan_phases, -> { Orb::Internal::Type::ArrayOf[Orb::Plan::PlanPhase] }, nil?: true
|
Prices for this plan. If the plan has phases, this includes prices across all
phases of the plan.
142
|
# File 'lib/orb/models/plan.rb', line 142
required :prices, -> { Orb::Internal::Type::ArrayOf[union: Orb::Price] }
|
147
|
# File 'lib/orb/models/plan.rb', line 147
required :product, -> { Orb::Plan::Product }
|
152
|
# File 'lib/orb/models/plan.rb', line 152
required :status, enum: -> { Orb::Plan::Status }
|
157
|
# File 'lib/orb/models/plan.rb', line 157
required :trial_config, -> { Orb::Plan::TrialConfig }
|
#version ⇒ Integer
162
|
# File 'lib/orb/models/plan.rb', line 162
required :version, Integer
|
Class Method Details
.values ⇒ Array<Symbol>
|
# File 'lib/orb/models/plan.rb', line 551
|
|
# File 'lib/orb/models/plan.rb', line 416
|
Instance Method Details
#to_hash ⇒ {
107
|
# File 'sig/orb/models/plan.rbs', line 107
def to_hash: -> {
|