whop-sdk 0.0.1__py3-none-any.whl → 0.0.2__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 (57) hide show
  1. whop_sdk/_client.py +18 -0
  2. whop_sdk/_version.py +1 -1
  3. whop_sdk/resources/__init__.py +28 -0
  4. whop_sdk/resources/checkout_configurations.py +12 -12
  5. whop_sdk/resources/forums.py +446 -0
  6. whop_sdk/resources/members.py +421 -0
  7. whop_sdk/resources/plans.py +10 -4
  8. whop_sdk/types/__init__.py +25 -0
  9. whop_sdk/types/app_list_response.py +16 -1
  10. whop_sdk/types/checkout_configuration_create_params.py +5 -5
  11. whop_sdk/types/checkout_configuration_list_response.py +9 -9
  12. whop_sdk/types/course_lesson_interaction_completed_webhook_event.py +26 -0
  13. whop_sdk/types/entry_approved_webhook_event.py +26 -0
  14. whop_sdk/types/entry_created_webhook_event.py +26 -0
  15. whop_sdk/types/entry_deleted_webhook_event.py +26 -0
  16. whop_sdk/types/entry_denied_webhook_event.py +26 -0
  17. whop_sdk/types/experience_list_response.py +27 -1
  18. whop_sdk/types/forum_list_params.py +28 -0
  19. whop_sdk/types/forum_list_response.py +33 -0
  20. whop_sdk/types/forum_update_params.py +23 -0
  21. whop_sdk/types/invoice_create_params.py +10 -2
  22. whop_sdk/types/member_list_params.py +70 -0
  23. whop_sdk/types/member_list_response.py +65 -0
  24. whop_sdk/types/member_retrieve_response.py +79 -0
  25. whop_sdk/types/membership_activated_webhook_event.py +29 -0
  26. whop_sdk/types/membership_deactivated_webhook_event.py +29 -0
  27. whop_sdk/types/payment_failed_webhook_event.py +26 -0
  28. whop_sdk/types/payment_pending_webhook_event.py +26 -0
  29. whop_sdk/types/payment_succeeded_webhook_event.py +26 -0
  30. whop_sdk/types/plan_create_params.py +10 -2
  31. whop_sdk/types/shared/__init__.py +7 -0
  32. whop_sdk/types/shared/access_level.py +7 -0
  33. whop_sdk/types/shared/app.py +25 -1
  34. whop_sdk/types/shared/checkout_configuration.py +9 -9
  35. whop_sdk/types/shared/company.py +15 -1
  36. whop_sdk/types/shared/course_lesson_interaction.py +20 -1
  37. whop_sdk/types/shared/email_notification_preferences.py +7 -0
  38. whop_sdk/types/shared/experience.py +27 -1
  39. whop_sdk/types/shared/forum.py +33 -0
  40. whop_sdk/types/shared/member_most_recent_actions.py +22 -0
  41. whop_sdk/types/shared/member_statuses.py +7 -0
  42. whop_sdk/types/shared/who_can_comment_types.py +7 -0
  43. whop_sdk/types/shared/who_can_post_types.py +7 -0
  44. whop_sdk/types/shared_params/__init__.py +6 -0
  45. whop_sdk/types/shared_params/access_level.py +9 -0
  46. whop_sdk/types/shared_params/email_notification_preferences.py +9 -0
  47. whop_sdk/types/shared_params/member_most_recent_actions.py +24 -0
  48. whop_sdk/types/shared_params/member_statuses.py +9 -0
  49. whop_sdk/types/shared_params/who_can_comment_types.py +9 -0
  50. whop_sdk/types/shared_params/who_can_post_types.py +9 -0
  51. whop_sdk/types/unwrap_webhook_event.py +24 -1
  52. whop_sdk/types/user_check_access_response.py +2 -3
  53. whop_sdk/types/user_retrieve_response.py +12 -1
  54. {whop_sdk-0.0.1.dist-info → whop_sdk-0.0.2.dist-info}/METADATA +2 -2
  55. {whop_sdk-0.0.1.dist-info → whop_sdk-0.0.2.dist-info}/RECORD +57 -26
  56. {whop_sdk-0.0.1.dist-info → whop_sdk-0.0.2.dist-info}/WHEEL +0 -0
  57. {whop_sdk-0.0.1.dist-info → whop_sdk-0.0.2.dist-info}/licenses/LICENSE +0 -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.course_lesson_interaction import CourseLessonInteraction
