whop_sdk 0.0.4 → 0.0.6

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 (233) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +40 -0
  3. data/README.md +4 -7
  4. data/lib/whop_sdk/client.rb +21 -6
  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/checkout_configuration_create_params.rb +4 -4
  12. data/lib/whop_sdk/models/company.rb +1 -0
  13. data/lib/whop_sdk/models/course.rb +18 -1
  14. data/lib/whop_sdk/models/course_create_params.rb +20 -1
  15. data/lib/whop_sdk/models/course_lesson_create_params.rb +77 -1
  16. data/lib/whop_sdk/models/course_lesson_list_response.rb +43 -1
  17. data/lib/whop_sdk/models/course_lesson_update_params.rb +77 -1
  18. data/lib/whop_sdk/models/course_list_response.rb +18 -1
  19. data/lib/whop_sdk/models/course_update_params.rb +19 -1
  20. data/lib/whop_sdk/models/course_visibilities.rb +17 -0
  21. data/lib/whop_sdk/models/dispute.rb +672 -0
  22. data/lib/whop_sdk/models/dispute_created_webhook_event.rb +48 -0
  23. data/lib/whop_sdk/models/dispute_list_params.rb +62 -0
  24. data/lib/whop_sdk/models/dispute_list_response.rb +187 -0
  25. data/lib/whop_sdk/models/dispute_retrieve_params.rb +14 -0
  26. data/lib/whop_sdk/models/dispute_statuses.rb +23 -0
  27. data/lib/whop_sdk/models/dispute_submit_evidence_params.rb +14 -0
  28. data/lib/whop_sdk/models/dispute_update_evidence_params.rb +342 -0
  29. data/lib/whop_sdk/models/dispute_updated_webhook_event.rb +48 -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/forum_post.rb +2 -2
  35. data/lib/whop_sdk/models/forum_post_list_response.rb +2 -2
  36. data/lib/whop_sdk/models/global_affiliate_status.rb +1 -1
  37. data/lib/whop_sdk/models/invoice_create_params.rb +2 -2
  38. data/lib/whop_sdk/models/invoice_list_params.rb +27 -40
  39. data/lib/whop_sdk/models/lesson.rb +43 -1
  40. data/lib/whop_sdk/models/member_list_params.rb +11 -11
  41. data/lib/whop_sdk/models/member_list_response.rb +3 -3
  42. data/lib/whop_sdk/models/member_retrieve_response.rb +3 -3
  43. data/lib/whop_sdk/models/membership_list_params.rb +9 -9
  44. data/lib/whop_sdk/models/message.rb +2 -2
  45. data/lib/whop_sdk/models/message_list_response.rb +2 -2
  46. data/lib/whop_sdk/models/notification_create_params.rb +88 -0
  47. data/lib/whop_sdk/models/notification_create_response.rb +19 -0
  48. data/lib/whop_sdk/models/payment.rb +3 -3
  49. data/lib/whop_sdk/models/payment_list_response.rb +3 -3
  50. data/lib/whop_sdk/models/plan.rb +6 -4
  51. data/lib/whop_sdk/models/plan_create_params.rb +2 -2
  52. data/lib/whop_sdk/models/plan_list_response.rb +6 -4
  53. data/lib/whop_sdk/models/plan_type.rb +1 -1
  54. data/lib/whop_sdk/models/product.rb +1 -1
  55. data/lib/whop_sdk/models/product_create_params.rb +6 -6
  56. data/lib/whop_sdk/models/product_list_item.rb +1 -1
  57. data/lib/whop_sdk/models/product_update_params.rb +4 -4
  58. data/lib/whop_sdk/models/promo_code.rb +3 -3
  59. data/lib/whop_sdk/models/promo_code_list_response.rb +3 -3
  60. data/lib/whop_sdk/models/unwrap_webhook_event.rb +5 -1
  61. data/lib/whop_sdk/models.rb +24 -0
  62. data/lib/whop_sdk/resources/access_tokens.rb +46 -0
  63. data/lib/whop_sdk/resources/app_builds.rb +4 -2
  64. data/lib/whop_sdk/resources/apps.rb +3 -2
  65. data/lib/whop_sdk/resources/authorized_users.rb +2 -1
  66. data/lib/whop_sdk/resources/chat_channels.rb +9 -2
  67. data/lib/whop_sdk/resources/checkout_configurations.rb +2 -1
  68. data/lib/whop_sdk/resources/companies.rb +2 -1
  69. data/lib/whop_sdk/resources/course_chapters.rb +5 -3
  70. data/lib/whop_sdk/resources/course_lesson_interactions.rb +2 -1
  71. data/lib/whop_sdk/resources/course_lessons.rb +19 -5
  72. data/lib/whop_sdk/resources/course_students.rb +2 -1
  73. data/lib/whop_sdk/resources/courses.rb +15 -5
  74. data/lib/whop_sdk/resources/disputes.rb +182 -0
  75. data/lib/whop_sdk/resources/entries.rb +6 -3
  76. data/lib/whop_sdk/resources/experiences.rb +8 -6
  77. data/lib/whop_sdk/resources/forum_posts.rb +3 -2
  78. data/lib/whop_sdk/resources/forums.rb +3 -2
  79. data/lib/whop_sdk/resources/invoices.rb +11 -5
  80. data/lib/whop_sdk/resources/ledger_accounts.rb +6 -2
  81. data/lib/whop_sdk/resources/members.rb +6 -5
  82. data/lib/whop_sdk/resources/memberships.rb +10 -8
  83. data/lib/whop_sdk/resources/messages.rb +3 -2
  84. data/lib/whop_sdk/resources/notifications.rb +53 -0
  85. data/lib/whop_sdk/resources/payments.rb +7 -4
  86. data/lib/whop_sdk/resources/plans.rb +6 -4
  87. data/lib/whop_sdk/resources/products.rb +9 -7
  88. data/lib/whop_sdk/resources/promo_codes.rb +4 -2
  89. data/lib/whop_sdk/resources/reactions.rb +2 -1
  90. data/lib/whop_sdk/resources/reviews.rb +2 -1
  91. data/lib/whop_sdk/resources/shipments.rb +2 -1
  92. data/lib/whop_sdk/resources/support_channels.rb +2 -1
  93. data/lib/whop_sdk/resources/transfers.rb +2 -1
  94. data/lib/whop_sdk/resources/users.rb +9 -3
  95. data/lib/whop_sdk/resources/webhooks.rb +1 -1
  96. data/lib/whop_sdk/version.rb +1 -1
  97. data/lib/whop_sdk.rb +19 -0
  98. data/manifest.yaml +1 -0
  99. data/rbi/whop_sdk/client.rbi +14 -2
  100. data/rbi/whop_sdk/internal/transport/base_client.rbi +5 -0
  101. data/rbi/whop_sdk/internal/transport/pooled_net_requester.rbi +6 -2
  102. data/rbi/whop_sdk/internal/type/base_model.rbi +8 -4
  103. data/rbi/whop_sdk/models/access_level.rbi +1 -1
  104. data/rbi/whop_sdk/models/access_pass_type.rbi +2 -1
  105. data/rbi/whop_sdk/models/access_token_create_params.rbi +126 -0
  106. data/rbi/whop_sdk/models/access_token_create_response.rbi +37 -0
  107. data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +4 -4
  108. data/rbi/whop_sdk/models/company.rbi +2 -0
  109. data/rbi/whop_sdk/models/course.rbi +21 -3
  110. data/rbi/whop_sdk/models/course_create_params.rbi +22 -0
  111. data/rbi/whop_sdk/models/course_lesson_create_params.rbi +126 -0
  112. data/rbi/whop_sdk/models/course_lesson_list_response.rbi +68 -0
  113. data/rbi/whop_sdk/models/course_lesson_update_params.rbi +126 -0
  114. data/rbi/whop_sdk/models/course_list_response.rbi +21 -3
  115. data/rbi/whop_sdk/models/course_update_params.rbi +20 -0
  116. data/rbi/whop_sdk/models/course_visibilities.rbi +23 -0
  117. data/rbi/whop_sdk/models/dispute.rbi +938 -0
  118. data/rbi/whop_sdk/models/dispute_created_webhook_event.rbi +72 -0
  119. data/rbi/whop_sdk/models/dispute_list_params.rbi +83 -0
  120. data/rbi/whop_sdk/models/dispute_list_response.rbi +287 -0
  121. data/rbi/whop_sdk/models/dispute_retrieve_params.rbi +27 -0
  122. data/rbi/whop_sdk/models/dispute_statuses.rbi +32 -0
  123. data/rbi/whop_sdk/models/dispute_submit_evidence_params.rbi +30 -0
  124. data/rbi/whop_sdk/models/dispute_update_evidence_params.rbi +566 -0
  125. data/rbi/whop_sdk/models/dispute_updated_webhook_event.rbi +72 -0
  126. data/rbi/whop_sdk/models/embed_type.rbi +20 -0
  127. data/rbi/whop_sdk/models/entry.rbi +3 -3
  128. data/rbi/whop_sdk/models/entry_list_response.rbi +3 -3
  129. data/rbi/whop_sdk/models/experience.rbi +7 -9
  130. data/rbi/whop_sdk/models/forum_post.rbi +2 -2
  131. data/rbi/whop_sdk/models/forum_post_list_response.rbi +2 -2
  132. data/rbi/whop_sdk/models/global_affiliate_status.rbi +1 -1
  133. data/rbi/whop_sdk/models/invoice_create_params.rbi +2 -2
  134. data/rbi/whop_sdk/models/invoice_list_params.rbi +26 -71
  135. data/rbi/whop_sdk/models/lesson.rbi +54 -0
  136. data/rbi/whop_sdk/models/member_list_params.rbi +10 -10
  137. data/rbi/whop_sdk/models/member_list_response.rbi +6 -6
  138. data/rbi/whop_sdk/models/member_retrieve_response.rbi +6 -6
  139. data/rbi/whop_sdk/models/membership_list_params.rbi +8 -8
  140. data/rbi/whop_sdk/models/message.rbi +2 -2
  141. data/rbi/whop_sdk/models/message_list_response.rbi +2 -2
  142. data/rbi/whop_sdk/models/notification_create_params.rbi +113 -0
  143. data/rbi/whop_sdk/models/notification_create_response.rbi +31 -0
  144. data/rbi/whop_sdk/models/payment.rbi +3 -3
  145. data/rbi/whop_sdk/models/payment_list_response.rbi +3 -3
  146. data/rbi/whop_sdk/models/plan.rbi +6 -4
  147. data/rbi/whop_sdk/models/plan_create_params.rbi +2 -2
  148. data/rbi/whop_sdk/models/plan_list_response.rbi +6 -4
  149. data/rbi/whop_sdk/models/plan_type.rbi +1 -1
  150. data/rbi/whop_sdk/models/product.rbi +1 -1
  151. data/rbi/whop_sdk/models/product_create_params.rbi +6 -6
  152. data/rbi/whop_sdk/models/product_list_item.rbi +1 -1
  153. data/rbi/whop_sdk/models/product_update_params.rbi +4 -4
  154. data/rbi/whop_sdk/models/promo_code.rbi +3 -3
  155. data/rbi/whop_sdk/models/promo_code_list_response.rbi +3 -3
  156. data/rbi/whop_sdk/models/unwrap_webhook_event.rbi +3 -1
  157. data/rbi/whop_sdk/models.rbi +24 -0
  158. data/rbi/whop_sdk/resources/access_tokens.rbi +41 -0
  159. data/rbi/whop_sdk/resources/app_builds.rbi +10 -2
  160. data/rbi/whop_sdk/resources/apps.rbi +6 -1
  161. data/rbi/whop_sdk/resources/authorized_users.rbi +5 -1
  162. data/rbi/whop_sdk/resources/chat_channels.rbi +8 -1
  163. data/rbi/whop_sdk/resources/checkout_configurations.rbi +5 -1
  164. data/rbi/whop_sdk/resources/companies.rbi +5 -1
  165. data/rbi/whop_sdk/resources/course_chapters.rbi +11 -2
  166. data/rbi/whop_sdk/resources/course_lesson_interactions.rbi +5 -1
  167. data/rbi/whop_sdk/resources/course_lessons.rbi +41 -2
  168. data/rbi/whop_sdk/resources/course_students.rbi +5 -1
  169. data/rbi/whop_sdk/resources/courses.rbi +28 -2
  170. data/rbi/whop_sdk/resources/disputes.rbi +194 -0
  171. data/rbi/whop_sdk/resources/entries.rbi +15 -3
  172. data/rbi/whop_sdk/resources/experiences.rbi +14 -2
  173. data/rbi/whop_sdk/resources/forum_posts.rbi +6 -1
  174. data/rbi/whop_sdk/resources/forums.rbi +6 -1
  175. data/rbi/whop_sdk/resources/invoices.rbi +20 -5
  176. data/rbi/whop_sdk/resources/ledger_accounts.rbi +7 -2
  177. data/rbi/whop_sdk/resources/members.rbi +9 -5
  178. data/rbi/whop_sdk/resources/memberships.rbi +16 -5
  179. data/rbi/whop_sdk/resources/messages.rbi +6 -1
  180. data/rbi/whop_sdk/resources/notifications.rbi +54 -0
  181. data/rbi/whop_sdk/resources/payments.rbi +16 -3
  182. data/rbi/whop_sdk/resources/plans.rbi +12 -3
  183. data/rbi/whop_sdk/resources/products.rbi +15 -6
  184. data/rbi/whop_sdk/resources/promo_codes.rbi +10 -2
  185. data/rbi/whop_sdk/resources/reactions.rbi +5 -1
  186. data/rbi/whop_sdk/resources/reviews.rbi +5 -1
  187. data/rbi/whop_sdk/resources/shipments.rbi +5 -1
  188. data/rbi/whop_sdk/resources/support_channels.rbi +5 -1
  189. data/rbi/whop_sdk/resources/transfers.rbi +5 -1
  190. data/rbi/whop_sdk/resources/users.rbi +13 -2
  191. data/rbi/whop_sdk/resources/webhooks.rbi +3 -1
  192. data/sig/whop_sdk/client.rbs +7 -1
  193. data/sig/whop_sdk/internal/transport/base_client.rbs +2 -0
  194. data/sig/whop_sdk/internal/transport/pooled_net_requester.rbs +4 -1
  195. data/sig/whop_sdk/models/access_token_create_params.rbs +56 -0
  196. data/sig/whop_sdk/models/access_token_create_response.rbs +15 -0
  197. data/sig/whop_sdk/models/company.rbs +2 -0
  198. data/sig/whop_sdk/models/course.rbs +13 -3
  199. data/sig/whop_sdk/models/course_create_params.rbs +11 -1
  200. data/sig/whop_sdk/models/course_lesson_create_params.rbs +46 -0
  201. data/sig/whop_sdk/models/course_lesson_list_response.rbs +25 -0
  202. data/sig/whop_sdk/models/course_lesson_update_params.rbs +46 -0
  203. data/sig/whop_sdk/models/course_list_response.rbs +13 -3
  204. data/sig/whop_sdk/models/course_update_params.rbs +11 -1
  205. data/sig/whop_sdk/models/course_visibilities.rbs +14 -0
  206. data/sig/whop_sdk/models/dispute.rbs +437 -0
  207. data/sig/whop_sdk/models/dispute_created_webhook_event.rbs +40 -0
  208. data/sig/whop_sdk/models/dispute_list_params.rbs +51 -0
  209. data/sig/whop_sdk/models/dispute_list_response.rbs +124 -0
  210. data/sig/whop_sdk/models/dispute_retrieve_params.rbs +15 -0
  211. data/sig/whop_sdk/models/dispute_statuses.rbs +30 -0
  212. data/sig/whop_sdk/models/dispute_submit_evidence_params.rbs +15 -0
  213. data/sig/whop_sdk/models/dispute_update_evidence_params.rbs +215 -0
  214. data/sig/whop_sdk/models/dispute_updated_webhook_event.rbs +40 -0
  215. data/sig/whop_sdk/models/embed_type.rbs +14 -0
  216. data/sig/whop_sdk/models/invoice_list_params.rbs +16 -33
  217. data/sig/whop_sdk/models/lesson.rbs +25 -0
  218. data/sig/whop_sdk/models/member_list_params.rbs +5 -5
  219. data/sig/whop_sdk/models/membership_list_params.rbs +5 -5
  220. data/sig/whop_sdk/models/notification_create_params.rbs +61 -0
  221. data/sig/whop_sdk/models/notification_create_response.rbs +13 -0
  222. data/sig/whop_sdk/models/unwrap_webhook_event.rbs +2 -0
  223. data/sig/whop_sdk/models.rbs +24 -0
  224. data/sig/whop_sdk/resources/access_tokens.rbs +15 -0
  225. data/sig/whop_sdk/resources/course_lessons.rbs +6 -0
  226. data/sig/whop_sdk/resources/courses.rbs +4 -0
  227. data/sig/whop_sdk/resources/disputes.rbs +46 -0
  228. data/sig/whop_sdk/resources/invoices.rbs +3 -1
  229. data/sig/whop_sdk/resources/members.rbs +1 -1
  230. data/sig/whop_sdk/resources/memberships.rbs +1 -1
  231. data/sig/whop_sdk/resources/notifications.rbs +19 -0
  232. data/sig/whop_sdk/resources/webhooks.rbs +3 -1
  233. metadata +56 -2
