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.
Files changed (155) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +22 -0
  3. data/README.md +1 -1
  4. data/lib/whop_sdk/client.rb +4 -0
  5. data/lib/whop_sdk/models/app_build_create_params.rb +53 -29
  6. data/lib/whop_sdk/models/app_update_params.rb +53 -29
  7. data/lib/whop_sdk/models/checkout_configuration_create_params.rb +115 -39
  8. data/lib/whop_sdk/models/company.rb +13 -1
  9. data/lib/whop_sdk/models/company_create_params.rb +46 -0
  10. data/lib/whop_sdk/models/company_list_params.rb +62 -0
  11. data/lib/whop_sdk/models/company_list_response.rb +175 -0
  12. data/lib/whop_sdk/models/course_create_params.rb +75 -30
  13. data/lib/whop_sdk/models/course_lesson_update_params.rb +204 -83
  14. data/lib/whop_sdk/models/course_student_list_params.rb +62 -0
  15. data/lib/whop_sdk/models/course_student_list_response.rb +97 -0
  16. data/lib/whop_sdk/models/course_student_retrieve_params.rb +14 -0
  17. data/lib/whop_sdk/models/course_student_retrieve_response.rb +149 -0
  18. data/lib/whop_sdk/models/course_update_params.rb +51 -27
  19. data/lib/whop_sdk/models/experience_update_params.rb +53 -29
  20. data/lib/whop_sdk/models/forum_post_create_params.rb +51 -27
  21. data/lib/whop_sdk/models/forum_post_update_params.rb +51 -27
  22. data/lib/whop_sdk/models/invoice_create_params.rb +48 -32
  23. data/lib/whop_sdk/models/lesson.rb +16 -8
  24. data/lib/whop_sdk/models/message_create_params.rb +51 -27
  25. data/lib/whop_sdk/models/message_update_params.rb +51 -27
  26. data/lib/whop_sdk/models/payment.rb +10 -1
  27. data/lib/whop_sdk/models/payment_list_response.rb +10 -1
  28. data/lib/whop_sdk/models/payment_method_types.rb +2 -1
  29. data/lib/whop_sdk/models/plan.rb +48 -1
  30. data/lib/whop_sdk/models/plan_create_params.rb +97 -22
  31. data/lib/whop_sdk/models/plan_list_response.rb +51 -1
  32. data/lib/whop_sdk/models/plan_update_params.rb +97 -22
  33. data/lib/whop_sdk/models/product_update_params.rb +53 -29
  34. data/lib/whop_sdk/models/transfer.rb +9 -1
  35. data/lib/whop_sdk/models/transfer_create_params.rb +9 -1
  36. data/lib/whop_sdk/models/transfer_list_response.rb +9 -1
  37. data/lib/whop_sdk/models.rb +8 -0
  38. data/lib/whop_sdk/resources/app_builds.rb +1 -1
  39. data/lib/whop_sdk/resources/apps.rb +1 -1
  40. data/lib/whop_sdk/resources/checkout_configurations.rb +6 -6
  41. data/lib/whop_sdk/resources/companies.rb +70 -0
  42. data/lib/whop_sdk/resources/course_lesson_interactions.rb +2 -2
  43. data/lib/whop_sdk/resources/course_lessons.rb +7 -3
  44. data/lib/whop_sdk/resources/course_students.rb +76 -0
  45. data/lib/whop_sdk/resources/courses.rb +10 -3
  46. data/lib/whop_sdk/resources/experiences.rb +1 -1
  47. data/lib/whop_sdk/resources/forum_posts.rb +2 -2
  48. data/lib/whop_sdk/resources/invoices.rb +11 -11
  49. data/lib/whop_sdk/resources/messages.rb +2 -2
  50. data/lib/whop_sdk/resources/plans.rb +8 -4
  51. data/lib/whop_sdk/resources/products.rb +1 -1
  52. data/lib/whop_sdk/resources/transfers.rb +3 -1
  53. data/lib/whop_sdk/version.rb +1 -1
  54. data/lib/whop_sdk.rb +8 -1
  55. data/rbi/whop_sdk/client.rbi +3 -0
  56. data/rbi/whop_sdk/models/app_build_create_params.rbi +80 -40
  57. data/rbi/whop_sdk/models/app_update_params.rbi +86 -37
  58. data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +192 -64
  59. data/rbi/whop_sdk/models/company.rbi +10 -0
  60. data/rbi/whop_sdk/models/company_create_params.rbi +67 -0
  61. data/rbi/whop_sdk/models/company_list_params.rbi +83 -0
  62. data/rbi/whop_sdk/models/company_list_response.rbi +235 -0
  63. data/rbi/whop_sdk/models/course_create_params.rbi +104 -38
  64. data/rbi/whop_sdk/models/course_lesson_update_params.rbi +326 -114
  65. data/rbi/whop_sdk/models/course_student_list_params.rbi +83 -0
  66. data/rbi/whop_sdk/models/course_student_list_response.rbi +142 -0
  67. data/rbi/whop_sdk/models/course_student_retrieve_params.rbi +30 -0
  68. data/rbi/whop_sdk/models/course_student_retrieve_response.rbi +250 -0
  69. data/rbi/whop_sdk/models/course_update_params.rbi +84 -38
  70. data/rbi/whop_sdk/models/experience_update_params.rbi +84 -38
  71. data/rbi/whop_sdk/models/forum_post_create_params.rbi +85 -32
  72. data/rbi/whop_sdk/models/forum_post_update_params.rbi +85 -32
  73. data/rbi/whop_sdk/models/invoice_create_params.rbi +58 -44
  74. data/rbi/whop_sdk/models/lesson.rbi +14 -10
  75. data/rbi/whop_sdk/models/message_create_params.rbi +85 -32
  76. data/rbi/whop_sdk/models/message_update_params.rbi +85 -32
  77. data/rbi/whop_sdk/models/payment.rbi +10 -0
  78. data/rbi/whop_sdk/models/payment_list_response.rbi +10 -0
  79. data/rbi/whop_sdk/models/payment_method_types.rbi +3 -1
  80. data/rbi/whop_sdk/models/plan.rbi +82 -0
  81. data/rbi/whop_sdk/models/plan_create_params.rbi +174 -32
  82. data/rbi/whop_sdk/models/plan_list_response.rbi +94 -0
  83. data/rbi/whop_sdk/models/plan_update_params.rbi +174 -32
  84. data/rbi/whop_sdk/models/product_update_params.rbi +83 -39
  85. data/rbi/whop_sdk/models/transfer.rbi +8 -0
  86. data/rbi/whop_sdk/models/transfer_create_params.rbi +8 -0
  87. data/rbi/whop_sdk/models/transfer_list_response.rbi +8 -0
  88. data/rbi/whop_sdk/models.rbi +8 -0
  89. data/rbi/whop_sdk/resources/app_builds.rbi +5 -1
  90. data/rbi/whop_sdk/resources/apps.rbi +7 -1
  91. data/rbi/whop_sdk/resources/checkout_configurations.rbi +6 -7
  92. data/rbi/whop_sdk/resources/companies.rbi +63 -0
  93. data/rbi/whop_sdk/resources/course_lesson_interactions.rbi +2 -2
  94. data/rbi/whop_sdk/resources/course_lessons.rbi +21 -2
  95. data/rbi/whop_sdk/resources/course_students.rbi +65 -0
  96. data/rbi/whop_sdk/resources/courses.rbi +22 -2
  97. data/rbi/whop_sdk/resources/experiences.rbi +7 -1
  98. data/rbi/whop_sdk/resources/forum_posts.rbi +12 -2
  99. data/rbi/whop_sdk/resources/invoices.rbi +18 -18
  100. data/rbi/whop_sdk/resources/messages.rbi +12 -2
  101. data/rbi/whop_sdk/resources/plans.rbi +28 -2
  102. data/rbi/whop_sdk/resources/products.rbi +6 -1
  103. data/rbi/whop_sdk/resources/transfers.rbi +3 -0
  104. data/sig/whop_sdk/client.rbs +2 -0
  105. data/sig/whop_sdk/models/app_build_create_params.rbs +29 -10
  106. data/sig/whop_sdk/models/app_update_params.rbs +29 -10
  107. data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +72 -21
  108. data/sig/whop_sdk/models/company.rbs +5 -0
  109. data/sig/whop_sdk/models/company_create_params.rbs +41 -0
  110. data/sig/whop_sdk/models/company_list_params.rbs +51 -0
  111. data/sig/whop_sdk/models/company_list_response.rbs +109 -0
  112. data/sig/whop_sdk/models/course_create_params.rbs +39 -10
  113. data/sig/whop_sdk/models/course_lesson_update_params.rbs +116 -30
  114. data/sig/whop_sdk/models/course_student_list_params.rbs +51 -0
  115. data/sig/whop_sdk/models/course_student_list_response.rbs +64 -0
  116. data/sig/whop_sdk/models/course_student_retrieve_params.rbs +15 -0
  117. data/sig/whop_sdk/models/course_student_retrieve_response.rbs +106 -0
  118. data/sig/whop_sdk/models/course_update_params.rbs +29 -10
  119. data/sig/whop_sdk/models/experience_update_params.rbs +29 -10
  120. data/sig/whop_sdk/models/forum_post_create_params.rbs +29 -10
  121. data/sig/whop_sdk/models/forum_post_update_params.rbs +29 -10
  122. data/sig/whop_sdk/models/invoice_create_params.rbs +28 -18
  123. data/sig/whop_sdk/models/lesson.rbs +8 -8
  124. data/sig/whop_sdk/models/message_create_params.rbs +29 -10
  125. data/sig/whop_sdk/models/message_update_params.rbs +29 -10
  126. data/sig/whop_sdk/models/payment.rbs +5 -0
  127. data/sig/whop_sdk/models/payment_list_response.rbs +5 -0
  128. data/sig/whop_sdk/models/payment_method_types.rbs +4 -2
  129. data/sig/whop_sdk/models/plan.rbs +32 -0
  130. data/sig/whop_sdk/models/plan_create_params.rbs +61 -10
  131. data/sig/whop_sdk/models/plan_list_response.rbs +32 -0
  132. data/sig/whop_sdk/models/plan_update_params.rbs +61 -10
  133. data/sig/whop_sdk/models/product_update_params.rbs +29 -10
  134. data/sig/whop_sdk/models/transfer.rbs +5 -0
  135. data/sig/whop_sdk/models/transfer_create_params.rbs +5 -0
  136. data/sig/whop_sdk/models/transfer_list_response.rbs +5 -0
  137. data/sig/whop_sdk/models.rbs +8 -0
  138. data/sig/whop_sdk/resources/app_builds.rbs +1 -1
  139. data/sig/whop_sdk/resources/apps.rbs +1 -1
  140. data/sig/whop_sdk/resources/checkout_configurations.rbs +2 -2
  141. data/sig/whop_sdk/resources/companies.rbs +18 -0
  142. data/sig/whop_sdk/resources/course_lessons.rbs +4 -2
  143. data/sig/whop_sdk/resources/course_students.rbs +22 -0
  144. data/sig/whop_sdk/resources/courses.rbs +4 -2
  145. data/sig/whop_sdk/resources/experiences.rbs +1 -1
  146. data/sig/whop_sdk/resources/forum_posts.rbs +2 -2
  147. data/sig/whop_sdk/resources/invoices.rbs +5 -5
  148. data/sig/whop_sdk/resources/messages.rbs +2 -2
  149. data/sig/whop_sdk/resources/plans.rbs +4 -2
  150. data/sig/whop_sdk/resources/products.rbs +1 -1
  151. data/sig/whop_sdk/resources/transfers.rbs +1 -0
  152. metadata +26 -5
  153. data/lib/whop_sdk/models/invoice_create_response.rb +0 -27
  154. data/rbi/whop_sdk/models/invoice_create_response.rbi +0 -49
  155. 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
