crypticorn 2.17.0rc1__py3-none-any.whl → 2.17.0rc2__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.
- crypticorn/__init__.py +2 -2
- crypticorn/auth/client/api/admin_api.py +415 -13
- crypticorn/auth/client/api/auth_api.py +2622 -113
- crypticorn/auth/client/api/service_api.py +258 -7
- crypticorn/auth/client/api/user_api.py +2485 -270
- crypticorn/auth/client/api/wallet_api.py +1518 -77
- crypticorn/auth/client/models/create_api_key_request.py +2 -1
- crypticorn/auth/client/models/get_api_keys200_response_inner.py +2 -1
- crypticorn/auth/client/rest.py +23 -4
- crypticorn/auth/main.py +8 -5
- crypticorn/client.py +227 -59
- crypticorn/common/__init__.py +0 -1
- crypticorn/common/metrics.py +4 -6
- crypticorn/common/middleware.py +10 -5
- crypticorn/common/pagination.py +137 -18
- crypticorn/common/router/admin_router.py +1 -1
- crypticorn/common/utils.py +2 -1
- crypticorn/common/warnings.py +1 -0
- crypticorn/hive/client/api/admin_api.py +1234 -51
- crypticorn/hive/client/api/data_api.py +517 -13
- crypticorn/hive/client/api/models_api.py +1657 -83
- crypticorn/hive/client/api/status_api.py +415 -13
- crypticorn/hive/client/models/api_error_identifier.py +1 -1
- crypticorn/hive/client/rest.py +23 -4
- crypticorn/hive/main.py +99 -25
- crypticorn/klines/client/api/admin_api.py +1234 -51
- crypticorn/klines/client/api/change_in_timeframe_api.py +278 -7
- crypticorn/klines/client/api/funding_rates_api.py +324 -7
- crypticorn/klines/client/api/ohlcv_data_api.py +399 -7
- crypticorn/klines/client/api/status_api.py +415 -13
- crypticorn/klines/client/api/symbols_api.py +225 -7
- crypticorn/klines/client/api/udf_api.py +1393 -120
- crypticorn/klines/client/models/api_error_identifier.py +3 -1
- crypticorn/klines/client/rest.py +23 -4
- crypticorn/klines/main.py +89 -12
- crypticorn/metrics/client/api/admin_api.py +1234 -51
- crypticorn/metrics/client/api/exchanges_api.py +1405 -140
- crypticorn/metrics/client/api/indicators_api.py +640 -13
- crypticorn/metrics/client/api/logs_api.py +305 -7
- crypticorn/metrics/client/api/marketcap_api.py +1240 -60
- crypticorn/metrics/client/api/markets_api.py +352 -7
- crypticorn/metrics/client/api/quote_currencies_api.py +237 -7
- crypticorn/metrics/client/api/status_api.py +415 -13
- crypticorn/metrics/client/api/tokens_api.py +400 -13
- crypticorn/metrics/client/configuration.py +4 -2
- crypticorn/metrics/client/rest.py +23 -4
- crypticorn/metrics/main.py +113 -19
- crypticorn/pay/client/api/admin_api.py +1720 -126
- crypticorn/pay/client/api/now_payments_api.py +1013 -42
- crypticorn/pay/client/api/payments_api.py +580 -13
- crypticorn/pay/client/api/products_api.py +915 -25
- crypticorn/pay/client/api/status_api.py +415 -13
- crypticorn/pay/client/configuration.py +2 -2
- crypticorn/pay/client/models/api_error_identifier.py +7 -7
- crypticorn/pay/client/models/scope.py +1 -0
- crypticorn/pay/client/rest.py +23 -4
- crypticorn/pay/main.py +10 -6
- crypticorn/trade/client/__init__.py +2 -1
- crypticorn/trade/client/api/__init__.py +0 -1
- crypticorn/trade/client/api/admin_api.py +1718 -123
- crypticorn/trade/client/api/api_keys_api.py +1596 -103
- crypticorn/trade/client/api/bots_api.py +1106 -47
- crypticorn/trade/client/api/exchanges_api.py +592 -19
- crypticorn/trade/client/api/notifications_api.py +1340 -112
- crypticorn/trade/client/api/orders_api.py +240 -7
- crypticorn/trade/client/api/status_api.py +415 -13
- crypticorn/trade/client/api/strategies_api.py +1170 -69
- crypticorn/trade/client/api/trading_actions_api.py +650 -19
- crypticorn/trade/client/models/__init__.py +2 -0
- crypticorn/trade/client/models/exchange.py +6 -1
- crypticorn/trade/client/models/exchange_key_balance.py +111 -0
- crypticorn/trade/client/models/futures_balance.py +27 -25
- crypticorn/trade/client/models/spot_balance.py +110 -0
- crypticorn/trade/client/models/strategy.py +5 -3
- crypticorn/trade/client/models/strategy_create.py +6 -4
- crypticorn/trade/client/models/strategy_exchange_info.py +16 -4
- crypticorn/trade/client/models/strategy_update.py +2 -2
- crypticorn/trade/client/rest.py +23 -4
- crypticorn/trade/main.py +15 -12
- {crypticorn-2.17.0rc1.dist-info → crypticorn-2.17.0rc2.dist-info}/METADATA +64 -20
- {crypticorn-2.17.0rc1.dist-info → crypticorn-2.17.0rc2.dist-info}/RECORD +85 -84
- crypticorn/trade/client/api/futures_trading_panel_api.py +0 -1285
- {crypticorn-2.17.0rc1.dist-info → crypticorn-2.17.0rc2.dist-info}/WHEEL +0 -0
- {crypticorn-2.17.0rc1.dist-info → crypticorn-2.17.0rc2.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.17.0rc1.dist-info → crypticorn-2.17.0rc2.dist-info}/licenses/LICENSE +0 -0
- {crypticorn-2.17.0rc1.dist-info → crypticorn-2.17.0rc2.dist-info}/top_level.txt +0 -0
@@ -27,6 +27,24 @@ from crypticorn.pay.client.api_client import ApiClient, RequestSerialized
|
|
27
27
|
from crypticorn.pay.client.api_response import ApiResponse
|
28
28
|
from crypticorn.pay.client.rest import RESTResponseType
|
29
29
|
|
30
|
+
# Import async_to_sync for sync methods
|
31
|
+
try:
|
32
|
+
from asgiref.sync import async_to_sync
|
33
|
+
|
34
|
+
_HAS_ASGIREF = True
|
35
|
+
except ImportError:
|
36
|
+
_HAS_ASGIREF = False
|
37
|
+
|
38
|
+
def async_to_sync(async_func):
|
39
|
+
"""Fallback decorator that raises an error if asgiref is not available."""
|
40
|
+
|
41
|
+
def wrapper(*args, **kwargs):
|
42
|
+
raise ImportError(
|
43
|
+
"asgiref is required for sync methods. Install with: pip install asgiref"
|
44
|
+
)
|
45
|
+
|
46
|
+
return wrapper
|
47
|
+
|
30
48
|
|
31
49
|
class ProductsApi:
|
32
50
|
"""NOTE: This class is auto generated by OpenAPI Generator
|
@@ -35,13 +53,135 @@ class ProductsApi:
|
|
35
53
|
Do not edit the class manually.
|
36
54
|
"""
|
37
55
|
|
38
|
-
def __init__(self, api_client=None) -> None:
|
56
|
+
def __init__(self, api_client=None, is_sync: bool = False) -> None:
|
39
57
|
if api_client is None:
|
40
58
|
api_client = ApiClient.get_default()
|
41
59
|
self.api_client = api_client
|
60
|
+
self.is_sync = is_sync
|
42
61
|
|
43
62
|
@validate_call
|
44
|
-
|
63
|
+
def create_product(
|
64
|
+
self,
|
65
|
+
product_create: ProductCreate,
|
66
|
+
_request_timeout: Union[
|
67
|
+
None,
|
68
|
+
Annotated[StrictFloat, Field(gt=0)],
|
69
|
+
Tuple[
|
70
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
71
|
+
],
|
72
|
+
] = None,
|
73
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
74
|
+
_content_type: Optional[StrictStr] = None,
|
75
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
76
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
77
|
+
) -> Product:
|
78
|
+
"""Create Product
|
79
|
+
|
80
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
81
|
+
"""
|
82
|
+
if self.is_sync:
|
83
|
+
return self._create_product_sync(
|
84
|
+
product_create=product_create,
|
85
|
+
_request_timeout=_request_timeout,
|
86
|
+
_request_auth=_request_auth,
|
87
|
+
_content_type=_content_type,
|
88
|
+
_headers=_headers,
|
89
|
+
_host_index=_host_index,
|
90
|
+
)
|
91
|
+
|
92
|
+
else:
|
93
|
+
return self._create_product_async(
|
94
|
+
product_create=product_create,
|
95
|
+
_request_timeout=_request_timeout,
|
96
|
+
_request_auth=_request_auth,
|
97
|
+
_content_type=_content_type,
|
98
|
+
_headers=_headers,
|
99
|
+
_host_index=_host_index,
|
100
|
+
)
|
101
|
+
|
102
|
+
@validate_call
|
103
|
+
def create_product_with_http_info(
|
104
|
+
self,
|
105
|
+
product_create: ProductCreate,
|
106
|
+
_request_timeout: Union[
|
107
|
+
None,
|
108
|
+
Annotated[StrictFloat, Field(gt=0)],
|
109
|
+
Tuple[
|
110
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
111
|
+
],
|
112
|
+
] = None,
|
113
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
114
|
+
_content_type: Optional[StrictStr] = None,
|
115
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
116
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
117
|
+
) -> ApiResponse[Product]:
|
118
|
+
"""Create Product with HTTP info
|
119
|
+
|
120
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
121
|
+
"""
|
122
|
+
if self.is_sync:
|
123
|
+
return self._create_product_sync_with_http_info(
|
124
|
+
product_create=product_create,
|
125
|
+
_request_timeout=_request_timeout,
|
126
|
+
_request_auth=_request_auth,
|
127
|
+
_content_type=_content_type,
|
128
|
+
_headers=_headers,
|
129
|
+
_host_index=_host_index,
|
130
|
+
)
|
131
|
+
|
132
|
+
else:
|
133
|
+
return self._create_product_async_with_http_info(
|
134
|
+
product_create=product_create,
|
135
|
+
_request_timeout=_request_timeout,
|
136
|
+
_request_auth=_request_auth,
|
137
|
+
_content_type=_content_type,
|
138
|
+
_headers=_headers,
|
139
|
+
_host_index=_host_index,
|
140
|
+
)
|
141
|
+
|
142
|
+
@validate_call
|
143
|
+
def create_product_without_preload_content(
|
144
|
+
self,
|
145
|
+
product_create: ProductCreate,
|
146
|
+
_request_timeout: Union[
|
147
|
+
None,
|
148
|
+
Annotated[StrictFloat, Field(gt=0)],
|
149
|
+
Tuple[
|
150
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
151
|
+
],
|
152
|
+
] = None,
|
153
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
154
|
+
_content_type: Optional[StrictStr] = None,
|
155
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
156
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
157
|
+
) -> RESTResponseType:
|
158
|
+
"""Create Product without preloading content
|
159
|
+
|
160
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
161
|
+
"""
|
162
|
+
if self.is_sync:
|
163
|
+
return self._create_product_sync_without_preload_content(
|
164
|
+
product_create=product_create,
|
165
|
+
_request_timeout=_request_timeout,
|
166
|
+
_request_auth=_request_auth,
|
167
|
+
_content_type=_content_type,
|
168
|
+
_headers=_headers,
|
169
|
+
_host_index=_host_index,
|
170
|
+
)
|
171
|
+
|
172
|
+
else:
|
173
|
+
return self._create_product_async_without_preload_content(
|
174
|
+
product_create=product_create,
|
175
|
+
_request_timeout=_request_timeout,
|
176
|
+
_request_auth=_request_auth,
|
177
|
+
_content_type=_content_type,
|
178
|
+
_headers=_headers,
|
179
|
+
_host_index=_host_index,
|
180
|
+
)
|
181
|
+
|
182
|
+
# Private async implementation methods
|
183
|
+
@validate_call
|
184
|
+
async def _create_product_async(
|
45
185
|
self,
|
46
186
|
product_create: ProductCreate,
|
47
187
|
_request_timeout: Union[
|
@@ -105,7 +245,7 @@ class ProductsApi:
|
|
105
245
|
).data
|
106
246
|
|
107
247
|
@validate_call
|
108
|
-
async def
|
248
|
+
async def _create_product_async_with_http_info(
|
109
249
|
self,
|
110
250
|
product_create: ProductCreate,
|
111
251
|
_request_timeout: Union[
|
@@ -164,12 +304,11 @@ class ProductsApi:
|
|
164
304
|
)
|
165
305
|
await response_data.read()
|
166
306
|
return self.api_client.response_deserialize(
|
167
|
-
response_data=response_data,
|
168
|
-
response_types_map=_response_types_map,
|
307
|
+
response_data=response_data, response_types_map=_response_types_map
|
169
308
|
)
|
170
309
|
|
171
310
|
@validate_call
|
172
|
-
async def
|
311
|
+
async def _create_product_async_without_preload_content(
|
173
312
|
self,
|
174
313
|
product_create: ProductCreate,
|
175
314
|
_request_timeout: Union[
|
@@ -226,7 +365,86 @@ class ProductsApi:
|
|
226
365
|
response_data = await self.api_client.call_api(
|
227
366
|
*_param, _request_timeout=_request_timeout
|
228
367
|
)
|
229
|
-
return response_data
|
368
|
+
return response_data
|
369
|
+
|
370
|
+
# Private sync implementation methods
|
371
|
+
@validate_call
|
372
|
+
def _create_product_sync(
|
373
|
+
self,
|
374
|
+
product_create: ProductCreate,
|
375
|
+
_request_timeout: Union[
|
376
|
+
None,
|
377
|
+
Annotated[StrictFloat, Field(gt=0)],
|
378
|
+
Tuple[
|
379
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
380
|
+
],
|
381
|
+
] = None,
|
382
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
383
|
+
_content_type: Optional[StrictStr] = None,
|
384
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
385
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
386
|
+
) -> Product:
|
387
|
+
"""Synchronous version of create_product"""
|
388
|
+
return async_to_sync(self._create_product_async)(
|
389
|
+
product_create=product_create,
|
390
|
+
_request_timeout=_request_timeout,
|
391
|
+
_request_auth=_request_auth,
|
392
|
+
_content_type=_content_type,
|
393
|
+
_headers=_headers,
|
394
|
+
_host_index=_host_index,
|
395
|
+
)
|
396
|
+
|
397
|
+
@validate_call
|
398
|
+
def _create_product_sync_with_http_info(
|
399
|
+
self,
|
400
|
+
product_create: ProductCreate,
|
401
|
+
_request_timeout: Union[
|
402
|
+
None,
|
403
|
+
Annotated[StrictFloat, Field(gt=0)],
|
404
|
+
Tuple[
|
405
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
406
|
+
],
|
407
|
+
] = None,
|
408
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
409
|
+
_content_type: Optional[StrictStr] = None,
|
410
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
411
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
412
|
+
) -> ApiResponse[Product]:
|
413
|
+
"""Synchronous version of create_product_with_http_info"""
|
414
|
+
return async_to_sync(self._create_product_async_with_http_info)(
|
415
|
+
product_create=product_create,
|
416
|
+
_request_timeout=_request_timeout,
|
417
|
+
_request_auth=_request_auth,
|
418
|
+
_content_type=_content_type,
|
419
|
+
_headers=_headers,
|
420
|
+
_host_index=_host_index,
|
421
|
+
)
|
422
|
+
|
423
|
+
@validate_call
|
424
|
+
def _create_product_sync_without_preload_content(
|
425
|
+
self,
|
426
|
+
product_create: ProductCreate,
|
427
|
+
_request_timeout: Union[
|
428
|
+
None,
|
429
|
+
Annotated[StrictFloat, Field(gt=0)],
|
430
|
+
Tuple[
|
431
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
432
|
+
],
|
433
|
+
] = None,
|
434
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
435
|
+
_content_type: Optional[StrictStr] = None,
|
436
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
437
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
438
|
+
) -> RESTResponseType:
|
439
|
+
"""Synchronous version of create_product_without_preload_content"""
|
440
|
+
return async_to_sync(self._create_product_async_without_preload_content)(
|
441
|
+
product_create=product_create,
|
442
|
+
_request_timeout=_request_timeout,
|
443
|
+
_request_auth=_request_auth,
|
444
|
+
_content_type=_content_type,
|
445
|
+
_headers=_headers,
|
446
|
+
_host_index=_host_index,
|
447
|
+
)
|
230
448
|
|
231
449
|
def _create_product_serialize(
|
232
450
|
self,
|
@@ -293,7 +511,119 @@ class ProductsApi:
|
|
293
511
|
)
|
294
512
|
|
295
513
|
@validate_call
|
296
|
-
|
514
|
+
def get_product_usage(
|
515
|
+
self,
|
516
|
+
_request_timeout: Union[
|
517
|
+
None,
|
518
|
+
Annotated[StrictFloat, Field(gt=0)],
|
519
|
+
Tuple[
|
520
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
521
|
+
],
|
522
|
+
] = None,
|
523
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
524
|
+
_content_type: Optional[StrictStr] = None,
|
525
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
526
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
527
|
+
) -> List[List[object]]:
|
528
|
+
"""Get Product Usage
|
529
|
+
|
530
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
531
|
+
"""
|
532
|
+
if self.is_sync:
|
533
|
+
return self._get_product_usage_sync(
|
534
|
+
_request_timeout=_request_timeout,
|
535
|
+
_request_auth=_request_auth,
|
536
|
+
_content_type=_content_type,
|
537
|
+
_headers=_headers,
|
538
|
+
_host_index=_host_index,
|
539
|
+
)
|
540
|
+
|
541
|
+
else:
|
542
|
+
return self._get_product_usage_async(
|
543
|
+
_request_timeout=_request_timeout,
|
544
|
+
_request_auth=_request_auth,
|
545
|
+
_content_type=_content_type,
|
546
|
+
_headers=_headers,
|
547
|
+
_host_index=_host_index,
|
548
|
+
)
|
549
|
+
|
550
|
+
@validate_call
|
551
|
+
def get_product_usage_with_http_info(
|
552
|
+
self,
|
553
|
+
_request_timeout: Union[
|
554
|
+
None,
|
555
|
+
Annotated[StrictFloat, Field(gt=0)],
|
556
|
+
Tuple[
|
557
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
558
|
+
],
|
559
|
+
] = None,
|
560
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
561
|
+
_content_type: Optional[StrictStr] = None,
|
562
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
563
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
564
|
+
) -> ApiResponse[List[List[object]]]:
|
565
|
+
"""Get Product Usage with HTTP info
|
566
|
+
|
567
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
568
|
+
"""
|
569
|
+
if self.is_sync:
|
570
|
+
return self._get_product_usage_sync_with_http_info(
|
571
|
+
_request_timeout=_request_timeout,
|
572
|
+
_request_auth=_request_auth,
|
573
|
+
_content_type=_content_type,
|
574
|
+
_headers=_headers,
|
575
|
+
_host_index=_host_index,
|
576
|
+
)
|
577
|
+
|
578
|
+
else:
|
579
|
+
return self._get_product_usage_async_with_http_info(
|
580
|
+
_request_timeout=_request_timeout,
|
581
|
+
_request_auth=_request_auth,
|
582
|
+
_content_type=_content_type,
|
583
|
+
_headers=_headers,
|
584
|
+
_host_index=_host_index,
|
585
|
+
)
|
586
|
+
|
587
|
+
@validate_call
|
588
|
+
def get_product_usage_without_preload_content(
|
589
|
+
self,
|
590
|
+
_request_timeout: Union[
|
591
|
+
None,
|
592
|
+
Annotated[StrictFloat, Field(gt=0)],
|
593
|
+
Tuple[
|
594
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
595
|
+
],
|
596
|
+
] = None,
|
597
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
598
|
+
_content_type: Optional[StrictStr] = None,
|
599
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
600
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
601
|
+
) -> RESTResponseType:
|
602
|
+
"""Get Product Usage without preloading content
|
603
|
+
|
604
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
605
|
+
"""
|
606
|
+
if self.is_sync:
|
607
|
+
return self._get_product_usage_sync_without_preload_content(
|
608
|
+
_request_timeout=_request_timeout,
|
609
|
+
_request_auth=_request_auth,
|
610
|
+
_content_type=_content_type,
|
611
|
+
_headers=_headers,
|
612
|
+
_host_index=_host_index,
|
613
|
+
)
|
614
|
+
|
615
|
+
else:
|
616
|
+
return self._get_product_usage_async_without_preload_content(
|
617
|
+
_request_timeout=_request_timeout,
|
618
|
+
_request_auth=_request_auth,
|
619
|
+
_content_type=_content_type,
|
620
|
+
_headers=_headers,
|
621
|
+
_host_index=_host_index,
|
622
|
+
)
|
623
|
+
|
624
|
+
# Private async implementation methods
|
625
|
+
@validate_call
|
626
|
+
async def _get_product_usage_async(
|
297
627
|
self,
|
298
628
|
_request_timeout: Union[
|
299
629
|
None,
|
@@ -353,7 +683,7 @@ class ProductsApi:
|
|
353
683
|
).data
|
354
684
|
|
355
685
|
@validate_call
|
356
|
-
async def
|
686
|
+
async def _get_product_usage_async_with_http_info(
|
357
687
|
self,
|
358
688
|
_request_timeout: Union[
|
359
689
|
None,
|
@@ -408,12 +738,11 @@ class ProductsApi:
|
|
408
738
|
)
|
409
739
|
await response_data.read()
|
410
740
|
return self.api_client.response_deserialize(
|
411
|
-
response_data=response_data,
|
412
|
-
response_types_map=_response_types_map,
|
741
|
+
response_data=response_data, response_types_map=_response_types_map
|
413
742
|
)
|
414
743
|
|
415
744
|
@validate_call
|
416
|
-
async def
|
745
|
+
async def _get_product_usage_async_without_preload_content(
|
417
746
|
self,
|
418
747
|
_request_timeout: Union[
|
419
748
|
None,
|
@@ -466,7 +795,80 @@ class ProductsApi:
|
|
466
795
|
response_data = await self.api_client.call_api(
|
467
796
|
*_param, _request_timeout=_request_timeout
|
468
797
|
)
|
469
|
-
return response_data
|
798
|
+
return response_data
|
799
|
+
|
800
|
+
# Private sync implementation methods
|
801
|
+
@validate_call
|
802
|
+
def _get_product_usage_sync(
|
803
|
+
self,
|
804
|
+
_request_timeout: Union[
|
805
|
+
None,
|
806
|
+
Annotated[StrictFloat, Field(gt=0)],
|
807
|
+
Tuple[
|
808
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
809
|
+
],
|
810
|
+
] = None,
|
811
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
812
|
+
_content_type: Optional[StrictStr] = None,
|
813
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
814
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
815
|
+
) -> List[List[object]]:
|
816
|
+
"""Synchronous version of get_product_usage"""
|
817
|
+
return async_to_sync(self._get_product_usage_async)(
|
818
|
+
_request_timeout=_request_timeout,
|
819
|
+
_request_auth=_request_auth,
|
820
|
+
_content_type=_content_type,
|
821
|
+
_headers=_headers,
|
822
|
+
_host_index=_host_index,
|
823
|
+
)
|
824
|
+
|
825
|
+
@validate_call
|
826
|
+
def _get_product_usage_sync_with_http_info(
|
827
|
+
self,
|
828
|
+
_request_timeout: Union[
|
829
|
+
None,
|
830
|
+
Annotated[StrictFloat, Field(gt=0)],
|
831
|
+
Tuple[
|
832
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
833
|
+
],
|
834
|
+
] = None,
|
835
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
836
|
+
_content_type: Optional[StrictStr] = None,
|
837
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
838
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
839
|
+
) -> ApiResponse[List[List[object]]]:
|
840
|
+
"""Synchronous version of get_product_usage_with_http_info"""
|
841
|
+
return async_to_sync(self._get_product_usage_async_with_http_info)(
|
842
|
+
_request_timeout=_request_timeout,
|
843
|
+
_request_auth=_request_auth,
|
844
|
+
_content_type=_content_type,
|
845
|
+
_headers=_headers,
|
846
|
+
_host_index=_host_index,
|
847
|
+
)
|
848
|
+
|
849
|
+
@validate_call
|
850
|
+
def _get_product_usage_sync_without_preload_content(
|
851
|
+
self,
|
852
|
+
_request_timeout: Union[
|
853
|
+
None,
|
854
|
+
Annotated[StrictFloat, Field(gt=0)],
|
855
|
+
Tuple[
|
856
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
857
|
+
],
|
858
|
+
] = None,
|
859
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
860
|
+
_content_type: Optional[StrictStr] = None,
|
861
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
862
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
863
|
+
) -> RESTResponseType:
|
864
|
+
"""Synchronous version of get_product_usage_without_preload_content"""
|
865
|
+
return async_to_sync(self._get_product_usage_async_without_preload_content)(
|
866
|
+
_request_timeout=_request_timeout,
|
867
|
+
_request_auth=_request_auth,
|
868
|
+
_content_type=_content_type,
|
869
|
+
_headers=_headers,
|
870
|
+
_host_index=_host_index,
|
871
|
+
)
|
470
872
|
|
471
873
|
def _get_product_usage_serialize(
|
472
874
|
self,
|
@@ -520,7 +922,167 @@ class ProductsApi:
|
|
520
922
|
)
|
521
923
|
|
522
924
|
@validate_call
|
523
|
-
|
925
|
+
def get_products(
|
926
|
+
self,
|
927
|
+
limit: Annotated[
|
928
|
+
Optional[StrictInt],
|
929
|
+
Field(
|
930
|
+
description="Limit the number of products returned. 0 means no limit."
|
931
|
+
),
|
932
|
+
] = None,
|
933
|
+
offset: Annotated[
|
934
|
+
Optional[StrictInt],
|
935
|
+
Field(
|
936
|
+
description="Offset the number of products returned. 0 means no offset."
|
937
|
+
),
|
938
|
+
] = None,
|
939
|
+
_request_timeout: Union[
|
940
|
+
None,
|
941
|
+
Annotated[StrictFloat, Field(gt=0)],
|
942
|
+
Tuple[
|
943
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
944
|
+
],
|
945
|
+
] = None,
|
946
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
947
|
+
_content_type: Optional[StrictStr] = None,
|
948
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
949
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
950
|
+
) -> List[Product]:
|
951
|
+
"""Get Products
|
952
|
+
|
953
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
954
|
+
"""
|
955
|
+
if self.is_sync:
|
956
|
+
return self._get_products_sync(
|
957
|
+
limit=limit,
|
958
|
+
offset=offset,
|
959
|
+
_request_timeout=_request_timeout,
|
960
|
+
_request_auth=_request_auth,
|
961
|
+
_content_type=_content_type,
|
962
|
+
_headers=_headers,
|
963
|
+
_host_index=_host_index,
|
964
|
+
)
|
965
|
+
|
966
|
+
else:
|
967
|
+
return self._get_products_async(
|
968
|
+
limit=limit,
|
969
|
+
offset=offset,
|
970
|
+
_request_timeout=_request_timeout,
|
971
|
+
_request_auth=_request_auth,
|
972
|
+
_content_type=_content_type,
|
973
|
+
_headers=_headers,
|
974
|
+
_host_index=_host_index,
|
975
|
+
)
|
976
|
+
|
977
|
+
@validate_call
|
978
|
+
def get_products_with_http_info(
|
979
|
+
self,
|
980
|
+
limit: Annotated[
|
981
|
+
Optional[StrictInt],
|
982
|
+
Field(
|
983
|
+
description="Limit the number of products returned. 0 means no limit."
|
984
|
+
),
|
985
|
+
] = None,
|
986
|
+
offset: Annotated[
|
987
|
+
Optional[StrictInt],
|
988
|
+
Field(
|
989
|
+
description="Offset the number of products returned. 0 means no offset."
|
990
|
+
),
|
991
|
+
] = None,
|
992
|
+
_request_timeout: Union[
|
993
|
+
None,
|
994
|
+
Annotated[StrictFloat, Field(gt=0)],
|
995
|
+
Tuple[
|
996
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
997
|
+
],
|
998
|
+
] = None,
|
999
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1000
|
+
_content_type: Optional[StrictStr] = None,
|
1001
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1002
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1003
|
+
) -> ApiResponse[List[Product]]:
|
1004
|
+
"""Get Products with HTTP info
|
1005
|
+
|
1006
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
1007
|
+
"""
|
1008
|
+
if self.is_sync:
|
1009
|
+
return self._get_products_sync_with_http_info(
|
1010
|
+
limit=limit,
|
1011
|
+
offset=offset,
|
1012
|
+
_request_timeout=_request_timeout,
|
1013
|
+
_request_auth=_request_auth,
|
1014
|
+
_content_type=_content_type,
|
1015
|
+
_headers=_headers,
|
1016
|
+
_host_index=_host_index,
|
1017
|
+
)
|
1018
|
+
|
1019
|
+
else:
|
1020
|
+
return self._get_products_async_with_http_info(
|
1021
|
+
limit=limit,
|
1022
|
+
offset=offset,
|
1023
|
+
_request_timeout=_request_timeout,
|
1024
|
+
_request_auth=_request_auth,
|
1025
|
+
_content_type=_content_type,
|
1026
|
+
_headers=_headers,
|
1027
|
+
_host_index=_host_index,
|
1028
|
+
)
|
1029
|
+
|
1030
|
+
@validate_call
|
1031
|
+
def get_products_without_preload_content(
|
1032
|
+
self,
|
1033
|
+
limit: Annotated[
|
1034
|
+
Optional[StrictInt],
|
1035
|
+
Field(
|
1036
|
+
description="Limit the number of products returned. 0 means no limit."
|
1037
|
+
),
|
1038
|
+
] = None,
|
1039
|
+
offset: Annotated[
|
1040
|
+
Optional[StrictInt],
|
1041
|
+
Field(
|
1042
|
+
description="Offset the number of products returned. 0 means no offset."
|
1043
|
+
),
|
1044
|
+
] = None,
|
1045
|
+
_request_timeout: Union[
|
1046
|
+
None,
|
1047
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1048
|
+
Tuple[
|
1049
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1050
|
+
],
|
1051
|
+
] = None,
|
1052
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1053
|
+
_content_type: Optional[StrictStr] = None,
|
1054
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1055
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1056
|
+
) -> RESTResponseType:
|
1057
|
+
"""Get Products without preloading content
|
1058
|
+
|
1059
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
1060
|
+
"""
|
1061
|
+
if self.is_sync:
|
1062
|
+
return self._get_products_sync_without_preload_content(
|
1063
|
+
limit=limit,
|
1064
|
+
offset=offset,
|
1065
|
+
_request_timeout=_request_timeout,
|
1066
|
+
_request_auth=_request_auth,
|
1067
|
+
_content_type=_content_type,
|
1068
|
+
_headers=_headers,
|
1069
|
+
_host_index=_host_index,
|
1070
|
+
)
|
1071
|
+
|
1072
|
+
else:
|
1073
|
+
return self._get_products_async_without_preload_content(
|
1074
|
+
limit=limit,
|
1075
|
+
offset=offset,
|
1076
|
+
_request_timeout=_request_timeout,
|
1077
|
+
_request_auth=_request_auth,
|
1078
|
+
_content_type=_content_type,
|
1079
|
+
_headers=_headers,
|
1080
|
+
_host_index=_host_index,
|
1081
|
+
)
|
1082
|
+
|
1083
|
+
# Private async implementation methods
|
1084
|
+
@validate_call
|
1085
|
+
async def _get_products_async(
|
524
1086
|
self,
|
525
1087
|
limit: Annotated[
|
526
1088
|
Optional[StrictInt],
|
@@ -598,7 +1160,7 @@ class ProductsApi:
|
|
598
1160
|
).data
|
599
1161
|
|
600
1162
|
@validate_call
|
601
|
-
async def
|
1163
|
+
async def _get_products_async_with_http_info(
|
602
1164
|
self,
|
603
1165
|
limit: Annotated[
|
604
1166
|
Optional[StrictInt],
|
@@ -671,12 +1233,11 @@ class ProductsApi:
|
|
671
1233
|
)
|
672
1234
|
await response_data.read()
|
673
1235
|
return self.api_client.response_deserialize(
|
674
|
-
response_data=response_data,
|
675
|
-
response_types_map=_response_types_map,
|
1236
|
+
response_data=response_data, response_types_map=_response_types_map
|
676
1237
|
)
|
677
1238
|
|
678
1239
|
@validate_call
|
679
|
-
async def
|
1240
|
+
async def _get_products_async_without_preload_content(
|
680
1241
|
self,
|
681
1242
|
limit: Annotated[
|
682
1243
|
Optional[StrictInt],
|
@@ -747,7 +1308,122 @@ class ProductsApi:
|
|
747
1308
|
response_data = await self.api_client.call_api(
|
748
1309
|
*_param, _request_timeout=_request_timeout
|
749
1310
|
)
|
750
|
-
return response_data
|
1311
|
+
return response_data
|
1312
|
+
|
1313
|
+
# Private sync implementation methods
|
1314
|
+
@validate_call
|
1315
|
+
def _get_products_sync(
|
1316
|
+
self,
|
1317
|
+
limit: Annotated[
|
1318
|
+
Optional[StrictInt],
|
1319
|
+
Field(
|
1320
|
+
description="Limit the number of products returned. 0 means no limit."
|
1321
|
+
),
|
1322
|
+
] = None,
|
1323
|
+
offset: Annotated[
|
1324
|
+
Optional[StrictInt],
|
1325
|
+
Field(
|
1326
|
+
description="Offset the number of products returned. 0 means no offset."
|
1327
|
+
),
|
1328
|
+
] = None,
|
1329
|
+
_request_timeout: Union[
|
1330
|
+
None,
|
1331
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1332
|
+
Tuple[
|
1333
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1334
|
+
],
|
1335
|
+
] = None,
|
1336
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1337
|
+
_content_type: Optional[StrictStr] = None,
|
1338
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1339
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1340
|
+
) -> List[Product]:
|
1341
|
+
"""Synchronous version of get_products"""
|
1342
|
+
return async_to_sync(self._get_products_async)(
|
1343
|
+
limit=limit,
|
1344
|
+
offset=offset,
|
1345
|
+
_request_timeout=_request_timeout,
|
1346
|
+
_request_auth=_request_auth,
|
1347
|
+
_content_type=_content_type,
|
1348
|
+
_headers=_headers,
|
1349
|
+
_host_index=_host_index,
|
1350
|
+
)
|
1351
|
+
|
1352
|
+
@validate_call
|
1353
|
+
def _get_products_sync_with_http_info(
|
1354
|
+
self,
|
1355
|
+
limit: Annotated[
|
1356
|
+
Optional[StrictInt],
|
1357
|
+
Field(
|
1358
|
+
description="Limit the number of products returned. 0 means no limit."
|
1359
|
+
),
|
1360
|
+
] = None,
|
1361
|
+
offset: Annotated[
|
1362
|
+
Optional[StrictInt],
|
1363
|
+
Field(
|
1364
|
+
description="Offset the number of products returned. 0 means no offset."
|
1365
|
+
),
|
1366
|
+
] = None,
|
1367
|
+
_request_timeout: Union[
|
1368
|
+
None,
|
1369
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1370
|
+
Tuple[
|
1371
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1372
|
+
],
|
1373
|
+
] = None,
|
1374
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1375
|
+
_content_type: Optional[StrictStr] = None,
|
1376
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1377
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1378
|
+
) -> ApiResponse[List[Product]]:
|
1379
|
+
"""Synchronous version of get_products_with_http_info"""
|
1380
|
+
return async_to_sync(self._get_products_async_with_http_info)(
|
1381
|
+
limit=limit,
|
1382
|
+
offset=offset,
|
1383
|
+
_request_timeout=_request_timeout,
|
1384
|
+
_request_auth=_request_auth,
|
1385
|
+
_content_type=_content_type,
|
1386
|
+
_headers=_headers,
|
1387
|
+
_host_index=_host_index,
|
1388
|
+
)
|
1389
|
+
|
1390
|
+
@validate_call
|
1391
|
+
def _get_products_sync_without_preload_content(
|
1392
|
+
self,
|
1393
|
+
limit: Annotated[
|
1394
|
+
Optional[StrictInt],
|
1395
|
+
Field(
|
1396
|
+
description="Limit the number of products returned. 0 means no limit."
|
1397
|
+
),
|
1398
|
+
] = None,
|
1399
|
+
offset: Annotated[
|
1400
|
+
Optional[StrictInt],
|
1401
|
+
Field(
|
1402
|
+
description="Offset the number of products returned. 0 means no offset."
|
1403
|
+
),
|
1404
|
+
] = None,
|
1405
|
+
_request_timeout: Union[
|
1406
|
+
None,
|
1407
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1408
|
+
Tuple[
|
1409
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1410
|
+
],
|
1411
|
+
] = None,
|
1412
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1413
|
+
_content_type: Optional[StrictStr] = None,
|
1414
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1415
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1416
|
+
) -> RESTResponseType:
|
1417
|
+
"""Synchronous version of get_products_without_preload_content"""
|
1418
|
+
return async_to_sync(self._get_products_async_without_preload_content)(
|
1419
|
+
limit=limit,
|
1420
|
+
offset=offset,
|
1421
|
+
_request_timeout=_request_timeout,
|
1422
|
+
_request_auth=_request_auth,
|
1423
|
+
_content_type=_content_type,
|
1424
|
+
_headers=_headers,
|
1425
|
+
_host_index=_host_index,
|
1426
|
+
)
|
751
1427
|
|
752
1428
|
def _get_products_serialize(
|
753
1429
|
self,
|
@@ -811,7 +1487,137 @@ class ProductsApi:
|
|
811
1487
|
)
|
812
1488
|
|
813
1489
|
@validate_call
|
814
|
-
|
1490
|
+
def update_product(
|
1491
|
+
self,
|
1492
|
+
id: Annotated[StrictStr, Field(description="The ID of the product to update")],
|
1493
|
+
product_update: ProductUpdate,
|
1494
|
+
_request_timeout: Union[
|
1495
|
+
None,
|
1496
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1497
|
+
Tuple[
|
1498
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1499
|
+
],
|
1500
|
+
] = None,
|
1501
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1502
|
+
_content_type: Optional[StrictStr] = None,
|
1503
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1504
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1505
|
+
) -> Product:
|
1506
|
+
"""Update Product
|
1507
|
+
|
1508
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
1509
|
+
"""
|
1510
|
+
if self.is_sync:
|
1511
|
+
return self._update_product_sync(
|
1512
|
+
id=id,
|
1513
|
+
product_update=product_update,
|
1514
|
+
_request_timeout=_request_timeout,
|
1515
|
+
_request_auth=_request_auth,
|
1516
|
+
_content_type=_content_type,
|
1517
|
+
_headers=_headers,
|
1518
|
+
_host_index=_host_index,
|
1519
|
+
)
|
1520
|
+
|
1521
|
+
else:
|
1522
|
+
return self._update_product_async(
|
1523
|
+
id=id,
|
1524
|
+
product_update=product_update,
|
1525
|
+
_request_timeout=_request_timeout,
|
1526
|
+
_request_auth=_request_auth,
|
1527
|
+
_content_type=_content_type,
|
1528
|
+
_headers=_headers,
|
1529
|
+
_host_index=_host_index,
|
1530
|
+
)
|
1531
|
+
|
1532
|
+
@validate_call
|
1533
|
+
def update_product_with_http_info(
|
1534
|
+
self,
|
1535
|
+
id: Annotated[StrictStr, Field(description="The ID of the product to update")],
|
1536
|
+
product_update: ProductUpdate,
|
1537
|
+
_request_timeout: Union[
|
1538
|
+
None,
|
1539
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1540
|
+
Tuple[
|
1541
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1542
|
+
],
|
1543
|
+
] = None,
|
1544
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1545
|
+
_content_type: Optional[StrictStr] = None,
|
1546
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1547
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1548
|
+
) -> ApiResponse[Product]:
|
1549
|
+
"""Update Product with HTTP info
|
1550
|
+
|
1551
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
1552
|
+
"""
|
1553
|
+
if self.is_sync:
|
1554
|
+
return self._update_product_sync_with_http_info(
|
1555
|
+
id=id,
|
1556
|
+
product_update=product_update,
|
1557
|
+
_request_timeout=_request_timeout,
|
1558
|
+
_request_auth=_request_auth,
|
1559
|
+
_content_type=_content_type,
|
1560
|
+
_headers=_headers,
|
1561
|
+
_host_index=_host_index,
|
1562
|
+
)
|
1563
|
+
|
1564
|
+
else:
|
1565
|
+
return self._update_product_async_with_http_info(
|
1566
|
+
id=id,
|
1567
|
+
product_update=product_update,
|
1568
|
+
_request_timeout=_request_timeout,
|
1569
|
+
_request_auth=_request_auth,
|
1570
|
+
_content_type=_content_type,
|
1571
|
+
_headers=_headers,
|
1572
|
+
_host_index=_host_index,
|
1573
|
+
)
|
1574
|
+
|
1575
|
+
@validate_call
|
1576
|
+
def update_product_without_preload_content(
|
1577
|
+
self,
|
1578
|
+
id: Annotated[StrictStr, Field(description="The ID of the product to update")],
|
1579
|
+
product_update: ProductUpdate,
|
1580
|
+
_request_timeout: Union[
|
1581
|
+
None,
|
1582
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1583
|
+
Tuple[
|
1584
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1585
|
+
],
|
1586
|
+
] = None,
|
1587
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1588
|
+
_content_type: Optional[StrictStr] = None,
|
1589
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1590
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1591
|
+
) -> RESTResponseType:
|
1592
|
+
"""Update Product without preloading content
|
1593
|
+
|
1594
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
1595
|
+
"""
|
1596
|
+
if self.is_sync:
|
1597
|
+
return self._update_product_sync_without_preload_content(
|
1598
|
+
id=id,
|
1599
|
+
product_update=product_update,
|
1600
|
+
_request_timeout=_request_timeout,
|
1601
|
+
_request_auth=_request_auth,
|
1602
|
+
_content_type=_content_type,
|
1603
|
+
_headers=_headers,
|
1604
|
+
_host_index=_host_index,
|
1605
|
+
)
|
1606
|
+
|
1607
|
+
else:
|
1608
|
+
return self._update_product_async_without_preload_content(
|
1609
|
+
id=id,
|
1610
|
+
product_update=product_update,
|
1611
|
+
_request_timeout=_request_timeout,
|
1612
|
+
_request_auth=_request_auth,
|
1613
|
+
_content_type=_content_type,
|
1614
|
+
_headers=_headers,
|
1615
|
+
_host_index=_host_index,
|
1616
|
+
)
|
1617
|
+
|
1618
|
+
# Private async implementation methods
|
1619
|
+
@validate_call
|
1620
|
+
async def _update_product_async(
|
815
1621
|
self,
|
816
1622
|
id: Annotated[StrictStr, Field(description="The ID of the product to update")],
|
817
1623
|
product_update: ProductUpdate,
|
@@ -879,7 +1685,7 @@ class ProductsApi:
|
|
879
1685
|
).data
|
880
1686
|
|
881
1687
|
@validate_call
|
882
|
-
async def
|
1688
|
+
async def _update_product_async_with_http_info(
|
883
1689
|
self,
|
884
1690
|
id: Annotated[StrictStr, Field(description="The ID of the product to update")],
|
885
1691
|
product_update: ProductUpdate,
|
@@ -942,12 +1748,11 @@ class ProductsApi:
|
|
942
1748
|
)
|
943
1749
|
await response_data.read()
|
944
1750
|
return self.api_client.response_deserialize(
|
945
|
-
response_data=response_data,
|
946
|
-
response_types_map=_response_types_map,
|
1751
|
+
response_data=response_data, response_types_map=_response_types_map
|
947
1752
|
)
|
948
1753
|
|
949
1754
|
@validate_call
|
950
|
-
async def
|
1755
|
+
async def _update_product_async_without_preload_content(
|
951
1756
|
self,
|
952
1757
|
id: Annotated[StrictStr, Field(description="The ID of the product to update")],
|
953
1758
|
product_update: ProductUpdate,
|
@@ -1008,7 +1813,92 @@ class ProductsApi:
|
|
1008
1813
|
response_data = await self.api_client.call_api(
|
1009
1814
|
*_param, _request_timeout=_request_timeout
|
1010
1815
|
)
|
1011
|
-
return response_data
|
1816
|
+
return response_data
|
1817
|
+
|
1818
|
+
# Private sync implementation methods
|
1819
|
+
@validate_call
|
1820
|
+
def _update_product_sync(
|
1821
|
+
self,
|
1822
|
+
id: Annotated[StrictStr, Field(description="The ID of the product to update")],
|
1823
|
+
product_update: ProductUpdate,
|
1824
|
+
_request_timeout: Union[
|
1825
|
+
None,
|
1826
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1827
|
+
Tuple[
|
1828
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1829
|
+
],
|
1830
|
+
] = None,
|
1831
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1832
|
+
_content_type: Optional[StrictStr] = None,
|
1833
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1834
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1835
|
+
) -> Product:
|
1836
|
+
"""Synchronous version of update_product"""
|
1837
|
+
return async_to_sync(self._update_product_async)(
|
1838
|
+
id=id,
|
1839
|
+
product_update=product_update,
|
1840
|
+
_request_timeout=_request_timeout,
|
1841
|
+
_request_auth=_request_auth,
|
1842
|
+
_content_type=_content_type,
|
1843
|
+
_headers=_headers,
|
1844
|
+
_host_index=_host_index,
|
1845
|
+
)
|
1846
|
+
|
1847
|
+
@validate_call
|
1848
|
+
def _update_product_sync_with_http_info(
|
1849
|
+
self,
|
1850
|
+
id: Annotated[StrictStr, Field(description="The ID of the product to update")],
|
1851
|
+
product_update: ProductUpdate,
|
1852
|
+
_request_timeout: Union[
|
1853
|
+
None,
|
1854
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1855
|
+
Tuple[
|
1856
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1857
|
+
],
|
1858
|
+
] = None,
|
1859
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1860
|
+
_content_type: Optional[StrictStr] = None,
|
1861
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1862
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1863
|
+
) -> ApiResponse[Product]:
|
1864
|
+
"""Synchronous version of update_product_with_http_info"""
|
1865
|
+
return async_to_sync(self._update_product_async_with_http_info)(
|
1866
|
+
id=id,
|
1867
|
+
product_update=product_update,
|
1868
|
+
_request_timeout=_request_timeout,
|
1869
|
+
_request_auth=_request_auth,
|
1870
|
+
_content_type=_content_type,
|
1871
|
+
_headers=_headers,
|
1872
|
+
_host_index=_host_index,
|
1873
|
+
)
|
1874
|
+
|
1875
|
+
@validate_call
|
1876
|
+
def _update_product_sync_without_preload_content(
|
1877
|
+
self,
|
1878
|
+
id: Annotated[StrictStr, Field(description="The ID of the product to update")],
|
1879
|
+
product_update: ProductUpdate,
|
1880
|
+
_request_timeout: Union[
|
1881
|
+
None,
|
1882
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1883
|
+
Tuple[
|
1884
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1885
|
+
],
|
1886
|
+
] = None,
|
1887
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1888
|
+
_content_type: Optional[StrictStr] = None,
|
1889
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1890
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1891
|
+
) -> RESTResponseType:
|
1892
|
+
"""Synchronous version of update_product_without_preload_content"""
|
1893
|
+
return async_to_sync(self._update_product_async_without_preload_content)(
|
1894
|
+
id=id,
|
1895
|
+
product_update=product_update,
|
1896
|
+
_request_timeout=_request_timeout,
|
1897
|
+
_request_auth=_request_auth,
|
1898
|
+
_content_type=_content_type,
|
1899
|
+
_headers=_headers,
|
1900
|
+
_host_index=_host_index,
|
1901
|
+
)
|
1012
1902
|
|
1013
1903
|
def _update_product_serialize(
|
1014
1904
|
self,
|