whop_sdk 0.0.3 → 0.0.4
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 +22 -0
- data/README.md +1 -1
- data/lib/whop_sdk/client.rb +4 -0
- data/lib/whop_sdk/models/app_build_create_params.rb +53 -29
- data/lib/whop_sdk/models/app_update_params.rb +53 -29
- data/lib/whop_sdk/models/checkout_configuration_create_params.rb +115 -39
- data/lib/whop_sdk/models/company.rb +13 -1
- data/lib/whop_sdk/models/company_create_params.rb +46 -0
- data/lib/whop_sdk/models/company_list_params.rb +62 -0
- data/lib/whop_sdk/models/company_list_response.rb +175 -0
- data/lib/whop_sdk/models/course_create_params.rb +75 -30
- data/lib/whop_sdk/models/course_lesson_update_params.rb +204 -83
- data/lib/whop_sdk/models/course_student_list_params.rb +62 -0
- data/lib/whop_sdk/models/course_student_list_response.rb +97 -0
- data/lib/whop_sdk/models/course_student_retrieve_params.rb +14 -0
- data/lib/whop_sdk/models/course_student_retrieve_response.rb +149 -0
- data/lib/whop_sdk/models/course_update_params.rb +51 -27
- data/lib/whop_sdk/models/experience_update_params.rb +53 -29
- data/lib/whop_sdk/models/forum_post_create_params.rb +51 -27
- data/lib/whop_sdk/models/forum_post_update_params.rb +51 -27
- data/lib/whop_sdk/models/invoice_create_params.rb +48 -32
- data/lib/whop_sdk/models/lesson.rb +16 -8
- data/lib/whop_sdk/models/message_create_params.rb +51 -27
- data/lib/whop_sdk/models/message_update_params.rb +51 -27
- data/lib/whop_sdk/models/payment.rb +10 -1
- data/lib/whop_sdk/models/payment_list_response.rb +10 -1
- data/lib/whop_sdk/models/payment_method_types.rb +2 -1
- data/lib/whop_sdk/models/plan.rb +48 -1
- data/lib/whop_sdk/models/plan_create_params.rb +97 -22
- data/lib/whop_sdk/models/plan_list_response.rb +51 -1
- data/lib/whop_sdk/models/plan_update_params.rb +97 -22
- data/lib/whop_sdk/models/product_update_params.rb +53 -29
- data/lib/whop_sdk/models/transfer.rb +9 -1
- data/lib/whop_sdk/models/transfer_create_params.rb +9 -1
- data/lib/whop_sdk/models/transfer_list_response.rb +9 -1
- data/lib/whop_sdk/models.rb +8 -0
- data/lib/whop_sdk/resources/app_builds.rb +1 -1
- data/lib/whop_sdk/resources/apps.rb +1 -1
- data/lib/whop_sdk/resources/checkout_configurations.rb +6 -6
- data/lib/whop_sdk/resources/companies.rb +70 -0
- data/lib/whop_sdk/resources/course_lesson_interactions.rb +2 -2
- data/lib/whop_sdk/resources/course_lessons.rb +7 -3
- data/lib/whop_sdk/resources/course_students.rb +76 -0
- data/lib/whop_sdk/resources/courses.rb +10 -3
- data/lib/whop_sdk/resources/experiences.rb +1 -1
- data/lib/whop_sdk/resources/forum_posts.rb +2 -2
- data/lib/whop_sdk/resources/invoices.rb +11 -11
- data/lib/whop_sdk/resources/messages.rb +2 -2
- data/lib/whop_sdk/resources/plans.rb +8 -4
- data/lib/whop_sdk/resources/products.rb +1 -1
- data/lib/whop_sdk/resources/transfers.rb +3 -1
- data/lib/whop_sdk/version.rb +1 -1
- data/lib/whop_sdk.rb +8 -1
- data/rbi/whop_sdk/client.rbi +3 -0
- data/rbi/whop_sdk/models/app_build_create_params.rbi +80 -40
- data/rbi/whop_sdk/models/app_update_params.rbi +86 -37
- data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +192 -64
- data/rbi/whop_sdk/models/company.rbi +10 -0
- data/rbi/whop_sdk/models/company_create_params.rbi +67 -0
- data/rbi/whop_sdk/models/company_list_params.rbi +83 -0
- data/rbi/whop_sdk/models/company_list_response.rbi +235 -0
- data/rbi/whop_sdk/models/course_create_params.rbi +104 -38
- data/rbi/whop_sdk/models/course_lesson_update_params.rbi +326 -114
- data/rbi/whop_sdk/models/course_student_list_params.rbi +83 -0
- data/rbi/whop_sdk/models/course_student_list_response.rbi +142 -0
- data/rbi/whop_sdk/models/course_student_retrieve_params.rbi +30 -0
- data/rbi/whop_sdk/models/course_student_retrieve_response.rbi +250 -0
- data/rbi/whop_sdk/models/course_update_params.rbi +84 -38
- data/rbi/whop_sdk/models/experience_update_params.rbi +84 -38
- data/rbi/whop_sdk/models/forum_post_create_params.rbi +85 -32
- data/rbi/whop_sdk/models/forum_post_update_params.rbi +85 -32
- data/rbi/whop_sdk/models/invoice_create_params.rbi +58 -44
- data/rbi/whop_sdk/models/lesson.rbi +14 -10
- data/rbi/whop_sdk/models/message_create_params.rbi +85 -32
- data/rbi/whop_sdk/models/message_update_params.rbi +85 -32
- data/rbi/whop_sdk/models/payment.rbi +10 -0
- data/rbi/whop_sdk/models/payment_list_response.rbi +10 -0
- data/rbi/whop_sdk/models/payment_method_types.rbi +3 -1
- data/rbi/whop_sdk/models/plan.rbi +82 -0
- data/rbi/whop_sdk/models/plan_create_params.rbi +174 -32
- data/rbi/whop_sdk/models/plan_list_response.rbi +94 -0
- data/rbi/whop_sdk/models/plan_update_params.rbi +174 -32
- data/rbi/whop_sdk/models/product_update_params.rbi +83 -39
- data/rbi/whop_sdk/models/transfer.rbi +8 -0
- data/rbi/whop_sdk/models/transfer_create_params.rbi +8 -0
- data/rbi/whop_sdk/models/transfer_list_response.rbi +8 -0
- data/rbi/whop_sdk/models.rbi +8 -0
- data/rbi/whop_sdk/resources/app_builds.rbi +5 -1
- data/rbi/whop_sdk/resources/apps.rbi +7 -1
- data/rbi/whop_sdk/resources/checkout_configurations.rbi +6 -7
- data/rbi/whop_sdk/resources/companies.rbi +63 -0
- data/rbi/whop_sdk/resources/course_lesson_interactions.rbi +2 -2
- data/rbi/whop_sdk/resources/course_lessons.rbi +21 -2
- data/rbi/whop_sdk/resources/course_students.rbi +65 -0
- data/rbi/whop_sdk/resources/courses.rbi +22 -2
- data/rbi/whop_sdk/resources/experiences.rbi +7 -1
- data/rbi/whop_sdk/resources/forum_posts.rbi +12 -2
- data/rbi/whop_sdk/resources/invoices.rbi +18 -18
- data/rbi/whop_sdk/resources/messages.rbi +12 -2
- data/rbi/whop_sdk/resources/plans.rbi +28 -2
- data/rbi/whop_sdk/resources/products.rbi +6 -1
- data/rbi/whop_sdk/resources/transfers.rbi +3 -0
- data/sig/whop_sdk/client.rbs +2 -0
- data/sig/whop_sdk/models/app_build_create_params.rbs +29 -10
- data/sig/whop_sdk/models/app_update_params.rbs +29 -10
- data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +72 -21
- data/sig/whop_sdk/models/company.rbs +5 -0
- data/sig/whop_sdk/models/company_create_params.rbs +41 -0
- data/sig/whop_sdk/models/company_list_params.rbs +51 -0
- data/sig/whop_sdk/models/company_list_response.rbs +109 -0
- data/sig/whop_sdk/models/course_create_params.rbs +39 -10
- data/sig/whop_sdk/models/course_lesson_update_params.rbs +116 -30
- data/sig/whop_sdk/models/course_student_list_params.rbs +51 -0
- data/sig/whop_sdk/models/course_student_list_response.rbs +64 -0
- data/sig/whop_sdk/models/course_student_retrieve_params.rbs +15 -0
- data/sig/whop_sdk/models/course_student_retrieve_response.rbs +106 -0
- data/sig/whop_sdk/models/course_update_params.rbs +29 -10
- data/sig/whop_sdk/models/experience_update_params.rbs +29 -10
- data/sig/whop_sdk/models/forum_post_create_params.rbs +29 -10
- data/sig/whop_sdk/models/forum_post_update_params.rbs +29 -10
- data/sig/whop_sdk/models/invoice_create_params.rbs +28 -18
- data/sig/whop_sdk/models/lesson.rbs +8 -8
- data/sig/whop_sdk/models/message_create_params.rbs +29 -10
- data/sig/whop_sdk/models/message_update_params.rbs +29 -10
- data/sig/whop_sdk/models/payment.rbs +5 -0
- data/sig/whop_sdk/models/payment_list_response.rbs +5 -0
- data/sig/whop_sdk/models/payment_method_types.rbs +4 -2
- data/sig/whop_sdk/models/plan.rbs +32 -0
- data/sig/whop_sdk/models/plan_create_params.rbs +61 -10
- data/sig/whop_sdk/models/plan_list_response.rbs +32 -0
- data/sig/whop_sdk/models/plan_update_params.rbs +61 -10
- data/sig/whop_sdk/models/product_update_params.rbs +29 -10
- data/sig/whop_sdk/models/transfer.rbs +5 -0
- data/sig/whop_sdk/models/transfer_create_params.rbs +5 -0
- data/sig/whop_sdk/models/transfer_list_response.rbs +5 -0
- data/sig/whop_sdk/models.rbs +8 -0
- data/sig/whop_sdk/resources/app_builds.rbs +1 -1
- data/sig/whop_sdk/resources/apps.rbs +1 -1
- data/sig/whop_sdk/resources/checkout_configurations.rbs +2 -2
- data/sig/whop_sdk/resources/companies.rbs +18 -0
- data/sig/whop_sdk/resources/course_lessons.rbs +4 -2
- data/sig/whop_sdk/resources/course_students.rbs +22 -0
- data/sig/whop_sdk/resources/courses.rbs +4 -2
- data/sig/whop_sdk/resources/experiences.rbs +1 -1
- data/sig/whop_sdk/resources/forum_posts.rbs +2 -2
- data/sig/whop_sdk/resources/invoices.rbs +5 -5
- data/sig/whop_sdk/resources/messages.rbs +2 -2
- data/sig/whop_sdk/resources/plans.rbs +4 -2
- data/sig/whop_sdk/resources/products.rbs +1 -1
- data/sig/whop_sdk/resources/transfers.rbs +1 -0
- metadata +26 -5
- data/lib/whop_sdk/models/invoice_create_response.rb +0 -27
- data/rbi/whop_sdk/models/invoice_create_response.rbi +0 -49
- data/sig/whop_sdk/models/invoice_create_response.rbs +0 -19
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
class CourseStudentListResponse < WhopSDK::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
WhopSDK::Models::CourseStudentListResponse,
|
|
10
|
+
WhopSDK::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# The ID of the course student. Looks like crsi_XXX
|
|
15
|
+
sig { returns(String) }
|
|
16
|
+
attr_accessor :id
|
|
17
|
+
|
|
18
|
+
# The number of lessons the student has completed
|
|
19
|
+
sig { returns(Integer) }
|
|
20
|
+
attr_accessor :completed_lessons_count
|
|
21
|
+
|
|
22
|
+
# The percentage of lessons completed (0-100)
|
|
23
|
+
sig { returns(Float) }
|
|
24
|
+
attr_accessor :completion_rate
|
|
25
|
+
|
|
26
|
+
# When the student first interacted with the course
|
|
27
|
+
sig { returns(Time) }
|
|
28
|
+
attr_accessor :first_interaction_at
|
|
29
|
+
|
|
30
|
+
# When the student last interacted with the course
|
|
31
|
+
sig { returns(Time) }
|
|
32
|
+
attr_accessor :last_interaction_at
|
|
33
|
+
|
|
34
|
+
# The total number of lessons the student has access to
|
|
35
|
+
sig { returns(Integer) }
|
|
36
|
+
attr_accessor :total_lessons_count
|
|
37
|
+
|
|
38
|
+
# The user who is enrolled in the course
|
|
39
|
+
sig { returns(WhopSDK::Models::CourseStudentListResponse::User) }
|
|
40
|
+
attr_reader :user
|
|
41
|
+
|
|
42
|
+
sig do
|
|
43
|
+
params(
|
|
44
|
+
user: WhopSDK::Models::CourseStudentListResponse::User::OrHash
|
|
45
|
+
).void
|
|
46
|
+
end
|
|
47
|
+
attr_writer :user
|
|
48
|
+
|
|
49
|
+
# A course student (enrollment of a student in a course)
|
|
50
|
+
sig do
|
|
51
|
+
params(
|
|
52
|
+
id: String,
|
|
53
|
+
completed_lessons_count: Integer,
|
|
54
|
+
completion_rate: Float,
|
|
55
|
+
first_interaction_at: Time,
|
|
56
|
+
last_interaction_at: Time,
|
|
57
|
+
total_lessons_count: Integer,
|
|
58
|
+
user: WhopSDK::Models::CourseStudentListResponse::User::OrHash
|
|
59
|
+
).returns(T.attached_class)
|
|
60
|
+
end
|
|
61
|
+
def self.new(
|
|
62
|
+
# The ID of the course student. Looks like crsi_XXX
|
|
63
|
+
id:,
|
|
64
|
+
# The number of lessons the student has completed
|
|
65
|
+
completed_lessons_count:,
|
|
66
|
+
# The percentage of lessons completed (0-100)
|
|
67
|
+
completion_rate:,
|
|
68
|
+
# When the student first interacted with the course
|
|
69
|
+
first_interaction_at:,
|
|
70
|
+
# When the student last interacted with the course
|
|
71
|
+
last_interaction_at:,
|
|
72
|
+
# The total number of lessons the student has access to
|
|
73
|
+
total_lessons_count:,
|
|
74
|
+
# The user who is enrolled in the course
|
|
75
|
+
user:
|
|
76
|
+
)
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
sig do
|
|
80
|
+
override.returns(
|
|
81
|
+
{
|
|
82
|
+
id: String,
|
|
83
|
+
completed_lessons_count: Integer,
|
|
84
|
+
completion_rate: Float,
|
|
85
|
+
first_interaction_at: Time,
|
|
86
|
+
last_interaction_at: Time,
|
|
87
|
+
total_lessons_count: Integer,
|
|
88
|
+
user: WhopSDK::Models::CourseStudentListResponse::User
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
end
|
|
92
|
+
def to_hash
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
class User < WhopSDK::Internal::Type::BaseModel
|
|
96
|
+
OrHash =
|
|
97
|
+
T.type_alias do
|
|
98
|
+
T.any(
|
|
99
|
+
WhopSDK::Models::CourseStudentListResponse::User,
|
|
100
|
+
WhopSDK::Internal::AnyHash
|
|
101
|
+
)
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# The internal ID of the user.
|
|
105
|
+
sig { returns(String) }
|
|
106
|
+
attr_accessor :id
|
|
107
|
+
|
|
108
|
+
# The name of the user from their Whop account.
|
|
109
|
+
sig { returns(T.nilable(String)) }
|
|
110
|
+
attr_accessor :name
|
|
111
|
+
|
|
112
|
+
# The username of the user from their Whop account.
|
|
113
|
+
sig { returns(String) }
|
|
114
|
+
attr_accessor :username
|
|
115
|
+
|
|
116
|
+
# The user who is enrolled in the course
|
|
117
|
+
sig do
|
|
118
|
+
params(id: String, name: T.nilable(String), username: String).returns(
|
|
119
|
+
T.attached_class
|
|
120
|
+
)
|
|
121
|
+
end
|
|
122
|
+
def self.new(
|
|
123
|
+
# The internal ID of the user.
|
|
124
|
+
id:,
|
|
125
|
+
# The name of the user from their Whop account.
|
|
126
|
+
name:,
|
|
127
|
+
# The username of the user from their Whop account.
|
|
128
|
+
username:
|
|
129
|
+
)
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
sig do
|
|
133
|
+
override.returns(
|
|
134
|
+
{ id: String, name: T.nilable(String), username: String }
|
|
135
|
+
)
|
|
136
|
+
end
|
|
137
|
+
def to_hash
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
class CourseStudentRetrieveParams < 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::CourseStudentRetrieveParams,
|
|
13
|
+
WhopSDK::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
sig do
|
|
18
|
+
params(request_options: WhopSDK::RequestOptions::OrHash).returns(
|
|
19
|
+
T.attached_class
|
|
20
|
+
)
|
|
21
|
+
end
|
|
22
|
+
def self.new(request_options: {})
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
sig { override.returns({ request_options: WhopSDK::RequestOptions }) }
|
|
26
|
+
def to_hash
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
class CourseStudentRetrieveResponse < WhopSDK::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
WhopSDK::Models::CourseStudentRetrieveResponse,
|
|
10
|
+
WhopSDK::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# The ID of the course student. Looks like crsi_XXX
|
|
15
|
+
sig { returns(String) }
|
|
16
|
+
attr_accessor :id
|
|
17
|
+
|
|
18
|
+
# The number of lessons the student has completed
|
|
19
|
+
sig { returns(Integer) }
|
|
20
|
+
attr_accessor :completed_lessons_count
|
|
21
|
+
|
|
22
|
+
# The percentage of lessons completed (0-100)
|
|
23
|
+
sig { returns(Float) }
|
|
24
|
+
attr_accessor :completion_rate
|
|
25
|
+
|
|
26
|
+
# The course the student is enrolled in
|
|
27
|
+
sig { returns(WhopSDK::Models::CourseStudentRetrieveResponse::Course) }
|
|
28
|
+
attr_reader :course
|
|
29
|
+
|
|
30
|
+
sig do
|
|
31
|
+
params(
|
|
32
|
+
course: WhopSDK::Models::CourseStudentRetrieveResponse::Course::OrHash
|
|
33
|
+
).void
|
|
34
|
+
end
|
|
35
|
+
attr_writer :course
|
|
36
|
+
|
|
37
|
+
# When the student first interacted with the course
|
|
38
|
+
sig { returns(Time) }
|
|
39
|
+
attr_accessor :first_interaction_at
|
|
40
|
+
|
|
41
|
+
# When the student last interacted with the course
|
|
42
|
+
sig { returns(Time) }
|
|
43
|
+
attr_accessor :last_interaction_at
|
|
44
|
+
|
|
45
|
+
# The total number of lessons the student has access to
|
|
46
|
+
sig { returns(Integer) }
|
|
47
|
+
attr_accessor :total_lessons_count
|
|
48
|
+
|
|
49
|
+
# The user who is enrolled in the course
|
|
50
|
+
sig { returns(WhopSDK::Models::CourseStudentRetrieveResponse::User) }
|
|
51
|
+
attr_reader :user
|
|
52
|
+
|
|
53
|
+
sig do
|
|
54
|
+
params(
|
|
55
|
+
user: WhopSDK::Models::CourseStudentRetrieveResponse::User::OrHash
|
|
56
|
+
).void
|
|
57
|
+
end
|
|
58
|
+
attr_writer :user
|
|
59
|
+
|
|
60
|
+
# A course student (enrollment of a student in a course)
|
|
61
|
+
sig do
|
|
62
|
+
params(
|
|
63
|
+
id: String,
|
|
64
|
+
completed_lessons_count: Integer,
|
|
65
|
+
completion_rate: Float,
|
|
66
|
+
course:
|
|
67
|
+
WhopSDK::Models::CourseStudentRetrieveResponse::Course::OrHash,
|
|
68
|
+
first_interaction_at: Time,
|
|
69
|
+
last_interaction_at: Time,
|
|
70
|
+
total_lessons_count: Integer,
|
|
71
|
+
user: WhopSDK::Models::CourseStudentRetrieveResponse::User::OrHash
|
|
72
|
+
).returns(T.attached_class)
|
|
73
|
+
end
|
|
74
|
+
def self.new(
|
|
75
|
+
# The ID of the course student. Looks like crsi_XXX
|
|
76
|
+
id:,
|
|
77
|
+
# The number of lessons the student has completed
|
|
78
|
+
completed_lessons_count:,
|
|
79
|
+
# The percentage of lessons completed (0-100)
|
|
80
|
+
completion_rate:,
|
|
81
|
+
# The course the student is enrolled in
|
|
82
|
+
course:,
|
|
83
|
+
# When the student first interacted with the course
|
|
84
|
+
first_interaction_at:,
|
|
85
|
+
# When the student last interacted with the course
|
|
86
|
+
last_interaction_at:,
|
|
87
|
+
# The total number of lessons the student has access to
|
|
88
|
+
total_lessons_count:,
|
|
89
|
+
# The user who is enrolled in the course
|
|
90
|
+
user:
|
|
91
|
+
)
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
sig do
|
|
95
|
+
override.returns(
|
|
96
|
+
{
|
|
97
|
+
id: String,
|
|
98
|
+
completed_lessons_count: Integer,
|
|
99
|
+
completion_rate: Float,
|
|
100
|
+
course: WhopSDK::Models::CourseStudentRetrieveResponse::Course,
|
|
101
|
+
first_interaction_at: Time,
|
|
102
|
+
last_interaction_at: Time,
|
|
103
|
+
total_lessons_count: Integer,
|
|
104
|
+
user: WhopSDK::Models::CourseStudentRetrieveResponse::User
|
|
105
|
+
}
|
|
106
|
+
)
|
|
107
|
+
end
|
|
108
|
+
def to_hash
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
class Course < WhopSDK::Internal::Type::BaseModel
|
|
112
|
+
OrHash =
|
|
113
|
+
T.type_alias do
|
|
114
|
+
T.any(
|
|
115
|
+
WhopSDK::Models::CourseStudentRetrieveResponse::Course,
|
|
116
|
+
WhopSDK::Internal::AnyHash
|
|
117
|
+
)
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# The ID of the course. Looks like cors_XXX
|
|
121
|
+
sig { returns(String) }
|
|
122
|
+
attr_accessor :id
|
|
123
|
+
|
|
124
|
+
# The experience that the course belongs to
|
|
125
|
+
sig do
|
|
126
|
+
returns(
|
|
127
|
+
WhopSDK::Models::CourseStudentRetrieveResponse::Course::Experience
|
|
128
|
+
)
|
|
129
|
+
end
|
|
130
|
+
attr_reader :experience
|
|
131
|
+
|
|
132
|
+
sig do
|
|
133
|
+
params(
|
|
134
|
+
experience:
|
|
135
|
+
WhopSDK::Models::CourseStudentRetrieveResponse::Course::Experience::OrHash
|
|
136
|
+
).void
|
|
137
|
+
end
|
|
138
|
+
attr_writer :experience
|
|
139
|
+
|
|
140
|
+
# The title of the course
|
|
141
|
+
sig { returns(T.nilable(String)) }
|
|
142
|
+
attr_accessor :title
|
|
143
|
+
|
|
144
|
+
# The course the student is enrolled in
|
|
145
|
+
sig do
|
|
146
|
+
params(
|
|
147
|
+
id: String,
|
|
148
|
+
experience:
|
|
149
|
+
WhopSDK::Models::CourseStudentRetrieveResponse::Course::Experience::OrHash,
|
|
150
|
+
title: T.nilable(String)
|
|
151
|
+
).returns(T.attached_class)
|
|
152
|
+
end
|
|
153
|
+
def self.new(
|
|
154
|
+
# The ID of the course. Looks like cors_XXX
|
|
155
|
+
id:,
|
|
156
|
+
# The experience that the course belongs to
|
|
157
|
+
experience:,
|
|
158
|
+
# The title of the course
|
|
159
|
+
title:
|
|
160
|
+
)
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
sig do
|
|
164
|
+
override.returns(
|
|
165
|
+
{
|
|
166
|
+
id: String,
|
|
167
|
+
experience:
|
|
168
|
+
WhopSDK::Models::CourseStudentRetrieveResponse::Course::Experience,
|
|
169
|
+
title: T.nilable(String)
|
|
170
|
+
}
|
|
171
|
+
)
|
|
172
|
+
end
|
|
173
|
+
def to_hash
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
class Experience < WhopSDK::Internal::Type::BaseModel
|
|
177
|
+
OrHash =
|
|
178
|
+
T.type_alias do
|
|
179
|
+
T.any(
|
|
180
|
+
WhopSDK::Models::CourseStudentRetrieveResponse::Course::Experience,
|
|
181
|
+
WhopSDK::Internal::AnyHash
|
|
182
|
+
)
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# The unique ID representing this experience
|
|
186
|
+
sig { returns(String) }
|
|
187
|
+
attr_accessor :id
|
|
188
|
+
|
|
189
|
+
# The experience that the course belongs to
|
|
190
|
+
sig { params(id: String).returns(T.attached_class) }
|
|
191
|
+
def self.new(
|
|
192
|
+
# The unique ID representing this experience
|
|
193
|
+
id:
|
|
194
|
+
)
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
sig { override.returns({ id: String }) }
|
|
198
|
+
def to_hash
|
|
199
|
+
end
|
|
200
|
+
end
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
class User < WhopSDK::Internal::Type::BaseModel
|
|
204
|
+
OrHash =
|
|
205
|
+
T.type_alias do
|
|
206
|
+
T.any(
|
|
207
|
+
WhopSDK::Models::CourseStudentRetrieveResponse::User,
|
|
208
|
+
WhopSDK::Internal::AnyHash
|
|
209
|
+
)
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# The internal ID of the user.
|
|
213
|
+
sig { returns(String) }
|
|
214
|
+
attr_accessor :id
|
|
215
|
+
|
|
216
|
+
# The name of the user from their Whop account.
|
|
217
|
+
sig { returns(T.nilable(String)) }
|
|
218
|
+
attr_accessor :name
|
|
219
|
+
|
|
220
|
+
# The username of the user from their Whop account.
|
|
221
|
+
sig { returns(String) }
|
|
222
|
+
attr_accessor :username
|
|
223
|
+
|
|
224
|
+
# The user who is enrolled in the course
|
|
225
|
+
sig do
|
|
226
|
+
params(id: String, name: T.nilable(String), username: String).returns(
|
|
227
|
+
T.attached_class
|
|
228
|
+
)
|
|
229
|
+
end
|
|
230
|
+
def self.new(
|
|
231
|
+
# The internal ID of the user.
|
|
232
|
+
id:,
|
|
233
|
+
# The name of the user from their Whop account.
|
|
234
|
+
name:,
|
|
235
|
+
# The username of the user from their Whop account.
|
|
236
|
+
username:
|
|
237
|
+
)
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
sig do
|
|
241
|
+
override.returns(
|
|
242
|
+
{ id: String, name: T.nilable(String), username: String }
|
|
243
|
+
)
|
|
244
|
+
end
|
|
245
|
+
def to_hash
|
|
246
|
+
end
|
|
247
|
+
end
|
|
248
|
+
end
|
|
249
|
+
end
|
|
250
|
+
end
|
|
@@ -42,15 +42,17 @@ module WhopSDK
|
|
|
42
42
|
attr_accessor :tagline
|
|
43
43
|
|
|
44
44
|
# The thumbnail for the course in png, jpeg, or gif format
|
|
45
|
-
sig { returns(T.nilable(WhopSDK::CourseUpdateParams::Thumbnail)) }
|
|
46
|
-
attr_reader :thumbnail
|
|
47
|
-
|
|
48
45
|
sig do
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
returns(
|
|
47
|
+
T.nilable(
|
|
48
|
+
T.any(
|
|
49
|
+
WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID,
|
|
50
|
+
WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithID
|
|
51
|
+
)
|
|
52
|
+
)
|
|
53
|
+
)
|
|
52
54
|
end
|
|
53
|
-
|
|
55
|
+
attr_accessor :thumbnail
|
|
54
56
|
|
|
55
57
|
# The title of the course
|
|
56
58
|
sig { returns(T.nilable(String)) }
|
|
@@ -66,7 +68,13 @@ module WhopSDK
|
|
|
66
68
|
language: T.nilable(WhopSDK::Languages::OrSymbol),
|
|
67
69
|
require_completing_lessons_in_order: T.nilable(T::Boolean),
|
|
68
70
|
tagline: T.nilable(String),
|
|
69
|
-
thumbnail:
|
|
71
|
+
thumbnail:
|
|
72
|
+
T.nilable(
|
|
73
|
+
T.any(
|
|
74
|
+
WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID::OrHash,
|
|
75
|
+
WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithID::OrHash
|
|
76
|
+
)
|
|
77
|
+
),
|
|
70
78
|
title: T.nilable(String),
|
|
71
79
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
72
80
|
).returns(T.attached_class)
|
|
@@ -106,7 +114,13 @@ module WhopSDK
|
|
|
106
114
|
language: T.nilable(WhopSDK::Languages::OrSymbol),
|
|
107
115
|
require_completing_lessons_in_order: T.nilable(T::Boolean),
|
|
108
116
|
tagline: T.nilable(String),
|
|
109
|
-
thumbnail:
|
|
117
|
+
thumbnail:
|
|
118
|
+
T.nilable(
|
|
119
|
+
T.any(
|
|
120
|
+
WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID,
|
|
121
|
+
WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithID
|
|
122
|
+
)
|
|
123
|
+
),
|
|
110
124
|
title: T.nilable(String),
|
|
111
125
|
request_options: WhopSDK::RequestOptions
|
|
112
126
|
}
|
|
@@ -240,52 +254,84 @@ module WhopSDK
|
|
|
240
254
|
end
|
|
241
255
|
end
|
|
242
256
|
|
|
243
|
-
|
|
244
|
-
|
|
257
|
+
# The thumbnail for the course in png, jpeg, or gif format
|
|
258
|
+
module Thumbnail
|
|
259
|
+
extend WhopSDK::Internal::Type::Union
|
|
260
|
+
|
|
261
|
+
Variants =
|
|
245
262
|
T.type_alias do
|
|
246
263
|
T.any(
|
|
247
|
-
WhopSDK::CourseUpdateParams::Thumbnail,
|
|
248
|
-
WhopSDK::
|
|
264
|
+
WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID,
|
|
265
|
+
WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithID
|
|
249
266
|
)
|
|
250
267
|
end
|
|
251
268
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
269
|
+
class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
|
|
270
|
+
OrHash =
|
|
271
|
+
T.type_alias do
|
|
272
|
+
T.any(
|
|
273
|
+
WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID,
|
|
274
|
+
WhopSDK::Internal::AnyHash
|
|
275
|
+
)
|
|
276
|
+
end
|
|
257
277
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
278
|
+
# This ID should be used the first time you upload an attachment. It is the ID of
|
|
279
|
+
# the direct upload that was created when uploading the file to S3 via the
|
|
280
|
+
# mediaDirectUpload mutation.
|
|
281
|
+
sig { returns(String) }
|
|
282
|
+
attr_accessor :direct_upload_id
|
|
263
283
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
284
|
+
# Input for an attachment
|
|
285
|
+
sig { params(direct_upload_id: String).returns(T.attached_class) }
|
|
286
|
+
def self.new(
|
|
287
|
+
# This ID should be used the first time you upload an attachment. It is the ID of
|
|
288
|
+
# the direct upload that was created when uploading the file to S3 via the
|
|
289
|
+
# mediaDirectUpload mutation.
|
|
290
|
+
direct_upload_id:
|
|
291
|
+
)
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
sig { override.returns({ direct_upload_id: String }) }
|
|
295
|
+
def to_hash
|
|
296
|
+
end
|
|
270
297
|
end
|
|
271
|
-
|
|
298
|
+
|
|
299
|
+
class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
|
|
300
|
+
OrHash =
|
|
301
|
+
T.type_alias do
|
|
302
|
+
T.any(
|
|
303
|
+
WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithID,
|
|
304
|
+
WhopSDK::Internal::AnyHash
|
|
305
|
+
)
|
|
306
|
+
end
|
|
307
|
+
|
|
272
308
|
# The ID of an existing attachment object. Use this when updating a resource and
|
|
273
309
|
# keeping a subset of the attachments. Don't use this unless you know what you're
|
|
274
310
|
# doing.
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
#
|
|
279
|
-
|
|
280
|
-
|
|
311
|
+
sig { returns(String) }
|
|
312
|
+
attr_accessor :id
|
|
313
|
+
|
|
314
|
+
# Input for an attachment
|
|
315
|
+
sig { params(id: String).returns(T.attached_class) }
|
|
316
|
+
def self.new(
|
|
317
|
+
# The ID of an existing attachment object. Use this when updating a resource and
|
|
318
|
+
# keeping a subset of the attachments. Don't use this unless you know what you're
|
|
319
|
+
# doing.
|
|
320
|
+
id:
|
|
321
|
+
)
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
sig { override.returns({ id: String }) }
|
|
325
|
+
def to_hash
|
|
326
|
+
end
|
|
281
327
|
end
|
|
282
328
|
|
|
283
329
|
sig do
|
|
284
330
|
override.returns(
|
|
285
|
-
|
|
331
|
+
T::Array[WhopSDK::CourseUpdateParams::Thumbnail::Variants]
|
|
286
332
|
)
|
|
287
333
|
end
|
|
288
|
-
def
|
|
334
|
+
def self.variants
|
|
289
335
|
end
|
|
290
336
|
end
|
|
291
337
|
end
|