Class: ModernTreasury::Models::ReturnObject

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/modern_treasury/models/return_object.rb

Overview

Defined Under Namespace

Modules: Code, ReconciliationStatus, ReturnableType, Role, Status, Type Classes: Corrections, ReferenceNumber

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(account_number: nil, company_id: nil, company_name: nil, individual_identification_number: nil, routing_number: nil, transaction_code: nil) ⇒ Object

Some parameter documentations has been truncated, see Corrections for more details.

Only relevant for ACH NOC returns. This is an object containing all of the new and corrected information provided by the bank that was previously incorrect on the original outgoing payment.

Parameters:

  • account_number (String, nil) (defaults to: nil)

    The updated account number that should replace the one originally used on the ou

  • company_id (String, nil) (defaults to: nil)

    The updated company ID that should replace the one originally used on the outgoi

  • company_name (String, nil) (defaults to: nil)

    The updated company name that should replace the one originally used on the outg

  • individual_identification_number (String, nil) (defaults to: nil)

    The updated individual identification number that should replace the one origina

  • routing_number (String, nil) (defaults to: nil)

    The updated routing number that should replace the one originally used on the ou

  • transaction_code (String, nil) (defaults to: nil)

    The updated account type code that should replace the one originally used on the



# File 'lib/modern_treasury/models/return_object.rb', line 175


Instance Attribute Details

#additional_informationString?

Some returns may include additional information from the bank. In these cases, this string will be present.

Returns:

  • (String, nil)


167
# File 'lib/modern_treasury/models/return_object.rb', line 167

optional :additional_information, String, nil?: true

#amountInteger

Value in specified currency’s smallest unit. e.g. $10 would be represented as 1000.

Returns:

  • (Integer)


17
# File 'lib/modern_treasury/models/return_object.rb', line 17

required :amount, Integer

#codeSymbol, ...

The return code. For ACH returns, this is the required ACH return code.



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

required :code, enum: -> { ModernTreasury::ReturnObject::Code }, nil?: true

#correctionsModernTreasury::Models::ReturnObject::Corrections?

Only relevant for ACH NOC returns. This is an object containing all of the new and corrected information provided by the bank that was previously incorrect on the original outgoing payment.



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

required :corrections, -> { ModernTreasury::ReturnObject::Corrections }, nil?: true

#created_atTime

Returns:

  • (Time)


36
# File 'lib/modern_treasury/models/return_object.rb', line 36

required :created_at, Time

#currencySymbol, ModernTreasury::Models::Currency

Currency that this transaction is denominated in.



42
# File 'lib/modern_treasury/models/return_object.rb', line 42

required :currency, enum: -> { ModernTreasury::Currency }

#current_returnModernTreasury::Models::ReturnObject?

If the return’s status is ‘returned`, this will include the return object’s data that is returning this return.



49
# File 'lib/modern_treasury/models/return_object.rb', line 49

required :current_return, -> { ModernTreasury::ReturnObject }, nil?: true

#dataObject?

The raw data from the return file that we get from the bank.

Returns:

  • (Object, nil)


173
# File 'lib/modern_treasury/models/return_object.rb', line 173

optional :data, ModernTreasury::Internal::Type::Unknown, nil?: true

#date_of_deathDate?

If the return code is ‘R14` or `R15` this is the date the deceased counterparty passed away.

Returns:

  • (Date, nil)


56
# File 'lib/modern_treasury/models/return_object.rb', line 56

required :date_of_death, Date, nil?: true

#discarded_atTime?

Returns:

  • (Time, nil)


61
# File 'lib/modern_treasury/models/return_object.rb', line 61

required :discarded_at, Time, nil?: true

#failure_reasonString?

If an originating return failed to be processed by the bank, a description of the failure reason will be available.

Returns:

  • (String, nil)


68
# File 'lib/modern_treasury/models/return_object.rb', line 68

required :failure_reason, String, nil?: true

