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
@@ -5,8 +5,10 @@ module WhopSDK
5
5
  id: String,
6
6
  affiliate_code: String?,
7
7
  company_id: String,
8
- metadata: ::Hash[Symbol, top],
9
- plan: WhopSDK::CheckoutConfiguration::Plan,
8
+ metadata: ::Hash[Symbol, top]?,
9
+ mode: WhopSDK::Models::checkout_modes,
10
+ payment_method_configuration: WhopSDK::CheckoutConfiguration::PaymentMethodConfiguration?,
11
+ plan: WhopSDK::CheckoutConfiguration::Plan?,
10
12
  purchase_url: String,
11
13
  redirect_url: String?
12
14
  }
@@ -18,9 +20,13 @@ module WhopSDK
18
20
 
19
21
  attr_accessor company_id: String
20
22
 
21
- attr_accessor metadata: ::Hash[Symbol, top]
23
+ attr_accessor metadata: ::Hash[Symbol, top]?
22
24
 
23
- attr_accessor plan: WhopSDK::CheckoutConfiguration::Plan
25
+ attr_accessor mode: WhopSDK::Models::checkout_modes
26
+
27
+ attr_accessor payment_method_configuration: WhopSDK::CheckoutConfiguration::PaymentMethodConfiguration?
28
+
29
+ attr_accessor plan: WhopSDK::CheckoutConfiguration::Plan?
24
30
 
25
31
  attr_accessor purchase_url: String
26
32
 
@@ -30,8 +36,10 @@ module WhopSDK
30
36
  id: String,
31
37
  affiliate_code: String?,
32
38
  company_id: String,
33
- metadata: ::Hash[Symbol, top],
34
- plan: WhopSDK::CheckoutConfiguration::Plan,
39
+ metadata: ::Hash[Symbol, top]?,
40
+ mode: WhopSDK::Models::checkout_modes,
41
+ payment_method_configuration: WhopSDK::CheckoutConfiguration::PaymentMethodConfiguration?,
42
+ plan: WhopSDK::CheckoutConfiguration::Plan?,
35
43
  purchase_url: String,
36
44
  redirect_url: String?
37
45
  ) -> void
@@ -40,12 +48,41 @@ module WhopSDK
40
48
  id: String,
41
49
  affiliate_code: String?,
42
50
  company_id: String,
43
- metadata: ::Hash[Symbol, top],
44
- plan: WhopSDK::CheckoutConfiguration::Plan,
51
+ metadata: ::Hash[Symbol, top]?,
52
+ mode: WhopSDK::Models::checkout_modes,
53
+ payment_method_configuration: WhopSDK::CheckoutConfiguration::PaymentMethodConfiguration?,
54
+ plan: WhopSDK::CheckoutConfiguration::Plan?,
45
55
  purchase_url: String,
46
56
  redirect_url: String?
47
57
  }
48
58
 
59
+ type payment_method_configuration =
60
+ {
61
+ disabled: ::Array[WhopSDK::Models::payment_method_types],
62
+ enabled: ::Array[WhopSDK::Models::payment_method_types],
63
+ include_platform_defaults: bool
64
+ }
65
+
66
+ class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel
67
+ attr_accessor disabled: ::Array[WhopSDK::Models::payment_method_types]
68
+
69
+ attr_accessor enabled: ::Array[WhopSDK::Models::payment_method_types]
70
+
71
+ attr_accessor include_platform_defaults: bool
72
+
73
+ def initialize: (
74
+ disabled: ::Array[WhopSDK::Models::payment_method_types],
75
+ enabled: ::Array[WhopSDK::Models::payment_method_types],
76
+ include_platform_defaults: bool
77
+ ) -> void
78
+
79
+ def to_hash: -> {
80
+ disabled: ::Array[WhopSDK::Models::payment_method_types],
81
+ enabled: ::Array[WhopSDK::Models::payment_method_types],
82
+ include_platform_defaults: bool
83
+ }
84
+ end
85
+
49
86
  type plan =