@@ -27,7 +27,7 @@ module WhopSDK
27
27
  end
28
28
  attr_writer :plan
29
29
 
30
- # The access pass tied to this entry, if there is one.
30
+ # The product tied to this entry, if there is one.
31
31
  sig { returns(T.nilable(WhopSDK::Models::EntryListResponse::Product)) }
32
32
  attr_reader :product
33
33
 
@@ -71,7 +71,7 @@ module WhopSDK
71
71
  created_at:,
72
72
  # The waitlist plan the entry if for.
73
73
  plan:,
74
- # The access pass tied to this entry, if there is one.
74
+ # The product tied to this entry, if there is one.
75
75
  product:,
76
76
  # The status of the entry.
77
77
  status:,
@@ -138,7 +138,7 @@ module WhopSDK
138
138
  sig { returns(String) }
139
139
  attr_accessor :title
140
140
 
141
- # The access pass tied to this entry, if there is one.
141
+ # The product tied to this entry, if there is one.
142
142
  sig { params(id: String, title: String).returns(T.attached_class) }
143
143
  def self.new(
144
144
  # The internal ID of the public product.
@@ -43,10 +43,9 @@ module WhopSDK
43
43
  sig { returns(T.nilable(String)) }
44
44
  attr_accessor :order
45
45
 
46
- # The access passes that are associated with this experience. This should not be
47
- # used unless you are trying to list all access passes the experience has, for
48
- # some reason. You probably don't want to use this though and should be using
49
- # accessPass.
46
+ # The products that this experience is attached to. This defines which set of
47
+ # customers have access and can view this experience. If empty, this experience is
48
+ # only visible to authorized users of the company
50
49
  sig { returns(T::Array[WhopSDK::Experience::Product]) }
51
50
  attr_accessor :products
52
51
 
@@ -78,10 +77,9 @@ module WhopSDK
78
77
  name:,
79
78
  # The order of the experience in the section
80
79
  order:,
81
- # The access passes that are associated with this experience. This should not be
82
- # used unless you are trying to list all access passes the experience has, for
83
- # some reason. You probably don't want to use this though and should be using
84
- # accessPass.
80
+ # The products that this experience is attached to. This defines which set of
81
+ # customers have access and can view this experience. If empty, this experience is
82
+ # only visible to authorized users of the company
85
83
  products:
86
84
  )
