lithic 0.4.0 → 0.6.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.
Files changed (149) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +59 -0
  3. data/README.md +10 -1
  4. data/lib/lithic/internal/transport/pooled_net_requester.rb +1 -1
  5. data/lib/lithic/internal/util.rb +1 -1
  6. data/lib/lithic/models/account_holder.rb +14 -5
  7. data/lib/lithic/models/account_holder_create_params.rb +10 -1
  8. data/lib/lithic/models/account_holder_simulate_enrollment_review_params.rb +1 -0
  9. data/lib/lithic/models/account_holder_simulate_enrollment_review_response.rb +14 -5
  10. data/lib/lithic/models/account_holder_update_params.rb +10 -1
  11. data/lib/lithic/models/account_holder_update_response.rb +14 -5
  12. data/lib/lithic/models/account_holder_updated_webhook_event.rb +10 -1
  13. data/lib/lithic/models/account_holders/account_holder_entity.rb +183 -0
  14. data/lib/lithic/models/account_holders/entity_create_params.rb +159 -0
  15. data/lib/lithic/models/account_holders/entity_create_response.rb +113 -0
  16. data/lib/lithic/models/account_holders/entity_delete_params.rb +22 -0
  17. data/lib/lithic/models/auth_rules/auth_rule.rb +6 -2
  18. data/lib/lithic/models/auth_rules/conditional_ach_action_parameters.rb +3 -3
  19. data/lib/lithic/models/auth_rules/conditional_block_parameters.rb +3 -0
  20. data/lib/lithic/models/auth_rules/conditional_tokenization_action_parameters.rb +47 -21
  21. data/lib/lithic/models/auth_rules/v2_create_params.rb +5 -2
  22. data/lib/lithic/models/auth_rules/v2_draft_params.rb +1 -0
  23. data/lib/lithic/models/auth_rules/v2_list_results_params.rb +70 -0
  24. data/lib/lithic/models/auth_rules/v2_list_results_response.rb +740 -0
  25. data/lib/lithic/models/book_transfer_create_params.rb +9 -1
  26. data/lib/lithic/models/card_authorization_approval_request_webhook_event.rb +178 -25
  27. data/lib/lithic/models/digital_wallet_tokenization_approval_request_webhook_event.rb +9 -9
  28. data/lib/lithic/models/financial_account.rb +1 -0
  29. data/lib/lithic/models/financial_account_update_status_params.rb +1 -0
  30. data/lib/lithic/models/financial_accounts/category_tier.rb +28 -0
  31. data/lib/lithic/models/financial_accounts/interest_tier_schedule.rb +50 -0
  32. data/lib/lithic/models/financial_accounts/interest_tier_schedule_create_params.rb +16 -0
  33. data/lib/lithic/models/financial_accounts/interest_tier_schedule_delete_params.rb +22 -0
  34. data/lib/lithic/models/financial_accounts/interest_tier_schedule_list_params.rb +40 -0
  35. data/lib/lithic/models/financial_accounts/interest_tier_schedule_retrieve_params.rb +22 -0
  36. data/lib/lithic/models/financial_accounts/interest_tier_schedule_update_params.rb +44 -0
  37. data/lib/lithic/models/financial_accounts/loan_tape.rb +1 -0
  38. data/lib/lithic/models/financial_accounts/loan_tape_configuration.rb +63 -0
  39. data/lib/lithic/models/financial_accounts/loan_tape_configuration_retrieve_params.rb +16 -0
  40. data/lib/lithic/models/financial_accounts/loan_tape_rebuild_configuration.rb +36 -0
  41. data/lib/lithic/models/financial_accounts/statement.rb +1 -0
  42. data/lib/lithic/models/kyb.rb +10 -1
  43. data/lib/lithic/models/parsed_webhook_event.rb +10 -1
  44. data/lib/lithic/models/{digital_wallet_token_metadata.rb → token_metadata.rb} +18 -19
  45. data/lib/lithic/models/tokenization_approval_request_webhook_event.rb +9 -9
  46. data/lib/lithic/models/tokenization_decisioning_request_webhook_event.rb +9 -9
  47. data/lib/lithic/models.rb +4 -2
  48. data/lib/lithic/resources/account_holders/entities.rb +89 -0
  49. data/lib/lithic/resources/account_holders.rb +10 -2
  50. data/lib/lithic/resources/auth_rules/v2.rb +42 -0
  51. data/lib/lithic/resources/book_transfers.rb +3 -1
  52. data/lib/lithic/resources/financial_accounts/interest_tier_schedule.rb +205 -0
  53. data/lib/lithic/resources/financial_accounts/loan_tape_configuration.rb +36 -0
  54. data/lib/lithic/resources/financial_accounts.rb +9 -0
  55. data/lib/lithic/version.rb +1 -1
  56. data/lib/lithic.rb +20 -1
  57. data/rbi/lithic/internal/util.rbi +1 -1
  58. data/rbi/lithic/models/account_holder.rbi +19 -6
  59. data/rbi/lithic/models/account_holder_create_params.rbi +13 -0
  60. data/rbi/lithic/models/account_holder_simulate_enrollment_review_params.rbi +5 -0
  61. data/rbi/lithic/models/account_holder_simulate_enrollment_review_response.rbi +19 -6
  62. data/rbi/lithic/models/account_holder_update_params.rbi +13 -0
  63. data/rbi/lithic/models/account_holder_update_response.rbi +19 -6
  64. data/rbi/lithic/models/account_holder_updated_webhook_event.rbi +13 -0
  65. data/rbi/lithic/models/account_holders/account_holder_entity.rbi +296 -0
  66. data/rbi/lithic/models/account_holders/entity_create_params.rbi +242 -0
  67. data/rbi/lithic/models/account_holders/entity_create_response.rbi +292 -0
  68. data/rbi/lithic/models/account_holders/entity_delete_params.rbi +43 -0
  69. data/rbi/lithic/models/auth_rules/auth_rule.rbi +6 -3
  70. data/rbi/lithic/models/auth_rules/conditional_ach_action_parameters.rbi +3 -3
  71. data/rbi/lithic/models/auth_rules/conditional_block_parameters.rbi +1 -0
  72. data/rbi/lithic/models/auth_rules/conditional_tokenization_action_parameters.rbi +69 -30
  73. data/rbi/lithic/models/auth_rules/v2_create_params.rbi +6 -3
  74. data/rbi/lithic/models/auth_rules/v2_list_results_params.rbi +112 -0
  75. data/rbi/lithic/models/auth_rules/v2_list_results_response.rbi +1826 -0
  76. data/rbi/lithic/models/book_transfer_create_params.rbi +11 -0
  77. data/rbi/lithic/models/card_authorization_approval_request_webhook_event.rbi +337 -36
  78. data/rbi/lithic/models/digital_wallet_tokenization_approval_request_webhook_event.rbi +15 -17
  79. data/rbi/lithic/models/financial_account.rbi +5 -0
  80. data/rbi/lithic/models/financial_account_update_status_params.rbi +5 -0
  81. data/rbi/lithic/models/financial_accounts/category_tier.rbi +45 -0
  82. data/rbi/lithic/models/financial_accounts/interest_tier_schedule.rbi +75 -0
  83. data/rbi/lithic/models/financial_accounts/interest_tier_schedule_create_params.rbi +32 -0
  84. data/rbi/lithic/models/financial_accounts/interest_tier_schedule_delete_params.rbi +43 -0
  85. data/rbi/lithic/models/financial_accounts/interest_tier_schedule_list_params.rbi +73 -0
  86. data/rbi/lithic/models/financial_accounts/interest_tier_schedule_retrieve_params.rbi +43 -0
  87. data/rbi/lithic/models/financial_accounts/interest_tier_schedule_update_params.rbi +70 -0
  88. data/rbi/lithic/models/financial_accounts/loan_tape.rbi +5 -0
  89. data/rbi/lithic/models/financial_accounts/loan_tape_configuration.rbi +99 -0
  90. data/rbi/lithic/models/financial_accounts/loan_tape_configuration_retrieve_params.rbi +32 -0
  91. data/rbi/lithic/models/financial_accounts/loan_tape_rebuild_configuration.rbi +65 -0
  92. data/rbi/lithic/models/financial_accounts/statement.rbi +5 -0
  93. data/rbi/lithic/models/kyb.rbi +13 -0
  94. data/rbi/lithic/models/parsed_webhook_event.rbi +13 -0
  95. data/rbi/lithic/models/{digital_wallet_token_metadata.rbi → token_metadata.rbi} +34 -41
  96. data/rbi/lithic/models/tokenization_approval_request_webhook_event.rbi +11 -17
  97. data/rbi/lithic/models/tokenization_decisioning_request_webhook_event.rbi +15 -17
  98. data/rbi/lithic/models.rbi +4 -2
  99. data/rbi/lithic/resources/account_holders/entities.rbi +80 -0
  100. data/rbi/lithic/resources/account_holders.rbi +11 -0
  101. data/rbi/lithic/resources/auth_rules/v2.rbi +44 -1
  102. data/rbi/lithic/resources/book_transfers.rbi +3 -0
  103. data/rbi/lithic/resources/financial_accounts/interest_tier_schedule.rbi +156 -0
  104. data/rbi/lithic/resources/financial_accounts/loan_tape_configuration.rbi +30 -0
  105. data/rbi/lithic/resources/financial_accounts.rbi +10 -0
  106. data/sig/lithic/models/account_holder.rbs +7 -0
  107. data/sig/lithic/models/account_holder_create_params.rbs +7 -0
  108. data/sig/lithic/models/account_holder_simulate_enrollment_review_params.rbs +2 -1
  109. data/sig/lithic/models/account_holder_simulate_enrollment_review_response.rbs +7 -0
  110. data/sig/lithic/models/account_holder_update_params.rbs +7 -0
  111. data/sig/lithic/models/account_holder_update_response.rbs +7 -0
  112. data/sig/lithic/models/account_holder_updated_webhook_event.rbs +7 -0
  113. data/sig/lithic/models/account_holders/account_holder_entity.rbs +137 -0
  114. data/sig/lithic/models/account_holders/entity_create_params.rbs +118 -0
  115. data/sig/lithic/models/account_holders/entity_create_response.rbs +117 -0
  116. data/sig/lithic/models/account_holders/entity_delete_params.rbs +26 -0
  117. data/sig/lithic/models/auth_rules/v2_list_results_params.rbs +65 -0
  118. data/sig/lithic/models/auth_rules/v2_list_results_response.rbs +752 -0
  119. data/sig/lithic/models/book_transfer_create_params.rbs +7 -0
  120. data/sig/lithic/models/card_authorization_approval_request_webhook_event.rbs +96 -0
  121. data/sig/lithic/models/digital_wallet_tokenization_approval_request_webhook_event.rbs +5 -9
  122. data/sig/lithic/models/financial_account.rbs +2 -0
  123. data/sig/lithic/models/financial_account_update_status_params.rbs +2 -0
  124. data/sig/lithic/models/financial_accounts/category_tier.rbs +21 -0
  125. data/sig/lithic/models/financial_accounts/interest_tier_schedule.rbs +41 -0
  126. data/sig/lithic/models/financial_accounts/interest_tier_schedule_create_params.rbs +17 -0
  127. data/sig/lithic/models/financial_accounts/interest_tier_schedule_delete_params.rbs +26 -0
  128. data/sig/lithic/models/financial_accounts/interest_tier_schedule_list_params.rbs +40 -0
  129. data/sig/lithic/models/financial_accounts/interest_tier_schedule_retrieve_params.rbs +26 -0
  130. data/sig/lithic/models/financial_accounts/interest_tier_schedule_update_params.rbs +38 -0
  131. data/sig/lithic/models/financial_accounts/loan_tape.rbs +2 -0
  132. data/sig/lithic/models/financial_accounts/loan_tape_configuration.rbs +60 -0
  133. data/sig/lithic/models/financial_accounts/loan_tape_configuration_retrieve_params.rbs +17 -0
  134. data/sig/lithic/models/financial_accounts/loan_tape_rebuild_configuration.rbs +32 -0
  135. data/sig/lithic/models/financial_accounts/statement.rbs +2 -0
  136. data/sig/lithic/models/kyb.rbs +7 -0
  137. data/sig/lithic/models/parsed_webhook_event.rbs +7 -0
  138. data/sig/lithic/models/{digital_wallet_token_metadata.rbs → token_metadata.rbs} +19 -17
  139. data/sig/lithic/models/tokenization_approval_request_webhook_event.rbs +5 -9
  140. data/sig/lithic/models/tokenization_decisioning_request_webhook_event.rbs +5 -9
  141. data/sig/lithic/models.rbs +4 -2
  142. data/sig/lithic/resources/account_holders/entities.rbs +28 -0
  143. data/sig/lithic/resources/account_holders.rbs +4 -0
  144. data/sig/lithic/resources/auth_rules/v2.rbs +10 -0
  145. data/sig/lithic/resources/book_transfers.rbs +1 -0
  146. data/sig/lithic/resources/financial_accounts/interest_tier_schedule.rbs +46 -0
  147. data/sig/lithic/resources/financial_accounts/loan_tape_configuration.rbs +14 -0
  148. data/sig/lithic/resources/financial_accounts.rbs +4 -0
  149. metadata +62 -5
