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
|
@@ -90,6 +90,14 @@ module ModernTreasury
|
|
|
90
90
|
end
|
|
91
91
|
attr_accessor :originating_routing_number_type
|
|
92
92
|
|
|
93
|
+
# One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
|
|
94
|
+
sig do
|
|
95
|
+
returns(
|
|
96
|
+
ModernTreasury::IncomingPaymentDetail::ReconciliationStatus::TaggedSymbol
|
|
97
|
+
)
|
|
98
|
+
end
|
|
99
|
+
attr_accessor :reconciliation_status
|
|
100
|
+
|
|
93
101
|
# The current status of the incoming payment order. One of `pending`, `completed`,
|
|
94
102
|
# or `returned`.
|
|
95
103
|
sig do
|
|
@@ -162,6 +170,8 @@ module ModernTreasury
|
|
|
162
170
|
T.nilable(
|
|
163
171
|
ModernTreasury::IncomingPaymentDetail::OriginatingRoutingNumberType::OrSymbol
|
|
164
172
|
),
|
|
173
|
+
reconciliation_status:
|
|
174
|
+
ModernTreasury::IncomingPaymentDetail::ReconciliationStatus::OrSymbol,
|
|
165
175
|
status: ModernTreasury::IncomingPaymentDetail::Status::OrSymbol,
|
|
166
176
|
transaction_id: T.nilable(String),
|
|
167
177
|
transaction_line_item_id: T.nilable(String),
|
|
@@ -209,6 +219,8 @@ module ModernTreasury
|
|
|
209
219
|
originating_routing_number:,
|
|
210
220
|
# The type of the originating routing number for the incoming payment detail.
|
|
211
221
|
originating_routing_number_type:,
|
|
222
|
+
# One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
|
|
223
|
+
reconciliation_status:,
|
|
212
224
|
# The current status of the incoming payment order. One of `pending`, `completed`,
|
|
213
225
|
# or `returned`.
|
|
214
226
|
status:,
|
|
@@ -258,6 +270,8 @@ module ModernTreasury
|
|
|
258
270
|
T.nilable(
|
|
259
271
|
ModernTreasury::IncomingPaymentDetail::OriginatingRoutingNumberType::TaggedSymbol
|
|
260
272
|
),
|
|
273
|
+
reconciliation_status:
|
|
274
|
+
ModernTreasury::IncomingPaymentDetail::ReconciliationStatus::TaggedSymbol,
|
|
261
275
|
status: ModernTreasury::IncomingPaymentDetail::Status::TaggedSymbol,
|
|
262
276
|
transaction_id: T.nilable(String),
|
|
263
277
|
transaction_line_item_id: T.nilable(String),
|
|
@@ -503,6 +517,46 @@ module ModernTreasury
|
|
|
503
517
|
end
|
|
504
518
|
end
|
|
505
519
|
|
|
520
|
+
# One of `unreconciled`, `tentatively_reconciled` or `reconciled`.
|
|
521
|
+
module ReconciliationStatus
|
|
522
|
+
extend ModernTreasury::Internal::Type::Enum
|
|
523
|
+
|
|
524
|
+
TaggedSymbol =
|
|
525
|
+
T.type_alias do
|
|
526
|
+
T.all(
|
|
527
|
+
Symbol,
|
|
528
|
+
ModernTreasury::IncomingPaymentDetail::ReconciliationStatus
|
|
529
|
+
)
|
|
530
|
+
end
|
|
531
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
532
|
+
|
|
533
|
+
UNRECONCILED =
|
|
534
|
+
T.let(
|
|
535
|
+
:unreconciled,
|
|
536
|
+
ModernTreasury::IncomingPaymentDetail::ReconciliationStatus::TaggedSymbol
|
|
537
|
+
)
|
|
538
|
+
TENTATIVELY_RECONCILED =
|
|
539
|
+
T.let(
|
|
540
|
+
:tentatively_reconciled,
|
|
541
|
+
ModernTreasury::IncomingPaymentDetail::ReconciliationStatus::TaggedSymbol
|
|
542
|
+
)
|
|
543
|
+
RECONCILED =
|
|
544
|
+
T.let(
|
|
545
|
+
:reconciled,
|
|
546
|
+
ModernTreasury::IncomingPaymentDetail::ReconciliationStatus::TaggedSymbol
|
|
547
|
+
)
|
|
548
|
+
|
|
549
|
+
sig do
|
|
550
|
+
override.returns(
|
|
551
|
+
T::Array[
|
|
552
|
+
ModernTreasury::IncomingPaymentDetail::ReconciliationStatus::TaggedSymbol
|
|
553
|
+
]
|
|
554
|
+
)
|
|
555
|
+
end
|
|
556
|
+
def self.values
|
|
557
|
+
end
|
|
558
|
+
end
|
|
559
|
+
|
|
506
560
|
# The current status of the incoming payment order. One of `pending`, `completed`,
|
|
507
561
|
# or `returned`.
|
|
508
562
|
module Status
|
|
@@ -106,6 +106,14 @@ module ModernTreasury
|
|
|
106
106
|
sig { returns(T::Array[ModernTreasury::RoutingDetail]) }
|
|
107
107
|
attr_accessor :routing_details
|
|
108
108
|
|
|
109
|
+
# The internal account status.
|
|
110
|
+
sig do
|
|
111
|
+
returns(
|
|
112
|
+
T.nilable(ModernTreasury::InternalAccount::Status::TaggedSymbol)
|
|
113
|
+
)
|
|
114
|
+
end
|
|
115
|
+
attr_accessor :status
|
|
116
|
+
|
|
109
117
|
sig { returns(Time) }
|
|
110
118
|
attr_accessor :updated_at
|
|
111
119
|
|
|
@@ -139,6 +147,7 @@ module ModernTreasury
|
|
|
139
147
|
party_type:
|
|
140
148
|
T.nilable(ModernTreasury::InternalAccount::PartyType::OrSymbol),
|
|
141
149
|
routing_details: T::Array[ModernTreasury::RoutingDetail::OrHash],
|
|
150
|
+
status: T.nilable(ModernTreasury::InternalAccount::Status::OrSymbol),
|
|
142
151
|
updated_at: Time,
|
|
143
152
|
vendor_id: T.nilable(String)
|
|
144
153
|
).returns(T.attached_class)
|
|
@@ -183,6 +192,8 @@ module ModernTreasury
|
|
|
183
192
|
party_type:,
|
|
184
193
|
# An array of routing detail objects.
|
|
185
194
|
routing_details:,
|
|
195
|
+
# The internal account status.
|
|
196
|
+
status:,
|
|
186
197
|
updated_at:,
|
|
187
198
|
# The vendor ID associated with this account.
|
|
188
199
|
vendor_id:
|
|
@@ -218,6 +229,8 @@ module ModernTreasury
|
|
|
218
229
|
ModernTreasury::InternalAccount::PartyType::TaggedSymbol
|
|
219
230
|
),
|
|
220
231
|
routing_details: T::Array[ModernTreasury::RoutingDetail],
|
|
232
|
+
status:
|
|
233
|
+
T.nilable(ModernTreasury::InternalAccount::Status::TaggedSymbol),
|
|
221
234
|
updated_at: Time,
|
|
222
235
|
vendor_id: T.nilable(String)
|
|
223
236
|
}
|
|
@@ -644,6 +657,45 @@ module ModernTreasury
|
|
|
644
657
|
def self.values
|
|
645
658
|
end
|
|
646
659
|
end
|
|
660
|
+
|
|
661
|
+
# The internal account status.
|
|
662
|
+
module Status
|
|
663
|
+
extend ModernTreasury::Internal::Type::Enum
|
|
664
|
+
|
|
665
|
+
TaggedSymbol =
|
|
666
|
+
T.type_alias do
|
|
667
|
+
T.all(Symbol, ModernTreasury::InternalAccount::Status)
|
|
668
|
+
end
|
|
669
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
670
|
+
|
|
671
|
+
ACTIVE =
|
|
672
|
+
T.let(:active, ModernTreasury::InternalAccount::Status::TaggedSymbol)
|
|
673
|
+
CLOSED =
|
|
674
|
+
T.let(:closed, ModernTreasury::InternalAccount::Status::TaggedSymbol)
|
|
675
|
+
PENDING_ACTIVATION =
|
|
676
|
+
T.let(
|
|
677
|
+
:pending_activation,
|
|
678
|
+
ModernTreasury::InternalAccount::Status::TaggedSymbol
|
|
679
|
+
)
|
|
680
|
+
PENDING_CLOSURE =
|
|
681
|
+
T.let(
|
|
682
|
+
:pending_closure,
|
|
683
|
+
ModernTreasury::InternalAccount::Status::TaggedSymbol
|
|
684
|
+
)
|
|
685
|
+
SUSPENDED =
|
|
686
|
+
T.let(
|
|
687
|
+
:suspended,
|
|
688
|
+
ModernTreasury::InternalAccount::Status::TaggedSymbol
|
|
689
|
+
)
|
|
690
|
+
|
|
691
|
+
sig do
|
|
692
|
+
override.returns(
|
|
693
|
+
T::Array[ModernTreasury::InternalAccount::Status::TaggedSymbol]
|
|
694
|
+
)
|
|
695
|
+
end
|
|
696
|
+
def self.values
|
|
697
|
+
end
|
|
698
|
+
end
|
|
647
699
|
end
|
|
648
700
|
end
|
|
649
701
|
end
|
|
@@ -82,6 +82,21 @@ module ModernTreasury
|
|
|
82
82
|
sig { params(per_page: Integer).void }
|
|
83
83
|
attr_writer :per_page
|
|
84
84
|
|
|
85
|
+
# Only return internal accounts with this status.
|
|
86
|
+
sig do
|
|
87
|
+
returns(
|
|
88
|
+
T.nilable(ModernTreasury::InternalAccountListParams::Status::OrSymbol)
|
|
89
|
+
)
|
|
90
|
+
end
|
|
91
|
+
attr_reader :status
|
|
92
|
+
|
|
93
|
+
sig do
|
|
94
|
+
params(
|
|
95
|
+
status: ModernTreasury::InternalAccountListParams::Status::OrSymbol
|
|
96
|
+
).void
|
|
97
|
+
end
|
|
98
|
+
attr_writer :status
|
|
99
|
+
|
|
85
100
|
sig do
|
|
86
101
|
params(
|
|
87
102
|
after_cursor: T.nilable(String),
|
|
@@ -93,6 +108,7 @@ module ModernTreasury
|
|
|
93
108
|
payment_type:
|
|
94
109
|
ModernTreasury::InternalAccountListParams::PaymentType::OrSymbol,
|
|
95
110
|
per_page: Integer,
|
|
111
|
+
status: ModernTreasury::InternalAccountListParams::Status::OrSymbol,
|
|
96
112
|
request_options: ModernTreasury::RequestOptions::OrHash
|
|
97
113
|
).returns(T.attached_class)
|
|
98
114
|
end
|
|
@@ -113,6 +129,8 @@ module ModernTreasury
|
|
|
113
129
|
# Only return internal accounts that can make this type of payment.
|
|
114
130
|
payment_type: nil,
|
|
115
131
|
per_page: nil,
|
|
132
|
+
# Only return internal accounts with this status.
|
|
133
|
+
status: nil,
|
|
116
134
|
request_options: {}
|
|
117
135
|
)
|
|
118
136
|
end
|
|
@@ -129,6 +147,7 @@ module ModernTreasury
|
|
|
129
147
|
payment_type:
|
|
130
148
|
ModernTreasury::InternalAccountListParams::PaymentType::OrSymbol,
|
|
131
149
|
per_page: Integer,
|
|
150
|
+
status: ModernTreasury::InternalAccountListParams::Status::OrSymbol,
|
|
132
151
|
request_options: ModernTreasury::RequestOptions
|
|
133
152
|
}
|
|
134
153
|
)
|
|
@@ -335,6 +354,53 @@ module ModernTreasury
|
|
|
335
354
|
def self.values
|
|
336
355
|
end
|
|
337
356
|
end
|
|
357
|
+
|
|
358
|
+
# Only return internal accounts with this status.
|
|
359
|
+
module Status
|
|
360
|
+
extend ModernTreasury::Internal::Type::Enum
|
|
361
|
+
|
|
362
|
+
TaggedSymbol =
|
|
363
|
+
T.type_alias do
|
|
364
|
+
T.all(Symbol, ModernTreasury::InternalAccountListParams::Status)
|
|
365
|
+
end
|
|
366
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
367
|
+
|
|
368
|
+
ACTIVE =
|
|
369
|
+
T.let(
|
|
370
|
+
:active,
|
|
371
|
+
ModernTreasury::InternalAccountListParams::Status::TaggedSymbol
|
|
372
|
+
)
|
|
373
|
+
PENDING_ACTIVATION =
|
|
374
|
+
T.let(
|
|
375
|
+
:pending_activation,
|
|
376
|
+
ModernTreasury::InternalAccountListParams::Status::TaggedSymbol
|
|
377
|
+
)
|
|
378
|
+
SUSPENDED =
|
|
379
|
+
T.let(
|
|
380
|
+
:suspended,
|
|
381
|
+
ModernTreasury::InternalAccountListParams::Status::TaggedSymbol
|
|
382
|
+
)
|
|
383
|
+
PENDING_CLOSURE =
|
|
384
|
+
T.let(
|
|
385
|
+
:pending_closure,
|
|
386
|
+
ModernTreasury::InternalAccountListParams::Status::TaggedSymbol
|
|
387
|
+
)
|
|
388
|
+
CLOSED =
|
|
389
|
+
T.let(
|
|
390
|
+
:closed,
|
|
391
|
+
ModernTreasury::InternalAccountListParams::Status::TaggedSymbol
|
|
392
|
+
)
|
|
393
|
+
|
|
394
|
+
sig do
|
|
395
|
+
override.returns(
|
|
396
|
+
T::Array[
|
|
397
|
+
ModernTreasury::InternalAccountListParams::Status::TaggedSymbol
|
|
398
|
+
]
|
|
399
|
+
)
|
|
400
|
+
end
|
|
401
|
+
def self.values
|
|
402
|
+
end
|
|
403
|
+
end
|
|
338
404
|
end
|
|
339
405
|
end
|
|
340
406
|
end
|
|
@@ -23,6 +23,20 @@ module ModernTreasury
|
|
|
23
23
|
sig { params(counterparty_id: String).void }
|
|
24
24
|
attr_writer :counterparty_id
|
|
25
25
|
|
|
26
|
+
# An inclusive upper bound for searching created_at
|
|
27
|
+
sig { returns(T.nilable(Time)) }
|
|
28
|
+
attr_reader :created_at_end
|
|
29
|
+
|
|
30
|
+
sig { params(created_at_end: Time).void }
|
|
31
|
+
attr_writer :created_at_end
|
|
32
|
+
|
|
33
|
+
# An inclusive lower bound for searching created_at
|
|
34
|
+
sig { returns(T.nilable(Time)) }
|
|
35
|
+
attr_reader :created_at_start
|
|
36
|
+
|
|
37
|
+
sig { params(created_at_start: Time).void }
|
|
38
|
+
attr_writer :created_at_start
|
|
39
|
+
|
|
26
40
|
# An inclusive upper bound for searching due_date
|
|
27
41
|
sig { returns(T.nilable(Date)) }
|
|
28
42
|
attr_reader :due_date_end
|
|
@@ -91,6 +105,8 @@ module ModernTreasury
|
|
|
91
105
|
params(
|
|
92
106
|
after_cursor: T.nilable(String),
|
|
93
107
|
counterparty_id: String,
|
|
108
|
+
created_at_end: Time,
|
|
109
|
+
created_at_start: Time,
|
|
94
110
|
due_date_end: Date,
|
|
95
111
|
due_date_start: Date,
|
|
96
112
|
expected_payment_id: String,
|
|
@@ -106,6 +122,10 @@ module ModernTreasury
|
|
|
106
122
|
def self.new(
|
|
107
123
|
after_cursor: nil,
|
|
108
124
|
counterparty_id: nil,
|
|
125
|
+
# An inclusive upper bound for searching created_at
|
|
126
|
+
created_at_end: nil,
|
|
127
|
+
# An inclusive lower bound for searching created_at
|
|
128
|
+
created_at_start: nil,
|
|
109
129
|
# An inclusive upper bound for searching due_date
|
|
110
130
|
due_date_end: nil,
|
|
111
131
|
# An inclusive lower bound for searching due_date
|
|
@@ -130,6 +150,8 @@ module ModernTreasury
|
|
|
130
150
|
{
|
|
131
151
|
after_cursor: T.nilable(String),
|
|
132
152
|
counterparty_id: String,
|
|
153
|
+
created_at_end: Time,
|
|
154
|
+
created_at_start: Time,
|
|
133
155
|
due_date_end: Date,
|
|
134
156
|
due_date_start: Date,
|
|
135
157
|
expected_payment_id: String,
|
|
@@ -11,11 +11,25 @@ module ModernTreasury
|
|
|
11
11
|
sig { returns(String) }
|
|
12
12
|
attr_accessor :id
|
|
13
13
|
|
|
14
|
+
sig { returns(ModernTreasury::LineItem::Accounting) }
|
|
15
|
+
attr_reader :accounting
|
|
16
|
+
|
|
17
|
+
sig do
|
|
18
|
+
params(accounting: ModernTreasury::LineItem::Accounting::OrHash).void
|
|
19
|
+
end
|
|
20
|
+
attr_writer :accounting
|
|
21
|
+
|
|
14
22
|
# The ID of one of your accounting categories. Note that these will only be
|
|
15
23
|
# accessible if your accounting system has been connected.
|
|
16
24
|
sig { returns(T.nilable(String)) }
|
|
17
25
|
attr_accessor :accounting_category_id
|
|
18
26
|
|
|
27
|
+
# The ID of one of the class objects in your accounting system. Class objects
|
|
28
|
+
# track segments of your business independent of client or project. Note that
|
|
29
|
+
# these will only be accessible if your accounting system has been connected.
|
|
30
|
+
sig { returns(T.nilable(String)) }
|
|
31
|
+
attr_accessor :accounting_ledger_class_id
|
|
32
|
+
|
|
19
33
|
# Value in specified currency's smallest unit. e.g. $10 would be represented
|
|
20
34
|
# as 1000.
|
|
21
35
|
sig { returns(Integer) }
|
|
@@ -55,7 +69,9 @@ module ModernTreasury
|
|
|
55
69
|
sig do
|
|
56
70
|
params(
|
|
57
71
|
id: String,
|
|
72
|
+
accounting: ModernTreasury::LineItem::Accounting::OrHash,
|
|
58
73
|
accounting_category_id: T.nilable(String),
|
|
74
|
+
accounting_ledger_class_id: T.nilable(String),
|
|
59
75
|
amount: Integer,
|
|
60
76
|
created_at: Time,
|
|
61
77
|
description: T.nilable(String),
|
|
@@ -69,9 +85,14 @@ module ModernTreasury
|
|
|
69
85
|
end
|
|
70
86
|
def self.new(
|
|
71
87
|
id:,
|
|
88
|
+
accounting:,
|
|
72
89
|
# The ID of one of your accounting categories. Note that these will only be
|
|
73
90
|
# accessible if your accounting system has been connected.
|
|
74
91
|
accounting_category_id:,
|
|
92
|
+
# The ID of one of the class objects in your accounting system. Class objects
|
|
93
|
+
# track segments of your business independent of client or project. Note that
|
|
94
|
+
# these will only be accessible if your accounting system has been connected.
|
|
95
|
+
accounting_ledger_class_id:,
|
|
75
96
|
# Value in specified currency's smallest unit. e.g. $10 would be represented
|
|
76
97
|
# as 1000.
|
|
77
98
|
amount:,
|
|
@@ -97,7 +118,9 @@ module ModernTreasury
|
|
|
97
118
|
override.returns(
|
|
98
119
|
{
|
|
99
120
|
id: String,
|
|
121
|
+
accounting: ModernTreasury::LineItem::Accounting,
|
|
100
122
|
accounting_category_id: T.nilable(String),
|
|
123
|
+
accounting_ledger_class_id: T.nilable(String),
|
|
101
124
|
amount: Integer,
|
|
102
125
|
created_at: Time,
|
|
103
126
|
description: T.nilable(String),
|
|
@@ -114,6 +137,52 @@ module ModernTreasury
|
|
|
114
137
|
def to_hash
|
|
115
138
|
end
|
|
116
139
|
|
|
140
|
+
class Accounting < ModernTreasury::Internal::Type::BaseModel
|
|
141
|
+
OrHash =
|
|
142
|
+
T.type_alias do
|
|
143
|
+
T.any(
|
|
144
|
+
ModernTreasury::LineItem::Accounting,
|
|
145
|
+
ModernTreasury::Internal::AnyHash
|
|
146
|
+
)
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# The ID of one of your accounting categories. Note that these will only be
|
|
150
|
+
# accessible if your accounting system has been connected.
|
|
151
|
+
sig { returns(T.nilable(String)) }
|
|
152
|
+
attr_accessor :account_id
|
|
153
|
+
|
|
154
|
+
# The ID of one of the class objects in your accounting system. Class objects
|
|
155
|
+
# track segments of your business independent of client or project. Note that
|
|
156
|
+
# these will only be accessible if your accounting system has been connected.
|
|
157
|
+
sig { returns(T.nilable(String)) }
|
|
158
|
+
attr_accessor :class_id
|
|
159
|
+
|
|
160
|
+
sig do
|
|
161
|
+
params(
|
|
162
|
+
account_id: T.nilable(String),
|
|
163
|
+
class_id: T.nilable(String)
|
|
164
|
+
).returns(T.attached_class)
|
|
165
|
+
end
|
|
166
|
+
def self.new(
|
|
167
|
+
# The ID of one of your accounting categories. Note that these will only be
|
|
168
|
+
# accessible if your accounting system has been connected.
|
|
169
|
+
account_id: nil,
|
|
170
|
+
# The ID of one of the class objects in your accounting system. Class objects
|
|
171
|
+
# track segments of your business independent of client or project. Note that
|
|
172
|
+
# these will only be accessible if your accounting system has been connected.
|
|
173
|
+
class_id: nil
|
|
174
|
+
)
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
sig do
|
|
178
|
+
override.returns(
|
|
179
|
+
{ account_id: T.nilable(String), class_id: T.nilable(String) }
|
|
180
|
+
)
|
|
181
|
+
end
|
|
182
|
+
def to_hash
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
|
|
117
186
|
# One of `payment_orders` or `expected_payments`.
|
|
118
187
|
module ItemizableType
|
|
119
188
|
extend ModernTreasury::Internal::Type::Enum
|