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,22 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # The different speeds of withdrawals
6
+ module WithdrawalSpeeds
7
+ extend WhopSDK::Internal::Type::Enum
8
+
9
+ TaggedSymbol = T.type_alias { T.all(Symbol, WhopSDK::WithdrawalSpeeds) }
10
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
11
+
12
+ STANDARD = T.let(:standard, WhopSDK::WithdrawalSpeeds::TaggedSymbol)
13
+ INSTANT = T.let(:instant, WhopSDK::WithdrawalSpeeds::TaggedSymbol)
14
+
15
+ sig do
16
+ override.returns(T::Array[WhopSDK::WithdrawalSpeeds::TaggedSymbol])
17
+ end
18
+ def self.values
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,28 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # The status of a withdrawal request
6
+ module WithdrawalStatus
7
+ extend WhopSDK::Internal::Type::Enum
8
+
9
+ TaggedSymbol = T.type_alias { T.all(Symbol, WhopSDK::WithdrawalStatus) }
10
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
11
+
12
+ REQUESTED = T.let(:requested, WhopSDK::WithdrawalStatus::TaggedSymbol)
13
+ AWAITING_PAYMENT =
14
+ T.let(:awaiting_payment, WhopSDK::WithdrawalStatus::TaggedSymbol)
15
+ IN_TRANSIT = T.let(:in_transit, WhopSDK::WithdrawalStatus::TaggedSymbol)
16
+ COMPLETED = T.let(:completed, WhopSDK::WithdrawalStatus::TaggedSymbol)
17
+ FAILED = T.let(:failed, WhopSDK::WithdrawalStatus::TaggedSymbol)
18
+ CANCELED = T.let(:canceled, WhopSDK::WithdrawalStatus::TaggedSymbol)
19
+ DENIED = T.let(:denied, WhopSDK::WithdrawalStatus::TaggedSymbol)
20
+
21
+ sig do
22
+ override.returns(T::Array[WhopSDK::WithdrawalStatus::TaggedSymbol])
23
+ end
24
+ def self.values
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,20 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # The types of withdrawals
6
+ module WithdrawalTypes
7
+ extend WhopSDK::Internal::Type::Enum
8
+
9
+ TaggedSymbol = T.type_alias { T.all(Symbol, WhopSDK::WithdrawalTypes) }
10
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
11
+
12
+ REGULAR = T.let(:regular, WhopSDK::WithdrawalTypes::TaggedSymbol)
13
+ CLAWBACK = T.let(:clawback, WhopSDK::WithdrawalTypes::TaggedSymbol)
14
+
15
+ sig { override.returns(T::Array[WhopSDK::WithdrawalTypes::TaggedSymbol]) }
16
+ def self.values
17
+ end
18
+ end
19
+ end
20
+ end
@@ -31,6 +31,8 @@ module WhopSDK
31
31
 
32
32
  AppStatuses = WhopSDK::Models::AppStatuses
33
33
 
34
+ AppType = WhopSDK::Models::AppType
35
+
34
36
  AppUpdateParams = WhopSDK::Models::AppUpdateParams
35
37
 
36
38
  AppViewType = WhopSDK::Models::AppViewType
@@ -68,6 +70,8 @@ module WhopSDK
68
70
  CheckoutConfigurationRetrieveParams =
69
71
  WhopSDK::Models::CheckoutConfigurationRetrieveParams
70
72
 
73
+ CheckoutModes = WhopSDK::Models::CheckoutModes
74
+
71
75
  CollectionMethod = WhopSDK::Models::CollectionMethod
72
76
 
73
77
  Company = WhopSDK::Models::Company
@@ -116,8 +120,16 @@ module WhopSDK
116
120
 
117
121
  CourseLessonListParams = WhopSDK::Models::CourseLessonListParams
118
122
 
123
+ CourseLessonMarkAsCompletedParams =
124
+ WhopSDK::Models::CourseLessonMarkAsCompletedParams
125
+
119
126
  CourseLessonRetrieveParams = WhopSDK::Models::CourseLessonRetrieveParams
120
127
 
128
+ CourseLessonStartParams = WhopSDK::Models::CourseLessonStartParams
129
+
130
+ CourseLessonSubmitAssessmentParams =
131
+ WhopSDK::Models::CourseLessonSubmitAssessmentParams
132
+
121
133
  CourseLessonUpdateParams = WhopSDK::Models::CourseLessonUpdateParams