@@ -0,0 +1,205 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lithic
4
+ module Resources
5
+ class FinancialAccounts
6
+ class InterestTierSchedule
7
+ # Some parameter documentations has been truncated, see
8
+ # {Lithic::Models::FinancialAccounts::InterestTierScheduleCreateParams} for more
9
+ # details.
10
+ #
11
+ # Create a new interest tier schedule entry for a supported financial account
12
+ #
13
+ # @overload create(financial_account_token, credit_product_token:, effective_date:, tier_name: nil, tier_rates: nil, request_options: {})
14
+ #
15
+ # @param financial_account_token [String] Globally unique identifier for financial account
16
+ #
17
+ # @param credit_product_token [String] Globally unique identifier for a credit product
18
+ #
19
+ # @param effective_date [Date] Date the tier should be effective in YYYY-MM-DD format
20
+ #
21
+ # @param tier_name [String] Name of a tier contained in the credit product. Mutually exclusive with tier_rat
22
+ #
23
+ # @param tier_rates [Object] Custom rates per category. Mutually exclusive with tier_name
24
+ #
25
+ # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
26
+ #
27
+ # @return [Lithic::Models::FinancialAccounts::FinancialAccountsInterestTierSchedule]
28
+ #
29
+ # @see Lithic::Models::FinancialAccounts::InterestTierScheduleCreateParams
30
+ def create(financial_account_token, params)
31
+ parsed, options = Lithic::FinancialAccounts::InterestTierScheduleCreateParams.dump_request(params)
32
+ @client.request(
33
+ method: :post,
34
+ path: ["v1/financial_accounts/%1$s/interest_tier_schedule", financial_account_token],
35
+ body: parsed,
36
+ model: Lithic::FinancialAccounts::FinancialAccountsInterestTierSchedule,
37
+ options: options
38
+ )
39
+ end
40
+
41
+ # Get a specific interest tier schedule by effective date
42
+ #
43
+ # @overload retrieve(effective_date, financial_account_token:, request_options: {})
44
+ #
45
+ # @param effective_date [Date] Effective date in ISO format (YYYY-MM-DD)
46
+ #
47
+ # @param financial_account_token [String] Globally unique identifier for financial account
48
+ #
49
+ # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
50
+ #
51
+ # @return [Lithic::Models::FinancialAccounts::FinancialAccountsInterestTierSchedule]
52
+ #
53
+ # @see Lithic::Models::FinancialAccounts::InterestTierScheduleRetrieveParams
54
+ def retrieve(effective_date, params)
55
+ parsed, options = Lithic::FinancialAccounts::InterestTierScheduleRetrieveParams.dump_request(params)
56
+ financial_account_token =
57
+ parsed.delete(:financial_account_token) do
58
+ raise ArgumentError.new("missing required path argument #{_1}")
59
+ end
60
+ @client.request(
61
+ method: :get,
62
+ path: [
63
+ "v1/financial_accounts/%1$s/interest_tier_schedule/%2$s",
64
+ financial_account_token,
65
+ effective_date
66
+ ],
67
+ model: Lithic::FinancialAccounts::FinancialAccountsInterestTierSchedule,
68
+ options: options
69
+ )
70
+ end
71
+
72
+ # Some parameter documentations has been truncated, see
73
+ # {Lithic::Models::FinancialAccounts::InterestTierScheduleUpdateParams} for more
74
+ # details.
75
+ #
76
+ # Update an existing interest tier schedule
77
+ #
78
+ # @overload update(effective_date, financial_account_token:, tier_name: nil, tier_rates: nil, request_options: {})
79
+ #
80
+ # @param effective_date [Date] Path param: Effective date in ISO format (YYYY-MM-DD)
81
+ #
82
+ # @param financial_account_token [String] Path param: Globally unique identifier for financial account
83
+ #
84
+ # @param tier_name [String] Body param: Name of a tier contained in the credit product. Mutually exclusive w
85
+ #
86
+ # @param tier_rates [Object] Body param: Custom rates per category. Mutually exclusive with tier_name
87
+ #
88
+ # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
89
+ #
90
+ # @return [Lithic::Models::FinancialAccounts::FinancialAccountsInterestTierSchedule]
91
+ #
92
+ # @see Lithic::Models::FinancialAccounts::InterestTierScheduleUpdateParams
93
+ def update(effective_date, params)
94
+ parsed, options = Lithic::FinancialAccounts::InterestTierScheduleUpdateParams.dump_request(params)
95
+ financial_account_token =
96
+ parsed.delete(:financial_account_token) do
97
+ raise ArgumentError.new("missing required path argument #{_1}")
98
+ end
99
+ @client.request(
100
+ method: :put,
101
+ path: [
102
+ "v1/financial_accounts/%1$s/interest_tier_schedule/%2$s",
103
+ financial_account_token,
104
+ effective_date
105
+ ],
106
+ body: parsed,
107
+ model: Lithic::FinancialAccounts::FinancialAccountsInterestTierSchedule,
108
+ options: options
109
+ )
110
+ end
111
+
112
+ # List interest tier schedules for a financial account with optional date
113
+ # filtering.
114
+ #
115
+ # If no date parameters are provided, returns all tier schedules. If date
116
+ # parameters are provided, uses filtering to return matching schedules (max 100).
117
+ #
118
+ # - for_date: Returns exact match (takes precedence over other dates)
119
+ # - before_date: Returns schedules with effective_date <= before_date
120
+ # - after_date: Returns schedules with effective_date >= after_date
121
+ # - Both before_date and after_date: Returns schedules in range
122
+ #
123
+ # @overload list(financial_account_token, after_date: nil, before_date: nil, for_date: nil, request_options: {})
124
+ #
125
+ # @param financial_account_token [String] Globally unique identifier for financial account
126
+ #
127
+ # @param after_date [Date] Return schedules with effective_date >= after_date (ISO format YYYY-MM-DD)
128
+ #
129
+ # @param before_date [Date] Return schedules with effective_date <= before_date (ISO format YYYY-MM-DD)
130
+ #
131
+ # @param for_date [Date] Return schedule with effective_date == for_date (ISO format YYYY-MM-DD)
132
+ #
133
+ # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
134
+ #
135
+ # @return [Lithic::Internal::SinglePage<Lithic::Models::FinancialAccounts::FinancialAccountsInterestTierSchedule>]
136
+ #
137
+ # @see Lithic::Models::FinancialAccounts::InterestTierScheduleListParams
138
+ def list(financial_account_token, params = {})
139
+ parsed, options = Lithic::FinancialAccounts::InterestTierScheduleListParams.dump_request(params)
140
+ @client.request(
141
+ method: :get,
142
+ path: ["v1/financial_accounts/%1$s/interest_tier_schedule", financial_account_token],
143
+ query: parsed,
144
+ page: Lithic::Internal::SinglePage,
145
+ model: Lithic::FinancialAccounts::FinancialAccountsInterestTierSchedule,
146
+ options: options
147
+ )
148
+ end
149
+
150
+ # Delete an interest tier schedule entry.
151
+ #
152
+ # Returns:
153
+ #
154
+ # - 400 Bad Request: Invalid effective_date format OR attempting to delete the
155
+ # earliest tier schedule entry for a non-PENDING account
156
+ # - 404 Not Found: Tier schedule entry not found for the given effective_date OR
157
+ # ledger account not found
158
+ #
159
+ # Note: PENDING accounts can delete the earliest tier schedule entry (account
160
+ # hasn't opened yet). Active/non-PENDING accounts cannot delete the earliest entry
161
+ # to prevent orphaning the account.
162
+ #
163
+ # If the deleted tier schedule has a past effective_date and the account is
164
+ # ACTIVE, the loan tape rebuild configuration will be updated to trigger rebuilds
165
+ # from that date.
166
+ #
167
+ # @overload delete(effective_date, financial_account_token:, request_options: {})
168
+ #
169
+ # @param effective_date [Date] Effective date in ISO format (YYYY-MM-DD)
170
+ #
171
+ # @param financial_account_token [String] Globally unique identifier for financial account
172
+ #
173
+ # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
174
+ #
175
+ # @return [nil]
176
+ #
177
+ # @see Lithic::Models::FinancialAccounts::InterestTierScheduleDeleteParams
178
+ def delete(effective_date, params)
179
+ parsed, options = Lithic::FinancialAccounts::InterestTierScheduleDeleteParams.dump_request(params)
180
+ financial_account_token =
181
+ parsed.delete(:financial_account_token) do
182
+ raise ArgumentError.new("missing required path argument #{_1}")
183
+ end
184
+ @client.request(
185
+ method: :delete,
186
+ path: [
187
+ "v1/financial_accounts/%1$s/interest_tier_schedule/%2$s",
188
+ financial_account_token,
189
+ effective_date
190
+ ],
191
+ model: NilClass,
192
+ options: options
193
+ )
194
+ end
195
+
196
+ # @api private
197
+ #
198
+ # @param client [Lithic::Client]
199
+ def initialize(client:)
200
+ @client = client
201
+ end
202
+ end
203
+ end
204
+ end
205
+ end
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lithic
4
+ module Resources
5
+ class FinancialAccounts
6
+ class LoanTapeConfiguration
7
+ # Get the loan tape configuration for a given financial account.
8
+ #
9
+ # @overload retrieve(financial_account_token, request_options: {})
10
+ #
11
+ # @param financial_account_token [String] Globally unique identifier for financial account.
12
+ #
13
+ # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
14
+ #
15
+ # @return [Lithic::Models::FinancialAccounts::FinancialAccountsLoanTapeConfiguration]
16
+ #
17
+ # @see Lithic::Models::FinancialAccounts::LoanTapeConfigurationRetrieveParams
18
+ def retrieve(financial_account_token, params = {})
19
+ @client.request(
20
+ method: :get,
21
+ path: ["v1/financial_accounts/%1$s/loan_tape_configuration", financial_account_token],
22
+ model: Lithic::FinancialAccounts::FinancialAccountsLoanTapeConfiguration,
23
+ options: params[:request_options]
24
+ )
25
+ end
26
+
27
+ # @api private
28
+ #
29
+ # @param client [Lithic::Client]
30
+ def initialize(client:)
31
+ @client = client
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -18,6 +18,12 @@ module Lithic
18
18
  # @return [Lithic::Resources::FinancialAccounts::LoanTapes]
