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
@@ -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
@@ -32,6 +32,10 @@ module WhopSDK
32
32
  sig { returns(WhopSDK::Languages::TaggedSymbol) }
33
33
  attr_accessor :language
34
34
 
35
+ # The order of the course within its experience
36
+ sig { returns(String) }
37
+ attr_accessor :order
38
+
35
39
  # Whether the course requires students to complete the previous lesson before
36
40
  # moving on to the next one
37
41
  sig { returns(T::Boolean) }
@@ -58,6 +62,11 @@ module WhopSDK
58
62
  sig { returns(Time) }
59
63
  attr_accessor :updated_at
60
64
 
65
+ # The visibility of the course. Determines how / whether this course is visible to
66
+ # users.
67
+ sig { returns(WhopSDK::CourseVisibilities::TaggedSymbol) }
68
+ attr_accessor :visibility
69
+
61
70
  # A course from the courses app
62
71
  sig do
63
72
  params(
@@ -67,11 +76,13 @@ module WhopSDK
67
76
  created_at: Time,
68
77
  description: T.nilable(String),
69
78
  language: WhopSDK::Languages::OrSymbol,
79
+ order: String,
70
80
  require_completing_lessons_in_order: T::Boolean,
71
81
  tagline: T.nilable(String),
72
82
  thumbnail: T.nilable(WhopSDK::Course::Thumbnail::OrHash),
73
83
  title: T.nilable(String),
74
- updated_at: Time
84
+ updated_at: Time,
85
+ visibility: WhopSDK::CourseVisibilities::OrSymbol
75
86
  ).returns(T.attached_class)
76
87
  end
77
88
  def self.new(
@@ -89,6 +100,8 @@ module WhopSDK
89
100
  # The language spoken in the video content of the course, used to generate closed
90
101
  # captions in the right language
91
102
  language:,
103
+ # The order of the course within its experience
104
+ order:,
92
105
  # Whether the course requires students to complete the previous lesson before
93
106
  # moving on to the next one
94
107
  require_completing_lessons_in_order:,
@@ -99,7 +112,10 @@ module WhopSDK
99
112
  # The title of the course
100
113
  title:,
101
114
  # The timestamp of when the course was last updated
102
- updated_at:
115
+ updated_at:,
116
+ # The visibility of the course. Determines how / whether this course is visible to
117
+ # users.
118
+ visibility:
103
119
  )
104
120
  end
105
121
 
@@ -112,11 +128,13 @@ module WhopSDK
112
128
  created_at: Time,
113
129
  description: T.nilable(String),
114
130
  language: WhopSDK::Languages::TaggedSymbol,
131
+ order: String,
115
132
  require_completing_lessons_in_order: T::Boolean,
116
133
  tagline: T.nilable(String),
117
134
  thumbnail: T.nilable(WhopSDK::Course::Thumbnail),
118
135
  title: T.nilable(String),
119
- updated_at: Time
136
+ updated_at: Time,
137
+ visibility: WhopSDK::CourseVisibilities::TaggedSymbol
120
138
  }
121
139
  )
122
140
  end
@@ -19,32 +19,65 @@ 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
+ # The decimal order position of the course within its experience. If not provided,
32
+ # it will be set to the next sequential order. Use fractional values (e.g., 1.5)
33
+ # to place between existing courses.
34
+ sig { returns(T.nilable(String)) }
35
+ attr_accessor :order
36
+
37
+ # Whether the course requires students to complete the previous lesson before
38
+ # moving on to the next one
39
+ sig { returns(T.nilable(T::Boolean)) }
40
+ attr_accessor :require_completing_lessons_in_order
41
+
26
42
  # The tagline of the course
27
43
  sig { returns(T.nilable(String)) }
28
44
  attr_accessor :tagline
29
45
 
30
46
  # 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
47
  sig do
35
- params(
36
- thumbnail: T.nilable(WhopSDK::CourseCreateParams::Thumbnail::OrHash)
37
- ).void
48
+ returns(
49
+ T.nilable(
50
+ T.any(
51
+ WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithDirectUploadID,
52
+ WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithID
53
+ )
54
+ )
55
+ )
38
56
  end
39
- attr_writer :thumbnail
57
+ attr_accessor :thumbnail
58
+
59
+ # The available visibilities for a course. Determines how / whether a course is
60
+ # visible to users.
61
+ sig { returns(T.nilable(WhopSDK::CourseVisibilities::OrSymbol)) }
62
+ attr_accessor :visibility
40
63
 
41
64
  sig do