87
85
  end
@@ -267,7 +265,7 @@ module WhopSDK
267
265
  sig { returns(String) }
268
266
  attr_accessor :title
269
267
 
270
- # An object representing a (sanitized) access pass.
268
+ # Represents a product on whop. Use products to sell anything on the platform.
271
269
  sig do
272
270
  params(id: String, route: String, title: String).returns(
273
271
  T.attached_class
@@ -6,7 +6,7 @@ module WhopSDK
6
6
  OrHash =
7
7
  T.type_alias { T.any(WhopSDK::ForumPost, WhopSDK::Internal::AnyHash) }
8
8
 
9
- # The unique identifier for the entity
9
+ # The unique identifier of the resource.
10
10
  sig { returns(String) }
11
11
  attr_accessor :id
12
12
 
@@ -80,7 +80,7 @@ module WhopSDK
80
80
  ).returns(T.attached_class)
81
81
  end
82
82
  def self.new(
83
- # The unique identifier for the entity
83
+ # The unique identifier of the resource.
84
84
  id:,
85
85
  # The amount of comments on this post
86
86
  comment_count:,
@@ -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:,
@@ -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
 
@@ -184,7 +184,7 @@ module WhopSDK
184
184
  sig { returns(T.nilable(String)) }
185
185
  attr_accessor :internal_notes
186
186
 
187
- # The type of plan that can be attached to an access pass
187
+ # The type of plan that can be attached to a product
188
188
  sig { returns(T.nilable(WhopSDK::PlanType::OrSymbol)) }
189
189
  attr_accessor :plan_type
190
190
 
@@ -251,7 +251,7 @@ module WhopSDK
251
251
  initial_price: nil,
252
252
  # A personal description or notes section for the business.
253
253
  internal_notes: nil,
254
- # The type of plan that can be attached to an access pass
254
+ # The type of plan that can be attached to a product
255
255
  plan_type: nil,
256
256
  # The methods of how a plan can be released.
257
257
  release_method: nil,
@@ -23,21 +23,14 @@ module WhopSDK
23
23
  sig { returns(T.nilable(String)) }
24
24
  attr_accessor :before
25
25
 
26
+ # Filter invoices by their collection method
27
+ sig { returns(T.nilable(T::Array[WhopSDK::CollectionMethod::OrSymbol])) }
28
+ attr_accessor :collection_methods
29
+
26
30
  # The direction of the sort.
27
31
  sig { returns(T.nilable(WhopSDK::Direction::OrSymbol)) }
28
32
  attr_accessor :direction
29
33
 
30
- # The filters to apply to the invoices
31
- sig { returns(T.nilable(WhopSDK::InvoiceListParams::Filters)) }
32
- attr_reader :filters
33
-
34
- sig do
35
- params(
36
- filters: T.nilable(WhopSDK::InvoiceListParams::Filters::OrHash)
37
- ).void
38
- end
39
- attr_writer :filters
40
-
41
34
  # Returns the first _n_ elements from the list.
42
35
  sig { returns(T.nilable(Integer)) }
43
36
  attr_accessor :first
@@ -50,16 +43,27 @@ module WhopSDK
50
43
  sig { returns(T.nilable(WhopSDK::InvoiceListParams::Order::OrSymbol)) }
51
44
  attr_accessor :order
52
45
 
46
+ # Return only invoices created for these specific product ids
47
+ sig { returns(T.nilable(T::Array[String])) }
48
+ attr_accessor :product_ids
49
+
50
+ # The statuses to filter the invoices by
51
+ sig { returns(T.nilable(T::Array[WhopSDK::InvoiceStatus::OrSymbol])) }
52
+ attr_accessor :statuses
53
+
53
54
  sig do
54
55
  params(
55
56
  company_id: String,
56
57
  after: T.nilable(String),
57
58
  before: T.nilable(String),
59
+ collection_methods:
60
+ T.nilable(T::Array[WhopSDK::CollectionMethod::OrSymbol]),
58
61
  direction: T.nilable(WhopSDK::Direction::OrSymbol),
59
- filters: T.nilable(WhopSDK::InvoiceListParams::Filters::OrHash),
60
62
  first: T.nilable(Integer),
61
63
  last: T.nilable(Integer),
62
64
  order: T.nilable(WhopSDK::InvoiceListParams::Order::OrSymbol),
65
+ product_ids: T.nilable(T::Array[String]),
66
+ statuses: T.nilable(T::Array[WhopSDK::InvoiceStatus::OrSymbol]),
63
67
  request_options: WhopSDK::RequestOptions::OrHash
64
68
  ).returns(T.attached_class)
65
69
  end
@@ -70,16 +74,20 @@ module WhopSDK
70
74
  after: nil,
71
75
  # Returns the elements in the list that come before the specified cursor.
72
76
  before: nil,
77
+ # Filter invoices by their collection method
78
+ collection_methods: nil,
73
79
  # The direction of the sort.
74
80
  direction: nil,
75
- # The filters to apply to the invoices
76
- filters: nil,
77
81
  # Returns the first _n_ elements from the list.
78
82
  first: nil,
79
83
  # Returns the last _n_ elements from the list.
80
84
  last: nil,
81
85
  # Which columns can be used to sort.
82
86
  order: nil,
87
+ # Return only invoices created for these specific product ids
88
+ product_ids: nil,
89
+ # The statuses to filter the invoices by
90
+ statuses: nil,
83
91
  request_options: {}
84
92
  )
