lithic 0.7.0 → 0.8.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 +36 -0
- data/README.md +3 -3
- data/lib/lithic/client.rb +11 -0
- data/lib/lithic/models/account_activity_list_params.rb +2 -0
- data/lib/lithic/models/account_activity_list_response.rb +8 -2
- data/lib/lithic/models/account_activity_retrieve_transaction_response.rb +8 -2
- data/lib/lithic/models/auth_rules/auth_rule.rb +84 -8
- data/lib/lithic/models/auth_rules/auth_rule_version.rb +92 -0
- data/lib/lithic/models/auth_rules/rule_feature.rb +231 -0
- data/lib/lithic/models/auth_rules/typescript_code_parameters.rb +33 -0
- data/lib/lithic/models/auth_rules/v2/backtest_results.rb +9 -17
- data/lib/lithic/models/auth_rules/v2_create_params.rb +50 -10
- data/lib/lithic/models/auth_rules/v2_draft_params.rb +6 -3
- data/lib/lithic/models/auth_rules/v2_list_versions_params.rb +22 -0
- data/lib/lithic/models/auth_rules/v2_list_versions_response.rb +18 -0
- data/lib/lithic/models/auth_rules/v2_retrieve_features_response.rb +3 -83
- data/lib/lithic/models/auth_rules/v2_retrieve_report_response.rb +525 -1
- data/lib/lithic/models/auth_rules/v2_update_params.rb +17 -1
- data/lib/lithic/models/auth_rules/velocity_limit_filters.rb +87 -0
- data/lib/lithic/models/auth_rules/velocity_limit_params.rb +3 -84
- data/lib/lithic/models/digital_wallet_tokenization_approval_request_webhook_event.rb +69 -59
- data/lib/lithic/models/dispute_create_params.rb +11 -11
- data/lib/lithic/models/dispute_list_params.rb +3 -3
- data/lib/lithic/models/dispute_update_params.rb +9 -9
- data/lib/lithic/models/event.rb +0 -7
- data/lib/lithic/models/event_list_params.rb +0 -4
- data/lib/lithic/models/event_subscription.rb +0 -4
- data/lib/lithic/models/events/subscription_create_params.rb +0 -4
- data/lib/lithic/models/events/subscription_send_simulated_example_params.rb +0 -1
- data/lib/lithic/models/events/subscription_update_params.rb +0 -4
- data/lib/lithic/models/financial_account.rb +1 -0
- data/lib/lithic/models/financial_account_list_params.rb +1 -0
- data/lib/lithic/models/financial_accounts/interest_tier_schedule.rb +9 -1
- data/lib/lithic/models/financial_accounts/interest_tier_schedule_update_params.rb +9 -1
- data/lib/lithic/models/financial_accounts/statements/statement_line_items.rb +27 -2
- data/lib/lithic/models/hold.rb +147 -0
- data/lib/lithic/models/hold_create_params.rb +61 -0
- data/lib/lithic/models/hold_event.rb +110 -0
- data/lib/lithic/models/hold_list_params.rb +89 -0
- data/lib/lithic/models/hold_retrieve_params.rb +20 -0
- data/lib/lithic/models/hold_void_params.rb +29 -0
- data/lib/lithic/models/instance_financial_account_type.rb +1 -0
- data/lib/lithic/models/parsed_webhook_event.rb +2 -4
- data/lib/lithic/models/payment.rb +76 -12
- data/lib/lithic/models/payment_simulate_action_params.rb +1 -0
- data/lib/lithic/models.rb +12 -2
- data/lib/lithic/resources/account_activity.rb +2 -2
- data/lib/lithic/resources/auth_rules/v2.rb +24 -4
- data/lib/lithic/resources/disputes.rb +21 -21
- data/lib/lithic/resources/financial_accounts/interest_tier_schedule.rb +6 -2
- data/lib/lithic/resources/holds.rb +132 -0
- data/lib/lithic/resources/webhooks.rb +2 -3
- data/lib/lithic/version.rb +1 -1
- data/lib/lithic.rb +14 -1
- data/rbi/lithic/client.rbi +9 -0
- data/rbi/lithic/models/account_activity_list_params.rbi +10 -0
- data/rbi/lithic/models/account_activity_list_response.rbi +14 -2
- data/rbi/lithic/models/account_activity_retrieve_transaction_response.rbi +14 -2
- data/rbi/lithic/models/auth_rules/auth_rule.rbi +128 -4
- data/rbi/lithic/models/auth_rules/auth_rule_version.rbi +142 -0
- data/rbi/lithic/models/auth_rules/rule_feature.rbi +414 -0
- data/rbi/lithic/models/auth_rules/typescript_code_parameters.rbi +94 -0
- data/rbi/lithic/models/auth_rules/v2/backtest_results.rbi +12 -35
- data/rbi/lithic/models/auth_rules/v2_create_params.rbi +81 -12
- data/rbi/lithic/models/auth_rules/v2_draft_params.rbi +8 -4
- data/rbi/lithic/models/auth_rules/v2_list_versions_params.rbi +40 -0
- data/rbi/lithic/models/auth_rules/v2_list_versions_response.rbi +36 -0
- data/rbi/lithic/models/auth_rules/v2_retrieve_features_response.rbi +4 -209
- data/rbi/lithic/models/auth_rules/v2_retrieve_report_response.rbi +1692 -3
- data/rbi/lithic/models/auth_rules/v2_update_params.rbi +24 -0
- data/rbi/lithic/models/auth_rules/velocity_limit_filters.rbi +205 -0
- data/rbi/lithic/models/auth_rules/velocity_limit_params.rbi +4 -206
- data/rbi/lithic/models/digital_wallet_tokenization_approval_request_webhook_event.rbi +154 -142
- data/rbi/lithic/models/dispute_create_params.rbi +11 -11
- data/rbi/lithic/models/dispute_list_params.rbi +3 -3
- data/rbi/lithic/models/dispute_update_params.rbi +9 -9
- data/rbi/lithic/models/event.rbi +0 -14
- data/rbi/lithic/models/event_list_params.rbi +0 -8
- data/rbi/lithic/models/event_subscription.rbi +0 -8
- data/rbi/lithic/models/events/subscription_create_params.rbi +0 -8
- data/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi +0 -5
- data/rbi/lithic/models/events/subscription_update_params.rbi +0 -8
- data/rbi/lithic/models/financial_account.rbi +5 -0
- data/rbi/lithic/models/financial_account_list_params.rbi +5 -0
- data/rbi/lithic/models/financial_accounts/interest_tier_schedule.rbi +11 -0
- data/rbi/lithic/models/financial_accounts/interest_tier_schedule_update_params.rbi +11 -0
- data/rbi/lithic/models/financial_accounts/statements/statement_line_items.rbi +38 -3
- data/rbi/lithic/models/hold.rbi +183 -0
- data/rbi/lithic/models/hold_create_params.rbi +90 -0
- data/rbi/lithic/models/hold_event.rbi +148 -0
- data/rbi/lithic/models/hold_list_params.rbi +137 -0
- data/rbi/lithic/models/hold_retrieve_params.rbi +35 -0
- data/rbi/lithic/models/hold_void_params.rbi +49 -0
- data/rbi/lithic/models/instance_financial_account_type.rbi +5 -0
- data/rbi/lithic/models/parsed_webhook_event.rbi +0 -1
- data/rbi/lithic/models/payment.rbi +139 -13
- data/rbi/lithic/models/payment_simulate_action_params.rbi +5 -0
- data/rbi/lithic/models.rbi +12 -3
- data/rbi/lithic/resources/auth_rules/v2.rbi +16 -4
- data/rbi/lithic/resources/disputes.rbi +21 -21
- data/rbi/lithic/resources/financial_accounts/interest_tier_schedule.rbi +6 -0
- data/rbi/lithic/resources/holds.rbi +111 -0
- data/rbi/lithic/resources/webhooks.rbi +8 -2
- data/sig/lithic/client.rbs +5 -0
- data/sig/lithic/models/account_activity_list_params.rbs +4 -0
- data/sig/lithic/models/account_activity_list_response.rbs +5 -0
- data/sig/lithic/models/account_activity_retrieve_transaction_response.rbs +5 -0
- data/sig/lithic/models/auth_rules/auth_rule.rbs +42 -0
- data/sig/lithic/models/auth_rules/auth_rule_version.rbs +67 -0
- data/sig/lithic/models/auth_rules/rule_feature.rbs +173 -0
- data/sig/lithic/models/auth_rules/typescript_code_parameters.rbs +27 -0
- data/sig/lithic/models/auth_rules/v2/backtest_results.rbs +5 -18
- data/sig/lithic/models/auth_rules/v2_create_params.rbs +25 -0
- data/sig/lithic/models/auth_rules/v2_draft_params.rbs +1 -0
- data/sig/lithic/models/auth_rules/v2_list_versions_params.rbs +25 -0
- data/sig/lithic/models/auth_rules/v2_list_versions_response.rbs +18 -0
- data/sig/lithic/models/auth_rules/v2_retrieve_features_response.rbs +4 -80
- data/sig/lithic/models/auth_rules/v2_retrieve_report_response.rbs +658 -3
- data/sig/lithic/models/auth_rules/v2_update_params.rbs +16 -0
- data/sig/lithic/models/auth_rules/velocity_limit_filters.rbs +81 -0
- data/sig/lithic/models/auth_rules/velocity_limit_params.rbs +6 -82
- data/sig/lithic/models/digital_wallet_tokenization_approval_request_webhook_event.rbs +38 -38
- data/sig/lithic/models/event.rbs +0 -2
- data/sig/lithic/models/event_list_params.rbs +0 -2
- data/sig/lithic/models/event_subscription.rbs +0 -2
- data/sig/lithic/models/events/subscription_create_params.rbs +0 -2
- data/sig/lithic/models/events/subscription_send_simulated_example_params.rbs +0 -2
- data/sig/lithic/models/events/subscription_update_params.rbs +0 -2
- data/sig/lithic/models/financial_account.rbs +2 -0
- data/sig/lithic/models/financial_account_list_params.rbs +7 -1
- data/sig/lithic/models/financial_accounts/interest_tier_schedule.rbs +7 -0
- data/sig/lithic/models/financial_accounts/interest_tier_schedule_update_params.rbs +7 -0
- data/sig/lithic/models/financial_accounts/statements/statement_line_items.rbs +17 -3
- data/sig/lithic/models/hold.rbs +137 -0
- data/sig/lithic/models/hold_create_params.rbs +57 -0
- data/sig/lithic/models/hold_event.rbs +91 -0
- data/sig/lithic/models/hold_list_params.rbs +83 -0
- data/sig/lithic/models/hold_retrieve_params.rbs +23 -0
- data/sig/lithic/models/hold_void_params.rbs +28 -0
- data/sig/lithic/models/instance_financial_account_type.rbs +2 -0
- data/sig/lithic/models/parsed_webhook_event.rbs +0 -1
- data/sig/lithic/models/payment.rbs +23 -8
- data/sig/lithic/models/payment_simulate_action_params.rbs +2 -0
- data/sig/lithic/models.rbs +12 -2
- data/sig/lithic/resources/auth_rules/v2.rbs +5 -0
- data/sig/lithic/resources/financial_accounts/interest_tier_schedule.rbs +2 -0
- data/sig/lithic/resources/holds.rbs +39 -0
- data/sig/lithic/resources/webhooks.rbs +0 -1
- metadata +41 -5
- data/lib/lithic/models/tokenization_decisioning_request_webhook_event.rb +0 -159
- data/rbi/lithic/models/tokenization_decisioning_request_webhook_event.rbi +0 -331
- data/sig/lithic/models/tokenization_decisioning_request_webhook_event.rbs +0 -130
|
@@ -344,6 +344,11 @@ module Lithic
|
|
|
344
344
|
:PROGRAM_BANK_ACCOUNTS_PAYABLE,
|
|
345
345
|
Lithic::FinancialAccount::Type::TaggedSymbol
|
|
346
346
|
)
|
|
347
|
+
EARLY_DIRECT_DEPOSIT_FLOAT =
|
|
348
|
+
T.let(
|
|
349
|
+
:EARLY_DIRECT_DEPOSIT_FLOAT,
|
|
350
|
+
Lithic::FinancialAccount::Type::TaggedSymbol
|
|
351
|
+
)
|
|
347
352
|
|
|
348
353
|
sig do
|
|
349
354
|
override.returns(
|
|
@@ -98,6 +98,11 @@ module Lithic
|
|
|
98
98
|
:SECURITY,
|
|
99
99
|
Lithic::FinancialAccountListParams::Type::TaggedSymbol
|
|
100
100
|
)
|
|
101
|
+
EARLY_DIRECT_DEPOSIT_FLOAT =
|
|
102
|
+
T.let(
|
|
103
|
+
:EARLY_DIRECT_DEPOSIT_FLOAT,
|
|
104
|
+
Lithic::FinancialAccountListParams::Type::TaggedSymbol
|
|
105
|
+
)
|
|
101
106
|
|
|
102
107
|
sig do
|
|
103
108
|
override.returns(
|
|
@@ -20,6 +20,13 @@ module Lithic
|
|
|
20
20
|
sig { returns(Date) }
|
|
21
21
|
attr_accessor :effective_date
|
|
22
22
|
|
|
23
|
+
# Custom rates per category for penalties
|
|
24
|
+
sig { returns(T.nilable(T.anything)) }
|
|
25
|
+
attr_reader :penalty_rates
|
|
26
|
+
|
|
27
|
+
sig { params(penalty_rates: T.anything).void }
|
|
28
|
+
attr_writer :penalty_rates
|
|
29
|
+
|
|
23
30
|
# Name of a tier contained in the credit product. Mutually exclusive with
|
|
24
31
|
# tier_rates
|
|
25
32
|
sig { returns(T.nilable(String)) }
|
|
@@ -40,6 +47,7 @@ module Lithic
|
|
|
40
47
|
params(
|
|
41
48
|
credit_product_token: String,
|
|
42
49
|
effective_date: Date,
|
|
50
|
+
penalty_rates: T.anything,
|
|
43
51
|
tier_name: String,
|
|
44
52
|
tier_rates: T.anything
|
|
45
53
|
).returns(T.attached_class)
|
|
@@ -49,6 +57,8 @@ module Lithic
|
|
|
49
57
|
credit_product_token:,
|
|
50
58
|
# Date the tier should be effective in YYYY-MM-DD format
|
|
51
59
|
effective_date:,
|
|
60
|
+
# Custom rates per category for penalties
|
|
61
|
+
penalty_rates: nil,
|
|
52
62
|
# Name of a tier contained in the credit product. Mutually exclusive with
|
|
53
63
|
# tier_rates
|
|
54
64
|
tier_name: nil,
|
|
@@ -62,6 +72,7 @@ module Lithic
|
|
|
62
72
|
{
|
|
63
73
|
credit_product_token: String,
|
|
64
74
|
effective_date: Date,
|
|
75
|
+
penalty_rates: T.anything,
|
|
65
76
|
tier_name: String,
|
|
66
77
|
tier_rates: T.anything
|
|
67
78
|
}
|
|
@@ -21,6 +21,13 @@ module Lithic
|
|
|
21
21
|
sig { returns(Date) }
|
|
22
22
|
attr_accessor :effective_date
|
|
23
23
|
|
|
24
|
+
# Custom rates per category for penalties
|
|
25
|
+
sig { returns(T.nilable(T.anything)) }
|
|
26
|
+
attr_reader :penalty_rates
|
|
27
|
+
|
|
28
|
+
sig { params(penalty_rates: T.anything).void }
|
|
29
|
+
attr_writer :penalty_rates
|
|
30
|
+
|
|
24
31
|
# Name of a tier contained in the credit product. Mutually exclusive with
|
|
25
32
|
# tier_rates
|
|
26
33
|
sig { returns(T.nilable(String)) }
|
|
@@ -40,6 +47,7 @@ module Lithic
|
|
|
40
47
|
params(
|
|
41
48
|
financial_account_token: String,
|
|
42
49
|
effective_date: Date,
|
|
50
|
+
penalty_rates: T.anything,
|
|
43
51
|
tier_name: String,
|
|
44
52
|
tier_rates: T.anything,
|
|
45
53
|
request_options: Lithic::RequestOptions::OrHash
|
|
@@ -48,6 +56,8 @@ module Lithic
|
|
|
48
56
|
def self.new(
|
|
49
57
|
financial_account_token:,
|
|
50
58
|
effective_date:,
|
|
59
|
+
# Custom rates per category for penalties
|
|
60
|
+
penalty_rates: nil,
|
|
51
61
|
# Name of a tier contained in the credit product. Mutually exclusive with
|
|
52
62
|
# tier_rates
|
|
53
63
|
tier_name: nil,
|
|
@@ -62,6 +72,7 @@ module Lithic
|
|
|
62
72
|
{
|
|
63
73
|
financial_account_token: String,
|
|
64
74
|
effective_date: Date,
|
|
75
|
+
penalty_rates: T.anything,
|
|
65
76
|
tier_name: String,
|
|
66
77
|
tier_rates: T.anything,
|
|
67
78
|
request_options: Lithic::RequestOptions
|
|
@@ -70,6 +70,9 @@ module Lithic
|
|
|
70
70
|
sig { returns(Integer) }
|
|
71
71
|
attr_accessor :amount
|
|
72
72
|
|
|
73
|
+
# Note: Inbound wire transfers are coming soon (availability varies by partner
|
|
74
|
+
# bank). The WIRE category is a preview. To learn more, contact your customer
|
|
75
|
+
# success manager.
|
|
73
76
|
sig do
|
|
74
77
|
returns(
|
|
75
78
|
Lithic::FinancialAccounts::Statements::StatementLineItems::Data::Category::TaggedSymbol
|
|
@@ -122,6 +125,14 @@ module Lithic
|
|
|
122
125
|
sig { params(descriptor: String).void }
|
|
123
126
|
attr_writer :descriptor
|
|
124
127
|
|
|
128
|
+
# Subtype of the event that generated the line items
|
|
129
|
+
sig { returns(T.nilable(String)) }
|
|
130
|
+
attr_accessor :event_subtype
|
|
131
|
+
|
|
132
|
+
# Date of the loan tape that generated this line item
|
|
133
|
+
sig { returns(T.nilable(Date)) }
|
|
134
|
+
attr_accessor :loan_tape_date
|
|
135
|
+
|
|
125
136
|
sig do
|
|
126
137
|
params(
|
|
127
138
|
token: String,
|
|
@@ -137,7 +148,9 @@ module Lithic
|
|
|
137
148
|
financial_transaction_event_token: String,
|
|
138
149
|
financial_transaction_token: String,
|
|
139
150
|
card_token: String,
|
|
140
|
-
descriptor: String
|
|
151
|
+
descriptor: String,
|
|
152
|
+
event_subtype: T.nilable(String),
|
|
153
|
+
loan_tape_date: T.nilable(Date)
|
|
141
154
|
).returns(T.attached_class)
|
|
142
155
|
end
|
|
143
156
|
def self.new(
|
|
@@ -145,6 +158,9 @@ module Lithic
|
|
|
145
158
|
token:,
|
|
146
159
|
# Transaction amount in cents
|
|
147
160
|
amount:,
|
|
161
|
+
# Note: Inbound wire transfers are coming soon (availability varies by partner
|
|
162
|
+
# bank). The WIRE category is a preview. To learn more, contact your customer
|
|
163
|
+
# success manager.
|
|
148
164
|
category:,
|
|
149
165
|
# Timestamp of when the line item was generated
|
|
150
166
|
created:,
|
|
@@ -162,7 +178,11 @@ module Lithic
|
|
|
162
178
|
financial_transaction_token:,
|
|
163
179
|
# Globally unique identifier for a card
|
|
164
180
|
card_token: nil,
|
|
165
|
-
descriptor: nil
|
|
181
|
+
descriptor: nil,
|
|
182
|
+
# Subtype of the event that generated the line items
|
|
183
|
+
event_subtype: nil,
|
|
184
|
+
# Date of the loan tape that generated this line item
|
|
185
|
+
loan_tape_date: nil
|
|
166
186
|
)
|
|
167
187
|
end
|
|
168
188
|
|
|
@@ -182,13 +202,18 @@ module Lithic
|
|
|
182
202
|
financial_transaction_event_token: String,
|
|
183
203
|
financial_transaction_token: String,
|
|
184
204
|
card_token: String,
|
|
185
|
-
descriptor: String
|
|
205
|
+
descriptor: String,
|
|
206
|
+
event_subtype: T.nilable(String),
|
|
207
|
+
loan_tape_date: T.nilable(Date)
|
|
186
208
|
}
|
|
187
209
|
)
|
|
188
210
|
end
|
|
189
211
|
def to_hash
|
|
190
212
|
end
|
|
191
213
|
|
|
214
|
+
# Note: Inbound wire transfers are coming soon (availability varies by partner
|
|
215
|
+
# bank). The WIRE category is a preview. To learn more, contact your customer
|
|
216
|
+
# success manager.
|
|
192
217
|
module Category
|
|
193
218
|
extend Lithic::Internal::Type::Enum
|
|
194
219
|
|
|
@@ -206,6 +231,11 @@ module Lithic
|
|
|
206
231
|
:ACH,
|
|
207
232
|
Lithic::FinancialAccounts::Statements::StatementLineItems::Data::Category::TaggedSymbol
|
|
208
233
|
)
|
|
234
|
+
WIRE =
|
|
235
|
+
T.let(
|
|
236
|
+
:WIRE,
|
|
237
|
+
Lithic::FinancialAccounts::Statements::StatementLineItems::Data::Category::TaggedSymbol
|
|
238
|
+
)
|
|
209
239
|
BALANCE_OR_FUNDING =
|
|
210
240
|
T.let(
|
|
211
241
|
:BALANCE_OR_FUNDING,
|
|
@@ -296,6 +326,11 @@ module Lithic
|
|
|
296
326
|
:MANAGEMENT_DISBURSEMENT,
|
|
297
327
|
Lithic::FinancialAccounts::Statements::StatementLineItems::Data::Category::TaggedSymbol
|
|
298
328
|
)
|
|
329
|
+
HOLD =
|
|
330
|
+
T.let(
|
|
331
|
+
:HOLD,
|
|
332
|
+
Lithic::FinancialAccounts::Statements::StatementLineItems::Data::Category::TaggedSymbol
|
|
333
|
+
)
|
|
299
334
|
PROGRAM_FUNDING =
|
|
300
335
|
T.let(
|
|
301
336
|
:PROGRAM_FUNDING,
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Lithic
|
|
4
|
+
module Models
|
|
5
|
+
class Hold < Lithic::Internal::Type::BaseModel
|
|
6
|
+
OrHash = T.type_alias { T.any(Lithic::Hold, Lithic::Internal::AnyHash) }
|
|
7
|
+
|
|
8
|
+
# Unique identifier for the transaction
|
|
9
|
+
sig { returns(String) }
|
|
10
|
+
attr_accessor :token
|
|
11
|
+
|
|
12
|
+
# ISO 8601 timestamp of when the transaction was created
|
|
13
|
+
sig { returns(Time) }
|
|
14
|
+
attr_accessor :created
|
|
15
|
+
|
|
16
|
+
# Status of a hold transaction
|
|
17
|
+
sig { returns(Lithic::Hold::Status::TaggedSymbol) }
|
|
18
|
+
attr_accessor :status
|
|
19
|
+
|
|
20
|
+
# ISO 8601 timestamp of when the transaction was last updated
|
|
21
|
+
sig { returns(Time) }
|
|
22
|
+
attr_accessor :updated
|
|
23
|
+
|
|
24
|
+
sig { returns(T.nilable(String)) }
|
|
25
|
+
attr_reader :currency
|
|
26
|
+
|
|
27
|
+
sig { params(currency: String).void }
|
|
28
|
+
attr_writer :currency
|
|
29
|
+
|
|
30
|
+
sig { returns(T.nilable(T::Array[Lithic::HoldEvent])) }
|
|
31
|
+
attr_reader :events
|
|
32
|
+
|
|
33
|
+
sig { params(events: T::Array[Lithic::HoldEvent::OrHash]).void }
|
|
34
|
+
attr_writer :events
|
|
35
|
+
|
|
36
|
+
# When the hold will auto-expire if not resolved
|
|
37
|
+
sig { returns(T.nilable(Time)) }
|
|
38
|
+
attr_accessor :expiration_datetime
|
|
39
|
+
|
|
40
|
+
# HOLD - Hold Transaction
|
|
41
|
+
sig { returns(T.nilable(Lithic::Hold::Family::TaggedSymbol)) }
|
|
42
|
+
attr_reader :family
|
|
43
|
+
|
|
44
|
+
sig { params(family: Lithic::Hold::Family::OrSymbol).void }
|
|
45
|
+
attr_writer :family
|
|
46
|
+
|
|
47
|
+
sig { returns(T.nilable(String)) }
|
|
48
|
+
attr_reader :financial_account_token
|
|
49
|
+
|
|
50
|
+
sig { params(financial_account_token: String).void }
|
|
51
|
+
attr_writer :financial_account_token
|
|
52
|
+
|
|
53
|
+
# Current pending amount (0 when resolved)
|
|
54
|
+
sig { returns(T.nilable(Integer)) }
|
|
55
|
+
attr_reader :pending_amount
|
|
56
|
+
|
|
57
|
+
sig { params(pending_amount: Integer).void }
|
|
58
|
+
attr_writer :pending_amount
|
|
59
|
+
|
|
60
|
+
sig { returns(T.nilable(Lithic::Hold::Result::TaggedSymbol)) }
|
|
61
|
+
attr_reader :result
|
|
62
|
+
|
|
63
|
+
sig { params(result: Lithic::Hold::Result::OrSymbol).void }
|
|
64
|
+
attr_writer :result
|
|
65
|
+
|
|
66
|
+
sig { returns(T.nilable(String)) }
|
|
67
|
+
attr_accessor :user_defined_id
|
|
68
|
+
|
|
69
|
+
# A hold transaction representing reserved funds on a financial account. Holds
|
|
70
|
+
# move funds from available to pending balance in anticipation of future payments.
|
|
71
|
+
# They can be resolved via settlement (linked to payment), manual release, or
|
|
72
|
+
# expiration.
|
|
73
|
+
sig do
|
|
74
|
+
params(
|
|
75
|
+
token: String,
|
|
76
|
+
created: Time,
|
|
77
|
+
status: Lithic::Hold::Status::OrSymbol,
|
|
78
|
+
updated: Time,
|
|
79
|
+
currency: String,
|
|
80
|
+
events: T::Array[Lithic::HoldEvent::OrHash],
|
|
81
|
+
expiration_datetime: T.nilable(Time),
|
|
82
|
+
family: Lithic::Hold::Family::OrSymbol,
|
|
83
|
+
financial_account_token: String,
|
|
84
|
+
pending_amount: Integer,
|
|
85
|
+
result: Lithic::Hold::Result::OrSymbol,
|
|
86
|
+
user_defined_id: T.nilable(String)
|
|
87
|
+
).returns(T.attached_class)
|
|
88
|
+
end
|
|
89
|
+
def self.new(
|
|
90
|
+
# Unique identifier for the transaction
|
|
91
|
+
token:,
|
|
92
|
+
# ISO 8601 timestamp of when the transaction was created
|
|
93
|
+
created:,
|
|
94
|
+
# Status of a hold transaction
|
|
95
|
+
status:,
|
|
96
|
+
# ISO 8601 timestamp of when the transaction was last updated
|
|
97
|
+
updated:,
|
|
98
|
+
currency: nil,
|
|
99
|
+
events: nil,
|
|
100
|
+
# When the hold will auto-expire if not resolved
|
|
101
|
+
expiration_datetime: nil,
|
|
102
|
+
# HOLD - Hold Transaction
|
|
103
|
+
family: nil,
|
|
104
|
+
financial_account_token: nil,
|
|
105
|
+
# Current pending amount (0 when resolved)
|
|
106
|
+
pending_amount: nil,
|
|
107
|
+
result: nil,
|
|
108
|
+
user_defined_id: nil
|
|
109
|
+
)
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
sig do
|
|
113
|
+
override.returns(
|
|
114
|
+
{
|
|
115
|
+
token: String,
|
|
116
|
+
created: Time,
|
|
117
|
+
status: Lithic::Hold::Status::TaggedSymbol,
|
|
118
|
+
updated: Time,
|
|
119
|
+
currency: String,
|
|
120
|
+
events: T::Array[Lithic::HoldEvent],
|
|
121
|
+
expiration_datetime: T.nilable(Time),
|
|
122
|
+
family: Lithic::Hold::Family::TaggedSymbol,
|
|
123
|
+
financial_account_token: String,
|
|
124
|
+
pending_amount: Integer,
|
|
125
|
+
result: Lithic::Hold::Result::TaggedSymbol,
|
|
126
|
+
user_defined_id: T.nilable(String)
|
|
127
|
+
}
|
|
128
|
+
)
|
|
129
|
+
end
|
|
130
|
+
def to_hash
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Status of a hold transaction
|
|
134
|
+
module Status
|
|
135
|
+
extend Lithic::Internal::Type::Enum
|
|
136
|
+
|
|
137
|
+
TaggedSymbol = T.type_alias { T.all(Symbol, Lithic::Hold::Status) }
|
|
138
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
139
|
+
|
|
140
|
+
PENDING = T.let(:PENDING, Lithic::Hold::Status::TaggedSymbol)
|
|
141
|
+
SETTLED = T.let(:SETTLED, Lithic::Hold::Status::TaggedSymbol)
|
|
142
|
+
EXPIRED = T.let(:EXPIRED, Lithic::Hold::Status::TaggedSymbol)
|
|
143
|
+
VOIDED = T.let(:VOIDED, Lithic::Hold::Status::TaggedSymbol)
|
|
144
|
+
DECLINED = T.let(:DECLINED, Lithic::Hold::Status::TaggedSymbol)
|
|
145
|
+
REVERSED = T.let(:REVERSED, Lithic::Hold::Status::TaggedSymbol)
|
|
146
|
+
CANCELED = T.let(:CANCELED, Lithic::Hold::Status::TaggedSymbol)
|
|
147
|
+
RETURNED = T.let(:RETURNED, Lithic::Hold::Status::TaggedSymbol)
|
|
148
|
+
|
|
149
|
+
sig { override.returns(T::Array[Lithic::Hold::Status::TaggedSymbol]) }
|
|
150
|
+
def self.values
|
|
151
|
+
end
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# HOLD - Hold Transaction
|
|
155
|
+
module Family
|
|
156
|
+
extend Lithic::Internal::Type::Enum
|
|
157
|
+
|
|
158
|
+
TaggedSymbol = T.type_alias { T.all(Symbol, Lithic::Hold::Family) }
|
|
159
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
160
|
+
|
|
161
|
+
HOLD = T.let(:HOLD, Lithic::Hold::Family::TaggedSymbol)
|
|
162
|
+
|
|
163
|
+
sig { override.returns(T::Array[Lithic::Hold::Family::TaggedSymbol]) }
|
|
164
|
+
def self.values
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
module Result
|
|
169
|
+
extend Lithic::Internal::Type::Enum
|
|
170
|
+
|
|
171
|
+
TaggedSymbol = T.type_alias { T.all(Symbol, Lithic::Hold::Result) }
|
|
172
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
173
|
+
|
|
174
|
+
APPROVED = T.let(:APPROVED, Lithic::Hold::Result::TaggedSymbol)
|
|
175
|
+
DECLINED = T.let(:DECLINED, Lithic::Hold::Result::TaggedSymbol)
|
|
176
|
+
|
|
177
|
+
sig { override.returns(T::Array[Lithic::Hold::Result::TaggedSymbol]) }
|
|
178
|
+
def self.values
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
end
|
|
183
|
+
end
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Lithic
|
|
4
|
+
module Models
|
|
5
|
+
class HoldCreateParams < Lithic::Internal::Type::BaseModel
|
|
6
|
+
extend Lithic::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Lithic::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(Lithic::HoldCreateParams, Lithic::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :financial_account_token
|
|
16
|
+
|
|
17
|
+
# Amount to hold in cents
|
|
18
|
+
sig { returns(Integer) }
|
|
19
|
+
attr_accessor :amount
|
|
20
|
+
|
|
21
|
+
# Customer-provided token for idempotency. Becomes the hold token.
|
|
22
|
+
sig { returns(T.nilable(String)) }
|
|
23
|
+
attr_reader :token
|
|
24
|
+
|
|
25
|
+
sig { params(token: String).void }
|
|
26
|
+
attr_writer :token
|
|
27
|
+
|
|
28
|
+
# When the hold should auto-expire
|
|
29
|
+
sig { returns(T.nilable(Time)) }
|
|
30
|
+
attr_reader :expiration_datetime
|
|
31
|
+
|
|
32
|
+
sig { params(expiration_datetime: Time).void }
|
|
33
|
+
attr_writer :expiration_datetime
|
|
34
|
+
|
|
35
|
+
# Reason for the hold
|
|
36
|
+
sig { returns(T.nilable(String)) }
|
|
37
|
+
attr_accessor :memo
|
|
38
|
+
|
|
39
|
+
# User-provided identifier for the hold
|
|
40
|
+
sig { returns(T.nilable(String)) }
|
|
41
|
+
attr_reader :user_defined_id
|
|
42
|
+
|
|
43
|
+
sig { params(user_defined_id: String).void }
|
|
44
|
+
attr_writer :user_defined_id
|
|
45
|
+
|
|
46
|
+
sig do
|
|
47
|
+
params(
|
|
48
|
+
financial_account_token: String,
|
|
49
|
+
amount: Integer,
|
|
50
|
+
token: String,
|
|
51
|
+
expiration_datetime: Time,
|
|
52
|
+
memo: T.nilable(String),
|
|
53
|
+
user_defined_id: String,
|
|
54
|
+
request_options: Lithic::RequestOptions::OrHash
|
|
55
|
+
).returns(T.attached_class)
|
|
56
|
+
end
|
|
57
|
+
def self.new(
|
|
58
|
+
financial_account_token:,
|
|
59
|
+
# Amount to hold in cents
|
|
60
|
+
amount:,
|
|
61
|
+
# Customer-provided token for idempotency. Becomes the hold token.
|
|
62
|
+
token: nil,
|
|
63
|
+
# When the hold should auto-expire
|
|
64
|
+
expiration_datetime: nil,
|
|
65
|
+
# Reason for the hold
|
|
66
|
+
memo: nil,
|
|
67
|
+
# User-provided identifier for the hold
|
|
68
|
+
user_defined_id: nil,
|
|
69
|
+
request_options: {}
|
|
70
|
+
)
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
sig do
|
|
74
|
+
override.returns(
|
|
75
|
+
{
|
|
76
|
+
financial_account_token: String,
|
|
77
|
+
amount: Integer,
|
|
78
|
+
token: String,
|
|
79
|
+
expiration_datetime: Time,
|
|
80
|
+
memo: T.nilable(String),
|
|
81
|
+
user_defined_id: String,
|
|
82
|
+
request_options: Lithic::RequestOptions
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
end
|
|
86
|
+
def to_hash
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Lithic
|
|
4
|
+
module Models
|
|
5
|
+
class HoldEvent < Lithic::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias { T.any(Lithic::HoldEvent, Lithic::Internal::AnyHash) }
|
|
8
|
+
|
|
9
|
+
sig { returns(String) }
|
|
10
|
+
attr_accessor :token
|
|
11
|
+
|
|
12
|
+
# Amount in cents
|
|
13
|
+
sig { returns(Integer) }
|
|
14
|
+
attr_accessor :amount
|
|
15
|
+
|
|
16
|
+
sig { returns(Time) }
|
|
17
|
+
attr_accessor :created
|
|
18
|
+
|
|
19
|
+
sig { returns(T::Array[Lithic::HoldEvent::DetailedResult::TaggedSymbol]) }
|
|
20
|
+
attr_accessor :detailed_results
|
|
21
|
+
|
|
22
|
+
sig { returns(T.nilable(String)) }
|
|
23
|
+
attr_accessor :memo
|
|
24
|
+
|
|
25
|
+
sig { returns(Lithic::HoldEvent::Result::TaggedSymbol) }
|
|
26
|
+
attr_accessor :result
|
|
27
|
+
|
|
28
|
+
# Transaction token of the payment that settled this hold (only populated for
|
|
29
|
+
# HOLD_SETTLED events)
|
|
30
|
+
sig { returns(T.nilable(String)) }
|
|
31
|
+
attr_accessor :settling_transaction_token
|
|
32
|
+
|
|
33
|
+
# Type of hold lifecycle event
|
|
34
|
+
sig { returns(Lithic::HoldEvent::Type::TaggedSymbol) }
|
|
35
|
+
attr_accessor :type
|
|
36
|
+
|
|
37
|
+
# Event representing a lifecycle change to a hold
|
|
38
|
+
sig do
|
|
39
|
+
params(
|
|
40
|
+
token: String,
|
|
41
|
+
amount: Integer,
|
|
42
|
+
created: Time,
|
|
43
|
+
detailed_results:
|
|
44
|
+
T::Array[Lithic::HoldEvent::DetailedResult::OrSymbol],
|
|
45
|
+
memo: T.nilable(String),
|
|
46
|
+
result: Lithic::HoldEvent::Result::OrSymbol,
|
|
47
|
+
settling_transaction_token: T.nilable(String),
|
|
48
|
+
type: Lithic::HoldEvent::Type::OrSymbol
|
|
49
|
+
).returns(T.attached_class)
|
|
50
|
+
end
|
|
51
|
+
def self.new(
|
|
52
|
+
token:,
|
|
53
|
+
# Amount in cents
|
|
54
|
+
amount:,
|
|
55
|
+
created:,
|
|
56
|
+
detailed_results:,
|
|
57
|
+
memo:,
|
|
58
|
+
result:,
|
|
59
|
+
# Transaction token of the payment that settled this hold (only populated for
|
|
60
|
+
# HOLD_SETTLED events)
|
|
61
|
+
settling_transaction_token:,
|
|
62
|
+
# Type of hold lifecycle event
|
|
63
|
+
type:
|
|
64
|
+
)
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
sig do
|
|
68
|
+
override.returns(
|
|
69
|
+
{
|
|
70
|
+
token: String,
|
|
71
|
+
amount: Integer,
|
|
72
|
+
created: Time,
|
|
73
|
+
detailed_results:
|
|
74
|
+
T::Array[Lithic::HoldEvent::DetailedResult::TaggedSymbol],
|
|
75
|
+
memo: T.nilable(String),
|
|
76
|
+
result: Lithic::HoldEvent::Result::TaggedSymbol,
|
|
77
|
+
settling_transaction_token: T.nilable(String),
|
|
78
|
+
type: Lithic::HoldEvent::Type::TaggedSymbol
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
end
|
|
82
|
+
def to_hash
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
module DetailedResult
|
|
86
|
+
extend Lithic::Internal::Type::Enum
|
|
87
|
+
|
|
88
|
+
TaggedSymbol =
|
|
89
|
+
T.type_alias { T.all(Symbol, Lithic::HoldEvent::DetailedResult) }
|
|
90
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
91
|
+
|
|
92
|
+
APPROVED =
|
|
93
|
+
T.let(:APPROVED, Lithic::HoldEvent::DetailedResult::TaggedSymbol)
|
|
94
|
+
INSUFFICIENT_FUNDS =
|
|
95
|
+
T.let(
|
|
96
|
+
:INSUFFICIENT_FUNDS,
|
|
97
|
+
Lithic::HoldEvent::DetailedResult::TaggedSymbol
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
sig do
|
|
101
|
+
override.returns(
|
|
102
|
+
T::Array[Lithic::HoldEvent::DetailedResult::TaggedSymbol]
|
|
103
|
+
)
|
|
104
|
+
end
|
|
105
|
+
def self.values
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
module Result
|
|
110
|
+
extend Lithic::Internal::Type::Enum
|
|
111
|
+
|
|
112
|
+
TaggedSymbol = T.type_alias { T.all(Symbol, Lithic::HoldEvent::Result) }
|
|
113
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
114
|
+
|
|
115
|
+
APPROVED = T.let(:APPROVED, Lithic::HoldEvent::Result::TaggedSymbol)
|
|
116
|
+
DECLINED = T.let(:DECLINED, Lithic::HoldEvent::Result::TaggedSymbol)
|
|
117
|
+
|
|
118
|
+
sig do
|
|
119
|
+
override.returns(T::Array[Lithic::HoldEvent::Result::TaggedSymbol])
|
|
120
|
+
end
|
|
121
|
+
def self.values
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Type of hold lifecycle event
|
|
126
|
+
module Type
|
|
127
|
+
extend Lithic::Internal::Type::Enum
|
|
128
|
+
|
|
129
|
+
TaggedSymbol = T.type_alias { T.all(Symbol, Lithic::HoldEvent::Type) }
|
|
130
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
131
|
+
|
|
132
|
+
HOLD_INITIATED =
|
|
133
|
+
T.let(:HOLD_INITIATED, Lithic::HoldEvent::Type::TaggedSymbol)
|
|
134
|
+
HOLD_VOIDED = T.let(:HOLD_VOIDED, Lithic::HoldEvent::Type::TaggedSymbol)
|
|
135
|
+
HOLD_EXPIRED =
|
|
136
|
+
T.let(:HOLD_EXPIRED, Lithic::HoldEvent::Type::TaggedSymbol)
|
|
137
|
+
HOLD_SETTLED =
|
|
138
|
+
T.let(:HOLD_SETTLED, Lithic::HoldEvent::Type::TaggedSymbol)
|
|
139
|
+
|
|
140
|
+
sig do
|
|
141
|
+
override.returns(T::Array[Lithic::HoldEvent::Type::TaggedSymbol])
|
|
142
|
+
end
|
|
143
|
+
def self.values
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
end
|
|
147
|
+
end
|
|
148
|
+
end
|