42
65
  params(
43
66
  experience_id: String,
44
67
  title: String,
68
+ certificate_after_completion_enabled: T.nilable(T::Boolean),
45
69
  cover_image: T.nilable(String),
70
+ order: T.nilable(String),
71
+ require_completing_lessons_in_order: T.nilable(T::Boolean),
46
72
  tagline: T.nilable(String),
47
- thumbnail: T.nilable(WhopSDK::CourseCreateParams::Thumbnail::OrHash),
73
+ thumbnail:
74
+ T.nilable(
75
+ T.any(
76
+ WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithDirectUploadID::OrHash,
77
+ WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithID::OrHash
78
+ )
79
+ ),
80
+ visibility: T.nilable(WhopSDK::CourseVisibilities::OrSymbol),
48
81
  request_options: WhopSDK::RequestOptions::OrHash
49
82
  ).returns(T.attached_class)
50
83
  end
@@ -53,12 +86,25 @@ module WhopSDK
53
86
  experience_id:,
54
87
  # The title of the course
55
88
  title:,
89
+ # Whether the course will award its students a PDF certificate after completing
90
+ # all lessons
91
+ certificate_after_completion_enabled: nil,
56
92
  # The cover image URL of the course
57
93
  cover_image: nil,
94
+ # The decimal order position of the course within its experience. If not provided,
95
+ # it will be set to the next sequential order. Use fractional values (e.g., 1.5)
96
+ # to place between existing courses.
97
+ order: nil,
98
+ # Whether the course requires students to complete the previous lesson before
99
+ # moving on to the next one
100
+ require_completing_lessons_in_order: nil,
58
101
  # The tagline of the course
59
102
  tagline: nil,
60
103
  # The thumbnail for the course in png, jpeg, or gif format
61
104
  thumbnail: nil,
105
+ # The available visibilities for a course. Determines how / whether a course is
106
+ # visible to users.
107
+ visibility: nil,
62
108
  request_options: {}
63
109
  )
64
110
  end
@@ -68,9 +114,19 @@ module WhopSDK
68
114
  {
69
115
  experience_id: String,
70
116
  title: String,
117
+ certificate_after_completion_enabled: T.nilable(T::Boolean),
71
118
  cover_image: T.nilable(String),
119
+ order: T.nilable(String),
120
+ require_completing_lessons_in_order: T.nilable(T::Boolean),
72
121
  tagline: T.nilable(String),
73
- thumbnail: T.nilable(WhopSDK::CourseCreateParams::Thumbnail),
122
+ thumbnail:
123
+ T.nilable(
124
+ T.any(
125
+ WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithDirectUploadID,
126
+ WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithID
127
+ )
128
+ ),
129
+ visibility: T.nilable(WhopSDK::CourseVisibilities::OrSymbol),
74
130
  request_options: WhopSDK::RequestOptions
75
131
  }
76
132
  )
@@ -78,52 +134,84 @@ module WhopSDK
78
134
  def to_hash
79
135
  end
80
136
 
81
- class Thumbnail < WhopSDK::Internal::Type::BaseModel
82
- OrHash =
137
+ # The thumbnail for the course in png, jpeg, or gif format
138
+ module Thumbnail
139
+ extend WhopSDK::Internal::Type::Union
140
+
141
+ Variants =
83
142
  T.type_alias do
84
143
  T.any(
85
- WhopSDK::CourseCreateParams::Thumbnail,
86
- WhopSDK::Internal::AnyHash
144
+ WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithDirectUploadID,
145
+ WhopSDK::CourseCreateParams::Thumbnail::AttachmentInputWithID
87
146
  )
88
147
  end
89
148
 
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
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
95
157
 
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
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
101
163
 
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)
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
173
+
174
+ sig { override.returns({ direct_upload_id: String }) }
175
+ def to_hash
176
+ end
108
177
  end
109
- def self.new(
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
+
110
188
  # The ID of an existing attachment object. Use this when updating a resource and
111
189
  # keeping a subset of the attachments. Don't use this unless you know what you're
112
190
  # 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
- )
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
119
207
  end
120
208
 
121
209
  sig do
122
210
  override.returns(
123
- { id: T.nilable(String), direct_upload_id: T.nilable(String) }
211
+ T::Array[WhopSDK::CourseCreateParams::Thumbnail::Variants]
124
212
  )
125
213
  end
126
- def to_hash
214
+ def self.variants
127
215
  end
128
216
  end
129
217
  end
@@ -27,6 +27,27 @@ module WhopSDK
27
27
  sig { returns(T.nilable(Integer)) }
28
28
  attr_accessor :days_from_course_start_until_unlock
29
29
 
30
+ # ID for the embed (YouTube video ID or Loom share ID)
31
+ sig { returns(T.nilable(String)) }
32
+ attr_accessor :embed_id
33
+
34
+ # The type of embed for a lesson
35
+ sig { returns(T.nilable(WhopSDK::EmbedType::OrSymbol)) }
36
+ attr_accessor :embed_type
37
+
38
+ # The thumbnail for the lesson in png, jpeg, or gif format
39
+ sig do
40
+ returns(
41
+ T.nilable(
42
+ T.any(
43
+ WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithDirectUploadID,
44
+ WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithID
45
+ )
46
+ )
47
+ )
48
+ end
49
+ attr_accessor :thumbnail
50
+
30
51
  # The title of the lesson
