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
@@ -179,6 +179,14 @@ module Lithic
179
179
  end
180
180
  attr_writer :individual
181
181
 
182
+ # Only present when user_type == "BUSINESS". 6-digit North American Industry
183
+ # Classification System (NAICS) code for the business.
184
+ sig { returns(T.nilable(String)) }
185
+ attr_reader :naics_code
186
+
187
+ sig { params(naics_code: String).void }
188
+ attr_writer :naics_code
189
+
182
190
  # Only present when user_type == "BUSINESS". User-submitted description of the
183
191
  # business.
184
192
  sig { returns(T.nilable(String)) }
@@ -257,8 +265,8 @@ module Lithic
257
265
  # attribute will be present.
258
266
  #
259
267
  # If the type is "BUSINESS" then the "business_entity", "control_person",
260
- # "beneficial_owner_individuals", "nature_of_business", and "website_url"
261
- # attributes will be present.
268
+ # "beneficial_owner_individuals", "naics_code", "nature_of_business", and
269
+ # "website_url" attributes will be present.
262
270
  sig do
263
271
  returns(
264
272
  T.nilable(
@@ -322,6 +330,7 @@ module Lithic
322
330
  external_id: String,
323
331
  individual:
324
332
  Lithic::Models::AccountHolderUpdateResponse::KYBKYCPatchResponse::Individual::OrHash,
333
+ naics_code: String,
325
334
  nature_of_business: String,
326
335
  phone_number: String,
327
336
  required_documents: T::Array[Lithic::RequiredDocument::OrHash],
@@ -386,6 +395,9 @@ module Lithic
386
395
  # Only present when user_type == "INDIVIDUAL". Information about the individual
387
396
  # for which the account is being opened and KYC is being run.
388
397
  individual: nil,
398
+ # Only present when user_type == "BUSINESS". 6-digit North American Industry
399
+ # Classification System (NAICS) code for the business.
400
+ naics_code: nil,
389
401
  # Only present when user_type == "BUSINESS". User-submitted description of the
390
402
  # business.
391
403
  nature_of_business: nil,
@@ -409,8 +421,8 @@ module Lithic
409
421
  # attribute will be present.
410
422
  #
411
423
  # If the type is "BUSINESS" then the "business_entity", "control_person",
412
- # "beneficial_owner_individuals", "nature_of_business", and "website_url"
413
- # attributes will be present.
424
+ # "beneficial_owner_individuals", "naics_code", "nature_of_business", and
425
+ # "website_url" attributes will be present.
414
426
  user_type: nil,
415
427
  # Information about the most recent identity verification attempt
416
428
  verification_application: nil,
@@ -440,6 +452,7 @@ module Lithic
440
452
  external_id: String,
441
453
  individual:
442
454
  Lithic::Models::AccountHolderUpdateResponse::KYBKYCPatchResponse::Individual,
455
+ naics_code: String,
443
456
  nature_of_business: String,
444
457
  phone_number: String,
445
458
  required_documents: T::Array[Lithic::RequiredDocument],
@@ -1298,8 +1311,8 @@ module Lithic
1298
1311
  # attribute will be present.
1299
1312
  #
1300
1313
  # If the type is "BUSINESS" then the "business_entity", "control_person",
1301
- # "beneficial_owner_individuals", "nature_of_business", and "website_url"
1302
- # attributes will be present.
1314
+ # "beneficial_owner_individuals", "naics_code", "nature_of_business", and
1315
+ # "website_url" attributes will be present.
1303
1316
  module UserType
1304
1317
  extend Lithic::Internal::Type::Enum
1305
1318
 
@@ -70,6 +70,14 @@ module Lithic
70
70
  sig { params(external_id: String).void }
71
71
  attr_writer :external_id
72
72
 
73
+ # 6-digit North American Industry Classification System (NAICS) code for the
74
+ # business. Only present if naics_code was included in the update request.
75
+ sig { returns(T.nilable(String)) }
76
+ attr_reader :naics_code
77
+
78
+ sig { params(naics_code: String).void }
79
+ attr_writer :naics_code
80
+
73
81
  # Short description of the company's line of business (i.e., what does the company
74
82
  # do?).
75
83
  sig { returns(T.nilable(String)) }
@@ -94,6 +102,7 @@ module Lithic
94
102
  event_type:
95
103
  Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::EventType::OrSymbol,
96
104
  external_id: String,
105
+ naics_code: String,
97
106
  nature_of_business: String,
98
107
  website_url: String
99
108
  ).returns(T.attached_class)
@@ -108,6 +117,9 @@ module Lithic
108
117
  # A user provided id that can be used to link an account holder with an external
109
118
  # system
110
119
  external_id: nil,
120
+ # 6-digit North American Industry Classification System (NAICS) code for the
121
+ # business. Only present if naics_code was included in the update request.
122
+ naics_code: nil,
111
123
  # Short description of the company's line of business (i.e., what does the company
112
124
  # do?).
113
125
  nature_of_business: nil,
@@ -125,6 +137,7 @@ module Lithic
125
137
  event_type:
126
138
  Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::EventType::TaggedSymbol,
127
139
  external_id: String,
140
+ naics_code: String,
128
141
  nature_of_business: String,
129
142
  website_url: String
130
143
  }
