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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +19 -0
- data/README.md +7 -7
- data/lib/whop_sdk/client.rb +8 -0
- data/lib/whop_sdk/internal/type/base_model.rb +1 -1
- data/lib/whop_sdk/models/app.rb +9 -1
- data/lib/whop_sdk/models/app_list_params.rb +9 -1
- data/lib/whop_sdk/models/app_list_response.rb +9 -1
- data/lib/whop_sdk/models/app_type.rb +18 -0
- data/lib/whop_sdk/models/app_update_params.rb +9 -1
- data/lib/whop_sdk/models/checkout_configuration.rb +69 -7
- data/lib/whop_sdk/models/checkout_configuration_create_params.rb +73 -1
- data/lib/whop_sdk/models/checkout_configuration_list_response.rb +69 -7
- data/lib/whop_sdk/models/checkout_modes.rb +16 -0
- data/lib/whop_sdk/models/course.rb +9 -1
- data/lib/whop_sdk/models/course_lesson_list_response.rb +9 -1
- data/lib/whop_sdk/models/course_lesson_mark_as_completed_params.rb +14 -0
- data/lib/whop_sdk/models/course_lesson_mark_as_completed_response.rb +8 -0
- data/lib/whop_sdk/models/course_lesson_start_params.rb +14 -0
- data/lib/whop_sdk/models/course_lesson_start_response.rb +8 -0
- data/lib/whop_sdk/models/course_lesson_submit_assessment_params.rb +52 -0
- data/lib/whop_sdk/models/course_lesson_submit_assessment_response.rb +151 -0
- data/lib/whop_sdk/models/course_list_response.rb +9 -1
- data/lib/whop_sdk/models/forum_post_create_params.rb +3 -14
- data/lib/whop_sdk/models/forum_post_update_params.rb +3 -14
- data/lib/whop_sdk/models/forum_post_visibility_type.rb +16 -0
- data/lib/whop_sdk/models/lesson.rb +104 -2
- data/lib/whop_sdk/models/payment_provider.rb +22 -0
- data/lib/whop_sdk/models/refund_created_webhook_event.rb +354 -0
- data/lib/whop_sdk/models/refund_list_params.rb +62 -0
- data/lib/whop_sdk/models/refund_list_response.rb +113 -0
- data/lib/whop_sdk/models/refund_reference_status.rb +17 -0
- data/lib/whop_sdk/models/refund_reference_type.rb +17 -0
- data/lib/whop_sdk/models/refund_retrieve_params.rb +14 -0
- data/lib/whop_sdk/models/refund_retrieve_response.rb +307 -0
- data/lib/whop_sdk/models/refund_status.rb +19 -0
- data/lib/whop_sdk/models/refund_updated_webhook_event.rb +354 -0
- data/lib/whop_sdk/models/unwrap_webhook_event.rb +5 -1
- data/lib/whop_sdk/models/withdrawal_fee_types.rb +16 -0
- data/lib/whop_sdk/models/withdrawal_list_params.rb +78 -0
- data/lib/whop_sdk/models/withdrawal_list_response.rb +87 -0
- data/lib/whop_sdk/models/withdrawal_retrieve_params.rb +14 -0
- data/lib/whop_sdk/models/withdrawal_retrieve_response.rb +320 -0
- data/lib/whop_sdk/models/withdrawal_speeds.rb +16 -0
- data/lib/whop_sdk/models/withdrawal_status.rb +21 -0
- data/lib/whop_sdk/models/withdrawal_types.rb +16 -0
- data/lib/whop_sdk/models.rb +40 -0
- data/lib/whop_sdk/resources/apps.rb +6 -2
- data/lib/whop_sdk/resources/checkout_configurations.rb +11 -1
- data/lib/whop_sdk/resources/course_lessons.rb +64 -0
- data/lib/whop_sdk/resources/forum_posts.rb +2 -2
- data/lib/whop_sdk/resources/refunds.rb +78 -0
- data/lib/whop_sdk/resources/webhooks.rb +1 -1
- data/lib/whop_sdk/resources/withdrawals.rb +79 -0
- data/lib/whop_sdk/version.rb +1 -1
- data/lib/whop_sdk.rb +29 -0
- data/rbi/whop_sdk/client.rbi +6 -0
- data/rbi/whop_sdk/models/app.rbi +8 -0
- data/rbi/whop_sdk/models/app_list_params.rbi +8 -0
- data/rbi/whop_sdk/models/app_list_response.rbi +8 -0
- data/rbi/whop_sdk/models/app_type.rbi +22 -0
- data/rbi/whop_sdk/models/app_update_params.rbi +8 -0
- data/rbi/whop_sdk/models/checkout_configuration.rbi +117 -7
- data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +116 -0
- data/rbi/whop_sdk/models/checkout_configuration_list_response.rbi +127 -7
- data/rbi/whop_sdk/models/checkout_modes.rbi +20 -0
- data/rbi/whop_sdk/models/course.rbi +8 -0
- data/rbi/whop_sdk/models/course_lesson_list_response.rbi +8 -0
- data/rbi/whop_sdk/models/course_lesson_mark_as_completed_params.rbi +30 -0
- data/rbi/whop_sdk/models/course_lesson_mark_as_completed_response.rbi +8 -0
- data/rbi/whop_sdk/models/course_lesson_start_params.rbi +27 -0
- data/rbi/whop_sdk/models/course_lesson_start_response.rbi +8 -0
- data/rbi/whop_sdk/models/course_lesson_submit_assessment_params.rbi +104 -0
- data/rbi/whop_sdk/models/course_lesson_submit_assessment_response.rbi +222 -0
- data/rbi/whop_sdk/models/course_list_response.rbi +8 -0
- data/rbi/whop_sdk/models/forum_post_create_params.rbi +3 -37
- data/rbi/whop_sdk/models/forum_post_update_params.rbi +3 -37
- data/rbi/whop_sdk/models/forum_post_visibility_type.rbi +27 -0
- data/rbi/whop_sdk/models/lesson.rbi +115 -3
- data/rbi/whop_sdk/models/payment_provider.rbi +27 -0
- data/rbi/whop_sdk/models/refund_created_webhook_event.rbi +561 -0
- data/rbi/whop_sdk/models/refund_list_params.rbi +83 -0
- data/rbi/whop_sdk/models/refund_list_response.rbi +155 -0
- data/rbi/whop_sdk/models/refund_reference_status.rbi +26 -0
- data/rbi/whop_sdk/models/refund_reference_type.rbi +36 -0
- data/rbi/whop_sdk/models/refund_retrieve_params.rbi +27 -0
- data/rbi/whop_sdk/models/refund_retrieve_response.rbi +484 -0
- data/rbi/whop_sdk/models/refund_status.rbi +24 -0
- data/rbi/whop_sdk/models/refund_updated_webhook_event.rbi +561 -0
- data/rbi/whop_sdk/models/unwrap_webhook_event.rbi +3 -1
- data/rbi/whop_sdk/models/withdrawal_fee_types.rbi +22 -0
- data/rbi/whop_sdk/models/withdrawal_list_params.rbi +99 -0
- data/rbi/whop_sdk/models/withdrawal_list_response.rbi +107 -0
- data/rbi/whop_sdk/models/withdrawal_retrieve_params.rbi +27 -0
- data/rbi/whop_sdk/models/withdrawal_retrieve_response.rbi +713 -0
- data/rbi/whop_sdk/models/withdrawal_speeds.rbi +22 -0
- data/rbi/whop_sdk/models/withdrawal_status.rbi +28 -0
- data/rbi/whop_sdk/models/withdrawal_types.rbi +20 -0
- data/rbi/whop_sdk/models.rbi +42 -0
- data/rbi/whop_sdk/resources/apps.rbi +6 -0
- data/rbi/whop_sdk/resources/checkout_configurations.rbi +15 -0
- data/rbi/whop_sdk/resources/course_lessons.rbi +48 -0
- data/rbi/whop_sdk/resources/forum_posts.rbi +2 -4
- data/rbi/whop_sdk/resources/refunds.rbi +68 -0
- data/rbi/whop_sdk/resources/webhooks.rbi +3 -1
- data/rbi/whop_sdk/resources/withdrawals.rbi +71 -0
- data/sig/whop_sdk/client.rbs +4 -0
- data/sig/whop_sdk/models/app.rbs +5 -0
- data/sig/whop_sdk/models/app_list_params.rbs +5 -0
- data/sig/whop_sdk/models/app_list_response.rbs +5 -0
- data/sig/whop_sdk/models/app_type.rbs +16 -0
- data/sig/whop_sdk/models/app_update_params.rbs +5 -0
- data/sig/whop_sdk/models/checkout_configuration.rbs +45 -8
- data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +43 -1
- data/sig/whop_sdk/models/checkout_configuration_list_response.rbs +45 -8
- data/sig/whop_sdk/models/checkout_modes.rbs +14 -0
- data/sig/whop_sdk/models/course.rbs +5 -0
- data/sig/whop_sdk/models/course_lesson_list_response.rbs +5 -0
- data/sig/whop_sdk/models/course_lesson_mark_as_completed_params.rbs +15 -0
- data/sig/whop_sdk/models/course_lesson_mark_as_completed_response.rbs +5 -0
- data/sig/whop_sdk/models/course_lesson_start_params.rbs +15 -0
- data/sig/whop_sdk/models/course_lesson_start_response.rbs +5 -0
- data/sig/whop_sdk/models/course_lesson_submit_assessment_params.rbs +51 -0
- data/sig/whop_sdk/models/course_lesson_submit_assessment_response.rbs +96 -0
- data/sig/whop_sdk/models/course_list_response.rbs +5 -0
- data/sig/whop_sdk/models/forum_post_create_params.rbs +4 -15
- data/sig/whop_sdk/models/forum_post_update_params.rbs +4 -15
- data/sig/whop_sdk/models/forum_post_visibility_type.rbs +14 -0
- data/sig/whop_sdk/models/lesson.rbs +79 -3
- data/sig/whop_sdk/models/payment_provider.rbs +28 -0
- data/sig/whop_sdk/models/refund_created_webhook_event.rbs +252 -0
- data/sig/whop_sdk/models/refund_list_params.rbs +51 -0
- data/sig/whop_sdk/models/refund_list_response.rbs +80 -0
- data/sig/whop_sdk/models/refund_reference_status.rbs +15 -0
- data/sig/whop_sdk/models/refund_reference_type.rbs +18 -0
- data/sig/whop_sdk/models/refund_retrieve_params.rbs +15 -0
- data/sig/whop_sdk/models/refund_retrieve_response.rbs +215 -0
- data/sig/whop_sdk/models/refund_status.rbs +18 -0
- data/sig/whop_sdk/models/refund_updated_webhook_event.rbs +252 -0
- data/sig/whop_sdk/models/unwrap_webhook_event.rbs +2 -0
- data/sig/whop_sdk/models/withdrawal_fee_types.rbs +14 -0
- data/sig/whop_sdk/models/withdrawal_list_params.rbs +61 -0
- data/sig/whop_sdk/models/withdrawal_list_response.rbs +60 -0
- data/sig/whop_sdk/models/withdrawal_retrieve_params.rbs +15 -0
- data/sig/whop_sdk/models/withdrawal_retrieve_response.rbs +297 -0
- data/sig/whop_sdk/models/withdrawal_speeds.rbs +14 -0
- data/sig/whop_sdk/models/withdrawal_status.rbs +26 -0
- data/sig/whop_sdk/models/withdrawal_types.rbs +14 -0
- data/sig/whop_sdk/models.rbs +40 -0
- data/sig/whop_sdk/resources/apps.rbs +2 -0
- data/sig/whop_sdk/resources/checkout_configurations.rbs +3 -0
- data/sig/whop_sdk/resources/course_lessons.rbs +16 -0
- data/sig/whop_sdk/resources/forum_posts.rbs +2 -2
- data/sig/whop_sdk/resources/refunds.rbs +22 -0
- data/sig/whop_sdk/resources/webhooks.rbs +3 -1
- data/sig/whop_sdk/resources/withdrawals.rbs +24 -0
- metadata +89 -2
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
class CourseLessonSubmitAssessmentParams < WhopSDK::Internal::Type::BaseModel
|
|
6
|
+
extend WhopSDK::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include WhopSDK::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
WhopSDK::CourseLessonSubmitAssessmentParams,
|
|
13
|
+
WhopSDK::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# The answers to the assessment questions
|
|
18
|
+
sig do
|
|
19
|
+
returns(T::Array[WhopSDK::CourseLessonSubmitAssessmentParams::Answer])
|
|
20
|
+
end
|
|
21
|
+
attr_accessor :answers
|
|
22
|
+
|
|
23
|
+
sig do
|
|
24
|
+
params(
|
|
25
|
+
answers:
|
|
26
|
+
T::Array[
|
|
27
|
+
WhopSDK::CourseLessonSubmitAssessmentParams::Answer::OrHash
|
|
28
|
+
],
|
|
29
|
+
request_options: WhopSDK::RequestOptions::OrHash
|
|
30
|
+
).returns(T.attached_class)
|
|
31
|
+
end
|
|
32
|
+
def self.new(
|
|
33
|
+
# The answers to the assessment questions
|
|
34
|
+
answers:,
|
|
35
|
+
request_options: {}
|
|
36
|
+
)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
sig do
|
|
40
|
+
override.returns(
|
|
41
|
+
{
|
|
42
|
+
answers:
|
|
43
|
+
T::Array[WhopSDK::CourseLessonSubmitAssessmentParams::Answer],
|
|
44
|
+
request_options: WhopSDK::RequestOptions
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
end
|
|
48
|
+
def to_hash
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
class Answer < WhopSDK::Internal::Type::BaseModel
|
|
52
|
+
OrHash =
|
|
53
|
+
T.type_alias do
|
|
54
|
+
T.any(
|
|
55
|
+
WhopSDK::CourseLessonSubmitAssessmentParams::Answer,
|
|
56
|
+
WhopSDK::Internal::AnyHash
|
|
57
|
+
)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# The ID of the question being answered
|
|
61
|
+
sig { returns(String) }
|
|
62
|
+
attr_accessor :question_id
|
|
63
|
+
|
|
64
|
+
# The text answer provided by the user (for short answer questions)
|
|
65
|
+
sig { returns(T.nilable(String)) }
|
|
66
|
+
attr_accessor :answer_text
|
|
67
|
+
|
|
68
|
+
# The IDs of the selected options (for multiple choice/select questions)
|
|
69
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
70
|
+
attr_accessor :selected_option_ids
|
|
71
|
+
|
|
72
|
+
# Input for a single question's answer in an assessment submission
|
|
73
|
+
sig do
|
|
74
|
+
params(
|
|
75
|
+
question_id: String,
|
|
76
|
+
answer_text: T.nilable(String),
|
|
77
|
+
selected_option_ids: T.nilable(T::Array[String])
|
|
78
|
+
).returns(T.attached_class)
|
|
79
|
+
end
|
|
80
|
+
def self.new(
|
|
81
|
+
# The ID of the question being answered
|
|
82
|
+
question_id:,
|
|
83
|
+
# The text answer provided by the user (for short answer questions)
|
|
84
|
+
answer_text: nil,
|
|
85
|
+
# The IDs of the selected options (for multiple choice/select questions)
|
|
86
|
+
selected_option_ids: nil
|
|
87
|
+
)
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
sig do
|
|
91
|
+
override.returns(
|
|
92
|
+
{
|
|
93
|
+
question_id: String,
|
|
94
|
+
answer_text: T.nilable(String),
|
|
95
|
+
selected_option_ids: T.nilable(T::Array[String])
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
end
|
|
99
|
+
def to_hash
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
end
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
class CourseLessonSubmitAssessmentResponse < WhopSDK::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
WhopSDK::Models::CourseLessonSubmitAssessmentResponse,
|
|
10
|
+
WhopSDK::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# The ID of the assessment result
|
|
15
|
+
sig { returns(String) }
|
|
16
|
+
attr_accessor :id
|
|
17
|
+
|
|
18
|
+
# When the assessment was taken
|
|
19
|
+
sig { returns(Time) }
|
|
20
|
+
attr_accessor :created_at
|
|
21
|
+
|
|
22
|
+
# The lesson this assessment result is for
|
|
23
|
+
sig do
|
|
24
|
+
returns(WhopSDK::Models::CourseLessonSubmitAssessmentResponse::Lesson)
|
|
25
|
+
end
|
|
26
|
+
attr_reader :lesson
|
|
27
|
+
|
|
28
|
+
sig do
|
|
29
|
+
params(
|
|
30
|
+
lesson:
|
|
31
|
+
WhopSDK::Models::CourseLessonSubmitAssessmentResponse::Lesson::OrHash
|
|
32
|
+
).void
|
|
33
|
+
end
|
|
34
|
+
attr_writer :lesson
|
|
35
|
+
|
|
36
|
+
# The number of correct answers
|
|
37
|
+
sig { returns(Integer) }
|
|
38
|
+
attr_accessor :result_correct
|
|
39
|
+
|
|
40
|
+
# The grade achieved on the assessment
|
|
41
|
+
sig { returns(Float) }
|
|
42
|
+
attr_accessor :result_grade
|
|
43
|
+
|
|
44
|
+
# Array of graded questions with details
|
|
45
|
+
sig { returns(T::Hash[Symbol, T.anything]) }
|
|
46
|
+
attr_accessor :result_graded_questions
|
|
47
|
+
|
|
48
|
+
# Whether the user achieved a passing grade
|
|
49
|
+
sig { returns(T::Boolean) }
|
|
50
|
+
attr_accessor :result_passing_grade
|
|
51
|
+
|
|
52
|
+
# The total number of questions in the assessment
|
|
53
|
+
sig { returns(Integer) }
|
|
54
|
+
attr_accessor :result_question_count
|
|
55
|
+
|
|
56
|
+
# The percentage score achieved on the assessment
|
|
57
|
+
sig { returns(Float) }
|
|
58
|
+
attr_accessor :score_percent
|
|
59
|
+
|
|
60
|
+
# When the assessment result was last updated
|
|
61
|
+
sig { returns(Time) }
|
|
62
|
+
attr_accessor :updated_at
|
|
63
|
+
|
|
64
|
+
# The user who took the assessment
|
|
65
|
+
sig do
|
|
66
|
+
returns(WhopSDK::Models::CourseLessonSubmitAssessmentResponse::User)
|
|
67
|
+
end
|
|
68
|
+
attr_reader :user
|
|
69
|
+
|
|
70
|
+
sig do
|
|
71
|
+
params(
|
|
72
|
+
user:
|
|
73
|
+
WhopSDK::Models::CourseLessonSubmitAssessmentResponse::User::OrHash
|
|
74
|
+
).void
|
|
75
|
+
end
|
|
76
|
+
attr_writer :user
|
|
77
|
+
|
|
78
|
+
# The result of a user's assessment attempt
|
|
79
|
+
sig do
|
|
80
|
+
params(
|
|
81
|
+
id: String,
|
|
82
|
+
created_at: Time,
|
|
83
|
+
lesson:
|
|
84
|
+
WhopSDK::Models::CourseLessonSubmitAssessmentResponse::Lesson::OrHash,
|
|
85
|
+
result_correct: Integer,
|
|
86
|
+
result_grade: Float,
|
|
87
|
+
result_graded_questions: T::Hash[Symbol, T.anything],
|
|
88
|
+
result_passing_grade: T::Boolean,
|
|
89
|
+
result_question_count: Integer,
|
|
90
|
+
score_percent: Float,
|
|
91
|
+
updated_at: Time,
|
|
92
|
+
user:
|
|
93
|
+
WhopSDK::Models::CourseLessonSubmitAssessmentResponse::User::OrHash
|
|
94
|
+
).returns(T.attached_class)
|
|
95
|
+
end
|
|
96
|
+
def self.new(
|
|
97
|
+
# The ID of the assessment result
|
|
98
|
+
id:,
|
|
99
|
+
# When the assessment was taken
|
|
100
|
+
created_at:,
|
|
101
|
+
# The lesson this assessment result is for
|
|
102
|
+
lesson:,
|
|
103
|
+
# The number of correct answers
|
|
104
|
+
result_correct:,
|
|
105
|
+
# The grade achieved on the assessment
|
|
106
|
+
result_grade:,
|
|
107
|
+
# Array of graded questions with details
|
|
108
|
+
result_graded_questions:,
|
|
109
|
+
# Whether the user achieved a passing grade
|
|
110
|
+
result_passing_grade:,
|
|
111
|
+
# The total number of questions in the assessment
|
|
112
|
+
result_question_count:,
|
|
113
|
+
# The percentage score achieved on the assessment
|
|
114
|
+
score_percent:,
|
|
115
|
+
# When the assessment result was last updated
|
|
116
|
+
updated_at:,
|
|
117
|
+
# The user who took the assessment
|
|
118
|
+
user:
|
|
119
|
+
)
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
sig do
|
|
123
|
+
override.returns(
|
|
124
|
+
{
|
|
125
|
+
id: String,
|
|
126
|
+
created_at: Time,
|
|
127
|
+
lesson:
|
|
128
|
+
WhopSDK::Models::CourseLessonSubmitAssessmentResponse::Lesson,
|
|
129
|
+
result_correct: Integer,
|
|
130
|
+
result_grade: Float,
|
|
131
|
+
result_graded_questions: T::Hash[Symbol, T.anything],
|
|
132
|
+
result_passing_grade: T::Boolean,
|
|
133
|
+
result_question_count: Integer,
|
|
134
|
+
score_percent: Float,
|
|
135
|
+
updated_at: Time,
|
|
136
|
+
user: WhopSDK::Models::CourseLessonSubmitAssessmentResponse::User
|
|
137
|
+
}
|
|
138
|
+
)
|
|
139
|
+
end
|
|
140
|
+
def to_hash
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
class Lesson < WhopSDK::Internal::Type::BaseModel
|
|
144
|
+
OrHash =
|
|
145
|
+
T.type_alias do
|
|
146
|
+
T.any(
|
|
147
|
+
WhopSDK::Models::CourseLessonSubmitAssessmentResponse::Lesson,
|
|
148
|
+
WhopSDK::Internal::AnyHash
|
|
149
|
+
)
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# The ID of the lesson
|
|
153
|
+
sig { returns(String) }
|
|
154
|
+
attr_accessor :id
|
|
155
|
+
|
|
156
|
+
# The title of the lesson
|
|
157
|
+
sig { returns(String) }
|
|
158
|
+
attr_accessor :title
|
|
159
|
+
|
|
160
|
+
# The lesson this assessment result is for
|
|
161
|
+
sig { params(id: String, title: String).returns(T.attached_class) }
|
|
162
|
+
def self.new(
|
|
163
|
+
# The ID of the lesson
|
|
164
|
+
id:,
|
|
165
|
+
# The title of the lesson
|
|
166
|
+
title:
|
|
167
|
+
)
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
sig { override.returns({ id: String, title: String }) }
|
|
171
|
+
def to_hash
|
|
172
|
+
end
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
class User < WhopSDK::Internal::Type::BaseModel
|
|
176
|
+
OrHash =
|
|
177
|
+
T.type_alias do
|
|
178
|
+
T.any(
|
|
179
|
+
WhopSDK::Models::CourseLessonSubmitAssessmentResponse::User,
|
|
180
|
+
WhopSDK::Internal::AnyHash
|
|
181
|
+
)
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# The internal ID of the user.
|
|
185
|
+
sig { returns(String) }
|
|
186
|
+
attr_accessor :id
|
|
187
|
+
|
|
188
|
+
# The name of the user from their Whop account.
|
|
189
|
+
sig { returns(T.nilable(String)) }
|
|
190
|
+
attr_accessor :name
|
|
191
|
+
|
|
192
|
+
# The username of the user from their Whop account.
|
|
193
|
+
sig { returns(String) }
|
|
194
|
+
attr_accessor :username
|
|
195
|
+
|
|
196
|
+
# The user who took the assessment
|
|
197
|
+
sig do
|
|
198
|
+
params(id: String, name: T.nilable(String), username: String).returns(
|
|
199
|
+
T.attached_class
|
|
200
|
+
)
|
|
201
|
+
end
|
|
202
|
+
def self.new(
|
|
203
|
+
# The internal ID of the user.
|
|
204
|
+
id:,
|
|
205
|
+
# The name of the user from their Whop account.
|
|
206
|
+
name:,
|
|
207
|
+
# The username of the user from their Whop account.
|
|
208
|
+
username:
|
|
209
|
+
)
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
sig do
|
|
213
|
+
override.returns(
|
|
214
|
+
{ id: String, name: T.nilable(String), username: String }
|
|
215
|
+
)
|
|
216
|
+
end
|
|
217
|
+
def to_hash
|
|
218
|
+
end
|
|
219
|
+
end
|
|
220
|
+
end
|
|
221
|
+
end
|
|
222
|
+
end
|
|
@@ -17,6 +17,10 @@ module WhopSDK
|
|
|
17
17
|
sig { returns(T.nilable(T::Boolean)) }
|
|
18
18
|
attr_accessor :certificate_after_completion_enabled
|
|
19
19
|
|
|
20
|
+
# The URL of the course's cover image, which is shown in course preview cards
|
|
21
|
+
sig { returns(T.nilable(String)) }
|
|
22
|
+
attr_accessor :cover_image
|
|
23
|
+
|
|
20
24
|
# The timestamp of when the course was created
|
|
21
25
|
sig { returns(Time) }
|
|
22
26
|
attr_accessor :created_at
|
|
@@ -73,6 +77,7 @@ module WhopSDK
|
|
|
73
77
|
params(
|
|
74
78
|
id: String,
|
|
75
79
|
certificate_after_completion_enabled: T.nilable(T::Boolean),
|
|
80
|
+
cover_image: T.nilable(String),
|
|
76
81
|
created_at: Time,
|
|
77
82
|
description: T.nilable(String),
|
|
78
83
|
language: WhopSDK::Languages::OrSymbol,
|
|
@@ -92,6 +97,8 @@ module WhopSDK
|
|
|
92
97
|
# Whether the course will award its students a PDF certificate after completing
|
|
93
98
|
# all lessons
|
|
94
99
|
certificate_after_completion_enabled:,
|
|
100
|
+
# The URL of the course's cover image, which is shown in course preview cards
|
|
101
|
+
cover_image:,
|
|
95
102
|
# The timestamp of when the course was created
|
|
96
103
|
created_at:,
|
|
97
104
|
# A short description of the course
|
|
@@ -123,6 +130,7 @@ module WhopSDK
|
|
|
123
130
|
{
|
|
124
131
|
id: String,
|
|
125
132
|
certificate_after_completion_enabled: T.nilable(T::Boolean),
|
|
133
|
+
cover_image: T.nilable(String),
|
|
126
134
|
created_at: Time,
|
|
127
135
|
description: T.nilable(String),
|
|
128
136
|
language: WhopSDK::Languages::TaggedSymbol,
|
|
@@ -75,9 +75,7 @@ module WhopSDK
|
|
|
75
75
|
attr_accessor :title
|
|
76
76
|
|
|
77
77
|
# The visibility types for forum posts
|
|
78
|
-
sig
|
|
79
|
-
returns(T.nilable(WhopSDK::ForumPostCreateParams::Visibility::OrSymbol))
|
|
80
|
-
end
|
|
78
|
+
sig { returns(T.nilable(WhopSDK::ForumPostVisibilityType::OrSymbol)) }
|
|
81
79
|
attr_accessor :visibility
|
|
82
80
|
|
|
83
81
|
sig do
|
|
@@ -100,8 +98,7 @@ module WhopSDK
|
|
|
100
98
|
pinned: T.nilable(T::Boolean),
|
|
101
99
|
poll: T.nilable(WhopSDK::ForumPostCreateParams::Poll::OrHash),
|
|
102
100
|
title: T.nilable(String),
|
|
103
|
-
visibility:
|
|
104
|
-
T.nilable(WhopSDK::ForumPostCreateParams::Visibility::OrSymbol),
|
|
101
|
+
visibility: T.nilable(WhopSDK::ForumPostVisibilityType::OrSymbol),
|
|
105
102
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
106
103
|
).returns(T.attached_class)
|
|
107
104
|
end
|
|
@@ -158,8 +155,7 @@ module WhopSDK
|
|
|
158
155
|
pinned: T.nilable(T::Boolean),
|
|
159
156
|
poll: T.nilable(WhopSDK::ForumPostCreateParams::Poll),
|
|
160
157
|
title: T.nilable(String),
|
|
161
|
-
visibility:
|
|
162
|
-
T.nilable(WhopSDK::ForumPostCreateParams::Visibility::OrSymbol),
|
|
158
|
+
visibility: T.nilable(WhopSDK::ForumPostVisibilityType::OrSymbol),
|
|
163
159
|
request_options: WhopSDK::RequestOptions
|
|
164
160
|
}
|
|
165
161
|
)
|
|
@@ -314,36 +310,6 @@ module WhopSDK
|
|
|
314
310
|
end
|
|
315
311
|
end
|
|
316
312
|
end
|
|
317
|
-
|
|
318
|
-
# The visibility types for forum posts
|
|
319
|
-
module Visibility
|
|
320
|
-
extend WhopSDK::Internal::Type::Enum
|
|
321
|
-
|
|
322
|
-
TaggedSymbol =
|
|
323
|
-
T.type_alias do
|
|
324
|
-
T.all(Symbol, WhopSDK::ForumPostCreateParams::Visibility)
|
|
325
|
-
end
|
|
326
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
327
|
-
|
|
328
|
-
MEMBERS_ONLY =
|
|
329
|
-
T.let(
|
|
330
|
-
:members_only,
|
|
331
|
-
WhopSDK::ForumPostCreateParams::Visibility::TaggedSymbol
|
|
332
|
-
)
|
|
333
|
-
GLOBALLY_VISIBLE =
|
|
334
|
-
T.let(
|
|
335
|
-
:globally_visible,
|
|
336
|
-
WhopSDK::ForumPostCreateParams::Visibility::TaggedSymbol
|
|
337
|
-
)
|
|
338
|
-
|
|
339
|
-
sig do
|
|
340
|
-
override.returns(
|
|
341
|
-
T::Array[WhopSDK::ForumPostCreateParams::Visibility::TaggedSymbol]
|
|
342
|
-
)
|
|
343
|
-
end
|
|
344
|
-
def self.values
|
|
345
|
-
end
|
|
346
|
-
end
|
|
347
313
|
end
|
|
348
314
|
end
|
|
349
315
|
end
|
|
@@ -40,9 +40,7 @@ module WhopSDK
|
|
|
40
40
|
attr_accessor :title
|
|
41
41
|
|
|
42
42
|
# The visibility types for forum posts
|
|
43
|
-
sig
|
|
44
|
-
returns(T.nilable(WhopSDK::ForumPostUpdateParams::Visibility::OrSymbol))
|
|
45
|
-
end
|
|
43
|
+
sig { returns(T.nilable(WhopSDK::ForumPostVisibilityType::OrSymbol)) }
|
|
46
44
|
attr_accessor :visibility
|
|
47
45
|
|
|
48
46
|
sig do
|
|
@@ -59,8 +57,7 @@ module WhopSDK
|
|
|
59
57
|
content: T.nilable(String),
|
|
60
58
|
is_pinned: T.nilable(T::Boolean),
|
|
61
59
|
title: T.nilable(String),
|
|
62
|
-
visibility:
|
|
63
|
-
T.nilable(WhopSDK::ForumPostUpdateParams::Visibility::OrSymbol),
|
|
60
|
+
visibility: T.nilable(WhopSDK::ForumPostVisibilityType::OrSymbol),
|
|
64
61
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
65
62
|
).returns(T.attached_class)
|
|
66
63
|
end
|
|
@@ -95,8 +92,7 @@ module WhopSDK
|
|
|
95
92
|
content: T.nilable(String),
|
|
96
93
|
is_pinned: T.nilable(T::Boolean),
|
|
97
94
|
title: T.nilable(String),
|
|
98
|
-
visibility:
|
|
99
|
-
T.nilable(WhopSDK::ForumPostUpdateParams::Visibility::OrSymbol),
|
|
95
|
+
visibility: T.nilable(WhopSDK::ForumPostVisibilityType::OrSymbol),
|
|
100
96
|
request_options: WhopSDK::RequestOptions
|
|
101
97
|
}
|
|
102
98
|
)
|
|
@@ -184,36 +180,6 @@ module WhopSDK
|
|
|
184
180
|
def self.variants
|
|
185
181
|
end
|
|
186
182
|
end
|
|
187
|
-
|
|
188
|
-
# The visibility types for forum posts
|
|
189
|
-
module Visibility
|
|
190
|
-
extend WhopSDK::Internal::Type::Enum
|
|
191
|
-
|
|
192
|
-
TaggedSymbol =
|
|
193
|
-
T.type_alias do
|
|
194
|
-
T.all(Symbol, WhopSDK::ForumPostUpdateParams::Visibility)
|
|
195
|
-
end
|
|
196
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
197
|
-
|
|
198
|
-
MEMBERS_ONLY =
|
|
199
|
-
T.let(
|
|
200
|
-
:members_only,
|
|
201
|
-
WhopSDK::ForumPostUpdateParams::Visibility::TaggedSymbol
|
|
202
|
-
)
|
|
203
|
-
GLOBALLY_VISIBLE =
|
|
204
|
-
T.let(
|
|
205
|
-
:globally_visible,
|
|
206
|
-
WhopSDK::ForumPostUpdateParams::Visibility::TaggedSymbol
|
|
207
|
-
)
|
|
208
|
-
|
|
209
|
-
sig do
|
|
210
|
-
override.returns(
|
|
211
|
-
T::Array[WhopSDK::ForumPostUpdateParams::Visibility::TaggedSymbol]
|
|
212
|
-
)
|
|
213
|
-
end
|
|
214
|
-
def self.values
|
|
215
|
-
end
|
|
216
|
-
end
|
|
217
183
|
end
|
|
218
184
|
end
|
|
219
185
|
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# typed: strong
|
|
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
|
+
TaggedSymbol =
|
|
10
|
+
T.type_alias { T.all(Symbol, WhopSDK::ForumPostVisibilityType) }
|
|
11
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
12
|
+
|
|
13
|
+
MEMBERS_ONLY =
|
|
14
|
+
T.let(:members_only, WhopSDK::ForumPostVisibilityType::TaggedSymbol)
|
|
15
|
+
GLOBALLY_VISIBLE =
|
|
16
|
+
T.let(:globally_visible, WhopSDK::ForumPostVisibilityType::TaggedSymbol)
|
|
17
|
+
|
|
18
|
+
sig do
|
|
19
|
+
override.returns(
|
|
20
|
+
T::Array[WhopSDK::ForumPostVisibilityType::TaggedSymbol]
|
|
21
|
+
)
|
|
22
|
+
end
|
|
23
|
+
def self.values
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -22,6 +22,10 @@ module WhopSDK
|
|
|
22
22
|
sig { returns(T.nilable(String)) }
|
|
23
23
|
attr_accessor :content
|
|
24
24
|
|
|
25
|
+
# The timestamp of when the lesson was created
|
|
26
|
+
sig { returns(Time) }
|
|
27
|
+
attr_accessor :created_at
|
|
28
|
+
|
|
25
29
|
# Number of days from course start until the lesson is unlocked
|
|
26
30
|
sig { returns(T.nilable(Integer)) }
|
|
27
31
|
attr_accessor :days_from_course_start_until_unlock
|
|
@@ -84,6 +88,7 @@ module WhopSDK
|
|
|
84
88
|
T::Array[WhopSDK::Lesson::AssessmentQuestion::OrHash],
|
|
85
89
|
attachments: T::Array[WhopSDK::Lesson::Attachment::OrHash],
|
|
86
90
|
content: T.nilable(String),
|
|
91
|
+
created_at: Time,
|
|
87
92
|
days_from_course_start_until_unlock: T.nilable(Integer),
|
|
88
93
|
embed_id: T.nilable(String),
|
|
89
94
|
embed_type: T.nilable(WhopSDK::EmbedType::OrSymbol),
|
|
@@ -105,6 +110,8 @@ module WhopSDK
|
|
|
105
110
|
attachments:,
|
|
106
111
|
# The content of the lesson
|
|
107
112
|
content:,
|
|
113
|
+
# The timestamp of when the lesson was created
|
|
114
|
+
created_at:,
|
|
108
115
|
# Number of days from course start until the lesson is unlocked
|
|
109
116
|
days_from_course_start_until_unlock:,
|
|
110
117
|
# ID for the embed (YouTube video ID or Loom share ID)
|
|
@@ -136,6 +143,7 @@ module WhopSDK
|
|
|
136
143
|
assessment_questions: T::Array[WhopSDK::Lesson::AssessmentQuestion],
|
|
137
144
|
attachments: T::Array[WhopSDK::Lesson::Attachment],
|
|
138
145
|
content: T.nilable(String),
|
|
146
|
+
created_at: Time,
|
|
139
147
|
days_from_course_start_until_unlock: T.nilable(Integer),
|
|
140
148
|
embed_id: T.nilable(String),
|
|
141
149
|
embed_type: T.nilable(WhopSDK::EmbedType::TaggedSymbol),
|
|
@@ -536,16 +544,66 @@ module WhopSDK
|
|
|
536
544
|
sig { returns(T.nilable(String)) }
|
|
537
545
|
attr_accessor :asset_id
|
|
538
546
|
|
|
547
|
+
# Whether this asset contains only audio
|
|
548
|
+
sig { returns(T::Boolean) }
|
|
549
|
+
attr_accessor :audio_only
|
|
550
|
+
|
|
551
|
+
# The time at which the Mux asset was created
|
|
552
|
+
sig { returns(Time) }
|
|
553
|
+
attr_accessor :created_at
|
|
554
|
+
|
|
555
|
+
# The duration of the video in seconds
|
|
556
|
+
sig { returns(T.nilable(Integer)) }
|
|
557
|
+
attr_accessor :duration_seconds
|
|
558
|
+
|
|
559
|
+
# The time at which the video finished uploading
|
|
560
|
+
sig { returns(T.nilable(Time)) }
|
|
561
|
+
attr_accessor :finished_uploading_at
|
|
562
|
+
|
|
539
563
|
# The public playback ID of the Mux asset
|
|
540
564
|
sig { returns(T.nilable(String)) }
|
|
541
565
|
attr_accessor :playback_id
|
|
542
566
|
|
|
567
|
+
# The signed playback ID of the Mux asset
|
|
568
|
+
sig { returns(T.nilable(String)) }
|
|
569
|
+
attr_accessor :signed_playback_id
|
|
570
|
+
|
|
571
|
+
# The signed storyboard playback token of the Mux asset
|
|
572
|
+
sig { returns(T.nilable(String)) }
|
|
573
|
+
attr_accessor :signed_storyboard_playback_token
|
|
574
|
+
|
|
575
|
+
# The signed thumbnail playback token of the Mux asset
|
|
576
|
+
sig { returns(T.nilable(String)) }
|
|
577
|
+
attr_accessor :signed_thumbnail_playback_token
|
|
578
|
+
|
|
579
|
+
# The signed video playback token of the Mux asset
|
|
580
|
+
sig { returns(T.nilable(String)) }
|
|
581
|
+
attr_accessor :signed_video_playback_token
|
|
582
|
+
|
|
583
|
+
# The status of the Mux asset
|
|
584
|
+
sig { returns(WhopSDK::Lesson::VideoAsset::Status::TaggedSymbol) }
|
|
585
|
+
attr_accessor :status
|
|
586
|
+
|
|
587
|
+
# The time at which the Mux asset was last updated
|
|
588
|
+
sig { returns(Time) }
|
|
589
|
+
attr_accessor :updated_at
|
|
590
|
+
|
|
543
591
|
# The associated Mux asset for video lessons
|
|
544
592
|
sig do
|
|
545
593
|
params(
|
|
546
594
|
id: String,
|
|
547
595
|
asset_id: T.nilable(String),
|
|
548
|
-
|
|
596
|
+
audio_only: T::Boolean,
|
|
597
|
+
created_at: Time,
|
|
598
|
+
duration_seconds: T.nilable(Integer),
|
|
599
|
+
finished_uploading_at: T.nilable(Time),
|
|
600
|
+
playback_id: T.nilable(String),
|
|
601
|
+
signed_playback_id: T.nilable(String),
|
|
602
|
+
signed_storyboard_playback_token: T.nilable(String),
|
|
603
|
+
signed_thumbnail_playback_token: T.nilable(String),
|
|
604
|
+
signed_video_playback_token: T.nilable(String),
|
|
605
|
+
status: WhopSDK::Lesson::VideoAsset::Status::OrSymbol,
|
|
606
|
+
updated_at: Time
|
|
549
607
|
).returns(T.attached_class)
|
|
550
608
|
end
|
|
551
609
|
def self.new(
|
|
@@ -553,8 +611,28 @@ module WhopSDK
|
|
|
553
611
|
id:,
|
|
554
612
|
# The Mux-provided ID of the asset
|
|
555
613
|
asset_id:,
|
|
614
|
+
# Whether this asset contains only audio
|
|
615
|
+
audio_only:,
|
|
616
|
+
# The time at which the Mux asset was created
|
|
617
|
+
created_at:,
|
|
618
|
+
# The duration of the video in seconds
|
|
619
|
+
duration_seconds:,
|
|
620
|
+
# The time at which the video finished uploading
|
|
621
|
+
finished_uploading_at:,
|
|
556
622
|
# The public playback ID of the Mux asset
|
|
557
|
-
playback_id
|
|
623
|
+
playback_id:,
|
|
624
|
+
# The signed playback ID of the Mux asset
|
|
625
|
+
signed_playback_id:,
|
|
626
|
+
# The signed storyboard playback token of the Mux asset
|
|
627
|
+
signed_storyboard_playback_token:,
|
|
628
|
+
# The signed thumbnail playback token of the Mux asset
|
|
629
|
+
signed_thumbnail_playback_token:,
|
|
630
|
+
# The signed video playback token of the Mux asset
|
|
631
|
+
signed_video_playback_token:,
|
|
632
|
+
# The status of the Mux asset
|
|
633
|
+
status:,
|
|
634
|
+
# The time at which the Mux asset was last updated
|
|
635
|
+
updated_at:
|
|
558
636
|
)
|
|
559
637
|
end
|
|
560
638
|
|
|
@@ -563,12 +641,46 @@ module WhopSDK
|
|
|
563
641
|
{
|
|
564
642
|
id: String,
|
|
565
643
|
asset_id: T.nilable(String),
|
|
566
|
-
|
|
644
|
+
audio_only: T::Boolean,
|
|
645
|
+
created_at: Time,
|
|
646
|
+
duration_seconds: T.nilable(Integer),
|
|
647
|
+
finished_uploading_at: T.nilable(Time),
|
|
648
|
+
playback_id: T.nilable(String),
|
|
649
|
+
signed_playback_id: T.nilable(String),
|
|
650
|
+
signed_storyboard_playback_token: T.nilable(String),
|
|
651
|
+
signed_thumbnail_playback_token: T.nilable(String),
|
|
652
|
+
signed_video_playback_token: T.nilable(String),
|
|
653
|
+
status: WhopSDK::Lesson::VideoAsset::Status::TaggedSymbol,
|
|
654
|
+
updated_at: Time
|
|
567
655
|
}
|
|
568
656
|
)
|
|
569
657
|
end
|
|
570
658
|
def to_hash
|
|
571
659
|
end
|
|
660
|
+
|
|
661
|
+
# The status of the Mux asset
|
|
662
|
+
module Status
|
|
663
|
+
extend WhopSDK::Internal::Type::Enum
|
|
664
|
+
|
|
665
|
+
TaggedSymbol =
|
|
666
|
+
T.type_alias { T.all(Symbol, WhopSDK::Lesson::VideoAsset::Status) }
|
|
667
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
668
|
+
|
|
669
|
+
UPLOADING =
|
|
670
|
+
T.let(:uploading, WhopSDK::Lesson::VideoAsset::Status::TaggedSymbol)
|
|
671
|
+
CREATED =
|
|
672
|
+
T.let(:created, WhopSDK::Lesson::VideoAsset::Status::TaggedSymbol)
|
|
673
|
+
READY =
|
|
674
|
+
T.let(:ready, WhopSDK::Lesson::VideoAsset::Status::TaggedSymbol)
|
|
675
|
+
|
|
676
|
+
sig do
|
|
677
|
+
override.returns(
|
|
678
|
+
T::Array[WhopSDK::Lesson::VideoAsset::Status::TaggedSymbol]
|
|
679
|
+
)
|
|
680
|
+
end
|
|
681
|
+
def self.values
|
|
682
|
+
end
|
|
683
|
+
end
|
|
572
684
|
end
|
|
573
685
|
end
|
|
574
686
|
end
|