dodopayments 1.18.3__py3-none-any.whl → 1.20.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.
Files changed (36) hide show
  1. dodopayments/_client.py +33 -24
  2. dodopayments/_version.py +1 -1
  3. dodopayments/resources/__init__.py +14 -0
  4. dodopayments/resources/addons.py +589 -0
  5. dodopayments/resources/payments.py +4 -301
  6. dodopayments/resources/products/products.py +11 -6
  7. dodopayments/resources/subscriptions.py +24 -307
  8. dodopayments/types/__init__.py +9 -0
  9. dodopayments/types/addon_cart_response_item.py +11 -0
  10. dodopayments/types/addon_create_params.py +30 -0
  11. dodopayments/types/addon_list_params.py +16 -0
  12. dodopayments/types/addon_response.py +44 -0
  13. dodopayments/types/addon_update_images_response.py +11 -0
  14. dodopayments/types/addon_update_params.py +33 -0
  15. dodopayments/types/currency.py +153 -0
  16. dodopayments/types/payment.py +6 -295
  17. dodopayments/types/payment_create_params.py +2 -149
  18. dodopayments/types/payment_list_response.py +2 -148
  19. dodopayments/types/payout_list_response.py +2 -147
  20. dodopayments/types/price.py +3 -294
  21. dodopayments/types/price_param.py +3 -298
  22. dodopayments/types/product.py +2 -2
  23. dodopayments/types/product_create_params.py +3 -2
  24. dodopayments/types/product_list_response.py +4 -151
  25. dodopayments/types/product_update_params.py +3 -2
  26. dodopayments/types/refund.py +2 -150
  27. dodopayments/types/subscription.py +10 -149
  28. dodopayments/types/subscription_create_params.py +13 -151
  29. dodopayments/types/subscription_create_response.py +5 -1
  30. dodopayments/types/subscription_list_response.py +77 -0
  31. dodopayments/types/subscription_update_params.py +11 -3
  32. dodopayments/types/tax_category.py +7 -0
  33. {dodopayments-1.18.3.dist-info → dodopayments-1.20.0.dist-info}/METADATA +6 -6
  34. {dodopayments-1.18.3.dist-info → dodopayments-1.20.0.dist-info}/RECORD +36 -26
  35. {dodopayments-1.18.3.dist-info → dodopayments-1.20.0.dist-info}/WHEEL +0 -0
  36. {dodopayments-1.18.3.dist-info → dodopayments-1.20.0.dist-info}/licenses/LICENSE +0 -0
@@ -8,7 +8,7 @@ from typing_extensions import Literal
8
8
 
9
9
  import httpx
10
10
 
11
- from ..types import IntentStatus, payment_list_params, payment_create_params
11
+ from ..types import Currency, IntentStatus, payment_list_params, payment_create_params
12
12
  from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
13
13
  from .._utils import maybe_transform, async_maybe_transform
14
14
  from .._compat import cached_property
@@ -22,6 +22,7 @@ from .._response import (
22
22
  from ..pagination import SyncDefaultPageNumberPagination, AsyncDefaultPageNumberPagination
23
23
  from .._base_client import AsyncPaginator, make_request_options
24
24
  from ..types.payment import Payment
25
+ from ..types.currency import Currency
25
26
  from ..types.intent_status import IntentStatus
26
27
  from ..types.billing_address_param import BillingAddressParam
27
28
  from ..types.payment_list_response import PaymentListResponse
@@ -83,156 +84,7 @@ class PaymentsResource(SyncAPIResource):
83
84
  ]
84
85
  ]
85
86
  | NotGiven = NOT_GIVEN,