122
134
 
123
135
  CourseListParams = WhopSDK::Models::CourseListParams
@@ -212,6 +224,8 @@ module WhopSDK
212
224
 
213
225
  ForumPostUpdateParams = WhopSDK::Models::ForumPostUpdateParams
214
226
 
227
+ ForumPostVisibilityType = WhopSDK::Models::ForumPostVisibilityType
228
+
215
229
  ForumRetrieveParams = WhopSDK::Models::ForumRetrieveParams
216
230
 
217
231
  ForumUpdateParams = WhopSDK::Models::ForumUpdateParams
@@ -308,6 +322,8 @@ module WhopSDK
308
322
 
309
323
  PaymentPendingWebhookEvent = WhopSDK::Models::PaymentPendingWebhookEvent
310
324
 
325
+ PaymentProvider = WhopSDK::Models::PaymentProvider
326
+
311
327
  PaymentRefundParams = WhopSDK::Models::PaymentRefundParams
312
328
 
313
329
  PaymentRetrieveParams = WhopSDK::Models::PaymentRetrieveParams
@@ -372,6 +388,20 @@ module WhopSDK
372
388
 
373
389
  ReceiptStatus = WhopSDK::Models::ReceiptStatus
374
390
 
391
+ RefundCreatedWebhookEvent = WhopSDK::Models::RefundCreatedWebhookEvent
392
+
393
+ RefundListParams = WhopSDK::Models::RefundListParams
394
+
395
+ RefundReferenceStatus = WhopSDK::Models::RefundReferenceStatus
396
+
397
+ RefundReferenceType = WhopSDK::Models::RefundReferenceType
398
+
399
+ RefundRetrieveParams = WhopSDK::Models::RefundRetrieveParams
400
+
401
+ RefundStatus = WhopSDK::Models::RefundStatus
402
+
403
+ RefundUpdatedWebhookEvent = WhopSDK::Models::RefundUpdatedWebhookEvent
404
+
375
405
  ReleaseMethod = WhopSDK::Models::ReleaseMethod
376
406
 
377
407
  ReviewListParams = WhopSDK::Models::ReviewListParams
@@ -431,4 +461,16 @@ module WhopSDK
431
461
  WhoCanPostTypes = WhopSDK::Models::WhoCanPostTypes
432
462
 
433
463
  WhoCanReact = WhopSDK::Models::WhoCanReact
464
+
465
+ WithdrawalFeeTypes = WhopSDK::Models::WithdrawalFeeTypes
466
+
467
+ WithdrawalListParams = WhopSDK::Models::WithdrawalListParams
468
+
469
+ WithdrawalRetrieveParams = WhopSDK::Models::WithdrawalRetrieveParams
470
+
471
+ WithdrawalSpeeds = WhopSDK::Models::WithdrawalSpeeds
472
+
473
+ WithdrawalStatus = WhopSDK::Models::WithdrawalStatus
474
+
475
+ WithdrawalTypes = WhopSDK::Models::WithdrawalTypes
434
476
  end
