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.
- crypticorn/__init__.py +2 -2
- crypticorn/auth/client/api/admin_api.py +397 -13
- crypticorn/auth/client/api/auth_api.py +3610 -341
- crypticorn/auth/client/api/service_api.py +249 -7
- crypticorn/auth/client/api/user_api.py +2295 -179
- crypticorn/auth/client/api/wallet_api.py +1468 -81
- crypticorn/auth/client/configuration.py +2 -2
- 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/cli/init.py +1 -1
- crypticorn/cli/templates/.env.docker.temp +3 -0
- crypticorn/cli/templates/.env.example.temp +4 -0
- crypticorn/cli/templates/Dockerfile +5 -2
- crypticorn/client.py +226 -59
- crypticorn/common/__init__.py +1 -0
- crypticorn/common/auth.py +45 -14
- crypticorn/common/decorators.py +1 -2
- crypticorn/common/enums.py +0 -2
- crypticorn/common/errors.py +10 -0
- crypticorn/common/metrics.py +30 -0
- crypticorn/common/middleware.py +94 -1
- crypticorn/common/pagination.py +252 -20
- crypticorn/common/router/admin_router.py +2 -2
- crypticorn/common/router/status_router.py +40 -2
- crypticorn/common/scopes.py +2 -2
- crypticorn/common/warnings.py +7 -0
- crypticorn/dex/__init__.py +6 -0
- crypticorn/dex/client/__init__.py +49 -0
- crypticorn/dex/client/api/__init__.py +6 -0
- crypticorn/dex/client/api/admin_api.py +2986 -0
- crypticorn/dex/client/api/signals_api.py +1798 -0
- crypticorn/dex/client/api/status_api.py +892 -0
- crypticorn/dex/client/api_client.py +758 -0
- crypticorn/dex/client/api_response.py +20 -0
- crypticorn/dex/client/configuration.py +620 -0
- crypticorn/dex/client/exceptions.py +220 -0
- crypticorn/dex/client/models/__init__.py +30 -0
- crypticorn/dex/client/models/api_error_identifier.py +121 -0
- crypticorn/dex/client/models/api_error_level.py +37 -0
- crypticorn/dex/client/models/api_error_type.py +37 -0
- crypticorn/dex/client/models/exception_detail.py +117 -0
- crypticorn/dex/client/models/log_level.py +38 -0
- crypticorn/dex/client/models/paginated_response_signal_with_token.py +134 -0
- crypticorn/dex/client/models/risk.py +86 -0
- crypticorn/dex/client/models/signal_overview_stats.py +158 -0
- crypticorn/dex/client/models/signal_volume.py +84 -0
- crypticorn/dex/client/models/signal_with_token.py +163 -0
- crypticorn/dex/client/models/token_data.py +127 -0
- crypticorn/dex/client/models/token_detail.py +116 -0
- crypticorn/dex/client/py.typed +0 -0
- crypticorn/dex/client/rest.py +217 -0
- crypticorn/dex/main.py +1 -0
- crypticorn/hive/client/api/admin_api.py +1173 -47
- crypticorn/hive/client/api/data_api.py +499 -17
- crypticorn/hive/client/api/models_api.py +1595 -87
- crypticorn/hive/client/api/status_api.py +397 -16
- crypticorn/hive/client/api_client.py +0 -5
- crypticorn/hive/client/models/api_error_identifier.py +1 -1
- crypticorn/hive/client/models/coin_info.py +1 -1
- crypticorn/hive/client/models/exception_detail.py +1 -1
- crypticorn/hive/client/models/target_info.py +1 -1
- crypticorn/hive/client/rest.py +23 -4
- crypticorn/hive/main.py +99 -25
- crypticorn/hive/utils.py +2 -2
- crypticorn/klines/client/api/admin_api.py +1173 -47
- crypticorn/klines/client/api/change_in_timeframe_api.py +269 -11
- crypticorn/klines/client/api/funding_rates_api.py +315 -11
- crypticorn/klines/client/api/ohlcv_data_api.py +390 -11
- crypticorn/klines/client/api/status_api.py +397 -16
- crypticorn/klines/client/api/symbols_api.py +216 -11
- crypticorn/klines/client/api/udf_api.py +1268 -51
- crypticorn/klines/client/api_client.py +0 -5
- crypticorn/klines/client/models/api_error_identifier.py +3 -1
- crypticorn/klines/client/models/exception_detail.py +1 -1
- crypticorn/klines/client/models/ohlcv.py +1 -1
- crypticorn/klines/client/models/symbol_group.py +1 -1
- crypticorn/klines/client/models/udf_config.py +1 -1
- crypticorn/klines/client/rest.py +23 -4
- crypticorn/klines/main.py +89 -12
- crypticorn/metrics/client/api/admin_api.py +1173 -47
- crypticorn/metrics/client/api/exchanges_api.py +1370 -145
- crypticorn/metrics/client/api/indicators_api.py +622 -17
- crypticorn/metrics/client/api/logs_api.py +296 -11
- crypticorn/metrics/client/api/marketcap_api.py +1207 -67
- crypticorn/metrics/client/api/markets_api.py +343 -11
- crypticorn/metrics/client/api/quote_currencies_api.py +228 -11
- crypticorn/metrics/client/api/status_api.py +397 -16
- crypticorn/metrics/client/api/tokens_api.py +382 -15
- crypticorn/metrics/client/api_client.py +0 -5
- crypticorn/metrics/client/configuration.py +4 -2
- crypticorn/metrics/client/models/exception_detail.py +1 -1
- crypticorn/metrics/client/models/exchange_mapping.py +1 -1
- crypticorn/metrics/client/models/marketcap_ranking.py +1 -1
- crypticorn/metrics/client/models/marketcap_symbol_ranking.py +1 -1
- crypticorn/metrics/client/models/ohlcv.py +1 -1
- crypticorn/metrics/client/rest.py +23 -4
- crypticorn/metrics/main.py +113 -19
- crypticorn/pay/client/api/admin_api.py +1585 -57
- crypticorn/pay/client/api/now_payments_api.py +961 -39
- crypticorn/pay/client/api/payments_api.py +562 -17
- crypticorn/pay/client/api/products_api.py +880 -30
- crypticorn/pay/client/api/status_api.py +397 -16
- crypticorn/pay/client/api_client.py +0 -5
- crypticorn/pay/client/configuration.py +2 -2
- crypticorn/pay/client/models/api_error_identifier.py +7 -7
- crypticorn/pay/client/models/exception_detail.py +1 -1
- crypticorn/pay/client/models/now_create_invoice_req.py +1 -1
- crypticorn/pay/client/models/now_create_invoice_res.py +1 -1
- crypticorn/pay/client/models/product.py +1 -1
- crypticorn/pay/client/models/product_create.py +1 -1
- crypticorn/pay/client/models/product_update.py +1 -1
- 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 +11 -1
- crypticorn/trade/client/api/__init__.py +0 -1
- crypticorn/trade/client/api/admin_api.py +1184 -55
- crypticorn/trade/client/api/api_keys_api.py +1678 -162
- crypticorn/trade/client/api/bots_api.py +7563 -187
- crypticorn/trade/client/api/exchanges_api.py +565 -19
- crypticorn/trade/client/api/notifications_api.py +1290 -116
- crypticorn/trade/client/api/orders_api.py +393 -55
- crypticorn/trade/client/api/status_api.py +397 -13
- crypticorn/trade/client/api/strategies_api.py +1133 -77
- crypticorn/trade/client/api/trading_actions_api.py +786 -65
- crypticorn/trade/client/models/__init__.py +11 -0
- crypticorn/trade/client/models/actions_count.py +88 -0
- crypticorn/trade/client/models/api_error_identifier.py +1 -0
- crypticorn/trade/client/models/bot.py +7 -18
- crypticorn/trade/client/models/bot_create.py +17 -1
- crypticorn/trade/client/models/bot_update.py +17 -1
- crypticorn/trade/client/models/exchange.py +6 -1
- crypticorn/trade/client/models/exchange_key.py +1 -1
- crypticorn/trade/client/models/exchange_key_balance.py +111 -0
- crypticorn/trade/client/models/exchange_key_create.py +17 -1
- crypticorn/trade/client/models/exchange_key_update.py +17 -1
- crypticorn/trade/client/models/execution_ids.py +1 -1
- crypticorn/trade/client/models/futures_balance.py +27 -25
- crypticorn/trade/client/models/notification.py +17 -1
- crypticorn/trade/client/models/notification_create.py +18 -2
- crypticorn/trade/client/models/notification_update.py +17 -1
- crypticorn/trade/client/models/orders_count.py +88 -0
- crypticorn/trade/client/models/paginated_response_futures_trading_action.py +134 -0
- crypticorn/trade/client/models/paginated_response_order.py +134 -0
- crypticorn/trade/client/models/pn_l.py +95 -0
- crypticorn/trade/client/models/post_futures_action.py +1 -1
- crypticorn/trade/client/models/spot_balance.py +109 -0
- crypticorn/trade/client/models/strategy.py +22 -4
- crypticorn/trade/client/models/strategy_create.py +23 -5
- crypticorn/trade/client/models/strategy_exchange_info.py +16 -4
- crypticorn/trade/client/models/strategy_update.py +19 -3
- crypticorn/trade/client/models/tpsl.py +4 -19
- crypticorn/trade/client/models/tpsl_create.py +6 -19
- crypticorn/trade/client/rest.py +23 -4
- crypticorn/trade/main.py +15 -12
- {crypticorn-2.16.0.dist-info → crypticorn-2.17.0.dist-info}/METADATA +65 -20
- {crypticorn-2.16.0.dist-info → crypticorn-2.17.0.dist-info}/RECORD +163 -128
- crypticorn/trade/client/api/futures_trading_panel_api.py +0 -1285
- {crypticorn-2.16.0.dist-info → crypticorn-2.17.0.dist-info}/WHEEL +0 -0
- {crypticorn-2.16.0.dist-info → crypticorn-2.17.0.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.16.0.dist-info → crypticorn-2.17.0.dist-info}/licenses/LICENSE +0 -0
- {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
|
20
|
-
from typing import Any, List
|
21
|
-
from typing_extensions import Annotated
|
22
18
|
from crypticorn.pay.client.models.now_create_invoice_req import NowCreateInvoiceReq
|
23
19
|
from crypticorn.pay.client.models.now_create_invoice_res import NowCreateInvoiceRes
|
24
20
|
from crypticorn.pay.client.models.payment import Payment
|
@@ -27,6 +23,24 @@ from crypticorn.pay.client.api_client import ApiClient, RequestSerialized
|
|
27
23
|
from crypticorn.pay.client.api_response import ApiResponse
|
28
24
|
from crypticorn.pay.client.rest import RESTResponseType
|
29
25
|
|
26
|
+
# Import async_to_sync for sync methods
|
27
|
+
try:
|
28
|
+
from asgiref.sync import async_to_sync
|
29
|
+
|
30
|
+
_HAS_ASGIREF = True
|
31
|
+
except ImportError:
|
32
|
+
_HAS_ASGIREF = False
|
33
|
+
|
34
|
+
def async_to_sync(async_func):
|
35
|
+
"""Fallback decorator that raises an error if asgiref is not available."""
|
36
|
+
|
37
|
+
def wrapper(*args, **kwargs):
|
38
|
+
raise ImportError(
|
39
|
+
"asgiref is required for sync methods. Install with: pip install asgiref"
|
40
|
+
)
|
41
|
+
|
42
|
+
return wrapper
|
43
|
+
|
30
44
|
|
31
45
|
class NOWPaymentsApi:
|
32
46
|
"""NOTE: This class is auto generated by OpenAPI Generator
|
@@ -35,13 +49,126 @@ class NOWPaymentsApi:
|
|
35
49
|
Do not edit the class manually.
|
36
50
|
"""
|
37
51
|
|
38
|
-
def __init__(self, api_client=None) -> None:
|
52
|
+
def __init__(self, api_client=None, is_sync: bool = False) -> None:
|
39
53
|
if api_client is None:
|
40
54
|
api_client = ApiClient.get_default()
|
41
55
|
self.api_client = api_client
|
56
|
+
self.is_sync = is_sync
|
57
|
+
|
58
|
+
@validate_call
|
59
|
+
def create_now_invoice(
|
60
|
+
self,
|
61
|
+
now_create_invoice_req: NowCreateInvoiceReq,
|
62
|
+
_request_timeout: Union[
|
63
|
+
None,
|
64
|
+
Annotated[StrictFloat, Field(gt=0)],
|
65
|
+
Tuple[
|
66
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
67
|
+
],
|
68
|
+
] = None,
|
69
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
70
|
+
_content_type: Optional[StrictStr] = None,
|
71
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
72
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
73
|
+
) -> NowCreateInvoiceRes:
|
74
|
+
"""Create Invoice"""
|
75
|
+
if self.is_sync:
|
76
|
+
return self._create_now_invoice_sync(
|
77
|
+
now_create_invoice_req=now_create_invoice_req,
|
78
|
+
_request_timeout=_request_timeout,
|
79
|
+
_request_auth=_request_auth,
|
80
|
+
_content_type=_content_type,
|
81
|
+
_headers=_headers,
|
82
|
+
_host_index=_host_index,
|
83
|
+
)
|
84
|
+
|
85
|
+
else:
|
86
|
+
return self._create_now_invoice_async(
|
87
|
+
now_create_invoice_req=now_create_invoice_req,
|
88
|
+
_request_timeout=_request_timeout,
|
89
|
+
_request_auth=_request_auth,
|
90
|
+
_content_type=_content_type,
|
91
|
+
_headers=_headers,
|
92
|
+
_host_index=_host_index,
|
93
|
+
)
|
94
|
+
|
95
|
+
@validate_call
|
96
|
+
def create_now_invoice_with_http_info(
|
97
|
+
self,
|
98
|
+
now_create_invoice_req: NowCreateInvoiceReq,
|
99
|
+
_request_timeout: Union[
|
100
|
+
None,
|
101
|
+
Annotated[StrictFloat, Field(gt=0)],
|
102
|
+
Tuple[
|
103
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
104
|
+
],
|
105
|
+
] = None,
|
106
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
107
|
+
_content_type: Optional[StrictStr] = None,
|
108
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
109
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
110
|
+
) -> ApiResponse[NowCreateInvoiceRes]:
|
111
|
+
"""Create Invoice with HTTP info"""
|
112
|
+
if self.is_sync:
|
113
|
+
return self._create_now_invoice_sync_with_http_info(
|
114
|
+
now_create_invoice_req=now_create_invoice_req,
|
115
|
+
_request_timeout=_request_timeout,
|
116
|
+
_request_auth=_request_auth,
|
117
|
+
_content_type=_content_type,
|
118
|
+
_headers=_headers,
|
119
|
+
_host_index=_host_index,
|
120
|
+
)
|
121
|
+
|
122
|
+
else:
|
123
|
+
return self._create_now_invoice_async_with_http_info(
|
124
|
+
now_create_invoice_req=now_create_invoice_req,
|
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
|
+
@validate_call
|
133
|
+
def create_now_invoice_without_preload_content(
|
134
|
+
self,
|
135
|
+
now_create_invoice_req: NowCreateInvoiceReq,
|
136
|
+
_request_timeout: Union[
|
137
|
+
None,
|
138
|
+
Annotated[StrictFloat, Field(gt=0)],
|
139
|
+
Tuple[
|
140
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
141
|
+
],
|
142
|
+
] = None,
|
143
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
144
|
+
_content_type: Optional[StrictStr] = None,
|
145
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
146
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
147
|
+
) -> RESTResponseType:
|
148
|
+
"""Create Invoice without preloading content"""
|
149
|
+
if self.is_sync:
|
150
|
+
return self._create_now_invoice_sync_without_preload_content(
|
151
|
+
now_create_invoice_req=now_create_invoice_req,
|
152
|
+
_request_timeout=_request_timeout,
|
153
|
+
_request_auth=_request_auth,
|
154
|
+
_content_type=_content_type,
|
155
|
+
_headers=_headers,
|
156
|
+
_host_index=_host_index,
|
157
|
+
)
|
42
158
|
|
159
|
+
else:
|
160
|
+
return self._create_now_invoice_async_without_preload_content(
|
161
|
+
now_create_invoice_req=now_create_invoice_req,
|
162
|
+
_request_timeout=_request_timeout,
|
163
|
+
_request_auth=_request_auth,
|
164
|
+
_content_type=_content_type,
|
165
|
+
_headers=_headers,
|
166
|
+
_host_index=_host_index,
|
167
|
+
)
|
168
|
+
|
169
|
+
# Private async implementation methods
|
43
170
|
@validate_call
|
44
|
-
async def
|
171
|
+
async def _create_now_invoice_async(
|
45
172
|
self,
|
46
173
|
now_create_invoice_req: NowCreateInvoiceReq,
|
47
174
|
_request_timeout: Union[
|
@@ -58,7 +185,7 @@ class NOWPaymentsApi:
|
|
58
185
|
) -> NowCreateInvoiceRes:
|
59
186
|
"""Create Invoice
|
60
187
|
|
61
|
-
Create a payment invoice with a payment link for customer completion. Only
|
188
|
+
Create a payment invoice with a payment link for customer completion. Only Bearer authentication is supported.
|
62
189
|
|
63
190
|
:param now_create_invoice_req: (required)
|
64
191
|
:type now_create_invoice_req: NowCreateInvoiceReq
|
@@ -105,7 +232,7 @@ class NOWPaymentsApi:
|
|
105
232
|
).data
|
106
233
|
|
107
234
|
@validate_call
|
108
|
-
async def
|
235
|
+
async def _create_now_invoice_async_with_http_info(
|
109
236
|
self,
|
110
237
|
now_create_invoice_req: NowCreateInvoiceReq,
|
111
238
|
_request_timeout: Union[
|
@@ -122,7 +249,7 @@ class NOWPaymentsApi:
|
|
122
249
|
) -> ApiResponse[NowCreateInvoiceRes]:
|
123
250
|
"""Create Invoice
|
124
251
|
|
125
|
-
Create a payment invoice with a payment link for customer completion. Only
|
252
|
+
Create a payment invoice with a payment link for customer completion. Only Bearer authentication is supported.
|
126
253
|
|
127
254
|
:param now_create_invoice_req: (required)
|
128
255
|
:type now_create_invoice_req: NowCreateInvoiceReq
|
@@ -164,12 +291,11 @@ class NOWPaymentsApi:
|
|
164
291
|
)
|
165
292
|
await response_data.read()
|
166
293
|
return self.api_client.response_deserialize(
|
167
|
-
response_data=response_data,
|
168
|
-
response_types_map=_response_types_map,
|
294
|
+
response_data=response_data, response_types_map=_response_types_map
|
169
295
|
)
|
170
296
|
|
171
297
|
@validate_call
|
172
|
-
async def
|
298
|
+
async def _create_now_invoice_async_without_preload_content(
|
173
299
|
self,
|
174
300
|
now_create_invoice_req: NowCreateInvoiceReq,
|
175
301
|
_request_timeout: Union[
|
@@ -186,7 +312,7 @@ class NOWPaymentsApi:
|
|
186
312
|
) -> RESTResponseType:
|
187
313
|
"""Create Invoice
|
188
314
|
|
189
|
-
Create a payment invoice with a payment link for customer completion. Only
|
315
|
+
Create a payment invoice with a payment link for customer completion. Only Bearer authentication is supported.
|
190
316
|
|
191
317
|
:param now_create_invoice_req: (required)
|
192
318
|
:type now_create_invoice_req: NowCreateInvoiceReq
|
@@ -226,7 +352,86 @@ class NOWPaymentsApi:
|
|
226
352
|
response_data = await self.api_client.call_api(
|
227
353
|
*_param, _request_timeout=_request_timeout
|
228
354
|
)
|
229
|
-
return response_data
|
355
|
+
return response_data
|
356
|
+
|
357
|
+
# Private sync implementation methods
|
358
|
+
@validate_call
|
359
|
+
def _create_now_invoice_sync(
|
360
|
+
self,
|
361
|
+
now_create_invoice_req: NowCreateInvoiceReq,
|
362
|
+
_request_timeout: Union[
|
363
|
+
None,
|
364
|
+
Annotated[StrictFloat, Field(gt=0)],
|
365
|
+
Tuple[
|
366
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
367
|
+
],
|
368
|
+
] = None,
|
369
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
370
|
+
_content_type: Optional[StrictStr] = None,
|
371
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
372
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
373
|
+
) -> NowCreateInvoiceRes:
|
374
|
+
"""Synchronous version of create_now_invoice"""
|
375
|
+
return async_to_sync(self._create_now_invoice_async)(
|
376
|
+
now_create_invoice_req=now_create_invoice_req,
|
377
|
+
_request_timeout=_request_timeout,
|
378
|
+
_request_auth=_request_auth,
|
379
|
+
_content_type=_content_type,
|
380
|
+
_headers=_headers,
|
381
|
+
_host_index=_host_index,
|
382
|
+
)
|
383
|
+
|
384
|
+
@validate_call
|
385
|
+
def _create_now_invoice_sync_with_http_info(
|
386
|
+
self,
|
387
|
+
now_create_invoice_req: NowCreateInvoiceReq,
|
388
|
+
_request_timeout: Union[
|
389
|
+
None,
|
390
|
+
Annotated[StrictFloat, Field(gt=0)],
|
391
|
+
Tuple[
|
392
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
393
|
+
],
|
394
|
+
] = None,
|
395
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
396
|
+
_content_type: Optional[StrictStr] = None,
|
397
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
398
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
399
|
+
) -> ApiResponse[NowCreateInvoiceRes]:
|
400
|
+
"""Synchronous version of create_now_invoice_with_http_info"""
|
401
|
+
return async_to_sync(self._create_now_invoice_async_with_http_info)(
|
402
|
+
now_create_invoice_req=now_create_invoice_req,
|
403
|
+
_request_timeout=_request_timeout,
|
404
|
+
_request_auth=_request_auth,
|
405
|
+
_content_type=_content_type,
|
406
|
+
_headers=_headers,
|
407
|
+
_host_index=_host_index,
|
408
|
+
)
|
409
|
+
|
410
|
+
@validate_call
|
411
|
+
def _create_now_invoice_sync_without_preload_content(
|
412
|
+
self,
|
413
|
+
now_create_invoice_req: NowCreateInvoiceReq,
|
414
|
+
_request_timeout: Union[
|
415
|
+
None,
|
416
|
+
Annotated[StrictFloat, Field(gt=0)],
|
417
|
+
Tuple[
|
418
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
419
|
+
],
|
420
|
+
] = None,
|
421
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
422
|
+
_content_type: Optional[StrictStr] = None,
|
423
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
424
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
425
|
+
) -> RESTResponseType:
|
426
|
+
"""Synchronous version of create_now_invoice_without_preload_content"""
|
427
|
+
return async_to_sync(self._create_now_invoice_async_without_preload_content)(
|
428
|
+
now_create_invoice_req=now_create_invoice_req,
|
429
|
+
_request_timeout=_request_timeout,
|
430
|
+
_request_auth=_request_auth,
|
431
|
+
_content_type=_content_type,
|
432
|
+
_headers=_headers,
|
433
|
+
_host_index=_host_index,
|
434
|
+
)
|
230
435
|
|
231
436
|
def _create_now_invoice_serialize(
|
232
437
|
self,
|
@@ -293,7 +498,110 @@ class NOWPaymentsApi:
|
|
293
498
|
)
|
294
499
|
|
295
500
|
@validate_call
|
296
|
-
|
501
|
+
def get_now_api_status(
|
502
|
+
self,
|
503
|
+
_request_timeout: Union[
|
504
|
+
None,
|
505
|
+
Annotated[StrictFloat, Field(gt=0)],
|
506
|
+
Tuple[
|
507
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
508
|
+
],
|
509
|
+
] = None,
|
510
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
511
|
+
_content_type: Optional[StrictStr] = None,
|
512
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
513
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
514
|
+
) -> str:
|
515
|
+
"""Get Status"""
|
516
|
+
if self.is_sync:
|
517
|
+
return self._get_now_api_status_sync(
|
518
|
+
_request_timeout=_request_timeout,
|
519
|
+
_request_auth=_request_auth,
|
520
|
+
_content_type=_content_type,
|
521
|
+
_headers=_headers,
|
522
|
+
_host_index=_host_index,
|
523
|
+
)
|
524
|
+
|
525
|
+
else:
|
526
|
+
return self._get_now_api_status_async(
|
527
|
+
_request_timeout=_request_timeout,
|
528
|
+
_request_auth=_request_auth,
|
529
|
+
_content_type=_content_type,
|
530
|
+
_headers=_headers,
|
531
|
+
_host_index=_host_index,
|
532
|
+
)
|
533
|
+
|
534
|
+
@validate_call
|
535
|
+
def get_now_api_status_with_http_info(
|
536
|
+
self,
|
537
|
+
_request_timeout: Union[
|
538
|
+
None,
|
539
|
+
Annotated[StrictFloat, Field(gt=0)],
|
540
|
+
Tuple[
|
541
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
542
|
+
],
|
543
|
+
] = None,
|
544
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
545
|
+
_content_type: Optional[StrictStr] = None,
|
546
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
547
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
548
|
+
) -> ApiResponse[str]:
|
549
|
+
"""Get Status with HTTP info"""
|
550
|
+
if self.is_sync:
|
551
|
+
return self._get_now_api_status_sync_with_http_info(
|
552
|
+
_request_timeout=_request_timeout,
|
553
|
+
_request_auth=_request_auth,
|
554
|
+
_content_type=_content_type,
|
555
|
+
_headers=_headers,
|
556
|
+
_host_index=_host_index,
|
557
|
+
)
|
558
|
+
|
559
|
+
else:
|
560
|
+
return self._get_now_api_status_async_with_http_info(
|
561
|
+
_request_timeout=_request_timeout,
|
562
|
+
_request_auth=_request_auth,
|
563
|
+
_content_type=_content_type,
|
564
|
+
_headers=_headers,
|
565
|
+
_host_index=_host_index,
|
566
|
+
)
|
567
|
+
|
568
|
+
@validate_call
|
569
|
+
def get_now_api_status_without_preload_content(
|
570
|
+
self,
|
571
|
+
_request_timeout: Union[
|
572
|
+
None,
|
573
|
+
Annotated[StrictFloat, Field(gt=0)],
|
574
|
+
Tuple[
|
575
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
576
|
+
],
|
577
|
+
] = None,
|
578
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
579
|
+
_content_type: Optional[StrictStr] = None,
|
580
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
581
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
582
|
+
) -> RESTResponseType:
|
583
|
+
"""Get Status without preloading content"""
|
584
|
+
if self.is_sync:
|
585
|
+
return self._get_now_api_status_sync_without_preload_content(
|
586
|
+
_request_timeout=_request_timeout,
|
587
|
+
_request_auth=_request_auth,
|
588
|
+
_content_type=_content_type,
|
589
|
+
_headers=_headers,
|
590
|
+
_host_index=_host_index,
|
591
|
+
)
|
592
|
+
|
593
|
+
else:
|
594
|
+
return self._get_now_api_status_async_without_preload_content(
|
595
|
+
_request_timeout=_request_timeout,
|
596
|
+
_request_auth=_request_auth,
|
597
|
+
_content_type=_content_type,
|
598
|
+
_headers=_headers,
|
599
|
+
_host_index=_host_index,
|
600
|
+
)
|
601
|
+
|
602
|
+
# Private async implementation methods
|
603
|
+
@validate_call
|
604
|
+
async def _get_now_api_status_async(
|
297
605
|
self,
|
298
606
|
_request_timeout: Union[
|
299
607
|
None,
|
@@ -353,7 +661,7 @@ class NOWPaymentsApi:
|
|
353
661
|
).data
|
354
662
|
|
355
663
|
@validate_call
|
356
|
-
async def
|
664
|
+
async def _get_now_api_status_async_with_http_info(
|
357
665
|
self,
|
358
666
|
_request_timeout: Union[
|
359
667
|
None,
|
@@ -408,12 +716,11 @@ class NOWPaymentsApi:
|
|
408
716
|
)
|
409
717
|
await response_data.read()
|
410
718
|
return self.api_client.response_deserialize(
|
411
|
-
response_data=response_data,
|
412
|
-
response_types_map=_response_types_map,
|
719
|
+
response_data=response_data, response_types_map=_response_types_map
|
413
720
|
)
|
414
721
|
|
415
722
|
@validate_call
|
416
|
-
async def
|
723
|
+
async def _get_now_api_status_async_without_preload_content(
|
417
724
|
self,
|
418
725
|
_request_timeout: Union[
|
419
726
|
None,
|
@@ -466,7 +773,80 @@ class NOWPaymentsApi:
|
|
466
773
|
response_data = await self.api_client.call_api(
|
467
774
|
*_param, _request_timeout=_request_timeout
|
468
775
|
)
|
469
|
-
return response_data
|
776
|
+
return response_data
|
777
|
+
|
778
|
+
# Private sync implementation methods
|
779
|
+
@validate_call
|
780
|
+
def _get_now_api_status_sync(
|
781
|
+
self,
|
782
|
+
_request_timeout: Union[
|
783
|
+
None,
|
784
|
+
Annotated[StrictFloat, Field(gt=0)],
|
785
|
+
Tuple[
|
786
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
787
|
+
],
|
788
|
+
] = None,
|
789
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
790
|
+
_content_type: Optional[StrictStr] = None,
|
791
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
792
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
793
|
+
) -> str:
|
794
|
+
"""Synchronous version of get_now_api_status"""
|
795
|
+
return async_to_sync(self._get_now_api_status_async)(
|
796
|
+
_request_timeout=_request_timeout,
|
797
|
+
_request_auth=_request_auth,
|
798
|
+
_content_type=_content_type,
|
799
|
+
_headers=_headers,
|
800
|
+
_host_index=_host_index,
|
801
|
+
)
|
802
|
+
|
803
|
+
@validate_call
|
804
|
+
def _get_now_api_status_sync_with_http_info(
|
805
|
+
self,
|
806
|
+
_request_timeout: Union[
|
807
|
+
None,
|
808
|
+
Annotated[StrictFloat, Field(gt=0)],
|
809
|
+
Tuple[
|
810
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
811
|
+
],
|
812
|
+
] = None,
|
813
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
814
|
+
_content_type: Optional[StrictStr] = None,
|
815
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
816
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
817
|
+
) -> ApiResponse[str]:
|
818
|
+
"""Synchronous version of get_now_api_status_with_http_info"""
|
819
|
+
return async_to_sync(self._get_now_api_status_async_with_http_info)(
|
820
|
+
_request_timeout=_request_timeout,
|
821
|
+
_request_auth=_request_auth,
|
822
|
+
_content_type=_content_type,
|
823
|
+
_headers=_headers,
|
824
|
+
_host_index=_host_index,
|
825
|
+
)
|
826
|
+
|
827
|
+
@validate_call
|
828
|
+
def _get_now_api_status_sync_without_preload_content(
|
829
|
+
self,
|
830
|
+
_request_timeout: Union[
|
831
|
+
None,
|
832
|
+
Annotated[StrictFloat, Field(gt=0)],
|
833
|
+
Tuple[
|
834
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
835
|
+
],
|
836
|
+
] = None,
|
837
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
838
|
+
_content_type: Optional[StrictStr] = None,
|
839
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
840
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
841
|
+
) -> RESTResponseType:
|
842
|
+
"""Synchronous version of get_now_api_status_without_preload_content"""
|
843
|
+
return async_to_sync(self._get_now_api_status_async_without_preload_content)(
|
844
|
+
_request_timeout=_request_timeout,
|
845
|
+
_request_auth=_request_auth,
|
846
|
+
_content_type=_content_type,
|
847
|
+
_headers=_headers,
|
848
|
+
_host_index=_host_index,
|
849
|
+
)
|
470
850
|
|
471
851
|
def _get_now_api_status_serialize(
|
472
852
|
self,
|
@@ -502,7 +882,7 @@ class NOWPaymentsApi:
|
|
502
882
|
)
|
503
883
|
|
504
884
|
# authentication setting
|
505
|
-
_auth_settings: List[str] = ["HTTPBearer"]
|
885
|
+
_auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
|
506
886
|
|
507
887
|
return self.api_client.param_serialize(
|
508
888
|
method="GET",
|
@@ -520,7 +900,119 @@ class NOWPaymentsApi:
|
|
520
900
|
)
|
521
901
|
|
522
902
|
@validate_call
|
523
|
-
|
903
|
+
def get_now_payment_by_invoice(
|
904
|
+
self,
|
905
|
+
id: Annotated[StrictInt, Field(description="The invoice ID")],
|
906
|
+
_request_timeout: Union[
|
907
|
+
None,
|
908
|
+
Annotated[StrictFloat, Field(gt=0)],
|
909
|
+
Tuple[
|
910
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
911
|
+
],
|
912
|
+
] = None,
|
913
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
914
|
+
_content_type: Optional[StrictStr] = None,
|
915
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
916
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
917
|
+
) -> Payment:
|
918
|
+
"""Get Now Payment By Invoice"""
|
919
|
+
if self.is_sync:
|
920
|
+
return self._get_now_payment_by_invoice_sync(
|
921
|
+
id=id,
|
922
|
+
_request_timeout=_request_timeout,
|
923
|
+
_request_auth=_request_auth,
|
924
|
+
_content_type=_content_type,
|
925
|
+
_headers=_headers,
|
926
|
+
_host_index=_host_index,
|
927
|
+
)
|
928
|
+
|
929
|
+
else:
|
930
|
+
return self._get_now_payment_by_invoice_async(
|
931
|
+
id=id,
|
932
|
+
_request_timeout=_request_timeout,
|
933
|
+
_request_auth=_request_auth,
|
934
|
+
_content_type=_content_type,
|
935
|
+
_headers=_headers,
|
936
|
+
_host_index=_host_index,
|
937
|
+
)
|
938
|
+
|
939
|
+
@validate_call
|
940
|
+
def get_now_payment_by_invoice_with_http_info(
|
941
|
+
self,
|
942
|
+
id: Annotated[StrictInt, Field(description="The invoice ID")],
|
943
|
+
_request_timeout: Union[
|
944
|
+
None,
|
945
|
+
Annotated[StrictFloat, Field(gt=0)],
|
946
|
+
Tuple[
|
947
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
948
|
+
],
|
949
|
+
] = None,
|
950
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
951
|
+
_content_type: Optional[StrictStr] = None,
|
952
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
953
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
954
|
+
) -> ApiResponse[Payment]:
|
955
|
+
"""Get Now Payment By Invoice with HTTP info"""
|
956
|
+
if self.is_sync:
|
957
|
+
return self._get_now_payment_by_invoice_sync_with_http_info(
|
958
|
+
id=id,
|
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_now_payment_by_invoice_async_with_http_info(
|
968
|
+
id=id,
|
969
|
+
_request_timeout=_request_timeout,
|
970
|
+
_request_auth=_request_auth,
|
971
|
+
_content_type=_content_type,
|
972
|
+
_headers=_headers,
|
973
|
+
_host_index=_host_index,
|
974
|
+
)
|
975
|
+
|
976
|
+
@validate_call
|
977
|
+
def get_now_payment_by_invoice_without_preload_content(
|
978
|
+
self,
|
979
|
+
id: Annotated[StrictInt, Field(description="The invoice ID")],
|
980
|
+
_request_timeout: Union[
|
981
|
+
None,
|
982
|
+
Annotated[StrictFloat, Field(gt=0)],
|
983
|
+
Tuple[
|
984
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
985
|
+
],
|
986
|
+
] = None,
|
987
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
988
|
+
_content_type: Optional[StrictStr] = None,
|
989
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
990
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
991
|
+
) -> RESTResponseType:
|
992
|
+
"""Get Now Payment By Invoice without preloading content"""
|
993
|
+
if self.is_sync:
|
994
|
+
return self._get_now_payment_by_invoice_sync_without_preload_content(
|
995
|
+
id=id,
|
996
|
+
_request_timeout=_request_timeout,
|
997
|
+
_request_auth=_request_auth,
|
998
|
+
_content_type=_content_type,
|
999
|
+
_headers=_headers,
|
1000
|
+
_host_index=_host_index,
|
1001
|
+
)
|
1002
|
+
|
1003
|
+
else:
|
1004
|
+
return self._get_now_payment_by_invoice_async_without_preload_content(
|
1005
|
+
id=id,
|
1006
|
+
_request_timeout=_request_timeout,
|
1007
|
+
_request_auth=_request_auth,
|
1008
|
+
_content_type=_content_type,
|
1009
|
+
_headers=_headers,
|
1010
|
+
_host_index=_host_index,
|
1011
|
+
)
|
1012
|
+
|
1013
|
+
# Private async implementation methods
|
1014
|
+
@validate_call
|
1015
|
+
async def _get_now_payment_by_invoice_async(
|
524
1016
|
self,
|
525
1017
|
id: Annotated[StrictInt, Field(description="The invoice ID")],
|
526
1018
|
_request_timeout: Union[
|
@@ -584,7 +1076,7 @@ class NOWPaymentsApi:
|
|
584
1076
|
).data
|
585
1077
|
|
586
1078
|
@validate_call
|
587
|
-
async def
|
1079
|
+
async def _get_now_payment_by_invoice_async_with_http_info(
|
588
1080
|
self,
|
589
1081
|
id: Annotated[StrictInt, Field(description="The invoice ID")],
|
590
1082
|
_request_timeout: Union[
|
@@ -643,12 +1135,11 @@ class NOWPaymentsApi:
|
|
643
1135
|
)
|
644
1136
|
await response_data.read()
|
645
1137
|
return self.api_client.response_deserialize(
|
646
|
-
response_data=response_data,
|
647
|
-
response_types_map=_response_types_map,
|
1138
|
+
response_data=response_data, response_types_map=_response_types_map
|
648
1139
|
)
|
649
1140
|
|
650
1141
|
@validate_call
|
651
|
-
async def
|
1142
|
+
async def _get_now_payment_by_invoice_async_without_preload_content(
|
652
1143
|
self,
|
653
1144
|
id: Annotated[StrictInt, Field(description="The invoice ID")],
|
654
1145
|
_request_timeout: Union[
|
@@ -705,7 +1196,88 @@ class NOWPaymentsApi:
|
|
705
1196
|
response_data = await self.api_client.call_api(
|
706
1197
|
*_param, _request_timeout=_request_timeout
|
707
1198
|
)
|
708
|
-
return response_data
|
1199
|
+
return response_data
|
1200
|
+
|
1201
|
+
# Private sync implementation methods
|
1202
|
+
@validate_call
|
1203
|
+
def _get_now_payment_by_invoice_sync(
|
1204
|
+
self,
|
1205
|
+
id: Annotated[StrictInt, Field(description="The invoice ID")],
|
1206
|
+
_request_timeout: Union[
|
1207
|
+
None,
|
1208
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1209
|
+
Tuple[
|
1210
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1211
|
+
],
|
1212
|
+
] = None,
|
1213
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1214
|
+
_content_type: Optional[StrictStr] = None,
|
1215
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1216
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1217
|
+
) -> Payment:
|
1218
|
+
"""Synchronous version of get_now_payment_by_invoice"""
|
1219
|
+
return async_to_sync(self._get_now_payment_by_invoice_async)(
|
1220
|
+
id=id,
|
1221
|
+
_request_timeout=_request_timeout,
|
1222
|
+
_request_auth=_request_auth,
|
1223
|
+
_content_type=_content_type,
|
1224
|
+
_headers=_headers,
|
1225
|
+
_host_index=_host_index,
|
1226
|
+
)
|
1227
|
+
|
1228
|
+
@validate_call
|
1229
|
+
def _get_now_payment_by_invoice_sync_with_http_info(
|
1230
|
+
self,
|
1231
|
+
id: Annotated[StrictInt, Field(description="The invoice ID")],
|
1232
|
+
_request_timeout: Union[
|
1233
|
+
None,
|
1234
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1235
|
+
Tuple[
|
1236
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1237
|
+
],
|
1238
|
+
] = None,
|
1239
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1240
|
+
_content_type: Optional[StrictStr] = None,
|
1241
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1242
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1243
|
+
) -> ApiResponse[Payment]:
|
1244
|
+
"""Synchronous version of get_now_payment_by_invoice_with_http_info"""
|
1245
|
+
return async_to_sync(self._get_now_payment_by_invoice_async_with_http_info)(
|
1246
|
+
id=id,
|
1247
|
+
_request_timeout=_request_timeout,
|
1248
|
+
_request_auth=_request_auth,
|
1249
|
+
_content_type=_content_type,
|
1250
|
+
_headers=_headers,
|
1251
|
+
_host_index=_host_index,
|
1252
|
+
)
|
1253
|
+
|
1254
|
+
@validate_call
|
1255
|
+
def _get_now_payment_by_invoice_sync_without_preload_content(
|
1256
|
+
self,
|
1257
|
+
id: Annotated[StrictInt, Field(description="The invoice ID")],
|
1258
|
+
_request_timeout: Union[
|
1259
|
+
None,
|
1260
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1261
|
+
Tuple[
|
1262
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1263
|
+
],
|
1264
|
+
] = None,
|
1265
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1266
|
+
_content_type: Optional[StrictStr] = None,
|
1267
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1268
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1269
|
+
) -> RESTResponseType:
|
1270
|
+
"""Synchronous version of get_now_payment_by_invoice_without_preload_content"""
|
1271
|
+
return async_to_sync(
|
1272
|
+
self._get_now_payment_by_invoice_async_without_preload_content
|
1273
|
+
)(
|
1274
|
+
id=id,
|
1275
|
+
_request_timeout=_request_timeout,
|
1276
|
+
_request_auth=_request_auth,
|
1277
|
+
_content_type=_content_type,
|
1278
|
+
_headers=_headers,
|
1279
|
+
_host_index=_host_index,
|
1280
|
+
)
|
709
1281
|
|
710
1282
|
def _get_now_payment_by_invoice_serialize(
|
711
1283
|
self,
|
@@ -762,7 +1334,110 @@ class NOWPaymentsApi:
|
|
762
1334
|
)
|
763
1335
|
|
764
1336
|
@validate_call
|
765
|
-
|
1337
|
+
def get_now_payments(
|
1338
|
+
self,
|
1339
|
+
_request_timeout: Union[
|
1340
|
+
None,
|
1341
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1342
|
+
Tuple[
|
1343
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1344
|
+
],
|
1345
|
+
] = None,
|
1346
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1347
|
+
_content_type: Optional[StrictStr] = None,
|
1348
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1349
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1350
|
+
) -> List[Payment]:
|
1351
|
+
"""Get Now Payments"""
|
1352
|
+
if self.is_sync:
|
1353
|
+
return self._get_now_payments_sync(
|
1354
|
+
_request_timeout=_request_timeout,
|
1355
|
+
_request_auth=_request_auth,
|
1356
|
+
_content_type=_content_type,
|
1357
|
+
_headers=_headers,
|
1358
|
+
_host_index=_host_index,
|
1359
|
+
)
|
1360
|
+
|
1361
|
+
else:
|
1362
|
+
return self._get_now_payments_async(
|
1363
|
+
_request_timeout=_request_timeout,
|
1364
|
+
_request_auth=_request_auth,
|
1365
|
+
_content_type=_content_type,
|
1366
|
+
_headers=_headers,
|
1367
|
+
_host_index=_host_index,
|
1368
|
+
)
|
1369
|
+
|
1370
|
+
@validate_call
|
1371
|
+
def get_now_payments_with_http_info(
|
1372
|
+
self,
|
1373
|
+
_request_timeout: Union[
|
1374
|
+
None,
|
1375
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1376
|
+
Tuple[
|
1377
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1378
|
+
],
|
1379
|
+
] = None,
|
1380
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1381
|
+
_content_type: Optional[StrictStr] = None,
|
1382
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1383
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1384
|
+
) -> ApiResponse[List[Payment]]:
|
1385
|
+
"""Get Now Payments with HTTP info"""
|
1386
|
+
if self.is_sync:
|
1387
|
+
return self._get_now_payments_sync_with_http_info(
|
1388
|
+
_request_timeout=_request_timeout,
|
1389
|
+
_request_auth=_request_auth,
|
1390
|
+
_content_type=_content_type,
|
1391
|
+
_headers=_headers,
|
1392
|
+
_host_index=_host_index,
|
1393
|
+
)
|
1394
|
+
|
1395
|
+
else:
|
1396
|
+
return self._get_now_payments_async_with_http_info(
|
1397
|
+
_request_timeout=_request_timeout,
|
1398
|
+
_request_auth=_request_auth,
|
1399
|
+
_content_type=_content_type,
|
1400
|
+
_headers=_headers,
|
1401
|
+
_host_index=_host_index,
|
1402
|
+
)
|
1403
|
+
|
1404
|
+
@validate_call
|
1405
|
+
def get_now_payments_without_preload_content(
|
1406
|
+
self,
|
1407
|
+
_request_timeout: Union[
|
1408
|
+
None,
|
1409
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1410
|
+
Tuple[
|
1411
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1412
|
+
],
|
1413
|
+
] = None,
|
1414
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1415
|
+
_content_type: Optional[StrictStr] = None,
|
1416
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1417
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1418
|
+
) -> RESTResponseType:
|
1419
|
+
"""Get Now Payments without preloading content"""
|
1420
|
+
if self.is_sync:
|
1421
|
+
return self._get_now_payments_sync_without_preload_content(
|
1422
|
+
_request_timeout=_request_timeout,
|
1423
|
+
_request_auth=_request_auth,
|
1424
|
+
_content_type=_content_type,
|
1425
|
+
_headers=_headers,
|
1426
|
+
_host_index=_host_index,
|
1427
|
+
)
|
1428
|
+
|
1429
|
+
else:
|
1430
|
+
return self._get_now_payments_async_without_preload_content(
|
1431
|
+
_request_timeout=_request_timeout,
|
1432
|
+
_request_auth=_request_auth,
|
1433
|
+
_content_type=_content_type,
|
1434
|
+
_headers=_headers,
|
1435
|
+
_host_index=_host_index,
|
1436
|
+
)
|
1437
|
+
|
1438
|
+
# Private async implementation methods
|
1439
|
+
@validate_call
|
1440
|
+
async def _get_now_payments_async(
|
766
1441
|
self,
|
767
1442
|
_request_timeout: Union[
|
768
1443
|
None,
|
@@ -822,7 +1497,7 @@ class NOWPaymentsApi:
|
|
822
1497
|
).data
|
823
1498
|
|
824
1499
|
@validate_call
|
825
|
-
async def
|
1500
|
+
async def _get_now_payments_async_with_http_info(
|
826
1501
|
self,
|
827
1502
|
_request_timeout: Union[
|
828
1503
|
None,
|
@@ -877,12 +1552,11 @@ class NOWPaymentsApi:
|
|
877
1552
|
)
|
878
1553
|
await response_data.read()
|
879
1554
|
return self.api_client.response_deserialize(
|
880
|
-
response_data=response_data,
|
881
|
-
response_types_map=_response_types_map,
|
1555
|
+
response_data=response_data, response_types_map=_response_types_map
|
882
1556
|
)
|
883
1557
|
|
884
1558
|
@validate_call
|
885
|
-
async def
|
1559
|
+
async def _get_now_payments_async_without_preload_content(
|
886
1560
|
self,
|
887
1561
|
_request_timeout: Union[
|
888
1562
|
None,
|
@@ -935,7 +1609,80 @@ class NOWPaymentsApi:
|
|
935
1609
|
response_data = await self.api_client.call_api(
|
936
1610
|
*_param, _request_timeout=_request_timeout
|
937
1611
|
)
|
938
|
-
return response_data
|
1612
|
+
return response_data
|
1613
|
+
|
1614
|
+
# Private sync implementation methods
|
1615
|
+
@validate_call
|
1616
|
+
def _get_now_payments_sync(
|
1617
|
+
self,
|
1618
|
+
_request_timeout: Union[
|
1619
|
+
None,
|
1620
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1621
|
+
Tuple[
|
1622
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1623
|
+
],
|
1624
|
+
] = None,
|
1625
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1626
|
+
_content_type: Optional[StrictStr] = None,
|
1627
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1628
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1629
|
+
) -> List[Payment]:
|
1630
|
+
"""Synchronous version of get_now_payments"""
|
1631
|
+
return async_to_sync(self._get_now_payments_async)(
|
1632
|
+
_request_timeout=_request_timeout,
|
1633
|
+
_request_auth=_request_auth,
|
1634
|
+
_content_type=_content_type,
|
1635
|
+
_headers=_headers,
|
1636
|
+
_host_index=_host_index,
|
1637
|
+
)
|
1638
|
+
|
1639
|
+
@validate_call
|
1640
|
+
def _get_now_payments_sync_with_http_info(
|
1641
|
+
self,
|
1642
|
+
_request_timeout: Union[
|
1643
|
+
None,
|
1644
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1645
|
+
Tuple[
|
1646
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1647
|
+
],
|
1648
|
+
] = None,
|
1649
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1650
|
+
_content_type: Optional[StrictStr] = None,
|
1651
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1652
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1653
|
+
) -> ApiResponse[List[Payment]]:
|
1654
|
+
"""Synchronous version of get_now_payments_with_http_info"""
|
1655
|
+
return async_to_sync(self._get_now_payments_async_with_http_info)(
|
1656
|
+
_request_timeout=_request_timeout,
|
1657
|
+
_request_auth=_request_auth,
|
1658
|
+
_content_type=_content_type,
|
1659
|
+
_headers=_headers,
|
1660
|
+
_host_index=_host_index,
|
1661
|
+
)
|
1662
|
+
|
1663
|
+
@validate_call
|
1664
|
+
def _get_now_payments_sync_without_preload_content(
|
1665
|
+
self,
|
1666
|
+
_request_timeout: Union[
|
1667
|
+
None,
|
1668
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1669
|
+
Tuple[
|
1670
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1671
|
+
],
|
1672
|
+
] = None,
|
1673
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1674
|
+
_content_type: Optional[StrictStr] = None,
|
1675
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1676
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1677
|
+
) -> RESTResponseType:
|
1678
|
+
"""Synchronous version of get_now_payments_without_preload_content"""
|
1679
|
+
return async_to_sync(self._get_now_payments_async_without_preload_content)(
|
1680
|
+
_request_timeout=_request_timeout,
|
1681
|
+
_request_auth=_request_auth,
|
1682
|
+
_content_type=_content_type,
|
1683
|
+
_headers=_headers,
|
1684
|
+
_host_index=_host_index,
|
1685
|
+
)
|
939
1686
|
|
940
1687
|
def _get_now_payments_serialize(
|
941
1688
|
self,
|
@@ -989,7 +1736,110 @@ class NOWPaymentsApi:
|
|
989
1736
|
)
|
990
1737
|
|
991
1738
|
@validate_call
|
992
|
-
|
1739
|
+
def handle_now_webhook(
|
1740
|
+
self,
|
1741
|
+
_request_timeout: Union[
|
1742
|
+
None,
|
1743
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1744
|
+
Tuple[
|
1745
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1746
|
+
],
|
1747
|
+
] = None,
|
1748
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1749
|
+
_content_type: Optional[StrictStr] = None,
|
1750
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1751
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1752
|
+
) -> object:
|
1753
|
+
"""Handle Webhook"""
|
1754
|
+
if self.is_sync:
|
1755
|
+
return self._handle_now_webhook_sync(
|
1756
|
+
_request_timeout=_request_timeout,
|
1757
|
+
_request_auth=_request_auth,
|
1758
|
+
_content_type=_content_type,
|
1759
|
+
_headers=_headers,
|
1760
|
+
_host_index=_host_index,
|
1761
|
+
)
|
1762
|
+
|
1763
|
+
else:
|
1764
|
+
return self._handle_now_webhook_async(
|
1765
|
+
_request_timeout=_request_timeout,
|
1766
|
+
_request_auth=_request_auth,
|
1767
|
+
_content_type=_content_type,
|
1768
|
+
_headers=_headers,
|
1769
|
+
_host_index=_host_index,
|
1770
|
+
)
|
1771
|
+
|
1772
|
+
@validate_call
|
1773
|
+
def handle_now_webhook_with_http_info(
|
1774
|
+
self,
|
1775
|
+
_request_timeout: Union[
|
1776
|
+
None,
|
1777
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1778
|
+
Tuple[
|
1779
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1780
|
+
],
|
1781
|
+
] = None,
|
1782
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1783
|
+
_content_type: Optional[StrictStr] = None,
|
1784
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1785
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1786
|
+
) -> ApiResponse[object]:
|
1787
|
+
"""Handle Webhook with HTTP info"""
|
1788
|
+
if self.is_sync:
|
1789
|
+
return self._handle_now_webhook_sync_with_http_info(
|
1790
|
+
_request_timeout=_request_timeout,
|
1791
|
+
_request_auth=_request_auth,
|
1792
|
+
_content_type=_content_type,
|
1793
|
+
_headers=_headers,
|
1794
|
+
_host_index=_host_index,
|
1795
|
+
)
|
1796
|
+
|
1797
|
+
else:
|
1798
|
+
return self._handle_now_webhook_async_with_http_info(
|
1799
|
+
_request_timeout=_request_timeout,
|
1800
|
+
_request_auth=_request_auth,
|
1801
|
+
_content_type=_content_type,
|
1802
|
+
_headers=_headers,
|
1803
|
+
_host_index=_host_index,
|
1804
|
+
)
|
1805
|
+
|
1806
|
+
@validate_call
|
1807
|
+
def handle_now_webhook_without_preload_content(
|
1808
|
+
self,
|
1809
|
+
_request_timeout: Union[
|
1810
|
+
None,
|
1811
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1812
|
+
Tuple[
|
1813
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1814
|
+
],
|
1815
|
+
] = None,
|
1816
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1817
|
+
_content_type: Optional[StrictStr] = None,
|
1818
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1819
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1820
|
+
) -> RESTResponseType:
|
1821
|
+
"""Handle Webhook without preloading content"""
|
1822
|
+
if self.is_sync:
|
1823
|
+
return self._handle_now_webhook_sync_without_preload_content(
|
1824
|
+
_request_timeout=_request_timeout,
|
1825
|
+
_request_auth=_request_auth,
|
1826
|
+
_content_type=_content_type,
|
1827
|
+
_headers=_headers,
|
1828
|
+
_host_index=_host_index,
|
1829
|
+
)
|
1830
|
+
|
1831
|
+
else:
|
1832
|
+
return self._handle_now_webhook_async_without_preload_content(
|
1833
|
+
_request_timeout=_request_timeout,
|
1834
|
+
_request_auth=_request_auth,
|
1835
|
+
_content_type=_content_type,
|
1836
|
+
_headers=_headers,
|
1837
|
+
_host_index=_host_index,
|
1838
|
+
)
|
1839
|
+
|
1840
|
+
# Private async implementation methods
|
1841
|
+
@validate_call
|
1842
|
+
async def _handle_now_webhook_async(
|
993
1843
|
self,
|
994
1844
|
_request_timeout: Union[
|
995
1845
|
None,
|
@@ -1049,7 +1899,7 @@ class NOWPaymentsApi:
|
|
1049
1899
|
).data
|
1050
1900
|
|
1051
1901
|
@validate_call
|
1052
|
-
async def
|
1902
|
+
async def _handle_now_webhook_async_with_http_info(
|
1053
1903
|
self,
|
1054
1904
|
_request_timeout: Union[
|
1055
1905
|
None,
|
@@ -1104,12 +1954,11 @@ class NOWPaymentsApi:
|
|
1104
1954
|
)
|
1105
1955
|
await response_data.read()
|
1106
1956
|
return self.api_client.response_deserialize(
|
1107
|
-
response_data=response_data,
|
1108
|
-
response_types_map=_response_types_map,
|
1957
|
+
response_data=response_data, response_types_map=_response_types_map
|
1109
1958
|
)
|
1110
1959
|
|
1111
1960
|
@validate_call
|
1112
|
-
async def
|
1961
|
+
async def _handle_now_webhook_async_without_preload_content(
|
1113
1962
|
self,
|
1114
1963
|
_request_timeout: Union[
|
1115
1964
|
None,
|
@@ -1162,7 +2011,80 @@ class NOWPaymentsApi:
|
|
1162
2011
|
response_data = await self.api_client.call_api(
|
1163
2012
|
*_param, _request_timeout=_request_timeout
|
1164
2013
|
)
|
1165
|
-
return response_data
|
2014
|
+
return response_data
|
2015
|
+
|
2016
|
+
# Private sync implementation methods
|
2017
|
+
@validate_call
|
2018
|
+
def _handle_now_webhook_sync(
|
2019
|
+
self,
|
2020
|
+
_request_timeout: Union[
|
2021
|
+
None,
|
2022
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2023
|
+
Tuple[
|
2024
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
2025
|
+
],
|
2026
|
+
] = None,
|
2027
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2028
|
+
_content_type: Optional[StrictStr] = None,
|
2029
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2030
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2031
|
+
) -> object:
|
2032
|
+
"""Synchronous version of handle_now_webhook"""
|
2033
|
+
return async_to_sync(self._handle_now_webhook_async)(
|
2034
|
+
_request_timeout=_request_timeout,
|
2035
|
+
_request_auth=_request_auth,
|
2036
|
+
_content_type=_content_type,
|
2037
|
+
_headers=_headers,
|
2038
|
+
_host_index=_host_index,
|
2039
|
+
)
|
2040
|
+
|
2041
|
+
@validate_call
|
2042
|
+
def _handle_now_webhook_sync_with_http_info(
|
2043
|
+
self,
|
2044
|
+
_request_timeout: Union[
|
2045
|
+
None,
|
2046
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2047
|
+
Tuple[
|
2048
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
2049
|
+
],
|
2050
|
+
] = None,
|
2051
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2052
|
+
_content_type: Optional[StrictStr] = None,
|
2053
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2054
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2055
|
+
) -> ApiResponse[object]:
|
2056
|
+
"""Synchronous version of handle_now_webhook_with_http_info"""
|
2057
|
+
return async_to_sync(self._handle_now_webhook_async_with_http_info)(
|
2058
|
+
_request_timeout=_request_timeout,
|
2059
|
+
_request_auth=_request_auth,
|
2060
|
+
_content_type=_content_type,
|
2061
|
+
_headers=_headers,
|
2062
|
+
_host_index=_host_index,
|
2063
|
+
)
|
2064
|
+
|
2065
|
+
@validate_call
|
2066
|
+
def _handle_now_webhook_sync_without_preload_content(
|
2067
|
+
self,
|
2068
|
+
_request_timeout: Union[
|
2069
|
+
None,
|
2070
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2071
|
+
Tuple[
|
2072
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
2073
|
+
],
|
2074
|
+
] = None,
|
2075
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2076
|
+
_content_type: Optional[StrictStr] = None,
|
2077
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2078
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2079
|
+
) -> RESTResponseType:
|
2080
|
+
"""Synchronous version of handle_now_webhook_without_preload_content"""
|
2081
|
+
return async_to_sync(self._handle_now_webhook_async_without_preload_content)(
|
2082
|
+
_request_timeout=_request_timeout,
|
2083
|
+
_request_auth=_request_auth,
|
2084
|
+
_content_type=_content_type,
|
2085
|
+
_headers=_headers,
|
2086
|
+
_host_index=_host_index,
|
2087
|
+
)
|
1166
2088
|
|
1167
2089
|
def _handle_now_webhook_serialize(
|
1168
2090
|
self,
|