whop_sdk 0.0.3 → 0.0.5

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 (267) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +47 -0
  3. data/README.md +1 -1
  4. data/lib/whop_sdk/client.rb +8 -0
  5. data/lib/whop_sdk/internal/transport/base_client.rb +7 -1
  6. data/lib/whop_sdk/internal/transport/pooled_net_requester.rb +6 -2
  7. data/lib/whop_sdk/models/access_level.rb +1 -1
  8. data/lib/whop_sdk/models/access_pass_type.rb +2 -1
  9. data/lib/whop_sdk/models/access_token_create_params.rb +67 -0
  10. data/lib/whop_sdk/models/access_token_create_response.rb +27 -0
  11. data/lib/whop_sdk/models/app_build_create_params.rb +53 -29
  12. data/lib/whop_sdk/models/app_update_params.rb +53 -29
  13. data/lib/whop_sdk/models/checkout_configuration_create_params.rb +119 -43
  14. data/lib/whop_sdk/models/company.rb +13 -1
  15. data/lib/whop_sdk/models/company_create_params.rb +46 -0
  16. data/lib/whop_sdk/models/company_list_params.rb +62 -0
  17. data/lib/whop_sdk/models/company_list_response.rb +175 -0
  18. data/lib/whop_sdk/models/course.rb +18 -1
  19. data/lib/whop_sdk/models/course_create_params.rb +94 -30
  20. data/lib/whop_sdk/models/course_lesson_create_params.rb +77 -1
  21. data/lib/whop_sdk/models/course_lesson_list_response.rb +43 -1
  22. data/lib/whop_sdk/models/course_lesson_update_params.rb +280 -83
  23. data/lib/whop_sdk/models/course_list_response.rb +18 -1
  24. data/lib/whop_sdk/models/course_student_list_params.rb +62 -0
  25. data/lib/whop_sdk/models/course_student_list_response.rb +97 -0
  26. data/lib/whop_sdk/models/course_student_retrieve_params.rb +14 -0
  27. data/lib/whop_sdk/models/course_student_retrieve_response.rb +149 -0
  28. data/lib/whop_sdk/models/course_update_params.rb +70 -28
  29. data/lib/whop_sdk/models/course_visibilities.rb +17 -0
  30. data/lib/whop_sdk/models/embed_type.rb +16 -0
  31. data/lib/whop_sdk/models/entry.rb +3 -3
  32. data/lib/whop_sdk/models/entry_list_response.rb +3 -3
  33. data/lib/whop_sdk/models/experience.rb +5 -6
  34. data/lib/whop_sdk/models/experience_update_params.rb +53 -29
  35. data/lib/whop_sdk/models/forum_post.rb +2 -2
  36. data/lib/whop_sdk/models/forum_post_create_params.rb +51 -27
  37. data/lib/whop_sdk/models/forum_post_list_response.rb +2 -2
  38. data/lib/whop_sdk/models/forum_post_update_params.rb +51 -27
  39. data/lib/whop_sdk/models/global_affiliate_status.rb +1 -1
  40. data/lib/whop_sdk/models/invoice_create_params.rb +50 -34
  41. data/lib/whop_sdk/models/invoice_list_params.rb +27 -40
  42. data/lib/whop_sdk/models/lesson.rb +59 -9
  43. data/lib/whop_sdk/models/member_list_params.rb +11 -11
  44. data/lib/whop_sdk/models/member_list_response.rb +3 -3
  45. data/lib/whop_sdk/models/member_retrieve_response.rb +3 -3
  46. data/lib/whop_sdk/models/membership_list_params.rb +9 -9
  47. data/lib/whop_sdk/models/message.rb +2 -2
  48. data/lib/whop_sdk/models/message_create_params.rb +51 -27
  49. data/lib/whop_sdk/models/message_list_response.rb +2 -2
  50. data/lib/whop_sdk/models/message_update_params.rb +51 -27
  51. data/lib/whop_sdk/models/payment.rb +13 -4
  52. data/lib/whop_sdk/models/payment_list_response.rb +13 -4
  53. data/lib/whop_sdk/models/payment_method_types.rb +2 -1
  54. data/lib/whop_sdk/models/plan.rb +54 -5
  55. data/lib/whop_sdk/models/plan_create_params.rb +99 -24
  56. data/lib/whop_sdk/models/plan_list_response.rb +57 -5
  57. data/lib/whop_sdk/models/plan_type.rb +1 -1
  58. data/lib/whop_sdk/models/plan_update_params.rb +97 -22
  59. data/lib/whop_sdk/models/product.rb +1 -1
  60. data/lib/whop_sdk/models/product_create_params.rb +6 -6
  61. data/lib/whop_sdk/models/product_list_item.rb +1 -1
  62. data/lib/whop_sdk/models/product_update_params.rb +57 -33
  63. data/lib/whop_sdk/models/promo_code.rb +3 -3
  64. data/lib/whop_sdk/models/promo_code_list_response.rb +3 -3
  65. data/lib/whop_sdk/models/transfer.rb +9 -1
  66. data/lib/whop_sdk/models/transfer_create_params.rb +9 -1
  67. data/lib/whop_sdk/models/transfer_list_response.rb +9 -1
  68. data/lib/whop_sdk/models.rb +14 -0
  69. data/lib/whop_sdk/resources/access_tokens.rb +46 -0
  70. data/lib/whop_sdk/resources/app_builds.rb +5 -3
  71. data/lib/whop_sdk/resources/apps.rb +4 -3
  72. data/lib/whop_sdk/resources/authorized_users.rb +2 -1
  73. data/lib/whop_sdk/resources/chat_channels.rb +9 -2
  74. data/lib/whop_sdk/resources/checkout_configurations.rb +8 -7
  75. data/lib/whop_sdk/resources/companies.rb +72 -1
  76. data/lib/whop_sdk/resources/course_chapters.rb +5 -3
  77. data/lib/whop_sdk/resources/course_lesson_interactions.rb +4 -3
  78. data/lib/whop_sdk/resources/course_lessons.rb +25 -7
  79. data/lib/whop_sdk/resources/course_students.rb +77 -0
  80. data/lib/whop_sdk/resources/courses.rb +24 -7
  81. data/lib/whop_sdk/resources/entries.rb +6 -3
  82. data/lib/whop_sdk/resources/experiences.rb +9 -7
  83. data/lib/whop_sdk/resources/forum_posts.rb +5 -4
  84. data/lib/whop_sdk/resources/forums.rb +3 -2
  85. data/lib/whop_sdk/resources/invoices.rb +22 -16
  86. data/lib/whop_sdk/resources/ledger_accounts.rb +6 -2
  87. data/lib/whop_sdk/resources/members.rb +6 -5
  88. data/lib/whop_sdk/resources/memberships.rb +10 -8
  89. data/lib/whop_sdk/resources/messages.rb +5 -4
  90. data/lib/whop_sdk/resources/payments.rb +7 -4
  91. data/lib/whop_sdk/resources/plans.rb +14 -8
  92. data/lib/whop_sdk/resources/products.rb +10 -8
  93. data/lib/whop_sdk/resources/promo_codes.rb +4 -2
  94. data/lib/whop_sdk/resources/reactions.rb +2 -1
  95. data/lib/whop_sdk/resources/reviews.rb +2 -1
  96. data/lib/whop_sdk/resources/shipments.rb +2 -1
  97. data/lib/whop_sdk/resources/support_channels.rb +2 -1
  98. data/lib/whop_sdk/resources/transfers.rb +5 -2
  99. data/lib/whop_sdk/resources/users.rb +9 -3
  100. data/lib/whop_sdk/version.rb +1 -1
  101. data/lib/whop_sdk.rb +14 -1
  102. data/manifest.yaml +1 -0
  103. data/rbi/whop_sdk/client.rbi +6 -0
  104. data/rbi/whop_sdk/internal/transport/base_client.rbi +5 -0
  105. data/rbi/whop_sdk/internal/transport/pooled_net_requester.rbi +6 -2
  106. data/rbi/whop_sdk/internal/type/base_model.rbi +8 -4
  107. data/rbi/whop_sdk/models/access_level.rbi +1 -1
  108. data/rbi/whop_sdk/models/access_pass_type.rbi +2 -1
  109. data/rbi/whop_sdk/models/access_token_create_params.rbi +126 -0
  110. data/rbi/whop_sdk/models/access_token_create_response.rbi +37 -0
  111. data/rbi/whop_sdk/models/app_build_create_params.rbi +80 -40
  112. data/rbi/whop_sdk/models/app_update_params.rbi +86 -37
  113. data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +196 -68
  114. data/rbi/whop_sdk/models/company.rbi +10 -0
  115. data/rbi/whop_sdk/models/company_create_params.rbi +67 -0
  116. data/rbi/whop_sdk/models/company_list_params.rbi +83 -0
  117. data/rbi/whop_sdk/models/company_list_response.rbi +235 -0
  118. data/rbi/whop_sdk/models/course.rbi +21 -3
  119. data/rbi/whop_sdk/models/course_create_params.rbi +126 -38
  120. data/rbi/whop_sdk/models/course_lesson_create_params.rbi +126 -0
  121. data/rbi/whop_sdk/models/course_lesson_list_response.rbi +68 -0
  122. data/rbi/whop_sdk/models/course_lesson_update_params.rbi +449 -111
  123. data/rbi/whop_sdk/models/course_list_response.rbi +21 -3
  124. data/rbi/whop_sdk/models/course_student_list_params.rbi +83 -0
  125. data/rbi/whop_sdk/models/course_student_list_response.rbi +142 -0
  126. data/rbi/whop_sdk/models/course_student_retrieve_params.rbi +30 -0
  127. data/rbi/whop_sdk/models/course_student_retrieve_response.rbi +250 -0
  128. data/rbi/whop_sdk/models/course_update_params.rbi +104 -38
  129. data/rbi/whop_sdk/models/course_visibilities.rbi +23 -0
  130. data/rbi/whop_sdk/models/embed_type.rbi +20 -0
  131. data/rbi/whop_sdk/models/entry.rbi +3 -3
  132. data/rbi/whop_sdk/models/entry_list_response.rbi +3 -3
  133. data/rbi/whop_sdk/models/experience.rbi +7 -9
  134. data/rbi/whop_sdk/models/experience_update_params.rbi +84 -38
  135. data/rbi/whop_sdk/models/forum_post.rbi +2 -2
  136. data/rbi/whop_sdk/models/forum_post_create_params.rbi +85 -32
  137. data/rbi/whop_sdk/models/forum_post_list_response.rbi +2 -2
  138. data/rbi/whop_sdk/models/forum_post_update_params.rbi +85 -32
  139. data/rbi/whop_sdk/models/global_affiliate_status.rbi +1 -1
  140. data/rbi/whop_sdk/models/invoice_create_params.rbi +60 -46
  141. data/rbi/whop_sdk/models/invoice_list_params.rbi +26 -71
  142. data/rbi/whop_sdk/models/lesson.rbi +68 -10
  143. data/rbi/whop_sdk/models/member_list_params.rbi +10 -10
  144. data/rbi/whop_sdk/models/member_list_response.rbi +6 -6
  145. data/rbi/whop_sdk/models/member_retrieve_response.rbi +6 -6
  146. data/rbi/whop_sdk/models/membership_list_params.rbi +8 -8
  147. data/rbi/whop_sdk/models/message.rbi +2 -2
  148. data/rbi/whop_sdk/models/message_create_params.rbi +85 -32
  149. data/rbi/whop_sdk/models/message_list_response.rbi +2 -2
  150. data/rbi/whop_sdk/models/message_update_params.rbi +85 -32
  151. data/rbi/whop_sdk/models/payment.rbi +13 -3
  152. data/rbi/whop_sdk/models/payment_list_response.rbi +13 -3
  153. data/rbi/whop_sdk/models/payment_method_types.rbi +3 -1
  154. data/rbi/whop_sdk/models/plan.rbi +88 -4
  155. data/rbi/whop_sdk/models/plan_create_params.rbi +176 -34
  156. data/rbi/whop_sdk/models/plan_list_response.rbi +100 -4
  157. data/rbi/whop_sdk/models/plan_type.rbi +1 -1
  158. data/rbi/whop_sdk/models/plan_update_params.rbi +174 -32
  159. data/rbi/whop_sdk/models/product.rbi +1 -1
  160. data/rbi/whop_sdk/models/product_create_params.rbi +6 -6
  161. data/rbi/whop_sdk/models/product_list_item.rbi +1 -1
  162. data/rbi/whop_sdk/models/product_update_params.rbi +87 -43
  163. data/rbi/whop_sdk/models/promo_code.rbi +3 -3
  164. data/rbi/whop_sdk/models/promo_code_list_response.rbi +3 -3
  165. data/rbi/whop_sdk/models/transfer.rbi +8 -0
  166. data/rbi/whop_sdk/models/transfer_create_params.rbi +8 -0
  167. data/rbi/whop_sdk/models/transfer_list_response.rbi +8 -0
  168. data/rbi/whop_sdk/models.rbi +14 -0
  169. data/rbi/whop_sdk/resources/access_tokens.rbi +41 -0
  170. data/rbi/whop_sdk/resources/app_builds.rbi +15 -3
  171. data/rbi/whop_sdk/resources/apps.rbi +13 -2
  172. data/rbi/whop_sdk/resources/authorized_users.rbi +5 -1
  173. data/rbi/whop_sdk/resources/chat_channels.rbi +8 -1
  174. data/rbi/whop_sdk/resources/checkout_configurations.rbi +11 -8
  175. data/rbi/whop_sdk/resources/companies.rbi +68 -1
  176. data/rbi/whop_sdk/resources/course_chapters.rbi +11 -2
  177. data/rbi/whop_sdk/resources/course_lesson_interactions.rbi +7 -3
  178. data/rbi/whop_sdk/resources/course_lessons.rbi +62 -4
  179. data/rbi/whop_sdk/resources/course_students.rbi +69 -0
  180. data/rbi/whop_sdk/resources/courses.rbi +50 -4
  181. data/rbi/whop_sdk/resources/entries.rbi +15 -3
  182. data/rbi/whop_sdk/resources/experiences.rbi +21 -3
  183. data/rbi/whop_sdk/resources/forum_posts.rbi +18 -3
  184. data/rbi/whop_sdk/resources/forums.rbi +6 -1
  185. data/rbi/whop_sdk/resources/invoices.rbi +38 -23
  186. data/rbi/whop_sdk/resources/ledger_accounts.rbi +7 -2
  187. data/rbi/whop_sdk/resources/members.rbi +9 -5
  188. data/rbi/whop_sdk/resources/memberships.rbi +16 -5
  189. data/rbi/whop_sdk/resources/messages.rbi +18 -3
  190. data/rbi/whop_sdk/resources/payments.rbi +16 -3
  191. data/rbi/whop_sdk/resources/plans.rbi +40 -5
  192. data/rbi/whop_sdk/resources/products.rbi +21 -7
  193. data/rbi/whop_sdk/resources/promo_codes.rbi +10 -2
  194. data/rbi/whop_sdk/resources/reactions.rbi +5 -1
  195. data/rbi/whop_sdk/resources/reviews.rbi +5 -1
  196. data/rbi/whop_sdk/resources/shipments.rbi +5 -1
  197. data/rbi/whop_sdk/resources/support_channels.rbi +5 -1
  198. data/rbi/whop_sdk/resources/transfers.rbi +8 -1
  199. data/rbi/whop_sdk/resources/users.rbi +13 -2
  200. data/sig/whop_sdk/client.rbs +4 -0
  201. data/sig/whop_sdk/internal/transport/base_client.rbs +2 -0
  202. data/sig/whop_sdk/internal/transport/pooled_net_requester.rbs +4 -1
  203. data/sig/whop_sdk/models/access_token_create_params.rbs +56 -0
  204. data/sig/whop_sdk/models/access_token_create_response.rbs +15 -0
  205. data/sig/whop_sdk/models/app_build_create_params.rbs +29 -10
  206. data/sig/whop_sdk/models/app_update_params.rbs +29 -10
  207. data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +72 -21
  208. data/sig/whop_sdk/models/company.rbs +5 -0
  209. data/sig/whop_sdk/models/company_create_params.rbs +41 -0
  210. data/sig/whop_sdk/models/company_list_params.rbs +51 -0
  211. data/sig/whop_sdk/models/company_list_response.rbs +109 -0
  212. data/sig/whop_sdk/models/course.rbs +13 -3
  213. data/sig/whop_sdk/models/course_create_params.rbs +49 -10
  214. data/sig/whop_sdk/models/course_lesson_create_params.rbs +46 -0
  215. data/sig/whop_sdk/models/course_lesson_list_response.rbs +25 -0
  216. data/sig/whop_sdk/models/course_lesson_update_params.rbs +162 -30
  217. data/sig/whop_sdk/models/course_list_response.rbs +13 -3
  218. data/sig/whop_sdk/models/course_student_list_params.rbs +51 -0
  219. data/sig/whop_sdk/models/course_student_list_response.rbs +64 -0
  220. data/sig/whop_sdk/models/course_student_retrieve_params.rbs +15 -0
  221. data/sig/whop_sdk/models/course_student_retrieve_response.rbs +106 -0
  222. data/sig/whop_sdk/models/course_update_params.rbs +40 -11
  223. data/sig/whop_sdk/models/course_visibilities.rbs +14 -0
  224. data/sig/whop_sdk/models/embed_type.rbs +14 -0
  225. data/sig/whop_sdk/models/experience_update_params.rbs +29 -10
  226. data/sig/whop_sdk/models/forum_post_create_params.rbs +29 -10
  227. data/sig/whop_sdk/models/forum_post_update_params.rbs +29 -10
  228. data/sig/whop_sdk/models/invoice_create_params.rbs +28 -18
  229. data/sig/whop_sdk/models/invoice_list_params.rbs +16 -33
  230. data/sig/whop_sdk/models/lesson.rbs +33 -8
  231. data/sig/whop_sdk/models/member_list_params.rbs +5 -5
  232. data/sig/whop_sdk/models/membership_list_params.rbs +5 -5
  233. data/sig/whop_sdk/models/message_create_params.rbs +29 -10
  234. data/sig/whop_sdk/models/message_update_params.rbs +29 -10
  235. data/sig/whop_sdk/models/payment.rbs +5 -0
  236. data/sig/whop_sdk/models/payment_list_response.rbs +5 -0
  237. data/sig/whop_sdk/models/payment_method_types.rbs +4 -2
  238. data/sig/whop_sdk/models/plan.rbs +32 -0
  239. data/sig/whop_sdk/models/plan_create_params.rbs +61 -10
  240. data/sig/whop_sdk/models/plan_list_response.rbs +32 -0
  241. data/sig/whop_sdk/models/plan_update_params.rbs +61 -10
  242. data/sig/whop_sdk/models/product_update_params.rbs +29 -10
  243. data/sig/whop_sdk/models/transfer.rbs +5 -0
  244. data/sig/whop_sdk/models/transfer_create_params.rbs +5 -0
  245. data/sig/whop_sdk/models/transfer_list_response.rbs +5 -0
  246. data/sig/whop_sdk/models.rbs +14 -0
  247. data/sig/whop_sdk/resources/access_tokens.rbs +15 -0
  248. data/sig/whop_sdk/resources/app_builds.rbs +1 -1
  249. data/sig/whop_sdk/resources/apps.rbs +1 -1
  250. data/sig/whop_sdk/resources/checkout_configurations.rbs +2 -2
  251. data/sig/whop_sdk/resources/companies.rbs +18 -0
  252. data/sig/whop_sdk/resources/course_lessons.rbs +10 -2
  253. data/sig/whop_sdk/resources/course_students.rbs +22 -0
  254. data/sig/whop_sdk/resources/courses.rbs +8 -2
  255. data/sig/whop_sdk/resources/experiences.rbs +1 -1
  256. data/sig/whop_sdk/resources/forum_posts.rbs +2 -2
  257. data/sig/whop_sdk/resources/invoices.rbs +8 -6
  258. data/sig/whop_sdk/resources/members.rbs +1 -1
  259. data/sig/whop_sdk/resources/memberships.rbs +1 -1
  260. data/sig/whop_sdk/resources/messages.rbs +2 -2
  261. data/sig/whop_sdk/resources/plans.rbs +4 -2
  262. data/sig/whop_sdk/resources/products.rbs +1 -1
  263. data/sig/whop_sdk/resources/transfers.rbs +1 -0
  264. metadata +41 -5
  265. data/lib/whop_sdk/models/invoice_create_response.rb +0 -27
  266. data/rbi/whop_sdk/models/invoice_create_response.rbi +0 -49
  267. data/sig/whop_sdk/models/invoice_create_response.rbs +0 -19
