dodopayments 1.21.0__py3-none-any.whl → 1.25.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.

dodopayments/__init__.py CHANGED
@@ -1,5 +1,7 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
+ import typing as _t
4
+
3
5
  from . import types
4
6
  from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes
5
7
  from ._utils import file_from_path
@@ -80,6 +82,9 @@ __all__ = [
80
82
  "DefaultAsyncHttpxClient",
81
83
  ]
82
84
 
85
+ if not _t.TYPE_CHECKING:
86
+ from ._utils._resources_proxy import resources as resources
87
+
83
88
  _setup_logging()
84
89
 
85
90
  # Update the __module__ attribute for exported symbols so that
@@ -46,7 +46,10 @@ class LazyProxy(Generic[T], ABC):
46
46
  @property # type: ignore
47
47
  @override
48
48
  def __class__(self) -> type: # pyright: ignore
49
- proxied = self.__get_proxied__()
49
+ try:
50
+ proxied = self.__get_proxied__()
51
+ except Exception:
52
+ return type(self)
50
53
  if issubclass(type(proxied), LazyProxy):
51
54
  return type(proxied)
52
55
  return proxied.__class__
@@ -0,0 +1,24 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import Any
4
+ from typing_extensions import override
5
+
6
+ from ._proxy import LazyProxy
7
+
8
+
9
+ class ResourcesProxy(LazyProxy[Any]):
10
+ """A proxy for the `dodopayments.resources` module.
11
+
12
+ This is used so that we can lazily import `dodopayments.resources` only when
13
+ needed *and* so that users can just import `dodopayments` and reference `dodopayments.resources`
14
+ """
15
+
16
+ @override
17
+ def __load__(self) -> Any:
18
+ import importlib
19
+
20
+ mod = importlib.import_module("dodopayments.resources")
21
+ return mod
22
+
23
+
24
+ resources = ResourcesProxy().__as_proxied__()
dodopayments/_version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "dodopayments"
4
- __version__ = "1.21.0" # x-release-please-version
4
+ __version__ = "1.25.0" # x-release-please-version
@@ -20,9 +20,10 @@ from .._response import (
20
20
  )
21
21
  from ..pagination import SyncDefaultPageNumberPagination, AsyncDefaultPageNumberPagination
22
22
  from .._base_client import AsyncPaginator, make_request_options
23
- from ..types.dispute import Dispute
24
23
  from ..types.dispute_stage import DisputeStage
25
24
  from ..types.dispute_status import DisputeStatus
25
+ from ..types.dispute_list_response import DisputeListResponse
26
+ from ..types.dispute_retrieve_response import DisputeRetrieveResponse
26
27
 
27
28
  __all__ = ["DisputesResource", "AsyncDisputesResource"]
28
29
 
@@ -57,7 +58,7 @@ class DisputesResource(SyncAPIResource):
57
58
  extra_query: Query | None = None,
58
59
  extra_body: Body | None = None,
59
60
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
60
- ) -> Dispute:
61
+ ) -> DisputeRetrieveResponse:
61
62
  """
62
63
  Args:
63
64
  extra_headers: Send extra headers
@@ -75,7 +76,7 @@ class DisputesResource(SyncAPIResource):
75
76
  options=make_request_options(
76
77
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
77
78
  ),
78
- cast_to=Dispute,
79
+ cast_to=DisputeRetrieveResponse,
79
80
  )
80
81
 
81
82
  def list(
@@ -94,7 +95,7 @@ class DisputesResource(SyncAPIResource):
94
95
  extra_query: Query | None = None,
95
96
  extra_body: Body | None = None,
96
97
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
97
- ) -> SyncDefaultPageNumberPagination[Dispute]:
98
+ ) -> SyncDefaultPageNumberPagination[DisputeListResponse]:
98
99
  """
99
100
  Args:
100
101
  created_at_gte: Get events after this created time
@@ -121,7 +122,7 @@ class DisputesResource(SyncAPIResource):
121
122
  """
122
123
  return self._get_api_list(
123
124
  "/disputes",
124
- page=SyncDefaultPageNumberPagination[Dispute],
125
+ page=SyncDefaultPageNumberPagination[DisputeListResponse],
125
126
  options=make_request_options(
126
127
  extra_headers=extra_headers,
127
128
  extra_query=extra_query,
@@ -140,7 +141,7 @@ class DisputesResource(SyncAPIResource):
140
141
  dispute_list_params.DisputeListParams,
141
142
  ),
142
143
  ),
143
- model=Dispute,
144
+ model=DisputeListResponse,
144
145
  )
145
146
 
146
147
 
@@ -174,7 +175,7 @@ class AsyncDisputesResource(AsyncAPIResource):
174
175
  extra_query: Query | None = None,
175
176
  extra_body: Body | None = None,
176
177
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
177
- ) -> Dispute:
178
+ ) -> DisputeRetrieveResponse:
178
179
  """
179
180
  Args:
180
181
  extra_headers: Send extra headers
@@ -192,7 +193,7 @@ class AsyncDisputesResource(AsyncAPIResource):
192
193
  options=make_request_options(
193
194
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
194
195
  ),
195
- cast_to=Dispute,
196
+ cast_to=DisputeRetrieveResponse,
196
197
  )
197
198
 
198
199
  def list(
@@ -211,7 +212,7 @@ class AsyncDisputesResource(AsyncAPIResource):
211
212
  extra_query: Query | None = None,
212
213
  extra_body: Body | None = None,
213
214
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
214
- ) -> AsyncPaginator[Dispute, AsyncDefaultPageNumberPagination[Dispute]]:
215
+ ) -> AsyncPaginator[DisputeListResponse, AsyncDefaultPageNumberPagination[DisputeListResponse]]:
215
216
  """
216
217
  Args:
217
218
  created_at_gte: Get events after this created time
@@ -238,7 +239,7 @@ class AsyncDisputesResource(AsyncAPIResource):
238
239
  """
239
240
  return self._get_api_list(
240
241
  "/disputes",
241
- page=AsyncDefaultPageNumberPagination[Dispute],
242
+ page=AsyncDefaultPageNumberPagination[DisputeListResponse],
242
243
  options=make_request_options(
243
244
  extra_headers=extra_headers,
244
245
  extra_query=extra_query,
@@ -257,7 +258,7 @@ class AsyncDisputesResource(AsyncAPIResource):
257
258
  dispute_list_params.DisputeListParams,
258
259
  ),
259
260
  ),
260
- model=Dispute,
261
+ model=DisputeListResponse,
261
262
  )
262
263
 
263
264
 
@@ -4,14 +4,18 @@ from __future__ import annotations
4
4
 
5
5
  import httpx
6
6
 
7
- from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
7
+ from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
8
8
  from ..._compat import cached_property
9
9
  from ..._resource import SyncAPIResource, AsyncAPIResource
10
10
  from ..._response import (
11
- to_raw_response_wrapper,
12
- to_streamed_response_wrapper,
13
- async_to_raw_response_wrapper,
14
- async_to_streamed_response_wrapper,
11
+ BinaryAPIResponse,
12
+ AsyncBinaryAPIResponse,
13
+ StreamedBinaryAPIResponse,
14
+ AsyncStreamedBinaryAPIResponse,
15
+ to_custom_raw_response_wrapper,
16
+ to_custom_streamed_response_wrapper,
17
+ async_to_custom_raw_response_wrapper,
18
+ async_to_custom_streamed_response_wrapper,
15
19
  )
16
20
  from ..._base_client import make_request_options
17
21
 
@@ -48,7 +52,7 @@ class PaymentsResource(SyncAPIResource):
48
52
  extra_query: Query | None = None,
49
53
  extra_body: Body | None = None,
50
54
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
51
- ) -> None:
55
+ ) -> BinaryAPIResponse:
52
56
  """
53
57
  Args:
54
58
  extra_headers: Send extra headers
@@ -61,13 +65,13 @@ class PaymentsResource(SyncAPIResource):
61
65
  """
62
66
  if not payment_id:
63
67
  raise ValueError(f"Expected a non-empty value for `payment_id` but received {payment_id!r}")
64
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
68
+ extra_headers = {"Accept": "application/pdf", **(extra_headers or {})}
65
69
  return self._get(
66
70
  f"/invoices/payments/{payment_id}",
67
71
  options=make_request_options(
68
72
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
69
73
  ),
70
- cast_to=NoneType,
74
+ cast_to=BinaryAPIResponse,
71
75
  )
72
76
 
73
77
 
@@ -101,7 +105,7 @@ class AsyncPaymentsResource(AsyncAPIResource):
101
105
  extra_query: Query | None = None,
102
106
  extra_body: Body | None = None,
103
107
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
104
- ) -> None:
108
+ ) -> AsyncBinaryAPIResponse:
105
109
  """
106
110
  Args:
107
111
  extra_headers: Send extra headers
@@ -114,13 +118,13 @@ class AsyncPaymentsResource(AsyncAPIResource):
114
118
  """
115
119
  if not payment_id:
116
120
  raise ValueError(f"Expected a non-empty value for `payment_id` but received {payment_id!r}")
117
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
121
+ extra_headers = {"Accept": "application/pdf", **(extra_headers or {})}
118
122
  return await self._get(
119
123
  f"/invoices/payments/{payment_id}",
120
124
  options=make_request_options(
121
125
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
122
126
  ),
123
- cast_to=NoneType,
127
+ cast_to=AsyncBinaryAPIResponse,
124
128
  )
125
129
 
126
130
 
@@ -128,8 +132,9 @@ class PaymentsResourceWithRawResponse:
128
132
  def __init__(self, payments: PaymentsResource) -> None:
129
133
  self._payments = payments
130
134
 