@@ -56,6 +56,7 @@ module WhopSDK
56
56
  params(
57
57
  id: String,
58
58
  app_store_description: T.nilable(String),
59
+ app_type: T.nilable(WhopSDK::AppType::OrSymbol),
59
60
  base_url: T.nilable(String),
60
61
  dashboard_path: T.nilable(String),
61
62
  description: T.nilable(String),
@@ -82,6 +83,8 @@ module WhopSDK
82
83
  id,
83
84
  # The description of the app for the app store in-depth app view.
84
85
  app_store_description: nil,
86
+ # The type of end-user an app is built for
87
+ app_type: nil,
85
88
  # The base production url of the app
86
89
  base_url: nil,
87
90
  # The path for the dashboard view of the app
@@ -108,6 +111,7 @@ module WhopSDK
108
111
  sig do
109
112
  params(
110
113
  after: T.nilable(String),
114
+ app_type: T.nilable(WhopSDK::AppType::OrSymbol),
111
115
  before: T.nilable(String),
112
116
  company_id: T.nilable(String),
113
117
  direction: T.nilable(WhopSDK::Direction::OrSymbol),
@@ -125,6 +129,8 @@ module WhopSDK
125
129
  def list(
126
130
  # Returns the elements in the list that come after the specified cursor.
127
131
  after: nil,
132
+ # The type of end-user an app is built for
133
+ app_type: nil,
128
134
  # Returns the elements in the list that come before the specified cursor.
129
135
  before: nil,
130
136
  # The ID of the company to filter apps by
@@ -11,13 +11,20 @@ module WhopSDK
11
11
  # - `plan:create`
12
12
  # - `access_pass:create`
13
13
  # - `access_pass:update`
14
+ # - `checkout_configuration:basic:read`
14
15
  sig do
15
16
  params(
16
17
  plan: WhopSDK::CheckoutConfigurationCreateParams::Plan::OrHash,
17
18
  plan_id: String,
19
+ company_id: String,
18
20
  affiliate_code: T.nilable(String),
19
21
  metadata: T.nilable(T::Hash[Symbol, T.anything]),
22
+ payment_method_configuration:
23
+ T.nilable(
24
+ WhopSDK::CheckoutConfigurationCreateParams::PaymentMethodConfiguration::OrHash
25
+ ),
20
26
  redirect_url: T.nilable(String),
27
+ mode: Symbol,
21
28
  request_options: WhopSDK::RequestOptions::OrHash
22
29
  ).returns(WhopSDK::CheckoutConfiguration)
23
30
  end
@@ -26,12 +33,20 @@ module WhopSDK
26
33
  plan:,
27
34
  # The ID of the plan to use for the checkout configuration
28
35
  plan_id:,
36
+ # The ID of the company for which to generate the checkout configuration. Only
37
+ # required in setup mode.
38
+ company_id:,
29
39
  # The affiliate code to use for the checkout configuration
30
40
  affiliate_code: nil,
31
41
  # The metadata to use for the checkout configuration
32
42
  metadata: nil,
43
+ # This currently only works for configurations made in 'setup' mode. The explicit
44
+ # payment method configuration for the checkout session. If not provided, the
45
+ # platform or company's defaults will apply.
46
+ payment_method_configuration: nil,
33
47
  # The URL to redirect the user to after the checkout configuration is created
34
48
  redirect_url: nil,
49
+ mode: :setup,
35
50
  request_options: {}
36
51
  )
37
52
  end
@@ -212,6 +212,54 @@ module WhopSDK
212
212
  )
213
213
  end
214
214
 
215
+ # Marks a course lesson as completed
216
+ sig do
217
+ params(
218
+ lesson_id: String,
219
+ request_options: WhopSDK::RequestOptions::OrHash
220
+ ).returns(T::Boolean)
221
+ end
222
+ def mark_as_completed(
223
+ # The ID of the lesson to mark as completed
224
+ lesson_id,
225
+ request_options: {}
226
+ )
227
+ end
228
+
229
+ # Starts a course lesson
230
+ sig do
231
+ params(
232
+ lesson_id: String,
233
+ request_options: WhopSDK::RequestOptions::OrHash
234
+ ).returns(T::Boolean)
235
+ end
236
+ def start(
237
+ # The ID of the lesson being started
238
+ lesson_id,
239
+ request_options: {}
240
+ )
241
+ end
242
+
243
+ # Submits answers for a course assessment
244
+ sig do
245
+ params(
246
+ lesson_id: String,
247
+ answers:
248
+ T::Array[
249
+ WhopSDK::CourseLessonSubmitAssessmentParams::Answer::OrHash
250
+ ],
251
+ request_options: WhopSDK::RequestOptions::OrHash
252
+ ).returns(WhopSDK::Models::CourseLessonSubmitAssessmentResponse)
253
+ end
254
+ def submit_assessment(
255
+ # The ID of the lesson (quiz or knowledge check) to submit answers for
256
+ lesson_id,
257
+ # The answers to the assessment questions
258
+ answers:,
259
+ request_options: {}
260
+ )
261
+ end
262
+
215
263
  # @api private
216
264
  sig { params(client: WhopSDK::Client).returns(T.attached_class) }
217
265
  def self.new(client:)
@@ -28,8 +28,7 @@ module WhopSDK
28
28
  pinned: T.nilable(T::Boolean),
29
29
  poll: T.nilable(WhopSDK::ForumPostCreateParams::Poll::OrHash),
30
30
  title: T.nilable(String),
31
- visibility:
32
- T.nilable(WhopSDK::ForumPostCreateParams::Visibility::OrSymbol),
31
+ visibility: T.nilable(WhopSDK::ForumPostVisibilityType::OrSymbol),
33
32
  request_options: WhopSDK::RequestOptions::OrHash
34
33
  ).returns(WhopSDK::ForumPost)
