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.
- dodopayments/_client.py +33 -24
- dodopayments/_version.py +1 -1
- dodopayments/resources/__init__.py +14 -0
- dodopayments/resources/addons.py +589 -0
- dodopayments/resources/payments.py +4 -301
- dodopayments/resources/products/products.py +11 -6
- dodopayments/resources/subscriptions.py +24 -307
- dodopayments/types/__init__.py +9 -0
- dodopayments/types/addon_cart_response_item.py +11 -0
- dodopayments/types/addon_create_params.py +30 -0
- dodopayments/types/addon_list_params.py +16 -0
- dodopayments/types/addon_response.py +44 -0
- dodopayments/types/addon_update_images_response.py +11 -0
- dodopayments/types/addon_update_params.py +33 -0
- dodopayments/types/currency.py +153 -0
- dodopayments/types/payment.py +6 -295
- dodopayments/types/payment_create_params.py +2 -149
- dodopayments/types/payment_list_response.py +2 -148
- dodopayments/types/payout_list_response.py +2 -147
- dodopayments/types/price.py +3 -294
- dodopayments/types/price_param.py +3 -298
- dodopayments/types/product.py +2 -2
- dodopayments/types/product_create_params.py +3 -2
- dodopayments/types/product_list_response.py +4 -151
- dodopayments/types/product_update_params.py +3 -2
- dodopayments/types/refund.py +2 -150
- dodopayments/types/subscription.py +10 -149
- dodopayments/types/subscription_create_params.py +13 -151
- dodopayments/types/subscription_create_response.py +5 -1
- dodopayments/types/subscription_list_response.py +77 -0
- dodopayments/types/subscription_update_params.py +11 -3
- dodopayments/types/tax_category.py +7 -0
- {dodopayments-1.18.3.dist-info → dodopayments-1.20.0.dist-info}/METADATA +6 -6
- {dodopayments-1.18.3.dist-info → dodopayments-1.20.0.dist-info}/RECORD +36 -26
- {dodopayments-1.18.3.dist-info → dodopayments-1.20.0.dist-info}/WHEEL +0 -0
- {dodopayments-1.18.3.dist-info → dodopayments-1.20.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Dict, List, Union, Optional
|
|
5
|
+
from typing import Dict, List, Union, Iterable, Optional
|
|
6
6
|
from datetime import datetime
|
|
7
7
|
from typing_extensions import Literal
|
|
8
8
|
|
|
9
9
|
import httpx
|
|
10
10
|
|
|
11
11
|
from ..types import (
|
|
12
|
+
Currency,
|
|
12
13
|
SubscriptionStatus,
|
|
13
14
|
subscription_list_params,
|
|
14
15
|
subscription_charge_params,
|
|
@@ -28,10 +29,12 @@ from .._response import (
|
|
|
28
29
|
)
|
|
29
30
|
from ..pagination import SyncDefaultPageNumberPagination, AsyncDefaultPageNumberPagination
|
|
30
31
|
from .._base_client import AsyncPaginator, make_request_options
|
|
32
|
+
from ..types.currency import Currency
|
|
31
33
|
from ..types.subscription import Subscription
|
|
32
34
|
from ..types.subscription_status import SubscriptionStatus
|
|
33
35
|
from ..types.billing_address_param import BillingAddressParam
|
|
34
36
|
from ..types.customer_request_param import CustomerRequestParam
|
|
37
|
+
from ..types.subscription_list_response import SubscriptionListResponse
|
|
35
38
|
from ..types.subscription_charge_response import SubscriptionChargeResponse
|
|
36
39
|
from ..types.subscription_create_response import SubscriptionCreateResponse
|
|
37
40
|
|
|
@@ -65,6 +68,7 @@ class SubscriptionsResource(SyncAPIResource):
|
|
|
65
68
|
customer: CustomerRequestParam,
|
|
66
69
|
product_id: str,
|
|
67
70
|
quantity: int,
|
|
71
|
+
addons: Optional[Iterable[subscription_create_params.Addon]] | NotGiven = NOT_GIVEN,
|
|
68
72
|
allowed_payment_method_types: Optional[
|
|
69
73
|
List[
|
|
70
74
|
Literal[
|
|
@@ -90,156 +94,7 @@ class SubscriptionsResource(SyncAPIResource):
|
|
|
90
94
|
]
|
|
91
95
|
]
|
|
92
96
|
| NotGiven = NOT_GIVEN,
|
|
93
|
-
billing_currency: Optional[
|
|
94
|
-
Literal[
|
|
95
|
-
"AED",
|
|
96
|
-
"ALL",
|
|
97
|
-
"AMD",
|
|
98
|
-
"ANG",
|
|
99
|
-
"AOA",
|
|
100
|
-
"ARS",
|
|
101
|
-
"AUD",
|
|
102
|
-
"AWG",
|
|
103
|
-
"AZN",
|
|
104
|
-
"BAM",
|
|
105
|
-
"BBD",
|
|
106
|
-
"BDT",
|
|
107
|
-
"BGN",
|
|
108
|
-
"BHD",
|
|
109
|
-
"BIF",
|
|
110
|
-
"BMD",
|
|
111
|
-
"BND",
|
|
112
|
-
"BOB",
|
|
113
|
-
"BRL",
|
|
114
|
-
"BSD",
|
|
115
|
-
"BWP",
|
|
116
|
-
"BYN",
|
|
117
|
-
"BZD",
|
|
118
|
-
"CAD",
|
|
119
|
-
"CHF",
|
|
120
|
-
"CLP",
|
|
121
|
-
"CNY",
|
|
122
|
-
"COP",
|
|
123
|
-
"CRC",
|
|
124
|
-
"CUP",
|
|
125
|
-
"CVE",
|
|
126
|
-
"CZK",
|
|
127
|
-
"DJF",
|
|
128
|
-
"DKK",
|
|
129
|
-
"DOP",
|
|
130
|
-
"DZD",
|
|
131
|
-
"EGP",
|
|
132
|
-
"ETB",
|
|
133
|
-
"EUR",
|
|
134
|
-
"FJD",
|
|
135
|
-
"FKP",
|
|
136
|
-
"GBP",
|
|
137
|
-
"GEL",
|
|
138
|
-
"GHS",
|
|
139
|
-
"GIP",
|
|
140
|
-
"GMD",
|
|
141
|
-
"GNF",
|
|
142
|
-
"GTQ",
|
|
143
|
-
"GYD",
|
|
144
|
-
"HKD",
|
|
145
|
-
"HNL",
|
|
146
|
-
"HRK",
|
|
147
|
-
"HTG",
|
|
148
|
-
"HUF",
|
|
149
|
-
"IDR",
|
|
150
|
-
"ILS",
|
|
151
|
-
"INR",
|
|
152
|
-
"IQD",
|
|
153
|
-
"JMD",
|
|
154
|
-
"JOD",
|
|
155
|
-
"JPY",
|
|
156
|
-
"KES",
|
|
157
|
-
"KGS",
|
|
158
|
-
"KHR",
|
|
159
|
-
"KMF",
|
|
160
|
-
"KRW",
|
|
161
|
-
"KWD",
|
|
162
|
-
"KYD",
|
|
163
|
-
"KZT",
|
|
164
|
-
"LAK",
|
|
165
|
-
"LBP",
|
|
166
|
-
"LKR",
|
|
167
|
-
"LRD",
|
|
168
|
-
"LSL",
|
|
169
|
-
"LYD",
|
|
170
|
-
"MAD",
|
|
171
|
-
"MDL",
|
|
172
|
-
"MGA",
|
|
173
|
-
"MKD",
|
|
174
|
-
"MMK",
|
|
175
|
-
"MNT",
|
|
176
|
-
"MOP",
|
|
177
|
-
"MRU",
|
|
178
|
-
"MUR",
|
|
179
|
-
"MVR",
|
|
180
|
-
"MWK",
|
|
181
|
-
"MXN",
|
|
182
|
-
"MYR",
|
|
183
|
-
"MZN",
|
|
184
|
-
"NAD",
|
|
185
|
-
"NGN",
|
|
186
|
-
"NIO",
|
|
187
|
-
"NOK",
|
|
188
|
-
"NPR",
|
|
189
|
-
"NZD",
|
|
190
|
-
"OMR",
|
|
191
|
-
"PAB",
|
|
192
|
-
"PEN",
|
|
193
|
-
"PGK",
|
|
194
|
-
"PHP",
|
|
195
|
-
"PKR",
|
|
196
|
-
"PLN",
|
|
197
|
-
"PYG",
|
|
198
|
-
"QAR",
|
|
199
|
-
"RON",
|
|
200
|
-
"RSD",
|
|
201
|
-
"RUB",
|
|
202
|
-
"RWF",
|
|
203
|
-
"SAR",
|
|
204
|
-
"SBD",
|
|
205
|
-
"SCR",
|
|
206
|
-
"SEK",
|
|
207
|
-
"SGD",
|
|
208
|
-
"SHP",
|
|
209
|
-
"SLE",
|
|
210
|
-
"SLL",
|
|
211
|
-
"SOS",
|
|
212
|
-
"SRD",
|
|
213
|
-
"SSP",
|
|
214
|
-
"STN",
|
|
215
|
-
"SVC",
|
|
216
|
-
"SZL",
|
|
217
|
-
"THB",
|
|
218
|
-
"TND",
|
|
219
|
-
"TOP",
|
|
220
|
-
"TRY",
|
|
221
|
-
"TTD",
|
|
222
|
-
"TWD",
|
|
223
|
-
"TZS",
|
|
224
|
-
"UAH",
|
|
225
|
-
"UGX",
|
|
226
|
-
"USD",
|
|
227
|
-
"UYU",
|
|
228
|
-
"UZS",
|
|
229
|
-
"VES",
|
|
230
|
-
"VND",
|
|
231
|
-
"VUV",
|
|
232
|
-
"WST",
|
|
233
|
-
"XAF",
|
|
234
|
-
"XCD",
|
|
235
|
-
"XOF",
|
|
236
|
-
"XPF",
|
|
237
|
-
"YER",
|
|
238
|
-
"ZAR",
|
|
239
|
-
"ZMW",
|
|
240
|
-
]
|
|
241
|
-
]
|
|
242
|
-
| NotGiven = NOT_GIVEN,
|
|
97
|
+
billing_currency: Optional[Currency] | NotGiven = NOT_GIVEN,
|
|
243
98
|
discount_code: Optional[str] | NotGiven = NOT_GIVEN,
|
|
244
99
|
metadata: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
245
100
|
on_demand: Optional[subscription_create_params.OnDemand] | NotGiven = NOT_GIVEN,
|
|
@@ -261,6 +116,8 @@ class SubscriptionsResource(SyncAPIResource):
|
|
|
261
116
|
|
|
262
117
|
quantity: Number of units to subscribe for. Must be at least 1.
|
|
263
118
|
|
|
119
|
+
addons: Attach addons to this subscription
|
|
120
|
+
|
|
264
121
|
allowed_payment_method_types: List of payment methods allowed during checkout.
|
|
265
122
|
|
|
266
123
|
Customers will **never** see payment methods that are **not** in this list.
|
|
@@ -298,6 +155,7 @@ class SubscriptionsResource(SyncAPIResource):
|
|
|
298
155
|
"customer": customer,
|
|
299
156
|
"product_id": product_id,
|
|
300
157
|
"quantity": quantity,
|
|
158
|
+
"addons": addons,
|
|
301
159
|
"allowed_payment_method_types": allowed_payment_method_types,
|
|
302
160
|
"billing_currency": billing_currency,
|
|
303
161
|
"discount_code": discount_code,
|
|
@@ -353,6 +211,7 @@ class SubscriptionsResource(SyncAPIResource):
|
|
|
353
211
|
subscription_id: str,
|
|
354
212
|
*,
|
|
355
213
|
billing: Optional[BillingAddressParam] | NotGiven = NOT_GIVEN,
|
|
214
|
+
disable_on_demand: Optional[subscription_update_params.DisableOnDemand] | NotGiven = NOT_GIVEN,
|
|
356
215
|
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
|
|
357
216
|
status: Optional[SubscriptionStatus] | NotGiven = NOT_GIVEN,
|
|
358
217
|
tax_id: Optional[str] | NotGiven = NOT_GIVEN,
|
|
@@ -380,6 +239,7 @@ class SubscriptionsResource(SyncAPIResource):
|
|
|
380
239
|
body=maybe_transform(
|
|
381
240
|
{
|
|
382
241
|
"billing": billing,
|
|
242
|
+
"disable_on_demand": disable_on_demand,
|
|
383
243
|
"metadata": metadata,
|
|
384
244
|
"status": status,
|
|
385
245
|
"tax_id": tax_id,
|
|
@@ -407,7 +267,7 @@ class SubscriptionsResource(SyncAPIResource):
|
|
|
407
267
|
extra_query: Query | None = None,
|
|
408
268
|
extra_body: Body | None = None,
|
|
409
269
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
410
|
-
) -> SyncDefaultPageNumberPagination[
|
|
270
|
+
) -> SyncDefaultPageNumberPagination[SubscriptionListResponse]:
|
|
411
271
|
"""
|
|
412
272
|
Args:
|
|
413
273
|
created_at_gte: Get events after this created time
|
|
@@ -432,7 +292,7 @@ class SubscriptionsResource(SyncAPIResource):
|
|
|
432
292
|
"""
|
|
433
293
|
return self._get_api_list(
|
|
434
294
|
"/subscriptions",
|
|
435
|
-
page=SyncDefaultPageNumberPagination[
|
|
295
|
+
page=SyncDefaultPageNumberPagination[SubscriptionListResponse],
|
|
436
296
|
options=make_request_options(
|
|
437
297
|
extra_headers=extra_headers,
|
|
438
298
|
extra_query=extra_query,
|
|
@@ -450,7 +310,7 @@ class SubscriptionsResource(SyncAPIResource):
|
|
|
450
310
|
subscription_list_params.SubscriptionListParams,
|
|
451
311
|
),
|
|
452
312
|
),
|
|
453
|
-
model=
|
|
313
|
+
model=SubscriptionListResponse,
|
|
454
314
|
)
|
|
455
315
|
|
|
456
316
|
def change_plan(
|
|
@@ -565,6 +425,7 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
|
|
|
565
425
|
customer: CustomerRequestParam,
|
|
566
426
|
product_id: str,
|
|
567
427
|
quantity: int,
|
|
428
|
+
addons: Optional[Iterable[subscription_create_params.Addon]] | NotGiven = NOT_GIVEN,
|
|
568
429
|
allowed_payment_method_types: Optional[
|
|
569
430
|
List[
|
|
570
431
|
Literal[
|
|
@@ -590,156 +451,7 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
|
|
|
590
451
|
]
|
|
591
452
|
]
|
|
592
453
|
| NotGiven = NOT_GIVEN,
|
|
593
|
-
billing_currency: Optional[
|
|
594
|
-
Literal[
|
|
595
|
-
"AED",
|
|
596
|
-
"ALL",
|
|
597
|
-
"AMD",
|
|
598
|
-
"ANG",
|
|
599
|
-
"AOA",
|
|
600
|
-
"ARS",
|
|
601
|
-
"AUD",
|
|
602
|
-
"AWG",
|
|
603
|
-
"AZN",
|
|
604
|
-
"BAM",
|
|
605
|
-
"BBD",
|
|
606
|
-
"BDT",
|
|
607
|
-
"BGN",
|
|
608
|
-
"BHD",
|
|
609
|
-
"BIF",
|
|
610
|
-
"BMD",
|
|
611
|
-
"BND",
|
|
612
|
-
"BOB",
|
|
613
|
-
"BRL",
|
|
614
|
-
"BSD",
|
|
615
|
-
"BWP",
|
|
616
|
-
"BYN",
|
|
617
|
-
"BZD",
|
|
618
|
-
"CAD",
|
|
619
|
-
"CHF",
|
|
620
|
-
"CLP",
|
|
621
|
-
"CNY",
|
|
622
|
-
"COP",
|
|
623
|
-
"CRC",
|
|
624
|
-
"CUP",
|
|
625
|
-
"CVE",
|
|
626
|
-
"CZK",
|
|
627
|
-
"DJF",
|
|
628
|
-
"DKK",
|
|
629
|
-
"DOP",
|
|
630
|
-
"DZD",
|
|
631
|
-
"EGP",
|
|
632
|
-
"ETB",
|
|
633
|
-
"EUR",
|
|
634
|
-
"FJD",
|
|
635
|
-
"FKP",
|
|
636
|
-
"GBP",
|
|
637
|
-
"GEL",
|
|
638
|
-
"GHS",
|
|
639
|
-
"GIP",
|
|
640
|
-
"GMD",
|
|
641
|
-
"GNF",
|
|
642
|
-
"GTQ",
|
|
643
|
-
"GYD",
|
|
644
|
-
"HKD",
|
|
645
|
-
"HNL",
|
|
646
|
-
"HRK",
|
|
647
|
-
"HTG",
|
|
648
|
-
"HUF",
|
|
649
|
-
"IDR",
|
|
650
|
-
"ILS",
|
|
651
|
-
"INR",
|
|
652
|
-
"IQD",
|
|
653
|
-
"JMD",
|
|
654
|
-
"JOD",
|
|
655
|
-
"JPY",
|
|
656
|
-
"KES",
|
|
657
|
-
"KGS",
|
|
658
|
-
"KHR",
|
|
659
|
-
"KMF",
|
|
660
|
-
"KRW",
|
|
661
|
-
"KWD",
|
|
662
|
-
"KYD",
|
|
663
|
-
"KZT",
|
|
664
|
-
"LAK",
|
|
665
|
-
"LBP",
|
|
666
|
-
"LKR",
|
|
667
|
-
"LRD",
|
|
668
|
-
"LSL",
|
|
669
|
-
"LYD",
|
|
670
|
-
"MAD",
|
|
671
|
-
"MDL",
|
|
672
|
-
"MGA",
|
|
673
|
-
"MKD",
|
|
674
|
-
"MMK",
|
|
675
|
-
"MNT",
|
|
676
|
-
"MOP",
|
|
677
|
-
"MRU",
|
|
678
|
-
"MUR",
|
|
679
|
-
"MVR",
|
|
680
|
-
"MWK",
|
|
681
|
-
"MXN",
|
|
682
|
-
"MYR",
|
|
683
|
-
"MZN",
|
|
684
|
-
"NAD",
|
|
685
|
-
"NGN",
|
|
686
|
-
"NIO",
|
|
687
|
-
"NOK",
|
|
688
|
-
"NPR",
|
|
689
|
-
"NZD",
|
|
690
|
-
"OMR",
|
|
691
|
-
"PAB",
|
|
692
|
-
"PEN",
|
|
693
|
-
"PGK",
|
|
694
|
-
"PHP",
|
|
695
|
-
"PKR",
|
|
696
|
-
"PLN",
|
|
697
|
-
"PYG",
|
|
698
|
-
"QAR",
|
|
699
|
-
"RON",
|
|
700
|
-
"RSD",
|
|
701
|
-
"RUB",
|
|
702
|
-
"RWF",
|
|
703
|
-
"SAR",
|
|
704
|
-
"SBD",
|
|
705
|
-
"SCR",
|
|
706
|
-
"SEK",
|
|
707
|
-
"SGD",
|
|
708
|
-
"SHP",
|
|
709
|
-
"SLE",
|
|
710
|
-
"SLL",
|
|
711
|
-
"SOS",
|
|
712
|
-
"SRD",
|
|
713
|
-
"SSP",
|
|
714
|
-
"STN",
|
|
715
|
-
"SVC",
|
|
716
|
-
"SZL",
|
|
717
|
-
"THB",
|
|
718
|
-
"TND",
|
|
719
|
-
"TOP",
|
|
720
|
-
"TRY",
|
|
721
|
-
"TTD",
|
|
722
|
-
"TWD",
|
|
723
|
-
"TZS",
|
|
724
|
-
"UAH",
|
|
725
|
-
"UGX",
|
|
726
|
-
"USD",
|
|
727
|
-
"UYU",
|
|
728
|
-
"UZS",
|
|
729
|
-
"VES",
|
|
730
|
-
"VND",
|
|
731
|
-
"VUV",
|
|
732
|
-
"WST",
|
|
733
|
-
"XAF",
|
|
734
|
-
"XCD",
|
|
735
|
-
"XOF",
|
|
736
|
-
"XPF",
|
|
737
|
-
"YER",
|
|
738
|
-
"ZAR",
|
|
739
|
-
"ZMW",
|
|
740
|
-
]
|
|
741
|
-
]
|
|
742
|
-
| NotGiven = NOT_GIVEN,
|
|
454
|
+
billing_currency: Optional[Currency] | NotGiven = NOT_GIVEN,
|
|
743
455
|
discount_code: Optional[str] | NotGiven = NOT_GIVEN,
|
|
744
456
|
metadata: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
745
457
|
on_demand: Optional[subscription_create_params.OnDemand] | NotGiven = NOT_GIVEN,
|
|
@@ -761,6 +473,8 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
|
|
|
761
473
|
|
|
762
474
|
quantity: Number of units to subscribe for. Must be at least 1.
|
|
763
475
|
|
|
476
|
+
addons: Attach addons to this subscription
|
|
477
|
+
|
|
764
478
|
allowed_payment_method_types: List of payment methods allowed during checkout.
|
|
765
479
|
|
|
766
480
|
Customers will **never** see payment methods that are **not** in this list.
|
|
@@ -798,6 +512,7 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
|
|
|
798
512
|
"customer": customer,
|
|
799
513
|
"product_id": product_id,
|
|
800
514
|
"quantity": quantity,
|
|
515
|
+
"addons": addons,
|
|
801
516
|
"allowed_payment_method_types": allowed_payment_method_types,
|
|
802
517
|
"billing_currency": billing_currency,
|
|
803
518
|
"discount_code": discount_code,
|
|
@@ -853,6 +568,7 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
|
|
|
853
568
|
subscription_id: str,
|
|
854
569
|
*,
|
|
855
570
|
billing: Optional[BillingAddressParam] | NotGiven = NOT_GIVEN,
|
|
571
|
+
disable_on_demand: Optional[subscription_update_params.DisableOnDemand] | NotGiven = NOT_GIVEN,
|
|
856
572
|
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
|
|
857
573
|
status: Optional[SubscriptionStatus] | NotGiven = NOT_GIVEN,
|
|
858
574
|
tax_id: Optional[str] | NotGiven = NOT_GIVEN,
|
|
@@ -880,6 +596,7 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
|
|
|
880
596
|
body=await async_maybe_transform(
|
|
881
597
|
{
|
|
882
598
|
"billing": billing,
|
|
599
|
+
"disable_on_demand": disable_on_demand,
|
|
883
600
|
"metadata": metadata,
|
|
884
601
|
"status": status,
|
|
885
602
|
"tax_id": tax_id,
|
|
@@ -907,7 +624,7 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
|
|
|
907
624
|
extra_query: Query | None = None,
|
|
908
625
|
extra_body: Body | None = None,
|
|
909
626
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
910
|
-
) -> AsyncPaginator[
|
|
627
|
+
) -> AsyncPaginator[SubscriptionListResponse, AsyncDefaultPageNumberPagination[SubscriptionListResponse]]:
|
|
911
628
|
"""
|
|
912
629
|
Args:
|
|
913
630
|
created_at_gte: Get events after this created time
|
|
@@ -932,7 +649,7 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
|
|
|
932
649
|
"""
|
|
933
650
|
return self._get_api_list(
|
|
934
651
|
"/subscriptions",
|
|
935
|
-
page=AsyncDefaultPageNumberPagination[
|
|
652
|
+
page=AsyncDefaultPageNumberPagination[SubscriptionListResponse],
|
|
936
653
|
options=make_request_options(
|
|
937
654
|
extra_headers=extra_headers,
|
|
938
655
|
extra_query=extra_query,
|
|
@@ -950,7 +667,7 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
|
|
|
950
667
|
subscription_list_params.SubscriptionListParams,
|
|
951
668
|
),
|
|
952
669
|
),
|
|
953
|
-
model=
|
|
670
|
+
model=SubscriptionListResponse,
|
|
954
671
|
)
|
|
955
672
|
|
|
956
673
|
async def change_plan(
|
dodopayments/types/__init__.py
CHANGED
|
@@ -7,23 +7,29 @@ from .refund import Refund as Refund
|
|
|
7
7
|
from .dispute import Dispute as Dispute
|
|
8
8
|
from .payment import Payment as Payment
|
|
9
9
|
from .product import Product as Product
|
|
10
|
+
from .currency import Currency as Currency
|
|
10
11
|
from .customer import Customer as Customer
|
|
11
12
|
from .discount import Discount as Discount
|
|
12
13
|
from .license_key import LicenseKey as LicenseKey
|
|
13
14
|
from .price_param import PriceParam as PriceParam
|
|
14
15
|
from .country_code import CountryCode as CountryCode
|
|
15
16
|
from .subscription import Subscription as Subscription
|
|
17
|
+
from .tax_category import TaxCategory as TaxCategory
|
|
16
18
|
from .discount_type import DiscountType as DiscountType
|
|
17
19
|
from .dispute_stage import DisputeStage as DisputeStage
|
|
18
20
|
from .intent_status import IntentStatus as IntentStatus
|
|
19
21
|
from .refund_status import RefundStatus as RefundStatus
|
|
20
22
|
from .time_interval import TimeInterval as TimeInterval
|
|
21
23
|
from .webhook_event import WebhookEvent as WebhookEvent
|
|
24
|
+
from .addon_response import AddonResponse as AddonResponse
|
|
22
25
|
from .dispute_status import DisputeStatus as DisputeStatus
|
|
23
26
|
from .billing_address import BillingAddress as BillingAddress
|
|
27
|
+
from .addon_list_params import AddonListParams as AddonListParams
|
|
24
28
|
from .license_key_status import LicenseKeyStatus as LicenseKeyStatus
|
|
25
29
|
from .payout_list_params import PayoutListParams as PayoutListParams
|
|
26
30
|
from .refund_list_params import RefundListParams as RefundListParams
|
|
31
|
+
from .addon_create_params import AddonCreateParams as AddonCreateParams
|
|
32
|
+
from .addon_update_params import AddonUpdateParams as AddonUpdateParams
|
|
27
33
|
from .dispute_list_params import DisputeListParams as DisputeListParams
|
|
28
34
|
from .payment_list_params import PaymentListParams as PaymentListParams
|
|
29
35
|
from .product_list_params import ProductListParams as ProductListParams
|
|
@@ -50,6 +56,7 @@ from .license_activate_params import LicenseActivateParams as LicenseActivatePar
|
|
|
50
56
|
from .license_key_list_params import LicenseKeyListParams as LicenseKeyListParams
|
|
51
57
|
from .license_validate_params import LicenseValidateParams as LicenseValidateParams
|
|
52
58
|
from .payment_create_response import PaymentCreateResponse as PaymentCreateResponse
|
|
59
|
+
from .addon_cart_response_item import AddonCartResponseItem as AddonCartResponseItem
|
|
53
60
|
from .customer_limited_details import CustomerLimitedDetails as CustomerLimitedDetails
|
|
54
61
|
from .subscription_list_params import SubscriptionListParams as SubscriptionListParams
|
|
55
62
|
from .create_new_customer_param import CreateNewCustomerParam as CreateNewCustomerParam
|
|
@@ -61,7 +68,9 @@ from .license_key_duration_param import LicenseKeyDurationParam as LicenseKeyDur
|
|
|
61
68
|
from .one_time_product_cart_item import OneTimeProductCartItem as OneTimeProductCartItem
|
|
62
69
|
from .subscription_charge_params import SubscriptionChargeParams as SubscriptionChargeParams
|
|
63
70
|
from .subscription_create_params import SubscriptionCreateParams as SubscriptionCreateParams
|
|
71
|
+
from .subscription_list_response import SubscriptionListResponse as SubscriptionListResponse
|
|
64
72
|
from .subscription_update_params import SubscriptionUpdateParams as SubscriptionUpdateParams
|
|
73
|
+
from .addon_update_images_response import AddonUpdateImagesResponse as AddonUpdateImagesResponse
|
|
65
74
|
from .subscription_charge_response import SubscriptionChargeResponse as SubscriptionChargeResponse
|
|
66
75
|
from .subscription_create_response import SubscriptionCreateResponse as SubscriptionCreateResponse
|
|
67
76
|
from .attach_existing_customer_param import AttachExistingCustomerParam as AttachExistingCustomerParam
|
|
@@ -0,0 +1,30 @@
|
|
|
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 Optional
|
|
6
|
+
from typing_extensions import Required, TypedDict
|
|
7
|
+
|
|
8
|
+
from .currency import Currency
|
|
9
|
+
from .tax_category import TaxCategory
|
|
10
|
+
|
|
11
|
+
__all__ = ["AddonCreateParams"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class AddonCreateParams(TypedDict, total=False):
|
|
15
|
+
currency: Required[Currency]
|
|
16
|
+
|
|
17
|
+
name: Required[str]
|
|
18
|
+
"""Name of the Addon"""
|
|
19
|
+
|
|
20
|
+
price: Required[int]
|
|
21
|
+
"""Amount of the addon"""
|
|
22
|
+
|
|
23
|
+
tax_category: Required[TaxCategory]
|
|
24
|
+
"""
|
|
25
|
+
Represents the different categories of taxation applicable to various products
|
|
26
|
+
and services.
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
description: Optional[str]
|
|
30
|
+
"""Optional description of the Addon"""
|
|
@@ -0,0 +1,16 @@
|
|
|
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 Optional
|
|
6
|
+
from typing_extensions import TypedDict
|
|
7
|
+
|
|
8
|
+
__all__ = ["AddonListParams"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class AddonListParams(TypedDict, total=False):
|
|
12
|
+
page_number: Optional[int]
|
|
13
|
+
"""Page number default is 0"""
|
|
14
|
+
|
|
15
|
+
page_size: Optional[int]
|
|
16
|
+
"""Page size default is 10 max is 100"""
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
|
|
6
|
+
from .._models import BaseModel
|
|
7
|
+
from .currency import Currency
|
|
8
|
+
from .tax_category import TaxCategory
|
|
9
|
+
|
|
10
|
+
__all__ = ["AddonResponse"]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class AddonResponse(BaseModel):
|
|
14
|
+
id: str
|
|
15
|
+
"""id of the Addon"""
|
|
16
|
+
|
|
17
|
+
business_id: str
|
|
18
|
+
"""Unique identifier for the business to which the addon belongs."""
|
|
19
|
+
|
|
20
|
+
created_at: datetime
|
|
21
|
+
"""Created time"""
|
|
22
|
+
|
|
23
|
+
currency: Currency
|
|
24
|
+
|
|
25
|
+
name: str
|
|
26
|
+
"""Name of the Addon"""
|
|
27
|
+
|
|
28
|
+
price: int
|
|
29
|
+
"""Amount of the addon"""
|
|
30
|
+
|
|
31
|
+
tax_category: TaxCategory
|
|
32
|
+
"""
|
|
33
|
+
Represents the different categories of taxation applicable to various products
|
|
34
|
+
and services.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
updated_at: datetime
|
|
38
|
+
"""Updated time"""
|
|
39
|
+
|
|
40
|
+
description: Optional[str] = None
|
|
41
|
+
"""Optional description of the Addon"""
|
|
42
|
+
|
|
43
|
+
image: Optional[str] = None
|
|
44
|
+
"""Image of the Addon"""
|
|
@@ -0,0 +1,33 @@
|
|
|
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 Optional
|
|
6
|
+
from typing_extensions import TypedDict
|
|
7
|
+
|
|
8
|
+
from .currency import Currency
|
|
9
|
+
from .tax_category import TaxCategory
|
|
10
|
+
|
|
11
|
+
__all__ = ["AddonUpdateParams"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class AddonUpdateParams(TypedDict, total=False):
|
|
15
|
+
currency: Optional[Currency]
|
|
16
|
+
|
|
17
|
+
description: Optional[str]
|
|
18
|
+
"""Description of the Addon, optional and must be at most 1000 characters."""
|
|
19
|
+
|
|
20
|
+
image_id: Optional[str]
|
|
21
|
+
"""Addon image id after its uploaded to S3"""
|
|
22
|
+
|
|
23
|
+
name: Optional[str]
|
|
24
|
+
"""Name of the Addon, optional and must be at most 100 characters."""
|
|
25
|
+
|
|
26
|
+
price: Optional[int]
|
|
27
|
+
"""Amount of the addon"""
|
|
28
|
+
|
|
29
|
+
tax_category: Optional[TaxCategory]
|
|
30
|
+
"""
|
|
31
|
+
Represents the different categories of taxation applicable to various products
|
|
32
|
+
and services.
|
|
33
|
+
"""
|