86
- billing_currency: Optional[
87
- Literal[
88
- "AED",
89
- "ALL",
90
- "AMD",
91
- "ANG",
92
- "AOA",
93
- "ARS",
94
- "AUD",
95
- "AWG",
96
- "AZN",
97
- "BAM",
98
- "BBD",
99
- "BDT",
100
- "BGN",
101
- "BHD",
102
- "BIF",
103
- "BMD",
104
- "BND",
105
- "BOB",
106
- "BRL",
107
- "BSD",
108
- "BWP",
109
- "BYN",
110
- "BZD",
111
- "CAD",
112
- "CHF",
113
- "CLP",
114
- "CNY",
115
- "COP",
116
- "CRC",
117
- "CUP",
118
- "CVE",
119
- "CZK",
120
- "DJF",
121
- "DKK",
122
- "DOP",
123
- "DZD",
124
- "EGP",
125
- "ETB",
126
- "EUR",
127
- "FJD",
128
- "FKP",
129
- "GBP",
130
- "GEL",
131
- "GHS",
132
- "GIP",
133
- "GMD",
134
- "GNF",
135
- "GTQ",
136
- "GYD",
137
- "HKD",
138
- "HNL",
139
- "HRK",
140
- "HTG",
141
- "HUF",
142
- "IDR",
143
- "ILS",
144
- "INR",
145
- "IQD",
146
- "JMD",
147
- "JOD",
148
- "JPY",
149
- "KES",
150
- "KGS",
151
- "KHR",
152
- "KMF",
153
- "KRW",
154
- "KWD",
155
- "KYD",
156
- "KZT",
157
- "LAK",
158
- "LBP",
159
- "LKR",
160
- "LRD",
161
- "LSL",
162
- "LYD",
163
- "MAD",
164
- "MDL",
165
- "MGA",
166
- "MKD",
167
- "MMK",
168
- "MNT",
169
- "MOP",
170
- "MRU",
171
- "MUR",
172
- "MVR",
173
- "MWK",
174
- "MXN",
175
- "MYR",
176
- "MZN",
177
- "NAD",
178
- "NGN",
179
- "NIO",
180
- "NOK",
181
- "NPR",
182
- "NZD",
183
- "OMR",
184
- "PAB",
185
- "PEN",
186
- "PGK",
187
- "PHP",
188
- "PKR",
189
- "PLN",
190
- "PYG",
191
- "QAR",
192
- "RON",
193
- "RSD",
194
- "RUB",
195
- "RWF",
196
- "SAR",
197
- "SBD",
198
- "SCR",
199
- "SEK",
200
- "SGD",
201
- "SHP",
202
- "SLE",
203
- "SLL",
204
- "SOS",
205
- "SRD",
206
- "SSP",
207
- "STN",
208
- "SVC",
209
- "SZL",
210
- "THB",
211
- "TND",
212
- "TOP",
213
- "TRY",
214
- "TTD",
215
- "TWD",
216
- "TZS",
217
- "UAH",
218
- "UGX",
219
- "USD",
220
- "UYU",
221
- "UZS",
222
- "VES",
223
- "VND",
224
- "VUV",
225
- "WST",
226
- "XAF",
227
- "XCD",
228
- "XOF",
229
- "XPF",
230
- "YER",
231
- "ZAR",
232
- "ZMW",
233
- ]
234
- ]
235
- | NotGiven = NOT_GIVEN,
87
+ billing_currency: Optional[Currency] | NotGiven = NOT_GIVEN,
236
88
  discount_code: Optional[str] | NotGiven = NOT_GIVEN,
237
89
  metadata: Dict[str, str] | NotGiven = NOT_GIVEN,
238
90
  payment_link: Optional[bool] | NotGiven = NOT_GIVEN,
@@ -450,156 +302,7 @@ class AsyncPaymentsResource(AsyncAPIResource):
450
302
  ]
451
303
  ]
452
304
  | NotGiven = NOT_GIVEN,
453
- billing_currency: Optional[
454
- Literal[
455
- "AED",
456
- "ALL",
457
- "AMD",
458
- "ANG",
459
- "AOA",
460
- "ARS",
461
- "AUD",
462
- "AWG",
463
- "AZN",
464
- "BAM",
465
- "BBD",
466
- "BDT",
467
- "BGN",
468
- "BHD",
469
- "BIF",
470
- "BMD",
471
- "BND",
472
- "BOB",
473
- "BRL",
474
- "BSD",
475
- "BWP",
476
- "BYN",
477
- "BZD",
478
- "CAD",
479
- "CHF",
480
- "CLP",
481
- "CNY",
482
- "COP",
483
- "CRC",
484
- "CUP",
485
- "CVE",
486
- "CZK",
487
- "DJF",
488
- "DKK",
489
- "DOP",
490
- "DZD",
491
- "EGP",
492
- "ETB",
493
- "EUR",
494
- "FJD",
495
- "FKP",
496
- "GBP",
497
- "GEL",
498
- "GHS",
499
- "GIP",
500
- "GMD",
501
- "GNF",
502
- "GTQ",
503
- "GYD",
504
- "HKD",
505
- "HNL",
506
- "HRK",
507
- "HTG",
508
- "HUF",
509
- "IDR",
510
- "ILS",
511
- "INR",
512
- "IQD",
513
- "JMD",
514
- "JOD",
515
- "JPY",
516
- "KES",
517
- "KGS",
518
- "KHR",
519
- "KMF",
520
- "KRW",
521
- "KWD",
522
- "KYD",
523
- "KZT",
524
- "LAK",
525
- "LBP",
526
- "LKR",
527
- "LRD",
528
- "LSL",
529
- "LYD",
530
- "MAD",
531
- "MDL",
532
- "MGA",
533
- "MKD",
534
- "MMK",
535
- "MNT",
536
- "MOP",
537
- "MRU",
538
- "MUR",
539
- "MVR",
540
- "MWK",
541
- "MXN",
542
- "MYR",
543
- "MZN",
544
- "NAD",
545
- "NGN",
546
- "NIO",
547
- "NOK",
548
- "NPR",
549
- "NZD",
550
- "OMR",
551
- "PAB",
552
- "PEN",
553
- "PGK",
554
- "PHP",
555
- "PKR",
556
- "PLN",
557
- "PYG",
558
- "QAR",
559
- "RON",
560
- "RSD",
561
- "RUB",
562
- "RWF",
563
- "SAR",
564
- "SBD",
565
- "SCR",
566
- "SEK",
567
- "SGD",
568
- "SHP",
569
- "SLE",
570
- "SLL",
571
- "SOS",
572
- "SRD",
573
- "SSP",
574
- "STN",
575
- "SVC",
576
- "SZL",
577
- "THB",
578
- "TND",
579
- "TOP",
580
- "TRY",
581
- "TTD",
582
- "TWD",
583
- "TZS",
584
- "UAH",
585
- "UGX",
586
- "USD",
587
- "UYU",
588
- "UZS",
589
- "VES",
590
- "VND",
591
- "VUV",
592
- "WST",
593
- "XAF",
594
- "XCD",
595
- "XOF",
596
- "XPF",
597
- "YER",
598
- "ZAR",
599
- "ZMW",
600
- ]
601
- ]
602
- | NotGiven = NOT_GIVEN,
305
+ billing_currency: Optional[Currency] | NotGiven = NOT_GIVEN,
603
306
  discount_code: Optional[str] | NotGiven = NOT_GIVEN,
