whop_sdk 0.0.11 → 0.0.12

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 (43) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +10 -0
  3. data/README.md +1 -1
  4. data/lib/whop_sdk/models/checkout_configuration_create_params.rb +9 -1
  5. data/lib/whop_sdk/models/plan.rb +9 -1
  6. data/lib/whop_sdk/models/plan_create_params.rb +9 -1
  7. data/lib/whop_sdk/models/plan_list_response.rb +9 -1
  8. data/lib/whop_sdk/models/product_create_params.rb +2 -2
  9. data/lib/whop_sdk/models/unwrap_webhook_event.rb +5 -1
  10. data/lib/whop_sdk/models/withdrawal_created_webhook_event.rb +309 -0
  11. data/lib/whop_sdk/models/withdrawal_retrieve_response.rb +111 -166
  12. data/lib/whop_sdk/models/withdrawal_updated_webhook_event.rb +309 -0
  13. data/lib/whop_sdk/models.rb +4 -0
  14. data/lib/whop_sdk/resources/plans.rb +3 -1
  15. data/lib/whop_sdk/resources/products.rb +1 -1
  16. data/lib/whop_sdk/resources/webhooks.rb +1 -1
  17. data/lib/whop_sdk/version.rb +1 -1
  18. data/lib/whop_sdk.rb +2 -0
  19. data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +8 -0
  20. data/rbi/whop_sdk/models/plan.rbi +8 -0
  21. data/rbi/whop_sdk/models/plan_create_params.rbi +8 -0
  22. data/rbi/whop_sdk/models/plan_list_response.rbi +8 -0
  23. data/rbi/whop_sdk/models/product_create_params.rbi +2 -2
  24. data/rbi/whop_sdk/models/unwrap_webhook_event.rbi +2 -0
  25. data/rbi/whop_sdk/models/withdrawal_created_webhook_event.rbi +633 -0
  26. data/rbi/whop_sdk/models/withdrawal_retrieve_response.rbi +326 -480
  27. data/rbi/whop_sdk/models/withdrawal_updated_webhook_event.rbi +633 -0
  28. data/rbi/whop_sdk/models.rbi +4 -0
  29. data/rbi/whop_sdk/resources/plans.rbi +3 -0
  30. data/rbi/whop_sdk/resources/products.rbi +1 -1
  31. data/rbi/whop_sdk/resources/webhooks.rbi +2 -0
  32. data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +5 -0
  33. data/sig/whop_sdk/models/plan.rbs +5 -0
  34. data/sig/whop_sdk/models/plan_create_params.rbs +5 -0
  35. data/sig/whop_sdk/models/plan_list_response.rbs +5 -0
  36. data/sig/whop_sdk/models/unwrap_webhook_event.rbs +2 -0
  37. data/sig/whop_sdk/models/withdrawal_created_webhook_event.rbs +275 -0
  38. data/sig/whop_sdk/models/withdrawal_retrieve_response.rbs +132 -191
  39. data/sig/whop_sdk/models/withdrawal_updated_webhook_event.rbs +275 -0
  40. data/sig/whop_sdk/models.rbs +4 -0
  41. data/sig/whop_sdk/resources/plans.rbs +1 -0
  42. data/sig/whop_sdk/resources/webhooks.rbs +2 -0
  43. metadata +8 -2
@@ -6,12 +6,16 @@ module WhopSDK
6
6
  amount: Float,
7
7
  created_at: Time,
8
8
  currency: WhopSDK::Models::currency,
9
+ error_code: WhopSDK::Models::WithdrawalRetrieveResponse::error_code?,
10
+ error_message: String?,
11
+ estimated_availability: Time?,
9
12
  fee_amount: Float,
10
13
  fee_type: WhopSDK::Models::withdrawal_fee_types?,
11
- latest_payout: WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout?,
14
+ ledger_account: WhopSDK::Models::WithdrawalRetrieveResponse::LedgerAccount,
12
15
  payout_token: WhopSDK::Models::WithdrawalRetrieveResponse::PayoutToken?,
13
16
  speed: WhopSDK::Models::withdrawal_speeds,
14
17
  status: WhopSDK::Models::withdrawal_status,
18
+ trace_code: String?,
15
19
  withdrawal_type: WhopSDK::Models::withdrawal_types
16
20
  }
17
21
 
@@ -24,11 +28,17 @@ module WhopSDK
24
28
 
25
29
  attr_accessor currency: WhopSDK::Models::currency
26
30
 