#idString

Returns:

  • (String)


10
# File 'lib/modern_treasury/models/return_object.rb', line 10

required :id, String

#internal_account_idString?

The ID of the relevant Internal Account.

Returns:

  • (String, nil)


74
# File 'lib/modern_treasury/models/return_object.rb', line 74

required :internal_account_id, String, nil?: true

#ledger_transaction_idString?

The ID of the ledger transaction linked to the return.

Returns:

  • (String, nil)


80
# File 'lib/modern_treasury/models/return_object.rb', line 80

required :ledger_transaction_id, String, nil?: true

#live_modeBoolean

This field will be true if this object exists in the live environment or false if it exists in the test environment.

Returns:

  • (Boolean)


87
# File 'lib/modern_treasury/models/return_object.rb', line 87

required :live_mode, ModernTreasury::Internal::Type::Boolean

#objectString

Returns:

  • (String)


92
# File 'lib/modern_treasury/models/return_object.rb', line 92

required :object, String

#reasonString?

Often the bank will provide an explanation for the return, which is a short human readable string.

Returns:

  • (String, nil)


99
# File 'lib/modern_treasury/models/return_object.rb', line 99

required :reason, String, nil?: true

#reconciliation_statusSymbol, ModernTreasury::Models::ReturnObject::ReconciliationStatus

One of ‘unreconciled`, `tentatively_reconciled` or `reconciled`.



105
# File 'lib/modern_treasury/models/return_object.rb', line 105

required :reconciliation_status, enum: -> { ModernTreasury::ReturnObject::ReconciliationStatus }

#reference_numbersArray<ModernTreasury::Models::ReturnObject::ReferenceNumber>

An array of Payment Reference objects.



111
112
# File 'lib/modern_treasury/models/return_object.rb', line 111

required :reference_numbers,
-> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::ReturnObject::ReferenceNumber] }

#returnable_idString?

The ID of the object being returned or ‘null`.

Returns:

  • (String, nil)


118
# File 'lib/modern_treasury/models/return_object.rb', line 118

required :returnable_id, String, nil?: true

#returnable_typeSymbol, ...

The type of object being returned or ‘null`.



124
# File 'lib/modern_treasury/models/return_object.rb', line 124

required :returnable_type, enum: -> { ModernTreasury::ReturnObject::ReturnableType }, nil?: true

#roleSymbol, ModernTreasury::Models::ReturnObject::Role

The role of the return, can be ‘originating` or `receiving`.



130
# File 'lib/modern_treasury/models/return_object.rb', line 130

required :role, enum: -> { ModernTreasury::ReturnObject::Role }

#statusSymbol, ModernTreasury::Models::ReturnObject::Status

The current status of the return.



136
# File 'lib/modern_treasury/models/return_object.rb', line 136

required :status, enum: -> { ModernTreasury::ReturnObject::Status }

#transaction_idString?

The ID of the relevant Transaction or ‘null`.

Returns:

  • (String, nil)


142
# File 'lib/modern_treasury/models/return_object.rb', line 142

required :transaction_id, String, nil?: true

#transaction_line_item_idString?

The ID of the relevant Transaction Line Item or ‘null`.

Returns:

  • (String, nil)


148
# File 'lib/modern_treasury/models/return_object.rb', line 148

required :transaction_line_item_id, String, nil?: true

#typeSymbol, ModernTreasury::Models::ReturnObject::Type

The type of return. Can be one of: ‘ach`, `ach_noc`, `au_becs`, `bacs`, `eft`, `interac`, `manual`, `paper_item`, `wire`.



155
# File 'lib/modern_treasury/models/return_object.rb', line 155

required :type, enum: -> { ModernTreasury::ReturnObject::Type }

#updated_atTime

Returns:

  • (Time)


160
# File 'lib/modern_treasury/models/return_object.rb', line 160

required :updated_at, Time

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/modern_treasury/models/return_object.rb', line 333