modern_treasury 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +41 -0
  3. data/README.md +9 -9
  4. data/lib/modern_treasury/errors.rb +25 -11
  5. data/lib/modern_treasury/file_part.rb +10 -7
  6. data/lib/modern_treasury/internal/page.rb +3 -3
  7. data/lib/modern_treasury/internal/transport/base_client.rb +11 -7
  8. data/lib/modern_treasury/internal/transport/pooled_net_requester.rb +7 -10
  9. data/lib/modern_treasury/internal/type/base_page.rb +1 -1
  10. data/lib/modern_treasury/internal/type/file_input.rb +7 -4
  11. data/lib/modern_treasury/internal/util.rb +5 -5
  12. data/lib/modern_treasury/models/bulk_request_create_params.rb +49 -2
  13. data/lib/modern_treasury/models/counterparty.rb +5 -18
  14. data/lib/modern_treasury/models/counterparty_create_params.rb +5 -16
  15. data/lib/modern_treasury/models/incoming_payment_detail.rb +23 -1
  16. data/lib/modern_treasury/models/internal_account.rb +25 -1
  17. data/lib/modern_treasury/models/internal_account_list_params.rb +23 -1
  18. data/lib/modern_treasury/models/invoice_list_params.rb +17 -1
  19. data/lib/modern_treasury/models/payment_order.rb +175 -1
  20. data/lib/modern_treasury/models/payment_order_create_async_params.rb +22 -1
  21. data/lib/modern_treasury/models/payment_order_create_params.rb +22 -1
  22. data/lib/modern_treasury/models/payment_order_list_params.rb +1 -0
  23. data/lib/modern_treasury/models/payment_order_update_params.rb +23 -1
  24. data/lib/modern_treasury/models/payment_orders/reversal.rb +24 -1
  25. data/lib/modern_treasury/models/payment_reference.rb +1 -0
  26. data/lib/modern_treasury/models/return_create_params.rb +21 -1
  27. data/lib/modern_treasury/models/return_object.rb +25 -1
  28. data/lib/modern_treasury/models/transaction.rb +1 -0
  29. data/lib/modern_treasury/resources/counterparties.rb +1 -1
  30. data/lib/modern_treasury/resources/internal_accounts.rb +3 -1
  31. data/lib/modern_treasury/resources/invoices.rb +5 -1
  32. data/lib/modern_treasury/resources/payment_orders.rb +9 -3
  33. data/lib/modern_treasury/resources/returns.rb +3 -1
  34. data/lib/modern_treasury/version.rb +1 -1
  35. data/rbi/modern_treasury/errors.rbi +29 -2
  36. data/rbi/modern_treasury/file_part.rbi +1 -1
  37. data/rbi/modern_treasury/internal/transport/base_client.rbi +4 -5
  38. data/rbi/modern_treasury/internal/type/base_page.rbi +1 -1
  39. data/rbi/modern_treasury/internal/util.rbi +1 -1
  40. data/rbi/modern_treasury/models/bulk_request_create_params.rbi +133 -0
  41. data/rbi/modern_treasury/models/counterparty.rbi +3 -49
  42. data/rbi/modern_treasury/models/counterparty_create_params.rbi +4 -62
  43. data/rbi/modern_treasury/models/incoming_payment_detail.rbi +54 -0
  44. data/rbi/modern_treasury/models/internal_account.rbi +52 -0
  45. data/rbi/modern_treasury/models/internal_account_list_params.rbi +66 -0
  46. data/rbi/modern_treasury/models/invoice_list_params.rbi +22 -0
  47. data/rbi/modern_treasury/models/payment_order.rbi +305 -0
  48. data/rbi/modern_treasury/models/payment_order_create_async_params.rbi +64 -0
  49. data/rbi/modern_treasury/models/payment_order_create_params.rbi +64 -0
  50. data/rbi/modern_treasury/models/payment_order_list_params.rbi +5 -0
  51. data/rbi/modern_treasury/models/payment_order_update_params.rbi +69 -0
  52. data/rbi/modern_treasury/models/payment_orders/reversal.rbi +54 -0
  53. data/rbi/modern_treasury/models/payment_reference.rbi +5 -0
  54. data/rbi/modern_treasury/models/return_create_params.rbi +64 -0
  55. data/rbi/modern_treasury/models/return_object.rbi +58 -0
  56. data/rbi/modern_treasury/models/transaction.rbi +5 -0
  57. data/rbi/modern_treasury/resources/counterparties.rbi +1 -2
  58. data/rbi/modern_treasury/resources/internal_accounts.rbi +3 -0
  59. data/rbi/modern_treasury/resources/invoices.rbi +6 -0
  60. data/rbi/modern_treasury/resources/payment_orders.rbi +12 -0
  61. data/rbi/modern_treasury/resources/returns.rbi +4 -0
  62. data/sig/modern_treasury/errors.rbs +7 -0
  63. data/sig/modern_treasury/file_part.rbs +1 -1
  64. data/sig/modern_treasury/models/bulk_request_create_params.rbs +46 -0
  65. data/sig/modern_treasury/models/counterparty.rbs +4 -18
  66. data/sig/modern_treasury/models/counterparty_create_params.rbs +5 -21
  67. data/sig/modern_treasury/models/incoming_payment_detail.rbs +18 -0
  68. data/sig/modern_treasury/models/internal_account.rbs +20 -0
  69. data/sig/modern_treasury/models/internal_account_list_params.rbs +25 -1
  70. data/sig/modern_treasury/models/invoice_list_params.rbs +14 -0
  71. data/sig/modern_treasury/models/payment_order.rbs +132 -0
  72. data/sig/modern_treasury/models/payment_order_create_async_params.rbs +22 -0
  73. data/sig/modern_treasury/models/payment_order_create_params.rbs +22 -0
  74. data/sig/modern_treasury/models/payment_order_list_params.rbs +2 -0
  75. data/sig/modern_treasury/models/payment_order_update_params.rbs +24 -0
  76. data/sig/modern_treasury/models/payment_orders/reversal.rbs +18 -0
  77. data/sig/modern_treasury/models/payment_reference.rbs +2 -0
  78. data/sig/modern_treasury/models/return_create_params.rbs +23 -1
  79. data/sig/modern_treasury/models/return_object.rbs +22 -0
  80. data/sig/modern_treasury/models/transaction.rbs +2 -0
  81. data/sig/modern_treasury/resources/counterparties.rbs +1 -1
  82. data/sig/modern_treasury/resources/internal_accounts.rbs +1 -0
  83. data/sig/modern_treasury/resources/invoices.rbs +2 -0
  84. data/sig/modern_treasury/resources/payment_orders.rbs +3 -0
  85. data/sig/modern_treasury/resources/returns.rbs +1 -0
  86. metadata +2 -2
