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
dodopayments/resources/brands.py
CHANGED
|
@@ -7,7 +7,7 @@ from typing import Optional
|
|
|
7
7
|
import httpx
|
|
8
8
|
|
|
9
9
|
from ..types import brand_create_params, brand_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
|
|
@@ -48,17 +48,17 @@ class BrandsResource(SyncAPIResource):
|
|
|
48
48
|
def create(
|
|
49
49
|
self,
|
|
50
50
|
*,
|
|
51
|
-
description: Optional[str] |
|
|
52
|
-
name: Optional[str] |
|
|
53
|
-
statement_descriptor: Optional[str] |
|
|
54
|
-
support_email: Optional[str] |
|
|
55
|
-
url: Optional[str] |
|
|
51
|
+
description: Optional[str] | Omit = omit,
|
|
52
|
+
name: Optional[str] | Omit = omit,
|
|
53
|
+
statement_descriptor: Optional[str] | Omit = omit,
|
|
54
|
+
support_email: Optional[str] | Omit = omit,
|
|
55
|
+
url: Optional[str] | Omit = omit,
|
|
56
56
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
57
57
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
58
58
|
extra_headers: Headers | None = None,
|
|
59
59
|
extra_query: Query | None = None,
|
|
60
60
|
extra_body: Body | None = None,
|
|
61
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
61
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
62
62
|
) -> Brand:
|
|
63
63
|
"""
|
|
64
64
|
Args:
|
|
@@ -97,7 +97,7 @@ class BrandsResource(SyncAPIResource):
|
|
|
97
97
|
extra_headers: Headers | None = None,
|
|
98
98
|
extra_query: Query | None = None,
|
|
99
99
|
extra_body: Body | None = None,
|
|
100
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
100
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
101
101
|
) -> Brand:
|
|
102
102
|
"""
|
|
103
103
|
Thin handler just calls `get_brand` and wraps in `Json(...)`
|
|
@@ -125,16 +125,16 @@ class BrandsResource(SyncAPIResource):
|
|
|
125
125
|
self,
|
|
126
126
|
id: str,
|
|
127
127
|
*,
|
|
128
|
-
image_id: Optional[str] |
|
|
129
|
-
name: Optional[str] |
|
|
130
|
-
statement_descriptor: Optional[str] |
|
|
131
|
-
support_email: Optional[str] |
|
|
128
|
+
image_id: Optional[str] | Omit = omit,
|
|
129
|
+
name: Optional[str] | Omit = omit,
|
|
130
|
+
statement_descriptor: Optional[str] | Omit = omit,
|
|
131
|
+
support_email: Optional[str] | Omit = omit,
|
|
132
132
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
133
133
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
134
134
|
extra_headers: Headers | None = None,
|
|
135
135
|
extra_query: Query | None = None,
|
|
136
136
|
extra_body: Body | None = None,
|
|
137
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
137
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
138
138
|
) -> Brand:
|
|
139
139
|
"""
|
|
140
140
|
Args:
|
|
@@ -175,7 +175,7 @@ class BrandsResource(SyncAPIResource):
|
|
|
175
175
|
extra_headers: Headers | None = None,
|
|
176
176
|
extra_query: Query | None = None,
|
|
177
177
|
extra_body: Body | None = None,
|
|
178
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
178
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
179
179
|
) -> BrandListResponse:
|
|
180
180
|
return self._get(
|
|
181
181
|
"/brands",
|
|
@@ -194,7 +194,7 @@ class BrandsResource(SyncAPIResource):
|
|
|
194
194
|
extra_headers: Headers | None = None,
|
|
195
195
|
extra_query: Query | None = None,
|
|
196
196
|
extra_body: Body | None = None,
|
|
197
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
197
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
198
198
|
) -> BrandUpdateImagesResponse:
|
|
199
199
|
"""
|
|
200
200
|
Args:
|
|
@@ -240,17 +240,17 @@ class AsyncBrandsResource(AsyncAPIResource):
|
|
|
240
240
|
async def create(
|
|
241
241
|
self,
|
|
242
242
|
*,
|
|
243
|
-
description: Optional[str] |
|
|
244
|
-
name: Optional[str] |
|
|
245
|
-
statement_descriptor: Optional[str] |
|
|
246
|
-
support_email: Optional[str] |
|
|
247
|
-
url: Optional[str] |
|
|
243
|
+
description: Optional[str] | Omit = omit,
|
|
244
|
+
name: Optional[str] | Omit = omit,
|
|
245
|
+
statement_descriptor: Optional[str] | Omit = omit,
|
|
246
|
+
support_email: Optional[str] | Omit = omit,
|
|
247
|
+
url: Optional[str] | 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
|
) -> Brand:
|
|
255
255
|
"""
|
|
256
256
|
Args:
|
|
@@ -289,7 +289,7 @@ class AsyncBrandsResource(AsyncAPIResource):
|
|
|
289
289
|
extra_headers: Headers | None = None,
|
|
290
290
|
extra_query: Query | None = None,
|
|
291
291
|
extra_body: Body | None = None,
|
|
292
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
292
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
293
293
|
) -> Brand:
|
|
294
294
|
"""
|
|
295
295
|
Thin handler just calls `get_brand` and wraps in `Json(...)`
|
|
@@ -317,16 +317,16 @@ class AsyncBrandsResource(AsyncAPIResource):
|
|
|
317
317
|
self,
|
|
318
318
|
id: str,
|
|
319
319
|
*,
|
|
320
|
-
image_id: Optional[str] |
|
|
321
|
-
name: Optional[str] |
|
|
322
|
-
statement_descriptor: Optional[str] |
|
|
323
|
-
support_email: Optional[str] |
|
|
320
|
+
image_id: Optional[str] | Omit = omit,
|
|
321
|
+
name: Optional[str] | Omit = omit,
|
|
322
|
+
statement_descriptor: Optional[str] | Omit = omit,
|
|
323
|
+
support_email: Optional[str] | Omit = omit,
|
|
324
324
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
325
325
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
326
326
|
extra_headers: Headers | None = None,
|
|
327
327
|
extra_query: Query | None = None,
|
|
328
328
|
extra_body: Body | None = None,
|
|
329
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
329
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
330
330
|
) -> Brand:
|
|
331
331
|
"""
|
|
332
332
|
Args:
|
|
@@ -367,7 +367,7 @@ class AsyncBrandsResource(AsyncAPIResource):
|
|
|
367
367
|
extra_headers: Headers | None = None,
|
|
368
368
|
extra_query: Query | None = None,
|
|
369
369
|
extra_body: Body | None = None,
|
|
370
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
370
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
371
371
|
) -> BrandListResponse:
|
|
372
372
|
return await self._get(
|
|
373
373
|
"/brands",
|
|
@@ -386,7 +386,7 @@ class AsyncBrandsResource(AsyncAPIResource):
|
|
|
386
386
|
extra_headers: Headers | None = None,
|
|
387
387
|
extra_query: Query | None = None,
|
|
388
388
|
extra_body: Body | None = None,
|
|
389
|
-
timeout: float | httpx.Timeout | None | NotGiven =
|
|
389
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
390
390
|
) -> BrandUpdateImagesResponse:
|
|
391
391
|
"""
|
|
392
392
|
Args:
|
|
@@ -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:
|