35
34
  end
@@ -99,8 +98,7 @@ module WhopSDK
99
98
  content: T.nilable(String),
100
99
  is_pinned: T.nilable(T::Boolean),
101
100
  title: T.nilable(String),
102
- visibility:
103
- T.nilable(WhopSDK::ForumPostUpdateParams::Visibility::OrSymbol),
101
+ visibility: T.nilable(WhopSDK::ForumPostVisibilityType::OrSymbol),
104
102
  request_options: WhopSDK::RequestOptions::OrHash
105
103
  ).returns(WhopSDK::ForumPost)
106
104
  end
@@ -0,0 +1,68 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Resources
5
+ class Refunds
6
+ # Retrieves a Refund by ID
7
+ #
8
+ # Required permissions:
9
+ #
10
+ # - `payment:basic:read`
11
+ # - `member:email:read`
12
+ # - `member:basic:read`
13
+ # - `member:phone:read`
14
+ sig do
15
+ params(
16
+ id: String,
17
+ request_options: WhopSDK::RequestOptions::OrHash
18
+ ).returns(WhopSDK::Models::RefundRetrieveResponse)
19
+ end
20
+ def retrieve(
21
+ # The ID of the refund
22
+ id,
23
+ request_options: {}
24
+ )
25
+ end
26
+
27
+ # Lists Refunds for a payment.
28
+ #
29
+ # Required permissions:
30
+ #
31
+ # - `payment:basic:read`
32
+ sig do
33
+ params(
34
+ payment_id: String,
35
+ after: T.nilable(String),
36
+ before: T.nilable(String),
37
+ direction: T.nilable(WhopSDK::Direction::OrSymbol),
38
+ first: T.nilable(Integer),
39
+ last: T.nilable(Integer),
40
+ request_options: WhopSDK::RequestOptions::OrHash
41
+ ).returns(
42
+ WhopSDK::Internal::CursorPage[WhopSDK::Models::RefundListResponse]
43
+ )
44
+ end
45
+ def list(
46
+ # The ID of the payment to list refunds for
47
+ payment_id:,
48
+ # Returns the elements in the list that come after the specified cursor.
49
+ after: nil,
50
+ # Returns the elements in the list that come before the specified cursor.
51
+ before: nil,
52
+ # The direction of the sort.
53
+ direction: nil,
54
+ # Returns the first _n_ elements from the list.
55
+ first: nil,
56
+ # Returns the last _n_ elements from the list.
57
+ last: nil,
58
+ request_options: {}
59
+ )
60
+ end
61
+
62
+ # @api private
63
+ sig { params(client: WhopSDK::Client).returns(T.attached_class) }
64
+ def self.new(client:)
65
+ end
66
+ end
67
+ end
68
+ end
@@ -21,7 +21,9 @@ module WhopSDK
21
21
  WhopSDK::PaymentFailedWebhookEvent,
22
22
  WhopSDK::PaymentPendingWebhookEvent,
23
23
  WhopSDK::DisputeCreatedWebhookEvent,
24
- WhopSDK::DisputeUpdatedWebhookEvent
24
+ WhopSDK::DisputeUpdatedWebhookEvent,
25
+ WhopSDK::RefundCreatedWebhookEvent,
26
+ WhopSDK::RefundUpdatedWebhookEvent
25
27
  )
26
28
  )
27
29
  end