31
+ attr_accessor error_code: WhopSDK::Models::WithdrawalRetrieveResponse::error_code?
32
+
33
+ attr_accessor error_message: String?
34
+
35
+ attr_accessor estimated_availability: Time?
36
+
27
37
  attr_accessor fee_amount: Float
28
38
 
29
39
  attr_accessor fee_type: WhopSDK::Models::withdrawal_fee_types?
30
40
 
31
- attr_accessor latest_payout: WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout?
41
+ attr_accessor ledger_account: WhopSDK::Models::WithdrawalRetrieveResponse::LedgerAccount
32
42
 
33
43
  attr_accessor payout_token: WhopSDK::Models::WithdrawalRetrieveResponse::PayoutToken?
34
44
 
@@ -36,6 +46,8 @@ module WhopSDK
36
46
 
37
47
  attr_accessor status: WhopSDK::Models::withdrawal_status
38
48
 
49
+ attr_accessor trace_code: String?
50
+
39
51
  attr_accessor withdrawal_type: WhopSDK::Models::withdrawal_types
40
52
 
41
53
  def initialize: (
@@ -43,12 +55,16 @@ module WhopSDK
43
55
  amount: Float,
44
56
  created_at: Time,
45
57
  currency: WhopSDK::Models::currency,
58
+ error_code: WhopSDK::Models::WithdrawalRetrieveResponse::error_code?,
59
+ error_message: String?,
60
+ estimated_availability: Time?,
46
61
  fee_amount: Float,
47
62
  fee_type: WhopSDK::Models::withdrawal_fee_types?,
48
- latest_payout: WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout?,
63
+ ledger_account: WhopSDK::Models::WithdrawalRetrieveResponse::LedgerAccount,
49
64
  payout_token: WhopSDK::Models::WithdrawalRetrieveResponse::PayoutToken?,
50
65
  speed: WhopSDK::Models::withdrawal_speeds,
51
66
  status: WhopSDK::Models::withdrawal_status,
67
+ trace_code: String?,
52
68
  withdrawal_type: WhopSDK::Models::withdrawal_types
53
69
  ) -> void
54
70
 
@@ -57,191 +73,128 @@ module WhopSDK
57
73
  amount: Float,
58
74
  created_at: Time,
59
75
  currency: WhopSDK::Models::currency,
76
+ error_code: WhopSDK::Models::WithdrawalRetrieveResponse::error_code?,
77
+ error_message: String?,
78
+ estimated_availability: Time?,
60
79
  fee_amount: Float,
61
80
  fee_type: WhopSDK::Models::withdrawal_fee_types?,
62
- latest_payout: WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout?,
81
+ ledger_account: WhopSDK::Models::WithdrawalRetrieveResponse::LedgerAccount,
63
82
  payout_token: WhopSDK::Models::WithdrawalRetrieveResponse::PayoutToken?,
64
83
  speed: WhopSDK::Models::withdrawal_speeds,
65
84
  status: WhopSDK::Models::withdrawal_status,
85
+ trace_code: String?,
66
86
  withdrawal_type: WhopSDK::Models::withdrawal_types
67
87
  }
68
88
 
