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,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::CourseLessons#mark_as_completed
6
+ class CourseLessonMarkAsCompletedParams < WhopSDK::Internal::Type::BaseModel
7
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
8
+ include WhopSDK::Internal::Type::RequestParameters
9
+
10
+ # @!method initialize(request_options: {})
11
+ # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @type [WhopSDK::Internal::Type::Converter]
6
+ CourseLessonMarkAsCompletedResponse = WhopSDK::Internal::Type::Boolean
7
+ end
8
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::CourseLessons#start
6
+ class CourseLessonStartParams < WhopSDK::Internal::Type::BaseModel
7
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
8
+ include WhopSDK::Internal::Type::RequestParameters
9
+
10
+ # @!method initialize(request_options: {})
11
+ # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @type [WhopSDK::Internal::Type::Converter]
6
+ CourseLessonStartResponse = WhopSDK::Internal::Type::Boolean
7
+ end
8
+ end
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::CourseLessons#submit_assessment
6
+ class CourseLessonSubmitAssessmentParams < WhopSDK::Internal::Type::BaseModel
7
+ extend WhopSDK::Internal::Type::RequestParameters::Converter
8
+ include WhopSDK::Internal::Type::RequestParameters
9
+
10
+ # @!attribute answers
11
+ # The answers to the assessment questions
12
+ #
13
+ # @return [Array<WhopSDK::Models::CourseLessonSubmitAssessmentParams::Answer>]
14
+ required :answers,
15
+ -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::CourseLessonSubmitAssessmentParams::Answer] }
16
+
17
+ # @!method initialize(answers:, request_options: {})
18
+ # @param answers [Array<WhopSDK::Models::CourseLessonSubmitAssessmentParams::Answer>] The answers to the assessment questions
19
+ #
20
+ # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
21
+
22
+ class Answer < WhopSDK::Internal::Type::BaseModel
23
+ # @!attribute question_id
24
+ # The ID of the question being answered
25
+ #
26
+ # @return [String]
27
+ required :question_id, String
28
+
29
+ # @!attribute answer_text
30
+ # The text answer provided by the user (for short answer questions)
31
+ #
32
+ # @return [String, nil]
33
+ optional :answer_text, String, nil?: true
34
+
35
+ # @!attribute selected_option_ids
36
+ # The IDs of the selected options (for multiple choice/select questions)
37
+ #
38
+ # @return [Array<String>, nil]
39
+ optional :selected_option_ids, WhopSDK::Internal::Type::ArrayOf[String], nil?: true
40
+
41
+ # @!method initialize(question_id:, answer_text: nil, selected_option_ids: nil)
42
+ # Input for a single question's answer in an assessment submission
43
+ #
44
+ # @param question_id [String] The ID of the question being answered
45
+ #
46
+ # @param answer_text [String, nil] The text answer provided by the user (for short answer questions)
47
+ #
48
+ # @param selected_option_ids [Array<String>, nil] The IDs of the selected options (for multiple choice/select questions)
49
+ end
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,151 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # @see WhopSDK::Resources::CourseLessons#submit_assessment
6
+ class CourseLessonSubmitAssessmentResponse < WhopSDK::Internal::Type::BaseModel
7
+ # @!attribute id
8
+ # The ID of the assessment result
9
+ #
10
+ # @return [String]
11
+ required :id, String
12
+
13
+ # @!attribute created_at
14
+ # When the assessment was taken
15
+ #
16
+ # @return [Time]
17
+ required :created_at, Time
18
+
19
+ # @!attribute lesson
20
+ # The lesson this assessment result is for
21
+ #
22
+ # @return [WhopSDK::Models::CourseLessonSubmitAssessmentResponse::Lesson]
23
+ required :lesson, -> { WhopSDK::Models::CourseLessonSubmitAssessmentResponse::Lesson }
24
+
25
+ # @!attribute result_correct
26
+ # The number of correct answers
27
+ #
28
+ # @return [Integer]
29
+ required :result_correct, Integer
30
+
31
+ # @!attribute result_grade
32
+ # The grade achieved on the assessment
33
+ #
34
+ # @return [Float]
35
+ required :result_grade, Float
36
+
37
+ # @!attribute result_graded_questions
38
+ # Array of graded questions with details
39
+ #
40
+ # @return [Hash{Symbol=>Object}]
41
+ required :result_graded_questions, WhopSDK::Internal::Type::HashOf[WhopSDK::Internal::Type::Unknown]
42
+
43
+ # @!attribute result_passing_grade
44
+ # Whether the user achieved a passing grade
45
+ #
46
+ # @return [Boolean]
47
+ required :result_passing_grade, WhopSDK::Internal::Type::Boolean
48
+
49
+ # @!attribute result_question_count
50
+ # The total number of questions in the assessment
51
+ #
52
+ # @return [Integer]
53
+ required :result_question_count, Integer
54
+
55
+ # @!attribute score_percent
56
+ # The percentage score achieved on the assessment
57
+ #
58
+ # @return [Float]
59
+ required :score_percent, Float
60
+
61
+ # @!attribute updated_at
62
+ # When the assessment result was last updated
63
+ #
64
+ # @return [Time]
65
+ required :updated_at, Time
66
+
67
+ # @!attribute user
68
+ # The user who took the assessment
69
+ #
70
+ # @return [WhopSDK::Models::CourseLessonSubmitAssessmentResponse::User]
71
+ required :user, -> { WhopSDK::Models::CourseLessonSubmitAssessmentResponse::User }
72
+
73
+ # @!method initialize(id:, created_at:, lesson:, result_correct:, result_grade:, result_graded_questions:, result_passing_grade:, result_question_count:, score_percent:, updated_at:, user:)
74
+ # The result of a user's assessment attempt
75
+ #
76
+ # @param id [String] The ID of the assessment result
77
+ #
78
+ # @param created_at [Time] When the assessment was taken
79
+ #
80
+ # @param lesson [WhopSDK::Models::CourseLessonSubmitAssessmentResponse::Lesson] The lesson this assessment result is for
81
+ #
82
+ # @param result_correct [Integer] The number of correct answers
83
+ #
84
+ # @param result_grade [Float] The grade achieved on the assessment
85
+ #
86
+ # @param result_graded_questions [Hash{Symbol=>Object}] Array of graded questions with details
87
+ #
88
+ # @param result_passing_grade [Boolean] Whether the user achieved a passing grade
89
+ #
90
+ # @param result_question_count [Integer] The total number of questions in the assessment
91
+ #
92
+ # @param score_percent [Float] The percentage score achieved on the assessment
93
+ #
94
+ # @param updated_at [Time] When the assessment result was last updated
95
+ #
96
+ # @param user [WhopSDK::Models::CourseLessonSubmitAssessmentResponse::User] The user who took the assessment
97
+
98
+ # @see WhopSDK::Models::CourseLessonSubmitAssessmentResponse#lesson
99
+ class Lesson < WhopSDK::Internal::Type::BaseModel
100
+ # @!attribute id
101
+ # The ID of the lesson
102
+ #
103
+ # @return [String]
104
+ required :id, String
105
+
106
+ # @!attribute title
107
+ # The title of the lesson
108
+ #
109
+ # @return [String]
110
+ required :title, String
111
+
112
+ # @!method initialize(id:, title:)
113
+ # The lesson this assessment result is for
114
+ #
115
+ # @param id [String] The ID of the lesson
116
+ #
117
+ # @param title [String] The title of the lesson
118
+ end
119
+
120
+ # @see WhopSDK::Models::CourseLessonSubmitAssessmentResponse#user
121
+ class User < WhopSDK::Internal::Type::BaseModel
122
+ # @!attribute id
123
+ # The internal ID of the user.
124
+ #
125
+ # @return [String]
126
+ required :id, String
127
+
128
+ # @!attribute name
129
+ # The name of the user from their Whop account.
130
+ #
131
+ # @return [String, nil]
132
+ required :name, String, nil?: true
133
+
134
+ # @!attribute username
135
+ # The username of the user from their Whop account.
136
+ #
137
+ # @return [String]
138
+ required :username, String
139
+
140
+ # @!method initialize(id:, name:, username:)
141
+ # The user who took the assessment
142
+ #
143
+ # @param id [String] The internal ID of the user.
144
+ #
145
+ # @param name [String, nil] The name of the user from their Whop account.
146
+ #
147
+ # @param username [String] The username of the user from their Whop account.
148
+ end
149
+ end
150
+ end
151
+ end
@@ -17,6 +17,12 @@ module WhopSDK
17
17
  # @return [Boolean, nil]
