dodopayments 1.19.0__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 (35) 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 +20 -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 +3 -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 +7 -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/tax_category.py +7 -0
  32. {dodopayments-1.19.0.dist-info → dodopayments-1.20.0.dist-info}/METADATA +6 -6
  33. {dodopayments-1.19.0.dist-info → dodopayments-1.20.0.dist-info}/RECORD +35 -25
  34. {dodopayments-1.19.0.dist-info → dodopayments-1.20.0.dist-info}/WHEEL +0 -0
  35. {dodopayments-1.19.0.dist-info → dodopayments-1.20.0.dist-info}/licenses/LICENSE +0 -0
@@ -5,161 +5,14 @@ from __future__ import annotations
5
5
  from typing import Union, Optional
6
6
  from typing_extensions import Literal, Required, TypeAlias, TypedDict
7
7
 
8
+ from .currency import Currency
8
9
  from .time_interval import TimeInterval
9
10
 
10
11
  __all__ = ["PriceParam", "OneTimePrice", "RecurringPrice"]
11
12
 
12
13
 
13
14
  class OneTimePrice(TypedDict, total=False):
14
- currency: Required[
15
- Literal[
16
- "AED",
17
- "ALL",
18
- "AMD",
19
- "ANG",
20
- "AOA",
21
- "ARS",
22
- "AUD",
23
- "AWG",
24
- "AZN",
25
- "BAM",
26
- "BBD",
27
- "BDT",
28
- "BGN",
29
- "BHD",
30
- "BIF",
31
- "BMD",
32
- "BND",
33
- "BOB",
34
- "BRL",
35
- "BSD",
36
- "BWP",
37
- "BYN",
38
- "BZD",
39
- "CAD",
40
- "CHF",
41
- "CLP",
42
- "CNY",
43
- "COP",
44
- "CRC",
45
- "CUP",
46
- "CVE",
47
- "CZK",
48
- "DJF",
49
- "DKK",
50
- "DOP",
51
- "DZD",
52
- "EGP",
53
- "ETB",
54
- "EUR",
55
- "FJD",
56
- "FKP",
57
- "GBP",
58
- "GEL",
59
- "GHS",
60
- "GIP",
61
- "GMD",
62
- "GNF",
63
- "GTQ",
64
- "GYD",
65
- "HKD",
66
- "HNL",
67
- "HRK",
68
- "HTG",
69
- "HUF",
70
- "IDR",
71
- "ILS",
72
- "INR",
73
- "IQD",
74
- "JMD",
75
- "JOD",
76
- "JPY",
77
- "KES",
78
- "KGS",
79
- "KHR",
80
- "KMF",
81
- "KRW",
82
- "KWD",
83
- "KYD",
84
- "KZT",
85
- "LAK",
86
- "LBP",
87
- "LKR",
88
- "LRD",
89
- "LSL",
90
- "LYD",
91
- "MAD",
92
- "MDL",
93
- "MGA",
94
- "MKD",
95
- "MMK",
96
- "MNT",
97
- "MOP",
98
- "MRU",
99
- "MUR",
100
- "MVR",
101
- "MWK",
102
- "MXN",
103
- "MYR",
104
- "MZN",
105
- "NAD",
106
- "NGN",
107
- "NIO",
108
- "NOK",
109
- "NPR",
110
- "NZD",
111
- "OMR",
112
- "PAB",
113
- "PEN",
114
- "PGK",
115
- "PHP",
116
- "PKR",
117
- "PLN",
118
- "PYG",
119
- "QAR",
120
- "RON",
121
- "RSD",
122
- "RUB",
123
- "RWF",
124
- "SAR",
125
- "SBD",
126
- "SCR",
127
- "SEK",
128
- "SGD",
129
- "SHP",
130
- "SLE",
131
- "SLL",
132
- "SOS",
133
- "SRD",
134
- "SSP",
135
- "STN",
136
- "SVC",
137
- "SZL",
138
- "THB",
139
- "TND",
140
- "TOP",
141
- "TRY",
142
- "TTD",
143
- "TWD",
144
- "TZS",
145
- "UAH",
146
- "UGX",
147
- "USD",
148
- "UYU",
149
- "UZS",
150
- "VES",
151
- "VND",
152
- "VUV",
153
- "WST",
154
- "XAF",
155
- "XCD",
156
- "XOF",
157
- "XPF",
158
- "YER",
159
- "ZAR",
160
- "ZMW",
161
- ]
162
- ]
15
+ currency: Required[Currency]
163
16
 
164
17
  discount: Required[float]
165
18
  """Discount applied to the price, represented as a percentage (0 to 100)."""
@@ -199,155 +52,7 @@ class OneTimePrice(TypedDict, total=False):
199
52
 
200
53
 
201
54
  class RecurringPrice(TypedDict, total=False):