69
- type latest_payout =
70
- {
71
- id: String,
72
- created_at: Time,
73
- error_code: WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::error_code?,
74
- error_message: String?,
75
- estimated_availability: Time?,
76
- payer_name: String?,
77
- status: WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::status,
78
- trace_code: String?
79
- }
80
-
81
- class LatestPayout < WhopSDK::Internal::Type::BaseModel
82
- attr_accessor id: String
83
-
84
- attr_accessor created_at: Time
85
-
86
- attr_accessor error_code: WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::error_code?
87
-
88
- attr_accessor error_message: String?
89
-
90
- attr_accessor estimated_availability: Time?
91
-
92
- attr_accessor payer_name: String?
89
+ type error_code =
90
+ :account_closed
91
+ | :account_does_not_exist
92
+ | :account_information_invalid
93
+ | :account_number_invalid_region
94
+ | :account_frozen
95
+ | :account_lookup_failed
96
+ | :account_not_found
97
+ | :amount_out_of_bounds
98
+ | :attributes_not_validated
99
+ | :b2b_payments_prohibited
100
+ | :bank_statement_required
101
+ | :compliance_review
102
+ | :currency_not_supported
103
+ | :deposit_canceled
104
+ | :deposit_failed
105
+ | :deposit_rejected
106
+ | :destination_unavailable
107
+ | :exceeded_account_limit
108
+ | :expired_quote
109
+ | :generic_payout_error
110
+ | :technical_problem
111
+ | :identification_number_invalid
112
+ | :invalid_account_number
113
+ | :invalid_bank_code
114
+ | :invalid_beneficiary
115
+ | :invalid_branch_number
116
+ | :invalid_branch_code
117
+ | :invalid_phone_number
118
+ | :invalid_routing_number
119
+ | :invalid_swift_code
120
+ | :invalid_company_details
121
+ | :manual_cancelation
122
+ | :misc_error
123
+ | :missing_city_and_country
124
+ | :missing_phone_number
125
+ | :missing_remittance_info
126
+ | :payee_name_invalid
127
+ | :receiving_account_locked
128
+ | :rejected_by_compliance
129
+ | :rtp_not_supported
130
+ | :non_transaction_account
131
+ | :source_token_insufficient_funds
132
+ | :ssn_invalid
133
+ | :wallet_screenshot_required
134
+ | :unsupported_region
135
+
136
+ module ErrorCode
137
+ extend WhopSDK::Internal::Type::Enum
138
+
139
+ ACCOUNT_CLOSED: :account_closed
140
+ ACCOUNT_DOES_NOT_EXIST: :account_does_not_exist
141
+ ACCOUNT_INFORMATION_INVALID: :account_information_invalid
142
+ ACCOUNT_NUMBER_INVALID_REGION: :account_number_invalid_region
143
+ ACCOUNT_FROZEN: :account_frozen
144
+ ACCOUNT_LOOKUP_FAILED: :account_lookup_failed
145
+ ACCOUNT_NOT_FOUND: :account_not_found
146
+ AMOUNT_OUT_OF_BOUNDS: :amount_out_of_bounds
147
+ ATTRIBUTES_NOT_VALIDATED: :attributes_not_validated
148
+ B2B_PAYMENTS_PROHIBITED: :b2b_payments_prohibited
149
+ BANK_STATEMENT_REQUIRED: :bank_statement_required
150
+ COMPLIANCE_REVIEW: :compliance_review
151
+ CURRENCY_NOT_SUPPORTED: :currency_not_supported
152
+ DEPOSIT_CANCELED: :deposit_canceled
153
+ DEPOSIT_FAILED: :deposit_failed
154
+ DEPOSIT_REJECTED: :deposit_rejected
155
+ DESTINATION_UNAVAILABLE: :destination_unavailable
156
+ EXCEEDED_ACCOUNT_LIMIT: :exceeded_account_limit
157
+ EXPIRED_QUOTE: :expired_quote
158
+ GENERIC_PAYOUT_ERROR: :generic_payout_error
159
+ TECHNICAL_PROBLEM: :technical_problem
160
+ IDENTIFICATION_NUMBER_INVALID: :identification_number_invalid
161
+ INVALID_ACCOUNT_NUMBER: :invalid_account_number
162
+ INVALID_BANK_CODE: :invalid_bank_code
163
+ INVALID_BENEFICIARY: :invalid_beneficiary
164
+ INVALID_BRANCH_NUMBER: :invalid_branch_number
165
+ INVALID_BRANCH_CODE: :invalid_branch_code
166
+ INVALID_PHONE_NUMBER: :invalid_phone_number
167
+ INVALID_ROUTING_NUMBER: :invalid_routing_number
168
+ INVALID_SWIFT_CODE: :invalid_swift_code
169
+ INVALID_COMPANY_DETAILS: :invalid_company_details
170
+ MANUAL_CANCELATION: :manual_cancelation
171
+ MISC_ERROR: :misc_error
172
+ MISSING_CITY_AND_COUNTRY: :missing_city_and_country
173
+ MISSING_PHONE_NUMBER: :missing_phone_number
174
+ MISSING_REMITTANCE_INFO: :missing_remittance_info
175
+ PAYEE_NAME_INVALID: :payee_name_invalid
176
+ RECEIVING_ACCOUNT_LOCKED: :receiving_account_locked
177
+ REJECTED_BY_COMPLIANCE: :rejected_by_compliance
178
+ RTP_NOT_SUPPORTED: :rtp_not_supported
179
+ NON_TRANSACTION_ACCOUNT: :non_transaction_account
180
+ SOURCE_TOKEN_INSUFFICIENT_FUNDS: :source_token_insufficient_funds
181
+ SSN_INVALID: :ssn_invalid
182
+ WALLET_SCREENSHOT_REQUIRED: :wallet_screenshot_required
183
+ UNSUPPORTED_REGION: :unsupported_region
184
+
185
+ def self?.values: -> ::Array[WhopSDK::Models::WithdrawalRetrieveResponse::error_code]
186
+ end
93
187
 