85
93
  end
@@ -90,11 +98,14 @@ module WhopSDK
90
98
  company_id: String,
91
99
  after: T.nilable(String),
92
100
  before: T.nilable(String),
101
+ collection_methods:
102
+ T.nilable(T::Array[WhopSDK::CollectionMethod::OrSymbol]),
93
103
  direction: T.nilable(WhopSDK::Direction::OrSymbol),
94
- filters: T.nilable(WhopSDK::InvoiceListParams::Filters),
95
104
  first: T.nilable(Integer),
96
105
  last: T.nilable(Integer),
97
106
  order: T.nilable(WhopSDK::InvoiceListParams::Order::OrSymbol),
107
+ product_ids: T.nilable(T::Array[String]),
108
+ statuses: T.nilable(T::Array[WhopSDK::InvoiceStatus::OrSymbol]),
98
109
  request_options: WhopSDK::RequestOptions
99
110
  }
100
111
  )
@@ -102,62 +113,6 @@ module WhopSDK
102
113
  def to_hash
103
114
  end
104
115
 
105
- class Filters < WhopSDK::Internal::Type::BaseModel
106
- OrHash =
107
- T.type_alias do
108
- T.any(
109
- WhopSDK::InvoiceListParams::Filters,
110
- WhopSDK::Internal::AnyHash
111
- )
112
- end
113
-
114
- # The access pass IDs to filter the invoices by
115
- sig { returns(T.nilable(T::Array[String])) }
116
- attr_accessor :access_pass_ids
117
-
118
- # The collection methods to filter the invoices by
119
- sig do
120
- returns(T.nilable(T::Array[WhopSDK::CollectionMethod::OrSymbol]))
121
- end
122
- attr_accessor :collection_methods
123
-
124
- # The statuses to filter the invoices by
125
- sig { returns(T.nilable(T::Array[WhopSDK::InvoiceStatus::OrSymbol])) }
126
- attr_accessor :statuses
127
-
128
- # The filters to apply to the invoices
129
- sig do
130
- params(
131
- access_pass_ids: T.nilable(T::Array[String]),
132
- collection_methods:
133
- T.nilable(T::Array[WhopSDK::CollectionMethod::OrSymbol]),
134
- statuses: T.nilable(T::Array[WhopSDK::InvoiceStatus::OrSymbol])
135
- ).returns(T.attached_class)
136
- end
137
- def self.new(
138
- # The access pass IDs to filter the invoices by
139
- access_pass_ids: nil,
140
- # The collection methods to filter the invoices by
141
- collection_methods: nil,
142
- # The statuses to filter the invoices by
143
- statuses: nil
144
- )
145
- end
146
-
147
- sig do
148
- override.returns(
149
- {
150
- access_pass_ids: T.nilable(T::Array[String]),
151
- collection_methods:
152
- T.nilable(T::Array[WhopSDK::CollectionMethod::OrSymbol]),
153
- statuses: T.nilable(T::Array[WhopSDK::InvoiceStatus::OrSymbol])
154
- }
155
- )
156
- end
157
- def to_hash
158
- end
159
- end
160
-
161
116
  # Which columns can be used to sort.