@@ -17,7 +17,16 @@ module WhopSDK
17
17
 
18
18
  # The attachments for this post
19
19
  sig do
20
- returns(T.nilable(T::Array[WhopSDK::ForumPostCreateParams::Attachment]))
20
+ returns(
21
+ T.nilable(
22
+ T::Array[
23
+ T.any(
24
+ WhopSDK::ForumPostCreateParams::Attachment::AttachmentInputWithDirectUploadID,
25
+ WhopSDK::ForumPostCreateParams::Attachment::AttachmentInputWithID
26
+ )
27
+ ]
28
+ )
29
+ )
21
30
  end
22
31
  attr_accessor :attachments
23
32
 
@@ -70,7 +79,12 @@ module WhopSDK
70
79
  experience_id: String,
71
80
  attachments:
72
81
  T.nilable(
73
- T::Array[WhopSDK::ForumPostCreateParams::Attachment::OrHash]
82
+ T::Array[
83
+ T.any(
84
+ WhopSDK::ForumPostCreateParams::Attachment::AttachmentInputWithDirectUploadID::OrHash,
85
+ WhopSDK::ForumPostCreateParams::Attachment::AttachmentInputWithID::OrHash
86
+ )
87
+ ]
74
88
  ),
75
89
  content: T.nilable(String),
