dodopayments 1.53.3__py3-none-any.whl → 1.53.5__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/__init__.py +3 -1
- dodopayments/_base_client.py +9 -9
- dodopayments/_client.py +12 -12
- dodopayments/_models.py +10 -4
- dodopayments/_qs.py +7 -7
- dodopayments/_types.py +18 -11
- dodopayments/_utils/_transform.py +2 -2
- dodopayments/_utils/_utils.py +4 -4
- dodopayments/_version.py +1 -1
- dodopayments/resources/addons.py +29 -29
- dodopayments/resources/brands.py +29 -29
- dodopayments/resources/checkout_sessions.py +27 -27
- dodopayments/resources/customers/customer_portal.py +5 -5
- dodopayments/resources/customers/customers.py +21 -21
- dodopayments/resources/customers/wallets/ledger_entries.py +15 -15
- dodopayments/resources/customers/wallets/wallets.py +3 -3
- dodopayments/resources/discounts.py +43 -43
- dodopayments/resources/disputes.py +19 -19
- dodopayments/resources/invoices/payments.py +5 -5
- dodopayments/resources/license_key_instances.py +13 -13
- dodopayments/resources/license_keys.py +23 -23
- dodopayments/resources/licenses.py +9 -9
- dodopayments/resources/meters.py +21 -21
- dodopayments/resources/misc.py +3 -3
- dodopayments/resources/payments.py +41 -41
- dodopayments/resources/payouts.py +7 -7
- dodopayments/resources/products/images.py +5 -5
- dodopayments/resources/products/products.py +71 -71
- dodopayments/resources/refunds.py +23 -23
- dodopayments/resources/subscriptions.py +87 -87
- dodopayments/resources/usage_events.py +21 -21
- dodopayments/resources/webhooks/headers.py +5 -5
- dodopayments/resources/webhooks/webhooks.py +43 -43
- {dodopayments-1.53.3.dist-info → dodopayments-1.53.5.dist-info}/METADATA +1 -1
- {dodopayments-1.53.3.dist-info → dodopayments-1.53.5.dist-info}/RECORD +37 -37
- {dodopayments-1.53.3.dist-info → dodopayments-1.53.5.dist-info}/WHEEL +0 -0
- {dodopayments-1.53.3.dist-info → dodopayments-1.53.5.dist-info}/licenses/LICENSE +0 -0
|
@@ -8,7 +8,7 @@ from datetime import datetime
|
|
|
8
8
|
import httpx
|
|
9
9
|
|
|
10
10
|
from ..types import DiscountType, discount_list_params, discount_create_params, discount_update_params
|
|
11
|
-
from .._types import
|
|
11
|
+
from .._types import Body, Omit, Query, Headers, NoneType, NotGiven, SequenceNotStr, omit, not_given
|
|
12
12
|
from .._utils import maybe_transform, async_maybe_transform
|
|
13
13
|
from .._compat import cached_property
|
|
14
14
|
from .._resource import SyncAPIResource, AsyncAPIResource
|
|
@@ -51,18 +51,18 @@ class DiscountsResource(SyncAPIResource):
|
|
|
51
51
|
*,
|
|
52
52
|
amount: int,
|
|
53
53
|
type: DiscountType,
|
|
54
|
-
code: Optional[str] |
|
|
55
|
-
expires_at: Union[str, datetime, None] |
|
|
56
|
-
name: Optional[str] |
|
|
57
|
-
restricted_to: Optional[SequenceNotStr[str]] |
|
|
58
|
-
subscription_cycles: Optional[int] |
|
|
59
|
-
usage_limit: Optional[int] |
|
|
54
|
+
code: Optional[str] | Omit = omit,
|
|
55
|
+
expires_at: Union[str, datetime, None] | Omit = omit,
|
|
56
|
+
name: Optional[str] | Omit = omit,
|
|
57
|
+
restricted_to: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
58
|
+
subscription_cycles: Optional[int] | Omit = omit,
|
|
59
|
+
usage_limit: Optional[int] | Omit = omit,
|
|
60
60
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
61
61
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
62
62
|
extra_headers: Headers | None = None,
|
|
63
63
|
extra_query: Query | None = None,
|
|
64
64
|
extra_body: Body | None = None,
|
|
65
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
65
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
66
66
|
) -> Discount:
|
|
67
67
|
"""
|
|
68
68
|
POST /discounts If `code` is omitted or empty, a random 16-char uppercase code
|
|
@@ -133,7 +133,7 @@ class DiscountsResource(SyncAPIResource):
|
|
|
133
133
|
extra_headers: Headers | None = None,
|
|
134
134
|
extra_query: Query | None = None,
|
|
135
135
|
extra_body: Body | None = None,
|
|
136
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
136
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
137
137
|
) -> Discount:
|
|
138
138
|
"""
|
|
139
139
|
GET /discounts/{discount_id}
|
|
@@ -161,20 +161,20 @@ class DiscountsResource(SyncAPIResource):
|
|
|
161
161
|
self,
|
|
162
162
|
discount_id: str,
|
|
163
163
|
*,
|
|
164
|
-
amount: Optional[int] |
|
|
165
|
-
code: Optional[str] |
|
|
166
|
-
expires_at: Union[str, datetime, None] |
|
|
167
|
-
name: Optional[str] |
|
|
168
|
-
restricted_to: Optional[SequenceNotStr[str]] |
|
|
169
|
-
subscription_cycles: Optional[int] |
|
|
170
|
-
type: Optional[DiscountType] |
|
|
171
|
-
usage_limit: Optional[int] |
|
|
164
|
+
amount: Optional[int] | Omit = omit,
|
|
165
|
+
code: Optional[str] | Omit = omit,
|
|
166
|
+
expires_at: Union[str, datetime, None] | Omit = omit,
|
|
167
|
+
name: Optional[str] | Omit = omit,
|
|
168
|
+
restricted_to: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
169
|
+
subscription_cycles: Optional[int] | Omit = omit,
|
|
170
|
+
type: Optional[DiscountType] | Omit = omit,
|
|
171
|
+
usage_limit: Optional[int] | Omit = omit,
|
|
172
172
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
173
173
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
174
174
|
extra_headers: Headers | None = None,
|
|
175
175
|
extra_query: Query | None = None,
|
|
176
176
|
extra_body: Body | None = None,
|
|
177
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
177
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
178
178
|
) -> Discount:
|
|
179
179
|
"""
|
|
180
180
|
PATCH /discounts/{discount_id}
|
|
@@ -234,14 +234,14 @@ class DiscountsResource(SyncAPIResource):
|
|
|
234
234
|
def list(
|
|
235
235
|
self,
|
|
236
236
|
*,
|
|
237
|
-
page_number: int |
|
|
238
|
-
page_size: int |
|
|
237
|
+
page_number: int | Omit = omit,
|
|
238
|
+
page_size: int | Omit = omit,
|
|
239
239
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
240
240
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
241
241
|
extra_headers: Headers | None = None,
|
|
242
242
|
extra_query: Query | None = None,
|
|
243
243
|
extra_body: Body | None = None,
|
|
244
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
244
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
245
245
|
) -> SyncDefaultPageNumberPagination[Discount]:
|
|
246
246
|
"""
|
|
247
247
|
GET /discounts
|
|
@@ -287,7 +287,7 @@ class DiscountsResource(SyncAPIResource):
|
|
|
287
287
|
extra_headers: Headers | None = None,
|
|
288
288
|
extra_query: Query | None = None,
|
|
289
289
|
extra_body: Body | None = None,
|
|
290
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
290
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
291
291
|
) -> None:
|
|
292
292
|
"""
|
|
293
293
|
DELETE /discounts/{discount_id}
|
|
@@ -338,18 +338,18 @@ class AsyncDiscountsResource(AsyncAPIResource):
|
|
|
338
338
|
*,
|
|
339
339
|
amount: int,
|
|
340
340
|
type: DiscountType,
|
|
341
|
-
code: Optional[str] |
|
|
342
|
-
expires_at: Union[str, datetime, None] |
|
|
343
|
-
name: Optional[str] |
|
|
344
|
-
restricted_to: Optional[SequenceNotStr[str]] |
|
|
345
|
-
subscription_cycles: Optional[int] |
|
|
346
|
-
usage_limit: Optional[int] |
|
|
341
|
+
code: Optional[str] | Omit = omit,
|
|
342
|
+
expires_at: Union[str, datetime, None] | Omit = omit,
|
|
343
|
+
name: Optional[str] | Omit = omit,
|
|
344
|
+
restricted_to: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
345
|
+
subscription_cycles: Optional[int] | Omit = omit,
|
|
346
|
+
usage_limit: Optional[int] | Omit = omit,
|
|
347
347
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
348
348
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
349
349
|
extra_headers: Headers | None = None,
|
|
350
350
|
extra_query: Query | None = None,
|
|
351
351
|
extra_body: Body | None = None,
|
|
352
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
352
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
353
353
|
) -> Discount:
|
|
354
354
|
"""
|
|
355
355
|
POST /discounts If `code` is omitted or empty, a random 16-char uppercase code
|
|
@@ -420,7 +420,7 @@ class AsyncDiscountsResource(AsyncAPIResource):
|
|
|
420
420
|
extra_headers: Headers | None = None,
|
|
421
421
|
extra_query: Query | None = None,
|
|
422
422
|
extra_body: Body | None = None,
|
|
423
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
423
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
424
424
|
) -> Discount:
|
|
425
425
|
"""
|
|
426
426
|
GET /discounts/{discount_id}
|
|
@@ -448,20 +448,20 @@ class AsyncDiscountsResource(AsyncAPIResource):
|
|
|
448
448
|
self,
|
|
449
449
|
discount_id: str,
|
|
450
450
|
*,
|
|
451
|
-
amount: Optional[int] |
|
|
452
|
-
code: Optional[str] |
|
|
453
|
-
expires_at: Union[str, datetime, None] |
|
|
454
|
-
name: Optional[str] |
|
|
455
|
-
restricted_to: Optional[SequenceNotStr[str]] |
|
|
456
|
-
subscription_cycles: Optional[int] |
|
|
457
|
-
type: Optional[DiscountType] |
|
|
458
|
-
usage_limit: Optional[int] |
|
|
451
|
+
amount: Optional[int] | Omit = omit,
|
|
452
|
+
code: Optional[str] | Omit = omit,
|
|
453
|
+
expires_at: Union[str, datetime, None] | Omit = omit,
|
|
454
|
+
name: Optional[str] | Omit = omit,
|
|
455
|
+
restricted_to: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
456
|
+
subscription_cycles: Optional[int] | Omit = omit,
|
|
457
|
+
type: Optional[DiscountType] | Omit = omit,
|
|
458
|
+
usage_limit: Optional[int] | Omit = omit,
|
|
459
459
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
460
460
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
461
461
|
extra_headers: Headers | None = None,
|
|
462
462
|
extra_query: Query | None = None,
|
|
463
463
|
extra_body: Body | None = None,
|
|
464
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
464
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
465
465
|
) -> Discount:
|
|
466
466
|
"""
|
|
467
467
|
PATCH /discounts/{discount_id}
|
|
@@ -521,14 +521,14 @@ class AsyncDiscountsResource(AsyncAPIResource):
|
|
|
521
521
|
def list(
|
|
522
522
|
self,
|
|
523
523
|
*,
|
|
524
|
-
page_number: int |
|
|
525
|
-
page_size: int |
|
|
524
|
+
page_number: int | Omit = omit,
|
|
525
|
+
page_size: int | Omit = omit,
|
|
526
526
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
527
527
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
528
528
|
extra_headers: Headers | None = None,
|
|
529
529
|
extra_query: Query | None = None,
|
|
530
530
|
extra_body: Body | None = None,
|
|
531
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
531
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
532
532
|
) -> AsyncPaginator[Discount, AsyncDefaultPageNumberPagination[Discount]]:
|
|
533
533
|
"""
|
|
534
534
|
GET /discounts
|
|
@@ -574,7 +574,7 @@ class AsyncDiscountsResource(AsyncAPIResource):
|
|
|
574
574
|
extra_headers: Headers | None = None,
|
|
575
575
|
extra_query: Query | None = None,
|
|
576
576
|
extra_body: Body | None = None,
|
|
577
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
577
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
578
578
|
) -> None:
|
|
579
579
|
"""
|
|
580
580
|
DELETE /discounts/{discount_id}
|
|
@@ -9,7 +9,7 @@ from typing_extensions import Literal
|
|
|
9
9
|
import httpx
|
|
10
10
|
|
|
11
11
|
from ..types import dispute_list_params
|
|
12
|
-
from .._types import
|
|
12
|
+
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
13
13
|
from .._utils import maybe_transform
|
|
14
14
|
from .._compat import cached_property
|
|
15
15
|
from .._resource import SyncAPIResource, AsyncAPIResource
|
|
@@ -56,7 +56,7 @@ class DisputesResource(SyncAPIResource):
|
|
|
56
56
|
extra_headers: Headers | None = None,
|
|
57
57
|
extra_query: Query | None = None,
|
|
58
58
|
extra_body: Body | None = None,
|
|
59
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
59
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
60
60
|
) -> GetDispute:
|
|
61
61
|
"""
|
|
62
62
|
Args:
|
|
@@ -81,10 +81,10 @@ class DisputesResource(SyncAPIResource):
|
|
|
81
81
|
def list(
|
|
82
82
|
self,
|
|
83
83
|
*,
|
|
84
|
-
created_at_gte: Union[str, datetime] |
|
|
85
|
-
created_at_lte: Union[str, datetime] |
|
|
86
|
-
customer_id: str |
|
|
87
|
-
dispute_stage: Literal["pre_dispute", "dispute", "pre_arbitration"] |
|
|
84
|
+
created_at_gte: Union[str, datetime] | Omit = omit,
|
|
85
|
+
created_at_lte: Union[str, datetime] | Omit = omit,
|
|
86
|
+
customer_id: str | Omit = omit,
|
|
87
|
+
dispute_stage: Literal["pre_dispute", "dispute", "pre_arbitration"] | Omit = omit,
|
|
88
88
|
dispute_status: Literal[
|
|
89
89
|
"dispute_opened",
|
|
90
90
|
"dispute_expired",
|
|
@@ -94,15 +94,15 @@ class DisputesResource(SyncAPIResource):
|
|
|
94
94
|
"dispute_won",
|
|
95
95
|
"dispute_lost",
|
|
96
96
|
]
|
|
97
|
-
|
|
|
98
|
-
page_number: int |
|
|
99
|
-
page_size: int |
|
|
97
|
+
| Omit = omit,
|
|
98
|
+
page_number: int | Omit = omit,
|
|
99
|
+
page_size: int | Omit = omit,
|
|
100
100
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
101
101
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
102
102
|
extra_headers: Headers | None = None,
|
|
103
103
|
extra_query: Query | None = None,
|
|
104
104
|
extra_body: Body | None = None,
|
|
105
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
105
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
106
106
|
) -> SyncDefaultPageNumberPagination[DisputeListResponse]:
|
|
107
107
|
"""
|
|
108
108
|
Args:
|
|
@@ -182,7 +182,7 @@ class AsyncDisputesResource(AsyncAPIResource):
|
|
|
182
182
|
extra_headers: Headers | None = None,
|
|
183
183
|
extra_query: Query | None = None,
|
|
184
184
|
extra_body: Body | None = None,
|
|
185
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
185
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
186
186
|
) -> GetDispute:
|
|
187
187
|
"""
|
|
188
188
|
Args:
|
|
@@ -207,10 +207,10 @@ class AsyncDisputesResource(AsyncAPIResource):
|
|
|
207
207
|
def list(
|
|
208
208
|
self,
|
|
209
209
|
*,
|
|
210
|
-
created_at_gte: Union[str, datetime] |
|
|
211
|
-
created_at_lte: Union[str, datetime] |
|
|
212
|
-
customer_id: str |
|
|
213
|
-
dispute_stage: Literal["pre_dispute", "dispute", "pre_arbitration"] |
|
|
210
|
+
created_at_gte: Union[str, datetime] | Omit = omit,
|
|
211
|
+
created_at_lte: Union[str, datetime] | Omit = omit,
|
|
212
|
+
customer_id: str | Omit = omit,
|
|
213
|
+
dispute_stage: Literal["pre_dispute", "dispute", "pre_arbitration"] | Omit = omit,
|
|
214
214
|
dispute_status: Literal[
|
|
215
215
|
"dispute_opened",
|
|
216
216
|
"dispute_expired",
|
|
@@ -220,15 +220,15 @@ class AsyncDisputesResource(AsyncAPIResource):
|
|
|
220
220
|
"dispute_won",
|
|
221
221
|
"dispute_lost",
|
|
222
222
|
]
|
|
223
|
-
|
|
|
224
|
-
page_number: int |
|
|
225
|
-
page_size: int |
|
|
223
|
+
| Omit = omit,
|
|
224
|
+
page_number: int | Omit = omit,
|
|
225
|
+
page_size: int | Omit = omit,
|
|
226
226
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
227
227
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
228
228
|
extra_headers: Headers | None = None,
|
|
229
229
|
extra_query: Query | None = None,
|
|
230
230
|
extra_body: Body | None = None,
|
|
231
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
231
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
232
232
|
) -> AsyncPaginator[DisputeListResponse, AsyncDefaultPageNumberPagination[DisputeListResponse]]:
|
|
233
233
|
"""
|
|
234
234
|
Args:
|
|
@@ -4,7 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import httpx
|
|
6
6
|
|
|
7
|
-
from ..._types import
|
|
7
|
+
from ..._types import Body, Query, Headers, NotGiven, not_given
|
|
8
8
|
from ..._compat import cached_property
|
|
9
9
|
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
10
10
|
from ..._response import (
|
|
@@ -51,7 +51,7 @@ class PaymentsResource(SyncAPIResource):
|
|
|
51
51
|
extra_headers: Headers | None = None,
|
|
52
52
|
extra_query: Query | None = None,
|
|
53
53
|
extra_body: Body | None = None,
|
|
54
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
54
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
55
55
|
) -> BinaryAPIResponse:
|
|
56
56
|
"""
|
|
57
57
|
Args:
|
|
@@ -83,7 +83,7 @@ class PaymentsResource(SyncAPIResource):
|
|
|
83
83
|
extra_headers: Headers | None = None,
|
|
84
84
|
extra_query: Query | None = None,
|
|
85
85
|
extra_body: Body | None = None,
|
|
86
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
86
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
87
87
|
) -> BinaryAPIResponse:
|
|
88
88
|
"""
|
|
89
89
|
Args:
|
|
@@ -136,7 +136,7 @@ class AsyncPaymentsResource(AsyncAPIResource):
|
|
|
136
136
|
extra_headers: Headers | None = None,
|
|
137
137
|
extra_query: Query | None = None,
|
|
138
138
|
extra_body: Body | None = None,
|
|
139
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
139
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
140
140
|
) -> AsyncBinaryAPIResponse:
|
|
141
141
|
"""
|
|
142
142
|
Args:
|
|
@@ -168,7 +168,7 @@ class AsyncPaymentsResource(AsyncAPIResource):
|
|
|
168
168
|
extra_headers: Headers | None = None,
|
|
169
169
|
extra_query: Query | None = None,
|
|
170
170
|
extra_body: Body | None = None,
|
|
171
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
171
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
172
172
|
) -> AsyncBinaryAPIResponse:
|
|
173
173
|
"""
|
|
174
174
|
Args:
|
|
@@ -7,7 +7,7 @@ from typing import Optional
|
|
|
7
7
|
import httpx
|
|
8
8
|
|
|
9
9
|
from ..types import license_key_instance_list_params, license_key_instance_update_params
|
|
10
|
-
from .._types import
|
|
10
|
+
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
11
11
|
from .._utils import maybe_transform, async_maybe_transform
|
|
12
12
|
from .._compat import cached_property
|
|
13
13
|
from .._resource import SyncAPIResource, AsyncAPIResource
|
|
@@ -53,7 +53,7 @@ class LicenseKeyInstancesResource(SyncAPIResource):
|
|
|
53
53
|
extra_headers: Headers | None = None,
|
|
54
54
|
extra_query: Query | None = None,
|
|
55
55
|
extra_body: Body | None = None,
|
|
56
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
56
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
57
57
|
) -> LicenseKeyInstance:
|
|
58
58
|
"""
|
|
59
59
|
Args:
|
|
@@ -85,7 +85,7 @@ class LicenseKeyInstancesResource(SyncAPIResource):
|
|
|
85
85
|
extra_headers: Headers | None = None,
|
|
86
86
|
extra_query: Query | None = None,
|
|
87
87
|
extra_body: Body | None = None,
|
|
88
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
88
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
89
89
|
) -> LicenseKeyInstance:
|
|
90
90
|
"""
|
|
91
91
|
Args:
|
|
@@ -111,15 +111,15 @@ class LicenseKeyInstancesResource(SyncAPIResource):
|
|
|
111
111
|
def list(
|
|
112
112
|
self,
|
|
113
113
|
*,
|
|
114
|
-
license_key_id: Optional[str] |
|
|
115
|
-
page_number: Optional[int] |
|
|
116
|
-
page_size: Optional[int] |
|
|
114
|
+
license_key_id: Optional[str] | Omit = omit,
|
|
115
|
+
page_number: Optional[int] | Omit = omit,
|
|
116
|
+
page_size: Optional[int] | Omit = omit,
|
|
117
117
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
118
118
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
119
119
|
extra_headers: Headers | None = None,
|
|
120
120
|
extra_query: Query | None = None,
|
|
121
121
|
extra_body: Body | None = None,
|
|
122
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
122
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
123
123
|
) -> SyncDefaultPageNumberPagination[LicenseKeyInstance]:
|
|
124
124
|
"""
|
|
125
125
|
Args:
|
|
@@ -187,7 +187,7 @@ class AsyncLicenseKeyInstancesResource(AsyncAPIResource):
|
|
|
187
187
|
extra_headers: Headers | None = None,
|
|
188
188
|
extra_query: Query | None = None,
|
|
189
189
|
extra_body: Body | None = None,
|
|
190
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
190
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
191
191
|
) -> LicenseKeyInstance:
|
|
192
192
|
"""
|
|
193
193
|
Args:
|
|
@@ -219,7 +219,7 @@ class AsyncLicenseKeyInstancesResource(AsyncAPIResource):
|
|
|
219
219
|
extra_headers: Headers | None = None,
|
|
220
220
|
extra_query: Query | None = None,
|
|
221
221
|
extra_body: Body | None = None,
|
|
222
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
222
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
223
223
|
) -> LicenseKeyInstance:
|
|
224
224
|
"""
|
|
225
225
|
Args:
|
|
@@ -247,15 +247,15 @@ class AsyncLicenseKeyInstancesResource(AsyncAPIResource):
|
|
|
247
247
|
def list(
|
|
248
248
|
self,
|
|
249
249
|
*,
|
|
250
|
-
license_key_id: Optional[str] |
|
|
251
|
-
page_number: Optional[int] |
|
|
252
|
-
page_size: Optional[int] |
|
|
250
|
+
license_key_id: Optional[str] | Omit = omit,
|
|
251
|
+
page_number: Optional[int] | Omit = omit,
|
|
252
|
+
page_size: Optional[int] | Omit = omit,
|
|
253
253
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
254
254
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
255
255
|
extra_headers: Headers | None = None,
|
|
256
256
|
extra_query: Query | None = None,
|
|
257
257
|
extra_body: Body | None = None,
|
|
258
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
258
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
259
259
|
) -> AsyncPaginator[LicenseKeyInstance, AsyncDefaultPageNumberPagination[LicenseKeyInstance]]:
|
|
260
260
|
"""
|
|
261
261
|
Args:
|
|
@@ -9,7 +9,7 @@ from typing_extensions import Literal
|
|
|
9
9
|
import httpx
|
|
10
10
|
|
|
11
11
|
from ..types import license_key_list_params, license_key_update_params
|
|
12
|
-
from .._types import
|
|
12
|
+
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
13
13
|
from .._utils import maybe_transform, async_maybe_transform
|
|
14
14
|
from .._compat import cached_property
|
|
15
15
|
from .._resource import SyncAPIResource, AsyncAPIResource
|
|
@@ -55,7 +55,7 @@ class LicenseKeysResource(SyncAPIResource):
|
|
|
55
55
|
extra_headers: Headers | None = None,
|
|
56
56
|
extra_query: Query | None = None,
|
|
57
57
|
extra_body: Body | None = None,
|
|
58
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
58
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
59
59
|
) -> LicenseKey:
|
|
60
60
|
"""
|
|
61
61
|
Args:
|
|
@@ -81,15 +81,15 @@ class LicenseKeysResource(SyncAPIResource):
|
|
|
81
81
|
self,
|
|
82
82
|
id: str,
|
|
83
83
|
*,
|
|
84
|
-
activations_limit: Optional[int] |
|
|
85
|
-
disabled: Optional[bool] |
|
|
86
|
-
expires_at: Union[str, datetime, None] |
|
|
84
|
+
activations_limit: Optional[int] | Omit = omit,
|
|
85
|
+
disabled: Optional[bool] | Omit = omit,
|
|
86
|
+
expires_at: Union[str, datetime, None] | Omit = omit,
|
|
87
87
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
88
88
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
89
89
|
extra_headers: Headers | None = None,
|
|
90
90
|
extra_query: Query | None = None,
|
|
91
91
|
extra_body: Body | None = None,
|
|
92
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
92
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
93
93
|
) -> LicenseKey:
|
|
94
94
|
"""Args:
|
|
95
95
|
activations_limit: The updated activation limit for the license key.
|
|
@@ -132,17 +132,17 @@ class LicenseKeysResource(SyncAPIResource):
|
|
|
132
132
|
def list(
|
|
133
133
|
self,
|
|
134
134
|
*,
|
|
135
|
-
customer_id: str |
|
|
136
|
-
page_number: int |
|
|
137
|
-
page_size: int |
|
|
138
|
-
product_id: str |
|
|
139
|
-
status: Literal["active", "expired", "disabled"] |
|
|
135
|
+
customer_id: str | Omit = omit,
|
|
136
|
+
page_number: int | Omit = omit,
|
|
137
|
+
page_size: int | Omit = omit,
|
|
138
|
+
product_id: str | Omit = omit,
|
|
139
|
+
status: Literal["active", "expired", "disabled"] | Omit = omit,
|
|
140
140
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
141
141
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
142
142
|
extra_headers: Headers | None = None,
|
|
143
143
|
extra_query: Query | None = None,
|
|
144
144
|
extra_body: Body | None = None,
|
|
145
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
145
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
146
146
|
) -> SyncDefaultPageNumberPagination[LicenseKey]:
|
|
147
147
|
"""
|
|
148
148
|
Args:
|
|
@@ -216,7 +216,7 @@ class AsyncLicenseKeysResource(AsyncAPIResource):
|
|
|
216
216
|
extra_headers: Headers | None = None,
|
|
217
217
|
extra_query: Query | None = None,
|
|
218
218
|
extra_body: Body | None = None,
|
|
219
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
219
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
220
220
|
) -> LicenseKey:
|
|
221
221
|
"""
|
|
222
222
|
Args:
|
|
@@ -242,15 +242,15 @@ class AsyncLicenseKeysResource(AsyncAPIResource):
|
|
|
242
242
|
self,
|
|
243
243
|
id: str,
|
|
244
244
|
*,
|
|
245
|
-
activations_limit: Optional[int] |
|
|
246
|
-
disabled: Optional[bool] |
|
|
247
|
-
expires_at: Union[str, datetime, None] |
|
|
245
|
+
activations_limit: Optional[int] | Omit = omit,
|
|
246
|
+
disabled: Optional[bool] | Omit = omit,
|
|
247
|
+
expires_at: Union[str, datetime, None] | Omit = omit,
|
|
248
248
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
249
249
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
250
250
|
extra_headers: Headers | None = None,
|
|
251
251
|
extra_query: Query | None = None,
|
|
252
252
|
extra_body: Body | None = None,
|
|
253
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
253
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
254
254
|
) -> LicenseKey:
|
|
255
255
|
"""Args:
|
|
256
256
|
activations_limit: The updated activation limit for the license key.
|
|
@@ -293,17 +293,17 @@ class AsyncLicenseKeysResource(AsyncAPIResource):
|
|
|
293
293
|
def list(
|
|
294
294
|
self,
|
|
295
295
|
*,
|
|
296
|
-
customer_id: str |
|
|
297
|
-
page_number: int |
|
|
298
|
-
page_size: int |
|
|
299
|
-
product_id: str |
|
|
300
|
-
status: Literal["active", "expired", "disabled"] |
|
|
296
|
+
customer_id: str | Omit = omit,
|
|
297
|
+
page_number: int | Omit = omit,
|
|
298
|
+
page_size: int | Omit = omit,
|
|
299
|
+
product_id: str | Omit = omit,
|
|
300
|
+
status: Literal["active", "expired", "disabled"] | Omit = omit,
|
|
301
301
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
302
302
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
303
303
|
extra_headers: Headers | None = None,
|
|
304
304
|
extra_query: Query | None = None,
|
|
305
305
|
extra_body: Body | None = None,
|
|
306
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
306
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
307
307
|
) -> AsyncPaginator[LicenseKey, AsyncDefaultPageNumberPagination[LicenseKey]]:
|
|
308
308
|
"""
|
|
309
309
|
Args:
|
|
@@ -7,7 +7,7 @@ from typing import Optional
|
|
|
7
7
|
import httpx
|
|
8
8
|
|
|
9
9
|
from ..types import license_activate_params, license_validate_params, license_deactivate_params
|
|
10
|
-
from .._types import
|
|
10
|
+
from .._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given
|
|
11
11
|
from .._utils import maybe_transform, async_maybe_transform
|
|
12
12
|
from .._compat import cached_property
|
|
13
13
|
from .._resource import SyncAPIResource, AsyncAPIResource
|
|
@@ -54,7 +54,7 @@ class LicensesResource(SyncAPIResource):
|
|
|
54
54
|
extra_headers: Headers | None = None,
|
|
55
55
|
extra_query: Query | None = None,
|
|
56
56
|
extra_body: Body | None = None,
|
|
57
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
57
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
58
58
|
) -> LicenseActivateResponse:
|
|
59
59
|
"""
|
|
60
60
|
Args:
|
|
@@ -91,7 +91,7 @@ class LicensesResource(SyncAPIResource):
|
|
|
91
91
|
extra_headers: Headers | None = None,
|
|
92
92
|
extra_query: Query | None = None,
|
|
93
93
|
extra_body: Body | None = None,
|
|
94
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
94
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
95
95
|
) -> None:
|
|
96
96
|
"""
|
|
97
97
|
Args:
|
|
@@ -123,13 +123,13 @@ class LicensesResource(SyncAPIResource):
|
|
|
123
123
|
self,
|
|
124
124
|
*,
|
|
125
125
|
license_key: str,
|
|
126
|
-
license_key_instance_id: Optional[str] |
|
|
126
|
+
license_key_instance_id: Optional[str] | Omit = omit,
|
|
127
127
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
128
128
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
129
129
|
extra_headers: Headers | None = None,
|
|
130
130
|
extra_query: Query | None = None,
|
|
131
131
|
extra_body: Body | None = None,
|
|
132
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
132
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
133
133
|
) -> LicenseValidateResponse:
|
|
134
134
|
"""
|
|
135
135
|
Args:
|
|
@@ -187,7 +187,7 @@ class AsyncLicensesResource(AsyncAPIResource):
|
|
|
187
187
|
extra_headers: Headers | None = None,
|
|
188
188
|
extra_query: Query | None = None,
|
|
189
189
|
extra_body: Body | None = None,
|
|
190
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
190
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
191
191
|
) -> LicenseActivateResponse:
|
|
192
192
|
"""
|
|
193
193
|
Args:
|
|
@@ -224,7 +224,7 @@ class AsyncLicensesResource(AsyncAPIResource):
|
|
|
224
224
|
extra_headers: Headers | None = None,
|
|
225
225
|
extra_query: Query | None = None,
|
|
226
226
|
extra_body: Body | None = None,
|
|
227
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
227
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
228
228
|
) -> None:
|
|
229
229
|
"""
|
|
230
230
|
Args:
|
|
@@ -256,13 +256,13 @@ class AsyncLicensesResource(AsyncAPIResource):
|
|
|
256
256
|
self,
|
|
257
257
|
*,
|
|
258
258
|
license_key: str,
|
|
259
|
-
license_key_instance_id: Optional[str] |
|
|
259
|
+
license_key_instance_id: Optional[str] | Omit = omit,
|
|
260
260
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
261
261
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
262
262
|
extra_headers: Headers | None = None,
|
|
263
263
|
extra_query: Query | None = None,
|
|
264
264
|
extra_body: Body | None = None,
|
|
265
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
265
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
266
266
|
) -> LicenseValidateResponse:
|
|
267
267
|
"""
|
|
268
268
|
Args:
|