dodopayments 1.38.2__py3-none-any.whl → 1.39.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/_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.38.2" # x-release-please-version
4
+ __version__ = "1.39.0" # x-release-please-version
@@ -388,7 +388,9 @@ class SubscriptionsResource(SyncAPIResource):
388
388
  subscription_id: str,
389
389
  *,
390
390
  product_price: int,
391
+ adaptive_currency_fees_inclusive: Optional[bool] | NotGiven = NOT_GIVEN,
391
392
  metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
393
+ product_currency: Optional[Currency] | NotGiven = NOT_GIVEN,
392
394
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
393
395
  # The extra values given here take precedence over values defined on the client or passed to this method.
394
396
  extra_headers: Headers | None = None,
@@ -402,9 +404,16 @@ class SubscriptionsResource(SyncAPIResource):
402
404
  Represented in the lowest denomination of the currency (e.g.,
403
405
  cents for USD). For example, to charge $1.00, pass `100`.
404
406
 
407
+ adaptive_currency_fees_inclusive: Whether adaptive currency fees should be included in the product_price (true) or
408
+ added on top (false). This field is ignored if adaptive pricing is not enabled
409
+ for the business.
410
+
405
411
  metadata: Metadata for the payment. If not passed, the metadata of the subscription will
406
412
  be taken
407
413
 
414
+ product_currency: Optional currency of the product price. If not specified, defaults to the
415
+ currency of the product.
416
+
408
417
  extra_headers: Send extra headers
409
418
 
410
419
  extra_query: Add additional query parameters to the request
@@ -420,7 +429,9 @@ class SubscriptionsResource(SyncAPIResource):
420
429
  body=maybe_transform(
421
430
  {
422
431
  "product_price": product_price,
432
+ "adaptive_currency_fees_inclusive": adaptive_currency_fees_inclusive,
423
433
  "metadata": metadata,
434
+ "product_currency": product_currency,
424
435
  },
425
436
  subscription_charge_params.SubscriptionChargeParams,
426
437
  ),
@@ -778,7 +789,9 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
778
789
  subscription_id: str,
779
790
  *,
780
791
  product_price: int,
792
+ adaptive_currency_fees_inclusive: Optional[bool] | NotGiven = NOT_GIVEN,
781
793
  metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
794
+ product_currency: Optional[Currency] | NotGiven = NOT_GIVEN,
782
795
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
783
796
  # The extra values given here take precedence over values defined on the client or passed to this method.
784
797
  extra_headers: Headers | None = None,
@@ -792,9 +805,16 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
792
805
  Represented in the lowest denomination of the currency (e.g.,
793
806
  cents for USD). For example, to charge $1.00, pass `100`.
794
807
 
808
+ adaptive_currency_fees_inclusive: Whether adaptive currency fees should be included in the product_price (true) or
809
+ added on top (false). This field is ignored if adaptive pricing is not enabled
810
+ for the business.
811
+
795
812
  metadata: Metadata for the payment. If not passed, the metadata of the subscription will
796
813
  be taken
797
814
 
815
+ product_currency: Optional currency of the product price. If not specified, defaults to the
816
+ currency of the product.
817
+
798
818
  extra_headers: Send extra headers
799
819
 
800
820
  extra_query: Add additional query parameters to the request
@@ -810,7 +830,9 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
810
830
  body=await async_maybe_transform(
811
831
  {
812
832
  "product_price": product_price,
833
+ "adaptive_currency_fees_inclusive": adaptive_currency_fees_inclusive,
813
834
  "metadata": metadata,
835
+ "product_currency": product_currency,
814
836
  },
815
837
  subscription_charge_params.SubscriptionChargeParams,
816
838
  ),
@@ -5,6 +5,8 @@ from __future__ import annotations
5
5
  from typing import Dict, Optional
6
6
  from typing_extensions import Required, TypedDict
7
7
 
8
+ from .currency import Currency
9
+
8
10
  __all__ = ["SubscriptionChargeParams"]
9
11
 
10
12
 
@@ -16,8 +18,21 @@ class SubscriptionChargeParams(TypedDict, total=False):
16
18
  For example, to charge $1.00, pass `100`.