76
90
  is_mention: T.nilable(T::Boolean),
@@ -118,7 +132,14 @@ module WhopSDK
118
132
  {
119
133
  experience_id: String,
120
134
  attachments:
121
- T.nilable(T::Array[WhopSDK::ForumPostCreateParams::Attachment]),
135
+ T.nilable(
136
+ T::Array[
137
+ T.any(
138
+ WhopSDK::ForumPostCreateParams::Attachment::AttachmentInputWithDirectUploadID,
139
+ WhopSDK::ForumPostCreateParams::Attachment::AttachmentInputWithID
140
+ )
141
+ ]
142
+ ),
122
143
  content: T.nilable(String),
123
144
  is_mention: T.nilable(T::Boolean),
124
145
  parent_id: T.nilable(String),
@@ -134,52 +155,84 @@ module WhopSDK
134
155
  def to_hash
135
156
  end
136
157
 
137
- class Attachment < WhopSDK::Internal::Type::BaseModel
138
- OrHash =
158
+ # Input for an attachment
159
+ module Attachment
160
+ extend WhopSDK::Internal::Type::Union
161
+
162
+ Variants =
139
163
  T.type_alias do
140
164
  T.any(
141
- WhopSDK::ForumPostCreateParams::Attachment,
142
- WhopSDK::Internal::AnyHash
165
+ WhopSDK::ForumPostCreateParams::Attachment::AttachmentInputWithDirectUploadID,
166
+ WhopSDK::ForumPostCreateParams::Attachment::AttachmentInputWithID
143
167
  )
144
168
  end
145
169
 
146
- # The ID of an existing attachment object. Use this when updating a resource and
147
- # keeping a subset of the attachments. Don't use this unless you know what you're
148
- # doing.
149
- sig { returns(T.nilable(String)) }
150
- attr_accessor :id
170
+ class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
171
+ OrHash =
172
+ T.type_alias do
173
+ T.any(
174
+ WhopSDK::ForumPostCreateParams::Attachment::AttachmentInputWithDirectUploadID,
175
+ WhopSDK::Internal::AnyHash
176
+ )
177
+ end
151
178
 
152
- # This ID should be used the first time you upload an attachment. It is the ID of
153
- # the direct upload that was created when uploading the file to S3 via the
154
- # mediaDirectUpload mutation.
155
- sig { returns(T.nilable(String)) }
156
- attr_accessor :direct_upload_id
179
+ # This ID should be used the first time you upload an attachment. It is the ID of
180
+ # the direct upload that was created when uploading the file to S3 via the
181
+ # mediaDirectUpload mutation.
182
+ sig { returns(String) }
183
+ attr_accessor :direct_upload_id
157
184
 
158
- # Input for an attachment
159
- sig do
160
- params(
161
- id: T.nilable(String),
162
- direct_upload_id: T.nilable(String)
163
- ).returns(T.attached_class)
185
+ # Input for an attachment
186
+ sig { params(direct_upload_id: String).returns(T.attached_class) }
187
+ def self.new(
188
+ # This ID should be used the first time you upload an attachment. It is the ID of
189
+ # the direct upload that was created when uploading the file to S3 via the
190
+ # mediaDirectUpload mutation.
191
+ direct_upload_id:
192
+ )
193
+ end
194
+
195
+ sig { override.returns({ direct_upload_id: String }) }
196
+ def to_hash
197
+ end
164
198
  end
165
- def self.new(
199
+
200
+ class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
201
+ OrHash =
202
+ T.type_alias do
203
+ T.any(
204
+ WhopSDK::ForumPostCreateParams::Attachment::AttachmentInputWithID,
205
+ WhopSDK::Internal::AnyHash
206
+ )
207
+ end
208
+
166
209
  # The ID of an existing attachment object. Use this when updating a resource and
167
210
  # keeping a subset of the attachments. Don't use this unless you know what you're
168
211
  # doing.
169
- id: nil,
170
- # This ID should be used the first time you upload an attachment. It is the ID of
171
- # the direct upload that was created when uploading the file to S3 via the
172
- # mediaDirectUpload mutation.
173
- direct_upload_id: nil
174
- )
212
+ sig { returns(String) }
213
+ attr_accessor :id
214
+
215
+ # Input for an attachment
216
+ sig { params(id: String).returns(T.attached_class) }
217
+ def self.new(
218
+ # The ID of an existing attachment object. Use this when updating a resource and
219
+ # keeping a subset of the attachments. Don't use this unless you know what you're
220
+ # doing.
221
+ id:
222
+ )
223
+ end
224
+
225
+ sig { override.returns({ id: String }) }
226
+ def to_hash
227
+ end
175
228
  end
176
229
 
177
230
  sig do
178
231
  override.returns(
179
- { id: T.nilable(String), direct_upload_id: T.nilable(String) }
232
+ T::Array[WhopSDK::ForumPostCreateParams::Attachment::Variants]
180
233
  )
181
234
  end
182
- def to_hash
235
+ def self.variants
183
236
  end
184
237
  end
185
238
 
@@ -11,7 +11,7 @@ module WhopSDK
11
11
  )