@@ -107,6 +107,12 @@ module ModernTreasury
107
107
  enum: -> { ModernTreasury::IncomingPaymentDetail::OriginatingRoutingNumberType },
108
108
  nil?: true
109
109
 
110
+ # @!attribute reconciliation_status
111
+ # One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
112
+ #
113
+ # @return [Symbol, ModernTreasury::Models::IncomingPaymentDetail::ReconciliationStatus]
114
+ required :reconciliation_status, enum: -> { ModernTreasury::IncomingPaymentDetail::ReconciliationStatus }
115
+
110
116
  # @!attribute status
111
117
  # The current status of the incoming payment order. One of `pending`, `completed`,
112
118
  # or `returned`.
@@ -164,7 +170,7 @@ module ModernTreasury
164
170
  # @return [String, nil]
165
171
  optional :originating_account_number, String, nil?: true
166
172
 
167
- # @!method initialize(id:, amount:, as_of_date:, created_at:, currency:, data:, direction:, internal_account_id:, ledger_transaction_id:, live_mode:, metadata:, object:, originating_account_number_safe:, originating_account_number_type:, originating_routing_number:, originating_routing_number_type:, status:, transaction_id:, transaction_line_item_id:, type:, updated_at:, vendor_id:, virtual_account:, virtual_account_id:, originating_account_number: nil)
173
+ # @!method initialize(id:, amount:, as_of_date:, created_at:, currency:, data:, direction:, internal_account_id:, ledger_transaction_id:, live_mode:, metadata:, object:, originating_account_number_safe:, originating_account_number_type:, originating_routing_number:, originating_routing_number_type:, reconciliation_status:, status:, transaction_id:, transaction_line_item_id:, type:, updated_at:, vendor_id:, virtual_account:, virtual_account_id:, originating_account_number: nil)
168
174
  # Some parameter documentations has been truncated, see
169
175
  # {ModernTreasury::Models::IncomingPaymentDetail} for more details.
170
176
  #
@@ -200,6 +206,8 @@ module ModernTreasury
200
206
  #
201
207
  # @param originating_routing_number_type [Symbol, ModernTreasury::Models::IncomingPaymentDetail::OriginatingRoutingNumberType, nil] The type of the originating routing number for the incoming payment detail.
202
208
  #
209
+ # @param reconciliation_status [Symbol, ModernTreasury::Models::IncomingPaymentDetail::ReconciliationStatus] One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
210
+ #
203
211
  # @param status [Symbol, ModernTreasury::Models::IncomingPaymentDetail::Status] The current status of the incoming payment order. One of `pending`, `completed`,
204
212
  #
205
213
  # @param transaction_id [String, nil] The ID of the reconciled Transaction or `null`.
@@ -276,6 +284,20 @@ module ModernTreasury
276
284
  # @return [Array<Symbol>]
277
285
  end
278
286
 
287
+ # One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
288
+ #
289
+ # @see ModernTreasury::Models::IncomingPaymentDetail#reconciliation_status
290
+ module ReconciliationStatus
291
+ extend ModernTreasury::Internal::Type::Enum
292
+
293
+ UNRECONCILED = :unreconciled
294
+ TENTATIVELY_RECONCILED = :tentatively_reconciled
295
+ RECONCILED = :reconciled
296
+
297
+ # @!method self.values
298
+ # @return [Array<Symbol>]
299
+ end
300
+
279
301
  # The current status of the incoming payment order. One of `pending`, `completed`,
280
302
  # or `returned`.
281
303
  #
@@ -120,6 +120,12 @@ module ModernTreasury
120
120
  # @return [Array<ModernTreasury::Models::RoutingDetail>]
121
121
  required :routing_details, -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::RoutingDetail] }
122
122
 
123
+ # @!attribute status
124
+ # The internal account status.
125
+ #
126
+ # @return [Symbol, ModernTreasury::Models::InternalAccount::Status, nil]
127
+ required :status, enum: -> { ModernTreasury::InternalAccount::Status }, nil?: true
128
+
123
129
  # @!attribute updated_at
124
130
  #
125
131
  # @return [Time]
@@ -131,7 +137,7 @@ module ModernTreasury
131
137
  # @return [String, nil]
132
138
  required :vendor_id, String, nil?: true
133
139
 
134
- # @!method initialize(id:, account_capabilities:, account_details:, account_type:, connection:, counterparty_id:, created_at:, currency:, ledger_account_id:, legal_entity_id:, live_mode:, metadata:, name:, object:, parent_account_id:, party_address:, party_name:, party_type:, routing_details:, updated_at:, vendor_id:)
140
+ # @!method initialize(id:, account_capabilities:, account_details:, account_type:, connection:, counterparty_id:, created_at:, currency:, ledger_account_id:, legal_entity_id:, live_mode:, metadata:, name:, object:, parent_account_id:, party_address:, party_name:, party_type:, routing_details:, status:, updated_at:, vendor_id:)
135
141
  # Some parameter documentations has been truncated, see