- params(
36
- thumbnail: T.nilable(WhopSDK::CourseCreateParams::Thumbnail::OrHash)
37
- ).void
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
- attr_writer :thumbnail
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: T.nilable(WhopSDK::CourseCreateParams::Thumbnail::OrHash),
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: T.nilable(WhopSDK::CourseCreateParams::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
- class Thumbnail < WhopSDK::Internal::Type::BaseModel
82
- OrHash =
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::Internal::AnyHash
122
+ WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithDirectUploadID,
123
+ WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithID
87
124
  )
88
125
  end
89
126
 
90
- # The ID of an existing attachment object. Use this when updating a resource and
91
- # keeping a subset of the attachments. Don't use this unless you know what you're
92
- # doing.
93
- sig { returns(T.nilable(String)) }
94
- attr_accessor :id
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
- # This ID should be used the first time you upload an attachment. It is the ID of
97
- # the direct upload that was created when uploading the file to S3 via the
98
- # mediaDirectUpload mutation.
99
- sig { returns(T.nilable(String)) }
100
- attr_accessor :direct_upload_id
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
- # The thumbnail for the course in png, jpeg, or gif format
103
- sig do
104
- params(
105
- id: T.nilable(String),
106
- direct_upload_id: T.nilable(String)
107
- ).returns(T.attached_class)
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
- def self.new(
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
- id: nil,
114
- # This ID should be used the first time you upload an attachment. It is the ID of
115
- # the direct upload that was created when uploading the file to S3 via the
116
- # mediaDirectUpload mutation.
117
- direct_upload_id: nil
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
- { id: T.nilable(String), direct_upload_id: T.nilable(String) }
189
+ T::Array[WhopSDK::CourseCreateParams::Thumbnail::Variants]
124
190
  )
125
191
  end
126
- def to_hash
192
+ def self.variants
127
193
  end
128
194
  end
129
195
  end