Module: Orb::Models::Plan::Adjustment

Extended by:
Internal::Type::Union
Defined in:
lib/orb/models/plan.rb

Instance Method Summary collapse

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: , adjustments: , base_plan: , base_plan_id: , created_at: , currency: , default_invoice_memo: , description: , discount: , external_plan_id: , invoicing_currency: , maximum: , maximum_amount: , metadata: , minimum: , minimum_amount: , name: , net_terms: , plan_phases: , prices: , product: , status: , trial_config: , version: ) ⇒ Object

Some parameter documentations has been truncated, see Orb::Models::Plan for more details.

The [Plan](/core-concepts#plan-and-price) 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](/reference/price).

Parameters:



215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
# File 'lib/orb/models/plan.rb', line 215

module Adjustment
  extend Orb::Internal::Type::Union

  discriminator :adjustment_type

  variant :usage_discount, -> { Orb::PlanPhaseUsageDiscountAdjustment }

  variant :amount_discount, -> { Orb::PlanPhaseAmountDiscountAdjustment }

  variant :percentage_discount, -> { Orb::PlanPhasePercentageDiscountAdjustment }

  variant :minimum, -> { Orb::PlanPhaseMinimumAdjustment }

  variant :maximum, -> { Orb::PlanPhaseMaximumAdjustment }

  # @!method self.variants
  #   @return [Array(Orb::Models::PlanPhaseUsageDiscountAdjustment, Orb::Models::PlanPhaseAmountDiscountAdjustment, Orb::Models::PlanPhasePercentageDiscountAdjustment, Orb::Models::PlanPhaseMinimumAdjustment, Orb::Models::PlanPhaseMaximumAdjustment)]
end