202
- currency: Required[
203
- Literal[
204
- "AED",
205
- "ALL",
206
- "AMD",
207
- "ANG",
208
- "AOA",
209
- "ARS",
210
- "AUD",
211
- "AWG",
212
- "AZN",
213
- "BAM",
214
- "BBD",
215
- "BDT",
216
- "BGN",
217
- "BHD",
218
- "BIF",
219
- "BMD",
220
- "BND",
221
- "BOB",
222
- "BRL",
223
- "BSD",
224
- "BWP",
225
- "BYN",
226
- "BZD",
227
- "CAD",
228
- "CHF",
229
- "CLP",
230
- "CNY",
231
- "COP",
232
- "CRC",
233
- "CUP",
234
- "CVE",
235
- "CZK",
236
- "DJF",
237
- "DKK",
238
- "DOP",
239
- "DZD",
240
- "EGP",
241
- "ETB",
242
- "EUR",
243
- "FJD",
244
- "FKP",
245
- "GBP",
246
- "GEL",
247
- "GHS",
248
- "GIP",
249
- "GMD",
250
- "GNF",
251
- "GTQ",
252
- "GYD",
253
- "HKD",
254
- "HNL",
255
- "HRK",
256
- "HTG",
257
- "HUF",
258
- "IDR",
259
- "ILS",
260
- "INR",
261
- "IQD",
262
- "JMD",
263
- "JOD",
264
- "JPY",
265
- "KES",
266
- "KGS",
267
- "KHR",
268
- "KMF",
269
- "KRW",
270
- "KWD",
271
- "KYD",
272
- "KZT",
273
- "LAK",
274
- "LBP",
275
- "LKR",
276
- "LRD",
277
- "LSL",
278
- "LYD",
279
- "MAD",
280
- "MDL",
281
- "MGA",
282
- "MKD",
283
- "MMK",
284
- "MNT",
285
- "MOP",
286
- "MRU",
287
- "MUR",
288
- "MVR",
289
- "MWK",
290
- "MXN",
291
- "MYR",
292
- "MZN",
293
- "NAD",
294
- "NGN",
295
- "NIO",
296
- "NOK",
297
- "NPR",
298
- "NZD",
299
- "OMR",
300
- "PAB",
301
- "PEN",
302
- "PGK",
303
- "PHP",
304
- "PKR",
305
- "PLN",
306
- "PYG",
307
- "QAR",
308
- "RON",
309
- "RSD",
310
- "RUB",
311
- "RWF",
312
- "SAR",
313
- "SBD",
314
- "SCR",
315
- "SEK",
316
- "SGD",
317
- "SHP",
318
- "SLE",
319
- "SLL",
320
- "SOS",
321
- "SRD",
322
- "SSP",
323
- "STN",
324
- "SVC",
325
- "SZL",
326
- "THB",
327
- "TND",
328
- "TOP",
329
- "TRY",
330
- "TTD",
331
- "TWD",
332
- "TZS",
333
- "UAH",
334
- "UGX",
335
- "USD",
336
- "UYU",
337
- "UZS",
338
- "VES",
339
- "VND",
340
- "VUV",
341
- "WST",
342
- "XAF",
343
- "XCD",
344
- "XOF",
345
- "XPF",
346
- "YER",
347
- "ZAR",
348
- "ZMW",
349
- ]
350
- ]
55
+ currency: Required[Currency]
351
56
 
352
57
  discount: Required[float]
353
58
  """Discount applied to the price, represented as a percentage (0 to 100)."""
@@ -2,10 +2,10 @@
2
2
 
3
3
  from typing import List, Optional
4
4
  from datetime import datetime
5
- from typing_extensions import Literal
6
5
 
7
6
  from .price import Price
8
7
  from .._models import BaseModel
8
+ from .tax_category import TaxCategory
9
9
  from .license_key_duration import LicenseKeyDuration
10
10
 
11
11
  __all__ = ["Product"]
@@ -29,7 +29,7 @@ class Product(BaseModel):
29
29
  product_id: str
30
30
  """Unique identifier for the product."""
31
31
 
32
- tax_category: Literal["digital_products", "saas", "e_book", "edtech"]
32
+ tax_category: TaxCategory
33
33
  """
34
34
  Represents the different categories of taxation applicable to various products
35
35
  and services.
@@ -3,9 +3,10 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  from typing import List, Optional
6
- from typing_extensions import Literal, Required, TypedDict
6
+ from typing_extensions import Required, TypedDict
7
7
 
8
8
  from .price_param import PriceParam
9
+ from .tax_category import TaxCategory
9
10
  from .license_key_duration_param import LicenseKeyDurationParam
10
11
 
11
12
  __all__ = ["ProductCreateParams"]
@@ -14,7 +15,7 @@ __all__ = ["ProductCreateParams"]
14
15
  class ProductCreateParams(TypedDict, total=False):
15
16
  price: Required[PriceParam]
16
17
 
17
- tax_category: Required[Literal["digital_products", "saas", "e_book", "edtech"]]
18
+ tax_category: Required[TaxCategory]
18
19
  """
19
20
  Represents the different categories of taxation applicable to various products
20
21
  and services.
@@ -2,10 +2,11 @@
2
2
 
3
3
  from typing import Optional
4
4
  from datetime import datetime
5
- from typing_extensions import Literal
6
5
 
7
6
  from .price import Price