@@ -0,0 +1,296 @@
1
+ # typed: strong
2
+
3
+ module Lithic
4
+ module Models
5
+ AccountHolderEntity = AccountHolders::AccountHolderEntity
6
+
7
+ module AccountHolders
8
+ class AccountHolderEntity < Lithic::Internal::Type::BaseModel
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(
12
+ Lithic::AccountHolders::AccountHolderEntity,
13
+ Lithic::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ # Globally unique identifier for the entity
18
+ sig { returns(String) }
19
+ attr_accessor :token
20
+
21
+ # Globally unique identifier for the account holder
22
+ sig { returns(String) }
23
+ attr_accessor :account_holder_token
24
+
25
+ # Individual's current address
26
+ sig { returns(Lithic::AccountHolders::AccountHolderEntity::Address) }
27
+ attr_reader :address
28
+
29
+ sig do
30
+ params(
31
+ address:
32
+ Lithic::AccountHolders::AccountHolderEntity::Address::OrHash
33
+ ).void
34
+ end
35
+ attr_writer :address
36
+
37
+ # Individual's date of birth, as an RFC 3339 date
38
+ sig { returns(T.nilable(String)) }
39
+ attr_accessor :dob
40
+
41
+ # Individual's email address
42
+ sig { returns(T.nilable(String)) }
43
+ attr_accessor :email
44
+
45
+ # Individual's first name, as it appears on government-issued identity documents
46
+ sig { returns(T.nilable(String)) }
47
+ attr_accessor :first_name
48
+
49
+ # Individual's last name, as it appears on government-issued identity documents
50
+ sig { returns(T.nilable(String)) }
51
+ attr_accessor :last_name
52
+
53
+ # Individual's phone number, entered in E.164 format
54
+ sig { returns(T.nilable(String)) }
55
+ attr_accessor :phone_number
56
+
57
+ # The status of the entity
58
+ sig do
59
+ returns(
60
+ Lithic::AccountHolders::AccountHolderEntity::Status::TaggedSymbol
61
+ )
62
+ end
63
+ attr_accessor :status
64
+
65
+ # The type of entity
66
+ sig do
67
+ returns(
68
+ Lithic::AccountHolders::AccountHolderEntity::Type::TaggedSymbol
69
+ )
70
+ end
71
+ attr_accessor :type
72
+
73
+ # Information about an entity associated with an account holder
74
+ sig do
75
+ params(
76
+ token: String,
77
+ account_holder_token: String,
78
+ address:
79
+ Lithic::AccountHolders::AccountHolderEntity::Address::OrHash,
80
+ dob: T.nilable(String),
81
+ email: T.nilable(String),
82
+ first_name: T.nilable(String),
83
+ last_name: T.nilable(String),
84
+ phone_number: T.nilable(String),
85
+ status:
86
+ Lithic::AccountHolders::AccountHolderEntity::Status::OrSymbol,
87
+ type: Lithic::AccountHolders::AccountHolderEntity::Type::OrSymbol
88
+ ).returns(T.attached_class)
89
+ end
90
+ def self.new(
91
+ # Globally unique identifier for the entity
92
+ token:,
93
+ # Globally unique identifier for the account holder
94
+ account_holder_token:,
95
+ # Individual's current address
96
+ address:,
97
+ # Individual's date of birth, as an RFC 3339 date
98
+ dob:,
99
+ # Individual's email address
100
+ email:,
101
+ # Individual's first name, as it appears on government-issued identity documents
102
+ first_name:,
103
+ # Individual's last name, as it appears on government-issued identity documents
104
+ last_name:,
105
+ # Individual's phone number, entered in E.164 format
106
+ phone_number:,
107
+ # The status of the entity
108
+ status:,
109
+ # The type of entity
110
+ type:
111
+ )
112
+ end
113
+
114
+ sig do
115
+ override.returns(
116
+ {
117
+ token: String,
118
+ account_holder_token: String,
119
+ address: Lithic::AccountHolders::AccountHolderEntity::Address,
120
+ dob: T.nilable(String),
121
+ email: T.nilable(String),
122
+ first_name: T.nilable(String),
123
+ last_name: T.nilable(String),
124
+ phone_number: T.nilable(String),
125
+ status:
126
+ Lithic::AccountHolders::AccountHolderEntity::Status::TaggedSymbol,
127
+ type:
128
+ Lithic::AccountHolders::AccountHolderEntity::Type::TaggedSymbol
129
+ }
130
+ )
131
+ end
132
+ def to_hash
133
+ end
134
+
135
+ class Address < Lithic::Internal::Type::BaseModel
136
+ OrHash =
137
+ T.type_alias do
138
+ T.any(
139
+ Lithic::AccountHolders::AccountHolderEntity::Address,
140
+ Lithic::Internal::AnyHash
141
+ )
142
+ end
143
+
144
+ # Valid deliverable address (no PO boxes).
145
+ sig { returns(String) }
146
+ attr_accessor :address1
147
+
148
+ # Name of city.
149
+ sig { returns(String) }
150
+ attr_accessor :city
151
+
152
+ # Valid country code. Only USA is currently supported, entered in uppercase ISO
153
+ # 3166-1 alpha-3 three-character format.
154
+ sig { returns(String) }
155
+ attr_accessor :country
156
+
157
+ # Valid postal code. Only USA ZIP codes are currently supported, entered as a
158
+ # five-digit ZIP or nine-digit ZIP+4.
159
+ sig { returns(String) }
160
+ attr_accessor :postal_code
161
+
162
+ # Valid state code. Only USA state codes are currently supported, entered in
163
+ # uppercase ISO 3166-2 two-character format.
164
+ sig { returns(String) }
165
+ attr_accessor :state
166
+
167
+ # Unit or apartment number (if applicable).
168
+ sig { returns(T.nilable(String)) }
169
+ attr_reader :address2
170
+
171
+ sig { params(address2: String).void }
172
+ attr_writer :address2
173
+
174
+ # Individual's current address
175
+ sig do
176
+ params(
177
+ address1: String,
178
+ city: String,
179
+ country: String,
180
+ postal_code: String,
181
+ state: String,
182
+ address2: String
183
+ ).returns(T.attached_class)
184
+ end
185
+ def self.new(
186
+ # Valid deliverable address (no PO boxes).
187
+ address1:,
188
+ # Name of city.
189
+ city:,
190
+ # Valid country code. Only USA is currently supported, entered in uppercase ISO
191
+ # 3166-1 alpha-3 three-character format.
192
+ country:,
193
+ # Valid postal code. Only USA ZIP codes are currently supported, entered as a
194
+ # five-digit ZIP or nine-digit ZIP+4.
195
+ postal_code:,
196
+ # Valid state code. Only USA state codes are currently supported, entered in
197
+ # uppercase ISO 3166-2 two-character format.
198
+ state:,
199
+ # Unit or apartment number (if applicable).
200
+ address2: nil
201
+ )
202
+ end
203
+
204
+ sig do
205
+ override.returns(
206
+ {
207
+ address1: String,
208
+ city: String,
209
+ country: String,
210
+ postal_code: String,
211
+ state: String,
212
+ address2: String
213
+ }
214
+ )
215
+ end
216
+ def to_hash
217
+ end
218
+ end
219
+
220
+ # The status of the entity
221
+ module Status
222
+ extend Lithic::Internal::Type::Enum
223
+
224
+ TaggedSymbol =
225
+ T.type_alias do
226
+ T.all(Symbol, Lithic::AccountHolders::AccountHolderEntity::Status)
227
+ end
228
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
229
+
230
+ ACCEPTED =
231
+ T.let(
232
+ :ACCEPTED,
233
+ Lithic::AccountHolders::AccountHolderEntity::Status::TaggedSymbol
234
+ )
235
+ INACTIVE =
236
+ T.let(
237
+ :INACTIVE,
238
+ Lithic::AccountHolders::AccountHolderEntity::Status::TaggedSymbol
239
+ )
240
+ PENDING_REVIEW =
241
+ T.let(
242
+ :PENDING_REVIEW,
243
+ Lithic::AccountHolders::AccountHolderEntity::Status::TaggedSymbol
244
+ )
245
+ REJECTED =
246
+ T.let(
247
+ :REJECTED,
248
+ Lithic::AccountHolders::AccountHolderEntity::Status::TaggedSymbol
249
+ )
250
+
251
+ sig do
252
+ override.returns(
253
+ T::Array[
254
+ Lithic::AccountHolders::AccountHolderEntity::Status::TaggedSymbol
255
+ ]
256
+ )
257
+ end
258
+ def self.values
259
+ end
260
+ end
261
+
262
+ # The type of entity
263
+ module Type
264
+ extend Lithic::Internal::Type::Enum
265
+
266
+ TaggedSymbol =
267
+ T.type_alias do
268
+ T.all(Symbol, Lithic::AccountHolders::AccountHolderEntity::Type)
269
+ end
270
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
271
+
272
+ BENEFICIAL_OWNER_INDIVIDUAL =
273
+ T.let(
274
+ :BENEFICIAL_OWNER_INDIVIDUAL,
275
+ Lithic::AccountHolders::AccountHolderEntity::Type::TaggedSymbol
276
+ )
277
+ CONTROL_PERSON =
278
+ T.let(
279
+ :CONTROL_PERSON,
280
+ Lithic::AccountHolders::AccountHolderEntity::Type::TaggedSymbol
281
+ )
282
+
283
+ sig do
284
+ override.returns(
285
+ T::Array[
286
+ Lithic::AccountHolders::AccountHolderEntity::Type::TaggedSymbol
287
+ ]
288
+ )
289
+ end
290
+ def self.values
291
+ end
292
+ end
293
+ end
294
+ end
295
+ end
296
+ end
@@ -0,0 +1,242 @@
1
+ # typed: strong
2
+
3
+ module Lithic
4
+ module Models
5
+ module AccountHolders
6
+ class EntityCreateParams < Lithic::Internal::Type::BaseModel
7
+ extend Lithic::Internal::Type::RequestParameters::Converter
8
+ include Lithic::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Lithic::AccountHolders::EntityCreateParams,
14
+ Lithic::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ # Individual's current address - PO boxes, UPS drops, and FedEx drops are not
19
+ # acceptable; APO/FPO are acceptable. Only USA addresses are currently supported.
20
+ sig { returns(Lithic::AccountHolders::EntityCreateParams::Address) }
21
+ attr_reader :address
22
+
23
+ sig do
24
+ params(
25
+ address: Lithic::AccountHolders::EntityCreateParams::Address::OrHash
26
+ ).void
27
+ end
28
+ attr_writer :address
29
+
30
+ # Individual's date of birth, as an RFC 3339 date.
31
+ sig { returns(String) }
32
+ attr_accessor :dob
33
+
34
+ # Individual's email address. If utilizing Lithic for chargeback processing, this
35
+ # customer email address may be used to communicate dispute status and resolution.
36
+ sig { returns(String) }
37
+ attr_accessor :email
38
+
39
+ # Individual's first name, as it appears on government-issued identity documents.
40
+ sig { returns(String) }
41
+ attr_accessor :first_name
42
+
43
+ # Government-issued identification number (required for identity verification and
44
+ # compliance with banking regulations). Social Security Numbers (SSN) and
45
+ # Individual Taxpayer Identification Numbers (ITIN) are currently supported,
46
+ # entered as full nine-digits, with or without hyphens
47
+ sig { returns(String) }
48
+ attr_accessor :government_id
49
+
50
+ # Individual's last name, as it appears on government-issued identity documents.
51
+ sig { returns(String) }
52
+ attr_accessor :last_name
53
+
54
+ # Individual's phone number, entered in E.164 format.
55
+ sig { returns(String) }
56
+ attr_accessor :phone_number
57
+
58
+ # The type of entity to create on the account holder
59
+ sig do
60
+ returns(Lithic::AccountHolders::EntityCreateParams::Type::OrSymbol)
61
+ end
62
+ attr_accessor :type
63
+
64
+ sig do
65
+ params(
66
+ address:
67
+ Lithic::AccountHolders::EntityCreateParams::Address::OrHash,
68
+ dob: String,
69
+ email: String,
70
+ first_name: String,
71
+ government_id: String,
72
+ last_name: String,
73
+ phone_number: String,
74
+ type: Lithic::AccountHolders::EntityCreateParams::Type::OrSymbol,
75
+ request_options: Lithic::RequestOptions::OrHash
76
+ ).returns(T.attached_class)
77
+ end
78
+ def self.new(
79
+ # Individual's current address - PO boxes, UPS drops, and FedEx drops are not
80
+ # acceptable; APO/FPO are acceptable. Only USA addresses are currently supported.
81
+ address:,
82
+ # Individual's date of birth, as an RFC 3339 date.
83
+ dob:,
84
+ # Individual's email address. If utilizing Lithic for chargeback processing, this
85
+ # customer email address may be used to communicate dispute status and resolution.
86
+ email:,
87
+ # Individual's first name, as it appears on government-issued identity documents.
88
+ first_name:,
89
+ # Government-issued identification number (required for identity verification and
90
+ # compliance with banking regulations). Social Security Numbers (SSN) and
91
+ # Individual Taxpayer Identification Numbers (ITIN) are currently supported,
92
+ # entered as full nine-digits, with or without hyphens
93
+ government_id:,
94
+ # Individual's last name, as it appears on government-issued identity documents.
95
+ last_name:,
96
+ # Individual's phone number, entered in E.164 format.
97
+ phone_number:,
98
+ # The type of entity to create on the account holder
99
+ type:,
100
+ request_options: {}
101
+ )
102
+ end
103
+
104
+ sig do
105
+ override.returns(
106
+ {
107
+ address: Lithic::AccountHolders::EntityCreateParams::Address,
108
+ dob: String,
109
+ email: String,
110
+ first_name: String,
111
+ government_id: String,
112
+ last_name: String,
113
+ phone_number: String,
114
+ type: Lithic::AccountHolders::EntityCreateParams::Type::OrSymbol,
115
+ request_options: Lithic::RequestOptions
116
+ }
117
+ )
118
+ end
119
+ def to_hash
120
+ end
121
+
122
+ class Address < Lithic::Internal::Type::BaseModel
123
+ OrHash =
124
+ T.type_alias do
125
+ T.any(
126
+ Lithic::AccountHolders::EntityCreateParams::Address,
127
+ Lithic::Internal::AnyHash
128
+ )
129
+ end
130
+
131
+ # Valid deliverable address (no PO boxes).
132
+ sig { returns(String) }
133
+ attr_accessor :address1
134
+
135
+ # Name of city.
136
+ sig { returns(String) }
137
+ attr_accessor :city
138
+
139
+ # Valid country code. Only USA is currently supported, entered in uppercase ISO
140
+ # 3166-1 alpha-3 three-character format.
141
+ sig { returns(String) }
142
+ attr_accessor :country
143
+
144
+ # Valid postal code. Only USA ZIP codes are currently supported, entered as a
145
+ # five-digit ZIP or nine-digit ZIP+4.
146
+ sig { returns(String) }
147
+ attr_accessor :postal_code
148
+
149
+ # Valid state code. Only USA state codes are currently supported, entered in
150
+ # uppercase ISO 3166-2 two-character format.
151
+ sig { returns(String) }
152
+ attr_accessor :state
153
+
154
+ # Unit or apartment number (if applicable).
155
+ sig { returns(T.nilable(String)) }
156
+ attr_reader :address2
157
+
158
+ sig { params(address2: String).void }
159
+ attr_writer :address2
160
+
161
+ # Individual's current address - PO boxes, UPS drops, and FedEx drops are not
162
+ # acceptable; APO/FPO are acceptable. Only USA addresses are currently supported.
163
+ sig do
164
+ params(
165
+ address1: String,
166
+ city: String,
167
+ country: String,
168
+ postal_code: String,
169
+ state: String,
170
+ address2: String
171
+ ).returns(T.attached_class)
172
+ end
173
+ def self.new(
174
+ # Valid deliverable address (no PO boxes).
175
+ address1:,
176
+ # Name of city.
177
+ city:,
178
+ # Valid country code. Only USA is currently supported, entered in uppercase ISO
179
+ # 3166-1 alpha-3 three-character format.
180
+ country:,
181
+ # Valid postal code. Only USA ZIP codes are currently supported, entered as a
182
+ # five-digit ZIP or nine-digit ZIP+4.
183
+ postal_code:,
184
+ # Valid state code. Only USA state codes are currently supported, entered in
185
+ # uppercase ISO 3166-2 two-character format.
186
+ state:,
187
+ # Unit or apartment number (if applicable).
188
+ address2: nil
189
+ )
190
+ end
191
+
192
+ sig do
193
+ override.returns(
194
+ {
195
+ address1: String,
196
+ city: String,
197
+ country: String,
198
+ postal_code: String,
199
+ state: String,
200
+ address2: String
201
+ }
202
+ )
203
+ end
204
+ def to_hash
205
+ end
206
+ end
207
+
208
+ # The type of entity to create on the account holder
209
+ module Type
210
+ extend Lithic::Internal::Type::Enum
211
+
212
+ TaggedSymbol =
213
+ T.type_alias do
214
+ T.all(Symbol, Lithic::AccountHolders::EntityCreateParams::Type)
215
+ end
216
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
217
+
218
+ BENEFICIAL_OWNER_INDIVIDUAL =
219
+ T.let(
220
+ :BENEFICIAL_OWNER_INDIVIDUAL,
221
+ Lithic::AccountHolders::EntityCreateParams::Type::TaggedSymbol
222
+ )
223
+ CONTROL_PERSON =
224
+ T.let(
225
+ :CONTROL_PERSON,
226
+ Lithic::AccountHolders::EntityCreateParams::Type::TaggedSymbol
227
+ )
228
+
229
+ sig do
230
+ override.returns(
231
+ T::Array[
232
+ Lithic::AccountHolders::EntityCreateParams::Type::TaggedSymbol
233
+ ]
234
+ )
235
+ end
236
+ def self.values
237
+ end
238
+ end
239
+ end
240
+ end
241
+ end
242
+ end