Class: ModernTreasury::PaymentOrderAsyncCreateRequest

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/modern_treasury/models/payment_order_async_create_request.rb

Overview

PaymentOrderAsyncCreateRequest Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(type:, amount:, direction:, originating_account_id:, subtype: SKIP, priority: SKIP, receiving_account_id: SKIP, accounting: SKIP, accounting_category_id: SKIP, accounting_ledger_class_id: SKIP, currency: SKIP, effective_date: SKIP, description: SKIP, statement_descriptor: SKIP, remittance_information: SKIP, purpose: SKIP, metadata: SKIP, charge_bearer: SKIP, foreign_exchange_indicator: SKIP, foreign_exchange_contract: SKIP, nsf_protected: SKIP, originating_party_name: SKIP, ultimate_originating_party_name: SKIP, ultimate_originating_party_identifier: SKIP, ultimate_receiving_party_name: SKIP, ultimate_receiving_party_identifier: SKIP, send_remittance_advice: SKIP, expires_at: SKIP, fallback_type: SKIP, receiving_account: SKIP, ledger_transaction: SKIP, line_items: SKIP, transaction_monitoring_enabled: SKIP, additional_properties: nil) ⇒ PaymentOrderAsyncCreateRequest

Returns a new instance of PaymentOrderAsyncCreateRequest.



297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 297

