dodopayments 1.49.0__py3-none-any.whl → 1.51.1__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 +15 -11
  2. dodopayments/_models.py +1 -1
  3. dodopayments/_types.py +35 -1
  4. dodopayments/_utils/__init__.py +1 -0
  5. dodopayments/_utils/_typing.py +5 -0
  6. dodopayments/_version.py +1 -1
  7. dodopayments/resources/__init__.py +13 -13
  8. dodopayments/resources/checkout_sessions.py +272 -0
  9. dodopayments/resources/subscriptions.py +7 -2
  10. dodopayments/resources/webhooks/webhooks.py +19 -22
  11. dodopayments/types/__init__.py +4 -13
  12. dodopayments/types/checkout_session_create_params.py +174 -0
  13. dodopayments/types/checkout_session_response.py +13 -0
  14. dodopayments/types/on_demand_subscription_param.py +44 -0
  15. dodopayments/types/subscription.py +3 -0
  16. dodopayments/types/subscription_create_params.py +3 -36
  17. dodopayments/types/subscription_update_params.py +1 -0
  18. dodopayments/types/{webhook_list_response.py → webhook_details.py} +2 -2
  19. {dodopayments-1.49.0.dist-info → dodopayments-1.51.1.dist-info}/METADATA +17 -90
  20. {dodopayments-1.49.0.dist-info → dodopayments-1.51.1.dist-info}/RECORD +22 -31
  21. dodopayments/resources/your_webhook_url.py +0 -224
  22. dodopayments/types/addon_cart_response_item_param.py +0 -13
  23. dodopayments/types/customer_limited_details_param.py +0 -18
  24. dodopayments/types/dispute_param.py +0 -45
  25. dodopayments/types/get_dispute_param.py +0 -52
  26. dodopayments/types/license_key_param.py +0 -53
  27. dodopayments/types/payment_param.py +0 -131
  28. dodopayments/types/refund_param.py +0 -42
  29. dodopayments/types/subscription_param.py +0 -97
  30. dodopayments/types/webhook_create_response.py +0 -42
  31. dodopayments/types/webhook_retrieve_response.py +0 -42
  32. dodopayments/types/webhook_update_response.py +0 -42
  33. dodopayments/types/your_webhook_url_create_params.py +0 -66
  34. {dodopayments-1.49.0.dist-info → dodopayments-1.51.1.dist-info}/WHEEL +0 -0
  35. {dodopayments-1.49.0.dist-info → dodopayments-1.51.1.dist-info}/licenses/LICENSE +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: dodopayments
3
- Version: 1.49.0
3
+ Version: 1.51.1
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
@@ -69,15 +69,7 @@ client = DodoPayments(
69
69
  environment="test_mode",
70
70
  )
71
71
 
