lithic 0.1.0 → 0.2.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 (186) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/README.md +36 -1
  4. data/lib/lithic/client.rb +4 -0
  5. data/lib/lithic/errors.rb +15 -0
  6. data/lib/lithic/models/account_holder_created_webhook_event.rb +75 -0
  7. data/lib/lithic/models/account_holder_document_updated_webhook_event.rb +191 -0
  8. data/lib/lithic/models/account_holder_updated_webhook_event.rb +702 -0
  9. data/lib/lithic/models/account_holder_verification_webhook_event.rb +69 -0
  10. data/lib/lithic/models/asa_request_webhook_event.rb +1010 -0
  11. data/lib/lithic/models/auth_rules_backtest_report_created_webhook_event.rb +16 -0
  12. data/lib/lithic/models/balance_updated_webhook_event.rb +23 -0
  13. data/lib/lithic/models/book_transfer_transaction_created_webhook_event.rb +18 -0
  14. data/lib/lithic/models/book_transfer_transaction_updated_webhook_event.rb +18 -0
  15. data/lib/lithic/models/card_converted_webhook_event.rb +24 -0
  16. data/lib/lithic/models/card_created_webhook_event.rb +32 -0
  17. data/lib/lithic/models/card_reissued_webhook_event.rb +24 -0
  18. data/lib/lithic/models/card_renewed_webhook_event.rb +56 -0
  19. data/lib/lithic/models/card_shipped_webhook_event.rb +70 -0
  20. data/lib/lithic/models/card_transaction_enhanced_data_created_webhook_event.rb +16 -0
  21. data/lib/lithic/models/card_transaction_enhanced_data_updated_webhook_event.rb +16 -0
  22. data/lib/lithic/models/card_transaction_updated_webhook_event.rb +16 -0
  23. data/lib/lithic/models/digital_wallet_tokenization_approval_request_webhook_event.rb +253 -0
  24. data/lib/lithic/models/digital_wallet_tokenization_result_webhook_event.rb +145 -0
  25. data/lib/lithic/models/digital_wallet_tokenization_two_factor_authentication_code_sent_webhook_event.rb +100 -0
  26. data/lib/lithic/models/digital_wallet_tokenization_two_factor_authentication_code_webhook_event.rb +108 -0
  27. data/lib/lithic/models/digital_wallet_tokenization_updated_webhook_event.rb +47 -0
  28. data/lib/lithic/models/dispute_evidence_upload_failed_webhook_event.rb +18 -0
  29. data/lib/lithic/models/dispute_transaction_created_webhook_event.rb +18 -0
  30. data/lib/lithic/models/dispute_transaction_updated_webhook_event.rb +18 -0
  31. data/lib/lithic/models/dispute_updated_webhook_event.rb +18 -0
  32. data/lib/lithic/models/external_bank_account_created_webhook_event.rb +16 -0
  33. data/lib/lithic/models/external_bank_account_updated_webhook_event.rb +16 -0
  34. data/lib/lithic/models/external_payment_created_webhook_event.rb +16 -0
  35. data/lib/lithic/models/external_payment_updated_webhook_event.rb +16 -0
  36. data/lib/lithic/models/financial_account_created_webhook_event.rb +16 -0
  37. data/lib/lithic/models/financial_account_updated_webhook_event.rb +16 -0
  38. data/lib/lithic/models/funding_event_created_webhook_event.rb +16 -0
  39. data/lib/lithic/models/internal_transaction_created_webhook_event.rb +16 -0
  40. data/lib/lithic/models/internal_transaction_updated_webhook_event.rb +16 -0
  41. data/lib/lithic/models/loan_tape_created_webhook_event.rb +16 -0
  42. data/lib/lithic/models/loan_tape_updated_webhook_event.rb +16 -0
  43. data/lib/lithic/models/management_operation_created_webhook_event.rb +16 -0
  44. data/lib/lithic/models/management_operation_updated_webhook_event.rb +16 -0
  45. data/lib/lithic/models/network_total_created_webhook_event.rb +16 -0
  46. data/lib/lithic/models/network_total_updated_webhook_event.rb +16 -0
  47. data/lib/lithic/models/parsed_webhook_event.rb +818 -0
  48. data/lib/lithic/models/payment_transaction_created_webhook_event.rb +18 -0
  49. data/lib/lithic/models/payment_transaction_updated_webhook_event.rb +18 -0
  50. data/lib/lithic/models/settlement_report_updated_webhook_event.rb +16 -0
  51. data/lib/lithic/models/statements_created_webhook_event.rb +16 -0
  52. data/lib/lithic/models/three_ds_authentication_challenge_webhook_event.rb +89 -0
  53. data/lib/lithic/models/three_ds_authentication_created_webhook_event.rb +18 -0
  54. data/lib/lithic/models/three_ds_authentication_updated_webhook_event.rb +18 -0
  55. data/lib/lithic/models/tokenization_approval_request_webhook_event.rb +249 -0
  56. data/lib/lithic/models/tokenization_decisioning_request_webhook_event.rb +159 -0
  57. data/lib/lithic/models/tokenization_result_webhook_event.rb +141 -0
  58. data/lib/lithic/models/tokenization_two_factor_authentication_code_sent_webhook_event.rb +100 -0
  59. data/lib/lithic/models/tokenization_two_factor_authentication_code_webhook_event.rb +108 -0
  60. data/lib/lithic/models/tokenization_updated_webhook_event.rb +47 -0
  61. data/lib/lithic/models/webhook_parsed_params.rb +14 -0
  62. data/lib/lithic/models.rb +120 -0
  63. data/lib/lithic/resources/webhooks.rb +87 -0
  64. data/lib/lithic/version.rb +1 -1
  65. data/lib/lithic.rb +74 -17
  66. data/rbi/lithic/client.rbi +3 -0
  67. data/rbi/lithic/models/account_holder_created_webhook_event.rbi +149 -0
  68. data/rbi/lithic/models/account_holder_document_updated_webhook_event.rbi +479 -0
  69. data/rbi/lithic/models/account_holder_updated_webhook_event.rbi +1274 -0
  70. data/rbi/lithic/models/account_holder_verification_webhook_event.rbi +143 -0
  71. data/rbi/lithic/models/asa_request_webhook_event.rbi +2229 -0
  72. data/rbi/lithic/models/auth_rules_backtest_report_created_webhook_event.rbi +30 -0
  73. data/rbi/lithic/models/balance_updated_webhook_event.rbi +43 -0
  74. data/rbi/lithic/models/book_transfer_transaction_created_webhook_event.rbi +31 -0
  75. data/rbi/lithic/models/book_transfer_transaction_updated_webhook_event.rbi +31 -0
  76. data/rbi/lithic/models/card_converted_webhook_event.rbi +35 -0
  77. data/rbi/lithic/models/card_created_webhook_event.rbi +53 -0
  78. data/rbi/lithic/models/card_reissued_webhook_event.rbi +38 -0
  79. data/rbi/lithic/models/card_renewed_webhook_event.rbi +92 -0
  80. data/rbi/lithic/models/card_shipped_webhook_event.rbi +150 -0
  81. data/rbi/lithic/models/card_transaction_enhanced_data_created_webhook_event.rbi +30 -0
  82. data/rbi/lithic/models/card_transaction_enhanced_data_updated_webhook_event.rbi +30 -0
  83. data/rbi/lithic/models/card_transaction_updated_webhook_event.rbi +30 -0
  84. data/rbi/lithic/models/digital_wallet_token_metadata.rbi +2 -2
  85. data/rbi/lithic/models/digital_wallet_tokenization_approval_request_webhook_event.rbi +548 -0
  86. data/rbi/lithic/models/digital_wallet_tokenization_result_webhook_event.rbi +295 -0
  87. data/rbi/lithic/models/digital_wallet_tokenization_two_factor_authentication_code_sent_webhook_event.rbi +186 -0
  88. data/rbi/lithic/models/digital_wallet_tokenization_two_factor_authentication_code_webhook_event.rbi +194 -0
  89. data/rbi/lithic/models/digital_wallet_tokenization_updated_webhook_event.rbi +73 -0
  90. data/rbi/lithic/models/dispute_evidence_upload_failed_webhook_event.rbi +31 -0
  91. data/rbi/lithic/models/dispute_transaction_created_webhook_event.rbi +31 -0
  92. data/rbi/lithic/models/dispute_transaction_updated_webhook_event.rbi +31 -0
  93. data/rbi/lithic/models/dispute_updated_webhook_event.rbi +28 -0
  94. data/rbi/lithic/models/external_bank_account_created_webhook_event.rbi +30 -0
  95. data/rbi/lithic/models/external_bank_account_updated_webhook_event.rbi +30 -0
  96. data/rbi/lithic/models/external_payment_created_webhook_event.rbi +30 -0
  97. data/rbi/lithic/models/external_payment_updated_webhook_event.rbi +30 -0
  98. data/rbi/lithic/models/financial_account_created_webhook_event.rbi +30 -0
  99. data/rbi/lithic/models/financial_account_updated_webhook_event.rbi +30 -0
  100. data/rbi/lithic/models/funding_event_created_webhook_event.rbi +30 -0
  101. data/rbi/lithic/models/internal_transaction.rbi +15 -10
  102. data/rbi/lithic/models/internal_transaction_created_webhook_event.rbi +30 -0
  103. data/rbi/lithic/models/internal_transaction_updated_webhook_event.rbi +30 -0
  104. data/rbi/lithic/models/loan_tape_created_webhook_event.rbi +27 -0
  105. data/rbi/lithic/models/loan_tape_updated_webhook_event.rbi +27 -0
  106. data/rbi/lithic/models/management_operation_created_webhook_event.rbi +30 -0
  107. data/rbi/lithic/models/management_operation_updated_webhook_event.rbi +30 -0
  108. data/rbi/lithic/models/network_total_created_webhook_event.rbi +30 -0
  109. data/rbi/lithic/models/network_total_updated_webhook_event.rbi +30 -0
  110. data/rbi/lithic/models/parsed_webhook_event.rbi +1310 -0
  111. data/rbi/lithic/models/payment_transaction_created_webhook_event.rbi +31 -0
  112. data/rbi/lithic/models/payment_transaction_updated_webhook_event.rbi +31 -0
  113. data/rbi/lithic/models/settlement_report_updated_webhook_event.rbi +30 -0
  114. data/rbi/lithic/models/statements_created_webhook_event.rbi +30 -0
  115. data/rbi/lithic/models/three_ds_authentication_challenge_webhook_event.rbi +175 -0
  116. data/rbi/lithic/models/three_ds_authentication_created_webhook_event.rbi +31 -0
  117. data/rbi/lithic/models/three_ds_authentication_updated_webhook_event.rbi +31 -0
  118. data/rbi/lithic/models/tokenization_approval_request_webhook_event.rbi +548 -0
  119. data/rbi/lithic/models/tokenization_decisioning_request_webhook_event.rbi +333 -0
  120. data/rbi/lithic/models/tokenization_result_webhook_event.rbi +295 -0
  121. data/rbi/lithic/models/tokenization_two_factor_authentication_code_sent_webhook_event.rbi +186 -0
  122. data/rbi/lithic/models/tokenization_two_factor_authentication_code_webhook_event.rbi +194 -0
  123. data/rbi/lithic/models/tokenization_updated_webhook_event.rbi +73 -0
  124. data/rbi/lithic/models/webhook_parsed_params.rbi +27 -0
  125. data/rbi/lithic/models.rbi +155 -0
  126. data/rbi/lithic/resources/webhooks.rbi +158 -0
  127. data/sig/lithic/client.rbs +2 -0
  128. data/sig/lithic/models/account_holder_created_webhook_event.rbs +77 -0
  129. data/sig/lithic/models/account_holder_document_updated_webhook_event.rbs +219 -0
  130. data/sig/lithic/models/account_holder_updated_webhook_event.rbs +587 -0
  131. data/sig/lithic/models/account_holder_verification_webhook_event.rbs +69 -0
  132. data/sig/lithic/models/asa_request_webhook_event.rbs +881 -0
  133. data/sig/lithic/models/auth_rules_backtest_report_created_webhook_event.rbs +20 -0
  134. data/sig/lithic/models/balance_updated_webhook_event.rbs +25 -0
  135. data/sig/lithic/models/book_transfer_transaction_created_webhook_event.rbs +20 -0
  136. data/sig/lithic/models/book_transfer_transaction_updated_webhook_event.rbs +20 -0
  137. data/sig/lithic/models/card_converted_webhook_event.rbs +19 -0
  138. data/sig/lithic/models/card_created_webhook_event.rbs +30 -0
  139. data/sig/lithic/models/card_reissued_webhook_event.rbs +21 -0
  140. data/sig/lithic/models/card_renewed_webhook_event.rbs +55 -0
  141. data/sig/lithic/models/card_shipped_webhook_event.rbs +71 -0
  142. data/sig/lithic/models/card_transaction_enhanced_data_created_webhook_event.rbs +20 -0
  143. data/sig/lithic/models/card_transaction_enhanced_data_updated_webhook_event.rbs +20 -0
  144. data/sig/lithic/models/card_transaction_updated_webhook_event.rbs +18 -0
  145. data/sig/lithic/models/digital_wallet_tokenization_approval_request_webhook_event.rbs +223 -0
  146. data/sig/lithic/models/digital_wallet_tokenization_result_webhook_event.rbs +133 -0
  147. data/sig/lithic/models/digital_wallet_tokenization_two_factor_authentication_code_sent_webhook_event.rbs +78 -0
  148. data/sig/lithic/models/digital_wallet_tokenization_two_factor_authentication_code_webhook_event.rbs +83 -0
  149. data/sig/lithic/models/digital_wallet_tokenization_updated_webhook_event.rbs +40 -0
  150. data/sig/lithic/models/dispute_evidence_upload_failed_webhook_event.rbs +18 -0
  151. data/sig/lithic/models/dispute_transaction_created_webhook_event.rbs +18 -0
  152. data/sig/lithic/models/dispute_transaction_updated_webhook_event.rbs +18 -0
  153. data/sig/lithic/models/dispute_updated_webhook_event.rbs +15 -0
  154. data/sig/lithic/models/external_bank_account_created_webhook_event.rbs +18 -0
  155. data/sig/lithic/models/external_bank_account_updated_webhook_event.rbs +18 -0
  156. data/sig/lithic/models/external_payment_created_webhook_event.rbs +18 -0
  157. data/sig/lithic/models/external_payment_updated_webhook_event.rbs +18 -0
  158. data/sig/lithic/models/financial_account_created_webhook_event.rbs +18 -0
  159. data/sig/lithic/models/financial_account_updated_webhook_event.rbs +18 -0
  160. data/sig/lithic/models/funding_event_created_webhook_event.rbs +16 -0
  161. data/sig/lithic/models/internal_transaction_created_webhook_event.rbs +18 -0
  162. data/sig/lithic/models/internal_transaction_updated_webhook_event.rbs +18 -0
  163. data/sig/lithic/models/loan_tape_created_webhook_event.rbs +15 -0
  164. data/sig/lithic/models/loan_tape_updated_webhook_event.rbs +15 -0
  165. data/sig/lithic/models/management_operation_created_webhook_event.rbs +18 -0
  166. data/sig/lithic/models/management_operation_updated_webhook_event.rbs +18 -0
  167. data/sig/lithic/models/network_total_created_webhook_event.rbs +16 -0
  168. data/sig/lithic/models/network_total_updated_webhook_event.rbs +16 -0
  169. data/sig/lithic/models/parsed_webhook_event.rbs +641 -0
  170. data/sig/lithic/models/payment_transaction_created_webhook_event.rbs +18 -0
  171. data/sig/lithic/models/payment_transaction_updated_webhook_event.rbs +18 -0
  172. data/sig/lithic/models/settlement_report_updated_webhook_event.rbs +18 -0
  173. data/sig/lithic/models/statements_created_webhook_event.rbs +16 -0
  174. data/sig/lithic/models/three_ds_authentication_challenge_webhook_event.rbs +72 -0
  175. data/sig/lithic/models/three_ds_authentication_created_webhook_event.rbs +18 -0
  176. data/sig/lithic/models/three_ds_authentication_updated_webhook_event.rbs +18 -0
  177. data/sig/lithic/models/tokenization_approval_request_webhook_event.rbs +223 -0
  178. data/sig/lithic/models/tokenization_decisioning_request_webhook_event.rbs +134 -0
  179. data/sig/lithic/models/tokenization_result_webhook_event.rbs +133 -0
  180. data/sig/lithic/models/tokenization_two_factor_authentication_code_sent_webhook_event.rbs +78 -0
  181. data/sig/lithic/models/tokenization_two_factor_authentication_code_webhook_event.rbs +83 -0
  182. data/sig/lithic/models/tokenization_updated_webhook_event.rbs +40 -0
  183. data/sig/lithic/models/webhook_parsed_params.rbs +15 -0
  184. data/sig/lithic/models.rbs +112 -0
  185. data/sig/lithic/resources/webhooks.rbs +135 -0
  186. metadata +173 -2