18
18
  required :certificate_after_completion_enabled, WhopSDK::Internal::Type::Boolean, nil?: true
19
19
 
20
+ # @!attribute cover_image
21
+ # The URL of the course's cover image, which is shown in course preview cards
22
+ #
23
+ # @return [String, nil]
24
+ required :cover_image, String, nil?: true
25
+
20
26
  # @!attribute created_at
21
27
  # The timestamp of when the course was created
22
28
  #
@@ -80,7 +86,7 @@ module WhopSDK
80
86
  # @return [Symbol, WhopSDK::Models::CourseVisibilities]
81
87
  required :visibility, enum: -> { WhopSDK::CourseVisibilities }
82
88
 
83
- # @!method initialize(id:, certificate_after_completion_enabled:, created_at:, description:, language:, order:, require_completing_lessons_in_order:, tagline:, thumbnail:, title:, updated_at:, visibility:)
89
+ # @!method initialize(id:, certificate_after_completion_enabled:, cover_image:, created_at:, description:, language:, order:, require_completing_lessons_in_order:, tagline:, thumbnail:, title:, updated_at:, visibility:)
84
90
  # Some parameter documentations has been truncated, see
85
91
  # {WhopSDK::Models::CourseListResponse} for more details.
86
92
  #
@@ -90,6 +96,8 @@ module WhopSDK
90
96
  #