19
19
  attr_reader :loan_tapes
20
20
 
21
+ # @return [Lithic::Resources::FinancialAccounts::LoanTapeConfiguration]
22
+ attr_reader :loan_tape_configuration
23
+
24
+ # @return [Lithic::Resources::FinancialAccounts::InterestTierSchedule]
25
+ attr_reader :interest_tier_schedule
26
+
21
27
  # Create a new financial account
22
28
  #
23
29
  # @overload create(nickname:, type:, account_token: nil, is_for_benefit_of: nil, idempotency_key: nil, request_options: {})
@@ -181,6 +187,9 @@ module Lithic
181
187
  @credit_configuration = Lithic::Resources::FinancialAccounts::CreditConfiguration.new(client: client)
182
188
  @statements = Lithic::Resources::FinancialAccounts::Statements.new(client: client)
183
189
  @loan_tapes = Lithic::Resources::FinancialAccounts::LoanTapes.new(client: client)
190
+ @loan_tape_configuration =
191
+ Lithic::Resources::FinancialAccounts::LoanTapeConfiguration.new(client: client)
192
+ @interest_tier_schedule = Lithic::Resources::FinancialAccounts::InterestTierSchedule.new(client: client)
184
193
  end
185
194
  end
186
195
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lithic
4
- VERSION = "0.4.0"
4
+ VERSION = "0.6.0"
5
5
  end