def initialize(type:, amount:, direction:, originating_account_id:,
               subtype: SKIP, priority: SKIP, receiving_account_id: SKIP,
               accounting: SKIP, accounting_category_id: SKIP,
               accounting_ledger_class_id: SKIP, currency: SKIP,
               effective_date: SKIP, description: SKIP,
               statement_descriptor: SKIP, remittance_information: SKIP,
               purpose: SKIP, metadata: SKIP, charge_bearer: SKIP,
               foreign_exchange_indicator: SKIP,
               foreign_exchange_contract: SKIP, nsf_protected: SKIP,
               originating_party_name: SKIP,
               ultimate_originating_party_name: SKIP,
               ultimate_originating_party_identifier: SKIP,
               ultimate_receiving_party_name: SKIP,
               ultimate_receiving_party_identifier: SKIP,
               send_remittance_advice: SKIP, expires_at: SKIP,
               fallback_type: SKIP, receiving_account: SKIP,
               ledger_transaction: SKIP, line_items: SKIP,
               transaction_monitoring_enabled: SKIP,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @type = type
  @subtype = subtype unless subtype == SKIP
  @amount = amount
  @direction = direction
  @priority = priority unless priority == SKIP
  @originating_account_id = 
  @receiving_account_id =  unless  == SKIP
  @accounting = accounting unless accounting == SKIP
  @accounting_category_id = accounting_category_id unless accounting_category_id == SKIP
  unless accounting_ledger_class_id == SKIP
    @accounting_ledger_class_id =
      accounting_ledger_class_id
  end
  @currency = currency unless currency == SKIP
  @effective_date = effective_date unless effective_date == SKIP
  @description = description unless description == SKIP
  @statement_descriptor = statement_descriptor unless statement_descriptor == SKIP
  @remittance_information = remittance_information unless remittance_information == SKIP
  @purpose = purpose unless purpose == SKIP
  @metadata =  unless  == SKIP
  @charge_bearer = charge_bearer unless charge_bearer == SKIP
  unless foreign_exchange_indicator == SKIP
    @foreign_exchange_indicator =
      foreign_exchange_indicator
  end
  unless foreign_exchange_contract == SKIP
    @foreign_exchange_contract =
      foreign_exchange_contract
  end
  @nsf_protected = nsf_protected unless nsf_protected == SKIP
  @originating_party_name = originating_party_name unless originating_party_name == SKIP
  unless ultimate_originating_party_name == SKIP
    @ultimate_originating_party_name =
      ultimate_originating_party_name
  end
  unless ultimate_originating_party_identifier == SKIP
    @ultimate_originating_party_identifier =
      ultimate_originating_party_identifier
  end
  unless ultimate_receiving_party_name == SKIP
    @ultimate_receiving_party_name =
      ultimate_receiving_party_name
  end
  unless ultimate_receiving_party_identifier == SKIP
    @ultimate_receiving_party_identifier =
      ultimate_receiving_party_identifier
  end
  @send_remittance_advice = send_remittance_advice unless send_remittance_advice == SKIP
  @expires_at = expires_at unless expires_at == SKIP
  @fallback_type = fallback_type unless fallback_type == SKIP
  @receiving_account =  unless  == SKIP
  @ledger_transaction = ledger_transaction unless ledger_transaction == SKIP
  @line_items = line_items unless line_items == SKIP
  unless transaction_monitoring_enabled == SKIP
    @transaction_monitoring_enabled =
      transaction_monitoring_enabled
  end
  @additional_properties = additional_properties
end

Instance Attribute Details

#accountingAccounting

Either ‘receiving_account` or `receiving_account_id` must be present. When using `receiving_account_id`, you may pass the id of an external account or an internal account.

Returns:



58
59
60
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 58

def accounting
  @accounting
end

#accounting_category_idUUID | String

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

Returns:

  • (UUID | String)


63
64
65
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 63

def accounting_category_id
  @accounting_category_id
end

#accounting_ledger_class_idUUID | String

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

Returns:

  • (UUID | String)


68
69
70
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 68

def accounting_ledger_class_id
  @accounting_ledger_class_id
end

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


29
30
31
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 29

def amount
  @amount
end

#charge_bearerChargeBearer

The party that will pay the fees for the payment order. Only applies to wire payment orders. Can be one of shared, sender, or receiver, which correspond respectively with the SWIFT 71A values ‘SHA`, `OUR`, `BEN`.

Returns:



115
116
117
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 115

def charge_bearer
  @charge_bearer
end

#currencyCurrency

Three-letter ISO currency code.

Returns:



72
73
74
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 72

def currency
  @currency
end

#descriptionString

An optional description for internal use.

Returns:

  • (String)


82
83
84
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 82

def description
  @description
end

#directionDirection5

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

Returns:



36
37
38
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 36

def direction
  @direction
end

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


78
79
80
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 78

def effective_date
  @effective_date
end

#expires_atDateTime

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

Returns:

  • (DateTime)


165
166
167
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 165

def expires_at
  @expires_at
end

#fallback_typeFallbackType

A payment type to fallback to if the original type is not valid for the receiving account. Currently, this only supports falling back from RTP to ACH (type=rtp and fallback_type=ach)

Returns:



171
172
173
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 171

def fallback_type
  @fallback_type
end

#foreign_exchange_contractString

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

Returns:

  • (String)


126
127
128
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 126

def foreign_exchange_contract
  @foreign_exchange_contract
end

#foreign_exchange_indicatorForeignExchangeIndicator

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.



121
122
123
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 121

def foreign_exchange_indicator
  @foreign_exchange_indicator
end

#ledger_transactionLedgerTransactionCreateRequest

Either ‘receiving_account` or `receiving_account_id` must be present. When using `receiving_account_id`, you may pass the id of an external account or an internal account.



183
184
185
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 183

def ledger_transaction
  @ledger_transaction
end

#line_itemsArray[LineItemRequest]

An array of line items that must sum up to the amount of the payment order.

Returns:



188
189
190
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 188

def line_items
  @line_items
end

#metadataHash[String, String]

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

Returns:

  • (Hash[String, String])


109
110
111
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 109

def 
  @metadata
end

#nsf_protectedTrueClass | FalseClass

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:

  • (TrueClass | FalseClass)


132
133
134
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 132

def nsf_protected
  @nsf_protected
end

#originating_account_idUUID | String

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

Returns:

  • (UUID | String)


46
47
48
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 46

def 
  @originating_account_id
end

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


139
140
141
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 139

def originating_party_name
  @originating_party_name
end

#priorityPriority

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.

Returns:



42
43
44
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 42

def priority
  @priority
end

#purposeString

For ‘wire`, this is usually the purpose which is transmitted via the “InstrForDbtrAgt” field in the ISO20022 file. If you are using Currencycloud, this is the `payment.purpose_code` field. For `eft`, this field is the 3 digit CPA Code that will be attached to the payment.

Returns:

  • (String)


104
105
106
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 104

def purpose
  @purpose
end

#receiving_accountReceivingAccount1

Either ‘receiving_account` or `receiving_account_id` must be present. When using `receiving_account_id`, you may pass the id of an external account or an internal account.

Returns:



177
178
179
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 177

def 
  @receiving_account
end

#receiving_account_idUUID | String

Either ‘receiving_account` or `receiving_account_id` must be present. When using `receiving_account_id`, you may pass the id of an external account or an internal account.

Returns:

  • (UUID | String)


52
53
54
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 52

def 
  @receiving_account_id
end

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


97
98
99
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 97

def remittance_information
  @remittance_information
end

#send_remittance_adviceTrueClass | FalseClass

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:

  • (TrueClass | FalseClass)


160
161
162
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 160

def send_remittance_advice
  @send_remittance_advice
end

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


91
92
93
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 91

def statement_descriptor
  @statement_descriptor
end

#subtypeSubtype

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

Returns:



23
24
25
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 23

def subtype
  @subtype
end

#transaction_monitoring_enabledTrueClass | FalseClass

A flag that determines whether a payment order should go through transaction monitoring.

Returns:

  • (TrueClass | FalseClass)


193
194
195
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 193

def transaction_monitoring_enabled
  @transaction_monitoring_enabled
end

#typeType5

One of ‘ach`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sepa`, `bacs`, `au_becs`, `interac`, `signet`, `provexchange`.

Returns:



16
17
18
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 16

def type
  @type
end

#ultimate_originating_party_identifierString

Identifier of the ultimate originator of the payment order.

Returns:

  • (String)


147
148
149
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 147

def ultimate_originating_party_identifier
  @ultimate_originating_party_identifier
end

#ultimate_originating_party_nameString

Name of the ultimate originator of the payment order.

Returns:

  • (String)


143
144
145
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 143

def ultimate_originating_party_name
  @ultimate_originating_party_name
end

#ultimate_receiving_party_identifierString

Identifier of the ultimate funds recipient.

Returns:

  • (String)


155
156
157
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 155

def ultimate_receiving_party_identifier
  @ultimate_receiving_party_identifier
end

#ultimate_receiving_party_nameString

Name of the ultimate funds recipient.

Returns:

  • (String)


151
152
153
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 151

def ultimate_receiving_party_name
  @ultimate_receiving_party_name
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 380

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  type = hash.key?('type') ? hash['type'] : nil
  amount = hash.key?('amount') ? hash['amount'] : nil
  direction = hash.key?('direction') ? hash['direction'] : nil
   =
    hash.key?('originating_account_id') ? hash['originating_account_id'] : nil
  subtype = hash.key?('subtype') ? hash['subtype'] : SKIP
  priority = hash.key?('priority') ? hash['priority'] : SKIP
   =
    hash.key?('receiving_account_id') ? hash['receiving_account_id'] : SKIP
  accounting = Accounting.from_hash(hash['accounting']) if hash['accounting']
  accounting_category_id =
    hash.key?('accounting_category_id') ? hash['accounting_category_id'] : SKIP
  accounting_ledger_class_id =
    hash.key?('accounting_ledger_class_id') ? hash['accounting_ledger_class_id'] : SKIP
  currency = hash.key?('currency') ? hash['currency'] : SKIP
  effective_date =
    hash.key?('effective_date') ? hash['effective_date'] : SKIP
  description = hash.key?('description') ? hash['description'] : SKIP
  statement_descriptor =
    hash.key?('statement_descriptor') ? hash['statement_descriptor'] : SKIP
  remittance_information =
    hash.key?('remittance_information') ? hash['remittance_information'] : SKIP
  purpose = hash.key?('purpose') ? hash['purpose'] : SKIP
   = hash.key?('metadata') ? hash['metadata'] : SKIP
  charge_bearer = hash.key?('charge_bearer') ? hash['charge_bearer'] : SKIP
  foreign_exchange_indicator =
    hash.key?('foreign_exchange_indicator') ? hash['foreign_exchange_indicator'] : SKIP
  foreign_exchange_contract =
    hash.key?('foreign_exchange_contract') ? hash['foreign_exchange_contract'] : SKIP
  nsf_protected = hash.key?('nsf_protected') ? hash['nsf_protected'] : SKIP
  originating_party_name =
    hash.key?('originating_party_name') ? hash['originating_party_name'] : SKIP
  ultimate_originating_party_name =
    hash.key?('ultimate_originating_party_name') ? hash['ultimate_originating_party_name'] : SKIP
  ultimate_originating_party_identifier =
    hash.key?('ultimate_originating_party_identifier') ? hash['ultimate_originating_party_identifier'] : SKIP
  ultimate_receiving_party_name =
    hash.key?('ultimate_receiving_party_name') ? hash['ultimate_receiving_party_name'] : SKIP
  ultimate_receiving_party_identifier =
    hash.key?('ultimate_receiving_party_identifier') ? hash['ultimate_receiving_party_identifier'] : SKIP
  send_remittance_advice =
    hash.key?('send_remittance_advice') ? hash['send_remittance_advice'] : SKIP
  expires_at = if hash.key?('expires_at')
                 (DateTimeHelper.from_rfc3339(hash['expires_at']) if hash['expires_at'])
               else
                 SKIP
               end
  fallback_type = hash.key?('fallback_type') ? hash['fallback_type'] : SKIP
   = ReceivingAccount1.from_hash(hash['receiving_account']) if
    hash['receiving_account']
  ledger_transaction = LedgerTransactionCreateRequest.from_hash(hash['ledger_transaction']) if
    hash['ledger_transaction']
  # Parameter is an array, so we need to iterate through it
  line_items = nil
  unless hash['line_items'].nil?
    line_items = []
    hash['line_items'].each do |structure|
      line_items << (LineItemRequest.from_hash(structure) if structure)
    end
  end

  line_items = SKIP unless hash.key?('line_items')
  transaction_monitoring_enabled =
    hash.key?('transaction_monitoring_enabled') ? hash['transaction_monitoring_enabled'] : SKIP

  # Create a new hash for additional properties, removing known properties.
  new_hash = hash.reject { |k, _| names.value?(k) }

  additional_properties = APIHelper.get_additional_properties(
    new_hash, proc { |value| value }
  )

  # Create object from extracted values.
  PaymentOrderAsyncCreateRequest.new(type: type,
                                     amount: amount,
                                     direction: direction,
                                     originating_account_id: ,
                                     subtype: subtype,
                                     priority: priority,
                                     receiving_account_id: ,
                                     accounting: accounting,
                                     accounting_category_id: accounting_category_id,
                                     accounting_ledger_class_id: accounting_ledger_class_id,
                                     currency: currency,
                                     effective_date: effective_date,
                                     description: description,
                                     statement_descriptor: statement_descriptor,
                                     remittance_information: remittance_information,
                                     purpose: purpose,
                                     metadata: ,
                                     charge_bearer: charge_bearer,
                                     foreign_exchange_indicator: foreign_exchange_indicator,
                                     foreign_exchange_contract: foreign_exchange_contract,
                                     nsf_protected: nsf_protected,
                                     originating_party_name: originating_party_name,
                                     ultimate_originating_party_name: ultimate_originating_party_name,
                                     ultimate_originating_party_identifier: ultimate_originating_party_identifier,
                                     ultimate_receiving_party_name: ultimate_receiving_party_name,
                                     ultimate_receiving_party_identifier: ultimate_receiving_party_identifier,
                                     send_remittance_advice: send_remittance_advice,
                                     expires_at: expires_at,
                                     fallback_type: fallback_type,
                                     receiving_account: ,
                                     ledger_transaction: ledger_transaction,
                                     line_items: line_items,
                                     transaction_monitoring_enabled: transaction_monitoring_enabled,
                                     additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 196

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['type'] = 'type'
  @_hash['subtype'] = 'subtype'
  @_hash['amount'] = 'amount'
  @_hash['direction'] = 'direction'
  @_hash['priority'] = 'priority'
  @_hash['originating_account_id'] = 'originating_account_id'
  @_hash['receiving_account_id'] = 'receiving_account_id'
  @_hash['accounting'] = 'accounting'
  @_hash['accounting_category_id'] = 'accounting_category_id'
  @_hash['accounting_ledger_class_id'] = 'accounting_ledger_class_id'
  @_hash['currency'] = 'currency'
  @_hash['effective_date'] = 'effective_date'
  @_hash['description'] = 'description'
  @_hash['statement_descriptor'] = 'statement_descriptor'
  @_hash['remittance_information'] = 'remittance_information'
  @_hash['purpose'] = 'purpose'
  @_hash['metadata'] = 'metadata'
  @_hash['charge_bearer'] = 'charge_bearer'
  @_hash['foreign_exchange_indicator'] = 'foreign_exchange_indicator'
  @_hash['foreign_exchange_contract'] = 'foreign_exchange_contract'
  @_hash['nsf_protected'] = 'nsf_protected'
  @_hash['originating_party_name'] = 'originating_party_name'
  @_hash['ultimate_originating_party_name'] =
    'ultimate_originating_party_name'
  @_hash['ultimate_originating_party_identifier'] =
    'ultimate_originating_party_identifier'
  @_hash['ultimate_receiving_party_name'] =
    'ultimate_receiving_party_name'
  @_hash['ultimate_receiving_party_identifier'] =
    'ultimate_receiving_party_identifier'
  @_hash['send_remittance_advice'] = 'send_remittance_advice'
  @_hash['expires_at'] = 'expires_at'
  @_hash['fallback_type'] = 'fallback_type'
  @_hash['receiving_account'] = 'receiving_account'
  @_hash['ledger_transaction'] = 'ledger_transaction'
  @_hash['line_items'] = 'line_items'
  @_hash['transaction_monitoring_enabled'] =
    'transaction_monitoring_enabled'
  @_hash
end

.nullablesObject

An array for nullable fields



275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 275

def self.nullables
  %w[
    subtype
    accounting_category_id
    accounting_ledger_class_id
    description
    statement_descriptor
    remittance_information
    purpose
    charge_bearer
    foreign_exchange_indicator
    foreign_exchange_contract
    originating_party_name
    ultimate_originating_party_name
    ultimate_originating_party_identifier
    ultimate_receiving_party_name
    ultimate_receiving_party_identifier
    send_remittance_advice
    expires_at
  ]
end

.optionalsObject

An array for optional fields



240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 240

def self.optionals
  %w[
    subtype
    priority
    receiving_account_id
    accounting
    accounting_category_id
    accounting_ledger_class_id
    currency
    effective_date
    description
    statement_descriptor
    remittance_information
    purpose
    metadata
    charge_bearer
    foreign_exchange_indicator
    foreign_exchange_contract
    nsf_protected
    originating_party_name
    ultimate_originating_party_name
    ultimate_originating_party_identifier
    ultimate_receiving_party_name
    ultimate_receiving_party_identifier
    send_remittance_advice
    expires_at
    fallback_type
    receiving_account
    ledger_transaction
    line_items
    transaction_monitoring_enabled
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 522

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} type: #{@type.inspect}, subtype: #{@subtype.inspect}, amount:"\
  " #{@amount.inspect}, direction: #{@direction.inspect}, priority: #{@priority.inspect},"\
  " originating_account_id: #{@originating_account_id.inspect}, receiving_account_id:"\
  " #{@receiving_account_id.inspect}, accounting: #{@accounting.inspect},"\
  " accounting_category_id: #{@accounting_category_id.inspect}, accounting_ledger_class_id:"\
  " #{@accounting_ledger_class_id.inspect}, currency: #{@currency.inspect}, effective_date:"\
  " #{@effective_date.inspect}, description: #{@description.inspect}, statement_descriptor:"\
  " #{@statement_descriptor.inspect}, remittance_information:"\
  " #{@remittance_information.inspect}, purpose: #{@purpose.inspect}, metadata:"\
  " #{@metadata.inspect}, charge_bearer: #{@charge_bearer.inspect},"\
  " foreign_exchange_indicator: #{@foreign_exchange_indicator.inspect},"\
  " foreign_exchange_contract: #{@foreign_exchange_contract.inspect}, nsf_protected:"\
  " #{@nsf_protected.inspect}, originating_party_name: #{@originating_party_name.inspect},"\
  " ultimate_originating_party_name: #{@ultimate_originating_party_name.inspect},"\
  " ultimate_originating_party_identifier: #{@ultimate_originating_party_identifier.inspect},"\
  " ultimate_receiving_party_name: #{@ultimate_receiving_party_name.inspect},"\
  " ultimate_receiving_party_identifier: #{@ultimate_receiving_party_identifier.inspect},"\
  " send_remittance_advice: #{@send_remittance_advice.inspect}, expires_at:"\
  " #{@expires_at.inspect}, fallback_type: #{@fallback_type.inspect}, receiving_account:"\
  " #{@receiving_account.inspect}, ledger_transaction: #{@ledger_transaction.inspect},"\
  " line_items: #{@line_items.inspect}, transaction_monitoring_enabled:"\
  " #{@transaction_monitoring_enabled.inspect}, additional_properties:"\
  " #{@additional_properties}>"
end

#to_custom_expires_atObject



493
494
495
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 493

def to_custom_expires_at
  DateTimeHelper.to_rfc3339(expires_at)
end

#to_sObject

Provides a human-readable string representation of the object.



498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
# File 'lib/modern_treasury/models/payment_order_async_create_request.rb', line 498

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} type: #{@type}, subtype: #{@subtype}, amount: #{@amount}, direction:"\
  " #{@direction}, priority: #{@priority}, originating_account_id: #{@originating_account_id},"\
  " receiving_account_id: #{@receiving_account_id}, accounting: #{@accounting},"\
  " accounting_category_id: #{@accounting_category_id}, accounting_ledger_class_id:"\
  " #{@accounting_ledger_class_id}, currency: #{@currency}, effective_date:"\
  " #{@effective_date}, description: #{@description}, statement_descriptor:"\
  " #{@statement_descriptor}, remittance_information: #{@remittance_information}, purpose:"\
  " #{@purpose}, metadata: #{@metadata}, charge_bearer: #{@charge_bearer},"\
  " foreign_exchange_indicator: #{@foreign_exchange_indicator}, foreign_exchange_contract:"\
  " #{@foreign_exchange_contract}, nsf_protected: #{@nsf_protected}, originating_party_name:"\
  " #{@originating_party_name}, ultimate_originating_party_name:"\
  " #{@ultimate_originating_party_name}, ultimate_originating_party_identifier:"\
  " #{@ultimate_originating_party_identifier}, ultimate_receiving_party_name:"\
  " #{@ultimate_receiving_party_name}, ultimate_receiving_party_identifier:"\
  " #{@ultimate_receiving_party_identifier}, send_remittance_advice:"\
  " #{@send_remittance_advice}, expires_at: #{@expires_at}, fallback_type: #{@fallback_type},"\
  " receiving_account: #{@receiving_account}, ledger_transaction: #{@ledger_transaction},"\
  " line_items: #{@line_items}, transaction_monitoring_enabled:"\
  " #{@transaction_monitoring_enabled}, additional_properties: #{@additional_properties}>"
end