162
117
  module Order
163
118
  extend WhopSDK::Internal::Type::Enum
@@ -26,6 +26,14 @@ module WhopSDK
26
26
  sig { returns(T.nilable(Integer)) }
27
27
  attr_accessor :days_from_course_start_until_unlock
28
28
 
29
+ # ID for the embed (YouTube video ID or Loom share ID)
30
+ sig { returns(T.nilable(String)) }
31
+ attr_accessor :embed_id
32
+
33
+ # The type of embed for a lesson
34
+ sig { returns(T.nilable(WhopSDK::EmbedType::TaggedSymbol)) }
35
+ attr_accessor :embed_type
36
+
29
37
  # The type of the lesson (text, video, pdf, multi, quiz, knowledge_check)
30
38
  sig { returns(WhopSDK::LessonTypes::TaggedSymbol) }
31
39
  attr_accessor :lesson_type
@@ -41,6 +49,15 @@ module WhopSDK
41
49
  sig { returns(Integer) }
42
50
  attr_accessor :order
43
51
 
52
+ # The thumbnail for the lesson
53
+ sig { returns(T.nilable(WhopSDK::Lesson::Thumbnail)) }
54
+ attr_reader :thumbnail
55
+
56
+ sig do
57
+ params(thumbnail: T.nilable(WhopSDK::Lesson::Thumbnail::OrHash)).void
58
+ end
59
+ attr_writer :thumbnail
60
+
44
61
  # The title of the lesson
