Class: Orb::Models::PlanPhaseUsageDiscountAdjustment

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

Defined Under Namespace

Modules: AdjustmentType

Instance Attribute 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: , applies_to_price_ids: , filters: , is_invoice_level: , plan_phase_order: , reason: , replaces_adjustment_id: , usage_discount: ) ⇒ Object

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

Parameters:

  • id (String) (defaults to: )
  • adjustment_type (Symbol, Orb::Models::PlanPhaseUsageDiscountAdjustment::AdjustmentType) (defaults to: )
  • applies_to_price_ids (Array<String>) (defaults to: )

    The price IDs that this adjustment applies to.

  • filters (Array<Orb::Models::TransformPriceFilter>) (defaults to: )

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

  • is_invoice_level (Boolean) (defaults to: )

    True for adjustments that apply to an entire invocice, false for adjustments tha

  • plan_phase_order (Integer, nil) (defaults to: )

    The plan phase in which this adjustment is active.

  • reason (String, nil) (defaults to: )

    The reason for the adjustment.

  • replaces_adjustment_id (String, nil) (defaults to: )

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

  • usage_discount (Float) (defaults to: )

    The number of usage units by which to discount the price this adjustment applies



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

Instance Attribute Details

#adjustment_typeSymbol, Orb::Models::PlanPhaseUsageDiscountAdjustment::AdjustmentType



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

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

#applies_to_price_idsArray<String>

Deprecated.

The price IDs that this adjustment applies to.

Returns:

  • (Array<String>)


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

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

#filtersArray<Orb::Models::TransformPriceFilter>

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



28
# File 'lib/orb/models/plan_phase_usage_discount_adjustment.rb', line 28

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

#idString

Returns:

  • (String)


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

required :id, String

#is_invoice_levelBoolean

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

Returns:

  • (Boolean)


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

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

#plan_phase_orderInteger?

The plan phase in which this adjustment is active.

Returns:

  • (Integer, nil)


41
# File 'lib/orb/models/plan_phase_usage_discount_adjustment.rb', line 41

required :plan_phase_order, Integer, nil?: true

#reasonString?

The reason for the adjustment.

Returns:

  • (String, nil)


47
# File 'lib/orb/models/plan_phase_usage_discount_adjustment.rb', line 47

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.

Returns:

  • (String, nil)


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

required :replaces_adjustment_id, String, nil?: true

#usage_discountFloat

The number of usage units by which to discount the price this adjustment applies to in a given billing period.

Returns:

  • (Float)


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

required :usage_discount, Float