whop-sdk 0.0.1__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 (212) hide show
  1. whop_sdk/__init__.py +94 -0
  2. whop_sdk/_base_client.py +1995 -0
  3. whop_sdk/_client.py +664 -0
  4. whop_sdk/_compat.py +219 -0
  5. whop_sdk/_constants.py +14 -0
  6. whop_sdk/_exceptions.py +112 -0
  7. whop_sdk/_files.py +123 -0
  8. whop_sdk/_models.py +835 -0
  9. whop_sdk/_qs.py +150 -0
  10. whop_sdk/_resource.py +43 -0
  11. whop_sdk/_response.py +830 -0
  12. whop_sdk/_streaming.py +333 -0
  13. whop_sdk/_types.py +260 -0
  14. whop_sdk/_utils/__init__.py +64 -0
  15. whop_sdk/_utils/_compat.py +45 -0
  16. whop_sdk/_utils/_datetime_parse.py +136 -0
  17. whop_sdk/_utils/_logs.py +25 -0
  18. whop_sdk/_utils/_proxy.py +65 -0
  19. whop_sdk/_utils/_reflection.py +42 -0
  20. whop_sdk/_utils/_resources_proxy.py +24 -0
  21. whop_sdk/_utils/_streams.py +12 -0
  22. whop_sdk/_utils/_sync.py +86 -0
  23. whop_sdk/_utils/_transform.py +457 -0
  24. whop_sdk/_utils/_typing.py +156 -0
  25. whop_sdk/_utils/_utils.py +421 -0
  26. whop_sdk/_version.py +4 -0
  27. whop_sdk/lib/.keep +4 -0
  28. whop_sdk/pagination.py +61 -0
  29. whop_sdk/py.typed +0 -0
  30. whop_sdk/resources/__init__.py +316 -0
  31. whop_sdk/resources/app_builds.py +562 -0
  32. whop_sdk/resources/apps.py +665 -0
  33. whop_sdk/resources/authorized_users.py +336 -0
  34. whop_sdk/resources/chat_channels.py +469 -0
  35. whop_sdk/resources/checkout_configurations.py +464 -0
  36. whop_sdk/resources/companies.py +171 -0
  37. whop_sdk/resources/course_lesson_interactions.py +343 -0
  38. whop_sdk/resources/entries.py +539 -0
  39. whop_sdk/resources/experiences.py +859 -0
  40. whop_sdk/resources/forum_posts.py +512 -0
  41. whop_sdk/resources/invoices.py +633 -0
  42. whop_sdk/resources/ledger_accounts.py +171 -0
  43. whop_sdk/resources/memberships.py +810 -0
  44. whop_sdk/resources/messages.py +446 -0
  45. whop_sdk/resources/payments.py +761 -0
  46. whop_sdk/resources/plans.py +906 -0
  47. whop_sdk/resources/products.py +969 -0
  48. whop_sdk/resources/reactions.py +423 -0
  49. whop_sdk/resources/shipments.py +451 -0
  50. whop_sdk/resources/support_channels.py +455 -0
  51. whop_sdk/resources/transfers.py +488 -0
  52. whop_sdk/resources/users.py +248 -0
  53. whop_sdk/resources/webhooks.py +69 -0
  54. whop_sdk/types/__init__.py +135 -0
  55. whop_sdk/types/app_build_create_params.py +59 -0
  56. whop_sdk/types/app_build_list_params.py +34 -0
  57. whop_sdk/types/app_build_list_response.py +50 -0
  58. whop_sdk/types/app_create_params.py +19 -0
  59. whop_sdk/types/app_list_params.py +54 -0
  60. whop_sdk/types/app_list_response.py +91 -0
  61. whop_sdk/types/app_update_params.py +58 -0
  62. whop_sdk/types/authorized_user_list_params.py +33 -0
  63. whop_sdk/types/authorized_user_list_response.py +33 -0
  64. whop_sdk/types/authorized_user_retrieve_response.py +33 -0
  65. whop_sdk/types/chat_channel_list_params.py +28 -0
  66. whop_sdk/types/chat_channel_list_response.py +43 -0
  67. whop_sdk/types/chat_channel_update_params.py +32 -0
  68. whop_sdk/types/checkout_configuration_create_params.py +129 -0
  69. whop_sdk/types/checkout_configuration_list_params.py +33 -0
  70. whop_sdk/types/checkout_configuration_list_response.py +66 -0
  71. whop_sdk/types/course_lesson_interaction_list_params.py +34 -0
  72. whop_sdk/types/entry_approve_response.py +10 -0
  73. whop_sdk/types/entry_list_params.py +44 -0
  74. whop_sdk/types/entry_list_response.py +56 -0
  75. whop_sdk/types/experience_attach_params.py +12 -0
  76. whop_sdk/types/experience_create_params.py +22 -0
  77. whop_sdk/types/experience_delete_response.py +7 -0
  78. whop_sdk/types/experience_detach_params.py +12 -0
  79. whop_sdk/types/experience_list_params.py +31 -0
  80. whop_sdk/types/experience_list_response.py +47 -0
  81. whop_sdk/types/experience_update_params.py +41 -0
  82. whop_sdk/types/forum_post_create_params.py +85 -0
  83. whop_sdk/types/forum_post_list_params.py +31 -0
  84. whop_sdk/types/forum_post_list_response.py +53 -0
  85. whop_sdk/types/invoice_create_params.py +137 -0
  86. whop_sdk/types/invoice_create_response.py +16 -0
  87. whop_sdk/types/invoice_created_webhook_event.py +26 -0
  88. whop_sdk/types/invoice_list_params.py +50 -0
  89. whop_sdk/types/invoice_paid_webhook_event.py +26 -0
  90. whop_sdk/types/invoice_past_due_webhook_event.py +26 -0
  91. whop_sdk/types/invoice_void_response.py +7 -0
  92. whop_sdk/types/invoice_voided_webhook_event.py +26 -0
  93. whop_sdk/types/ledger_account_retrieve_response.py +78 -0
  94. whop_sdk/types/membership_cancel_params.py +13 -0
  95. whop_sdk/types/membership_list_params.py +70 -0
  96. whop_sdk/types/membership_list_response.py +117 -0
  97. whop_sdk/types/membership_pause_params.py +16 -0
  98. whop_sdk/types/membership_update_params.py +13 -0
  99. whop_sdk/types/message_create_params.py +51 -0
  100. whop_sdk/types/message_list_params.py +30 -0
  101. whop_sdk/types/message_list_response.py +90 -0
  102. whop_sdk/types/payment_list_params.py +72 -0
  103. whop_sdk/types/payment_list_response.py +221 -0
  104. whop_sdk/types/payment_refund_params.py +13 -0
  105. whop_sdk/types/plan_create_params.py +106 -0
  106. whop_sdk/types/plan_delete_response.py +7 -0
  107. whop_sdk/types/plan_list_params.py +49 -0
  108. whop_sdk/types/plan_list_response.py +92 -0
  109. whop_sdk/types/plan_update_params.py +95 -0
  110. whop_sdk/types/product_create_params.py +170 -0
  111. whop_sdk/types/product_delete_response.py +7 -0
  112. whop_sdk/types/product_list_params.py +41 -0
  113. whop_sdk/types/product_update_params.py +90 -0
  114. whop_sdk/types/reaction_create_params.py +19 -0
  115. whop_sdk/types/reaction_list_params.py +25 -0
  116. whop_sdk/types/reaction_list_response.py +32 -0
  117. whop_sdk/types/shared/__init__.py +55 -0
  118. whop_sdk/types/shared/access_pass_type.py +7 -0
  119. whop_sdk/types/shared/app.py +159 -0
  120. whop_sdk/types/shared/app_build.py +50 -0
  121. whop_sdk/types/shared/app_build_platforms.py +7 -0
  122. whop_sdk/types/shared/app_build_statuses.py +7 -0
  123. whop_sdk/types/shared/app_statuses.py +7 -0
  124. whop_sdk/types/shared/app_view_type.py +7 -0
  125. whop_sdk/types/shared/authorized_user_roles.py +9 -0
  126. whop_sdk/types/shared/business_types.py +22 -0
  127. whop_sdk/types/shared/chat_channel.py +43 -0
  128. whop_sdk/types/shared/checkout_configuration.py +66 -0
  129. whop_sdk/types/shared/collection_method.py +7 -0
  130. whop_sdk/types/shared/company.py +71 -0
  131. whop_sdk/types/shared/course_lesson_interaction.py +44 -0
  132. whop_sdk/types/shared/course_lesson_interaction_list_item.py +44 -0
  133. whop_sdk/types/shared/currency.py +92 -0
  134. whop_sdk/types/shared/custom_cta.py +21 -0
  135. whop_sdk/types/shared/direction.py +7 -0
  136. whop_sdk/types/shared/dms_post_types.py +7 -0
  137. whop_sdk/types/shared/entry.py +70 -0
  138. whop_sdk/types/shared/entry_status.py +7 -0
  139. whop_sdk/types/shared/experience.py +66 -0
  140. whop_sdk/types/shared/forum_post.py +53 -0
  141. whop_sdk/types/shared/friendly_receipt_status.py +24 -0
  142. whop_sdk/types/shared/global_affiliate_status.py +7 -0
  143. whop_sdk/types/shared/industry_types.py +67 -0
  144. whop_sdk/types/shared/invoice.py +61 -0
  145. whop_sdk/types/shared/invoice_list_item.py +61 -0
  146. whop_sdk/types/shared/invoice_status.py +7 -0
  147. whop_sdk/types/shared/membership.py +117 -0
  148. whop_sdk/types/shared/membership_status.py +9 -0
  149. whop_sdk/types/shared/message.py +90 -0
  150. whop_sdk/types/shared/page_info.py +21 -0
  151. whop_sdk/types/shared/payment.py +211 -0
  152. whop_sdk/types/shared/plan.py +123 -0
  153. whop_sdk/types/shared/plan_type.py +7 -0
  154. whop_sdk/types/shared/product.py +124 -0
  155. whop_sdk/types/shared/product_list_item.py +49 -0
  156. whop_sdk/types/shared/promo_type.py +7 -0
  157. whop_sdk/types/shared/reaction.py +32 -0
  158. whop_sdk/types/shared/receipt_status.py +7 -0
  159. whop_sdk/types/shared/release_method.py +7 -0
  160. whop_sdk/types/shared/shipment.py +48 -0
  161. whop_sdk/types/shared/shipment_carrier.py +84 -0
  162. whop_sdk/types/shared/shipment_status.py +18 -0
  163. whop_sdk/types/shared/shipment_substatus.py +36 -0
  164. whop_sdk/types/shared/support_channel.py +39 -0
  165. whop_sdk/types/shared/tax_type.py +7 -0
  166. whop_sdk/types/shared/transfer.py +109 -0
  167. whop_sdk/types/shared/visibility.py +7 -0
  168. whop_sdk/types/shared/visibility_filter.py +9 -0
  169. whop_sdk/types/shared/who_can_post.py +7 -0
  170. whop_sdk/types/shared/who_can_react.py +7 -0
  171. whop_sdk/types/shared_params/__init__.py +27 -0
  172. whop_sdk/types/shared_params/access_pass_type.py +9 -0
  173. whop_sdk/types/shared_params/app_build_platforms.py +9 -0
  174. whop_sdk/types/shared_params/app_build_statuses.py +9 -0
  175. whop_sdk/types/shared_params/app_statuses.py +9 -0
  176. whop_sdk/types/shared_params/app_view_type.py +9 -0
  177. whop_sdk/types/shared_params/authorized_user_roles.py +11 -0
  178. whop_sdk/types/shared_params/business_types.py +24 -0
  179. whop_sdk/types/shared_params/collection_method.py +9 -0
  180. whop_sdk/types/shared_params/currency.py +94 -0
  181. whop_sdk/types/shared_params/custom_cta.py +23 -0
  182. whop_sdk/types/shared_params/direction.py +9 -0
  183. whop_sdk/types/shared_params/entry_status.py +9 -0
  184. whop_sdk/types/shared_params/friendly_receipt_status.py +26 -0
  185. whop_sdk/types/shared_params/global_affiliate_status.py +9 -0
  186. whop_sdk/types/shared_params/industry_types.py +69 -0
  187. whop_sdk/types/shared_params/invoice_status.py +9 -0
  188. whop_sdk/types/shared_params/membership_status.py +11 -0
  189. whop_sdk/types/shared_params/plan_type.py +9 -0
  190. whop_sdk/types/shared_params/receipt_status.py +9 -0
  191. whop_sdk/types/shared_params/release_method.py +9 -0
  192. whop_sdk/types/shared_params/tax_type.py +9 -0
  193. whop_sdk/types/shared_params/visibility.py +9 -0
  194. whop_sdk/types/shared_params/visibility_filter.py +11 -0
  195. whop_sdk/types/shared_params/who_can_post.py +9 -0
  196. whop_sdk/types/shared_params/who_can_react.py +9 -0
  197. whop_sdk/types/shipment_create_params.py +18 -0
  198. whop_sdk/types/shipment_list_params.py +31 -0
  199. whop_sdk/types/shipment_list_response.py +48 -0
  200. whop_sdk/types/support_channel_create_params.py +15 -0
  201. whop_sdk/types/support_channel_list_params.py +40 -0
  202. whop_sdk/types/support_channel_list_response.py +39 -0
  203. whop_sdk/types/transfer_create_params.py +36 -0
  204. whop_sdk/types/transfer_list_params.py +42 -0
  205. whop_sdk/types/transfer_list_response.py +35 -0
  206. whop_sdk/types/unwrap_webhook_event.py +15 -0
  207. whop_sdk/types/user_check_access_response.py +15 -0
  208. whop_sdk/types/user_retrieve_response.py +25 -0
  209. whop_sdk-0.0.1.dist-info/METADATA +522 -0
  210. whop_sdk-0.0.1.dist-info/RECORD +212 -0
  211. whop_sdk-0.0.1.dist-info/WHEEL +4 -0
  212. whop_sdk-0.0.1.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,221 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+ from datetime import datetime
