whop_sdk 0.0.7 → 0.0.8

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 (157) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +19 -0
  3. data/README.md +7 -7
  4. data/lib/whop_sdk/client.rb +8 -0
  5. data/lib/whop_sdk/internal/type/base_model.rb +1 -1
  6. data/lib/whop_sdk/models/app.rb +9 -1
  7. data/lib/whop_sdk/models/app_list_params.rb +9 -1
  8. data/lib/whop_sdk/models/app_list_response.rb +9 -1
  9. data/lib/whop_sdk/models/app_type.rb +18 -0
  10. data/lib/whop_sdk/models/app_update_params.rb +9 -1
  11. data/lib/whop_sdk/models/checkout_configuration.rb +69 -7
  12. data/lib/whop_sdk/models/checkout_configuration_create_params.rb +73 -1
  13. data/lib/whop_sdk/models/checkout_configuration_list_response.rb +69 -7
  14. data/lib/whop_sdk/models/checkout_modes.rb +16 -0
  15. data/lib/whop_sdk/models/course.rb +9 -1
  16. data/lib/whop_sdk/models/course_lesson_list_response.rb +9 -1
  17. data/lib/whop_sdk/models/course_lesson_mark_as_completed_params.rb +14 -0
  18. data/lib/whop_sdk/models/course_lesson_mark_as_completed_response.rb +8 -0
  19. data/lib/whop_sdk/models/course_lesson_start_params.rb +14 -0
  20. data/lib/whop_sdk/models/course_lesson_start_response.rb +8 -0
  21. data/lib/whop_sdk/models/course_lesson_submit_assessment_params.rb +52 -0
  22. data/lib/whop_sdk/models/course_lesson_submit_assessment_response.rb +151 -0
  23. data/lib/whop_sdk/models/course_list_response.rb +9 -1
  24. data/lib/whop_sdk/models/forum_post_create_params.rb +3 -14
  25. data/lib/whop_sdk/models/forum_post_update_params.rb +3 -14
  26. data/lib/whop_sdk/models/forum_post_visibility_type.rb +16 -0
  27. data/lib/whop_sdk/models/lesson.rb +104 -2
  28. data/lib/whop_sdk/models/payment_provider.rb +22 -0
  29. data/lib/whop_sdk/models/refund_created_webhook_event.rb +354 -0
  30. data/lib/whop_sdk/models/refund_list_params.rb +62 -0
  31. data/lib/whop_sdk/models/refund_list_response.rb +113 -0
  32. data/lib/whop_sdk/models/refund_reference_status.rb +17 -0
  33. data/lib/whop_sdk/models/refund_reference_type.rb +17 -0
  34. data/lib/whop_sdk/models/refund_retrieve_params.rb +14 -0
  35. data/lib/whop_sdk/models/refund_retrieve_response.rb +307 -0
  36. data/lib/whop_sdk/models/refund_status.rb +19 -0
  37. data/lib/whop_sdk/models/refund_updated_webhook_event.rb +354 -0
  38. data/lib/whop_sdk/models/unwrap_webhook_event.rb +5 -1
  39. data/lib/whop_sdk/models/withdrawal_fee_types.rb +16 -0
  40. data/lib/whop_sdk/models/withdrawal_list_params.rb +78 -0
  41. data/lib/whop_sdk/models/withdrawal_list_response.rb +87 -0
  42. data/lib/whop_sdk/models/withdrawal_retrieve_params.rb +14 -0
  43. data/lib/whop_sdk/models/withdrawal_retrieve_response.rb +320 -0
  44. data/lib/whop_sdk/models/withdrawal_speeds.rb +16 -0
  45. data/lib/whop_sdk/models/withdrawal_status.rb +21 -0
  46. data/lib/whop_sdk/models/withdrawal_types.rb +16 -0
  47. data/lib/whop_sdk/models.rb +40 -0
  48. data/lib/whop_sdk/resources/apps.rb +6 -2
  49. data/lib/whop_sdk/resources/checkout_configurations.rb +11 -1
  50. data/lib/whop_sdk/resources/course_lessons.rb +64 -0
  51. data/lib/whop_sdk/resources/forum_posts.rb +2 -2
  52. data/lib/whop_sdk/resources/refunds.rb +78 -0
  53. data/lib/whop_sdk/resources/webhooks.rb +1 -1
  54. data/lib/whop_sdk/resources/withdrawals.rb +79 -0
  55. data/lib/whop_sdk/version.rb +1 -1
  56. data/lib/whop_sdk.rb +29 -0
  57. data/rbi/whop_sdk/client.rbi +6 -0
  58. data/rbi/whop_sdk/models/app.rbi +8 -0
  59. data/rbi/whop_sdk/models/app_list_params.rbi +8 -0
  60. data/rbi/whop_sdk/models/app_list_response.rbi +8 -0
  61. data/rbi/whop_sdk/models/app_type.rbi +22 -0
  62. data/rbi/whop_sdk/models/app_update_params.rbi +8 -0
  63. data/rbi/whop_sdk/models/checkout_configuration.rbi +117 -7
  64. data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +116 -0
  65. data/rbi/whop_sdk/models/checkout_configuration_list_response.rbi +127 -7
  66. data/rbi/whop_sdk/models/checkout_modes.rbi +20 -0
  67. data/rbi/whop_sdk/models/course.rbi +8 -0
  68. data/rbi/whop_sdk/models/course_lesson_list_response.rbi +8 -0
  69. data/rbi/whop_sdk/models/course_lesson_mark_as_completed_params.rbi +30 -0
  70. data/rbi/whop_sdk/models/course_lesson_mark_as_completed_response.rbi +8 -0
  71. data/rbi/whop_sdk/models/course_lesson_start_params.rbi +27 -0
  72. data/rbi/whop_sdk/models/course_lesson_start_response.rbi +8 -0
  73. data/rbi/whop_sdk/models/course_lesson_submit_assessment_params.rbi +104 -0
  74. data/rbi/whop_sdk/models/course_lesson_submit_assessment_response.rbi +222 -0
  75. data/rbi/whop_sdk/models/course_list_response.rbi +8 -0
  76. data/rbi/whop_sdk/models/forum_post_create_params.rbi +3 -37
  77. data/rbi/whop_sdk/models/forum_post_update_params.rbi +3 -37
  78. data/rbi/whop_sdk/models/forum_post_visibility_type.rbi +27 -0
  79. data/rbi/whop_sdk/models/lesson.rbi +115 -3
  80. data/rbi/whop_sdk/models/payment_provider.rbi +27 -0
  81. data/rbi/whop_sdk/models/refund_created_webhook_event.rbi +561 -0
  82. data/rbi/whop_sdk/models/refund_list_params.rbi +83 -0
  83. data/rbi/whop_sdk/models/refund_list_response.rbi +155 -0
  84. data/rbi/whop_sdk/models/refund_reference_status.rbi +26 -0
  85. data/rbi/whop_sdk/models/refund_reference_type.rbi +36 -0
  86. data/rbi/whop_sdk/models/refund_retrieve_params.rbi +27 -0
  87. data/rbi/whop_sdk/models/refund_retrieve_response.rbi +484 -0
  88. data/rbi/whop_sdk/models/refund_status.rbi +24 -0
  89. data/rbi/whop_sdk/models/refund_updated_webhook_event.rbi +561 -0
  90. data/rbi/whop_sdk/models/unwrap_webhook_event.rbi +3 -1
  91. data/rbi/whop_sdk/models/withdrawal_fee_types.rbi +22 -0
  92. data/rbi/whop_sdk/models/withdrawal_list_params.rbi +99 -0
  93. data/rbi/whop_sdk/models/withdrawal_list_response.rbi +107 -0
  94. data/rbi/whop_sdk/models/withdrawal_retrieve_params.rbi +27 -0
  95. data/rbi/whop_sdk/models/withdrawal_retrieve_response.rbi +713 -0
  96. data/rbi/whop_sdk/models/withdrawal_speeds.rbi +22 -0
  97. data/rbi/whop_sdk/models/withdrawal_status.rbi +28 -0
  98. data/rbi/whop_sdk/models/withdrawal_types.rbi +20 -0
  99. data/rbi/whop_sdk/models.rbi +42 -0
  100. data/rbi/whop_sdk/resources/apps.rbi +6 -0
  101. data/rbi/whop_sdk/resources/checkout_configurations.rbi +15 -0
  102. data/rbi/whop_sdk/resources/course_lessons.rbi +48 -0
  103. data/rbi/whop_sdk/resources/forum_posts.rbi +2 -4
  104. data/rbi/whop_sdk/resources/refunds.rbi +68 -0
  105. data/rbi/whop_sdk/resources/webhooks.rbi +3 -1
  106. data/rbi/whop_sdk/resources/withdrawals.rbi +71 -0
  107. data/sig/whop_sdk/client.rbs +4 -0
  108. data/sig/whop_sdk/models/app.rbs +5 -0
  109. data/sig/whop_sdk/models/app_list_params.rbs +5 -0
  110. data/sig/whop_sdk/models/app_list_response.rbs +5 -0
  111. data/sig/whop_sdk/models/app_type.rbs +16 -0
  112. data/sig/whop_sdk/models/app_update_params.rbs +5 -0
  113. data/sig/whop_sdk/models/checkout_configuration.rbs +45 -8
  114. data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +43 -1
  115. data/sig/whop_sdk/models/checkout_configuration_list_response.rbs +45 -8
  116. data/sig/whop_sdk/models/checkout_modes.rbs +14 -0
  117. data/sig/whop_sdk/models/course.rbs +5 -0
  118. data/sig/whop_sdk/models/course_lesson_list_response.rbs +5 -0
  119. data/sig/whop_sdk/models/course_lesson_mark_as_completed_params.rbs +15 -0
  120. data/sig/whop_sdk/models/course_lesson_mark_as_completed_response.rbs +5 -0
  121. data/sig/whop_sdk/models/course_lesson_start_params.rbs +15 -0
  122. data/sig/whop_sdk/models/course_lesson_start_response.rbs +5 -0
  123. data/sig/whop_sdk/models/course_lesson_submit_assessment_params.rbs +51 -0
  124. data/sig/whop_sdk/models/course_lesson_submit_assessment_response.rbs +96 -0
  125. data/sig/whop_sdk/models/course_list_response.rbs +5 -0
  126. data/sig/whop_sdk/models/forum_post_create_params.rbs +4 -15
  127. data/sig/whop_sdk/models/forum_post_update_params.rbs +4 -15
  128. data/sig/whop_sdk/models/forum_post_visibility_type.rbs +14 -0
  129. data/sig/whop_sdk/models/lesson.rbs +79 -3
  130. data/sig/whop_sdk/models/payment_provider.rbs +28 -0
  131. data/sig/whop_sdk/models/refund_created_webhook_event.rbs +252 -0
  132. data/sig/whop_sdk/models/refund_list_params.rbs +51 -0
  133. data/sig/whop_sdk/models/refund_list_response.rbs +80 -0
  134. data/sig/whop_sdk/models/refund_reference_status.rbs +15 -0
  135. data/sig/whop_sdk/models/refund_reference_type.rbs +18 -0
  136. data/sig/whop_sdk/models/refund_retrieve_params.rbs +15 -0
  137. data/sig/whop_sdk/models/refund_retrieve_response.rbs +215 -0
  138. data/sig/whop_sdk/models/refund_status.rbs +18 -0
  139. data/sig/whop_sdk/models/refund_updated_webhook_event.rbs +252 -0
  140. data/sig/whop_sdk/models/unwrap_webhook_event.rbs +2 -0
  141. data/sig/whop_sdk/models/withdrawal_fee_types.rbs +14 -0
  142. data/sig/whop_sdk/models/withdrawal_list_params.rbs +61 -0
  143. data/sig/whop_sdk/models/withdrawal_list_response.rbs +60 -0
  144. data/sig/whop_sdk/models/withdrawal_retrieve_params.rbs +15 -0
  145. data/sig/whop_sdk/models/withdrawal_retrieve_response.rbs +297 -0
  146. data/sig/whop_sdk/models/withdrawal_speeds.rbs +14 -0
  147. data/sig/whop_sdk/models/withdrawal_status.rbs +26 -0
  148. data/sig/whop_sdk/models/withdrawal_types.rbs +14 -0
  149. data/sig/whop_sdk/models.rbs +40 -0
  150. data/sig/whop_sdk/resources/apps.rbs +2 -0
  151. data/sig/whop_sdk/resources/checkout_configurations.rbs +3 -0
  152. data/sig/whop_sdk/resources/course_lessons.rbs +16 -0
  153. data/sig/whop_sdk/resources/forum_posts.rbs +2 -2
  154. data/sig/whop_sdk/resources/refunds.rbs +22 -0
  155. data/sig/whop_sdk/resources/webhooks.rbs +3 -1
  156. data/sig/whop_sdk/resources/withdrawals.rbs +24 -0
  157. metadata +89 -2
