Class: Straddle::Models::ChargeConfiguration

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

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(balance_check:, auto_hold: nil, auto_hold_message: nil, sandbox_outcome: nil) ⇒ Object

Parameters:

  • balance_check (Symbol, Straddle::Models::BalanceCheckMode) —

    Balance check mode to use before processing the charge.

  • auto_hold (Boolean, nil) (defaults to: nil) —

    Whether to place the charge on hold automatically after creation.

  • auto_hold_message (String, nil) (defaults to: nil) —

    Reason for placing the charge on hold automatically.

  • sandbox_outcome (Symbol, Straddle::Models::SimulatedPaymentOutcome) (defaults to: nil) —

    Payment will simulate processing if not Standard.



# File 'lib/straddle/models/charge_configuration.rb', line 30

Instance Attribute Details

#auto_hold ⇒ Boolean?

Whether to place the charge on hold automatically after creation.

Parameters:

  • value (Boolean, nil)

Returns:

  • (Boolean, nil)


16
# File 'lib/straddle/models/charge_configuration.rb', line 16

optional :auto_hold, Straddle::Internal::Type::Boolean, nil?: true

#auto_hold_message ⇒ String?

Reason for placing the charge on hold automatically.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


22
# File 'lib/straddle/models/charge_configuration.rb', line 22

optional :auto_hold_message, String, nil?: true

#balance_check ⇒ Symbol, Straddle::Models::BalanceCheckMode

Balance check mode to use before processing the charge.

Parameters:

  • value (Straddle::Models::balance_check_mode)

Returns:



10
# File 'lib/straddle/models/charge_configuration.rb', line 10

required :balance_check, enum: -> { Straddle::BalanceCheckMode }

#sandbox_outcome ⇒ Symbol, ...

Payment will simulate processing if not Standard.



28
# File 'lib/straddle/models/charge_configuration.rb', line 28

optional :sandbox_outcome, enum: -> { Straddle::SimulatedPaymentOutcome }

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


31
# File 'sig/straddle/models/charge_configuration.rbs', line 31

def to_hash: -> {