5
+
6
+ from .._models import BaseModel
7
+ from .shared.currency import Currency
8
+ from .shared.promo_type import PromoType
9
+ from .shared.receipt_status import ReceiptStatus
10
+ from .shared.membership_status import MembershipStatus
11
+ from .shared.friendly_receipt_status import FriendlyReceiptStatus
12
+
13
+ __all__ = [
14
+ "PaymentListResponse",
15
+ "BillingAddress",
16
+ "Company",
17
+ "Member",
18
+ "Membership",
19
+ "Plan",
20
+ "Product",
21
+ "PromoCode",
22
+ "User",
23
+ ]
24
+
25
+
26
+ class BillingAddress(BaseModel):
27
+ city: Optional[str] = None
28
+ """The city of the address."""
29
+
30
+ country: Optional[str] = None
31
+ """The country of the address."""
32
+
33
+ line1: Optional[str] = None
34
+ """The line 1 of the address."""
35
+
36
+ line2: Optional[str] = None
37
+ """The line 2 of the address."""
38
+
39
+ name: Optional[str] = None
40
+ """The name of the customer."""
41
+
42
+ postal_code: Optional[str] = None
43
+ """The postal code of the address."""
44
+
45
+ state: Optional[str] = None
46
+ """The state of the address."""
47
+
48
+
49
+ class Company(BaseModel):
50
+ id: str
51
+ """The ID of the company"""
52
+
53
+ route: str
54
+ """The slug/route of the company on the Whop site."""
55
+
56
+ title: str
57
+ """The written name of the company."""
58
+
59
+
60
+ class Member(BaseModel):
61
+ id: str
62
+ """The ID of the member"""
63
+
64
+ phone: Optional[str] = None
65
+ """The phone number for the member, if available."""
66
+
67
+
68
+ class Membership(BaseModel):
69
+ id: str
70
+ """The internal ID of the membership."""
71
+
72
+ status: MembershipStatus
73
+ """The state of the membership."""
74
+
75
+
76
+ class Plan(BaseModel):
77
+ id: str
78
+ """The internal ID of the plan."""
79
+
80
+
81
+ class Product(BaseModel):
82
+ id: str
83
+ """The internal ID of the public product."""
84
+
85
+ route: str
86
+ """The route of the product."""
87
+
88
+ title: str
89
+ """The title of the product. Use for Whop 4.0."""
90
+
91
+
92
+ class PromoCode(BaseModel):
93
+ id: str
94
+ """The ID of the promo."""
95
+
96
+ amount_off: float
97
+ """The amount off (% or flat amount) for the promo."""
98
+
99
+ base_currency: Currency
100
+ """The monetary currency of the promo code."""
101
+
102
+ code: Optional[str] = None
103
+ """The specific code used to apply the promo at checkout."""
104
+
105
+ number_of_intervals: Optional[int] = None
106
+ """The number of billing cycles the promo is applied for."""
107
+
108
+ promo_type: PromoType
109
+ """The type (% or flat amount) of the promo."""
110
+
111
+
112
+ class User(BaseModel):
113
+ id: str
114
+ """The internal ID of the user."""
115
+
116
+ email: Optional[str] = None
117
+ """The email of the user"""
118
+
119
+ name: Optional[str] = None
120
+ """The name of the user from their Whop account."""
121
+
122
+ username: str
123
+ """The username of the user from their Whop account."""
124
+
125
+
126
+ class PaymentListResponse(BaseModel):
127
+ id: str
128
+ """The payment ID"""
129
+
130
+ amount_after_fees: float
131
+ """How much the payment is for after fees"""
132
+
133
+ auto_refunded: bool
134
+ """Whether this payment was auto refunded or not"""
135
+
136
+ billing_address: Optional[BillingAddress] = None
137
+ """The address of the user who made the payment."""
138
+
139
+ billing_reason: Optional[str] = None
140
+ """The billing reason"""
141
+
142
+ card_brand: Optional[str] = None
143
+ """The type of card used as the payment method."""
144
+
145
+ card_last4: Optional[str] = None
146
+ """The last 4 digits of the card used to make the payment."""
147
+
148
+ company: Optional[Company] = None
149
+ """The company for the payment."""
150
+
151
+ created_at: datetime
152
+ """The datetime the payment was created"""
153
+
154
+ currency: Optional[Currency] = None
155
+ """The available currencies on the platform"""
156
+
157
+ dispute_alerted_at: Optional[datetime] = None
158
+ """When an alert came in that this transaction will be disputed"""
159
+
160
+ failure_message: Optional[str] = None
161
+ """If the payment failed, the reason for the failure."""
162
+
163
+ last_payment_attempt: Optional[datetime] = None
164
+ """The time of the last payment attempt."""
165
+
166
+ member: Optional[Member] = None
167
+ """The member attached to this payment."""
168
+
169
+ membership: Optional[Membership] = None
170
+ """The membership attached to this payment."""
171
+
172
+ paid_at: Optional[datetime] = None
173
+ """The datetime the payment was paid"""
174
+
175
+ payment_method_type: Optional[str] = None
176
+ """Returns the type of payment method used for the payment, if available.
177
+
178
+ Ex. klarna, affirm, card, cashapp
179
+ """
180
+
181
+ plan: Optional[Plan] = None
182
+ """The plan attached to this payment."""
183
+
184
+ product: Optional[Product] = None
185
+ """The access pass attached to this payment."""
186
+
187
+ promo_code: Optional[PromoCode] = None
188
+ """The promo code used for this payment."""
189
+
190
+ refundable: bool
191
+ """Whether the payment can be refunded."""
192
+
193
+ refunded_amount: Optional[float] = None
194
+ """The payment refund amount(if applicable)."""
195
+
196
+ refunded_at: Optional[datetime] = None
197
+ """When the payment was refunded (if applicable)."""
198
+
199
+ retryable: bool
200
+ """Whether the payment can be retried."""
201
+
202
+ status: Optional[ReceiptStatus] = None
203
+ """The status of a receipt"""
204
+
205
+ substatus: FriendlyReceiptStatus
206
+ """The friendly status of the payment."""
207
+
208
+ subtotal: Optional[float] = None
209
+ """The subtotal to show to the creator (excluding buyer fees)."""
210
+
211
+ total: Optional[float] = None
212
+ """The total to show to the creator (excluding buyer fees)."""
213
+
214
+ usd_total: Optional[float] = None
215
+ """The total in USD to show to the creator (excluding buyer fees)."""
216
+
217
+ user: Optional[User] = None
218
+ """The user that made this payment."""
219
+
220
+ voidable: bool
221
+ """Whether the payment can be voided."""
@@ -0,0 +1,13 @@
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
+ from typing_extensions import TypedDict
7
+
8
+ __all__ = ["PaymentRefundParams"]
9
+
10
+
11
+ class PaymentRefundParams(TypedDict, total=False):
12
+ partial_amount: Optional[float]
13
+ """An amount if the refund is supposed to be partial."""
@@ -0,0 +1,106 @@
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 Iterable, Optional
6
+ from typing_extensions import Literal, Required, TypedDict
7
+
8
+ from .shared.currency import Currency
9
+ from .shared.tax_type import TaxType
10
+ from .shared.plan_type import PlanType
11
+ from .shared.visibility import Visibility
12
+ from .shared.release_method import ReleaseMethod
13
+
14
+ __all__ = ["PlanCreateParams", "CustomField", "Image"]
15
+
16
+
17
+ class PlanCreateParams(TypedDict, total=False):
18
+ company_id: Required[str]
19
+ """The company the plan should be created for."""
20
+
21
+ product_id: Required[str]
22
+ """The product the plan is related to."""
23
+
24
+ billing_period: Optional[int]
25
+ """The interval at which the plan charges (renewal plans)."""
26
+
27
+ currency: Optional[Currency]
28
+ """The available currencies on the platform"""
29
+
30
+ custom_fields: Optional[Iterable[CustomField]]
31
+ """An array of custom field objects."""
32
+
33
+ description: Optional[str]
34
+ """The description of the plan."""
35
+
36
+ expiration_days: Optional[int]
37
+ """The interval at which the plan charges (expiration plans)."""
38
+
39
+ image: Optional[Image]
40
+ """An image for the plan. This will be visible on the product page to customers."""
41
+
42
+ initial_price: Optional[float]
43
+ """An additional amount charged upon first purchase."""
44
+
45
+ internal_notes: Optional[str]
46
+ """A personal description or notes section for the business."""
47
+
48
+ override_tax_type: Optional[TaxType]
49
+ """
50
+ Whether or not the tax is included in a plan's price (or if it hasn't been set
51
+ up)
52
+ """
53
+
54
+ plan_type: Optional[PlanType]
55
+ """The type of plan that can be attached to an access pass"""
56
+
57
+ release_method: Optional[ReleaseMethod]
58
+ """The methods of how a plan can be released."""
59
+
60
+ renewal_price: Optional[float]
61
+ """The amount the customer is charged every billing period."""
62
+
63
+ title: Optional[str]
64
+ """The title of the plan. This will be visible on the product page to customers."""
65
+
66
+ trial_period_days: Optional[int]
67
+ """The number of free trial days added before a renewal plan."""
68
+
69
+ visibility: Optional[Visibility]
70
+ """Visibility of a resource"""
71
+
72
+
73
+ class CustomField(TypedDict, total=False):
74
+ field_type: Required[Literal["text"]]
75
+ """The type of the custom field."""
76
+
77
+ name: Required[str]
78
+ """The name of the custom field."""
79
+
80
+ id: Optional[str]
81
+ """The ID of the custom field (if being updated)"""
82
+
83
+ order: Optional[int]
84
+ """The order of the field."""
85
+
86
+ placeholder: Optional[str]
87
+ """The placeholder value of the field."""
88
+
89
+ required: Optional[bool]
90
+ """Whether or not the field is required."""
91
+
92
+
93
+ class Image(TypedDict, total=False):
94
+ id: Optional[str]
95
+ """The ID of an existing attachment object.
96
+
97
+ Use this when updating a resource and keeping a subset of the attachments. Don't
98
+ use this unless you know what you're doing.
99
+ """
100
+
101
+ direct_upload_id: Optional[str]
102
+ """This ID should be used the first time you upload an attachment.
103
+
104
+ It is the ID of the direct upload that was created when uploading the file to S3
105
+ via the mediaDirectUpload mutation.
106
+ """
@@ -0,0 +1,7 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing_extensions import TypeAlias
4
+
5
+ __all__ = ["PlanDeleteResponse"]
6
+
7
+ PlanDeleteResponse: TypeAlias = bool
@@ -0,0 +1,49 @@
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 List, Optional
6
+ from typing_extensions import Literal, Required, TypedDict
7
+
8
+ from .._types import SequenceNotStr
9
+ from .shared.direction import Direction
10
+ from .shared.plan_type import PlanType
11
+ from .shared.release_method import ReleaseMethod
12
+ from .shared.visibility_filter import VisibilityFilter
13
+
14
+ __all__ = ["PlanListParams"]
15
+
16
+
17
+ class PlanListParams(TypedDict, total=False):
18
+ company_id: Required[str]
19
+ """The ID of the company"""
20
+
21
+ after: Optional[str]
22
+ """Returns the elements in the list that come after the specified cursor."""
23
+
24
+ before: Optional[str]
25
+ """Returns the elements in the list that come before the specified cursor."""
26
+
27
+ direction: Optional[Direction]
28
+ """The direction of the sort."""
29
+
30
+ first: Optional[int]
31
+ """Returns the first _n_ elements from the list."""
32
+
33
+ last: Optional[int]
34
+ """Returns the last _n_ elements from the list."""
35
+
36
+ order: Optional[Literal["id", "active_members_count", "created_at", "internal_notes", "expires_at"]]
37
+ """The ways a relation of Plans can be ordered"""
38
+
39
+ plan_types: Optional[List[PlanType]]
40
+ """The plan type to filter the plans by"""
41
+
42
+ product_ids: Optional[SequenceNotStr[str]]
43
+ """The product IDs to filter the plans by"""
44
+
45
+ release_methods: Optional[List[ReleaseMethod]]
46
+ """The release method to filter the plans by"""
47
+
48
+ visibilities: Optional[List[VisibilityFilter]]
49
+ """The visibility to filter the plans by"""
@@ -0,0 +1,92 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+ from datetime import datetime
5
+
6
+ from .._models import BaseModel
7
+ from .shared.currency import Currency
8
+ from .shared.plan_type import PlanType
9
+ from .shared.visibility import Visibility
10
+ from .shared.release_method import ReleaseMethod
11
+
12
+ __all__ = ["PlanListResponse", "Company", "Invoice", "Product"]
13
+
14
+
15
+ class Company(BaseModel):
16
+ id: str
17
+ """The ID (tag) of the company."""
18
+
19
+ title: str
20
+ """The title of the company."""
21
+
22
+
23
+ class Invoice(BaseModel):
24
+ id: str
25
+ """The ID of the invoice."""
26
+
27
+
28
+ class Product(BaseModel):
29
+ id: str
30
+ """The internal ID of the public product."""
31
+
32
+ title: str
33
+ """The title of the product. Use for Whop 4.0."""
34
+
35
+
36
+ class PlanListResponse(BaseModel):
37
+ id: str
38
+ """The internal ID of the plan."""
39
+
40
+ billing_period: Optional[int] = None
41
+ """The interval at which the plan charges (renewal plans)."""
42
+
43
+ company: Optional[Company] = None
44
+ """The company for the plan."""
45
+
46
+ created_at: datetime
47
+ """When the plan was created."""
48
+
49
+ currency: Currency
50
+ """The respective currency identifier for the plan."""
51
+
52
+ description: Optional[str] = None
53
+ """The description of the plan."""
54
+
55
+ expiration_days: Optional[int] = None
56
+ """The interval at which the plan charges (expiration plans)."""
57
+
58
+ initial_price: float
59
+ """The price a person has to pay for a plan on the initial purchase."""
60
+
61
+ internal_notes: Optional[str] = None
62
+ """A personal description or notes section for the business."""
63
+
64
+ invoice: Optional[Invoice] = None
65
+ """The invoice associated with this plan."""
66
+
67
+ member_count: Optional[int] = None
68
+ """The number of members for the plan."""
69
+
70
+ plan_type: PlanType
71
+ """Indicates if the plan is a one time payment or recurring."""
72
+
73
+ product: Optional[Product] = None
74
+ """The access pass for the plan."""
75
+
76
+ purchase_url: str
77
+ """The direct link to purchase the product."""
78
+
79
+ release_method: ReleaseMethod
80
+ """This is the release method the business uses to sell this plan."""
81
+
82
+ renewal_price: float
83
+ """The price a person has to pay for a plan on the renewal purchase."""
84
+
85
+ trial_period_days: Optional[int] = None
86
+ """The number of free trial days added before a renewal plan."""
87
+
88
+ updated_at: datetime
89
+ """When the plan was last updated."""
90
+
91
+ visibility: Visibility
92
+ """Shows or hides the plan from public/business view."""
@@ -0,0 +1,95 @@
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 Iterable, Optional
6
+ from typing_extensions import Literal, Required, TypedDict
7
+
8
+ from .shared.currency import Currency
9
+ from .shared.tax_type import TaxType
10
+ from .shared.visibility import Visibility
11
+
12
+ __all__ = ["PlanUpdateParams", "CustomField", "Image"]
13
+
14
+
15
+ class PlanUpdateParams(TypedDict, total=False):
16
+ billing_period: Optional[int]
17
+ """The interval at which the plan charges (renewal plans)."""
18
+
19
+ currency: Optional[Currency]
20
+ """The available currencies on the platform"""
21
+
22
+ custom_fields: Optional[Iterable[CustomField]]
23
+ """An array of custom field objects."""
24
+
25
+ description: Optional[str]
26
+ """The description of the plan."""
27
+
28
+ expiration_days: Optional[int]
29
+ """The interval at which the plan charges (expiration plans)."""
30
+
31
+ image: Optional[Image]
32
+ """An image for the plan. This will be visible on the product page to customers."""
33
+
34
+ initial_price: Optional[float]
35
+ """An additional amount charged upon first purchase."""
36
+
37
+ internal_notes: Optional[str]
38
+ """A personal description or notes section for the business."""
39
+
40
+ offer_cancel_discount: Optional[bool]
41
+ """Whether or not to offer a discount to cancel a subscription."""
42
+
43
+ override_tax_type: Optional[TaxType]
44
+ """
45
+ Whether or not the tax is included in a plan's price (or if it hasn't been set
46
+ up)
47
+ """
48
+
49
+ renewal_price: Optional[float]
50
+ """The amount the customer is charged every billing period."""
51
+
52
+ title: Optional[str]
53
+ """The title of the plan. This will be visible on the product page to customers."""
54
+
55
+ trial_period_days: Optional[int]
56
+ """The number of free trial days added before a renewal plan."""
57
+
58
+ visibility: Optional[Visibility]
59
+ """Visibility of a resource"""
60
+
61
+
62
+ class CustomField(TypedDict, total=False):
63
+ field_type: Required[Literal["text"]]
64
+ """The type of the custom field."""
65
+
66
+ name: Required[str]
67
+ """The name of the custom field."""
68
+
69
+ id: Optional[str]
70
+ """The ID of the custom field (if being updated)"""
71
+
72
+ order: Optional[int]
73
+ """The order of the field."""
74
+
75
+ placeholder: Optional[str]
76
+ """The placeholder value of the field."""
77
+
78
+ required: Optional[bool]
79
+ """Whether or not the field is required."""
80
+
81
+
82
+ class Image(TypedDict, total=False):
83
+ id: Optional[str]
84
+ """The ID of an existing attachment object.
85
+
86
+ Use this when updating a resource and keeping a subset of the attachments. Don't
87
+ use this unless you know what you're doing.
88
+ """
89
+
90
+ direct_upload_id: Optional[str]
91
+ """This ID should be used the first time you upload an attachment.
92
+
93
+ It is the ID of the direct upload that was created when uploading the file to S3
94
+ via the mediaDirectUpload mutation.
95
+ """