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.
- whop_sdk/__init__.py +94 -0
- whop_sdk/_base_client.py +1995 -0
- whop_sdk/_client.py +664 -0
- whop_sdk/_compat.py +219 -0
- whop_sdk/_constants.py +14 -0
- whop_sdk/_exceptions.py +112 -0
- whop_sdk/_files.py +123 -0
- whop_sdk/_models.py +835 -0
- whop_sdk/_qs.py +150 -0
- whop_sdk/_resource.py +43 -0
- whop_sdk/_response.py +830 -0
- whop_sdk/_streaming.py +333 -0
- whop_sdk/_types.py +260 -0
- whop_sdk/_utils/__init__.py +64 -0
- whop_sdk/_utils/_compat.py +45 -0
- whop_sdk/_utils/_datetime_parse.py +136 -0
- whop_sdk/_utils/_logs.py +25 -0
- whop_sdk/_utils/_proxy.py +65 -0
- whop_sdk/_utils/_reflection.py +42 -0
- whop_sdk/_utils/_resources_proxy.py +24 -0
- whop_sdk/_utils/_streams.py +12 -0
- whop_sdk/_utils/_sync.py +86 -0
- whop_sdk/_utils/_transform.py +457 -0
- whop_sdk/_utils/_typing.py +156 -0
- whop_sdk/_utils/_utils.py +421 -0
- whop_sdk/_version.py +4 -0
- whop_sdk/lib/.keep +4 -0
- whop_sdk/pagination.py +61 -0
- whop_sdk/py.typed +0 -0
- whop_sdk/resources/__init__.py +316 -0
- whop_sdk/resources/app_builds.py +562 -0
- whop_sdk/resources/apps.py +665 -0
- whop_sdk/resources/authorized_users.py +336 -0
- whop_sdk/resources/chat_channels.py +469 -0
- whop_sdk/resources/checkout_configurations.py +464 -0
- whop_sdk/resources/companies.py +171 -0
- whop_sdk/resources/course_lesson_interactions.py +343 -0
- whop_sdk/resources/entries.py +539 -0
- whop_sdk/resources/experiences.py +859 -0
- whop_sdk/resources/forum_posts.py +512 -0
- whop_sdk/resources/invoices.py +633 -0
- whop_sdk/resources/ledger_accounts.py +171 -0
- whop_sdk/resources/memberships.py +810 -0
- whop_sdk/resources/messages.py +446 -0
- whop_sdk/resources/payments.py +761 -0
- whop_sdk/resources/plans.py +906 -0
- whop_sdk/resources/products.py +969 -0
- whop_sdk/resources/reactions.py +423 -0
- whop_sdk/resources/shipments.py +451 -0
- whop_sdk/resources/support_channels.py +455 -0
- whop_sdk/resources/transfers.py +488 -0
- whop_sdk/resources/users.py +248 -0
- whop_sdk/resources/webhooks.py +69 -0
- whop_sdk/types/__init__.py +135 -0
- whop_sdk/types/app_build_create_params.py +59 -0
- whop_sdk/types/app_build_list_params.py +34 -0
- whop_sdk/types/app_build_list_response.py +50 -0
- whop_sdk/types/app_create_params.py +19 -0
- whop_sdk/types/app_list_params.py +54 -0
- whop_sdk/types/app_list_response.py +91 -0
- whop_sdk/types/app_update_params.py +58 -0
- whop_sdk/types/authorized_user_list_params.py +33 -0
- whop_sdk/types/authorized_user_list_response.py +33 -0
- whop_sdk/types/authorized_user_retrieve_response.py +33 -0
- whop_sdk/types/chat_channel_list_params.py +28 -0
- whop_sdk/types/chat_channel_list_response.py +43 -0
- whop_sdk/types/chat_channel_update_params.py +32 -0
- whop_sdk/types/checkout_configuration_create_params.py +129 -0
- whop_sdk/types/checkout_configuration_list_params.py +33 -0
- whop_sdk/types/checkout_configuration_list_response.py +66 -0
- whop_sdk/types/course_lesson_interaction_list_params.py +34 -0
- whop_sdk/types/entry_approve_response.py +10 -0
- whop_sdk/types/entry_list_params.py +44 -0
- whop_sdk/types/entry_list_response.py +56 -0
- whop_sdk/types/experience_attach_params.py +12 -0
- whop_sdk/types/experience_create_params.py +22 -0
- whop_sdk/types/experience_delete_response.py +7 -0
- whop_sdk/types/experience_detach_params.py +12 -0
- whop_sdk/types/experience_list_params.py +31 -0
- whop_sdk/types/experience_list_response.py +47 -0
- whop_sdk/types/experience_update_params.py +41 -0
- whop_sdk/types/forum_post_create_params.py +85 -0
- whop_sdk/types/forum_post_list_params.py +31 -0
- whop_sdk/types/forum_post_list_response.py +53 -0
- whop_sdk/types/invoice_create_params.py +137 -0
- whop_sdk/types/invoice_create_response.py +16 -0
- whop_sdk/types/invoice_created_webhook_event.py +26 -0
- whop_sdk/types/invoice_list_params.py +50 -0
- whop_sdk/types/invoice_paid_webhook_event.py +26 -0
- whop_sdk/types/invoice_past_due_webhook_event.py +26 -0
- whop_sdk/types/invoice_void_response.py +7 -0
- whop_sdk/types/invoice_voided_webhook_event.py +26 -0
- whop_sdk/types/ledger_account_retrieve_response.py +78 -0
- whop_sdk/types/membership_cancel_params.py +13 -0
- whop_sdk/types/membership_list_params.py +70 -0
- whop_sdk/types/membership_list_response.py +117 -0
- whop_sdk/types/membership_pause_params.py +16 -0
- whop_sdk/types/membership_update_params.py +13 -0
- whop_sdk/types/message_create_params.py +51 -0
- whop_sdk/types/message_list_params.py +30 -0
- whop_sdk/types/message_list_response.py +90 -0
- whop_sdk/types/payment_list_params.py +72 -0
- whop_sdk/types/payment_list_response.py +221 -0
- whop_sdk/types/payment_refund_params.py +13 -0
- whop_sdk/types/plan_create_params.py +106 -0
- whop_sdk/types/plan_delete_response.py +7 -0
- whop_sdk/types/plan_list_params.py +49 -0
- whop_sdk/types/plan_list_response.py +92 -0
- whop_sdk/types/plan_update_params.py +95 -0
- whop_sdk/types/product_create_params.py +170 -0
- whop_sdk/types/product_delete_response.py +7 -0
- whop_sdk/types/product_list_params.py +41 -0
- whop_sdk/types/product_update_params.py +90 -0
- whop_sdk/types/reaction_create_params.py +19 -0
- whop_sdk/types/reaction_list_params.py +25 -0
- whop_sdk/types/reaction_list_response.py +32 -0
- whop_sdk/types/shared/__init__.py +55 -0
- whop_sdk/types/shared/access_pass_type.py +7 -0
- whop_sdk/types/shared/app.py +159 -0
- whop_sdk/types/shared/app_build.py +50 -0
- whop_sdk/types/shared/app_build_platforms.py +7 -0
- whop_sdk/types/shared/app_build_statuses.py +7 -0
- whop_sdk/types/shared/app_statuses.py +7 -0
- whop_sdk/types/shared/app_view_type.py +7 -0
- whop_sdk/types/shared/authorized_user_roles.py +9 -0
- whop_sdk/types/shared/business_types.py +22 -0
- whop_sdk/types/shared/chat_channel.py +43 -0
- whop_sdk/types/shared/checkout_configuration.py +66 -0
- whop_sdk/types/shared/collection_method.py +7 -0
- whop_sdk/types/shared/company.py +71 -0
- whop_sdk/types/shared/course_lesson_interaction.py +44 -0
- whop_sdk/types/shared/course_lesson_interaction_list_item.py +44 -0
- whop_sdk/types/shared/currency.py +92 -0
- whop_sdk/types/shared/custom_cta.py +21 -0
- whop_sdk/types/shared/direction.py +7 -0
- whop_sdk/types/shared/dms_post_types.py +7 -0
- whop_sdk/types/shared/entry.py +70 -0
- whop_sdk/types/shared/entry_status.py +7 -0
- whop_sdk/types/shared/experience.py +66 -0
- whop_sdk/types/shared/forum_post.py +53 -0
- whop_sdk/types/shared/friendly_receipt_status.py +24 -0
- whop_sdk/types/shared/global_affiliate_status.py +7 -0
- whop_sdk/types/shared/industry_types.py +67 -0
- whop_sdk/types/shared/invoice.py +61 -0
- whop_sdk/types/shared/invoice_list_item.py +61 -0
- whop_sdk/types/shared/invoice_status.py +7 -0
- whop_sdk/types/shared/membership.py +117 -0
- whop_sdk/types/shared/membership_status.py +9 -0
- whop_sdk/types/shared/message.py +90 -0
- whop_sdk/types/shared/page_info.py +21 -0
- whop_sdk/types/shared/payment.py +211 -0
- whop_sdk/types/shared/plan.py +123 -0
- whop_sdk/types/shared/plan_type.py +7 -0
- whop_sdk/types/shared/product.py +124 -0
- whop_sdk/types/shared/product_list_item.py +49 -0
- whop_sdk/types/shared/promo_type.py +7 -0
- whop_sdk/types/shared/reaction.py +32 -0
- whop_sdk/types/shared/receipt_status.py +7 -0
- whop_sdk/types/shared/release_method.py +7 -0
- whop_sdk/types/shared/shipment.py +48 -0
- whop_sdk/types/shared/shipment_carrier.py +84 -0
- whop_sdk/types/shared/shipment_status.py +18 -0
- whop_sdk/types/shared/shipment_substatus.py +36 -0
- whop_sdk/types/shared/support_channel.py +39 -0
- whop_sdk/types/shared/tax_type.py +7 -0
- whop_sdk/types/shared/transfer.py +109 -0
- whop_sdk/types/shared/visibility.py +7 -0
- whop_sdk/types/shared/visibility_filter.py +9 -0
- whop_sdk/types/shared/who_can_post.py +7 -0
- whop_sdk/types/shared/who_can_react.py +7 -0
- whop_sdk/types/shared_params/__init__.py +27 -0
- whop_sdk/types/shared_params/access_pass_type.py +9 -0
- whop_sdk/types/shared_params/app_build_platforms.py +9 -0
- whop_sdk/types/shared_params/app_build_statuses.py +9 -0
- whop_sdk/types/shared_params/app_statuses.py +9 -0
- whop_sdk/types/shared_params/app_view_type.py +9 -0
- whop_sdk/types/shared_params/authorized_user_roles.py +11 -0
- whop_sdk/types/shared_params/business_types.py +24 -0
- whop_sdk/types/shared_params/collection_method.py +9 -0
- whop_sdk/types/shared_params/currency.py +94 -0
- whop_sdk/types/shared_params/custom_cta.py +23 -0
- whop_sdk/types/shared_params/direction.py +9 -0
- whop_sdk/types/shared_params/entry_status.py +9 -0
- whop_sdk/types/shared_params/friendly_receipt_status.py +26 -0
- whop_sdk/types/shared_params/global_affiliate_status.py +9 -0
- whop_sdk/types/shared_params/industry_types.py +69 -0
- whop_sdk/types/shared_params/invoice_status.py +9 -0
- whop_sdk/types/shared_params/membership_status.py +11 -0
- whop_sdk/types/shared_params/plan_type.py +9 -0
- whop_sdk/types/shared_params/receipt_status.py +9 -0
- whop_sdk/types/shared_params/release_method.py +9 -0
- whop_sdk/types/shared_params/tax_type.py +9 -0
- whop_sdk/types/shared_params/visibility.py +9 -0
- whop_sdk/types/shared_params/visibility_filter.py +11 -0
- whop_sdk/types/shared_params/who_can_post.py +9 -0
- whop_sdk/types/shared_params/who_can_react.py +9 -0
- whop_sdk/types/shipment_create_params.py +18 -0
- whop_sdk/types/shipment_list_params.py +31 -0
- whop_sdk/types/shipment_list_response.py +48 -0
- whop_sdk/types/support_channel_create_params.py +15 -0
- whop_sdk/types/support_channel_list_params.py +40 -0
- whop_sdk/types/support_channel_list_response.py +39 -0
- whop_sdk/types/transfer_create_params.py +36 -0
- whop_sdk/types/transfer_list_params.py +42 -0
- whop_sdk/types/transfer_list_response.py +35 -0
- whop_sdk/types/unwrap_webhook_event.py +15 -0
- whop_sdk/types/user_check_access_response.py +15 -0
- whop_sdk/types/user_retrieve_response.py +25 -0
- whop_sdk-0.0.1.dist-info/METADATA +522 -0
- whop_sdk-0.0.1.dist-info/RECORD +212 -0
- whop_sdk-0.0.1.dist-info/WHEEL +4 -0
- whop_sdk-0.0.1.dist-info/licenses/LICENSE +201 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from datetime import datetime
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from .._models import BaseModel
|
|
7
|
+
from .shared.invoice import Invoice
|
|
8
|
+
|
|
9
|
+
__all__ = ["InvoicePastDueWebhookEvent"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class InvoicePastDueWebhookEvent(BaseModel):
|
|
13
|
+
id: str
|
|
14
|
+
"""A unique ID for every single webhook request"""
|
|
15
|
+
|
|
16
|
+
api_version: Literal["v1"]
|
|
17
|
+
"""The API version for this webhook"""
|
|
18
|
+
|
|
19
|
+
data: Invoice
|
|
20
|
+
"""A statement that defines an amount due by a customer."""
|
|
21
|
+
|
|
22
|
+
timestamp: datetime
|
|
23
|
+
"""The timestamp in ISO 8601 format that the webhook was sent at on the server"""
|
|
24
|
+
|
|
25
|
+
type: Literal["invoice.past_due"]
|
|
26
|
+
"""The webhook event type"""
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from datetime import datetime
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from .._models import BaseModel
|
|
7
|
+
from .shared.invoice import Invoice
|
|
8
|
+
|
|
9
|
+
__all__ = ["InvoiceVoidedWebhookEvent"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class InvoiceVoidedWebhookEvent(BaseModel):
|
|
13
|
+
id: str
|
|
14
|
+
"""A unique ID for every single webhook request"""
|
|
15
|
+
|
|
16
|
+
api_version: Literal["v1"]
|
|
17
|
+
"""The API version for this webhook"""
|
|
18
|
+
|
|
19
|
+
data: Invoice
|
|
20
|
+
"""A statement that defines an amount due by a customer."""
|
|
21
|
+
|
|
22
|
+
timestamp: datetime
|
|
23
|
+
"""The timestamp in ISO 8601 format that the webhook was sent at on the server"""
|
|
24
|
+
|
|
25
|
+
type: Literal["invoice.voided"]
|
|
26
|
+
"""The webhook event type"""
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Union, Optional
|
|
4
|
+
from typing_extensions import Literal, Annotated, TypeAlias
|
|
5
|
+
|
|
6
|
+
from .._utils import PropertyInfo
|
|
7
|
+
from .._models import BaseModel
|
|
8
|
+
from .shared.currency import Currency
|
|
9
|
+
|
|
10
|
+
__all__ = ["LedgerAccountRetrieveResponse", "Balance", "Owner", "OwnerUser", "OwnerCompany"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Balance(BaseModel):
|
|
14
|
+
balance: float
|
|
15
|
+
"""The amount of the balance."""
|
|
16
|
+
|
|
17
|
+
currency: Currency
|
|
18
|
+
"""The currency of the balance."""
|
|
19
|
+
|
|
20
|
+
pending_balance: float
|
|
21
|
+
"""The amount of the balance that is pending."""
|
|
22
|
+
|
|
23
|
+
reserve_balance: float
|
|
24
|
+
"""The amount of the balance that is reserved."""
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class OwnerUser(BaseModel):
|
|
28
|
+
id: str
|
|
29
|
+
"""The internal ID of the user."""
|
|
30
|
+
|
|
31
|
+
name: Optional[str] = None
|
|
32
|
+
"""The name of the user from their Whop account."""
|
|
33
|
+
|
|
34
|
+
typename: Literal["User"]
|
|
35
|
+
"""The typename of this object"""
|
|
36
|
+
|
|
37
|
+
username: str
|
|
38
|
+
"""The username of the user from their Whop account."""
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class OwnerCompany(BaseModel):
|
|
42
|
+
id: str
|
|
43
|
+
"""The ID (tag) of the company."""
|
|
44
|
+
|
|
45
|
+
route: str
|
|
46
|
+
"""The slug/route of the company on the Whop site."""
|
|
47
|
+
|
|
48
|
+
title: str
|
|
49
|
+
"""The title of the company."""
|
|
50
|
+
|
|
51
|
+
typename: Literal["Company"]
|
|
52
|
+
"""The typename of this object"""
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
Owner: TypeAlias = Annotated[Union[Optional[OwnerUser], Optional[OwnerCompany]], PropertyInfo(discriminator="typename")]
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
class LedgerAccountRetrieveResponse(BaseModel):
|
|
59
|
+
id: str
|
|
60
|
+
"""The ID of the LedgerAccount."""
|
|
61
|
+
|
|
62
|
+
balances: List[Balance]
|
|
63
|
+
"""The balances associated with the account."""
|
|
64
|
+
|
|
65
|
+
ledger_account_audit_status: Optional[Literal["reserves_imposed", "requested_more_information"]] = None
|
|
66
|
+
"""The different statuses a LedgerAccountAudit can be"""
|
|
67
|
+
|
|
68
|
+
ledger_type: Literal["primary", "pool"]
|
|
69
|
+
"""The type of ledger account."""
|
|
70
|
+
|
|
71
|
+
owner: Owner
|
|
72
|
+
"""The owner of the ledger account."""
|
|
73
|
+
|
|
74
|
+
payments_approval_status: Optional[Literal["pending", "approved", "monitoring", "rejected"]] = None
|
|
75
|
+
"""The different approval statuses an account can have."""
|
|
76
|
+
|
|
77
|
+
transfer_fee: Optional[float] = None
|
|
78
|
+
"""The fee for transfers, if applicable."""
|
|
@@ -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 Literal, TypedDict
|
|
7
|
+
|
|
8
|
+
__all__ = ["MembershipCancelParams"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class MembershipCancelParams(TypedDict, total=False):
|
|
12
|
+
cancellation_mode: Optional[Literal["at_period_end", "immediate"]]
|
|
13
|
+
"""The mode of cancellation for a membership"""
|
|
@@ -0,0 +1,70 @@
|
|
|
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, Union, Optional
|
|
6
|
+
from datetime import datetime
|
|
7
|
+
from typing_extensions import Literal, Required, Annotated, TypedDict
|
|
8
|
+
|
|
9
|
+
from .._types import SequenceNotStr
|
|
10
|
+
from .._utils import PropertyInfo
|
|
11
|
+
from .shared.direction import Direction
|
|
12
|
+
from .shared.membership_status import MembershipStatus
|
|
13
|
+
|
|
14
|
+
__all__ = ["MembershipListParams"]
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class MembershipListParams(TypedDict, total=False):
|
|
18
|
+
company_id: Required[str]
|
|
19
|
+
"""The ID of the company to list memberships for"""
|
|
20
|
+
|
|
21
|
+
access_pass_ids: Optional[SequenceNotStr[str]]
|
|
22
|
+
"""The access pass IDs to filter the memberships by"""
|
|
23
|
+
|
|
24
|
+
after: Optional[str]
|
|
25
|
+
"""Returns the elements in the list that come after the specified cursor."""
|
|
26
|
+
|
|
27
|
+
before: Optional[str]
|
|
28
|
+
"""Returns the elements in the list that come before the specified cursor."""
|
|
29
|
+
|
|
30
|
+
cancel_options: Optional[
|
|
31
|
+
List[
|
|
32
|
+
Literal[
|
|
33
|
+
"too_expensive",
|
|
34
|
+
"switching",
|
|
35
|
+
"missing_features",
|
|
36
|
+
"technical_issues",
|
|
37
|
+
"bad_experience",
|
|
38
|
+
"other",
|
|
39
|
+
"testing",
|
|
40
|
+
]
|
|
41
|
+
]
|
|
42
|
+
]
|
|
43
|
+
"""The cancel options to filter the memberships by"""
|
|
44
|
+
|
|
45
|
+
created_after: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
|
|
46
|
+
"""The minimum creation date to filter by"""
|
|
47
|
+
|
|
48
|
+
created_before: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
|
|
49
|
+
"""The maximum creation date to filter by"""
|
|
50
|
+
|
|
51
|
+
direction: Optional[Direction]
|
|
52
|
+
"""The direction of the sort."""
|
|
53
|
+
|
|
54
|
+
first: Optional[int]
|
|
55
|
+
"""Returns the first _n_ elements from the list."""
|
|
56
|
+
|
|
57
|
+
last: Optional[int]
|
|
58
|
+
"""Returns the last _n_ elements from the list."""
|
|
59
|
+
|
|
60
|
+
order: Optional[Literal["id", "created_at", "status", "canceled_at", "date_joined", "total_spend"]]
|
|
61
|
+
"""Which columns can be used to sort."""
|
|
62
|
+
|
|
63
|
+
plan_ids: Optional[SequenceNotStr[str]]
|
|
64
|
+
"""The plan IDs to filter the memberships by"""
|
|
65
|
+
|
|
66
|
+
promo_code_ids: Optional[SequenceNotStr[str]]
|
|
67
|
+
"""The promo code IDs to filter the memberships by"""
|
|
68
|
+
|
|
69
|
+
statuses: Optional[List[MembershipStatus]]
|
|
70
|
+
"""The membership status to filter the memberships by"""
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Dict, Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
|
|
6
|
+
from .._models import BaseModel
|
|
7
|
+
from .shared.currency import Currency
|
|
8
|
+
from .shared.membership_status import MembershipStatus
|
|
9
|
+
|
|
10
|
+
__all__ = ["MembershipListResponse", "Company", "Member", "Plan", "PromoCode", "User"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Company(BaseModel):
|
|
14
|
+
id: str
|
|
15
|
+
"""The ID (tag) of the company."""
|
|
16
|
+
|
|
17
|
+
title: str
|
|
18
|
+
"""The title of the company."""
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class Member(BaseModel):
|
|
22
|
+
id: str
|
|
23
|
+
"""The ID of the member"""
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class Plan(BaseModel):
|
|
27
|
+
id: str
|
|
28
|
+
"""The internal ID of the plan."""
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class PromoCode(BaseModel):
|
|
32
|
+
id: str
|
|
33
|
+
"""The ID of the promo."""
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class User(BaseModel):
|
|
37
|
+
id: str
|
|
38
|
+
"""The internal ID of the user."""
|
|
39
|
+
|
|
40
|
+
name: Optional[str] = None
|
|
41
|
+
"""The name of the user from their Whop account."""
|
|
42
|
+
|
|
43
|
+
username: str
|
|
44
|
+
"""The username of the user from their Whop account."""
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class MembershipListResponse(BaseModel):
|
|
48
|
+
id: str
|
|
49
|
+
"""The ID of the membership"""
|
|
50
|
+
|
|
51
|
+
cancel_at_period_end: bool
|
|
52
|
+
"""Whether this Membership is set to cancel at the end of the current billing
|
|
53
|
+
cycle.
|
|
54
|
+
|
|
55
|
+
Only applies for memberships that have a renewal plan.
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
canceled_at: Optional[datetime] = None
|
|
59
|
+
"""The epoch timestamp of when the customer initiated a cancellation."""
|
|
60
|
+
|
|
61
|
+
cancellation_reason: Optional[str] = None
|
|
62
|
+
"""The reason that the member canceled the membership (filled out by the member)."""
|
|
63
|
+
|
|
64
|
+
company: Company
|
|
65
|
+
"""The Company this Membership belongs to."""
|
|
66
|
+
|
|
67
|
+
created_at: datetime
|
|
68
|
+
"""The timestamp, in seconds, that this Membership was created at."""
|
|
69
|
+
|
|
70
|
+
currency: Optional[Currency] = None
|
|
71
|
+
"""The available currencies on the platform"""
|
|
72
|
+
|
|
73
|
+
license_key: Optional[str] = None
|
|
74
|
+
"""The license key for this Membership.
|
|
75
|
+
|
|
76
|
+
This is only present if the membership grants access to an instance of the Whop
|
|
77
|
+
Software app.
|
|
78
|
+
"""
|
|
79
|
+
|
|
80
|
+
manage_url: Optional[str] = None
|
|
81
|
+
"""The URL for the customer to manage their membership."""
|
|
82
|
+
|
|
83
|
+
member: Optional[Member] = None
|
|
84
|
+
"""The Member that this Membership belongs to."""
|
|
85
|
+
|
|
86
|
+
metadata: Dict[str, object]
|
|
87
|
+
"""A JSON object used to store software licensing information. Ex. HWID"""
|
|
88
|
+
|
|
89
|
+
payment_collection_paused: bool
|
|
90
|
+
"""Whether the membership's payments are currently paused."""
|
|
91
|
+
|
|
92
|
+
plan: Plan
|
|
93
|
+
"""The Plan this Membership is for."""
|
|
94
|
+
|
|
95
|
+
promo_code: Optional[PromoCode] = None
|
|
96
|
+
"""The Promo Code that is currently applied to this Membership."""
|
|
97
|
+
|
|
98
|
+
renewal_period_end: Optional[datetime] = None
|
|
99
|
+
"""
|
|
100
|
+
The timestamp in seconds at which the current billing cycle for this
|
|
101
|
+
subscription ends. Only applies for memberships that have a renewal plan.
|
|
102
|
+
"""
|
|
103
|
+
|
|
104
|
+
renewal_period_start: Optional[datetime] = None
|
|
105
|
+
"""
|
|
106
|
+
The timestamp in seconds at which the current billing cycle for this
|
|
107
|
+
subscription start. Only applies for memberships that have a renewal plan.
|
|
108
|
+
"""
|
|
109
|
+
|
|
110
|
+
status: MembershipStatus
|
|
111
|
+
"""The status of the membership."""
|
|
112
|
+
|
|
113
|
+
updated_at: datetime
|
|
114
|
+
"""A timestamp of when the membership was last updated"""
|
|
115
|
+
|
|
116
|
+
user: Optional[User] = None
|
|
117
|
+
"""The user this membership belongs to"""
|
|
@@ -0,0 +1,16 @@
|
|
|
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__ = ["MembershipPauseParams"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class MembershipPauseParams(TypedDict, total=False):
|
|
12
|
+
void_payments: Optional[bool]
|
|
13
|
+
"""
|
|
14
|
+
Whether to void past_due payments associated with the membership to prevent
|
|
15
|
+
future payment attempts.
|
|
16
|
+
"""
|
|
@@ -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 Dict, Optional
|
|
6
|
+
from typing_extensions import TypedDict
|
|
7
|
+
|
|
8
|
+
__all__ = ["MembershipUpdateParams"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class MembershipUpdateParams(TypedDict, total=False):
|
|
12
|
+
metadata: Optional[Dict[str, object]]
|
|
13
|
+
"""The metadata to update the membership with."""
|
|
@@ -0,0 +1,51 @@
|
|
|
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 Required, TypedDict
|
|
7
|
+
|
|
8
|
+
__all__ = ["MessageCreateParams", "Attachment", "Poll", "PollOption"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class MessageCreateParams(TypedDict, total=False):
|
|
12
|
+
channel_id: Required[str]
|
|
13
|
+
"""The ID of the channel or experience to send to."""
|
|
14
|
+
|
|
15
|
+
content: Required[str]
|
|
16
|
+
"""The content of the message in Markdown format."""
|
|
17
|
+
|
|
18
|
+
attachments: Optional[Iterable[Attachment]]
|
|
19
|
+
"""The attachments for this message, such as videos or images."""
|
|
20
|
+
|
|
21
|
+
poll: Optional[Poll]
|
|
22
|
+
"""The poll for this message"""
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class Attachment(TypedDict, total=False):
|
|
26
|
+
id: Optional[str]
|
|
27
|
+
"""The ID of an existing attachment object.
|
|
28
|
+
|
|
29
|
+
Use this when updating a resource and keeping a subset of the attachments. Don't
|
|
30
|
+
use this unless you know what you're doing.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
direct_upload_id: Optional[str]
|
|
34
|
+
"""This ID should be used the first time you upload an attachment.
|
|
35
|
+
|
|
36
|
+
It is the ID of the direct upload that was created when uploading the file to S3
|
|
37
|
+
via the mediaDirectUpload mutation.
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class PollOption(TypedDict, total=False):
|
|
42
|
+
id: Required[str]
|
|
43
|
+
"""Sequential ID for the poll option (starting from '1')"""
|
|
44
|
+
|
|
45
|
+
text: Required[str]
|
|
46
|
+
"""The text of the poll option"""
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class Poll(TypedDict, total=False):
|
|
50
|
+
options: Required[Iterable[PollOption]]
|
|
51
|
+
"""The options for the poll. Must have sequential IDs starting from 1"""
|
|
@@ -0,0 +1,30 @@
|
|
|
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 Required, TypedDict
|
|
7
|
+
|
|
8
|
+
from .shared.direction import Direction
|
|
9
|
+
|
|
10
|
+
__all__ = ["MessageListParams"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class MessageListParams(TypedDict, total=False):
|
|
14
|
+
channel_id: Required[str]
|
|
15
|
+
"""The ID of the channel or the experience ID to list messages for"""
|
|
16
|
+
|
|
17
|
+
after: Optional[str]
|
|
18
|
+
"""Returns the elements in the list that come after the specified cursor."""
|
|
19
|
+
|
|
20
|
+
before: Optional[str]
|
|
21
|
+
"""Returns the elements in the list that come before the specified cursor."""
|
|
22
|
+
|
|
23
|
+
direction: Optional[Direction]
|
|
24
|
+
"""The direction of the sort."""
|
|
25
|
+
|
|
26
|
+
first: Optional[int]
|
|
27
|
+
"""Returns the first _n_ elements from the list."""
|
|
28
|
+
|
|
29
|
+
last: Optional[int]
|
|
30
|
+
"""Returns the last _n_ elements from the list."""
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
|
|
6
|
+
from .._models import BaseModel
|
|
7
|
+
from .shared.dms_post_types import DmsPostTypes
|
|
8
|
+
|
|
9
|
+
__all__ = ["MessageListResponse", "Poll", "PollOption", "PollVote", "ReactionCount", "User"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class PollOption(BaseModel):
|
|
13
|
+
id: str
|
|
14
|
+
"""The ID of the poll option"""
|
|
15
|
+
|
|
16
|
+
text: str
|
|
17
|
+
"""The text of the poll option"""
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class Poll(BaseModel):
|
|
21
|
+
options: Optional[List[PollOption]] = None
|
|
22
|
+
"""The options for the poll"""
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class PollVote(BaseModel):
|
|
26
|
+
count: int
|
|
27
|
+
"""The number of users who reacted"""
|
|
28
|
+
|
|
29
|
+
option_id: Optional[str] = None
|
|
30
|
+
"""The reaction that was used"""
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class ReactionCount(BaseModel):
|
|
34
|
+
count: int
|
|
35
|
+
"""The number of users who reacted"""
|
|
36
|
+
|
|
37
|
+
emoji: Optional[str] = None
|
|
38
|
+
"""The emoji that was used in shortcode format (:heart:)"""
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class User(BaseModel):
|
|
42
|
+
id: str
|
|
43
|
+
"""The internal ID of the user."""
|
|
44
|
+
|
|
45
|
+
name: Optional[str] = None
|
|
46
|
+
"""The name of the user from their Whop account."""
|
|
47
|
+
|
|
48
|
+
username: str
|
|
49
|
+
"""The username of the user from their Whop account."""
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class MessageListResponse(BaseModel):
|
|
53
|
+
id: str
|
|
54
|
+
"""The unique identifier for the entity"""
|
|
55
|
+
|
|
56
|
+
content: Optional[str] = None
|
|
57
|
+
"""The content of the message in Markdown format"""
|
|
58
|
+
|
|
59
|
+
created_at: datetime
|
|
60
|
+
"""The timestamp when the post was created"""
|
|
61
|
+
|
|
62
|
+
is_edited: bool
|
|
63
|
+
"""Whether the message has been edited"""
|
|
64
|
+
|
|
65
|
+
is_pinned: bool
|
|
66
|
+
"""Whether this message is pinned"""
|
|
67
|
+
|
|
68
|
+
message_type: DmsPostTypes
|
|
69
|
+
"""The type of post"""
|
|
70
|
+
|
|
71
|
+
poll: Optional[Poll] = None
|
|
72
|
+
"""The poll for this message"""
|
|
73
|
+
|
|
74
|
+
poll_votes: List[PollVote]
|
|
75
|
+
"""The reaction counts for this message"""
|
|
76
|
+
|
|
77
|
+
reaction_counts: List[ReactionCount]
|
|
78
|
+
"""The reaction counts for this message"""
|
|
79
|
+
|
|
80
|
+
replying_to_message_id: Optional[str] = None
|
|
81
|
+
"""The ID of the message this is replying to, if applicable"""
|
|
82
|
+
|
|
83
|
+
updated_at: datetime
|
|
84
|
+
"""The timestamp when the post was last updated"""
|
|
85
|
+
|
|
86
|
+
user: User
|
|
87
|
+
"""The user who sent this message"""
|
|
88
|
+
|
|
89
|
+
view_count: Optional[int] = None
|
|
90
|
+
"""The number of times this message has been viewed"""
|
|
@@ -0,0 +1,72 @@
|
|
|
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, Union, Optional
|
|
6
|
+
from datetime import datetime
|
|
7
|
+
from typing_extensions import Literal, Required, Annotated, TypedDict
|
|
8
|
+
|
|
9
|
+
from .._types import SequenceNotStr
|
|
10
|
+
from .._utils import PropertyInfo
|
|
11
|
+
from .shared.currency import Currency
|
|
12
|
+
from .shared.direction import Direction
|
|
13
|
+
from .shared.receipt_status import ReceiptStatus
|
|
14
|
+
from .shared.friendly_receipt_status import FriendlyReceiptStatus
|
|
15
|
+
|
|
16
|
+
__all__ = ["PaymentListParams"]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class PaymentListParams(TypedDict, total=False):
|
|
20
|
+
company_id: Required[str]
|
|
21
|
+
"""The ID of the company to list payments for"""
|
|
22
|
+
|
|
23
|
+
after: Optional[str]
|
|
24
|
+
"""Returns the elements in the list that come after the specified cursor."""
|
|
25
|
+
|
|
26
|
+
before: Optional[str]
|
|
27
|
+
"""Returns the elements in the list that come before the specified cursor."""
|
|
28
|
+
|
|
29
|
+
billing_reasons: Optional[
|
|
30
|
+
List[
|
|
31
|
+
Literal[
|
|
32
|
+
"subscription_create", "subscription_cycle", "subscription_update", "one_time", "manual", "subscription"
|
|
33
|
+
]
|
|
34
|
+
]
|
|
35
|
+
]
|
|
36
|
+
"""The billing reason for the payment"""
|
|
37
|
+
|
|
38
|
+
created_after: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
|
|
39
|
+
"""The minimum creation date to filter by"""
|
|
40
|
+
|
|
41
|
+
created_before: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
|
|
42
|
+
"""The maximum creation date to filter by"""
|
|
43
|
+
|
|
44
|
+
currencies: Optional[List[Currency]]
|
|
45
|
+
"""The currency of the payment."""
|
|
46
|
+
|
|
47
|
+
direction: Optional[Direction]
|
|
48
|
+
"""The direction of the sort."""
|
|
49
|
+
|
|
50
|
+
first: Optional[int]
|
|
51
|
+
"""Returns the first _n_ elements from the list."""
|
|
52
|
+
|
|
53
|
+
include_free: Optional[bool]
|
|
54
|
+
"""Whether to include free payments."""
|
|
55
|
+
|
|
56
|
+
last: Optional[int]
|
|
57
|
+
"""Returns the last _n_ elements from the list."""
|
|
58
|
+
|
|
59
|
+
order: Optional[Literal["final_amount", "created_at", "paid_at"]]
|
|
60
|
+
"""The order to sort the results by."""
|
|
61
|
+
|
|
62
|
+
plan_ids: Optional[SequenceNotStr[str]]
|
|
63
|
+
"""A specific plan."""
|
|
64
|
+
|
|
65
|
+
product_ids: Optional[SequenceNotStr[str]]
|
|
66
|
+
"""A specific product."""
|
|
67
|
+
|
|
68
|
+
statuses: Optional[List[ReceiptStatus]]
|
|
69
|
+
"""The status of the payment."""
|
|
70
|
+
|
|
71
|
+
substatuses: Optional[List[FriendlyReceiptStatus]]
|
|
72
|
+
"""The substatus of the payment."""
|