136
142
  # {ModernTreasury::Models::InternalAccount} for more details.
137
143
  #
@@ -173,6 +179,8 @@ module ModernTreasury
173
179
  #
174
180
  # @param routing_details [Array<ModernTreasury::Models::RoutingDetail>] An array of routing detail objects.
175
181
  #
182
+ # @param status [Symbol, ModernTreasury::Models::InternalAccount::Status, nil] The internal account status.
183
+ #
176
184
  # @param updated_at [Time]
177
185
  #
178
186
  # @param vendor_id [String, nil] The vendor ID associated with this account.
@@ -337,6 +345,22 @@ module ModernTreasury
337
345
  # @!method self.values
338
346
  # @return [Array<Symbol>]
339
347
  end
348
+
349
+ # The internal account status.
350
+ #
351
+ # @see ModernTreasury::Models::InternalAccount#status
352
+ module Status
353
+ extend ModernTreasury::Internal::Type::Enum
354
+
355
+ ACTIVE = :active
356
+ CLOSED = :closed
357
+ PENDING_ACTIVATION = :pending_activation
358
+ PENDING_CLOSURE = :pending_closure
359
+ SUSPENDED = :suspended
360
+
361
+ # @!method self.values
362
+ # @return [Array<Symbol>]
363
+ end
340
364
  end
341
365
  end
342
366
  end
@@ -55,7 +55,13 @@ module ModernTreasury
55
55
  # @return [Integer, nil]
56
56
  optional :per_page, Integer
57
57
 
58
- # @!method initialize(after_cursor: nil, counterparty_id: nil, currency: nil, legal_entity_id: nil, metadata: nil, payment_direction: nil, payment_type: nil, per_page: nil, request_options: {})
58
+ # @!attribute status
59
+ # Only return internal accounts with this status.
60
+ #
61
+ # @return [Symbol, ModernTreasury::Models::InternalAccountListParams::Status, nil]
62
+ optional :status, enum: -> { ModernTreasury::InternalAccountListParams::Status }
63
+
64
+ # @!method initialize(after_cursor: nil, counterparty_id: nil, currency: nil, legal_entity_id: nil, metadata: nil, payment_direction: nil, payment_type: nil, per_page: nil, status: nil, request_options: {})
59
65
  # Some parameter documentations has been truncated, see
60
66
  # {ModernTreasury::Models::InternalAccountListParams} for more details.
61
67
  #
@@ -75,6 +81,8 @@ module ModernTreasury
75
81
  #
76
82
  # @param per_page [Integer]
77
83
  #
84
+ # @param status [Symbol, ModernTreasury::Models::InternalAccountListParams::Status] Only return internal accounts with this status.
85
+ #
78
86
  # @param request_options [ModernTreasury::RequestOptions, Hash{Symbol=>Object}]
79
87
 
80
88
  # Only return internal accounts that can make this type of payment.
@@ -120,6 +128,20 @@ module ModernTreasury
120
128
  # @!method self.values
121
129
  # @return [Array<Symbol>]
122
130
  end
131
+
132
+ # Only return internal accounts with this status.
133
+ module Status
134
+ extend ModernTreasury::Internal::Type::Enum
135
+
136
+ ACTIVE = :active
137
+ PENDING_ACTIVATION = :pending_activation
138
+ SUSPENDED = :suspended
139
+ PENDING_CLOSURE = :pending_closure
140
+ CLOSED = :closed
141
+
142
+ # @!method self.values
143
+ # @return [Array<Symbol>]
144
+ end
123
145
  end
124
146
  end
125
147
  end
@@ -17,6 +17,18 @@ module ModernTreasury
17
17
  # @return [String, nil]
18
18
  optional :counterparty_id, String
19
19
 
20
+ # @!attribute created_at_end
21
+ # An inclusive upper bound for searching created_at
22
+ #
23
+ # @return [Time, nil]
24
+ optional :created_at_end, Time
25
+
26
+ # @!attribute created_at_start
27
+ # An inclusive lower bound for searching created_at
28
+ #
29
+ # @return [Time, nil]
30
+ optional :created_at_start, Time
31
+
20
32
  # @!attribute due_date_end
21
33
  # An inclusive upper bound for searching due_date
22
34
  #
@@ -68,7 +80,7 @@ module ModernTreasury
68
80
  # @return [Symbol, ModernTreasury::Models::InvoiceListParams::Status, nil]
69
81
  optional :status, enum: -> { ModernTreasury::InvoiceListParams::Status }
70
82
 
71
- # @!method initialize(after_cursor: nil, counterparty_id: nil, due_date_end: nil, due_date_start: nil, expected_payment_id: nil, metadata: nil, number: nil, originating_account_id: nil, payment_order_id: nil, per_page: nil, status: nil, request_options: {})
83
+ # @!method initialize(after_cursor: nil, counterparty_id: nil, created_at_end: nil, created_at_start: nil, due_date_end: nil, due_date_start: nil, expected_payment_id: nil, metadata: nil, number: nil, originating_account_id: nil, payment_order_id: nil, per_page: nil, status: nil, request_options: {})
72
84
  # Some parameter documentations has been truncated, see
73
85
  # {ModernTreasury::Models::InvoiceListParams} for more details.
74
86
  #
@@ -76,6 +88,10 @@ module ModernTreasury
76
88
  #
77
89
  # @param counterparty_id [String]
78
90
  #
91
+ # @param created_at_end [Time] An inclusive upper bound for searching created_at
92
+ #
93
+ # @param created_at_start [Time] An inclusive lower bound for searching created_at
94
+ #
79
95
  # @param due_date_end [Date] An inclusive upper bound for searching due_date
80
96
  #
81
97
  # @param due_date_start [Date] An inclusive lower bound for searching due_date