94
- attr_accessor status: WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::status
188
+ type ledger_account = { id: String, company_id: String? }
95
189
 
96
- attr_accessor trace_code: String?
190
+ class LedgerAccount < WhopSDK::Internal::Type::BaseModel
191
+ attr_accessor id: String
97
192
 
98
- def initialize: (
99
- id: String,
100
- created_at: Time,
101
- error_code: WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::error_code?,
102
- error_message: String?,
103
- estimated_availability: Time?,
104
- payer_name: String?,
105
- status: WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::status,
106
- trace_code: String?
107
- ) -> void
193
+ attr_accessor company_id: String?
108
194
 
109
- def to_hash: -> {
110
- id: String,
111
- created_at: Time,
112
- error_code: WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::error_code?,
113
- error_message: String?,
114
- estimated_availability: Time?,
115
- payer_name: String?,
116
- status: WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::status,
117
- trace_code: String?
118
- }
195
+ def initialize: (id: String, company_id: String?) -> void
119
196
 
120
- type error_code =
121
- :account_closed
122
- | :account_does_not_exist
123
- | :account_information_invalid
124
- | :account_number_invalid_region
125
- | :account_frozen
126
- | :account_lookup_failed
127
- | :account_not_found
128
- | :amount_out_of_bounds
129
- | :attributes_not_validated
130
- | :b2b_payments_prohibited
131
- | :bank_statement_required
132
- | :compliance_review
133
- | :currency_not_supported
134
- | :deposit_canceled
135
- | :deposit_failed
136
- | :deposit_rejected
137
- | :destination_unavailable
138
- | :exceeded_account_limit
139
- | :expired_quote
140
- | :generic_payout_error
141
- | :technical_problem
142
- | :identification_number_invalid
143
- | :invalid_account_number
144
- | :invalid_bank_code
145
- | :invalid_beneficiary
146
- | :invalid_branch_number
147
- | :invalid_branch_code
148
- | :invalid_phone_number
149
- | :invalid_routing_number
150
- | :invalid_swift_code
151
- | :invalid_company_details
152
- | :manual_cancelation
153
- | :misc_error
154
- | :missing_city_and_country
155
- | :missing_phone_number
156
- | :missing_remittance_info
157
- | :payee_name_invalid
158
- | :receiving_account_locked
159
- | :rejected_by_compliance
160
- | :rtp_not_supported
161
- | :non_transaction_account
162
- | :source_token_insufficient_funds
163
- | :ssn_invalid
164
- | :wallet_screenshot_required
165
- | :unsupported_region
166
-
167
- module ErrorCode
168
- extend WhopSDK::Internal::Type::Enum
169
-
170
- ACCOUNT_CLOSED: :account_closed
171
- ACCOUNT_DOES_NOT_EXIST: :account_does_not_exist
172
- ACCOUNT_INFORMATION_INVALID: :account_information_invalid
173
- ACCOUNT_NUMBER_INVALID_REGION: :account_number_invalid_region
174
- ACCOUNT_FROZEN: :account_frozen
175
- ACCOUNT_LOOKUP_FAILED: :account_lookup_failed
176
- ACCOUNT_NOT_FOUND: :account_not_found
177
- AMOUNT_OUT_OF_BOUNDS: :amount_out_of_bounds
178
- ATTRIBUTES_NOT_VALIDATED: :attributes_not_validated
179
- B2B_PAYMENTS_PROHIBITED: :b2b_payments_prohibited
180
- BANK_STATEMENT_REQUIRED: :bank_statement_required
181
- COMPLIANCE_REVIEW: :compliance_review
182
- CURRENCY_NOT_SUPPORTED: :currency_not_supported
183
- DEPOSIT_CANCELED: :deposit_canceled
184
- DEPOSIT_FAILED: :deposit_failed
185
- DEPOSIT_REJECTED: :deposit_rejected
186
- DESTINATION_UNAVAILABLE: :destination_unavailable
187
- EXCEEDED_ACCOUNT_LIMIT: :exceeded_account_limit
188
- EXPIRED_QUOTE: :expired_quote
189
- GENERIC_PAYOUT_ERROR: :generic_payout_error
190
- TECHNICAL_PROBLEM: :technical_problem
191
- IDENTIFICATION_NUMBER_INVALID: :identification_number_invalid
192
- INVALID_ACCOUNT_NUMBER: :invalid_account_number
193
- INVALID_BANK_CODE: :invalid_bank_code
194
- INVALID_BENEFICIARY: :invalid_beneficiary
195
- INVALID_BRANCH_NUMBER: :invalid_branch_number
196
- INVALID_BRANCH_CODE: :invalid_branch_code
197
- INVALID_PHONE_NUMBER: :invalid_phone_number
198
- INVALID_ROUTING_NUMBER: :invalid_routing_number
199
- INVALID_SWIFT_CODE: :invalid_swift_code
200
- INVALID_COMPANY_DETAILS: :invalid_company_details
201
- MANUAL_CANCELATION: :manual_cancelation
202
- MISC_ERROR: :misc_error
203
- MISSING_CITY_AND_COUNTRY: :missing_city_and_country
204
- MISSING_PHONE_NUMBER: :missing_phone_number
205
- MISSING_REMITTANCE_INFO: :missing_remittance_info
206
- PAYEE_NAME_INVALID: :payee_name_invalid
207
- RECEIVING_ACCOUNT_LOCKED: :receiving_account_locked
208
- REJECTED_BY_COMPLIANCE: :rejected_by_compliance
209
- RTP_NOT_SUPPORTED: :rtp_not_supported
210
- NON_TRANSACTION_ACCOUNT: :non_transaction_account
211
- SOURCE_TOKEN_INSUFFICIENT_FUNDS: :source_token_insufficient_funds
212
- SSN_INVALID: :ssn_invalid
213
- WALLET_SCREENSHOT_REQUIRED: :wallet_screenshot_required
214
- UNSUPPORTED_REGION: :unsupported_region
215
-
216
- def self?.values: -> ::Array[WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::error_code]
217
- end
218
-
219
- type status =
220
- :scheduled
221
- | :pending
222
- | :processing
223
- | :completed
224
- | :canceled
225
- | :ready_for_pickup
226
- | :hold
227
- | :error
228
- | :expired
229
-
230
- module Status
231
- extend WhopSDK::Internal::Type::Enum
232
-
233
- SCHEDULED: :scheduled
234
- PENDING: :pending
235
- PROCESSING: :processing
236
- COMPLETED: :completed
237
- CANCELED: :canceled
238
- READY_FOR_PICKUP: :ready_for_pickup
239
- HOLD: :hold
240
- ERROR: :error
241
- EXPIRED: :expired
242
-
243
- def self?.values: -> ::Array[WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::status]
244
- end
197
+ def to_hash: -> { id: String, company_id: String? }
245
198
  end
