dodopayments 1.53.4__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/_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.4.dist-info → dodopayments-1.53.5.dist-info}/METADATA +1 -1
- {dodopayments-1.53.4.dist-info → dodopayments-1.53.5.dist-info}/RECORD +36 -36
- {dodopayments-1.53.4.dist-info → dodopayments-1.53.5.dist-info}/WHEEL +0 -0
- {dodopayments-1.53.4.dist-info → dodopayments-1.53.5.dist-info}/licenses/LICENSE +0 -0
|
@@ -7,7 +7,7 @@ from typing import Dict, List, Iterable, Optional
|
|
|
7
7
|
import httpx
|
|
8
8
|
|
|
9
9
|
from ..types import Currency, checkout_session_create_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
|
|
@@ -50,24 +50,24 @@ class CheckoutSessionsResource(SyncAPIResource):
|
|
|
50
50
|
self,
|
|
51
51
|
*,
|
|
52
52
|
product_cart: Iterable[checkout_session_create_params.ProductCart],
|
|
53
|
-
allowed_payment_method_types: Optional[List[PaymentMethodTypes]] |
|
|
54
|
-
billing_address: Optional[checkout_session_create_params.BillingAddress] |
|
|
55
|
-
billing_currency: Optional[Currency] |
|
|
56
|
-
confirm: bool |
|
|
57
|
-
customer: Optional[CustomerRequestParam] |
|
|
58
|
-
customization: checkout_session_create_params.Customization |
|
|
59
|
-
discount_code: Optional[str] |
|
|
60
|
-
feature_flags: checkout_session_create_params.FeatureFlags |
|
|
61
|
-
metadata: Optional[Dict[str, str]] |
|
|
62
|
-
return_url: Optional[str] |
|
|
63
|
-
show_saved_payment_methods: bool |
|
|
64
|
-
subscription_data: Optional[checkout_session_create_params.SubscriptionData] |
|
|
53
|
+
allowed_payment_method_types: Optional[List[PaymentMethodTypes]] | Omit = omit,
|
|
54
|
+
billing_address: Optional[checkout_session_create_params.BillingAddress] | Omit = omit,
|
|
55
|
+
billing_currency: Optional[Currency] | Omit = omit,
|
|
56
|
+
confirm: bool | Omit = omit,
|
|
57
|
+
customer: Optional[CustomerRequestParam] | Omit = omit,
|
|
58
|
+
customization: checkout_session_create_params.Customization | Omit = omit,
|
|
59
|
+
discount_code: Optional[str] | Omit = omit,
|
|
60
|
+
feature_flags: checkout_session_create_params.FeatureFlags | Omit = omit,
|
|
61
|
+
metadata: Optional[Dict[str, str]] | Omit = omit,
|
|
62
|
+
return_url: Optional[str] | Omit = omit,
|
|
63
|
+
show_saved_payment_methods: bool | Omit = omit,
|
|
64
|
+
subscription_data: Optional[checkout_session_create_params.SubscriptionData] | Omit = omit,
|
|
65
65
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
66
66
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
67
67
|
extra_headers: Headers | None = None,
|
|
68
68
|
extra_query: Query | None = None,
|
|
69
69
|
extra_body: Body | None = None,
|
|
70
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
70
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
71
71
|
) -> CheckoutSessionResponse:
|
|
72
72
|
"""
|
|
73
73
|
Args:
|
|
@@ -155,24 +155,24 @@ class AsyncCheckoutSessionsResource(AsyncAPIResource):
|
|
|
155
155
|
self,
|
|
156
156
|
*,
|
|
157
157
|
product_cart: Iterable[checkout_session_create_params.ProductCart],
|
|
158
|
-
allowed_payment_method_types: Optional[List[PaymentMethodTypes]] |
|
|
159
|
-
billing_address: Optional[checkout_session_create_params.BillingAddress] |
|
|
160
|
-
billing_currency: Optional[Currency] |
|
|
161
|
-
confirm: bool |
|
|
162
|
-
customer: Optional[CustomerRequestParam] |
|
|
163
|
-
customization: checkout_session_create_params.Customization |
|
|
164
|
-
discount_code: Optional[str] |
|
|
165
|
-
feature_flags: checkout_session_create_params.FeatureFlags |
|
|
166
|
-
metadata: Optional[Dict[str, str]] |
|
|
167
|
-
return_url: Optional[str] |
|
|
168
|
-
show_saved_payment_methods: bool |
|
|
169
|
-
subscription_data: Optional[checkout_session_create_params.SubscriptionData] |
|
|
158
|
+
allowed_payment_method_types: Optional[List[PaymentMethodTypes]] | Omit = omit,
|
|
159
|
+
billing_address: Optional[checkout_session_create_params.BillingAddress] | Omit = omit,
|
|
160
|
+
billing_currency: Optional[Currency] | Omit = omit,
|
|
161
|
+
confirm: bool | Omit = omit,
|
|
162
|
+
customer: Optional[CustomerRequestParam] | Omit = omit,
|
|
163
|
+
customization: checkout_session_create_params.Customization | Omit = omit,
|
|
164
|
+
discount_code: Optional[str] | Omit = omit,
|
|
165
|
+
feature_flags: checkout_session_create_params.FeatureFlags | Omit = omit,
|
|
166
|
+
metadata: Optional[Dict[str, str]] | Omit = omit,
|
|
167
|
+
return_url: Optional[str] | Omit = omit,
|
|
168
|
+
show_saved_payment_methods: bool | Omit = omit,
|
|
169
|
+
subscription_data: Optional[checkout_session_create_params.SubscriptionData] | Omit = omit,
|
|
170
170
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
171
171
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
172
172
|
extra_headers: Headers | None = None,
|
|
173
173
|
extra_query: Query | None = None,
|
|
174
174
|
extra_body: Body | None = None,
|
|
175
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
175
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
176
176
|
) -> CheckoutSessionResponse:
|
|
177
177
|
"""
|
|
178
178
|
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, Omit, Query, Headers, NotGiven, omit, not_given
|
|
8
8
|
from ..._utils import maybe_transform, async_maybe_transform
|
|
9
9
|
from ..._compat import cached_property
|
|
10
10
|
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
@@ -45,13 +45,13 @@ class CustomerPortalResource(SyncAPIResource):
|
|
|
45
45
|
self,
|
|
46
46
|
customer_id: str,
|
|
47
47
|
*,
|
|
48
|
-
send_email: bool |
|
|
48
|
+
send_email: bool | Omit = omit,
|
|
49
49
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
50
50
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
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
|
) -> CustomerPortalSession:
|
|
56
56
|
"""
|
|
57
57
|
Args:
|
|
@@ -106,13 +106,13 @@ class AsyncCustomerPortalResource(AsyncAPIResource):
|
|
|
106
106
|
self,
|
|
107
107
|
customer_id: str,
|
|
108
108
|
*,
|
|
109
|
-
send_email: bool |
|
|
109
|
+
send_email: bool | Omit = omit,
|
|
110
110
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
111
111
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
112
112
|
extra_headers: Headers | None = None,
|
|
113
113
|
extra_query: Query | None = None,
|
|
114
114
|
extra_body: Body | None = None,
|
|
115
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
115
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
116
116
|
) -> CustomerPortalSession:
|
|
117
117
|
"""
|
|
118
118
|
Args:
|
|
@@ -7,7 +7,7 @@ from typing import Optional
|
|
|
7
7
|
import httpx
|
|
8
8
|
|
|
9
9
|
from ...types import customer_list_params, customer_create_params, customer_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
|
|
@@ -73,13 +73,13 @@ class CustomersResource(SyncAPIResource):
|
|
|
73
73
|
*,
|
|
74
74
|
email: str,
|
|
75
75
|
name: str,
|
|
76
|
-
phone_number: Optional[str] |
|
|
76
|
+
phone_number: Optional[str] | Omit = omit,
|
|
77
77
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
78
78
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
79
79
|
extra_headers: Headers | None = None,
|
|
80
80
|
extra_query: Query | None = None,
|
|
81
81
|
extra_body: Body | None = None,
|
|
82
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
82
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
83
83
|
) -> Customer:
|
|
84
84
|
"""
|
|
85
85
|
Args:
|
|
@@ -116,7 +116,7 @@ class CustomersResource(SyncAPIResource):
|
|
|
116
116
|
extra_headers: Headers | None = None,
|
|
117
117
|
extra_query: Query | None = None,
|
|
118
118
|
extra_body: Body | None = None,
|
|
119
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
119
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
120
120
|
) -> Customer:
|
|
121
121
|
"""
|
|
122
122
|
Args:
|
|
@@ -142,14 +142,14 @@ class CustomersResource(SyncAPIResource):
|
|
|
142
142
|
self,
|
|
143
143
|
customer_id: str,
|
|
144
144
|
*,
|
|
145
|
-
name: Optional[str] |
|
|
146
|
-
phone_number: Optional[str] |
|
|
145
|
+
name: Optional[str] | Omit = omit,
|
|
146
|
+
phone_number: Optional[str] | Omit = omit,
|
|
147
147
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
148
148
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
149
149
|
extra_headers: Headers | None = None,
|
|
150
150
|
extra_query: Query | None = None,
|
|
151
151
|
extra_body: Body | None = None,
|
|
152
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
152
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
153
153
|
) -> Customer:
|
|
154
154
|
"""
|
|
155
155
|
Args:
|
|
@@ -181,15 +181,15 @@ class CustomersResource(SyncAPIResource):
|
|
|
181
181
|
def list(
|
|
182
182
|
self,
|
|
183
183
|
*,
|
|
184
|
-
email: str |
|
|
185
|
-
page_number: int |
|
|
186
|
-
page_size: int |
|
|
184
|
+
email: str | Omit = omit,
|
|
185
|
+
page_number: int | Omit = omit,
|
|
186
|
+
page_size: int | Omit = omit,
|
|
187
187
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
188
188
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
189
189
|
extra_headers: Headers | None = None,
|
|
190
190
|
extra_query: Query | None = None,
|
|
191
191
|
extra_body: Body | None = None,
|
|
192
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
192
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
193
193
|
) -> SyncDefaultPageNumberPagination[Customer]:
|
|
194
194
|
"""
|
|
195
195
|
Args:
|
|
@@ -261,13 +261,13 @@ class AsyncCustomersResource(AsyncAPIResource):
|
|
|
261
261
|
*,
|
|
262
262
|
email: str,
|
|
263
263
|
name: str,
|
|
264
|
-
phone_number: Optional[str] |
|
|
264
|
+
phone_number: Optional[str] | Omit = omit,
|
|
265
265
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
266
266
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
267
267
|
extra_headers: Headers | None = None,
|
|
268
268
|
extra_query: Query | None = None,
|
|
269
269
|
extra_body: Body | None = None,
|
|
270
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
270
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
271
271
|
) -> Customer:
|
|
272
272
|
"""
|
|
273
273
|
Args:
|
|
@@ -304,7 +304,7 @@ class AsyncCustomersResource(AsyncAPIResource):
|
|
|
304
304
|
extra_headers: Headers | None = None,
|
|
305
305
|
extra_query: Query | None = None,
|
|
306
306
|
extra_body: Body | None = None,
|
|
307
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
307
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
308
308
|
) -> Customer:
|
|
309
309
|
"""
|
|
310
310
|
Args:
|
|
@@ -330,14 +330,14 @@ class AsyncCustomersResource(AsyncAPIResource):
|
|
|
330
330
|
self,
|
|
331
331
|
customer_id: str,
|
|
332
332
|
*,
|
|
333
|
-
name: Optional[str] |
|
|
334
|
-
phone_number: Optional[str] |
|
|
333
|
+
name: Optional[str] | Omit = omit,
|
|
334
|
+
phone_number: Optional[str] | Omit = omit,
|
|
335
335
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
336
336
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
337
337
|
extra_headers: Headers | None = None,
|
|
338
338
|
extra_query: Query | None = None,
|
|
339
339
|
extra_body: Body | None = None,
|
|
340
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
340
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
341
341
|
) -> Customer:
|
|
342
342
|
"""
|
|
343
343
|
Args:
|
|
@@ -369,15 +369,15 @@ class AsyncCustomersResource(AsyncAPIResource):
|
|
|
369
369
|
def list(
|
|
370
370
|
self,
|
|
371
371
|
*,
|
|
372
|
-
email: str |
|
|
373
|
-
page_number: int |
|
|
374
|
-
page_size: int |
|
|
372
|
+
email: str | Omit = omit,
|
|
373
|
+
page_number: int | Omit = omit,
|
|
374
|
+
page_size: int | Omit = omit,
|
|
375
375
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
376
376
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
377
377
|
extra_headers: Headers | None = None,
|
|
378
378
|
extra_query: Query | None = None,
|
|
379
379
|
extra_body: Body | None = None,
|
|
380
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
380
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
381
381
|
) -> AsyncPaginator[Customer, AsyncDefaultPageNumberPagination[Customer]]:
|
|
382
382
|
"""
|
|
383
383
|
Args:
|
|
@@ -8,7 +8,7 @@ from typing_extensions import Literal
|
|
|
8
8
|
import httpx
|
|
9
9
|
|
|
10
10
|
from ....types import Currency
|
|
11
|
-
from ...._types import
|
|
11
|
+
from ...._types import Body, Omit, Query, Headers, NotGiven, 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
|
|
@@ -55,14 +55,14 @@ class LedgerEntriesResource(SyncAPIResource):
|
|
|
55
55
|
amount: int,
|
|
56
56
|
currency: Currency,
|
|
57
57
|
entry_type: Literal["credit", "debit"],
|
|
58
|
-
idempotency_key: Optional[str] |
|
|
59
|
-
reason: Optional[str] |
|
|
58
|
+
idempotency_key: Optional[str] | Omit = omit,
|
|
59
|
+
reason: Optional[str] | 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
|
) -> CustomerWallet:
|
|
67
67
|
"""
|
|
68
68
|
Args:
|
|
@@ -104,15 +104,15 @@ class LedgerEntriesResource(SyncAPIResource):
|
|
|
104
104
|
self,
|
|
105
105
|
customer_id: str,
|
|
106
106
|
*,
|
|
107
|
-
currency: Currency |
|
|
108
|
-
page_number: int |
|
|
109
|
-
page_size: int |
|
|
107
|
+
currency: Currency | Omit = omit,
|
|
108
|
+
page_number: int | Omit = omit,
|
|
109
|
+
page_size: int | Omit = omit,
|
|
110
110
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
111
111
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
112
112
|
extra_headers: Headers | None = None,
|
|
113
113
|
extra_query: Query | None = None,
|
|
114
114
|
extra_body: Body | None = None,
|
|
115
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
115
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
116
116
|
) -> SyncDefaultPageNumberPagination[CustomerWalletTransaction]:
|
|
117
117
|
"""
|
|
118
118
|
Args:
|
|
@@ -176,14 +176,14 @@ class AsyncLedgerEntriesResource(AsyncAPIResource):
|
|
|
176
176
|
amount: int,
|
|
177
177
|
currency: Currency,
|
|
178
178
|
entry_type: Literal["credit", "debit"],
|
|
179
|
-
idempotency_key: Optional[str] |
|
|
180
|
-
reason: Optional[str] |
|
|
179
|
+
idempotency_key: Optional[str] | Omit = omit,
|
|
180
|
+
reason: Optional[str] | Omit = omit,
|
|
181
181
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
182
182
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
183
183
|
extra_headers: Headers | None = None,
|
|
184
184
|
extra_query: Query | None = None,
|
|
185
185
|
extra_body: Body | None = None,
|
|
186
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
186
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
187
187
|
) -> CustomerWallet:
|
|
188
188
|
"""
|
|
189
189
|
Args:
|
|
@@ -225,15 +225,15 @@ class AsyncLedgerEntriesResource(AsyncAPIResource):
|
|
|
225
225
|
self,
|
|
226
226
|
customer_id: str,
|
|
227
227
|
*,
|
|
228
|
-
currency: Currency |
|
|
229
|
-
page_number: int |
|
|
230
|
-
page_size: int |
|
|
228
|
+
currency: Currency | Omit = omit,
|
|
229
|
+
page_number: int | Omit = omit,
|
|
230
|
+
page_size: int | Omit = omit,
|
|
231
231
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
232
232
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
233
233
|
extra_headers: Headers | None = None,
|
|
234
234
|
extra_query: Query | None = None,
|
|
235
235
|
extra_body: Body | None = None,
|
|
236
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
236
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
237
237
|
) -> AsyncPaginator[CustomerWalletTransaction, AsyncDefaultPageNumberPagination[CustomerWalletTransaction]]:
|
|
238
238
|
"""
|
|
239
239
|
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 (
|
|
@@ -60,7 +60,7 @@ class WalletsResource(SyncAPIResource):
|
|
|
60
60
|
extra_headers: Headers | None = None,
|
|
61
61
|
extra_query: Query | None = None,
|
|
62
62
|
extra_body: Body | None = None,
|
|
63
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
63
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
64
64
|
) -> WalletListResponse:
|
|
65
65
|
"""
|
|
66
66
|
Args:
|
|
@@ -116,7 +116,7 @@ class AsyncWalletsResource(AsyncAPIResource):
|
|
|
116
116
|
extra_headers: Headers | None = None,
|
|
117
117
|
extra_query: Query | None = None,
|
|
118
118
|
extra_body: Body | None = None,
|
|
119
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
119
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
120
120
|
) -> WalletListResponse:
|
|
121
121
|
"""
|
|
122
122
|
Args:
|
|
@@ -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}
|