45
62
  sig { returns(String) }
46
63
  attr_accessor :title
@@ -68,9 +85,12 @@ module WhopSDK
68
85
  attachments: T::Array[WhopSDK::Lesson::Attachment::OrHash],
69
86
  content: T.nilable(String),
70
87
  days_from_course_start_until_unlock: T.nilable(Integer),
88
+ embed_id: T.nilable(String),
89
+ embed_type: T.nilable(WhopSDK::EmbedType::OrSymbol),
71
90
  lesson_type: WhopSDK::LessonTypes::OrSymbol,
72
91
  main_pdf: T.nilable(WhopSDK::Lesson::MainPdf::OrHash),
73
92
  order: Integer,
93
+ thumbnail: T.nilable(WhopSDK::Lesson::Thumbnail::OrHash),
74
94
  title: String,
75
95
  video_asset: T.nilable(WhopSDK::Lesson::VideoAsset::OrHash),
76
96
  visibility: WhopSDK::LessonVisibilities::OrSymbol
@@ -87,12 +107,18 @@ module WhopSDK
87
107
  content:,
88
108
  # Number of days from course start until the lesson is unlocked
89
109
  days_from_course_start_until_unlock:,
110
+ # ID for the embed (YouTube video ID or Loom share ID)
111
+ embed_id:,
112
+ # The type of embed for a lesson
113
+ embed_type:,
90
114
  # The type of the lesson (text, video, pdf, multi, quiz, knowledge_check)
91
115
  lesson_type:,
92
116
  # The main PDF file for this lesson
93
117
  main_pdf:,
94
118
  # The order of the lesson within its chapter
95
119
  order:,
120
+ # The thumbnail for the lesson
121
+ thumbnail:,
96
122
  # The title of the lesson
97
123
  title:,
98
124
  # The associated Mux asset for video lessons
@@ -111,9 +137,12 @@ module WhopSDK
111
137
  attachments: T::Array[WhopSDK::Lesson::Attachment],
112
138
  content: T.nilable(String),
113
139
  days_from_course_start_until_unlock: T.nilable(Integer),
140
+ embed_id: T.nilable(String),
141
+ embed_type: T.nilable(WhopSDK::EmbedType::TaggedSymbol),
114
142
  lesson_type: WhopSDK::LessonTypes::TaggedSymbol,
115
143
  main_pdf: T.nilable(WhopSDK::Lesson::MainPdf),
116
144
  order: Integer,
145
+ thumbnail: T.nilable(WhopSDK::Lesson::Thumbnail),
117
146
  title: String,
118
147
  video_asset: T.nilable(WhopSDK::Lesson::VideoAsset),
119
148
  visibility: WhopSDK::LessonVisibilities::TaggedSymbol
@@ -468,6 +497,31 @@ module WhopSDK
468
497
  end
469
498
  end
470
499
 
500
+ class Thumbnail < WhopSDK::Internal::Type::BaseModel
501
+ OrHash =
502
+ T.type_alias do
503
+ T.any(WhopSDK::Lesson::Thumbnail, WhopSDK::Internal::AnyHash)
504
+ end
505
+
506
+ # This is the URL you use to render optimized attachments on the client. This
507
+ # should be used for apps.
508
+ sig { returns(T.nilable(String)) }
509
+ attr_accessor :url
510
+
511
+ # The thumbnail for the lesson
512
+ sig { params(url: T.nilable(String)).returns(T.attached_class) }
513
+ def self.new(
514
+ # This is the URL you use to render optimized attachments on the client. This
515
+ # should be used for apps.
516
+ url:
517
+ )
518
+ end
519
+
520
+ sig { override.returns({ url: T.nilable(String) }) }
521
+ def to_hash
522
+ end
523
+ end
524
+
471
525
  class VideoAsset < WhopSDK::Internal::Type::BaseModel