246
199
 
247
200
  type payout_token =
@@ -250,7 +203,7 @@ module WhopSDK
250
203
  created_at: Time,
251
204
  destination_currency_code: String,
252
205
  nickname: String?,
253
- status: WhopSDK::Models::WithdrawalRetrieveResponse::PayoutToken::status
206
+ payer_name: String?
254
207
  }
255
208
 
256
209
  class PayoutToken < WhopSDK::Internal::Type::BaseModel
@@ -262,14 +215,14 @@ module WhopSDK
262
215
 
263
216
  attr_accessor nickname: String?
264
217
 
265
- attr_accessor status: WhopSDK::Models::WithdrawalRetrieveResponse::PayoutToken::status
218
+ attr_accessor payer_name: String?
266
219
 
267
220
  def initialize: (
268
221
  id: String,
269
222
  created_at: Time,
270
223
  destination_currency_code: String,
271
224
  nickname: String?,
272
- status: WhopSDK::Models::WithdrawalRetrieveResponse::PayoutToken::status
225
+ payer_name: String?
273
226
  ) -> void
274
227
 
275
228
  def to_hash: -> {
@@ -277,20 +230,8 @@ module WhopSDK
277
230
  created_at: Time,
278
231
  destination_currency_code: String,
279
232
  nickname: String?,
280
- status: WhopSDK::Models::WithdrawalRetrieveResponse::PayoutToken::status
233
+ payer_name: String?
281
234
  }
282
-
283
- type status = :created | :active | :broken
284
-
285
- module Status
286
- extend WhopSDK::Internal::Type::Enum
287
-
288
- CREATED: :created
289
- ACTIVE: :active
290
- BROKEN: :broken
291
-
292
- def self?.values: -> ::Array[WhopSDK::Models::WithdrawalRetrieveResponse::PayoutToken::status]
293
- end
294
235
  end
295
236
  end
296
237
  end
