crypticorn 2.17.0rc1__py3-none-any.whl → 2.17.0rc3__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/auth.py +2 -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.0rc3.dist-info}/METADATA +64 -20
- {crypticorn-2.17.0rc1.dist-info → crypticorn-2.17.0rc3.dist-info}/RECORD +86 -85
- crypticorn/trade/client/api/futures_trading_panel_api.py +0 -1285
- {crypticorn-2.17.0rc1.dist-info → crypticorn-2.17.0rc3.dist-info}/WHEEL +0 -0
- {crypticorn-2.17.0rc1.dist-info → crypticorn-2.17.0rc3.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.17.0rc1.dist-info → crypticorn-2.17.0rc3.dist-info}/licenses/LICENSE +0 -0
- {crypticorn-2.17.0rc1.dist-info → crypticorn-2.17.0rc3.dist-info}/top_level.txt +0 -0
@@ -26,6 +26,24 @@ from crypticorn.pay.client.api_client import ApiClient, RequestSerialized
|
|
26
26
|
from crypticorn.pay.client.api_response import ApiResponse
|
27
27
|
from crypticorn.pay.client.rest import RESTResponseType
|
28
28
|
|
29
|
+
# Import async_to_sync for sync methods
|
30
|
+
try:
|
31
|
+
from asgiref.sync import async_to_sync
|
32
|
+
|
33
|
+
_HAS_ASGIREF = True
|
34
|
+
except ImportError:
|
35
|
+
_HAS_ASGIREF = False
|
36
|
+
|
37
|
+
def async_to_sync(async_func):
|
38
|
+
"""Fallback decorator that raises an error if asgiref is not available."""
|
39
|
+
|
40
|
+
def wrapper(*args, **kwargs):
|
41
|
+
raise ImportError(
|
42
|
+
"asgiref is required for sync methods. Install with: pip install asgiref"
|
43
|
+
)
|
44
|
+
|
45
|
+
return wrapper
|
46
|
+
|
29
47
|
|
30
48
|
class PaymentsApi:
|
31
49
|
"""NOTE: This class is auto generated by OpenAPI Generator
|
@@ -34,13 +52,174 @@ class PaymentsApi:
|
|
34
52
|
Do not edit the class manually.
|
35
53
|
"""
|
36
54
|
|
37
|
-
def __init__(self, api_client=None) -> None:
|
55
|
+
def __init__(self, api_client=None, is_sync: bool = False) -> None:
|
38
56
|
if api_client is None:
|
39
57
|
api_client = ApiClient.get_default()
|
40
58
|
self.api_client = api_client
|
59
|
+
self.is_sync = is_sync
|
60
|
+
|
61
|
+
@validate_call
|
62
|
+
def get_payment_history(
|
63
|
+
self,
|
64
|
+
limit: Annotated[
|
65
|
+
Optional[StrictInt],
|
66
|
+
Field(
|
67
|
+
description="Limit the number of payments returned. 0 means no limit."
|
68
|
+
),
|
69
|
+
] = None,
|
70
|
+
offset: Annotated[
|
71
|
+
Optional[StrictInt],
|
72
|
+
Field(
|
73
|
+
description="Offset the number of payments returned. 0 means no offset."
|
74
|
+
),
|
75
|
+
] = None,
|
76
|
+
_request_timeout: Union[
|
77
|
+
None,
|
78
|
+
Annotated[StrictFloat, Field(gt=0)],
|
79
|
+
Tuple[
|
80
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
81
|
+
],
|
82
|
+
] = None,
|
83
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
84
|
+
_content_type: Optional[StrictStr] = None,
|
85
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
86
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
87
|
+
) -> List[Payment]:
|
88
|
+
"""Get Payment History
|
89
|
+
|
90
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
91
|
+
"""
|
92
|
+
if self.is_sync:
|
93
|
+
return self._get_payment_history_sync(
|
94
|
+
limit=limit,
|
95
|
+
offset=offset,
|
96
|
+
_request_timeout=_request_timeout,
|
97
|
+
_request_auth=_request_auth,
|
98
|
+
_content_type=_content_type,
|
99
|
+
_headers=_headers,
|
100
|
+
_host_index=_host_index,
|
101
|
+
)
|
102
|
+
|
103
|
+
else:
|
104
|
+
return self._get_payment_history_async(
|
105
|
+
limit=limit,
|
106
|
+
offset=offset,
|
107
|
+
_request_timeout=_request_timeout,
|
108
|
+
_request_auth=_request_auth,
|
109
|
+
_content_type=_content_type,
|
110
|
+
_headers=_headers,
|
111
|
+
_host_index=_host_index,
|
112
|
+
)
|
113
|
+
|
114
|
+
@validate_call
|
115
|
+
def get_payment_history_with_http_info(
|
116
|
+
self,
|
117
|
+
limit: Annotated[
|
118
|
+
Optional[StrictInt],
|
119
|
+
Field(
|
120
|
+
description="Limit the number of payments returned. 0 means no limit."
|
121
|
+
),
|
122
|
+
] = None,
|
123
|
+
offset: Annotated[
|
124
|
+
Optional[StrictInt],
|
125
|
+
Field(
|
126
|
+
description="Offset the number of payments returned. 0 means no offset."
|
127
|
+
),
|
128
|
+
] = None,
|
129
|
+
_request_timeout: Union[
|
130
|
+
None,
|
131
|
+
Annotated[StrictFloat, Field(gt=0)],
|
132
|
+
Tuple[
|
133
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
134
|
+
],
|
135
|
+
] = None,
|
136
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
137
|
+
_content_type: Optional[StrictStr] = None,
|
138
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
139
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
140
|
+
) -> ApiResponse[List[Payment]]:
|
141
|
+
"""Get Payment History with HTTP info
|
142
|
+
|
143
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
144
|
+
"""
|
145
|
+
if self.is_sync:
|
146
|
+
return self._get_payment_history_sync_with_http_info(
|
147
|
+
limit=limit,
|
148
|
+
offset=offset,
|
149
|
+
_request_timeout=_request_timeout,
|
150
|
+
_request_auth=_request_auth,
|
151
|
+
_content_type=_content_type,
|
152
|
+
_headers=_headers,
|
153
|
+
_host_index=_host_index,
|
154
|
+
)
|
155
|
+
|
156
|
+
else:
|
157
|
+
return self._get_payment_history_async_with_http_info(
|
158
|
+
limit=limit,
|
159
|
+
offset=offset,
|
160
|
+
_request_timeout=_request_timeout,
|
161
|
+
_request_auth=_request_auth,
|
162
|
+
_content_type=_content_type,
|
163
|
+
_headers=_headers,
|
164
|
+
_host_index=_host_index,
|
165
|
+
)
|
166
|
+
|
167
|
+
@validate_call
|
168
|
+
def get_payment_history_without_preload_content(
|
169
|
+
self,
|
170
|
+
limit: Annotated[
|
171
|
+
Optional[StrictInt],
|
172
|
+
Field(
|
173
|
+
description="Limit the number of payments returned. 0 means no limit."
|
174
|
+
),
|
175
|
+
] = None,
|
176
|
+
offset: Annotated[
|
177
|
+
Optional[StrictInt],
|
178
|
+
Field(
|
179
|
+
description="Offset the number of payments returned. 0 means no offset."
|
180
|
+
),
|
181
|
+
] = None,
|
182
|
+
_request_timeout: Union[
|
183
|
+
None,
|
184
|
+
Annotated[StrictFloat, Field(gt=0)],
|
185
|
+
Tuple[
|
186
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
187
|
+
],
|
188
|
+
] = None,
|
189
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
190
|
+
_content_type: Optional[StrictStr] = None,
|
191
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
192
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
193
|
+
) -> RESTResponseType:
|
194
|
+
"""Get Payment History without preloading content
|
195
|
+
|
196
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
197
|
+
"""
|
198
|
+
if self.is_sync:
|
199
|
+
return self._get_payment_history_sync_without_preload_content(
|
200
|
+
limit=limit,
|
201
|
+
offset=offset,
|
202
|
+
_request_timeout=_request_timeout,
|
203
|
+
_request_auth=_request_auth,
|
204
|
+
_content_type=_content_type,
|
205
|
+
_headers=_headers,
|
206
|
+
_host_index=_host_index,
|
207
|
+
)
|
208
|
+
|
209
|
+
else:
|
210
|
+
return self._get_payment_history_async_without_preload_content(
|
211
|
+
limit=limit,
|
212
|
+
offset=offset,
|
213
|
+
_request_timeout=_request_timeout,
|
214
|
+
_request_auth=_request_auth,
|
215
|
+
_content_type=_content_type,
|
216
|
+
_headers=_headers,
|
217
|
+
_host_index=_host_index,
|
218
|
+
)
|
41
219
|
|
220
|
+
# Private async implementation methods
|
42
221
|
@validate_call
|
43
|
-
async def
|
222
|
+
async def _get_payment_history_async(
|
44
223
|
self,
|
45
224
|
limit: Annotated[
|
46
225
|
Optional[StrictInt],
|
@@ -118,7 +297,7 @@ class PaymentsApi:
|
|
118
297
|
).data
|
119
298
|
|
120
299
|
@validate_call
|
121
|
-
async def
|
300
|
+
async def _get_payment_history_async_with_http_info(
|
122
301
|
self,
|
123
302
|
limit: Annotated[
|
124
303
|
Optional[StrictInt],
|
@@ -191,12 +370,11 @@ class PaymentsApi:
|
|
191
370
|
)
|
192
371
|
await response_data.read()
|
193
372
|
return self.api_client.response_deserialize(
|
194
|
-
response_data=response_data,
|
195
|
-
response_types_map=_response_types_map,
|
373
|
+
response_data=response_data, response_types_map=_response_types_map
|
196
374
|
)
|
197
375
|
|
198
376
|
@validate_call
|
199
|
-
async def
|
377
|
+
async def _get_payment_history_async_without_preload_content(
|
200
378
|
self,
|
201
379
|
limit: Annotated[
|
202
380
|
Optional[StrictInt],
|
@@ -267,7 +445,122 @@ class PaymentsApi:
|
|
267
445
|
response_data = await self.api_client.call_api(
|
268
446
|
*_param, _request_timeout=_request_timeout
|
269
447
|
)
|
270
|
-
return response_data
|
448
|
+
return response_data
|
449
|
+
|
450
|
+
# Private sync implementation methods
|
451
|
+
@validate_call
|
452
|
+
def _get_payment_history_sync(
|
453
|
+
self,
|
454
|
+
limit: Annotated[
|
455
|
+
Optional[StrictInt],
|
456
|
+
Field(
|
457
|
+
description="Limit the number of payments returned. 0 means no limit."
|
458
|
+
),
|
459
|
+
] = None,
|
460
|
+
offset: Annotated[
|
461
|
+
Optional[StrictInt],
|
462
|
+
Field(
|
463
|
+
description="Offset the number of payments returned. 0 means no offset."
|
464
|
+
),
|
465
|
+
] = None,
|
466
|
+
_request_timeout: Union[
|
467
|
+
None,
|
468
|
+
Annotated[StrictFloat, Field(gt=0)],
|
469
|
+
Tuple[
|
470
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
471
|
+
],
|
472
|
+
] = None,
|
473
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
474
|
+
_content_type: Optional[StrictStr] = None,
|
475
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
476
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
477
|
+
) -> List[Payment]:
|
478
|
+
"""Synchronous version of get_payment_history"""
|
479
|
+
return async_to_sync(self._get_payment_history_async)(
|
480
|
+
limit=limit,
|
481
|
+
offset=offset,
|
482
|
+
_request_timeout=_request_timeout,
|
483
|
+
_request_auth=_request_auth,
|
484
|
+
_content_type=_content_type,
|
485
|
+
_headers=_headers,
|
486
|
+
_host_index=_host_index,
|
487
|
+
)
|
488
|
+
|
489
|
+
@validate_call
|
490
|
+
def _get_payment_history_sync_with_http_info(
|
491
|
+
self,
|
492
|
+
limit: Annotated[
|
493
|
+
Optional[StrictInt],
|
494
|
+
Field(
|
495
|
+
description="Limit the number of payments returned. 0 means no limit."
|
496
|
+
),
|
497
|
+
] = None,
|
498
|
+
offset: Annotated[
|
499
|
+
Optional[StrictInt],
|
500
|
+
Field(
|
501
|
+
description="Offset the number of payments returned. 0 means no offset."
|
502
|
+
),
|
503
|
+
] = None,
|
504
|
+
_request_timeout: Union[
|
505
|
+
None,
|
506
|
+
Annotated[StrictFloat, Field(gt=0)],
|
507
|
+
Tuple[
|
508
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
509
|
+
],
|
510
|
+
] = None,
|
511
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
512
|
+
_content_type: Optional[StrictStr] = None,
|
513
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
514
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
515
|
+
) -> ApiResponse[List[Payment]]:
|
516
|
+
"""Synchronous version of get_payment_history_with_http_info"""
|
517
|
+
return async_to_sync(self._get_payment_history_async_with_http_info)(
|
518
|
+
limit=limit,
|
519
|
+
offset=offset,
|
520
|
+
_request_timeout=_request_timeout,
|
521
|
+
_request_auth=_request_auth,
|
522
|
+
_content_type=_content_type,
|
523
|
+
_headers=_headers,
|
524
|
+
_host_index=_host_index,
|
525
|
+
)
|
526
|
+
|
527
|
+
@validate_call
|
528
|
+
def _get_payment_history_sync_without_preload_content(
|
529
|
+
self,
|
530
|
+
limit: Annotated[
|
531
|
+
Optional[StrictInt],
|
532
|
+
Field(
|
533
|
+
description="Limit the number of payments returned. 0 means no limit."
|
534
|
+
),
|
535
|
+
] = None,
|
536
|
+
offset: Annotated[
|
537
|
+
Optional[StrictInt],
|
538
|
+
Field(
|
539
|
+
description="Offset the number of payments returned. 0 means no offset."
|
540
|
+
),
|
541
|
+
] = None,
|
542
|
+
_request_timeout: Union[
|
543
|
+
None,
|
544
|
+
Annotated[StrictFloat, Field(gt=0)],
|
545
|
+
Tuple[
|
546
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
547
|
+
],
|
548
|
+
] = None,
|
549
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
550
|
+
_content_type: Optional[StrictStr] = None,
|
551
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
552
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
553
|
+
) -> RESTResponseType:
|
554
|
+
"""Synchronous version of get_payment_history_without_preload_content"""
|
555
|
+
return async_to_sync(self._get_payment_history_async_without_preload_content)(
|
556
|
+
limit=limit,
|
557
|
+
offset=offset,
|
558
|
+
_request_timeout=_request_timeout,
|
559
|
+
_request_auth=_request_auth,
|
560
|
+
_content_type=_content_type,
|
561
|
+
_headers=_headers,
|
562
|
+
_host_index=_host_index,
|
563
|
+
)
|
271
564
|
|
272
565
|
def _get_payment_history_serialize(
|
273
566
|
self,
|
@@ -331,7 +624,167 @@ class PaymentsApi:
|
|
331
624
|
)
|
332
625
|
|
333
626
|
@validate_call
|
334
|
-
|
627
|
+
def get_subscriptions(
|
628
|
+
self,
|
629
|
+
user_id: Annotated[
|
630
|
+
Optional[StrictStr],
|
631
|
+
Field(
|
632
|
+
description="The user ID to get subscriptions for. Defaults to the authenticated user."
|
633
|
+
),
|
634
|
+
] = None,
|
635
|
+
state: Annotated[
|
636
|
+
Optional[StrictStr],
|
637
|
+
Field(
|
638
|
+
description="The state of the subscriptions to get. Defaults to all states."
|
639
|
+
),
|
640
|
+
] = None,
|
641
|
+
_request_timeout: Union[
|
642
|
+
None,
|
643
|
+
Annotated[StrictFloat, Field(gt=0)],
|
644
|
+
Tuple[
|
645
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
646
|
+
],
|
647
|
+
] = None,
|
648
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
649
|
+
_content_type: Optional[StrictStr] = None,
|
650
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
651
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
652
|
+
) -> List[Subscription]:
|
653
|
+
"""Get Subscriptions
|
654
|
+
|
655
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
656
|
+
"""
|
657
|
+
if self.is_sync:
|
658
|
+
return self._get_subscriptions_sync(
|
659
|
+
user_id=user_id,
|
660
|
+
state=state,
|
661
|
+
_request_timeout=_request_timeout,
|
662
|
+
_request_auth=_request_auth,
|
663
|
+
_content_type=_content_type,
|
664
|
+
_headers=_headers,
|
665
|
+
_host_index=_host_index,
|
666
|
+
)
|
667
|
+
|
668
|
+
else:
|
669
|
+
return self._get_subscriptions_async(
|
670
|
+
user_id=user_id,
|
671
|
+
state=state,
|
672
|
+
_request_timeout=_request_timeout,
|
673
|
+
_request_auth=_request_auth,
|
674
|
+
_content_type=_content_type,
|
675
|
+
_headers=_headers,
|
676
|
+
_host_index=_host_index,
|
677
|
+
)
|
678
|
+
|
679
|
+
@validate_call
|
680
|
+
def get_subscriptions_with_http_info(
|
681
|
+
self,
|
682
|
+
user_id: Annotated[
|
683
|
+
Optional[StrictStr],
|
684
|
+
Field(
|
685
|
+
description="The user ID to get subscriptions for. Defaults to the authenticated user."
|
686
|
+
),
|
687
|
+
] = None,
|
688
|
+
state: Annotated[
|
689
|
+
Optional[StrictStr],
|
690
|
+
Field(
|
691
|
+
description="The state of the subscriptions to get. Defaults to all states."
|
692
|
+
),
|
693
|
+
] = None,
|
694
|
+
_request_timeout: Union[
|
695
|
+
None,
|
696
|
+
Annotated[StrictFloat, Field(gt=0)],
|
697
|
+
Tuple[
|
698
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
699
|
+
],
|
700
|
+
] = None,
|
701
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
702
|
+
_content_type: Optional[StrictStr] = None,
|
703
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
704
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
705
|
+
) -> ApiResponse[List[Subscription]]:
|
706
|
+
"""Get Subscriptions with HTTP info
|
707
|
+
|
708
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
709
|
+
"""
|
710
|
+
if self.is_sync:
|
711
|
+
return self._get_subscriptions_sync_with_http_info(
|
712
|
+
user_id=user_id,
|
713
|
+
state=state,
|
714
|
+
_request_timeout=_request_timeout,
|
715
|
+
_request_auth=_request_auth,
|
716
|
+
_content_type=_content_type,
|
717
|
+
_headers=_headers,
|
718
|
+
_host_index=_host_index,
|
719
|
+
)
|
720
|
+
|
721
|
+
else:
|
722
|
+
return self._get_subscriptions_async_with_http_info(
|
723
|
+
user_id=user_id,
|
724
|
+
state=state,
|
725
|
+
_request_timeout=_request_timeout,
|
726
|
+
_request_auth=_request_auth,
|
727
|
+
_content_type=_content_type,
|
728
|
+
_headers=_headers,
|
729
|
+
_host_index=_host_index,
|
730
|
+
)
|
731
|
+
|
732
|
+
@validate_call
|
733
|
+
def get_subscriptions_without_preload_content(
|
734
|
+
self,
|
735
|
+
user_id: Annotated[
|
736
|
+
Optional[StrictStr],
|
737
|
+
Field(
|
738
|
+
description="The user ID to get subscriptions for. Defaults to the authenticated user."
|
739
|
+
),
|
740
|
+
] = None,
|
741
|
+
state: Annotated[
|
742
|
+
Optional[StrictStr],
|
743
|
+
Field(
|
744
|
+
description="The state of the subscriptions to get. Defaults to all states."
|
745
|
+
),
|
746
|
+
] = None,
|
747
|
+
_request_timeout: Union[
|
748
|
+
None,
|
749
|
+
Annotated[StrictFloat, Field(gt=0)],
|
750
|
+
Tuple[
|
751
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
752
|
+
],
|
753
|
+
] = None,
|
754
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
755
|
+
_content_type: Optional[StrictStr] = None,
|
756
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
757
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
758
|
+
) -> RESTResponseType:
|
759
|
+
"""Get Subscriptions without preloading content
|
760
|
+
|
761
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
762
|
+
"""
|
763
|
+
if self.is_sync:
|
764
|
+
return self._get_subscriptions_sync_without_preload_content(
|
765
|
+
user_id=user_id,
|
766
|
+
state=state,
|
767
|
+
_request_timeout=_request_timeout,
|
768
|
+
_request_auth=_request_auth,
|
769
|
+
_content_type=_content_type,
|
770
|
+
_headers=_headers,
|
771
|
+
_host_index=_host_index,
|
772
|
+
)
|
773
|
+
|
774
|
+
else:
|
775
|
+
return self._get_subscriptions_async_without_preload_content(
|
776
|
+
user_id=user_id,
|
777
|
+
state=state,
|
778
|
+
_request_timeout=_request_timeout,
|
779
|
+
_request_auth=_request_auth,
|
780
|
+
_content_type=_content_type,
|
781
|
+
_headers=_headers,
|
782
|
+
_host_index=_host_index,
|
783
|
+
)
|
784
|
+
|
785
|
+
# Private async implementation methods
|
786
|
+
@validate_call
|
787
|
+
async def _get_subscriptions_async(
|
335
788
|
self,
|
336
789
|
user_id: Annotated[
|
337
790
|
Optional[StrictStr],
|
@@ -409,7 +862,7 @@ class PaymentsApi:
|
|
409
862
|
).data
|
410
863
|
|
411
864
|
@validate_call
|
412
|
-
async def
|
865
|
+
async def _get_subscriptions_async_with_http_info(
|
413
866
|
self,
|
414
867
|
user_id: Annotated[
|
415
868
|
Optional[StrictStr],
|
@@ -482,12 +935,11 @@ class PaymentsApi:
|
|
482
935
|
)
|
483
936
|
await response_data.read()
|
484
937
|
return self.api_client.response_deserialize(
|
485
|
-
response_data=response_data,
|
486
|
-
response_types_map=_response_types_map,
|
938
|
+
response_data=response_data, response_types_map=_response_types_map
|
487
939
|
)
|
488
940
|
|
489
941
|
@validate_call
|
490
|
-
async def
|
942
|
+
async def _get_subscriptions_async_without_preload_content(
|
491
943
|
self,
|
492
944
|
user_id: Annotated[
|
493
945
|
Optional[StrictStr],
|
@@ -558,7 +1010,122 @@ class PaymentsApi:
|
|
558
1010
|
response_data = await self.api_client.call_api(
|
559
1011
|
*_param, _request_timeout=_request_timeout
|
560
1012
|
)
|
561
|
-
return response_data
|
1013
|
+
return response_data
|
1014
|
+
|
1015
|
+
# Private sync implementation methods
|
1016
|
+
@validate_call
|
1017
|
+
def _get_subscriptions_sync(
|
1018
|
+
self,
|
1019
|
+
user_id: Annotated[
|
1020
|
+
Optional[StrictStr],
|
1021
|
+
Field(
|
1022
|
+
description="The user ID to get subscriptions for. Defaults to the authenticated user."
|
1023
|
+
),
|
1024
|
+
] = None,
|
1025
|
+
state: Annotated[
|
1026
|
+
Optional[StrictStr],
|
1027
|
+
Field(
|
1028
|
+
description="The state of the subscriptions to get. Defaults to all states."
|
1029
|
+
),
|
1030
|
+
] = None,
|
1031
|
+
_request_timeout: Union[
|
1032
|
+
None,
|
1033
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1034
|
+
Tuple[
|
1035
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1036
|
+
],
|
1037
|
+
] = None,
|
1038
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1039
|
+
_content_type: Optional[StrictStr] = None,
|
1040
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1041
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1042
|
+
) -> List[Subscription]:
|
1043
|
+
"""Synchronous version of get_subscriptions"""
|
1044
|
+
return async_to_sync(self._get_subscriptions_async)(
|
1045
|
+
user_id=user_id,
|
1046
|
+
state=state,
|
1047
|
+
_request_timeout=_request_timeout,
|
1048
|
+
_request_auth=_request_auth,
|
1049
|
+
_content_type=_content_type,
|
1050
|
+
_headers=_headers,
|
1051
|
+
_host_index=_host_index,
|
1052
|
+
)
|
1053
|
+
|
1054
|
+
@validate_call
|
1055
|
+
def _get_subscriptions_sync_with_http_info(
|
1056
|
+
self,
|
1057
|
+
user_id: Annotated[
|
1058
|
+
Optional[StrictStr],
|
1059
|
+
Field(
|
1060
|
+
description="The user ID to get subscriptions for. Defaults to the authenticated user."
|
1061
|
+
),
|
1062
|
+
] = None,
|
1063
|
+
state: Annotated[
|
1064
|
+
Optional[StrictStr],
|
1065
|
+
Field(
|
1066
|
+
description="The state of the subscriptions to get. Defaults to all states."
|
1067
|
+
),
|
1068
|
+
] = None,
|
1069
|
+
_request_timeout: Union[
|
1070
|
+
None,
|
1071
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1072
|
+
Tuple[
|
1073
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1074
|
+
],
|
1075
|
+
] = None,
|
1076
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1077
|
+
_content_type: Optional[StrictStr] = None,
|
1078
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1079
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1080
|
+
) -> ApiResponse[List[Subscription]]:
|
1081
|
+
"""Synchronous version of get_subscriptions_with_http_info"""
|
1082
|
+
return async_to_sync(self._get_subscriptions_async_with_http_info)(
|
1083
|
+
user_id=user_id,
|
1084
|
+
state=state,
|
1085
|
+
_request_timeout=_request_timeout,
|
1086
|
+
_request_auth=_request_auth,
|
1087
|
+
_content_type=_content_type,
|
1088
|
+
_headers=_headers,
|
1089
|
+
_host_index=_host_index,
|
1090
|
+
)
|
1091
|
+
|
1092
|
+
@validate_call
|
1093
|
+
def _get_subscriptions_sync_without_preload_content(
|
1094
|
+
self,
|
1095
|
+
user_id: Annotated[
|
1096
|
+
Optional[StrictStr],
|
1097
|
+
Field(
|
1098
|
+
description="The user ID to get subscriptions for. Defaults to the authenticated user."
|
1099
|
+
),
|
1100
|
+
] = None,
|
1101
|
+
state: Annotated[
|
1102
|
+
Optional[StrictStr],
|
1103
|
+
Field(
|
1104
|
+
description="The state of the subscriptions to get. Defaults to all states."
|
1105
|
+
),
|
1106
|
+
] = None,
|
1107
|
+
_request_timeout: Union[
|
1108
|
+
None,
|
1109
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1110
|
+
Tuple[
|
1111
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1112
|
+
],
|
1113
|
+
] = None,
|
1114
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1115
|
+
_content_type: Optional[StrictStr] = None,
|
1116
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1117
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1118
|
+
) -> RESTResponseType:
|
1119
|
+
"""Synchronous version of get_subscriptions_without_preload_content"""
|
1120
|
+
return async_to_sync(self._get_subscriptions_async_without_preload_content)(
|
1121
|
+
user_id=user_id,
|
1122
|
+
state=state,
|
1123
|
+
_request_timeout=_request_timeout,
|
1124
|
+
_request_auth=_request_auth,
|
1125
|
+
_content_type=_content_type,
|
1126
|
+
_headers=_headers,
|
1127
|
+
_host_index=_host_index,
|
1128
|
+
)
|
562
1129
|
|
563
1130
|
def _get_subscriptions_serialize(
|
564
1131
|
self,
|