whop-sdk 0.0.10__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.
- whop_sdk/__init__.py +94 -0
- whop_sdk/_base_client.py +1995 -0
- whop_sdk/_client.py +800 -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 +857 -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 +58 -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 +540 -0
- whop_sdk/resources/access_tokens.py +341 -0
- whop_sdk/resources/account_links.py +211 -0
- whop_sdk/resources/app_builds.py +587 -0
- whop_sdk/resources/apps.py +684 -0
- whop_sdk/resources/authorized_users.py +353 -0
- whop_sdk/resources/chat_channels.py +469 -0
- whop_sdk/resources/checkout_configurations.py +776 -0
- whop_sdk/resources/companies.py +465 -0
- whop_sdk/resources/course_chapters.py +602 -0
- whop_sdk/resources/course_lesson_interactions.py +343 -0
- whop_sdk/resources/course_lessons.py +1040 -0
- whop_sdk/resources/course_students.py +327 -0
- whop_sdk/resources/courses.py +776 -0
- whop_sdk/resources/disputes.py +693 -0
- whop_sdk/resources/entries.py +556 -0
- whop_sdk/resources/experiences.py +983 -0
- whop_sdk/resources/forum_posts.py +656 -0
- whop_sdk/resources/forums.py +446 -0
- whop_sdk/resources/invoices.py +1099 -0
- whop_sdk/resources/ledger_accounts.py +171 -0
- whop_sdk/resources/members.py +429 -0
- whop_sdk/resources/memberships.py +818 -0
- whop_sdk/resources/messages.py +558 -0
- whop_sdk/resources/notifications.py +388 -0
- whop_sdk/resources/payment_tokens.py +359 -0
- whop_sdk/resources/payments.py +1040 -0
- whop_sdk/resources/plans.py +1001 -0
- whop_sdk/resources/products.py +970 -0
- whop_sdk/resources/promo_codes.py +668 -0
- whop_sdk/resources/reactions.py +423 -0
- whop_sdk/resources/refunds.py +347 -0
- whop_sdk/resources/reviews.py +332 -0
- whop_sdk/resources/setup_intents.py +349 -0
- whop_sdk/resources/shipments.py +451 -0
- whop_sdk/resources/support_channels.py +455 -0
- whop_sdk/resources/transfers.py +513 -0
- whop_sdk/resources/users.py +248 -0
- whop_sdk/resources/webhooks.py +69 -0
- whop_sdk/resources/withdrawals.py +341 -0
- whop_sdk/types/__init__.py +262 -0
- whop_sdk/types/access_token_create_params.py +64 -0
- whop_sdk/types/access_token_create_response.py +15 -0
- whop_sdk/types/account_link_create_params.py +27 -0
- whop_sdk/types/account_link_create_response.py +15 -0
- whop_sdk/types/app_build_create_params.py +72 -0
- whop_sdk/types/app_build_list_params.py +42 -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 +59 -0
- whop_sdk/types/app_list_response.py +110 -0
- whop_sdk/types/app_type.py +7 -0
- whop_sdk/types/app_update_params.py +67 -0
- whop_sdk/types/assessment_question_types.py +7 -0
- whop_sdk/types/authorized_user_list_params.py +41 -0
- whop_sdk/types/authorized_user_list_response.py +33 -0
- whop_sdk/types/authorized_user_retrieve_response.py +33 -0
- whop_sdk/types/billing_reasons.py +9 -0
- whop_sdk/types/card_brands.py +25 -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 +373 -0
- whop_sdk/types/checkout_configuration_list_params.py +41 -0
- whop_sdk/types/checkout_configuration_list_response.py +104 -0
- whop_sdk/types/checkout_modes.py +7 -0
- whop_sdk/types/company_create_params.py +22 -0
- whop_sdk/types/company_list_params.py +38 -0
- whop_sdk/types/company_list_response.py +76 -0
- whop_sdk/types/course.py +122 -0
- whop_sdk/types/course_chapter.py +32 -0
- whop_sdk/types/course_chapter_create_params.py +16 -0
- whop_sdk/types/course_chapter_delete_response.py +7 -0
- whop_sdk/types/course_chapter_list_params.py +25 -0
- whop_sdk/types/course_chapter_list_response.py +16 -0
- whop_sdk/types/course_chapter_update_params.py +12 -0
- whop_sdk/types/course_create_params.py +78 -0
- whop_sdk/types/course_delete_response.py +7 -0
- whop_sdk/types/course_lesson_create_params.py +63 -0
- whop_sdk/types/course_lesson_delete_response.py +7 -0
- whop_sdk/types/course_lesson_interaction_completed_webhook_event.py +26 -0
- whop_sdk/types/course_lesson_interaction_list_params.py +34 -0
- whop_sdk/types/course_lesson_list_params.py +28 -0
- whop_sdk/types/course_lesson_list_response.py +57 -0
- whop_sdk/types/course_lesson_mark_as_completed_response.py +7 -0
- whop_sdk/types/course_lesson_start_response.py +7 -0
- whop_sdk/types/course_lesson_submit_assessment_params.py +26 -0
- whop_sdk/types/course_lesson_submit_assessment_response.py +62 -0
- whop_sdk/types/course_lesson_update_params.py +222 -0
- whop_sdk/types/course_list_params.py +28 -0
- whop_sdk/types/course_list_response.py +90 -0
- whop_sdk/types/course_student_list_params.py +28 -0
- whop_sdk/types/course_student_list_response.py +42 -0
- whop_sdk/types/course_student_retrieve_response.py +61 -0
- whop_sdk/types/course_update_params.py +114 -0
- whop_sdk/types/course_visibilities.py +7 -0
- whop_sdk/types/dispute.py +284 -0
- whop_sdk/types/dispute_created_webhook_event.py +26 -0
- whop_sdk/types/dispute_list_params.py +38 -0
- whop_sdk/types/dispute_list_response.py +77 -0
- whop_sdk/types/dispute_statuses.py +17 -0
- whop_sdk/types/dispute_update_evidence_params.py +159 -0
- whop_sdk/types/dispute_updated_webhook_event.py +26 -0
- whop_sdk/types/embed_type.py +7 -0
- whop_sdk/types/entry_approve_response.py +10 -0
- whop_sdk/types/entry_approved_webhook_event.py +26 -0
- whop_sdk/types/entry_created_webhook_event.py +26 -0
- whop_sdk/types/entry_deleted_webhook_event.py +26 -0
- whop_sdk/types/entry_denied_webhook_event.py +26 -0
- whop_sdk/types/entry_list_params.py +52 -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_duplicate_params.py +13 -0
- whop_sdk/types/experience_list_params.py +40 -0
- whop_sdk/types/experience_list_response.py +73 -0
- whop_sdk/types/experience_update_params.py +46 -0
- whop_sdk/types/forum_list_params.py +28 -0
- whop_sdk/types/forum_list_response.py +33 -0
- whop_sdk/types/forum_post_create_params.py +101 -0
- whop_sdk/types/forum_post_list_params.py +31 -0
- whop_sdk/types/forum_post_list_response.py +60 -0
- whop_sdk/types/forum_post_update_params.py +56 -0
- whop_sdk/types/forum_post_visibility_type.py +7 -0
- whop_sdk/types/forum_update_params.py +23 -0
- whop_sdk/types/invoice_create_params.py +515 -0
- whop_sdk/types/invoice_created_webhook_event.py +26 -0
- whop_sdk/types/invoice_list_params.py +53 -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/languages.py +30 -0
- whop_sdk/types/ledger_account_retrieve_response.py +93 -0
- whop_sdk/types/lesson.py +219 -0
- whop_sdk/types/lesson_types.py +7 -0
- whop_sdk/types/lesson_visibilities.py +7 -0
- whop_sdk/types/member_list_params.py +73 -0
- whop_sdk/types/member_list_response.py +65 -0
- whop_sdk/types/member_retrieve_response.py +79 -0
- whop_sdk/types/membership_activated_webhook_event.py +29 -0
- whop_sdk/types/membership_cancel_params.py +13 -0
- whop_sdk/types/membership_deactivated_webhook_event.py +29 -0
- whop_sdk/types/membership_list_params.py +73 -0
- whop_sdk/types/membership_list_response.py +128 -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 +63 -0
- whop_sdk/types/message_list_params.py +30 -0
- whop_sdk/types/message_list_response.py +90 -0
- whop_sdk/types/message_update_params.py +45 -0
- whop_sdk/types/notification_create_params.py +93 -0
- whop_sdk/types/notification_create_response.py +10 -0
- whop_sdk/types/payment_create_params.py +162 -0
- whop_sdk/types/payment_failed_webhook_event.py +26 -0
- whop_sdk/types/payment_list_params.py +67 -0
- whop_sdk/types/payment_list_response.py +273 -0
- whop_sdk/types/payment_method_types.py +94 -0
- whop_sdk/types/payment_pending_webhook_event.py +26 -0
- whop_sdk/types/payment_provider.py +9 -0
- whop_sdk/types/payment_refund_params.py +13 -0
- whop_sdk/types/payment_succeeded_webhook_event.py +26 -0
- whop_sdk/types/payment_token_list_params.py +38 -0
- whop_sdk/types/payment_token_list_response.py +41 -0
- whop_sdk/types/payment_token_retrieve_params.py +12 -0
- whop_sdk/types/payment_token_retrieve_response.py +41 -0
- whop_sdk/types/plan_create_params.py +162 -0
- whop_sdk/types/plan_delete_response.py +7 -0
- whop_sdk/types/plan_list_params.py +57 -0
- whop_sdk/types/plan_list_response.py +128 -0
- whop_sdk/types/plan_update_params.py +155 -0
- whop_sdk/types/product_create_params.py +147 -0
- whop_sdk/types/product_delete_response.py +7 -0
- whop_sdk/types/product_list_params.py +49 -0
- whop_sdk/types/product_update_params.py +82 -0
- whop_sdk/types/promo_code.py +90 -0
- whop_sdk/types/promo_code_create_params.py +70 -0
- whop_sdk/types/promo_code_delete_response.py +7 -0
- whop_sdk/types/promo_code_list_params.py +45 -0
- whop_sdk/types/promo_code_list_response.py +79 -0
- whop_sdk/types/promo_code_status.py +7 -0
- whop_sdk/types/promo_duration.py +7 -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/refund_created_webhook_event.py +154 -0
- whop_sdk/types/refund_list_params.py +38 -0
- whop_sdk/types/refund_list_response.py +53 -0
- whop_sdk/types/refund_reference_status.py +7 -0
- whop_sdk/types/refund_reference_type.py +9 -0
- whop_sdk/types/refund_retrieve_response.py +129 -0
- whop_sdk/types/refund_status.py +7 -0
- whop_sdk/types/refund_updated_webhook_event.py +154 -0
- whop_sdk/types/review_list_params.py +40 -0
- whop_sdk/types/review_list_response.py +78 -0
- whop_sdk/types/review_retrieve_response.py +103 -0
- whop_sdk/types/review_status.py +7 -0
- whop_sdk/types/setup_intent.py +111 -0
- whop_sdk/types/setup_intent_canceled_webhook_event.py +29 -0
- whop_sdk/types/setup_intent_list_params.py +38 -0
- whop_sdk/types/setup_intent_list_response.py +111 -0
- whop_sdk/types/setup_intent_requires_action_webhook_event.py +29 -0
- whop_sdk/types/setup_intent_status.py +7 -0
- whop_sdk/types/setup_intent_succeeded_webhook_event.py +29 -0
- whop_sdk/types/shared/__init__.py +62 -0
- whop_sdk/types/shared/access_level.py +7 -0
- whop_sdk/types/shared/access_pass_type.py +7 -0
- whop_sdk/types/shared/app.py +187 -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 +104 -0
- whop_sdk/types/shared/collection_method.py +7 -0
- whop_sdk/types/shared/company.py +91 -0
- whop_sdk/types/shared/course_lesson_interaction.py +63 -0
- whop_sdk/types/shared/course_lesson_interaction_list_item.py +44 -0
- whop_sdk/types/shared/currency.py +93 -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/email_notification_preferences.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 +91 -0
- whop_sdk/types/shared/forum.py +33 -0
- whop_sdk/types/shared/forum_post.py +60 -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 +64 -0
- whop_sdk/types/shared/invoice_list_item.py +64 -0
- whop_sdk/types/shared/invoice_status.py +7 -0
- whop_sdk/types/shared/member_most_recent_actions.py +22 -0
- whop_sdk/types/shared/member_statuses.py +7 -0
- whop_sdk/types/shared/membership.py +128 -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 +273 -0
- whop_sdk/types/shared/plan.py +159 -0
- whop_sdk/types/shared/plan_type.py +7 -0
- whop_sdk/types/shared/product.py +132 -0
- whop_sdk/types/shared/product_list_item.py +57 -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 +112 -0
- whop_sdk/types/shared/visibility.py +7 -0
- whop_sdk/types/shared/visibility_filter.py +9 -0
- whop_sdk/types/shared/who_can_comment_types.py +7 -0
- whop_sdk/types/shared/who_can_post.py +7 -0
- whop_sdk/types/shared/who_can_post_types.py +7 -0
- whop_sdk/types/shared/who_can_react.py +7 -0
- whop_sdk/types/shared_params/__init__.py +34 -0
- whop_sdk/types/shared_params/access_level.py +9 -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 +95 -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/email_notification_preferences.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/member_most_recent_actions.py +24 -0
- whop_sdk/types/shared_params/member_statuses.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/promo_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_comment_types.py +9 -0
- whop_sdk/types/shared_params/who_can_post.py +9 -0
- whop_sdk/types/shared_params/who_can_post_types.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 +39 -0
- whop_sdk/types/transfer_list_params.py +50 -0
- whop_sdk/types/transfer_list_response.py +38 -0
- whop_sdk/types/unwrap_webhook_event.py +52 -0
- whop_sdk/types/user_check_access_response.py +14 -0
- whop_sdk/types/user_retrieve_response.py +36 -0
- whop_sdk/types/withdrawal_fee_types.py +7 -0
- whop_sdk/types/withdrawal_list_params.py +38 -0
- whop_sdk/types/withdrawal_list_response.py +45 -0
- whop_sdk/types/withdrawal_retrieve_response.py +154 -0
- whop_sdk/types/withdrawal_speeds.py +7 -0
- whop_sdk/types/withdrawal_status.py +9 -0
- whop_sdk/types/withdrawal_types.py +7 -0
- whop_sdk-0.0.10.dist-info/METADATA +509 -0
- whop_sdk-0.0.10.dist-info/RECORD +352 -0
- whop_sdk-0.0.10.dist-info/WHEEL +4 -0
- whop_sdk-0.0.10.dist-info/licenses/LICENSE +201 -0
|
@@ -0,0 +1,162 @@
|
|
|
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 Union, Optional
|
|
6
|
+
from typing_extensions import Required, TypeAlias, TypedDict
|
|
7
|
+
|
|
8
|
+
from .shared.currency import Currency
|
|
9
|
+
from .shared.plan_type import PlanType
|
|
10
|
+
from .shared.visibility import Visibility
|
|
11
|
+
from .shared.business_types import BusinessTypes
|
|
12
|
+
from .shared.industry_types import IndustryTypes
|
|
13
|
+
from .shared.global_affiliate_status import GlobalAffiliateStatus
|
|
14
|
+
|
|
15
|
+
__all__ = [
|
|
16
|
+
"PaymentCreateParams",
|
|
17
|
+
"CreatePaymentInputWithPlan",
|
|
18
|
+
"CreatePaymentInputWithPlanPlan",
|
|
19
|
+
"CreatePaymentInputWithPlanPlanProduct",
|
|
20
|
+
"CreatePaymentInputWithPlanID",
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class CreatePaymentInputWithPlan(TypedDict, total=False):
|
|
25
|
+
company_id: Required[str]
|
|
26
|
+
"""The ID of the company to create the payment for."""
|
|
27
|
+
|
|
28
|
+
member_id: Required[str]
|
|
29
|
+
"""The ID of the member to create the payment for."""
|
|
30
|
+
|
|
31
|
+
payment_token_id: Required[str]
|
|
32
|
+
"""The ID of the payment token to use for the payment.
|
|
33
|
+
|
|
34
|
+
It must be connected to the Member being charged.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
plan: Required[CreatePaymentInputWithPlanPlan]
|
|
38
|
+
"""Pass this object to create a new plan for this payment"""
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class CreatePaymentInputWithPlanPlanProduct(TypedDict, total=False):
|
|
42
|
+
external_identifier: Required[str]
|
|
43
|
+
"""A unique ID used to find or create a product.
|
|
44
|
+
|
|
45
|
+
When provided during creation, we will look for an existing product with this
|
|
46
|
+
external identifier — if found, it will be updated; otherwise, a new product
|
|
47
|
+
will be created.
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
title: Required[str]
|
|
51
|
+
"""The title of the product."""
|
|
52
|
+
|
|
53
|
+
business_type: Optional[BusinessTypes]
|
|
54
|
+
"""The different business types a company can be."""
|
|
55
|
+
|
|
56
|
+
collect_shipping_address: Optional[bool]
|
|
57
|
+
"""Whether or not to collect shipping information at checkout from the customer."""
|
|
58
|
+
|
|
59
|
+
custom_statement_descriptor: Optional[str]
|
|
60
|
+
"""The custom statement descriptor for the product i.e.
|
|
61
|
+
|
|
62
|
+
WHOP\\**SPORTS, must be between 5 and 22 characters, contain at least one letter,
|
|
63
|
+
and not contain any of the following characters: <, >, \\,, ', "
|
|
64
|
+
"""
|
|
65
|
+
|
|
66
|
+
description: Optional[str]
|
|
67
|
+
"""A written description of the product."""
|
|
68
|
+
|
|
69
|
+
global_affiliate_percentage: Optional[float]
|
|
70
|
+
"""The percentage of the revenue that goes to the global affiliate program."""
|
|
71
|
+
|
|
72
|
+
global_affiliate_status: Optional[GlobalAffiliateStatus]
|
|
73
|
+
"""The different statuses of the global affiliate program for a product."""
|
|
74
|
+
|
|
75
|
+
headline: Optional[str]
|
|
76
|
+
"""The headline of the product."""
|
|
77
|
+
|
|
78
|
+
industry_type: Optional[IndustryTypes]
|
|
79
|
+
"""The different industry types a company can be in."""
|
|
80
|
+
|
|
81
|
+
product_tax_code_id: Optional[str]
|
|
82
|
+
"""The ID of the product tax code to apply to this product."""
|
|
83
|
+
|
|
84
|
+
redirect_purchase_url: Optional[str]
|
|
85
|
+
"""The URL to redirect the customer to after a purchase."""
|
|
86
|
+
|
|
87
|
+
route: Optional[str]
|
|
88
|
+
"""The route of the product."""
|
|
89
|
+
|
|
90
|
+
visibility: Optional[Visibility]
|
|
91
|
+
"""Visibility of a resource"""
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
class CreatePaymentInputWithPlanPlan(TypedDict, total=False):
|
|
95
|
+
currency: Required[Currency]
|
|
96
|
+
"""The respective currency identifier for the plan."""
|
|
97
|
+
|
|
98
|
+
billing_period: Optional[int]
|
|
99
|
+
"""The interval at which the plan charges (renewal plans)."""
|
|
100
|
+
|
|
101
|
+
description: Optional[str]
|
|
102
|
+
"""The description of the plan."""
|
|
103
|
+
|
|
104
|
+
expiration_days: Optional[int]
|
|
105
|
+
"""The interval at which the plan charges (expiration plans)."""
|
|
106
|
+
|
|
107
|
+
force_create_new_plan: Optional[bool]
|
|
108
|
+
"""
|
|
109
|
+
Whether to force the creation of a new plan even if one with the same attributes
|
|
110
|
+
already exists.
|
|
111
|
+
"""
|
|
112
|
+
|
|
113
|
+
initial_price: Optional[float]
|
|
114
|
+
"""An additional amount charged upon first purchase."""
|
|
115
|
+
|
|
116
|
+
internal_notes: Optional[str]
|
|
117
|
+
"""A personal description or notes section for the business."""
|
|
118
|
+
|
|
119
|
+
plan_type: Optional[PlanType]
|
|
120
|
+
"""The type of plan that can be attached to a product"""
|
|
121
|
+
|
|
122
|
+
product: Optional[CreatePaymentInputWithPlanPlanProduct]
|
|
123
|
+
"""Pass this object to create a new product for this plan.
|
|
124
|
+
|
|
125
|
+
We will use the product external identifier to find or create an existing
|
|
126
|
+
product.
|
|
127
|
+
"""
|
|
128
|
+
|
|
129
|
+
product_id: Optional[str]
|
|
130
|
+
"""The product the plan is related to. Either this or product is required."""
|
|
131
|
+
|
|
132
|
+
renewal_price: Optional[float]
|
|
133
|
+
"""The amount the customer is charged every billing period."""
|
|
134
|
+
|
|
135
|
+
title: Optional[str]
|
|
136
|
+
"""The title of the plan. This will be visible on the product page to customers."""
|
|
137
|
+
|
|
138
|
+
trial_period_days: Optional[int]
|
|
139
|
+
"""The number of free trial days added before a renewal plan."""
|
|
140
|
+
|
|
141
|
+
visibility: Optional[Visibility]
|
|
142
|
+
"""Visibility of a resource"""
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
class CreatePaymentInputWithPlanID(TypedDict, total=False):
|
|
146
|
+
company_id: Required[str]
|
|
147
|
+
"""The ID of the company to create the payment for."""
|
|
148
|
+
|
|
149
|
+
member_id: Required[str]
|
|
150
|
+
"""The ID of the member to create the payment for."""
|
|
151
|
+
|
|
152
|
+
payment_token_id: Required[str]
|
|
153
|
+
"""The ID of the payment token to use for the payment.
|
|
154
|
+
|
|
155
|
+
It must be connected to the Member being charged.
|
|
156
|
+
"""
|
|
157
|
+
|
|
158
|
+
plan_id: Required[str]
|
|
159
|
+
"""An ID of an existing plan to use for the payment."""
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
PaymentCreateParams: TypeAlias = Union[CreatePaymentInputWithPlan, CreatePaymentInputWithPlanID]
|
|
@@ -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,67 @@
|
|
|
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 .billing_reasons import BillingReasons
|
|
12
|
+
from .shared.currency import Currency
|
|
13
|
+
from .shared.direction import Direction
|
|
14
|
+
from .shared.receipt_status import ReceiptStatus
|
|
15
|
+
from .shared.friendly_receipt_status import FriendlyReceiptStatus
|
|
16
|
+
|
|
17
|
+
__all__ = ["PaymentListParams"]
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class PaymentListParams(TypedDict, total=False):
|
|
21
|
+
company_id: Required[str]
|
|
22
|
+
"""The ID of the company to list payments for"""
|
|
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
|
+
billing_reasons: Optional[List[BillingReasons]]
|
|
31
|
+
"""The billing reason for the payment"""
|
|
32
|
+
|
|
33
|
+
created_after: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
|
|
34
|
+
"""The minimum creation date to filter by"""
|
|
35
|
+
|
|
36
|
+
created_before: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
|
|
37
|
+
"""The maximum creation date to filter by"""
|
|
38
|
+
|
|
39
|
+
currencies: Optional[List[Currency]]
|
|
40
|
+
"""The currency of the payment."""
|
|
41
|
+
|
|
42
|
+
direction: Optional[Direction]
|
|
43
|
+
"""The direction of the sort."""
|
|
44
|
+
|
|
45
|
+
first: Optional[int]
|
|
46
|
+
"""Returns the first _n_ elements from the list."""
|
|
47
|
+
|
|
48
|
+
include_free: Optional[bool]
|
|
49
|
+
"""Whether to include free payments."""
|
|
50
|
+
|
|
51
|
+
last: Optional[int]
|
|
52
|
+
"""Returns the last _n_ elements from the list."""
|
|
53
|
+
|
|
54
|
+
order: Optional[Literal["final_amount", "created_at", "paid_at"]]
|
|
55
|
+
"""The order to sort the results by."""
|
|
56
|
+
|
|
57
|
+
plan_ids: Optional[SequenceNotStr[str]]
|
|
58
|
+
"""A specific plan."""
|
|
59
|
+
|
|
60
|
+
product_ids: Optional[SequenceNotStr[str]]
|
|
61
|
+
"""A specific product."""
|
|
62
|
+
|
|
63
|
+
statuses: Optional[List[ReceiptStatus]]
|
|
64
|
+
"""The status of the payment."""
|
|
65
|
+
|
|
66
|
+
substatuses: Optional[List[FriendlyReceiptStatus]]
|
|
67
|
+
"""The substatus of the payment."""
|
|
@@ -0,0 +1,273 @@
|
|
|
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 .card_brands import CardBrands
|
|
8
|
+
from .billing_reasons import BillingReasons
|
|
9
|
+
from .shared.currency import Currency
|
|
10
|
+
from .shared.promo_type import PromoType
|
|
11
|
+
from .payment_method_types import PaymentMethodTypes
|
|
12
|
+
from .shared.receipt_status import ReceiptStatus
|
|
13
|
+
from .shared.membership_status import MembershipStatus
|
|
14
|
+
from .shared.friendly_receipt_status import FriendlyReceiptStatus
|
|
15
|
+
|
|
16
|
+
__all__ = [
|
|
17
|
+
"PaymentListResponse",
|
|
18
|
+
"BillingAddress",
|
|
19
|
+
"Company",
|
|
20
|
+
"Member",
|
|
21
|
+
"Membership",
|
|
22
|
+
"PaymentToken",
|
|
23
|
+
"PaymentTokenCard",
|
|
24
|
+
"Plan",
|
|
25
|
+
"Product",
|
|
26
|
+
"PromoCode",
|
|
27
|
+
"User",
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class BillingAddress(BaseModel):
|
|
32
|
+
city: Optional[str] = None
|
|
33
|
+
"""The city of the address."""
|
|
34
|
+
|
|
35
|
+
country: Optional[str] = None
|
|
36
|
+
"""The country of the address."""
|
|
37
|
+
|
|
38
|
+
line1: Optional[str] = None
|
|
39
|
+
"""The line 1 of the address."""
|
|
40
|
+
|
|
41
|
+
line2: Optional[str] = None
|
|
42
|
+
"""The line 2 of the address."""
|
|
43
|
+
|
|
44
|
+
name: Optional[str] = None
|
|
45
|
+
"""The name of the customer."""
|
|
46
|
+
|
|
47
|
+
postal_code: Optional[str] = None
|
|
48
|
+
"""The postal code of the address."""
|
|
49
|
+
|
|
50
|
+
state: Optional[str] = None
|
|
51
|
+
"""The state of the address."""
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class Company(BaseModel):
|
|
55
|
+
id: str
|
|
56
|
+
"""The ID of the company"""
|
|
57
|
+
|
|
58
|
+
route: str
|
|
59
|
+
"""The slug/route of the company on the Whop site."""
|
|
60
|
+
|
|
61
|
+
title: str
|
|
62
|
+
"""The written name of the company."""
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
class Member(BaseModel):
|
|
66
|
+
id: str
|
|
67
|
+
"""The ID of the member"""
|
|
68
|
+
|
|
69
|
+
phone: Optional[str] = None
|
|
70
|
+
"""The phone number for the member, if available."""
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
class Membership(BaseModel):
|
|
74
|
+
id: str
|
|
75
|
+
"""The internal ID of the membership."""
|
|
76
|
+
|
|
77
|
+
status: MembershipStatus
|
|
78
|
+
"""The state of the membership."""
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
class PaymentTokenCard(BaseModel):
|
|
82
|
+
brand: Optional[CardBrands] = None
|
|
83
|
+
"""Possible card brands that a payment token can have"""
|
|
84
|
+
|
|
85
|
+
exp_month: Optional[int] = None
|
|
86
|
+
"""Card expiration month, like 03 for March."""
|
|
87
|
+
|
|
88
|
+
exp_year: Optional[int] = None
|
|
89
|
+
"""Card expiration year, like 27 for 2027."""
|
|
90
|
+
|
|
91
|
+
last4: Optional[str] = None
|
|
92
|
+
"""Last four digits of the card."""
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
class PaymentToken(BaseModel):
|
|
96
|
+
id: str
|
|
97
|
+
"""The ID of the payment token"""
|
|
98
|
+
|
|
99
|
+
card: Optional[PaymentTokenCard] = None
|
|
100
|
+
"""
|
|
101
|
+
The card data associated with the payment token, if its a debit or credit card
|
|
102
|
+
token.
|
|
103
|
+
"""
|
|
104
|
+
|
|
105
|
+
created_at: datetime
|
|
106
|
+
"""The date and time the payment token was created"""
|
|
107
|
+
|
|
108
|
+
payment_method_type: PaymentMethodTypes
|
|
109
|
+
"""The payment method type of the payment token"""
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
class Plan(BaseModel):
|
|
113
|
+
id: str
|
|
114
|
+
"""The internal ID of the plan."""
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
class Product(BaseModel):
|
|
118
|
+
id: str
|
|
119
|
+
"""The internal ID of the public product."""
|
|
120
|
+
|
|
121
|
+
route: str
|
|
122
|
+
"""The route of the product."""
|
|
123
|
+
|
|
124
|
+
title: str
|
|
125
|
+
"""The title of the product. Use for Whop 4.0."""
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
class PromoCode(BaseModel):
|
|
129
|
+
id: str
|
|
130
|
+
"""The ID of the promo."""
|
|
131
|
+
|
|
132
|
+
amount_off: float
|
|
133
|
+
"""The amount off (% or flat amount) for the promo."""
|
|
134
|
+
|
|
135
|
+
base_currency: Currency
|
|
136
|
+
"""The monetary currency of the promo code."""
|
|
137
|
+
|
|
138
|
+
code: Optional[str] = None
|
|
139
|
+
"""The specific code used to apply the promo at checkout."""
|
|
140
|
+
|
|
141
|
+
number_of_intervals: Optional[int] = None
|
|
142
|
+
"""The number of months the promo is applied for."""
|
|
143
|
+
|
|
144
|
+
promo_type: PromoType
|
|
145
|
+
"""The type (% or flat amount) of the promo."""
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
class User(BaseModel):
|
|
149
|
+
id: str
|
|
150
|
+
"""The internal ID of the user."""
|
|
151
|
+
|
|
152
|
+
email: Optional[str] = None
|
|
153
|
+
"""The email of the user"""
|
|
154
|
+
|
|
155
|
+
name: Optional[str] = None
|
|
156
|
+
"""The name of the user from their Whop account."""
|
|
157
|
+
|
|
158
|
+
username: str
|
|
159
|
+
"""The username of the user from their Whop account."""
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
class PaymentListResponse(BaseModel):
|
|
163
|
+
id: str
|
|
164
|
+
"""The payment ID"""
|
|
165
|
+
|
|
166
|
+
amount_after_fees: float
|
|
167
|
+
"""How much the payment is for after fees"""
|
|
168
|
+
|
|
169
|
+
auto_refunded: bool
|
|
170
|
+
"""Whether this payment was auto refunded or not"""
|
|
171
|
+
|
|
172
|
+
billing_address: Optional[BillingAddress] = None
|
|
173
|
+
"""The address of the user who made the payment."""
|
|
174
|
+
|
|
175
|
+
billing_reason: Optional[BillingReasons] = None
|
|
176
|
+
"""The reason why a specific payment was billed"""
|
|
177
|
+
|
|
178
|
+
card_brand: Optional[CardBrands] = None
|
|
179
|
+
"""Possible card brands that a payment token can have"""
|
|
180
|
+
|
|
181
|
+
card_last4: Optional[str] = None
|
|
182
|
+
"""The last 4 digits of the card used to make the payment."""
|
|
183
|
+
|
|
184
|
+
company: Optional[Company] = None
|
|
185
|
+
"""The company for the payment."""
|
|
186
|
+
|
|
187
|
+
created_at: datetime
|
|
188
|
+
"""The datetime the payment was created"""
|
|
189
|
+
|
|
190
|
+
currency: Optional[Currency] = None
|
|
191
|
+
"""The available currencies on the platform"""
|
|
192
|
+
|
|
193
|
+
dispute_alerted_at: Optional[datetime] = None
|
|
194
|
+
"""When an alert came in that this transaction will be disputed"""
|
|
195
|
+
|
|
196
|
+
failure_message: Optional[str] = None
|
|
197
|
+
"""If the payment failed, the reason for the failure."""
|
|
198
|
+
|
|
199
|
+
last_payment_attempt: Optional[datetime] = None
|
|
200
|
+
"""The time of the last payment attempt."""
|
|
201
|
+
|
|
202
|
+
member: Optional[Member] = None
|
|
203
|
+
"""The member attached to this payment."""
|
|
204
|
+
|
|
205
|
+
membership: Optional[Membership] = None
|
|
206
|
+
"""The membership attached to this payment."""
|
|
207
|
+
|
|
208
|
+
metadata: Optional[Dict[str, object]] = None
|
|
209
|
+
"""The custom metadata stored on this payment.
|
|
210
|
+
|
|
211
|
+
This will be copied the checkout configuration for which this payment was made
|
|
212
|
+
"""
|
|
213
|
+
|
|
214
|
+
paid_at: Optional[datetime] = None
|
|
215
|
+
"""The datetime the payment was paid"""
|
|
216
|
+
|
|
217
|
+
payment_method_type: Optional[PaymentMethodTypes] = None
|
|
218
|
+
"""The different types of payment methods that can be used."""
|
|
219
|
+
|
|
220
|
+
payment_token: Optional[PaymentToken] = None
|
|
221
|
+
"""The payment token used for the payment, if available."""
|
|
222
|
+
|
|
223
|
+
plan: Optional[Plan] = None
|
|
224
|
+
"""The plan attached to this payment."""
|
|
225
|
+
|
|
226
|
+
product: Optional[Product] = None
|
|
227
|
+
"""The product this payment was made for"""
|
|
228
|
+
|
|
229
|
+
promo_code: Optional[PromoCode] = None
|
|
230
|
+
"""The promo code used for this payment."""
|
|
231
|
+
|
|
232
|
+
refundable: bool
|
|
233
|
+
"""
|
|
234
|
+
True only for payments that are `paid`, have not been fully refunded, and were
|
|
235
|
+
processed by a payment processor that allows refunds.
|
|
236
|
+
"""
|
|
237
|
+
|
|
238
|
+
refunded_amount: Optional[float] = None
|
|
239
|
+
"""The payment refund amount(if applicable)."""
|
|
240
|
+
|
|
241
|
+
refunded_at: Optional[datetime] = None
|
|
242
|
+
"""When the payment was refunded (if applicable)."""
|
|
243
|
+
|
|
244
|
+
retryable: bool
|
|
245
|
+
"""
|
|
246
|
+
True when the payment status is `open` and its membership is in one of the
|
|
247
|
+
retry-eligible states (`active`, `trialing`, `completed`, or `past_due`);
|
|
248
|
+
otherwise false. Used to decide if Whop can attempt the charge again.
|
|
249
|
+
"""
|
|
250
|
+
|
|
251
|
+
status: Optional[ReceiptStatus] = None
|
|
252
|
+
"""The status of a receipt"""
|
|
253
|
+
|
|
254
|
+
substatus: FriendlyReceiptStatus
|
|
255
|
+
"""The friendly status of the payment."""
|
|
256
|
+
|
|
257
|
+
subtotal: Optional[float] = None
|
|
258
|
+
"""The subtotal to show to the creator (excluding buyer fees)."""
|
|
259
|
+
|
|
260
|
+
total: Optional[float] = None
|
|
261
|
+
"""The total to show to the creator (excluding buyer fees)."""
|
|
262
|
+
|
|
263
|
+
usd_total: Optional[float] = None
|
|
264
|
+
"""The total in USD to show to the creator (excluding buyer fees)."""
|
|
265
|
+
|
|
266
|
+
user: Optional[User] = None
|
|
267
|
+
"""The user that made this payment."""
|
|
268
|
+
|
|
269
|
+
voidable: bool
|
|
270
|
+
"""
|
|
271
|
+
True when the payment is tied to a membership in `past_due`, the payment status
|
|
272
|
+
is `open`, and the processor allows voiding payments; otherwise false.
|
|
273
|
+
"""
|
|
@@ -0,0 +1,94 @@
|
|
|
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__ = ["PaymentMethodTypes"]
|
|
6
|
+
|
|
7
|
+
PaymentMethodTypes: TypeAlias = Literal[
|
|
8
|
+
"acss_debit",
|
|
9
|
+
"affirm",
|
|
10
|
+
"afterpay_clearpay",
|
|
11
|
+
"alipay",
|
|
12
|
+
"alma",
|
|
13
|
+
"amazon_pay",
|
|
14
|
+
"apple_pay",
|
|
15
|
+
"au_becs_debit",
|
|
16
|
+
"bacs_debit",
|
|
17
|
+
"bancontact",
|
|
18
|
+
"billie",
|
|
19
|
+
"blik",
|
|
20
|
+
"boleto",
|
|
21
|
+
"card",
|
|
22
|
+
"cashapp",
|
|
23
|
+
"crypto",
|
|
24
|
+
"eps",
|
|
25
|
+
"fpx",
|
|
26
|
+
"giropay",
|
|
27
|
+
"google_pay",
|
|
28
|
+
"grabpay",
|
|
29
|
+
"ideal",
|
|
30
|
+
"kakao_pay",
|
|
31
|
+
"klarna",
|
|
32
|
+
"konbini",
|
|
33
|
+
"kr_card",
|
|
34
|
+
"link",
|
|
35
|
+
"mobilepay",
|
|
36
|
+
"multibanco",
|
|
37
|
+
"naver_pay",
|
|
38
|
+
"nz_bank_account",
|
|
39
|
+
"oxxo",
|
|
40
|
+
"p24",
|
|
41
|
+
"pay_by_bank",
|
|
42
|
+
"payco",
|
|
43
|
+
"paynow",
|
|
44
|
+
"pix",
|
|
45
|
+
"promptpay",
|
|
46
|
+
"revolut_pay",
|
|
47
|
+
"samsung_pay",
|
|
48
|
+
"satispay",
|
|
49
|
+
"sepa_debit",
|
|
50
|
+
"sofort",
|
|
51
|
+
"swish",
|
|
52
|
+
"twint",
|
|
53
|
+
"us_bank_account",
|
|
54
|
+
"wechat_pay",
|
|
55
|
+
"zip",
|
|
56
|
+
"bizum",
|
|
57
|
+
"capchase_pay",
|
|
58
|
+
"kriya",
|
|
59
|
+
"mondu",
|
|
60
|
+
"ng_wallet",
|
|
61
|
+
"paypay",
|
|
62
|
+
"sequra",
|
|
63
|
+
"scalapay",
|
|
64
|
+
"vipps",
|
|
65
|
+
"custom",
|
|
66
|
+
"customer_balance",
|
|
67
|
+
"gopay",
|
|
68
|
+
"mb_way",
|
|
69
|
+
"ng_bank",
|
|
70
|
+
"ng_bank_transfer",
|
|
71
|
+
"ng_card",
|
|
72
|
+
"ng_market",
|
|
73
|
+
"ng_ussd",
|
|
74
|
+
"paypal",
|
|
75
|
+
"payto",
|
|
76
|
+
"qris",
|
|
77
|
+
"rechnung",
|
|
78
|
+
"south_korea_market",
|
|
79
|
+
"kr_market",
|
|
80
|
+
"shopeepay",
|
|
81
|
+
"upi",
|
|
82
|
+
"sunbit",
|
|
83
|
+
"netbanking",
|
|
84
|
+
"id_bank_transfer",
|
|
85
|
+
"demo_pay",
|
|
86
|
+
"shop_pay",
|
|
87
|
+
"sezzle",
|
|
88
|
+
"coinbase",
|
|
89
|
+
"splitit",
|
|
90
|
+
"platform_balance",
|
|
91
|
+
"apple",
|
|
92
|
+
"venmo",
|
|
93
|
+
"unknown",
|
|
94
|
+
]
|
|
@@ -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,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__ = ["PaymentProvider"]
|
|
6
|
+
|
|
7
|
+
PaymentProvider: TypeAlias = Literal[
|
|
8
|
+
"stripe", "coinbase", "paypal", "apple", "sezzle", "splitit", "platform_balance", "multi_psp"
|
|
9
|
+
]
|
|
@@ -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."""
|