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
@@ -27,6 +27,24 @@ from crypticorn.pay.client.api_client import ApiClient, RequestSerialized
|
|
27
27
|
from crypticorn.pay.client.api_response import ApiResponse
|
28
28
|
from crypticorn.pay.client.rest import RESTResponseType
|
29
29
|
|
30
|
+
# Import async_to_sync for sync methods
|
31
|
+
try:
|
32
|
+
from asgiref.sync import async_to_sync
|
33
|
+
|
34
|
+
_HAS_ASGIREF = True
|
35
|
+
except ImportError:
|
36
|
+
_HAS_ASGIREF = False
|
37
|
+
|
38
|
+
def async_to_sync(async_func):
|
39
|
+
"""Fallback decorator that raises an error if asgiref is not available."""
|
40
|
+
|
41
|
+
def wrapper(*args, **kwargs):
|
42
|
+
raise ImportError(
|
43
|
+
"asgiref is required for sync methods. Install with: pip install asgiref"
|
44
|
+
)
|
45
|
+
|
46
|
+
return wrapper
|
47
|
+
|
30
48
|
|
31
49
|
class NOWPaymentsApi:
|
32
50
|
"""NOTE: This class is auto generated by OpenAPI Generator
|
@@ -35,13 +53,135 @@ class NOWPaymentsApi:
|
|
35
53
|
Do not edit the class manually.
|
36
54
|
"""
|
37
55
|
|
38
|
-
def __init__(self, api_client=None) -> None:
|
56
|
+
def __init__(self, api_client=None, is_sync: bool = False) -> None:
|
39
57
|
if api_client is None:
|
40
58
|
api_client = ApiClient.get_default()
|
41
59
|
self.api_client = api_client
|
60
|
+
self.is_sync = is_sync
|
61
|
+
|
62
|
+
@validate_call
|
63
|
+
def create_now_invoice(
|
64
|
+
self,
|
65
|
+
now_create_invoice_req: NowCreateInvoiceReq,
|
66
|
+
_request_timeout: Union[
|
67
|
+
None,
|
68
|
+
Annotated[StrictFloat, Field(gt=0)],
|
69
|
+
Tuple[
|
70
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
71
|
+
],
|
72
|
+
] = None,
|
73
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
74
|
+
_content_type: Optional[StrictStr] = None,
|
75
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
76
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
77
|
+
) -> NowCreateInvoiceRes:
|
78
|
+
"""Create Invoice
|
79
|
+
|
80
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
81
|
+
"""
|
82
|
+
if self.is_sync:
|
83
|
+
return self._create_now_invoice_sync(
|
84
|
+
now_create_invoice_req=now_create_invoice_req,
|
85
|
+
_request_timeout=_request_timeout,
|
86
|
+
_request_auth=_request_auth,
|
87
|
+
_content_type=_content_type,
|
88
|
+
_headers=_headers,
|
89
|
+
_host_index=_host_index,
|
90
|
+
)
|
91
|
+
|
92
|
+
else:
|
93
|
+
return self._create_now_invoice_async(
|
94
|
+
now_create_invoice_req=now_create_invoice_req,
|
95
|
+
_request_timeout=_request_timeout,
|
96
|
+
_request_auth=_request_auth,
|
97
|
+
_content_type=_content_type,
|
98
|
+
_headers=_headers,
|
99
|
+
_host_index=_host_index,
|
100
|
+
)
|
101
|
+
|
102
|
+
@validate_call
|
103
|
+
def create_now_invoice_with_http_info(
|
104
|
+
self,
|
105
|
+
now_create_invoice_req: NowCreateInvoiceReq,
|
106
|
+
_request_timeout: Union[
|
107
|
+
None,
|
108
|
+
Annotated[StrictFloat, Field(gt=0)],
|
109
|
+
Tuple[
|
110
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
111
|
+
],
|
112
|
+
] = None,
|
113
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
114
|
+
_content_type: Optional[StrictStr] = None,
|
115
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
116
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
117
|
+
) -> ApiResponse[NowCreateInvoiceRes]:
|
118
|
+
"""Create Invoice with HTTP info
|
119
|
+
|
120
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
121
|
+
"""
|
122
|
+
if self.is_sync:
|
123
|
+
return self._create_now_invoice_sync_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
|
+
else:
|
133
|
+
return self._create_now_invoice_async_with_http_info(
|
134
|
+
now_create_invoice_req=now_create_invoice_req,
|
135
|
+
_request_timeout=_request_timeout,
|
136
|
+
_request_auth=_request_auth,
|
137
|
+
_content_type=_content_type,
|
138
|
+
_headers=_headers,
|
139
|
+
_host_index=_host_index,
|
140
|
+
)
|
141
|
+
|
142
|
+
@validate_call
|
143
|
+
def create_now_invoice_without_preload_content(
|
144
|
+
self,
|
145
|
+
now_create_invoice_req: NowCreateInvoiceReq,
|
146
|
+
_request_timeout: Union[
|
147
|
+
None,
|
148
|
+
Annotated[StrictFloat, Field(gt=0)],
|
149
|
+
Tuple[
|
150
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
151
|
+
],
|
152
|
+
] = None,
|
153
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
154
|
+
_content_type: Optional[StrictStr] = None,
|
155
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
156
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
157
|
+
) -> RESTResponseType:
|
158
|
+
"""Create Invoice without preloading content
|
159
|
+
|
160
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
161
|
+
"""
|
162
|
+
if self.is_sync:
|
163
|
+
return self._create_now_invoice_sync_without_preload_content(
|
164
|
+
now_create_invoice_req=now_create_invoice_req,
|
165
|
+
_request_timeout=_request_timeout,
|
166
|
+
_request_auth=_request_auth,
|
167
|
+
_content_type=_content_type,
|
168
|
+
_headers=_headers,
|
169
|
+
_host_index=_host_index,
|
170
|
+
)
|
171
|
+
|
172
|
+
else:
|
173
|
+
return self._create_now_invoice_async_without_preload_content(
|
174
|
+
now_create_invoice_req=now_create_invoice_req,
|
175
|
+
_request_timeout=_request_timeout,
|
176
|
+
_request_auth=_request_auth,
|
177
|
+
_content_type=_content_type,
|
178
|
+
_headers=_headers,
|
179
|
+
_host_index=_host_index,
|
180
|
+
)
|
42
181
|
|
182
|
+
# Private async implementation methods
|
43
183
|
@validate_call
|
44
|
-
async def
|
184
|
+
async def _create_now_invoice_async(
|
45
185
|
self,
|
46
186
|
now_create_invoice_req: NowCreateInvoiceReq,
|
47
187
|
_request_timeout: Union[
|
@@ -58,7 +198,7 @@ class NOWPaymentsApi:
|
|
58
198
|
) -> NowCreateInvoiceRes:
|
59
199
|
"""Create Invoice
|
60
200
|
|
61
|
-
Create a payment invoice with a payment link for customer completion. Only
|
201
|
+
Create a payment invoice with a payment link for customer completion. Only Bearer authentication is supported.
|
62
202
|
|
63
203
|
:param now_create_invoice_req: (required)
|
64
204
|
:type now_create_invoice_req: NowCreateInvoiceReq
|
@@ -105,7 +245,7 @@ class NOWPaymentsApi:
|
|
105
245
|
).data
|
106
246
|
|
107
247
|
@validate_call
|
108
|
-
async def
|
248
|
+
async def _create_now_invoice_async_with_http_info(
|
109
249
|
self,
|
110
250
|
now_create_invoice_req: NowCreateInvoiceReq,
|
111
251
|
_request_timeout: Union[
|
@@ -122,7 +262,7 @@ class NOWPaymentsApi:
|
|
122
262
|
) -> ApiResponse[NowCreateInvoiceRes]:
|
123
263
|
"""Create Invoice
|
124
264
|
|
125
|
-
Create a payment invoice with a payment link for customer completion. Only
|
265
|
+
Create a payment invoice with a payment link for customer completion. Only Bearer authentication is supported.
|
126
266
|
|
127
267
|
:param now_create_invoice_req: (required)
|
128
268
|
:type now_create_invoice_req: NowCreateInvoiceReq
|
@@ -164,12 +304,11 @@ class NOWPaymentsApi:
|
|
164
304
|
)
|
165
305
|
await response_data.read()
|
166
306
|
return self.api_client.response_deserialize(
|
167
|
-
response_data=response_data,
|
168
|
-
response_types_map=_response_types_map,
|
307
|
+
response_data=response_data, response_types_map=_response_types_map
|
169
308
|
)
|
170
309
|
|
171
310
|
@validate_call
|
172
|
-
async def
|
311
|
+
async def _create_now_invoice_async_without_preload_content(
|
173
312
|
self,
|
174
313
|
now_create_invoice_req: NowCreateInvoiceReq,
|
175
314
|
_request_timeout: Union[
|
@@ -186,7 +325,7 @@ class NOWPaymentsApi:
|
|
186
325
|
) -> RESTResponseType:
|
187
326
|
"""Create Invoice
|
188
327
|
|
189
|
-
Create a payment invoice with a payment link for customer completion. Only
|
328
|
+
Create a payment invoice with a payment link for customer completion. Only Bearer authentication is supported.
|
190
329
|
|
191
330
|
:param now_create_invoice_req: (required)
|
192
331
|
:type now_create_invoice_req: NowCreateInvoiceReq
|
@@ -226,7 +365,86 @@ class NOWPaymentsApi:
|
|
226
365
|
response_data = await self.api_client.call_api(
|
227
366
|
*_param, _request_timeout=_request_timeout
|
228
367
|
)
|
229
|
-
return response_data
|
368
|
+
return response_data
|
369
|
+
|
370
|
+
# Private sync implementation methods
|
371
|
+
@validate_call
|
372
|
+
def _create_now_invoice_sync(
|
373
|
+
self,
|
374
|
+
now_create_invoice_req: NowCreateInvoiceReq,
|
375
|
+
_request_timeout: Union[
|
376
|
+
None,
|
377
|
+
Annotated[StrictFloat, Field(gt=0)],
|
378
|
+
Tuple[
|
379
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
380
|
+
],
|
381
|
+
] = None,
|
382
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
383
|
+
_content_type: Optional[StrictStr] = None,
|
384
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
385
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
386
|
+
) -> NowCreateInvoiceRes:
|
387
|
+
"""Synchronous version of create_now_invoice"""
|
388
|
+
return async_to_sync(self._create_now_invoice_async)(
|
389
|
+
now_create_invoice_req=now_create_invoice_req,
|
390
|
+
_request_timeout=_request_timeout,
|
391
|
+
_request_auth=_request_auth,
|
392
|
+
_content_type=_content_type,
|
393
|
+
_headers=_headers,
|
394
|
+
_host_index=_host_index,
|
395
|
+
)
|
396
|
+
|
397
|
+
@validate_call
|
398
|
+
def _create_now_invoice_sync_with_http_info(
|
399
|
+
self,
|
400
|
+
now_create_invoice_req: NowCreateInvoiceReq,
|
401
|
+
_request_timeout: Union[
|
402
|
+
None,
|
403
|
+
Annotated[StrictFloat, Field(gt=0)],
|
404
|
+
Tuple[
|
405
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
406
|
+
],
|
407
|
+
] = None,
|
408
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
409
|
+
_content_type: Optional[StrictStr] = None,
|
410
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
411
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
412
|
+
) -> ApiResponse[NowCreateInvoiceRes]:
|
413
|
+
"""Synchronous version of create_now_invoice_with_http_info"""
|
414
|
+
return async_to_sync(self._create_now_invoice_async_with_http_info)(
|
415
|
+
now_create_invoice_req=now_create_invoice_req,
|
416
|
+
_request_timeout=_request_timeout,
|
417
|
+
_request_auth=_request_auth,
|
418
|
+
_content_type=_content_type,
|
419
|
+
_headers=_headers,
|
420
|
+
_host_index=_host_index,
|
421
|
+
)
|
422
|
+
|
423
|
+
@validate_call
|
424
|
+
def _create_now_invoice_sync_without_preload_content(
|
425
|
+
self,
|
426
|
+
now_create_invoice_req: NowCreateInvoiceReq,
|
427
|
+
_request_timeout: Union[
|
428
|
+
None,
|
429
|
+
Annotated[StrictFloat, Field(gt=0)],
|
430
|
+
Tuple[
|
431
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
432
|
+
],
|
433
|
+
] = None,
|
434
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
435
|
+
_content_type: Optional[StrictStr] = None,
|
436
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
437
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
438
|
+
) -> RESTResponseType:
|
439
|
+
"""Synchronous version of create_now_invoice_without_preload_content"""
|
440
|
+
return async_to_sync(self._create_now_invoice_async_without_preload_content)(
|
441
|
+
now_create_invoice_req=now_create_invoice_req,
|
442
|
+
_request_timeout=_request_timeout,
|
443
|
+
_request_auth=_request_auth,
|
444
|
+
_content_type=_content_type,
|
445
|
+
_headers=_headers,
|
446
|
+
_host_index=_host_index,
|
447
|
+
)
|
230
448
|
|
231
449
|
def _create_now_invoice_serialize(
|
232
450
|
self,
|
@@ -293,7 +511,119 @@ class NOWPaymentsApi:
|
|
293
511
|
)
|
294
512
|
|
295
513
|
@validate_call
|
296
|
-
|
514
|
+
def get_now_api_status(
|
515
|
+
self,
|
516
|
+
_request_timeout: Union[
|
517
|
+
None,
|
518
|
+
Annotated[StrictFloat, Field(gt=0)],
|
519
|
+
Tuple[
|
520
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
521
|
+
],
|
522
|
+
] = None,
|
523
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
524
|
+
_content_type: Optional[StrictStr] = None,
|
525
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
526
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
527
|
+
) -> str:
|
528
|
+
"""Get Status
|
529
|
+
|
530
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
531
|
+
"""
|
532
|
+
if self.is_sync:
|
533
|
+
return self._get_now_api_status_sync(
|
534
|
+
_request_timeout=_request_timeout,
|
535
|
+
_request_auth=_request_auth,
|
536
|
+
_content_type=_content_type,
|
537
|
+
_headers=_headers,
|
538
|
+
_host_index=_host_index,
|
539
|
+
)
|
540
|
+
|
541
|
+
else:
|
542
|
+
return self._get_now_api_status_async(
|
543
|
+
_request_timeout=_request_timeout,
|
544
|
+
_request_auth=_request_auth,
|
545
|
+
_content_type=_content_type,
|
546
|
+
_headers=_headers,
|
547
|
+
_host_index=_host_index,
|
548
|
+
)
|
549
|
+
|
550
|
+
@validate_call
|
551
|
+
def get_now_api_status_with_http_info(
|
552
|
+
self,
|
553
|
+
_request_timeout: Union[
|
554
|
+
None,
|
555
|
+
Annotated[StrictFloat, Field(gt=0)],
|
556
|
+
Tuple[
|
557
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
558
|
+
],
|
559
|
+
] = None,
|
560
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
561
|
+
_content_type: Optional[StrictStr] = None,
|
562
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
563
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
564
|
+
) -> ApiResponse[str]:
|
565
|
+
"""Get Status with HTTP info
|
566
|
+
|
567
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
568
|
+
"""
|
569
|
+
if self.is_sync:
|
570
|
+
return self._get_now_api_status_sync_with_http_info(
|
571
|
+
_request_timeout=_request_timeout,
|
572
|
+
_request_auth=_request_auth,
|
573
|
+
_content_type=_content_type,
|
574
|
+
_headers=_headers,
|
575
|
+
_host_index=_host_index,
|
576
|
+
)
|
577
|
+
|
578
|
+
else:
|
579
|
+
return self._get_now_api_status_async_with_http_info(
|
580
|
+
_request_timeout=_request_timeout,
|
581
|
+
_request_auth=_request_auth,
|
582
|
+
_content_type=_content_type,
|
583
|
+
_headers=_headers,
|
584
|
+
_host_index=_host_index,
|
585
|
+
)
|
586
|
+
|
587
|
+
@validate_call
|
588
|
+
def get_now_api_status_without_preload_content(
|
589
|
+
self,
|
590
|
+
_request_timeout: Union[
|
591
|
+
None,
|
592
|
+
Annotated[StrictFloat, Field(gt=0)],
|
593
|
+
Tuple[
|
594
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
595
|
+
],
|
596
|
+
] = None,
|
597
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
598
|
+
_content_type: Optional[StrictStr] = None,
|
599
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
600
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
601
|
+
) -> RESTResponseType:
|
602
|
+
"""Get Status without preloading content
|
603
|
+
|
604
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
605
|
+
"""
|
606
|
+
if self.is_sync:
|
607
|
+
return self._get_now_api_status_sync_without_preload_content(
|
608
|
+
_request_timeout=_request_timeout,
|
609
|
+
_request_auth=_request_auth,
|
610
|
+
_content_type=_content_type,
|
611
|
+
_headers=_headers,
|
612
|
+
_host_index=_host_index,
|
613
|
+
)
|
614
|
+
|
615
|
+
else:
|
616
|
+
return self._get_now_api_status_async_without_preload_content(
|
617
|
+
_request_timeout=_request_timeout,
|
618
|
+
_request_auth=_request_auth,
|
619
|
+
_content_type=_content_type,
|
620
|
+
_headers=_headers,
|
621
|
+
_host_index=_host_index,
|
622
|
+
)
|
623
|
+
|
624
|
+
# Private async implementation methods
|
625
|
+
@validate_call
|
626
|
+
async def _get_now_api_status_async(
|
297
627
|
self,
|
298
628
|
_request_timeout: Union[
|
299
629
|
None,
|
@@ -353,7 +683,7 @@ class NOWPaymentsApi:
|
|
353
683
|
).data
|
354
684
|
|
355
685
|
@validate_call
|
356
|
-
async def
|
686
|
+
async def _get_now_api_status_async_with_http_info(
|
357
687
|
self,
|
358
688
|
_request_timeout: Union[
|
359
689
|
None,
|
@@ -408,12 +738,11 @@ class NOWPaymentsApi:
|
|
408
738
|
)
|
409
739
|
await response_data.read()
|
410
740
|
return self.api_client.response_deserialize(
|
411
|
-
response_data=response_data,
|
412
|
-
response_types_map=_response_types_map,
|
741
|
+
response_data=response_data, response_types_map=_response_types_map
|
413
742
|
)
|
414
743
|
|
415
744
|
@validate_call
|
416
|
-
async def
|
745
|
+
async def _get_now_api_status_async_without_preload_content(
|
417
746
|
self,
|
418
747
|
_request_timeout: Union[
|
419
748
|
None,
|
@@ -466,7 +795,80 @@ class NOWPaymentsApi:
|
|
466
795
|
response_data = await self.api_client.call_api(
|
467
796
|
*_param, _request_timeout=_request_timeout
|
468
797
|
)
|
469
|
-
return response_data
|
798
|
+
return response_data
|
799
|
+
|
800
|
+
# Private sync implementation methods
|
801
|
+
@validate_call
|
802
|
+
def _get_now_api_status_sync(
|
803
|
+
self,
|
804
|
+
_request_timeout: Union[
|
805
|
+
None,
|
806
|
+
Annotated[StrictFloat, Field(gt=0)],
|
807
|
+
Tuple[
|
808
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
809
|
+
],
|
810
|
+
] = None,
|
811
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
812
|
+
_content_type: Optional[StrictStr] = None,
|
813
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
814
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
815
|
+
) -> str:
|
816
|
+
"""Synchronous version of get_now_api_status"""
|
817
|
+
return async_to_sync(self._get_now_api_status_async)(
|
818
|
+
_request_timeout=_request_timeout,
|
819
|
+
_request_auth=_request_auth,
|
820
|
+
_content_type=_content_type,
|
821
|
+
_headers=_headers,
|
822
|
+
_host_index=_host_index,
|
823
|
+
)
|
824
|
+
|
825
|
+
@validate_call
|
826
|
+
def _get_now_api_status_sync_with_http_info(
|
827
|
+
self,
|
828
|
+
_request_timeout: Union[
|
829
|
+
None,
|
830
|
+
Annotated[StrictFloat, Field(gt=0)],
|
831
|
+
Tuple[
|
832
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
833
|
+
],
|
834
|
+
] = None,
|
835
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
836
|
+
_content_type: Optional[StrictStr] = None,
|
837
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
838
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
839
|
+
) -> ApiResponse[str]:
|
840
|
+
"""Synchronous version of get_now_api_status_with_http_info"""
|
841
|
+
return async_to_sync(self._get_now_api_status_async_with_http_info)(
|
842
|
+
_request_timeout=_request_timeout,
|
843
|
+
_request_auth=_request_auth,
|
844
|
+
_content_type=_content_type,
|
845
|
+
_headers=_headers,
|
846
|
+
_host_index=_host_index,
|
847
|
+
)
|
848
|
+
|
849
|
+
@validate_call
|
850
|
+
def _get_now_api_status_sync_without_preload_content(
|
851
|
+
self,
|
852
|
+
_request_timeout: Union[
|
853
|
+
None,
|
854
|
+
Annotated[StrictFloat, Field(gt=0)],
|
855
|
+
Tuple[
|
856
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
857
|
+
],
|
858
|
+
] = None,
|
859
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
860
|
+
_content_type: Optional[StrictStr] = None,
|
861
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
862
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
863
|
+
) -> RESTResponseType:
|
864
|
+
"""Synchronous version of get_now_api_status_without_preload_content"""
|
865
|
+
return async_to_sync(self._get_now_api_status_async_without_preload_content)(
|
866
|
+
_request_timeout=_request_timeout,
|
867
|
+
_request_auth=_request_auth,
|
868
|
+
_content_type=_content_type,
|
869
|
+
_headers=_headers,
|
870
|
+
_host_index=_host_index,
|
871
|
+
)
|
470
872
|
|
471
873
|
def _get_now_api_status_serialize(
|
472
874
|
self,
|
@@ -502,7 +904,7 @@ class NOWPaymentsApi:
|
|
502
904
|
)
|
503
905
|
|
504
906
|
# authentication setting
|
505
|
-
_auth_settings: List[str] = ["HTTPBearer"]
|
907
|
+
_auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
|
506
908
|
|
507
909
|
return self.api_client.param_serialize(
|
508
910
|
method="GET",
|
@@ -520,7 +922,128 @@ class NOWPaymentsApi:
|
|
520
922
|
)
|
521
923
|
|
522
924
|
@validate_call
|
523
|
-
|
925
|
+
def get_now_payment_by_invoice(
|
926
|
+
self,
|
927
|
+
id: Annotated[StrictInt, Field(description="The invoice ID")],
|
928
|
+
_request_timeout: Union[
|
929
|
+
None,
|
930
|
+
Annotated[StrictFloat, Field(gt=0)],
|
931
|
+
Tuple[
|
932
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
933
|
+
],
|
934
|
+
] = None,
|
935
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
936
|
+
_content_type: Optional[StrictStr] = None,
|
937
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
938
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
939
|
+
) -> Payment:
|
940
|
+
"""Get Now Payment By Invoice
|
941
|
+
|
942
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
943
|
+
"""
|
944
|
+
if self.is_sync:
|
945
|
+
return self._get_now_payment_by_invoice_sync(
|
946
|
+
id=id,
|
947
|
+
_request_timeout=_request_timeout,
|
948
|
+
_request_auth=_request_auth,
|
949
|
+
_content_type=_content_type,
|
950
|
+
_headers=_headers,
|
951
|
+
_host_index=_host_index,
|
952
|
+
)
|
953
|
+
|
954
|
+
else:
|
955
|
+
return self._get_now_payment_by_invoice_async(
|
956
|
+
id=id,
|
957
|
+
_request_timeout=_request_timeout,
|
958
|
+
_request_auth=_request_auth,
|
959
|
+
_content_type=_content_type,
|
960
|
+
_headers=_headers,
|
961
|
+
_host_index=_host_index,
|
962
|
+
)
|
963
|
+
|
964
|
+
@validate_call
|
965
|
+
def get_now_payment_by_invoice_with_http_info(
|
966
|
+
self,
|
967
|
+
id: Annotated[StrictInt, Field(description="The invoice ID")],
|
968
|
+
_request_timeout: Union[
|
969
|
+
None,
|
970
|
+
Annotated[StrictFloat, Field(gt=0)],
|
971
|
+
Tuple[
|
972
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
973
|
+
],
|
974
|
+
] = None,
|
975
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
976
|
+
_content_type: Optional[StrictStr] = None,
|
977
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
978
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
979
|
+
) -> ApiResponse[Payment]:
|
980
|
+
"""Get Now Payment By Invoice with HTTP info
|
981
|
+
|
982
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
983
|
+
"""
|
984
|
+
if self.is_sync:
|
985
|
+
return self._get_now_payment_by_invoice_sync_with_http_info(
|
986
|
+
id=id,
|
987
|
+
_request_timeout=_request_timeout,
|
988
|
+
_request_auth=_request_auth,
|
989
|
+
_content_type=_content_type,
|
990
|
+
_headers=_headers,
|
991
|
+
_host_index=_host_index,
|
992
|
+
)
|
993
|
+
|
994
|
+
else:
|
995
|
+
return self._get_now_payment_by_invoice_async_with_http_info(
|
996
|
+
id=id,
|
997
|
+
_request_timeout=_request_timeout,
|
998
|
+
_request_auth=_request_auth,
|
999
|
+
_content_type=_content_type,
|
1000
|
+
_headers=_headers,
|
1001
|
+
_host_index=_host_index,
|
1002
|
+
)
|
1003
|
+
|
1004
|
+
@validate_call
|
1005
|
+
def get_now_payment_by_invoice_without_preload_content(
|
1006
|
+
self,
|
1007
|
+
id: Annotated[StrictInt, Field(description="The invoice ID")],
|
1008
|
+
_request_timeout: Union[
|
1009
|
+
None,
|
1010
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1011
|
+
Tuple[
|
1012
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1013
|
+
],
|
1014
|
+
] = None,
|
1015
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1016
|
+
_content_type: Optional[StrictStr] = None,
|
1017
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1018
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1019
|
+
) -> RESTResponseType:
|
1020
|
+
"""Get Now Payment By Invoice without preloading content
|
1021
|
+
|
1022
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
1023
|
+
"""
|
1024
|
+
if self.is_sync:
|
1025
|
+
return self._get_now_payment_by_invoice_sync_without_preload_content(
|
1026
|
+
id=id,
|
1027
|
+
_request_timeout=_request_timeout,
|
1028
|
+
_request_auth=_request_auth,
|
1029
|
+
_content_type=_content_type,
|
1030
|
+
_headers=_headers,
|
1031
|
+
_host_index=_host_index,
|
1032
|
+
)
|
1033
|
+
|
1034
|
+
else:
|
1035
|
+
return self._get_now_payment_by_invoice_async_without_preload_content(
|
1036
|
+
id=id,
|
1037
|
+
_request_timeout=_request_timeout,
|
1038
|
+
_request_auth=_request_auth,
|
1039
|
+
_content_type=_content_type,
|
1040
|
+
_headers=_headers,
|
1041
|
+
_host_index=_host_index,
|
1042
|
+
)
|
1043
|
+
|
1044
|
+
# Private async implementation methods
|
1045
|
+
@validate_call
|
1046
|
+
async def _get_now_payment_by_invoice_async(
|
524
1047
|
self,
|
525
1048
|
id: Annotated[StrictInt, Field(description="The invoice ID")],
|
526
1049
|
_request_timeout: Union[
|
@@ -584,7 +1107,7 @@ class NOWPaymentsApi:
|
|
584
1107
|
).data
|
585
1108
|
|
586
1109
|
@validate_call
|
587
|
-
async def
|
1110
|
+
async def _get_now_payment_by_invoice_async_with_http_info(
|
588
1111
|
self,
|
589
1112
|
id: Annotated[StrictInt, Field(description="The invoice ID")],
|
590
1113
|
_request_timeout: Union[
|
@@ -643,12 +1166,11 @@ class NOWPaymentsApi:
|
|
643
1166
|
)
|
644
1167
|
await response_data.read()
|
645
1168
|
return self.api_client.response_deserialize(
|
646
|
-
response_data=response_data,
|
647
|
-
response_types_map=_response_types_map,
|
1169
|
+
response_data=response_data, response_types_map=_response_types_map
|
648
1170
|
)
|
649
1171
|
|
650
1172
|
@validate_call
|
651
|
-
async def
|
1173
|
+
async def _get_now_payment_by_invoice_async_without_preload_content(
|
652
1174
|
self,
|
653
1175
|
id: Annotated[StrictInt, Field(description="The invoice ID")],
|
654
1176
|
_request_timeout: Union[
|
@@ -699,14 +1221,95 @@ class NOWPaymentsApi:
|
|
699
1221
|
_host_index=_host_index,
|
700
1222
|
)
|
701
1223
|
|
702
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
703
|
-
"200": "Payment",
|
704
|
-
}
|
705
|
-
response_data = await self.api_client.call_api(
|
706
|
-
*_param, _request_timeout=_request_timeout
|
707
|
-
)
|
708
|
-
return response_data
|
709
|
-
|
1224
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1225
|
+
"200": "Payment",
|
1226
|
+
}
|
1227
|
+
response_data = await self.api_client.call_api(
|
1228
|
+
*_param, _request_timeout=_request_timeout
|
1229
|
+
)
|
1230
|
+
return response_data
|
1231
|
+
|
1232
|
+
# Private sync implementation methods
|
1233
|
+
@validate_call
|
1234
|
+
def _get_now_payment_by_invoice_sync(
|
1235
|
+
self,
|
1236
|
+
id: Annotated[StrictInt, Field(description="The invoice ID")],
|
1237
|
+
_request_timeout: Union[
|
1238
|
+
None,
|
1239
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1240
|
+
Tuple[
|
1241
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1242
|
+
],
|
1243
|
+
] = None,
|
1244
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1245
|
+
_content_type: Optional[StrictStr] = None,
|
1246
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1247
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1248
|
+
) -> Payment:
|
1249
|
+
"""Synchronous version of get_now_payment_by_invoice"""
|
1250
|
+
return async_to_sync(self._get_now_payment_by_invoice_async)(
|
1251
|
+
id=id,
|
1252
|
+
_request_timeout=_request_timeout,
|
1253
|
+
_request_auth=_request_auth,
|
1254
|
+
_content_type=_content_type,
|
1255
|
+
_headers=_headers,
|
1256
|
+
_host_index=_host_index,
|
1257
|
+
)
|
1258
|
+
|
1259
|
+
@validate_call
|
1260
|
+
def _get_now_payment_by_invoice_sync_with_http_info(
|
1261
|
+
self,
|
1262
|
+
id: Annotated[StrictInt, Field(description="The invoice ID")],
|
1263
|
+
_request_timeout: Union[
|
1264
|
+
None,
|
1265
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1266
|
+
Tuple[
|
1267
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1268
|
+
],
|
1269
|
+
] = None,
|
1270
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1271
|
+
_content_type: Optional[StrictStr] = None,
|
1272
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1273
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1274
|
+
) -> ApiResponse[Payment]:
|
1275
|
+
"""Synchronous version of get_now_payment_by_invoice_with_http_info"""
|
1276
|
+
return async_to_sync(self._get_now_payment_by_invoice_async_with_http_info)(
|
1277
|
+
id=id,
|
1278
|
+
_request_timeout=_request_timeout,
|
1279
|
+
_request_auth=_request_auth,
|
1280
|
+
_content_type=_content_type,
|
1281
|
+
_headers=_headers,
|
1282
|
+
_host_index=_host_index,
|
1283
|
+
)
|
1284
|
+
|
1285
|
+
@validate_call
|
1286
|
+
def _get_now_payment_by_invoice_sync_without_preload_content(
|
1287
|
+
self,
|
1288
|
+
id: Annotated[StrictInt, Field(description="The invoice ID")],
|
1289
|
+
_request_timeout: Union[
|
1290
|
+
None,
|
1291
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1292
|
+
Tuple[
|
1293
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1294
|
+
],
|
1295
|
+
] = None,
|
1296
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1297
|
+
_content_type: Optional[StrictStr] = None,
|
1298
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1299
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1300
|
+
) -> RESTResponseType:
|
1301
|
+
"""Synchronous version of get_now_payment_by_invoice_without_preload_content"""
|
1302
|
+
return async_to_sync(
|
1303
|
+
self._get_now_payment_by_invoice_async_without_preload_content
|
1304
|
+
)(
|
1305
|
+
id=id,
|
1306
|
+
_request_timeout=_request_timeout,
|
1307
|
+
_request_auth=_request_auth,
|
1308
|
+
_content_type=_content_type,
|
1309
|
+
_headers=_headers,
|
1310
|
+
_host_index=_host_index,
|
1311
|
+
)
|
1312
|
+
|
710
1313
|
def _get_now_payment_by_invoice_serialize(
|
711
1314
|
self,
|
712
1315
|
id,
|
@@ -762,7 +1365,119 @@ class NOWPaymentsApi:
|
|
762
1365
|
)
|
763
1366
|
|
764
1367
|
@validate_call
|
765
|
-
|
1368
|
+
def get_now_payments(
|
1369
|
+
self,
|
1370
|
+
_request_timeout: Union[
|
1371
|
+
None,
|
1372
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1373
|
+
Tuple[
|
1374
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1375
|
+
],
|
1376
|
+
] = None,
|
1377
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1378
|
+
_content_type: Optional[StrictStr] = None,
|
1379
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1380
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1381
|
+
) -> List[Payment]:
|
1382
|
+
"""Get Now Payments
|
1383
|
+
|
1384
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
1385
|
+
"""
|
1386
|
+
if self.is_sync:
|
1387
|
+
return self._get_now_payments_sync(
|
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(
|
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_with_http_info(
|
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
|
+
) -> ApiResponse[List[Payment]]:
|
1419
|
+
"""Get Now Payments with HTTP info
|
1420
|
+
|
1421
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
1422
|
+
"""
|
1423
|
+
if self.is_sync:
|
1424
|
+
return self._get_now_payments_sync_with_http_info(
|
1425
|
+
_request_timeout=_request_timeout,
|
1426
|
+
_request_auth=_request_auth,
|
1427
|
+
_content_type=_content_type,
|
1428
|
+
_headers=_headers,
|
1429
|
+
_host_index=_host_index,
|
1430
|
+
)
|
1431
|
+
|
1432
|
+
else:
|
1433
|
+
return self._get_now_payments_async_with_http_info(
|
1434
|
+
_request_timeout=_request_timeout,
|
1435
|
+
_request_auth=_request_auth,
|
1436
|
+
_content_type=_content_type,
|
1437
|
+
_headers=_headers,
|
1438
|
+
_host_index=_host_index,
|
1439
|
+
)
|
1440
|
+
|
1441
|
+
@validate_call
|
1442
|
+
def get_now_payments_without_preload_content(
|
1443
|
+
self,
|
1444
|
+
_request_timeout: Union[
|
1445
|
+
None,
|
1446
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1447
|
+
Tuple[
|
1448
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1449
|
+
],
|
1450
|
+
] = None,
|
1451
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1452
|
+
_content_type: Optional[StrictStr] = None,
|
1453
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1454
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1455
|
+
) -> RESTResponseType:
|
1456
|
+
"""Get Now Payments without preloading content
|
1457
|
+
|
1458
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
1459
|
+
"""
|
1460
|
+
if self.is_sync:
|
1461
|
+
return self._get_now_payments_sync_without_preload_content(
|
1462
|
+
_request_timeout=_request_timeout,
|
1463
|
+
_request_auth=_request_auth,
|
1464
|
+
_content_type=_content_type,
|
1465
|
+
_headers=_headers,
|
1466
|
+
_host_index=_host_index,
|
1467
|
+
)
|
1468
|
+
|
1469
|
+
else:
|
1470
|
+
return self._get_now_payments_async_without_preload_content(
|
1471
|
+
_request_timeout=_request_timeout,
|
1472
|
+
_request_auth=_request_auth,
|
1473
|
+
_content_type=_content_type,
|
1474
|
+
_headers=_headers,
|
1475
|
+
_host_index=_host_index,
|
1476
|
+
)
|
1477
|
+
|
1478
|
+
# Private async implementation methods
|
1479
|
+
@validate_call
|
1480
|
+
async def _get_now_payments_async(
|
766
1481
|
self,
|
767
1482
|
_request_timeout: Union[
|
768
1483
|
None,
|
@@ -822,7 +1537,7 @@ class NOWPaymentsApi:
|
|
822
1537
|
).data
|
823
1538
|
|
824
1539
|
@validate_call
|
825
|
-
async def
|
1540
|
+
async def _get_now_payments_async_with_http_info(
|
826
1541
|
self,
|
827
1542
|
_request_timeout: Union[
|
828
1543
|
None,
|
@@ -877,12 +1592,11 @@ class NOWPaymentsApi:
|
|
877
1592
|
)
|
878
1593
|
await response_data.read()
|
879
1594
|
return self.api_client.response_deserialize(
|
880
|
-
response_data=response_data,
|
881
|
-
response_types_map=_response_types_map,
|
1595
|
+
response_data=response_data, response_types_map=_response_types_map
|
882
1596
|
)
|
883
1597
|
|
884
1598
|
@validate_call
|
885
|
-
async def
|
1599
|
+
async def _get_now_payments_async_without_preload_content(
|
886
1600
|
self,
|
887
1601
|
_request_timeout: Union[
|
888
1602
|
None,
|
@@ -935,7 +1649,80 @@ class NOWPaymentsApi:
|
|
935
1649
|
response_data = await self.api_client.call_api(
|
936
1650
|
*_param, _request_timeout=_request_timeout
|
937
1651
|
)
|
938
|
-
return response_data
|
1652
|
+
return response_data
|
1653
|
+
|
1654
|
+
# Private sync implementation methods
|
1655
|
+
@validate_call
|
1656
|
+
def _get_now_payments_sync(
|
1657
|
+
self,
|
1658
|
+
_request_timeout: Union[
|
1659
|
+
None,
|
1660
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1661
|
+
Tuple[
|
1662
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1663
|
+
],
|
1664
|
+
] = None,
|
1665
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1666
|
+
_content_type: Optional[StrictStr] = None,
|
1667
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1668
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1669
|
+
) -> List[Payment]:
|
1670
|
+
"""Synchronous version of get_now_payments"""
|
1671
|
+
return async_to_sync(self._get_now_payments_async)(
|
1672
|
+
_request_timeout=_request_timeout,
|
1673
|
+
_request_auth=_request_auth,
|
1674
|
+
_content_type=_content_type,
|
1675
|
+
_headers=_headers,
|
1676
|
+
_host_index=_host_index,
|
1677
|
+
)
|
1678
|
+
|
1679
|
+
@validate_call
|
1680
|
+
def _get_now_payments_sync_with_http_info(
|
1681
|
+
self,
|
1682
|
+
_request_timeout: Union[
|
1683
|
+
None,
|
1684
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1685
|
+
Tuple[
|
1686
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1687
|
+
],
|
1688
|
+
] = None,
|
1689
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1690
|
+
_content_type: Optional[StrictStr] = None,
|
1691
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1692
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1693
|
+
) -> ApiResponse[List[Payment]]:
|
1694
|
+
"""Synchronous version of get_now_payments_with_http_info"""
|
1695
|
+
return async_to_sync(self._get_now_payments_async_with_http_info)(
|
1696
|
+
_request_timeout=_request_timeout,
|
1697
|
+
_request_auth=_request_auth,
|
1698
|
+
_content_type=_content_type,
|
1699
|
+
_headers=_headers,
|
1700
|
+
_host_index=_host_index,
|
1701
|
+
)
|
1702
|
+
|
1703
|
+
@validate_call
|
1704
|
+
def _get_now_payments_sync_without_preload_content(
|
1705
|
+
self,
|
1706
|
+
_request_timeout: Union[
|
1707
|
+
None,
|
1708
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1709
|
+
Tuple[
|
1710
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1711
|
+
],
|
1712
|
+
] = None,
|
1713
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1714
|
+
_content_type: Optional[StrictStr] = None,
|
1715
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1716
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1717
|
+
) -> RESTResponseType:
|
1718
|
+
"""Synchronous version of get_now_payments_without_preload_content"""
|
1719
|
+
return async_to_sync(self._get_now_payments_async_without_preload_content)(
|
1720
|
+
_request_timeout=_request_timeout,
|
1721
|
+
_request_auth=_request_auth,
|
1722
|
+
_content_type=_content_type,
|
1723
|
+
_headers=_headers,
|
1724
|
+
_host_index=_host_index,
|
1725
|
+
)
|
939
1726
|
|
940
1727
|
def _get_now_payments_serialize(
|
941
1728
|
self,
|
@@ -989,7 +1776,119 @@ class NOWPaymentsApi:
|
|
989
1776
|
)
|
990
1777
|
|
991
1778
|
@validate_call
|
992
|
-
|
1779
|
+
def handle_now_webhook(
|
1780
|
+
self,
|
1781
|
+
_request_timeout: Union[
|
1782
|
+
None,
|
1783
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1784
|
+
Tuple[
|
1785
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1786
|
+
],
|
1787
|
+
] = None,
|
1788
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1789
|
+
_content_type: Optional[StrictStr] = None,
|
1790
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1791
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1792
|
+
) -> object:
|
1793
|
+
"""Handle Webhook
|
1794
|
+
|
1795
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
1796
|
+
"""
|
1797
|
+
if self.is_sync:
|
1798
|
+
return self._handle_now_webhook_sync(
|
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
|
+
else:
|
1807
|
+
return self._handle_now_webhook_async(
|
1808
|
+
_request_timeout=_request_timeout,
|
1809
|
+
_request_auth=_request_auth,
|
1810
|
+
_content_type=_content_type,
|
1811
|
+
_headers=_headers,
|
1812
|
+
_host_index=_host_index,
|
1813
|
+
)
|
1814
|
+
|
1815
|
+
@validate_call
|
1816
|
+
def handle_now_webhook_with_http_info(
|
1817
|
+
self,
|
1818
|
+
_request_timeout: Union[
|
1819
|
+
None,
|
1820
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1821
|
+
Tuple[
|
1822
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1823
|
+
],
|
1824
|
+
] = None,
|
1825
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1826
|
+
_content_type: Optional[StrictStr] = None,
|
1827
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1828
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1829
|
+
) -> ApiResponse[object]:
|
1830
|
+
"""Handle Webhook with HTTP info
|
1831
|
+
|
1832
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
1833
|
+
"""
|
1834
|
+
if self.is_sync:
|
1835
|
+
return self._handle_now_webhook_sync_with_http_info(
|
1836
|
+
_request_timeout=_request_timeout,
|
1837
|
+
_request_auth=_request_auth,
|
1838
|
+
_content_type=_content_type,
|
1839
|
+
_headers=_headers,
|
1840
|
+
_host_index=_host_index,
|
1841
|
+
)
|
1842
|
+
|
1843
|
+
else:
|
1844
|
+
return self._handle_now_webhook_async_with_http_info(
|
1845
|
+
_request_timeout=_request_timeout,
|
1846
|
+
_request_auth=_request_auth,
|
1847
|
+
_content_type=_content_type,
|
1848
|
+
_headers=_headers,
|
1849
|
+
_host_index=_host_index,
|
1850
|
+
)
|
1851
|
+
|
1852
|
+
@validate_call
|
1853
|
+
def handle_now_webhook_without_preload_content(
|
1854
|
+
self,
|
1855
|
+
_request_timeout: Union[
|
1856
|
+
None,
|
1857
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1858
|
+
Tuple[
|
1859
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1860
|
+
],
|
1861
|
+
] = None,
|
1862
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1863
|
+
_content_type: Optional[StrictStr] = None,
|
1864
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1865
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1866
|
+
) -> RESTResponseType:
|
1867
|
+
"""Handle Webhook without preloading content
|
1868
|
+
|
1869
|
+
This method can work in both sync and async modes based on the is_sync flag.
|
1870
|
+
"""
|
1871
|
+
if self.is_sync:
|
1872
|
+
return self._handle_now_webhook_sync_without_preload_content(
|
1873
|
+
_request_timeout=_request_timeout,
|
1874
|
+
_request_auth=_request_auth,
|
1875
|
+
_content_type=_content_type,
|
1876
|
+
_headers=_headers,
|
1877
|
+
_host_index=_host_index,
|
1878
|
+
)
|
1879
|
+
|
1880
|
+
else:
|
1881
|
+
return self._handle_now_webhook_async_without_preload_content(
|
1882
|
+
_request_timeout=_request_timeout,
|
1883
|
+
_request_auth=_request_auth,
|
1884
|
+
_content_type=_content_type,
|
1885
|
+
_headers=_headers,
|
1886
|
+
_host_index=_host_index,
|
1887
|
+
)
|
1888
|
+
|
1889
|
+
# Private async implementation methods
|
1890
|
+
@validate_call
|
1891
|
+
async def _handle_now_webhook_async(
|
993
1892
|
self,
|
994
1893
|
_request_timeout: Union[
|
995
1894
|
None,
|
@@ -1049,7 +1948,7 @@ class NOWPaymentsApi:
|
|
1049
1948
|
).data
|
1050
1949
|
|
1051
1950
|
@validate_call
|
1052
|
-
async def
|
1951
|
+
async def _handle_now_webhook_async_with_http_info(
|
1053
1952
|
self,
|
1054
1953
|
_request_timeout: Union[
|
1055
1954
|
None,
|
@@ -1104,12 +2003,11 @@ class NOWPaymentsApi:
|
|
1104
2003
|
)
|
1105
2004
|
await response_data.read()
|
1106
2005
|
return self.api_client.response_deserialize(
|
1107
|
-
response_data=response_data,
|
1108
|
-
response_types_map=_response_types_map,
|
2006
|
+
response_data=response_data, response_types_map=_response_types_map
|
1109
2007
|
)
|
1110
2008
|
|
1111
2009
|
@validate_call
|
1112
|
-
async def
|
2010
|
+
async def _handle_now_webhook_async_without_preload_content(
|
1113
2011
|
self,
|
1114
2012
|
_request_timeout: Union[
|
1115
2013
|
None,
|
@@ -1162,7 +2060,80 @@ class NOWPaymentsApi:
|
|
1162
2060
|
response_data = await self.api_client.call_api(
|
1163
2061
|
*_param, _request_timeout=_request_timeout
|
1164
2062
|
)
|
1165
|
-
return response_data
|
2063
|
+
return response_data
|
2064
|
+
|
2065
|
+
# Private sync implementation methods
|
2066
|
+
@validate_call
|
2067
|
+
def _handle_now_webhook_sync(
|
2068
|
+
self,
|
2069
|
+
_request_timeout: Union[
|
2070
|
+
None,
|
2071
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2072
|
+
Tuple[
|
2073
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
2074
|
+
],
|
2075
|
+
] = None,
|
2076
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2077
|
+
_content_type: Optional[StrictStr] = None,
|
2078
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2079
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2080
|
+
) -> object:
|
2081
|
+
"""Synchronous version of handle_now_webhook"""
|
2082
|
+
return async_to_sync(self._handle_now_webhook_async)(
|
2083
|
+
_request_timeout=_request_timeout,
|
2084
|
+
_request_auth=_request_auth,
|
2085
|
+
_content_type=_content_type,
|
2086
|
+
_headers=_headers,
|
2087
|
+
_host_index=_host_index,
|
2088
|
+
)
|
2089
|
+
|
2090
|
+
@validate_call
|
2091
|
+
def _handle_now_webhook_sync_with_http_info(
|
2092
|
+
self,
|
2093
|
+
_request_timeout: Union[
|
2094
|
+
None,
|
2095
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2096
|
+
Tuple[
|
2097
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
2098
|
+
],
|
2099
|
+
] = None,
|
2100
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2101
|
+
_content_type: Optional[StrictStr] = None,
|
2102
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2103
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2104
|
+
) -> ApiResponse[object]:
|
2105
|
+
"""Synchronous version of handle_now_webhook_with_http_info"""
|
2106
|
+
return async_to_sync(self._handle_now_webhook_async_with_http_info)(
|
2107
|
+
_request_timeout=_request_timeout,
|
2108
|
+
_request_auth=_request_auth,
|
2109
|
+
_content_type=_content_type,
|
2110
|
+
_headers=_headers,
|
2111
|
+
_host_index=_host_index,
|
2112
|
+
)
|
2113
|
+
|
2114
|
+
@validate_call
|
2115
|
+
def _handle_now_webhook_sync_without_preload_content(
|
2116
|
+
self,
|
2117
|
+
_request_timeout: Union[
|
2118
|
+
None,
|
2119
|
+
Annotated[StrictFloat, Field(gt=0)],
|
2120
|
+
Tuple[
|
2121
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
2122
|
+
],
|
2123
|
+
] = None,
|
2124
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
2125
|
+
_content_type: Optional[StrictStr] = None,
|
2126
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
2127
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
2128
|
+
) -> RESTResponseType:
|
2129
|
+
"""Synchronous version of handle_now_webhook_without_preload_content"""
|
2130
|
+
return async_to_sync(self._handle_now_webhook_async_without_preload_content)(
|
2131
|
+
_request_timeout=_request_timeout,
|
2132
|
+
_request_auth=_request_auth,
|
2133
|
+
_content_type=_content_type,
|
2134
|
+
_headers=_headers,
|
2135
|
+
_host_index=_host_index,
|
2136
|
+
)
|
1166
2137
|
|
1167
2138
|
def _handle_now_webhook_serialize(
|
1168
2139
|
self,
|