Class: Orb::Models::PlanPhaseAmountDiscountAdjustment

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

Defined Under Namespace

Modules: AdjustmentType Classes: Filter

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:, adjustment_type:, amount_discount:, applies_to_price_ids:, filters:, is_invoice_level:, plan_phase_order:, reason:, replaces_adjustment_id:) ⇒ Object

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

Parameters:

  • id (String)
  • adjustment_type (Symbol, Orb::Models::PlanPhaseAmountDiscountAdjustment::AdjustmentType)
  • amount_discount (String)

    The amount by which to discount the prices this adjustment applies to in a given

  • applies_to_price_ids (Array<String>)

    The price IDs that this adjustment applies to.

  • filters (Array<Orb::Models::PlanPhaseAmountDiscountAdjustment::Filter>)

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

  • is_invoice_level (Boolean)

    True for adjustments that apply to an entire invoice, false for adjustments that

  • plan_phase_order (Integer, nil)

    The plan phase in which this adjustment is active.

  • reason (String, nil)

    The reason for the adjustment.

  • replaces_adjustment_id (String, nil)

    The adjustment id this adjustment replaces. This adjustment will take the place



# File 'lib/orb/models/plan_phase_amount_discount_adjustment.rb', line 63

Instance Attribute Details

#adjustment_typeSymbol, Orb::Models::PlanPhaseAmountDiscountAdjustment::AdjustmentType

Parameters:

  • value (Orb::Models::PlanPhaseAmountDiscountAdjustment::adjustment_type)

Returns:



14
# File 'lib/orb/models/plan_phase_amount_discount_adjustment.rb', line 14

required :adjustment_type, enum: -> { Orb::PlanPhaseAmountDiscountAdjustment::AdjustmentType }

#amount_discountString

The amount by which to discount the prices this adjustment applies to in a given billing period.

Parameters:

  • value (String)

Returns:

  • (String)


21
# File 'lib/orb/models/plan_phase_amount_discount_adjustment.rb', line 21

required :amount_discount, String

#applies_to_price_idsArray<String>

Deprecated.

The price IDs that this adjustment applies to.

Parameters:

  • value (::Array[String])

Returns:

  • (Array<String>)


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

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

#filtersArray<Orb::Models::PlanPhaseAmountDiscountAdjustment::Filter>

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

Parameters:

  • value (::Array[Orb::PlanPhaseAmountDiscountAdjustment::Filter])

Returns:



35
# File 'lib/orb/models/plan_phase_amount_discount_adjustment.rb', line 35

required :filters, -> { Orb::Internal::Type::ArrayOf[Orb::PlanPhaseAmountDiscountAdjustment::Filter] }

#idString

Parameters:

  • value (String)

Returns:

  • (String)


9
# File 'lib/orb/models/plan_phase_amount_discount_adjustment.rb', line 9

required :id, String

#is_invoice_levelBoolean

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

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


42
# File 'lib/orb/models/plan_phase_amount_discount_adjustment.rb', line 42

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

#plan_phase_orderInteger?

The plan phase in which this adjustment is active.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


48
# File 'lib/orb/models/plan_phase_amount_discount_adjustment.rb', line 48

required :plan_phase_order, Integer, nil?: true

#reasonString?

The reason for the adjustment.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


54
# File 'lib/orb/models/plan_phase_amount_discount_adjustment.rb', line 54

required :reason, String, nil?: true

#replaces_adjustment_idString?

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)


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

required :replaces_adjustment_id, String, nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/orb/models/plan_phase_amount_discount_adjustment.rb', line 91

Instance Method Details

#to_hash{

Returns:

  • ({)


47
# File 'sig/orb/models/plan_phase_amount_discount_adjustment.rbs', line 47

def to_hash: -> {