whop-sdk 0.0.2__py3-none-any.whl → 0.0.3__py3-none-any.whl

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.

Potentially problematic release.


This version of whop-sdk might be problematic. Click here for more details.

Files changed (86) hide show
  1. whop_sdk/_client.py +47 -2
  2. whop_sdk/_version.py +1 -1
  3. whop_sdk/resources/__init__.py +70 -0
  4. whop_sdk/resources/checkout_configurations.py +4 -0
  5. whop_sdk/resources/course_chapters.py +602 -0
  6. whop_sdk/resources/course_lessons.py +722 -0
  7. whop_sdk/resources/courses.py +713 -0
  8. whop_sdk/resources/experiences.py +107 -0
  9. whop_sdk/resources/forum_posts.py +123 -1
  10. whop_sdk/resources/members.py +8 -0
  11. whop_sdk/resources/memberships.py +16 -8
  12. whop_sdk/resources/messages.py +113 -1
  13. whop_sdk/resources/payments.py +3 -26
  14. whop_sdk/resources/plans.py +74 -2
  15. whop_sdk/resources/products.py +8 -16
  16. whop_sdk/resources/promo_codes.py +652 -0
  17. whop_sdk/resources/reviews.py +315 -0
  18. whop_sdk/types/__init__.py +39 -0
  19. whop_sdk/types/assessment_question_types.py +7 -0
  20. whop_sdk/types/billing_reasons.py +9 -0
  21. whop_sdk/types/card_brands.py +24 -0
  22. whop_sdk/types/checkout_configuration_create_params.py +65 -2
  23. whop_sdk/types/checkout_configuration_list_response.py +4 -1
  24. whop_sdk/types/course.py +109 -0
  25. whop_sdk/types/course_chapter.py +32 -0
  26. whop_sdk/types/course_chapter_create_params.py +16 -0
  27. whop_sdk/types/course_chapter_delete_response.py +7 -0
  28. whop_sdk/types/course_chapter_list_params.py +25 -0
  29. whop_sdk/types/course_chapter_list_response.py +16 -0
  30. whop_sdk/types/course_chapter_update_params.py +12 -0
  31. whop_sdk/types/course_create_params.py +41 -0
  32. whop_sdk/types/course_delete_response.py +7 -0
  33. whop_sdk/types/course_lesson_create_params.py +27 -0
  34. whop_sdk/types/course_lesson_delete_response.py +7 -0
  35. whop_sdk/types/course_lesson_list_params.py +28 -0
  36. whop_sdk/types/course_lesson_list_response.py +35 -0
  37. whop_sdk/types/course_lesson_update_params.py +144 -0
  38. whop_sdk/types/course_list_params.py +28 -0
  39. whop_sdk/types/course_list_response.py +77 -0
  40. whop_sdk/types/course_update_params.py +89 -0
  41. whop_sdk/types/experience_duplicate_params.py +13 -0
  42. whop_sdk/types/forum_post_list_response.py +7 -0
  43. whop_sdk/types/forum_post_update_params.py +41 -0
  44. whop_sdk/types/languages.py +30 -0
  45. whop_sdk/types/ledger_account_retrieve_response.py +15 -1
  46. whop_sdk/types/lesson.py +159 -0
  47. whop_sdk/types/lesson_types.py +7 -0
  48. whop_sdk/types/lesson_visibilities.py +7 -0
  49. whop_sdk/types/member_list_params.py +3 -0
  50. whop_sdk/types/membership_list_params.py +7 -4
  51. whop_sdk/types/membership_list_response.py +12 -1
  52. whop_sdk/types/message_update_params.py +35 -0
  53. whop_sdk/types/payment_list_params.py +2 -7
  54. whop_sdk/types/payment_list_response.py +23 -13
  55. whop_sdk/types/payment_method_types.py +92 -0
  56. whop_sdk/types/plan_create_params.py +19 -1
  57. whop_sdk/types/plan_list_response.py +9 -0
  58. whop_sdk/types/plan_update_params.py +18 -0
  59. whop_sdk/types/product_create_params.py +1 -24
  60. whop_sdk/types/product_update_params.py +12 -1
  61. whop_sdk/types/promo_code.py +90 -0
  62. whop_sdk/types/promo_code_create_params.py +70 -0
  63. whop_sdk/types/promo_code_delete_response.py +7 -0
  64. whop_sdk/types/promo_code_list_params.py +37 -0
  65. whop_sdk/types/promo_code_list_response.py +79 -0
  66. whop_sdk/types/promo_code_status.py +7 -0
  67. whop_sdk/types/promo_duration.py +7 -0
  68. whop_sdk/types/review_list_params.py +31 -0
  69. whop_sdk/types/review_list_response.py +78 -0
  70. whop_sdk/types/review_retrieve_response.py +103 -0
  71. whop_sdk/types/review_status.py +7 -0
  72. whop_sdk/types/shared/checkout_configuration.py +4 -1
  73. whop_sdk/types/shared/forum_post.py +7 -0
  74. whop_sdk/types/shared/invoice.py +4 -1
  75. whop_sdk/types/shared/invoice_list_item.py +4 -1
  76. whop_sdk/types/shared/membership.py +12 -1
  77. whop_sdk/types/shared/payment.py +23 -13
  78. whop_sdk/types/shared/plan.py +9 -0
  79. whop_sdk/types/shared/product.py +8 -0
  80. whop_sdk/types/shared/product_list_item.py +8 -0
  81. whop_sdk/types/shared_params/__init__.py +1 -0
  82. whop_sdk/types/shared_params/promo_type.py +9 -0
  83. {whop_sdk-0.0.2.dist-info → whop_sdk-0.0.3.dist-info}/METADATA +1 -1
  84. {whop_sdk-0.0.2.dist-info → whop_sdk-0.0.3.dist-info}/RECORD +86 -41
  85. {whop_sdk-0.0.2.dist-info → whop_sdk-0.0.3.dist-info}/WHEEL +0 -0
  86. {whop_sdk-0.0.2.dist-info → whop_sdk-0.0.3.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,315 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Optional
6
+
7
+ import httpx
8
+
9
+ from ..types import review_list_params
10
+ from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
11
+ from .._utils import maybe_transform
12
+ from .._compat import cached_property
13
+ from .._resource import SyncAPIResource, AsyncAPIResource
14
+ from .._response import (
15
+ to_raw_response_wrapper,
16
+ to_streamed_response_wrapper,
17
+ async_to_raw_response_wrapper,
18
+ async_to_streamed_response_wrapper,
19
+ )
20
+ from ..pagination import SyncCursorPage, AsyncCursorPage
21
+ from .._base_client import AsyncPaginator, make_request_options
22
+ from ..types.review_list_response import ReviewListResponse
23
+ from ..types.review_retrieve_response import ReviewRetrieveResponse
24
+
25
+ __all__ = ["ReviewsResource", "AsyncReviewsResource"]
26
+
27
+
28
+ class ReviewsResource(SyncAPIResource):
29
+ @cached_property
30
+ def with_raw_response(self) -> ReviewsResourceWithRawResponse:
31
+ """
32
+ This property can be used as a prefix for any HTTP method call to return
33
+ the raw response object instead of the parsed content.
34
+
35
+ For more information, see https://www.github.com/whopio/whopsdk-python#accessing-raw-response-data-eg-headers
36
+ """
37
+ return ReviewsResourceWithRawResponse(self)
38
+
39
+ @cached_property
40
+ def with_streaming_response(self) -> ReviewsResourceWithStreamingResponse:
41
+ """
42
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
43
+
44
+ For more information, see https://www.github.com/whopio/whopsdk-python#with_streaming_response
45
+ """
46
+ return ReviewsResourceWithStreamingResponse(self)
47
+
48
+ def retrieve(
49
+ self,
50
+ id: str,
51
+ *,
52
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
53
+ # The extra values given here take precedence over values defined on the client or passed to this method.
54
+ extra_headers: Headers | None = None,
55
+ extra_query: Query | None = None,
56
+ extra_body: Body | None = None,
57
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
58
+ ) -> ReviewRetrieveResponse:
59
+ """
60
+ Retrieve a review by its ID
61
+
62
+ Args:
63
+ extra_headers: Send extra headers
64
+
65
+ extra_query: Add additional query parameters to the request
66
+
67
+ extra_body: Add additional JSON properties to the request
68
+
69
+ timeout: Override the client-level default timeout for this request, in seconds
70
+ """
71
+ if not id:
72
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
73
+ return self._get(
74
+ f"/reviews/{id}",
75
+ options=make_request_options(
76
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
77
+ ),
78
+ cast_to=ReviewRetrieveResponse,
79
+ )
80
+
81
+ def list(
82
+ self,
83
+ *,
84
+ product_id: str,
85
+ after: Optional[str] | Omit = omit,
86
+ before: Optional[str] | Omit = omit,
87
+ first: Optional[int] | Omit = omit,
88
+ last: Optional[int] | Omit = omit,
89
+ max_stars: Optional[int] | Omit = omit,
90
+ min_stars: Optional[int] | Omit = omit,
91
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
92
+ # The extra values given here take precedence over values defined on the client or passed to this method.
93
+ extra_headers: Headers | None = None,
94
+ extra_query: Query | None = None,
95
+ extra_body: Body | None = None,
96
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
97
+ ) -> SyncCursorPage[ReviewListResponse]:
98
+ """
99
+ List all reviews
100
+
101
+ Args:
102
+ product_id: The ID of the product
103
+
104
+ after: Returns the elements in the list that come after the specified cursor.
105
+
106
+ before: Returns the elements in the list that come before the specified cursor.
107
+
108
+ first: Returns the first _n_ elements from the list.
109
+
110
+ last: Returns the last _n_ elements from the list.
111
+
112
+ max_stars: The maximum star rating of the review (inclusive)
113
+
114
+ min_stars: The minimum star rating of the review (inclusive)
115
+
116
+ extra_headers: Send extra headers
117
+
118
+ extra_query: Add additional query parameters to the request
119
+
120
+ extra_body: Add additional JSON properties to the request
121
+
122
+ timeout: Override the client-level default timeout for this request, in seconds
123
+ """
124
+ return self._get_api_list(
125
+ "/reviews",
126
+ page=SyncCursorPage[ReviewListResponse],
127
+ options=make_request_options(
128
+ extra_headers=extra_headers,
129
+ extra_query=extra_query,
130
+ extra_body=extra_body,
131
+ timeout=timeout,
132
+ query=maybe_transform(
133
+ {
134
+ "product_id": product_id,
135
+ "after": after,
136
+ "before": before,
137
+ "first": first,
138
+ "last": last,
139
+ "max_stars": max_stars,
140
+ "min_stars": min_stars,
141
+ },
142
+ review_list_params.ReviewListParams,
143
+ ),
144
+ ),
145
+ model=ReviewListResponse,
146
+ )
147
+
148
+
149
+ class AsyncReviewsResource(AsyncAPIResource):
150
+ @cached_property
151
+ def with_raw_response(self) -> AsyncReviewsResourceWithRawResponse:
152
+ """
153
+ This property can be used as a prefix for any HTTP method call to return
154
+ the raw response object instead of the parsed content.
155
+
156
+ For more information, see https://www.github.com/whopio/whopsdk-python#accessing-raw-response-data-eg-headers
157
+ """
158
+ return AsyncReviewsResourceWithRawResponse(self)
159
+
160
+ @cached_property
161
+ def with_streaming_response(self) -> AsyncReviewsResourceWithStreamingResponse:
162
+ """
163
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
164
+
165
+ For more information, see https://www.github.com/whopio/whopsdk-python#with_streaming_response
166
+ """
167
+ return AsyncReviewsResourceWithStreamingResponse(self)
168
+
169
+ async def retrieve(
170
+ self,
171
+ id: str,
172
+ *,
173
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
174
+ # The extra values given here take precedence over values defined on the client or passed to this method.
175
+ extra_headers: Headers | None = None,
176
+ extra_query: Query | None = None,
177
+ extra_body: Body | None = None,
178
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
179
+ ) -> ReviewRetrieveResponse:
180
+ """
181
+ Retrieve a review by its ID
182
+
183
+ Args:
184
+ extra_headers: Send extra headers
185
+
186
+ extra_query: Add additional query parameters to the request
187
+
188
+ extra_body: Add additional JSON properties to the request
189
+
190
+ timeout: Override the client-level default timeout for this request, in seconds
191
+ """
192
+ if not id:
193
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
194
+ return await self._get(
195
+ f"/reviews/{id}",
196
+ options=make_request_options(
197
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
198
+ ),
199
+ cast_to=ReviewRetrieveResponse,
200
+ )
201
+
202
+ def list(
203
+ self,
204
+ *,
205
+ product_id: str,
206
+ after: Optional[str] | Omit = omit,
207
+ before: Optional[str] | Omit = omit,
208
+ first: Optional[int] | Omit = omit,
209
+ last: Optional[int] | Omit = omit,
210
+ max_stars: Optional[int] | Omit = omit,
211
+ min_stars: Optional[int] | Omit = omit,
212
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
213
+ # The extra values given here take precedence over values defined on the client or passed to this method.
214
+ extra_headers: Headers | None = None,
215
+ extra_query: Query | None = None,
216
+ extra_body: Body | None = None,
217
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
218
+ ) -> AsyncPaginator[ReviewListResponse, AsyncCursorPage[ReviewListResponse]]:
219
+ """
220
+ List all reviews
221
+
222
+ Args:
223
+ product_id: The ID of the product
224
+
225
+ after: Returns the elements in the list that come after the specified cursor.
226
+
227
+ before: Returns the elements in the list that come before the specified cursor.
228
+
229
+ first: Returns the first _n_ elements from the list.
230
+
231
+ last: Returns the last _n_ elements from the list.
232
+
233
+ max_stars: The maximum star rating of the review (inclusive)
234
+
235
+ min_stars: The minimum star rating of the review (inclusive)
236
+
237
+ extra_headers: Send extra headers
238
+
239
+ extra_query: Add additional query parameters to the request
240
+
241
+ extra_body: Add additional JSON properties to the request
242
+
243
+ timeout: Override the client-level default timeout for this request, in seconds
244
+ """
245
+ return self._get_api_list(
246
+ "/reviews",
247
+ page=AsyncCursorPage[ReviewListResponse],
248
+ options=make_request_options(
249
+ extra_headers=extra_headers,
250
+ extra_query=extra_query,
251
+ extra_body=extra_body,
252
+ timeout=timeout,
253
+ query=maybe_transform(
254
+ {
255
+ "product_id": product_id,
256
+ "after": after,
257
+ "before": before,
258
+ "first": first,
259
+ "last": last,
260
+ "max_stars": max_stars,
261
+ "min_stars": min_stars,
262
+ },
263
+ review_list_params.ReviewListParams,
264
+ ),
265
+ ),
266
+ model=ReviewListResponse,
267
+ )
268
+
269
+
270
+ class ReviewsResourceWithRawResponse:
271
+ def __init__(self, reviews: ReviewsResource) -> None:
272
+ self._reviews = reviews
273
+
274
+ self.retrieve = to_raw_response_wrapper(
275
+ reviews.retrieve,
276
+ )
277
+ self.list = to_raw_response_wrapper(
278
+ reviews.list,
279
+ )
280
+
281
+
282
+ class AsyncReviewsResourceWithRawResponse:
283
+ def __init__(self, reviews: AsyncReviewsResource) -> None:
284
+ self._reviews = reviews
285
+
286
+ self.retrieve = async_to_raw_response_wrapper(
287
+ reviews.retrieve,
288
+ )
289
+ self.list = async_to_raw_response_wrapper(
290
+ reviews.list,
291
+ )
292
+
293
+
294
+ class ReviewsResourceWithStreamingResponse:
295
+ def __init__(self, reviews: ReviewsResource) -> None:
296
+ self._reviews = reviews
297
+
298
+ self.retrieve = to_streamed_response_wrapper(
299
+ reviews.retrieve,
300
+ )
301
+ self.list = to_streamed_response_wrapper(
302
+ reviews.list,
303
+ )
304
+
305
+
306
+ class AsyncReviewsResourceWithStreamingResponse:
307
+ def __init__(self, reviews: AsyncReviewsResource) -> None:
308
+ self._reviews = reviews
309
+
310
+ self.retrieve = async_to_streamed_response_wrapper(
311
+ reviews.retrieve,
312
+ )
313
+ self.list = async_to_streamed_response_wrapper(
314
+ reviews.list,
315
+ )
@@ -2,6 +2,8 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
+ from .course import Course as Course
6
+ from .lesson import Lesson as Lesson
5
7
  from .shared import (
6
8
  App as App,
7
9
  Plan as Plan,
@@ -64,27 +66,44 @@ from .shared import (
64
66
  EmailNotificationPreferences as EmailNotificationPreferences,
65
67
  CourseLessonInteractionListItem as CourseLessonInteractionListItem,
66
68
  )
69
+ from .languages import Languages as Languages
70
+ from .promo_code import PromoCode as PromoCode
71
+ from .card_brands import CardBrands as CardBrands
72
+ from .lesson_types import LessonTypes as LessonTypes
73
+ from .review_status import ReviewStatus as ReviewStatus
74
+ from .course_chapter import CourseChapter as CourseChapter
75
+ from .promo_duration import PromoDuration as PromoDuration
67
76
  from .app_list_params import AppListParams as AppListParams
77
+ from .billing_reasons import BillingReasons as BillingReasons
68
78
  from .plan_list_params import PlanListParams as PlanListParams
69
79
  from .app_create_params import AppCreateParams as AppCreateParams
70
80
  from .app_list_response import AppListResponse as AppListResponse
71
81
  from .app_update_params import AppUpdateParams as AppUpdateParams
72
82
  from .entry_list_params import EntryListParams as EntryListParams
73
83
  from .forum_list_params import ForumListParams as ForumListParams
84
+ from .promo_code_status import PromoCodeStatus as PromoCodeStatus
85
+ from .course_list_params import CourseListParams as CourseListParams
74
86
  from .member_list_params import MemberListParams as MemberListParams
75
87
  from .plan_create_params import PlanCreateParams as PlanCreateParams
76
88
  from .plan_list_response import PlanListResponse as PlanListResponse
77
89
  from .plan_update_params import PlanUpdateParams as PlanUpdateParams
90
+ from .review_list_params import ReviewListParams as ReviewListParams
78
91
  from .entry_list_response import EntryListResponse as EntryListResponse
79
92
  from .forum_list_response import ForumListResponse as ForumListResponse
80
93
  from .forum_update_params import ForumUpdateParams as ForumUpdateParams
81
94
  from .invoice_list_params import InvoiceListParams as InvoiceListParams
95
+ from .lesson_visibilities import LessonVisibilities as LessonVisibilities
82
96
  from .message_list_params import MessageListParams as MessageListParams
83
97
  from .payment_list_params import PaymentListParams as PaymentListParams
84
98
  from .product_list_params import ProductListParams as ProductListParams
99
+ from .course_create_params import CourseCreateParams as CourseCreateParams
100
+ from .course_list_response import CourseListResponse as CourseListResponse
101
+ from .course_update_params import CourseUpdateParams as CourseUpdateParams
85
102
  from .member_list_response import MemberListResponse as MemberListResponse
103
+ from .payment_method_types import PaymentMethodTypes as PaymentMethodTypes
86
104
  from .plan_delete_response import PlanDeleteResponse as PlanDeleteResponse
87
105
  from .reaction_list_params import ReactionListParams as ReactionListParams
106
+ from .review_list_response import ReviewListResponse as ReviewListResponse
88
107
  from .shipment_list_params import ShipmentListParams as ShipmentListParams
89
108
  from .transfer_list_params import TransferListParams as TransferListParams
90
109
  from .unwrap_webhook_event import UnwrapWebhookEvent as UnwrapWebhookEvent
@@ -93,14 +112,17 @@ from .invoice_create_params import InvoiceCreateParams as InvoiceCreateParams
93
112
  from .invoice_void_response import InvoiceVoidResponse as InvoiceVoidResponse
94
113
  from .message_create_params import MessageCreateParams as MessageCreateParams
95
114
  from .message_list_response import MessageListResponse as MessageListResponse
115
+ from .message_update_params import MessageUpdateParams as MessageUpdateParams
96
116
  from .payment_list_response import PaymentListResponse as PaymentListResponse
97
117
  from .payment_refund_params import PaymentRefundParams as PaymentRefundParams
98
118
  from .product_create_params import ProductCreateParams as ProductCreateParams
99
119
  from .product_update_params import ProductUpdateParams as ProductUpdateParams
120
+ from .course_delete_response import CourseDeleteResponse as CourseDeleteResponse
100
121
  from .entry_approve_response import EntryApproveResponse as EntryApproveResponse
101
122
  from .experience_list_params import ExperienceListParams as ExperienceListParams
102
123
  from .forum_post_list_params import ForumPostListParams as ForumPostListParams
103
124
  from .membership_list_params import MembershipListParams as MembershipListParams
125
+ from .promo_code_list_params import PromoCodeListParams as PromoCodeListParams
104
126
  from .reaction_create_params import ReactionCreateParams as ReactionCreateParams
105
127
  from .reaction_list_response import ReactionListResponse as ReactionListResponse
106
128
  from .shipment_create_params import ShipmentCreateParams as ShipmentCreateParams
@@ -121,28 +143,45 @@ from .experience_list_response import ExperienceListResponse as ExperienceListRe
121
143
  from .experience_update_params import ExperienceUpdateParams as ExperienceUpdateParams
122
144
  from .forum_post_create_params import ForumPostCreateParams as ForumPostCreateParams
123
145
  from .forum_post_list_response import ForumPostListResponse as ForumPostListResponse
146
+ from .forum_post_update_params import ForumPostUpdateParams as ForumPostUpdateParams
124
147
  from .member_retrieve_response import MemberRetrieveResponse as MemberRetrieveResponse
125
148
  from .membership_cancel_params import MembershipCancelParams as MembershipCancelParams
126
149
  from .membership_list_response import MembershipListResponse as MembershipListResponse
127
150
  from .membership_update_params import MembershipUpdateParams as MembershipUpdateParams
151
+ from .promo_code_create_params import PromoCodeCreateParams as PromoCodeCreateParams
152
+ from .promo_code_list_response import PromoCodeListResponse as PromoCodeListResponse
153
+ from .review_retrieve_response import ReviewRetrieveResponse as ReviewRetrieveResponse
154
+ from .assessment_question_types import AssessmentQuestionTypes as AssessmentQuestionTypes
155
+ from .course_lesson_list_params import CourseLessonListParams as CourseLessonListParams
128
156
  from .chat_channel_list_response import ChatChannelListResponse as ChatChannelListResponse
129
157
  from .chat_channel_update_params import ChatChannelUpdateParams as ChatChannelUpdateParams
158
+ from .course_chapter_list_params import CourseChapterListParams as CourseChapterListParams
130
159
  from .entry_denied_webhook_event import EntryDeniedWebhookEvent as EntryDeniedWebhookEvent
131
160
  from .experience_delete_response import ExperienceDeleteResponse as ExperienceDeleteResponse
132
161
  from .invoice_paid_webhook_event import InvoicePaidWebhookEvent as InvoicePaidWebhookEvent
162
+ from .promo_code_delete_response import PromoCodeDeleteResponse as PromoCodeDeleteResponse
133
163
  from .user_check_access_response import UserCheckAccessResponse as UserCheckAccessResponse
134
164
  from .authorized_user_list_params import AuthorizedUserListParams as AuthorizedUserListParams
165
+ from .course_lesson_create_params import CourseLessonCreateParams as CourseLessonCreateParams
166
+ from .course_lesson_list_response import CourseLessonListResponse as CourseLessonListResponse
167
+ from .course_lesson_update_params import CourseLessonUpdateParams as CourseLessonUpdateParams
135
168
  from .entry_created_webhook_event import EntryCreatedWebhookEvent as EntryCreatedWebhookEvent
136
169
  from .entry_deleted_webhook_event import EntryDeletedWebhookEvent as EntryDeletedWebhookEvent
170
+ from .experience_duplicate_params import ExperienceDuplicateParams as ExperienceDuplicateParams
137
171
  from .support_channel_list_params import SupportChannelListParams as SupportChannelListParams
172
+ from .course_chapter_create_params import CourseChapterCreateParams as CourseChapterCreateParams
173
+ from .course_chapter_list_response import CourseChapterListResponse as CourseChapterListResponse
174
+ from .course_chapter_update_params import CourseChapterUpdateParams as CourseChapterUpdateParams
138
175
  from .entry_approved_webhook_event import EntryApprovedWebhookEvent as EntryApprovedWebhookEvent
139
176
  from .invoice_voided_webhook_event import InvoiceVoidedWebhookEvent as InvoiceVoidedWebhookEvent
140
177
  from .payment_failed_webhook_event import PaymentFailedWebhookEvent as PaymentFailedWebhookEvent
141
178
  from .authorized_user_list_response import AuthorizedUserListResponse as AuthorizedUserListResponse
179
+ from .course_lesson_delete_response import CourseLessonDeleteResponse as CourseLessonDeleteResponse
142
180
  from .invoice_created_webhook_event import InvoiceCreatedWebhookEvent as InvoiceCreatedWebhookEvent
143
181
  from .payment_pending_webhook_event import PaymentPendingWebhookEvent as PaymentPendingWebhookEvent
144
182
  from .support_channel_create_params import SupportChannelCreateParams as SupportChannelCreateParams
145
183
  from .support_channel_list_response import SupportChannelListResponse as SupportChannelListResponse
184
+ from .course_chapter_delete_response import CourseChapterDeleteResponse as CourseChapterDeleteResponse
146
185
  from .invoice_past_due_webhook_event import InvoicePastDueWebhookEvent as InvoicePastDueWebhookEvent
147
186
  from .payment_succeeded_webhook_event import PaymentSucceededWebhookEvent as PaymentSucceededWebhookEvent
148
187
  from .ledger_account_retrieve_response import LedgerAccountRetrieveResponse as LedgerAccountRetrieveResponse
@@ -0,0 +1,7 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing_extensions import Literal, TypeAlias
4
+
5
+ __all__ = ["AssessmentQuestionTypes"]
6
+
7
+ AssessmentQuestionTypes: TypeAlias = Literal["short_answer", "true_false", "multiple_choice", "multiple_select"]
@@ -0,0 +1,9 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing_extensions import Literal, TypeAlias
4
+
5
+ __all__ = ["BillingReasons"]
6
+
7
+ BillingReasons: TypeAlias = Literal[
8
+ "subscription_create", "subscription_cycle", "subscription_update", "one_time", "manual", "subscription"
9
+ ]
@@ -0,0 +1,24 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing_extensions import Literal, TypeAlias
4
+
5
+ __all__ = ["CardBrands"]
6
+
7
+ CardBrands: TypeAlias = Literal[
8
+ "mastercard",
9
+ "visa",
10
+ "amex",
11
+ "discover",
12
+ "unionpay",
13
+ "jcb",
14
+ "diners",
15
+ "link",
16
+ "troy",
17
+ "visadankort",
18
+ "visabancontact",
19
+ "china_union_pay",
20
+ "rupay",
21
+ "jcbrupay",
22
+ "elo",
23
+ "unknown",
24
+ ]
@@ -9,9 +9,12 @@ from .shared.currency import Currency
9
9
  from .shared.tax_type import TaxType
10
10
  from .shared.plan_type import PlanType
11
11
  from .shared.visibility import Visibility
12
+ from .shared.business_types import BusinessTypes
13
+ from .shared.industry_types import IndustryTypes
12
14
  from .shared.release_method import ReleaseMethod
15
+ from .shared.global_affiliate_status import GlobalAffiliateStatus
13
16
 
14
- __all__ = ["CheckoutConfigurationCreateParams", "Plan", "PlanCustomField", "PlanImage"]
17
+ __all__ = ["CheckoutConfigurationCreateParams", "Plan", "PlanCustomField", "PlanImage", "PlanProduct"]
15
18
 
16
19
 
17
20
  class CheckoutConfigurationCreateParams(TypedDict, total=False):
@@ -67,6 +70,59 @@ class PlanImage(TypedDict, total=False):
67
70
  """
68
71
 
69
72
 
73
+ class PlanProduct(TypedDict, total=False):
74
+ external_identifier: Required[str]
75
+ """A unique ID used to find or create a product.
76
+
77
+ When provided during creation, we will look for an existing product with this
78
+ external identifier — if found, it will be updated; otherwise, a new product
79
+ will be created.
80
+ """
81
+
82
+ title: Required[str]
83
+ """The title of the product."""
84
+
85
+ business_type: Optional[BusinessTypes]
86
+ """The different business types a company can be."""
87
+
88
+ collect_shipping_address: Optional[bool]
89
+ """Whether or not to collect shipping information at checkout from the customer."""
90
+
91
+ custom_statement_descriptor: Optional[str]
92
+ """The custom statement descriptor for the product i.e.
93
+
94
+ WHOP\\**SPORTS, must be between 5 and 22 characters, contain at least one letter,
95
+ and not contain any of the following characters: <, >, \\,, ', "
96
+ """
97
+
98
+ description: Optional[str]
99
+ """A written description of the product."""
100
+
101
+ global_affiliate_percentage: Optional[float]
102
+ """The percentage of the revenue that goes to the global affiliate program."""
103
+
104
+ global_affiliate_status: Optional[GlobalAffiliateStatus]
105
+ """The different statuses of the global affiliate program for an access pass."""
106
+
107
+ headline: Optional[str]
108
+ """The headline of the product."""
109
+
110
+ industry_type: Optional[IndustryTypes]
111
+ """The different industry types a company can be in."""
112
+
113
+ product_tax_code_id: Optional[str]
114
+ """The ID of the product tax code to apply to this product."""
115
+
116
+ redirect_purchase_url: Optional[str]
117
+ """The URL to redirect the customer to after a purchase."""
118
+
119
+ route: Optional[str]
120
+ """The route of the product."""
121
+
122
+ visibility: Optional[Visibility]
123
+ """Visibility of a resource"""
124
+
125
+
70
126
  class Plan(TypedDict, total=False):
71
127
  company_id: Required[str]
72
128
  """The company the plan should be created for."""
@@ -110,8 +166,15 @@ class Plan(TypedDict, total=False):
110
166
  plan_type: Optional[PlanType]
111
167
  """The type of plan that can be attached to an access pass"""
112
168
 
169
+ product: Optional[PlanProduct]
170
+ """Pass this object to create a new product for this plan.
171
+
172
+ We will use the product external identifier to find or create an existing
173
+ product.
174
+ """
175
+
113
176
  product_id: Optional[str]
114
- """The product the plan is related to."""
177
+ """The product the plan is related to. Either this or product is required."""
115
178
 
116
179
  release_method: Optional[ReleaseMethod]
117
180
  """The methods of how a plan can be released."""
@@ -60,7 +60,10 @@ class CheckoutConfigurationListResponse(BaseModel):
60
60
  """The plan to use for the checkout configuration"""
61
61
 
62
62
  purchase_url: str
63
- """The URL to redirect the user to after the checkout configuration is created"""
63
+ """A URL you can send to customers to complete a checkout.
64
+
65
+ It looks like `/checkout/plan_xxxx?session={id}`
66
+ """
64
67
 
65
68
  redirect_url: Optional[str] = None
66
69
  """The URL to redirect the user to after the checkout configuration is created"""