crypticorn 2.16.0__py3-none-any.whl → 2.17.0__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.
Files changed (164) hide show
  1. crypticorn/__init__.py +2 -2
  2. crypticorn/auth/client/api/admin_api.py +397 -13
  3. crypticorn/auth/client/api/auth_api.py +3610 -341
  4. crypticorn/auth/client/api/service_api.py +249 -7
  5. crypticorn/auth/client/api/user_api.py +2295 -179
  6. crypticorn/auth/client/api/wallet_api.py +1468 -81
  7. crypticorn/auth/client/configuration.py +2 -2
  8. crypticorn/auth/client/models/create_api_key_request.py +2 -1
  9. crypticorn/auth/client/models/get_api_keys200_response_inner.py +2 -1
  10. crypticorn/auth/client/rest.py +23 -4
  11. crypticorn/auth/main.py +8 -5
  12. crypticorn/cli/init.py +1 -1
  13. crypticorn/cli/templates/.env.docker.temp +3 -0
  14. crypticorn/cli/templates/.env.example.temp +4 -0
  15. crypticorn/cli/templates/Dockerfile +5 -2
  16. crypticorn/client.py +226 -59
  17. crypticorn/common/__init__.py +1 -0
  18. crypticorn/common/auth.py +45 -14
  19. crypticorn/common/decorators.py +1 -2
  20. crypticorn/common/enums.py +0 -2
  21. crypticorn/common/errors.py +10 -0
  22. crypticorn/common/metrics.py +30 -0
  23. crypticorn/common/middleware.py +94 -1
  24. crypticorn/common/pagination.py +252 -20
  25. crypticorn/common/router/admin_router.py +2 -2
  26. crypticorn/common/router/status_router.py +40 -2
  27. crypticorn/common/scopes.py +2 -2
  28. crypticorn/common/warnings.py +7 -0
  29. crypticorn/dex/__init__.py +6 -0
  30. crypticorn/dex/client/__init__.py +49 -0
  31. crypticorn/dex/client/api/__init__.py +6 -0
  32. crypticorn/dex/client/api/admin_api.py +2986 -0
  33. crypticorn/dex/client/api/signals_api.py +1798 -0
  34. crypticorn/dex/client/api/status_api.py +892 -0
  35. crypticorn/dex/client/api_client.py +758 -0
  36. crypticorn/dex/client/api_response.py +20 -0
  37. crypticorn/dex/client/configuration.py +620 -0
  38. crypticorn/dex/client/exceptions.py +220 -0
  39. crypticorn/dex/client/models/__init__.py +30 -0
  40. crypticorn/dex/client/models/api_error_identifier.py +121 -0
  41. crypticorn/dex/client/models/api_error_level.py +37 -0
  42. crypticorn/dex/client/models/api_error_type.py +37 -0
  43. crypticorn/dex/client/models/exception_detail.py +117 -0
  44. crypticorn/dex/client/models/log_level.py +38 -0
  45. crypticorn/dex/client/models/paginated_response_signal_with_token.py +134 -0
  46. crypticorn/dex/client/models/risk.py +86 -0
  47. crypticorn/dex/client/models/signal_overview_stats.py +158 -0
  48. crypticorn/dex/client/models/signal_volume.py +84 -0
  49. crypticorn/dex/client/models/signal_with_token.py +163 -0
  50. crypticorn/dex/client/models/token_data.py +127 -0
  51. crypticorn/dex/client/models/token_detail.py +116 -0
  52. crypticorn/dex/client/py.typed +0 -0
  53. crypticorn/dex/client/rest.py +217 -0
  54. crypticorn/dex/main.py +1 -0
  55. crypticorn/hive/client/api/admin_api.py +1173 -47
  56. crypticorn/hive/client/api/data_api.py +499 -17
  57. crypticorn/hive/client/api/models_api.py +1595 -87
  58. crypticorn/hive/client/api/status_api.py +397 -16
  59. crypticorn/hive/client/api_client.py +0 -5
  60. crypticorn/hive/client/models/api_error_identifier.py +1 -1
  61. crypticorn/hive/client/models/coin_info.py +1 -1
  62. crypticorn/hive/client/models/exception_detail.py +1 -1
  63. crypticorn/hive/client/models/target_info.py +1 -1
  64. crypticorn/hive/client/rest.py +23 -4
  65. crypticorn/hive/main.py +99 -25
  66. crypticorn/hive/utils.py +2 -2
  67. crypticorn/klines/client/api/admin_api.py +1173 -47
  68. crypticorn/klines/client/api/change_in_timeframe_api.py +269 -11
  69. crypticorn/klines/client/api/funding_rates_api.py +315 -11
  70. crypticorn/klines/client/api/ohlcv_data_api.py +390 -11
  71. crypticorn/klines/client/api/status_api.py +397 -16
  72. crypticorn/klines/client/api/symbols_api.py +216 -11
  73. crypticorn/klines/client/api/udf_api.py +1268 -51
  74. crypticorn/klines/client/api_client.py +0 -5
  75. crypticorn/klines/client/models/api_error_identifier.py +3 -1
  76. crypticorn/klines/client/models/exception_detail.py +1 -1
  77. crypticorn/klines/client/models/ohlcv.py +1 -1
  78. crypticorn/klines/client/models/symbol_group.py +1 -1
  79. crypticorn/klines/client/models/udf_config.py +1 -1
  80. crypticorn/klines/client/rest.py +23 -4
  81. crypticorn/klines/main.py +89 -12
  82. crypticorn/metrics/client/api/admin_api.py +1173 -47
  83. crypticorn/metrics/client/api/exchanges_api.py +1370 -145
  84. crypticorn/metrics/client/api/indicators_api.py +622 -17
  85. crypticorn/metrics/client/api/logs_api.py +296 -11
  86. crypticorn/metrics/client/api/marketcap_api.py +1207 -67
  87. crypticorn/metrics/client/api/markets_api.py +343 -11
  88. crypticorn/metrics/client/api/quote_currencies_api.py +228 -11
  89. crypticorn/metrics/client/api/status_api.py +397 -16
  90. crypticorn/metrics/client/api/tokens_api.py +382 -15
  91. crypticorn/metrics/client/api_client.py +0 -5
  92. crypticorn/metrics/client/configuration.py +4 -2
  93. crypticorn/metrics/client/models/exception_detail.py +1 -1
  94. crypticorn/metrics/client/models/exchange_mapping.py +1 -1
  95. crypticorn/metrics/client/models/marketcap_ranking.py +1 -1
  96. crypticorn/metrics/client/models/marketcap_symbol_ranking.py +1 -1
  97. crypticorn/metrics/client/models/ohlcv.py +1 -1
  98. crypticorn/metrics/client/rest.py +23 -4
  99. crypticorn/metrics/main.py +113 -19
  100. crypticorn/pay/client/api/admin_api.py +1585 -57
  101. crypticorn/pay/client/api/now_payments_api.py +961 -39
  102. crypticorn/pay/client/api/payments_api.py +562 -17
  103. crypticorn/pay/client/api/products_api.py +880 -30
  104. crypticorn/pay/client/api/status_api.py +397 -16
  105. crypticorn/pay/client/api_client.py +0 -5
  106. crypticorn/pay/client/configuration.py +2 -2
  107. crypticorn/pay/client/models/api_error_identifier.py +7 -7
  108. crypticorn/pay/client/models/exception_detail.py +1 -1
  109. crypticorn/pay/client/models/now_create_invoice_req.py +1 -1
  110. crypticorn/pay/client/models/now_create_invoice_res.py +1 -1
  111. crypticorn/pay/client/models/product.py +1 -1
  112. crypticorn/pay/client/models/product_create.py +1 -1
  113. crypticorn/pay/client/models/product_update.py +1 -1
  114. crypticorn/pay/client/models/scope.py +1 -0
  115. crypticorn/pay/client/rest.py +23 -4
  116. crypticorn/pay/main.py +10 -6
  117. crypticorn/trade/client/__init__.py +11 -1
  118. crypticorn/trade/client/api/__init__.py +0 -1
  119. crypticorn/trade/client/api/admin_api.py +1184 -55
  120. crypticorn/trade/client/api/api_keys_api.py +1678 -162
  121. crypticorn/trade/client/api/bots_api.py +7563 -187
  122. crypticorn/trade/client/api/exchanges_api.py +565 -19
  123. crypticorn/trade/client/api/notifications_api.py +1290 -116
  124. crypticorn/trade/client/api/orders_api.py +393 -55
  125. crypticorn/trade/client/api/status_api.py +397 -13
  126. crypticorn/trade/client/api/strategies_api.py +1133 -77
  127. crypticorn/trade/client/api/trading_actions_api.py +786 -65
  128. crypticorn/trade/client/models/__init__.py +11 -0
  129. crypticorn/trade/client/models/actions_count.py +88 -0
  130. crypticorn/trade/client/models/api_error_identifier.py +1 -0
  131. crypticorn/trade/client/models/bot.py +7 -18
  132. crypticorn/trade/client/models/bot_create.py +17 -1
  133. crypticorn/trade/client/models/bot_update.py +17 -1
  134. crypticorn/trade/client/models/exchange.py +6 -1
  135. crypticorn/trade/client/models/exchange_key.py +1 -1
  136. crypticorn/trade/client/models/exchange_key_balance.py +111 -0
  137. crypticorn/trade/client/models/exchange_key_create.py +17 -1
  138. crypticorn/trade/client/models/exchange_key_update.py +17 -1
  139. crypticorn/trade/client/models/execution_ids.py +1 -1
  140. crypticorn/trade/client/models/futures_balance.py +27 -25
  141. crypticorn/trade/client/models/notification.py +17 -1
  142. crypticorn/trade/client/models/notification_create.py +18 -2
  143. crypticorn/trade/client/models/notification_update.py +17 -1
  144. crypticorn/trade/client/models/orders_count.py +88 -0
  145. crypticorn/trade/client/models/paginated_response_futures_trading_action.py +134 -0
  146. crypticorn/trade/client/models/paginated_response_order.py +134 -0
  147. crypticorn/trade/client/models/pn_l.py +95 -0
  148. crypticorn/trade/client/models/post_futures_action.py +1 -1
  149. crypticorn/trade/client/models/spot_balance.py +109 -0
  150. crypticorn/trade/client/models/strategy.py +22 -4
  151. crypticorn/trade/client/models/strategy_create.py +23 -5
  152. crypticorn/trade/client/models/strategy_exchange_info.py +16 -4
  153. crypticorn/trade/client/models/strategy_update.py +19 -3
  154. crypticorn/trade/client/models/tpsl.py +4 -19
  155. crypticorn/trade/client/models/tpsl_create.py +6 -19
  156. crypticorn/trade/client/rest.py +23 -4
  157. crypticorn/trade/main.py +15 -12
  158. {crypticorn-2.16.0.dist-info → crypticorn-2.17.0.dist-info}/METADATA +65 -20
  159. {crypticorn-2.16.0.dist-info → crypticorn-2.17.0.dist-info}/RECORD +163 -128
  160. crypticorn/trade/client/api/futures_trading_panel_api.py +0 -1285
  161. {crypticorn-2.16.0.dist-info → crypticorn-2.17.0.dist-info}/WHEEL +0 -0
  162. {crypticorn-2.16.0.dist-info → crypticorn-2.17.0.dist-info}/entry_points.txt +0 -0
  163. {crypticorn-2.16.0.dist-info → crypticorn-2.17.0.dist-info}/licenses/LICENSE +0 -0
  164. {crypticorn-2.16.0.dist-info → crypticorn-2.17.0.dist-info}/top_level.txt +0 -0
