dodopayments 1.51.1__py3-none-any.whl → 1.56.5__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.
- dodopayments/__init__.py +5 -1
- dodopayments/_base_client.py +12 -12
- dodopayments/_client.py +52 -14
- dodopayments/_compat.py +48 -48
- dodopayments/_exceptions.py +4 -0
- dodopayments/_models.py +50 -44
- dodopayments/_qs.py +7 -7
- dodopayments/_streaming.py +4 -6
- dodopayments/_types.py +18 -11
- dodopayments/_utils/__init__.py +8 -2
- dodopayments/_utils/_compat.py +45 -0
- dodopayments/_utils/_datetime_parse.py +136 -0
- dodopayments/_utils/_transform.py +13 -3
- dodopayments/_utils/_typing.py +1 -1
- dodopayments/_utils/_utils.py +5 -6
- dodopayments/_version.py +1 -1
- dodopayments/resources/__init__.py +28 -0
- dodopayments/resources/addons.py +29 -29
- dodopayments/resources/brands.py +29 -29
- dodopayments/resources/checkout_sessions.py +110 -27
- dodopayments/resources/customers/__init__.py +14 -0
- dodopayments/resources/customers/customer_portal.py +5 -5
- dodopayments/resources/customers/customers.py +53 -21
- dodopayments/resources/customers/wallets/__init__.py +33 -0
- dodopayments/resources/customers/wallets/ledger_entries.py +318 -0
- dodopayments/resources/customers/wallets/wallets.py +191 -0
- dodopayments/resources/discounts.py +44 -44
- dodopayments/resources/disputes.py +19 -19
- dodopayments/resources/invoices/payments.py +83 -3
- dodopayments/resources/license_key_instances.py +13 -13
- dodopayments/resources/license_keys.py +23 -23
- dodopayments/resources/licenses.py +14 -14
- dodopayments/resources/meters.py +554 -0
- dodopayments/resources/misc.py +3 -3
- dodopayments/resources/payments.py +49 -41
- dodopayments/resources/payouts.py +26 -7
- dodopayments/resources/products/images.py +5 -5
- dodopayments/resources/products/products.py +82 -82
- dodopayments/resources/refunds.py +39 -30
- dodopayments/resources/subscriptions.py +316 -73
- dodopayments/resources/usage_events.py +597 -0
- dodopayments/resources/webhooks/headers.py +5 -5
- dodopayments/resources/webhooks/webhooks.py +119 -44
- dodopayments/types/__init__.py +48 -0
- dodopayments/types/add_meter_to_price.py +29 -0
- dodopayments/types/add_meter_to_price_param.py +30 -0
- dodopayments/types/checkout_session_create_params.py +6 -0
- dodopayments/types/checkout_session_status.py +35 -0
- dodopayments/types/customer_limited_details.py +5 -0
- dodopayments/types/customers/__init__.py +2 -0
- dodopayments/types/customers/customer_wallet.py +20 -0
- dodopayments/types/customers/wallet_list_response.py +15 -0
- dodopayments/types/customers/wallets/__init__.py +7 -0
- dodopayments/types/customers/wallets/customer_wallet_transaction.py +38 -0
- dodopayments/types/customers/wallets/ledger_entry_create_params.py +25 -0
- dodopayments/types/customers/wallets/ledger_entry_list_params.py +18 -0
- dodopayments/types/discount_create_params.py +3 -2
- dodopayments/types/discount_update_params.py +3 -2
- dodopayments/types/dispute_accepted_webhook_event.py +29 -0
- dodopayments/types/dispute_accepted_webhook_event1.py +29 -0
- dodopayments/types/dispute_cancelled_webhook_event.py +29 -0
- dodopayments/types/dispute_cancelled_webhook_event1.py +29 -0
- dodopayments/types/dispute_challenged_webhook_event.py +29 -0
- dodopayments/types/dispute_challenged_webhook_event1.py +29 -0
- dodopayments/types/dispute_expired_webhook_event.py +29 -0
- dodopayments/types/dispute_expired_webhook_event1.py +29 -0
- dodopayments/types/dispute_lost_webhook_event.py +29 -0
- dodopayments/types/dispute_lost_webhook_event1.py +29 -0
- dodopayments/types/dispute_opened_webhook_event.py +29 -0
- dodopayments/types/dispute_opened_webhook_event1.py +29 -0
- dodopayments/types/dispute_won_webhook_event.py +29 -0
- dodopayments/types/dispute_won_webhook_event1.py +29 -0
- dodopayments/types/event.py +26 -0
- dodopayments/types/event_input_param.py +38 -0
- dodopayments/types/license_activate_response.py +40 -0
- dodopayments/types/license_key_created_webhook_event.py +29 -0
- dodopayments/types/license_key_created_webhook_event1.py +29 -0
- dodopayments/types/meter.py +40 -0
- dodopayments/types/meter_aggregation.py +16 -0
- dodopayments/types/meter_aggregation_param.py +16 -0
- dodopayments/types/meter_create_params.py +31 -0
- dodopayments/types/meter_filter.py +131 -0
- dodopayments/types/meter_filter_param.py +143 -0
- dodopayments/types/meter_list_params.py +18 -0
- dodopayments/types/new_customer_param.py +7 -1
- dodopayments/types/payment.py +37 -2
- dodopayments/types/payment_cancelled_webhook_event.py +29 -0
- dodopayments/types/payment_cancelled_webhook_event1.py +29 -0
- dodopayments/types/payment_create_params.py +3 -0
- dodopayments/types/payment_failed_webhook_event.py +29 -0
- dodopayments/types/payment_failed_webhook_event1.py +29 -0
- dodopayments/types/payment_method_types.py +1 -0
- dodopayments/types/payment_processing_webhook_event.py +29 -0
- dodopayments/types/payment_processing_webhook_event1.py +29 -0
- dodopayments/types/payment_succeeded_webhook_event.py +29 -0
- dodopayments/types/payment_succeeded_webhook_event1.py +29 -0
- dodopayments/types/payout_list_params.py +11 -1
- dodopayments/types/price.py +52 -5
- dodopayments/types/price_param.py +52 -5
- dodopayments/types/product_create_params.py +3 -2
- dodopayments/types/product_update_params.py +4 -3
- dodopayments/types/refund.py +8 -1
- dodopayments/types/refund_create_params.py +4 -1
- dodopayments/types/refund_failed_webhook_event.py +29 -0
- dodopayments/types/refund_failed_webhook_event1.py +29 -0
- dodopayments/types/refund_list_response.py +39 -0
- dodopayments/types/refund_succeeded_webhook_event.py +29 -0
- dodopayments/types/refund_succeeded_webhook_event1.py +29 -0
- dodopayments/types/subscription.py +23 -1
- dodopayments/types/subscription_active_webhook_event.py +29 -0
- dodopayments/types/subscription_active_webhook_event1.py +29 -0
- dodopayments/types/subscription_cancelled_webhook_event.py +29 -0
- dodopayments/types/subscription_cancelled_webhook_event1.py +29 -0
- dodopayments/types/subscription_charge_params.py +12 -1
- dodopayments/types/subscription_create_params.py +3 -0
- dodopayments/types/subscription_expired_webhook_event.py +29 -0
- dodopayments/types/subscription_expired_webhook_event1.py +29 -0
- dodopayments/types/subscription_failed_webhook_event.py +29 -0
- dodopayments/types/subscription_failed_webhook_event1.py +29 -0
- dodopayments/types/subscription_list_response.py +3 -0
- dodopayments/types/subscription_on_hold_webhook_event.py +29 -0
- dodopayments/types/subscription_on_hold_webhook_event1.py +29 -0
- dodopayments/types/subscription_plan_changed_webhook_event.py +29 -0
- dodopayments/types/subscription_plan_changed_webhook_event1.py +29 -0
- dodopayments/types/subscription_renewed_webhook_event.py +29 -0
- dodopayments/types/subscription_renewed_webhook_event1.py +29 -0
- dodopayments/types/subscription_retrieve_usage_history_params.py +28 -0
- dodopayments/types/subscription_retrieve_usage_history_response.py +46 -0
- dodopayments/types/subscription_update_params.py +2 -0
- dodopayments/types/unsafe_unwrap_webhook_event.py +52 -0
- dodopayments/types/unwrap_webhook_event.py +52 -0
- dodopayments/types/usage_event_ingest_params.py +15 -0
- dodopayments/types/usage_event_ingest_response.py +9 -0
- dodopayments/types/usage_event_list_params.py +42 -0
- {dodopayments-1.51.1.dist-info → dodopayments-1.56.5.dist-info}/METADATA +6 -4
- dodopayments-1.56.5.dist-info/RECORD +239 -0
- dodopayments-1.51.1.dist-info/RECORD +0 -163
- {dodopayments-1.51.1.dist-info → dodopayments-1.56.5.dist-info}/WHEEL +0 -0
- {dodopayments-1.51.1.dist-info → dodopayments-1.56.5.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Optional
|
|
6
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
7
|
+
|
|
8
|
+
from ...currency import Currency
|
|
9
|
+
|
|
10
|
+
__all__ = ["LedgerEntryCreateParams"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class LedgerEntryCreateParams(TypedDict, total=False):
|
|
14
|
+
amount: Required[int]
|
|
15
|
+
|
|
16
|
+
currency: Required[Currency]
|
|
17
|
+
"""Currency of the wallet to adjust"""
|
|
18
|
+
|
|
19
|
+
entry_type: Required[Literal["credit", "debit"]]
|
|
20
|
+
"""Type of ledger entry - credit or debit"""
|
|
21
|
+
|
|
22
|
+
idempotency_key: Optional[str]
|
|
23
|
+
"""Optional idempotency key to prevent duplicate entries"""
|
|
24
|
+
|
|
25
|
+
reason: Optional[str]
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import TypedDict
|
|
6
|
+
|
|
7
|
+
from ...currency import Currency
|
|
8
|
+
|
|
9
|
+
__all__ = ["LedgerEntryListParams"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class LedgerEntryListParams(TypedDict, total=False):
|
|
13
|
+
currency: Currency
|
|
14
|
+
"""Optional currency filter"""
|
|
15
|
+
|
|
16
|
+
page_number: int
|
|
17
|
+
|
|
18
|
+
page_size: int
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import
|
|
5
|
+
from typing import Union, Optional
|
|
6
6
|
from datetime import datetime
|
|
7
7
|
from typing_extensions import Required, Annotated, TypedDict
|
|
8
8
|
|
|
9
|
+
from .._types import SequenceNotStr
|
|
9
10
|
from .._utils import PropertyInfo
|
|
10
11
|
from .discount_type import DiscountType
|
|
11
12
|
|
|
@@ -39,7 +40,7 @@ class DiscountCreateParams(TypedDict, total=False):
|
|
|
39
40
|
|
|
40
41
|
name: Optional[str]
|
|
41
42
|
|
|
42
|
-
restricted_to: Optional[
|
|
43
|
+
restricted_to: Optional[SequenceNotStr[str]]
|
|
43
44
|
"""List of product IDs to restrict usage (if any)."""
|
|
44
45
|
|
|
45
46
|
subscription_cycles: Optional[int]
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import
|
|
5
|
+
from typing import Union, Optional
|
|
6
6
|
from datetime import datetime
|
|
7
7
|
from typing_extensions import Annotated, TypedDict
|
|
8
8
|
|
|
9
|
+
from .._types import SequenceNotStr
|
|
9
10
|
from .._utils import PropertyInfo
|
|
10
11
|
from .discount_type import DiscountType
|
|
11
12
|
|
|
@@ -30,7 +31,7 @@ class DiscountUpdateParams(TypedDict, total=False):
|
|
|
30
31
|
|
|
31
32
|
name: Optional[str]
|
|
32
33
|
|
|
33
|
-
restricted_to: Optional[
|
|
34
|
+
restricted_to: Optional[SequenceNotStr[str]]
|
|
34
35
|
"""
|
|
35
36
|
If present, replaces all restricted product IDs with this new set. To remove all
|
|
36
37
|
restrictions, send empty array
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from .dispute import Dispute
|
|
8
|
+
from .._models import BaseModel
|
|
9
|
+
|
|
10
|
+
__all__ = ["DisputeAcceptedWebhookEvent", "Data"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Data(Dispute):
|
|
14
|
+
payload_type: Optional[Literal["Dispute"]] = None
|
|
15
|
+
"""The type of payload in the data field"""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class DisputeAcceptedWebhookEvent(BaseModel):
|
|
19
|
+
business_id: str
|
|
20
|
+
"""The business identifier"""
|
|
21
|
+
|
|
22
|
+
data: Data
|
|
23
|
+
"""Event-specific data"""
|
|
24
|
+
|
|
25
|
+
timestamp: datetime
|
|
26
|
+
"""The timestamp of when the event occurred"""
|
|
27
|
+
|
|
28
|
+
type: Literal["dispute.accepted"]
|
|
29
|
+
"""The event type"""
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from .dispute import Dispute
|
|
8
|
+
from .._models import BaseModel
|
|
9
|
+
|
|
10
|
+
__all__ = ["DisputeAcceptedWebhookEvent", "Data"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Data(Dispute):
|
|
14
|
+
payload_type: Optional[Literal["Dispute"]] = None
|
|
15
|
+
"""The type of payload in the data field"""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class DisputeAcceptedWebhookEvent(BaseModel):
|
|
19
|
+
business_id: str
|
|
20
|
+
"""The business identifier"""
|
|
21
|
+
|
|
22
|
+
data: Data
|
|
23
|
+
"""Event-specific data"""
|
|
24
|
+
|
|
25
|
+
timestamp: datetime
|
|
26
|
+
"""The timestamp of when the event occurred"""
|
|
27
|
+
|
|
28
|
+
type: Literal["dispute.accepted"]
|
|
29
|
+
"""The event type"""
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from .dispute import Dispute
|
|
8
|
+
from .._models import BaseModel
|
|
9
|
+
|
|
10
|
+
__all__ = ["DisputeCancelledWebhookEvent", "Data"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Data(Dispute):
|
|
14
|
+
payload_type: Optional[Literal["Dispute"]] = None
|
|
15
|
+
"""The type of payload in the data field"""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class DisputeCancelledWebhookEvent(BaseModel):
|
|
19
|
+
business_id: str
|
|
20
|
+
"""The business identifier"""
|
|
21
|
+
|
|
22
|
+
data: Data
|
|
23
|
+
"""Event-specific data"""
|
|
24
|
+
|
|
25
|
+
timestamp: datetime
|
|
26
|
+
"""The timestamp of when the event occurred"""
|
|
27
|
+
|
|
28
|
+
type: Literal["dispute.cancelled"]
|
|
29
|
+
"""The event type"""
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from .dispute import Dispute
|
|
8
|
+
from .._models import BaseModel
|
|
9
|
+
|
|
10
|
+
__all__ = ["DisputeCancelledWebhookEvent", "Data"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Data(Dispute):
|
|
14
|
+
payload_type: Optional[Literal["Dispute"]] = None
|
|
15
|
+
"""The type of payload in the data field"""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class DisputeCancelledWebhookEvent(BaseModel):
|
|
19
|
+
business_id: str
|
|
20
|
+
"""The business identifier"""
|
|
21
|
+
|
|
22
|
+
data: Data
|
|
23
|
+
"""Event-specific data"""
|
|
24
|
+
|
|
25
|
+
timestamp: datetime
|
|
26
|
+
"""The timestamp of when the event occurred"""
|
|
27
|
+
|
|
28
|
+
type: Literal["dispute.cancelled"]
|
|
29
|
+
"""The event type"""
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from .dispute import Dispute
|
|
8
|
+
from .._models import BaseModel
|
|
9
|
+
|
|
10
|
+
__all__ = ["DisputeChallengedWebhookEvent", "Data"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Data(Dispute):
|
|
14
|
+
payload_type: Optional[Literal["Dispute"]] = None
|
|
15
|
+
"""The type of payload in the data field"""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class DisputeChallengedWebhookEvent(BaseModel):
|
|
19
|
+
business_id: str
|
|
20
|
+
"""The business identifier"""
|
|
21
|
+
|
|
22
|
+
data: Data
|
|
23
|
+
"""Event-specific data"""
|
|
24
|
+
|
|
25
|
+
timestamp: datetime
|
|
26
|
+
"""The timestamp of when the event occurred"""
|
|
27
|
+
|
|
28
|
+
type: Literal["dispute.challenged"]
|
|
29
|
+
"""The event type"""
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from .dispute import Dispute
|
|
8
|
+
from .._models import BaseModel
|
|
9
|
+
|
|
10
|
+
__all__ = ["DisputeChallengedWebhookEvent", "Data"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Data(Dispute):
|
|
14
|
+
payload_type: Optional[Literal["Dispute"]] = None
|
|
15
|
+
"""The type of payload in the data field"""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class DisputeChallengedWebhookEvent(BaseModel):
|
|
19
|
+
business_id: str
|
|
20
|
+
"""The business identifier"""
|
|
21
|
+
|
|
22
|
+
data: Data
|
|
23
|
+
"""Event-specific data"""
|
|
24
|
+
|
|
25
|
+
timestamp: datetime
|
|
26
|
+
"""The timestamp of when the event occurred"""
|
|
27
|
+
|
|
28
|
+
type: Literal["dispute.challenged"]
|
|
29
|
+
"""The event type"""
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from .dispute import Dispute
|
|
8
|
+
from .._models import BaseModel
|
|
9
|
+
|
|
10
|
+
__all__ = ["DisputeExpiredWebhookEvent", "Data"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Data(Dispute):
|
|
14
|
+
payload_type: Optional[Literal["Dispute"]] = None
|
|
15
|
+
"""The type of payload in the data field"""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class DisputeExpiredWebhookEvent(BaseModel):
|
|
19
|
+
business_id: str
|
|
20
|
+
"""The business identifier"""
|
|
21
|
+
|
|
22
|
+
data: Data
|
|
23
|
+
"""Event-specific data"""
|
|
24
|
+
|
|
25
|
+
timestamp: datetime
|
|
26
|
+
"""The timestamp of when the event occurred"""
|
|
27
|
+
|
|
28
|
+
type: Literal["dispute.expired"]
|
|
29
|
+
"""The event type"""
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from .dispute import Dispute
|
|
8
|
+
from .._models import BaseModel
|
|
9
|
+
|
|
10
|
+
__all__ = ["DisputeExpiredWebhookEvent", "Data"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Data(Dispute):
|
|
14
|
+
payload_type: Optional[Literal["Dispute"]] = None
|
|
15
|
+
"""The type of payload in the data field"""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class DisputeExpiredWebhookEvent(BaseModel):
|
|
19
|
+
business_id: str
|
|
20
|
+
"""The business identifier"""
|
|
21
|
+
|
|
22
|
+
data: Data
|
|
23
|
+
"""Event-specific data"""
|
|
24
|
+
|
|
25
|
+
timestamp: datetime
|
|
26
|
+
"""The timestamp of when the event occurred"""
|
|
27
|
+
|
|
28
|
+
type: Literal["dispute.expired"]
|
|
29
|
+
"""The event type"""
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from .dispute import Dispute
|
|
8
|
+
from .._models import BaseModel
|
|
9
|
+
|
|
10
|
+
__all__ = ["DisputeLostWebhookEvent", "Data"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Data(Dispute):
|
|
14
|
+
payload_type: Optional[Literal["Dispute"]] = None
|
|
15
|
+
"""The type of payload in the data field"""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class DisputeLostWebhookEvent(BaseModel):
|
|
19
|
+
business_id: str
|
|
20
|
+
"""The business identifier"""
|
|
21
|
+
|
|
22
|
+
data: Data
|
|
23
|
+
"""Event-specific data"""
|
|
24
|
+
|
|
25
|
+
timestamp: datetime
|
|
26
|
+
"""The timestamp of when the event occurred"""
|
|
27
|
+
|
|
28
|
+
type: Literal["dispute.lost"]
|
|
29
|
+
"""The event type"""
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from .dispute import Dispute
|
|
8
|
+
from .._models import BaseModel
|
|
9
|
+
|
|
10
|
+
__all__ = ["DisputeLostWebhookEvent", "Data"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Data(Dispute):
|
|
14
|
+
payload_type: Optional[Literal["Dispute"]] = None
|
|
15
|
+
"""The type of payload in the data field"""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class DisputeLostWebhookEvent(BaseModel):
|
|
19
|
+
business_id: str
|
|
20
|
+
"""The business identifier"""
|
|
21
|
+
|
|
22
|
+
data: Data
|
|
23
|
+
"""Event-specific data"""
|
|
24
|
+
|
|
25
|
+
timestamp: datetime
|
|
26
|
+
"""The timestamp of when the event occurred"""
|
|
27
|
+
|
|
28
|
+
type: Literal["dispute.lost"]
|
|
29
|
+
"""The event type"""
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from .dispute import Dispute
|
|
8
|
+
from .._models import BaseModel
|
|
9
|
+
|
|
10
|
+
__all__ = ["DisputeOpenedWebhookEvent", "Data"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Data(Dispute):
|
|
14
|
+
payload_type: Optional[Literal["Dispute"]] = None
|
|
15
|
+
"""The type of payload in the data field"""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class DisputeOpenedWebhookEvent(BaseModel):
|
|
19
|
+
business_id: str
|
|
20
|
+
"""The business identifier"""
|
|
21
|
+
|
|
22
|
+
data: Data
|
|
23
|
+
"""Event-specific data"""
|
|
24
|
+
|
|
25
|
+
timestamp: datetime
|
|
26
|
+
"""The timestamp of when the event occurred"""
|
|
27
|
+
|
|
28
|
+
type: Literal["dispute.opened"]
|
|
29
|
+
"""The event type"""
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from .dispute import Dispute
|
|
8
|
+
from .._models import BaseModel
|
|
9
|
+
|
|
10
|
+
__all__ = ["DisputeOpenedWebhookEvent", "Data"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Data(Dispute):
|
|
14
|
+
payload_type: Optional[Literal["Dispute"]] = None
|
|
15
|
+
"""The type of payload in the data field"""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class DisputeOpenedWebhookEvent(BaseModel):
|
|
19
|
+
business_id: str
|
|
20
|
+
"""The business identifier"""
|
|
21
|
+
|
|
22
|
+
data: Data
|
|
23
|
+
"""Event-specific data"""
|
|
24
|
+
|
|
25
|
+
timestamp: datetime
|
|
26
|
+
"""The timestamp of when the event occurred"""
|
|
27
|
+
|
|
28
|
+
type: Literal["dispute.opened"]
|
|
29
|
+
"""The event type"""
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from .dispute import Dispute
|
|
8
|
+
from .._models import BaseModel
|
|
9
|
+
|
|
10
|
+
__all__ = ["DisputeWonWebhookEvent", "Data"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Data(Dispute):
|
|
14
|
+
payload_type: Optional[Literal["Dispute"]] = None
|
|
15
|
+
"""The type of payload in the data field"""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class DisputeWonWebhookEvent(BaseModel):
|
|
19
|
+
business_id: str
|
|
20
|
+
"""The business identifier"""
|
|
21
|
+
|
|
22
|
+
data: Data
|
|
23
|
+
"""Event-specific data"""
|
|
24
|
+
|
|
25
|
+
timestamp: datetime
|
|
26
|
+
"""The timestamp of when the event occurred"""
|
|
27
|
+
|
|
28
|
+
type: Literal["dispute.won"]
|
|
29
|
+
"""The event type"""
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from .dispute import Dispute
|
|
8
|
+
from .._models import BaseModel
|
|
9
|
+
|
|
10
|
+
__all__ = ["DisputeWonWebhookEvent", "Data"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Data(Dispute):
|
|
14
|
+
payload_type: Optional[Literal["Dispute"]] = None
|
|
15
|
+
"""The type of payload in the data field"""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class DisputeWonWebhookEvent(BaseModel):
|
|
19
|
+
business_id: str
|
|
20
|
+
"""The business identifier"""
|
|
21
|
+
|
|
22
|
+
data: Data
|
|
23
|
+
"""Event-specific data"""
|
|
24
|
+
|
|
25
|
+
timestamp: datetime
|
|
26
|
+
"""The timestamp of when the event occurred"""
|
|
27
|
+
|
|
28
|
+
type: Literal["dispute.won"]
|
|
29
|
+
"""The event type"""
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Dict, Union, Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
|
|
6
|
+
from .._models import BaseModel
|
|
7
|
+
|
|
8
|
+
__all__ = ["Event"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class Event(BaseModel):
|
|
12
|
+
business_id: str
|
|
13
|
+
|
|
14
|
+
customer_id: str
|
|
15
|
+
|
|
16
|
+
event_id: str
|
|
17
|
+
|
|
18
|
+
event_name: str
|
|
19
|
+
|
|
20
|
+
timestamp: datetime
|
|
21
|
+
|
|
22
|
+
metadata: Optional[Dict[str, Union[str, float, bool]]] = None
|
|
23
|
+
"""Arbitrary key-value metadata.
|
|
24
|
+
|
|
25
|
+
Values can be string, integer, number, or boolean.
|
|
26
|
+
"""
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Dict, Union, Optional
|
|
6
|
+
from datetime import datetime
|
|
7
|
+
from typing_extensions import Required, Annotated, TypedDict
|
|
8
|
+
|
|
9
|
+
from .._utils import PropertyInfo
|
|
10
|
+
|
|
11
|
+
__all__ = ["EventInputParam"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class EventInputParam(TypedDict, total=False):
|
|
15
|
+
customer_id: Required[str]
|
|
16
|
+
"""customer_id of the customer whose usage needs to be tracked"""
|
|
17
|
+
|
|
18
|
+
event_id: Required[str]
|
|
19
|
+
"""Event Id acts as an idempotency key.
|
|
20
|
+
|
|
21
|
+
Any subsequent requests with the same event_id will be ignored
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
event_name: Required[str]
|
|
25
|
+
"""Name of the event"""
|
|
26
|
+
|
|
27
|
+
metadata: Optional[Dict[str, Union[str, float, bool]]]
|
|
28
|
+
"""Custom metadata.
|
|
29
|
+
|
|
30
|
+
Only key value pairs are accepted, objects or arrays submitted will be rejected.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
timestamp: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
|
|
34
|
+
"""Custom Timestamp.
|
|
35
|
+
|
|
36
|
+
Defaults to current timestamp in UTC. Timestamps that are older that 1 hour or
|
|
37
|
+
after 5 mins, from current timestamp, will be rejected.
|
|
38
|
+
"""
|
|
@@ -0,0 +1,40 @@
|
|
|
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 .customer_limited_details import CustomerLimitedDetails
|
|
8
|
+
|
|
9
|
+
__all__ = ["LicenseActivateResponse", "Product"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class Product(BaseModel):
|
|
13
|
+
product_id: str
|
|
14
|
+
"""Unique identifier for the product."""
|
|
15
|
+
|
|
16
|
+
name: Optional[str] = None
|
|
17
|
+
"""Name of the product, if set by the merchant."""
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class LicenseActivateResponse(BaseModel):
|
|
21
|
+
id: str
|
|
22
|
+
"""License key instance ID"""
|
|
23
|
+
|
|
24
|
+
business_id: str
|
|
25
|
+
"""Business ID"""
|
|
26
|
+
|
|
27
|
+
created_at: datetime
|
|
28
|
+
"""Creation timestamp"""
|
|
29
|
+
|
|
30
|
+
customer: CustomerLimitedDetails
|
|
31
|
+
"""Limited customer details associated with the license key."""
|
|
32
|
+
|
|
33
|
+
license_key_id: str
|
|
34
|
+
"""Associated license key ID"""
|
|
35
|
+
|
|
36
|
+
name: str
|
|
37
|
+
"""Instance name"""
|
|
38
|
+
|
|
39
|
+
product: Product
|
|
40
|
+
"""Related product info. Present if the license key is tied to a product."""
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from .._models import BaseModel
|
|
8
|
+
from .license_key import LicenseKey
|
|
9
|
+
|
|
10
|
+
__all__ = ["LicenseKeyCreatedWebhookEvent", "Data"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Data(LicenseKey):
|
|
14
|
+
payload_type: Optional[Literal["LicenseKey"]] = None
|
|
15
|
+
"""The type of payload in the data field"""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class LicenseKeyCreatedWebhookEvent(BaseModel):
|
|
19
|
+
business_id: str
|
|
20
|
+
"""The business identifier"""
|
|
21
|
+
|
|
22
|
+
data: Data
|
|
23
|
+
"""Event-specific data"""
|
|
24
|
+
|
|
25
|
+
timestamp: datetime
|
|
26
|
+
"""The timestamp of when the event occurred"""
|
|
27
|
+
|
|
28
|
+
type: Literal["license_key.created"]
|
|
29
|
+
"""The event type"""
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from .._models import BaseModel
|
|
8
|
+
from .license_key import LicenseKey
|
|
9
|
+
|
|
10
|
+
__all__ = ["LicenseKeyCreatedWebhookEvent", "Data"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Data(LicenseKey):
|
|
14
|
+
payload_type: Optional[Literal["LicenseKey"]] = None
|
|
15
|
+
"""The type of payload in the data field"""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class LicenseKeyCreatedWebhookEvent(BaseModel):
|
|
19
|
+
business_id: str
|
|
20
|
+
"""The business identifier"""
|
|
21
|
+
|
|
22
|
+
data: Data
|
|
23
|
+
"""Event-specific data"""
|
|
24
|
+
|
|
25
|
+
timestamp: datetime
|
|
26
|
+
"""The timestamp of when the event occurred"""
|
|
27
|
+
|
|
28
|
+
type: Literal["license_key.created"]
|
|
29
|
+
"""The event type"""
|