50
87
  {
51
88
  id: String,
@@ -5,8 +5,11 @@ module WhopSDK
5
5
  plan: WhopSDK::CheckoutConfigurationCreateParams::Plan,
6
6
  affiliate_code: String?,
7
7
  metadata: ::Hash[Symbol, top]?,
8
+ mode: :setup,
9
+ payment_method_configuration: WhopSDK::CheckoutConfigurationCreateParams::PaymentMethodConfiguration?,
8
10
  redirect_url: String?,
9
- plan_id: String
11
+ plan_id: String,
12
+ company_id: String
10
13
  }
11
14
  & WhopSDK::Internal::Type::request_parameters
12
15
 
@@ -20,16 +23,25 @@ module WhopSDK
20
23
 
21
24
  attr_accessor metadata: ::Hash[Symbol, top]?
22
25
 
26
+ attr_accessor mode: :setup
27
+
28
+ attr_accessor payment_method_configuration: WhopSDK::CheckoutConfigurationCreateParams::PaymentMethodConfiguration?
29
+
23
30
  attr_accessor redirect_url: String?
24
31
 
25
32
  attr_accessor plan_id: String
26
33
 
34
+ attr_accessor company_id: String
35
+
27
36
  def initialize: (
28
37
  plan: WhopSDK::CheckoutConfigurationCreateParams::Plan,
29
38
  plan_id: String,
39
+ company_id: String,
30
40
  ?affiliate_code: String?,
31
41
  ?metadata: ::Hash[Symbol, top]?,
42
+ ?payment_method_configuration: WhopSDK::CheckoutConfigurationCreateParams::PaymentMethodConfiguration?,
32
43
  ?redirect_url: String?,
44
+ ?mode: :setup,
33
45
  ?request_options: WhopSDK::request_opts
34
46
  ) -> void
35
47
 
@@ -37,8 +49,11 @@ module WhopSDK
37
49
  plan: WhopSDK::CheckoutConfigurationCreateParams::Plan,
38
50
  affiliate_code: String?,
39
51
  metadata: ::Hash[Symbol, top]?,
52
+ mode: :setup,
53
+ payment_method_configuration: WhopSDK::CheckoutConfigurationCreateParams::PaymentMethodConfiguration?,
40
54
  redirect_url: String?,
41
55
  plan_id: String,
56
+ company_id: String,
42
57
  request_options: WhopSDK::RequestOptions
43
58
  }
44
59
 
@@ -335,6 +350,33 @@ module WhopSDK
335
350
  }
336
351
  end
337
352
  end
353
+
354
+ type payment_method_configuration =
355
+ {
356
+ disabled: ::Array[WhopSDK::Models::payment_method_types],
357
+ enabled: ::Array[WhopSDK::Models::payment_method_types],
358
+ include_platform_defaults: bool
359
+ }
360
+
361
+ class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel
362
+ attr_accessor disabled: ::Array[WhopSDK::Models::payment_method_types]
363
+
364
+ attr_accessor enabled: ::Array[WhopSDK::Models::payment_method_types]
365
+
366
+ attr_accessor include_platform_defaults: bool
367
+
368
+ def initialize: (
369
+ disabled: ::Array[WhopSDK::Models::payment_method_types],
370
+ enabled: ::Array[WhopSDK::Models::payment_method_types],
371
+ include_platform_defaults: bool
372
+ ) -> void
373
+
374
+ def to_hash: -> {
375
+ disabled: ::Array[WhopSDK::Models::payment_method_types],
376
+ enabled: ::Array[WhopSDK::Models::payment_method_types],
377
+ include_platform_defaults: bool
378
+ }
379
+ end
338
380
  end
339
381
  end
340
382
  end
@@ -5,8 +5,10 @@ module WhopSDK
5
5
  id: String,
6
6
  affiliate_code: String?,
7
7
  company_id: String,
8
- metadata: ::Hash[Symbol, top],
9
- plan: WhopSDK::Models::CheckoutConfigurationListResponse::Plan,
8
+ metadata: ::Hash[Symbol, top]?,
9
+ mode: WhopSDK::Models::checkout_modes,
10
+ payment_method_configuration: WhopSDK::Models::CheckoutConfigurationListResponse::PaymentMethodConfiguration?,
11
+ plan: WhopSDK::Models::CheckoutConfigurationListResponse::Plan?,
10
12
  purchase_url: String,