data/lib/lithic.rb CHANGED
@@ -65,6 +65,7 @@ require_relative "lithic/models/dispute"
65
65
  require_relative "lithic/models/external_bank_account"
66
66
  require_relative "lithic/models/external_payment"
67
67
  require_relative "lithic/models/financial_account"
68
+ require_relative "lithic/models/financial_accounts/interest_tier_schedule"
68
69
  require_relative "lithic/models/funding_event"
69
70
  require_relative "lithic/models/internal_transaction"
70
71
  require_relative "lithic/models/financial_accounts/loan_tape"
@@ -91,6 +92,10 @@ require_relative "lithic/models/account_holder_list_documents_response"
91
92
  require_relative "lithic/models/account_holder_list_params"
92
93
  require_relative "lithic/models/account_holder_retrieve_document_params"
93
94
  require_relative "lithic/models/account_holder_retrieve_params"
95
+ require_relative "lithic/models/account_holders/account_holder_entity"
96
+ require_relative "lithic/models/account_holders/entity_create_params"
97
+ require_relative "lithic/models/account_holders/entity_create_response"
98
+ require_relative "lithic/models/account_holders/entity_delete_params"
94
99
  require_relative "lithic/models/account_holder_simulate_enrollment_document_review_params"
95
100
  require_relative "lithic/models/account_holder_simulate_enrollment_review_params"
