whop_sdk 0.0.23 → 0.0.24

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 (176) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +35 -0
  3. data/README.md +1 -1
  4. data/lib/whop_sdk/models/app_build_create_params.rb +16 -55
  5. data/lib/whop_sdk/models/app_create_params.rb +22 -1
  6. data/lib/whop_sdk/models/app_list_params.rb +5 -0
  7. data/lib/whop_sdk/models/app_update_params.rb +14 -53
  8. data/lib/whop_sdk/models/card_brands.rb +16 -0
  9. data/lib/whop_sdk/models/checkout_configuration_create_params.rb +32 -56
  10. data/lib/whop_sdk/models/company_create_params.rb +22 -1
  11. data/lib/whop_sdk/models/company_update_params.rb +28 -106
  12. data/lib/whop_sdk/models/course_create_params.rb +15 -62
  13. data/lib/whop_sdk/models/course_lesson_create_params.rb +14 -53
  14. data/lib/whop_sdk/models/course_lesson_update_params.rb +53 -214
  15. data/lib/whop_sdk/models/course_update_params.rb +14 -61
  16. data/lib/whop_sdk/models/dispute_update_evidence_params.rb +56 -212
  17. data/lib/whop_sdk/models/experience_create_params.rb +22 -1
  18. data/lib/whop_sdk/models/experience_update_params.rb +14 -53
  19. data/lib/whop_sdk/models/forum_post_create_params.rb +13 -52
  20. data/lib/whop_sdk/models/forum_post_update_params.rb +13 -52
  21. data/lib/whop_sdk/models/friendly_receipt_status.rb +23 -11
  22. data/lib/whop_sdk/models/ledger_account_retrieve_response.rb +1 -34
  23. data/lib/whop_sdk/models/member_list_response.rb +9 -1
  24. data/lib/whop_sdk/models/member_retrieve_response.rb +9 -1
  25. data/lib/whop_sdk/models/membership.rb +76 -2
  26. data/lib/whop_sdk/models/membership_list_response.rb +38 -2
  27. data/lib/whop_sdk/models/membership_uncancel_params.rb +14 -0
  28. data/lib/whop_sdk/models/message_create_params.rb +13 -52
  29. data/lib/whop_sdk/models/message_update_params.rb +14 -53
  30. data/lib/whop_sdk/models/payment.rb +17 -1
  31. data/lib/whop_sdk/models/payment_list_response.rb +17 -1
  32. data/lib/whop_sdk/models/payment_method_types.rb +58 -57
  33. data/lib/whop_sdk/models/payment_provider.rb +1 -0
  34. data/lib/whop_sdk/models/payout_method_created_webhook_event.rb +26 -1
  35. data/lib/whop_sdk/models/payout_method_list_response.rb +26 -1
  36. data/lib/whop_sdk/models/payout_method_retrieve_response.rb +26 -1
  37. data/lib/whop_sdk/models/plan_create_params.rb +14 -53
  38. data/lib/whop_sdk/models/plan_update_params.rb +14 -53
  39. data/lib/whop_sdk/models/withdrawal_create_params.rb +21 -1
  40. data/lib/whop_sdk/models/withdrawal_create_response.rb +2 -9
  41. data/lib/whop_sdk/models/withdrawal_created_webhook_event.rb +2 -9
  42. data/lib/whop_sdk/models/withdrawal_list_response.rb +1 -9
  43. data/lib/whop_sdk/models/withdrawal_retrieve_response.rb +2 -9
  44. data/lib/whop_sdk/models/withdrawal_updated_webhook_event.rb +2 -9
  45. data/lib/whop_sdk/models.rb +2 -2
  46. data/lib/whop_sdk/resources/app_builds.rb +1 -1
  47. data/lib/whop_sdk/resources/apps.rb +4 -2
  48. data/lib/whop_sdk/resources/checkout_configurations.rb +3 -1
  49. data/lib/whop_sdk/resources/companies.rb +5 -3
  50. data/lib/whop_sdk/resources/course_lessons.rb +4 -4
  51. data/lib/whop_sdk/resources/courses.rb +4 -8
  52. data/lib/whop_sdk/resources/disputes.rb +4 -4
  53. data/lib/whop_sdk/resources/experiences.rb +4 -2
  54. data/lib/whop_sdk/resources/forum_posts.rb +2 -2
  55. data/lib/whop_sdk/resources/memberships.rb +32 -0
  56. data/lib/whop_sdk/resources/messages.rb +2 -2
  57. data/lib/whop_sdk/resources/notifications.rb +4 -0
  58. data/lib/whop_sdk/resources/plans.rb +2 -2
  59. data/lib/whop_sdk/resources/withdrawals.rb +8 -1
  60. data/lib/whop_sdk/version.rb +1 -1
  61. data/lib/whop_sdk.rb +1 -1
  62. data/rbi/whop_sdk/models/app_build_create_params.rbi +26 -89
  63. data/rbi/whop_sdk/models/app_create_params.rbi +36 -0
  64. data/rbi/whop_sdk/models/app_list_params.rbi +10 -0
  65. data/rbi/whop_sdk/models/app_update_params.rbi +21 -93
  66. data/rbi/whop_sdk/models/card_brands.rbi +17 -0
  67. data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +45 -87
  68. data/rbi/whop_sdk/models/company_create_params.rbi +39 -0
  69. data/rbi/whop_sdk/models/company_update_params.rbi +47 -185
  70. data/rbi/whop_sdk/models/course_create_params.rbi +24 -101
  71. data/rbi/whop_sdk/models/course_lesson_create_params.rbi +25 -92
  72. data/rbi/whop_sdk/models/course_lesson_update_params.rbi +97 -359
  73. data/rbi/whop_sdk/models/course_update_params.rbi +24 -101
  74. data/rbi/whop_sdk/models/dispute_update_evidence_params.rbi +116 -340
  75. data/rbi/whop_sdk/models/experience_create_params.rbi +41 -0
  76. data/rbi/whop_sdk/models/experience_update_params.rbi +24 -93
  77. data/rbi/whop_sdk/models/forum_post_create_params.rbi +18 -94
  78. data/rbi/whop_sdk/models/forum_post_update_params.rbi +18 -94
  79. data/rbi/whop_sdk/models/friendly_receipt_status.rbi +62 -17
  80. data/rbi/whop_sdk/models/ledger_account_retrieve_response.rbi +0 -105
  81. data/rbi/whop_sdk/models/member_list_response.rbi +8 -0
  82. data/rbi/whop_sdk/models/member_retrieve_response.rbi +8 -0
  83. data/rbi/whop_sdk/models/membership.rbi +126 -4
  84. data/rbi/whop_sdk/models/membership_list_response.rbi +98 -4
  85. data/rbi/whop_sdk/models/membership_uncancel_params.rbi +27 -0
  86. data/rbi/whop_sdk/models/message_create_params.rbi +18 -94
  87. data/rbi/whop_sdk/models/message_update_params.rbi +18 -94
  88. data/rbi/whop_sdk/models/payment.rbi +16 -0
  89. data/rbi/whop_sdk/models/payment_list_response.rbi +16 -0
  90. data/rbi/whop_sdk/models/payment_method_types.rbi +66 -64
  91. data/rbi/whop_sdk/models/payment_provider.rbi +1 -0
  92. data/rbi/whop_sdk/models/payout_method_created_webhook_event.rbi +26 -0
  93. data/rbi/whop_sdk/models/payout_method_list_response.rbi +26 -0
  94. data/rbi/whop_sdk/models/payout_method_retrieve_response.rbi +26 -0
  95. data/rbi/whop_sdk/models/plan_create_params.rbi +21 -93
  96. data/rbi/whop_sdk/models/plan_update_params.rbi +21 -93
  97. data/rbi/whop_sdk/models/withdrawal_create_params.rbi +18 -0
  98. data/rbi/whop_sdk/models/withdrawal_create_response.rbi +8 -11
  99. data/rbi/whop_sdk/models/withdrawal_created_webhook_event.rbi +8 -11
  100. data/rbi/whop_sdk/models/withdrawal_list_response.rbi +3 -11
  101. data/rbi/whop_sdk/models/withdrawal_retrieve_response.rbi +8 -11
  102. data/rbi/whop_sdk/models/withdrawal_updated_webhook_event.rbi +8 -11
  103. data/rbi/whop_sdk/models.rbi +2 -2
  104. data/rbi/whop_sdk/resources/app_builds.rbi +1 -5
  105. data/rbi/whop_sdk/resources/apps.rbi +4 -7
  106. data/rbi/whop_sdk/resources/checkout_configurations.rbi +3 -0
  107. data/rbi/whop_sdk/resources/companies.rbi +5 -13
  108. data/rbi/whop_sdk/resources/course_lessons.rbi +4 -24
  109. data/rbi/whop_sdk/resources/courses.rbi +2 -20
  110. data/rbi/whop_sdk/resources/disputes.rbi +4 -16
  111. data/rbi/whop_sdk/resources/experiences.rbi +4 -7
  112. data/rbi/whop_sdk/resources/forum_posts.rbi +2 -12
  113. data/rbi/whop_sdk/resources/memberships.rbi +26 -0
  114. data/rbi/whop_sdk/resources/messages.rbi +2 -12
  115. data/rbi/whop_sdk/resources/notifications.rbi +4 -0
  116. data/rbi/whop_sdk/resources/plans.rbi +2 -14
  117. data/rbi/whop_sdk/resources/withdrawals.rbi +7 -0
  118. data/sig/whop_sdk/models/app_build_create_params.rbs +9 -30
  119. data/sig/whop_sdk/models/app_create_params.rbs +20 -1
  120. data/sig/whop_sdk/models/app_list_params.rbs +10 -0
  121. data/sig/whop_sdk/models/app_update_params.rbs +9 -30
  122. data/sig/whop_sdk/models/card_brands.rbs +32 -0
  123. data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +19 -30
  124. data/sig/whop_sdk/models/company_create_params.rbs +15 -0
  125. data/sig/whop_sdk/models/company_update_params.rbs +18 -60
  126. data/sig/whop_sdk/models/course_create_params.rbs +9 -35
  127. data/sig/whop_sdk/models/course_lesson_create_params.rbs +9 -30
  128. data/sig/whop_sdk/models/course_lesson_update_params.rbs +36 -120
  129. data/sig/whop_sdk/models/course_update_params.rbs +9 -35
  130. data/sig/whop_sdk/models/dispute_update_evidence_params.rbs +36 -120
  131. data/sig/whop_sdk/models/experience_create_params.rbs +15 -0
  132. data/sig/whop_sdk/models/experience_update_params.rbs +9 -30
  133. data/sig/whop_sdk/models/forum_post_create_params.rbs +9 -30
  134. data/sig/whop_sdk/models/forum_post_update_params.rbs +9 -30
  135. data/sig/whop_sdk/models/friendly_receipt_status.rbs +46 -22
  136. data/sig/whop_sdk/models/ledger_account_retrieve_response.rbs +0 -38
  137. data/sig/whop_sdk/models/member_list_response.rbs +5 -0
  138. data/sig/whop_sdk/models/member_retrieve_response.rbs +5 -0
  139. data/sig/whop_sdk/models/membership.rbs +65 -4
  140. data/sig/whop_sdk/models/membership_list_response.rbs +45 -4
  141. data/sig/whop_sdk/models/membership_uncancel_params.rbs +15 -0
  142. data/sig/whop_sdk/models/message_create_params.rbs +9 -30
  143. data/sig/whop_sdk/models/message_update_params.rbs +9 -30
  144. data/sig/whop_sdk/models/payment.rbs +10 -0
  145. data/sig/whop_sdk/models/payment_list_response.rbs +10 -0
  146. data/sig/whop_sdk/models/payment_method_types.rbs +117 -115
  147. data/sig/whop_sdk/models/payment_provider.rbs +2 -0
  148. data/sig/whop_sdk/models/payout_method_created_webhook_event.rbs +15 -0
  149. data/sig/whop_sdk/models/payout_method_list_response.rbs +15 -0
  150. data/sig/whop_sdk/models/payout_method_retrieve_response.rbs +15 -0
  151. data/sig/whop_sdk/models/plan_create_params.rbs +9 -30
  152. data/sig/whop_sdk/models/plan_update_params.rbs +9 -30
  153. data/sig/whop_sdk/models/withdrawal_create_params.rbs +11 -1
  154. data/sig/whop_sdk/models/withdrawal_create_response.rbs +5 -8
  155. data/sig/whop_sdk/models/withdrawal_created_webhook_event.rbs +5 -8
  156. data/sig/whop_sdk/models/withdrawal_list_response.rbs +3 -8
  157. data/sig/whop_sdk/models/withdrawal_retrieve_response.rbs +5 -8
  158. data/sig/whop_sdk/models/withdrawal_updated_webhook_event.rbs +5 -8
  159. data/sig/whop_sdk/models.rbs +2 -2
  160. data/sig/whop_sdk/resources/app_builds.rbs +1 -1
  161. data/sig/whop_sdk/resources/apps.rbs +2 -1
  162. data/sig/whop_sdk/resources/checkout_configurations.rbs +1 -0
  163. data/sig/whop_sdk/resources/companies.rbs +3 -2
  164. data/sig/whop_sdk/resources/course_lessons.rbs +4 -4
  165. data/sig/whop_sdk/resources/courses.rbs +2 -4
  166. data/sig/whop_sdk/resources/disputes.rbs +4 -4
  167. data/sig/whop_sdk/resources/experiences.rbs +2 -1
  168. data/sig/whop_sdk/resources/forum_posts.rbs +2 -2
  169. data/sig/whop_sdk/resources/memberships.rbs +5 -0
  170. data/sig/whop_sdk/resources/messages.rbs +2 -2
  171. data/sig/whop_sdk/resources/plans.rbs +2 -2
  172. data/sig/whop_sdk/resources/withdrawals.rbs +2 -0
  173. metadata +19 -5
  174. data/lib/whop_sdk/models/withdrawal_types.rb +0 -16
  175. data/rbi/whop_sdk/models/withdrawal_types.rbi +0 -20
  176. data/sig/whop_sdk/models/withdrawal_types.rbs +0 -14