11
13
  redirect_url: String?
12
14
  }
@@ -18,9 +20,13 @@ module WhopSDK
18
20
 
19
21
  attr_accessor company_id: String
20
22
 
21
- attr_accessor metadata: ::Hash[Symbol, top]
23
+ attr_accessor metadata: ::Hash[Symbol, top]?
22
24
 
23
- attr_accessor plan: WhopSDK::Models::CheckoutConfigurationListResponse::Plan
25
+ attr_accessor mode: WhopSDK::Models::checkout_modes
26
+
27
+ attr_accessor payment_method_configuration: WhopSDK::Models::CheckoutConfigurationListResponse::PaymentMethodConfiguration?
28
+
29
+ attr_accessor plan: WhopSDK::Models::CheckoutConfigurationListResponse::Plan?
24
30
 
25
31
  attr_accessor purchase_url: String
26
32
 
@@ -30,8 +36,10 @@ module WhopSDK
30
36
  id: String,
31
37
  affiliate_code: String?,
32
38
  company_id: String,
33
- metadata: ::Hash[Symbol, top],
34
- plan: WhopSDK::Models::CheckoutConfigurationListResponse::Plan,
39
+ metadata: ::Hash[Symbol, top]?,
40
+ mode: WhopSDK::Models::checkout_modes,
41
+ payment_method_configuration: WhopSDK::Models::CheckoutConfigurationListResponse::PaymentMethodConfiguration?,
42
+ plan: WhopSDK::Models::CheckoutConfigurationListResponse::Plan?,
35
43
  purchase_url: String,
36
44
  redirect_url: String?
37
45
  ) -> void
@@ -40,12 +48,41 @@ module WhopSDK
40
48
  id: String,
41
49
  affiliate_code: String?,
42
50
  company_id: String,
43
- metadata: ::Hash[Symbol, top],
44
- plan: WhopSDK::Models::CheckoutConfigurationListResponse::Plan,
51
+ metadata: ::Hash[Symbol, top]?,
52
+ mode: WhopSDK::Models::checkout_modes,
53
+ payment_method_configuration: WhopSDK::Models::CheckoutConfigurationListResponse::PaymentMethodConfiguration?,
54
+ plan: WhopSDK::Models::CheckoutConfigurationListResponse::Plan?,
45
55
  purchase_url: String,
46
56
  redirect_url: String?
47
57
  }
48
58
 
59
+ type payment_method_configuration =
60
+ {
61
+ disabled: ::Array[WhopSDK::Models::payment_method_types],
62
+ enabled: ::Array[WhopSDK::Models::payment_method_types],
63
+ include_platform_defaults: bool
64
+ }
65
+
66
+ class PaymentMethodConfiguration < WhopSDK::Internal::Type::BaseModel
67
+ attr_accessor disabled: ::Array[WhopSDK::Models::payment_method_types]
68
+
69
+ attr_accessor enabled: ::Array[WhopSDK::Models::payment_method_types]
70
+
71
+ attr_accessor include_platform_defaults: bool
72
+
73
+ def initialize: (
74
+ disabled: ::Array[WhopSDK::Models::payment_method_types],
75
+ enabled: ::Array[WhopSDK::Models::payment_method_types],
76
+ include_platform_defaults: bool
77
+ ) -> void
78
+
79
+ def to_hash: -> {
80
+ disabled: ::Array[WhopSDK::Models::payment_method_types],
81
+ enabled: ::Array[WhopSDK::Models::payment_method_types],
82
+ include_platform_defaults: bool
83
+ }
84
+ end
85
+
49
86
  type plan =
