dodopayments 1.49.0__py3-none-any.whl → 1.51.0__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 dodopayments might be problematic. Click here for more details.

Files changed (31) hide show
  1. dodopayments/_client.py +15 -11
  2. dodopayments/_version.py +1 -1
  3. dodopayments/resources/__init__.py +13 -13
  4. dodopayments/resources/checkout_sessions.py +272 -0
  5. dodopayments/resources/subscriptions.py +7 -2
  6. dodopayments/resources/webhooks/webhooks.py +19 -22
  7. dodopayments/types/__init__.py +4 -13
  8. dodopayments/types/checkout_session_create_params.py +174 -0
  9. dodopayments/types/checkout_session_response.py +13 -0
  10. dodopayments/types/on_demand_subscription_param.py +44 -0
  11. dodopayments/types/subscription.py +3 -0
  12. dodopayments/types/subscription_create_params.py +3 -36
  13. dodopayments/types/subscription_update_params.py +1 -0
  14. dodopayments/types/{webhook_list_response.py → webhook_details.py} +2 -2
  15. {dodopayments-1.49.0.dist-info → dodopayments-1.51.0.dist-info}/METADATA +17 -90
  16. {dodopayments-1.49.0.dist-info → dodopayments-1.51.0.dist-info}/RECORD +18 -27
  17. dodopayments/resources/your_webhook_url.py +0 -224
  18. dodopayments/types/addon_cart_response_item_param.py +0 -13
  19. dodopayments/types/customer_limited_details_param.py +0 -18
  20. dodopayments/types/dispute_param.py +0 -45
  21. dodopayments/types/get_dispute_param.py +0 -52
  22. dodopayments/types/license_key_param.py +0 -53
  23. dodopayments/types/payment_param.py +0 -131
  24. dodopayments/types/refund_param.py +0 -42
  25. dodopayments/types/subscription_param.py +0 -97
  26. dodopayments/types/webhook_create_response.py +0 -42
  27. dodopayments/types/webhook_retrieve_response.py +0 -42
  28. dodopayments/types/webhook_update_response.py +0 -42
  29. dodopayments/types/your_webhook_url_create_params.py +0 -66
  30. {dodopayments-1.49.0.dist-info → dodopayments-1.51.0.dist-info}/WHEEL +0 -0
  31. {dodopayments-1.49.0.dist-info → dodopayments-1.51.0.dist-info}/licenses/LICENSE +0 -0