@@ -66,6 +66,13 @@ module ModernTreasury
66
66
  # @return [Symbol, ModernTreasury::Models::Currency]
67
67
  required :currency, enum: -> { ModernTreasury::Currency }
68
68
 
69
+ # @!attribute current_hold
70
+ # If the payment order's status is `held`, this will include the hold object's
71
+ # data.
72
+ #
73
+ # @return [ModernTreasury::Models::PaymentOrder::CurrentHold, nil]
74
+ required :current_hold, -> { ModernTreasury::PaymentOrder::CurrentHold }, nil?: true
75
+
69
76
  # @!attribute current_return
70
77
  # If the payment order's status is `returned`, this will include the return
71
78
  # object's data.
@@ -215,6 +222,12 @@ module ModernTreasury
215
222
  # @return [Symbol, ModernTreasury::Models::PaymentOrder::ReceivingAccountType]
216
223
  required :receiving_account_type, enum: -> { ModernTreasury::PaymentOrder::ReceivingAccountType }
217
224
 
225
+ # @!attribute reconciliation_status
226
+ # One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
227
+ #
228
+ # @return [Symbol, ModernTreasury::Models::PaymentOrder::ReconciliationStatus]
229
+ required :reconciliation_status, enum: -> { ModernTreasury::PaymentOrder::ReconciliationStatus }
230
+
218
231
  # @!attribute reference_numbers
219
232
  #
220
233
  # @return [Array<ModernTreasury::Models::PaymentOrder::ReferenceNumber>]
@@ -343,7 +356,7 @@ module ModernTreasury
343
356
  # @return [String, nil]
344
357
  required :vendor_failure_reason, String, nil?: true
345
358
 
346
- # @!method initialize(id:, accounting:, accounting_category_id:, accounting_ledger_class_id:, amount:, charge_bearer:, counterparty_id:, created_at:, currency:, current_return:, description:, direction:, effective_date:, expires_at:, external_id:, foreign_exchange_contract:, foreign_exchange_indicator:, foreign_exchange_rate:, ledger_transaction_id:, live_mode:, metadata:, nsf_protected:, object:, originating_account_id:, originating_party_name:, priority:, process_after:, purpose:, receiving_account_id:, receiving_account_type:, reference_numbers:, remittance_information:, send_remittance_advice:, statement_descriptor:, status:, subtype:, transaction_ids:, type:, ultimate_originating_account:, ultimate_originating_account_id:, ultimate_originating_account_type:, ultimate_originating_party_identifier:, ultimate_originating_party_name:, ultimate_receiving_party_identifier:, ultimate_receiving_party_name:, updated_at:, vendor_attributes:, vendor_failure_reason:)
359
+ # @!method initialize(id:, accounting:, accounting_category_id:, accounting_ledger_class_id:, amount:, charge_bearer:, counterparty_id:, created_at:, currency:, current_hold:, current_return:, description:, direction:, effective_date:, expires_at:, external_id:, foreign_exchange_contract:, foreign_exchange_indicator:, foreign_exchange_rate:, ledger_transaction_id:, live_mode:, metadata:, nsf_protected:, object:, originating_account_id:, originating_party_name:, priority:, process_after:, purpose:, receiving_account_id:, receiving_account_type:, reconciliation_status:, reference_numbers:, remittance_information:, send_remittance_advice:, statement_descriptor:, status:, subtype:, transaction_ids:, type:, ultimate_originating_account:, ultimate_originating_account_id:, ultimate_originating_account_type:, ultimate_originating_party_identifier:, ultimate_originating_party_name:, ultimate_receiving_party_identifier:, ultimate_receiving_party_name:, updated_at:, vendor_attributes:, vendor_failure_reason:)
347
360
  # Some parameter documentations has been truncated, see
348
361
  # {ModernTreasury::Models::PaymentOrder} for more details.
349
362
  #
@@ -365,6 +378,8 @@ module ModernTreasury
365
378
  #
366
379
  # @param currency [Symbol, ModernTreasury::Models::Currency] Defaults to the currency of the originating account.
367
380
  #
381
+ # @param current_hold [ModernTreasury::Models::PaymentOrder::CurrentHold, nil] If the payment order's status is `held`, this will include the hold object's dat
382
+ #
368
383
  # @param current_return [ModernTreasury::Models::ReturnObject, nil] If the payment order's status is `returned`, this will include the return object
369
384
  #
370
385
  # @param description [String, nil] An optional description for internal use.
@@ -407,6 +422,8 @@ module ModernTreasury
407
422
  #
408
423
  # @param receiving_account_type [Symbol, ModernTreasury::Models::PaymentOrder::ReceivingAccountType]
409
424
  #
425
+ # @param reconciliation_status [Symbol, ModernTreasury::Models::PaymentOrder::ReconciliationStatus] One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
426
+ #
410
427
  # @param reference_numbers [Array<ModernTreasury::Models::PaymentOrder::ReferenceNumber>]
411
428
  #
412
429
  # @param remittance_information [String, nil] For `ach`, this field will be passed through on an addenda record. For `wire` pa
@@ -491,6 +508,147 @@ module ModernTreasury
491
508
  # @return [Array<Symbol>]
492
509
  end
493
510
 