50
87
  {
51
88
  id: String,
@@ -0,0 +1,14 @@
1
+ module WhopSDK
2
+ module Models
3
+ type checkout_modes = :payment | :setup
4
+
5
+ module CheckoutModes
6
+ extend WhopSDK::Internal::Type::Enum
7
+
8
+ PAYMENT: :payment
9
+ SETUP: :setup
10
+
11
+ def self?.values: -> ::Array[WhopSDK::Models::checkout_modes]
12
+ end
13
+ end
14
+ end
@@ -5,6 +5,7 @@ module WhopSDK
5
5
  id: String,
6
6
  certificate_after_completion_enabled: bool?,
7
7
  chapters: ::Array[WhopSDK::Course::Chapter],
8
+ cover_image: String?,
8
9
  created_at: Time,
9
10
  description: String?,
10
11
  language: WhopSDK::Models::languages,
@@ -24,6 +25,8 @@ module WhopSDK
24
25
 
25
26
  attr_accessor chapters: ::Array[WhopSDK::Course::Chapter]
26
27
 
28
+ attr_accessor cover_image: String?
29
+
27
30
  attr_accessor created_at: Time
28
31
 
29
32
  attr_accessor description: String?
@@ -48,6 +51,7 @@ module WhopSDK
48
51
  id: String,
49
52
  certificate_after_completion_enabled: bool?,
50
53
  chapters: ::Array[WhopSDK::Course::Chapter],
54
+ cover_image: String?,
51
55
  created_at: Time,
52
56
  description: String?,
53
57
  language: WhopSDK::Models::languages,
@@ -64,6 +68,7 @@ module WhopSDK
64
68
  id: String,
65
69
  certificate_after_completion_enabled: bool?,
66
70
  chapters: ::Array[WhopSDK::Course::Chapter],
71
+ cover_image: String?,
67
72
  created_at: Time,
68
73
  description: String?,
69
74
  language: WhopSDK::Models::languages,
@@ -4,6 +4,7 @@ module WhopSDK
4
4
  {
5
5
  id: String,
6
6
  content: String?,
7
+ created_at: Time,
7
8
  days_from_course_start_until_unlock: Integer?,
8
9
  embed_id: String?,
9
10
  embed_type: WhopSDK::Models::embed_type?,
@@ -19,6 +20,8 @@ module WhopSDK
19
20
 
20
21
  attr_accessor content: String?
21
22
 
23
+ attr_accessor created_at: Time
24
+
22
25
  attr_accessor days_from_course_start_until_unlock: Integer?
23
26
 
24
27
  attr_accessor embed_id: String?
@@ -38,6 +41,7 @@ module WhopSDK
38
41
  def initialize: (
39
42
  id: String,
40
43
  content: String?,
44
+ created_at: Time,
41
45
  days_from_course_start_until_unlock: Integer?,
42
46
  embed_id: String?,
43
47
  embed_type: WhopSDK::Models::embed_type?,
@@ -51,6 +55,7 @@ module WhopSDK
51
55
  def to_hash: -> {
52
56
  id: String,
53
57
  content: String?,
58
+ created_at: Time,
54
59
  days_from_course_start_until_unlock: Integer?,
55
60
  embed_id: String?,
56
61
  embed_type: WhopSDK::Models::embed_type?,
@@ -0,0 +1,15 @@
1
+ module WhopSDK
2
+ module Models
3
+ type course_lesson_mark_as_completed_params =
4
+ { } & WhopSDK::Internal::Type::request_parameters
5
+
6
+ class CourseLessonMarkAsCompletedParams < WhopSDK::Internal::Type::BaseModel
7
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
8
+ include WhopSDK::Internal::Type::RequestParameters
9
+
10
+ def initialize: (?request_options: WhopSDK::request_opts) -> void
11
+
12
+ def to_hash: -> { request_options: WhopSDK::RequestOptions }
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,5 @@
1
+ module WhopSDK
2
+ module Models
3
+ CourseLessonMarkAsCompletedResponse: WhopSDK::Internal::Type::Converter
4
+ end
5
+ end
@@ -0,0 +1,15 @@
1
+ module WhopSDK
2
+ module Models
3
+ type course_lesson_start_params =
4
+ { } & WhopSDK::Internal::Type::request_parameters
5
+
6
+ class CourseLessonStartParams < WhopSDK::Internal::Type::BaseModel
7
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
8
+ include WhopSDK::Internal::Type::RequestParameters
9
+
10
+ def initialize: (?request_options: WhopSDK::request_opts) -> void
11
+
12
+ def to_hash: -> { request_options: WhopSDK::RequestOptions }
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,5 @@
1
+ module WhopSDK
2
+ module Models
3
+ CourseLessonStartResponse: WhopSDK::Internal::Type::Converter
4
+ end
5
+ end
@@ -0,0 +1,51 @@
1
+ module WhopSDK
2
+ module Models
3
+ type course_lesson_submit_assessment_params =
4
+ { answers: ::Array[WhopSDK::CourseLessonSubmitAssessmentParams::Answer] }
5
+ & WhopSDK::Internal::Type::request_parameters
6
+
7
+ class CourseLessonSubmitAssessmentParams < WhopSDK::Internal::Type::BaseModel
8
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
9
+ include WhopSDK::Internal::Type::RequestParameters
10
+
11
+ attr_accessor answers: ::Array[WhopSDK::CourseLessonSubmitAssessmentParams::Answer]
12
+
13
+ def initialize: (
14
+ answers: ::Array[WhopSDK::CourseLessonSubmitAssessmentParams::Answer],
15
+ ?request_options: WhopSDK::request_opts
16
+ ) -> void
17
+
18
+ def to_hash: -> {
19
+ answers: ::Array[WhopSDK::CourseLessonSubmitAssessmentParams::Answer],
20
+ request_options: WhopSDK::RequestOptions
21
+ }
22
+
23
+ type answer =
24
+ {
25
+ question_id: String,
26
+ answer_text: String?,
27
+ selected_option_ids: ::Array[String]?
28
+ }
29
+
30
+ class Answer < WhopSDK::Internal::Type::BaseModel
31
+ attr_accessor question_id: String
32
+
33
+ attr_accessor answer_text: String?
34
+
35
+ attr_accessor selected_option_ids: ::Array[String]?
36
+
37
+ def initialize: (
38
+ question_id: String,
39
+ ?answer_text: String?,
40
+ ?selected_option_ids: ::Array[String]?
41
+ ) -> void
42
+
43
+ def to_hash: -> {
44
+ question_id: String,
45
+ answer_text: String?,
46
+ selected_option_ids: ::Array[String]?
47
+ }
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,96 @@
1
+ module WhopSDK
2
+ module Models
3
+ type course_lesson_submit_assessment_response =
4
+ {
5
+ id: String,
6
+ created_at: Time,
7
+ lesson: WhopSDK::Models::CourseLessonSubmitAssessmentResponse::Lesson,
8
+ result_correct: Integer,
9
+ result_grade: Float,
10
+ result_graded_questions: ::Hash[Symbol, top],
11
+ result_passing_grade: bool,
12
+ result_question_count: Integer,
13
+ score_percent: Float,
14
+ updated_at: Time,
15
+ user: WhopSDK::Models::CourseLessonSubmitAssessmentResponse::User
16
+ }
17
+
18
+ class CourseLessonSubmitAssessmentResponse < WhopSDK::Internal::Type::BaseModel
19
+ attr_accessor id: String
20
+
21
+ attr_accessor created_at: Time
22
+
23
+ attr_accessor lesson: WhopSDK::Models::CourseLessonSubmitAssessmentResponse::Lesson
24
+
25
+ attr_accessor result_correct: Integer
26
+
27
+ attr_accessor result_grade: Float
28
+
29
+ attr_accessor result_graded_questions: ::Hash[Symbol, top]
30
+
31
+ attr_accessor result_passing_grade: bool
32
+
33
+ attr_accessor result_question_count: Integer
34
+
35
+ attr_accessor score_percent: Float
36
+
37
+ attr_accessor updated_at: Time
38
+
39
+ attr_accessor user: WhopSDK::Models::CourseLessonSubmitAssessmentResponse::User
40
+
41
+ def initialize: (
42
+ id: String,
43
+ created_at: Time,
44
+ lesson: WhopSDK::Models::CourseLessonSubmitAssessmentResponse::Lesson,
45
+ result_correct: Integer,
46
+ result_grade: Float,
47
+ result_graded_questions: ::Hash[Symbol, top],
48
+ result_passing_grade: bool,
49
+ result_question_count: Integer,
50
+ score_percent: Float,
51
+ updated_at: Time,
52
+ user: WhopSDK::Models::CourseLessonSubmitAssessmentResponse::User
53
+ ) -> void
54
+
55
+ def to_hash: -> {
56
+ id: String,
57
+ created_at: Time,
58
+ lesson: WhopSDK::Models::CourseLessonSubmitAssessmentResponse::Lesson,
59
+ result_correct: Integer,
60
+ result_grade: Float,
61
+ result_graded_questions: ::Hash[Symbol, top],
62
+ result_passing_grade: bool,
63
+ result_question_count: Integer,
64
+ score_percent: Float,
65
+ updated_at: Time,
66
+ user: WhopSDK::Models::CourseLessonSubmitAssessmentResponse::User
67
+ }
68
+
69
+ type lesson = { id: String, title: String }
70
+
71
+ class Lesson < WhopSDK::Internal::Type::BaseModel
72
+ attr_accessor id: String
73
+
74
+ attr_accessor title: String
75
+
76
+ def initialize: (id: String, title: String) -> void
77
+
78
+ def to_hash: -> { id: String, title: String }
79
+ end
80
+
81
+ type user = { id: String, name: String?, username: String }
82
+
83
+ class User < WhopSDK::Internal::Type::BaseModel
84
+ attr_accessor id: String
85
+
86
+ attr_accessor name: String?
87
+
88
+ attr_accessor username: String
89
+
90
+ def initialize: (id: String, name: String?, username: String) -> void
91
+
92
+ def to_hash: -> { id: String, name: String?, username: String }
93
+ end
94
+ end
95
+ end
96
+ end
@@ -4,6 +4,7 @@ module WhopSDK
4
4
  {
5
5
  id: String,
6
6
  certificate_after_completion_enabled: bool?,
7
+ cover_image: String?,
7
8
  created_at: Time,
8
9
  description: String?,
9
10
  language: WhopSDK::Models::languages,
@@ -21,6 +22,8 @@ module WhopSDK
21
22
 
22
23
  attr_accessor certificate_after_completion_enabled: bool?
23
24
 
25
+ attr_accessor cover_image: String?
26
+
24
27
  attr_accessor created_at: Time
25
28
 
26
29
  attr_accessor description: String?
@@ -44,6 +47,7 @@ module WhopSDK
44
47
  def initialize: (
45
48
  id: String,
46
49
  certificate_after_completion_enabled: bool?,
50
+ cover_image: String?,
47
51
  created_at: Time,
48
52
  description: String?,
49
53
  language: WhopSDK::Models::languages,
@@ -59,6 +63,7 @@ module WhopSDK
59
63
  def to_hash: -> {
60
64
  id: String,
61
65
  certificate_after_completion_enabled: bool?,
66
+ cover_image: String?,
62
67
  created_at: Time,
63
68
  description: String?,
64
69
  language: WhopSDK::Models::languages,
@@ -12,7 +12,7 @@ module WhopSDK
12
12
  pinned: bool?,
13
13
  poll: WhopSDK::ForumPostCreateParams::Poll?,
14
14
  title: String?,
15
- visibility: WhopSDK::Models::ForumPostCreateParams::visibility?
15
+ visibility: WhopSDK::Models::forum_post_visibility_type?
16
16
  }
17
17
  & WhopSDK::Internal::Type::request_parameters
18
18
 
@@ -40,7 +40,7 @@ module WhopSDK
40
40
 
41
41
  attr_accessor title: String?
42
42
 
43
- attr_accessor visibility: WhopSDK::Models::ForumPostCreateParams::visibility?
43
+ attr_accessor visibility: WhopSDK::Models::forum_post_visibility_type?
44
44
 
45
45
  def initialize: (
46
46
  experience_id: String,
@@ -53,7 +53,7 @@ module WhopSDK
53
53
  ?pinned: bool?,
54
54
  ?poll: WhopSDK::ForumPostCreateParams::Poll?,
55
55
  ?title: String?,
56
- ?visibility: WhopSDK::Models::ForumPostCreateParams::visibility?,
56
+ ?visibility: WhopSDK::Models::forum_post_visibility_type?,
57
57
  ?request_options: WhopSDK::request_opts
58
58
  ) -> void
59
59
 
@@ -68,7 +68,7 @@ module WhopSDK
68
68
  pinned: bool?,
69
69
  poll: WhopSDK::ForumPostCreateParams::Poll?,
70
70
  title: String?,
71
- visibility: WhopSDK::Models::ForumPostCreateParams::visibility?,
71
+ visibility: WhopSDK::Models::forum_post_visibility_type?,
72
72
  request_options: WhopSDK::RequestOptions
73
73
  }
74
74
 
@@ -129,17 +129,6 @@ module WhopSDK
129
129
  def to_hash: -> { id: String, text: String }
130
130
  end
131
131
  end
132
-
133
- type visibility = :members_only | :globally_visible
134
-
135
- module Visibility
136
- extend WhopSDK::Internal::Type::Enum
137
-
138
- MEMBERS_ONLY: :members_only
139
- GLOBALLY_VISIBLE: :globally_visible
140
-
141
- def self?.values: -> ::Array[WhopSDK::Models::ForumPostCreateParams::visibility]
142
- end
143
132
  end
144
133
  end
145
134
  end
@@ -6,7 +6,7 @@ module WhopSDK
6
6
  content: String?,
7
7
  is_pinned: bool?,
8
8
  title: String?,
9
- visibility: WhopSDK::Models::ForumPostUpdateParams::visibility?
9
+ visibility: WhopSDK::Models::forum_post_visibility_type?
10
10
  }
11
11
  & WhopSDK::Internal::Type::request_parameters
12
12
 
@@ -22,14 +22,14 @@ module WhopSDK
22
22
 
23
23
  attr_accessor title: String?
24
24
 
25
- attr_accessor visibility: WhopSDK::Models::ForumPostUpdateParams::visibility?
25
+ attr_accessor visibility: WhopSDK::Models::forum_post_visibility_type?
26
26
 
27
27
  def initialize: (
28
28
  ?attachments: ::Array[WhopSDK::Models::ForumPostUpdateParams::attachment]?,
29
29
  ?content: String?,
30
30
  ?is_pinned: bool?,
31
31
  ?title: String?,
32
- ?visibility: WhopSDK::Models::ForumPostUpdateParams::visibility?,
32
+ ?visibility: WhopSDK::Models::forum_post_visibility_type?,
33
33
  ?request_options: WhopSDK::request_opts
34
34
  ) -> void
35
35
 
@@ -38,7 +38,7 @@ module WhopSDK
38
38
  content: String?,
39
39
  is_pinned: bool?,
40
40
  title: String?,
41
- visibility: WhopSDK::Models::ForumPostUpdateParams::visibility?,
41
+ visibility: WhopSDK::Models::forum_post_visibility_type?,
42
42
  request_options: WhopSDK::RequestOptions
43
43
  }
44
44
 
@@ -72,17 +72,6 @@ module WhopSDK
72
72
 
73
73
  def self?.variants: -> ::Array[WhopSDK::Models::ForumPostUpdateParams::attachment]
74
74
  end
75
-
76
- type visibility = :members_only | :globally_visible
77
-
78
- module Visibility
79
- extend WhopSDK::Internal::Type::Enum
80
-
81
- MEMBERS_ONLY: :members_only
82
- GLOBALLY_VISIBLE: :globally_visible
83
-
84
- def self?.values: -> ::Array[WhopSDK::Models::ForumPostUpdateParams::visibility]
85
- end
86
75
  end
87
76
  end
88
77
  end
@@ -0,0 +1,14 @@
1
+ module WhopSDK
2
+ module Models
3
+ type forum_post_visibility_type = :members_only | :globally_visible
4
+
5
+ module ForumPostVisibilityType
6
+ extend WhopSDK::Internal::Type::Enum
7
+
8
+ MEMBERS_ONLY: :members_only
9
+ GLOBALLY_VISIBLE: :globally_visible
10
+
11
+ def self?.values: -> ::Array[WhopSDK::Models::forum_post_visibility_type]
12
+ end
13
+ end
14
+ end