12
12
  end
13
13
 
14
- # The unique identifier for the entity
14
+ # The unique identifier of the resource.
15
15
  sig { returns(String) }
16
16
  attr_accessor :id
17
17
 
@@ -87,7 +87,7 @@ module WhopSDK
87
87
  ).returns(T.attached_class)
88
88
  end
89
89
  def self.new(
90
- # The unique identifier for the entity
90
+ # The unique identifier of the resource.
91
91
  id:,
92
92
  # The amount of comments on this post
93
93
  comment_count:,
@@ -13,7 +13,16 @@ module WhopSDK
13
13
 
14
14
  # The attachments for this post
15
15
  sig do
16
- returns(T.nilable(T::Array[WhopSDK::ForumPostUpdateParams::Attachment]))
16
+ returns(
17
+ T.nilable(
18
+ T::Array[
19
+ T.any(
20
+ WhopSDK::ForumPostUpdateParams::Attachment::AttachmentInputWithDirectUploadID,
21
+ WhopSDK::ForumPostUpdateParams::Attachment::AttachmentInputWithID
22
+ )
23
+ ]
24
+ )
25
+ )
17
26
  end
18
27
  attr_accessor :attachments
19
28
 
@@ -34,7 +43,12 @@ module WhopSDK
34
43
  params(
35
44
  attachments:
36
45
  T.nilable(
37
- T::Array[WhopSDK::ForumPostUpdateParams::Attachment::OrHash]
46
+ T::Array[
47
+ T.any(
48
+ WhopSDK::ForumPostUpdateParams::Attachment::AttachmentInputWithDirectUploadID::OrHash,
49
+ WhopSDK::ForumPostUpdateParams::Attachment::AttachmentInputWithID::OrHash
50
+ )
51
+ ]
38
52
  ),
39
53
  content: T.nilable(String),
40
54
  is_pinned: T.nilable(T::Boolean),
@@ -60,7 +74,14 @@ module WhopSDK
60
74
  override.returns(
61
75
  {
62
76
  attachments:
63
- T.nilable(T::Array[WhopSDK::ForumPostUpdateParams::Attachment]),
77
+ T.nilable(
78
+ T::Array[
79
+ T.any(
80
+ WhopSDK::ForumPostUpdateParams::Attachment::AttachmentInputWithDirectUploadID,
81
+ WhopSDK::ForumPostUpdateParams::Attachment::AttachmentInputWithID
82
+ )
83
+ ]
84
+ ),
64
85
  content: T.nilable(String),
65
86
  is_pinned: T.nilable(T::Boolean),
66
87
  title: T.nilable(String),
@@ -71,52 +92,84 @@ module WhopSDK
71
92
  def to_hash
72
93
  end
73
94
 
74
- class Attachment < WhopSDK::Internal::Type::BaseModel
75
- OrHash =
95
+ # Input for an attachment
96
+ module Attachment
97
+ extend WhopSDK::Internal::Type::Union
98
+
99
+ Variants =
76
100
  T.type_alias do
77
101
  T.any(
78
- WhopSDK::ForumPostUpdateParams::Attachment,
79
- WhopSDK::Internal::AnyHash
102
+ WhopSDK::ForumPostUpdateParams::Attachment::AttachmentInputWithDirectUploadID,
103
+ WhopSDK::ForumPostUpdateParams::Attachment::AttachmentInputWithID
80
104
  )
81
105
  end
82
106
 
83
- # The ID of an existing attachment object. Use this when updating a resource and
84
- # keeping a subset of the attachments. Don't use this unless you know what you're
85
- # doing.
86
- sig { returns(T.nilable(String)) }
87
- attr_accessor :id
107
+ class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
108
+ OrHash =
109
+ T.type_alias do
110
+ T.any(
111
+ WhopSDK::ForumPostUpdateParams::Attachment::AttachmentInputWithDirectUploadID,
112
+ WhopSDK::Internal::AnyHash
113
+ )
114
+ end
88
115
 
89
- # This ID should be used the first time you upload an attachment. It is the ID of
90
- # the direct upload that was created when uploading the file to S3 via the
91
- # mediaDirectUpload mutation.
92
- sig { returns(T.nilable(String)) }
93
- attr_accessor :direct_upload_id
116
+ # This ID should be used the first time you upload an attachment. It is the ID of
117
+ # the direct upload that was created when uploading the file to S3 via the
118
+ # mediaDirectUpload mutation.
119
+ sig { returns(String) }
120
+ attr_accessor :direct_upload_id
94
121
 
95
- # Input for an attachment
96
- sig do
97
- params(
98
- id: T.nilable(String),
99
- direct_upload_id: T.nilable(String)
100
- ).returns(T.attached_class)
122
+ # Input for an attachment
123
+ sig { params(direct_upload_id: String).returns(T.attached_class) }
124
+ def self.new(
125
+ # This ID should be used the first time you upload an attachment. It is the ID of
126
+ # the direct upload that was created when uploading the file to S3 via the
127
+ # mediaDirectUpload mutation.
128
+ direct_upload_id:
129
+ )
130
+ end
131
+
132
+ sig { override.returns({ direct_upload_id: String }) }
133
+ def to_hash
134
+ end
101
135
  end
102
- def self.new(
136
+
137
+ class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
138
+ OrHash =
139
+ T.type_alias do
140
+ T.any(
141
+ WhopSDK::ForumPostUpdateParams::Attachment::AttachmentInputWithID,
142
+ WhopSDK::Internal::AnyHash
143
+ )
144
+ end
145
+
103
146
  # The ID of an existing attachment object. Use this when updating a resource and
104
147
  # keeping a subset of the attachments. Don't use this unless you know what you're
105
148
  # doing.
106
- id: nil,
107
- # This ID should be used the first time you upload an attachment. It is the ID of
108
- # the direct upload that was created when uploading the file to S3 via the
109
- # mediaDirectUpload mutation.
110
- direct_upload_id: nil
111
- )
149
+ sig { returns(String) }
150
+ attr_accessor :id
151
+
152
+ # Input for an attachment
153
+ sig { params(id: String).returns(T.attached_class) }
154
+ def self.new(
155
+ # The ID of an existing attachment object. Use this when updating a resource and
156
+ # keeping a subset of the attachments. Don't use this unless you know what you're
157
+ # doing.
158
+ id:
159
+ )
160
+ end
161
+
162
+ sig { override.returns({ id: String }) }
163
+ def to_hash
164
+ end
112
165
  end
113
166
 
114
167
  sig do
115
168
  override.returns(
116
- { id: T.nilable(String), direct_upload_id: T.nilable(String) }
169
+ T::Array[WhopSDK::ForumPostUpdateParams::Attachment::Variants]
117
170
  )
118
171
  end
119
- def to_hash
172
+ def self.variants
120
173
  end
121
174
  end
122
175
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module WhopSDK
4
4
  module Models
5
- # The different statuses of the global affiliate program for an access pass.
5
+ # The different statuses of the global affiliate program for a product.
6
6
  module GlobalAffiliateStatus
7
7
  extend WhopSDK::Internal::Type::Enum
8
8
 
@@ -24,6 +24,12 @@ module WhopSDK
24
24
  sig { returns(Time) }
25
25
  attr_accessor :due_date
26
26
 
27
+ # The member ID to create this invoice for. Include this if you want to create an
28
+ # invoice for an existing member. If you do not have a member ID, you must provide
29
+ # an email_address and customer_name.
30
+ sig { returns(String) }
31
+ attr_accessor :member_id
32
+
27
33
  # The properties of the plan to create for this invoice.
28
34
  sig { returns(WhopSDK::InvoiceCreateParams::Plan) }
29
35
  attr_reader :plan
@@ -31,6 +37,16 @@ module WhopSDK
31
37
  sig { params(plan: WhopSDK::InvoiceCreateParams::Plan::OrHash).void }
32
38
  attr_writer :plan
33
39
 
40
+ # The properties of the product to create for this invoice. Include this if you
41
+ # want to create an invoice for a new product.
42
+ sig { returns(WhopSDK::InvoiceCreateParams::Product) }
43
+ attr_reader :product
44
+
45
+ sig do
46
+ params(product: WhopSDK::InvoiceCreateParams::Product::OrHash).void
47
+ end
48
+ attr_writer :product
49
+
34
50
  # Whether or not to charge the customer a buyer fee.
35
51
  sig { returns(T.nilable(T::Boolean)) }
36
52
  attr_accessor :charge_buyer_fee
@@ -41,37 +57,19 @@ module WhopSDK
41
57
  sig { returns(T.nilable(String)) }
42
58
  attr_accessor :customer_name
43
59
 
44
- # The email address to create this invoice for. This is required if you want to
45
- # create an invoice for a user who does not have a member of your company yet.
46
- sig { returns(T.nilable(String)) }
47
- attr_accessor :email_address
48
-
49
- # The member ID to create this invoice for. Include this if you want to create an
50
- # invoice for an existing member. If you do not have a member ID, you must provide
51
- # an email_address and customer_name.
52
- sig { returns(T.nilable(String)) }
53
- attr_accessor :member_id
54
-
55
60
  # The payment token ID to use for this invoice. If using charge_automatically, you
56
61
  # must provide a payment_token.
57
62
  sig { returns(T.nilable(String)) }
58
63
  attr_accessor :payment_token_id
59
64
 
60
- # The properties of the product to create for this invoice. Include this if you
61
- # want to create an invoice for a new product.
62
- sig { returns(T.nilable(WhopSDK::InvoiceCreateParams::Product)) }
63
- attr_reader :product
64
-
65
- sig do
66
- params(
67
- product: T.nilable(WhopSDK::InvoiceCreateParams::Product::OrHash)
68
- ).void
69
- end
70
- attr_writer :product
65
+ # The email address to create this invoice for. This is required if you want to
66
+ # create an invoice for a user who does not have a member of your company yet.
67
+ sig { returns(String) }
68
+ attr_accessor :email_address
71
69
 
72
70
  # The product ID to create this invoice for. Include this if you want to create an
73
71
  # invoice for an existing product.
74
- sig { returns(T.nilable(String)) }
72
+ sig { returns(String) }
75
73
  attr_accessor :product_id
76
74
 
77
75
  sig do
@@ -79,14 +77,14 @@ module WhopSDK
79
77
  collection_method: WhopSDK::CollectionMethod::OrSymbol,
80
78
  company_id: String,
81
79
  due_date: Time,
80
+ member_id: String,
82
81
  plan: WhopSDK::InvoiceCreateParams::Plan::OrHash,
82
+ product: WhopSDK::InvoiceCreateParams::Product::OrHash,
83
+ email_address: String,
84
+ product_id: String,
83
85
  charge_buyer_fee: T.nilable(T::Boolean),
84
86
  customer_name: T.nilable(String),
85
- email_address: T.nilable(String),
86
- member_id: T.nilable(String),
87
87
  payment_token_id: T.nilable(String),
88
- product: T.nilable(WhopSDK::InvoiceCreateParams::Product::OrHash),
89
- product_id: T.nilable(String),
90
88
  request_options: WhopSDK::RequestOptions::OrHash
91
89
  ).returns(T.attached_class)
92
90
  end
@@ -98,30 +96,30 @@ module WhopSDK
98
96
  company_id:,
99
97
  # The date the invoice is due, if applicable.
100
98
  due_date:,
99
+ # The member ID to create this invoice for. Include this if you want to create an
100
+ # invoice for an existing member. If you do not have a member ID, you must provide
101
+ # an email_address and customer_name.
102
+ member_id:,
101
103
  # The properties of the plan to create for this invoice.
102
104
  plan:,
105
+ # The properties of the product to create for this invoice. Include this if you
106
+ # want to create an invoice for a new product.
107
+ product:,
108
+ # The email address to create this invoice for. This is required if you want to
109
+ # create an invoice for a user who does not have a member of your company yet.
110
+ email_address:,
111
+ # The product ID to create this invoice for. Include this if you want to create an
112
+ # invoice for an existing product.
113
+ product_id:,
103
114
  # Whether or not to charge the customer a buyer fee.
104
115
  charge_buyer_fee: nil,
105
116
  # The name of the customer to create this invoice for. This is required if you
106
117
  # want to create an invoice for a customer who does not have a member of your
107
118
  # company yet.
108
119
  customer_name: nil,
109
- # The email address to create this invoice for. This is required if you want to
110
- # create an invoice for a user who does not have a member of your company yet.
111
- email_address: nil,
112
- # The member ID to create this invoice for. Include this if you want to create an
113
- # invoice for an existing member. If you do not have a member ID, you must provide
114
- # an email_address and customer_name.
115
- member_id: nil,
116
120
  # The payment token ID to use for this invoice. If using charge_automatically, you
117
121
  # must provide a payment_token.
118
122
  payment_token_id: nil,
119
- # The properties of the product to create for this invoice. Include this if you
120
- # want to create an invoice for a new product.
121
- product: nil,
122
- # The product ID to create this invoice for. Include this if you want to create an
123
- # invoice for an existing product.
124
- product_id: nil,
125
123
  request_options: {}
126
124
  )
127
125
  end
@@ -132,14 +130,14 @@ module WhopSDK
132
130
  collection_method: WhopSDK::CollectionMethod::OrSymbol,
133
131
  company_id: String,
134
132
  due_date: Time,
133
+ member_id: String,
135
134
  plan: WhopSDK::InvoiceCreateParams::Plan,
135
+ product: WhopSDK::InvoiceCreateParams::Product,
136
136
  charge_buyer_fee: T.nilable(T::Boolean),
137
137
  customer_name: T.nilable(String),
138
- email_address: T.nilable(String),
139
- member_id: T.nilable(String),
140
138
  payment_token_id: T.nilable(String),
141
- product: T.nilable(WhopSDK::InvoiceCreateParams::Product),
142
- product_id: T.nilable(String),
139
+ email_address: String,
140
+ product_id: String,
143
141
  request_options: WhopSDK::RequestOptions
144
142
  }
145
143
  )
