Class: Orb::Models::Plan

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/orb/models/plan.rb

Overview

Defined Under Namespace

Modules: Adjustment, Status Classes: BasePlan, PlanPhase, Product, TrialConfig

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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(id: , created_at: , name: ) ⇒ Object

Parameters:

  • id (String) (defaults to: )
  • created_at (Time) (defaults to: )
  • name (String) (defaults to: )


# File 'lib/orb/models/plan.rb', line 254

Instance Attribute Details

#adjustmentsArray<Orb::Models::PlanPhaseUsageDiscountAdjustment, Orb::Models::PlanPhaseAmountDiscountAdjustment, Orb::Models::PlanPhasePercentageDiscountAdjustment, Orb::Models::PlanPhaseMinimumAdjustment, Orb::Models::PlanPhaseMaximumAdjustment>

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] }

#base_planOrb::Models::Plan::BasePlan?

Returns:



22
# File 'lib/orb/models/plan.rb', line 22

required :base_plan, -> { Orb::Plan::BasePlan }, nil?: true

#base_plan_idString?

The parent plan id if the given plan was created by overriding one or more of the parent’s prices

Returns:

  • (String, nil)


29
# File 'lib/orb/models/plan.rb', line 29

required :base_plan_id, String, nil?: true

#created_atTime

Returns:

  • (Time)


34
# File 'lib/orb/models/plan.rb', line 34

required :created_at, Time

#currencyString

Deprecated.

An ISO 4217 currency string or custom pricing unit (‘credits`) for this plan’s prices.

Returns:

  • (String)


43
# File 'lib/orb/models/plan.rb', line 43

required :currency, String

#default_invoice_memoString?

The default memo text on the invoices corresponding to subscriptions on this plan. Note that each subscription may configure its own memo.

Returns:

  • (String, nil)


50
# File 'lib/orb/models/plan.rb', line 50

required :default_invoice_memo, String, nil?: true

#descriptionString

Returns:

  • (String)


55
# File 'lib/orb/models/plan.rb', line 55

required :description, String

#discountOrb::Models::PercentageDiscount, ...

Deprecated.


61
# File 'lib/orb/models/plan.rb', line 61

required :discount, union: -> { Orb::Discount }, nil?: true

#external_plan_idString?

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.

Returns:

  • (String, nil)


69
# File 'lib/orb/models/plan.rb', line 69

required :external_plan_id, String, nil?: true

#idString

Returns:

  • (String)


10
# File 'lib/orb/models/plan.rb', line 10

required :id, String

#invoicing_currencyString

An ISO 4217 currency string for which this plan is billed in. Matches ‘currency` unless `currency` is a custom pricing unit.

Returns:

  • (String)


76
# File 'lib/orb/models/plan.rb', line 76

required :invoicing_currency, String

#maximumOrb::Models::Maximum?

Deprecated.

Returns:



82
# File 'lib/orb/models/plan.rb', line 82

required :maximum, -> { Orb::Maximum }, nil?: true

#maximum_amountString?

Deprecated.

Returns:

  • (String, nil)


88
# File 'lib/orb/models/plan.rb', line 88

required :maximum_amount, String, nil?: true

#metadataHash{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`.

Returns:

  • (Hash{Symbol=>String})


97
# File 'lib/orb/models/plan.rb', line 97

required :metadata, Orb::Internal::Type::HashOf[String]

#minimumOrb::Models::Minimum?

Deprecated.

Returns:



103
# File 'lib/orb/models/plan.rb', line 103

required :minimum, -> { Orb::Minimum }, nil?: true

#minimum_amountString?

Deprecated.

Returns:

  • (String, nil)


109
# File 'lib/orb/models/plan.rb', line 109

required :minimum_amount, String, nil?: true

#nameString

Returns:

  • (String)


114
# File 'lib/orb/models/plan.rb', line 114

required :name, String

#net_termsInteger?

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.

Returns:

  • (Integer, nil)


124
# File 'lib/orb/models/plan.rb', line 124

required :net_terms, Integer, nil?: true

#plan_phasesArray<Orb::Models::Plan::PlanPhase>?

Returns:



129
# File 'lib/orb/models/plan.rb', line 129

required :plan_phases, -> { Orb::Internal::Type::ArrayOf[Orb::Plan::PlanPhase] }, nil?: true

#pricesArray<Orb::Models::Price::Unit, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::Tiered, Orb::Models::Price::TieredBPS, Orb::Models::Price::BPS, Orb::Models::Price::BulkBPS, Orb::Models::Price::Bulk, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::GroupedWithMinMaxThresholds>

Prices for this plan. If the plan has phases, this includes prices across all phases of the plan.



136
# File 'lib/orb/models/plan.rb', line 136

required :prices, -> { Orb::Internal::Type::ArrayOf[union: Orb::Price] }

#productOrb::Models::Plan::Product



141
# File 'lib/orb/models/plan.rb', line 141

required :product, -> { Orb::Plan::Product }

#statusSymbol, Orb::Models::Plan::Status

Returns:



146
# File 'lib/orb/models/plan.rb', line 146

required :status, enum: -> { Orb::Plan::Status }

#trial_configOrb::Models::Plan::TrialConfig



151
# File 'lib/orb/models/plan.rb', line 151

required :trial_config, -> { Orb::Plan::TrialConfig }

#versionInteger

Returns:

  • (Integer)


156
# File 'lib/orb/models/plan.rb', line 156

required :version, Integer

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/orb/models/plan.rb', line 360