Class: ModernTreasury::Models::PaymentOrders::ReversalCreateParams

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

Overview

See Also:

  • ModernTreasury::Resources::PaymentOrders::Reversals#create

Defined Under Namespace

Modules: Reason

Constant Summary collapse

ModernTreasury =

Returns:

  • (:LedgerTransactionCreateRequest)

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(payment_order_id:, reason:, ledger_transaction: nil, metadata: nil, request_options: {}) ⇒ Object

Some parameter documentations has been truncated, see ModernTreasury::Models::PaymentOrders::ReversalCreateParams for more details.

Parameters:



# File 'lib/modern_treasury/models/payment_orders/reversal_create_params.rb', line 40

Instance Attribute Details

#ledger_transaction ⇒ ModernTreasury::Models::LedgerTransactionCreateRequest?

Specifies a ledger transaction object that will be created with the reversal. If the ledger transaction cannot be created, then the reversal creation will fail. The resulting ledger transaction will mirror the status of the reversal.



31
# File 'lib/modern_treasury/models/payment_orders/reversal_create_params.rb', line 31

optional :ledger_transaction, -> { ModernTreasury::LedgerTransactionCreateRequest }

#metadata ⇒ Hash{Symbol=>String}?

Additional data represented as key-value pairs. Both the key and value must be strings.

Parameters:

  • (::Hash[Symbol, String])

Returns:

  • (Hash{Symbol=>String}, nil)


38
# File 'lib/modern_treasury/models/payment_orders/reversal_create_params.rb', line 38

optional :metadata, ModernTreasury::Internal::Type::HashOf[String]

#payment_order_id ⇒ String

The id of the payment order being reversed.

Parameters:

  • value (String)

Returns:

  • (String)


15
# File 'lib/modern_treasury/models/payment_orders/reversal_create_params.rb', line 15

required :payment_order_id, String

#reason ⇒ Symbol, ModernTreasury::Models::PaymentOrders::ReversalCreateParams::Reason

The reason for the reversal. Must be one of duplicate, incorrect_amount, incorrect_receiving_account, date_earlier_than_intended, date_later_than_intended.

Parameters:

  • value (ModernTreasury::Models::PaymentOrders::ReversalCreateParams::reason)

Returns:



23
# File 'lib/modern_treasury/models/payment_orders/reversal_create_params.rb', line 23

required :reason, enum: -> { ModernTreasury::PaymentOrders::ReversalCreateParams::Reason }

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


39
# File 'sig/modern_treasury/models/payment_orders/reversal_create_params.rbs', line 39

def to_hash: -> {