Class: MetronomeSDK::Models::V1::Customers::PlanAddParams::PriceAdjustment

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/metronome_sdk/models/v1/customers/plan_add_params.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(adjustment_type: , charge_id: , start_period: , quantity: nil, tier: nil, value: nil) ⇒ Object

Some parameter documentations has been truncated, see MetronomeSDK::Models::V1::Customers::PlanAddParams::PriceAdjustment for more details.

Parameters:

  • adjustment_type (Symbol, MetronomeSDK::Models::V1::Customers::PlanAddParams::PriceAdjustment::AdjustmentType) (defaults to: )
  • charge_id (String) (defaults to: )
  • start_period (Float) (defaults to: )

    Used in price ramps. Indicates how many billing periods pass before the charge

  • quantity (Float) (defaults to: nil)

    the overridden quantity for a fixed charge

  • tier (Float) (defaults to: nil)

    Used in pricing tiers. Indicates at what metric value the price applies.

  • value (Float) (defaults to: nil)

    The amount of change to a price. Percentage and fixed adjustments can be positiv



# File 'lib/metronome_sdk/models/v1/customers/plan_add_params.rb', line 155

Instance Attribute Details

#adjustment_typeSymbol, MetronomeSDK::Models::V1::Customers::PlanAddParams::PriceAdjustment::AdjustmentType



120
121
# File 'lib/metronome_sdk/models/v1/customers/plan_add_params.rb', line 120

required :adjustment_type,
enum: -> { MetronomeSDK::V1::Customers::PlanAddParams::PriceAdjustment::AdjustmentType }

#charge_idString

Returns:

  • (String)


126
# File 'lib/metronome_sdk/models/v1/customers/plan_add_params.rb', line 126

required :charge_id, String

#quantityFloat?

the overridden quantity for a fixed charge

Returns:

  • (Float, nil)


139
# File 'lib/metronome_sdk/models/v1/customers/plan_add_params.rb', line 139

optional :quantity, Float

#start_periodFloat

Used in price ramps. Indicates how many billing periods pass before the charge applies.

Returns:

  • (Float)


133
# File 'lib/metronome_sdk/models/v1/customers/plan_add_params.rb', line 133

required :start_period, Float

#tierFloat?

Used in pricing tiers. Indicates at what metric value the price applies.

Returns:

  • (Float, nil)


145
# File 'lib/metronome_sdk/models/v1/customers/plan_add_params.rb', line 145

optional :tier, Float

#valueFloat?

The amount of change to a price. Percentage and fixed adjustments can be positive or negative. Percentage-based adjustments should be decimals, e.g. -0.05 for a 5% discount.

Returns:

  • (Float, nil)


153
# File 'lib/metronome_sdk/models/v1/customers/plan_add_params.rb', line 153

optional :value, Float