472
526
  OrHash =
473
527
  T.type_alias do
@@ -15,14 +15,10 @@ module WhopSDK
15
15
  sig { returns(String) }
16
16
  attr_accessor :company_id
17
17
 
18
- # The access level a given user (or company) has to an access pass or company.
18
+ # The access level a given user (or company) has to a product or company.
19
19
  sig { returns(T.nilable(WhopSDK::AccessLevel::OrSymbol)) }
20
20
  attr_accessor :access_level
21
21
 
22
- # The access pass IDs to filter the members by
23
- sig { returns(T.nilable(T::Array[String])) }
24
- attr_accessor :access_pass_ids
25
-
26
22
  # Returns the elements in the list that come after the specified cursor.
27
23
  sig { returns(T.nilable(String)) }
28
24
  attr_accessor :after
@@ -65,6 +61,10 @@ module WhopSDK
65
61
  sig { returns(T.nilable(T::Array[String])) }
66
62
  attr_accessor :plan_ids
67
63
 
64
+ # The product IDs to filter the members by
65
+ sig { returns(T.nilable(T::Array[String])) }
66
+ attr_accessor :product_ids
67
+
68
68
  # The promo code IDs to filter the members by
69
69
  sig { returns(T.nilable(T::Array[String])) }
70
70
  attr_accessor :promo_code_ids