@@ -186,7 +184,7 @@ module WhopSDK
186
184
  sig { returns(T.nilable(String)) }
187
185
  attr_accessor :internal_notes
188
186
 
189
- # The type of plan that can be attached to an access pass
187
+ # The type of plan that can be attached to a product
190
188
  sig { returns(T.nilable(WhopSDK::PlanType::OrSymbol)) }
191
189
  attr_accessor :plan_type
192
190
 
@@ -199,10 +197,18 @@ module WhopSDK
199
197
  sig { returns(T.nilable(Float)) }
200
198
  attr_accessor :renewal_price
201
199
 
200
+ # The number of units available for purchase.
201
+ sig { returns(T.nilable(Integer)) }
202
+ attr_accessor :stock
203
+
202
204
  # The number of free trial days added before a renewal plan.
203
205
  sig { returns(T.nilable(Integer)) }
204
206
  attr_accessor :trial_period_days
205
207
 
208
+ # Limits/doesn't limit the number of units available for purchase.
209
+ sig { returns(T.nilable(T::Boolean)) }
210
+ attr_accessor :unlimited_stock
211
+
206
212
  # Visibility of a resource
207
213
  sig { returns(T.nilable(WhopSDK::Visibility::OrSymbol)) }
208
214
  attr_accessor :visibility