511
+ # @see ModernTreasury::Models::PaymentOrder#current_hold
512
+ class CurrentHold < ModernTreasury::Internal::Type::BaseModel
513
+ # @!attribute id
514
+ #
515
+ # @return [String]
516
+ required :id, String
517
+
518
+ # @!attribute created_at
519
+ #
520
+ # @return [Time]
521
+ required :created_at, Time
522
+
523
+ # @!attribute object
524
+ # The type of object
525
+ #
526
+ # @return [Symbol, ModernTreasury::Models::PaymentOrder::CurrentHold::Object]
527
+ required :object, enum: -> { ModernTreasury::PaymentOrder::CurrentHold::Object }
528
+
529
+ # @!attribute status
530
+ # The status of the hold
531
+ #
532
+ # @return [Symbol, ModernTreasury::Models::PaymentOrder::CurrentHold::Status]
533
+ required :status, enum: -> { ModernTreasury::PaymentOrder::CurrentHold::Status }
534
+
535
+ # @!attribute target_id
536
+ # The ID of the target being held
537
+ #
538
+ # @return [String]
539
+ required :target_id, String
540
+
541
+ # @!attribute target_type
542
+ # The type of target being held
543
+ #
544
+ # @return [Symbol, ModernTreasury::Models::PaymentOrder::CurrentHold::TargetType]
545
+ required :target_type, enum: -> { ModernTreasury::PaymentOrder::CurrentHold::TargetType }
546
+
547
+ # @!attribute updated_at
548
+ #
549
+ # @return [Time]
550
+ required :updated_at, Time
551
+
552
+ # @!attribute live_mode
553
+ # This field will be true if this object exists in the live environment or false
554
+ # if it exists in the test environment.
555
+ #
556
+ # @return [Boolean, nil]
557
+ optional :live_mode, ModernTreasury::Internal::Type::Boolean
558
+
559
+ # @!attribute metadata
560
+ # Additional metadata for the hold
561
+ #
562
+ # @return [Hash{Symbol=>String}, nil]
563
+ optional :metadata, ModernTreasury::Internal::Type::HashOf[String], nil?: true
564
+
565
+ # @!attribute reason
566
+ # The reason for the hold
567
+ #
568
+ # @return [String, nil]
569
+ optional :reason, String, nil?: true
570
+
571
+ # @!attribute resolution
572
+ # The resolution of the hold
573
+ #
574
+ # @return [String, nil]
575
+ optional :resolution, String, nil?: true
576
+
577
+ # @!attribute resolved_at
578
+ # When the hold was resolved
579
+ #
580
+ # @return [Time, nil]
581
+ optional :resolved_at, Time, nil?: true
582
+
583
+ # @!method initialize(id:, created_at:, object:, status:, target_id:, target_type:, updated_at:, live_mode: nil, metadata: nil, reason: nil, resolution: nil, resolved_at: nil)
584
+ # Some parameter documentations has been truncated, see
585
+ # {ModernTreasury::Models::PaymentOrder::CurrentHold} for more details.
586
+ #
587
+ # If the payment order's status is `held`, this will include the hold object's
588
+ # data.
589
+ #
590
+ # @param id [String]
591
+ #
592
+ # @param created_at [Time]
593
+ #
594
+ # @param object [Symbol, ModernTreasury::Models::PaymentOrder::CurrentHold::Object] The type of object
595
+ #
596
+ # @param status [Symbol, ModernTreasury::Models::PaymentOrder::CurrentHold::Status] The status of the hold
597
+ #
598
+ # @param target_id [String] The ID of the target being held
599
+ #
600
+ # @param target_type [Symbol, ModernTreasury::Models::PaymentOrder::CurrentHold::TargetType] The type of target being held
601
+ #
602
+ # @param updated_at [Time]
603
+ #
604
+ # @param live_mode [Boolean] This field will be true if this object exists in the live environment or false i
605
+ #
606
+ # @param metadata [Hash{Symbol=>String}, nil] Additional metadata for the hold
607
+ #
608
+ # @param reason [String, nil] The reason for the hold
609
+ #
610
+ # @param resolution [String, nil] The resolution of the hold
611
+ #
612
+ # @param resolved_at [Time, nil] When the hold was resolved
613
+
614
+ # The type of object
615
+ #
616
+ # @see ModernTreasury::Models::PaymentOrder::CurrentHold#object
617
+ module Object
618
+ extend ModernTreasury::Internal::Type::Enum
619
+
620
+ HOLD = :hold
621
+
622
+ # @!method self.values
623
+ # @return [Array<Symbol>]
624
+ end
625
+
626
+ # The status of the hold
627
+ #
628
+ # @see ModernTreasury::Models::PaymentOrder::CurrentHold#status
629
+ module Status
630
+ extend ModernTreasury::Internal::Type::Enum
631
+
632
+ ACTIVE = :active
633
+ RESOLVED = :resolved
634
+
635
+ # @!method self.values
636
+ # @return [Array<Symbol>]
637
+ end
638
+
639
+ # The type of target being held
640
+ #
641
+ # @see ModernTreasury::Models::PaymentOrder::CurrentHold#target_type
642
+ module TargetType
643
+ extend ModernTreasury::Internal::Type::Enum
644
+
645
+ PAYMENT_ORDER = :payment_order
646
+
647
+ # @!method self.values
648
+ # @return [Array<Symbol>]
649
+ end
650
+ end
651
+
494
652
  # One of `credit`, `debit`. Describes the direction money is flowing in the
495
653
  # transaction. A `credit` moves money from your account to someone else's. A
496
654
  # `debit` pulls money from someone else's account to your own. Note that wire,
@@ -548,6 +706,20 @@ module ModernTreasury
548
706
  # @return [Array<Symbol>]
549
707
  end
550
708
 
709
+ # One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
710
+ #
711
+ # @see ModernTreasury::Models::PaymentOrder#reconciliation_status
712
+ module ReconciliationStatus
713
+ extend ModernTreasury::Internal::Type::Enum
714
+
715
+ UNRECONCILED = :unreconciled
716
+ TENTATIVELY_RECONCILED = :tentatively_reconciled
717
+ RECONCILED = :reconciled
718
+
719
+ # @!method self.values
720
+ # @return [Array<Symbol>]
721
+ end
722
+
551
723
  class ReferenceNumber < ModernTreasury::Internal::Type::BaseModel
552
724
  # @!attribute id
553
725
  #
@@ -670,6 +842,7 @@ module ModernTreasury
670
842
  JPMC_PAYMENT_RETURNED_DATETIME = :jpmc_payment_returned_datetime
