Class: MetronomeSDK::Models::PrepaidBalanceThresholdConfigurationV2

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rb

Defined Under Namespace

Classes: Commit, DiscountConfiguration

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(applicable_product_ids: nil, applicable_product_tags: nil, specifiers: nil) ⇒ Object

Some parameter documentations has been truncated, see Commit for more details.

Parameters:

  • applicable_product_ids (Array<String>) (defaults to: nil)

    Which products the threshold commit applies to. If applicable_product_ids, appli

  • applicable_product_tags (Array<String>) (defaults to: nil)

    Which tags the threshold commit applies to. If applicable_product_ids, applicabl

  • specifiers (Array<MetronomeSDK::Models::CommitSpecifierInput>) (defaults to: nil)

    List of filters that determine what kind of customer usage draws down a commit o



# File 'lib/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rb', line 50

Instance Attribute Details

#commitMetronomeSDK::Models::PrepaidBalanceThresholdConfigurationV2::Commit



9
# File 'lib/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rb', line 9

required :commit, -> { MetronomeSDK::PrepaidBalanceThresholdConfigurationV2::Commit }

#custom_credit_type_idString?

If provided, the threshold, recharge-to amount, and the resulting threshold commit amount will be in terms of this credit type instead of the fiat currency.

Returns:

  • (String, nil)


42
# File 'lib/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rb', line 42

optional :custom_credit_type_id, String

#discount_configurationMetronomeSDK::Models::PrepaidBalanceThresholdConfigurationV2::DiscountConfiguration?



47
48
# File 'lib/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rb', line 47

optional :discount_configuration,
-> { MetronomeSDK::PrepaidBalanceThresholdConfigurationV2::DiscountConfiguration }

#is_enabledBoolean

When set to false, the contract will not be evaluated against the threshold_amount. Toggling to true will result an immediate evaluation, regardless of prior state.

Returns:

  • (Boolean)


17
# File 'lib/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rb', line 17

required :is_enabled, MetronomeSDK::Internal::Type::Boolean

#payment_gate_configMetronomeSDK::Models::PaymentGateConfigV2



22
# File 'lib/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rb', line 22

required :payment_gate_config, -> { MetronomeSDK::PaymentGateConfigV2 }

#recharge_to_amountFloat

Specify the amount the balance should be recharged to.

Returns:

  • (Float)


28
# File 'lib/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rb', line 28

required :recharge_to_amount, Float

#threshold_amountFloat

Specify the threshold amount for the contract. Each time the contract’s balance lowers to this amount, a threshold charge will be initiated.

Returns:

  • (Float)


35
# File 'lib/metronome_sdk/models/prepaid_balance_threshold_configuration_v2.rb', line 35

required :threshold_amount, Float