Class: MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdatePrepaidBalanceThresholdConfiguration

Inherits:
Internal::Type::BaseModel
  • Object
show all
Defined in:
lib/metronome_sdk/models/v2/contract_edit_response.rb,
sig/metronome_sdk/models/v2/contract_edit_response.rbs

Overview

See Also:

  • MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit#update_prepaid_balance_threshold_configuration

Defined Under Namespace

Classes: Commit, DiscountConfiguration, ThresholdBalanceSpecifier

Constant Summary collapse

MetronomeSDK =

Returns:

  • (:PaymentGateConfigV2)

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:) ⇒ Object

Update the discount cap. Set to null to remove an existing cap.

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.



# File 'lib/metronome_sdk/models/v2/contract_edit_response.rb', line 3374

Instance Attribute Details

#commitMetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdatePrepaidBalanceThresholdConfiguration::Commit?



3318
3319
# File 'lib/metronome_sdk/models/v2/contract_edit_response.rb', line 3318

optional :commit,
-> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdatePrepaidBalanceThresholdConfiguration::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.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


3326
# File 'lib/metronome_sdk/models/v2/contract_edit_response.rb', line 3326

optional :custom_credit_type_id, String, nil?: true

#discount_configurationMetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdatePrepaidBalanceThresholdConfiguration::DiscountConfiguration?



3331
3332
3333
# File 'lib/metronome_sdk/models/v2/contract_edit_response.rb', line 3331

optional :discount_configuration,
-> { MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdatePrepaidBalanceThresholdConfiguration::DiscountConfiguration },
nil?: true

#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.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


3341
# File 'lib/metronome_sdk/models/v2/contract_edit_response.rb', line 3341

optional :is_enabled, MetronomeSDK::Internal::Type::Boolean

#payment_gate_configMetronomeSDK::Models::PaymentGateConfigV2?



3346
# File 'lib/metronome_sdk/models/v2/contract_edit_response.rb', line 3346

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

#recharge_to_amountFloat?

Specify the amount the balance should be recharged to.

Parameters:

  • (Float)

Returns:

  • (Float, nil)


3352
# File 'lib/metronome_sdk/models/v2/contract_edit_response.rb', line 3352

optional :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.

Parameters:

  • (Float)

Returns:

  • (Float, nil)


3359
# File 'lib/metronome_sdk/models/v2/contract_edit_response.rb', line 3359

optional :threshold_amount, Float

#threshold_balance_specifiersArray<MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier>?

Determines which balances are excluded from remaining balance calculation for threshold billing.



3366
3367
3368
3369
3370
3371
3372
# File 'lib/metronome_sdk/models/v2/contract_edit_response.rb', line 3366

optional :threshold_balance_specifiers,
-> do
  MetronomeSDK::Internal::Type::ArrayOf[
    MetronomeSDK::Models::V2::ContractEditResponse::Data::Edit::UpdatePrepaidBalanceThresholdConfiguration::ThresholdBalanceSpecifier
  ]
end,
nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


3285
# File 'sig/metronome_sdk/models/v2/contract_edit_response.rbs', line 3285

def to_hash: -> {