@@ -224,7 +230,9 @@ module WhopSDK
224
230
  plan_type: T.nilable(WhopSDK::PlanType::OrSymbol),
225
231
  release_method: T.nilable(WhopSDK::ReleaseMethod::OrSymbol),
226
232
  renewal_price: T.nilable(Float),
233
+ stock: T.nilable(Integer),
227
234
  trial_period_days: T.nilable(Integer),
235
+ unlimited_stock: T.nilable(T::Boolean),
228
236
  visibility: T.nilable(WhopSDK::Visibility::OrSymbol)
229
237
  ).returns(T.attached_class)
230
238
  end
@@ -243,15 +251,19 @@ module WhopSDK
243
251
  initial_price: nil,
244
252
  # A personal description or notes section for the business.
245
253
  internal_notes: nil,
246
- # The type of plan that can be attached to an access pass
254
+ # The type of plan that can be attached to a product
247
255
  plan_type: nil,
248
256
  # The methods of how a plan can be released.
249
257
  release_method: nil,
250
258
  # The amount the customer is charged every billing period. Use only if a recurring
251
259
  # payment. Provided as a number in dollars. Eg: 10.43 for $10.43
252
260
  renewal_price: nil,
261
+ # The number of units available for purchase.
262
+ stock: nil,
253
263
  # The number of free trial days added before a renewal plan.
254
264
  trial_period_days: nil,
265
+ # Limits/doesn't limit the number of units available for purchase.
266
+ unlimited_stock: nil,
255
267
  # Visibility of a resource
256
268
  visibility: nil
257
269
  )
@@ -272,7 +284,9 @@ module WhopSDK
272
284
  plan_type: T.nilable(WhopSDK::PlanType::OrSymbol),
273
285
  release_method: T.nilable(WhopSDK::ReleaseMethod::OrSymbol),
274
286
  renewal_price: T.nilable(Float),
287
+ stock: T.nilable(Integer),
275
288
  trial_period_days: T.nilable(Integer),
289
+ unlimited_stock: T.nilable(T::Boolean),
276
290
  visibility: T.nilable(WhopSDK::Visibility::OrSymbol)
277
291
  }
278
292
  )