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