17
19
  """
18
20
 
21
+ adaptive_currency_fees_inclusive: Optional[bool]
22
+ """
23
+ Whether adaptive currency fees should be included in the product_price (true) or
24
+ added on top (false). This field is ignored if adaptive pricing is not enabled
25
+ for the business.
26
+ """
27
+
19
28
  metadata: Optional[Dict[str, str]]
20
29
  """Metadata for the payment.
21
30
 
22
31
  If not passed, the metadata of the subscription will be taken
23
32
  """
33
+
34
+ product_currency: Optional[Currency]
35
+ """Optional currency of the product price.
36
+
37
+ If not specified, defaults to the currency of the product.
38
+ """
@@ -109,6 +109,19 @@ class OnDemand(TypedDict, total=False):
109
109
  details for future use.
110
110
  """
111
111
 
112
+ adaptive_currency_fees_inclusive: Optional[bool]
113
+ """
114
+ Whether adaptive currency fees should be included in the product_price (true) or
115
+ added on top (false). This field is ignored if adaptive pricing is not enabled
116
+ for the business.
117
+ """
118
+
119
+ product_currency: Optional[Currency]
120
+ """Optional currency of the product price.
121
+
122
+ If not specified, defaults to the currency of the product.
123
+ """
124
+
112
125
  product_price: Optional[int]