96
101
  require_relative "lithic/models/account_holder_simulate_enrollment_review_response"
@@ -127,6 +132,8 @@ require_relative "lithic/models/auth_rules/v2_create_params"
127
132
  require_relative "lithic/models/auth_rules/v2_delete_params"
128
133
  require_relative "lithic/models/auth_rules/v2_draft_params"
129
134
  require_relative "lithic/models/auth_rules/v2_list_params"
135
+ require_relative "lithic/models/auth_rules/v2_list_results_params"
136
+ require_relative "lithic/models/auth_rules/v2_list_results_response"
130
137
  require_relative "lithic/models/auth_rules/v2_promote_params"
131
138
  require_relative "lithic/models/auth_rules/v2_retrieve_features_params"
132
139
  require_relative "lithic/models/auth_rules/v2_retrieve_features_response"
@@ -207,7 +214,6 @@ require_relative "lithic/models/digital_wallet_tokenization_result_webhook_event
207
214
  require_relative "lithic/models/digital_wallet_tokenization_two_factor_authentication_code_sent_webhook_event"
208
215
  require_relative "lithic/models/digital_wallet_tokenization_two_factor_authentication_code_webhook_event"
209
216
  require_relative "lithic/models/digital_wallet_tokenization_updated_webhook_event"
210
- require_relative "lithic/models/digital_wallet_token_metadata"
211
217
  require_relative "lithic/models/dispute_create_params"