@@ -31,6 +31,15 @@ module WhopSDK
31
31
  sig { returns(T.nilable(WhopSDK::IndustryTypes::OrSymbol)) }
32
32
  attr_accessor :industry_type
33
33
 
34
+ # The logo for the company in png, jpeg, or gif format
35
+ sig { returns(T.nilable(WhopSDK::CompanyCreateParams::Logo)) }
36
+ attr_reader :logo
37
+
38
+ sig do
39
+ params(logo: T.nilable(WhopSDK::CompanyCreateParams::Logo::OrHash)).void
40
+ end
41
+ attr_writer :logo
42
+
34
43
  # Additional metadata for the account
35
44
  sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
36
45
  attr_accessor :metadata
@@ -49,6 +58,7 @@ module WhopSDK
49
58
  title: String,
50
59
  business_type: T.nilable(WhopSDK::BusinessTypes::OrSymbol),
51
60
  industry_type: T.nilable(WhopSDK::IndustryTypes::OrSymbol),
61
+ logo: T.nilable(WhopSDK::CompanyCreateParams::Logo::OrHash),
52
62
  metadata: T.nilable(T::Hash[Symbol, T.anything]),
53
63
  send_customer_emails: T.nilable(T::Boolean),
54
64
  request_options: WhopSDK::RequestOptions::OrHash
