Class: ModernTreasury::Models::PaymentOrder
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- ModernTreasury::Models::PaymentOrder
- Defined in:
- lib/modern_treasury/models/payment_order.rb
Overview
Defined Under Namespace
Modules: ChargeBearer, Direction, ForeignExchangeIndicator, Priority, ReceivingAccountType, ReconciliationStatus, Status, UltimateOriginatingAccount, UltimateOriginatingAccountType Classes: Accounting, CurrentHold, ReferenceNumber
Instance Attribute Summary collapse
- #accounting ⇒ ModernTreasury::Models::PaymentOrder::Accounting deprecated Deprecated.
- #accounting_category_id ⇒ String? deprecated Deprecated.
- #accounting_ledger_class_id ⇒ String? deprecated Deprecated.
-
#amount ⇒ Integer
Value in specified currency’s smallest unit.
-
#charge_bearer ⇒ Symbol, ...
The party that will pay the fees for the payment order.
-
#counterparty_id ⇒ String?
If the payment order is tied to a specific Counterparty, their id will appear, otherwise ‘null`.
- #created_at ⇒ Time
-
#currency ⇒ Symbol, ModernTreasury::Models::Currency
Defaults to the currency of the originating account.
-
#current_hold ⇒ ModernTreasury::Models::PaymentOrder::CurrentHold?
If the payment order’s status is ‘held`, this will include the hold object’s data.
-
#current_return ⇒ ModernTreasury::Models::ReturnObject?
If the payment order’s status is ‘returned`, this will include the return object’s data.
-
#description ⇒ String?
An optional description for internal use.
-
#direction ⇒ Symbol, ModernTreasury::Models::PaymentOrder::Direction
One of ‘credit`, `debit`.
-
#effective_date ⇒ Date
Date transactions are to be posted to the participants’ account.
-
#expires_at ⇒ Time?
RFP payments require an expires_at.
-
#external_id ⇒ String?
An optional user-defined 180 character unique identifier.
-
#foreign_exchange_contract ⇒ String?
If present, indicates a specific foreign exchange contract number that has been generated by your financial institution.
-
#foreign_exchange_indicator ⇒ Symbol, ...
Indicates the type of FX transfer to initiate, can be either ‘variable_to_fixed`, `fixed_to_variable`, or `null` if the payment order currency matches the originating account currency.
-
#foreign_exchange_rate ⇒ ModernTreasury::Models::ForeignExchangeRate?
Associated serialized foreign exchange rate information.
- #id ⇒ String
-
#ledger_transaction_id ⇒ String?
The ID of the ledger transaction linked to the payment order.
-
#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.
-
#nsf_protected ⇒ Boolean
A boolean to determine if NSF Protection is enabled for this payment order.
- #object ⇒ String
-
#originating_account_id ⇒ String
The ID of one of your organization’s internal accounts.
-
#originating_party_name ⇒ String?
If present, this will replace your default company name on receiver’s bank statement.
-
#priority ⇒ Symbol, ModernTreasury::Models::PaymentOrder::Priority
Either ‘normal` or `high`.
-
#process_after ⇒ Time?
If present, Modern Treasury will not process the payment until after this time.
-
#purpose ⇒ String?
For ‘wire`, this is usually the purpose which is transmitted via the “InstrForDbtrAgt” field in the ISO20022 file.
-
#receiving_account_id ⇒ String
The receiving account ID.
- #receiving_account_type ⇒ Symbol, ModernTreasury::Models::PaymentOrder::ReceivingAccountType
-
#reconciliation_status ⇒ Symbol, ModernTreasury::Models::PaymentOrder::ReconciliationStatus
One of ‘unreconciled`, `tentatively_reconciled` or `reconciled`.
- #reference_numbers ⇒ Array<ModernTreasury::Models::PaymentOrder::ReferenceNumber>
-
#remittance_information ⇒ String?
For ‘ach`, this field will be passed through on an addenda record.
-
#send_remittance_advice ⇒ Boolean?
Send an email to the counterparty when the payment order is sent to the bank.
-
#statement_descriptor ⇒ String?
An optional descriptor which will appear in the receiver’s statement.
-
#status ⇒ Symbol, ModernTreasury::Models::PaymentOrder::Status
The current status of the payment order.
-
#subtype ⇒ Symbol, ...
An additional layer of classification for the type of payment order you are doing.
-
#transaction_ids ⇒ Array<String>
The IDs of all the transactions associated to this payment order.
-
#type ⇒ Symbol, ModernTreasury::Models::PaymentOrderType
One of ‘ach`, `se_bankgirot`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`, `bacs`, `au_becs`, `interac`, `neft`, `nics`, `nz_national_clearing_code`, `sic`, `signet`, `provexchange`, `zengin`.
-
#ultimate_originating_account ⇒ ModernTreasury::Models::VirtualAccount, ...
The account to which the originating of this payment should be attributed to.
-
#ultimate_originating_account_id ⇒ String?
The ultimate originating account ID.
- #ultimate_originating_account_type ⇒ Symbol, ...
-
#ultimate_originating_party_identifier ⇒ String?
Identifier of the ultimate originator of the payment order.
-
#ultimate_originating_party_name ⇒ String?
Name of the ultimate originator of the payment order.
- #ultimate_receiving_party_identifier ⇒ String?
- #ultimate_receiving_party_name ⇒ String?
- #updated_at ⇒ Time
-
#vendor_attributes ⇒ Object?
Additional vendor specific fields for this payment.
-
#vendor_failure_reason ⇒ String?
This field will be populated if a vendor failure occurs.
Class Method Summary collapse
- .values ⇒ Array<Symbol>
- .variants ⇒ Array(ModernTreasury::Models::VirtualAccount, ModernTreasury::Models::InternalAccount)
Instance Method Summary collapse
-
#initialize(account_id: nil, class_id: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see Accounting 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(account_id: nil, class_id: nil) ⇒ Object
Some parameter documentations has been truncated, see Accounting for more details.
|
|
# File 'lib/modern_treasury/models/payment_order.rb', line 359
|
Instance Attribute Details
#accounting ⇒ ModernTreasury::Models::PaymentOrder::Accounting
16 |
# File 'lib/modern_treasury/models/payment_order.rb', line 16 required :accounting, -> { ModernTreasury::PaymentOrder::Accounting } |
#accounting_category_id ⇒ String?
The ID of one of your accounting categories. Note that these will only be accessible if your accounting system has been connected.
25 |
# File 'lib/modern_treasury/models/payment_order.rb', line 25 required :accounting_category_id, String, nil?: true |
#accounting_ledger_class_id ⇒ String?
The ID of one of your accounting ledger classes. Note that these will only be accessible if your accounting system has been connected.
34 |
# File 'lib/modern_treasury/models/payment_order.rb', line 34 required :accounting_ledger_class_id, String, nil?: true |
#amount ⇒ Integer
Value in specified currency’s smallest unit. e.g. $10 would be represented as 1000 (cents). For RTP, the maximum amount allowed by the network is $100,000.
41 |
# File 'lib/modern_treasury/models/payment_order.rb', line 41 required :amount, Integer |
#charge_bearer ⇒ Symbol, ...
The party that will pay the fees for the payment order. See docs.moderntreasury.com/payments/docs/charge-bearer to understand the differences between the options.
49 |
# File 'lib/modern_treasury/models/payment_order.rb', line 49 required :charge_bearer, enum: -> { ModernTreasury::PaymentOrder::ChargeBearer }, nil?: true |
#counterparty_id ⇒ String?
If the payment order is tied to a specific Counterparty, their id will appear, otherwise ‘null`.
56 |
# File 'lib/modern_treasury/models/payment_order.rb', line 56 required :counterparty_id, String, nil?: true |
#created_at ⇒ Time
61 |
# File 'lib/modern_treasury/models/payment_order.rb', line 61 required :created_at, Time |
#currency ⇒ Symbol, ModernTreasury::Models::Currency
Defaults to the currency of the originating account.
67 |
# File 'lib/modern_treasury/models/payment_order.rb', line 67 required :currency, enum: -> { ModernTreasury::Currency } |
#current_hold ⇒ ModernTreasury::Models::PaymentOrder::CurrentHold?
If the payment order’s status is ‘held`, this will include the hold object’s data.
74 |
# File 'lib/modern_treasury/models/payment_order.rb', line 74 required :current_hold, -> { ModernTreasury::PaymentOrder::CurrentHold }, nil?: true |
#current_return ⇒ ModernTreasury::Models::ReturnObject?
If the payment order’s status is ‘returned`, this will include the return object’s data.
81 |
# File 'lib/modern_treasury/models/payment_order.rb', line 81 required :current_return, -> { ModernTreasury::ReturnObject }, nil?: true |
#description ⇒ String?
An optional description for internal use.
87 |
# File 'lib/modern_treasury/models/payment_order.rb', line 87 required :description, String, nil?: true |
#direction ⇒ Symbol, ModernTreasury::Models::PaymentOrder::Direction
One of ‘credit`, `debit`. Describes the direction money is flowing in the transaction. A `credit` moves money from your account to someone else’s. A ‘debit` pulls money from someone else’s account to your own. Note that wire, rtp, and check payments will always be ‘credit`.
96 |
# File 'lib/modern_treasury/models/payment_order.rb', line 96 required :direction, enum: -> { ModernTreasury::PaymentOrder::Direction } |
#effective_date ⇒ Date
Date transactions are to be posted to the participants’ account. Defaults to the current business day or the next business day if the current day is a bank holiday or weekend. Format: yyyy-mm-dd.
104 |
# File 'lib/modern_treasury/models/payment_order.rb', line 104 required :effective_date, Date |
#expires_at ⇒ Time?
RFP payments require an expires_at. This value must be past the effective_date.
110 |
# File 'lib/modern_treasury/models/payment_order.rb', line 110 required :expires_at, Time, nil?: true |
#external_id ⇒ String?
An optional user-defined 180 character unique identifier.
116 |
# File 'lib/modern_treasury/models/payment_order.rb', line 116 required :external_id, String, nil?: true |
#foreign_exchange_contract ⇒ String?
If present, indicates a specific foreign exchange contract number that has been generated by your financial institution.
123 |
# File 'lib/modern_treasury/models/payment_order.rb', line 123 required :foreign_exchange_contract, String, nil?: true |
#foreign_exchange_indicator ⇒ Symbol, ...
Indicates the type of FX transfer to initiate, can be either ‘variable_to_fixed`, `fixed_to_variable`, or `null` if the payment order currency matches the originating account currency.
131 132 133 |
# File 'lib/modern_treasury/models/payment_order.rb', line 131 required :foreign_exchange_indicator, enum: -> { ModernTreasury::PaymentOrder::ForeignExchangeIndicator }, nil?: true |
#foreign_exchange_rate ⇒ ModernTreasury::Models::ForeignExchangeRate?
Associated serialized foreign exchange rate information.
139 |
# File 'lib/modern_treasury/models/payment_order.rb', line 139 required :foreign_exchange_rate, -> { ModernTreasury::ForeignExchangeRate }, nil?: true |
#id ⇒ String
10 |
# File 'lib/modern_treasury/models/payment_order.rb', line 10 required :id, String |
#ledger_transaction_id ⇒ String?
The ID of the ledger transaction linked to the payment order.
145 |
# File 'lib/modern_treasury/models/payment_order.rb', line 145 required :ledger_transaction_id, String, nil?: true |
#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.
152 |
# File 'lib/modern_treasury/models/payment_order.rb', line 152 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.
159 |
# File 'lib/modern_treasury/models/payment_order.rb', line 159 required :metadata, ModernTreasury::Internal::Type::HashOf[String] |
#nsf_protected ⇒ Boolean
A boolean to determine if NSF Protection is enabled for this payment order. Note that this setting must also be turned on in your organization settings page.
166 |
# File 'lib/modern_treasury/models/payment_order.rb', line 166 required :nsf_protected, ModernTreasury::Internal::Type::Boolean |
#object ⇒ String
171 |
# File 'lib/modern_treasury/models/payment_order.rb', line 171 required :object, String |
#originating_account_id ⇒ String
The ID of one of your organization’s internal accounts.
177 |
# File 'lib/modern_treasury/models/payment_order.rb', line 177 required :originating_account_id, String |
#originating_party_name ⇒ String?
If present, this will replace your default company name on receiver’s bank statement. This field can only be used for ACH payments currently. For ACH, only the first 16 characters of this string will be used. Any additional characters will be truncated.
186 |
# File 'lib/modern_treasury/models/payment_order.rb', line 186 required :originating_party_name, String, nil?: true |
#priority ⇒ Symbol, ModernTreasury::Models::PaymentOrder::Priority
Either ‘normal` or `high`. For ACH and EFT payments, `high` represents a same-day ACH or EFT transfer, respectively. For check payments, `high` can mean an overnight check rather than standard mail.
194 |
# File 'lib/modern_treasury/models/payment_order.rb', line 194 required :priority, enum: -> { ModernTreasury::PaymentOrder::Priority } |
#process_after ⇒ Time?
If present, Modern Treasury will not process the payment until after this time. If ‘process_after` is past the cutoff for `effective_date`, `process_after` will take precedence and `effective_date` will automatically update to reflect the earliest possible sending date after `process_after`. Format is ISO8601 timestamp.
204 |
# File 'lib/modern_treasury/models/payment_order.rb', line 204 required :process_after, Time, nil?: true |
#purpose ⇒ String?
For ‘wire`, this is usually the purpose which is transmitted via the “InstrForDbtrAgt” field in the ISO20022 file. For `eft`, this field is the 3 digit CPA Code that will be attached to the payment.
212 |
# File 'lib/modern_treasury/models/payment_order.rb', line 212 required :purpose, String, nil?: true |
#receiving_account_id ⇒ String
The receiving account ID. Can be an ‘external_account` or `internal_account`.
218 |
# File 'lib/modern_treasury/models/payment_order.rb', line 218 required :receiving_account_id, String |
#receiving_account_type ⇒ Symbol, ModernTreasury::Models::PaymentOrder::ReceivingAccountType
223 |
# File 'lib/modern_treasury/models/payment_order.rb', line 223 required :receiving_account_type, enum: -> { ModernTreasury::PaymentOrder::ReceivingAccountType } |
#reconciliation_status ⇒ Symbol, ModernTreasury::Models::PaymentOrder::ReconciliationStatus
One of ‘unreconciled`, `tentatively_reconciled` or `reconciled`.
229 |
# File 'lib/modern_treasury/models/payment_order.rb', line 229 required :reconciliation_status, enum: -> { ModernTreasury::PaymentOrder::ReconciliationStatus } |
#reference_numbers ⇒ Array<ModernTreasury::Models::PaymentOrder::ReferenceNumber>
234 235 |
# File 'lib/modern_treasury/models/payment_order.rb', line 234 required :reference_numbers, -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::PaymentOrder::ReferenceNumber] } |
#remittance_information ⇒ String?
For ‘ach`, this field will be passed through on an addenda record. For `wire` payments the field will be passed through as the “Originator to Beneficiary Information”, also known as OBI or Fedwire tag 6000.
243 |
# File 'lib/modern_treasury/models/payment_order.rb', line 243 required :remittance_information, String, nil?: true |
#send_remittance_advice ⇒ Boolean?
Send an email to the counterparty when the payment order is sent to the bank. If ‘null`, `send_remittance_advice` on the Counterparty is used.
250 |
# File 'lib/modern_treasury/models/payment_order.rb', line 250 required :send_remittance_advice, ModernTreasury::Internal::Type::Boolean, nil?: true |
#statement_descriptor ⇒ String?
An optional descriptor which will appear in the receiver’s statement. For ‘check` payments this field will be used as the memo line. For `ach` the maximum length is 10 characters. Note that for ACH payments, the name on your bank account will be included automatically by the bank, so you can use the characters for other useful information. For `eft` the maximum length is 15 characters.
261 |
# File 'lib/modern_treasury/models/payment_order.rb', line 261 required :statement_descriptor, String, nil?: true |
#status ⇒ Symbol, ModernTreasury::Models::PaymentOrder::Status
The current status of the payment order.
267 |
# File 'lib/modern_treasury/models/payment_order.rb', line 267 required :status, enum: -> { ModernTreasury::PaymentOrder::Status } |
#subtype ⇒ Symbol, ...
An additional layer of classification for the type of payment order you are doing. This field is only used for ‘ach` payment orders currently. For `ach` payment orders, the `subtype` represents the SEC code. We currently support `CCD`, `PPD`, `IAT`, `CTX`, `WEB`, `CIE`, and `TEL`.
276 |
# File 'lib/modern_treasury/models/payment_order.rb', line 276 required :subtype, enum: -> { ModernTreasury::PaymentOrderSubtype }, nil?: true |
#transaction_ids ⇒ Array<String>
The IDs of all the transactions associated to this payment order. Usually, you will only have a single transaction ID. However, if a payment order initially results in a Return, but gets redrafted and is later successfully completed, it can have many transactions.
285 |
# File 'lib/modern_treasury/models/payment_order.rb', line 285 required :transaction_ids, ModernTreasury::Internal::Type::ArrayOf[String] |
#type ⇒ Symbol, ModernTreasury::Models::PaymentOrderType
One of ‘ach`, `se_bankgirot`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`, `bacs`, `au_becs`, `interac`, `neft`, `nics`, `nz_national_clearing_code`, `sic`, `signet`, `provexchange`, `zengin`.
293 |
# File 'lib/modern_treasury/models/payment_order.rb', line 293 required :type, enum: -> { ModernTreasury::PaymentOrderType } |
#ultimate_originating_account ⇒ ModernTreasury::Models::VirtualAccount, ...
The account to which the originating of this payment should be attributed to. Can be a ‘virtual_account` or `internal_account`.
300 301 302 |
# File 'lib/modern_treasury/models/payment_order.rb', line 300 required :ultimate_originating_account, union: -> { ModernTreasury::PaymentOrder::UltimateOriginatingAccount }, nil?: true |
#ultimate_originating_account_id ⇒ String?
The ultimate originating account ID. Can be a ‘virtual_account` or `internal_account`.
309 |
# File 'lib/modern_treasury/models/payment_order.rb', line 309 required :ultimate_originating_account_id, String, nil?: true |
#ultimate_originating_account_type ⇒ Symbol, ...
314 315 316 |
# File 'lib/modern_treasury/models/payment_order.rb', line 314 required :ultimate_originating_account_type, enum: -> { ModernTreasury::PaymentOrder::UltimateOriginatingAccountType }, nil?: true |
#ultimate_originating_party_identifier ⇒ String?
Identifier of the ultimate originator of the payment order.
322 |
# File 'lib/modern_treasury/models/payment_order.rb', line 322 required :ultimate_originating_party_identifier, String, nil?: true |
#ultimate_originating_party_name ⇒ String?
Name of the ultimate originator of the payment order.
328 |
# File 'lib/modern_treasury/models/payment_order.rb', line 328 required :ultimate_originating_party_name, String, nil?: true |
#ultimate_receiving_party_identifier ⇒ String?
333 |
# File 'lib/modern_treasury/models/payment_order.rb', line 333 required :ultimate_receiving_party_identifier, String, nil?: true |
#ultimate_receiving_party_name ⇒ String?
338 |
# File 'lib/modern_treasury/models/payment_order.rb', line 338 required :ultimate_receiving_party_name, String, nil?: true |
#updated_at ⇒ Time
343 |
# File 'lib/modern_treasury/models/payment_order.rb', line 343 required :updated_at, Time |
#vendor_attributes ⇒ Object?
Additional vendor specific fields for this payment. Data must be represented as key-value pairs.
350 |
# File 'lib/modern_treasury/models/payment_order.rb', line 350 required :vendor_attributes, ModernTreasury::Internal::Type::Unknown, nil?: true |
#vendor_failure_reason ⇒ String?
This field will be populated if a vendor failure occurs. Logic shouldn’t be built on its value as it is free-form.
357 |
# File 'lib/modern_treasury/models/payment_order.rb', line 357 required :vendor_failure_reason, String, nil?: true |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/modern_treasury/models/payment_order.rb', line 507
|
.variants ⇒ Array(ModernTreasury::Models::VirtualAccount, ModernTreasury::Models::InternalAccount)
|
|
# File 'lib/modern_treasury/models/payment_order.rb', line 916
|