dodopayments 1.22.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 +5 -0
- dodopayments/_utils/_resources_proxy.py +24 -0
- dodopayments/_version.py +1 -1
- dodopayments/resources/subscriptions.py +14 -2
- dodopayments/types/subscription_charge_params.py +3 -0
- {dodopayments-1.22.0.dist-info → dodopayments-1.25.0.dist-info}/METADATA +1 -1
- {dodopayments-1.22.0.dist-info → dodopayments-1.25.0.dist-info}/RECORD +9 -8
- {dodopayments-1.22.0.dist-info → dodopayments-1.25.0.dist-info}/WHEEL +0 -0
- {dodopayments-1.22.0.dist-info → dodopayments-1.25.0.dist-info}/licenses/LICENSE +0 -0
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
|
|
@@ -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
|
@@ -370,6 +370,7 @@ class SubscriptionsResource(SyncAPIResource):
|
|
|
370
370
|
subscription_id: str,
|
|
371
371
|
*,
|
|
372
372
|
product_price: int,
|
|
373
|
+
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
|
|
373
374
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
374
375
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
375
376
|
extra_headers: Headers | None = None,
|
|
@@ -395,7 +396,13 @@ class SubscriptionsResource(SyncAPIResource):
|
|
|
395
396
|
raise ValueError(f"Expected a non-empty value for `subscription_id` but received {subscription_id!r}")
|
|
396
397
|
return self._post(
|
|
397
398
|
f"/subscriptions/{subscription_id}/charge",
|
|
398
|
-
body=maybe_transform(
|
|
399
|
+
body=maybe_transform(
|
|
400
|
+
{
|
|
401
|
+
"product_price": product_price,
|
|
402
|
+
"metadata": metadata,
|
|
403
|
+
},
|
|
404
|
+
subscription_charge_params.SubscriptionChargeParams,
|
|
405
|
+
),
|
|
399
406
|
options=make_request_options(
|
|
400
407
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
401
408
|
),
|
|
@@ -732,6 +739,7 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
|
|
|
732
739
|
subscription_id: str,
|
|
733
740
|
*,
|
|
734
741
|
product_price: int,
|
|
742
|
+
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
|
|
735
743
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
736
744
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
737
745
|
extra_headers: Headers | None = None,
|
|
@@ -758,7 +766,11 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
|
|
|
758
766
|
return await self._post(
|
|
759
767
|
f"/subscriptions/{subscription_id}/charge",
|
|
760
768
|
body=await async_maybe_transform(
|
|
761
|
-
{
|
|
769
|
+
{
|
|
770
|
+
"product_price": product_price,
|
|
771
|
+
"metadata": metadata,
|
|
772
|
+
},
|
|
773
|
+
subscription_charge_params.SubscriptionChargeParams,
|
|
762
774
|
),
|
|
763
775
|
options=make_request_options(
|
|
764
776
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
@@ -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.
|
|
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=
|
|
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=
|
|
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
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
|
|
@@ -35,7 +36,7 @@ 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=
|
|
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
|
|
@@ -114,7 +115,7 @@ dodopayments/types/refund_list_params.py,sha256=oBgwuTJNhXpCOY0LKc-sItxPdOJUVYnS
|
|
|
114
115
|
dodopayments/types/refund_status.py,sha256=ftnBnLvslfMYcUg8t7nEvb6-m5NWyVVnNcgyVu9eZto,243
|
|
115
116
|
dodopayments/types/subscription.py,sha256=8lcM-Yqn8uV2vpMABEEZPR3mT1bdCWgUTLyshuYn_B8,2238
|
|
116
117
|
dodopayments/types/subscription_change_plan_params.py,sha256=eE_PKfkf-LwHL3H94EKxDzSpfH3NJOzH6OJez_glH60,831
|
|
117
|
-
dodopayments/types/subscription_charge_params.py,sha256=
|
|
118
|
+
dodopayments/types/subscription_charge_params.py,sha256=pgniOwmevUGAMPZIlzdVZEPjSGZ8nDZuMzHLIhbEhaE,541
|
|
118
119
|
dodopayments/types/subscription_charge_response.py,sha256=aDFuOKqqQ-_v1szx9oUT89QaeM3nvwrlAExzZhF0O-Q,228
|
|
119
120
|
dodopayments/types/subscription_create_params.py,sha256=vzr2_alFQKsbt5dzBLA_WWhOZdPBrf7faf8vsXxpbNE,3259
|
|
120
121
|
dodopayments/types/subscription_create_response.py,sha256=m1H6NhN_EihfI0MH6Dg5G3E02lD0QBnqkfP-4aLJIsE,1059
|
|
@@ -132,7 +133,7 @@ dodopayments/types/invoices/__init__.py,sha256=OKfJYcKb4NObdiRObqJV_dOyDQ8feXekD
|
|
|
132
133
|
dodopayments/types/products/__init__.py,sha256=-W2ETtkni8cZpsC4Eg1aRwuLg1plV1U429JFOR1U4Rw,273
|
|
133
134
|
dodopayments/types/products/image_update_params.py,sha256=JmSZGjXI9uZgKdO9_7CINyIOmuphlmZr7-7P7kE-R5Q,308
|
|
134
135
|
dodopayments/types/products/image_update_response.py,sha256=TcJyXjoJlONpwwR6yZdIuBTu2VNyLRZFELfstD9_V-o,273
|
|
135
|
-
dodopayments-1.
|
|
136
|
-
dodopayments-1.
|
|
137
|
-
dodopayments-1.
|
|
138
|
-
dodopayments-1.
|
|
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,,
|
|
File without changes
|
|
File without changes
|