91
97
  # @param certificate_after_completion_enabled [Boolean, nil] Whether the course will award its students a PDF certificate after completing al
92
98
  #
99
+ # @param cover_image [String, nil] The URL of the course's cover image, which is shown in course preview cards
100
+ #
93
101
  # @param created_at [Time] The timestamp of when the course was created
94
102
  #
95
103
  # @param description [String, nil] A short description of the course
@@ -77,8 +77,8 @@ module WhopSDK
77
77
  # @!attribute visibility
78
78
  # The visibility types for forum posts
79
79
  #
80
- # @return [Symbol, WhopSDK::Models::ForumPostCreateParams::Visibility, nil]
81
- optional :visibility, enum: -> { WhopSDK::ForumPostCreateParams::Visibility }, nil?: true
80
+ # @return [Symbol, WhopSDK::Models::ForumPostVisibilityType, nil]
81
+ optional :visibility, enum: -> { WhopSDK::ForumPostVisibilityType }, nil?: true
82
82
 
83
83
  # @!method initialize(experience_id:, attachments: nil, content: nil, is_mention: nil, parent_id: nil, paywall_amount: nil, paywall_currency: nil, pinned: nil, poll: nil, title: nil, visibility: nil, request_options: {})
84
84
  # Some parameter documentations has been truncated, see
@@ -104,7 +104,7 @@ module WhopSDK
104
104
  #
105
105
  # @param title [String, nil] The title of the post. Only visible if paywalled.
106
106
  #
107
- # @param visibility [Symbol, WhopSDK::Models::ForumPostCreateParams::Visibility, nil] The visibility types for forum posts
107
+ # @param visibility [Symbol, WhopSDK::Models::ForumPostVisibilityType, nil] The visibility types for forum posts
108
108
  #
109
109
  # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
110
110
 
@@ -193,17 +193,6 @@ module WhopSDK
193
193
  # @param text [String] The text of the poll option
194
194
  end
195
195
  end
196
-
197
- # The visibility types for forum posts
198
- module Visibility
199
- extend WhopSDK::Internal::Type::Enum
200
-
201
- MEMBERS_ONLY = :members_only
202
- GLOBALLY_VISIBLE = :globally_visible
203
-
204
- # @!method self.values
205
- # @return [Array<Symbol>]
206
- end
207
196
  end
208
197
  end
209
198
  end
@@ -37,8 +37,8 @@ module WhopSDK
37
37
  # @!attribute visibility
38
38
  # The visibility types for forum posts
39
39
  #
40
- # @return [Symbol, WhopSDK::Models::ForumPostUpdateParams::Visibility, nil]
41
- optional :visibility, enum: -> { WhopSDK::ForumPostUpdateParams::Visibility }, nil?: true
40
+ # @return [Symbol, WhopSDK::Models::ForumPostVisibilityType, nil]
41
+ optional :visibility, enum: -> { WhopSDK::ForumPostVisibilityType }, nil?: true
42
42
 
43
43
  # @!method initialize(attachments: nil, content: nil, is_pinned: nil, title: nil, visibility: nil, request_options: {})
44
44
  # Some parameter documentations has been truncated, see
@@ -52,7 +52,7 @@ module WhopSDK
52
52
  #