131
- self.retrieve = to_raw_response_wrapper(
135
+ self.retrieve = to_custom_raw_response_wrapper(
132
136
  payments.retrieve,
137
+ BinaryAPIResponse,
133
138
  )
134
139
 
135
140
 
@@ -137,8 +142,9 @@ class AsyncPaymentsResourceWithRawResponse:
137
142
  def __init__(self, payments: AsyncPaymentsResource) -> None:
138
143
  self._payments = payments
139
144
 
140
- self.retrieve = async_to_raw_response_wrapper(
145
+ self.retrieve = async_to_custom_raw_response_wrapper(
141
146
  payments.retrieve,
147
+ AsyncBinaryAPIResponse,
142
148
  )
143
149
 
144
150
 
@@ -146,8 +152,9 @@ class PaymentsResourceWithStreamingResponse:
146
152
  def __init__(self, payments: PaymentsResource) -> None:
147
153
  self._payments = payments
148
154
 
149
- self.retrieve = to_streamed_response_wrapper(
155
+ self.retrieve = to_custom_streamed_response_wrapper(
150
156
  payments.retrieve,
157
+ StreamedBinaryAPIResponse,
151
158
  )
152
159
 
153
160
 
@@ -155,6 +162,7 @@ class AsyncPaymentsResourceWithStreamingResponse:
155
162
  def __init__(self, payments: AsyncPaymentsResource) -> None:
156
163
  self._payments = payments
157
164
 
158
- self.retrieve = async_to_streamed_response_wrapper(
165
+ self.retrieve = async_to_custom_streamed_response_wrapper(
159
166
  payments.retrieve,
167
+ AsyncStreamedBinaryAPIResponse,
160
168
  )
@@ -320,6 +320,7 @@ class SubscriptionsResource(SyncAPIResource):
320
320
  product_id: str,
321
321
  proration_billing_mode: Literal["prorated_immediately"],
322
322
  quantity: int,
323
+ addons: Optional[Iterable[subscription_change_plan_params.Addon]] | NotGiven = NOT_GIVEN,
323
324
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
324
325
  # The extra values given here take precedence over values defined on the client or passed to this method.
325
326
  extra_headers: Headers | None = None,
@@ -333,6 +334,9 @@ class SubscriptionsResource(SyncAPIResource):
333
334
 
334
335
  quantity: Number of units to subscribe for. Must be at least 1.
335
336
 
337
+ addons: Addons for the new plan. Note : Leaving this empty would remove any existing
338
+ addons
339
+
336
340
  extra_headers: Send extra headers
337
341
 
338
342
  extra_query: Add additional query parameters to the request
@@ -351,6 +355,7 @@ class SubscriptionsResource(SyncAPIResource):
351
355
  "product_id": product_id,
352
356
  "proration_billing_mode": proration_billing_mode,
353
357
  "quantity": quantity,
358
+ "addons": addons,
354
359
  },
355
360
  subscription_change_plan_params.SubscriptionChangePlanParams,
356
361
  ),
@@ -365,6 +370,7 @@ class SubscriptionsResource(SyncAPIResource):
365
370
  subscription_id: str,
366
371
  *,
367
372
  product_price: int,
373
+ metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
368
374
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
369
375
  # The extra values given here take precedence over values defined on the client or passed to this method.
370
376
  extra_headers: Headers | None = None,
@@ -390,7 +396,13 @@ class SubscriptionsResource(SyncAPIResource):
390
396
  raise ValueError(f"Expected a non-empty value for `subscription_id` but received {subscription_id!r}")
391
397
  return self._post(
392
398
  f"/subscriptions/{subscription_id}/charge",
393
- body=maybe_transform({"product_price": product_price}, subscription_charge_params.SubscriptionChargeParams),
399
+ body=maybe_transform(
400
+ {
401
+ "product_price": product_price,
402
+ "metadata": metadata,
403
+ },
404
+ subscription_charge_params.SubscriptionChargeParams,
405
+ ),
394
406
  options=make_request_options(
395
407
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
396
408
  ),
@@ -677,6 +689,7 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
677
689
  product_id: str,
678
690
  proration_billing_mode: Literal["prorated_immediately"],
679
691
  quantity: int,
692
+ addons: Optional[Iterable[subscription_change_plan_params.Addon]] | NotGiven = NOT_GIVEN,
680
693
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
681
694
  # The extra values given here take precedence over values defined on the client or passed to this method.
682
695
  extra_headers: Headers | None = None,
@@ -690,6 +703,9 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
690
703
 
691
704
  quantity: Number of units to subscribe for. Must be at least 1.
692
705
 
706
+ addons: Addons for the new plan. Note : Leaving this empty would remove any existing
707
+ addons
708
+
693
709
  extra_headers: Send extra headers
694
710
 
695
711
  extra_query: Add additional query parameters to the request
@@ -708,6 +724,7 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
708
724
  "product_id": product_id,
709
725
  "proration_billing_mode": proration_billing_mode,
710
726
  "quantity": quantity,
727
+ "addons": addons,
711
728
  },
712
729
  subscription_change_plan_params.SubscriptionChangePlanParams,
713
730
  ),
@@ -722,6 +739,7 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
722
739
  subscription_id: str,
723
740
  *,
724
741
  product_price: int,
742
+ metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
725
743
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
726
744
  # The extra values given here take precedence over values defined on the client or passed to this method.
727
745
  extra_headers: Headers | None = None,
@@ -748,7 +766,11 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
748
766
  return await self._post(
749
767
  f"/subscriptions/{subscription_id}/charge",
750
768
  body=await async_maybe_transform(
751
- {"product_price": product_price}, subscription_charge_params.SubscriptionChargeParams
769
+ {
770
+ "product_price": product_price,
771
+ "metadata": metadata,
772
+ },
773
+ subscription_charge_params.SubscriptionChargeParams,
752
774
  ),
753
775
  options=make_request_options(
754
776
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
@@ -41,6 +41,7 @@ from .license_key_instance import LicenseKeyInstance as LicenseKeyInstance
41
41
  from .payout_list_response import PayoutListResponse as PayoutListResponse
42
42
  from .refund_create_params import RefundCreateParams as RefundCreateParams
43
43
  from .billing_address_param import BillingAddressParam as BillingAddressParam
44
+ from .dispute_list_response import DisputeListResponse as DisputeListResponse
44
45
  from .payment_create_params import PaymentCreateParams as PaymentCreateParams
45
46
  from .payment_list_response import PaymentListResponse as PaymentListResponse
46
47
  from .product_create_params import ProductCreateParams as ProductCreateParams
@@ -60,6 +61,7 @@ from .addon_cart_response_item import AddonCartResponseItem as AddonCartResponse
60
61
  from .customer_limited_details import CustomerLimitedDetails as CustomerLimitedDetails
61
62
  from .subscription_list_params import SubscriptionListParams as SubscriptionListParams
62
63
  from .create_new_customer_param import CreateNewCustomerParam as CreateNewCustomerParam
64
+ from .dispute_retrieve_response import DisputeRetrieveResponse as DisputeRetrieveResponse
63
65
  from .license_deactivate_params import LicenseDeactivateParams as LicenseDeactivateParams
64
66
  from .license_key_update_params import LicenseKeyUpdateParams as LicenseKeyUpdateParams
65
67
  from .license_validate_response import LicenseValidateResponse as LicenseValidateResponse
@@ -1,5 +1,6 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
+ from typing import Optional
3
4
  from datetime import datetime
4
5
 
5
6
  from .._models import BaseModel
@@ -34,3 +35,6 @@ class Dispute(BaseModel):
34
35
 
35
36
  payment_id: str
36
37
  """The unique identifier of the payment associated with the dispute."""
38
+
39
+ remarks: Optional[str] = None
40
+ """Remarks"""
@@ -0,0 +1,36 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from datetime import datetime
4
+
5
+ from .._models import BaseModel
6
+ from .dispute_stage import DisputeStage
7
+ from .dispute_status import DisputeStatus
8
+
9
+ __all__ = ["DisputeListResponse"]
10
+
11
+
12
+ class DisputeListResponse(BaseModel):
13
+ amount: str
14
+ """
15
+ The amount involved in the dispute, represented as a string to accommodate
16
+ precision.
17
+ """
18
+
19
+ business_id: str
20
+ """The unique identifier of the business involved in the dispute."""
21
+
22
+ created_at: datetime
23
+ """The timestamp of when the dispute was created, in UTC."""
24
+
25
+ currency: str
26
+ """The currency of the disputed amount, represented as an ISO 4217 currency code."""
27
+
28
+ dispute_id: str
29
+ """The unique identifier of the dispute."""
30
+
31
+ dispute_stage: DisputeStage
32
+
33
+ dispute_status: DisputeStatus
34
+
35
+ payment_id: str
36
+ """The unique identifier of the payment associated with the dispute."""
@@ -0,0 +1,46 @@
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 .dispute_stage import DisputeStage
8
+ from .dispute_status import DisputeStatus
9
+ from .customer_limited_details import CustomerLimitedDetails
10
+
11
+ __all__ = ["DisputeRetrieveResponse"]
12
+
13
+
14
+ class DisputeRetrieveResponse(BaseModel):
15
+ amount: str
16
+ """
17
+ The amount involved in the dispute, represented as a string to accommodate
18
+ precision.
19
+ """
20
+
21
+ business_id: str
22
+ """The unique identifier of the business involved in the dispute."""
23
+
24
+ created_at: datetime
25
+ """The timestamp of when the dispute was created, in UTC."""
26
+
27
+ currency: str
28
+ """The currency of the disputed amount, represented as an ISO 4217 currency code."""
29
+
30
+ customer: CustomerLimitedDetails
31
+
32
+ dispute_id: str
33
+ """The unique identifier of the dispute."""
34
+
35
+ dispute_stage: DisputeStage
36
+
37
+ dispute_status: DisputeStatus
38
+
39
+ payment_id: str
40
+ """The unique identifier of the payment associated with the dispute."""
41
+
42
+ reason: Optional[str] = None
43
+ """Reason for the dispute"""
44
+
45
+ remarks: Optional[str] = None
46
+ """Remarks"""
@@ -7,6 +7,7 @@ from .refund import Refund
7
7
  from .dispute import Dispute
8
8
  from .._models import BaseModel
9
9
  from .currency import Currency
10
+ from .country_code import CountryCode
10
11
  from .intent_status import IntentStatus
11
12
  from .billing_address import BillingAddress
12
13
  from .customer_limited_details import CustomerLimitedDetails
@@ -59,6 +60,18 @@ class Payment(BaseModel):
59
60
  (e.g. cents)
60
61
  """
61
62
 
63
+ card_issuing_country: Optional[CountryCode] = None
64
+ """ISO country code alpha2 variant"""
65
+
66
+ card_last_four: Optional[str] = None
67
+ """The last four digits of the card"""
68
+
69
+ card_network: Optional[str] = None
70
+ """Card network like VISA, MASTERCARD etc."""
71
+
72
+ card_type: Optional[str] = None
73
+ """The type of card DEBIT or CREDIT"""
74
+
62
75
  discount_id: Optional[str] = None
63
76
  """The discount id if discount is applied"""
64
77
 
@@ -2,9 +2,10 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
+ from typing import Iterable, Optional
5
6
  from typing_extensions import Literal, Required, TypedDict
6
7
 
7
- __all__ = ["SubscriptionChangePlanParams"]
8
+ __all__ = ["SubscriptionChangePlanParams", "Addon"]
8
9
 
9
10
 
10
11
  class SubscriptionChangePlanParams(TypedDict, total=False):
@@ -15,3 +16,15 @@ class SubscriptionChangePlanParams(TypedDict, total=False):
15
16
 
16
17
  quantity: Required[int]
17
18
  """Number of units to subscribe for. Must be at least 1."""
19
+
20
+ addons: Optional[Iterable[Addon]]
21
+ """
22
+ Addons for the new plan. Note : Leaving this empty would remove any existing
23
+ addons
24
+ """
25
+
26
+
27
+ class Addon(TypedDict, total=False):
28
+ addon_id: Required[str]
29
+
30
+ quantity: Required[int]
@@ -2,6 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
+ from typing import Dict, Optional
5
6
  from typing_extensions import Required, TypedDict
6
7
 
7
8
  __all__ = ["SubscriptionChargeParams"]
@@ -14,3 +15,5 @@ class SubscriptionChargeParams(TypedDict, total=False):
14
15
  Represented in the lowest denomination of the currency (e.g., cents for USD).
15
16
  For example, to charge $1.00, pass `100`.
16
17
  """
18
+
19
+ metadata: Optional[Dict[str, str]]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: dodopayments
3
- Version: 1.21.0
3
+ Version: 1.25.0
4
4
  Summary: The official Python library for the Dodo Payments API
5
5
  Project-URL: Homepage, https://github.com/dodopayments/dodopayments-python
6
6
  Project-URL: Repository, https://github.com/dodopayments/dodopayments-python
@@ -1,4 +1,4 @@
1
- dodopayments/__init__.py,sha256=DckFZUJVZhk7cGJAKZrWqBfut7BDpm64e3o-d2p_DsY,2550
1
+ dodopayments/__init__.py,sha256=0Tw56xhRmutF9qfrtOmmfar-Rzl_5LYcWgsdu73tt14,2661
2
2
  dodopayments/_base_client.py,sha256=L1uR4FGZPe2sXxx0nAXx3pGO7vH9BtQDEWWKJL2bGtQ,64850
3
3
  dodopayments/_client.py,sha256=C7ryh99xpBAUi_1MADl5LKgVOpb-bu8WjkaKBUEkfa0,26868
4
4
  dodopayments/_compat.py,sha256=VWemUKbj6DDkQ-O4baSpHVLJafotzeXmCQGJugfVTIw,6580
@@ -11,13 +11,14 @@ dodopayments/_resource.py,sha256=Jfh17Q3kKzAhO-dlfIwYlueN9t1edaaY_vmnC9vErpA,113
11
11
  dodopayments/_response.py,sha256=PDvrSN3E3IkXVw2GvyOCTNB8ch0Xn9yaWQz4w1nHZEQ,28854
12
12
  dodopayments/_streaming.py,sha256=U4D6MhotaUaGaHz32lBt0XM98IOPIpPbKHUfbb0HGCk,10124
13
13
  dodopayments/_types.py,sha256=xr6JCSMzA-ItAyUrj6yw3GuC5rwQFVUo-Uiw9OTOWyo,6149
14
- dodopayments/_version.py,sha256=LKclraLNZoUtywmyb6O_PVKNzn8dHRQd7WX-PSXPKOU,165
14
+ dodopayments/_version.py,sha256=fLtdyXRW5svJ2zgV9KoVepCyCimt89KF-_tvD_xRTPc,165
15
15
  dodopayments/pagination.py,sha256=WYDrAWHvGL58Fe6X2yYZyYTAFvzWOR63JAsKURk2ti4,1308
16
16
  dodopayments/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  dodopayments/_utils/__init__.py,sha256=PNZ_QJuzZEgyYXqkO1HVhGkj5IU9bglVUcw7H-Knjzw,2062
18
18
  dodopayments/_utils/_logs.py,sha256=wS-wfjlRVqO9Na43iwXZXBQ3Vm0dbZRPyOl9xYum580,793
19
- dodopayments/_utils/_proxy.py,sha256=z3zsateHtb0EARTWKk8QZNHfPkqJbqwd1lM993LBwGE,1902
19
+ dodopayments/_utils/_proxy.py,sha256=aglnj2yBTDyGX9Akk2crZHrl10oqRmceUy2Zp008XEs,1975
20
20
  dodopayments/_utils/_reflection.py,sha256=ZmGkIgT_PuwedyNBrrKGbxoWtkpytJNU1uU4QHnmEMU,1364
21
+ dodopayments/_utils/_resources_proxy.py,sha256=UYxKVIu0_C8NeRj7yoow0JN6MkxeIlOC0IBDX2F1QPU,619
21
22
  dodopayments/_utils/_streams.py,sha256=SMC90diFFecpEg_zgDRVbdR3hSEIgVVij4taD-noMLM,289
22
23
  dodopayments/_utils/_sync.py,sha256=TpGLrrhRNWTJtODNE6Fup3_k7zrWm1j2RlirzBwre-0,2862
23
24
  dodopayments/_utils/_transform.py,sha256=n7kskEWz6o__aoNvhFoGVyDoalNe6mJwp-g7BWkdj88,15617
@@ -27,7 +28,7 @@ dodopayments/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
27
28
  dodopayments/resources/__init__.py,sha256=IxanDN3kaD2Z3odRKnb45ZSEQqKIxPBwB-UvVwi5W2I,7480
28
29
  dodopayments/resources/addons.py,sha256=7kzJrIcIgJfww20aovTrl0EIDslk17QSm0LfC9Cqd04,22058
29
30
  dodopayments/resources/discounts.py,sha256=vAh52lyiiuqSghTku1waNxUQISfIz0e2c79OIO8x_VY,24920
30
- dodopayments/resources/disputes.py,sha256=NjnIY5ulXc2WcawNppgkV6_aAgM7xXoBVixXLrOr-Bs,11783
31
+ dodopayments/resources/disputes.py,sha256=Ck3whmCMz0hPUwT6wPFZgFCcXhqewSyCrx0SH6AeN0Y,12027
31
32
  dodopayments/resources/license_key_instances.py,sha256=oCgJ-D6JVP_Fte_IjRHnykqhAynN6rDJphrkg6hyxjE,14082
32
33
  dodopayments/resources/license_keys.py,sha256=gKN2_CcpmMRj80BTQ45AG8RhaBtr-ZhXaPUdMZq-Wo4,15926
33
34
  dodopayments/resources/licenses.py,sha256=S7cNB9k82pJBiHfdRjmNdvEfDaYUGNUigLBJPgUyg-E,13150
@@ -35,18 +36,18 @@ dodopayments/resources/misc.py,sha256=BRPUna3lLIrJ-gMGOOQL1-xYx_oMwVDzKL4d498C7p
35
36
  dodopayments/resources/payments.py,sha256=-cHG8LIlbfepR2pk_ZcnM7QDhDgvyScTg7UtrXM67xI,20884
36
37
  dodopayments/resources/payouts.py,sha256=NjBQALlhMcbMDO5AdWLioSFrGdMvpqki_HydRl0XJyE,6995
37
38
  dodopayments/resources/refunds.py,sha256=efAmscUB09FuJgvELLira6zSXbV-h3IgRTugQ6baUDU,14734
38
- dodopayments/resources/subscriptions.py,sha256=9fDgzSDyJINzeY-kRXGnw3Y-8i_Q3Sz-PtxZtsOv25o,34948
39
+ dodopayments/resources/subscriptions.py,sha256=li5qcQ9F0i0kQ9HthnQSfIsA6PKX2PZZErhjd_qWWgA,35814
39
40
  dodopayments/resources/webhook_events.py,sha256=1OrWx7h4_Nb_yyl3ySCTz0QXM7LAYqVC2ipcveOvSdM,11726
40
41
  dodopayments/resources/customers/__init__.py,sha256=RIP1WYqO_PIq9b57tDaJWf9zIRxG_iFeFkOVhe3apAo,1146
41
42
  dodopayments/resources/customers/customer_portal.py,sha256=E967nei40PZfCRFDv5K0jxxVBEOFpmZsEIkseOGsUM0,7010
42
43
  dodopayments/resources/customers/customers.py,sha256=lfd11GpmGFSEMETRAMHP3M74LRK_ZqwX5BgAy8ProSo,18125
43
44
  dodopayments/resources/invoices/__init__.py,sha256=r81DwjI_F6B-ydnyJLSpowqPN0eTcROcPEvvzAkGPds,1054
44
45
  dodopayments/resources/invoices/invoices.py,sha256=-XZWHtZk92Wbbz5qO0DgiOCZGNKv4Slsd95feusnTnI,3761
45
- dodopayments/resources/invoices/payments.py,sha256=YE2u_N2cwLE6nY5M1QlHwGGmiiPD8XBiIgzQNMovPTc,5954
46
+ dodopayments/resources/invoices/payments.py,sha256=Kq32Cpzca3YuPdk8XjmF6wkRi6_BQ2aegyLf2FZ7KG8,6346
46
47
  dodopayments/resources/products/__init__.py,sha256=GKmDlI7Pw4UnnCRlnhb5WBh2Y3UYhqme7RqC35aztGo,1028
47
48
  dodopayments/resources/products/images.py,sha256=Dl-hxas2F6C30yhBifxCMy5xdLIgPSENHOhS8J6klJs,6388
48
49
  dodopayments/resources/products/products.py,sha256=ye95IBJpxWMUty8_y7w9C0mxY726OJCFIokp_qtn6rY,32277
49
- dodopayments/types/__init__.py,sha256=G5Nsh2PTdJXyj9GfYPBDjfoqBdjpfppgcJpWe0hztbw,5886
50
+ dodopayments/types/__init__.py,sha256=XwAOCZJcinZ2Bpmn-zSxyasOh5Kgr0LadadBjKJ0Ivs,6054
50
51
  dodopayments/types/addon_cart_response_item.py,sha256=R-I8Zd2HJKn0DmXmv6Oyu4oo-oEC1-dud0Q6_yqDB7k,235
51
52
  dodopayments/types/addon_create_params.py,sha256=TxMBkJG5ZJXdLiyAzJ8YJPzMg98nGn6stXYQ7I1sH-A,731
52
53
  dodopayments/types/addon_list_params.py,sha256=M3CxvfBwcirkJeNAIaOF2c5JdRR3GpTBVAZUdlfctg0,412
@@ -71,8 +72,10 @@ dodopayments/types/discount_create_params.py,sha256=6eGm-CdPKVUnYKqhs6QqE_GntT7K
71
72
  dodopayments/types/discount_list_params.py,sha256=o0Ui9uqFxJHw-lxFLZmttW9SmJWDmEwmKf9HT_RNxAc,422
72
73
  dodopayments/types/discount_type.py,sha256=2GOiaq6ssxLTFIMh_jO9mvFfoPhZp1XtUs516f6hrIM,213
73
74
  dodopayments/types/discount_update_params.py,sha256=XZpa1mBUC-jvRLwmMjshStWFsfeMSxIG893rSMQV0yY,1145
74
- dodopayments/types/dispute.py,sha256=YLER_3RMPHpaEzp8DaompGpbkOJu-U05yt1aVfyf5qw,937
75
+ dodopayments/types/dispute.py,sha256=GYc80xyoFj0jv4OMHmujCwdeMIiZjBIq7E6WG0vkQZ8,1018
75
76
  dodopayments/types/dispute_list_params.py,sha256=k5pngOisvEVni_UWq2wvBBtPXuMOcUV_Yz_zC8xTuUc,1075
77
+ dodopayments/types/dispute_list_response.py,sha256=gcHhBMDqxxmxu4Mj9G_aYOa9-SZJz7V-TvOCa_vYCqQ,961
78
+ dodopayments/types/dispute_retrieve_response.py,sha256=b4G877uw6NUWuN5wNYOCCV-DlCh_6MRMY18rizkWyDM,1216
76
79
  dodopayments/types/dispute_stage.py,sha256=OFaSeVXItONcrIoxGx37qccFVD_dvTeerPJ-d7pPwo8,244
77
80
  dodopayments/types/dispute_status.py,sha256=tBDzobNwCiCmlwT08Y8h3R-IuRPCn_M0IKEpQk-wPXA,363
78
81
  dodopayments/types/intent_status.py,sha256=0aP3OxHiMfZDXQFOOXNbTSZz1vZkLjBFm3ryT0sT4Z8,483
@@ -92,7 +95,7 @@ dodopayments/types/license_validate_response.py,sha256=vlSrdtsVYmQcsJpPMI-ENCf_a
92
95
  dodopayments/types/misc_list_supported_countries_response.py,sha256=Imr7f0CAjq04iikVbDSUvG1ZSYzB9Fopx8pVfVtt-zw,307
93
96
  dodopayments/types/one_time_product_cart_item.py,sha256=3l7J3KEE-SCXgArN25qKIXbIIu44Q2kxqd7jf73AGto,544
94
97
  dodopayments/types/one_time_product_cart_item_param.py,sha256=JydRYPBnLhON1pCQPRpQzKLaGJTSrDn1IRVCcMK8iAE,633
95
- dodopayments/types/payment.py,sha256=ULfCrKQgyUf9Ku0w3O7BVd36HdeSaoDp8bydc8V0M88,2732
98
+ dodopayments/types/payment.py,sha256=JgqPR4h2nMoVR1DKW7_Oago9IE8fV55OPcz_Y0zuoWc,3123
96
99
  dodopayments/types/payment_create_params.py,sha256=GlxEMIxXu7FzlMxltv2ZRyh70tnhsJdGXQIDWTKztwo,2395
97
100
  dodopayments/types/payment_create_response.py,sha256=6Evr_32yYRrMUnSTxD9QOLAgF-qAd8t85UGcLXI4BhE,1034
98
101
  dodopayments/types/payment_list_params.py,sha256=H1WGv-PKhLeBlBFXqenvrYNaviXYE-vBW94F_HLWkdU,1011
@@ -111,8 +114,8 @@ dodopayments/types/refund_create_params.py,sha256=vQsYzEerIKfHOKIxlTvYSEqcxdTNpX
111
114
  dodopayments/types/refund_list_params.py,sha256=oBgwuTJNhXpCOY0LKc-sItxPdOJUVYnS5KqcNqcXpgM,937
112
115
  dodopayments/types/refund_status.py,sha256=ftnBnLvslfMYcUg8t7nEvb6-m5NWyVVnNcgyVu9eZto,243
113
116
  dodopayments/types/subscription.py,sha256=8lcM-Yqn8uV2vpMABEEZPR3mT1bdCWgUTLyshuYn_B8,2238
114
- dodopayments/types/subscription_change_plan_params.py,sha256=QZXgpEqD1t6Orhbd9BANuL-ZWdIttq7l_oZtus4GReE,541
115
- dodopayments/types/subscription_charge_params.py,sha256=IvO-k_cGQ8v5IO36F5ZEe4JJAhnkcBovjliMbZ4WN-U,467
117
+ dodopayments/types/subscription_change_plan_params.py,sha256=eE_PKfkf-LwHL3H94EKxDzSpfH3NJOzH6OJez_glH60,831
118
+ dodopayments/types/subscription_charge_params.py,sha256=pgniOwmevUGAMPZIlzdVZEPjSGZ8nDZuMzHLIhbEhaE,541
116
119
  dodopayments/types/subscription_charge_response.py,sha256=aDFuOKqqQ-_v1szx9oUT89QaeM3nvwrlAExzZhF0O-Q,228
117
120
  dodopayments/types/subscription_create_params.py,sha256=vzr2_alFQKsbt5dzBLA_WWhOZdPBrf7faf8vsXxpbNE,3259
118
121
  dodopayments/types/subscription_create_response.py,sha256=m1H6NhN_EihfI0MH6Dg5G3E02lD0QBnqkfP-4aLJIsE,1059
@@ -130,7 +133,7 @@ dodopayments/types/invoices/__init__.py,sha256=OKfJYcKb4NObdiRObqJV_dOyDQ8feXekD
130
133
  dodopayments/types/products/__init__.py,sha256=-W2ETtkni8cZpsC4Eg1aRwuLg1plV1U429JFOR1U4Rw,273
131
134
  dodopayments/types/products/image_update_params.py,sha256=JmSZGjXI9uZgKdO9_7CINyIOmuphlmZr7-7P7kE-R5Q,308
132
135
  dodopayments/types/products/image_update_response.py,sha256=TcJyXjoJlONpwwR6yZdIuBTu2VNyLRZFELfstD9_V-o,273
133
- dodopayments-1.21.0.dist-info/METADATA,sha256=xsevpTNII11Wuyq9jsFfkQ4OnMywymDBE-owYZTShgc,17404
134
- dodopayments-1.21.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
135
- dodopayments-1.21.0.dist-info/licenses/LICENSE,sha256=3_sqrBb5J3AT3FsjMKEOBRZhweWVsl_s_RjFlclm1vQ,11343
136
- dodopayments-1.21.0.dist-info/RECORD,,
136
+ dodopayments-1.25.0.dist-info/METADATA,sha256=ZTyWsYCvc1LLy4E8-t8_3Gn5rYs09y3DQygCYRJbhe4,17404
137
+ dodopayments-1.25.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
138
+ dodopayments-1.25.0.dist-info/licenses/LICENSE,sha256=3_sqrBb5J3AT3FsjMKEOBRZhweWVsl_s_RjFlclm1vQ,11343
139
+ dodopayments-1.25.0.dist-info/RECORD,,