@@ -65,6 +75,8 @@ module WhopSDK
65
75
  business_type: nil,
66
76
  # The different industry types a company can be in.
67
77
  industry_type: nil,
78
+ # The logo for the company in png, jpeg, or gif format
79
+ logo: nil,
68
80
  # Additional metadata for the account
69
81
  metadata: nil,
70
82
  # Whether Whop sends transactional emails to customers on behalf of this company.
@@ -84,6 +96,7 @@ module WhopSDK
84
96
  title: String,
85
97
  business_type: T.nilable(WhopSDK::BusinessTypes::OrSymbol),
86
98
  industry_type: T.nilable(WhopSDK::IndustryTypes::OrSymbol),
99
+ logo: T.nilable(WhopSDK::CompanyCreateParams::Logo),
87
100
  metadata: T.nilable(T::Hash[Symbol, T.anything]),
88
101
  send_customer_emails: T.nilable(T::Boolean),
89
102
  request_options: WhopSDK::RequestOptions
@@ -92,6 +105,32 @@ module WhopSDK
92
105
  end
93
106
  def to_hash
94
107
  end
108
+
109
+ class Logo < WhopSDK::Internal::Type::BaseModel
110
+ OrHash =
111
+ T.type_alias do
112
+ T.any(
113
+ WhopSDK::CompanyCreateParams::Logo,
114
+ WhopSDK::Internal::AnyHash
115
+ )
116
+ end
117
+
118
+ # The ID of an existing file object.
119
+ sig { returns(String) }
120
+ attr_accessor :id
121
+
122
+ # The logo for the company in png, jpeg, or gif format
123
+ sig { params(id: String).returns(T.attached_class) }
124
+ def self.new(
125
+ # The ID of an existing file object.
126
+ id:
127
+ )
128
+ end
129
+
130
+ sig { override.returns({ id: String }) }
131
+ def to_hash
132
+ end
133
+ end
95
134
  end
