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,235 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module WhopSDK
|
|
4
|
+
module Models
|
|
5
|
+
class CompanyListResponse < WhopSDK::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
WhopSDK::Models::CompanyListResponse,
|
|
10
|
+
WhopSDK::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# The ID (tag) of the company.
|
|
15
|
+
sig { returns(String) }
|
|
16
|
+
attr_accessor :id
|
|
17
|
+
|
|
18
|
+
# The different business types a company can be.
|
|
19
|
+
sig { returns(T.nilable(WhopSDK::BusinessTypes::TaggedSymbol)) }
|
|
20
|
+
attr_accessor :business_type
|
|
21
|
+
|
|
22
|
+
# When the company was created (signed up)
|
|
23
|
+
sig { returns(Time) }
|
|
24
|
+
attr_accessor :created_at
|
|
25
|
+
|
|
26
|
+
# The creator pitch for the company.
|
|
27
|
+
sig { returns(T.nilable(String)) }
|
|
28
|
+
attr_accessor :description
|
|
29
|
+
|
|
30
|
+
# The different industry types a company can be in.
|
|
31
|
+
sig { returns(T.nilable(WhopSDK::IndustryTypes::TaggedSymbol)) }
|
|
32
|
+
attr_accessor :industry_type
|
|
33
|
+
|
|
34
|
+
# The company's logo.
|
|
35
|
+
sig { returns(T.nilable(WhopSDK::Models::CompanyListResponse::Logo)) }
|
|
36
|
+
attr_reader :logo
|
|
37
|
+
|
|
38
|
+
sig do
|
|
39
|
+
params(
|
|
40
|
+
logo: T.nilable(WhopSDK::Models::CompanyListResponse::Logo::OrHash)
|
|
41
|
+
).void
|
|
42
|
+
end
|
|
43
|
+
attr_writer :logo
|
|
44
|
+
|
|
45
|
+
# The number of members in the company.
|
|
46
|
+
sig { returns(Integer) }
|
|
47
|
+
attr_accessor :member_count
|
|
48
|
+
|
|
49
|
+
# A key-value store of data for the account, created/updated by the platform that
|
|
50
|
+
# made the account.
|
|
51
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
52
|
+
attr_accessor :metadata
|
|
53
|
+
|
|
54
|
+
# The user who owns this company
|
|
55
|
+
sig { returns(WhopSDK::Models::CompanyListResponse::OwnerUser) }
|
|
56
|
+
attr_reader :owner_user
|
|
57
|
+
|
|
58
|
+
sig do
|
|
59
|
+
params(
|
|
60
|
+
owner_user: WhopSDK::Models::CompanyListResponse::OwnerUser::OrHash
|
|
61
|
+
).void
|
|
62
|
+
end
|
|
63
|
+
attr_writer :owner_user
|
|
64
|
+
|
|
65
|
+
# The number of reviews that have been published for the company.
|
|
66
|
+
sig { returns(Integer) }
|
|
67
|
+
attr_accessor :published_reviews_count
|
|
68
|
+
|
|
69
|
+
# The slug/route of the company on the Whop site.
|
|
70
|
+
sig { returns(String) }
|
|
71
|
+
attr_accessor :route
|
|
72
|
+
|
|
73
|
+
# The title of the company.
|
|
74
|
+
sig { returns(String) }
|
|
75
|
+
attr_accessor :title
|
|
76
|
+
|
|
77
|
+
# The time the company was last updated.
|
|
78
|
+
sig { returns(Time) }
|
|
79
|
+
attr_accessor :updated_at
|
|
80
|
+
|
|
81
|
+
# If the company is Whop Verified
|
|
82
|
+
sig { returns(T::Boolean) }
|
|
83
|
+
attr_accessor :verified
|
|
84
|
+
|
|
85
|
+
# An object representing a (sanitized) company.
|
|
86
|
+
sig do
|
|
87
|
+
params(
|
|
88
|
+
id: String,
|
|
89
|
+
business_type: T.nilable(WhopSDK::BusinessTypes::OrSymbol),
|
|
90
|
+
created_at: Time,
|
|
91
|
+
description: T.nilable(String),
|
|
92
|
+
industry_type: T.nilable(WhopSDK::IndustryTypes::OrSymbol),
|
|
93
|
+
logo: T.nilable(WhopSDK::Models::CompanyListResponse::Logo::OrHash),
|
|
94
|
+
member_count: Integer,
|
|
95
|
+
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
96
|
+
owner_user: WhopSDK::Models::CompanyListResponse::OwnerUser::OrHash,
|
|
97
|
+
published_reviews_count: Integer,
|
|
98
|
+
route: String,
|
|
99
|
+
title: String,
|
|
100
|
+
updated_at: Time,
|
|
101
|
+
verified: T::Boolean
|
|
102
|
+
).returns(T.attached_class)
|
|
103
|
+
end
|
|
104
|
+
def self.new(
|
|
105
|
+
# The ID (tag) of the company.
|
|
106
|
+
id:,
|
|
107
|
+
# The different business types a company can be.
|
|
108
|
+
business_type:,
|
|
109
|
+
# When the company was created (signed up)
|
|
110
|
+
created_at:,
|
|
111
|
+
# The creator pitch for the company.
|
|
112
|
+
description:,
|
|
113
|
+
# The different industry types a company can be in.
|
|
114
|
+
industry_type:,
|
|
115
|
+
# The company's logo.
|
|
116
|
+
logo:,
|
|
117
|
+
# The number of members in the company.
|
|
118
|
+
member_count:,
|
|
119
|
+
# A key-value store of data for the account, created/updated by the platform that
|
|
120
|
+
# made the account.
|
|
121
|
+
metadata:,
|
|
122
|
+
# The user who owns this company
|
|
123
|
+
owner_user:,
|
|
124
|
+
# The number of reviews that have been published for the company.
|
|
125
|
+
published_reviews_count:,
|
|
126
|
+
# The slug/route of the company on the Whop site.
|
|
127
|
+
route:,
|
|
128
|
+
# The title of the company.
|
|
129
|
+
title:,
|
|
130
|
+
# The time the company was last updated.
|
|
131
|
+
updated_at:,
|
|
132
|
+
# If the company is Whop Verified
|
|
133
|
+
verified:
|
|
134
|
+
)
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
sig do
|
|
138
|
+
override.returns(
|
|
139
|
+
{
|
|
140
|
+
id: String,
|
|
141
|
+
business_type: T.nilable(WhopSDK::BusinessTypes::TaggedSymbol),
|
|
142
|
+
created_at: Time,
|
|
143
|
+
description: T.nilable(String),
|
|
144
|
+
industry_type: T.nilable(WhopSDK::IndustryTypes::TaggedSymbol),
|
|
145
|
+
logo: T.nilable(WhopSDK::Models::CompanyListResponse::Logo),
|
|
146
|
+
member_count: Integer,
|
|
147
|
+
metadata: T.nilable(T::Hash[Symbol, T.anything]),
|
|
148
|
+
owner_user: WhopSDK::Models::CompanyListResponse::OwnerUser,
|
|
149
|
+
published_reviews_count: Integer,
|
|
150
|
+
route: String,
|
|
151
|
+
title: String,
|
|
152
|
+
updated_at: Time,
|
|
153
|
+
verified: T::Boolean
|
|
154
|
+
}
|
|
155
|
+
)
|
|
156
|
+
end
|
|
157
|
+
def to_hash
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
class Logo < WhopSDK::Internal::Type::BaseModel
|
|
161
|
+
OrHash =
|
|
162
|
+
T.type_alias do
|
|
163
|
+
T.any(
|
|
164
|
+
WhopSDK::Models::CompanyListResponse::Logo,
|
|
165
|
+
WhopSDK::Internal::AnyHash
|
|
166
|
+
)
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# This is the URL you use to render optimized attachments on the client. This
|
|
170
|
+
# should be used for apps.
|
|
171
|
+
sig { returns(T.nilable(String)) }
|
|
172
|
+
attr_accessor :url
|
|
173
|
+
|
|
174
|
+
# The company's logo.
|
|
175
|
+
sig { params(url: T.nilable(String)).returns(T.attached_class) }
|
|
176
|
+
def self.new(
|
|
177
|
+
# This is the URL you use to render optimized attachments on the client. This
|
|
178
|
+
# should be used for apps.
|
|
179
|
+
url:
|
|
180
|
+
)
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
sig { override.returns({ url: T.nilable(String) }) }
|
|
184
|
+
def to_hash
|
|
185
|
+
end
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
class OwnerUser < WhopSDK::Internal::Type::BaseModel
|
|
189
|
+
OrHash =
|
|
190
|
+
T.type_alias do
|
|
191
|
+
T.any(
|
|
192
|
+
WhopSDK::Models::CompanyListResponse::OwnerUser,
|
|
193
|
+
WhopSDK::Internal::AnyHash
|
|
194
|
+
)
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
# The internal ID of the user.
|
|
198
|
+
sig { returns(String) }
|
|
199
|
+
attr_accessor :id
|
|
200
|
+
|
|
201
|
+
# The name of the user from their Whop account.
|
|
202
|
+
sig { returns(T.nilable(String)) }
|
|
203
|
+
attr_accessor :name
|
|
204
|
+
|
|
205
|
+
# The username of the user from their Whop account.
|
|
206
|
+
sig { returns(String) }
|
|
207
|
+
attr_accessor :username
|
|
208
|
+
|
|
209
|
+
# The user who owns this company
|
|
210
|
+
sig do
|
|
211
|
+
params(id: String, name: T.nilable(String), username: String).returns(
|
|
212
|
+
T.attached_class
|
|
213
|
+
)
|
|
214
|
+
end
|
|
215
|
+
def self.new(
|
|
216
|
+
# The internal ID of the user.
|
|
217
|
+
id:,
|
|
218
|
+
# The name of the user from their Whop account.
|
|
219
|
+
name:,
|
|
220
|
+
# The username of the user from their Whop account.
|
|
221
|
+
username:
|
|
222
|
+
)
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
sig do
|
|
226
|
+
override.returns(
|
|
227
|
+
{ id: String, name: T.nilable(String), username: String }
|
|
228
|
+
)
|
|
229
|
+
end
|
|
230
|
+
def to_hash
|
|
231
|
+
end
|
|
232
|
+
end
|
|
233
|
+
end
|
|
234
|
+
end
|
|
235
|
+
end
|
|
@@ -19,32 +19,52 @@ module WhopSDK
|
|
|
19
19
|
sig { returns(String) }
|
|
20
20
|
attr_accessor :title
|
|
21
21
|
|
|
22
|
+
# Whether the course will award its students a PDF certificate after completing
|
|
23
|
+
# all lessons
|
|
24
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
25
|
+
attr_accessor :certificate_after_completion_enabled
|
|
26
|
+
|
|
22
27
|
# The cover image URL of the course
|
|
23
28
|
sig { returns(T.nilable(String)) }
|
|
24
29
|
attr_accessor :cover_image
|
|
25
30
|
|
|
31
|
+
# Whether the course requires students to complete the previous lesson before
|
|
32
|
+
# moving on to the next one
|
|
33
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
34
|
+
attr_accessor :require_completing_lessons_in_order
|
|
35
|
+
|
|
26
36
|
# The tagline of the course
|
|
27
37
|
sig { returns(T.nilable(String)) }
|
|
28
38
|
attr_accessor :tagline
|
|
29
39
|
|
|
30
40
|
# The thumbnail for the course in png, jpeg, or gif format
|
|
31
|
-
sig { returns(T.nilable(WhopSDK::CourseCreateParams::Thumbnail)) }
|
|
32
|
-
attr_reader :thumbnail
|
|
33
|
-
|
|
34
41
|
sig do
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
42
|
+
returns(
|
|
43
|
+
T.nilable(
|
|
44
|
+
T.any(
|
|
45
|
+
WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithDirectUploadID,
|
|
46
|
+
WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithID
|
|
47
|
+
)
|
|
48
|
+
)
|
|
49
|
+
)
|
|
38
50
|
end
|
|
39
|
-
|
|
51
|
+
attr_accessor :thumbnail
|
|
40
52
|
|
|
41
53
|
sig do
|
|
42
54
|
params(
|
|
43
55
|
experience_id: String,
|
|
44
56
|
title: String,
|
|
57
|
+
certificate_after_completion_enabled: T.nilable(T::Boolean),
|
|
45
58
|
cover_image: T.nilable(String),
|
|
59
|
+
require_completing_lessons_in_order: T.nilable(T::Boolean),
|
|
46
60
|
tagline: T.nilable(String),
|
|
47
|
-
thumbnail:
|
|
61
|
+
thumbnail:
|
|
62
|
+
T.nilable(
|
|
63
|
+
T.any(
|
|
64
|
+
WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithDirectUploadID::OrHash,
|
|
65
|
+
WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithID::OrHash
|
|
66
|
+
)
|
|
67
|
+
),
|
|
48
68
|
request_options: WhopSDK::RequestOptions::OrHash
|
|
49
69
|
).returns(T.attached_class)
|
|
50
70
|
end
|
|
@@ -53,8 +73,14 @@ module WhopSDK
|
|
|
53
73
|
experience_id:,
|
|
54
74
|
# The title of the course
|
|
55
75
|
title:,
|
|
76
|
+
# Whether the course will award its students a PDF certificate after completing
|
|
77
|
+
# all lessons
|
|
78
|
+
certificate_after_completion_enabled: nil,
|
|
56
79
|
# The cover image URL of the course
|
|
57
80
|
cover_image: nil,
|
|
81
|
+
# Whether the course requires students to complete the previous lesson before
|
|
82
|
+
# moving on to the next one
|
|
83
|
+
require_completing_lessons_in_order: nil,
|
|
58
84
|
# The tagline of the course
|
|
59
85
|
tagline: nil,
|
|
60
86
|
# The thumbnail for the course in png, jpeg, or gif format
|
|
@@ -68,9 +94,17 @@ module WhopSDK
|
|
|
68
94
|
{
|
|
69
95
|
experience_id: String,
|
|
70
96
|
title: String,
|
|
97
|
+
certificate_after_completion_enabled: T.nilable(T::Boolean),
|
|
71
98
|
cover_image: T.nilable(String),
|
|
99
|
+
require_completing_lessons_in_order: T.nilable(T::Boolean),
|
|
72
100
|
tagline: T.nilable(String),
|
|
73
|
-
thumbnail:
|
|
101
|
+
thumbnail:
|
|
102
|
+
T.nilable(
|
|
103
|
+
T.any(
|
|
104
|
+
WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithDirectUploadID,
|
|
105
|
+
WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithID
|
|
106
|
+
)
|
|
107
|
+
),
|
|
74
108
|
request_options: WhopSDK::RequestOptions
|
|
75
109
|
}
|
|
76
110
|
)
|
|
@@ -78,52 +112,84 @@ module WhopSDK
|
|
|
78
112
|
def to_hash
|
|
79
113
|
end
|
|
80
114
|
|
|
81
|
-
|
|
82
|
-
|
|
115
|
+
# The thumbnail for the course in png, jpeg, or gif format
|
|
116
|
+
module Thumbnail
|
|
117
|
+
extend WhopSDK::Internal::Type::Union
|
|
118
|
+
|
|
119
|
+
Variants =
|
|
83
120
|
T.type_alias do
|
|
84
121
|
T.any(
|
|
85
|
-
WhopSDK::CourseCreateParams::Thumbnail,
|
|
86
|
-
WhopSDK::
|
|
122
|
+
WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithDirectUploadID,
|
|
123
|
+
WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithID
|
|
87
124
|
)
|
|
88
125
|
end
|
|
89
126
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
127
|
+
class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
|
|
128
|
+
OrHash =
|
|
129
|
+
T.type_alias do
|
|
130
|
+
T.any(
|
|
131
|
+
WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithDirectUploadID,
|
|
132
|
+
WhopSDK::Internal::AnyHash
|
|
133
|
+
)
|
|
134
|
+
end
|
|
95
135
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
136
|
+
# This ID should be used the first time you upload an attachment. It is the ID of
|
|
137
|
+
# the direct upload that was created when uploading the file to S3 via the
|
|
138
|
+
# mediaDirectUpload mutation.
|
|
139
|
+
sig { returns(String) }
|
|
140
|
+
attr_accessor :direct_upload_id
|
|
101
141
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
142
|
+
# Input for an attachment
|
|
143
|
+
sig { params(direct_upload_id: String).returns(T.attached_class) }
|
|
144
|
+
def self.new(
|
|
145
|
+
# This ID should be used the first time you upload an attachment. It is the ID of
|
|
146
|
+
# the direct upload that was created when uploading the file to S3 via the
|
|
147
|
+
# mediaDirectUpload mutation.
|
|
148
|
+
direct_upload_id:
|
|
149
|
+
)
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
sig { override.returns({ direct_upload_id: String }) }
|
|
153
|
+
def to_hash
|
|
154
|
+
end
|
|
108
155
|
end
|
|
109
|
-
|
|
156
|
+
|
|
157
|
+
class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
|
|
158
|
+
OrHash =
|
|
159
|
+
T.type_alias do
|
|
160
|
+
T.any(
|
|
161
|
+
WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithID,
|
|
162
|
+
WhopSDK::Internal::AnyHash
|
|
163
|
+
)
|
|
164
|
+
end
|
|
165
|
+
|
|
110
166
|
# The ID of an existing attachment object. Use this when updating a resource and
|
|
111
167
|
# keeping a subset of the attachments. Don't use this unless you know what you're
|
|
112
168
|
# doing.
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
#
|
|
117
|
-
|
|
118
|
-
|
|
169
|
+
sig { returns(String) }
|
|
170
|
+
attr_accessor :id
|
|
171
|
+
|
|
172
|
+
# Input for an attachment
|
|
173
|
+
sig { params(id: String).returns(T.attached_class) }
|
|
174
|
+
def self.new(
|
|
175
|
+
# The ID of an existing attachment object. Use this when updating a resource and
|
|
176
|
+
# keeping a subset of the attachments. Don't use this unless you know what you're
|
|
177
|
+
# doing.
|
|
178
|
+
id:
|
|
179
|
+
)
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
sig { override.returns({ id: String }) }
|
|
183
|
+
def to_hash
|
|
184
|
+
end
|
|
119
185
|
end
|
|
120
186
|
|
|
121
187
|
sig do
|
|
122
188
|
override.returns(
|
|
123
|
-
|
|
189
|
+
T::Array[WhopSDK::CourseCreateParams::Thumbnail::Variants]
|
|
124
190
|
)
|
|
125
191
|
end
|
|
126
|
-
def
|
|
192
|
+
def self.variants
|
|
127
193
|
end
|
|
128
194
|
end
|
|
129
195
|
end
|