@@ -86,7 +86,6 @@ module WhopSDK
86
86
  params(
87
87
  company_id: String,
88
88
  access_level: T.nilable(WhopSDK::AccessLevel::OrSymbol),
89
- access_pass_ids: T.nilable(T::Array[String]),
90
89
  after: T.nilable(String),
91
90
  before: T.nilable(String),
92
91
  created_after: T.nilable(Time),
@@ -98,6 +97,7 @@ module WhopSDK
98
97
  T.nilable(T::Array[WhopSDK::MemberMostRecentActions::OrSymbol]),
99
98
  order: T.nilable(WhopSDK::MemberListParams::Order::OrSymbol),
100
99
  plan_ids: T.nilable(T::Array[String]),
100
+ product_ids: T.nilable(T::Array[String]),
101
101
  promo_code_ids: T.nilable(T::Array[String]),
102
102
  query: T.nilable(String),
103
103
  statuses: T.nilable(T::Array[WhopSDK::MemberStatuses::OrSymbol]),
@@ -108,10 +108,8 @@ module WhopSDK
108
108
  def self.new(
109
109
  # The ID of the company to list members for
110
110
  company_id:,
111
- # The access level a given user (or company) has to an access pass or company.
111
+ # The access level a given user (or company) has to a product or company.
112
112
  access_level: nil,
113
- # The access pass IDs to filter the members by
114
- access_pass_ids: nil,
115
113
  # Returns the elements in the list that come after the specified cursor.
116
114
  after: nil,
117
115
  # Returns the elements in the list that come before the specified cursor.
@@ -132,6 +130,8 @@ module WhopSDK
132
130
  order: nil,
133
131
  # The plan IDs to filter the members by
134
132
  plan_ids: nil,
133
+ # The product IDs to filter the members by
134
+ product_ids: nil,
135
135
  # The promo code IDs to filter the members by
136
136
  promo_code_ids: nil,
137
137
  # The name, username, or email to filter the members by. The email filter will
@@ -150,7 +150,6 @@ module WhopSDK
150
150
  {
151
151
  company_id: String,
152
152
  access_level: T.nilable(WhopSDK::AccessLevel::OrSymbol),
153
- access_pass_ids: T.nilable(T::Array[String]),
154
153
  after: T.nilable(String),
155
154
  before: T.nilable(String),
156
155
  created_after: T.nilable(Time),
@@ -162,6 +161,7 @@ module WhopSDK
162
161
  T.nilable(T::Array[WhopSDK::MemberMostRecentActions::OrSymbol]),
163
162
  order: T.nilable(WhopSDK::MemberListParams::Order::OrSymbol),
164
163
  plan_ids: T.nilable(T::Array[String]),
164
+ product_ids: T.nilable(T::Array[String]),
165
165
  promo_code_ids: T.nilable(T::Array[String]),
166
166
  query: T.nilable(String),
167
167
  statuses: T.nilable(T::Array[WhopSDK::MemberStatuses::OrSymbol]),
@@ -13,9 +13,9 @@ module WhopSDK
13
13
  attr_accessor :id
14
14
 
15
15
  # The access level of the product member. If its admin, the member is an
16
- # authorized user of the access pass. If its customer, the member has a valid
17
- # membership to the access pass. If its no_access, the member does not have access
18
- # to the access pass.
16
+ # authorized user of the company. If its customer, the member has a valid
17
+ # membership to any product on the company. If its no_access, the member does not
18
+ # have access to the product.
19
19
  sig { returns(WhopSDK::AccessLevel::TaggedSymbol) }
20
20
  attr_accessor :access_level
21
21
 
@@ -85,9 +85,9 @@ module WhopSDK
85
85
  # The ID of the member
86
86
  id:,
87
87
  # The access level of the product member. If its admin, the member is an
88
- # authorized user of the access pass. If its customer, the member has a valid
89
- # membership to the access pass. If its no_access, the member does not have access
90
- # to the access pass.
88
+ # authorized user of the company. If its customer, the member has a valid
89
+ # membership to any product on the company. If its no_access, the member does not
90
+ # have access to the product.
91
91
  access_level:,
92
92
  # When the member was created
93
93
  created_at:,
@@ -16,9 +16,9 @@ module WhopSDK
16
16
  attr_accessor :id
17
17
 
18
18
  # The access level of the product member. If its admin, the member is an
19
- # authorized user of the access pass. If its customer, the member has a valid
20
- # membership to the access pass. If its no_access, the member does not have access
21
- # to the access pass.
19
+ # authorized user of the company. If its customer, the member has a valid
20
+ # membership to any product on the company. If its no_access, the member does not
21
+ # have access to the product.
22
22
  sig { returns(WhopSDK::AccessLevel::TaggedSymbol) }
23
23
  attr_accessor :access_level
24
24
 
@@ -100,9 +100,9 @@ module WhopSDK
100
100
  # The ID of the member
101
101
  id:,
102
102
  # The access level of the product member. If its admin, the member is an
103
- # authorized user of the access pass. If its customer, the member has a valid
104
- # membership to the access pass. If its no_access, the member does not have access
105
- # to the access pass.
103
+ # authorized user of the company. If its customer, the member has a valid
104
+ # membership to any product on the company. If its no_access, the member does not
105
+ # have access to the product.
106
106
  access_level:,
107
107
  # The company for the member.
108
108
  company:,
@@ -11,10 +11,6 @@ module WhopSDK
11
11
  T.any(WhopSDK::MembershipListParams, WhopSDK::Internal::AnyHash)
12
12
  end
13
13
 
14
- # The access pass IDs to filter the memberships by
15
- sig { returns(T.nilable(T::Array[String])) }
16
- attr_accessor :access_pass_ids
17
-
18
14
  # Returns the elements in the list that come after the specified cursor.
19
15
  sig { returns(T.nilable(String)) }
20
16
  attr_accessor :after
@@ -65,6 +61,10 @@ module WhopSDK
65
61
  sig { returns(T.nilable(T::Array[String])) }
66
62
  attr_accessor :plan_ids
67
63
 
64
+ # The product IDs to filter the memberships by
65
+ sig { returns(T.nilable(T::Array[String])) }
66
+ attr_accessor :product_ids
67
+
68
68
  # The promo code IDs to filter the memberships by
69
69
  sig { returns(T.nilable(T::Array[String])) }
70
70
  attr_accessor :promo_code_ids
@@ -79,7 +79,6 @@ module WhopSDK
79
79
 
80
80
  sig do
81
81
  params(
82
- access_pass_ids: T.nilable(T::Array[String]),
83
82
  after: T.nilable(String),
84
83
  before: T.nilable(String),
85
84
  cancel_options:
@@ -94,6 +93,7 @@ module WhopSDK
94
93
  last: T.nilable(Integer),
95
94
  order: T.nilable(WhopSDK::MembershipListParams::Order::OrSymbol),
96
95
  plan_ids: T.nilable(T::Array[String]),
96
+ product_ids: T.nilable(T::Array[String]),
97
97
  promo_code_ids: T.nilable(T::Array[String]),
98
98
  statuses: T.nilable(T::Array[WhopSDK::MembershipStatus::OrSymbol]),
99
99
  user_ids: T.nilable(T::Array[String]),
@@ -101,8 +101,6 @@ module WhopSDK
101
101
  ).returns(T.attached_class)
102
102
  end
103
103
  def self.new(
104
- # The access pass IDs to filter the memberships by
105
- access_pass_ids: nil,
106
104
  # Returns the elements in the list that come after the specified cursor.
107
105
  after: nil,
108
106
  # Returns the elements in the list that come before the specified cursor.
@@ -125,6 +123,8 @@ module WhopSDK
125
123
  order: nil,
126
124
  # The plan IDs to filter the memberships by
127
125
  plan_ids: nil,
126
+ # The product IDs to filter the memberships by
127
+ product_ids: nil,
128
128
  # The promo code IDs to filter the memberships by
129
129
  promo_code_ids: nil,
130
130
  # The membership status to filter the memberships by
@@ -138,7 +138,6 @@ module WhopSDK
138
138
  sig do
139
139
  override.returns(
140
140
  {
141
- access_pass_ids: T.nilable(T::Array[String]),
142
141
  after: T.nilable(String),
143
142
  before: T.nilable(String),
144
143
  cancel_options:
@@ -153,6 +152,7 @@ module WhopSDK
153
152
  last: T.nilable(Integer),
154
153
  order: T.nilable(WhopSDK::MembershipListParams::Order::OrSymbol),
155
154
  plan_ids: T.nilable(T::Array[String]),
155
+ product_ids: T.nilable(T::Array[String]),
156
156
  promo_code_ids: T.nilable(T::Array[String]),
157
157
  statuses: T.nilable(T::Array[WhopSDK::MembershipStatus::OrSymbol]),
158
158
  user_ids: T.nilable(T::Array[String]),
@@ -6,7 +6,7 @@ module WhopSDK
6
6
  OrHash =
7
7
  T.type_alias { T.any(WhopSDK::Message, WhopSDK::Internal::AnyHash) }
8
8
 
9
- # The unique identifier for the entity
9
+ # The unique identifier of the resource.
10
10
  sig { returns(String) }
11
11
  attr_accessor :id
12
12
 
@@ -83,7 +83,7 @@ module WhopSDK
83
83
  ).returns(T.attached_class)
84
84
  end
85
85
  def self.new(
86
- # The unique identifier for the entity
86
+ # The unique identifier of the resource.
87
87
  id:,
88
88
  # The content of the message in Markdown format
89
89
  content:,
@@ -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
 
@@ -100,7 +100,7 @@ module WhopSDK
100
100
  ).returns(T.attached_class)
101
101
  end
102
102
  def self.new(
103
- # The unique identifier for the entity
103
+ # The unique identifier of the resource.
104
104
  id:,
105
105
  # The content of the message in Markdown format
106
106
  content:,