31
52
  sig { returns(T.nilable(String)) }
32
53
  attr_accessor :title
@@ -37,6 +58,15 @@ module WhopSDK
37
58
  lesson_type: WhopSDK::LessonTypes::OrSymbol,
38
59
  content: T.nilable(String),
39
60
  days_from_course_start_until_unlock: T.nilable(Integer),
61
+ embed_id: T.nilable(String),
62
+ embed_type: T.nilable(WhopSDK::EmbedType::OrSymbol),
63
+ thumbnail:
64
+ T.nilable(
65
+ T.any(
66
+ WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithDirectUploadID::OrHash,
67
+ WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithID::OrHash
68
+ )
69
+ ),
40
70
  title: T.nilable(String),
41
71
  request_options: WhopSDK::RequestOptions::OrHash
42
72
  ).returns(T.attached_class)
@@ -50,6 +80,12 @@ module WhopSDK
50
80
  content: nil,
51
81
  # Days from course start until unlock
52
82
  days_from_course_start_until_unlock: nil,
83
+ # ID for the embed (YouTube video ID or Loom share ID)
84
+ embed_id: nil,
85
+ # The type of embed for a lesson
86
+ embed_type: nil,
87
+ # The thumbnail for the lesson in png, jpeg, or gif format
88
+ thumbnail: nil,
53
89
  # The title of the lesson
54
90
  title: nil,
55
91
  request_options: {}
@@ -63,6 +99,15 @@ module WhopSDK
63
99
  lesson_type: WhopSDK::LessonTypes::OrSymbol,
64
100
  content: T.nilable(String),
65
101
  days_from_course_start_until_unlock: T.nilable(Integer),
102
+ embed_id: T.nilable(String),
103
+ embed_type: T.nilable(WhopSDK::EmbedType::OrSymbol),
104
+ thumbnail:
105
+ T.nilable(
106
+ T.any(
107
+ WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithDirectUploadID,
108
+ WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithID
109
+ )
110
+ ),
66
111
  title: T.nilable(String),
67
112
  request_options: WhopSDK::RequestOptions
68
113
  }
@@ -70,6 +115,87 @@ module WhopSDK
70
115
  end
71
116
  def to_hash
72
117
  end
118
+
119
+ # The thumbnail for the lesson in png, jpeg, or gif format
120
+ module Thumbnail
121
+ extend WhopSDK::Internal::Type::Union
122
+
123
+ Variants =
124
+ T.type_alias do
125
+ T.any(
126
+ WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithDirectUploadID,
127
+ WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithID
128
+ )
129
+ end
130
+
131
+ class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
132
+ OrHash =
133
+ T.type_alias do
134
+ T.any(
135
+ WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithDirectUploadID,
136
+ WhopSDK::Internal::AnyHash
137
+ )
138
+ end
139
+
140
+ # This ID should be used the first time you upload an attachment. It is the ID of
141
+ # the direct upload that was created when uploading the file to S3 via the
142
+ # mediaDirectUpload mutation.
143
+ sig { returns(String) }
144
+ attr_accessor :direct_upload_id
145
+
146
+ # Input for an attachment
147
+ sig { params(direct_upload_id: String).returns(T.attached_class) }
148
+ def self.new(
149
+ # This ID should be used the first time you upload an attachment. It is the ID of
150
+ # the direct upload that was created when uploading the file to S3 via the
151
+ # mediaDirectUpload mutation.
152
+ direct_upload_id:
153
+ )
154
+ end
155
+
156
+ sig { override.returns({ direct_upload_id: String }) }
157
+ def to_hash
158
+ end
159
+ end
160
+
161
+ class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
162
+ OrHash =
163
+ T.type_alias do
164
+ T.any(
165
+ WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithID,
166
+ WhopSDK::Internal::AnyHash
167
+ )
168
+ end
169
+
170
+ # The ID of an existing attachment object. Use this when updating a resource and
171
+ # keeping a subset of the attachments. Don't use this unless you know what you're
172
+ # doing.
173
+ sig { returns(String) }
174
+ attr_accessor :id
175
+
176
+ # Input for an attachment
177
+ sig { params(id: String).returns(T.attached_class) }
178
+ def self.new(
179
+ # The ID of an existing attachment object. Use this when updating a resource and
180
+ # keeping a subset of the attachments. Don't use this unless you know what you're
181
+ # doing.
182
+ id:
183
+ )
184
+ end
185
+
186
+ sig { override.returns({ id: String }) }
187
+ def to_hash
188
+ end
189
+ end
190
+
191
+ sig do
192
+ override.returns(
193
+ T::Array[WhopSDK::CourseLessonCreateParams::Thumbnail::Variants]
194
+ )
195
+ end
196
+ def self.variants
197
+ end
198
+ end
73
199
  end
74
200
  end
75
201
  end