212
218
  require_relative "lithic/models/dispute_delete_evidence_params"
213
219
  require_relative "lithic/models/dispute_delete_params"
@@ -278,13 +284,22 @@ require_relative "lithic/models/financial_account_register_account_number_params
278
284
  require_relative "lithic/models/financial_account_retrieve_params"
279
285
  require_relative "lithic/models/financial_accounts/balance_list_params"
280
286
  require_relative "lithic/models/financial_accounts/category_balances"
287
+ require_relative "lithic/models/financial_accounts/category_tier"
281
288
  require_relative "lithic/models/financial_accounts/credit_configuration_retrieve_params"
282
289
  require_relative "lithic/models/financial_accounts/credit_configuration_update_params"
283
290
  require_relative "lithic/models/financial_accounts/financial_account_credit_config"
291
+ require_relative "lithic/models/financial_accounts/loan_tape_configuration"
284
292
  require_relative "lithic/models/financial_accounts/statements"
285
293
  require_relative "lithic/models/financial_accounts/financial_transaction_list_params"
286
294
  require_relative "lithic/models/financial_accounts/financial_transaction_retrieve_params"
295
+ require_relative "lithic/models/financial_accounts/interest_tier_schedule_create_params"
296
+ require_relative "lithic/models/financial_accounts/interest_tier_schedule_delete_params"
297
+ require_relative "lithic/models/financial_accounts/interest_tier_schedule_list_params"
298
+ require_relative "lithic/models/financial_accounts/interest_tier_schedule_retrieve_params"
299
+ require_relative "lithic/models/financial_accounts/interest_tier_schedule_update_params"
300
+ require_relative "lithic/models/financial_accounts/loan_tape_configuration_retrieve_params"
287
301
  require_relative "lithic/models/financial_accounts/loan_tape_list_params"
302
+ require_relative "lithic/models/financial_accounts/loan_tape_rebuild_configuration"
288
303
  require_relative "lithic/models/financial_accounts/loan_tape_retrieve_params"
289
304
  require_relative "lithic/models/financial_accounts/statement_list_params"
290
305
  require_relative "lithic/models/financial_accounts/statement_retrieve_params"
@@ -400,6 +415,7 @@ require_relative "lithic/models/tokenization_two_factor_authentication_code_webh
400
415
  require_relative "lithic/models/tokenization_unpause_params"
401
416
  require_relative "lithic/models/tokenization_update_digital_card_art_params"
402
417
  require_relative "lithic/models/tokenization_updated_webhook_event"
418
+ require_relative "lithic/models/token_metadata"
403
419
  require_relative "lithic/models/transaction_expire_authorization_params"
404
420
  require_relative "lithic/models/transaction_list_params"
405
421
  require_relative "lithic/models/transaction_retrieve_params"
@@ -431,6 +447,7 @@ require_relative "lithic/models/wire_party_details"
431
447
  require_relative "lithic/models"
432
448
  require_relative "lithic/resources/account_activity"
433
449
  require_relative "lithic/resources/account_holders"
450
+ require_relative "lithic/resources/account_holders/entities"
434
451
  require_relative "lithic/resources/accounts"
435
452
  require_relative "lithic/resources/auth_rules"
436
453
  require_relative "lithic/resources/auth_rules/v2"
@@ -459,6 +476,8 @@ require_relative "lithic/resources/financial_accounts"
459
476
  require_relative "lithic/resources/financial_accounts/balances"
460
477
  require_relative "lithic/resources/financial_accounts/credit_configuration"
461
478
  require_relative "lithic/resources/financial_accounts/financial_transactions"
479
+ require_relative "lithic/resources/financial_accounts/interest_tier_schedule"
480
+ require_relative "lithic/resources/financial_accounts/loan_tape_configuration"
462
481
  require_relative "lithic/resources/financial_accounts/loan_tapes"
463
482
  require_relative "lithic/resources/financial_accounts/statements"
464
483
  require_relative "lithic/resources/financial_accounts/statements/line_items"
@@ -296,7 +296,7 @@ module Lithic
296
296
  end
297
297
 
298
298
  JSON_CONTENT =
299
- T.let(%r{^application/(?:vnd(?:\.[^.]+)*\+)?json(?!l)}, Regexp)
299
+ T.let(%r{^application/(?:[a-zA-Z0-9.-]+\+)?json(?!l)}, Regexp)
300
300
  JSONL_CONTENT =
301
301
  T.let(%r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)}, Regexp)
302
302
 
@@ -133,6 +133,14 @@ module Lithic
133
133
  sig { params(individual: Lithic::AccountHolder::Individual::OrHash).void }
134
134
  attr_writer :individual
135
135
 
136
+ # Only present when user_type == "BUSINESS". 6-digit North American Industry
137
+ # Classification System (NAICS) code for the business.
138
+ sig { returns(T.nilable(String)) }
139
+ attr_reader :naics_code
140
+
141
+ sig { params(naics_code: String).void }
142
+ attr_writer :naics_code
143
+
136
144
  # Only present when user_type == "BUSINESS". User-submitted description of the