@@ -0,0 +1,275 @@
1
+ module WhopSDK
2
+ module Models
3
+ type withdrawal_updated_webhook_event =
4
+ {
5
+ id: String,
6
+ api_version: :v1,
7
+ data: WhopSDK::WithdrawalUpdatedWebhookEvent::Data,
8
+ timestamp: Time,
9
+ type: :"withdrawal.updated"
10
+ }
11
+
12
+ class WithdrawalUpdatedWebhookEvent < WhopSDK::Internal::Type::BaseModel
13
+ attr_accessor id: String
14
+
15
+ attr_accessor api_version: :v1
16
+
17
+ attr_accessor data: WhopSDK::WithdrawalUpdatedWebhookEvent::Data
18
+
19
+ attr_accessor timestamp: Time
20
+
21
+ attr_accessor type: :"withdrawal.updated"
22
+
23
+ def initialize: (
24
+ id: String,
25
+ data: WhopSDK::WithdrawalUpdatedWebhookEvent::Data,
26
+ timestamp: Time,
27
+ ?api_version: :v1,
28
+ ?type: :"withdrawal.updated"
29
+ ) -> void
30
+
31
+ def to_hash: -> {
32
+ id: String,
33
+ api_version: :v1,
34
+ data: WhopSDK::WithdrawalUpdatedWebhookEvent::Data,
35
+ timestamp: Time,
36
+ type: :"withdrawal.updated"
37
+ }
38
+
39
+ type data =
40
+ {
41
+ id: String,
42
+ amount: Float,
43
+ created_at: Time,
44
+ currency: WhopSDK::Models::currency,
45
+ error_code: WhopSDK::Models::WithdrawalUpdatedWebhookEvent::Data::error_code?,
46
+ error_message: String?,
47
+ estimated_availability: Time?,
48
+ fee_amount: Float,
49
+ fee_type: WhopSDK::Models::withdrawal_fee_types?,
50
+ ledger_account: WhopSDK::WithdrawalUpdatedWebhookEvent::Data::LedgerAccount,
51
+ payout_token: WhopSDK::WithdrawalUpdatedWebhookEvent::Data::PayoutToken?,
52
+ speed: WhopSDK::Models::withdrawal_speeds,
53
+ status: WhopSDK::Models::withdrawal_status,
54
+ trace_code: String?,
55
+ withdrawal_type: WhopSDK::Models::withdrawal_types
56
+ }
57
+
58
+ class Data < WhopSDK::Internal::Type::BaseModel
59
+ attr_accessor id: String
60
+
61
+ attr_accessor amount: Float
62
+
63
+ attr_accessor created_at: Time
64
+
65
+ attr_accessor currency: WhopSDK::Models::currency
66
+
67
+ attr_accessor error_code: WhopSDK::Models::WithdrawalUpdatedWebhookEvent::Data::error_code?
68
+
69
+ attr_accessor error_message: String?
70
+
71
+ attr_accessor estimated_availability: Time?
72
+
73
+ attr_accessor fee_amount: Float
74
+
75
+ attr_accessor fee_type: WhopSDK::Models::withdrawal_fee_types?
76
+
77
+ attr_accessor ledger_account: WhopSDK::WithdrawalUpdatedWebhookEvent::Data::LedgerAccount
78
+
79
+ attr_accessor payout_token: WhopSDK::WithdrawalUpdatedWebhookEvent::Data::PayoutToken?
80
+
81
+ attr_accessor speed: WhopSDK::Models::withdrawal_speeds
82
+
83
+ attr_accessor status: WhopSDK::Models::withdrawal_status
84
+
85
+ attr_accessor trace_code: String?
86
+
87
+ attr_accessor withdrawal_type: WhopSDK::Models::withdrawal_types
88
+
89
+ def initialize: (
90
+ id: String,
91
+ amount: Float,
92
+ created_at: Time,
93
+ currency: WhopSDK::Models::currency,
94
+ error_code: WhopSDK::Models::WithdrawalUpdatedWebhookEvent::Data::error_code?,
95
+ error_message: String?,
96
+ estimated_availability: Time?,
97
+ fee_amount: Float,
98
+ fee_type: WhopSDK::Models::withdrawal_fee_types?,
99
+ ledger_account: WhopSDK::WithdrawalUpdatedWebhookEvent::Data::LedgerAccount,
100
+ payout_token: WhopSDK::WithdrawalUpdatedWebhookEvent::Data::PayoutToken?,
101
+ speed: WhopSDK::Models::withdrawal_speeds,
102
+ status: WhopSDK::Models::withdrawal_status,
103
+ trace_code: String?,
104
+ withdrawal_type: WhopSDK::Models::withdrawal_types
105
+ ) -> void
106
+
107
+ def to_hash: -> {
108
+ id: String,
109
+ amount: Float,
110
+ created_at: Time,
111
+ currency: WhopSDK::Models::currency,
112
+ error_code: WhopSDK::Models::WithdrawalUpdatedWebhookEvent::Data::error_code?,
113
+ error_message: String?,
114
+ estimated_availability: Time?,
115
+ fee_amount: Float,
116
+ fee_type: WhopSDK::Models::withdrawal_fee_types?,
117
+ ledger_account: WhopSDK::WithdrawalUpdatedWebhookEvent::Data::LedgerAccount,
118
+ payout_token: WhopSDK::WithdrawalUpdatedWebhookEvent::Data::PayoutToken?,
119
+ speed: WhopSDK::Models::withdrawal_speeds,
120
+ status: WhopSDK::Models::withdrawal_status,
121
+ trace_code: String?,
122
+ withdrawal_type: WhopSDK::Models::withdrawal_types
123
+ }
124
+
125
+ type error_code =
126
+ :account_closed
127
+ | :account_does_not_exist
128
+ | :account_information_invalid
129
+ | :account_number_invalid_region
130
+ | :account_frozen
131
+ | :account_lookup_failed
132
+ | :account_not_found
133
+ | :amount_out_of_bounds
134
+ | :attributes_not_validated
135
+ | :b2b_payments_prohibited
136
+ | :bank_statement_required
137
+ | :compliance_review
138
+ | :currency_not_supported
139
+ | :deposit_canceled
140
+ | :deposit_failed
141
+ | :deposit_rejected
142
+ | :destination_unavailable
143
+ | :exceeded_account_limit
144
+ | :expired_quote
145
+ | :generic_payout_error
146
+ | :technical_problem
147
+ | :identification_number_invalid
148
+ | :invalid_account_number
149
+ | :invalid_bank_code
150
+ | :invalid_beneficiary
151
+ | :invalid_branch_number
152
+ | :invalid_branch_code
153
+ | :invalid_phone_number
154
+ | :invalid_routing_number
155
+ | :invalid_swift_code
156
+ | :invalid_company_details
157
+ | :manual_cancelation
158
+ | :misc_error
159
+ | :missing_city_and_country
160
+ | :missing_phone_number
161
+ | :missing_remittance_info
162
+ | :payee_name_invalid
163
+ | :receiving_account_locked
164
+ | :rejected_by_compliance
165
+ | :rtp_not_supported
166
+ | :non_transaction_account
167
+ | :source_token_insufficient_funds
168
+ | :ssn_invalid
169
+ | :wallet_screenshot_required
170
+ | :unsupported_region
171
+
172
+ module ErrorCode
173
+ extend WhopSDK::Internal::Type::Enum
174
+
175
+ ACCOUNT_CLOSED: :account_closed
176
+ ACCOUNT_DOES_NOT_EXIST: :account_does_not_exist
177
+ ACCOUNT_INFORMATION_INVALID: :account_information_invalid
178
+ ACCOUNT_NUMBER_INVALID_REGION: :account_number_invalid_region
179
+ ACCOUNT_FROZEN: :account_frozen
180
+ ACCOUNT_LOOKUP_FAILED: :account_lookup_failed
181
+ ACCOUNT_NOT_FOUND: :account_not_found
182
+ AMOUNT_OUT_OF_BOUNDS: :amount_out_of_bounds
183
+ ATTRIBUTES_NOT_VALIDATED: :attributes_not_validated
184
+ B2B_PAYMENTS_PROHIBITED: :b2b_payments_prohibited
185
+ BANK_STATEMENT_REQUIRED: :bank_statement_required
186
+ COMPLIANCE_REVIEW: :compliance_review
187
+ CURRENCY_NOT_SUPPORTED: :currency_not_supported
188
+ DEPOSIT_CANCELED: :deposit_canceled
189
+ DEPOSIT_FAILED: :deposit_failed
190
+ DEPOSIT_REJECTED: :deposit_rejected
191
+ DESTINATION_UNAVAILABLE: :destination_unavailable
192
+ EXCEEDED_ACCOUNT_LIMIT: :exceeded_account_limit
193
+ EXPIRED_QUOTE: :expired_quote
194
+ GENERIC_PAYOUT_ERROR: :generic_payout_error
195
+ TECHNICAL_PROBLEM: :technical_problem
196
+ IDENTIFICATION_NUMBER_INVALID: :identification_number_invalid
197
+ INVALID_ACCOUNT_NUMBER: :invalid_account_number
198
+ INVALID_BANK_CODE: :invalid_bank_code
199
+ INVALID_BENEFICIARY: :invalid_beneficiary
200
+ INVALID_BRANCH_NUMBER: :invalid_branch_number
201
+ INVALID_BRANCH_CODE: :invalid_branch_code
202
+ INVALID_PHONE_NUMBER: :invalid_phone_number
203
+ INVALID_ROUTING_NUMBER: :invalid_routing_number
204
+ INVALID_SWIFT_CODE: :invalid_swift_code
205
+ INVALID_COMPANY_DETAILS: :invalid_company_details
206
+ MANUAL_CANCELATION: :manual_cancelation
207
+ MISC_ERROR: :misc_error
208
+ MISSING_CITY_AND_COUNTRY: :missing_city_and_country
209
+ MISSING_PHONE_NUMBER: :missing_phone_number
210
+ MISSING_REMITTANCE_INFO: :missing_remittance_info
211
+ PAYEE_NAME_INVALID: :payee_name_invalid
212
+ RECEIVING_ACCOUNT_LOCKED: :receiving_account_locked
213
+ REJECTED_BY_COMPLIANCE: :rejected_by_compliance
214
+ RTP_NOT_SUPPORTED: :rtp_not_supported
215
+ NON_TRANSACTION_ACCOUNT: :non_transaction_account
216
+ SOURCE_TOKEN_INSUFFICIENT_FUNDS: :source_token_insufficient_funds
217
+ SSN_INVALID: :ssn_invalid
218
+ WALLET_SCREENSHOT_REQUIRED: :wallet_screenshot_required
219
+ UNSUPPORTED_REGION: :unsupported_region
220
+
221
+ def self?.values: -> ::Array[WhopSDK::Models::WithdrawalUpdatedWebhookEvent::Data::error_code]
222
+ end
223
+
224
+ type ledger_account = { id: String, company_id: String? }
225
+
226
+ class LedgerAccount < WhopSDK::Internal::Type::BaseModel
227
+ attr_accessor id: String
228
+
229
+ attr_accessor company_id: String?
230
+
231
+ def initialize: (id: String, company_id: String?) -> void
232
+
233
+ def to_hash: -> { id: String, company_id: String? }
234
+ end
235
+
236
+ type payout_token =
237
+ {
238
+ id: String,
239
+ created_at: Time,
240
+ destination_currency_code: String,
241
+ nickname: String?,
242
+ payer_name: String?
243
+ }
244
+
245
+ class PayoutToken < WhopSDK::Internal::Type::BaseModel
246
+ attr_accessor id: String
247
+
248
+ attr_accessor created_at: Time
249
+
250
+ attr_accessor destination_currency_code: String
251
+
252
+ attr_accessor nickname: String?
253
+
254
+ attr_accessor payer_name: String?
255
+
256
+ def initialize: (
257
+ id: String,
258
+ created_at: Time,
259
+ destination_currency_code: String,
260
+ nickname: String?,
261
+ payer_name: String?
262
+ ) -> void
263
+
264
+ def to_hash: -> {
265
+ id: String,
266
+ created_at: Time,
267
+ destination_currency_code: String,
268
+ nickname: String?,
269
+ payer_name: String?
270
+ }
271
+ end
272
+ end
273
+ end
274
+ end
275
+ end
@@ -471,6 +471,8 @@ module WhopSDK
471
471
 
472
472
  module WhoCanReact = WhopSDK::Models::WhoCanReact
473
473
 
474
+ class WithdrawalCreatedWebhookEvent = WhopSDK::Models::WithdrawalCreatedWebhookEvent
475
+
474
476
  module WithdrawalFeeTypes = WhopSDK::Models::WithdrawalFeeTypes
475
477
 
476
478
  class WithdrawalListParams = WhopSDK::Models::WithdrawalListParams
@@ -482,4 +484,6 @@ module WhopSDK
482
484
  module WithdrawalStatus = WhopSDK::Models::WithdrawalStatus
483
485
 
484
486
  module WithdrawalTypes = WhopSDK::Models::WithdrawalTypes
487
+
488
+ class WithdrawalUpdatedWebhookEvent = WhopSDK::Models::WithdrawalUpdatedWebhookEvent
485
489
  end