lithic 0.20.0 → 0.21.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 +25 -0
- data/README.md +1 -1
- data/lib/lithic/models/account_activity_list_params.rb +1 -0
- data/lib/lithic/models/account_activity_list_response.rb +1 -0
- data/lib/lithic/models/account_activity_retrieve_transaction_response.rb +1 -0
- data/lib/lithic/models/auth_rules/auth_rule.rb +5 -0
- data/lib/lithic/models/auth_rules/report_stats.rb +1 -0
- data/lib/lithic/models/auth_rules/v2_create_params.rb +15 -0
- data/lib/lithic/models/auth_rules/v2_list_results_response.rb +1 -0
- data/lib/lithic/models/blockchain_recipient_retrieve_params.rb +20 -0
- data/lib/lithic/models/card_pin_updated_webhook_event.rb +87 -0
- data/lib/lithic/models/event.rb +5 -0
- data/lib/lithic/models/event_list_params.rb +3 -0
- data/lib/lithic/models/event_subscription.rb +3 -0
- data/lib/lithic/models/events/subscription_create_params.rb +3 -0
- data/lib/lithic/models/events/subscription_send_simulated_example_params.rb +1 -0
- data/lib/lithic/models/events/subscription_update_params.rb +3 -0
- data/lib/lithic/models/external_payment.rb +6 -0
- data/lib/lithic/models/external_payment_create_params.rb +1 -0
- data/lib/lithic/models/external_payment_list_params.rb +1 -0
- data/lib/lithic/models/financial_accounts/installment_plan.rb +311 -0
- data/lib/lithic/models/financial_accounts/installment_plan_list_params.rb +75 -0
- data/lib/lithic/models/financial_accounts/installment_plan_retrieve_params.rb +32 -0
- data/lib/lithic/models/financial_accounts/open_to_buy.rb +36 -0
- data/lib/lithic/models/financial_accounts/open_to_buy_retrieve_params.rb +22 -0
- data/lib/lithic/models/financial_accounts/open_to_buy_summary.rb +46 -0
- data/lib/lithic/models/financial_accounts/statements/statement_line_items.rb +10 -0
- data/lib/lithic/models/financial_accounts/transaction_category_balances.rb +34 -0
- data/lib/lithic/models/financial_event.rb +9 -0
- data/lib/lithic/models/management_operation_create_params.rb +4 -0
- data/lib/lithic/models/management_operation_transaction.rb +4 -0
- data/lib/lithic/models/parsed_webhook_event.rb +3 -1
- data/lib/lithic/models/payment.rb +1 -0
- data/lib/lithic/models/payment_create_stablecoin_params.rb +99 -0
- data/lib/lithic/models/payment_create_stablecoin_response.rb +19 -0
- data/lib/lithic/models/payment_list_params.rb +1 -0
- data/lib/lithic/models/payment_retry_params.rb +28 -1
- data/lib/lithic/models/payment_simulate_action_params.rb +1 -0
- data/lib/lithic/models/three_ds_authentication.rb +126 -1
- data/lib/lithic/models/transaction.rb +2 -0
- data/lib/lithic/models.rb +6 -0
- data/lib/lithic/resources/blockchain_recipients.rb +23 -0
- data/lib/lithic/resources/cards.rb +4 -2
- data/lib/lithic/resources/financial_accounts/installment_plans.rb +82 -0
- data/lib/lithic/resources/financial_accounts/open_to_buy.rb +48 -0
- data/lib/lithic/resources/financial_accounts.rb +8 -0
- data/lib/lithic/resources/payments.rb +71 -3
- data/lib/lithic/version.rb +1 -1
- data/lib/lithic.rb +13 -0
- data/rbi/lithic/models/account_activity_list_params.rbi +5 -0
- data/rbi/lithic/models/account_activity_list_response.rbi +5 -0
- data/rbi/lithic/models/account_activity_retrieve_transaction_response.rbi +5 -0
- data/rbi/lithic/models/auth_rules/auth_rule.rbi +7 -0
- data/rbi/lithic/models/auth_rules/report_stats.rbi +5 -0
- data/rbi/lithic/models/auth_rules/v2_create_params.rbi +33 -0
- data/rbi/lithic/models/auth_rules/v2_list_results_response.rbi +5 -0
- data/rbi/lithic/models/blockchain_recipient_retrieve_params.rbi +41 -0
- data/rbi/lithic/models/card_pin_updated_webhook_event.rbi +166 -0
- data/rbi/lithic/models/event.rbi +8 -0
- data/rbi/lithic/models/event_list_params.rbi +7 -0
- data/rbi/lithic/models/event_subscription.rbi +7 -0
- data/rbi/lithic/models/events/subscription_create_params.rbi +7 -0
- data/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi +5 -0
- data/rbi/lithic/models/events/subscription_update_params.rbi +7 -0
- data/rbi/lithic/models/external_payment.rbi +30 -0
- data/rbi/lithic/models/external_payment_create_params.rbi +5 -0
- data/rbi/lithic/models/external_payment_list_params.rbi +5 -0
- data/rbi/lithic/models/financial_accounts/installment_plan.rbi +528 -0
- data/rbi/lithic/models/financial_accounts/installment_plan_list_params.rbi +155 -0
- data/rbi/lithic/models/financial_accounts/installment_plan_retrieve_params.rbi +56 -0
- data/rbi/lithic/models/financial_accounts/open_to_buy.rbi +64 -0
- data/rbi/lithic/models/financial_accounts/open_to_buy_retrieve_params.rbi +43 -0
- data/rbi/lithic/models/financial_accounts/open_to_buy_summary.rbi +73 -0
- data/rbi/lithic/models/financial_accounts/statements/statement_line_items.rbi +50 -0
- data/rbi/lithic/models/financial_accounts/transaction_category_balances.rbi +81 -0
- data/rbi/lithic/models/financial_event.rbi +35 -0
- data/rbi/lithic/models/management_operation_create_params.rbi +20 -0
- data/rbi/lithic/models/management_operation_transaction.rbi +20 -0
- data/rbi/lithic/models/parsed_webhook_event.rbi +1 -0
- data/rbi/lithic/models/payment.rbi +2 -0
- data/rbi/lithic/models/payment_create_stablecoin_params.rbi +162 -0
- data/rbi/lithic/models/payment_create_stablecoin_response.rbi +34 -0
- data/rbi/lithic/models/payment_list_params.rbi +2 -0
- data/rbi/lithic/models/payment_retry_params.rbi +47 -2
- data/rbi/lithic/models/payment_simulate_action_params.rbi +5 -0
- data/rbi/lithic/models/three_ds_authentication.rbi +292 -0
- data/rbi/lithic/models/transaction.rbi +10 -0
- data/rbi/lithic/models.rbi +7 -0
- data/rbi/lithic/resources/blockchain_recipients.rbi +14 -0
- data/rbi/lithic/resources/cards.rbi +4 -2
- data/rbi/lithic/resources/financial_accounts/installment_plans.rbi +66 -0
- data/rbi/lithic/resources/financial_accounts/open_to_buy.rbi +40 -0
- data/rbi/lithic/resources/financial_accounts.rbi +6 -0
- data/rbi/lithic/resources/payments.rbi +68 -2
- data/rbi/lithic/resources/webhooks.rbi +1 -0
- data/sig/lithic/models/account_activity_list_params.rbs +2 -0
- data/sig/lithic/models/account_activity_list_response.rbs +2 -0
- data/sig/lithic/models/account_activity_retrieve_transaction_response.rbs +2 -0
- data/sig/lithic/models/auth_rules/auth_rule.rbs +2 -0
- data/sig/lithic/models/auth_rules/report_stats.rbs +2 -0
- data/sig/lithic/models/auth_rules/v2_create_params.rbs +6 -0
- data/sig/lithic/models/auth_rules/v2_list_results_response.rbs +2 -0
- data/sig/lithic/models/blockchain_recipient_retrieve_params.rbs +24 -0
- data/sig/lithic/models/card_pin_updated_webhook_event.rbs +60 -0
- data/sig/lithic/models/event.rbs +2 -0
- data/sig/lithic/models/event_list_params.rbs +2 -0
- data/sig/lithic/models/event_subscription.rbs +2 -0
- data/sig/lithic/models/events/subscription_create_params.rbs +2 -0
- data/sig/lithic/models/events/subscription_send_simulated_example_params.rbs +2 -0
- data/sig/lithic/models/events/subscription_update_params.rbs +2 -0
- data/sig/lithic/models/external_payment.rbs +12 -0
- data/sig/lithic/models/external_payment_create_params.rbs +2 -0
- data/sig/lithic/models/external_payment_list_params.rbs +2 -0
- data/sig/lithic/models/financial_accounts/installment_plan.rbs +227 -0
- data/sig/lithic/models/financial_accounts/installment_plan_list_params.rbs +69 -0
- data/sig/lithic/models/financial_accounts/installment_plan_retrieve_params.rbs +30 -0
- data/sig/lithic/models/financial_accounts/open_to_buy.rbs +27 -0
- data/sig/lithic/models/financial_accounts/open_to_buy_retrieve_params.rbs +26 -0
- data/sig/lithic/models/financial_accounts/open_to_buy_summary.rbs +32 -0
- data/sig/lithic/models/financial_accounts/statements/statement_line_items.rbs +20 -0
- data/sig/lithic/models/financial_accounts/transaction_category_balances.rbs +32 -0
- data/sig/lithic/models/financial_event.rbs +18 -0
- data/sig/lithic/models/management_operation_create_params.rbs +8 -0
- data/sig/lithic/models/management_operation_transaction.rbs +8 -0
- data/sig/lithic/models/parsed_webhook_event.rbs +1 -0
- data/sig/lithic/models/payment.rbs +2 -0
- data/sig/lithic/models/payment_create_stablecoin_params.rbs +84 -0
- data/sig/lithic/models/payment_create_stablecoin_response.rbs +15 -0
- data/sig/lithic/models/payment_list_params.rbs +2 -1
- data/sig/lithic/models/payment_retry_params.rbs +24 -1
- data/sig/lithic/models/payment_simulate_action_params.rbs +2 -0
- data/sig/lithic/models/three_ds_authentication.rbs +77 -0
- data/sig/lithic/models/transaction.rbs +4 -0
- data/sig/lithic/models.rbs +6 -0
- data/sig/lithic/resources/blockchain_recipients.rbs +5 -0
- data/sig/lithic/resources/financial_accounts/installment_plans.rbs +24 -0
- data/sig/lithic/resources/financial_accounts/open_to_buy.rbs +14 -0
- data/sig/lithic/resources/financial_accounts.rbs +4 -0
- data/sig/lithic/resources/payments.rbs +12 -0
- data/sig/lithic/resources/webhooks.rbs +1 -0
- metadata +41 -2
|
@@ -127,6 +127,8 @@ module Lithic
|
|
|
127
127
|
# - card.converted: Occurs when a card is converted from virtual to physical
|
|
128
128
|
# cards.
|
|
129
129
|
# - card.created: Occurs when a new card is created.
|
|
130
|
+
# - card.pin_updated: Occurs when a card's PIN is set, changed, unblocked, or
|
|
131
|
+
# blocked due to excessive incorrect PIN attempts.
|
|
130
132
|
# - card.reissued: Occurs when a card is reissued.
|
|
131
133
|
# - card.renewed: Occurs when a card is renewed.
|
|
132
134
|
# - card.shipped: Occurs when a card is shipped.
|
|
@@ -311,6 +313,11 @@ module Lithic
|
|
|
311
313
|
:"card.created",
|
|
312
314
|
Lithic::Events::SubscriptionCreateParams::EventType::TaggedSymbol
|
|
313
315
|
)
|
|
316
|
+
CARD_PIN_UPDATED =
|
|
317
|
+
T.let(
|
|
318
|
+
:"card.pin_updated",
|
|
319
|
+
Lithic::Events::SubscriptionCreateParams::EventType::TaggedSymbol
|
|
320
|
+
)
|
|
314
321
|
CARD_REISSUED =
|
|
315
322
|
T.let(
|
|
316
323
|
:"card.reissued",
|
|
@@ -153,6 +153,11 @@ module Lithic
|
|
|
153
153
|
:"card.created",
|
|
154
154
|
Lithic::Events::SubscriptionSendSimulatedExampleParams::EventType::TaggedSymbol
|
|
155
155
|
)
|
|
156
|
+
CARD_PIN_UPDATED =
|
|
157
|
+
T.let(
|
|
158
|
+
:"card.pin_updated",
|
|
159
|
+
Lithic::Events::SubscriptionSendSimulatedExampleParams::EventType::TaggedSymbol
|
|
160
|
+
)
|
|
156
161
|
CARD_REISSUED =
|
|
157
162
|
T.let(
|
|
158
163
|
:"card.reissued",
|
|
@@ -133,6 +133,8 @@ module Lithic
|
|
|
133
133
|
# - card.converted: Occurs when a card is converted from virtual to physical
|
|
134
134
|
# cards.
|
|
135
135
|
# - card.created: Occurs when a new card is created.
|
|
136
|
+
# - card.pin_updated: Occurs when a card's PIN is set, changed, unblocked, or
|
|
137
|
+
# blocked due to excessive incorrect PIN attempts.
|
|
136
138
|
# - card.reissued: Occurs when a card is reissued.
|
|
137
139
|
# - card.renewed: Occurs when a card is renewed.
|
|
138
140
|
# - card.shipped: Occurs when a card is shipped.
|
|
@@ -317,6 +319,11 @@ module Lithic
|
|
|
317
319
|
:"card.created",
|
|
318
320
|
Lithic::Events::SubscriptionUpdateParams::EventType::TaggedSymbol
|
|
319
321
|
)
|
|
322
|
+
CARD_PIN_UPDATED =
|
|
323
|
+
T.let(
|
|
324
|
+
:"card.pin_updated",
|
|
325
|
+
Lithic::Events::SubscriptionUpdateParams::EventType::TaggedSymbol
|
|
326
|
+
)
|
|
320
327
|
CARD_REISSUED =
|
|
321
328
|
T.let(
|
|
322
329
|
:"card.reissued",
|
|
@@ -207,6 +207,11 @@ module Lithic
|
|
|
207
207
|
)
|
|
208
208
|
EXTERNAL_RTP =
|
|
209
209
|
T.let(:EXTERNAL_RTP, Lithic::ExternalPayment::Category::TaggedSymbol)
|
|
210
|
+
EXTERNAL_STABLECOIN =
|
|
211
|
+
T.let(
|
|
212
|
+
:EXTERNAL_STABLECOIN,
|
|
213
|
+
Lithic::ExternalPayment::Category::TaggedSymbol
|
|
214
|
+
)
|
|
210
215
|
EXTERNAL_TRANSFER =
|
|
211
216
|
T.let(
|
|
212
217
|
:EXTERNAL_TRANSFER,
|
|
@@ -522,6 +527,31 @@ module Lithic
|
|
|
522
527
|
:EXTERNAL_RTP_RELEASED,
|
|
523
528
|
Lithic::ExternalPayment::Event::Type::TaggedSymbol
|
|
524
529
|
)
|
|
530
|
+
EXTERNAL_STABLECOIN_INITIATED =
|
|
531
|
+
T.let(
|
|
532
|
+
:EXTERNAL_STABLECOIN_INITIATED,
|
|
533
|
+
Lithic::ExternalPayment::Event::Type::TaggedSymbol
|
|
534
|
+
)
|
|
535
|
+
EXTERNAL_STABLECOIN_CANCELED =
|
|
536
|
+
T.let(
|
|
537
|
+
:EXTERNAL_STABLECOIN_CANCELED,
|
|
538
|
+
Lithic::ExternalPayment::Event::Type::TaggedSymbol
|
|
539
|
+
)
|
|
540
|
+
EXTERNAL_STABLECOIN_SETTLED =
|
|
541
|
+
T.let(
|
|
542
|
+
:EXTERNAL_STABLECOIN_SETTLED,
|
|
543
|
+
Lithic::ExternalPayment::Event::Type::TaggedSymbol
|
|
544
|
+
)
|
|
545
|
+
EXTERNAL_STABLECOIN_REVERSED =
|
|
546
|
+
T.let(
|
|
547
|
+
:EXTERNAL_STABLECOIN_REVERSED,
|
|
548
|
+
Lithic::ExternalPayment::Event::Type::TaggedSymbol
|
|
549
|
+
)
|
|
550
|
+
EXTERNAL_STABLECOIN_RELEASED =
|
|
551
|
+
T.let(
|
|
552
|
+
:EXTERNAL_STABLECOIN_RELEASED,
|
|
553
|
+
Lithic::ExternalPayment::Event::Type::TaggedSymbol
|
|
554
|
+
)
|
|
525
555
|
|
|
526
556
|
sig do
|
|
527
557
|
override.returns(
|
|
@@ -149,6 +149,11 @@ module Lithic
|
|
|
149
149
|
:EXTERNAL_RTP,
|
|
150
150
|
Lithic::ExternalPaymentCreateParams::Category::TaggedSymbol
|
|
151
151
|
)
|
|
152
|
+
EXTERNAL_STABLECOIN =
|
|
153
|
+
T.let(
|
|
154
|
+
:EXTERNAL_STABLECOIN,
|
|
155
|
+
Lithic::ExternalPaymentCreateParams::Category::TaggedSymbol
|
|
156
|
+
)
|
|
152
157
|
EXTERNAL_TRANSFER =
|
|
153
158
|
T.let(
|
|
154
159
|
:EXTERNAL_TRANSFER,
|
|
@@ -200,6 +200,11 @@ module Lithic
|
|
|
200
200
|
:EXTERNAL_RTP,
|
|
201
201
|
Lithic::ExternalPaymentListParams::Category::TaggedSymbol
|
|
202
202
|
)
|
|
203
|
+
EXTERNAL_STABLECOIN =
|
|
204
|
+
T.let(
|
|
205
|
+
:EXTERNAL_STABLECOIN,
|
|
206
|
+
Lithic::ExternalPaymentListParams::Category::TaggedSymbol
|
|
207
|
+
)
|
|
203
208
|
EXTERNAL_TRANSFER =
|
|
204
209
|
T.let(
|
|
205
210
|
:EXTERNAL_TRANSFER,
|
|
@@ -0,0 +1,528 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Lithic
|
|
4
|
+
module Models
|
|
5
|
+
module FinancialAccounts
|
|
6
|
+
class InstallmentPlan < Lithic::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
Lithic::FinancialAccounts::InstallmentPlan,
|
|
11
|
+
Lithic::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Globally unique identifier for an installment plan
|
|
16
|
+
sig { returns(String) }
|
|
17
|
+
attr_accessor :token
|
|
18
|
+
|
|
19
|
+
# Date the plan was paid off or cancelled, or null while it is still open
|
|
20
|
+
sig { returns(T.nilable(Date)) }
|
|
21
|
+
attr_accessor :closed_at
|
|
22
|
+
|
|
23
|
+
# Timestamp of when the installment plan was created
|
|
24
|
+
sig { returns(Time) }
|
|
25
|
+
attr_accessor :created
|
|
26
|
+
|
|
27
|
+
# Enrollment fee charged when the plan was created in cents
|
|
28
|
+
sig { returns(Integer) }
|
|
29
|
+
attr_accessor :fee_amount
|
|
30
|
+
|
|
31
|
+
# Globally unique identifier for a financial account
|
|
32
|
+
sig { returns(String) }
|
|
33
|
+
attr_accessor :financial_account_token
|
|
34
|
+
|
|
35
|
+
# Total owed on the plan in cents, the principal amount plus the enrollment fee
|
|
36
|
+
sig { returns(Integer) }
|
|
37
|
+
attr_accessor :installment_plan_total
|
|
38
|
+
|
|
39
|
+
# Installments that make up the plan, oldest first
|
|
40
|
+
sig do
|
|
41
|
+
returns(
|
|
42
|
+
T::Array[Lithic::FinancialAccounts::InstallmentPlan::Installment]
|
|
43
|
+
)
|
|
44
|
+
end
|
|
45
|
+
attr_accessor :installments
|
|
46
|
+
|
|
47
|
+
# Number of installments that still carry a balance
|
|
48
|
+
sig { returns(Integer) }
|
|
49
|
+
attr_accessor :installments_outstanding
|
|
50
|
+
|
|
51
|
+
# Number of installments that have been paid off
|
|
52
|
+
sig { returns(Integer) }
|
|
53
|
+
attr_accessor :installments_paid
|
|
54
|
+
|
|
55
|
+
# Number of installments the plan is broken into
|
|
56
|
+
sig { returns(Integer) }
|
|
57
|
+
attr_accessor :num_installments
|
|
58
|
+
|
|
59
|
+
# Balance the plan was opened on in cents, excluding the enrollment fee
|
|
60
|
+
sig { returns(Integer) }
|
|
61
|
+
attr_accessor :principal_amount
|
|
62
|
+
|
|
63
|
+
# Balance the plan was opened on, broken out by category, or null if it was not
|
|
64
|
+
# recorded
|
|
65
|
+
sig do
|
|
66
|
+
returns(
|
|
67
|
+
T.nilable(Lithic::FinancialAccounts::TransactionCategoryBalances)
|
|
68
|
+
)
|
|
69
|
+
end
|
|
70
|
+
attr_reader :source_amounts
|
|
71
|
+
|
|
72
|
+
sig do
|
|
73
|
+
params(
|
|
74
|
+
source_amounts:
|
|
75
|
+
T.nilable(
|
|
76
|
+
Lithic::FinancialAccounts::TransactionCategoryBalances::OrHash
|
|
77
|
+
)
|
|
78
|
+
).void
|
|
79
|
+
end
|
|
80
|
+
attr_writer :source_amounts
|
|
81
|
+
|
|
82
|
+
# Identifier of the record the plan was opened from, such as the closing statement
|
|
83
|
+
# for an unpaid balance
|
|
84
|
+
sig { returns(String) }
|
|
85
|
+
attr_accessor :source_id
|
|
86
|
+
|
|
87
|
+
sig do
|
|
88
|
+
returns(
|
|
89
|
+
Lithic::FinancialAccounts::InstallmentPlan::SourceType::TaggedSymbol
|
|
90
|
+
)
|
|
91
|
+
end
|
|
92
|
+
attr_accessor :source_type
|
|
93
|
+
|
|
94
|
+
# Date the plan was created
|
|
95
|
+
sig { returns(Date) }
|
|
96
|
+
attr_accessor :start_date
|
|
97
|
+
|
|
98
|
+
# State of the installment plan. A plan is REBUILD_IN_PROGRESS while its loan
|
|
99
|
+
# tapes are being rebuilt, during which its payment totals are being recomputed
|
|
100
|
+
# and should not be treated as final
|
|
101
|
+
sig do
|
|
102
|
+
returns(
|
|
103
|
+
Lithic::FinancialAccounts::InstallmentPlan::State::TaggedSymbol
|
|
104
|
+
)
|
|
105
|
+
end
|
|
106
|
+
attr_accessor :state
|
|
107
|
+
|
|
108
|
+
# Amount paid towards the plan to date in cents
|
|
109
|
+
sig { returns(Integer) }
|
|
110
|
+
attr_accessor :total_paid
|
|
111
|
+
|
|
112
|
+
# Timestamp of when the installment plan was updated
|
|
113
|
+
sig { returns(Time) }
|
|
114
|
+
attr_accessor :updated
|
|
115
|
+
|
|
116
|
+
sig do
|
|
117
|
+
params(
|
|
118
|
+
token: String,
|
|
119
|
+
closed_at: T.nilable(Date),
|
|
120
|
+
created: Time,
|
|
121
|
+
fee_amount: Integer,
|
|
122
|
+
financial_account_token: String,
|
|
123
|
+
installment_plan_total: Integer,
|
|
124
|
+
installments:
|
|
125
|
+
T::Array[
|
|
126
|
+
Lithic::FinancialAccounts::InstallmentPlan::Installment::OrHash
|
|
127
|
+
],
|
|
128
|
+
installments_outstanding: Integer,
|
|
129
|
+
installments_paid: Integer,
|
|
130
|
+
num_installments: Integer,
|
|
131
|
+
principal_amount: Integer,
|
|
132
|
+
source_amounts:
|
|
133
|
+
T.nilable(
|
|
134
|
+
Lithic::FinancialAccounts::TransactionCategoryBalances::OrHash
|
|
135
|
+
),
|
|
136
|
+
source_id: String,
|
|
137
|
+
source_type:
|
|
138
|
+
Lithic::FinancialAccounts::InstallmentPlan::SourceType::OrSymbol,
|
|
139
|
+
start_date: Date,
|
|
140
|
+
state: Lithic::FinancialAccounts::InstallmentPlan::State::OrSymbol,
|
|
141
|
+
total_paid: Integer,
|
|
142
|
+
updated: Time
|
|
143
|
+
).returns(T.attached_class)
|
|
144
|
+
end
|
|
145
|
+
def self.new(
|
|
146
|
+
# Globally unique identifier for an installment plan
|
|
147
|
+
token:,
|
|
148
|
+
# Date the plan was paid off or cancelled, or null while it is still open
|
|
149
|
+
closed_at:,
|
|
150
|
+
# Timestamp of when the installment plan was created
|
|
151
|
+
created:,
|
|
152
|
+
# Enrollment fee charged when the plan was created in cents
|
|
153
|
+
fee_amount:,
|
|
154
|
+
# Globally unique identifier for a financial account
|
|
155
|
+
financial_account_token:,
|
|
156
|
+
# Total owed on the plan in cents, the principal amount plus the enrollment fee
|
|
157
|
+
installment_plan_total:,
|
|
158
|
+
# Installments that make up the plan, oldest first
|
|
159
|
+
installments:,
|
|
160
|
+
# Number of installments that still carry a balance
|
|
161
|
+
installments_outstanding:,
|
|
162
|
+
# Number of installments that have been paid off
|
|
163
|
+
installments_paid:,
|
|
164
|
+
# Number of installments the plan is broken into
|
|
165
|
+
num_installments:,
|
|
166
|
+
# Balance the plan was opened on in cents, excluding the enrollment fee
|
|
167
|
+
principal_amount:,
|
|
168
|
+
# Balance the plan was opened on, broken out by category, or null if it was not
|
|
169
|
+
# recorded
|
|
170
|
+
source_amounts:,
|
|
171
|
+
# Identifier of the record the plan was opened from, such as the closing statement
|
|
172
|
+
# for an unpaid balance
|
|
173
|
+
source_id:,
|
|
174
|
+
source_type:,
|
|
175
|
+
# Date the plan was created
|
|
176
|
+
start_date:,
|
|
177
|
+
# State of the installment plan. A plan is REBUILD_IN_PROGRESS while its loan
|
|
178
|
+
# tapes are being rebuilt, during which its payment totals are being recomputed
|
|
179
|
+
# and should not be treated as final
|
|
180
|
+
state:,
|
|
181
|
+
# Amount paid towards the plan to date in cents
|
|
182
|
+
total_paid:,
|
|
183
|
+
# Timestamp of when the installment plan was updated
|
|
184
|
+
updated:
|
|
185
|
+
)
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
sig do
|
|
189
|
+
override.returns(
|
|
190
|
+
{
|
|
191
|
+
token: String,
|
|
192
|
+
closed_at: T.nilable(Date),
|
|
193
|
+
created: Time,
|
|
194
|
+
fee_amount: Integer,
|
|
195
|
+
financial_account_token: String,
|
|
196
|
+
installment_plan_total: Integer,
|
|
197
|
+
installments:
|
|
198
|
+
T::Array[
|
|
199
|
+
Lithic::FinancialAccounts::InstallmentPlan::Installment
|
|
200
|
+
],
|
|
201
|
+
installments_outstanding: Integer,
|
|
202
|
+
installments_paid: Integer,
|
|
203
|
+
num_installments: Integer,
|
|
204
|
+
principal_amount: Integer,
|
|
205
|
+
source_amounts:
|
|
206
|
+
T.nilable(
|
|
207
|
+
Lithic::FinancialAccounts::TransactionCategoryBalances
|
|
208
|
+
),
|
|
209
|
+
source_id: String,
|
|
210
|
+
source_type:
|
|
211
|
+
Lithic::FinancialAccounts::InstallmentPlan::SourceType::TaggedSymbol,
|
|
212
|
+
start_date: Date,
|
|
213
|
+
state:
|
|
214
|
+
Lithic::FinancialAccounts::InstallmentPlan::State::TaggedSymbol,
|
|
215
|
+
total_paid: Integer,
|
|
216
|
+
updated: Time
|
|
217
|
+
}
|
|
218
|
+
)
|
|
219
|
+
end
|
|
220
|
+
def to_hash
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
class Installment < Lithic::Internal::Type::BaseModel
|
|
224
|
+
OrHash =
|
|
225
|
+
T.type_alias do
|
|
226
|
+
T.any(
|
|
227
|
+
Lithic::FinancialAccounts::InstallmentPlan::Installment,
|
|
228
|
+
Lithic::Internal::AnyHash
|
|
229
|
+
)
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
# Amount the installment was opened for in cents
|
|
233
|
+
sig { returns(Integer) }
|
|
234
|
+
attr_accessor :amount_due
|
|
235
|
+
|
|
236
|
+
sig do
|
|
237
|
+
returns(Lithic::FinancialAccounts::TransactionCategoryBalances)
|
|
238
|
+
end
|
|
239
|
+
attr_reader :amount_due_details
|
|
240
|
+
|
|
241
|
+
sig do
|
|
242
|
+
params(
|
|
243
|
+
amount_due_details:
|
|
244
|
+
Lithic::FinancialAccounts::TransactionCategoryBalances::OrHash
|
|
245
|
+
).void
|
|
246
|
+
end
|
|
247
|
+
attr_writer :amount_due_details
|
|
248
|
+
|
|
249
|
+
# Amount still owed on the installment in cents
|
|
250
|
+
sig { returns(Integer) }
|
|
251
|
+
attr_accessor :amount_outstanding
|
|
252
|
+
|
|
253
|
+
sig do
|
|
254
|
+
returns(Lithic::FinancialAccounts::TransactionCategoryBalances)
|
|
255
|
+
end
|
|
256
|
+
attr_reader :amount_outstanding_details
|
|
257
|
+
|
|
258
|
+
sig do
|
|
259
|
+
params(
|
|
260
|
+
amount_outstanding_details:
|
|
261
|
+
Lithic::FinancialAccounts::TransactionCategoryBalances::OrHash
|
|
262
|
+
).void
|
|
263
|
+
end
|
|
264
|
+
attr_writer :amount_outstanding_details
|
|
265
|
+
|
|
266
|
+
# Amount paid towards the installment in cents
|
|
267
|
+
sig { returns(Integer) }
|
|
268
|
+
attr_accessor :amount_paid
|
|
269
|
+
|
|
270
|
+
sig do
|
|
271
|
+
returns(Lithic::FinancialAccounts::TransactionCategoryBalances)
|
|
272
|
+
end
|
|
273
|
+
attr_reader :amount_paid_details
|
|
274
|
+
|
|
275
|
+
sig do
|
|
276
|
+
params(
|
|
277
|
+
amount_paid_details:
|
|
278
|
+
Lithic::FinancialAccounts::TransactionCategoryBalances::OrHash
|
|
279
|
+
).void
|
|
280
|
+
end
|
|
281
|
+
attr_writer :amount_paid_details
|
|
282
|
+
|
|
283
|
+
# Date the installment was actually assessed onto the account, or null if it has
|
|
284
|
+
# not been assessed yet
|
|
285
|
+
sig { returns(T.nilable(Date)) }
|
|
286
|
+
attr_accessor :date_assessed
|
|
287
|
+
|
|
288
|
+
# Date the installment is scheduled to be assessed onto the account
|
|
289
|
+
sig { returns(Date) }
|
|
290
|
+
attr_accessor :due_date
|
|
291
|
+
|
|
292
|
+
# Position of this installment within the plan, starting at 0
|
|
293
|
+
sig { returns(Integer) }
|
|
294
|
+
attr_accessor :installment_num
|
|
295
|
+
|
|
296
|
+
# Date the installment must be paid by before it is considered past due
|
|
297
|
+
sig { returns(Date) }
|
|
298
|
+
attr_accessor :payment_due_date
|
|
299
|
+
|
|
300
|
+
# Payments applied to this installment, oldest first
|
|
301
|
+
sig do
|
|
302
|
+
returns(
|
|
303
|
+
T::Array[
|
|
304
|
+
Lithic::FinancialAccounts::InstallmentPlan::Installment::Payment
|
|
305
|
+
]
|
|
306
|
+
)
|
|
307
|
+
end
|
|
308
|
+
attr_accessor :payments
|
|
309
|
+
|
|
310
|
+
sig do
|
|
311
|
+
params(
|
|
312
|
+
amount_due: Integer,
|
|
313
|
+
amount_due_details:
|
|
314
|
+
Lithic::FinancialAccounts::TransactionCategoryBalances::OrHash,
|
|
315
|
+
amount_outstanding: Integer,
|
|
316
|
+
amount_outstanding_details:
|
|
317
|
+
Lithic::FinancialAccounts::TransactionCategoryBalances::OrHash,
|
|
318
|
+
amount_paid: Integer,
|
|
319
|
+
amount_paid_details:
|
|
320
|
+
Lithic::FinancialAccounts::TransactionCategoryBalances::OrHash,
|
|
321
|
+
date_assessed: T.nilable(Date),
|
|
322
|
+
due_date: Date,
|
|
323
|
+
installment_num: Integer,
|
|
324
|
+
payment_due_date: Date,
|
|
325
|
+
payments:
|
|
326
|
+
T::Array[
|
|
327
|
+
Lithic::FinancialAccounts::InstallmentPlan::Installment::Payment::OrHash
|
|
328
|
+
]
|
|
329
|
+
).returns(T.attached_class)
|
|
330
|
+
end
|
|
331
|
+
def self.new(
|
|
332
|
+
# Amount the installment was opened for in cents
|
|
333
|
+
amount_due:,
|
|
334
|
+
amount_due_details:,
|
|
335
|
+
# Amount still owed on the installment in cents
|
|
336
|
+
amount_outstanding:,
|
|
337
|
+
amount_outstanding_details:,
|
|
338
|
+
# Amount paid towards the installment in cents
|
|
339
|
+
amount_paid:,
|
|
340
|
+
amount_paid_details:,
|
|
341
|
+
# Date the installment was actually assessed onto the account, or null if it has
|
|
342
|
+
# not been assessed yet
|
|
343
|
+
date_assessed:,
|
|
344
|
+
# Date the installment is scheduled to be assessed onto the account
|
|
345
|
+
due_date:,
|
|
346
|
+
# Position of this installment within the plan, starting at 0
|
|
347
|
+
installment_num:,
|
|
348
|
+
# Date the installment must be paid by before it is considered past due
|
|
349
|
+
payment_due_date:,
|
|
350
|
+
# Payments applied to this installment, oldest first
|
|
351
|
+
payments:
|
|
352
|
+
)
|
|
353
|
+
end
|
|
354
|
+
|
|
355
|
+
sig do
|
|
356
|
+
override.returns(
|
|
357
|
+
{
|
|
358
|
+
amount_due: Integer,
|
|
359
|
+
amount_due_details:
|
|
360
|
+
Lithic::FinancialAccounts::TransactionCategoryBalances,
|
|
361
|
+
amount_outstanding: Integer,
|
|
362
|
+
amount_outstanding_details:
|
|
363
|
+
Lithic::FinancialAccounts::TransactionCategoryBalances,
|
|
364
|
+
amount_paid: Integer,
|
|
365
|
+
amount_paid_details:
|
|
366
|
+
Lithic::FinancialAccounts::TransactionCategoryBalances,
|
|
367
|
+
date_assessed: T.nilable(Date),
|
|
368
|
+
due_date: Date,
|
|
369
|
+
installment_num: Integer,
|
|
370
|
+
payment_due_date: Date,
|
|
371
|
+
payments:
|
|
372
|
+
T::Array[
|
|
373
|
+
Lithic::FinancialAccounts::InstallmentPlan::Installment::Payment
|
|
374
|
+
]
|
|
375
|
+
}
|
|
376
|
+
)
|
|
377
|
+
end
|
|
378
|
+
def to_hash
|
|
379
|
+
end
|
|
380
|
+
|
|
381
|
+
class Payment < Lithic::Internal::Type::BaseModel
|
|
382
|
+
OrHash =
|
|
383
|
+
T.type_alias do
|
|
384
|
+
T.any(
|
|
385
|
+
Lithic::FinancialAccounts::InstallmentPlan::Installment::Payment,
|
|
386
|
+
Lithic::Internal::AnyHash
|
|
387
|
+
)
|
|
388
|
+
end
|
|
389
|
+
|
|
390
|
+
# Amount applied to the installment in cents
|
|
391
|
+
sig { returns(Integer) }
|
|
392
|
+
attr_accessor :amount
|
|
393
|
+
|
|
394
|
+
sig do
|
|
395
|
+
returns(Lithic::FinancialAccounts::TransactionCategoryBalances)
|
|
396
|
+
end
|
|
397
|
+
attr_reader :amount_details
|
|
398
|
+
|
|
399
|
+
sig do
|
|
400
|
+
params(
|
|
401
|
+
amount_details:
|
|
402
|
+
Lithic::FinancialAccounts::TransactionCategoryBalances::OrHash
|
|
403
|
+
).void
|
|
404
|
+
end
|
|
405
|
+
attr_writer :amount_details
|
|
406
|
+
|
|
407
|
+
# Date the payment was applied to the installment
|
|
408
|
+
sig { returns(Date) }
|
|
409
|
+
attr_accessor :date
|
|
410
|
+
|
|
411
|
+
sig do
|
|
412
|
+
params(
|
|
413
|
+
amount: Integer,
|
|
414
|
+
amount_details:
|
|
415
|
+
Lithic::FinancialAccounts::TransactionCategoryBalances::OrHash,
|
|
416
|
+
date: Date
|
|
417
|
+
).returns(T.attached_class)
|
|
418
|
+
end
|
|
419
|
+
def self.new(
|
|
420
|
+
# Amount applied to the installment in cents
|
|
421
|
+
amount:,
|
|
422
|
+
amount_details:,
|
|
423
|
+
# Date the payment was applied to the installment
|
|
424
|
+
date:
|
|
425
|
+
)
|
|
426
|
+
end
|
|
427
|
+
|
|
428
|
+
sig do
|
|
429
|
+
override.returns(
|
|
430
|
+
{
|
|
431
|
+
amount: Integer,
|
|
432
|
+
amount_details:
|
|
433
|
+
Lithic::FinancialAccounts::TransactionCategoryBalances,
|
|
434
|
+
date: Date
|
|
435
|
+
}
|
|
436
|
+
)
|
|
437
|
+
end
|
|
438
|
+
def to_hash
|
|
439
|
+
end
|
|
440
|
+
end
|
|
441
|
+
end
|
|
442
|
+
|
|
443
|
+
module SourceType
|
|
444
|
+
extend Lithic::Internal::Type::Enum
|
|
445
|
+
|
|
446
|
+
TaggedSymbol =
|
|
447
|
+
T.type_alias do
|
|
448
|
+
T.all(
|
|
449
|
+
Symbol,
|
|
450
|
+
Lithic::FinancialAccounts::InstallmentPlan::SourceType
|
|
451
|
+
)
|
|
452
|
+
end
|
|
453
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
454
|
+
|
|
455
|
+
UNPAID_BALANCE =
|
|
456
|
+
T.let(
|
|
457
|
+
:UNPAID_BALANCE,
|
|
458
|
+
Lithic::FinancialAccounts::InstallmentPlan::SourceType::TaggedSymbol
|
|
459
|
+
)
|
|
460
|
+
TRANSACTION =
|
|
461
|
+
T.let(
|
|
462
|
+
:TRANSACTION,
|
|
463
|
+
Lithic::FinancialAccounts::InstallmentPlan::SourceType::TaggedSymbol
|
|
464
|
+
)
|
|
465
|
+
|
|
466
|
+
sig do
|
|
467
|
+
override.returns(
|
|
468
|
+
T::Array[
|
|
469
|
+
Lithic::FinancialAccounts::InstallmentPlan::SourceType::TaggedSymbol
|
|
470
|
+
]
|
|
471
|
+
)
|
|
472
|
+
end
|
|
473
|
+
def self.values
|
|
474
|
+
end
|
|
475
|
+
end
|
|
476
|
+
|
|
477
|
+
# State of the installment plan. A plan is REBUILD_IN_PROGRESS while its loan
|
|
478
|
+
# tapes are being rebuilt, during which its payment totals are being recomputed
|
|
479
|
+
# and should not be treated as final
|
|
480
|
+
module State
|
|
481
|
+
extend Lithic::Internal::Type::Enum
|
|
482
|
+
|
|
483
|
+
TaggedSymbol =
|
|
484
|
+
T.type_alias do
|
|
485
|
+
T.all(Symbol, Lithic::FinancialAccounts::InstallmentPlan::State)
|
|
486
|
+
end
|
|
487
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
488
|
+
|
|
489
|
+
PENDING =
|
|
490
|
+
T.let(
|
|
491
|
+
:PENDING,
|
|
492
|
+
Lithic::FinancialAccounts::InstallmentPlan::State::TaggedSymbol
|
|
493
|
+
)
|
|
494
|
+
ACTIVE =
|
|
495
|
+
T.let(
|
|
496
|
+
:ACTIVE,
|
|
497
|
+
Lithic::FinancialAccounts::InstallmentPlan::State::TaggedSymbol
|
|
498
|
+
)
|
|
499
|
+
REBUILD_IN_PROGRESS =
|
|
500
|
+
T.let(
|
|
501
|
+
:REBUILD_IN_PROGRESS,
|
|
502
|
+
Lithic::FinancialAccounts::InstallmentPlan::State::TaggedSymbol
|
|
503
|
+
)
|
|
504
|
+
FULLY_PAID =
|
|
505
|
+
T.let(
|
|
506
|
+
:FULLY_PAID,
|
|
507
|
+
Lithic::FinancialAccounts::InstallmentPlan::State::TaggedSymbol
|
|
508
|
+
)
|
|
509
|
+
CANCELLED =
|
|
510
|
+
T.let(
|
|
511
|
+
:CANCELLED,
|
|
512
|
+
Lithic::FinancialAccounts::InstallmentPlan::State::TaggedSymbol
|
|
513
|
+
)
|
|
514
|
+
|
|
515
|
+
sig do
|
|
516
|
+
override.returns(
|
|
517
|
+
T::Array[
|
|
518
|
+
Lithic::FinancialAccounts::InstallmentPlan::State::TaggedSymbol
|
|
519
|
+
]
|
|
520
|
+
)
|
|
521
|
+
end
|
|
522
|
+
def self.values
|
|
523
|
+
end
|
|
524
|
+
end
|
|
525
|
+
end
|
|
526
|
+
end
|
|
527
|
+
end
|
|
528
|
+
end
|