604
307
  metadata: Dict[str, str] | NotGiven = NOT_GIVEN,
605
308
  payment_link: Optional[bool] | NotGiven = NOT_GIVEN,
@@ -3,7 +3,6 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  from typing import List, Optional
6
- from typing_extensions import Literal
7
6
 
8
7
  import httpx
9
8
 
@@ -15,7 +14,12 @@ from .images import (
15
14
  ImagesResourceWithStreamingResponse,
16
15
  AsyncImagesResourceWithStreamingResponse,
17
16
  )
18
- from ...types import product_list_params, product_create_params, product_update_params
17
+ from ...types import (
18
+ TaxCategory,
19
+ product_list_params,
20
+ product_create_params,
21
+ product_update_params,
22
+ )
19
23
  from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
20
24
  from ..._utils import maybe_transform, async_maybe_transform
21
25
  from ..._compat import cached_property
@@ -30,6 +34,7 @@ from ...pagination import SyncDefaultPageNumberPagination, AsyncDefaultPageNumbe
30
34
  from ..._base_client import AsyncPaginator, make_request_options
31
35
  from ...types.product import Product
32
36
  from ...types.price_param import PriceParam
37
+ from ...types.tax_category import TaxCategory
33
38
  from ...types.product_list_response import ProductListResponse
34
39
  from ...types.license_key_duration_param import LicenseKeyDurationParam
35
40
 
@@ -64,7 +69,7 @@ class ProductsResource(SyncAPIResource):
64
69
  self,
65
70
  *,
66
71
  price: PriceParam,
67
- tax_category: Literal["digital_products", "saas", "e_book", "edtech"],
72
+ tax_category: TaxCategory,
68
73
  addons: Optional[List[str]] | NotGiven = NOT_GIVEN,
69
74
  description: Optional[str] | NotGiven = NOT_GIVEN,
70
75
  license_key_activation_message: Optional[str] | NotGiven = NOT_GIVEN,
@@ -170,7 +175,7 @@ class ProductsResource(SyncAPIResource):
170
175
  license_key_enabled: Optional[bool] | NotGiven = NOT_GIVEN,
171
176
  name: Optional[str] | NotGiven = NOT_GIVEN,
172
177
  price: Optional[PriceParam] | NotGiven = NOT_GIVEN,
173
- tax_category: Optional[Literal["digital_products", "saas", "e_book", "edtech"]] | NotGiven = NOT_GIVEN,
178
+ tax_category: Optional[TaxCategory] | NotGiven = NOT_GIVEN,
174
179
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
175
180
  # The extra values given here take precedence over values defined on the client or passed to this method.
176
181
  extra_headers: Headers | None = None,
@@ -391,7 +396,7 @@ class AsyncProductsResource(AsyncAPIResource):
391
396
  self,
392
397
  *,
393
398
  price: PriceParam,
394
- tax_category: Literal["digital_products", "saas", "e_book", "edtech"],
399
+ tax_category: TaxCategory,
395
400
  addons: Optional[List[str]] | NotGiven = NOT_GIVEN,
396
401
  description: Optional[str] | NotGiven = NOT_GIVEN,
397
402
  license_key_activation_message: Optional[str] | NotGiven = NOT_GIVEN,
@@ -497,7 +502,7 @@ class AsyncProductsResource(AsyncAPIResource):
497
502
  license_key_enabled: Optional[bool] | NotGiven = NOT_GIVEN,
498
503
  name: Optional[str] | NotGiven = NOT_GIVEN,
499
504
  price: Optional[PriceParam] | NotGiven = NOT_GIVEN,
500
- tax_category: Optional[Literal["digital_products", "saas", "e_book", "edtech"]] | NotGiven = NOT_GIVEN,
505
+ tax_category: Optional[TaxCategory] | NotGiven = NOT_GIVEN,
501
506
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
502
507
  # The extra values given here take precedence over values defined on the client or passed to this method.
503
508
  extra_headers: Headers | None = None,