Class: ModernTreasury::Models::PaymentOrder
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- ModernTreasury::Models::PaymentOrder
- Defined in:
- lib/modern_treasury/models/payment_order.rb,
sig/modern_treasury/models/payment_order.rbs
Overview
Defined Under Namespace
Modules: ChargeBearer, Direction, ForeignExchangeIndicator, OriginatingAccountType, Priority, ReceivingAccountType, ReconciliationStatus, Status, UltimateOriginatingAccount, UltimateOriginatingAccountType Classes: Accounting, CurrentHold, OriginatingPartyAddress, ReferenceNumber
Constant Summary collapse
- ModernTreasury =
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.
-
#batch_id ⇒ String?
The ID of the batch in which the payment order is included.
-
#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, ornullif 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_account_type ⇒ Symbol, ModernTreasury::Models::PaymentOrder::OriginatingAccountType
-
#originating_party_address ⇒ ModernTreasury::Models::PaymentOrder::OriginatingPartyAddress?
If present, this address will override the default originating party address used on the payment order.
-
#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
normalorhigh. -
#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_reconciledorreconciled. - #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,book,rtp,sepa,bacs,au_becs,neft,nics,nz_national_clearing_code,sic,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(country: nil, line1: nil, line2: nil, locality: nil, postal_code: nil, region: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see OriginatingPartyAddress for more details.
- #to_hash ⇒ {
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(country: nil, line1: nil, line2: nil, locality: nil, postal_code: nil, region: nil) ⇒ Object
Some parameter documentations has been truncated, see OriginatingPartyAddress for more details.
If present, this address will override the default originating party address used on the payment order. This works across all payment types.
|
|
# File 'lib/modern_treasury/models/payment_order.rb', line 379
|
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 $10,000,000.
41 |
# File 'lib/modern_treasury/models/payment_order.rb', line 41 required :amount, Integer |
#batch_id ⇒ String?
The ID of the batch in which the payment order is included. Only populated after the payment order begins processing.
48 |
# File 'lib/modern_treasury/models/payment_order.rb', line 48 required :batch_id, String, nil?: true |
#charge_bearer ⇒ Symbol, ...
The party that will pay the fees for the payment order. See https://docs.moderntreasury.com/payments/docs/charge-bearer to understand the differences between the options.
56 |
# File 'lib/modern_treasury/models/payment_order.rb', line 56 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.
63 |
# File 'lib/modern_treasury/models/payment_order.rb', line 63 required :counterparty_id, String, nil?: true |
#created_at ⇒ Time
68 |
# File 'lib/modern_treasury/models/payment_order.rb', line 68 required :created_at, Time |
#currency ⇒ Symbol, ModernTreasury::Models::Currency
Defaults to the currency of the originating account.
74 |
# File 'lib/modern_treasury/models/payment_order.rb', line 74 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.
81 |
# File 'lib/modern_treasury/models/payment_order.rb', line 81 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.
88 |
# File 'lib/modern_treasury/models/payment_order.rb', line 88 required :current_return, -> { ModernTreasury::ReturnObject }, nil?: true |
#description ⇒ String?
An optional description for internal use.
94 |
# File 'lib/modern_treasury/models/payment_order.rb', line 94 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.
103 |
# File 'lib/modern_treasury/models/payment_order.rb', line 103 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.
111 |
# File 'lib/modern_treasury/models/payment_order.rb', line 111 required :effective_date, Date |
#expires_at ⇒ Time?
RFP payments require an expires_at. This value must be past the effective_date.
117 |
# File 'lib/modern_treasury/models/payment_order.rb', line 117 required :expires_at, Time, nil?: true |
#external_id ⇒ String?
An optional user-defined 180 character unique identifier.
123 |
# File 'lib/modern_treasury/models/payment_order.rb', line 123 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.
130 |
# File 'lib/modern_treasury/models/payment_order.rb', line 130 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.
138 139 140 |
# File 'lib/modern_treasury/models/payment_order.rb', line 138 required :foreign_exchange_indicator, enum: -> { ModernTreasury::PaymentOrder::ForeignExchangeIndicator }, nil?: true |
#foreign_exchange_rate ⇒ ModernTreasury::Models::ForeignExchangeRate?
Associated serialized foreign exchange rate information.
146 |
# File 'lib/modern_treasury/models/payment_order.rb', line 146 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.
152 |
# File 'lib/modern_treasury/models/payment_order.rb', line 152 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.
159 |
# File 'lib/modern_treasury/models/payment_order.rb', line 159 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.
166 |
# File 'lib/modern_treasury/models/payment_order.rb', line 166 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.
173 |
# File 'lib/modern_treasury/models/payment_order.rb', line 173 required :nsf_protected, ModernTreasury::Internal::Type::Boolean |
#object ⇒ String
178 |
# File 'lib/modern_treasury/models/payment_order.rb', line 178 required :object, String |
#originating_account_id ⇒ String
The ID of one of your organization's internal accounts.
184 |
# File 'lib/modern_treasury/models/payment_order.rb', line 184 required :originating_account_id, String |
#originating_account_type ⇒ Symbol, ModernTreasury::Models::PaymentOrder::OriginatingAccountType
189 |
# File 'lib/modern_treasury/models/payment_order.rb', line 189 required :originating_account_type, enum: -> { ModernTreasury::PaymentOrder::OriginatingAccountType } |
#originating_party_address ⇒ ModernTreasury::Models::PaymentOrder::OriginatingPartyAddress?
If present, this address will override the default originating party address used on the payment order. This works across all payment types.
196 197 198 |
# File 'lib/modern_treasury/models/payment_order.rb', line 196 required :originating_party_address, -> { ModernTreasury::PaymentOrder::OriginatingPartyAddress }, nil?: true |
#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.
207 |
# File 'lib/modern_treasury/models/payment_order.rb', line 207 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.
215 |
# File 'lib/modern_treasury/models/payment_order.rb', line 215 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.
225 |
# File 'lib/modern_treasury/models/payment_order.rb', line 225 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.
233 |
# File 'lib/modern_treasury/models/payment_order.rb', line 233 required :purpose, String, nil?: true |
#receiving_account_id ⇒ String
The receiving account ID. Can be an external_account or internal_account.
239 |
# File 'lib/modern_treasury/models/payment_order.rb', line 239 required :receiving_account_id, String |
#receiving_account_type ⇒ Symbol, ModernTreasury::Models::PaymentOrder::ReceivingAccountType
244 |
# File 'lib/modern_treasury/models/payment_order.rb', line 244 required :receiving_account_type, enum: -> { ModernTreasury::PaymentOrder::ReceivingAccountType } |
#reconciliation_status ⇒ Symbol, ModernTreasury::Models::PaymentOrder::ReconciliationStatus
One of unreconciled, tentatively_reconciled or reconciled.
250 |
# File 'lib/modern_treasury/models/payment_order.rb', line 250 required :reconciliation_status, enum: -> { ModernTreasury::PaymentOrder::ReconciliationStatus } |
#reference_numbers ⇒ Array<ModernTreasury::Models::PaymentOrder::ReferenceNumber>
255 256 |
# File 'lib/modern_treasury/models/payment_order.rb', line 255 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.
264 |
# File 'lib/modern_treasury/models/payment_order.rb', line 264 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.
271 |
# File 'lib/modern_treasury/models/payment_order.rb', line 271 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.
282 |
# File 'lib/modern_treasury/models/payment_order.rb', line 282 required :statement_descriptor, String, nil?: true |
#status ⇒ Symbol, ModernTreasury::Models::PaymentOrder::Status
The current status of the payment order.
288 |
# File 'lib/modern_treasury/models/payment_order.rb', line 288 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.
297 |
# File 'lib/modern_treasury/models/payment_order.rb', line 297 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.
306 |
# File 'lib/modern_treasury/models/payment_order.rb', line 306 required :transaction_ids, ModernTreasury::Internal::Type::ArrayOf[String] |
#type ⇒ Symbol, ModernTreasury::Models::PaymentOrderType
One of ach, se_bankgirot, eft, wire, check, book, rtp, sepa,
bacs, au_becs, neft, nics, nz_national_clearing_code, sic, zengin.
313 |
# File 'lib/modern_treasury/models/payment_order.rb', line 313 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.
320 321 322 |
# File 'lib/modern_treasury/models/payment_order.rb', line 320 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.
329 |
# File 'lib/modern_treasury/models/payment_order.rb', line 329 required :ultimate_originating_account_id, String, nil?: true |
#ultimate_originating_account_type ⇒ Symbol, ...
334 335 336 |
# File 'lib/modern_treasury/models/payment_order.rb', line 334 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.
342 |
# File 'lib/modern_treasury/models/payment_order.rb', line 342 required :ultimate_originating_party_identifier, String, nil?: true |
#ultimate_originating_party_name ⇒ String?
Name of the ultimate originator of the payment order.
348 |
# File 'lib/modern_treasury/models/payment_order.rb', line 348 required :ultimate_originating_party_name, String, nil?: true |
#ultimate_receiving_party_identifier ⇒ String?
353 |
# File 'lib/modern_treasury/models/payment_order.rb', line 353 required :ultimate_receiving_party_identifier, String, nil?: true |
#ultimate_receiving_party_name ⇒ String?
358 |
# File 'lib/modern_treasury/models/payment_order.rb', line 358 required :ultimate_receiving_party_name, String, nil?: true |
#updated_at ⇒ Time
363 |
# File 'lib/modern_treasury/models/payment_order.rb', line 363 required :updated_at, Time |
#vendor_attributes ⇒ Object?
Additional vendor specific fields for this payment. Data must be represented as key-value pairs.
370 |
# File 'lib/modern_treasury/models/payment_order.rb', line 370 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.
377 |
# File 'lib/modern_treasury/models/payment_order.rb', line 377 required :vendor_failure_reason, String, nil?: true |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/modern_treasury/models/payment_order.rb', line 533
|
.variants ⇒ Array(ModernTreasury::Models::VirtualAccount, ModernTreasury::Models::InternalAccount)
|
|
# File 'lib/modern_treasury/models/payment_order.rb', line 1015
|
Instance Method Details
#to_hash ⇒ {
223 |
# File 'sig/modern_treasury/models/payment_order.rbs', line 223
def to_hash: -> {
|