53
53
  # @param title [String, nil] The title of the post. Only visible if paywalled.
54
54
  #
55
- # @param visibility [Symbol, WhopSDK::Models::ForumPostUpdateParams::Visibility, nil] The visibility types for forum posts
55
+ # @param visibility [Symbol, WhopSDK::Models::ForumPostVisibilityType, nil] The visibility types for forum posts
56
56
  #
57
57
  # @param request_options [WhopSDK::RequestOptions, Hash{Symbol=>Object}]
58
58
 
@@ -107,17 +107,6 @@ module WhopSDK
107
107
  # @!method self.variants
108
108
  # @return [Array(WhopSDK::Models::ForumPostUpdateParams::Attachment::AttachmentInputWithDirectUploadID, WhopSDK::Models::ForumPostUpdateParams::Attachment::AttachmentInputWithID)]
109
109
  end
110
-
111
- # The visibility types for forum posts
112
- module Visibility
113
- extend WhopSDK::Internal::Type::Enum
114
-
115
- MEMBERS_ONLY = :members_only
116
- GLOBALLY_VISIBLE = :globally_visible
117
-
118
- # @!method self.values
119
- # @return [Array<Symbol>]
120
- end
121
110
  end
122
111
  end
123
112
  end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # The visibility types for forum posts
6
+ module ForumPostVisibilityType
7
+ extend WhopSDK::Internal::Type::Enum
8
+
9
+ MEMBERS_ONLY = :members_only
10
+ GLOBALLY_VISIBLE = :globally_visible
11
+
12
+ # @!method self.values
13
+ # @return [Array<Symbol>]
14
+ end
15
+ end
16
+ end
@@ -29,6 +29,12 @@ module WhopSDK
29
29
  # @return [String, nil]
30
30
  required :content, String, nil?: true
31
31
 
32
+ # @!attribute created_at
33
+ # The timestamp of when the lesson was created
34
+ #
35
+ # @return [Time]
36
+ required :created_at, Time
37
+
32
38
  # @!attribute days_from_course_start_until_unlock
33
39
  # Number of days from course start until the lesson is unlocked
34
40
  #
@@ -90,7 +96,7 @@ module WhopSDK
90
96
  # @return [Symbol, WhopSDK::Models::LessonVisibilities]
91
97
  required :visibility, enum: -> { WhopSDK::LessonVisibilities }
92
98
 
93
- # @!method initialize(id:, assessment_questions:, attachments:, content:, days_from_course_start_until_unlock:, embed_id:, embed_type:, lesson_type:, main_pdf:, order:, thumbnail:, title:, video_asset:, visibility:)
99
+ # @!method initialize(id:, assessment_questions:, attachments:, content:, created_at:, days_from_course_start_until_unlock:, embed_id:, embed_type:, lesson_type:, main_pdf:, order:, thumbnail:, title:, video_asset:, visibility:)
94
100
  # Some parameter documentations has been truncated, see {WhopSDK::Models::Lesson}
95
101
  # for more details.
96
102
  #
@@ -104,6 +110,8 @@ module WhopSDK
104
110
  #
105
111
  # @param content [String, nil] The content of the lesson
106
112
  #
113
+ # @param created_at [Time] The timestamp of when the lesson was created
114
+ #
107
115
  # @param days_from_course_start_until_unlock [Integer, nil] Number of days from course start until the lesson is unlocked
108
116
  #
109
117
  # @param embed_id [String, nil] ID for the embed (YouTube video ID or Loom share ID)
@@ -395,20 +403,114 @@ module WhopSDK
395
403
  # @return [String, nil]
396
404
  required :asset_id, String, nil?: true
397
405
 
406
+ # @!attribute audio_only
407
+ # Whether this asset contains only audio
408
+ #
409
+ # @return [Boolean]
410
+ required :audio_only, WhopSDK::Internal::Type::Boolean
411
+
412
+ # @!attribute created_at
413
+ # The time at which the Mux asset was created
414
+ #
415
+ # @return [Time]
416
+ required :created_at, Time
417
+
418
+ # @!attribute duration_seconds
419
+ # The duration of the video in seconds
420
+ #
421
+ # @return [Integer, nil]
422
+ required :duration_seconds, Integer, nil?: true
423
+
424
+ # @!attribute finished_uploading_at
425
+ # The time at which the video finished uploading
426
+ #
427
+ # @return [Time, nil]
428
+ required :finished_uploading_at, Time, nil?: true
429
+
398
430
  # @!attribute playback_id