671
843
  JPMC_TRANSACTION_REFERENCE_NUMBER = :jpmc_transaction_reference_number
672
844
  LOB_CHECK_ID = :lob_check_id
845
+ MT_FOF_TRANSFER_ID = :mt_fof_transfer_id
673
846
  OTHER = :other
674
847
  PARTIAL_SWIFT_MIR = :partial_swift_mir
675
848
  PNC_CLEARING_REFERENCE = :pnc_clearing_reference
@@ -719,6 +892,7 @@ module ModernTreasury
719
892
  COMPLETED = :completed
720
893
  DENIED = :denied
721
894
  FAILED = :failed
895
+ HELD = :held
722
896
  NEEDS_APPROVAL = :needs_approval
723
897
  PENDING = :pending
724
898
  PROCESSING = :processing
@@ -212,6 +212,13 @@ module ModernTreasury
212
212
  # @return [String, nil]
213
213
  optional :receiving_account_id, String
214
214
 
215
+ # @!attribute reconciliation_status
216
+ # One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
217
+ #
218
+ # @return [Symbol, ModernTreasury::Models::PaymentOrderCreateAsyncParams::ReconciliationStatus, nil]
219
+ optional :reconciliation_status,
220
+ enum: -> { ModernTreasury::PaymentOrderCreateAsyncParams::ReconciliationStatus }
221
+
215
222
  # @!attribute remittance_information
216
223
  # For `ach`, this field will be passed through on an addenda record. For `wire`
217
224
  # payments the field will be passed through as the "Originator to Beneficiary
@@ -278,7 +285,7 @@ module ModernTreasury
278
285
  # @return [String, nil]
279
286
  optional :ultimate_receiving_party_name, String, nil?: true
280
287
 
281
- # @!method initialize(amount:, direction:, originating_account_id:, type:, accounting: nil, accounting_category_id: nil, accounting_ledger_class_id: nil, charge_bearer: nil, currency: nil, description: nil, effective_date: nil, expires_at: nil, fallback_type: nil, foreign_exchange_contract: nil, foreign_exchange_indicator: nil, ledger_transaction: nil, ledger_transaction_id: nil, line_items: nil, metadata: nil, nsf_protected: nil, originating_party_name: nil, priority: nil, process_after: nil, purpose: nil, receiving_account: nil, receiving_account_id: nil, remittance_information: nil, send_remittance_advice: nil, statement_descriptor: nil, subtype: nil, transaction_monitoring_enabled: nil, ultimate_originating_party_identifier: nil, ultimate_originating_party_name: nil, ultimate_receiving_party_identifier: nil, ultimate_receiving_party_name: nil, request_options: {})
288
+ # @!method initialize(amount:, direction:, originating_account_id:, type:, accounting: nil, accounting_category_id: nil, accounting_ledger_class_id: nil, charge_bearer: nil, currency: nil, description: nil, effective_date: nil, expires_at: nil, fallback_type: nil, foreign_exchange_contract: nil, foreign_exchange_indicator: nil, ledger_transaction: nil, ledger_transaction_id: nil, line_items: nil, metadata: nil, nsf_protected: nil, originating_party_name: nil, priority: nil, process_after: nil, purpose: nil, receiving_account: nil, receiving_account_id: nil, reconciliation_status: nil, remittance_information: nil, send_remittance_advice: nil, statement_descriptor: nil, subtype: nil, transaction_monitoring_enabled: nil, ultimate_originating_party_identifier: nil, ultimate_originating_party_name: nil, ultimate_receiving_party_identifier: nil, ultimate_receiving_party_name: nil, request_options: {})
282
289
  # Some parameter documentations has been truncated, see
283
290
  # {ModernTreasury::Models::PaymentOrderCreateAsyncParams} for more details.
284
291
  #
@@ -334,6 +341,8 @@ module ModernTreasury
334
341
  #
335
342
  # @param receiving_account_id [String] Either `receiving_account` or `receiving_account_id` must be present. When using
336
343
  #
344
+ # @param reconciliation_status [Symbol, ModernTreasury::Models::PaymentOrderCreateAsyncParams::ReconciliationStatus] One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
345
+ #
337
346
  # @param remittance_information [String, nil] For `ach`, this field will be passed through on an addenda record. For `wire` pa
338
347
  #
339
348
  # @param send_remittance_advice [Boolean, nil] Send an email to the counterparty when the payment order is sent to the bank. If
@@ -767,6 +776,18 @@ module ModernTreasury
767
776
  end
768
777
  end
769
778
  end
779
+
780
+ # One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
781
+ module ReconciliationStatus
782
+ extend ModernTreasury::Internal::Type::Enum
783
+
784
+ UNRECONCILED = :unreconciled
785
+ TENTATIVELY_RECONCILED = :tentatively_reconciled
786
+ RECONCILED = :reconciled
787
+
788
+ # @!method self.values
789
+ # @return [Array<Symbol>]
790
+ end
770
791
  end
771
792
  end
772
793
  end
@@ -218,6 +218,13 @@ module ModernTreasury
218
218
  # @return [String, nil]
219
219
  optional :receiving_account_id, String
220
220
 
221
+ # @!attribute reconciliation_status
222
+ # One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
223
+ #
224
+ # @return [Symbol, ModernTreasury::Models::PaymentOrderCreateParams::ReconciliationStatus, nil]
225
+ optional :reconciliation_status,
226
+ enum: -> { ModernTreasury::PaymentOrderCreateParams::ReconciliationStatus }
227
+
221
228
  # @!attribute remittance_information
222
229
  # For `ach`, this field will be passed through on an addenda record. For `wire`
223
230
  # payments the field will be passed through as the "Originator to Beneficiary
@@ -284,7 +291,7 @@ module ModernTreasury
284
291
  # @return [String, nil]
