Class: Orb::Models::Plan::Adjustment::TieredPercentageDiscount

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

Defined Under Namespace

Classes: Filter, Tier

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 ⇒ Object



177
# File 'sig/orb/models/plan.rbs', line 177

def initialize: (

Instance Attribute Details

#adjustment_type ⇒ Symbol, :tiered_percentage_discount

Parameters:

  • value (:tiered_percentage_discount)

Returns:

  • (Symbol, :tiered_percentage_discount)


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

required :adjustment_type, const: :tiered_percentage_discount

#applies_to_price_ids ⇒ Array<String>

Deprecated.

The price IDs that this adjustment applies to.

Parameters:

  • value (::Array[String])

Returns:

  • (Array<String>)


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

required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]

#filters ⇒ Array<Orb::Models::Plan::Adjustment::TieredPercentageDiscount::Filter>

The filters that determine which prices to apply this adjustment to.

Parameters:

  • value (::Array[Orb::Plan::Adjustment::TieredPercentageDiscount::Filter])

Returns:



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

required :filters,
-> { Orb::Internal::Type::ArrayOf[Orb::Plan::Adjustment::TieredPercentageDiscount::Filter] }

#id ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


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

required :id, String

#is_invoice_level ⇒ Boolean

True for adjustments that apply to an entire invoice, false for adjustments that apply to only one price.

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


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

required :is_invoice_level, Orb::Internal::Type::Boolean

#plan_phase_order ⇒ Integer?

The plan phase in which this adjustment is active.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


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

required :plan_phase_order, Integer, nil?: true

#reason ⇒ String?

The reason for the adjustment.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

required :reason, String, nil?: true

#replaces_adjustment_id ⇒ String?

The adjustment id this adjustment replaces. This adjustment will take the place of the replaced adjustment in plan version migrations.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

required :replaces_adjustment_id, String, nil?: true

#tiers ⇒ Array<Orb::Models::Plan::Adjustment::TieredPercentageDiscount::Tier>

The ordered, contiguous bands of cumulative eligible spend, each discounted at its own percentage (progressive fill-a-tier), applied to the prices this adjustment covers in a given billing period.

Parameters:

  • value (::Array[Orb::Plan::Adjustment::TieredPercentageDiscount::Tier])

Returns:



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

required :tiers,
-> { Orb::Internal::Type::ArrayOf[Orb::Plan::Adjustment::TieredPercentageDiscount::Tier] }

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


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

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


189
# File 'sig/orb/models/plan.rbs', line 189

def to_hash: -> {