8
7
  from .._models import BaseModel
8
+ from .currency import Currency
9
+ from .tax_category import TaxCategory
9
10
 
10
11
  __all__ = ["ProductListResponse"]
11
12
 
@@ -23,7 +24,7 @@ class ProductListResponse(BaseModel):
23
24
  product_id: str
24
25
  """Unique identifier for the product."""
25
26
 
26
- tax_category: Literal["digital_products", "saas", "e_book", "edtech"]
27
+ tax_category: TaxCategory
27
28
  """
28
29
  Represents the different categories of taxation applicable to various products
29
30
  and services.
@@ -32,155 +33,7 @@ class ProductListResponse(BaseModel):
32
33
  updated_at: datetime
33
34
  """Timestamp when the product was last updated."""
34
35
 
35
- currency: Optional[
36
- Literal[
37
- "AED",
38
- "ALL",
39
- "AMD",
40
- "ANG",
41
- "AOA",
42
- "ARS",
43
- "AUD",
44
- "AWG",
45
- "AZN",
46
- "BAM",
47
- "BBD",
48
- "BDT",
49
- "BGN",
50
- "BHD",
51
- "BIF",
52
- "BMD",
53
- "BND",
54
- "BOB",
55
- "BRL",
56
- "BSD",
57
- "BWP",
58
- "BYN",
59
- "BZD",
60
- "CAD",
61
- "CHF",
62
- "CLP",
63
- "CNY",
64
- "COP",
65
- "CRC",
66
- "CUP",
67
- "CVE",
68
- "CZK",
69
- "DJF",
70
- "DKK",
71
- "DOP",
72
- "DZD",
73
- "EGP",
74
- "ETB",
75
- "EUR",
76
- "FJD",
77
- "FKP",
78
- "GBP",
79
- "GEL",
80
- "GHS",
81
- "GIP",
82
- "GMD",
83
- "GNF",
84
- "GTQ",
85
- "GYD",
86
- "HKD",
87
- "HNL",
88
- "HRK",
89
- "HTG",
90
- "HUF",
91
- "IDR",
92
- "ILS",
93
- "INR",
94
- "IQD",
95
- "JMD",
96
- "JOD",
97
- "JPY",
98
- "KES",
99
- "KGS",
100
- "KHR",
101
- "KMF",
102
- "KRW",
103
- "KWD",
104
- "KYD",
105
- "KZT",
106
- "LAK",
107
- "LBP",
108
- "LKR",
109
- "LRD",
110
- "LSL",
111
- "LYD",
112
- "MAD",
113
- "MDL",
114
- "MGA",
115
- "MKD",
116
- "MMK",
117
- "MNT",
118
- "MOP",
119
- "MRU",
120
- "MUR",
121
- "MVR",
122
- "MWK",
123
- "MXN",
124
- "MYR",
125
- "MZN",
126
- "NAD",
127
- "NGN",
128
- "NIO",
129
- "NOK",
130
- "NPR",
131
- "NZD",
132
- "OMR",
133
- "PAB",
134
- "PEN",
135
- "PGK",
136
- "PHP",
137
- "PKR",
138
- "PLN",
139
- "PYG",
140
- "QAR",
141
- "RON",
142
- "RSD",
143
- "RUB",
144
- "RWF",
145
- "SAR",
146
- "SBD",
147
- "SCR",
148
- "SEK",
149
- "SGD",
150
- "SHP",
151
- "SLE",
152
- "SLL",
153
- "SOS",
154
- "SRD",
155
- "SSP",
156
- "STN",
157
- "SVC",
158
- "SZL",
159
- "THB",
160
- "TND",
161
- "TOP",
162
- "TRY",
163
- "TTD",
164
- "TWD",
165
- "TZS",
166
- "UAH",
167
- "UGX",
168
- "USD",
169
- "UYU",
170
- "UZS",
171
- "VES",
172
- "VND",
173
- "VUV",
174
- "WST",
175
- "XAF",
176
- "XCD",
177
- "XOF",
178
- "XPF",
179
- "YER",
180
- "ZAR",
181
- "ZMW",
182
- ]
183
- ] = None
36
+ currency: Optional[Currency] = None
184
37
 
185
38
  description: Optional[str] = None
186
39
  """Description of the product, optional."""
@@ -3,9 +3,10 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  from typing import List, Optional
6
- from typing_extensions import Literal, TypedDict
6
+ from typing_extensions import TypedDict
7
7
 
8
8
  from .price_param import PriceParam
9
+ from .tax_category import TaxCategory
9
10
  from .license_key_duration_param import LicenseKeyDurationParam
10
11
 
11
12
  __all__ = ["ProductUpdateParams"]
@@ -49,7 +50,7 @@ class ProductUpdateParams(TypedDict, total=False):
49
50
 
50
51
  price: Optional[PriceParam]
51
52
 
52
- tax_category: Optional[Literal["digital_products", "saas", "e_book", "edtech"]]
53
+ tax_category: Optional[TaxCategory]
53
54
  """
54
55
  Represents the different categories of taxation applicable to various products
55
56
  and services.