72
- payment = client.payments.create(
73
- billing={
74
- "city": "city",
75
- "country": "AF",
76
- "state": "state",
77
- "street": "street",
78
- "zipcode": "zipcode",
79
- },
80
- customer={"customer_id": "customer_id"},
72
+ checkout_session_response = client.checkout_sessions.create(
81
73
  product_cart=[
82
74
  {
83
75
  "product_id": "product_id",
@@ -85,7 +77,7 @@ payment = client.payments.create(
85
77
  }
86
78
  ],
87
79
  )
88
- print(payment.payment_id)
80
+ print(checkout_session_response.session_id)
89
81
  ```
90
82
 
91
83
  While you can provide a `bearer_token` keyword argument,
@@ -110,15 +102,7 @@ client = AsyncDodoPayments(
110
102
 
111
103
 
112
104
  async def main() -> None:
113
- payment = await client.payments.create(
114
- billing={
115
- "city": "city",
116
- "country": "AF",
117
- "state": "state",
118
- "street": "street",
119
- "zipcode": "zipcode",
120
- },
121
- customer={"customer_id": "customer_id"},
105
+ checkout_session_response = await client.checkout_sessions.create(
122
106
  product_cart=[
123
107
  {
124
108
  "product_id": "product_id",
@@ -126,7 +110,7 @@ async def main() -> None:
126
110
  }
127
111
  ],
128
112
  )
129
- print(payment.payment_id)
113
+ print(checkout_session_response.session_id)
130
114
 
131
115
 
132
116
  asyncio.run(main())
@@ -158,15 +142,7 @@ async def main() -> None:
158
142
  bearer_token="My Bearer Token",
159
143
  http_client=DefaultAioHttpClient(),
160
144
  ) as client:
161
- payment = await client.payments.create(
162
- billing={
163
- "city": "city",
164
- "country": "AF",
165
- "state": "state",
166
- "street": "street",
167
- "zipcode": "zipcode",
168
- },
169
- customer={"customer_id": "customer_id"},
145
+ checkout_session_response = await client.checkout_sessions.create(
170
146
  product_cart=[
171
147
  {
172
148
  "product_id": "product_id",
@@ -174,7 +150,7 @@ async def main() -> None:
174
150
  }
175
151
  ],
176
152
  )
177
- print(payment.payment_id)
153
+ print(checkout_session_response.session_id)
178
154
 
179
155
 
180
156
  asyncio.run(main())
@@ -259,23 +235,16 @@ from dodopayments import DodoPayments
259
235
 
260
236
  client = DodoPayments()
261
237
 
262
- payment = client.payments.create(
263
- billing={
264
- "city": "city",
265
- "country": "AF",
266
- "state": "state",
267
- "street": "street",
268
- "zipcode": "zipcode",
269
- },
270
- customer={"customer_id": "customer_id"},
238
+ checkout_session_response = client.checkout_sessions.create(
271
239
  product_cart=[
272
240
  {
273
241
  "product_id": "product_id",
274
242
  "quantity": 0,
275
243
  }
276
244
  ],
245
+ billing_address={"country": "AF"},
277
246
  )
278
- print(payment.billing)
247
+ print(checkout_session_response.billing_address)
279
248
  ```
280
249
 
281
250
  ## Handling errors
@@ -294,15 +263,7 @@ from dodopayments import DodoPayments
294
263
  client = DodoPayments()
295
264
 
296
265
  try:
297
- client.payments.create(
298
- billing={
299
- "city": "city",
300
- "country": "AF",
301
- "state": "state",
302
- "street": "street",
303
- "zipcode": "zipcode",
304
- },
305
- customer={"customer_id": "customer_id"},
266
+ client.checkout_sessions.create(
306
267
  product_cart=[
307
268
  {
308
269
  "product_id": "product_id",
@@ -352,15 +313,7 @@ client = DodoPayments(
352
313
  )
353
314
 
354
315
  # Or, configure per-request:
355
- client.with_options(max_retries=5).payments.create(
356
- billing={
357
- "city": "city",
358
- "country": "AF",
359
- "state": "state",
360
- "street": "street",
361
- "zipcode": "zipcode",
362
- },
363
- customer={"customer_id": "customer_id"},
316
+ client.with_options(max_retries=5).checkout_sessions.create(
364
317
  product_cart=[
365
318
  {
366
319
  "product_id": "product_id",
@@ -390,15 +343,7 @@ client = DodoPayments(
390
343
  )
391
344
 
392
345
  # Override per-request:
393
- client.with_options(timeout=5.0).payments.create(
394
- billing={
395
- "city": "city",
396
- "country": "AF",
397
- "state": "state",
398
- "street": "street",
399
- "zipcode": "zipcode",
400
- },
401
- customer={"customer_id": "customer_id"},
346
+ client.with_options(timeout=5.0).checkout_sessions.create(
402
347
  product_cart=[
403
348
  {
404
349
  "product_id": "product_id",
@@ -446,17 +391,7 @@ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to
446
391
  from dodopayments import DodoPayments
447
392
 
448
393
  client = DodoPayments()
449
- response = client.payments.with_raw_response.create(
450
- billing={
451
- "city": "city",
452
- "country": "AF",
453
- "state": "state",
454
- "street": "street",
455
- "zipcode": "zipcode",
456
- },
457
- customer={
458
- "customer_id": "customer_id"
459
- },
394
+ response = client.checkout_sessions.with_raw_response.create(
460
395
  product_cart=[{
461
396
  "product_id": "product_id",
462
397
  "quantity": 0,
@@ -464,8 +399,8 @@ response = client.payments.with_raw_response.create(
464
399
  )
465
400
  print(response.headers.get('X-My-Header'))
466
401
 
467
- payment = response.parse() # get the object that `payments.create()` would have returned
468
- print(payment.payment_id)
402
+ checkout_session = response.parse() # get the object that `checkout_sessions.create()` would have returned
403
+ print(checkout_session.session_id)
469
404
  ```
470
405
 
471
406
  These methods return an [`APIResponse`](https://github.com/dodopayments/dodopayments-python/tree/main/src/dodopayments/_response.py) object.
@@ -479,15 +414,7 @@ The above interface eagerly reads the full response body when you make the reque
479
414
  To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.
480
415
 
481
416
  ```python
482
- with client.payments.with_streaming_response.create(
483
- billing={
484
- "city": "city",
485
- "country": "AF",
486
- "state": "state",
487
- "street": "street",
488
- "zipcode": "zipcode",
489
- },
490
- customer={"customer_id": "customer_id"},
417
+ with client.checkout_sessions.with_streaming_response.create(
491
418
  product_cart=[
492
419
  {
493
420
  "product_id": "product_id",
@@ -1,20 +1,20 @@
1
1
  dodopayments/__init__.py,sha256=jLgJiqM7q7-wstUdqp2RuuWVjLPGor5q-vw3liQR5lw,2711
2
2
  dodopayments/_base_client.py,sha256=rrB4T5TSjt2gzNFQiYNF8NTvmeyE0S3sn7ZyCL6kf2A,67041
3
- dodopayments/_client.py,sha256=erQ_FT-ixhFBfZWLU-AgrjQSaw2yi4fv3NgltRr2RmY,28041
3
+ dodopayments/_client.py,sha256=0nvb_QZD-LlL0iorV8NpyOoN9neiZvK1EFlI840LIMU,28122
4
4
  dodopayments/_compat.py,sha256=VWemUKbj6DDkQ-O4baSpHVLJafotzeXmCQGJugfVTIw,6580
5
5
  dodopayments/_constants.py,sha256=S14PFzyN9-I31wiV7SmIlL5Ga0MLHxdvegInGdXH7tM,462
6
6
  dodopayments/_exceptions.py,sha256=NgI0bxilB8xXOfjBWCzr-Y7t1aIJGMqCQRXvSyy29cM,3232
7
7
  dodopayments/_files.py,sha256=KnEzGi_O756MvKyJ4fOCW_u3JhOeWPQ4RsmDvqihDQU,3545
8
- dodopayments/_models.py,sha256=KvjsMfb88XZlFUKVoOxr8OyDj47MhoH2OKqWNEbBhk4,30010
8
+ dodopayments/_models.py,sha256=6rDtUmk6jhjGN1q96CUICYfBunNXNhhEk_AqztTm3uE,30012
9
9
  dodopayments/_qs.py,sha256=AOkSz4rHtK4YI3ZU_kzea-zpwBUgEY8WniGmTPyEimc,4846
10
10
  dodopayments/_resource.py,sha256=Jfh17Q3kKzAhO-dlfIwYlueN9t1edaaY_vmnC9vErpA,1136
11
11
  dodopayments/_response.py,sha256=PDvrSN3E3IkXVw2GvyOCTNB8ch0Xn9yaWQz4w1nHZEQ,28854
12
12
  dodopayments/_streaming.py,sha256=U4D6MhotaUaGaHz32lBt0XM98IOPIpPbKHUfbb0HGCk,10124
13
- dodopayments/_types.py,sha256=gP0yR7AIegimhmZ6rYIjSHFCr9YWzvh-jZabbVcgtio,6203
14
- dodopayments/_version.py,sha256=DWNw6JaeK-GclOLIIWPoNOxiVjR6YpGzabwlm1yXMAs,165
13
+ dodopayments/_types.py,sha256=Zlx9hG-LsblNWuAFs7_Ux5a-S4w5jIB87yirH9z30nE,7302
14
+ dodopayments/_version.py,sha256=6RneBy63A63CO5GHgJ_sOSeTPftBiDrANed_tnAwsHA,165
15
15
  dodopayments/pagination.py,sha256=gaS62u_b_92OYnUHmstLAFL5AF2_cr3Z6VpzSHd0mMw,2796
16
16
  dodopayments/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
- dodopayments/_utils/__init__.py,sha256=PNZ_QJuzZEgyYXqkO1HVhGkj5IU9bglVUcw7H-Knjzw,2062
17
+ dodopayments/_utils/__init__.py,sha256=QMTNChOzCs5KF_NTxyb5XpFyyfmHiQASrFovz3dHmK8,2104
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
@@ -22,12 +22,13 @@ dodopayments/_utils/_resources_proxy.py,sha256=UYxKVIu0_C8NeRj7yoow0JN6MkxeIlOC0
22
22
  dodopayments/_utils/_streams.py,sha256=SMC90diFFecpEg_zgDRVbdR3hSEIgVVij4taD-noMLM,289
23
23
  dodopayments/_utils/_sync.py,sha256=TpGLrrhRNWTJtODNE6Fup3_k7zrWm1j2RlirzBwre-0,2862
24
24
  dodopayments/_utils/_transform.py,sha256=n7kskEWz6o__aoNvhFoGVyDoalNe6mJwp-g7BWkdj88,15617
25
- dodopayments/_utils/_typing.py,sha256=D0DbbNu8GnYQTSICnTSHDGsYXj8TcAKyhejb0XcnjtY,4602
25
+ dodopayments/_utils/_typing.py,sha256=UAoN7JEd8A-T32Cju-dL5EyqWKO_ktG4VDQ3KOhzqG0,4787
26
26
  dodopayments/_utils/_utils.py,sha256=ts4CiiuNpFiGB6YMdkQRh2SZvYvsl7mAF-JWHCcLDf4,12312
27
27
  dodopayments/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
28
- dodopayments/resources/__init__.py,sha256=WO5lWjB6vsb22ZLGT-nDsUL2Zxf8M3NA0bg_3q3yDHg,8420
28
+ dodopayments/resources/__init__.py,sha256=2aH7abToE2YrdKAuS8v4gTDNrosvbkfRy_FFh7jG7R4,8445
29
29
  dodopayments/resources/addons.py,sha256=apKpyfdtajQNxSKUnj-tkFB-6Xgj7kMnpQ8q_1LbcB4,21902
30
30
  dodopayments/resources/brands.py,sha256=EH0Meg4duOJO9ZSvzv4IxBazA7OrdS6_gdOOJkQMSGo,18786
31
+ dodopayments/resources/checkout_sessions.py,sha256=6q2E8mZihlMoxDIBE6g1VW1rPzQ5e9ih42xES358iII,12351
31
32
  dodopayments/resources/discounts.py,sha256=NwcjxzVXR1rlxfeevg8MGxpPBseqfULw3PgHtICJuWc,26690
32
33
  dodopayments/resources/disputes.py,sha256=pnRGAyvRvQdXntqq8PTnCxpaFjKRkukbq7CzlRkG-kg,12263
33
34
  dodopayments/resources/license_key_instances.py,sha256=oCgJ-D6JVP_Fte_IjRHnykqhAynN6rDJphrkg6hyxjE,14082
@@ -37,8 +38,7 @@ dodopayments/resources/misc.py,sha256=BRPUna3lLIrJ-gMGOOQL1-xYx_oMwVDzKL4d498C7p
37
38
  dodopayments/resources/payments.py,sha256=8VNZCDvtjjUyj_yETzF-nx19gqWzfca9Za5zb2dwfMA,24533
38
39
  dodopayments/resources/payouts.py,sha256=llIbNwI3vQZYf2HsgYL5Irfl6BBoQc1g4aLPWwY09Uo,6926
39
40
  dodopayments/resources/refunds.py,sha256=BS9PcxZhEmBZveZTRo4__WmgVwKpqEEHQDp7tuMh7tQ,15045
40
- dodopayments/resources/subscriptions.py,sha256=JpSoD_zAMUZrFk8aK7ejzFoLOBOtdwT8ol2WU8H16c0,38702
41
- dodopayments/resources/your_webhook_url.py,sha256=dQ4wO8B_Ioxn-cm_Rlq7y56qqfmptbKpG6D9ZivI7RQ,8540
41
+ dodopayments/resources/subscriptions.py,sha256=zUqZ2vnUsdfX1rS8f7-KPUZEq7873ixk0SRN4cJ1vlw,38993
42
42
  dodopayments/resources/customers/__init__.py,sha256=RIP1WYqO_PIq9b57tDaJWf9zIRxG_iFeFkOVhe3apAo,1146
43
43
  dodopayments/resources/customers/customer_portal.py,sha256=f74AYBYOb0yIffh4jLmIB3igrcfaHnCS0oAbACmGlyA,6961
44
44
  dodopayments/resources/customers/customers.py,sha256=Z3HuZh3XiX7xUl_rNCO-Ia0uahy97QkUTTB_ue-Z1Cc,18337
@@ -50,10 +50,9 @@ dodopayments/resources/products/images.py,sha256=7pl2ZFMB3Y_ltwAOiyC0tif31tAXSf_
50
50
  dodopayments/resources/products/products.py,sha256=3GiRtx4HDWgzj5YVCPgZmvqwjZq3IBgw2eQWwnR55vw,39026
51
51
  dodopayments/resources/webhooks/__init__.py,sha256=qhsQMSm4GpXfesAwbvPOYkhytB3Ab_uW4Nqur7h1R8w,1041
52
52
  dodopayments/resources/webhooks/headers.py,sha256=wkTnIIfL2XjFcsXB4ceQVJtsty9uxuLVY_cRcaOZJ7M,9581
53
- dodopayments/resources/webhooks/webhooks.py,sha256=HFbUyZ3iPJnz086qZ-m3D506n2dfIVcPrcbgr9hT5_4,28377
54
- dodopayments/types/__init__.py,sha256=mU0jmT6Q4o_IFpK3bqSCTR0ViUcaqXRERl43o_9lRyw,8070
53
+ dodopayments/resources/webhooks/webhooks.py,sha256=jPtHWACFpTWBkMUqoYGYGrZiOHeTgLgOCg7-FaY73sw,28034
54
+ dodopayments/types/__init__.py,sha256=AADOTSlfKRwuhFwqsPAl4P5AWrmxO25fbfchpqJe7uI,7413
55
55
  dodopayments/types/addon_cart_response_item.py,sha256=R-I8Zd2HJKn0DmXmv6Oyu4oo-oEC1-dud0Q6_yqDB7k,235
56
- dodopayments/types/addon_cart_response_item_param.py,sha256=ZLoTI_zd-i6CTJ3lc_Eq-vaahalHshqgcpYdMS5lcpM,332
57
56
  dodopayments/types/addon_create_params.py,sha256=a1bKexuFdJcWUPzvPodeeTjqYvCyOwTdp8b2es2ygx8,695
58
57
  dodopayments/types/addon_list_params.py,sha256=Vwp_bhaf6F4E4Xe2N5YcuaOr9SdyIWK_w-KXB1JwKss,364
59
58
  dodopayments/types/addon_response.py,sha256=7EKoB8AwfGSPlnNEFrL8tZESJXPa5kZcfnNa04H4qXI,907
@@ -68,12 +67,13 @@ dodopayments/types/brand_create_params.py,sha256=13_JT-ln66wgbGLhFrWyzaM9-FG3-fP
68
67
  dodopayments/types/brand_list_response.py,sha256=UTjYrMm32TaMtVR61jWJMCi2-JKY0FHJjhctYOtzDNk,306
69
68
  dodopayments/types/brand_update_images_response.py,sha256=QEt_87f6YTRqgN1Wu0NL_zJ96jl6SeUSiBLh8Hpc0pw,350
70
69
  dodopayments/types/brand_update_params.py,sha256=S7qu2_IYkxxBbNuz5G12sujyW9gyte8cxw3jVsm1V4Y,468
70
+ dodopayments/types/checkout_session_create_params.py,sha256=tsMystYTuoVc_9jOIAqzwGos-dfGW5zG9FkBPxodwBE,4758
71
+ dodopayments/types/checkout_session_response.py,sha256=t8xfip5y2ghrOib7ttHnGZYhiby8-vx6diuTnULx98A,317
71
72
  dodopayments/types/country_code.py,sha256=aKc-CApHuQUg8xWGKxS2pnYvwUOz7G59qv4H7NOOHEo,2690
72
73
  dodopayments/types/currency.py,sha256=Cv-x2wYCXupjzRgWHgtepd3ANbB6DrygxJVVxLpjEJY,1789
73
74
  dodopayments/types/customer.py,sha256=gyxIAWVJyoUPvqKFMSZb2SE-gbgVw9Cf8FGVevPFKQs,371
74
75
  dodopayments/types/customer_create_params.py,sha256=jILY28OtoNMyd3OEJcWmRCNUDc8LN3jMvWxPtFwWx2c,374
75
76
  dodopayments/types/customer_limited_details.py,sha256=Q9o6uDLx2-XXMqLf5r_c4BMPJgOGeIXurK3od3d-Sgc,373
76
- dodopayments/types/customer_limited_details_param.py,sha256=iW69gofjJLNjsTvJitO2fvuzGn2uICgtNBxuMdFbyMw,480
77
77
  dodopayments/types/customer_list_params.py,sha256=hK4vh0wscovGF6w1Z595aYOmHrxGQTr1AshwsEwfs4o,421
78
78
  dodopayments/types/customer_portal_session.py,sha256=XwfDZMfoaiuVoJ4OmulTfLrfGurjgaCDiBKbUxA6Q08,212
79
79
  dodopayments/types/customer_request_param.py,sha256=dfhcbTX8Ujb0pVlYWJm0fbI8-tR1fKxyDogG9xl0WVs,434
@@ -86,11 +86,9 @@ dodopayments/types/discount_update_params.py,sha256=T1GZjxAoix8LzNwWt9xiUXqz2Fll
86
86
  dodopayments/types/dispute.py,sha256=RR8uLulYlDRgC4IWlhEIwVweTVnn5Swk_3hLwx2F9t0,1115
87
87
  dodopayments/types/dispute_list_params.py,sha256=px9NuKB4ABAV4jGWs_4dPkpfEToQUQpcEiLzWf4HDHA,1158
88
88
  dodopayments/types/dispute_list_response.py,sha256=-2iimail29OzhGJFXev4_yDlLifMl3zpiNO2nSo5NT8,1058
89
- dodopayments/types/dispute_param.py,sha256=cliKOs8RVqpCFluyKjCHyXO98zFM31uRrxoULqaw3lU,1372
90
89
  dodopayments/types/dispute_stage.py,sha256=OFaSeVXItONcrIoxGx37qccFVD_dvTeerPJ-d7pPwo8,244
91
90
  dodopayments/types/dispute_status.py,sha256=tBDzobNwCiCmlwT08Y8h3R-IuRPCn_M0IKEpQk-wPXA,363
92
91
  dodopayments/types/get_dispute.py,sha256=26tVlqDoddB27yrS4p1Ve5B1OOhdTCe8AYAcVeaOzUg,1332
93
- dodopayments/types/get_dispute_param.py,sha256=Afh4MfkZXg-ZwyIgEtk4CmPTydxsJ4SsmUh8tKM8OIg,1608
94
92
  dodopayments/types/intent_status.py,sha256=0aP3OxHiMfZDXQFOOXNbTSZz1vZkLjBFm3ryT0sT4Z8,483
95
93
  dodopayments/types/license_activate_params.py,sha256=LM3_sHiPdco8kuYlKXmSzXu9OyU9okrZW7Drl63GRZU,321
96
94
  dodopayments/types/license_deactivate_params.py,sha256=F6A7vZfdkCsfQi4ibECL3SFzwjjOyr8ZR_RrNRVsCMo,344
@@ -101,13 +99,13 @@ dodopayments/types/license_key_instance.py,sha256=lrXpgEMNoEZM6xVXe-QV2Tu609uEOP
101
99
  dodopayments/types/license_key_instance_list_params.py,sha256=jhvMFwGOJSgEmelw9Ss5SzCK5FbHkjLYNhgR_B-eAFc,508
102
100
  dodopayments/types/license_key_instance_update_params.py,sha256=oiwEpOTQsj7D5dAjYGlliL1UC3RUrck2WzRBwYaVRJE,307
103
101
  dodopayments/types/license_key_list_params.py,sha256=kDaFEXVw1PTL7pG8JJrZHmYC9CPMGvIKDR4ouLAQYDc,582
104
- dodopayments/types/license_key_param.py,sha256=WWG-UtkAN1A422inbBtpfWkvhl2upudLs3cmHMzRX7A,1809
105
102
  dodopayments/types/license_key_status.py,sha256=UlGOUTQM93ePW0xWxcOgeLQ_SAkjtav-Rg-QugaFfuo,240
106
103
  dodopayments/types/license_key_update_params.py,sha256=iLtkSyF7R4NdWUgX3aZnzO0XQPujVvLjLWLsULXTEug,1018
107
104
  dodopayments/types/license_validate_params.py,sha256=f_UWM6Jy9E4pdcjGLr7YtsAsHR1-6EXpw4zGzLZj1JQ,368
108
105
  dodopayments/types/license_validate_response.py,sha256=vlSrdtsVYmQcsJpPMI-ENCf_apLzhbS9Q6e4MG3ys1Q,218
109
106
  dodopayments/types/misc_list_supported_countries_response.py,sha256=Imr7f0CAjq04iikVbDSUvG1ZSYzB9Fopx8pVfVtt-zw,307
110
107
  dodopayments/types/new_customer_param.py,sha256=00L6Tg-VNzwbhTHZo010D34cRj9hZISdyCbLTpFUg7A,366
108
+ dodopayments/types/on_demand_subscription_param.py,sha256=of3bmiTDMGljy6No4k-MMSHW71t3n-CadOf3Ye-trFQ,1407
111
109
  dodopayments/types/one_time_product_cart_item.py,sha256=3l7J3KEE-SCXgArN25qKIXbIIu44Q2kxqd7jf73AGto,544
112
110
  dodopayments/types/one_time_product_cart_item_param.py,sha256=JydRYPBnLhON1pCQPRpQzKLaGJTSrDn1IRVCcMK8iAE,633
113
111
  dodopayments/types/payment.py,sha256=UNlKp_uXhFmQtL5_sMvOBgmvNsWz9IVViuzCo-YfA7o,3796
@@ -116,7 +114,6 @@ dodopayments/types/payment_create_response.py,sha256=Kx70m87jA_WlNtdkzGN8Arzjmfr
116
114
  dodopayments/types/payment_list_params.py,sha256=CH6z3MqKkQsoWzuSnsxxEj60HBrAsUKwQ_9iLm4uZJc,1283
117
115
  dodopayments/types/payment_list_response.py,sha256=I4X52FokitP_OzrR7qQSnIrswyIDOI8E1gu1h4vyDHA,784
118
116
  dodopayments/types/payment_method_types.py,sha256=_Kp6SGsquALvZ7WRboxDsTdFhJxtgQtlpOmBtp-bMfM,505
119
- dodopayments/types/payment_param.py,sha256=0MpdPXlHhTmZ8HFLhA1I4pS39FoFAwx-wh5JXbQMDEw,4172
120
117
  dodopayments/types/payment_retrieve_line_items_response.py,sha256=Cxfq-BNHw0AyoLzZ6-5JAcQLkHsKWHg0e0a3yBfzRXU,513
121
118
  dodopayments/types/payout_list_params.py,sha256=xI5mSD5hlbXTSWSw5pMeiMyyTamh4NzVGodmzPGOaK4,366
122
119
  dodopayments/types/payout_list_response.py,sha256=6SDDeP3J2OemGMujl-nsrvpt50evfP2FwX5nM32nAIg,1661
@@ -132,31 +129,25 @@ dodopayments/types/product_update_params.py,sha256=sApVoLbnoDkOaVZBlzvAa3TP2Xe2P
132
129
  dodopayments/types/refund.py,sha256=ySj9ERvneb2ya4hdcszIVvqWZaqQMUkuCJuBKoKeTBI,1064
133
130
  dodopayments/types/refund_create_params.py,sha256=hua-rUlW_5ZfKaPsh8O06yPgsj0gH7ru9Rw0Rb-3moQ,912
134
131
  dodopayments/types/refund_list_params.py,sha256=iz4MPgquP4K3AlYPV5_bbt5jHzGFT__RTpGjT4QXnPs,883
135
- dodopayments/types/refund_param.py,sha256=uS3psDUnkYf1Ir5CtlLK-2hpKPT-HVFGeGRkJEL9kuw,1287
136
132
  dodopayments/types/refund_status.py,sha256=ftnBnLvslfMYcUg8t7nEvb6-m5NWyVVnNcgyVu9eZto,243
137
- dodopayments/types/subscription.py,sha256=ogzqiK8ohoRLyWRcB3nqIJ8YqtTBJXimHZPamySAUJs,2884
133
+ dodopayments/types/subscription.py,sha256=Q0CVWJuoexFvCQKyuHJw3EcpQLx9_zWgw8c-l2hf-LM,2981
138
134
  dodopayments/types/subscription_change_plan_params.py,sha256=u04uGX3XYTPZSldZzc7fvhKeq_HFyQ3kkOkCugZo7TQ,866
139
135
  dodopayments/types/subscription_charge_params.py,sha256=b7KPBp8Jv5U0srxqi4AgJbrL1PWkZ6VhDObigAuph0M,1302
140
136
  dodopayments/types/subscription_charge_response.py,sha256=aDFuOKqqQ-_v1szx9oUT89QaeM3nvwrlAExzZhF0O-Q,228
141
- dodopayments/types/subscription_create_params.py,sha256=PJgyhH0WJmOqIcDdRZ14YBIWwxh05bkfit83BvlHnkg,3691
137
+ dodopayments/types/subscription_create_params.py,sha256=EaqP9FdQ_0z8mTdsGaS0M9xOCiDK80jMHAi4E6tcl4I,2648
142
138
  dodopayments/types/subscription_create_response.py,sha256=Equ-ycrO3A3mOVElW6BjoBH8sqc5wwKS8ED9fHvTza0,1372
143
139
  dodopayments/types/subscription_list_params.py,sha256=rh6yKzc_2T2R2P4ASk3L6wll-wC9bWa-wTLwFaz67WE,965
144
140
  dodopayments/types/subscription_list_response.py,sha256=CVNB4vhOLHMTsFndufVcIv58CfOyUDV6HjhSE3uAH8M,2750
145
- dodopayments/types/subscription_param.py,sha256=bPJOtuqOqpv8yJSy2Q10XNtK-MKHGnCr-HSjJjwZc9A,3474
146
141
  dodopayments/types/subscription_status.py,sha256=3UxvrPY4QVcppbeIV86qe6p2YUQK8sPVcxbqUJn4V8Y,277
147
- dodopayments/types/subscription_update_params.py,sha256=wyf1PalFSc7mZy3Ohz1wtJbp6H60OYGeVwQSMFaVCOs,1005
142
+ dodopayments/types/subscription_update_params.py,sha256=vjrcj7uv1XK8GWth1lZqgG809EsqKgYeS4llb-PHRY0,1093
148
143
  dodopayments/types/tax_category.py,sha256=Fwgm25IMhHaSziDOfqePSBKE4PczW_KFJq1yE1uSfpA,245
149
144
  dodopayments/types/time_interval.py,sha256=ZTA79GvVo5RjERLfRrY7ad6e0OqfeeoZuMnE1NShcio,231
150
145
  dodopayments/types/webhook_create_params.py,sha256=JsM7wcpIzfmLiFWG9rJ17SsdYFH5e8vXixU6VgDdpqI,974
151
- dodopayments/types/webhook_create_response.py,sha256=dH3jmco090stLBFmtiVSeruRb6tYnWWHfvxX_Rc_rqc,887
146
+ dodopayments/types/webhook_details.py,sha256=rnQ0JLG2Vm-AexrIdZkPcMHNnzdWXPoAA1ud2jX0tBc,873
152
147
  dodopayments/types/webhook_event_type.py,sha256=TzMHCyMXyxsGLLVyg7h9if4vth5Iaiw7EBijr1a-37k,740
153
148
  dodopayments/types/webhook_list_params.py,sha256=SCrBT0s4VDOQdRvqgL6P5YDhqd3njW5rQlqOAnu3r40,430
154
- dodopayments/types/webhook_list_response.py,sha256=3zppjO95dQpqTxlADqwSTF-URSsopsOMNeYxIbRolHQ,883
155
- dodopayments/types/webhook_retrieve_response.py,sha256=kZIwIwT_AjHWFVcDw2u0eZhdOPIXfodM0vADY4BpAlI,891
156
149
  dodopayments/types/webhook_retrieve_secret_response.py,sha256=kkjb6oJp9SerqAhJjscOq3basHMKP95q3nvz_c1oIW8,230
157
150
  dodopayments/types/webhook_update_params.py,sha256=Gv-1jteNEm58ZevionMCv7xCUUZUJ1cxTKV4M23oQIw,807
158
- dodopayments/types/webhook_update_response.py,sha256=K60qOiOHUe97ousH0cz497hzQINwxDub1sYm1GKpu0o,887
159
- dodopayments/types/your_webhook_url_create_params.py,sha256=vgtEfhPqFQBZ-aA31qLYpLkgH3bbhJLU5fjyTi6V0xc,1991
160
151
  dodopayments/types/customers/__init__.py,sha256=8UD_iRVrX_gB6Ji7SDLApLGewOlaEtmiYv6NynIQ120,223
161
152
  dodopayments/types/customers/customer_portal_create_params.py,sha256=QTRksHDHn8_3AmOpsscjWF1ZNvooLY05DZNbMmLbC2Y,329
162
153
  dodopayments/types/invoices/__init__.py,sha256=OKfJYcKb4NObdiRObqJV_dOyDQ8feXekDUge2o_4pXQ,122
@@ -166,7 +157,7 @@ dodopayments/types/products/image_update_response.py,sha256=TcJyXjoJlONpwwR6yZdI
166
157
  dodopayments/types/webhooks/__init__.py,sha256=F_ZpQalnBiuXt_C2pUepZjgJZwiAGKNwaEB03ZB6sUM,285
167
158
  dodopayments/types/webhooks/header_retrieve_response.py,sha256=IKNaI2xO9qU7UXbffENYrRo2vUr0mqb8TIkAQdtLtXI,369
168
159
  dodopayments/types/webhooks/header_update_params.py,sha256=USiXP4oFllTJgOBcBZQrcLlEzEOB6RHH9Ugdxatyy3g,376
169
- dodopayments-1.49.0.dist-info/METADATA,sha256=kxr8U-HHyrHZdCPfMZHFawwqyG4oxSa1L8ZR_LgTaNM,18832
170
- dodopayments-1.49.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
171
- dodopayments-1.49.0.dist-info/licenses/LICENSE,sha256=3_sqrBb5J3AT3FsjMKEOBRZhweWVsl_s_RjFlclm1vQ,11343
172
- dodopayments-1.49.0.dist-info/RECORD,,
160
+ dodopayments-1.51.1.dist-info/METADATA,sha256=osc8oPH4AN-uJICMfB7okrUJ5x--3fD0pVVE8ZWBgk8,17198
161
+ dodopayments-1.51.1.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
162
+ dodopayments-1.51.1.dist-info/licenses/LICENSE,sha256=3_sqrBb5J3AT3FsjMKEOBRZhweWVsl_s_RjFlclm1vQ,11343
163
+ dodopayments-1.51.1.dist-info/RECORD,,
@@ -1,224 +0,0 @@
1
- # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- from __future__ import annotations
4
-
5
- from typing import Union
6
- from datetime import datetime
7
-
8
- import httpx
9
-
10
- from ..types import WebhookEventType, your_webhook_url_create_params
11
- from .._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
12
- from .._utils import maybe_transform, async_maybe_transform
13
- from .._compat import cached_property
14
- from .._resource import SyncAPIResource, AsyncAPIResource
15
- from .._response import (
16
- to_raw_response_wrapper,
17
- to_streamed_response_wrapper,
18
- async_to_raw_response_wrapper,
19
- async_to_streamed_response_wrapper,
20
- )
21
- from .._base_client import make_request_options
22
- from ..types.webhook_event_type import WebhookEventType
23
-
24
- __all__ = ["YourWebhookURLResource", "AsyncYourWebhookURLResource"]
25
-
26
-
27
- class YourWebhookURLResource(SyncAPIResource):
28
- @cached_property
29
- def with_raw_response(self) -> YourWebhookURLResourceWithRawResponse:
30
- """
31
- This property can be used as a prefix for any HTTP method call to return
32
- the raw response object instead of the parsed content.
33
-
34
- For more information, see https://www.github.com/dodopayments/dodopayments-python#accessing-raw-response-data-eg-headers
35
- """
36
- return YourWebhookURLResourceWithRawResponse(self)
37
-
38
- @cached_property
39
- def with_streaming_response(self) -> YourWebhookURLResourceWithStreamingResponse:
40
- """
41
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
42
-
43
- For more information, see https://www.github.com/dodopayments/dodopayments-python#with_streaming_response
44
- """
45
- return YourWebhookURLResourceWithStreamingResponse(self)
46
-
47
- def create(
48
- self,
49
- *,
50
- business_id: str,
51
- data: Union[
52
- your_webhook_url_create_params.DataPayment,
53
- your_webhook_url_create_params.DataSubscription,
54
- your_webhook_url_create_params.DataRefund,
55
- your_webhook_url_create_params.DataDispute,
56
- your_webhook_url_create_params.DataLicenseKey,
57
- ],
58
- timestamp: Union[str, datetime],
59
- type: WebhookEventType,
60
- webhook_id: str,
61
- webhook_signature: str,
62
- webhook_timestamp: str,
63
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
64
- # The extra values given here take precedence over values defined on the client or passed to this method.
65
- extra_headers: Headers | None = None,
66
- extra_query: Query | None = None,
67
- extra_body: Body | None = None,
68
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
69
- ) -> None:
70
- """
71
- Args:
72
- data: The latest data at the time of delivery attempt
73
-
74
- timestamp: The timestamp of when the event occurred (not necessarily the same of when it
75
- was delivered)
76
-
77
- type: Event types for Dodo events
78
-
79
- extra_headers: Send extra headers
80
-
81
- extra_query: Add additional query parameters to the request
82
-
83
- extra_body: Add additional JSON properties to the request
84
-
85
- timeout: Override the client-level default timeout for this request, in seconds
86
- """
87
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
88
- extra_headers.update(
89
- {"webhook-id": webhook_id, "webhook-signature": webhook_signature, "webhook-timestamp": webhook_timestamp}
90
- )
91
- return self._post(
92
- "/your-webhook-url",
93
- body=maybe_transform(
94
- {
95
- "business_id": business_id,
96
- "data": data,
97
- "timestamp": timestamp,
98
- "type": type,
99
- },
100
- your_webhook_url_create_params.YourWebhookURLCreateParams,
101
- ),
102
- options=make_request_options(
103
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
104
- ),
105
- cast_to=NoneType,
106
- )
107
-
108
-
109
- class AsyncYourWebhookURLResource(AsyncAPIResource):
110
- @cached_property
111
- def with_raw_response(self) -> AsyncYourWebhookURLResourceWithRawResponse:
112
- """
113
- This property can be used as a prefix for any HTTP method call to return
114
- the raw response object instead of the parsed content.
115
-
116
- For more information, see https://www.github.com/dodopayments/dodopayments-python#accessing-raw-response-data-eg-headers
117
- """
118
- return AsyncYourWebhookURLResourceWithRawResponse(self)
119
-
120
- @cached_property
121
- def with_streaming_response(self) -> AsyncYourWebhookURLResourceWithStreamingResponse:
122
- """
123
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
124
-
125
- For more information, see https://www.github.com/dodopayments/dodopayments-python#with_streaming_response
126
- """
127
- return AsyncYourWebhookURLResourceWithStreamingResponse(self)
128
-
129
- async def create(
130
- self,
131
- *,
132
- business_id: str,
133
- data: Union[
134
- your_webhook_url_create_params.DataPayment,
135
- your_webhook_url_create_params.DataSubscription,
136
- your_webhook_url_create_params.DataRefund,
137
- your_webhook_url_create_params.DataDispute,
138
- your_webhook_url_create_params.DataLicenseKey,
139
- ],
140
- timestamp: Union[str, datetime],
141
- type: WebhookEventType,
142
- webhook_id: str,
143
- webhook_signature: str,
144
- webhook_timestamp: str,
145
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
146
- # The extra values given here take precedence over values defined on the client or passed to this method.
147
- extra_headers: Headers | None = None,
148
- extra_query: Query | None = None,
149
- extra_body: Body | None = None,
150
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
151
- ) -> None:
152
- """
153
- Args:
154
- data: The latest data at the time of delivery attempt
155
-
156
- timestamp: The timestamp of when the event occurred (not necessarily the same of when it
157
- was delivered)
158
-
159
- type: Event types for Dodo events
160
-
161
- extra_headers: Send extra headers
162
-
163
- extra_query: Add additional query parameters to the request
164
-
165
- extra_body: Add additional JSON properties to the request
166
-
167
- timeout: Override the client-level default timeout for this request, in seconds
168
- """
169
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
170
- extra_headers.update(
171
- {"webhook-id": webhook_id, "webhook-signature": webhook_signature, "webhook-timestamp": webhook_timestamp}
172
- )
173
- return await self._post(
174
- "/your-webhook-url",
175
- body=await async_maybe_transform(
176
- {
177
- "business_id": business_id,
178
- "data": data,
179
- "timestamp": timestamp,
180
- "type": type,
181
- },
182
- your_webhook_url_create_params.YourWebhookURLCreateParams,
183
- ),
184
- options=make_request_options(
185
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
186
- ),
187
- cast_to=NoneType,
188
- )
189
-
190
-
191
- class YourWebhookURLResourceWithRawResponse:
192
- def __init__(self, your_webhook_url: YourWebhookURLResource) -> None:
193
- self._your_webhook_url = your_webhook_url
194
-
195
- self.create = to_raw_response_wrapper(
196
- your_webhook_url.create,
197
- )
198
-
199
-
200
- class AsyncYourWebhookURLResourceWithRawResponse:
201
- def __init__(self, your_webhook_url: AsyncYourWebhookURLResource) -> None:
202
- self._your_webhook_url = your_webhook_url
203
-
204
- self.create = async_to_raw_response_wrapper(
205
- your_webhook_url.create,
206
- )
207
-
208
-
209
- class YourWebhookURLResourceWithStreamingResponse:
210
- def __init__(self, your_webhook_url: YourWebhookURLResource) -> None:
211
- self._your_webhook_url = your_webhook_url
212
-
213
- self.create = to_streamed_response_wrapper(
214
- your_webhook_url.create,
215
- )
216
-
217
-
218
- class AsyncYourWebhookURLResourceWithStreamingResponse:
219
- def __init__(self, your_webhook_url: AsyncYourWebhookURLResource) -> None:
220
- self._your_webhook_url = your_webhook_url
221
-
222
- self.create = async_to_streamed_response_wrapper(
223
- your_webhook_url.create,
224
- )
@@ -1,13 +0,0 @@
1
- # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- from __future__ import annotations
4
-
5
- from typing_extensions import Required, TypedDict
6
-
7
- __all__ = ["AddonCartResponseItemParam"]
8
-
9
-
10
- class AddonCartResponseItemParam(TypedDict, total=False):
11
- addon_id: Required[str]
12
-
13
- quantity: Required[int]
@@ -1,18 +0,0 @@
1
- # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- from __future__ import annotations
4
-
5
- from typing_extensions import Required, TypedDict
6
-
7
- __all__ = ["CustomerLimitedDetailsParam"]
8
-
9
-
10
- class CustomerLimitedDetailsParam(TypedDict, total=False):
11
- customer_id: Required[str]
12
- """Unique identifier for the customer"""
13
-
14
- email: Required[str]
15
- """Email address of the customer"""
16
-
17
- name: Required[str]
18
- """Full name of the customer"""