@@ -0,0 +1,713 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ class WithdrawalRetrieveResponse < WhopSDK::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ WhopSDK::Models::WithdrawalRetrieveResponse,
10
+ WhopSDK::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ # Internal ID of the withdrawal request.
15
+ sig { returns(String) }
16
+ attr_accessor :id
17
+
18
+ # How much money was attempted to be withdrawn, in a float type.
19
+ sig { returns(Float) }
20
+ attr_accessor :amount
21
+
22
+ # When the withdrawal request was created.
23
+ sig { returns(Time) }
24
+ attr_accessor :created_at
25
+
26
+ # The currency of the withdrawal request.
27
+ sig { returns(WhopSDK::Currency::TaggedSymbol) }
28
+ attr_accessor :currency
29
+
30
+ # The fee amount that was charged for the withdrawal. This is in the same currency
31
+ # as the withdrawal amount.
32
+ sig { returns(Float) }
33
+ attr_accessor :fee_amount
34
+
35
+ # The different fee types for a withdrawal.
36
+ sig { returns(T.nilable(WhopSDK::WithdrawalFeeTypes::TaggedSymbol)) }
37
+ attr_accessor :fee_type
38
+
39
+ # The latest payout associated with this withdrawal, if any.
40
+ sig do
41
+ returns(
42
+ T.nilable(WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout)
43
+ )
44
+ end
45
+ attr_reader :latest_payout
46
+
47
+ sig do
48
+ params(
49
+ latest_payout:
50
+ T.nilable(
51
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::OrHash
52
+ )
53
+ ).void
54
+ end
55
+ attr_writer :latest_payout
56
+
57
+ # The payout token used for the withdrawal, if applicable.
58
+ sig do
59
+ returns(
60
+ T.nilable(WhopSDK::Models::WithdrawalRetrieveResponse::PayoutToken)
61
+ )
62
+ end
63
+ attr_reader :payout_token
64
+
65
+ sig do
66
+ params(
67
+ payout_token:
68
+ T.nilable(
69
+ WhopSDK::Models::WithdrawalRetrieveResponse::PayoutToken::OrHash
70
+ )
71
+ ).void
72
+ end
73
+ attr_writer :payout_token
74
+
75
+ # The speed of the withdrawal.
76
+ sig { returns(WhopSDK::WithdrawalSpeeds::TaggedSymbol) }
77
+ attr_accessor :speed
78
+
79
+ # Status of the withdrawal.
80
+ sig { returns(WhopSDK::WithdrawalStatus::TaggedSymbol) }
81
+ attr_accessor :status
82
+
83
+ # The type of withdrawal.
84
+ sig { returns(WhopSDK::WithdrawalTypes::TaggedSymbol) }
85
+ attr_accessor :withdrawal_type
86
+
87
+ # A withdrawal request.
88
+ sig do
89
+ params(
90
+ id: String,
91
+ amount: Float,
92
+ created_at: Time,
93
+ currency: WhopSDK::Currency::OrSymbol,
94
+ fee_amount: Float,
95
+ fee_type: T.nilable(WhopSDK::WithdrawalFeeTypes::OrSymbol),
96
+ latest_payout:
97
+ T.nilable(
98
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::OrHash
99
+ ),
100
+ payout_token:
101
+ T.nilable(
102
+ WhopSDK::Models::WithdrawalRetrieveResponse::PayoutToken::OrHash
103
+ ),
104
+ speed: WhopSDK::WithdrawalSpeeds::OrSymbol,
105
+ status: WhopSDK::WithdrawalStatus::OrSymbol,
106
+ withdrawal_type: WhopSDK::WithdrawalTypes::OrSymbol
107
+ ).returns(T.attached_class)
108
+ end
109
+ def self.new(
110
+ # Internal ID of the withdrawal request.
111
+ id:,
112
+ # How much money was attempted to be withdrawn, in a float type.
113
+ amount:,
114
+ # When the withdrawal request was created.
115
+ created_at:,
116
+ # The currency of the withdrawal request.
117
+ currency:,
118
+ # The fee amount that was charged for the withdrawal. This is in the same currency
119
+ # as the withdrawal amount.
120
+ fee_amount:,
121
+ # The different fee types for a withdrawal.
122
+ fee_type:,
123
+ # The latest payout associated with this withdrawal, if any.
124
+ latest_payout:,
125
+ # The payout token used for the withdrawal, if applicable.
126
+ payout_token:,
127
+ # The speed of the withdrawal.
128
+ speed:,
129
+ # Status of the withdrawal.
130
+ status:,
131
+ # The type of withdrawal.
132
+ withdrawal_type:
133
+ )
134
+ end
135
+
136
+ sig do
137
+ override.returns(
138
+ {
139
+ id: String,
140
+ amount: Float,
141
+ created_at: Time,
142
+ currency: WhopSDK::Currency::TaggedSymbol,
143
+ fee_amount: Float,
144
+ fee_type: T.nilable(WhopSDK::WithdrawalFeeTypes::TaggedSymbol),
145
+ latest_payout:
146
+ T.nilable(
147
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout
148
+ ),
149
+ payout_token:
150
+ T.nilable(
151
+ WhopSDK::Models::WithdrawalRetrieveResponse::PayoutToken
152
+ ),
153
+ speed: WhopSDK::WithdrawalSpeeds::TaggedSymbol,
154
+ status: WhopSDK::WithdrawalStatus::TaggedSymbol,
155
+ withdrawal_type: WhopSDK::WithdrawalTypes::TaggedSymbol
156
+ }
157
+ )
158
+ end
159
+ def to_hash
160
+ end
161
+
162
+ class LatestPayout < WhopSDK::Internal::Type::BaseModel
163
+ OrHash =
164
+ T.type_alias do
165
+ T.any(
166
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout,
167
+ WhopSDK::Internal::AnyHash
168
+ )
169
+ end
170
+
171
+ # The internal ID of the payout.
172
+ sig { returns(String) }
173
+ attr_accessor :id
174
+
175
+ # The date and time the payout was created.
176
+ sig { returns(Time) }
177
+ attr_accessor :created_at
178
+
179
+ # The different error codes a payout can be in.
180
+ sig do
181
+ returns(
182
+ T.nilable(
183
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
184
+ )
185
+ )
186
+ end
187
+ attr_accessor :error_code
188
+
189
+ # The error message for the payout.
190
+ sig { returns(T.nilable(String)) }
191
+ attr_accessor :error_message
192
+
193
+ # The estimated availability date of the payout.
194
+ sig { returns(T.nilable(Time)) }
195
+ attr_accessor :estimated_availability
196
+
197
+ # The name of the payer for the payout.
198
+ sig { returns(T.nilable(String)) }
199
+ attr_accessor :payer_name
200
+
201
+ # The status of the payout.
202
+ sig do
203
+ returns(
204
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::Status::TaggedSymbol
205
+ )
206
+ end
207
+ attr_accessor :status
208
+
209
+ # The trace code for the payout, if applicable. Provided on ACH transactions when
210
+ # available.
211
+ sig { returns(T.nilable(String)) }
212
+ attr_accessor :trace_code
213
+
214
+ # The latest payout associated with this withdrawal, if any.
215
+ sig do
216
+ params(
217
+ id: String,
218
+ created_at: Time,
219
+ error_code:
220
+ T.nilable(
221
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::OrSymbol
222
+ ),
223
+ error_message: T.nilable(String),
224
+ estimated_availability: T.nilable(Time),
225
+ payer_name: T.nilable(String),
226
+ status:
227
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::Status::OrSymbol,
228
+ trace_code: T.nilable(String)
229
+ ).returns(T.attached_class)
230
+ end
231
+ def self.new(
232
+ # The internal ID of the payout.
233
+ id:,
234
+ # The date and time the payout was created.
235
+ created_at:,
236
+ # The different error codes a payout can be in.
237
+ error_code:,
238
+ # The error message for the payout.
239
+ error_message:,
240
+ # The estimated availability date of the payout.
241
+ estimated_availability:,
242
+ # The name of the payer for the payout.
243
+ payer_name:,
244
+ # The status of the payout.
245
+ status:,
246
+ # The trace code for the payout, if applicable. Provided on ACH transactions when
247
+ # available.
248
+ trace_code:
249
+ )
250
+ end
251
+
252
+ sig do
253
+ override.returns(
254
+ {
255
+ id: String,
256
+ created_at: Time,
257
+ error_code:
258
+ T.nilable(
259
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
260
+ ),
261
+ error_message: T.nilable(String),
262
+ estimated_availability: T.nilable(Time),
263
+ payer_name: T.nilable(String),
264
+ status:
265
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::Status::TaggedSymbol,
266
+ trace_code: T.nilable(String)
267
+ }
268
+ )
269
+ end
270
+ def to_hash
271
+ end
272
+
273
+ # The different error codes a payout can be in.
274
+ module ErrorCode
275
+ extend WhopSDK::Internal::Type::Enum
276
+
277
+ TaggedSymbol =
278
+ T.type_alias do
279
+ T.all(
280
+ Symbol,
281
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode
282
+ )
283
+ end
284
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
285
+
286
+ ACCOUNT_CLOSED =
287
+ T.let(
288
+ :account_closed,
289
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
290
+ )
291
+ ACCOUNT_DOES_NOT_EXIST =
292
+ T.let(
293
+ :account_does_not_exist,
294
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
295
+ )
296
+ ACCOUNT_INFORMATION_INVALID =
297
+ T.let(
298
+ :account_information_invalid,
299
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
300
+ )
301
+ ACCOUNT_NUMBER_INVALID_REGION =
302
+ T.let(
303
+ :account_number_invalid_region,
304
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
305
+ )
306
+ ACCOUNT_FROZEN =
307
+ T.let(
308
+ :account_frozen,
309
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
310
+ )
311
+ ACCOUNT_LOOKUP_FAILED =
312
+ T.let(
313
+ :account_lookup_failed,
314
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
315
+ )
316
+ ACCOUNT_NOT_FOUND =
317
+ T.let(
318
+ :account_not_found,
319
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
320
+ )
321
+ AMOUNT_OUT_OF_BOUNDS =
322
+ T.let(
323
+ :amount_out_of_bounds,
324
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
325
+ )
326
+ ATTRIBUTES_NOT_VALIDATED =
327
+ T.let(
328
+ :attributes_not_validated,
329
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
330
+ )
331
+ B2B_PAYMENTS_PROHIBITED =
332
+ T.let(
333
+ :b2b_payments_prohibited,
334
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
335
+ )
336
+ BANK_STATEMENT_REQUIRED =
337
+ T.let(
338
+ :bank_statement_required,
339
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
340
+ )
341
+ COMPLIANCE_REVIEW =
342
+ T.let(
343
+ :compliance_review,
344
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
345
+ )
346
+ CURRENCY_NOT_SUPPORTED =
347
+ T.let(
348
+ :currency_not_supported,
349
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
350
+ )
351
+ DEPOSIT_CANCELED =
352
+ T.let(
353
+ :deposit_canceled,
354
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
355
+ )
356
+ DEPOSIT_FAILED =
357
+ T.let(
358
+ :deposit_failed,
359
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
360
+ )
361
+ DEPOSIT_REJECTED =
362
+ T.let(
363
+ :deposit_rejected,
364
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
365
+ )
366
+ DESTINATION_UNAVAILABLE =
367
+ T.let(
368
+ :destination_unavailable,
369
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
370
+ )
371
+ EXCEEDED_ACCOUNT_LIMIT =
372
+ T.let(
373
+ :exceeded_account_limit,
374
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
375
+ )
376
+ EXPIRED_QUOTE =
377
+ T.let(
378
+ :expired_quote,
379
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
380
+ )
381
+ GENERIC_PAYOUT_ERROR =
382
+ T.let(
383
+ :generic_payout_error,
384
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
385
+ )
386
+ TECHNICAL_PROBLEM =
387
+ T.let(
388
+ :technical_problem,
389
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
390
+ )
391
+ IDENTIFICATION_NUMBER_INVALID =
392
+ T.let(
393
+ :identification_number_invalid,
394
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
395
+ )
396
+ INVALID_ACCOUNT_NUMBER =
397
+ T.let(
398
+ :invalid_account_number,
399
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
400
+ )
401
+ INVALID_BANK_CODE =
402
+ T.let(
403
+ :invalid_bank_code,
404
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
405
+ )
406
+ INVALID_BENEFICIARY =
407
+ T.let(
408
+ :invalid_beneficiary,
409
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
410
+ )
411
+ INVALID_BRANCH_NUMBER =
412
+ T.let(
413
+ :invalid_branch_number,
414
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
415
+ )
416
+ INVALID_BRANCH_CODE =
417
+ T.let(
418
+ :invalid_branch_code,
419
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
420
+ )
421
+ INVALID_PHONE_NUMBER =
422
+ T.let(
423
+ :invalid_phone_number,
424
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
425
+ )
426
+ INVALID_ROUTING_NUMBER =
427
+ T.let(
428
+ :invalid_routing_number,
429
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
430
+ )
431
+ INVALID_SWIFT_CODE =
432
+ T.let(
433
+ :invalid_swift_code,
434
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
435
+ )
436
+ INVALID_COMPANY_DETAILS =
437
+ T.let(
438
+ :invalid_company_details,
439
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
440
+ )
441
+ MANUAL_CANCELATION =
442
+ T.let(
443
+ :manual_cancelation,
444
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
445
+ )
446
+ MISC_ERROR =
447
+ T.let(
448
+ :misc_error,
449
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
450
+ )
451
+ MISSING_CITY_AND_COUNTRY =
452
+ T.let(
453
+ :missing_city_and_country,
454
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
455
+ )
456
+ MISSING_PHONE_NUMBER =
457
+ T.let(
458
+ :missing_phone_number,
459
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
460
+ )
461
+ MISSING_REMITTANCE_INFO =
462
+ T.let(
463
+ :missing_remittance_info,
464
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
465
+ )
466
+ PAYEE_NAME_INVALID =
467
+ T.let(
468
+ :payee_name_invalid,
469
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
470
+ )
471
+ RECEIVING_ACCOUNT_LOCKED =
472
+ T.let(
473
+ :receiving_account_locked,
474
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
475
+ )
476
+ REJECTED_BY_COMPLIANCE =
477
+ T.let(
478
+ :rejected_by_compliance,
479
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
480
+ )
481
+ RTP_NOT_SUPPORTED =
482
+ T.let(
483
+ :rtp_not_supported,
484
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
485
+ )
486
+ NON_TRANSACTION_ACCOUNT =
487
+ T.let(
488
+ :non_transaction_account,
489
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
490
+ )
491
+ SOURCE_TOKEN_INSUFFICIENT_FUNDS =
492
+ T.let(
493
+ :source_token_insufficient_funds,
494
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
495
+ )
496
+ SSN_INVALID =
497
+ T.let(
498
+ :ssn_invalid,
499
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
500
+ )
501
+ WALLET_SCREENSHOT_REQUIRED =
502
+ T.let(
503
+ :wallet_screenshot_required,
504
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
505
+ )
506
+ UNSUPPORTED_REGION =
507
+ T.let(
508
+ :unsupported_region,
509
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
510
+ )
511
+
512
+ sig do
513
+ override.returns(
514
+ T::Array[
515
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::ErrorCode::TaggedSymbol
516
+ ]
517
+ )
518
+ end
519
+ def self.values
520
+ end
521
+ end
522
+
523
+ # The status of the payout.
524
+ module Status
525
+ extend WhopSDK::Internal::Type::Enum
526
+
527
+ TaggedSymbol =
528
+ T.type_alias do
529
+ T.all(
530
+ Symbol,
531
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::Status
532
+ )
533
+ end
534
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
535
+
536
+ SCHEDULED =
537
+ T.let(
538
+ :scheduled,
539
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::Status::TaggedSymbol
540
+ )
541
+ PENDING =
542
+ T.let(
543
+ :pending,
544
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::Status::TaggedSymbol
545
+ )
546
+ PROCESSING =
547
+ T.let(
548
+ :processing,
549
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::Status::TaggedSymbol
550
+ )
551
+ COMPLETED =
552
+ T.let(
553
+ :completed,
554
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::Status::TaggedSymbol
555
+ )
556
+ CANCELED =
557
+ T.let(
558
+ :canceled,
559
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::Status::TaggedSymbol
560
+ )
561
+ READY_FOR_PICKUP =
562
+ T.let(
563
+ :ready_for_pickup,
564
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::Status::TaggedSymbol
565
+ )
566
+ HOLD =
567
+ T.let(
568
+ :hold,
569
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::Status::TaggedSymbol
570
+ )
571
+ ERROR =
572
+ T.let(
573
+ :error,
574
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::Status::TaggedSymbol
575
+ )
576
+ EXPIRED =
577
+ T.let(
578
+ :expired,
579
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::Status::TaggedSymbol
580
+ )
581
+
582
+ sig do
583
+ override.returns(
584
+ T::Array[
585
+ WhopSDK::Models::WithdrawalRetrieveResponse::LatestPayout::Status::TaggedSymbol
586
+ ]
587
+ )
588
+ end
589
+ def self.values
590
+ end
591
+ end
592
+ end
593
+
594
+ class PayoutToken < WhopSDK::Internal::Type::BaseModel
595
+ OrHash =
596
+ T.type_alias do
597
+ T.any(
598
+ WhopSDK::Models::WithdrawalRetrieveResponse::PayoutToken,
599
+ WhopSDK::Internal::AnyHash
600
+ )
601
+ end
602
+
603
+ # The ID of the payout token
604
+ sig { returns(String) }
605
+ attr_accessor :id
606
+
607
+ # The date and time the payout token was created
608
+ sig { returns(Time) }
609
+ attr_accessor :created_at
610
+
611
+ # The currency code of the payout destination. This is the currency that payouts
612
+ # will be made in for this token.
613
+ sig { returns(String) }
614
+ attr_accessor :destination_currency_code
615
+
616
+ # An optional nickname for the payout token to help the user identify it. This is
617
+ # not used by the provider and is only for the user's reference.
618
+ sig { returns(T.nilable(String)) }
619
+ attr_accessor :nickname
620
+
621
+ # The status of the payout token.
622
+ sig do
623
+ returns(
624
+ WhopSDK::Models::WithdrawalRetrieveResponse::PayoutToken::Status::TaggedSymbol
625
+ )
626
+ end
627
+ attr_accessor :status
628
+
629
+ # The payout token used for the withdrawal, if applicable.
630
+ sig do
631
+ params(
632
+ id: String,
633
+ created_at: Time,
634
+ destination_currency_code: String,
635
+ nickname: T.nilable(String),
636
+ status:
637
+ WhopSDK::Models::WithdrawalRetrieveResponse::PayoutToken::Status::OrSymbol
638
+ ).returns(T.attached_class)
639
+ end
640
+ def self.new(
641
+ # The ID of the payout token
642
+ id:,
643
+ # The date and time the payout token was created
644
+ created_at:,
645
+ # The currency code of the payout destination. This is the currency that payouts
646
+ # will be made in for this token.
647
+ destination_currency_code:,
648
+ # An optional nickname for the payout token to help the user identify it. This is
649
+ # not used by the provider and is only for the user's reference.
650
+ nickname:,
651
+ # The status of the payout token.
652
+ status:
653
+ )
654
+ end
655
+
656
+ sig do
657
+ override.returns(
658
+ {
659
+ id: String,
660
+ created_at: Time,
661
+ destination_currency_code: String,
662
+ nickname: T.nilable(String),
663
+ status:
664
+ WhopSDK::Models::WithdrawalRetrieveResponse::PayoutToken::Status::TaggedSymbol
665
+ }
666
+ )
667
+ end
668
+ def to_hash
669
+ end
670
+
671
+ # The status of the payout token.
672
+ module Status
673
+ extend WhopSDK::Internal::Type::Enum
674
+
675
+ TaggedSymbol =
676
+ T.type_alias do
677
+ T.all(
678
+ Symbol,
679
+ WhopSDK::Models::WithdrawalRetrieveResponse::PayoutToken::Status
680
+ )
681
+ end
682
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
683
+
684
+ CREATED =
685
+ T.let(
686
+ :created,
687
+ WhopSDK::Models::WithdrawalRetrieveResponse::PayoutToken::Status::TaggedSymbol
688
+ )
689
+ ACTIVE =
690
+ T.let(
691
+ :active,
692
+ WhopSDK::Models::WithdrawalRetrieveResponse::PayoutToken::Status::TaggedSymbol
693
+ )
694
+ BROKEN =
695
+ T.let(
696
+ :broken,
697
+ WhopSDK::Models::WithdrawalRetrieveResponse::PayoutToken::Status::TaggedSymbol
698
+ )
699
+
700
+ sig do
701
+ override.returns(
702
+ T::Array[
703
+ WhopSDK::Models::WithdrawalRetrieveResponse::PayoutToken::Status::TaggedSymbol
704
+ ]
705
+ )
706
+ end
707
+ def self.values
708
+ end
709
+ end
710
+ end
711
+ end
712
+ end
713
+ end