@@ -0,0 +1,71 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Resources
5
+ class Withdrawals
6
+ # Retrieves a withdrawal by ID
7
+ #
8
+ # Required permissions:
9
+ #
10
+ # - `payout:withdrawal:read`
11
+ sig do
12
+ params(
13
+ id: String,
14
+ request_options: WhopSDK::RequestOptions::OrHash
15
+ ).returns(WhopSDK::Models::WithdrawalRetrieveResponse)
16
+ end
17
+ def retrieve(
18
+ # The ID of the Withdrawal
19
+ id,
20
+ request_options: {}
21
+ )
22
+ end
23
+
24
+ # Lists withdrawals
25
+ #
26
+ # Required permissions:
27
+ #
28
+ # - `payout:withdrawal:read`
29
+ sig do
30
+ params(
31
+ company_id: String,
32
+ after: T.nilable(String),
33
+ before: T.nilable(String),
34
+ created_after: T.nilable(Time),
35
+ created_before: T.nilable(Time),
36
+ direction: T.nilable(WhopSDK::Direction::OrSymbol),
37
+ first: T.nilable(Integer),
38
+ last: T.nilable(Integer),
39
+ request_options: WhopSDK::RequestOptions::OrHash
40
+ ).returns(
41
+ WhopSDK::Internal::CursorPage[WhopSDK::Models::WithdrawalListResponse]
42
+ )
43
+ end
44
+ def list(
45
+ # The ID of the company to list withdrawals for
46
+ company_id:,
47
+ # Returns the elements in the list that come after the specified cursor.
48
+ after: nil,
49
+ # Returns the elements in the list that come before the specified cursor.
50
+ before: nil,
51
+ # The minimum creation date to filter by
52
+ created_after: nil,
53
+ # The maximum creation date to filter by
54
+ created_before: nil,
55
+ # The direction of the sort.
56
+ direction: nil,
57
+ # Returns the first _n_ elements from the list.
58
+ first: nil,
59
+ # Returns the last _n_ elements from the list.
60
+ last: nil,
61
+ request_options: {}
62
+ )
63
+ end
64
+
65
+ # @api private
66
+ sig { params(client: WhopSDK::Client).returns(T.attached_class) }
67
+ def self.new(client:)
68
+ end
69
+ end
70
+ end
71
+ end
@@ -80,6 +80,10 @@ module WhopSDK
80
80
 
81
81
  attr_reader disputes: WhopSDK::Resources::Disputes
82
82
 
83
+ attr_reader refunds: WhopSDK::Resources::Refunds
84
+
85
+ attr_reader withdrawals: WhopSDK::Resources::Withdrawals
86
+
83
87
  private def auth_headers: -> ::Hash[String, String]
84
88
 
