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 359


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

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



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

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)


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

required :counterparty_id, String, nil?: true

#created_atTime

Returns:

  • (Time)


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

required :created_at, Time

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

#descriptionString?

An optional description for internal use.

Returns:

  • (String, nil)


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

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



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

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)


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

required :effective_date, Date

#expires_atTime?

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

Returns:

  • (Time, nil)


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

required :expires_at, Time, nil?: true

#external_idString?

An optional user-defined 180 character unique identifier.

Returns:

  • (String, nil)


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

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)


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

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.



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

#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)


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

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)


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

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})


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

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)


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

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

#objectString

Returns:

  • (String)


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

required :object, String

#originating_account_idString

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

Returns:

  • (String)


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

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)


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

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.



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

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)


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

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)


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

required :purpose, String, nil?: true

#receiving_account_idString

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

Returns:

  • (String)


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

required :receiving_account_id, String

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



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

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

#reconciliation_statusSymbol, 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_numbersArray<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_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)


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

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)


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

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)


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

required :statement_descriptor, String, nil?: true

#statusSymbol, 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 }

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



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

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>)


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

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



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

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



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_idString?

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

Returns:

  • (String, nil)


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

required :ultimate_originating_account_id, String, nil?: true

#ultimate_originating_account_typeSymbol, ...



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_identifierString?

Identifier of the ultimate originator of the payment order.

Returns:

  • (String, nil)


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

required :ultimate_originating_party_identifier, String, nil?: true

#ultimate_originating_party_nameString?

Name of the ultimate originator of the payment order.

Returns:

  • (String, nil)


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

required :ultimate_originating_party_name, String, nil?: true

#ultimate_receiving_party_identifierString?

Returns:

  • (String, nil)


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

required :ultimate_receiving_party_identifier, String, nil?: true

#ultimate_receiving_party_nameString?

Returns:

  • (String, nil)


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

required :ultimate_receiving_party_name, String, nil?: true

#updated_atTime

Returns:

  • (Time)


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

required :updated_at, Time

#vendor_attributesObject?

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

Returns:

  • (Object, nil)


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

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)


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

required :vendor_failure_reason, String, nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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


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



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