@@ -0,0 +1,1274 @@
1
+ # typed: strong
2
+
3
+ module Lithic
4
+ module Models
5
+ # KYB payload for an updated account holder.
6
+ module AccountHolderUpdatedWebhookEvent
7
+ extend Lithic::Internal::Type::Union
8
+
9
+ Variants =
10
+ T.type_alias do
11
+ T.any(
12
+ Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload,
13
+ Lithic::AccountHolderUpdatedWebhookEvent::KYCPayload,
14
+ Lithic::AccountHolderUpdatedWebhookEvent::LegacyPayload
15
+ )
16
+ end
17
+
18
+ class KYBPayload < Lithic::Internal::Type::BaseModel
19
+ OrHash =
20
+ T.type_alias do
21
+ T.any(
22
+ Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload,
23
+ Lithic::Internal::AnyHash
24
+ )
25
+ end
26
+
27
+ # The token of the account_holder that was created.
28
+ sig { returns(String) }
29
+ attr_accessor :token
30
+
31
+ # Original request to update the account holder.
32
+ sig do
33
+ returns(
34
+ Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::UpdateRequest
35
+ )
36
+ end
37
+ attr_reader :update_request
38
+
39
+ sig do
40
+ params(
41
+ update_request:
42
+ Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::UpdateRequest::OrHash
43
+ ).void
44
+ end
45
+ attr_writer :update_request
46
+
47
+ # The type of event that occurred.
48
+ sig do
49
+ returns(
50
+ T.nilable(
51
+ Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::EventType::TaggedSymbol
52
+ )
53
+ )
54
+ end
55
+ attr_reader :event_type
56
+
57
+ sig do
58
+ params(
59
+ event_type:
60
+ Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::EventType::OrSymbol
61
+ ).void
62
+ end
63
+ attr_writer :event_type
64
+
65
+ # A user provided id that can be used to link an account holder with an external
66
+ # system
67
+ sig { returns(T.nilable(String)) }
68
+ attr_reader :external_id
69
+
70
+ sig { params(external_id: String).void }
71
+ attr_writer :external_id
72
+
73
+ # Short description of the company's line of business (i.e., what does the company
74
+ # do?).
75
+ sig { returns(T.nilable(String)) }
76
+ attr_reader :nature_of_business
77
+
78
+ sig { params(nature_of_business: String).void }
79
+ attr_writer :nature_of_business
80
+
81
+ # Company website URL.
82
+ sig { returns(T.nilable(String)) }
83
+ attr_reader :website_url
84
+
85
+ sig { params(website_url: String).void }
86
+ attr_writer :website_url
87
+
88
+ # KYB payload for an updated account holder.
89
+ sig do
90
+ params(
91
+ token: String,
92
+ update_request:
93
+ Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::UpdateRequest::OrHash,
94
+ event_type:
95
+ Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::EventType::OrSymbol,
96
+ external_id: String,
97
+ nature_of_business: String,
98
+ website_url: String
99
+ ).returns(T.attached_class)
100
+ end
101
+ def self.new(
102
+ # The token of the account_holder that was created.
103
+ token:,
104
+ # Original request to update the account holder.
105
+ update_request:,
106
+ # The type of event that occurred.
107
+ event_type: nil,
108
+ # A user provided id that can be used to link an account holder with an external
109
+ # system
110
+ external_id: nil,
111
+ # Short description of the company's line of business (i.e., what does the company
112
+ # do?).
113
+ nature_of_business: nil,
114
+ # Company website URL.
115
+ website_url: nil
116
+ )
117
+ end
118
+
119
+ sig do
120
+ override.returns(
121
+ {
122
+ token: String,
123
+ update_request:
124
+ Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::UpdateRequest,
125
+ event_type:
126
+ Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::EventType::TaggedSymbol,
127
+ external_id: String,
128
+ nature_of_business: String,
129
+ website_url: String
130
+ }
131
+ )
132
+ end
133
+ def to_hash
134
+ end
135
+
136
+ class UpdateRequest < Lithic::Internal::Type::BaseModel
137
+ OrHash =
138
+ T.type_alias do
139
+ T.any(
140
+ Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::UpdateRequest,
141
+ Lithic::Internal::AnyHash
142
+ )
143
+ end
144
+
145
+ # Deprecated.
146
+ sig { returns(T.nilable(T::Array[Lithic::KYBBusinessEntity])) }
147
+ attr_reader :beneficial_owner_entities
148
+
149
+ sig do
150
+ params(
151
+ beneficial_owner_entities:
152
+ T::Array[Lithic::KYBBusinessEntity::OrHash]
153
+ ).void
154
+ end
155
+ attr_writer :beneficial_owner_entities
156
+
157
+ # You must submit a list of all direct and indirect individuals with 25% or more
158
+ # ownership in the company. A maximum of 4 beneficial owners can be submitted. If
159
+ # no individual owns 25% of the company you do not need to send beneficial owner
160
+ # information. See
161
+ # [FinCEN requirements](https://www.fincen.gov/sites/default/files/shared/CDD_Rev6.7_Sept_2017_Certificate.pdf)
162
+ # (Section I) for more background on individuals that should be included.
163
+ sig do
164
+ returns(
165
+ T.nilable(
166
+ T::Array[
167
+ Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::UpdateRequest::BeneficialOwnerIndividual
168
+ ]
169
+ )
170
+ )
171
+ end
172
+ attr_reader :beneficial_owner_individuals
173
+
174
+ sig do
175
+ params(
176
+ beneficial_owner_individuals:
177
+ T::Array[
178
+ Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::UpdateRequest::BeneficialOwnerIndividual::OrHash
179
+ ]
180
+ ).void
181
+ end
182
+ attr_writer :beneficial_owner_individuals
183
+
184
+ # Information for business for which the account is being opened and KYB is being
185
+ # run.
186
+ sig { returns(T.nilable(Lithic::KYBBusinessEntity)) }
187
+ attr_reader :business_entity
188
+
189
+ sig do
190
+ params(business_entity: Lithic::KYBBusinessEntity::OrHash).void
191
+ end
192
+ attr_writer :business_entity
193
+
194
+ # An individual with significant responsibility for managing the legal entity
195
+ # (e.g., a Chief Executive Officer, Chief Financial Officer, Chief Operating
196
+ # Officer, Managing Member, General Partner, President, Vice President, or
197
+ # Treasurer). This can be an executive, or someone who will have program-wide
198
+ # access to the cards that Lithic will provide. In some cases, this individual
199
+ # could also be a beneficial owner listed above. See
200
+ # [FinCEN requirements](https://www.fincen.gov/sites/default/files/shared/CDD_Rev6.7_Sept_2017_Certificate.pdf)
201
+ # (Section II) for more background.
202
+ sig do
203
+ returns(
204
+ T.nilable(
205
+ Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::UpdateRequest::ControlPerson
206
+ )
207
+ )
208
+ end
209
+ attr_reader :control_person
210
+
211
+ sig do
212
+ params(
213
+ control_person:
214
+ Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::UpdateRequest::ControlPerson::OrHash
215
+ ).void
216
+ end
217
+ attr_writer :control_person
218
+
219
+ # Original request to update the account holder.
220
+ sig do
221
+ params(
222
+ beneficial_owner_entities:
223
+ T::Array[Lithic::KYBBusinessEntity::OrHash],
224
+ beneficial_owner_individuals:
225
+ T::Array[
226
+ Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::UpdateRequest::BeneficialOwnerIndividual::OrHash
227
+ ],
228
+ business_entity: Lithic::KYBBusinessEntity::OrHash,
229
+ control_person:
230
+ Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::UpdateRequest::ControlPerson::OrHash
231
+ ).returns(T.attached_class)
232
+ end
233
+ def self.new(
234
+ # Deprecated.
235
+ beneficial_owner_entities: nil,
236
+ # You must submit a list of all direct and indirect individuals with 25% or more
237
+ # ownership in the company. A maximum of 4 beneficial owners can be submitted. If
238
+ # no individual owns 25% of the company you do not need to send beneficial owner
239
+ # information. See
240
+ # [FinCEN requirements](https://www.fincen.gov/sites/default/files/shared/CDD_Rev6.7_Sept_2017_Certificate.pdf)
241
+ # (Section I) for more background on individuals that should be included.
242
+ beneficial_owner_individuals: nil,
243
+ # Information for business for which the account is being opened and KYB is being
244
+ # run.
245
+ business_entity: nil,
246
+ # An individual with significant responsibility for managing the legal entity
247
+ # (e.g., a Chief Executive Officer, Chief Financial Officer, Chief Operating
248
+ # Officer, Managing Member, General Partner, President, Vice President, or
249
+ # Treasurer). This can be an executive, or someone who will have program-wide
250
+ # access to the cards that Lithic will provide. In some cases, this individual
251
+ # could also be a beneficial owner listed above. See
252
+ # [FinCEN requirements](https://www.fincen.gov/sites/default/files/shared/CDD_Rev6.7_Sept_2017_Certificate.pdf)
253
+ # (Section II) for more background.
254
+ control_person: nil
255
+ )
256
+ end
257
+
258
+ sig do
259
+ override.returns(
260
+ {
261
+ beneficial_owner_entities: T::Array[Lithic::KYBBusinessEntity],
262
+ beneficial_owner_individuals:
263
+ T::Array[
264
+ Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::UpdateRequest::BeneficialOwnerIndividual
265
+ ],
266
+ business_entity: Lithic::KYBBusinessEntity,
267
+ control_person:
268
+ Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::UpdateRequest::ControlPerson
269
+ }
270
+ )
271
+ end
272
+ def to_hash
273
+ end
274
+
275
+ class BeneficialOwnerIndividual < Lithic::Internal::Type::BaseModel
276
+ OrHash =
277
+ T.type_alias do
278
+ T.any(
279
+ Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::UpdateRequest::BeneficialOwnerIndividual,
280
+ Lithic::Internal::AnyHash
281
+ )
282
+ end
283
+
284
+ # Individual's current address - PO boxes, UPS drops, and FedEx drops are not
285
+ # acceptable; APO/FPO are acceptable. Only USA addresses are currently supported.
286
+ sig do
287
+ returns(
288
+ T.nilable(
289
+ Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::UpdateRequest::BeneficialOwnerIndividual::Address
290
+ )
291
+ )
292
+ end
293
+ attr_reader :address
294
+
295
+ sig do
296
+ params(
297
+ address:
298
+ Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::UpdateRequest::BeneficialOwnerIndividual::Address::OrHash
299
+ ).void
300
+ end
301
+ attr_writer :address
302
+
303
+ # Individual's date of birth, as an RFC 3339 date.
304
+ sig { returns(T.nilable(String)) }
305
+ attr_reader :dob
306
+
307
+ sig { params(dob: String).void }
308
+ attr_writer :dob
309
+
310
+ # Individual's email address. If utilizing Lithic for chargeback processing, this
311
+ # customer email address may be used to communicate dispute status and resolution.
312
+ sig { returns(T.nilable(String)) }
313
+ attr_reader :email
314
+
315
+ sig { params(email: String).void }
316
+ attr_writer :email
317
+
318
+ # Individual's first name, as it appears on government-issued identity documents.
319
+ sig { returns(T.nilable(String)) }
320
+ attr_reader :first_name
321
+
322
+ sig { params(first_name: String).void }
323
+ attr_writer :first_name
324
+
325
+ # Individual's last name, as it appears on government-issued identity documents.
326
+ sig { returns(T.nilable(String)) }
327
+ attr_reader :last_name
328
+
329
+ sig { params(last_name: String).void }
330
+ attr_writer :last_name
331
+
332
+ # Individual's phone number, entered in E.164 format.
333
+ sig { returns(T.nilable(String)) }
334
+ attr_reader :phone_number
335
+
336
+ sig { params(phone_number: String).void }
337
+ attr_writer :phone_number
338
+
339
+ sig do
340
+ params(
341
+ address:
342
+ Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::UpdateRequest::BeneficialOwnerIndividual::Address::OrHash,
343
+ dob: String,
344
+ email: String,
345
+ first_name: String,
346
+ last_name: String,
347
+ phone_number: String
348
+ ).returns(T.attached_class)
349
+ end
350
+ def self.new(
351
+ # Individual's current address - PO boxes, UPS drops, and FedEx drops are not
352
+ # acceptable; APO/FPO are acceptable. Only USA addresses are currently supported.
353
+ address: nil,
354
+ # Individual's date of birth, as an RFC 3339 date.
355
+ dob: nil,
356
+ # Individual's email address. If utilizing Lithic for chargeback processing, this
357
+ # customer email address may be used to communicate dispute status and resolution.
358
+ email: nil,
359
+ # Individual's first name, as it appears on government-issued identity documents.
360
+ first_name: nil,
361
+ # Individual's last name, as it appears on government-issued identity documents.
362
+ last_name: nil,
363
+ # Individual's phone number, entered in E.164 format.
364
+ phone_number: nil
365
+ )
366
+ end
367
+
368
+ sig do
369
+ override.returns(
370
+ {
371
+ address:
372
+ Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::UpdateRequest::BeneficialOwnerIndividual::Address,
373
+ dob: String,
374
+ email: String,
375
+ first_name: String,
376
+ government_id: String,
377
+ last_name: String,
378
+ phone_number: String
379
+ }
380
+ )
381
+ end
382
+ def to_hash
383
+ end
384
+
385
+ class Address < Lithic::Internal::Type::BaseModel
386
+ OrHash =
387
+ T.type_alias do
388
+ T.any(
389
+ Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::UpdateRequest::BeneficialOwnerIndividual::Address,
390
+ Lithic::Internal::AnyHash
391
+ )
392
+ end
393
+
394
+ # Valid deliverable address (no PO boxes).
395
+ sig { returns(String) }
396
+ attr_accessor :address1
397
+
398
+ # Name of city.
399
+ sig { returns(String) }
400
+ attr_accessor :city
401
+
402
+ # Valid country code. Only USA is currently supported, entered in uppercase ISO
403
+ # 3166-1 alpha-3 three-character format.
404
+ sig { returns(String) }
405
+ attr_accessor :country
406
+
407
+ # Valid postal code. Only USA ZIP codes are currently supported, entered as a
408
+ # five-digit ZIP or nine-digit ZIP+4.
409
+ sig { returns(String) }
410
+ attr_accessor :postal_code
411
+
412
+ # Valid state code. Only USA state codes are currently supported, entered in
413
+ # uppercase ISO 3166-2 two-character format.
414
+ sig { returns(String) }
415
+ attr_accessor :state
416
+
417
+ # Unit or apartment number (if applicable).
418
+ sig { returns(T.nilable(String)) }
419
+ attr_reader :address2
420
+
421
+ sig { params(address2: String).void }
422
+ attr_writer :address2
423
+
424
+ # Individual's current address - PO boxes, UPS drops, and FedEx drops are not
425
+ # acceptable; APO/FPO are acceptable. Only USA addresses are currently supported.
426
+ sig do
427
+ params(
428
+ address1: String,
429
+ city: String,
430
+ country: String,
431
+ postal_code: String,
432
+ state: String,
433
+ address2: String
434
+ ).returns(T.attached_class)
435
+ end
436
+ def self.new(
437
+ # Valid deliverable address (no PO boxes).
438
+ address1:,
439
+ # Name of city.
440
+ city:,
441
+ # Valid country code. Only USA is currently supported, entered in uppercase ISO
442
+ # 3166-1 alpha-3 three-character format.
443
+ country:,
444
+ # Valid postal code. Only USA ZIP codes are currently supported, entered as a
445
+ # five-digit ZIP or nine-digit ZIP+4.
446
+ postal_code:,
447
+ # Valid state code. Only USA state codes are currently supported, entered in
448
+ # uppercase ISO 3166-2 two-character format.
449
+ state:,
450
+ # Unit or apartment number (if applicable).
451
+ address2: nil
452
+ )
453
+ end
454
+
455
+ sig do
456
+ override.returns(
457
+ {
458
+ address1: String,
459
+ city: String,
460
+ country: String,
461
+ postal_code: String,
462
+ state: String,
463
+ address2: String
464
+ }
465
+ )
466
+ end
467
+ def to_hash
468
+ end
469
+ end
470
+ end
471
+
472
+ class ControlPerson < Lithic::Internal::Type::BaseModel
473
+ OrHash =
474
+ T.type_alias do
475
+ T.any(
476
+ Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::UpdateRequest::ControlPerson,
477
+ Lithic::Internal::AnyHash
478
+ )
479
+ end
480
+
481
+ # Individual's current address - PO boxes, UPS drops, and FedEx drops are not
482
+ # acceptable; APO/FPO are acceptable. Only USA addresses are currently supported.
483
+ sig do
484
+ returns(
485
+ T.nilable(
486
+ Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::UpdateRequest::ControlPerson::Address
487
+ )
488
+ )
489
+ end
490
+ attr_reader :address
491
+
492
+ sig do
493
+ params(
494
+ address:
495
+ Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::UpdateRequest::ControlPerson::Address::OrHash
496
+ ).void
497
+ end
498
+ attr_writer :address
499
+
500
+ # Individual's date of birth, as an RFC 3339 date.
501
+ sig { returns(T.nilable(String)) }
502
+ attr_reader :dob
503
+
504
+ sig { params(dob: String).void }
505
+ attr_writer :dob
506
+
507
+ # Individual's email address. If utilizing Lithic for chargeback processing, this
508
+ # customer email address may be used to communicate dispute status and resolution.
509
+ sig { returns(T.nilable(String)) }
510
+ attr_reader :email
511
+
512
+ sig { params(email: String).void }
513
+ attr_writer :email
514
+
515
+ # Individual's first name, as it appears on government-issued identity documents.
516
+ sig { returns(T.nilable(String)) }
517
+ attr_reader :first_name
518
+
519
+ sig { params(first_name: String).void }
520
+ attr_writer :first_name
521
+
522
+ # Individual's last name, as it appears on government-issued identity documents.
523
+ sig { returns(T.nilable(String)) }
524
+ attr_reader :last_name
525
+
526
+ sig { params(last_name: String).void }
527
+ attr_writer :last_name
528
+
529
+ # Individual's phone number, entered in E.164 format.
530
+ sig { returns(T.nilable(String)) }
531
+ attr_reader :phone_number
532
+
533
+ sig { params(phone_number: String).void }
534
+ attr_writer :phone_number
535
+
536
+ # An individual with significant responsibility for managing the legal entity
537
+ # (e.g., a Chief Executive Officer, Chief Financial Officer, Chief Operating
538
+ # Officer, Managing Member, General Partner, President, Vice President, or
539
+ # Treasurer). This can be an executive, or someone who will have program-wide
540
+ # access to the cards that Lithic will provide. In some cases, this individual
541
+ # could also be a beneficial owner listed above. See
542
+ # [FinCEN requirements](https://www.fincen.gov/sites/default/files/shared/CDD_Rev6.7_Sept_2017_Certificate.pdf)
543
+ # (Section II) for more background.
544
+ sig do
545
+ params(
546
+ address:
547
+ Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::UpdateRequest::ControlPerson::Address::OrHash,
548
+ dob: String,
549
+ email: String,
550
+ first_name: String,
551
+ last_name: String,
552
+ phone_number: String
553
+ ).returns(T.attached_class)
554
+ end
555
+ def self.new(
556
+ # Individual's current address - PO boxes, UPS drops, and FedEx drops are not
557
+ # acceptable; APO/FPO are acceptable. Only USA addresses are currently supported.
558
+ address: nil,
559
+ # Individual's date of birth, as an RFC 3339 date.
560
+ dob: nil,
561
+ # Individual's email address. If utilizing Lithic for chargeback processing, this
562
+ # customer email address may be used to communicate dispute status and resolution.
563
+ email: nil,
564
+ # Individual's first name, as it appears on government-issued identity documents.
565
+ first_name: nil,
566
+ # Individual's last name, as it appears on government-issued identity documents.
567
+ last_name: nil,
568
+ # Individual's phone number, entered in E.164 format.
569
+ phone_number: nil
570
+ )
571
+ end
572
+
573
+ sig do
574
+ override.returns(
575
+ {
576
+ address:
577
+ Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::UpdateRequest::ControlPerson::Address,
578
+ dob: String,
579
+ email: String,
580
+ first_name: String,
581
+ government_id: String,
582
+ last_name: String,
583
+ phone_number: String
584
+ }
585
+ )
586
+ end
587
+ def to_hash
588
+ end
589
+
590
+ class Address < Lithic::Internal::Type::BaseModel
591
+ OrHash =
592
+ T.type_alias do
593
+ T.any(
594
+ Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::UpdateRequest::ControlPerson::Address,
595
+ Lithic::Internal::AnyHash
596
+ )
597
+ end
598
+
599
+ # Valid deliverable address (no PO boxes).
600
+ sig { returns(String) }
601
+ attr_accessor :address1
602
+
603
+ # Name of city.
604
+ sig { returns(String) }
605
+ attr_accessor :city
606
+
607
+ # Valid country code. Only USA is currently supported, entered in uppercase ISO
608
+ # 3166-1 alpha-3 three-character format.
609
+ sig { returns(String) }
610
+ attr_accessor :country
611
+
612
+ # Valid postal code. Only USA ZIP codes are currently supported, entered as a
613
+ # five-digit ZIP or nine-digit ZIP+4.
614
+ sig { returns(String) }
615
+ attr_accessor :postal_code
616
+
617
+ # Valid state code. Only USA state codes are currently supported, entered in
618
+ # uppercase ISO 3166-2 two-character format.
619
+ sig { returns(String) }
620
+ attr_accessor :state
621
+
622
+ # Unit or apartment number (if applicable).
623
+ sig { returns(T.nilable(String)) }
624
+ attr_reader :address2
625
+
626
+ sig { params(address2: String).void }
627
+ attr_writer :address2
628
+
629
+ # Individual's current address - PO boxes, UPS drops, and FedEx drops are not
630
+ # acceptable; APO/FPO are acceptable. Only USA addresses are currently supported.
631
+ sig do
632
+ params(
633
+ address1: String,
634
+ city: String,
635
+ country: String,
636
+ postal_code: String,
637
+ state: String,
638
+ address2: String
639
+ ).returns(T.attached_class)
640
+ end
641
+ def self.new(
642
+ # Valid deliverable address (no PO boxes).
643
+ address1:,
644
+ # Name of city.
645
+ city:,
646
+ # Valid country code. Only USA is currently supported, entered in uppercase ISO
647
+ # 3166-1 alpha-3 three-character format.
648
+ country:,
649
+ # Valid postal code. Only USA ZIP codes are currently supported, entered as a
650
+ # five-digit ZIP or nine-digit ZIP+4.
651
+ postal_code:,
652
+ # Valid state code. Only USA state codes are currently supported, entered in
653
+ # uppercase ISO 3166-2 two-character format.
654
+ state:,
655
+ # Unit or apartment number (if applicable).
656
+ address2: nil
657
+ )
658
+ end
659
+
660
+ sig do
661
+ override.returns(
662
+ {
663
+ address1: String,
664
+ city: String,
665
+ country: String,
666
+ postal_code: String,
667
+ state: String,
668
+ address2: String
669
+ }
670
+ )
671
+ end
672
+ def to_hash
673
+ end
674
+ end
675
+ end
676
+ end
677
+
678
+ # The type of event that occurred.
679
+ module EventType
680
+ extend Lithic::Internal::Type::Enum
681
+
682
+ TaggedSymbol =
683
+ T.type_alias do
684
+ T.all(
685
+ Symbol,
686
+ Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::EventType
687
+ )
688
+ end
689
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
690
+
691
+ ACCOUNT_HOLDER_UPDATED =
692
+ T.let(
693
+ :"account_holder.updated",
694
+ Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::EventType::TaggedSymbol
695
+ )
696
+
697
+ sig do
698
+ override.returns(
699
+ T::Array[
700
+ Lithic::AccountHolderUpdatedWebhookEvent::KYBPayload::EventType::TaggedSymbol
701
+ ]
702
+ )
703
+ end
704
+ def self.values
705
+ end
706
+ end
707
+ end
708
+
709
+ class KYCPayload < Lithic::Internal::Type::BaseModel
710
+ OrHash =
711
+ T.type_alias do
712
+ T.any(
713
+ Lithic::AccountHolderUpdatedWebhookEvent::KYCPayload,
714
+ Lithic::Internal::AnyHash
715
+ )
716
+ end
717
+
718
+ # The token of the account_holder that was created.
719
+ sig { returns(String) }
720
+ attr_accessor :token
721
+
722
+ # Original request to update the account holder.
723
+ sig do
724
+ returns(
725
+ Lithic::AccountHolderUpdatedWebhookEvent::KYCPayload::UpdateRequest
726
+ )
727
+ end
728
+ attr_reader :update_request
729
+
730
+ sig do
731
+ params(
732
+ update_request:
733
+ Lithic::AccountHolderUpdatedWebhookEvent::KYCPayload::UpdateRequest::OrHash
734
+ ).void
735
+ end
736
+ attr_writer :update_request
737
+
738
+ # The type of event that occurred.
739
+ sig do
740
+ returns(
741
+ T.nilable(
742
+ Lithic::AccountHolderUpdatedWebhookEvent::KYCPayload::EventType::TaggedSymbol
743
+ )
744
+ )
745
+ end
746
+ attr_reader :event_type
747
+
748
+ sig do
749
+ params(
750
+ event_type:
751
+ Lithic::AccountHolderUpdatedWebhookEvent::KYCPayload::EventType::OrSymbol
752
+ ).void
753
+ end
754
+ attr_writer :event_type
755
+
756
+ # A user provided id that can be used to link an account holder with an external
757
+ # system
758
+ sig { returns(T.nilable(String)) }
759
+ attr_reader :external_id
760
+
761
+ sig { params(external_id: String).void }
762
+ attr_writer :external_id
763
+
764
+ # KYC payload for an updated account holder.
765
+ sig do
766
+ params(
767
+ token: String,
768
+ update_request:
769
+ Lithic::AccountHolderUpdatedWebhookEvent::KYCPayload::UpdateRequest::OrHash,
770
+ event_type:
771
+ Lithic::AccountHolderUpdatedWebhookEvent::KYCPayload::EventType::OrSymbol,
772
+ external_id: String
773
+ ).returns(T.attached_class)
774
+ end
775
+ def self.new(
776
+ # The token of the account_holder that was created.
777
+ token:,
778
+ # Original request to update the account holder.
779
+ update_request:,
780
+ # The type of event that occurred.
781
+ event_type: nil,
782
+ # A user provided id that can be used to link an account holder with an external
783
+ # system
784
+ external_id: nil
785
+ )
786
+ end
787
+
788
+ sig do
789
+ override.returns(
790
+ {
791
+ token: String,
792
+ update_request:
793
+ Lithic::AccountHolderUpdatedWebhookEvent::KYCPayload::UpdateRequest,
794
+ event_type:
795
+ Lithic::AccountHolderUpdatedWebhookEvent::KYCPayload::EventType::TaggedSymbol,
796
+ external_id: String
797
+ }
798
+ )
799
+ end
800
+ def to_hash
801
+ end
802
+
803
+ class UpdateRequest < Lithic::Internal::Type::BaseModel
804
+ OrHash =
805
+ T.type_alias do
806
+ T.any(
807
+ Lithic::AccountHolderUpdatedWebhookEvent::KYCPayload::UpdateRequest,
808
+ Lithic::Internal::AnyHash
809
+ )
810
+ end
811
+
812
+ # Information on the individual for whom the account is being opened and KYC is
813
+ # being run.
814
+ sig do
815
+ returns(
816
+ T.nilable(
817
+ Lithic::AccountHolderUpdatedWebhookEvent::KYCPayload::UpdateRequest::Individual
818
+ )
819
+ )
820
+ end
821
+ attr_reader :individual
822
+
823
+ sig do
824
+ params(
825
+ individual:
826
+ Lithic::AccountHolderUpdatedWebhookEvent::KYCPayload::UpdateRequest::Individual::OrHash
827
+ ).void
828
+ end
829
+ attr_writer :individual
830
+
831
+ # Original request to update the account holder.
832
+ sig do
833
+ params(
834
+ individual:
835
+ Lithic::AccountHolderUpdatedWebhookEvent::KYCPayload::UpdateRequest::Individual::OrHash
836
+ ).returns(T.attached_class)
837
+ end
838
+ def self.new(
839
+ # Information on the individual for whom the account is being opened and KYC is
840
+ # being run.
841
+ individual: nil
842
+ )
843
+ end
844
+
845
+ sig do
846
+ override.returns(
847
+ {
848
+ individual:
849
+ Lithic::AccountHolderUpdatedWebhookEvent::KYCPayload::UpdateRequest::Individual
850
+ }
851
+ )
852
+ end
853
+ def to_hash
854
+ end
855
+
856
+ class Individual < Lithic::Internal::Type::BaseModel
857
+ OrHash =
858
+ T.type_alias do
859
+ T.any(
860
+ Lithic::AccountHolderUpdatedWebhookEvent::KYCPayload::UpdateRequest::Individual,
861
+ Lithic::Internal::AnyHash
862
+ )
863
+ end
864
+
865
+ # Individual's current address - PO boxes, UPS drops, and FedEx drops are not
866
+ # acceptable; APO/FPO are acceptable. Only USA addresses are currently supported.
867
+ sig do
868
+ returns(
869
+ T.nilable(
870
+ Lithic::AccountHolderUpdatedWebhookEvent::KYCPayload::UpdateRequest::Individual::Address
871
+ )
872
+ )
873
+ end
874
+ attr_reader :address
875
+
876
+ sig do
877
+ params(
878
+ address:
879
+ Lithic::AccountHolderUpdatedWebhookEvent::KYCPayload::UpdateRequest::Individual::Address::OrHash
880
+ ).void
881
+ end
882
+ attr_writer :address
883
+
884
+ # Individual's date of birth, as an RFC 3339 date.
885
+ sig { returns(T.nilable(String)) }
886
+ attr_reader :dob
887
+
888
+ sig { params(dob: String).void }
889
+ attr_writer :dob
890
+
891
+ # Individual's email address. If utilizing Lithic for chargeback processing, this
892
+ # customer email address may be used to communicate dispute status and resolution.
893
+ sig { returns(T.nilable(String)) }
894
+ attr_reader :email
895
+
896
+ sig { params(email: String).void }
897
+ attr_writer :email
898
+
899
+ # Individual's first name, as it appears on government-issued identity documents.
900
+ sig { returns(T.nilable(String)) }
901
+ attr_reader :first_name
902
+
903
+ sig { params(first_name: String).void }
904
+ attr_writer :first_name
905
+
906
+ # Individual's last name, as it appears on government-issued identity documents.
907
+ sig { returns(T.nilable(String)) }
908
+ attr_reader :last_name
909
+
910
+ sig { params(last_name: String).void }
911
+ attr_writer :last_name
912
+
913
+ # Individual's phone number, entered in E.164 format.
914
+ sig { returns(T.nilable(String)) }
915
+ attr_reader :phone_number
916
+
917
+ sig { params(phone_number: String).void }
918
+ attr_writer :phone_number
919
+
920
+ # Information on the individual for whom the account is being opened and KYC is
921
+ # being run.
922
+ sig do
923
+ params(
924
+ address:
925
+ Lithic::AccountHolderUpdatedWebhookEvent::KYCPayload::UpdateRequest::Individual::Address::OrHash,
926
+ dob: String,
927
+ email: String,
928
+ first_name: String,
929
+ last_name: String,
930
+ phone_number: String
931
+ ).returns(T.attached_class)
932
+ end
933
+ def self.new(
934
+ # Individual's current address - PO boxes, UPS drops, and FedEx drops are not
935
+ # acceptable; APO/FPO are acceptable. Only USA addresses are currently supported.
936
+ address: nil,
937
+ # Individual's date of birth, as an RFC 3339 date.
938
+ dob: nil,
939
+ # Individual's email address. If utilizing Lithic for chargeback processing, this
940
+ # customer email address may be used to communicate dispute status and resolution.
941
+ email: nil,
942
+ # Individual's first name, as it appears on government-issued identity documents.
943
+ first_name: nil,
944
+ # Individual's last name, as it appears on government-issued identity documents.
945
+ last_name: nil,
946
+ # Individual's phone number, entered in E.164 format.
947
+ phone_number: nil
948
+ )
949
+ end
950
+
951
+ sig do
952
+ override.returns(
953
+ {
954
+ address:
955
+ Lithic::AccountHolderUpdatedWebhookEvent::KYCPayload::UpdateRequest::Individual::Address,
956
+ dob: String,
957
+ email: String,
958
+ first_name: String,
959
+ government_id: String,
960
+ last_name: String,
961
+ phone_number: String
962
+ }
963
+ )
964
+ end
965
+ def to_hash
966
+ end
967
+
968
+ class Address < Lithic::Internal::Type::BaseModel
969
+ OrHash =
970
+ T.type_alias do
971
+ T.any(
972
+ Lithic::AccountHolderUpdatedWebhookEvent::KYCPayload::UpdateRequest::Individual::Address,
973
+ Lithic::Internal::AnyHash
974
+ )
975
+ end
976
+
977
+ # Valid deliverable address (no PO boxes).
978
+ sig { returns(String) }
979
+ attr_accessor :address1
980
+
981
+ # Name of city.
982
+ sig { returns(String) }
983
+ attr_accessor :city
984
+
985
+ # Valid country code. Only USA is currently supported, entered in uppercase ISO
986
+ # 3166-1 alpha-3 three-character format.
987
+ sig { returns(String) }
988
+ attr_accessor :country
989
+
990
+ # Valid postal code. Only USA ZIP codes are currently supported, entered as a
991
+ # five-digit ZIP or nine-digit ZIP+4.
992
+ sig { returns(String) }
993
+ attr_accessor :postal_code
994
+
995
+ # Valid state code. Only USA state codes are currently supported, entered in
996
+ # uppercase ISO 3166-2 two-character format.
997
+ sig { returns(String) }
998
+ attr_accessor :state
999
+
1000
+ # Unit or apartment number (if applicable).
1001
+ sig { returns(T.nilable(String)) }
1002
+ attr_reader :address2
1003
+
1004
+ sig { params(address2: String).void }
1005
+ attr_writer :address2
1006
+
1007
+ # Individual's current address - PO boxes, UPS drops, and FedEx drops are not
1008
+ # acceptable; APO/FPO are acceptable. Only USA addresses are currently supported.
1009
+ sig do
1010
+ params(
1011
+ address1: String,
1012
+ city: String,
1013
+ country: String,
1014
+ postal_code: String,
1015
+ state: String,
1016
+ address2: String
1017
+ ).returns(T.attached_class)
1018
+ end
1019
+ def self.new(
1020
+ # Valid deliverable address (no PO boxes).
1021
+ address1:,
1022
+ # Name of city.
1023
+ city:,
1024
+ # Valid country code. Only USA is currently supported, entered in uppercase ISO
1025
+ # 3166-1 alpha-3 three-character format.
1026
+ country:,
1027
+ # Valid postal code. Only USA ZIP codes are currently supported, entered as a
1028
+ # five-digit ZIP or nine-digit ZIP+4.
1029
+ postal_code:,
1030
+ # Valid state code. Only USA state codes are currently supported, entered in
1031
+ # uppercase ISO 3166-2 two-character format.
1032
+ state:,
1033
+ # Unit or apartment number (if applicable).
1034
+ address2: nil
1035
+ )
1036
+ end
1037
+
1038
+ sig do
1039
+ override.returns(
1040
+ {
1041
+ address1: String,
1042
+ city: String,
1043
+ country: String,
1044
+ postal_code: String,
1045
+ state: String,
1046
+ address2: String
1047
+ }
1048
+ )
1049
+ end
1050
+ def to_hash
1051
+ end
1052
+ end
1053
+ end
1054
+ end
1055
+
1056
+ # The type of event that occurred.
1057
+ module EventType
1058
+ extend Lithic::Internal::Type::Enum
1059
+
1060
+ TaggedSymbol =
1061
+ T.type_alias do
1062
+ T.all(
1063
+ Symbol,
1064
+ Lithic::AccountHolderUpdatedWebhookEvent::KYCPayload::EventType
1065
+ )
1066
+ end
1067
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1068
+
1069
+ ACCOUNT_HOLDER_UPDATED =
1070
+ T.let(
1071
+ :"account_holder.updated",
1072
+ Lithic::AccountHolderUpdatedWebhookEvent::KYCPayload::EventType::TaggedSymbol
1073
+ )
1074
+
1075
+ sig do
1076
+ override.returns(
1077
+ T::Array[
1078
+ Lithic::AccountHolderUpdatedWebhookEvent::KYCPayload::EventType::TaggedSymbol
1079
+ ]
1080
+ )
1081
+ end
1082
+ def self.values
1083
+ end
1084
+ end
1085
+ end
1086
+
1087
+ class LegacyPayload < Lithic::Internal::Type::BaseModel
1088
+ OrHash =
1089
+ T.type_alias do
1090
+ T.any(
1091
+ Lithic::AccountHolderUpdatedWebhookEvent::LegacyPayload,
1092
+ Lithic::Internal::AnyHash
1093
+ )
1094
+ end
1095
+
1096
+ # The token of the account_holder that was created.
1097
+ sig { returns(String) }
1098
+ attr_accessor :token
1099
+
1100
+ # If applicable, represents the business account token associated with the
1101
+ # account_holder.
1102
+ sig { returns(T.nilable(String)) }
1103
+ attr_accessor :business_account_token
1104
+
1105
+ # When the account_holder updated event was created
1106
+ sig { returns(T.nilable(Time)) }
1107
+ attr_reader :created
1108
+
1109
+ sig { params(created: Time).void }
1110
+ attr_writer :created
1111
+
1112
+ # If updated, the newly updated email associated with the account_holder otherwise
1113
+ # the existing email is provided.
1114
+ sig { returns(T.nilable(String)) }
1115
+ attr_reader :email
1116
+
1117
+ sig { params(email: String).void }
1118
+ attr_writer :email
1119
+
1120
+ # The type of event that occurred.
1121
+ sig do
1122
+ returns(
1123
+ T.nilable(
1124
+ Lithic::AccountHolderUpdatedWebhookEvent::LegacyPayload::EventType::TaggedSymbol
1125
+ )
1126
+ )
1127
+ end
1128
+ attr_reader :event_type
1129
+
1130
+ sig do
1131
+ params(
1132
+ event_type:
1133
+ Lithic::AccountHolderUpdatedWebhookEvent::LegacyPayload::EventType::OrSymbol
1134
+ ).void
1135
+ end
1136
+ attr_writer :event_type
1137
+
1138
+ # If applicable, represents the external_id associated with the account_holder.
1139
+ sig { returns(T.nilable(String)) }
1140
+ attr_accessor :external_id
1141
+
1142
+ # If applicable, represents the account_holder's first name.
1143
+ sig { returns(T.nilable(String)) }
1144
+ attr_reader :first_name
1145
+
1146
+ sig { params(first_name: String).void }
1147
+ attr_writer :first_name
1148
+
1149
+ # If applicable, represents the account_holder's last name.
1150
+ sig { returns(T.nilable(String)) }
1151
+ attr_reader :last_name
1152
+
1153
+ sig { params(last_name: String).void }
1154
+ attr_writer :last_name
1155
+
1156
+ # If applicable, represents the account_holder's business name.
1157
+ sig { returns(T.nilable(String)) }
1158
+ attr_reader :legal_business_name
1159
+
1160
+ sig { params(legal_business_name: String).void }
1161
+ attr_writer :legal_business_name
1162
+
1163
+ # If updated, the newly updated phone_number associated with the account_holder
1164
+ # otherwise the existing phone_number is provided.
1165
+ sig { returns(T.nilable(String)) }
1166
+ attr_reader :phone_number
1167
+
1168
+ sig { params(phone_number: String).void }
1169
+ attr_writer :phone_number
1170
+
1171
+ # Legacy payload for an updated account holder.
1172
+ sig do
1173
+ params(
1174
+ token: String,
1175
+ business_account_token: T.nilable(String),
1176
+ created: Time,
1177
+ email: String,
1178
+ event_type:
1179
+ Lithic::AccountHolderUpdatedWebhookEvent::LegacyPayload::EventType::OrSymbol,
1180
+ external_id: T.nilable(String),
1181
+ first_name: String,
1182
+ last_name: String,
1183
+ legal_business_name: String,
1184
+ phone_number: String
1185
+ ).returns(T.attached_class)
1186
+ end
1187
+ def self.new(
1188
+ # The token of the account_holder that was created.
1189
+ token:,
1190
+ # If applicable, represents the business account token associated with the
1191
+ # account_holder.
1192
+ business_account_token: nil,
1193
+ # When the account_holder updated event was created
1194
+ created: nil,
1195
+ # If updated, the newly updated email associated with the account_holder otherwise
1196
+ # the existing email is provided.
1197
+ email: nil,
1198
+ # The type of event that occurred.
1199
+ event_type: nil,
1200
+ # If applicable, represents the external_id associated with the account_holder.
1201
+ external_id: nil,
1202
+ # If applicable, represents the account_holder's first name.
1203
+ first_name: nil,
1204
+ # If applicable, represents the account_holder's last name.
1205
+ last_name: nil,
1206
+ # If applicable, represents the account_holder's business name.
1207
+ legal_business_name: nil,
1208
+ # If updated, the newly updated phone_number associated with the account_holder
1209
+ # otherwise the existing phone_number is provided.
1210
+ phone_number: nil
1211
+ )
1212
+ end
1213
+
1214
+ sig do
1215
+ override.returns(
1216
+ {
1217
+ token: String,
1218
+ business_account_token: T.nilable(String),
1219
+ created: Time,
1220
+ email: String,
1221
+ event_type:
1222
+ Lithic::AccountHolderUpdatedWebhookEvent::LegacyPayload::EventType::TaggedSymbol,
1223
+ external_id: T.nilable(String),
1224
+ first_name: String,
1225
+ last_name: String,
1226
+ legal_business_name: String,
1227
+ phone_number: String
1228
+ }
1229
+ )
1230
+ end
1231
+ def to_hash
1232
+ end
1233
+
1234
+ # The type of event that occurred.
1235
+ module EventType
1236
+ extend Lithic::Internal::Type::Enum
1237
+
1238
+ TaggedSymbol =
1239
+ T.type_alias do
1240
+ T.all(
1241
+ Symbol,
1242
+ Lithic::AccountHolderUpdatedWebhookEvent::LegacyPayload::EventType
1243
+ )
1244
+ end
1245
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1246
+
1247
+ ACCOUNT_HOLDER_UPDATED =
1248
+ T.let(
1249
+ :"account_holder.updated",
1250
+ Lithic::AccountHolderUpdatedWebhookEvent::LegacyPayload::EventType::TaggedSymbol
1251
+ )
1252
+
1253
+ sig do
1254
+ override.returns(
1255
+ T::Array[
1256
+ Lithic::AccountHolderUpdatedWebhookEvent::LegacyPayload::EventType::TaggedSymbol
1257
+ ]
1258
+ )
1259
+ end
1260
+ def self.values
1261
+ end
1262
+ end
1263
+ end
1264
+
1265
+ sig do
1266
+ override.returns(
1267
+ T::Array[Lithic::AccountHolderUpdatedWebhookEvent::Variants]
1268
+ )
1269
+ end
1270
+ def self.variants
1271
+ end
1272
+ end
1273
+ end
1274
+ end