137
145
  # business.
138
146
  sig { returns(T.nilable(String)) }
@@ -195,8 +203,8 @@ module Lithic
195
203
 
196
204
  # The type of Account Holder. If the type is "INDIVIDUAL", the "individual"
197
205
  # attribute will be present. If the type is "BUSINESS" then the "business_entity",
198
- # "control_person", "beneficial_owner_individuals", "nature_of_business", and
199
- # "website_url" attributes will be present.
206
+ # "control_person", "beneficial_owner_individuals", "naics_code",
207
+ # "nature_of_business", and "website_url" attributes will be present.
200
208
  sig { returns(T.nilable(Lithic::AccountHolder::UserType::TaggedSymbol)) }
201
209
  attr_reader :user_type
202
210
 
@@ -238,6 +246,7 @@ module Lithic
238
246
  exemption_type: Lithic::AccountHolder::ExemptionType::OrSymbol,
239
247
  external_id: String,
240
248
  individual: Lithic::AccountHolder::Individual::OrHash,
249
+ naics_code: String,
241
250
  nature_of_business: String,
242
251
  phone_number: String,
243
252
  required_documents: T::Array[Lithic::RequiredDocument::OrHash],
@@ -292,6 +301,9 @@ module Lithic
292
301
  # Only present when user_type == "INDIVIDUAL". Information about the individual
293
302
  # for which the account is being opened and KYC is being run.
294
303
  individual: nil,
304
+ # Only present when user_type == "BUSINESS". 6-digit North American Industry
305
+ # Classification System (NAICS) code for the business.
306
+ naics_code: nil,
295
307
  # Only present when user_type == "BUSINESS". User-submitted description of the
296
308
  # business.
297
309
  nature_of_business: nil,
@@ -316,8 +328,8 @@ module Lithic
316
328
  status_reasons: nil,
317
329
  # The type of Account Holder. If the type is "INDIVIDUAL", the "individual"
318
330
  # attribute will be present. If the type is "BUSINESS" then the "business_entity",
319
- # "control_person", "beneficial_owner_individuals", "nature_of_business", and
320
- # "website_url" attributes will be present.
331
+ # "control_person", "beneficial_owner_individuals", "naics_code",
332
+ # "nature_of_business", and "website_url" attributes will be present.
321
333
  user_type: nil,
322
334
  # Information about the most recent identity verification attempt
323
335
  verification_application: nil,
@@ -343,6 +355,7 @@ module Lithic
343
355
  exemption_type: Lithic::AccountHolder::ExemptionType::TaggedSymbol,
344
356
  external_id: String,
345
357
  individual: Lithic::AccountHolder::Individual,
358
+ naics_code: String,
346
359
  nature_of_business: String,
347
360
  phone_number: String,
348
361
  required_documents: T::Array[Lithic::RequiredDocument],
@@ -959,8 +972,8 @@ module Lithic
959
972
 
960
973
  # The type of Account Holder. If the type is "INDIVIDUAL", the "individual"
961
974
  # attribute will be present. If the type is "BUSINESS" then the "business_entity",
962
- # "control_person", "beneficial_owner_individuals", "nature_of_business", and
963
- # "website_url" attributes will be present.
975
+ # "control_person", "beneficial_owner_individuals", "naics_code",
976
+ # "nature_of_business", and "website_url" attributes will be present.
964
977
  module UserType
965
978
  extend Lithic::Internal::Type::Enum
966
979
 
@@ -127,6 +127,14 @@ module Lithic
127
127
  sig { params(kyb_passed_timestamp: String).void }
128
128
  attr_writer :kyb_passed_timestamp
129
129
 
130
+ # 6-digit North American Industry Classification System (NAICS) code for the
131
+ # business.
132
+ sig { returns(T.nilable(String)) }
133
+ attr_reader :naics_code
134
+
135
+ sig { params(naics_code: String).void }
136
+ attr_writer :naics_code
137
+
130
138
  # Company website URL.
131
139
  sig { returns(T.nilable(String)) }
132
140
  attr_reader :website_url
@@ -222,6 +230,7 @@ module Lithic
222
230
  ],
223
231
  external_id: String,
224
232
  kyb_passed_timestamp: String,
233
+ naics_code: String,
225
234
  website_url: String,
226
235
  kyc_passed_timestamp: String,
227
236
  business_account_token: String,
@@ -282,6 +291,9 @@ module Lithic
282
291
  #
283
292
  # This field is required only if workflow type is `KYB_BYO`.
284
293
  kyb_passed_timestamp: nil,
294
+ # 6-digit North American Industry Classification System (NAICS) code for the
295
+ # business.
296
+ naics_code: nil,
285
297
  # Company website URL.
286
298
  website_url: nil,
287
299
  # An RFC 3339 timestamp indicating when precomputed KYC was completed on the
@@ -315,6 +327,7 @@ module Lithic
315
327
  ],
316
328
  external_id: String,
317
329
  kyb_passed_timestamp: String,
330
+ naics_code: String,
318
331
  website_url: String,
319
332
  individual: Lithic::AccountHolderCreateParams::Individual,
320
333
  kyc_passed_timestamp: String,
@@ -126,6 +126,11 @@ module Lithic
126
126
  :REJECTED,
127
127
  Lithic::AccountHolderSimulateEnrollmentReviewParams::Status::TaggedSymbol
128
128
  )