8
+
9
+ __all__ = ["CourseLessonInteractionCompletedWebhookEvent"]
10
+
11
+
12
+ class CourseLessonInteractionCompletedWebhookEvent(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: CourseLessonInteraction
20
+ """A lesson interaction tracking user progress in courses"""
21
+
22
+ timestamp: datetime
23
+ """The timestamp in ISO 8601 format that the webhook was sent at on the server"""
24
+
25
+ type: Literal["course_lesson_interaction.completed"]
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.entry import Entry
8
+
9
+ __all__ = ["EntryApprovedWebhookEvent"]
10
+
11
+
12
+ class EntryApprovedWebhookEvent(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: Entry
20
+ """An object representing an entry in a waitlist."""
21
+
22
+ timestamp: datetime
23
+ """The timestamp in ISO 8601 format that the webhook was sent at on the server"""
24
+
25
+ type: Literal["entry.approved"]
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.entry import Entry
8
+
9
+ __all__ = ["EntryCreatedWebhookEvent"]
10
+
11
+
12
+ class EntryCreatedWebhookEvent(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: Entry
20
+ """An object representing an entry in a waitlist."""
21
+
22
+ timestamp: datetime
23
+ """The timestamp in ISO 8601 format that the webhook was sent at on the server"""
24
+
25
+ type: Literal["entry.created"]
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.entry import Entry
8
+
9
+ __all__ = ["EntryDeletedWebhookEvent"]
10
+
11
+
12
+ class EntryDeletedWebhookEvent(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: Entry
20
+ """An object representing an entry in a waitlist."""
21
+
22
+ timestamp: datetime
23
+ """The timestamp in ISO 8601 format that the webhook was sent at on the server"""
24
+
25
+ type: Literal["entry.deleted"]
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.entry import Entry
8
+
9
+ __all__ = ["EntryDeniedWebhookEvent"]
10
+
11
+
12
+ class EntryDeniedWebhookEvent(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: Entry
20
+ """An object representing an entry in a waitlist."""
21
+
22
+ timestamp: datetime
23
+ """The timestamp in ISO 8601 format that the webhook was sent at on the server"""
24
+
25
+ type: Literal["entry.denied"]
26
+ """The webhook event type"""
@@ -5,13 +5,28 @@ from datetime import datetime
5
5
 
6
6
  from .._models import BaseModel
7
7
 
8
- __all__ = ["ExperienceListResponse", "App", "Company"]
8
+ __all__ = ["ExperienceListResponse", "App", "AppIcon", "Company", "Image"]
9
+
10
+
11
+ class AppIcon(BaseModel):
12
+ url: Optional[str] = None
13
+ """This is the URL you use to render optimized attachments on the client.
14
+
15
+ This should be used for apps.
16
+ """
9
17
 
10
18
 
11
19
  class App(BaseModel):
12
20
  id: str
13
21
  """The ID of the app"""
14
22
 
23
+ icon: Optional[AppIcon] = None
24
+ """The icon for the app.
25
+
26
+ This icon is shown on discovery, on the product page, on checkout, and as a
27
+ default icon for the experiences.
28
+ """
29
+
15
30
  name: str
16
31
  """The name of the app"""
17
32
 
@@ -27,6 +42,14 @@ class Company(BaseModel):
27
42
  """The title of the company."""
28
43
 
29
44
 
45
+ class Image(BaseModel):
46
+ url: Optional[str] = None
47
+ """This is the URL you use to render optimized attachments on the client.
48
+
49
+ This should be used for apps.
50
+ """
51
+
52
+
30
53
  class ExperienceListResponse(BaseModel):
31
54
  id: str
32
55
  """The unique ID representing this experience"""
@@ -40,6 +63,9 @@ class ExperienceListResponse(BaseModel):
40
63
  created_at: datetime
41
64
  """The timestamp of when this experience was created."""
42
65
 
66
+ image: Optional[Image] = None
67
+ """The logo for the experience."""
68
+
43
69
  name: str
44
70
  """The written name of the description."""
45
71
 
@@ -0,0 +1,28 @@
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
+ __all__ = ["ForumListParams"]
9
+
10
+
11
+ class ForumListParams(TypedDict, total=False):
12
+ company_id: Required[str]
13
+ """The ID of the company to list forums for"""
14
+
15
+ after: Optional[str]
16
+ """Returns the elements in the list that come after the specified cursor."""
17
+
18
+ before: Optional[str]
19
+ """Returns the elements in the list that come before the specified cursor."""
20
+
21
+ first: Optional[int]
22
+ """Returns the first _n_ elements from the list."""
23
+
24
+ last: Optional[int]
25
+ """Returns the last _n_ elements from the list."""
26
+
27
+ product_id: Optional[str]
28
+ """If provided, only forums connected to this product are returned"""
@@ -0,0 +1,33 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from .._models import BaseModel
4
+ from .shared.who_can_post_types import WhoCanPostTypes
5
+ from .shared.who_can_comment_types import WhoCanCommentTypes
6
+ from .shared.email_notification_preferences import EmailNotificationPreferences
7
+
8
+ __all__ = ["ForumListResponse", "Experience"]
9
+
10
+
11
+ class Experience(BaseModel):
12
+ id: str
13
+ """The unique ID representing this experience"""
14
+
15
+ name: str
16
+ """The written name of the description."""
17
+
18
+
19
+ class ForumListResponse(BaseModel):
20
+ id: str
21
+ """The unique identifier for the entity"""
22
+
23
+ email_notification_preference: EmailNotificationPreferences
24
+ """The email notification preference for this forum"""
25
+
26
+ experience: Experience
27
+ """The experience for this forum"""
28
+
29
+ who_can_comment: WhoCanCommentTypes
30
+ """Who can comment on this forum"""
31
+
32
+ who_can_post: WhoCanPostTypes
33
+ """Who can post on this forum"""
@@ -0,0 +1,23 @@
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
+ from .shared.who_can_post_types import WhoCanPostTypes
9
+ from .shared.who_can_comment_types import WhoCanCommentTypes
10
+ from .shared.email_notification_preferences import EmailNotificationPreferences
11
+
12
+ __all__ = ["ForumUpdateParams"]
13
+
14
+
15
+ class ForumUpdateParams(TypedDict, total=False):
16
+ email_notification_preference: Optional[EmailNotificationPreferences]
17
+ """Email notification preference option for a forum feed"""
18
+
19
+ who_can_comment: Optional[WhoCanCommentTypes]
20
+ """Who can comment on a forum feed"""
21
+
22
+ who_can_post: Optional[WhoCanPostTypes]
23
+ """Who can post on a forum feed"""
@@ -108,7 +108,11 @@ class Plan(TypedDict, total=False):
108
108
  """The interval at which the plan charges (expiration plans)."""
109
109
 
110
110
  initial_price: Optional[float]
111
- """An additional amount charged upon first purchase."""
111
+ """An additional amount charged upon first purchase.
112
+
113
+ Use only if a one time payment OR you want to charge an additional amount on top
114
+ of the renewal price. Provided as a number in dollars. Eg: 10.43 for $10.43
115
+ """
112
116
 
113
117
  internal_notes: Optional[str]
114
118
  """A personal description or notes section for the business."""
@@ -120,7 +124,11 @@ class Plan(TypedDict, total=False):
120
124
  """The methods of how a plan can be released."""
121
125
 
122
126
  renewal_price: Optional[float]
123
- """The amount the customer is charged every billing period."""
127
+ """The amount the customer is charged every billing period.
128
+
129
+ Use only if a recurring payment. Provided as a number in dollars. Eg: 10.43 for
130
+ $10.43
131
+ """
124
132
 
125
133
  trial_period_days: Optional[int]
126
134
  """The number of free trial days added before a renewal plan."""
@@ -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.access_level import AccessLevel
13
+ from .shared.member_statuses import MemberStatuses
14
+ from .shared.member_most_recent_actions import MemberMostRecentActions
15
+
16
+ __all__ = ["MemberListParams"]
17
+
18
+
19
+ class MemberListParams(TypedDict, total=False):
20
+ company_id: Required[str]
21
+ """The ID of the company to list members for"""
22
+
23
+ access_level: Optional[AccessLevel]
24
+ """The access level a given user (or company) has to an access pass or company."""
25
+
26
+ access_pass_ids: Optional[SequenceNotStr[str]]
27
+ """The access pass IDs to filter the members by"""
28
+
29
+ after: Optional[str]
30
+ """Returns the elements in the list that come after the specified cursor."""
31
+
32
+ before: Optional[str]
33
+ """Returns the elements in the list that come before the specified cursor."""
34
+
35
+ created_after: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
36
+ """The minimum creation date to filter by"""
37
+
38
+ created_before: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
39
+ """The maximum creation date to filter by"""
40
+
41
+ direction: Optional[Direction]
42
+ """The direction of the sort."""
43
+
44
+ first: Optional[int]
45
+ """Returns the first _n_ elements from the list."""
46
+
47
+ last: Optional[int]
48
+ """Returns the last _n_ elements from the list."""
49
+
50
+ most_recent_actions: Optional[List[MemberMostRecentActions]]
51
+ """The most recent actions to filter the members by"""
52
+
53
+ order: Optional[Literal["id", "usd_total_spent", "created_at", "joined_at", "most_recent_action"]]
54
+ """Which columns can be used to sort."""
55
+
56
+ plan_ids: Optional[SequenceNotStr[str]]
57
+ """The plan IDs to filter the members by"""
58
+
59
+ promo_code_ids: Optional[SequenceNotStr[str]]
60
+ """The promo code IDs to filter the members by"""
61
+
62
+ query: Optional[str]
63
+ """The name, username, or email to filter the members by.
64
+
65
+ The email filter will only apply if the current actor has the
66
+ `member:email:read` permission.
67
+ """
68
+
69
+ statuses: Optional[List[MemberStatuses]]
70
+ """The statuses to filter the members by"""
@@ -0,0 +1,65 @@
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.access_level import AccessLevel
8
+ from .shared.member_statuses import MemberStatuses
9
+ from .shared.member_most_recent_actions import MemberMostRecentActions
10
+
11
+ __all__ = ["MemberListResponse", "User"]
12
+
13
+
14
+ class User(BaseModel):
15
+ id: str
16
+ """The internal ID of the user account."""
17
+
18
+ email: Optional[str] = None
19
+ """The digital mailing address of the user."""
20
+
21
+ name: Optional[str] = None
22
+ """The user's full name."""
23
+
24
+ username: str
25
+ """The whop username."""
26
+
27
+
28
+ class MemberListResponse(BaseModel):
29
+ id: str
30
+ """The ID of the member"""
31
+
32
+ access_level: AccessLevel
33
+ """The access level of the product member.
34
+
35
+ If its admin, the member is an authorized user of the access pass. If its
36
+ customer, the member has a valid membership to the access pass. If its
37
+ no_access, the member does not have access to the access pass.
38
+ """
39
+
40
+ created_at: datetime
41
+ """When the member was created"""
42
+
43
+ joined_at: datetime
44
+ """When the member joined the company"""
45
+
46
+ most_recent_action: Optional[MemberMostRecentActions] = None
47
+ """The different most recent actions a member can have."""
48
+
49
+ most_recent_action_at: Optional[datetime] = None
50
+ """The time for the most recent action, if applicable."""
51
+
52
+ phone: Optional[str] = None
53
+ """The phone number for the member, if available."""
54
+
55
+ status: MemberStatuses
56
+ """The status of the member"""
57
+
58
+ updated_at: datetime
59
+ """The timestamp of when this member was last updated"""
60
+
61
+ usd_total_spent: float
62
+ """How much money this customer has spent on the company's products and plans"""
63
+
64
+ user: Optional[User] = None
65
+ """The user for this member, if any."""
@@ -0,0 +1,79 @@
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.access_level import AccessLevel
8
+ from .shared.member_statuses import MemberStatuses
9
+ from .shared.member_most_recent_actions import MemberMostRecentActions
10
+
11
+ __all__ = ["MemberRetrieveResponse", "Company", "User"]
12
+
13
+
14
+ class Company(BaseModel):
15
+ id: str
16
+ """The ID of the company"""
17
+
18
+ route: str
19
+ """The slug/route of the company on the Whop site."""
20
+
21
+ title: str
22
+ """The written name of the company."""
23
+
24
+
25
+ class User(BaseModel):
26
+ id: str
27
+ """The internal ID of the user account."""
28
+
29
+ email: Optional[str] = None
30
+ """The digital mailing address of the user."""
31
+
32
+ name: Optional[str] = None
33
+ """The user's full name."""
34
+
35
+ username: str
36
+ """The whop username."""
37
+
38
+
39
+ class MemberRetrieveResponse(BaseModel):
40
+ id: str
41
+ """The ID of the member"""
42
+
43
+ access_level: AccessLevel
44
+ """The access level of the product member.
45
+
46
+ If its admin, the member is an authorized user of the access pass. If its
47
+ customer, the member has a valid membership to the access pass. If its
48
+ no_access, the member does not have access to the access pass.
49
+ """
50
+
51
+ company: Company
52
+ """The company for the member."""
53
+
54
+ created_at: datetime
55
+ """When the member was created"""
56
+
57
+ joined_at: datetime
58
+ """When the member joined the company"""
59
+
60
+ most_recent_action: Optional[MemberMostRecentActions] = None
61
+ """The different most recent actions a member can have."""
62
+
63
+ most_recent_action_at: Optional[datetime] = None
64
+ """The time for the most recent action, if applicable."""
65
+
66
+ phone: Optional[str] = None
67
+ """The phone number for the member, if available."""
68
+
69
+ status: MemberStatuses
70
+ """The status of the member"""
71
+
72
+ updated_at: datetime
73
+ """The timestamp of when this member was last updated"""
74
+
75
+ usd_total_spent: float
76
+ """How much money this customer has spent on the company's products and plans"""
77
+
78
+ user: Optional[User] = None
79
+ """The user for this member, if any."""
@@ -0,0 +1,29 @@
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.membership import Membership
8
+
9
+ __all__ = ["MembershipActivatedWebhookEvent"]
10
+
11
+
12
+ class MembershipActivatedWebhookEvent(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: Membership
20
+ """
21
+ A membership represents a purchase between a User and a Company for a specific
22
+ Product.
23
+ """
24
+
25
+ timestamp: datetime
26
+ """The timestamp in ISO 8601 format that the webhook was sent at on the server"""
27
+
28
+ type: Literal["membership.activated"]
29
+ """The webhook event type"""
@@ -0,0 +1,29 @@
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.membership import Membership
8
+
9
+ __all__ = ["MembershipDeactivatedWebhookEvent"]
10
+
11
+
12
+ class MembershipDeactivatedWebhookEvent(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: Membership
20
+ """
21
+ A membership represents a purchase between a User and a Company for a specific
22
+ Product.
23
+ """
24
+
25
+ timestamp: datetime
26
+ """The timestamp in ISO 8601 format that the webhook was sent at on the server"""
27
+
28
+ type: Literal["membership.deactivated"]
29
+ """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.payment import Payment
8
+
9
+ __all__ = ["PaymentFailedWebhookEvent"]
10
+
11
+
12
+ class PaymentFailedWebhookEvent(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: Payment
20
+ """An object representing a receipt for a membership."""
21
+
22
+ timestamp: datetime
23
+ """The timestamp in ISO 8601 format that the webhook was sent at on the server"""
24
+
25
+ type: Literal["payment.failed"]
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.payment import Payment
8
+
9
+ __all__ = ["PaymentPendingWebhookEvent"]
10
+
11
+
12
+ class PaymentPendingWebhookEvent(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: Payment
20
+ """An object representing a receipt for a membership."""
21
+
22
+ timestamp: datetime
23
+ """The timestamp in ISO 8601 format that the webhook was sent at on the server"""
24
+
25
+ type: Literal["payment.pending"]
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.payment import Payment
8
+
9
+ __all__ = ["PaymentSucceededWebhookEvent"]
10
+
11
+
12
+ class PaymentSucceededWebhookEvent(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: Payment
20
+ """An object representing a receipt for a membership."""
21
+
22
+ timestamp: datetime
23
+ """The timestamp in ISO 8601 format that the webhook was sent at on the server"""
24
+
25
+ type: Literal["payment.succeeded"]
26
+ """The webhook event type"""