modern_treasury 0.5.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 +49 -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 +155 -2
- data/lib/modern_treasury/models/counterparty.rb +5 -18
- data/lib/modern_treasury/models/counterparty_create_params.rb +7 -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/line_item.rb +55 -1
- data/lib/modern_treasury/models/payment_order.rb +226 -1
- data/lib/modern_treasury/models/payment_order_create_async_params.rb +72 -1
- data/lib/modern_treasury/models/payment_order_create_params.rb +71 -1
- data/lib/modern_treasury/models/payment_order_list_params.rb +1 -0
- data/lib/modern_treasury/models/payment_order_update_params.rb +72 -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 +21 -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 +289 -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/line_item.rbi +69 -0
- data/rbi/modern_treasury/models/payment_order.rbi +374 -0
- data/rbi/modern_treasury/models/payment_order_create_async_params.rbi +140 -0
- data/rbi/modern_treasury/models/payment_order_create_params.rbi +137 -0
- data/rbi/modern_treasury/models/payment_order_list_params.rbi +5 -0
- data/rbi/modern_treasury/models/payment_order_update_params.rbi +142 -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 +33 -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 +98 -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/line_item.rbs +22 -0
- data/sig/modern_treasury/models/payment_order.rbs +154 -0
- data/sig/modern_treasury/models/payment_order_create_async_params.rbs +48 -0
- data/sig/modern_treasury/models/payment_order_create_params.rbs +48 -0
- data/sig/modern_treasury/models/payment_order_list_params.rbs +2 -0
- data/sig/modern_treasury/models/payment_order_update_params.rbs +50 -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 +9 -0
- data/sig/modern_treasury/resources/returns.rbs +1 -0
- metadata +2 -2
|
@@ -7,6 +7,12 @@ module ModernTreasury
|
|
|
7
7
|
extend ModernTreasury::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include ModernTreasury::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
+
# @!attribute accounting
|
|
11
|
+
# @deprecated
|
|
12
|
+
#
|
|
13
|
+
# @return [ModernTreasury::Models::PaymentOrderUpdateParams::Accounting, nil]
|
|
14
|
+
optional :accounting, -> { ModernTreasury::PaymentOrderUpdateParams::Accounting }
|
|
15
|
+
|
|
10
16
|
# @!attribute accounting_category_id
|
|
11
17
|
# @deprecated
|
|
12
18
|
#
|
|
@@ -16,6 +22,15 @@ module ModernTreasury
|
|
|
16
22
|
# @return [String, nil]
|
|
17
23
|
optional :accounting_category_id, String, nil?: true
|
|
18
24
|
|
|
25
|
+
# @!attribute accounting_ledger_class_id
|
|
26
|
+
# @deprecated
|
|
27
|
+
#
|
|
28
|
+
# The ID of one of your accounting ledger classes. Note that these will only be
|
|
29
|
+
# accessible if your accounting system has been connected.
|
|
30
|
+
#
|
|
31
|
+
# @return [String, nil]
|
|
32
|
+
optional :accounting_ledger_class_id, String, nil?: true
|
|
33
|
+
|
|
19
34
|
# @!attribute amount
|
|
20
35
|
# Value in specified currency's smallest unit. e.g. $10 would be represented as
|
|
21
36
|
# 1000 (cents). For RTP, the maximum amount allowed by the network is $100,000.
|
|
@@ -175,6 +190,13 @@ module ModernTreasury
|
|
|
175
190
|
# @return [String, nil]
|
|
176
191
|
optional :receiving_account_id, String
|
|
177
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
|
+
|
|
178
200
|
# @!attribute remittance_information
|
|
179
201
|
# For `ach`, this field will be passed through on an addenda record. For `wire`
|
|
180
202
|
# payments the field will be passed through as the "Originator to Beneficiary
|
|
@@ -258,12 +280,16 @@ module ModernTreasury
|
|
|
258
280
|
# @return [String, nil]
|
|
259
281
|
optional :ultimate_receiving_party_name, String, nil?: true
|
|
260
282
|
|
|
261
|
-
# @!method initialize(accounting_category_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: {})
|
|
262
284
|
# Some parameter documentations has been truncated, see
|
|
263
285
|
# {ModernTreasury::Models::PaymentOrderUpdateParams} for more details.
|
|
264
286
|
#
|
|
287
|
+
# @param accounting [ModernTreasury::Models::PaymentOrderUpdateParams::Accounting]
|
|
288
|
+
#
|
|
265
289
|
# @param accounting_category_id [String, nil] The ID of one of your accounting categories. Note that these will only be access
|
|
266
290
|
#
|
|
291
|
+
# @param accounting_ledger_class_id [String, nil] The ID of one of your accounting ledger classes. Note that these will only be ac
|
|
292
|
+
#
|
|
267
293
|
# @param amount [Integer] Value in specified currency's smallest unit. e.g. $10 would be represented as 10
|
|
268
294
|
#
|
|
269
295
|
# @param charge_bearer [Symbol, ModernTreasury::Models::PaymentOrderUpdateParams::ChargeBearer, nil] The party that will pay the fees for the payment order. See https://docs.modernt
|
|
@@ -306,6 +332,8 @@ module ModernTreasury
|
|
|
306
332
|
#
|
|
307
333
|
# @param receiving_account_id [String] Either `receiving_account` or `receiving_account_id` must be present. When using
|
|
308
334
|
#
|
|
335
|
+
# @param reconciliation_status [Symbol, ModernTreasury::Models::PaymentOrderUpdateParams::ReconciliationStatus] One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
|
|
336
|
+
#
|
|
309
337
|
# @param remittance_information [String, nil] For `ach`, this field will be passed through on an addenda record. For `wire` pa
|
|
310
338
|
#
|
|
311
339
|
# @param send_remittance_advice [Boolean, nil] Send an email to the counterparty when the payment order is sent to the bank. If
|
|
@@ -328,6 +356,36 @@ module ModernTreasury
|
|
|
328
356
|
#
|
|
329
357
|
# @param request_options [ModernTreasury::RequestOptions, Hash{Symbol=>Object}]
|
|
330
358
|
|
|
359
|
+
# @deprecated
|
|
360
|
+
class Accounting < ModernTreasury::Internal::Type::BaseModel
|
|
361
|
+
# @!attribute account_id
|
|
362
|
+
# @deprecated
|
|
363
|
+
#
|
|
364
|
+
# The ID of one of your accounting categories. Note that these will only be
|
|
365
|
+
# accessible if your accounting system has been connected.
|
|
366
|
+
#
|
|
367
|
+
# @return [String, nil]
|
|
368
|
+
optional :account_id, String, nil?: true
|
|
369
|
+
|
|
370
|
+
# @!attribute class_id
|
|
371
|
+
# @deprecated
|
|
372
|
+
#
|
|
373
|
+
# The ID of one of the class objects in your accounting system. Class objects
|
|
374
|
+
# track segments of your business independent of client or project. Note that
|
|
375
|
+
# these will only be accessible if your accounting system has been connected.
|
|
376
|
+
#
|
|
377
|
+
# @return [String, nil]
|
|
378
|
+
optional :class_id, String, nil?: true
|
|
379
|
+
|
|
380
|
+
# @!method initialize(account_id: nil, class_id: nil)
|
|
381
|
+
# Some parameter documentations has been truncated, see
|
|
382
|
+
# {ModernTreasury::Models::PaymentOrderUpdateParams::Accounting} for more details.
|
|
383
|
+
#
|
|
384
|
+
# @param account_id [String, nil] The ID of one of your accounting categories. Note that these will only be access
|
|
385
|
+
#
|
|
386
|
+
# @param class_id [String, nil] The ID of one of the class objects in your accounting system. Class objects trac
|
|
387
|
+
end
|
|
388
|
+
|
|
331
389
|
# The party that will pay the fees for the payment order. See
|
|
332
390
|
# https://docs.moderntreasury.com/payments/docs/charge-bearer to understand the
|
|
333
391
|
# differences between the options.
|
|
@@ -710,6 +768,18 @@ module ModernTreasury
|
|
|
710
768
|
end
|
|
711
769
|
end
|
|
712
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
|
+
|
|
713
783
|
# To cancel a payment order, use `cancelled`. To redraft a returned payment order,
|
|
714
784
|
# use `approved`. To undo approval on a denied or approved payment order, use
|
|
715
785
|
# `needs_approval`.
|
|
@@ -721,6 +791,7 @@ module ModernTreasury
|
|
|
721
791
|
COMPLETED = :completed
|
|
722
792
|
DENIED = :denied
|
|
723
793
|
FAILED = :failed
|
|
794
|
+
HELD = :held
|
|
724
795
|
NEEDS_APPROVAL = :needs_approval
|
|
725
796
|
PENDING = :pending
|
|
726
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
|
|
@@ -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_category_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
|
#
|
|
@@ -21,8 +21,12 @@ module ModernTreasury
|
|
|
21
21
|
#
|
|
22
22
|
# @param type [Symbol, ModernTreasury::Models::PaymentOrderType] One of `ach`, `se_bankgirot`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sep
|
|
23
23
|
#
|
|
24
|
+
# @param accounting [ModernTreasury::Models::PaymentOrderCreateParams::Accounting]
|
|
25
|
+
#
|
|
24
26
|
# @param accounting_category_id [String, nil] The ID of one of your accounting categories. Note that these will only be access
|
|
25
27
|
#
|
|
28
|
+
# @param accounting_ledger_class_id [String, nil] The ID of one of your accounting ledger classes. Note that these will only be ac
|
|
29
|
+
#
|
|
26
30
|
# @param charge_bearer [Symbol, ModernTreasury::Models::PaymentOrderCreateParams::ChargeBearer, nil] The party that will pay the fees for the payment order. See https://docs.modernt
|
|
27
31
|
#
|
|
28
32
|
# @param currency [Symbol, ModernTreasury::Models::Currency] Defaults to the currency of the originating account.
|
|
@@ -63,6 +67,8 @@ module ModernTreasury
|
|
|
63
67
|
#
|
|
64
68
|
# @param receiving_account_id [String] Either `receiving_account` or `receiving_account_id` must be present. When using
|
|
65
69
|
#
|
|
70
|
+
# @param reconciliation_status [Symbol, ModernTreasury::Models::PaymentOrderCreateParams::ReconciliationStatus] One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
|
|
71
|
+
#
|
|
66
72
|
# @param remittance_information [String, nil] For `ach`, this field will be passed through on an addenda record. For `wire` pa
|
|
67
73
|
#
|
|
68
74
|
# @param send_remittance_advice [Boolean, nil] Send an email to the counterparty when the payment order is sent to the bank. If
|
|
@@ -121,12 +127,16 @@ module ModernTreasury
|
|
|
121
127
|
#
|
|
122
128
|
# Update a payment order
|
|
123
129
|
#
|
|
124
|
-
# @overload update(id, accounting_category_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: {})
|
|
125
131
|
#
|
|
126
132
|
# @param id [String]
|
|
127
133
|
#
|
|
134
|
+
# @param accounting [ModernTreasury::Models::PaymentOrderUpdateParams::Accounting]
|
|
135
|
+
#
|
|
128
136
|
# @param accounting_category_id [String, nil] The ID of one of your accounting categories. Note that these will only be access
|
|
129
137
|
#
|
|
138
|
+
# @param accounting_ledger_class_id [String, nil] The ID of one of your accounting ledger classes. Note that these will only be ac
|
|
139
|
+
#
|
|
130
140
|
# @param amount [Integer] Value in specified currency's smallest unit. e.g. $10 would be represented as 10
|
|
131
141
|
#
|
|
132
142
|
# @param charge_bearer [Symbol, ModernTreasury::Models::PaymentOrderUpdateParams::ChargeBearer, nil] The party that will pay the fees for the payment order. See https://docs.modernt
|
|
@@ -169,6 +179,8 @@ module ModernTreasury
|
|
|
169
179
|
#
|
|
170
180
|
# @param receiving_account_id [String] Either `receiving_account` or `receiving_account_id` must be present. When using
|
|
171
181
|
#
|
|
182
|
+
# @param reconciliation_status [Symbol, ModernTreasury::Models::PaymentOrderUpdateParams::ReconciliationStatus] One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
|
|
183
|
+
#
|
|
172
184
|
# @param remittance_information [String, nil] For `ach`, this field will be passed through on an addenda record. For `wire` pa
|
|
173
185
|
#
|
|
174
186
|
# @param send_remittance_advice [Boolean, nil] Send an email to the counterparty when the payment order is sent to the bank. If
|
|
@@ -270,7 +282,7 @@ module ModernTreasury
|
|
|
270
282
|
#
|
|
271
283
|
# Create a new payment order asynchronously
|
|
272
284
|
#
|
|
273
|
-
# @overload create_async(amount:, direction:, originating_account_id:, type:, accounting_category_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: {})
|
|
274
286
|
#
|
|
275
287
|
# @param amount [Integer] Value in specified currency's smallest unit. e.g. $10 would be represented as 10
|
|
276
288
|
#
|
|
@@ -280,8 +292,12 @@ module ModernTreasury
|
|
|
280
292
|
#
|
|
281
293
|
# @param type [Symbol, ModernTreasury::Models::PaymentOrderType] One of `ach`, `se_bankgirot`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sep
|
|
282
294
|
#
|
|
295
|
+
# @param accounting [ModernTreasury::Models::PaymentOrderCreateAsyncParams::Accounting]
|
|
296
|
+
#
|
|
283
297
|
# @param accounting_category_id [String, nil] The ID of one of your accounting categories. Note that these will only be access
|
|
284
298
|
#
|
|
299
|
+
# @param accounting_ledger_class_id [String, nil] The ID of one of your accounting ledger classes. Note that these will only be ac
|
|
300
|
+
#
|
|
285
301
|
# @param charge_bearer [Symbol, ModernTreasury::Models::PaymentOrderCreateAsyncParams::ChargeBearer, nil] The party that will pay the fees for the payment order. See https://docs.modernt
|
|
286
302
|
#
|
|
287
303
|
# @param currency [Symbol, ModernTreasury::Models::Currency] Defaults to the currency of the originating account.
|
|
@@ -320,6 +336,8 @@ module ModernTreasury
|
|
|
320
336
|
#
|
|
321
337
|
# @param receiving_account_id [String] Either `receiving_account` or `receiving_account_id` must be present. When using
|
|
322
338
|
#
|
|
339
|
+
# @param reconciliation_status [Symbol, ModernTreasury::Models::PaymentOrderCreateAsyncParams::ReconciliationStatus] One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
|
|
340
|
+
#
|
|
323
341
|
# @param remittance_information [String, nil] For `ach`, this field will be passed through on an addenda record. For `wire` pa
|
|
324
342
|
#
|
|
325
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)
|