Class: ModernTreasury::Models::PaymentOrder

Inherits:
Internal::Type::BaseModel show all
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

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_id: nil, class_id: nil) ⇒ Object

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

Parameters:

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

    The ID of one of your accounting categories. Note that these will only be access

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

    The ID of one of the class objects in your accounting system. Class objects trac



# File 'lib/modern_treasury/models/payment_order.rb', line 366

Instance Attribute Details

#accountingModernTreasury::Models::PaymentOrder::Accounting

Deprecated.


16
# File 'lib/modern_treasury/models/payment_order.rb', line 16

required :accounting, -> { ModernTreasury::PaymentOrder::Accounting }

#accounting_category_idString?

Deprecated.

The ID of one of your accounting categories. Note that these will only be accessible if your accounting system has been connected.

Returns:

  • (String, nil)


25
# File 'lib/modern_treasury/models/payment_order.rb', line 25

required :accounting_category_id, String, nil?: true

#accounting_ledger_class_idString?

Deprecated.

The ID of one of your accounting ledger classes. Note that these will only be accessible if your accounting system has been connected.

Returns:

  • (String, nil)


34
# File 'lib/modern_treasury/models/payment_order.rb', line 34

required :accounting_ledger_class_id, String, nil?: true

#amountInteger

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.

Returns:

  • (Integer)


41
# File 'lib/modern_treasury/models/payment_order.rb', line 41

required :amount, Integer

#batch_idString?

The ID of the batch in which the payment order is included. Only populated after the payment order begins processing.

Returns:

  • (String, nil)


48
# File 'lib/modern_treasury/models/payment_order.rb', line 48

required :batch_id, String, nil?: true

#charge_bearerSymbol, ...

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.



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

required :charge_bearer, enum: -> { ModernTreasury::PaymentOrder::ChargeBearer }, nil?: true

#counterparty_idString?

If the payment order is tied to a specific Counterparty, their id will appear, otherwise ‘null`.

Returns:

  • (String, nil)


63
# File 'lib/modern_treasury/models/payment_order.rb', line 63

required :counterparty_id, String, nil?: true

#created_atTime

Returns:

  • (Time)


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

required :created_at, Time

#currencySymbol, 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_holdModernTreasury::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_returnModernTreasury::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

#descriptionString?

An optional description for internal use.

Returns:

  • (String, nil)


94
# File 'lib/modern_treasury/models/payment_order.rb', line 94

required :description, String, nil?: true

#directionSymbol, 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_dateDate

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.

Returns:

  • (Date)


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

required :effective_date, Date

#expires_atTime?

RFP payments require an expires_at. This value must be past the effective_date.

Returns:

  • (Time, nil)


117
# File 'lib/modern_treasury/models/payment_order.rb', line 117

required :expires_at, Time, nil?: true

#external_idString?

An optional user-defined 180 character unique identifier.

Returns:

  • (String, nil)


123
# File 'lib/modern_treasury/models/payment_order.rb', line 123

required :external_id, String, nil?: true

#foreign_exchange_contractString?

If present, indicates a specific foreign exchange contract number that has been generated by your financial institution.

Returns:

  • (String, nil)


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

required :foreign_exchange_contract, String, nil?: true

#foreign_exchange_indicatorSymbol, ...

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_rateModernTreasury::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

#idString

Returns:

  • (String)


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

required :id, String

#ledger_transaction_idString?

The ID of the ledger transaction linked to the payment order.

Returns:

  • (String, nil)


152
# File 'lib/modern_treasury/models/payment_order.rb', line 152

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)


159
# File 'lib/modern_treasury/models/payment_order.rb', line 159

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

#metadataHash{Symbol=>String}

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

Returns:

  • (Hash{Symbol=>String})


166
# File 'lib/modern_treasury/models/payment_order.rb', line 166

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

#nsf_protectedBoolean

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.

Returns:

  • (Boolean)


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

required :nsf_protected, ModernTreasury::Internal::Type::Boolean

#objectString

Returns:

  • (String)


178
# File 'lib/modern_treasury/models/payment_order.rb', line 178

required :object, String

#originating_account_idString

The ID of one of your organization’s internal accounts.

Returns:

  • (String)


184
# File 'lib/modern_treasury/models/payment_order.rb', line 184

required :originating_account_id, String

#originating_party_nameString?

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.

Returns:

  • (String, nil)


193
# File 'lib/modern_treasury/models/payment_order.rb', line 193

required :originating_party_name, String, nil?: true

#prioritySymbol, 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.



201
# File 'lib/modern_treasury/models/payment_order.rb', line 201

required :priority, enum: -> { ModernTreasury::PaymentOrder::Priority }

#process_afterTime?

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.

Returns:

  • (Time, nil)


211
# File 'lib/modern_treasury/models/payment_order.rb', line 211

required :process_after, Time, nil?: true

#purposeString?

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.

Returns:

  • (String, nil)


219
# File 'lib/modern_treasury/models/payment_order.rb', line 219

required :purpose, String, nil?: true

#receiving_account_idString

The receiving account ID. Can be an ‘external_account` or `internal_account`.