@@ -1,131 +0,0 @@
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, Iterable, Optional
6
- from datetime import datetime
7
- from typing_extensions import Required, Annotated, TypedDict
8
-
9
- from .._utils import PropertyInfo
10
- from .currency import Currency
11
- from .country_code import CountryCode
12
- from .refund_param import RefundParam
13
- from .dispute_param import DisputeParam
14
- from .intent_status import IntentStatus
15
- from .billing_address_param import BillingAddressParam
16
- from .customer_limited_details_param import CustomerLimitedDetailsParam
17
-
18
- __all__ = ["PaymentParam", "ProductCart"]
19
-
20
-
21
- class ProductCart(TypedDict, total=False):
22
- product_id: Required[str]
23
-
24
- quantity: Required[int]
25
-
26
-
27
- class PaymentParam(TypedDict, total=False):
28
- billing: Required[BillingAddressParam]
29
- """Billing address details for payments"""
30
-
31
- brand_id: Required[str]
32
- """brand id this payment belongs to"""
33
-
34
- business_id: Required[str]
35
- """Identifier of the business associated with the payment"""
36
-
37
- created_at: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
38
- """Timestamp when the payment was created"""
39
-
40
- currency: Required[Currency]
41
- """Currency used for the payment"""
42
-
43
- customer: Required[CustomerLimitedDetailsParam]
44
- """Details about the customer who made the payment"""
45
-
46
- digital_products_delivered: Required[bool]
47
- """brand id this payment belongs to"""
48
-
49
- disputes: Required[Iterable[DisputeParam]]
50
- """List of disputes associated with this payment"""
51
-
52
- metadata: Required[Dict[str, str]]
53
- """Additional custom data associated with the payment"""
54
-
55
- payment_id: Required[str]
56
- """Unique identifier for the payment"""
57
-
58
- refunds: Required[Iterable[RefundParam]]
59
- """List of refunds issued for this payment"""
60
-
61
- settlement_amount: Required[int]
62
- """
63
- The amount that will be credited to your Dodo balance after currency conversion
64
- and processing. Especially relevant for adaptive pricing where the customer's
65
- payment currency differs from your settlement currency.
66
- """
67
-
68
- settlement_currency: Required[Currency]
69
- """
70
- The currency in which the settlement_amount will be credited to your Dodo
71
- balance. This may differ from the customer's payment currency in adaptive
72
- pricing scenarios.
73
- """
74
-
75
- total_amount: Required[int]
76
- """
77
- Total amount charged to the customer including tax, in smallest currency unit
78
- (e.g. cents)
79
- """
80
-
81
- card_issuing_country: Optional[CountryCode]
82
- """ISO2 country code of the card"""
83
-
84
- card_last_four: Optional[str]
85
- """The last four digits of the card"""
86
-
87
- card_network: Optional[str]
88
- """Card network like VISA, MASTERCARD etc."""
89
-
90
- card_type: Optional[str]
91
- """The type of card DEBIT or CREDIT"""
92
-
93
- discount_id: Optional[str]
94
- """The discount id if discount is applied"""
95
-
96
- error_code: Optional[str]
97
- """An error code if the payment failed"""
98
-
99
- error_message: Optional[str]
100
- """An error message if the payment failed"""
101
-
102
- payment_link: Optional[str]
103
- """Checkout URL"""
104
-
105
- payment_method: Optional[str]
106
- """Payment method used by customer (e.g. "card", "bank_transfer")"""
107
-
108
- payment_method_type: Optional[str]
109
- """Specific type of payment method (e.g. "visa", "mastercard")"""
110
-
111
- product_cart: Optional[Iterable[ProductCart]]
112
- """List of products purchased in a one-time payment"""
113
-
114
- settlement_tax: Optional[int]
115
- """
116
- This represents the portion of settlement_amount that corresponds to taxes
117
- collected. Especially relevant for adaptive pricing where the tax component must
118
- be tracked separately in your Dodo balance.
119
- """
120
-
121
- status: Optional[IntentStatus]
122
- """Current status of the payment intent"""
123
-
124
- subscription_id: Optional[str]
125
- """Identifier of the subscription if payment is part of a subscription"""
126
-
127
- tax: Optional[int]
128
- """Amount of tax collected in smallest currency unit (e.g. cents)"""
129
-
130
- updated_at: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
131
- """Timestamp when the payment was last updated"""
@@ -1,42 +0,0 @@
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 datetime import datetime
7
- from typing_extensions import Required, Annotated, TypedDict
8
-
9
- from .._utils import PropertyInfo
10
- from .currency import Currency
11
- from .refund_status import RefundStatus
12
-
13
- __all__ = ["RefundParam"]
14
-
15
-
16
- class RefundParam(TypedDict, total=False):
17
- business_id: Required[str]
18
- """The unique identifier of the business issuing the refund."""
19
-
20
- created_at: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
21
- """The timestamp of when the refund was created in UTC."""
22
-
23
- is_partial: Required[bool]
24
- """If true the refund is a partial refund"""
25
-
26
- payment_id: Required[str]
27
- """The unique identifier of the payment associated with the refund."""
28
-
29
- refund_id: Required[str]
30
- """The unique identifier of the refund."""
31
-
32
- status: Required[RefundStatus]
33
- """The current status of the refund."""
34
-
35
- amount: Optional[int]
36
- """The refunded amount."""
37
-
38
- currency: Optional[Currency]
39
- """The currency of the refund, represented as an ISO 4217 currency code."""
40
-
41
- reason: Optional[str]
42
- """The reason provided for the refund, if any. Optional."""
@@ -1,97 +0,0 @@
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, Iterable, Optional
6
- from datetime import datetime
7
- from typing_extensions import Required, Annotated, TypedDict
8
-
9
- from .._utils import PropertyInfo
10
- from .currency import Currency
11
- from .time_interval import TimeInterval
12
- from .subscription_status import SubscriptionStatus
13
- from .billing_address_param import BillingAddressParam
14
- from .addon_cart_response_item_param import AddonCartResponseItemParam
15
- from .customer_limited_details_param import CustomerLimitedDetailsParam
16
-
17
- __all__ = ["SubscriptionParam"]
18
-
19
-
20
- class SubscriptionParam(TypedDict, total=False):
21
- addons: Required[Iterable[AddonCartResponseItemParam]]
22
- """Addons associated with this subscription"""
23
-
24
- billing: Required[BillingAddressParam]
25
- """Billing address details for payments"""
26
-
27
- cancel_at_next_billing_date: Required[bool]
28
- """Indicates if the subscription will cancel at the next billing date"""
29
-
30
- created_at: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
31
- """Timestamp when the subscription was created"""
32
-
33
- currency: Required[Currency]
34
- """Currency used for the subscription payments"""
35
-
36
- customer: Required[CustomerLimitedDetailsParam]
37
- """Customer details associated with the subscription"""
38
-
39
- metadata: Required[Dict[str, str]]
40
- """Additional custom data associated with the subscription"""
41
-
42
- next_billing_date: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
43
- """Timestamp of the next scheduled billing.
44
-
45
- Indicates the end of current billing period
46
- """
47
-
48
- on_demand: Required[bool]
49
- """Wether the subscription is on-demand or not"""
50
-
51
- payment_frequency_count: Required[int]
52
- """Number of payment frequency intervals"""
53
-
54
- payment_frequency_interval: Required[TimeInterval]
55
- """Time interval for payment frequency (e.g. month, year)"""
56
-
57
- previous_billing_date: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
58
- """Timestamp of the last payment. Indicates the start of current billing period"""
59
-
60
- product_id: Required[str]
61
- """Identifier of the product associated with this subscription"""
62
-
63
- quantity: Required[int]
64
- """Number of units/items included in the subscription"""
65
-
66
- recurring_pre_tax_amount: Required[int]
67
- """
68
- Amount charged before tax for each recurring payment in smallest currency unit
69
- (e.g. cents)
70
- """
71
-
72
- status: Required[SubscriptionStatus]
73
- """Current status of the subscription"""
74
-
75
- subscription_id: Required[str]
76
- """Unique identifier for the subscription"""
77
-
78
- subscription_period_count: Required[int]
79
- """Number of subscription period intervals"""
80
-
81
- subscription_period_interval: Required[TimeInterval]
82
- """Time interval for the subscription period (e.g. month, year)"""
83
-
84
- tax_inclusive: Required[bool]
85
- """Indicates if the recurring_pre_tax_amount is tax inclusive"""
86
-
87
- trial_period_days: Required[int]
88
- """Number of days in the trial period (0 if no trial)"""
89
-
90
- cancelled_at: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
91
- """Cancelled timestamp if the subscription is cancelled"""
92
-
93
- discount_cycles_remaining: Optional[int]
94
- """Number of remaining discount cycles if discount is applied"""
95
-
96
- discount_id: Optional[str]
97
- """The discount id if discount is applied"""
@@ -1,42 +0,0 @@
1
- # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- from typing import Dict, List, Optional
4
-
5
- from .._models import BaseModel
6
-
7
- __all__ = ["WebhookCreateResponse"]
8
-
9
-
10
- class WebhookCreateResponse(BaseModel):
11
- id: str
12
- """The webhook's ID."""
13
-
14
- created_at: str
15
- """Created at timestamp"""
16
-
17
- description: str
18
- """An example webhook name."""
19
-
20
- metadata: Dict[str, str]
21
- """Metadata of the webhook"""
22
-
23
- updated_at: str
24
- """Updated at timestamp"""
25
-
26
- url: str
27
- """Url endpoint of the webhook"""
28
-
29
- disabled: Optional[bool] = None
30
- """Status of the webhook.
31
-
32
- If true, events are not sent
33
- """
34
-
35
- filter_types: Optional[List[str]] = None
36
- """Filter events to the webhook.
37
-
38
- Webhook event will only be sent for events in the list.
39
- """
40
-
41
- rate_limit: Optional[int] = None
42
- """Configured rate limit"""
@@ -1,42 +0,0 @@
1
- # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- from typing import Dict, List, Optional
4
-
5
- from .._models import BaseModel
6
-
7
- __all__ = ["WebhookRetrieveResponse"]
8
-
9
-
10
- class WebhookRetrieveResponse(BaseModel):
11
- id: str
12
- """The webhook's ID."""
13
-
14
- created_at: str
15
- """Created at timestamp"""
16
-
17
- description: str
18
- """An example webhook name."""
19
-
20
- metadata: Dict[str, str]
21
- """Metadata of the webhook"""
22
-
23
- updated_at: str
24
- """Updated at timestamp"""
25
-
26
- url: str
27
- """Url endpoint of the webhook"""
28
-
29
- disabled: Optional[bool] = None
30
- """Status of the webhook.
31
-
32
- If true, events are not sent
33
- """
34
-
35
- filter_types: Optional[List[str]] = None
36
- """Filter events to the webhook.
37
-
38
- Webhook event will only be sent for events in the list.
39
- """
40
-
41
- rate_limit: Optional[int] = None
42
- """Configured rate limit"""
@@ -1,42 +0,0 @@
1
- # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- from typing import Dict, List, Optional
4
-
5
- from .._models import BaseModel
6
-
7
- __all__ = ["WebhookUpdateResponse"]
8
-
9
-
10
- class WebhookUpdateResponse(BaseModel):
11
- id: str
12
- """The webhook's ID."""
13
-
14
- created_at: str
15
- """Created at timestamp"""
16
-
17
- description: str
18
- """An example webhook name."""
19
-
20
- metadata: Dict[str, str]
21
- """Metadata of the webhook"""
22
-
23
- updated_at: str
24
- """Updated at timestamp"""
25
-
26
- url: str
27
- """Url endpoint of the webhook"""
28
-
29
- disabled: Optional[bool] = None
30
- """Status of the webhook.
31
-
32
- If true, events are not sent
33
- """
34
-
35
- filter_types: Optional[List[str]] = None
36
- """Filter events to the webhook.
37
-
38
- Webhook event will only be sent for events in the list.
39
- """
40
-
41
- rate_limit: Optional[int] = None
42
- """Configured rate limit"""
@@ -1,66 +0,0 @@
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
6
- from datetime import datetime
7
- from typing_extensions import Literal, Required, Annotated, TypedDict
8
-
9
- from .._utils import PropertyInfo
10
- from .refund_param import RefundParam
11
- from .payment_param import PaymentParam
12
- from .get_dispute_param import GetDisputeParam
13
- from .license_key_param import LicenseKeyParam
14
- from .subscription_param import SubscriptionParam
15
- from .webhook_event_type import WebhookEventType
16
-
17
- __all__ = [
18
- "YourWebhookURLCreateParams",
19
- "DataPayment",
20
- "DataSubscription",
21
- "DataRefund",
22
- "DataDispute",
23
- "DataLicenseKey",
24
- ]
25
-
26
-
27
- class YourWebhookURLCreateParams(TypedDict, total=False):
28
- business_id: Required[str]
29
-
30
- data: Required[Union[DataPayment, DataSubscription, DataRefund, DataDispute, DataLicenseKey]]
31
- """The latest data at the time of delivery attempt"""
32
-
33
- timestamp: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
34
- """
35
- The timestamp of when the event occurred (not necessarily the same of when it
36
- was delivered)
37
- """
38
-
39
- type: Required[WebhookEventType]
40
- """Event types for Dodo events"""
41
-
42
- webhook_id: Required[Annotated[str, PropertyInfo(alias="webhook-id")]]
43
-
44
- webhook_signature: Required[Annotated[str, PropertyInfo(alias="webhook-signature")]]
45
-
46
- webhook_timestamp: Required[Annotated[str, PropertyInfo(alias="webhook-timestamp")]]
47
-
48
-
49
- class DataPayment(PaymentParam, total=False):
50
- payload_type: Required[Literal["Payment"]]
51
-
52
-
53
- class DataSubscription(SubscriptionParam, total=False):
54
- payload_type: Required[Literal["Subscription"]]
55
-
56
-
57
- class DataRefund(RefundParam, total=False):
58
- payload_type: Required[Literal["Refund"]]
59
-
60
-
61
- class DataDispute(GetDisputeParam, total=False):
62
- payload_type: Required[Literal["Dispute"]]
63
-
64
-
65
- class DataLicenseKey(LicenseKeyParam, total=False):
66
- payload_type: Required[Literal["LicenseKey"]]