@@ -11,14 +11,10 @@ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
  Do not edit the class manually.
12
12
  """ # noqa: E501
13
13
 
14
- import warnings
15
14
  from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
15
  from typing import Any, Dict, List, Optional, Tuple, Union
17
16
  from typing_extensions import Annotated
18
17
 
19
- from pydantic import Field, StrictInt, StrictStr, field_validator
20
- from typing import List, Optional
21
- from typing_extensions import Annotated
22
18
  from crypticorn.pay.client.models.payment import Payment
23
19
  from crypticorn.pay.client.models.subscription import Subscription
24
20
 
@@ -26,6 +22,24 @@ from crypticorn.pay.client.api_client import ApiClient, RequestSerialized
26
22
  from crypticorn.pay.client.api_response import ApiResponse
27
23
  from crypticorn.pay.client.rest import RESTResponseType
28
24
 
25
+ # Import async_to_sync for sync methods
26
+ try:
27
+ from asgiref.sync import async_to_sync
28
+
29
+ _HAS_ASGIREF = True
30
+ except ImportError:
31
+ _HAS_ASGIREF = False
32
+
33
+ def async_to_sync(async_func):
34
+ """Fallback decorator that raises an error if asgiref is not available."""
35
+
36
+ def wrapper(*args, **kwargs):
37
+ raise ImportError(
38
+ "asgiref is required for sync methods. Install with: pip install asgiref"
39
+ )
40
+
41
+ return wrapper
42
+
29
43
 
30
44
  class PaymentsApi:
31
45
  """NOTE: This class is auto generated by OpenAPI Generator
