Class: MetronomeSDK::Models::SpendThresholdConfigurationV2::DiscountConfiguration::Cap

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

Overview

See Also:

  • MetronomeSDK::Models::SpendThresholdConfigurationV2::DiscountConfiguration#cap

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(amount:, spend_tracker_alias:) ⇒ Cap

If provided, the discount stops applying once the spend tracker has accumulated this much spend in the billing period.

Parameters:

  • amount (Float)

    Accumulated spend ceiling above which the discount stops applying.

  • spend_tracker_alias (String)

    Alias of the spend tracker this cap is measured against.

  • amount: (Float)
  • spend_tracker_alias: (String)


# File 'lib/metronome_sdk/models/spend_threshold_configuration_v2.rb', line 91

Instance Attribute Details

#amountFloat

Accumulated spend ceiling above which the discount stops applying.

Parameters:

  • value (Float)

Returns:

  • (Float)


83
# File 'lib/metronome_sdk/models/spend_threshold_configuration_v2.rb', line 83

required :amount, Float

#spend_tracker_aliasString

Alias of the spend tracker this cap is measured against.

Parameters:

  • value (String)

Returns:

  • (String)


89
# File 'lib/metronome_sdk/models/spend_threshold_configuration_v2.rb', line 89

required :spend_tracker_alias, String

Instance Method Details

#to_hash{ amount: Float, spend_tracker_alias: String }

Returns:

  • ({ amount: Float, spend_tracker_alias: String })


77
# File 'sig/metronome_sdk/models/spend_threshold_configuration_v2.rbs', line 77

def to_hash: -> { amount: Float, spend_tracker_alias: String }