85
89
  def initialize: (
@@ -4,6 +4,7 @@ module WhopSDK
4
4
  {
5
5
  id: String,
6
6
  api_key: WhopSDK::App::APIKey?,
7
+ app_type: WhopSDK::Models::app_type,
7
8
  base_url: String?,
8
9
  company: WhopSDK::App::Company,
9
10
  creator: WhopSDK::App::Creator,
@@ -25,6 +26,8 @@ module WhopSDK
25
26
 
26
27
  attr_accessor api_key: WhopSDK::App::APIKey?
27
28
 
29
+ attr_accessor app_type: WhopSDK::Models::app_type
30
+
28
31
  attr_accessor base_url: String?
29
32
 
30
33
  attr_accessor company: WhopSDK::App::Company
@@ -56,6 +59,7 @@ module WhopSDK
56
59
  def initialize: (
57
60
  id: String,
58
61
  api_key: WhopSDK::App::APIKey?,
62
+ app_type: WhopSDK::Models::app_type,
59
63
  base_url: String?,
60
64
  company: WhopSDK::App::Company,
61
65
  creator: WhopSDK::App::Creator,
@@ -75,6 +79,7 @@ module WhopSDK
75
79
  def to_hash: -> {
76
80
  id: String,
77
81
  api_key: WhopSDK::App::APIKey?,
82
+ app_type: WhopSDK::Models::app_type,
78
83
  base_url: String?,
79
84
  company: WhopSDK::App::Company,
80
85
  creator: WhopSDK::App::Creator,
@@ -3,6 +3,7 @@ module WhopSDK
3
3
  type app_list_params =
4
4
  {
5
5
  after: String?,
6
+ app_type: WhopSDK::Models::app_type?,
6
7
  before: String?,
7
8
  company_id: String?,
8
9
  direction: WhopSDK::Models::direction?,
@@ -21,6 +22,8 @@ module WhopSDK
21
22
 
22
23
  attr_accessor after: String?
23
24
 
25
+ attr_accessor app_type: WhopSDK::Models::app_type?
26
+
24
27
  attr_accessor before: String?
25
28
 
26
29
  attr_accessor company_id: String?
@@ -41,6 +44,7 @@ module WhopSDK
41
44
 
42
45
  def initialize: (
43
46
  ?after: String?,
47
+ ?app_type: WhopSDK::Models::app_type?,
44
48
  ?before: String?,
45
49
  ?company_id: String?,
46
50
  ?direction: WhopSDK::Models::direction?,
@@ -55,6 +59,7 @@ module WhopSDK
55
59
 
56
60
  def to_hash: -> {
57
61
  after: String?,
62
+ app_type: WhopSDK::Models::app_type?,
58
63
  before: String?,
59
64
  company_id: String?,
60
65
  direction: WhopSDK::Models::direction?,
@@ -3,6 +3,7 @@ module WhopSDK
3
3
  type app_list_response =
4
4
  {
5
5
  id: String,
6
+ app_type: WhopSDK::Models::app_type,
6
7
  base_url: String?,
7
8
  company: WhopSDK::Models::AppListResponse::Company,
8
9
  creator: WhopSDK::Models::AppListResponse::Creator,
@@ -20,6 +21,8 @@ module WhopSDK
20
21
  class AppListResponse < WhopSDK::Internal::Type::BaseModel
21
22
  attr_accessor id: String
22
23
 
24
+ attr_accessor app_type: WhopSDK::Models::app_type
25
+
23
26
  attr_accessor base_url: String?
24
27
 
25
28
  attr_accessor company: WhopSDK::Models::AppListResponse::Company
@@ -46,6 +49,7 @@ module WhopSDK
46
49
 
47
50
  def initialize: (
48
51
  id: String,
52
+ app_type: WhopSDK::Models::app_type,
49
53
  base_url: String?,
50
54
  company: WhopSDK::Models::AppListResponse::Company,
51
55
  creator: WhopSDK::Models::AppListResponse::Creator,
@@ -62,6 +66,7 @@ module WhopSDK
62
66
 
63
67
  def to_hash: -> {
64
68
  id: String,
69
+ app_type: WhopSDK::Models::app_type,
65
70
  base_url: String?,
66
71
  company: WhopSDK::Models::AppListResponse::Company,
67
72
  creator: WhopSDK::Models::AppListResponse::Creator,
@@ -0,0 +1,16 @@
1
+ module WhopSDK
2
+ module Models
3
+ type app_type = :b2b_app | :b2c_app | :company_app | :component
4
+
5
+ module AppType
6
+ extend WhopSDK::Internal::Type::Enum
7
+
8
+ B2B_APP: :b2b_app
9
+ B2C_APP: :b2c_app
10
+ COMPANY_APP: :company_app
11
+ COMPONENT: :component
12
+
13
+ def self?.values: -> ::Array[WhopSDK::Models::app_type]
14
+ end
15
+ end
16
+ end
@@ -3,6 +3,7 @@ module WhopSDK
3
3
  type app_update_params =
4
4
  {
5
5
  app_store_description: String?,
6
+ app_type: WhopSDK::Models::app_type?,
6
7
  base_url: String?,
7
8
  dashboard_path: String?,
8
9
  description: String?,
@@ -21,6 +22,8 @@ module WhopSDK
21
22
 
22
23
  attr_accessor app_store_description: String?
23
24
 
25
+ attr_accessor app_type: WhopSDK::Models::app_type?
26
+
24
27
  attr_accessor base_url: String?
25
28
 
26
29
  attr_accessor dashboard_path: String?
@@ -41,6 +44,7 @@ module WhopSDK
41
44
 
42
45
  def initialize: (
43
46
  ?app_store_description: String?,
47
+ ?app_type: WhopSDK::Models::app_type?,
44
48
  ?base_url: String?,
45
49
  ?dashboard_path: String?,
46
50
  ?description: String?,
@@ -55,6 +59,7 @@ module WhopSDK
55
59
 
56
60
  def to_hash: -> {
57
61
  app_store_description: String?,
62
+ app_type: WhopSDK::Models::app_type?,
58
63
  base_url: String?,
59
64
  dashboard_path: String?,
60
65
  description: String?,