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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +41 -0
- data/README.md +9 -9
- data/lib/modern_treasury/errors.rb +25 -11
- data/lib/modern_treasury/file_part.rb +10 -7
- data/lib/modern_treasury/internal/page.rb +3 -3
- data/lib/modern_treasury/internal/transport/base_client.rb +11 -7
- data/lib/modern_treasury/internal/transport/pooled_net_requester.rb +7 -10
- data/lib/modern_treasury/internal/type/base_page.rb +1 -1
- data/lib/modern_treasury/internal/type/file_input.rb +7 -4
- data/lib/modern_treasury/internal/util.rb +5 -5
- data/lib/modern_treasury/models/bulk_request_create_params.rb +49 -2
- data/lib/modern_treasury/models/counterparty.rb +5 -18
- data/lib/modern_treasury/models/counterparty_create_params.rb +5 -16
- data/lib/modern_treasury/models/incoming_payment_detail.rb +23 -1
- data/lib/modern_treasury/models/internal_account.rb +25 -1
- data/lib/modern_treasury/models/internal_account_list_params.rb +23 -1
- data/lib/modern_treasury/models/invoice_list_params.rb +17 -1
- data/lib/modern_treasury/models/payment_order.rb +175 -1
- data/lib/modern_treasury/models/payment_order_create_async_params.rb +22 -1
- data/lib/modern_treasury/models/payment_order_create_params.rb +22 -1
- data/lib/modern_treasury/models/payment_order_list_params.rb +1 -0
- data/lib/modern_treasury/models/payment_order_update_params.rb +23 -1
- data/lib/modern_treasury/models/payment_orders/reversal.rb +24 -1
- data/lib/modern_treasury/models/payment_reference.rb +1 -0
- data/lib/modern_treasury/models/return_create_params.rb +21 -1
- data/lib/modern_treasury/models/return_object.rb +25 -1
- data/lib/modern_treasury/models/transaction.rb +1 -0
- data/lib/modern_treasury/resources/counterparties.rb +1 -1
- data/lib/modern_treasury/resources/internal_accounts.rb +3 -1
- data/lib/modern_treasury/resources/invoices.rb +5 -1
- data/lib/modern_treasury/resources/payment_orders.rb +9 -3
- data/lib/modern_treasury/resources/returns.rb +3 -1
- data/lib/modern_treasury/version.rb +1 -1
- data/rbi/modern_treasury/errors.rbi +29 -2
- data/rbi/modern_treasury/file_part.rbi +1 -1
- data/rbi/modern_treasury/internal/transport/base_client.rbi +4 -5
- data/rbi/modern_treasury/internal/type/base_page.rbi +1 -1
- data/rbi/modern_treasury/internal/util.rbi +1 -1
- data/rbi/modern_treasury/models/bulk_request_create_params.rbi +133 -0
- data/rbi/modern_treasury/models/counterparty.rbi +3 -49
- data/rbi/modern_treasury/models/counterparty_create_params.rbi +4 -62
- data/rbi/modern_treasury/models/incoming_payment_detail.rbi +54 -0
- data/rbi/modern_treasury/models/internal_account.rbi +52 -0
- data/rbi/modern_treasury/models/internal_account_list_params.rbi +66 -0
- data/rbi/modern_treasury/models/invoice_list_params.rbi +22 -0
- data/rbi/modern_treasury/models/payment_order.rbi +305 -0
- data/rbi/modern_treasury/models/payment_order_create_async_params.rbi +64 -0
- data/rbi/modern_treasury/models/payment_order_create_params.rbi +64 -0
- data/rbi/modern_treasury/models/payment_order_list_params.rbi +5 -0
- data/rbi/modern_treasury/models/payment_order_update_params.rbi +69 -0
- data/rbi/modern_treasury/models/payment_orders/reversal.rbi +54 -0
- data/rbi/modern_treasury/models/payment_reference.rbi +5 -0
- data/rbi/modern_treasury/models/return_create_params.rbi +64 -0
- data/rbi/modern_treasury/models/return_object.rbi +58 -0
- data/rbi/modern_treasury/models/transaction.rbi +5 -0
- data/rbi/modern_treasury/resources/counterparties.rbi +1 -2
- data/rbi/modern_treasury/resources/internal_accounts.rbi +3 -0
- data/rbi/modern_treasury/resources/invoices.rbi +6 -0
- data/rbi/modern_treasury/resources/payment_orders.rbi +12 -0
- data/rbi/modern_treasury/resources/returns.rbi +4 -0
- data/sig/modern_treasury/errors.rbs +7 -0
- data/sig/modern_treasury/file_part.rbs +1 -1
- data/sig/modern_treasury/models/bulk_request_create_params.rbs +46 -0
- data/sig/modern_treasury/models/counterparty.rbs +4 -18
- data/sig/modern_treasury/models/counterparty_create_params.rbs +5 -21
- data/sig/modern_treasury/models/incoming_payment_detail.rbs +18 -0
- data/sig/modern_treasury/models/internal_account.rbs +20 -0
- data/sig/modern_treasury/models/internal_account_list_params.rbs +25 -1
- data/sig/modern_treasury/models/invoice_list_params.rbs +14 -0
- data/sig/modern_treasury/models/payment_order.rbs +132 -0
- data/sig/modern_treasury/models/payment_order_create_async_params.rbs +22 -0
- data/sig/modern_treasury/models/payment_order_create_params.rbs +22 -0
- data/sig/modern_treasury/models/payment_order_list_params.rbs +2 -0
- data/sig/modern_treasury/models/payment_order_update_params.rbs +24 -0
- data/sig/modern_treasury/models/payment_orders/reversal.rbs +18 -0
- data/sig/modern_treasury/models/payment_reference.rbs +2 -0
- data/sig/modern_treasury/models/return_create_params.rbs +23 -1
- data/sig/modern_treasury/models/return_object.rbs +22 -0
- data/sig/modern_treasury/models/transaction.rbs +2 -0
- data/sig/modern_treasury/resources/counterparties.rbs +1 -1
- data/sig/modern_treasury/resources/internal_accounts.rbs +1 -0
- data/sig/modern_treasury/resources/invoices.rbs +2 -0
- data/sig/modern_treasury/resources/payment_orders.rbs +3 -0
- data/sig/modern_treasury/resources/returns.rbs +1 -0
- metadata +2 -2
|
@@ -61,7 +61,13 @@ module ModernTreasury
|
|
|
61
61
|
# @return [String, nil]
|
|
62
62
|
optional :reason, String, nil?: true
|
|
63
63
|
|
|
64
|
-
# @!
|
|
64
|
+
# @!attribute reconciliation_status
|
|
65
|
+
# One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
|
|
66
|
+
#
|
|
67
|
+
# @return [Symbol, ModernTreasury::Models::ReturnCreateParams::ReconciliationStatus, nil]
|
|
68
|
+
optional :reconciliation_status, enum: -> { ModernTreasury::ReturnCreateParams::ReconciliationStatus }
|
|
69
|
+
|
|
70
|
+
# @!method initialize(returnable_id:, returnable_type:, additional_information: nil, code: nil, corrections: nil, data: nil, date_of_death: nil, reason: nil, reconciliation_status: nil, request_options: {})
|
|
65
71
|
# Some parameter documentations has been truncated, see
|
|
66
72
|
# {ModernTreasury::Models::ReturnCreateParams} for more details.
|
|
67
73
|
#
|
|
@@ -81,6 +87,8 @@ module ModernTreasury
|
|
|
81
87
|
#
|
|
82
88
|
# @param reason [String, nil] An optional description of the reason for the return. This is for internal usage
|
|
83
89
|
#
|
|
90
|
+
# @param reconciliation_status [Symbol, ModernTreasury::Models::ReturnCreateParams::ReconciliationStatus] One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
|
|
91
|
+
#
|
|
84
92
|
# @param request_options [ModernTreasury::RequestOptions, Hash{Symbol=>Object}]
|
|
85
93
|
|
|
86
94
|
# The type of object being returned. Currently, this may only be
|
|
@@ -259,6 +267,18 @@ module ModernTreasury
|
|
|
259
267
|
#
|
|
260
268
|
# @param transaction_code [String, nil] The updated account type code that should replace the one originally used on the
|
|
261
269
|
end
|
|
270
|
+
|
|
271
|
+
# One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
|
|
272
|
+
module ReconciliationStatus
|
|
273
|
+
extend ModernTreasury::Internal::Type::Enum
|
|
274
|
+
|
|
275
|
+
UNRECONCILED = :unreconciled
|
|
276
|
+
TENTATIVELY_RECONCILED = :tentatively_reconciled
|
|
277
|
+
RECONCILED = :reconciled
|
|
278
|
+
|
|
279
|
+
# @!method self.values
|
|
280
|
+
# @return [Array<Symbol>]
|
|
281
|
+
end
|
|
262
282
|
end
|
|
263
283
|
end
|
|
264
284
|
end
|
|
@@ -98,6 +98,12 @@ module ModernTreasury
|
|
|
98
98
|
# @return [String, nil]
|
|
99
99
|
required :reason, String, nil?: true
|
|
100
100
|
|
|
101
|
+
# @!attribute reconciliation_status
|
|
102
|
+
# One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
|
|
103
|
+
#
|
|
104
|
+
# @return [Symbol, ModernTreasury::Models::ReturnObject::ReconciliationStatus]
|
|
105
|
+
required :reconciliation_status, enum: -> { ModernTreasury::ReturnObject::ReconciliationStatus }
|
|
106
|
+
|
|
101
107
|
# @!attribute reference_numbers
|
|
102
108
|
# An array of Payment Reference objects.
|
|
103
109
|
#
|
|
@@ -166,7 +172,7 @@ module ModernTreasury
|
|
|
166
172
|
# @return [Object, nil]
|
|
167
173
|
optional :data, ModernTreasury::Internal::Type::Unknown, nil?: true
|
|
168
174
|
|
|
169
|
-
# @!method initialize(id:, amount:, code:, corrections:, created_at:, currency:, current_return:, date_of_death:, discarded_at:, failure_reason:, internal_account_id:, ledger_transaction_id:, live_mode:, object:, reason:, reference_numbers:, returnable_id:, returnable_type:, role:, status:, transaction_id:, transaction_line_item_id:, type:, updated_at:, additional_information: nil, data: nil)
|
|
175
|
+
# @!method initialize(id:, amount:, code:, corrections:, created_at:, currency:, current_return:, date_of_death:, discarded_at:, failure_reason:, internal_account_id:, ledger_transaction_id:, live_mode:, object:, reason:, reconciliation_status:, reference_numbers:, returnable_id:, returnable_type:, role:, status:, transaction_id:, transaction_line_item_id:, type:, updated_at:, additional_information: nil, data: nil)
|
|
170
176
|
# Some parameter documentations has been truncated, see
|
|
171
177
|
# {ModernTreasury::Models::ReturnObject} for more details.
|
|
172
178
|
#
|
|
@@ -200,6 +206,8 @@ module ModernTreasury
|
|
|
200
206
|
#
|
|
201
207
|
# @param reason [String, nil] Often the bank will provide an explanation for the return, which is a short huma
|
|
202
208
|
#
|
|
209
|
+
# @param reconciliation_status [Symbol, ModernTreasury::Models::ReturnObject::ReconciliationStatus] One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
|
|
210
|
+
#
|
|
203
211
|
# @param reference_numbers [Array<ModernTreasury::Models::ReturnObject::ReferenceNumber>] An array of Payment Reference objects.
|
|
204
212
|
#
|
|
205
213
|
# @param returnable_id [String, nil] The ID of the object being returned or `null`.
|
|
@@ -391,6 +399,20 @@ module ModernTreasury
|
|
|
391
399
|
# @param transaction_code [String, nil] The updated account type code that should replace the one originally used on the
|
|
392
400
|
end
|
|
393
401
|
|
|
402
|
+
# One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
|
|
403
|
+
#
|
|
404
|
+
# @see ModernTreasury::Models::ReturnObject#reconciliation_status
|
|
405
|
+
module ReconciliationStatus
|
|
406
|
+
extend ModernTreasury::Internal::Type::Enum
|
|
407
|
+
|
|
408
|
+
UNRECONCILED = :unreconciled
|
|
409
|
+
TENTATIVELY_RECONCILED = :tentatively_reconciled
|
|
410
|
+
RECONCILED = :reconciled
|
|
411
|
+
|
|
412
|
+
# @!method self.values
|
|
413
|
+
# @return [Array<Symbol>]
|
|
414
|
+
end
|
|
415
|
+
|
|
394
416
|
class ReferenceNumber < ModernTreasury::Internal::Type::BaseModel
|
|
395
417
|
# @!attribute id
|
|
396
418
|
#
|
|
@@ -513,6 +535,7 @@ module ModernTreasury
|
|
|
513
535
|
JPMC_PAYMENT_RETURNED_DATETIME = :jpmc_payment_returned_datetime
|
|
514
536
|
JPMC_TRANSACTION_REFERENCE_NUMBER = :jpmc_transaction_reference_number
|
|
515
537
|
LOB_CHECK_ID = :lob_check_id
|
|
538
|
+
MT_FOF_TRANSFER_ID = :mt_fof_transfer_id
|
|
516
539
|
OTHER = :other
|
|
517
540
|
PARTIAL_SWIFT_MIR = :partial_swift_mir
|
|
518
541
|
PNC_CLEARING_REFERENCE = :pnc_clearing_reference
|
|
@@ -611,6 +634,7 @@ module ModernTreasury
|
|
|
611
634
|
CHECK = :check
|
|
612
635
|
CROSS_BORDER = :cross_border
|
|
613
636
|
EFT = :eft
|
|
637
|
+
GB_FPS = :gb_fps
|
|
614
638
|
INTERAC = :interac
|
|
615
639
|
MANUAL = :manual
|
|
616
640
|
SEPA = :sepa
|
|
@@ -32,7 +32,7 @@ module ModernTreasury
|
|
|
32
32
|
#
|
|
33
33
|
# @param taxpayer_identifier [String] Body param: Either a valid SSN or EIN.
|
|
34
34
|
#
|
|
35
|
-
# @param verification_status [
|
|
35
|
+
# @param verification_status [String] Body param: The verification status of the counterparty.
|
|
36
36
|
#
|
|
37
37
|
# @param request_options [ModernTreasury::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
38
38
|
#
|
|
@@ -111,7 +111,7 @@ module ModernTreasury
|
|
|
111
111
|
#
|
|
112
112
|
# list internal accounts
|
|
113
113
|
#
|
|
114
|
-
# @overload list(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: {})
|
|
114
|
+
# @overload list(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: {})
|
|
115
115
|
#
|
|
116
116
|
# @param after_cursor [String, nil]
|
|
117
117
|
#
|
|
@@ -129,6 +129,8 @@ module ModernTreasury
|
|
|
129
129
|
#
|
|
130
130
|
# @param per_page [Integer]
|
|
131
131
|
#
|
|
132
|
+
# @param status [Symbol, ModernTreasury::Models::InternalAccountListParams::Status] Only return internal accounts with this status.
|
|
133
|
+
#
|
|
132
134
|
# @param request_options [ModernTreasury::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
133
135
|
#
|
|
134
136
|
# @return [ModernTreasury::Internal::Page<ModernTreasury::Models::InternalAccount>]
|
|
@@ -179,12 +179,16 @@ module ModernTreasury
|
|
|
179
179
|
#
|
|
180
180
|
# list invoices
|
|
181
181
|
#
|
|
182
|
-
# @overload list(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: {})
|
|
182
|
+
# @overload list(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: {})
|
|
183
183
|
#
|
|
184
184
|
# @param after_cursor [String, nil]
|
|
185
185
|
#
|
|
186
186
|
# @param counterparty_id [String]
|
|
187
187
|
#
|
|
188
|
+
# @param created_at_end [Time] An inclusive upper bound for searching created_at
|
|
189
|
+
#
|
|
190
|
+
# @param created_at_start [Time] An inclusive lower bound for searching created_at
|
|
191
|
+
#
|
|
188
192
|
# @param due_date_end [Date] An inclusive upper bound for searching due_date
|
|
189
193
|
#
|
|
190
194
|
# @param due_date_start [Date] An inclusive lower bound for searching due_date
|
|
@@ -11,7 +11,7 @@ module ModernTreasury
|
|
|
11
11
|
#
|
|
12
12
|
# Create a new Payment Order
|
|
13
13
|
#
|
|
14
|
-
# @overload create(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: {})
|
|
14
|
+
# @overload create(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: {})
|
|
15
15
|
#
|
|
16
16
|
# @param amount [Integer] Value in specified currency's smallest unit. e.g. $10 would be represented as 10
|
|
17
17
|
#
|
|
@@ -67,6 +67,8 @@ module ModernTreasury
|
|
|
67
67
|
#
|
|
68
68
|
# @param receiving_account_id [String] Either `receiving_account` or `receiving_account_id` must be present. When using
|
|
69
69
|
#
|
|
70
|
+
# @param reconciliation_status [Symbol, ModernTreasury::Models::PaymentOrderCreateParams::ReconciliationStatus] One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
|
|
71
|
+
#
|
|
70
72
|
# @param remittance_information [String, nil] For `ach`, this field will be passed through on an addenda record. For `wire` pa
|
|
71
73
|
#
|
|
72
74
|
# @param send_remittance_advice [Boolean, nil] Send an email to the counterparty when the payment order is sent to the bank. If
|
|
@@ -125,7 +127,7 @@ module ModernTreasury
|
|
|
125
127
|
#
|
|
126
128
|
# Update a payment order
|
|
127
129
|
#
|
|
128
|
-
# @overload update(id, 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: {})
|
|
130
|
+
# @overload update(id, 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: {})
|
|
129
131
|
#
|
|
130
132
|
# @param id [String]
|
|
131
133
|
#
|
|
@@ -177,6 +179,8 @@ module ModernTreasury
|
|
|
177
179
|
#
|
|
178
180
|
# @param receiving_account_id [String] Either `receiving_account` or `receiving_account_id` must be present. When using
|
|
179
181
|
#
|
|
182
|
+
# @param reconciliation_status [Symbol, ModernTreasury::Models::PaymentOrderUpdateParams::ReconciliationStatus] One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
|
|
183
|
+
#
|
|
180
184
|
# @param remittance_information [String, nil] For `ach`, this field will be passed through on an addenda record. For `wire` pa
|
|
181
185
|
#
|
|
182
186
|
# @param send_remittance_advice [Boolean, nil] Send an email to the counterparty when the payment order is sent to the bank. If
|
|
@@ -278,7 +282,7 @@ module ModernTreasury
|
|
|
278
282
|
#
|
|
279
283
|
# Create a new payment order asynchronously
|
|
280
284
|
#
|
|
281
|
-
# @overload create_async(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: {})
|
|
285
|
+
# @overload create_async(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
286
|
#
|
|
283
287
|
# @param amount [Integer] Value in specified currency's smallest unit. e.g. $10 would be represented as 10
|
|
284
288
|
#
|
|
@@ -332,6 +336,8 @@ module ModernTreasury
|
|
|
332
336
|
#
|
|
333
337
|
# @param receiving_account_id [String] Either `receiving_account` or `receiving_account_id` must be present. When using
|
|
334
338
|
#
|
|
339
|
+
# @param reconciliation_status [Symbol, ModernTreasury::Models::PaymentOrderCreateAsyncParams::ReconciliationStatus] One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
|
|
340
|
+
#
|
|
335
341
|
# @param remittance_information [String, nil] For `ach`, this field will be passed through on an addenda record. For `wire` pa
|
|
336
342
|
#
|
|
337
343
|
# @param send_remittance_advice [Boolean, nil] Send an email to the counterparty when the payment order is sent to the bank. If
|
|
@@ -8,7 +8,7 @@ module ModernTreasury
|
|
|
8
8
|
#
|
|
9
9
|
# Create a return.
|
|
10
10
|
#
|
|
11
|
-
# @overload create(returnable_id:, returnable_type:, additional_information: nil, code: nil, corrections: nil, data: nil, date_of_death: nil, reason: nil, request_options: {})
|
|
11
|
+
# @overload create(returnable_id:, returnable_type:, additional_information: nil, code: nil, corrections: nil, data: nil, date_of_death: nil, reason: nil, reconciliation_status: nil, request_options: {})
|
|
12
12
|
#
|
|
13
13
|
# @param returnable_id [String, nil] The ID of the object being returned or `null`.
|
|
14
14
|
#
|
|
@@ -26,6 +26,8 @@ module ModernTreasury
|
|
|
26
26
|
#
|
|
27
27
|
# @param reason [String, nil] An optional description of the reason for the return. This is for internal usage
|
|
28
28
|
#
|
|
29
|
+
# @param reconciliation_status [Symbol, ModernTreasury::Models::ReturnCreateParams::ReconciliationStatus] One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
|
|
30
|
+
#
|
|
29
31
|
# @param request_options [ModernTreasury::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
30
32
|
#
|
|
31
33
|
# @return [ModernTreasury::Models::ReturnObject]
|
|
@@ -33,6 +33,9 @@ module ModernTreasury
|
|
|
33
33
|
sig { returns(T.nilable(Integer)) }
|
|
34
34
|
attr_accessor :status
|
|
35
35
|
|
|
36
|
+
sig { returns(T.nilable(T::Hash[String, String])) }
|
|
37
|
+
attr_accessor :headers
|
|
38
|
+
|
|
36
39
|
sig { returns(T.nilable(T.anything)) }
|
|
37
40
|
attr_accessor :body
|
|
38
41
|
|
|
@@ -41,6 +44,7 @@ module ModernTreasury
|
|
|
41
44
|
params(
|
|
42
45
|
url: URI::Generic,
|
|
43
46
|
status: T.nilable(Integer),
|
|
47
|
+
headers: T.nilable(T::Hash[String, String]),
|
|
44
48
|
body: T.nilable(Object),
|
|
45
49
|
request: NilClass,
|
|
46
50
|
response: NilClass,
|
|
@@ -50,6 +54,7 @@ module ModernTreasury
|
|
|
50
54
|
def self.new(
|
|
51
55
|
url:,
|
|
52
56
|
status: nil,
|
|
57
|
+
headers: nil,
|
|
53
58
|
body: nil,
|
|
54
59
|
request: nil,
|
|
55
60
|
response: nil,
|
|
@@ -70,6 +75,7 @@ module ModernTreasury
|
|
|
70
75
|
params(
|
|
71
76
|
url: URI::Generic,
|
|
72
77
|
status: NilClass,
|
|
78
|
+
headers: T.nilable(T::Hash[String, String]),
|
|
73
79
|
body: NilClass,
|
|
74
80
|
request: NilClass,
|
|
75
81
|
response: NilClass,
|
|
@@ -79,6 +85,7 @@ module ModernTreasury
|
|
|
79
85
|
def self.new(
|
|
80
86
|
url:,
|
|
81
87
|
status: nil,
|
|
88
|
+
headers: nil,
|
|
82
89
|
body: nil,
|
|
83
90
|
request: nil,
|
|
84
91
|
response: nil,
|
|
@@ -93,6 +100,7 @@ module ModernTreasury
|
|
|
93
100
|
params(
|
|
94
101
|
url: URI::Generic,
|
|
95
102
|
status: NilClass,
|
|
103
|
+
headers: T.nilable(T::Hash[String, String]),
|
|
96
104
|
body: NilClass,
|
|
97
105
|
request: NilClass,
|
|
98
106
|
response: NilClass,
|
|
@@ -102,6 +110,7 @@ module ModernTreasury
|
|
|
102
110
|
def self.new(
|
|
103
111
|
url:,
|
|
104
112
|
status: nil,
|
|
113
|
+
headers: nil,
|
|
105
114
|
body: nil,
|
|
106
115
|
request: nil,
|
|
107
116
|
response: nil,
|
|
@@ -116,13 +125,22 @@ module ModernTreasury
|
|
|
116
125
|
params(
|
|
117
126
|
url: URI::Generic,
|
|
118
127
|
status: Integer,
|
|
128
|
+
headers: T.nilable(T::Hash[String, String]),
|
|
119
129
|
body: T.nilable(Object),
|
|
120
130
|
request: NilClass,
|
|
121
131
|
response: NilClass,
|
|
122
132
|
message: T.nilable(String)
|
|
123
133
|
).returns(T.attached_class)
|
|
124
134
|
end
|
|
125
|
-
def self.for(
|
|
135
|
+
def self.for(
|
|
136
|
+
url:,
|
|
137
|
+
status:,
|
|
138
|
+
headers:,
|
|
139
|
+
body:,
|
|
140
|
+
request:,
|
|
141
|
+
response:,
|
|
142
|
+
message: nil
|
|
143
|
+
)
|
|
126
144
|
end
|
|
127
145
|
|
|
128
146
|
sig { returns(Integer) }
|
|
@@ -133,13 +151,22 @@ module ModernTreasury
|
|
|
133
151
|
params(
|
|
134
152
|
url: URI::Generic,
|
|
135
153
|
status: Integer,
|
|
154
|
+
headers: T.nilable(T::Hash[String, String]),
|
|
136
155
|
body: T.nilable(Object),
|
|
137
156
|
request: NilClass,
|
|
138
157
|
response: NilClass,
|
|
139
158
|
message: T.nilable(String)
|
|
140
159
|
).returns(T.attached_class)
|
|
141
160
|
end
|
|
142
|
-
def self.new(
|
|
161
|
+
def self.new(
|
|
162
|
+
url:,
|
|
163
|
+
status:,
|
|
164
|
+
headers:,
|
|
165
|
+
body:,
|
|
166
|
+
request:,
|
|
167
|
+
response:,
|
|
168
|
+
message: nil
|
|
169
|
+
)
|
|
143
170
|
end
|
|
144
171
|
end
|
|
145
172
|
|
|
@@ -86,10 +86,9 @@ module ModernTreasury
|
|
|
86
86
|
|
|
87
87
|
# @api private
|
|
88
88
|
sig do
|
|
89
|
-
params(
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
).returns(T::Boolean)
|
|
89
|
+
params(status: Integer, headers: T::Hash[String, String]).returns(
|
|
90
|
+
T::Boolean
|
|
91
|
+
)
|
|
93
92
|
end
|
|
94
93
|
def should_retry?(status, headers:)
|
|
95
94
|
end
|
|
@@ -100,7 +99,7 @@ module ModernTreasury
|
|
|
100
99
|
request:
|
|
101
100
|
ModernTreasury::Internal::Transport::BaseClient::RequestInput,
|
|
102
101
|
status: Integer,
|
|
103
|
-
response_headers: T
|
|
102
|
+
response_headers: T::Hash[String, String]
|
|
104
103
|
).returns(
|
|
105
104
|
ModernTreasury::Internal::Transport::BaseClient::RequestInput
|
|
106
105
|
)
|
|
@@ -31,7 +31,7 @@ module ModernTreasury
|
|
|
31
31
|
client: ModernTreasury::Internal::Transport::BaseClient,
|
|
32
32
|
req:
|
|
33
33
|
ModernTreasury::Internal::Transport::BaseClient::RequestComponents,
|
|
34
|
-
headers: T
|
|
34
|
+
headers: T::Hash[String, String],
|
|
35
35
|
page_data: T.anything
|
|
36
36
|
).void
|
|
37
37
|
end
|
|
@@ -361,7 +361,7 @@ module ModernTreasury
|
|
|
361
361
|
# Assumes each chunk in stream has `Encoding::BINARY`.
|
|
362
362
|
sig do
|
|
363
363
|
params(
|
|
364
|
-
headers: T
|
|
364
|
+
headers: T::Hash[String, String],
|
|
365
365
|
stream: T::Enumerable[String],
|
|
366
366
|
suppress_error: T::Boolean
|
|
367
367
|
).returns(T.anything)
|
|
@@ -509,6 +509,24 @@ module ModernTreasury
|
|
|
509
509
|
sig { params(receiving_account_id: String).void }
|
|
510
510
|
attr_writer :receiving_account_id
|
|
511
511
|
|
|
512
|
+
# One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
|
|
513
|
+
sig do
|
|
514
|
+
returns(
|
|
515
|
+
T.nilable(
|
|
516
|
+
ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReconciliationStatus::OrSymbol
|
|
517
|
+
)
|
|
518
|
+
)
|
|
519
|
+
end
|
|
520
|
+
attr_reader :reconciliation_status
|
|
521
|
+
|
|
522
|
+
sig do
|
|
523
|
+
params(
|
|
524
|
+
reconciliation_status:
|
|
525
|
+
ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReconciliationStatus::OrSymbol
|
|
526
|
+
).void
|
|
527
|
+
end
|
|
528
|
+
attr_writer :reconciliation_status
|
|
529
|
+
|
|
512
530
|
# For `ach`, this field will be passed through on an addenda record. For `wire`
|
|
513
531
|
# payments the field will be passed through as the "Originator to Beneficiary
|
|
514
532
|
# Information", also known as OBI or Fedwire tag 6000.
|
|
@@ -605,6 +623,8 @@ module ModernTreasury
|
|
|
605
623
|
receiving_account:
|
|
606
624
|
ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::OrHash,
|
|
607
625
|
receiving_account_id: String,
|
|
626
|
+
reconciliation_status:
|
|
627
|
+
ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReconciliationStatus::OrSymbol,
|
|
608
628
|
remittance_information: T.nilable(String),
|
|
609
629
|
send_remittance_advice: T.nilable(T::Boolean),
|
|
610
630
|
statement_descriptor: T.nilable(String),
|
|
@@ -708,6 +728,8 @@ module ModernTreasury
|
|
|
708
728
|
# `receiving_account_id`, you may pass the id of an external account or an
|
|
709
729
|
# internal account.
|
|
710
730
|
receiving_account_id: nil,
|
|
731
|
+
# One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
|
|
732
|
+
reconciliation_status: nil,
|
|
711
733
|
# For `ach`, this field will be passed through on an addenda record. For `wire`
|
|
712
734
|
# payments the field will be passed through as the "Originator to Beneficiary
|
|
713
735
|
# Information", also known as OBI or Fedwire tag 6000.
|
|
@@ -785,6 +807,8 @@ module ModernTreasury
|
|
|
785
807
|
receiving_account:
|
|
786
808
|
ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount,
|
|
787
809
|
receiving_account_id: String,
|
|
810
|
+
reconciliation_status:
|
|
811
|
+
ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReconciliationStatus::OrSymbol,
|
|
788
812
|
remittance_information: T.nilable(String),
|
|
789
813
|
send_remittance_advice: T.nilable(T::Boolean),
|
|
790
814
|
statement_descriptor: T.nilable(String),
|
|
@@ -1932,6 +1956,46 @@ module ModernTreasury
|
|
|
1932
1956
|
end
|
|
1933
1957
|
end
|
|
1934
1958
|
end
|
|
1959
|
+
|
|
1960
|
+
# One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
|
|
1961
|
+
module ReconciliationStatus
|
|
1962
|
+
extend ModernTreasury::Internal::Type::Enum
|
|
1963
|
+
|
|
1964
|
+
TaggedSymbol =
|
|
1965
|
+
T.type_alias do
|
|
1966
|
+
T.all(
|
|
1967
|
+
Symbol,
|
|
1968
|
+
ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReconciliationStatus
|
|
1969
|
+
)
|
|
1970
|
+
end
|
|
1971
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1972
|
+
|
|
1973
|
+
UNRECONCILED =
|
|
1974
|
+
T.let(
|
|
1975
|
+
:unreconciled,
|
|
1976
|
+
ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReconciliationStatus::TaggedSymbol
|
|
1977
|
+
)
|
|
1978
|
+
TENTATIVELY_RECONCILED =
|
|
1979
|
+
T.let(
|
|
1980
|
+
:tentatively_reconciled,
|
|
1981
|
+
ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReconciliationStatus::TaggedSymbol
|
|
1982
|
+
)
|
|
1983
|
+
RECONCILED =
|
|
1984
|
+
T.let(
|
|
1985
|
+
:reconciled,
|
|
1986
|
+
ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReconciliationStatus::TaggedSymbol
|
|
1987
|
+
)
|
|
1988
|
+
|
|
1989
|
+
sig do
|
|
1990
|
+
override.returns(
|
|
1991
|
+
T::Array[
|
|
1992
|
+
ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReconciliationStatus::TaggedSymbol
|
|
1993
|
+
]
|
|
1994
|
+
)
|
|
1995
|
+
end
|
|
1996
|
+
def self.values
|
|
1997
|
+
end
|
|
1998
|
+
end
|
|
1935
1999
|
end
|
|
1936
2000
|
|
|
1937
2001
|
class ExpectedPaymentCreateRequest < ModernTreasury::Internal::Type::BaseModel
|
|
@@ -2957,6 +3021,24 @@ module ModernTreasury
|
|
|
2957
3021
|
sig { params(receiving_account_id: String).void }
|
|
2958
3022
|
attr_writer :receiving_account_id
|
|
2959
3023
|
|
|
3024
|
+
# One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
|
|
3025
|
+
sig do
|
|
3026
|
+
returns(
|
|
3027
|
+
T.nilable(
|
|
3028
|
+
ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReconciliationStatus::OrSymbol
|
|
3029
|
+
)
|
|
3030
|
+
)
|
|
3031
|
+
end
|
|
3032
|
+
attr_reader :reconciliation_status
|
|
3033
|
+
|
|
3034
|
+
sig do
|
|
3035
|
+
params(
|
|
3036
|
+
reconciliation_status:
|
|
3037
|
+
ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReconciliationStatus::OrSymbol
|
|
3038
|
+
).void
|
|
3039
|
+
end
|
|
3040
|
+
attr_writer :reconciliation_status
|
|
3041
|
+
|
|
2960
3042
|
# For `ach`, this field will be passed through on an addenda record. For `wire`
|
|
2961
3043
|
# payments the field will be passed through as the "Originator to Beneficiary
|
|
2962
3044
|
# Information", also known as OBI or Fedwire tag 6000.
|
|
@@ -3080,6 +3162,8 @@ module ModernTreasury
|
|
|
3080
3162
|
receiving_account:
|
|
3081
3163
|
ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::OrHash,
|
|
3082
3164
|
receiving_account_id: String,
|
|
3165
|
+
reconciliation_status:
|
|
3166
|
+
ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReconciliationStatus::OrSymbol,
|
|
3083
3167
|
remittance_information: T.nilable(String),
|
|
3084
3168
|
send_remittance_advice: T.nilable(T::Boolean),
|
|
3085
3169
|
statement_descriptor: T.nilable(String),
|
|
@@ -3174,6 +3258,8 @@ module ModernTreasury
|
|
|
3174
3258
|
# `receiving_account_id`, you may pass the id of an external account or an
|
|
3175
3259
|
# internal account.
|
|
3176
3260
|
receiving_account_id: nil,
|
|
3261
|
+
# One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
|
|
3262
|
+
reconciliation_status: nil,
|
|
3177
3263
|
# For `ach`, this field will be passed through on an addenda record. For `wire`
|
|
3178
3264
|
# payments the field will be passed through as the "Originator to Beneficiary
|
|
3179
3265
|
# Information", also known as OBI or Fedwire tag 6000.
|
|
@@ -3262,6 +3348,8 @@ module ModernTreasury
|
|
|
3262
3348
|
receiving_account:
|
|
3263
3349
|
ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount,
|
|
3264
3350
|
receiving_account_id: String,
|
|
3351
|
+
reconciliation_status:
|
|
3352
|
+
ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReconciliationStatus::OrSymbol,
|
|
3265
3353
|
remittance_information: T.nilable(String),
|
|
3266
3354
|
send_remittance_advice: T.nilable(T::Boolean),
|
|
3267
3355
|
statement_descriptor: T.nilable(String),
|
|
@@ -4412,6 +4500,46 @@ module ModernTreasury
|
|
|
4412
4500
|
end
|
|
4413
4501
|
end
|
|
4414
4502
|
|
|
4503
|
+
# One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
|
|
4504
|
+
module ReconciliationStatus
|
|
4505
|
+
extend ModernTreasury::Internal::Type::Enum
|
|
4506
|
+
|
|
4507
|
+
TaggedSymbol =
|
|
4508
|
+
T.type_alias do
|
|
4509
|
+
T.all(
|
|
4510
|
+
Symbol,
|
|
4511
|
+
ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReconciliationStatus
|
|
4512
|
+
)
|
|
4513
|
+
end
|
|
4514
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
4515
|
+
|
|
4516
|
+
UNRECONCILED =
|
|
4517
|
+
T.let(
|
|
4518
|
+
:unreconciled,
|
|
4519
|
+
ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReconciliationStatus::TaggedSymbol
|
|
4520
|
+
)
|
|
4521
|
+
TENTATIVELY_RECONCILED =
|
|
4522
|
+
T.let(
|
|
4523
|
+
:tentatively_reconciled,
|
|
4524
|
+
ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReconciliationStatus::TaggedSymbol
|
|
4525
|
+
)
|
|
4526
|
+
RECONCILED =
|
|
4527
|
+
T.let(
|
|
4528
|
+
:reconciled,
|
|
4529
|
+
ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReconciliationStatus::TaggedSymbol
|
|
4530
|
+
)
|
|
4531
|
+
|
|
4532
|
+
sig do
|
|
4533
|
+
override.returns(
|
|
4534
|
+
T::Array[
|
|
4535
|
+
ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReconciliationStatus::TaggedSymbol
|
|
4536
|
+
]
|
|
4537
|
+
)
|
|
4538
|
+
end
|
|
4539
|
+
def self.values
|
|
4540
|
+
end
|
|
4541
|
+
end
|
|
4542
|
+
|
|
4415
4543
|
# To cancel a payment order, use `cancelled`. To redraft a returned payment order,
|
|
4416
4544
|
# use `approved`. To undo approval on a denied or approved payment order, use
|
|
4417
4545
|
# `needs_approval`.
|
|
@@ -4452,6 +4580,11 @@ module ModernTreasury
|
|
|
4452
4580
|
:failed,
|
|
4453
4581
|
ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::Status::TaggedSymbol
|
|
4454
4582
|
)
|
|
4583
|
+
HELD =
|
|
4584
|
+
T.let(
|
|
4585
|
+
:held,
|
|
4586
|
+
ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::Status::TaggedSymbol
|
|
4587
|
+
)
|
|
4455
4588
|
NEEDS_APPROVAL =
|
|
4456
4589
|
T.let(
|
|
4457
4590
|
:needs_approval,
|