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,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__ = ["GlobalAffiliateStatus"]
6
+
7
+ GlobalAffiliateStatus: TypeAlias = Literal["enabled", "disabled"]
@@ -0,0 +1,67 @@
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__ = ["IndustryTypes"]
6
+
7
+ IndustryTypes: TypeAlias = Literal[
8
+ "trading",
9
+ "sports_betting",
10
+ "reselling",
11
+ "fitness",
12
+ "amazon_fba",
13
+ "real_estate",
14
+ "kindle_book_publishing",
15
+ "dating",
16
+ "agencies",
17
+ "health_and_wellness",
18
+ "social_media",
19
+ "sales",
20
+ "business",
21
+ "ecommerce",
22
+ "video_games",
23
+ "home_services",
24
+ "ai",
25
+ "public_speaking",
26
+ "personal_finance",
27
+ "careers",
28
+ "travel",
29
+ "clipping",
30
+ "spirituality",
31
+ "vas",
32
+ "personal_development",
33
+ "software",
34
+ "other",
35
+ "marketing_agency",
36
+ "sales_agency",
37
+ "ai_agency",
38
+ "design_agency",
39
+ "coaching_agency",
40
+ "development_agency",
41
+ "recruiting_agency",
42
+ "customer_support_agency",
43
+ "clipping_agency",
44
+ "clothing",
45
+ "supplements",
46
+ "beauty_and_personal_care",
47
+ "fitness_gear",
48
+ "accessories",
49
+ "home_goods",
50
+ "electronics_and_gadgets",
51
+ "food_and_beverages",
52
+ "gym",
53
+ "restaurant",
54
+ "retail_store",
55
+ "coffee_shop",
56
+ "salon_spa",
57
+ "medical_dentist_office",
58
+ "hotel_lodging",
59
+ "auto_repair_shop",
60
+ "masterminds",
61
+ "webinars",
62
+ "bootcamps",
63
+ "convention",
64
+ "concerts",
65
+ "meetups",
66
+ "parties",
67
+ ]
@@ -0,0 +1,61 @@
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 .currency import Currency
7
+ from ..._models import BaseModel
8
+ from .invoice_status import InvoiceStatus
9
+
10
+ __all__ = ["Invoice", "CurrentPlan", "User"]
11
+
12
+
13
+ class CurrentPlan(BaseModel):
14
+ id: str
15
+ """The internal ID of the plan."""
16
+
17
+ currency: Currency
18
+ """The respective currency identifier for the plan."""
19
+
20
+ formatted_price: str
21
+ """The formatted price (including currency) for the plan."""
22
+
23
+
24
+ class User(BaseModel):
25
+ id: str
26
+ """The internal ID of the user."""
27
+
28
+ name: Optional[str] = None
29
+ """The name of the user from their Whop account."""
30
+
31
+ username: str
32
+ """The username of the user from their Whop account."""
33
+
34
+
35
+ class Invoice(BaseModel):
36
+ id: str
37
+ """The ID of the invoice."""
38
+
39
+ created_at: datetime
40
+ """The date the invoice was created."""
41
+
42
+ current_plan: CurrentPlan
43
+ """The plan that the invoice was created for."""
44
+
45
+ due_date: Optional[datetime] = None
46
+ """The date the invoice is due."""
47
+
48
+ email_address: Optional[str] = None
49
+ """The email address that the invoice was created for."""
50
+
51
+ fetch_invoice_token: str
52
+ """The token to fetch the invoice."""
53
+
54
+ number: str
55
+ """The number of the invoice."""
56
+
57
+ status: InvoiceStatus
58
+ """The status of the invoice."""
59
+
60
+ user: Optional[User] = None
61
+ """The user that the invoice was created for."""
@@ -0,0 +1,61 @@
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 .currency import Currency
7
+ from ..._models import BaseModel
8
+ from .invoice_status import InvoiceStatus
9
+
10
+ __all__ = ["InvoiceListItem", "CurrentPlan", "User"]
11
+
12
+
13
+ class CurrentPlan(BaseModel):
14
+ id: str
15
+ """The internal ID of the plan."""
16
+
17
+ currency: Currency
18
+ """The respective currency identifier for the plan."""
19
+
20
+ formatted_price: str
21
+ """The formatted price (including currency) for the plan."""
22
+
23
+
24
+ class User(BaseModel):
25
+ id: str
26
+ """The internal ID of the user."""
27
+
28
+ name: Optional[str] = None
29
+ """The name of the user from their Whop account."""
30
+
31
+ username: str
32
+ """The username of the user from their Whop account."""
33
+
34
+
35
+ class InvoiceListItem(BaseModel):
36
+ id: str
37
+ """The ID of the invoice."""
38
+
39
+ created_at: datetime
40
+ """The date the invoice was created."""
41
+
42
+ current_plan: CurrentPlan
43
+ """The plan that the invoice was created for."""
44
+
45
+ due_date: Optional[datetime] = None
46
+ """The date the invoice is due."""
47
+
48
+ email_address: Optional[str] = None
49
+ """The email address that the invoice was created for."""
50
+
51
+ fetch_invoice_token: str
52
+ """The token to fetch the invoice."""
53
+
54
+ number: str
55
+ """The number of the invoice."""
56
+
57
+ status: InvoiceStatus
58
+ """The status of the invoice."""
59
+
60
+ user: Optional[User] = None
61
+ """The user that the invoice was created for."""
@@ -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__ = ["InvoiceStatus"]
6
+
7
+ InvoiceStatus: TypeAlias = Literal["open", "paid", "past_due", "void"]
@@ -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 .currency import Currency
7
+ from ..._models import BaseModel
8
+ from .membership_status import MembershipStatus
9
+
10
+ __all__ = ["Membership", "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 Membership(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,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__ = ["MembershipStatus"]
6
+
7
+ MembershipStatus: TypeAlias = Literal[
8
+ "trialing", "active", "past_due", "completed", "canceled", "expired", "unresolved", "drafted"
9
+ ]
@@ -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 .dms_post_types import DmsPostTypes
8
+
9
+ __all__ = ["Message", "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 Message(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,21 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["PageInfo"]
8
+
9
+
10
+ class PageInfo(BaseModel):
11
+ end_cursor: Optional[str] = None
12
+ """When paginating forwards, the cursor to continue."""
13
+
14
+ has_next_page: bool
15
+ """When paginating forwards, are there more items?"""
16
+
17
+ has_previous_page: bool
18
+ """When paginating backwards, are there more items?"""
19
+
20
+ start_cursor: Optional[str] = None
21
+ """When paginating backwards, the cursor to continue."""
@@ -0,0 +1,211 @@
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 .currency import Currency
7
+ from ..._models import BaseModel
8
+ from .promo_type import PromoType
9
+ from .receipt_status import ReceiptStatus
10
+ from .membership_status import MembershipStatus
11
+ from .friendly_receipt_status import FriendlyReceiptStatus
12
+
13
+ __all__ = ["Payment", "BillingAddress", "Company", "Member", "Membership", "Plan", "Product", "PromoCode", "User"]
14
+
15
+
16
+ class BillingAddress(BaseModel):
17
+ city: Optional[str] = None
18
+ """The city of the address."""
19
+
20
+ country: Optional[str] = None
21
+ """The country of the address."""
22
+
23
+ line1: Optional[str] = None
24
+ """The line 1 of the address."""
25
+
26
+ line2: Optional[str] = None
27
+ """The line 2 of the address."""
28
+
29
+ name: Optional[str] = None
30
+ """The name of the customer."""
31
+
32
+ postal_code: Optional[str] = None
33
+ """The postal code of the address."""
34
+
35
+ state: Optional[str] = None
36
+ """The state of the address."""
37
+
38
+
39
+ class Company(BaseModel):
40
+ id: str
41
+ """The ID of the company"""
42
+
43
+ route: str
44
+ """The slug/route of the company on the Whop site."""
45
+
46
+ title: str
47
+ """The written name of the company."""
48
+
49
+
50
+ class Member(BaseModel):
51
+ id: str
52
+ """The ID of the member"""
53
+
54
+ phone: Optional[str] = None
55
+ """The phone number for the member, if available."""
56
+
57
+
58
+ class Membership(BaseModel):
59
+ id: str
60
+ """The internal ID of the membership."""
61
+
62
+ status: MembershipStatus
63
+ """The state of the membership."""
64
+
65
+
66
+ class Plan(BaseModel):
67
+ id: str
68
+ """The internal ID of the plan."""
69
+
70
+
71
+ class Product(BaseModel):
72
+ id: str
73
+ """The internal ID of the public product."""
74
+
75
+ route: str
76
+ """The route of the product."""
77
+
78
+ title: str
79
+ """The title of the product. Use for Whop 4.0."""
80
+
81
+
82
+ class PromoCode(BaseModel):
83
+ id: str
84
+ """The ID of the promo."""
85
+
86
+ amount_off: float
87
+ """The amount off (% or flat amount) for the promo."""
88
+
89
+ base_currency: Currency
90
+ """The monetary currency of the promo code."""
91
+
92
+ code: Optional[str] = None
93
+ """The specific code used to apply the promo at checkout."""
94
+
95
+ number_of_intervals: Optional[int] = None
96
+ """The number of billing cycles the promo is applied for."""
97
+
98
+ promo_type: PromoType
99
+ """The type (% or flat amount) of the promo."""
100
+
101
+
102
+ class User(BaseModel):
103
+ id: str
104
+ """The internal ID of the user."""
105
+
106
+ email: Optional[str] = None
107
+ """The email of the user"""
108
+
109
+ name: Optional[str] = None
110
+ """The name of the user from their Whop account."""
111
+
112
+ username: str
113
+ """The username of the user from their Whop account."""
114
+
115
+
116
+ class Payment(BaseModel):
117
+ id: str
118
+ """The payment ID"""
119
+
120
+ amount_after_fees: float
121
+ """How much the payment is for after fees"""
122
+
123
+ auto_refunded: bool
124
+ """Whether this payment was auto refunded or not"""
125
+
126
+ billing_address: Optional[BillingAddress] = None
127
+ """The address of the user who made the payment."""
128
+
129
+ billing_reason: Optional[str] = None
130
+ """The billing reason"""
131
+
132
+ card_brand: Optional[str] = None
133
+ """The type of card used as the payment method."""
134
+
135
+ card_last4: Optional[str] = None
136
+ """The last 4 digits of the card used to make the payment."""
137
+
138
+ company: Optional[Company] = None
139
+ """The company for the payment."""
140
+
141
+ created_at: datetime
142
+ """The datetime the payment was created"""
143
+
144
+ currency: Optional[Currency] = None
145
+ """The available currencies on the platform"""
146
+
147
+ dispute_alerted_at: Optional[datetime] = None
148
+ """When an alert came in that this transaction will be disputed"""
149
+
150
+ failure_message: Optional[str] = None
151
+ """If the payment failed, the reason for the failure."""
152
+
153
+ last_payment_attempt: Optional[datetime] = None
154
+ """The time of the last payment attempt."""
155
+
156
+ member: Optional[Member] = None
157
+ """The member attached to this payment."""
158
+
159
+ membership: Optional[Membership] = None
160
+ """The membership attached to this payment."""
161
+
162
+ paid_at: Optional[datetime] = None
163
+ """The datetime the payment was paid"""
164
+
165
+ payment_method_type: Optional[str] = None
166
+ """Returns the type of payment method used for the payment, if available.
167
+
168
+ Ex. klarna, affirm, card, cashapp
169
+ """
170
+
171
+ plan: Optional[Plan] = None
172
+ """The plan attached to this payment."""
173
+
174
+ product: Optional[Product] = None
175
+ """The access pass attached to this payment."""
176
+
177
+ promo_code: Optional[PromoCode] = None
178
+ """The promo code used for this payment."""
179
+
180
+ refundable: bool
181
+ """Whether the payment can be refunded."""
182
+
183
+ refunded_amount: Optional[float] = None
184
+ """The payment refund amount(if applicable)."""
185
+
186
+ refunded_at: Optional[datetime] = None
187
+ """When the payment was refunded (if applicable)."""
188
+
189
+ retryable: bool
190
+ """Whether the payment can be retried."""
191
+
192
+ status: Optional[ReceiptStatus] = None
193
+ """The status of a receipt"""
194
+
195
+ substatus: FriendlyReceiptStatus
196
+ """The friendly status of the payment."""
197
+
198
+ subtotal: Optional[float] = None
199
+ """The subtotal to show to the creator (excluding buyer fees)."""
200
+
201
+ total: Optional[float] = None
202
+ """The total to show to the creator (excluding buyer fees)."""
203
+
204
+ usd_total: Optional[float] = None
205
+ """The total in USD to show to the creator (excluding buyer fees)."""
206
+
207
+ user: Optional[User] = None
208
+ """The user that made this payment."""
209
+
210
+ voidable: bool
211
+ """Whether the payment can be voided."""