gr4vy 1.1.27__py3-none-any.whl → 1.1.29__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.
- gr4vy/_version.py +3 -3
- gr4vy/models/__init__.py +0 -14
- gr4vy/models/travelhuboptions.py +9 -2
- gr4vy/sdk.py +3 -193
- {gr4vy-1.1.27.dist-info → gr4vy-1.1.29.dist-info}/METADATA +58 -23
- {gr4vy-1.1.27.dist-info → gr4vy-1.1.29.dist-info}/RECORD +7 -8
- gr4vy/models/browse_payment_method_definitions_getop.py +0 -36
- {gr4vy-1.1.27.dist-info → gr4vy-1.1.29.dist-info}/WHEEL +0 -0
gr4vy/_version.py
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import importlib.metadata
|
|
4
4
|
|
|
5
5
|
__title__: str = "gr4vy"
|
|
6
|
-
__version__: str = "1.1.
|
|
6
|
+
__version__: str = "1.1.29"
|
|
7
7
|
__openapi_doc_version__: str = "1.0.0"
|
|
8
|
-
__gen_version__: str = "2.
|
|
9
|
-
__user_agent__: str = "speakeasy-sdk/python 1.1.
|
|
8
|
+
__gen_version__: str = "2.681.1"
|
|
9
|
+
__user_agent__: str = "speakeasy-sdk/python 1.1.29 2.681.1 1.0.0 gr4vy"
|
|
10
10
|
|
|
11
11
|
try:
|
|
12
12
|
if __package__ is not None:
|
gr4vy/models/__init__.py
CHANGED
|
@@ -89,12 +89,6 @@ if TYPE_CHECKING:
|
|
|
89
89
|
BraintreeDynamicDataFieldsOptionsTypedDict,
|
|
90
90
|
)
|
|
91
91
|
from .braintreeoptions import BraintreeOptions, BraintreeOptionsTypedDict
|
|
92
|
-
from .browse_payment_method_definitions_getop import (
|
|
93
|
-
BrowsePaymentMethodDefinitionsGetGlobals,
|
|
94
|
-
BrowsePaymentMethodDefinitionsGetGlobalsTypedDict,
|
|
95
|
-
BrowsePaymentMethodDefinitionsGetRequest,
|
|
96
|
-
BrowsePaymentMethodDefinitionsGetRequestTypedDict,
|
|
97
|
-
)
|
|
98
92
|
from .browserinfo import BrowserInfo, BrowserInfoTypedDict, UserDevice
|
|
99
93
|
from .buyer import Buyer, BuyerTypedDict
|
|
100
94
|
from .buyercreate import BuyerCreate, BuyerCreateTypedDict
|
|
@@ -1214,10 +1208,6 @@ __all__ = [
|
|
|
1214
1208
|
"BraintreeDynamicDataFieldsOptionsTypedDict",
|
|
1215
1209
|
"BraintreeOptions",
|
|
1216
1210
|
"BraintreeOptionsTypedDict",
|
|
1217
|
-
"BrowsePaymentMethodDefinitionsGetGlobals",
|
|
1218
|
-
"BrowsePaymentMethodDefinitionsGetGlobalsTypedDict",
|
|
1219
|
-
"BrowsePaymentMethodDefinitionsGetRequest",
|
|
1220
|
-
"BrowsePaymentMethodDefinitionsGetRequestTypedDict",
|
|
1221
1211
|
"BrowserInfo",
|
|
1222
1212
|
"BrowserInfoTypedDict",
|
|
1223
1213
|
"Buyer",
|
|
@@ -2099,10 +2089,6 @@ _dynamic_imports: dict[str, str] = {
|
|
|
2099
2089
|
"BraintreeDynamicDataFieldsOptionsTypedDict": ".braintreedynamicdatafieldsoptions",
|
|
2100
2090
|
"BraintreeOptions": ".braintreeoptions",
|
|
2101
2091
|
"BraintreeOptionsTypedDict": ".braintreeoptions",
|
|
2102
|
-
"BrowsePaymentMethodDefinitionsGetGlobals": ".browse_payment_method_definitions_getop",
|
|
2103
|
-
"BrowsePaymentMethodDefinitionsGetGlobalsTypedDict": ".browse_payment_method_definitions_getop",
|
|
2104
|
-
"BrowsePaymentMethodDefinitionsGetRequest": ".browse_payment_method_definitions_getop",
|
|
2105
|
-
"BrowsePaymentMethodDefinitionsGetRequestTypedDict": ".browse_payment_method_definitions_getop",
|
|
2106
2092
|
"BrowserInfo": ".browserinfo",
|
|
2107
2093
|
"BrowserInfoTypedDict": ".browserinfo",
|
|
2108
2094
|
"UserDevice": ".browserinfo",
|
gr4vy/models/travelhuboptions.py
CHANGED
|
@@ -12,6 +12,8 @@ from typing_extensions import Annotated, NotRequired, TypedDict
|
|
|
12
12
|
class TravelhubOptionsTypedDict(TypedDict):
|
|
13
13
|
custom_data: NotRequired[Nullable[List[TravelHubCustomDataTypedDict]]]
|
|
14
14
|
r"""A list of `customData` to pass to the TravelHub API."""
|
|
15
|
+
company_name: NotRequired[Nullable[str]]
|
|
16
|
+
r"""Customer company name to pass to the TravelHub API."""
|
|
15
17
|
|
|
16
18
|
|
|
17
19
|
class TravelhubOptions(BaseModel):
|
|
@@ -20,10 +22,15 @@ class TravelhubOptions(BaseModel):
|
|
|
20
22
|
] = UNSET
|
|
21
23
|
r"""A list of `customData` to pass to the TravelHub API."""
|
|
22
24
|
|
|
25
|
+
company_name: Annotated[
|
|
26
|
+
OptionalNullable[str], pydantic.Field(alias="companyName")
|
|
27
|
+
] = UNSET
|
|
28
|
+
r"""Customer company name to pass to the TravelHub API."""
|
|
29
|
+
|
|
23
30
|
@model_serializer(mode="wrap")
|
|
24
31
|
def serialize_model(self, handler):
|
|
25
|
-
optional_fields = ["customData"]
|
|
26
|
-
nullable_fields = ["customData"]
|
|
32
|
+
optional_fields = ["customData", "companyName"]
|
|
33
|
+
nullable_fields = ["customData", "companyName"]
|
|
27
34
|
null_default_fields = []
|
|
28
35
|
|
|
29
36
|
serialized = handler(self)
|
gr4vy/sdk.py
CHANGED
|
@@ -5,15 +5,13 @@ from .httpclient import AsyncHttpClient, ClientOwner, HttpClient, close_clients
|
|
|
5
5
|
from .sdkconfiguration import SDKConfiguration
|
|
6
6
|
from .utils.logger import Logger, get_default_logger
|
|
7
7
|
from .utils.retries import RetryConfig
|
|
8
|
-
from gr4vy import
|
|
9
|
-
from gr4vy._hooks import
|
|
8
|
+
from gr4vy import models, utils
|
|
9
|
+
from gr4vy._hooks import SDKHooks
|
|
10
10
|
from gr4vy.models import internal
|
|
11
11
|
from gr4vy.types import OptionalNullable, UNSET
|
|
12
|
-
from gr4vy.utils import get_security_from_env
|
|
13
|
-
from gr4vy.utils.unmarshal_json_response import unmarshal_json_response
|
|
14
12
|
import httpx
|
|
15
13
|
import importlib
|
|
16
|
-
from typing import Any, Callable, Dict,
|
|
14
|
+
from typing import Any, Callable, Dict, Optional, TYPE_CHECKING, Union, cast
|
|
17
15
|
import weakref
|
|
18
16
|
|
|
19
17
|
if TYPE_CHECKING:
|
|
@@ -247,191 +245,3 @@ class Gr4vy(BaseSDK):
|
|
|
247
245
|
):
|
|
248
246
|
await self.sdk_configuration.async_client.aclose()
|
|
249
247
|
self.sdk_configuration.async_client = None
|
|
250
|
-
|
|
251
|
-
def browse_payment_method_definitions_get(
|
|
252
|
-
self,
|
|
253
|
-
*,
|
|
254
|
-
merchant_account_id: Optional[str] = None,
|
|
255
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
256
|
-
server_url: Optional[str] = None,
|
|
257
|
-
timeout_ms: Optional[int] = None,
|
|
258
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
259
|
-
) -> Any:
|
|
260
|
-
r"""Browse
|
|
261
|
-
|
|
262
|
-
:param merchant_account_id: The ID of the merchant account to use for this request.
|
|
263
|
-
:param retries: Override the default retry configuration for this method
|
|
264
|
-
:param server_url: Override the default server URL for this method
|
|
265
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
266
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
267
|
-
"""
|
|
268
|
-
base_url = None
|
|
269
|
-
url_variables = None
|
|
270
|
-
if timeout_ms is None:
|
|
271
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
272
|
-
|
|
273
|
-
if server_url is not None:
|
|
274
|
-
base_url = server_url
|
|
275
|
-
else:
|
|
276
|
-
base_url = self._get_url(base_url, url_variables)
|
|
277
|
-
|
|
278
|
-
request = models.BrowsePaymentMethodDefinitionsGetRequest(
|
|
279
|
-
merchant_account_id=merchant_account_id,
|
|
280
|
-
)
|
|
281
|
-
|
|
282
|
-
req = self._build_request(
|
|
283
|
-
method="GET",
|
|
284
|
-
path="/payment-method-definitions",
|
|
285
|
-
base_url=base_url,
|
|
286
|
-
url_variables=url_variables,
|
|
287
|
-
request=request,
|
|
288
|
-
request_body_required=False,
|
|
289
|
-
request_has_path_params=False,
|
|
290
|
-
request_has_query_params=True,
|
|
291
|
-
user_agent_header="user-agent",
|
|
292
|
-
accept_header_value="application/json",
|
|
293
|
-
http_headers=http_headers,
|
|
294
|
-
_globals=models.BrowsePaymentMethodDefinitionsGetGlobals(
|
|
295
|
-
merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
|
|
296
|
-
),
|
|
297
|
-
security=self.sdk_configuration.security,
|
|
298
|
-
timeout_ms=timeout_ms,
|
|
299
|
-
)
|
|
300
|
-
|
|
301
|
-
if retries == UNSET:
|
|
302
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
303
|
-
retries = self.sdk_configuration.retry_config
|
|
304
|
-
else:
|
|
305
|
-
retries = utils.RetryConfig(
|
|
306
|
-
"backoff", utils.BackoffStrategy(200, 200, 1, 1000), True
|
|
307
|
-
)
|
|
308
|
-
|
|
309
|
-
retry_config = None
|
|
310
|
-
if isinstance(retries, utils.RetryConfig):
|
|
311
|
-
retry_config = (retries, ["5XX"])
|
|
312
|
-
|
|
313
|
-
http_res = self.do_request(
|
|
314
|
-
hook_ctx=HookContext(
|
|
315
|
-
config=self.sdk_configuration,
|
|
316
|
-
base_url=base_url or "",
|
|
317
|
-
operation_id="browse_payment_method_definitions_get",
|
|
318
|
-
oauth2_scopes=[],
|
|
319
|
-
security_source=get_security_from_env(
|
|
320
|
-
self.sdk_configuration.security, models.Security
|
|
321
|
-
),
|
|
322
|
-
),
|
|
323
|
-
request=req,
|
|
324
|
-
error_status_codes=["422", "4XX", "5XX"],
|
|
325
|
-
retry_config=retry_config,
|
|
326
|
-
)
|
|
327
|
-
|
|
328
|
-
response_data: Any = None
|
|
329
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
330
|
-
return unmarshal_json_response(Any, http_res)
|
|
331
|
-
if utils.match_response(http_res, "422", "application/json"):
|
|
332
|
-
response_data = unmarshal_json_response(
|
|
333
|
-
errors.HTTPValidationErrorData, http_res
|
|
334
|
-
)
|
|
335
|
-
raise errors.HTTPValidationError(response_data, http_res)
|
|
336
|
-
if utils.match_response(http_res, "4XX", "*"):
|
|
337
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
338
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
339
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
340
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
341
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
342
|
-
|
|
343
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
344
|
-
|
|
345
|
-
async def browse_payment_method_definitions_get_async(
|
|
346
|
-
self,
|
|
347
|
-
*,
|
|
348
|
-
merchant_account_id: Optional[str] = None,
|
|
349
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
350
|
-
server_url: Optional[str] = None,
|
|
351
|
-
timeout_ms: Optional[int] = None,
|
|
352
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
353
|
-
) -> Any:
|
|
354
|
-
r"""Browse
|
|
355
|
-
|
|
356
|
-
:param merchant_account_id: The ID of the merchant account to use for this request.
|
|
357
|
-
:param retries: Override the default retry configuration for this method
|
|
358
|
-
:param server_url: Override the default server URL for this method
|
|
359
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
360
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
361
|
-
"""
|
|
362
|
-
base_url = None
|
|
363
|
-
url_variables = None
|
|
364
|
-
if timeout_ms is None:
|
|
365
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
366
|
-
|
|
367
|
-
if server_url is not None:
|
|
368
|
-
base_url = server_url
|
|
369
|
-
else:
|
|
370
|
-
base_url = self._get_url(base_url, url_variables)
|
|
371
|
-
|
|
372
|
-
request = models.BrowsePaymentMethodDefinitionsGetRequest(
|
|
373
|
-
merchant_account_id=merchant_account_id,
|
|
374
|
-
)
|
|
375
|
-
|
|
376
|
-
req = self._build_request_async(
|
|
377
|
-
method="GET",
|
|
378
|
-
path="/payment-method-definitions",
|
|
379
|
-
base_url=base_url,
|
|
380
|
-
url_variables=url_variables,
|
|
381
|
-
request=request,
|
|
382
|
-
request_body_required=False,
|
|
383
|
-
request_has_path_params=False,
|
|
384
|
-
request_has_query_params=True,
|
|
385
|
-
user_agent_header="user-agent",
|
|
386
|
-
accept_header_value="application/json",
|
|
387
|
-
http_headers=http_headers,
|
|
388
|
-
_globals=models.BrowsePaymentMethodDefinitionsGetGlobals(
|
|
389
|
-
merchant_account_id=self.sdk_configuration.globals.merchant_account_id,
|
|
390
|
-
),
|
|
391
|
-
security=self.sdk_configuration.security,
|
|
392
|
-
timeout_ms=timeout_ms,
|
|
393
|
-
)
|
|
394
|
-
|
|
395
|
-
if retries == UNSET:
|
|
396
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
397
|
-
retries = self.sdk_configuration.retry_config
|
|
398
|
-
else:
|
|
399
|
-
retries = utils.RetryConfig(
|
|
400
|
-
"backoff", utils.BackoffStrategy(200, 200, 1, 1000), True
|
|
401
|
-
)
|
|
402
|
-
|
|
403
|
-
retry_config = None
|
|
404
|
-
if isinstance(retries, utils.RetryConfig):
|
|
405
|
-
retry_config = (retries, ["5XX"])
|
|
406
|
-
|
|
407
|
-
http_res = await self.do_request_async(
|
|
408
|
-
hook_ctx=HookContext(
|
|
409
|
-
config=self.sdk_configuration,
|
|
410
|
-
base_url=base_url or "",
|
|
411
|
-
operation_id="browse_payment_method_definitions_get",
|
|
412
|
-
oauth2_scopes=[],
|
|
413
|
-
security_source=get_security_from_env(
|
|
414
|
-
self.sdk_configuration.security, models.Security
|
|
415
|
-
),
|
|
416
|
-
),
|
|
417
|
-
request=req,
|
|
418
|
-
error_status_codes=["422", "4XX", "5XX"],
|
|
419
|
-
retry_config=retry_config,
|
|
420
|
-
)
|
|
421
|
-
|
|
422
|
-
response_data: Any = None
|
|
423
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
424
|
-
return unmarshal_json_response(Any, http_res)
|
|
425
|
-
if utils.match_response(http_res, "422", "application/json"):
|
|
426
|
-
response_data = unmarshal_json_response(
|
|
427
|
-
errors.HTTPValidationErrorData, http_res
|
|
428
|
-
)
|
|
429
|
-
raise errors.HTTPValidationError(response_data, http_res)
|
|
430
|
-
if utils.match_response(http_res, "4XX", "*"):
|
|
431
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
432
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
433
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
434
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
435
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
436
|
-
|
|
437
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: gr4vy
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.29
|
|
4
4
|
Summary: Python Client SDK Generated by Speakeasy.
|
|
5
5
|
Author: Gr4vy
|
|
6
6
|
Requires-Python: >=3.9.2
|
|
@@ -80,7 +80,15 @@ This SDK is designed to simplify development, reduce boilerplate code, and help
|
|
|
80
80
|
>
|
|
81
81
|
> Once a Python version reaches its [official end of life date](https://devguide.python.org/versions/), a 3-month grace period is provided for users to upgrade. Following this grace period, the minimum python version supported in the SDK will be updated.
|
|
82
82
|
|
|
83
|
-
The SDK can be installed with
|
|
83
|
+
The SDK can be installed with *uv*, *pip*, or *poetry* package managers.
|
|
84
|
+
|
|
85
|
+
### uv
|
|
86
|
+
|
|
87
|
+
*uv* is a fast Python package installer and resolver, designed as a drop-in replacement for pip and pip-tools. It's recommended for its speed and modern Python tooling capabilities.
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
uv add gr4vy
|
|
91
|
+
```
|
|
84
92
|
|
|
85
93
|
### PIP
|
|
86
94
|
|
|
@@ -387,9 +395,6 @@ except ValueError as error:
|
|
|
387
395
|
|
|
388
396
|
* [list](https://github.com/gr4vy/gr4vy-python/blob/master/docs/sdks/balances/README.md#list) - List gift card balances
|
|
389
397
|
|
|
390
|
-
### [Gr4vy SDK](https://github.com/gr4vy/gr4vy-python/blob/master/docs/sdks/gr4vy/README.md)
|
|
391
|
-
|
|
392
|
-
* [browse_payment_method_definitions_get](https://github.com/gr4vy/gr4vy-python/blob/master/docs/sdks/gr4vy/README.md#browse_payment_method_definitions_get) - Browse
|
|
393
398
|
|
|
394
399
|
### [merchant_accounts](https://github.com/gr4vy/gr4vy-python/blob/master/docs/sdks/merchantaccountssdk/README.md)
|
|
395
400
|
|
|
@@ -591,9 +596,14 @@ with Gr4vy(
|
|
|
591
596
|
bearer_auth=os.getenv("GR4VY_BEARER_AUTH", ""),
|
|
592
597
|
) as g_client:
|
|
593
598
|
|
|
594
|
-
res = g_client.
|
|
599
|
+
res = g_client.account_updater.jobs.create(payment_method_ids=[
|
|
600
|
+
"ef9496d8-53a5-4aad-8ca2-00eb68334389",
|
|
601
|
+
"f29e886e-93cc-4714-b4a3-12b7a718e595",
|
|
602
|
+
],
|
|
595
603
|
RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
|
|
596
604
|
|
|
605
|
+
assert res is not None
|
|
606
|
+
|
|
597
607
|
# Handle response
|
|
598
608
|
print(res)
|
|
599
609
|
|
|
@@ -612,7 +622,12 @@ with Gr4vy(
|
|
|
612
622
|
bearer_auth=os.getenv("GR4VY_BEARER_AUTH", ""),
|
|
613
623
|
) as g_client:
|
|
614
624
|
|
|
615
|
-
res = g_client.
|
|
625
|
+
res = g_client.account_updater.jobs.create(payment_method_ids=[
|
|
626
|
+
"ef9496d8-53a5-4aad-8ca2-00eb68334389",
|
|
627
|
+
"f29e886e-93cc-4714-b4a3-12b7a718e595",
|
|
628
|
+
])
|
|
629
|
+
|
|
630
|
+
assert res is not None
|
|
616
631
|
|
|
617
632
|
# Handle response
|
|
618
633
|
print(res)
|
|
@@ -638,6 +653,7 @@ with Gr4vy(
|
|
|
638
653
|
```python
|
|
639
654
|
from gr4vy import Gr4vy, errors
|
|
640
655
|
import os
|
|
656
|
+
from typing import Literal
|
|
641
657
|
|
|
642
658
|
|
|
643
659
|
with Gr4vy(
|
|
@@ -647,7 +663,12 @@ with Gr4vy(
|
|
|
647
663
|
res = None
|
|
648
664
|
try:
|
|
649
665
|
|
|
650
|
-
res = g_client.
|
|
666
|
+
res = g_client.account_updater.jobs.create(payment_method_ids=[
|
|
667
|
+
"ef9496d8-53a5-4aad-8ca2-00eb68334389",
|
|
668
|
+
"f29e886e-93cc-4714-b4a3-12b7a718e595",
|
|
669
|
+
])
|
|
670
|
+
|
|
671
|
+
assert res is not None
|
|
651
672
|
|
|
652
673
|
# Handle response
|
|
653
674
|
print(res)
|
|
@@ -662,25 +683,29 @@ with Gr4vy(
|
|
|
662
683
|
print(e.raw_response)
|
|
663
684
|
|
|
664
685
|
# Depending on the method different errors may be thrown
|
|
665
|
-
if isinstance(e, errors.
|
|
666
|
-
print(e.data.
|
|
686
|
+
if isinstance(e, errors.Error400):
|
|
687
|
+
print(e.data.type) # Optional[Literal["error"]]
|
|
688
|
+
print(e.data.code) # Optional[str]
|
|
689
|
+
print(e.data.status) # Optional[int]
|
|
690
|
+
print(e.data.message) # Optional[str]
|
|
691
|
+
print(e.data.details) # Optional[List[models.ErrorDetail]]
|
|
667
692
|
```
|
|
668
693
|
|
|
669
694
|
### Error Classes
|
|
670
695
|
**Primary errors:**
|
|
671
696
|
* [`Gr4vyError`](https://github.com/gr4vy/gr4vy-python/blob/master/./src/gr4vy/errors/gr4vyerror.py): The base class for HTTP error responses.
|
|
672
|
-
* [`Error400`](https://github.com/gr4vy/gr4vy-python/blob/master/./src/gr4vy/errors/error400.py): The request was invalid. Status code `400`.
|
|
673
|
-
* [`Error401`](https://github.com/gr4vy/gr4vy-python/blob/master/./src/gr4vy/errors/error401.py): The request was unauthorized. Status code `401`.
|
|
674
|
-
* [`Error403`](https://github.com/gr4vy/gr4vy-python/blob/master/./src/gr4vy/errors/error403.py): The credentials were invalid or the caller did not have permission to act on the resource. Status code `403`.
|
|
675
|
-
* [`Error404`](https://github.com/gr4vy/gr4vy-python/blob/master/./src/gr4vy/errors/error404.py): The resource was not found. Status code `404`.
|
|
676
|
-
* [`Error405`](https://github.com/gr4vy/gr4vy-python/blob/master/./src/gr4vy/errors/error405.py): The request method was not allowed. Status code `405`.
|
|
677
|
-
* [`Error409`](https://github.com/gr4vy/gr4vy-python/blob/master/./src/gr4vy/errors/error409.py): A duplicate record was found. Status code `409`.
|
|
697
|
+
* [`Error400`](https://github.com/gr4vy/gr4vy-python/blob/master/./src/gr4vy/errors/error400.py): The request was invalid. Status code `400`.
|
|
698
|
+
* [`Error401`](https://github.com/gr4vy/gr4vy-python/blob/master/./src/gr4vy/errors/error401.py): The request was unauthorized. Status code `401`.
|
|
699
|
+
* [`Error403`](https://github.com/gr4vy/gr4vy-python/blob/master/./src/gr4vy/errors/error403.py): The credentials were invalid or the caller did not have permission to act on the resource. Status code `403`.
|
|
700
|
+
* [`Error404`](https://github.com/gr4vy/gr4vy-python/blob/master/./src/gr4vy/errors/error404.py): The resource was not found. Status code `404`.
|
|
701
|
+
* [`Error405`](https://github.com/gr4vy/gr4vy-python/blob/master/./src/gr4vy/errors/error405.py): The request method was not allowed. Status code `405`.
|
|
702
|
+
* [`Error409`](https://github.com/gr4vy/gr4vy-python/blob/master/./src/gr4vy/errors/error409.py): A duplicate record was found. Status code `409`.
|
|
703
|
+
* [`Error425`](https://github.com/gr4vy/gr4vy-python/blob/master/./src/gr4vy/errors/error425.py): The request was too early. Status code `425`.
|
|
704
|
+
* [`Error429`](https://github.com/gr4vy/gr4vy-python/blob/master/./src/gr4vy/errors/error429.py): Too many requests were made. Status code `429`.
|
|
705
|
+
* [`Error500`](https://github.com/gr4vy/gr4vy-python/blob/master/./src/gr4vy/errors/error500.py): The server encountered an error. Status code `500`.
|
|
706
|
+
* [`Error502`](https://github.com/gr4vy/gr4vy-python/blob/master/./src/gr4vy/errors/error502.py): The server encountered an error. Status code `502`.
|
|
707
|
+
* [`Error504`](https://github.com/gr4vy/gr4vy-python/blob/master/./src/gr4vy/errors/error504.py): The server encountered an error. Status code `504`.
|
|
678
708
|
* [`HTTPValidationError`](https://github.com/gr4vy/gr4vy-python/blob/master/./src/gr4vy/errors/httpvalidationerror.py): Validation Error. Status code `422`. *
|
|
679
|
-
* [`Error425`](https://github.com/gr4vy/gr4vy-python/blob/master/./src/gr4vy/errors/error425.py): The request was too early. Status code `425`. *
|
|
680
|
-
* [`Error429`](https://github.com/gr4vy/gr4vy-python/blob/master/./src/gr4vy/errors/error429.py): Too many requests were made. Status code `429`. *
|
|
681
|
-
* [`Error500`](https://github.com/gr4vy/gr4vy-python/blob/master/./src/gr4vy/errors/error500.py): The server encountered an error. Status code `500`. *
|
|
682
|
-
* [`Error502`](https://github.com/gr4vy/gr4vy-python/blob/master/./src/gr4vy/errors/error502.py): The server encountered an error. Status code `502`. *
|
|
683
|
-
* [`Error504`](https://github.com/gr4vy/gr4vy-python/blob/master/./src/gr4vy/errors/error504.py): The server encountered an error. Status code `504`. *
|
|
684
709
|
|
|
685
710
|
<details><summary>Less common errors (5)</summary>
|
|
686
711
|
|
|
@@ -732,7 +757,12 @@ with Gr4vy(
|
|
|
732
757
|
bearer_auth=os.getenv("GR4VY_BEARER_AUTH", ""),
|
|
733
758
|
) as g_client:
|
|
734
759
|
|
|
735
|
-
res = g_client.
|
|
760
|
+
res = g_client.account_updater.jobs.create(payment_method_ids=[
|
|
761
|
+
"ef9496d8-53a5-4aad-8ca2-00eb68334389",
|
|
762
|
+
"f29e886e-93cc-4714-b4a3-12b7a718e595",
|
|
763
|
+
])
|
|
764
|
+
|
|
765
|
+
assert res is not None
|
|
736
766
|
|
|
737
767
|
# Handle response
|
|
738
768
|
print(res)
|
|
@@ -753,7 +783,12 @@ with Gr4vy(
|
|
|
753
783
|
bearer_auth=os.getenv("GR4VY_BEARER_AUTH", ""),
|
|
754
784
|
) as g_client:
|
|
755
785
|
|
|
756
|
-
res = g_client.
|
|
786
|
+
res = g_client.account_updater.jobs.create(payment_method_ids=[
|
|
787
|
+
"ef9496d8-53a5-4aad-8ca2-00eb68334389",
|
|
788
|
+
"f29e886e-93cc-4714-b4a3-12b7a718e595",
|
|
789
|
+
])
|
|
790
|
+
|
|
791
|
+
assert res is not None
|
|
757
792
|
|
|
758
793
|
# Handle response
|
|
759
794
|
print(res)
|
|
@@ -2,7 +2,7 @@ gr4vy/__init__.py,sha256=w2u919V3Tzv4zEPQ-OYJ79gQ_4_SyW7GOFFoHtqXDFA,401
|
|
|
2
2
|
gr4vy/_hooks/__init__.py,sha256=p5J13DeYuISQyQWirjJAObHIf2VtIlOtFqnIpvjjVwk,118
|
|
3
3
|
gr4vy/_hooks/sdkhooks.py,sha256=3jKTs2B1lcAxBMJge9C-qL0RGbKGLcrHvikzi67Tbdo,2493
|
|
4
4
|
gr4vy/_hooks/types.py,sha256=0O7dbbolkiFAnHkNULvwoLsiXJu0_Wmhev163bvZbW8,3039
|
|
5
|
-
gr4vy/_version.py,sha256=
|
|
5
|
+
gr4vy/_version.py,sha256=6nNlChEzdPF4G3SifkmnzmMVclUcaCjbioB7-MiWX5U,454
|
|
6
6
|
gr4vy/account_updater.py,sha256=AIu37O0v3fkWjbcbZJf1MI32lpVnIWynRmd1ys_cSnk,477
|
|
7
7
|
gr4vy/all.py,sha256=WwnLoNn3RgXNpf4Xoz12ct94JD7NMpLz-kzesHHh4m8,15172
|
|
8
8
|
gr4vy/audit_logs.py,sha256=iAT3rnS0NYNKZGw5IVl_MC_RPAHMJNXHfd_K--HIplU,17015
|
|
@@ -40,7 +40,7 @@ gr4vy/gift_cards_sdk.py,sha256=hgGnEm1_4pvLndCFebzr5QmqqbzkTb2vfyNVl2HpRnU,57363
|
|
|
40
40
|
gr4vy/httpclient.py,sha256=Eu73urOAiZQtdUIyOUnPccxCiBbWEKrXG-JrRG3SLM4,3946
|
|
41
41
|
gr4vy/jobs.py,sha256=WHx0epnlxOMHFSXTJPwuI5dhOO_acGTX72Lbz6fvD8A,14565
|
|
42
42
|
gr4vy/merchant_accounts_sdk.py,sha256=TGwGZqyD_b7xR2pggTsOa3H813-zhakhtjS9d_NsfmA,80907
|
|
43
|
-
gr4vy/models/__init__.py,sha256=
|
|
43
|
+
gr4vy/models/__init__.py,sha256=wPH_WFsb-SxhTE16CZerT-KLrHyASrKwTzZtZ6iMWD4,129626
|
|
44
44
|
gr4vy/models/accountsreceivablesreportspec.py,sha256=X4YKJ5TII4KFi1I47BYt1Egxsfs84EaqXsb7g90IpLw,1012
|
|
45
45
|
gr4vy/models/accountupdaterinquirysummary.py,sha256=rOJn5uG7cNFUkd6BbsAve6ueUlAJzU5_d_zeDu6RBTg,1097
|
|
46
46
|
gr4vy/models/accountupdaterjob.py,sha256=JKuRwrc5yYSAQ9lD5Ta4MALtfXBF7tn_37lllQsH2B0,1972
|
|
@@ -75,7 +75,6 @@ gr4vy/models/billingdetails_input.py,sha256=_dAZlZgDxhrByze2tF5cRYmg8Qrm3hNcNCk3
|
|
|
75
75
|
gr4vy/models/billingdetails_output.py,sha256=x-hzFKeM5zkpVYFbwKTMtsmV_vftRhZBtTSxcRdLgxs,3006
|
|
76
76
|
gr4vy/models/braintreedynamicdatafieldsoptions.py,sha256=k1wWtn_Be2zyK7Q4iqa03w5V7KN-qWBcP4IXAqaSOBk,2060
|
|
77
77
|
gr4vy/models/braintreeoptions.py,sha256=A8igahmK4kHgOhZ0tUHjwaDFpqy0K0nnSb5fZcfXwBQ,2701
|
|
78
|
-
gr4vy/models/browse_payment_method_definitions_getop.py,sha256=5KwHBcFbni4TY3GOXXbrBrnmTTUYKT5NdXF1oDJ3oSM,1338
|
|
79
78
|
gr4vy/models/browserinfo.py,sha256=zDTJTe2gbG0JDBIEAGEg4k215XTd4HLKY7Y_sFWrciU,2649
|
|
80
79
|
gr4vy/models/buyer.py,sha256=KEN4eeI7HSPr8NcrR8ieEhwCeqZpALWHwCebfRSeL7U,3569
|
|
81
80
|
gr4vy/models/buyercreate.py,sha256=bFhAzie6osvQYc8YSlCwwZuEIaTmgmddVpD607fbHNQ,2555
|
|
@@ -363,7 +362,7 @@ gr4vy/models/transactionthreedsecuresummary.py,sha256=rRFrtiW0auNHauNBNDlIkDd1Wf
|
|
|
363
362
|
gr4vy/models/transactionupdate.py,sha256=BnCR-1aNA40v0L0ayps0NtiSSclYh6Zhvi4Py1GWmY0,3514
|
|
364
363
|
gr4vy/models/transactionvoid.py,sha256=z0Rk_1Yrq9zT79UDbJt7OyG_fILUHCcY0p0C9b5Si70,3138
|
|
365
364
|
gr4vy/models/travelhubcustomdata.py,sha256=qVMavG75E8LRhu-FlNNuu_I863VWYCUp29XH7NjOlqk,1690
|
|
366
|
-
gr4vy/models/travelhuboptions.py,sha256=
|
|
365
|
+
gr4vy/models/travelhuboptions.py,sha256=KAg0lkauHtpiwRueJWqzpp9T2Dh1EiVgU4cF8PAkqIg,2062
|
|
367
366
|
gr4vy/models/trustlyoptions.py,sha256=SRaY8jG5ZJnr3jq5UnQLY7JaMei5RW8STUaeytvIZ2o,1681
|
|
368
367
|
gr4vy/models/unregister_digital_wallet_domainop.py,sha256=Smnqsxxfn7TPXQeUm_Zkk34yMUF_4ehBkmkMnALqxac,1821
|
|
369
368
|
gr4vy/models/update_buyer_shipping_detailsop.py,sha256=9TirpUXVF_vLAmnD3iCxgloQTOaG0J12_03YFsQs0SA,2191
|
|
@@ -399,7 +398,7 @@ gr4vy/py.typed,sha256=zrp19r0G21lr2yRiMC0f8MFkQFGj9wMpSbboePMg8KM,59
|
|
|
399
398
|
gr4vy/refunds_sdk.py,sha256=kpU3NaVMsgKxhWblTF-jfAl_Cdpw1HqARP81TypFsjs,13551
|
|
400
399
|
gr4vy/report_executions_sdk.py,sha256=He-YQa3iTStnx2xAx8jfpnj8qX4vO4_cVHgvuVCWqos,18877
|
|
401
400
|
gr4vy/reports_sdk.py,sha256=TFAORPDv-jvsfStTk-lS07dTJ-ym4RKlmzi4YzeOcEk,59455
|
|
402
|
-
gr4vy/sdk.py,sha256=
|
|
401
|
+
gr4vy/sdk.py,sha256=MfaztXtoC-ioVEfV80BxbywQRG0dkfX47L4heekeyoY,9966
|
|
403
402
|
gr4vy/sdkconfiguration.py,sha256=aBQ8gY9aOjf1TL0kSLat8hEIoH4lCE9_PhihyhBpRE4,1985
|
|
404
403
|
gr4vy/sessions.py,sha256=yg9L1vMfHT6dNc6zjthULHFS2dC67QzXCv5WUFMn3DI,41609
|
|
405
404
|
gr4vy/transactions.py,sha256=nWi-T4cxdahtSb1riH5FJry_AM5RwbixGDoqCTTUeWs,151221
|
|
@@ -425,6 +424,6 @@ gr4vy/utils/unmarshal_json_response.py,sha256=H7jxugtMDuagdBXdpGiPf0Vr5-PWLETp8B
|
|
|
425
424
|
gr4vy/utils/url.py,sha256=BgGPgcTA6MRK4bF8fjP2dUopN3NzEzxWMXPBVg8NQUA,5254
|
|
426
425
|
gr4vy/utils/values.py,sha256=CcaCXEa3xHhkUDROyXZocN8f0bdITftv9Y0P9lTf0YM,3517
|
|
427
426
|
gr4vy/webhooks.py,sha256=2L-ZhdK-XU2X0AkVqgZvhfRqDCKUVs7R4UNCmZJR78w,1359
|
|
428
|
-
gr4vy-1.1.
|
|
429
|
-
gr4vy-1.1.
|
|
430
|
-
gr4vy-1.1.
|
|
427
|
+
gr4vy-1.1.29.dist-info/METADATA,sha256=um0YIWY41t3PdiGNW7OvWKdqDPSr0kGM5xk0k8dyhGk,44029
|
|
428
|
+
gr4vy-1.1.29.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
429
|
+
gr4vy-1.1.29.dist-info/RECORD,,
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
from gr4vy.types import BaseModel
|
|
5
|
-
from gr4vy.utils import FieldMetadata, HeaderMetadata
|
|
6
|
-
import pydantic
|
|
7
|
-
from typing import Optional
|
|
8
|
-
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class BrowsePaymentMethodDefinitionsGetGlobalsTypedDict(TypedDict):
|
|
12
|
-
merchant_account_id: NotRequired[str]
|
|
13
|
-
r"""The ID of the merchant account to use for this request."""
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
class BrowsePaymentMethodDefinitionsGetGlobals(BaseModel):
|
|
17
|
-
merchant_account_id: Annotated[
|
|
18
|
-
Optional[str],
|
|
19
|
-
pydantic.Field(alias="x-gr4vy-merchant-account-id"),
|
|
20
|
-
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
|
21
|
-
] = None
|
|
22
|
-
r"""The ID of the merchant account to use for this request."""
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
class BrowsePaymentMethodDefinitionsGetRequestTypedDict(TypedDict):
|
|
26
|
-
merchant_account_id: NotRequired[str]
|
|
27
|
-
r"""The ID of the merchant account to use for this request."""
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
class BrowsePaymentMethodDefinitionsGetRequest(BaseModel):
|
|
31
|
-
merchant_account_id: Annotated[
|
|
32
|
-
Optional[str],
|
|
33
|
-
pydantic.Field(alias="x-gr4vy-merchant-account-id"),
|
|
34
|
-
FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
|
|
35
|
-
] = None
|
|
36
|
-
r"""The ID of the merchant account to use for this request."""
|
|
File without changes
|