@@ -34,13 +48,165 @@ class PaymentsApi:
34
48
  Do not edit the class manually.
35
49
  """
36
50
 
37
- def __init__(self, api_client=None) -> None:
51
+ def __init__(self, api_client=None, is_sync: bool = False) -> None:
38
52
  if api_client is None:
39
53
  api_client = ApiClient.get_default()
40
54
  self.api_client = api_client
55
+ self.is_sync = is_sync
41
56
 
42
57
  @validate_call
43
- async def get_payment_history(
58
+ def get_payment_history(
59
+ self,
60
+ limit: Annotated[
61
+ Optional[StrictInt],
62
+ Field(
63
+ description="Limit the number of payments returned. 0 means no limit."
64
+ ),
65
+ ] = None,
66
+ offset: Annotated[
67
+ Optional[StrictInt],
68
+ Field(
69
+ description="Offset the number of payments returned. 0 means no offset."
70
+ ),
71
+ ] = None,
72
+ _request_timeout: Union[
73
+ None,
74
+ Annotated[StrictFloat, Field(gt=0)],
75
+ Tuple[
76
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
77
+ ],
78
+ ] = None,
79
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
80
+ _content_type: Optional[StrictStr] = None,
81
+ _headers: Optional[Dict[StrictStr, Any]] = None,
82
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
83
+ ) -> List[Payment]:
84
+ """Get Payment History"""
85
+ if self.is_sync:
86
+ return self._get_payment_history_sync(
87
+ limit=limit,
88
+ offset=offset,
89
+ _request_timeout=_request_timeout,
90
+ _request_auth=_request_auth,
91
+ _content_type=_content_type,
92
+ _headers=_headers,
93
+ _host_index=_host_index,
94
+ )
95
+
96
+ else:
97
+ return self._get_payment_history_async(
98
+ limit=limit,
99
+ offset=offset,
100
+ _request_timeout=_request_timeout,
101
+ _request_auth=_request_auth,
102
+ _content_type=_content_type,
103
+ _headers=_headers,
104
+ _host_index=_host_index,
105
+ )
106
+
107
+ @validate_call
108
+ def get_payment_history_with_http_info(
109
+ self,
110
+ limit: Annotated[
111
+ Optional[StrictInt],
112
+ Field(
113
+ description="Limit the number of payments returned. 0 means no limit."
114
+ ),
115
+ ] = None,
116
+ offset: Annotated[
117
+ Optional[StrictInt],
118
+ Field(
119
+ description="Offset the number of payments returned. 0 means no offset."
120
+ ),
121
+ ] = None,
122
+ _request_timeout: Union[
123
+ None,
124
+ Annotated[StrictFloat, Field(gt=0)],
125
+ Tuple[
126
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
127
+ ],
128
+ ] = None,
129
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
130
+ _content_type: Optional[StrictStr] = None,
131
+ _headers: Optional[Dict[StrictStr, Any]] = None,
132
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
133
+ ) -> ApiResponse[List[Payment]]:
134
+ """Get Payment History with HTTP info"""
135
+ if self.is_sync:
136
+ return self._get_payment_history_sync_with_http_info(
137
+ limit=limit,
138
+ offset=offset,
139
+ _request_timeout=_request_timeout,
140
+ _request_auth=_request_auth,
141
+ _content_type=_content_type,
142
+ _headers=_headers,
143
+ _host_index=_host_index,
144
+ )
145
+
146
+ else:
147
+ return self._get_payment_history_async_with_http_info(
148
+ limit=limit,
149
+ offset=offset,
150
+ _request_timeout=_request_timeout,
151
+ _request_auth=_request_auth,
152
+ _content_type=_content_type,
153
+ _headers=_headers,
154
+ _host_index=_host_index,
155
+ )
156
+
157
+ @validate_call
158
+ def get_payment_history_without_preload_content(
159
+ self,
160
+ limit: Annotated[
161
+ Optional[StrictInt],
162
+ Field(
163
+ description="Limit the number of payments returned. 0 means no limit."
164
+ ),
165
+ ] = None,
166
+ offset: Annotated[
167
+ Optional[StrictInt],
168
+ Field(
169
+ description="Offset the number of payments returned. 0 means no offset."
170
+ ),
171
+ ] = None,
172
+ _request_timeout: Union[
173
+ None,
174
+ Annotated[StrictFloat, Field(gt=0)],
175
+ Tuple[
176
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
177
+ ],
178
+ ] = None,
179
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
180
+ _content_type: Optional[StrictStr] = None,
181
+ _headers: Optional[Dict[StrictStr, Any]] = None,
182
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
183
+ ) -> RESTResponseType:
184
+ """Get Payment History without preloading content"""
185
+ if self.is_sync:
186
+ return self._get_payment_history_sync_without_preload_content(
187
+ limit=limit,
188
+ offset=offset,
189
+ _request_timeout=_request_timeout,
190
+ _request_auth=_request_auth,
191
+ _content_type=_content_type,
192
+ _headers=_headers,
193
+ _host_index=_host_index,
194
+ )
195
+
196
+ else:
197
+ return self._get_payment_history_async_without_preload_content(
198
+ limit=limit,
199
+ offset=offset,
200
+ _request_timeout=_request_timeout,
201
+ _request_auth=_request_auth,
202
+ _content_type=_content_type,
203
+ _headers=_headers,
204
+ _host_index=_host_index,
205
+ )
206
+
207
+ # Private async implementation methods
208
+ @validate_call
209
+ async def _get_payment_history_async(
44
210
  self,
45
211
  limit: Annotated[
46
212
  Optional[StrictInt],
@@ -118,7 +284,7 @@ class PaymentsApi:
118
284
  ).data
119
285
 
120
286
  @validate_call
121
- async def get_payment_history_with_http_info(
287
+ async def _get_payment_history_async_with_http_info(
122
288
  self,
123
289
  limit: Annotated[
124
290
  Optional[StrictInt],
@@ -191,12 +357,11 @@ class PaymentsApi:
191
357
  )
192
358
  await response_data.read()
193
359
  return self.api_client.response_deserialize(
194
- response_data=response_data,
195
- response_types_map=_response_types_map,
360
+ response_data=response_data, response_types_map=_response_types_map
196
361
  )
197
362
 
198
363
  @validate_call
199
- async def get_payment_history_without_preload_content(
364
+ async def _get_payment_history_async_without_preload_content(
200
365
  self,
201
366
  limit: Annotated[
202
367
  Optional[StrictInt],
@@ -267,7 +432,122 @@ class PaymentsApi:
267
432
  response_data = await self.api_client.call_api(
268
433
  *_param, _request_timeout=_request_timeout
269
434
  )
270
- return response_data.response
435
+ return response_data
436
+
437
+ # Private sync implementation methods
438
+ @validate_call
439
+ def _get_payment_history_sync(
440
+ self,
441
+ limit: Annotated[
442
+ Optional[StrictInt],
443
+ Field(
444
+ description="Limit the number of payments returned. 0 means no limit."
445
+ ),
446
+ ] = None,
447
+ offset: Annotated[
448
+ Optional[StrictInt],
449
+ Field(
450
+ description="Offset the number of payments returned. 0 means no offset."
451
+ ),
452
+ ] = None,
453
+ _request_timeout: Union[
454
+ None,
455
+ Annotated[StrictFloat, Field(gt=0)],
456
+ Tuple[
457
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
458
+ ],
459
+ ] = None,
460
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
461
+ _content_type: Optional[StrictStr] = None,
462
+ _headers: Optional[Dict[StrictStr, Any]] = None,
463
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
464
+ ) -> List[Payment]:
465
+ """Synchronous version of get_payment_history"""
466
+ return async_to_sync(self._get_payment_history_async)(
467
+ limit=limit,
468
+ offset=offset,
469
+ _request_timeout=_request_timeout,
470
+ _request_auth=_request_auth,
471
+ _content_type=_content_type,
472
+ _headers=_headers,
473
+ _host_index=_host_index,
474
+ )
475
+
476
+ @validate_call
477
+ def _get_payment_history_sync_with_http_info(
478
+ self,
479
+ limit: Annotated[
480
+ Optional[StrictInt],
481
+ Field(
482
+ description="Limit the number of payments returned. 0 means no limit."
483
+ ),
484
+ ] = None,
485
+ offset: Annotated[
486
+ Optional[StrictInt],
487
+ Field(
488
+ description="Offset the number of payments returned. 0 means no offset."
489
+ ),
490
+ ] = None,
491
+ _request_timeout: Union[
492
+ None,
493
+ Annotated[StrictFloat, Field(gt=0)],
494
+ Tuple[
495
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
496
+ ],
497
+ ] = None,
498
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
499
+ _content_type: Optional[StrictStr] = None,
500
+ _headers: Optional[Dict[StrictStr, Any]] = None,
501
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
502
+ ) -> ApiResponse[List[Payment]]:
503
+ """Synchronous version of get_payment_history_with_http_info"""
504
+ return async_to_sync(self._get_payment_history_async_with_http_info)(
505
+ limit=limit,
506
+ offset=offset,
507
+ _request_timeout=_request_timeout,
508
+ _request_auth=_request_auth,
509
+ _content_type=_content_type,
510
+ _headers=_headers,
511
+ _host_index=_host_index,
512
+ )
513
+
514
+ @validate_call
515
+ def _get_payment_history_sync_without_preload_content(
516
+ self,
517
+ limit: Annotated[
518
+ Optional[StrictInt],
519
+ Field(
520
+ description="Limit the number of payments returned. 0 means no limit."
521
+ ),
522
+ ] = None,
523
+ offset: Annotated[
524
+ Optional[StrictInt],
525
+ Field(
526
+ description="Offset the number of payments returned. 0 means no offset."
527
+ ),
528
+ ] = None,
529
+ _request_timeout: Union[
530
+ None,
531
+ Annotated[StrictFloat, Field(gt=0)],
532
+ Tuple[
533
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
534
+ ],
535
+ ] = None,
536
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
537
+ _content_type: Optional[StrictStr] = None,
538
+ _headers: Optional[Dict[StrictStr, Any]] = None,
539
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
540
+ ) -> RESTResponseType:
541
+ """Synchronous version of get_payment_history_without_preload_content"""
542
+ return async_to_sync(self._get_payment_history_async_without_preload_content)(
543
+ limit=limit,
544
+ offset=offset,
545
+ _request_timeout=_request_timeout,
546
+ _request_auth=_request_auth,
547
+ _content_type=_content_type,
548
+ _headers=_headers,
549
+ _host_index=_host_index,
550
+ )
271
551
 
272
552
  def _get_payment_history_serialize(
273
553
  self,
@@ -331,7 +611,158 @@ class PaymentsApi:
331
611
  )
332
612
 
333
613
  @validate_call
334
- async def get_subscriptions(
614
+ def get_subscriptions(
615
+ self,
616
+ user_id: Annotated[
617
+ Optional[StrictStr],
618
+ Field(
619
+ description="The user ID to get subscriptions for. Defaults to the authenticated user."
620
+ ),
621
+ ] = None,
622
+ state: Annotated[
623
+ Optional[StrictStr],
624
+ Field(
625
+ description="The state of the subscriptions to get. Defaults to all states."
626
+ ),
627
+ ] = None,
628
+ _request_timeout: Union[
629
+ None,
630
+ Annotated[StrictFloat, Field(gt=0)],
631
+ Tuple[
632
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
633
+ ],
634
+ ] = None,
635
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
636
+ _content_type: Optional[StrictStr] = None,
637
+ _headers: Optional[Dict[StrictStr, Any]] = None,
638
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
639
+ ) -> List[Subscription]:
640
+ """Get Subscriptions"""
641
+ if self.is_sync:
642
+ return self._get_subscriptions_sync(
643
+ user_id=user_id,
644
+ state=state,
645
+ _request_timeout=_request_timeout,
646
+ _request_auth=_request_auth,
647
+ _content_type=_content_type,
648
+ _headers=_headers,
649
+ _host_index=_host_index,
650
+ )
651
+
652
+ else:
653
+ return self._get_subscriptions_async(
654
+ user_id=user_id,
655
+ state=state,
656
+ _request_timeout=_request_timeout,
657
+ _request_auth=_request_auth,
658
+ _content_type=_content_type,
659
+ _headers=_headers,
660
+ _host_index=_host_index,
661
+ )
662
+
663
+ @validate_call
664
+ def get_subscriptions_with_http_info(
665
+ self,
666
+ user_id: Annotated[
667
+ Optional[StrictStr],
668
+ Field(
669
+ description="The user ID to get subscriptions for. Defaults to the authenticated user."
670
+ ),
671
+ ] = None,
672
+ state: Annotated[
673
+ Optional[StrictStr],
674
+ Field(
675
+ description="The state of the subscriptions to get. Defaults to all states."
676
+ ),
677
+ ] = None,
678
+ _request_timeout: Union[
679
+ None,
680
+ Annotated[StrictFloat, Field(gt=0)],
681
+ Tuple[
682
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
683
+ ],
684
+ ] = None,
685
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
686
+ _content_type: Optional[StrictStr] = None,
687
+ _headers: Optional[Dict[StrictStr, Any]] = None,
688
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
689
+ ) -> ApiResponse[List[Subscription]]:
690
+ """Get Subscriptions with HTTP info"""
691
+ if self.is_sync:
692
+ return self._get_subscriptions_sync_with_http_info(
693
+ user_id=user_id,
694
+ state=state,
695
+ _request_timeout=_request_timeout,
696
+ _request_auth=_request_auth,
697
+ _content_type=_content_type,
698
+ _headers=_headers,
699
+ _host_index=_host_index,
700
+ )
701
+
702
+ else:
703
+ return self._get_subscriptions_async_with_http_info(
704
+ user_id=user_id,
705
+ state=state,
706
+ _request_timeout=_request_timeout,
707
+ _request_auth=_request_auth,
708
+ _content_type=_content_type,
709
+ _headers=_headers,
710
+ _host_index=_host_index,
711
+ )
712
+
713
+ @validate_call
714
+ def get_subscriptions_without_preload_content(
715
+ self,
716
+ user_id: Annotated[
717
+ Optional[StrictStr],
718
+ Field(
719
+ description="The user ID to get subscriptions for. Defaults to the authenticated user."
720
+ ),
721
+ ] = None,
722
+ state: Annotated[
723
+ Optional[StrictStr],
724
+ Field(
725
+ description="The state of the subscriptions to get. Defaults to all states."
726
+ ),
727
+ ] = None,
728
+ _request_timeout: Union[
729
+ None,
730
+ Annotated[StrictFloat, Field(gt=0)],
731
+ Tuple[
732
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
733
+ ],
734
+ ] = None,
735
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
736
+ _content_type: Optional[StrictStr] = None,
737
+ _headers: Optional[Dict[StrictStr, Any]] = None,
738
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
739
+ ) -> RESTResponseType:
740
+ """Get Subscriptions without preloading content"""
741
+ if self.is_sync:
742
+ return self._get_subscriptions_sync_without_preload_content(
743
+ user_id=user_id,
744
+ state=state,
745
+ _request_timeout=_request_timeout,
746
+ _request_auth=_request_auth,
747
+ _content_type=_content_type,
748
+ _headers=_headers,
749
+ _host_index=_host_index,
750
+ )
751
+
752
+ else:
753
+ return self._get_subscriptions_async_without_preload_content(
754
+ user_id=user_id,
755
+ state=state,
756
+ _request_timeout=_request_timeout,
757
+ _request_auth=_request_auth,
758
+ _content_type=_content_type,
759
+ _headers=_headers,
760
+ _host_index=_host_index,
761
+ )
762
+
763
+ # Private async implementation methods
764
+ @validate_call
765
+ async def _get_subscriptions_async(
335
766
  self,
336
767
  user_id: Annotated[
337
768
  Optional[StrictStr],
@@ -409,7 +840,7 @@ class PaymentsApi:
409
840
  ).data
410
841
 
411
842
  @validate_call
412
- async def get_subscriptions_with_http_info(
843
+ async def _get_subscriptions_async_with_http_info(
413
844
  self,
414
845
  user_id: Annotated[
415
846
  Optional[StrictStr],
@@ -482,12 +913,11 @@ class PaymentsApi:
482
913
  )
483
914
  await response_data.read()
484
915
  return self.api_client.response_deserialize(
485
- response_data=response_data,
486
- response_types_map=_response_types_map,
916
+ response_data=response_data, response_types_map=_response_types_map
487
917
  )
488
918
 
489
919
  @validate_call
490
- async def get_subscriptions_without_preload_content(
920
+ async def _get_subscriptions_async_without_preload_content(
491
921
  self,
492
922
  user_id: Annotated[
493
923
  Optional[StrictStr],
@@ -558,7 +988,122 @@ class PaymentsApi:
558
988
  response_data = await self.api_client.call_api(
559
989
  *_param, _request_timeout=_request_timeout
560
990
  )
561
- return response_data.response
991
+ return response_data
992
+
993
+ # Private sync implementation methods
994
+ @validate_call
995
+ def _get_subscriptions_sync(
996
+ self,
997
+ user_id: Annotated[
998
+ Optional[StrictStr],
999
+ Field(
1000
+ description="The user ID to get subscriptions for. Defaults to the authenticated user."
1001
+ ),
1002
+ ] = None,
1003
+ state: Annotated[
1004
+ Optional[StrictStr],
1005
+ Field(
1006
+ description="The state of the subscriptions to get. Defaults to all states."
1007
+ ),
1008
+ ] = None,
1009
+ _request_timeout: Union[
1010
+ None,
1011
+ Annotated[StrictFloat, Field(gt=0)],
1012
+ Tuple[
1013
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1014
+ ],
1015
+ ] = None,
1016
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1017
+ _content_type: Optional[StrictStr] = None,
1018
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1019
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1020
+ ) -> List[Subscription]:
1021
+ """Synchronous version of get_subscriptions"""
1022
+ return async_to_sync(self._get_subscriptions_async)(
1023
+ user_id=user_id,
1024
+ state=state,
1025
+ _request_timeout=_request_timeout,
1026
+ _request_auth=_request_auth,
1027
+ _content_type=_content_type,
1028
+ _headers=_headers,
1029
+ _host_index=_host_index,
1030
+ )
1031
+
1032
+ @validate_call
1033
+ def _get_subscriptions_sync_with_http_info(
1034
+ self,
1035
+ user_id: Annotated[
1036
+ Optional[StrictStr],
1037
+ Field(
1038
+ description="The user ID to get subscriptions for. Defaults to the authenticated user."
1039
+ ),
1040
+ ] = None,
1041
+ state: Annotated[
1042
+ Optional[StrictStr],
1043
+ Field(
1044
+ description="The state of the subscriptions to get. Defaults to all states."
1045
+ ),
1046
+ ] = None,
1047
+ _request_timeout: Union[
1048
+ None,
1049
+ Annotated[StrictFloat, Field(gt=0)],
1050
+ Tuple[
1051
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1052
+ ],
1053
+ ] = None,
1054
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1055
+ _content_type: Optional[StrictStr] = None,
1056
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1057
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1058
+ ) -> ApiResponse[List[Subscription]]:
1059
+ """Synchronous version of get_subscriptions_with_http_info"""
1060
+ return async_to_sync(self._get_subscriptions_async_with_http_info)(
1061
+ user_id=user_id,
1062
+ state=state,
1063
+ _request_timeout=_request_timeout,
1064
+ _request_auth=_request_auth,
1065
+ _content_type=_content_type,
1066
+ _headers=_headers,
1067
+ _host_index=_host_index,
1068
+ )
1069
+
1070
+ @validate_call
1071
+ def _get_subscriptions_sync_without_preload_content(
1072
+ self,
1073
+ user_id: Annotated[
1074
+ Optional[StrictStr],
1075
+ Field(
1076
+ description="The user ID to get subscriptions for. Defaults to the authenticated user."
1077
+ ),
1078
+ ] = None,
1079
+ state: Annotated[
1080
+ Optional[StrictStr],
1081
+ Field(
1082
+ description="The state of the subscriptions to get. Defaults to all states."
1083
+ ),
1084
+ ] = None,
1085
+ _request_timeout: Union[
1086
+ None,
1087
+ Annotated[StrictFloat, Field(gt=0)],
1088
+ Tuple[
1089
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1090
+ ],
1091
+ ] = None,
1092
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1093
+ _content_type: Optional[StrictStr] = None,
1094
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1095
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1096
+ ) -> RESTResponseType:
1097
+ """Synchronous version of get_subscriptions_without_preload_content"""
1098
+ return async_to_sync(self._get_subscriptions_async_without_preload_content)(
1099
+ user_id=user_id,
1100
+ state=state,
1101
+ _request_timeout=_request_timeout,
1102
+ _request_auth=_request_auth,
1103
+ _content_type=_content_type,
1104
+ _headers=_headers,
1105
+ _host_index=_host_index,
1106
+ )
562
1107
 
563
1108
  def _get_subscriptions_serialize(
564
1109
  self,