Returns:

  • (String)


225
# File 'lib/modern_treasury/models/payment_order.rb', line 225

required :receiving_account_id, String

#receiving_account_typeSymbol, ModernTreasury::Models::PaymentOrder::ReceivingAccountType



230
# File 'lib/modern_treasury/models/payment_order.rb', line 230

required :receiving_account_type, enum: -> { ModernTreasury::PaymentOrder::ReceivingAccountType }

#reconciliation_statusSymbol, ModernTreasury::Models::PaymentOrder::ReconciliationStatus

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



236
# File 'lib/modern_treasury/models/payment_order.rb', line 236

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

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



241
242
# File 'lib/modern_treasury/models/payment_order.rb', line 241

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

#remittance_informationString?

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.

Returns:

  • (String, nil)


250
# File 'lib/modern_treasury/models/payment_order.rb', line 250

required :remittance_information, String, nil?: true

#send_remittance_adviceBoolean?

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.

Returns:

  • (Boolean, nil)


257
# File 'lib/modern_treasury/models/payment_order.rb', line 257

required :send_remittance_advice, ModernTreasury::Internal::Type::Boolean, nil?: true

#statement_descriptorString?

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.

Returns:

  • (String, nil)


268
# File 'lib/modern_treasury/models/payment_order.rb', line 268

required :statement_descriptor, String, nil?: true

#statusSymbol, ModernTreasury::Models::PaymentOrder::Status

The current status of the payment order.



274
# File 'lib/modern_treasury/models/payment_order.rb', line 274

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

#subtypeSymbol, ...

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`.



283
# File 'lib/modern_treasury/models/payment_order.rb', line 283

required :subtype, enum: -> { ModernTreasury::PaymentOrderSubtype }, nil?: true

#transaction_idsArray<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.

Returns:

  • (Array<String>)


292
# File 'lib/modern_treasury/models/payment_order.rb', line 292

required :transaction_ids, ModernTreasury::Internal::Type::ArrayOf[String]

#typeSymbol, 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`.



300
# File 'lib/modern_treasury/models/payment_order.rb', line 300

required :type, enum: -> { ModernTreasury::PaymentOrderType }

#ultimate_originating_accountModernTreasury::Models::VirtualAccount, ...

The account to which the originating of this payment should be attributed to. Can be a ‘virtual_account` or `internal_account`.



307
308
309
# File 'lib/modern_treasury/models/payment_order.rb', line 307

required :ultimate_originating_account,
union: -> { ModernTreasury::PaymentOrder::UltimateOriginatingAccount },
nil?: true

#ultimate_originating_account_idString?

The ultimate originating account ID. Can be a ‘virtual_account` or `internal_account`.

Returns:

  • (String, nil)


316
# File 'lib/modern_treasury/models/payment_order.rb', line 316

required :ultimate_originating_account_id, String, nil?: true

#ultimate_originating_account_typeSymbol, ...



321
322
323
# File 'lib/modern_treasury/models/payment_order.rb', line 321

required :ultimate_originating_account_type,
enum: -> { ModernTreasury::PaymentOrder::UltimateOriginatingAccountType },
nil?: true

#ultimate_originating_party_identifierString?

Identifier of the ultimate originator of the payment order.

Returns:

  • (String, nil)


329
# File 'lib/modern_treasury/models/payment_order.rb', line 329

required :ultimate_originating_party_identifier, String, nil?: true

#ultimate_originating_party_nameString?

Name of the ultimate originator of the payment order.

Returns:

  • (String, nil)


335
# File 'lib/modern_treasury/models/payment_order.rb', line 335

required :ultimate_originating_party_name, String, nil?: true

#ultimate_receiving_party_identifierString?

Returns:

  • (String, nil)


340
# File 'lib/modern_treasury/models/payment_order.rb', line 340

required :ultimate_receiving_party_identifier, String, nil?: true

#ultimate_receiving_party_nameString?

Returns:

  • (String, nil)


345
# File 'lib/modern_treasury/models/payment_order.rb', line 345

required :ultimate_receiving_party_name, String, nil?: true

#updated_atTime

Returns:

  • (Time)


350
# File 'lib/modern_treasury/models/payment_order.rb', line 350

required :updated_at, Time

#vendor_attributesObject?

Additional vendor specific fields for this payment. Data must be represented as key-value pairs.

Returns:

  • (Object, nil)


357
# File 'lib/modern_treasury/models/payment_order.rb', line 357

required :vendor_attributes, ModernTreasury::Internal::Type::Unknown, nil?: true

#vendor_failure_reasonString?

This field will be populated if a vendor failure occurs. Logic shouldn’t be built on its value as it is free-form.

Returns:

  • (String, nil)


364
# File 'lib/modern_treasury/models/payment_order.rb', line 364

required :vendor_failure_reason, String, nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/modern_treasury/models/payment_order.rb', line 516

.variantsArray(ModernTreasury::Models::VirtualAccount, ModernTreasury::Models::InternalAccount)



# File 'lib/modern_treasury/models/payment_order.rb', line 930