96
135
  end
97
136
  end
@@ -12,17 +12,16 @@ module WhopSDK
12
12
  end
13
13
 
14
14
  # The banner image for the company in png or jpeg format
15
+ sig { returns(T.nilable(WhopSDK::CompanyUpdateParams::BannerImage)) }
16
+ attr_reader :banner_image
17
+
15
18
  sig do
16
- returns(
17
- T.nilable(
18
- T.any(
19
- WhopSDK::CompanyUpdateParams::BannerImage::AttachmentInputWithDirectUploadID,
20
- WhopSDK::CompanyUpdateParams::BannerImage::AttachmentInputWithID
21
- )
22
- )
23
- )
19
+ params(
20
+ banner_image:
21
+ T.nilable(WhopSDK::CompanyUpdateParams::BannerImage::OrHash)
22
+ ).void
24
23
  end
25
- attr_accessor :banner_image
24
+ attr_writer :banner_image
26
25
 
27
26
  # The different business types a company can be.
28
27
  sig { returns(T.nilable(WhopSDK::BusinessTypes::OrSymbol)) }
@@ -33,17 +32,13 @@ module WhopSDK
33
32
  attr_accessor :industry_type
34
33
 
35
34
  # The logo for the company in png, jpeg, or gif format
35
+ sig { returns(T.nilable(WhopSDK::CompanyUpdateParams::Logo)) }
36
+ attr_reader :logo
37
+
36
38
  sig do
