Class: Stigg::Models::V1::Events::CreditGetAutoRechargeResponse::Data

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/stigg/models/v1/events/credit_get_auto_recharge_response.rb

Overview

See Also:

Defined Under Namespace

Modules: GrantExpirationPeriod, ThresholdType

Instance Attribute Summary collapse

Class Method 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:, created_at:, currency_id:, customer_id:, grant_expiration_period:, is_enabled:, max_spend_limit:, target_balance:, threshold_type:, threshold_value:, updated_at:) ⇒ Object

Automatic recharge configuration for a customer and currency

Parameters:

  • id (String, nil)

    The unique configuration ID

  • created_at (Time, nil)

    Timestamp of when the record was created

  • currency_id (String)

    The currency ID for this configuration

  • customer_id (String)

    The customer ID this configuration belongs to

  • grant_expiration_period (Symbol, Stigg::Models::V1::Events::CreditGetAutoRechargeResponse::Data::GrantExpirationPeriod)

    Expiration period for auto-recharge grants (1_MONTH or 1_YEAR)

  • is_enabled (Boolean)

    Whether automatic recharge is enabled

  • max_spend_limit (Float, nil)

    Maximum monthly spend limit for automatic recharges

  • target_balance (Float)

    The target credit balance to recharge to

  • threshold_type (Symbol, Stigg::Models::V1::Events::CreditGetAutoRechargeResponse::Data::ThresholdType)

    The threshold type (CREDIT_AMOUNT or DOLLAR_AMOUNT)

  • threshold_value (Float)

    The threshold value that triggers a recharge

  • updated_at (Time, nil)

    Timestamp of when the record was last updated



# File 'lib/stigg/models/v1/events/credit_get_auto_recharge_response.rb', line 92

Instance Attribute Details

#created_atTime?

Timestamp of when the record was created

Returns:

  • (Time, nil)


32
# File 'lib/stigg/models/v1/events/credit_get_auto_recharge_response.rb', line 32

required :created_at, Time, api_name: :createdAt, nil?: true

#currency_idString

The currency ID for this configuration

Returns:

  • (String)


38
# File 'lib/stigg/models/v1/events/credit_get_auto_recharge_response.rb', line 38

required :currency_id, String, api_name: :currencyId

#customer_idString

The customer ID this configuration belongs to

Returns:

  • (String)


44
# File 'lib/stigg/models/v1/events/credit_get_auto_recharge_response.rb', line 44

required :customer_id, String, api_name: :customerId

#grant_expiration_periodSymbol, Stigg::Models::V1::Events::CreditGetAutoRechargeResponse::Data::GrantExpirationPeriod

Expiration period for auto-recharge grants (1_MONTH or 1_YEAR)



50
51
52
# File 'lib/stigg/models/v1/events/credit_get_auto_recharge_response.rb', line 50

required :grant_expiration_period,
enum: -> { Stigg::Models::V1::Events::CreditGetAutoRechargeResponse::Data::GrantExpirationPeriod },
api_name: :grantExpirationPeriod

#idString?

The unique configuration ID

Returns:

  • (String, nil)


26
# File 'lib/stigg/models/v1/events/credit_get_auto_recharge_response.rb', line 26

required :id, String, nil?: true

#is_enabledBoolean

Whether automatic recharge is enabled

Returns:

  • (Boolean)


58
# File 'lib/stigg/models/v1/events/credit_get_auto_recharge_response.rb', line 58

required :is_enabled, Stigg::Internal::Type::Boolean, api_name: :isEnabled

#max_spend_limitFloat?

Maximum monthly spend limit for automatic recharges

Returns:

  • (Float, nil)


64
# File 'lib/stigg/models/v1/events/credit_get_auto_recharge_response.rb', line 64

required :max_spend_limit, Float, api_name: :maxSpendLimit, nil?: true

#target_balanceFloat

The target credit balance to recharge to

Returns:

  • (Float)


70
# File 'lib/stigg/models/v1/events/credit_get_auto_recharge_response.rb', line 70

required :target_balance, Float, api_name: :targetBalance

#threshold_typeSymbol, Stigg::Models::V1::Events::CreditGetAutoRechargeResponse::Data::ThresholdType

The threshold type (CREDIT_AMOUNT or DOLLAR_AMOUNT)



76
77
78
# File 'lib/stigg/models/v1/events/credit_get_auto_recharge_response.rb', line 76

required :threshold_type,
enum: -> { Stigg::Models::V1::Events::CreditGetAutoRechargeResponse::Data::ThresholdType },
api_name: :thresholdType

#threshold_valueFloat

The threshold value that triggers a recharge

Returns:

  • (Float)


84
# File 'lib/stigg/models/v1/events/credit_get_auto_recharge_response.rb', line 84

required :threshold_value, Float, api_name: :thresholdValue

#updated_atTime?

Timestamp of when the record was last updated

Returns:

  • (Time, nil)


90
# File 'lib/stigg/models/v1/events/credit_get_auto_recharge_response.rb', line 90

required :updated_at, Time, api_name: :updatedAt, nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/stigg/models/v1/events/credit_get_auto_recharge_response.rb', line 126