285
292
  optional :ultimate_receiving_party_name, String, nil?: true
286
293
 
287
- # @!method initialize(amount:, direction:, originating_account_id:, type:, accounting: nil, accounting_category_id: nil, accounting_ledger_class_id: nil, charge_bearer: nil, currency: nil, description: nil, documents: nil, effective_date: nil, expires_at: nil, fallback_type: nil, foreign_exchange_contract: nil, foreign_exchange_indicator: nil, ledger_transaction: nil, ledger_transaction_id: nil, line_items: nil, metadata: nil, nsf_protected: nil, originating_party_name: nil, priority: nil, process_after: nil, purpose: nil, receiving_account: nil, receiving_account_id: nil, remittance_information: nil, send_remittance_advice: nil, statement_descriptor: nil, subtype: nil, transaction_monitoring_enabled: nil, ultimate_originating_party_identifier: nil, ultimate_originating_party_name: nil, ultimate_receiving_party_identifier: nil, ultimate_receiving_party_name: nil, request_options: {})
294
+ # @!method initialize(amount:, direction:, originating_account_id:, type:, accounting: nil, accounting_category_id: nil, accounting_ledger_class_id: nil, charge_bearer: nil, currency: nil, description: nil, documents: nil, effective_date: nil, expires_at: nil, fallback_type: nil, foreign_exchange_contract: nil, foreign_exchange_indicator: nil, ledger_transaction: nil, ledger_transaction_id: nil, line_items: nil, metadata: nil, nsf_protected: nil, originating_party_name: nil, priority: nil, process_after: nil, purpose: nil, receiving_account: nil, receiving_account_id: nil, reconciliation_status: nil, remittance_information: nil, send_remittance_advice: nil, statement_descriptor: nil, subtype: nil, transaction_monitoring_enabled: nil, ultimate_originating_party_identifier: nil, ultimate_originating_party_name: nil, ultimate_receiving_party_identifier: nil, ultimate_receiving_party_name: nil, request_options: {})
288
295
  # Some parameter documentations has been truncated, see
289
296
  # {ModernTreasury::Models::PaymentOrderCreateParams} for more details.
290
297
  #
@@ -342,6 +349,8 @@ module ModernTreasury
342
349
  #
343
350
  # @param receiving_account_id [String] Either `receiving_account` or `receiving_account_id` must be present. When using
344
351
  #
352
+ # @param reconciliation_status [Symbol, ModernTreasury::Models::PaymentOrderCreateParams::ReconciliationStatus] One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
353
+ #
345
354
  # @param remittance_information [String, nil] For `ach`, this field will be passed through on an addenda record. For `wire` pa
346
355
  #
347
356
  # @param send_remittance_advice [Boolean, nil] Send an email to the counterparty when the payment order is sent to the bank. If
@@ -826,6 +835,18 @@ module ModernTreasury
826
835
  end
827
836
  end
828
837
  end
838
+
839
+ # One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
840
+ module ReconciliationStatus
841
+ extend ModernTreasury::Internal::Type::Enum
842
+
843
+ UNRECONCILED = :unreconciled
844
+ TENTATIVELY_RECONCILED = :tentatively_reconciled
845
+ RECONCILED = :reconciled
846
+
847
+ # @!method self.values
848
+ # @return [Array<Symbol>]
849
+ end
829
850
  end
830
851
  end
831
852
  end
@@ -174,6 +174,7 @@ module ModernTreasury
174
174
  COMPLETED = :completed
175
175
  DENIED = :denied
176
176
  FAILED = :failed
177
+ HELD = :held
177
178
  NEEDS_APPROVAL = :needs_approval
178
179
  PENDING = :pending
179
180
  PROCESSING = :processing
@@ -190,6 +190,13 @@ module ModernTreasury
190
190
  # @return [String, nil]
191
191
  optional :receiving_account_id, String
192
192
 
193
+ # @!attribute reconciliation_status
194
+ # One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
195
+ #
196
+ # @return [Symbol, ModernTreasury::Models::PaymentOrderUpdateParams::ReconciliationStatus, nil]
197
+ optional :reconciliation_status,
198
+ enum: -> { ModernTreasury::PaymentOrderUpdateParams::ReconciliationStatus }
199
+
193
200
  # @!attribute remittance_information
194
201
  # For `ach`, this field will be passed through on an addenda record. For `wire`
195
202
  # payments the field will be passed through as the "Originator to Beneficiary
@@ -273,7 +280,7 @@ module ModernTreasury
273
280
  # @return [String, nil]
274
281
  optional :ultimate_receiving_party_name, String, nil?: true
275
282
 
276
- # @!method initialize(accounting: nil, accounting_category_id: nil, accounting_ledger_class_id: nil, amount: nil, charge_bearer: nil, counterparty_id: nil, currency: nil, description: nil, direction: nil, effective_date: nil, expires_at: nil, fallback_type: nil, foreign_exchange_contract: nil, foreign_exchange_indicator: nil, line_items: nil, metadata: nil, nsf_protected: nil, originating_account_id: nil, originating_party_name: nil, priority: nil, process_after: nil, purpose: nil, receiving_account: nil, receiving_account_id: nil, remittance_information: nil, send_remittance_advice: nil, statement_descriptor: nil, status: nil, subtype: nil, type: nil, ultimate_originating_party_identifier: nil, ultimate_originating_party_name: nil, ultimate_receiving_party_identifier: nil, ultimate_receiving_party_name: nil, request_options: {})
283
+ # @!method initialize(accounting: nil, accounting_category_id: nil, accounting_ledger_class_id: nil, amount: nil, charge_bearer: nil, counterparty_id: nil, currency: nil, description: nil, direction: nil, effective_date: nil, expires_at: nil, fallback_type: nil, foreign_exchange_contract: nil, foreign_exchange_indicator: nil, line_items: nil, metadata: nil, nsf_protected: nil, originating_account_id: nil, originating_party_name: nil, priority: nil, process_after: nil, purpose: nil, receiving_account: nil, receiving_account_id: nil, reconciliation_status: nil, remittance_information: nil, send_remittance_advice: nil, statement_descriptor: nil, status: nil, subtype: nil, type: nil, ultimate_originating_party_identifier: nil, ultimate_originating_party_name: nil, ultimate_receiving_party_identifier: nil, ultimate_receiving_party_name: nil, request_options: {})
277
284
  # Some parameter documentations has been truncated, see