37
- returns(
38
- T.nilable(
39
- T.any(
40
- WhopSDK::CompanyUpdateParams::Logo::AttachmentInputWithDirectUploadID,
41
- WhopSDK::CompanyUpdateParams::Logo::AttachmentInputWithID
42
- )
43
- )
44
- )
39
+ params(logo: T.nilable(WhopSDK::CompanyUpdateParams::Logo::OrHash)).void
45
40
  end
46
- attr_accessor :logo
41
+ attr_writer :logo
47
42
 
48
43
  # Whether Whop sends transactional emails to customers on behalf of this company.
49
44
  # Includes: order confirmations, payment failures, refund notifications, upcoming
@@ -59,21 +54,10 @@ module WhopSDK
59
54
  sig do
60
55
  params(
61
56
  banner_image:
62
- T.nilable(
63
- T.any(
64
- WhopSDK::CompanyUpdateParams::BannerImage::AttachmentInputWithDirectUploadID::OrHash,
65
- WhopSDK::CompanyUpdateParams::BannerImage::AttachmentInputWithID::OrHash
66
- )
67
- ),
57
+ T.nilable(WhopSDK::CompanyUpdateParams::BannerImage::OrHash),
68
58
  business_type: T.nilable(WhopSDK::BusinessTypes::OrSymbol),
69
59
  industry_type: T.nilable(WhopSDK::IndustryTypes::OrSymbol),
70
- logo:
71
- T.nilable(
72
- T.any(
73
- WhopSDK::CompanyUpdateParams::Logo::AttachmentInputWithDirectUploadID::OrHash,
74
- WhopSDK::CompanyUpdateParams::Logo::AttachmentInputWithID::OrHash
75
- )
76
- ),
60
+ logo: T.nilable(WhopSDK::CompanyUpdateParams::Logo::OrHash),
77
61
  send_customer_emails: T.nilable(T::Boolean),
78
62
  title: T.nilable(String),
79
63
  request_options: WhopSDK::RequestOptions::OrHash
@@ -102,22 +86,10 @@ module WhopSDK
102
86
  sig do
103
87
  override.returns(
104
88
  {
105
- banner_image:
106
- T.nilable(
107
- T.any(
108
- WhopSDK::CompanyUpdateParams::BannerImage::AttachmentInputWithDirectUploadID,
109
- WhopSDK::CompanyUpdateParams::BannerImage::AttachmentInputWithID
110
- )
111
- ),
89
+ banner_image: T.nilable(WhopSDK::CompanyUpdateParams::BannerImage),
112
90
  business_type: T.nilable(WhopSDK::BusinessTypes::OrSymbol),
113
91
  industry_type: T.nilable(WhopSDK::IndustryTypes::OrSymbol),
114
- logo:
115
- T.nilable(
116
- T.any(
117
- WhopSDK::CompanyUpdateParams::Logo::AttachmentInputWithDirectUploadID,
118
- WhopSDK::CompanyUpdateParams::Logo::AttachmentInputWithID
119
- )
120
- ),
92
+ logo: T.nilable(WhopSDK::CompanyUpdateParams::Logo),
121
93
  send_customer_emails: T.nilable(T::Boolean),
122
94
  title: T.nilable(String),
123
95
  request_options: WhopSDK::RequestOptions
@@ -127,165 +99,55 @@ module WhopSDK
127
99
  def to_hash
128
100
  end
129
101
 
130
- # The banner image for the company in png or jpeg format
131
- module BannerImage
132
- extend WhopSDK::Internal::Type::Union
133
-
134
- Variants =
102
+ class BannerImage < WhopSDK::Internal::Type::BaseModel
103
+ OrHash =
135
104
  T.type_alias do
136
105
  T.any(
137
- WhopSDK::CompanyUpdateParams::BannerImage::AttachmentInputWithDirectUploadID,
138
- WhopSDK::CompanyUpdateParams::BannerImage::AttachmentInputWithID
106
+ WhopSDK::CompanyUpdateParams::BannerImage,
107
+ WhopSDK::Internal::AnyHash
139
108
  )
140
109
  end
141
110
 
142
- class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
143
- OrHash =
144
- T.type_alias do
145
- T.any(
146
- WhopSDK::CompanyUpdateParams::BannerImage::AttachmentInputWithDirectUploadID,
147
- WhopSDK::Internal::AnyHash
148
- )
149
- end
150
-
151
- # This ID should be used the first time you upload an attachment. It is the ID of
152
- # the direct upload that was created when uploading the file to S3 via the
153
- # mediaDirectUpload mutation.
154
- sig { returns(String) }
155
- attr_accessor :direct_upload_id
156
-
157
- # Input for an attachment
158
- sig { params(direct_upload_id: String).returns(T.attached_class) }
159
- def self.new(
160
- # This ID should be used the first time you upload an attachment. It is the ID of
161
- # the direct upload that was created when uploading the file to S3 via the
162
- # mediaDirectUpload mutation.
163
- direct_upload_id:
164
- )
165
- end
166
-
167
- sig { override.returns({ direct_upload_id: String }) }
168
- def to_hash
169
- end
170
- end
171
-
172
- class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
173
- OrHash =
174
- T.type_alias do
175
- T.any(
176
- WhopSDK::CompanyUpdateParams::BannerImage::AttachmentInputWithID,
177
- WhopSDK::Internal::AnyHash
178
- )
179
- end
180
-
181
- # The ID of an existing attachment object. Use this when updating a resource and
182
- # keeping a subset of the attachments. Don't use this unless you know what you're
183
- # doing.
184
- sig { returns(String) }
185
- attr_accessor :id
186
-
187
- # Input for an attachment
188
- sig { params(id: String).returns(T.attached_class) }
189
- def self.new(
190
- # The ID of an existing attachment object. Use this when updating a resource and
191
- # keeping a subset of the attachments. Don't use this unless you know what you're
192
- # doing.
193
- id:
194
- )
195
- end
111
+ # The ID of an existing file object.
112
+ sig { returns(String) }
113
+ attr_accessor :id
196
114
 
197
- sig { override.returns({ id: String }) }
198
- def to_hash
199
- end
115
+ # The banner image for the company in png or jpeg format
116
+ sig { params(id: String).returns(T.attached_class) }
117
+ def self.new(
118
+ # The ID of an existing file object.
119
+ id:
120
+ )
200
121
  end
201
122
 
202
- sig do
203
- override.returns(
204
- T::Array[WhopSDK::CompanyUpdateParams::BannerImage::Variants]
205
- )
206
- end
207
- def self.variants
123
+ sig { override.returns({ id: String }) }
124
+ def to_hash
208
125
  end
209
126
  end
210
127
 
211
- # The logo for the company in png, jpeg, or gif format
212
- module Logo
213
- extend WhopSDK::Internal::Type::Union
214
-
215
- Variants =
128
+ class Logo < WhopSDK::Internal::Type::BaseModel
129
+ OrHash =
216
130
  T.type_alias do
217
131
  T.any(
218
- WhopSDK::CompanyUpdateParams::Logo::AttachmentInputWithDirectUploadID,
219
- WhopSDK::CompanyUpdateParams::Logo::AttachmentInputWithID
132
+ WhopSDK::CompanyUpdateParams::Logo,
133
+ WhopSDK::Internal::AnyHash
220
134
  )
221
135
  end
222
136
 
223
- class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
224
- OrHash =
225
- T.type_alias do
226
- T.any(
227
- WhopSDK::CompanyUpdateParams::Logo::AttachmentInputWithDirectUploadID,
228
- WhopSDK::Internal::AnyHash
229
- )
230
- end
231
-
232
- # This ID should be used the first time you upload an attachment. It is the ID of
233
- # the direct upload that was created when uploading the file to S3 via the
234
- # mediaDirectUpload mutation.
235
- sig { returns(String) }
236
- attr_accessor :direct_upload_id
137
+ # The ID of an existing file object.
138
+ sig { returns(String) }
139
+ attr_accessor :id
237
140
 
238
- # Input for an attachment
239
- sig { params(direct_upload_id: String).returns(T.attached_class) }
240
- def self.new(
241
- # This ID should be used the first time you upload an attachment. It is the ID of
242
- # the direct upload that was created when uploading the file to S3 via the
243
- # mediaDirectUpload mutation.
244
- direct_upload_id:
245
- )
246
- end
247
-
248
- sig { override.returns({ direct_upload_id: String }) }
249
- def to_hash
250
- end
251
- end
252
-
253
- class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
254
- OrHash =
255
- T.type_alias do
256
- T.any(
257
- WhopSDK::CompanyUpdateParams::Logo::AttachmentInputWithID,
258
- WhopSDK::Internal::AnyHash
259
- )
260
- end
261
-
262
- # The ID of an existing attachment object. Use this when updating a resource and
263
- # keeping a subset of the attachments. Don't use this unless you know what you're
264
- # doing.
265
- sig { returns(String) }
266
- attr_accessor :id
267
-
268
- # Input for an attachment
269
- sig { params(id: String).returns(T.attached_class) }
270
- def self.new(
271
- # The ID of an existing attachment object. Use this when updating a resource and
272
- # keeping a subset of the attachments. Don't use this unless you know what you're
273
- # doing.
274
- id:
275
- )
276
- end
277
-
278
- sig { override.returns({ id: String }) }
279
- def to_hash
280
- end
141
+ # The logo for the company in png, jpeg, or gif format
142
+ sig { params(id: String).returns(T.attached_class) }
143
+ def self.new(
144
+ # The ID of an existing file object.
145
+ id:
146
+ )
281
147
  end
282
148
 
283
- sig do
284
- override.returns(
285
- T::Array[WhopSDK::CompanyUpdateParams::Logo::Variants]
286
- )
287
- end
288
- def self.variants
149
+ sig { override.returns({ id: String }) }
150
+ def to_hash
289
151
  end
290
152
  end
291
153
  end
@@ -24,10 +24,6 @@ module WhopSDK
24
24
  sig { returns(T.nilable(T::Boolean)) }
25
25
  attr_accessor :certificate_after_completion_enabled
26
26
 
27
- # The cover image URL of the course
28
- sig { returns(T.nilable(String)) }
29
- attr_accessor :cover_image
30
-
31
27
  # The decimal order position of the course within its experience. If not provided,
32
28
  # it will be set to the next sequential order. Use fractional values (e.g., 1.5)
33
29
  # to place between existing courses.
@@ -44,17 +40,15 @@ module WhopSDK
44
40
  attr_accessor :tagline
45
41
 
46
42
  # The thumbnail for the course in png, jpeg, or gif format
43
+ sig { returns(T.nilable(WhopSDK::CourseCreateParams::Thumbnail)) }
44
+ attr_reader :thumbnail
45
+
47
46
  sig do
48
- returns(
49
- T.nilable(
50
- T.any(
51
- WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithDirectUploadID,
52
- WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithID
53
- )
54
- )
55
- )
47
+ params(
48
+ thumbnail: T.nilable(WhopSDK::CourseCreateParams::Thumbnail::OrHash)
49
+ ).void
56
50
  end
57
- attr_accessor :thumbnail
51
+ attr_writer :thumbnail
58
52
 
59
53
  # The available visibilities for a course. Determines how / whether a course is
60
54
  # visible to users.
@@ -66,17 +60,10 @@ module WhopSDK
66
60
  experience_id: String,
67
61
  title: String,
68
62
  certificate_after_completion_enabled: T.nilable(T::Boolean),
69
- cover_image: T.nilable(String),
70
63
  order: T.nilable(String),
71
64
  require_completing_lessons_in_order: T.nilable(T::Boolean),
72
65
  tagline: T.nilable(String),
73
- thumbnail:
74
- T.nilable(
75
- T.any(
76
- WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithDirectUploadID::OrHash,
77
- WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithID::OrHash
78
- )
79
- ),
66
+ thumbnail: T.nilable(WhopSDK::CourseCreateParams::Thumbnail::OrHash),
80
67
  visibility: T.nilable(WhopSDK::CourseVisibilities::OrSymbol),
81
68
  request_options: WhopSDK::RequestOptions::OrHash
82
69
  ).returns(T.attached_class)
@@ -89,8 +76,6 @@ module WhopSDK
89
76
  # Whether the course will award its students a PDF certificate after completing
90
77
  # all lessons
91
78
  certificate_after_completion_enabled: nil,
92
- # The cover image URL of the course
93
- cover_image: nil,
94
79
  # The decimal order position of the course within its experience. If not provided,
95
80
  # it will be set to the next sequential order. Use fractional values (e.g., 1.5)
96
81
  # to place between existing courses.
@@ -115,17 +100,10 @@ module WhopSDK
115
100
  experience_id: String,
116
101
  title: String,
117
102
  certificate_after_completion_enabled: T.nilable(T::Boolean),
118
- cover_image: T.nilable(String),
119
103
  order: T.nilable(String),
120
104
  require_completing_lessons_in_order: T.nilable(T::Boolean),
121
105
  tagline: T.nilable(String),
122
- thumbnail:
123
- T.nilable(
124
- T.any(
125
- WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithDirectUploadID,
126
- WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithID
127
- )
128
- ),
106
+ thumbnail: T.nilable(WhopSDK::CourseCreateParams::Thumbnail),
129
107
  visibility: T.nilable(WhopSDK::CourseVisibilities::OrSymbol),
130
108
  request_options: WhopSDK::RequestOptions
131
109
  }
@@ -134,84 +112,29 @@ module WhopSDK
134
112
  def to_hash
135
113
  end
136
114
 
137
- # The thumbnail for the course in png, jpeg, or gif format
138
- module Thumbnail
139
- extend WhopSDK::Internal::Type::Union
140
-
141
- Variants =
115
+ class Thumbnail < WhopSDK::Internal::Type::BaseModel
116
+ OrHash =
142
117
  T.type_alias do
143
118
  T.any(
144
- WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithDirectUploadID,
145
- WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithID
119
+ WhopSDK::CourseCreateParams::Thumbnail,
120
+ WhopSDK::Internal::AnyHash
146
121
  )
147
122
  end
148
123
 
149
- class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
150
- OrHash =
151
- T.type_alias do
152
- T.any(
153
- WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithDirectUploadID,
154
- WhopSDK::Internal::AnyHash
155
- )
156
- end
157
-
158
- # This ID should be used the first time you upload an attachment. It is the ID of
159
- # the direct upload that was created when uploading the file to S3 via the
160
- # mediaDirectUpload mutation.
161
- sig { returns(String) }
162
- attr_accessor :direct_upload_id
163
-
164
- # Input for an attachment
165
- sig { params(direct_upload_id: String).returns(T.attached_class) }
166
- def self.new(
167
- # This ID should be used the first time you upload an attachment. It is the ID of
168
- # the direct upload that was created when uploading the file to S3 via the
169
- # mediaDirectUpload mutation.
170
- direct_upload_id:
171
- )
172
- end
124
+ # The ID of an existing file object.
125
+ sig { returns(String) }
126
+ attr_accessor :id
173
127
 
174
- sig { override.returns({ direct_upload_id: String }) }
175
- def to_hash
176
- end
177
- end
178
-
179
- class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
180
- OrHash =
181
- T.type_alias do
182
- T.any(
183
- WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithID,
184
- WhopSDK::Internal::AnyHash
185
- )
186
- end
187
-
188
- # The ID of an existing attachment object. Use this when updating a resource and
189
- # keeping a subset of the attachments. Don't use this unless you know what you're
190
- # doing.
191
- sig { returns(String) }
192
- attr_accessor :id
193
-
194
- # Input for an attachment
195
- sig { params(id: String).returns(T.attached_class) }
196
- def self.new(
197
- # The ID of an existing attachment object. Use this when updating a resource and
198
- # keeping a subset of the attachments. Don't use this unless you know what you're
199
- # doing.
200
- id:
201
- )
202
- end
203
-
204
- sig { override.returns({ id: String }) }
205
- def to_hash
206
- end
128
+ # The thumbnail for the course in png, jpeg, or gif format
129
+ sig { params(id: String).returns(T.attached_class) }
130
+ def self.new(
131
+ # The ID of an existing file object.
132
+ id:
133
+ )
207
134
  end
208
135
 
209
- sig do
210
- override.returns(
211
- T::Array[WhopSDK::CourseCreateParams::Thumbnail::Variants]
212
- )
213
- end
214
- def self.variants
136
+ sig { override.returns({ id: String }) }
137
+ def to_hash
215
138
  end
216
139
  end
217
140
  end