Class: ModernTreasury::Models::Transaction
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- ModernTreasury::Models::Transaction
- Defined in:
- lib/modern_treasury/models/transaction.rb
Overview
Defined Under Namespace
Modules: Type, VendorCodeType
Instance Attribute Summary collapse
-
#amount ⇒ Integer
Value in specified currency’s smallest unit.
-
#as_of_date ⇒ Date?
The date on which the transaction occurred.
-
#as_of_time ⇒ Time?
The time on which the transaction occurred.
-
#as_of_timezone ⇒ String?
The timezone in which the ‘as_of_time` is represented.
- #created_at ⇒ Time
-
#currency ⇒ Symbol, ModernTreasury::Models::Currency
Currency that this transaction is denominated in.
-
#custom_identifiers ⇒ Hash{Symbol=>String}
An object containing key-value pairs, each with a custom identifier as the key and a string value.
-
#details ⇒ Hash{Symbol=>String}?
This field contains additional information that the bank provided about the transaction.
-
#direction ⇒ String
Either ‘credit` or `debit`.
- #discarded_at ⇒ Time?
-
#foreign_exchange_rate ⇒ ModernTreasury::Models::ForeignExchangeRate?
Associated serialized foreign exchange rate information.
- #id ⇒ String
-
#internal_account_id ⇒ String
The ID of the relevant Internal Account.
-
#live_mode ⇒ Boolean
This field will be true if this object exists in the live environment or false if it exists in the test environment.
-
#metadata ⇒ Hash{Symbol=>String}
Additional data represented as key-value pairs.
- #object ⇒ String
-
#posted ⇒ Boolean
This field will be ‘true` if the transaction has posted to the account.
-
#reconciled ⇒ Boolean
This field will be ‘true` if a transaction is reconciled by the Modern Treasury system.
-
#type ⇒ Symbol, ModernTreasury::Models::Transaction::Type
The type of the transaction.
- #updated_at ⇒ Time
-
#vendor_code ⇒ String?
When applicable, the bank-given code that determines the transaction’s category.
-
#vendor_code_type ⇒ Symbol, ...
The type of ‘vendor_code` being reported.
-
#vendor_customer_id ⇒ String?
An identifier given to this transaction by the bank, often ‘null`.
-
#vendor_description ⇒ String?
The transaction detail text that often appears in on your bank statement and in your banking portal.
-
#vendor_id ⇒ String?
An identifier given to this transaction by the bank.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id: , amount: , as_of_date: , as_of_time: , as_of_timezone: , created_at: , currency: , custom_identifiers: , direction: , discarded_at: , foreign_exchange_rate: , internal_account_id: , live_mode: , metadata: , object: , posted: , reconciled: , type: , updated_at: , vendor_code: , vendor_code_type: , vendor_customer_id: , vendor_id: , details: nil, vendor_description: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see Transaction for more details.
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: , amount: , as_of_date: , as_of_time: , as_of_timezone: , created_at: , currency: , custom_identifiers: , direction: , discarded_at: , foreign_exchange_rate: , internal_account_id: , live_mode: , metadata: , object: , posted: , reconciled: , type: , updated_at: , vendor_code: , vendor_code_type: , vendor_customer_id: , vendor_id: , details: nil, vendor_description: nil) ⇒ Object
Some parameter documentations has been truncated, see ModernTreasury::Models::Transaction for more details.
|
|
# File 'lib/modern_treasury/models/transaction.rb', line 172
|
Instance Attribute Details
#amount ⇒ Integer
Value in specified currency’s smallest unit. e.g. $10 would be represented as 1000.
17 |
# File 'lib/modern_treasury/models/transaction.rb', line 17 required :amount, Integer |
#as_of_date ⇒ Date?
The date on which the transaction occurred.
23 |
# File 'lib/modern_treasury/models/transaction.rb', line 23 required :as_of_date, Date, nil?: true |
#as_of_time ⇒ Time?
The time on which the transaction occurred. Depending on the granularity of the timestamp information received from the bank, it may be ‘null`.
30 |
# File 'lib/modern_treasury/models/transaction.rb', line 30 required :as_of_time, Time, nil?: true |
#as_of_timezone ⇒ String?
The timezone in which the ‘as_of_time` is represented. Can be `null` if the bank does not provide timezone info.
37 |
# File 'lib/modern_treasury/models/transaction.rb', line 37 required :as_of_timezone, String, nil?: true |
#created_at ⇒ Time
42 |
# File 'lib/modern_treasury/models/transaction.rb', line 42 required :created_at, Time |
#currency ⇒ Symbol, ModernTreasury::Models::Currency
Currency that this transaction is denominated in.
48 |
# File 'lib/modern_treasury/models/transaction.rb', line 48 required :currency, enum: -> { ModernTreasury::Currency } |
#custom_identifiers ⇒ Hash{Symbol=>String}
An object containing key-value pairs, each with a custom identifier as the key and a string value.
55 |
# File 'lib/modern_treasury/models/transaction.rb', line 55 required :custom_identifiers, ModernTreasury::Internal::Type::HashOf[String] |
#details ⇒ Hash{Symbol=>String}?
This field contains additional information that the bank provided about the transaction. This is structured data. Some of the data in here might overlap with what is in the ‘vendor_description`. For example, the OBI could be a part of the vendor description, and it would also be included in here. The attributes that are passed through the details field will vary based on your banking partner. Currently, the following keys may be in the details object: `originator_name`, `originator_to_beneficiary_information`.
163 |
# File 'lib/modern_treasury/models/transaction.rb', line 163 optional :details, ModernTreasury::Internal::Type::HashOf[String] |
#direction ⇒ String
Either ‘credit` or `debit`.
61 |
# File 'lib/modern_treasury/models/transaction.rb', line 61 required :direction, String |
#discarded_at ⇒ Time?
66 |
# File 'lib/modern_treasury/models/transaction.rb', line 66 required :discarded_at, Time, nil?: true |
#foreign_exchange_rate ⇒ ModernTreasury::Models::ForeignExchangeRate?
Associated serialized foreign exchange rate information.
72 |
# File 'lib/modern_treasury/models/transaction.rb', line 72 required :foreign_exchange_rate, -> { ModernTreasury::ForeignExchangeRate }, nil?: true |
#id ⇒ String
10 |
# File 'lib/modern_treasury/models/transaction.rb', line 10 required :id, String |
#internal_account_id ⇒ String
The ID of the relevant Internal Account.
78 |
# File 'lib/modern_treasury/models/transaction.rb', line 78 required :internal_account_id, String |
#live_mode ⇒ Boolean
This field will be true if this object exists in the live environment or false if it exists in the test environment.
85 |
# File 'lib/modern_treasury/models/transaction.rb', line 85 required :live_mode, ModernTreasury::Internal::Type::Boolean |
#metadata ⇒ Hash{Symbol=>String}
Additional data represented as key-value pairs. Both the key and value must be strings.
92 |
# File 'lib/modern_treasury/models/transaction.rb', line 92 required :metadata, ModernTreasury::Internal::Type::HashOf[String] |
#object ⇒ String
97 |
# File 'lib/modern_treasury/models/transaction.rb', line 97 required :object, String |
#posted ⇒ Boolean
This field will be ‘true` if the transaction has posted to the account.
103 |
# File 'lib/modern_treasury/models/transaction.rb', line 103 required :posted, ModernTreasury::Internal::Type::Boolean |
#reconciled ⇒ Boolean
This field will be ‘true` if a transaction is reconciled by the Modern Treasury system. This means that it has transaction line items that sum up to the transaction’s amount.
111 |
# File 'lib/modern_treasury/models/transaction.rb', line 111 required :reconciled, ModernTreasury::Internal::Type::Boolean |
#type ⇒ Symbol, ModernTreasury::Models::Transaction::Type
The type of the transaction. Examples could be ‘card, `ach`, `wire`, `check`, `rtp`, `book`, or `sen`.
118 |
# File 'lib/modern_treasury/models/transaction.rb', line 118 required :type, enum: -> { ModernTreasury::Transaction::Type } |
#updated_at ⇒ Time
123 |
# File 'lib/modern_treasury/models/transaction.rb', line 123 required :updated_at, Time |
#vendor_code ⇒ String?
When applicable, the bank-given code that determines the transaction’s category. For most banks this is the BAI2/BTRS transaction code.
130 |
# File 'lib/modern_treasury/models/transaction.rb', line 130 required :vendor_code, String, nil?: true |
#vendor_code_type ⇒ Symbol, ...
The type of ‘vendor_code` being reported. Can be one of `bai2`, `bankprov`, `bnk_dev`, `cleartouch`, `currencycloud`, `cross_river`, `dc_bank`, `dwolla`, `evolve`, `goldman_sachs`, `iso20022`, `jpmc`, `mx`, `signet`, `silvergate`, `swift`, `us_bank`, or others.
139 |
# File 'lib/modern_treasury/models/transaction.rb', line 139 required :vendor_code_type, enum: -> { ModernTreasury::Transaction::VendorCodeType }, nil?: true |
#vendor_customer_id ⇒ String?
An identifier given to this transaction by the bank, often ‘null`.
145 |
# File 'lib/modern_treasury/models/transaction.rb', line 145 required :vendor_customer_id, String, nil?: true |
#vendor_description ⇒ String?
The transaction detail text that often appears in on your bank statement and in your banking portal.
170 |
# File 'lib/modern_treasury/models/transaction.rb', line 170 optional :vendor_description, String, nil?: true |
#vendor_id ⇒ String?
An identifier given to this transaction by the bank.
151 |
# File 'lib/modern_treasury/models/transaction.rb', line 151 required :vendor_id, String, nil?: true |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/modern_treasury/models/transaction.rb', line 270
|