278
285
  # {ModernTreasury::Models::PaymentOrderUpdateParams} for more details.
279
286
  #
@@ -325,6 +332,8 @@ module ModernTreasury
325
332
  #
326
333
  # @param receiving_account_id [String] Either `receiving_account` or `receiving_account_id` must be present. When using
327
334
  #
335
+ # @param reconciliation_status [Symbol, ModernTreasury::Models::PaymentOrderUpdateParams::ReconciliationStatus] One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
336
+ #
328
337
  # @param remittance_information [String, nil] For `ach`, this field will be passed through on an addenda record. For `wire` pa
329
338
  #
330
339
  # @param send_remittance_advice [Boolean, nil] Send an email to the counterparty when the payment order is sent to the bank. If
@@ -759,6 +768,18 @@ module ModernTreasury
759
768
  end
760
769
  end
761
770
 
771
+ # One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
772
+ module ReconciliationStatus
773
+ extend ModernTreasury::Internal::Type::Enum
774
+
775
+ UNRECONCILED = :unreconciled
776
+ TENTATIVELY_RECONCILED = :tentatively_reconciled
777
+ RECONCILED = :reconciled
778
+
779
+ # @!method self.values
780
+ # @return [Array<Symbol>]
781
+ end
782
+
762
783
  # To cancel a payment order, use `cancelled`. To redraft a returned payment order,
763
784
  # use `approved`. To undo approval on a denied or approved payment order, use
764
785
  # `needs_approval`.
@@ -770,6 +791,7 @@ module ModernTreasury
770
791
  COMPLETED = :completed
771
792
  DENIED = :denied
772
793
  FAILED = :failed
794
+ HELD = :held
773
795
  NEEDS_APPROVAL = :needs_approval
774
796
  PENDING = :pending
775
797
  PROCESSING = :processing
@@ -52,6 +52,13 @@ module ModernTreasury
52
52
  # @return [Symbol, ModernTreasury::Models::PaymentOrders::Reversal::Reason]
53
53
  required :reason, enum: -> { ModernTreasury::PaymentOrders::Reversal::Reason }
54
54
 
55
+ # @!attribute reconciliation_status
56
+ # One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
57
+ #
58
+ # @return [Symbol, ModernTreasury::Models::PaymentOrders::Reversal::ReconciliationStatus]
59
+ required :reconciliation_status,
60
+ enum: -> { ModernTreasury::PaymentOrders::Reversal::ReconciliationStatus }
61
+
55
62
  # @!attribute status
56
63
  # The current status of the reversal.
57
64
  #
@@ -68,7 +75,7 @@ module ModernTreasury
68
75
  # @return [Time]
69
76
  required :updated_at, Time
70
77
 
71
- # @!method initialize(id:, created_at:, ledger_transaction_id:, live_mode:, metadata:, object:, payment_order_id:, reason:, status:, transaction_ids:, updated_at:)
78
+ # @!method initialize(id:, created_at:, ledger_transaction_id:, live_mode:, metadata:, object:, payment_order_id:, reason:, reconciliation_status:, status:, transaction_ids:, updated_at:)
72
79
  # Some parameter documentations has been truncated, see
73
80
  # {ModernTreasury::Models::PaymentOrders::Reversal} for more details.
74
81
  #
@@ -88,6 +95,8 @@ module ModernTreasury
88
95
  #
89
96
  # @param reason [Symbol, ModernTreasury::Models::PaymentOrders::Reversal::Reason] The reason for the reversal.
90
97
  #
98
+ # @param reconciliation_status [Symbol, ModernTreasury::Models::PaymentOrders::Reversal::ReconciliationStatus] One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
99
+ #
91
100
  # @param status [Symbol, ModernTreasury::Models::PaymentOrders::Reversal::Status] The current status of the reversal.
92
101
  #
93
102
  # @param transaction_ids [Array<String, nil>]
@@ -110,6 +119,20 @@ module ModernTreasury
110
119
  # @return [Array<Symbol>]
111
120
  end
112
121
 
122
+ # One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
123
+ #
124
+ # @see ModernTreasury::Models::PaymentOrders::Reversal#reconciliation_status
125
+ module ReconciliationStatus
126
+ extend ModernTreasury::Internal::Type::Enum
127
+
128
+ UNRECONCILED = :unreconciled
129
+ TENTATIVELY_RECONCILED = :tentatively_reconciled
130
+ RECONCILED = :reconciled
131
+
132
+ # @!method self.values
133
+ # @return [Array<Symbol>]
134
+ end
135
+
113
136
  # The current status of the reversal.
114
137
  #
115
138
  # @see ModernTreasury::Models::PaymentOrders::Reversal#status
@@ -142,6 +142,7 @@ module ModernTreasury
142
142
  JPMC_PAYMENT_RETURNED_DATETIME = :jpmc_payment_returned_datetime
143
143
  JPMC_TRANSACTION_REFERENCE_NUMBER = :jpmc_transaction_reference_number
144
144
  LOB_CHECK_ID = :lob_check_id
145
+ MT_FOF_TRANSFER_ID = :mt_fof_transfer_id
145
146
  OTHER = :other
146
147
  PARTIAL_SWIFT_MIR = :partial_swift_mir
147
148
  PNC_CLEARING_REFERENCE = :pnc_clearing_reference