113
126
  """
114
127
  Product price for the initial charge to customer If not specified the stored
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: dodopayments
3
- Version: 1.38.2
3
+ Version: 1.39.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
@@ -148,7 +148,6 @@ pip install dodopayments[aiohttp]
148
148
  Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
149
149
 
150
150
  ```python
151
- import os
152
151
  import asyncio
153
152
  from dodopayments import DefaultAioHttpClient
154
153
  from dodopayments import AsyncDodoPayments
@@ -156,9 +155,7 @@ from dodopayments import AsyncDodoPayments
156
155
 
157
156
  async def main() -> None:
158
157
  async with AsyncDodoPayments(
159
- bearer_token=os.environ.get(
160
- "DODO_PAYMENTS_API_KEY"
161
- ), # This is the default and can be omitted
158
+ bearer_token="My Bearer Token",
162
159
  http_client=DefaultAioHttpClient(),
163
160
  ) as client:
164
161
  payment = await client.payments.create(
@@ -11,7 +11,7 @@ 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=gP0yR7AIegimhmZ6rYIjSHFCr9YWzvh-jZabbVcgtio,6203
14
- dodopayments/_version.py,sha256=lTq0Oa_7nN_kLgnlOw38o4NYe-LGfTO_3dhL-abCgZ8,165
14
+ dodopayments/_version.py,sha256=HUd-HpPpVlOZ71OaqZA-vSBvGh3k01m-Mx3NlyeGE6E,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
@@ -37,7 +37,7 @@ dodopayments/resources/misc.py,sha256=BRPUna3lLIrJ-gMGOOQL1-xYx_oMwVDzKL4d498C7p
37
37
  dodopayments/resources/payments.py,sha256=avEt18R5HifFiI-xaNzYKBBiMsfxC_Px9PeRpq2lehY,25767
38
38
  dodopayments/resources/payouts.py,sha256=llIbNwI3vQZYf2HsgYL5Irfl6BBoQc1g4aLPWwY09Uo,6926
39
39
  dodopayments/resources/refunds.py,sha256=BS9PcxZhEmBZveZTRo4__WmgVwKpqEEHQDp7tuMh7tQ,15045
40
- dodopayments/resources/subscriptions.py,sha256=tVmqrtn3RHhH32C-gu54cFG0K-8CSQqR06ia_IP8ees,37654
40
+ dodopayments/resources/subscriptions.py,sha256=DoOZK7asqgNqiuvbaX5Kc2sHwR7NnqIUub1BqSHl0Po,39036
41
41
  dodopayments/resources/webhook_events.py,sha256=4pzAMk5TDzkMZv-9tGAevDpsh62XKqb5nOqwI27y6HQ,12803
42
42
  dodopayments/resources/customers/__init__.py,sha256=RIP1WYqO_PIq9b57tDaJWf9zIRxG_iFeFkOVhe3apAo,1146
43
43
  dodopayments/resources/customers/customer_portal.py,sha256=f74AYBYOb0yIffh4jLmIB3igrcfaHnCS0oAbACmGlyA,6961
@@ -126,9 +126,9 @@ dodopayments/types/refund_list_params.py,sha256=iz4MPgquP4K3AlYPV5_bbt5jHzGFT__R
126
126
  dodopayments/types/refund_status.py,sha256=ftnBnLvslfMYcUg8t7nEvb6-m5NWyVVnNcgyVu9eZto,243
127
127
  dodopayments/types/subscription.py,sha256=RvYAopmSsBmNAbTLpSFPHJitQGDQbrQQ6cfT0y4fzEk,2762
128
128
  dodopayments/types/subscription_change_plan_params.py,sha256=7gm16ttHM7URMjTWQIv0CHrk_wuEY3TfsRc16sTrgig,884
129
- dodopayments/types/subscription_charge_params.py,sha256=-rmeEKq3H7M9VC8BH4z3ha320lHfyKBonsj_JiwdECY,649
129
+ dodopayments/types/subscription_charge_params.py,sha256=4waxdE1jsE2PFCcMrR6x07-CRfUFpUOs2Vt7LxSZc34,1102
130
130
  dodopayments/types/subscription_charge_response.py,sha256=aDFuOKqqQ-_v1szx9oUT89QaeM3nvwrlAExzZhF0O-Q,228
131
- dodopayments/types/subscription_create_params.py,sha256=5U3hE5xCl5XW9clJ9RFRSyCFNZV9L37hsNtDVn-fSGU,3618
131
+ dodopayments/types/subscription_create_params.py,sha256=AcXBbl_2jsNrf5sA7_SOh8PFYgkaiEKxYSlD7kEaKC4,4039
132
132
  dodopayments/types/subscription_create_response.py,sha256=Equ-ycrO3A3mOVElW6BjoBH8sqc5wwKS8ED9fHvTza0,1372
133
133
  dodopayments/types/subscription_list_params.py,sha256=nNOBUT4N2p6SpXODpuLw05_KU3dln8HkEMI6S6voy3k,975
134
134
  dodopayments/types/subscription_list_response.py,sha256=bL-2inf-DRW7lfrHXxkJFPTIJlkzZFjuCq0bSjj98zc,2628
@@ -145,7 +145,7 @@ dodopayments/types/invoices/__init__.py,sha256=OKfJYcKb4NObdiRObqJV_dOyDQ8feXekD
145
145
  dodopayments/types/products/__init__.py,sha256=-W2ETtkni8cZpsC4Eg1aRwuLg1plV1U429JFOR1U4Rw,273
146
146
  dodopayments/types/products/image_update_params.py,sha256=xyF5fRudD8wct8KKx6wc8F7bbMzVBQPOMKnX5bTiRDQ,270
147
147
  dodopayments/types/products/image_update_response.py,sha256=TcJyXjoJlONpwwR6yZdIuBTu2VNyLRZFELfstD9_V-o,273
148
- dodopayments-1.38.2.dist-info/METADATA,sha256=tTVLuya0UKyzvs-lKNCqNYzgczoQEOKWXQKKW95dBNE,18928
149
- dodopayments-1.38.2.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
150
- dodopayments-1.38.2.dist-info/licenses/LICENSE,sha256=3_sqrBb5J3AT3FsjMKEOBRZhweWVsl_s_RjFlclm1vQ,11343
151
- dodopayments-1.38.2.dist-info/RECORD,,
148
+ dodopayments-1.39.0.dist-info/METADATA,sha256=LnGQmcnYtLr1H_YElIecpfJHwMbN84sIvGfQhTbo7xE,18832
149
+ dodopayments-1.39.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
150
+ dodopayments-1.39.0.dist-info/licenses/LICENSE,sha256=3_sqrBb5J3AT3FsjMKEOBRZhweWVsl_s_RjFlclm1vQ,11343
151
+ dodopayments-1.39.0.dist-info/RECORD,,