Class: Lithic::Models::TransactionSimulateClearingParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/lithic/models/transaction_simulate_clearing_params.rb,
sig/lithic/models/transaction_simulate_clearing_params.rbs

Overview

See Also:

  • Lithic::Resources::Transactions#simulate_clearing

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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(token:, amount: nil, request_options: {}) ⇒ Object

Some parameter documentations has been truncated, see Lithic::Models::TransactionSimulateClearingParams for more details.

Parameters:

  • token (String)

    The transaction token returned from the /v1/simulate/authorize response.

  • amount (Integer) (defaults to: nil)

    Amount (in cents) to clear. Typically this will match the amount in the original

  • request_options (Lithic::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


# File 'lib/lithic/models/transaction_simulate_clearing_params.rb', line 31

Instance Attribute Details

#amountInteger?

Amount (in cents) to clear. Typically this will match the amount in the original authorization, but can be higher or lower. The sign of this amount will automatically match the sign of the original authorization's amount. For example, entering 100 in this field will result in a -100 amount in the transaction, if the original authorization is a credit authorization.

If amount is not set, the full amount of the transaction will be cleared. This endpoint may be called multiple times against the same authorization to simulate a multiple-completion scenario, with each call creating a separate clearing event.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


29
# File 'lib/lithic/models/transaction_simulate_clearing_params.rb', line 29

optional :amount, Integer

#tokenString

The transaction token returned from the /v1/simulate/authorize response.

Parameters:

  • value (String)

Returns:

  • (String)


14
# File 'lib/lithic/models/transaction_simulate_clearing_params.rb', line 14

required :token, String

Instance Method Details

#to_hash{

Returns:

  • ({)


23
# File 'sig/lithic/models/transaction_simulate_clearing_params.rbs', line 23

def to_hash: -> {