129
+ PENDING_REVIEW =
130
+ T.let(
131
+ :PENDING_REVIEW,
132
+ Lithic::AccountHolderSimulateEnrollmentReviewParams::Status::TaggedSymbol
133
+ )
129
134
 
130
135
  sig do
131
136
  override.returns(
@@ -167,6 +167,14 @@ module Lithic
167
167
  end
168
168
  attr_writer :individual
169
169
 
170
+ # Only present when user_type == "BUSINESS". 6-digit North American Industry
171
+ # Classification System (NAICS) code for the business.
172
+ sig { returns(T.nilable(String)) }
173
+ attr_reader :naics_code
174
+
175
+ sig { params(naics_code: String).void }
176
+ attr_writer :naics_code
177
+
170
178
  # Only present when user_type == "BUSINESS". User-submitted description of the
171
179
  # business.
172
180
  sig { returns(T.nilable(String)) }
@@ -245,8 +253,8 @@ module Lithic
245
253
  # attribute will be present.
246
254
  #
247
255
  # If the type is "BUSINESS" then the "business_entity", "control_person",
248
- # "beneficial_owner_individuals", "nature_of_business", and "website_url"
249
- # attributes will be present.
256
+ # "beneficial_owner_individuals", "naics_code", "nature_of_business", and
257
+ # "website_url" attributes will be present.
250
258
  sig do
251
259
  returns(
252
260
  T.nilable(
@@ -310,6 +318,7 @@ module Lithic
310
318
  external_id: String,
311
319
  individual:
312
320
  Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::Individual::OrHash,
321
+ naics_code: String,
313
322
  nature_of_business: String,
314
323
  phone_number: String,
315
324
  required_documents: T::Array[Lithic::RequiredDocument::OrHash],
@@ -374,6 +383,9 @@ module Lithic
374
383
  # Only present when user_type == "INDIVIDUAL". Information about the individual
375
384
  # for which the account is being opened and KYC is being run.
376
385
  individual: nil,
386
+ # Only present when user_type == "BUSINESS". 6-digit North American Industry
387
+ # Classification System (NAICS) code for the business.
388
+ naics_code: nil,
377
389
  # Only present when user_type == "BUSINESS". User-submitted description of the
378
390
  # business.
379
391
  nature_of_business: nil,
@@ -397,8 +409,8 @@ module Lithic
397
409
  # attribute will be present.
398
410
  #
399
411
  # If the type is "BUSINESS" then the "business_entity", "control_person",
400
- # "beneficial_owner_individuals", "nature_of_business", and "website_url"
401
- # attributes will be present.
412
+ # "beneficial_owner_individuals", "naics_code", "nature_of_business", and
413
+ # "website_url" attributes will be present.
402
414
  user_type: nil,
403
415
  # Information about the most recent identity verification attempt
404
416
  verification_application: nil,
@@ -428,6 +440,7 @@ module Lithic
428
440
  external_id: String,
429
441
  individual:
430
442
  Lithic::Models::AccountHolderSimulateEnrollmentReviewResponse::Individual,
443
+ naics_code: String,
431
444
  nature_of_business: String,
432
445
  phone_number: String,
433
446
  required_documents: T::Array[Lithic::RequiredDocument],
@@ -1286,8 +1299,8 @@ module Lithic
1286
1299
  # attribute will be present.
1287
1300
  #
1288
1301
  # If the type is "BUSINESS" then the "business_entity", "control_person",
1289
- # "beneficial_owner_individuals", "nature_of_business", and "website_url"
1290
- # attributes will be present.
1302
+ # "beneficial_owner_individuals", "naics_code", "nature_of_business", and
1303
+ # "website_url" attributes will be present.
1291
1304
  module UserType
1292
1305
  extend Lithic::Internal::Type::Enum
1293
1306
 
@@ -102,6 +102,14 @@ module Lithic
102
102
  sig { params(external_id: String).void }
103
103
  attr_writer :external_id
104
104
 
105
+ # 6-digit North American Industry Classification System (NAICS) code for the
106
+ # business.
107
+ sig { returns(T.nilable(String)) }
108
+ attr_reader :naics_code
109
+
110
+ sig { params(naics_code: String).void }
111
+ attr_writer :naics_code
112
+
105
113
  # Short description of the company's line of business (i.e., what does the company
106
114
  # do?).
107
115
  sig { returns(T.nilable(String)) }
@@ -198,6 +206,7 @@ module Lithic
198
206
  control_person:
199
207
  Lithic::AccountHolderUpdateParams::ControlPerson::OrHash,
200
208
  external_id: String,
209
+ naics_code: String,
201
210
  nature_of_business: String,
202
211
  website_url: String,
203
212
  individual: Lithic::AccountHolderUpdateParams::Individual::OrHash,
@@ -236,6 +245,9 @@ module Lithic
236
245
  # A user provided id that can be used to link an account holder with an external
237
246
  # system
238
247
  external_id: nil,
248
+ # 6-digit North American Industry Classification System (NAICS) code for the
249
+ # business.
250
+ naics_code: nil,
239
251
  # Short description of the company's line of business (i.e., what does the company
240
252
  # do?).
241
253
  nature_of_business: nil,
@@ -281,6 +293,7 @@ module Lithic
281
293
  business_entity: Lithic::AccountHolderUpdateParams::BusinessEntity,
282
294
  control_person: Lithic::AccountHolderUpdateParams::ControlPerson,
283
295
  external_id: String,
296
+ naics_code: String,
284
297
  nature_of_business: String,
285
298
  website_url: String,
286
299
  individual: Lithic::AccountHolderUpdateParams::Individual,