dodopayments 1.38.2__py3-none-any.whl → 1.42.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.42.0" # x-release-please-version
@@ -388,7 +388,10 @@ 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,
394
+ product_description: Optional[str] | NotGiven = NOT_GIVEN,
392
395
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
393
396
  # The extra values given here take precedence over values defined on the client or passed to this method.
394
397
  extra_headers: Headers | None = None,
@@ -402,9 +405,19 @@ class SubscriptionsResource(SyncAPIResource):
402
405
  Represented in the lowest denomination of the currency (e.g.,
403
406
  cents for USD). For example, to charge $1.00, pass `100`.
404
407
 
408
+ adaptive_currency_fees_inclusive: Whether adaptive currency fees should be included in the product_price (true) or
409
+ added on top (false). This field is ignored if adaptive pricing is not enabled
410
+ for the business.
411
+
405
412
  metadata: Metadata for the payment. If not passed, the metadata of the subscription will
406
413
  be taken
407
414
 
415
+ product_currency: Optional currency of the product price. If not specified, defaults to the
416
+ currency of the product.
417
+
418
+ product_description: Optional product description override for billing and line items. If not
419
+ specified, the stored description of the product will be used.
420
+
408
421
  extra_headers: Send extra headers
409
422
 
410
423
  extra_query: Add additional query parameters to the request
@@ -420,7 +433,10 @@ class SubscriptionsResource(SyncAPIResource):
420
433
  body=maybe_transform(
421
434
  {
422
435
  "product_price": product_price,
436
+ "adaptive_currency_fees_inclusive": adaptive_currency_fees_inclusive,
423
437
  "metadata": metadata,
438
+ "product_currency": product_currency,
439
+ "product_description": product_description,
424
440
  },
425
441
  subscription_charge_params.SubscriptionChargeParams,
426
442
  ),
@@ -778,7 +794,10 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
778
794
  subscription_id: str,
779
795
  *,
780
796
  product_price: int,
797
+ adaptive_currency_fees_inclusive: Optional[bool] | NotGiven = NOT_GIVEN,
781
798
  metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
799
+ product_currency: Optional[Currency] | NotGiven = NOT_GIVEN,
800
+ product_description: Optional[str] | NotGiven = NOT_GIVEN,
782
801
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
783
802
  # The extra values given here take precedence over values defined on the client or passed to this method.
784
803
  extra_headers: Headers | None = None,
@@ -792,9 +811,19 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
792
811
  Represented in the lowest denomination of the currency (e.g.,
793
812
  cents for USD). For example, to charge $1.00, pass `100`.
794
813
 
814
+ adaptive_currency_fees_inclusive: Whether adaptive currency fees should be included in the product_price (true) or
815
+ added on top (false). This field is ignored if adaptive pricing is not enabled
816
+ for the business.
817
+
795
818
  metadata: Metadata for the payment. If not passed, the metadata of the subscription will
796
819
  be taken
797
820
 
821
+ product_currency: Optional currency of the product price. If not specified, defaults to the
822
+ currency of the product.
823
+
824
+ product_description: Optional product description override for billing and line items. If not
825
+ specified, the stored description of the product will be used.
826
+
798
827
  extra_headers: Send extra headers
799
828
 
800
829
  extra_query: Add additional query parameters to the request
@@ -810,7 +839,10 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
810
839
  body=await async_maybe_transform(
811
840
  {
812
841
  "product_price": product_price,
842
+ "adaptive_currency_fees_inclusive": adaptive_currency_fees_inclusive,
813
843
  "metadata": metadata,
844
+ "product_currency": product_currency,
845
+ "product_description": product_description,
814
846
  },
815
847
  subscription_charge_params.SubscriptionChargeParams,
816
848
  ),
@@ -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,27 @@ 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
+ """
39
+
40
+ product_description: Optional[str]
41
+ """
42
+ Optional product description override for billing and line items. If not
43
+ specified, the stored description of the product will be used.
44
+ """
@@ -109,6 +109,25 @@ 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
+
125
+ product_description: Optional[str]
126
+ """
127
+ Optional product description override for billing and line items. If not
128
+ specified, the stored description of the product will be used.
129
+ """
130
+
112
131
  product_price: Optional[int]
113
132
  """
114
133
  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.42.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=owWFVIXgWnCM3cvzHxOfBwA2i_WY17ZLc_2fmLwLSBs,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=LG5Voo0_mq03WJ4bwqe_ViyxKMdzgk4FWqoglWz6HAA,39662
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=b7KPBp8Jv5U0srxqi4AgJbrL1PWkZ6VhDObigAuph0M,1302
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=euxiPwbc8L29tZZLWpuqNS0mkRuOv0CVuVyTGObvmYA,4239
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.42.0.dist-info/METADATA,sha256=DNRYKVfj5ht0DG1h30kTLmac9Mcgkrpbtjg-g4mgbKM,18832
149
+ dodopayments-1.42.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
150
+ dodopayments-1.42.0.dist-info/licenses/LICENSE,sha256=3_sqrBb5J3AT3FsjMKEOBRZhweWVsl_s_RjFlclm1vQ,11343
151
+ dodopayments-1.42.0.dist-info/RECORD,,