399
431
  # The public playback ID of the Mux asset
400
432
  #
401
433
  # @return [String, nil]
402
434
  required :playback_id, String, nil?: true
403
435
 
404
- # @!method initialize(id:, asset_id:, playback_id:)
436
+ # @!attribute signed_playback_id
437
+ # The signed playback ID of the Mux asset
438
+ #
439
+ # @return [String, nil]
440
+ required :signed_playback_id, String, nil?: true
441
+
442
+ # @!attribute signed_storyboard_playback_token
443
+ # The signed storyboard playback token of the Mux asset
444
+ #
445
+ # @return [String, nil]
446
+ required :signed_storyboard_playback_token, String, nil?: true
447
+
448
+ # @!attribute signed_thumbnail_playback_token
449
+ # The signed thumbnail playback token of the Mux asset
450
+ #
451
+ # @return [String, nil]
452
+ required :signed_thumbnail_playback_token, String, nil?: true
453
+
454
+ # @!attribute signed_video_playback_token
455
+ # The signed video playback token of the Mux asset
456
+ #
457
+ # @return [String, nil]
458
+ required :signed_video_playback_token, String, nil?: true
459
+
460
+ # @!attribute status
461
+ # The status of the Mux asset
462
+ #
463
+ # @return [Symbol, WhopSDK::Models::Lesson::VideoAsset::Status]
464
+ required :status, enum: -> { WhopSDK::Lesson::VideoAsset::Status }
465
+
466
+ # @!attribute updated_at
467
+ # The time at which the Mux asset was last updated
468
+ #
469
+ # @return [Time]
470
+ required :updated_at, Time
471
+
472
+ # @!method initialize(id:, asset_id:, audio_only:, created_at:, duration_seconds:, finished_uploading_at:, playback_id:, signed_playback_id:, signed_storyboard_playback_token:, signed_thumbnail_playback_token:, signed_video_playback_token:, status:, updated_at:)
405
473
  # The associated Mux asset for video lessons
406
474
  #
407
475
  # @param id [String] The ID of the Mux asset
408
476
  #
409
477
  # @param asset_id [String, nil] The Mux-provided ID of the asset
410
478
  #
479
+ # @param audio_only [Boolean] Whether this asset contains only audio
480
+ #
481
+ # @param created_at [Time] The time at which the Mux asset was created
482
+ #
483
+ # @param duration_seconds [Integer, nil] The duration of the video in seconds
484
+ #
485
+ # @param finished_uploading_at [Time, nil] The time at which the video finished uploading
486
+ #
411
487
  # @param playback_id [String, nil] The public playback ID of the Mux asset
488
+ #
489
+ # @param signed_playback_id [String, nil] The signed playback ID of the Mux asset
490
+ #
491
+ # @param signed_storyboard_playback_token [String, nil] The signed storyboard playback token of the Mux asset
492
+ #
493
+ # @param signed_thumbnail_playback_token [String, nil] The signed thumbnail playback token of the Mux asset
494
+ #
495
+ # @param signed_video_playback_token [String, nil] The signed video playback token of the Mux asset
496
+ #
497
+ # @param status [Symbol, WhopSDK::Models::Lesson::VideoAsset::Status] The status of the Mux asset
498
+ #
499
+ # @param updated_at [Time] The time at which the Mux asset was last updated
500
+
501
+ # The status of the Mux asset
502
+ #
503
+ # @see WhopSDK::Models::Lesson::VideoAsset#status
504
+ module Status
505
+ extend WhopSDK::Internal::Type::Enum
506
+
507
+ UPLOADING = :uploading
508
+ CREATED = :created
509
+ READY = :ready
510
+
511
+ # @!method self.values
512
+ # @return [Array<Symbol>]
513
+ end
412
514
  end
413
515
  end
414
516
  end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # The different payment providers.
6
+ module PaymentProvider
7
+ extend WhopSDK::Internal::Type::Enum
8
+
9
+ STRIPE = :stripe
10
+ COINBASE = :coinbase
11
+ PAYPAL = :paypal
12
+ APPLE = :apple
13
+ SEZZLE = :sezzle
14
+ SPLITIT = :splitit
15
+ PLATFORM_BALANCE = :platform_balance
16
+ MULTI_PSP = :multi_psp
17
+
18
+ # @!method self.values
19
+ # @return [Array<Symbol>]
20
+ end
21
+ end
22
+ end