crypticorn 1.0.2rc3__py3-none-any.whl → 2.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) hide show
  1. crypticorn/__init__.py +3 -3
  2. crypticorn/auth/__init__.py +2 -0
  3. crypticorn/auth/client/__init__.py +112 -0
  4. crypticorn/auth/client/api/__init__.py +8 -0
  5. crypticorn/auth/client/api/admin_api.py +522 -0
  6. crypticorn/auth/client/api/auth_api.py +2089 -0
  7. crypticorn/auth/client/api/service_api.py +309 -0
  8. crypticorn/auth/client/api/user_api.py +2540 -0
  9. crypticorn/auth/client/api/wallet_api.py +1698 -0
  10. crypticorn/auth/client/api_client.py +758 -0
  11. crypticorn/auth/client/api_response.py +20 -0
  12. crypticorn/auth/client/configuration.py +584 -0
  13. crypticorn/auth/client/exceptions.py +220 -0
  14. crypticorn/auth/client/models/__init__.py +91 -0
  15. crypticorn/auth/client/models/add_wallet200_response.py +86 -0
  16. crypticorn/auth/client/models/add_wallet_request.py +107 -0
  17. crypticorn/auth/client/models/authorize_user200_response.py +107 -0
  18. crypticorn/auth/client/models/authorize_user200_response_auth.py +101 -0
  19. crypticorn/auth/client/models/authorize_user_request.py +96 -0
  20. crypticorn/auth/client/models/create_user_request.py +114 -0
  21. crypticorn/auth/client/models/list_wallets200_response.py +137 -0
  22. crypticorn/auth/client/models/list_wallets200_response_balances_inner.py +115 -0
  23. crypticorn/auth/client/models/list_wallets200_response_balances_inner_sale_round.py +115 -0
  24. crypticorn/auth/client/models/list_wallets200_response_balances_inner_wallet.py +168 -0
  25. crypticorn/auth/client/models/list_wallets200_response_balances_inner_wallet_vesting_wallets_inner.py +191 -0
  26. crypticorn/auth/client/models/list_wallets200_response_data_inner.py +102 -0
  27. crypticorn/auth/client/models/list_wallets200_response_user_value.py +118 -0
  28. crypticorn/auth/client/models/logout_default_response.py +108 -0
  29. crypticorn/auth/client/models/logout_default_response_issues_inner.py +83 -0
  30. crypticorn/auth/client/models/refresh_token_info200_response.py +97 -0
  31. crypticorn/auth/client/models/refresh_token_info200_response_user_session.py +105 -0
  32. crypticorn/auth/client/models/resend_verification_email_request.py +84 -0
  33. crypticorn/auth/client/models/revoke_user_tokens_request.py +83 -0
  34. crypticorn/auth/client/models/rotate_tokens200_response.py +110 -0
  35. crypticorn/auth/client/models/token_info200_response.py +97 -0
  36. crypticorn/auth/client/models/unlink_wallet_request.py +83 -0
  37. crypticorn/auth/client/models/update_user_request.py +93 -0
  38. crypticorn/auth/client/models/user_reset_password_request.py +87 -0
  39. crypticorn/auth/client/models/user_set_password_request.py +89 -0
  40. crypticorn/auth/client/models/verify200_response.py +110 -0
  41. crypticorn/auth/client/models/verify_email200_response.py +107 -0
  42. crypticorn/auth/client/models/verify_email200_response_auth.py +101 -0
  43. crypticorn/auth/client/models/verify_email200_response_auth_auth.py +110 -0
  44. crypticorn/auth/client/models/verify_email_request.py +83 -0
  45. crypticorn/auth/client/models/verify_wallet_request.py +91 -0
  46. crypticorn/auth/client/models/wallet_verified200_response.py +83 -0
  47. crypticorn/auth/client/models/whoami200_response.py +104 -0
  48. crypticorn/auth/client/rest.py +195 -0
  49. crypticorn/auth/main.py +45 -0
  50. crypticorn/client.py +46 -8
  51. crypticorn/common/__init__.py +5 -0
  52. crypticorn/common/auth.py +43 -0
  53. crypticorn/common/auth_client.py +163 -0
  54. crypticorn/common/errors.py +432 -0
  55. crypticorn/common/scopes.py +29 -0
  56. crypticorn/common/urls.py +25 -0
  57. crypticorn/hive/__init__.py +2 -1
  58. crypticorn/hive/client/__init__.py +57 -0
  59. crypticorn/hive/client/api/__init__.py +6 -0
  60. crypticorn/hive/client/api/data_api.py +594 -0
  61. crypticorn/hive/client/api/models_api.py +1680 -0
  62. crypticorn/hive/client/api/status_api.py +263 -0
  63. crypticorn/hive/client/api_client.py +758 -0
  64. crypticorn/hive/client/api_response.py +20 -0
  65. crypticorn/hive/client/configuration.py +612 -0
  66. crypticorn/hive/client/exceptions.py +220 -0
  67. crypticorn/hive/client/models/__init__.py +38 -0
  68. crypticorn/hive/client/models/coins.py +44 -0
  69. crypticorn/hive/client/models/data_download_response.py +113 -0
  70. crypticorn/hive/client/models/data_info.py +115 -0
  71. crypticorn/hive/client/models/data_value_value_value_inner.py +154 -0
  72. crypticorn/hive/client/models/data_version.py +35 -0
  73. crypticorn/hive/client/models/download_links.py +91 -0
  74. crypticorn/hive/client/models/evaluation.py +86 -0
  75. crypticorn/hive/client/models/evaluation_response.py +85 -0
  76. crypticorn/hive/client/models/feature_size.py +36 -0
  77. crypticorn/hive/client/models/http_validation_error.py +99 -0
  78. crypticorn/hive/client/models/model.py +133 -0
  79. crypticorn/hive/client/models/model_create.py +93 -0
  80. crypticorn/hive/client/models/model_status.py +35 -0
  81. crypticorn/hive/client/models/model_update.py +83 -0
  82. crypticorn/hive/client/models/target.py +36 -0
  83. crypticorn/hive/client/models/target_type.py +35 -0
  84. crypticorn/hive/client/models/validation_error.py +105 -0
  85. crypticorn/hive/client/models/validation_error_loc_inner.py +159 -0
  86. crypticorn/hive/client/py.typed +0 -0
  87. crypticorn/hive/client/rest.py +195 -0
  88. crypticorn/hive/main.py +27 -100
  89. crypticorn/klines/client/__init__.py +21 -7
  90. crypticorn/klines/client/api/__init__.py +0 -1
  91. crypticorn/klines/client/api/funding_rates_api.py +90 -79
  92. crypticorn/klines/client/api/health_check_api.py +29 -45
  93. crypticorn/klines/client/api/ohlcv_data_api.py +104 -87
  94. crypticorn/klines/client/api/symbols_api.py +36 -54
  95. crypticorn/klines/client/api/udf_api.py +228 -352
  96. crypticorn/klines/client/api_client.py +106 -148
  97. crypticorn/klines/client/api_response.py +2 -3
  98. crypticorn/klines/client/configuration.py +64 -50
  99. crypticorn/klines/client/exceptions.py +20 -16
  100. crypticorn/klines/client/models/__init__.py +21 -7
  101. crypticorn/klines/client/models/base_response_health_check_response.py +21 -15
  102. crypticorn/klines/client/models/base_response_list_funding_rate_response.py +21 -15
  103. crypticorn/klines/client/models/base_response_list_str.py +16 -14
  104. crypticorn/klines/client/models/base_response_ohlcv_response.py +21 -15
  105. crypticorn/klines/client/models/error_response.py +23 -15
  106. crypticorn/klines/client/models/exchange.py +11 -11
  107. crypticorn/klines/client/models/funding_rate_response.py +11 -11
  108. crypticorn/klines/client/models/health_check_response.py +14 -12
  109. crypticorn/klines/client/models/history_error_response.py +11 -11
  110. crypticorn/klines/client/models/history_no_data_response.py +16 -16
  111. crypticorn/klines/client/models/history_success_response.py +16 -16
  112. crypticorn/klines/client/models/http_validation_error.py +14 -10
  113. crypticorn/klines/client/models/market.py +2 -4
  114. crypticorn/klines/client/models/ohlcv_response.py +22 -15
  115. crypticorn/klines/client/models/resolution.py +5 -7
  116. crypticorn/klines/client/models/response_get_history_udf_history_get.py +71 -22
  117. crypticorn/klines/client/models/search_symbol_response.py +22 -15
  118. crypticorn/klines/client/models/sort_direction.py +2 -4
  119. crypticorn/klines/client/models/symbol_group_response.py +5 -9
  120. crypticorn/klines/client/models/symbol_info_response.py +40 -24
  121. crypticorn/klines/client/models/symbol_type.py +5 -10
  122. crypticorn/klines/client/models/timeframe.py +5 -7
  123. crypticorn/klines/client/models/udf_config_response.py +60 -21
  124. crypticorn/klines/client/models/validation_error.py +19 -13
  125. crypticorn/klines/client/models/validation_error_loc_inner.py +32 -11
  126. crypticorn/klines/client/rest.py +30 -41
  127. crypticorn/klines/main.py +52 -15
  128. crypticorn/pay/__init__.py +2 -0
  129. crypticorn/pay/client/__init__.py +52 -0
  130. crypticorn/pay/client/api/__init__.py +7 -0
  131. crypticorn/pay/client/api/now_payments_api.py +813 -0
  132. crypticorn/pay/client/api/payments_api.py +799 -0
  133. crypticorn/pay/client/api/products_api.py +891 -0
  134. crypticorn/pay/client/api/status_api.py +260 -0
  135. crypticorn/pay/client/api_client.py +758 -0
  136. crypticorn/pay/client/api_response.py +20 -0
  137. crypticorn/pay/client/configuration.py +612 -0
  138. crypticorn/pay/client/exceptions.py +220 -0
  139. crypticorn/pay/client/models/__init__.py +32 -0
  140. crypticorn/pay/client/models/api_status_res.py +83 -0
  141. crypticorn/pay/client/models/combined_payment_history.py +101 -0
  142. crypticorn/pay/client/models/create_invoice_req.py +188 -0
  143. crypticorn/pay/client/models/create_invoice_res.py +188 -0
  144. crypticorn/pay/client/models/currency.py +165 -0
  145. crypticorn/pay/client/models/estimate_price_req.py +91 -0
  146. crypticorn/pay/client/models/estimate_price_res.py +102 -0
  147. crypticorn/pay/client/models/get_currencies_res.py +99 -0
  148. crypticorn/pay/client/models/get_payment_status_res.py +222 -0
  149. crypticorn/pay/client/models/get_payments_list_res.py +109 -0
  150. crypticorn/pay/client/models/http_validation_error.py +99 -0
  151. crypticorn/pay/client/models/min_amount_req.py +124 -0
  152. crypticorn/pay/client/models/min_amount_res.py +105 -0
  153. crypticorn/pay/client/models/now_api_status_res.py +83 -0
  154. crypticorn/pay/client/models/now_create_invoice_req.py +188 -0
  155. crypticorn/pay/client/models/now_create_invoice_res.py +188 -0
  156. crypticorn/pay/client/models/now_fee_structure.py +104 -0
  157. crypticorn/pay/client/models/now_payment_model.py +124 -0
  158. crypticorn/pay/client/models/now_payment_status.py +42 -0
  159. crypticorn/pay/client/models/now_webhook_payload.py +181 -0
  160. crypticorn/pay/client/models/payment.py +231 -0
  161. crypticorn/pay/client/models/payment_status.py +40 -0
  162. crypticorn/pay/client/models/product.py +87 -0
  163. crypticorn/pay/client/models/product_model.py +119 -0
  164. crypticorn/pay/client/models/product_subs_model.py +108 -0
  165. crypticorn/pay/client/models/services.py +34 -0
  166. crypticorn/pay/client/models/unified_payment_model.py +112 -0
  167. crypticorn/pay/client/models/validation_error.py +105 -0
  168. crypticorn/pay/client/models/validation_error_loc_inner.py +159 -0
  169. crypticorn/pay/client/py.typed +0 -0
  170. crypticorn/pay/client/rest.py +195 -0
  171. crypticorn/pay/main.py +35 -0
  172. crypticorn/trade/client/__init__.py +9 -4
  173. crypticorn/trade/client/api/__init__.py +0 -1
  174. crypticorn/trade/client/api/api_keys_api.py +203 -304
  175. crypticorn/trade/client/api/bots_api.py +177 -250
  176. crypticorn/trade/client/api/exchanges_api.py +38 -57
  177. crypticorn/trade/client/api/futures_trading_panel_api.py +223 -321
  178. crypticorn/trade/client/api/notifications_api.py +247 -364
  179. crypticorn/trade/client/api/orders_api.py +44 -63
  180. crypticorn/trade/client/api/status_api.py +35 -53
  181. crypticorn/trade/client/api/strategies_api.py +852 -64
  182. crypticorn/trade/client/api/trading_actions_api.py +126 -203
  183. crypticorn/trade/client/api_client.py +115 -154
  184. crypticorn/trade/client/api_response.py +2 -3
  185. crypticorn/trade/client/configuration.py +128 -90
  186. crypticorn/trade/client/exceptions.py +21 -17
  187. crypticorn/trade/client/models/__init__.py +9 -4
  188. crypticorn/trade/client/models/action_model.py +114 -50
  189. crypticorn/trade/client/models/api_error_identifier.py +60 -51
  190. crypticorn/trade/client/models/api_error_level.py +37 -0
  191. crypticorn/trade/client/models/api_error_type.py +37 -0
  192. crypticorn/trade/client/models/api_key_model.py +49 -28
  193. crypticorn/trade/client/models/bot_model.py +76 -31
  194. crypticorn/trade/client/models/bot_status.py +37 -0
  195. crypticorn/trade/client/models/exchange.py +3 -5
  196. crypticorn/trade/client/models/execution_ids.py +14 -14
  197. crypticorn/trade/client/models/futures_balance.py +39 -23
  198. crypticorn/trade/client/models/futures_trading_action.py +98 -46
  199. crypticorn/trade/client/models/http_validation_error.py +15 -11
  200. crypticorn/trade/client/models/margin_mode.py +3 -5
  201. crypticorn/trade/client/models/market_type.py +3 -5
  202. crypticorn/trade/client/models/notification_model.py +60 -27
  203. crypticorn/trade/client/models/notification_type.py +4 -6
  204. crypticorn/trade/client/models/order_model.py +125 -65
  205. crypticorn/trade/client/models/order_status.py +6 -8
  206. crypticorn/trade/client/models/post_futures_action.py +16 -12
  207. crypticorn/trade/client/models/strategy_exchange_info.py +11 -12
  208. crypticorn/trade/client/models/strategy_model.py +66 -27
  209. crypticorn/trade/client/models/strategy_model_input.py +160 -0
  210. crypticorn/trade/client/models/strategy_model_output.py +160 -0
  211. crypticorn/trade/client/models/tpsl.py +35 -21
  212. crypticorn/trade/client/models/trading_action_type.py +5 -7
  213. crypticorn/trade/client/models/update_notification.py +17 -13
  214. crypticorn/trade/client/models/validation_error.py +20 -14
  215. crypticorn/trade/client/models/validation_error_loc_inner.py +33 -12
  216. crypticorn/trade/client/rest.py +108 -170
  217. crypticorn/trade/main.py +26 -19
  218. crypticorn-2.0.0.dist-info/METADATA +74 -0
  219. crypticorn-2.0.0.dist-info/RECORD +226 -0
  220. {crypticorn-1.0.2rc3.dist-info → crypticorn-2.0.0.dist-info}/WHEEL +1 -1
  221. crypticorn/hive/requirements.txt +0 -4
  222. crypticorn/hive/utils.py +0 -109
  223. crypticorn/klines/requirements.txt +0 -4
  224. crypticorn/klines/test/test_base_response_health_check_response.py +0 -56
  225. crypticorn/klines/test/test_base_response_list_funding_rate_response.py +0 -59
  226. crypticorn/klines/test/test_base_response_list_str.py +0 -56
  227. crypticorn/klines/test/test_base_response_ohlcv_response.py +0 -72
  228. crypticorn/klines/test/test_error_response.py +0 -57
  229. crypticorn/klines/test/test_exchange.py +0 -56
  230. crypticorn/klines/test/test_funding_rate_response.py +0 -56
  231. crypticorn/klines/test/test_funding_rates_api.py +0 -38
  232. crypticorn/klines/test/test_health_check_api.py +0 -38
  233. crypticorn/klines/test/test_health_check_response.py +0 -52
  234. crypticorn/klines/test/test_history_error_response.py +0 -53
  235. crypticorn/klines/test/test_history_no_data_response.py +0 -69
  236. crypticorn/klines/test/test_history_success_response.py +0 -87
  237. crypticorn/klines/test/test_http_validation_error.py +0 -58
  238. crypticorn/klines/test/test_market.py +0 -33
  239. crypticorn/klines/test/test_ohlcv_data_api.py +0 -38
  240. crypticorn/klines/test/test_ohlcv_response.py +0 -86
  241. crypticorn/klines/test/test_resolution.py +0 -33
  242. crypticorn/klines/test/test_response_get_history_udf_history_get.py +0 -89
  243. crypticorn/klines/test/test_search_symbol_response.py +0 -62
  244. crypticorn/klines/test/test_sort_direction.py +0 -33
  245. crypticorn/klines/test/test_symbol_group_response.py +0 -53
  246. crypticorn/klines/test/test_symbol_info_response.py +0 -84
  247. crypticorn/klines/test/test_symbol_type.py +0 -54
  248. crypticorn/klines/test/test_symbols_api.py +0 -38
  249. crypticorn/klines/test/test_timeframe.py +0 -33
  250. crypticorn/klines/test/test_udf_api.py +0 -80
  251. crypticorn/klines/test/test_udf_config_response.py +0 -95
  252. crypticorn/klines/test/test_validation_error.py +0 -60
  253. crypticorn/klines/test/test_validation_error_loc_inner.py +0 -50
  254. crypticorn/trade/requirements.txt +0 -4
  255. crypticorn-1.0.2rc3.dist-info/LICENSE.md +0 -19
  256. crypticorn-1.0.2rc3.dist-info/METADATA +0 -47
  257. crypticorn-1.0.2rc3.dist-info/RECORD +0 -128
  258. /crypticorn/{klines/test/__init__.py → auth/client/py.typed} +0 -0
  259. {crypticorn-1.0.2rc3.dist-info → crypticorn-2.0.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,813 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Payment API
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: 0.1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import Field, StrictStr
20
+ from typing import Any, Optional
21
+ from typing_extensions import Annotated
22
+ from crypticorn.pay.client.models.now_api_status_res import NowAPIStatusRes
23
+ from crypticorn.pay.client.models.now_create_invoice_req import NowCreateInvoiceReq
24
+ from crypticorn.pay.client.models.now_create_invoice_res import NowCreateInvoiceRes
25
+ from crypticorn.pay.client.models.now_webhook_payload import NowWebhookPayload
26
+
27
+ from crypticorn.pay.client.api_client import ApiClient, RequestSerialized
28
+ from crypticorn.pay.client.api_response import ApiResponse
29
+ from crypticorn.pay.client.rest import RESTResponseType
30
+
31
+
32
+ class NOWPaymentsApi:
33
+ """NOTE: This class is auto generated by OpenAPI Generator
34
+ Ref: https://openapi-generator.tech
35
+
36
+ Do not edit the class manually.
37
+ """
38
+
39
+ def __init__(self, api_client=None) -> None:
40
+ if api_client is None:
41
+ api_client = ApiClient.get_default()
42
+ self.api_client = api_client
43
+
44
+ @validate_call
45
+ async def create_now_invoice(
46
+ self,
47
+ now_create_invoice_req: NowCreateInvoiceReq,
48
+ access_token: Optional[StrictStr] = None,
49
+ _request_timeout: Union[
50
+ None,
51
+ Annotated[StrictFloat, Field(gt=0)],
52
+ Tuple[
53
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
54
+ ],
55
+ ] = None,
56
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
57
+ _content_type: Optional[StrictStr] = None,
58
+ _headers: Optional[Dict[StrictStr, Any]] = None,
59
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
60
+ ) -> NowCreateInvoiceRes:
61
+ """Create Invoice
62
+
63
+ Create a payment invoice with a payment link for customer completion
64
+
65
+ :param now_create_invoice_req: (required)
66
+ :type now_create_invoice_req: NowCreateInvoiceReq
67
+ :param access_token:
68
+ :type access_token: str
69
+ :param _request_timeout: timeout setting for this request. If one
70
+ number provided, it will be total request
71
+ timeout. It can also be a pair (tuple) of
72
+ (connection, read) timeouts.
73
+ :type _request_timeout: int, tuple(int, int), optional
74
+ :param _request_auth: set to override the auth_settings for an a single
75
+ request; this effectively ignores the
76
+ authentication in the spec for a single request.
77
+ :type _request_auth: dict, optional
78
+ :param _content_type: force content-type for the request.
79
+ :type _content_type: str, Optional
80
+ :param _headers: set to override the headers for a single
81
+ request; this effectively ignores the headers
82
+ in the spec for a single request.
83
+ :type _headers: dict, optional
84
+ :param _host_index: set to override the host_index for a single
85
+ request; this effectively ignores the host_index
86
+ in the spec for a single request.
87
+ :type _host_index: int, optional
88
+ :return: Returns the result object.
89
+ """ # noqa: E501
90
+
91
+ _param = self._create_now_invoice_serialize(
92
+ now_create_invoice_req=now_create_invoice_req,
93
+ access_token=access_token,
94
+ _request_auth=_request_auth,
95
+ _content_type=_content_type,
96
+ _headers=_headers,
97
+ _host_index=_host_index,
98
+ )
99
+
100
+ _response_types_map: Dict[str, Optional[str]] = {
101
+ "200": "NowCreateInvoiceRes",
102
+ "422": "HTTPValidationError",
103
+ }
104
+ response_data = await self.api_client.call_api(
105
+ *_param, _request_timeout=_request_timeout
106
+ )
107
+ await response_data.read()
108
+ return self.api_client.response_deserialize(
109
+ response_data=response_data,
110
+ response_types_map=_response_types_map,
111
+ ).data
112
+
113
+ @validate_call
114
+ async def create_now_invoice_with_http_info(
115
+ self,
116
+ now_create_invoice_req: NowCreateInvoiceReq,
117
+ access_token: Optional[StrictStr] = None,
118
+ _request_timeout: Union[
119
+ None,
120
+ Annotated[StrictFloat, Field(gt=0)],
121
+ Tuple[
122
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
123
+ ],
124
+ ] = None,
125
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
126
+ _content_type: Optional[StrictStr] = None,
127
+ _headers: Optional[Dict[StrictStr, Any]] = None,
128
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
129
+ ) -> ApiResponse[NowCreateInvoiceRes]:
130
+ """Create Invoice
131
+
132
+ Create a payment invoice with a payment link for customer completion
133
+
134
+ :param now_create_invoice_req: (required)
135
+ :type now_create_invoice_req: NowCreateInvoiceReq
136
+ :param access_token:
137
+ :type access_token: str
138
+ :param _request_timeout: timeout setting for this request. If one
139
+ number provided, it will be total request
140
+ timeout. It can also be a pair (tuple) of
141
+ (connection, read) timeouts.
142
+ :type _request_timeout: int, tuple(int, int), optional
143
+ :param _request_auth: set to override the auth_settings for an a single
144
+ request; this effectively ignores the
145
+ authentication in the spec for a single request.
146
+ :type _request_auth: dict, optional
147
+ :param _content_type: force content-type for the request.
148
+ :type _content_type: str, Optional
149
+ :param _headers: set to override the headers for a single
150
+ request; this effectively ignores the headers
151
+ in the spec for a single request.
152
+ :type _headers: dict, optional
153
+ :param _host_index: set to override the host_index for a single
154
+ request; this effectively ignores the host_index
155
+ in the spec for a single request.
156
+ :type _host_index: int, optional
157
+ :return: Returns the result object.
158
+ """ # noqa: E501
159
+
160
+ _param = self._create_now_invoice_serialize(
161
+ now_create_invoice_req=now_create_invoice_req,
162
+ access_token=access_token,
163
+ _request_auth=_request_auth,
164
+ _content_type=_content_type,
165
+ _headers=_headers,
166
+ _host_index=_host_index,
167
+ )
168
+
169
+ _response_types_map: Dict[str, Optional[str]] = {
170
+ "200": "NowCreateInvoiceRes",
171
+ "422": "HTTPValidationError",
172
+ }
173
+ response_data = await self.api_client.call_api(
174
+ *_param, _request_timeout=_request_timeout
175
+ )
176
+ await response_data.read()
177
+ return self.api_client.response_deserialize(
178
+ response_data=response_data,
179
+ response_types_map=_response_types_map,
180
+ )
181
+
182
+ @validate_call
183
+ async def create_now_invoice_without_preload_content(
184
+ self,
185
+ now_create_invoice_req: NowCreateInvoiceReq,
186
+ access_token: Optional[StrictStr] = None,
187
+ _request_timeout: Union[
188
+ None,
189
+ Annotated[StrictFloat, Field(gt=0)],
190
+ Tuple[
191
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
192
+ ],
193
+ ] = None,
194
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
195
+ _content_type: Optional[StrictStr] = None,
196
+ _headers: Optional[Dict[StrictStr, Any]] = None,
197
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
198
+ ) -> RESTResponseType:
199
+ """Create Invoice
200
+
201
+ Create a payment invoice with a payment link for customer completion
202
+
203
+ :param now_create_invoice_req: (required)
204
+ :type now_create_invoice_req: NowCreateInvoiceReq
205
+ :param access_token:
206
+ :type access_token: str
207
+ :param _request_timeout: timeout setting for this request. If one
208
+ number provided, it will be total request
209
+ timeout. It can also be a pair (tuple) of
210
+ (connection, read) timeouts.
211
+ :type _request_timeout: int, tuple(int, int), optional
212
+ :param _request_auth: set to override the auth_settings for an a single
213
+ request; this effectively ignores the
214
+ authentication in the spec for a single request.
215
+ :type _request_auth: dict, optional
216
+ :param _content_type: force content-type for the request.
217
+ :type _content_type: str, Optional
218
+ :param _headers: set to override the headers for a single
219
+ request; this effectively ignores the headers
220
+ in the spec for a single request.
221
+ :type _headers: dict, optional
222
+ :param _host_index: set to override the host_index for a single
223
+ request; this effectively ignores the host_index
224
+ in the spec for a single request.
225
+ :type _host_index: int, optional
226
+ :return: Returns the result object.
227
+ """ # noqa: E501
228
+
229
+ _param = self._create_now_invoice_serialize(
230
+ now_create_invoice_req=now_create_invoice_req,
231
+ access_token=access_token,
232
+ _request_auth=_request_auth,
233
+ _content_type=_content_type,
234
+ _headers=_headers,
235
+ _host_index=_host_index,
236
+ )
237
+
238
+ _response_types_map: Dict[str, Optional[str]] = {
239
+ "200": "NowCreateInvoiceRes",
240
+ "422": "HTTPValidationError",
241
+ }
242
+ response_data = await self.api_client.call_api(
243
+ *_param, _request_timeout=_request_timeout
244
+ )
245
+ return response_data.response
246
+
247
+ def _create_now_invoice_serialize(
248
+ self,
249
+ now_create_invoice_req,
250
+ access_token,
251
+ _request_auth,
252
+ _content_type,
253
+ _headers,
254
+ _host_index,
255
+ ) -> RequestSerialized:
256
+
257
+ _host = None
258
+
259
+ _collection_formats: Dict[str, str] = {}
260
+
261
+ _path_params: Dict[str, str] = {}
262
+ _query_params: List[Tuple[str, str]] = []
263
+ _header_params: Dict[str, Optional[str]] = _headers or {}
264
+ _form_params: List[Tuple[str, str]] = []
265
+ _files: Dict[
266
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
267
+ ] = {}
268
+ _body_params: Optional[bytes] = None
269
+
270
+ # process the path parameters
271
+ # process the query parameters
272
+ # process the header parameters
273
+ # process the form parameters
274
+ # process the body parameter
275
+ if now_create_invoice_req is not None:
276
+ _body_params = now_create_invoice_req
277
+
278
+ # set the HTTP header `Accept`
279
+ if "Accept" not in _header_params:
280
+ _header_params["Accept"] = self.api_client.select_header_accept(
281
+ ["application/json"]
282
+ )
283
+
284
+ # set the HTTP header `Content-Type`
285
+ if _content_type:
286
+ _header_params["Content-Type"] = _content_type
287
+ else:
288
+ _default_content_type = self.api_client.select_header_content_type(
289
+ ["application/json"]
290
+ )
291
+ if _default_content_type is not None:
292
+ _header_params["Content-Type"] = _default_content_type
293
+
294
+ # authentication setting
295
+ _auth_settings: List[str] = ["HTTPBearer"]
296
+
297
+ return self.api_client.param_serialize(
298
+ method="POST",
299
+ resource_path="/now/invoice",
300
+ path_params=_path_params,
301
+ query_params=_query_params,
302
+ header_params=_header_params,
303
+ body=_body_params,
304
+ post_params=_form_params,
305
+ files=_files,
306
+ auth_settings=_auth_settings,
307
+ collection_formats=_collection_formats,
308
+ _host=_host,
309
+ _request_auth=_request_auth,
310
+ )
311
+
312
+ @validate_call
313
+ async def get_now_api_status(
314
+ self,
315
+ _request_timeout: Union[
316
+ None,
317
+ Annotated[StrictFloat, Field(gt=0)],
318
+ Tuple[
319
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
320
+ ],
321
+ ] = None,
322
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
323
+ _content_type: Optional[StrictStr] = None,
324
+ _headers: Optional[Dict[StrictStr, Any]] = None,
325
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
326
+ ) -> NowAPIStatusRes:
327
+ """Get Status
328
+
329
+ Get NOWPayments API status
330
+
331
+ :param _request_timeout: timeout setting for this request. If one
332
+ number provided, it will be total request
333
+ timeout. It can also be a pair (tuple) of
334
+ (connection, read) timeouts.
335
+ :type _request_timeout: int, tuple(int, int), optional
336
+ :param _request_auth: set to override the auth_settings for an a single
337
+ request; this effectively ignores the
338
+ authentication in the spec for a single request.
339
+ :type _request_auth: dict, optional
340
+ :param _content_type: force content-type for the request.
341
+ :type _content_type: str, Optional
342
+ :param _headers: set to override the headers for a single
343
+ request; this effectively ignores the headers
344
+ in the spec for a single request.
345
+ :type _headers: dict, optional
346
+ :param _host_index: set to override the host_index for a single
347
+ request; this effectively ignores the host_index
348
+ in the spec for a single request.
349
+ :type _host_index: int, optional
350
+ :return: Returns the result object.
351
+ """ # noqa: E501
352
+
353
+ _param = self._get_now_api_status_serialize(
354
+ _request_auth=_request_auth,
355
+ _content_type=_content_type,
356
+ _headers=_headers,
357
+ _host_index=_host_index,
358
+ )
359
+
360
+ _response_types_map: Dict[str, Optional[str]] = {
361
+ "200": "NowAPIStatusRes",
362
+ }
363
+ response_data = await self.api_client.call_api(
364
+ *_param, _request_timeout=_request_timeout
365
+ )
366
+ await response_data.read()
367
+ return self.api_client.response_deserialize(
368
+ response_data=response_data,
369
+ response_types_map=_response_types_map,
370
+ ).data
371
+
372
+ @validate_call
373
+ async def get_now_api_status_with_http_info(
374
+ self,
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
+ ) -> ApiResponse[NowAPIStatusRes]:
387
+ """Get Status
388
+
389
+ Get NOWPayments API status
390
+
391
+ :param _request_timeout: timeout setting for this request. If one
392
+ number provided, it will be total request
393
+ timeout. It can also be a pair (tuple) of
394
+ (connection, read) timeouts.
395
+ :type _request_timeout: int, tuple(int, int), optional
396
+ :param _request_auth: set to override the auth_settings for an a single
397
+ request; this effectively ignores the
398
+ authentication in the spec for a single request.
399
+ :type _request_auth: dict, optional
400
+ :param _content_type: force content-type for the request.
401
+ :type _content_type: str, Optional
402
+ :param _headers: set to override the headers for a single
403
+ request; this effectively ignores the headers
404
+ in the spec for a single request.
405
+ :type _headers: dict, optional
406
+ :param _host_index: set to override the host_index for a single
407
+ request; this effectively ignores the host_index
408
+ in the spec for a single request.
409
+ :type _host_index: int, optional
410
+ :return: Returns the result object.
411
+ """ # noqa: E501
412
+
413
+ _param = self._get_now_api_status_serialize(
414
+ _request_auth=_request_auth,
415
+ _content_type=_content_type,
416
+ _headers=_headers,
417
+ _host_index=_host_index,
418
+ )
419
+
420
+ _response_types_map: Dict[str, Optional[str]] = {
421
+ "200": "NowAPIStatusRes",
422
+ }
423
+ response_data = await self.api_client.call_api(
424
+ *_param, _request_timeout=_request_timeout
425
+ )
426
+ await response_data.read()
427
+ return self.api_client.response_deserialize(
428
+ response_data=response_data,
429
+ response_types_map=_response_types_map,
430
+ )
431
+
432
+ @validate_call
433
+ async def get_now_api_status_without_preload_content(
434
+ self,
435
+ _request_timeout: Union[
436
+ None,
437
+ Annotated[StrictFloat, Field(gt=0)],
438
+ Tuple[
439
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
440
+ ],
441
+ ] = None,
442
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
443
+ _content_type: Optional[StrictStr] = None,
444
+ _headers: Optional[Dict[StrictStr, Any]] = None,
445
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
446
+ ) -> RESTResponseType:
447
+ """Get Status
448
+
449
+ Get NOWPayments API status
450
+
451
+ :param _request_timeout: timeout setting for this request. If one
452
+ number provided, it will be total request
453
+ timeout. It can also be a pair (tuple) of
454
+ (connection, read) timeouts.
455
+ :type _request_timeout: int, tuple(int, int), optional
456
+ :param _request_auth: set to override the auth_settings for an a single
457
+ request; this effectively ignores the
458
+ authentication in the spec for a single request.
459
+ :type _request_auth: dict, optional
460
+ :param _content_type: force content-type for the request.
461
+ :type _content_type: str, Optional
462
+ :param _headers: set to override the headers for a single
463
+ request; this effectively ignores the headers
464
+ in the spec for a single request.
465
+ :type _headers: dict, optional
466
+ :param _host_index: set to override the host_index for a single
467
+ request; this effectively ignores the host_index
468
+ in the spec for a single request.
469
+ :type _host_index: int, optional
470
+ :return: Returns the result object.
471
+ """ # noqa: E501
472
+
473
+ _param = self._get_now_api_status_serialize(
474
+ _request_auth=_request_auth,
475
+ _content_type=_content_type,
476
+ _headers=_headers,
477
+ _host_index=_host_index,
478
+ )
479
+
480
+ _response_types_map: Dict[str, Optional[str]] = {
481
+ "200": "NowAPIStatusRes",
482
+ }
483
+ response_data = await self.api_client.call_api(
484
+ *_param, _request_timeout=_request_timeout
485
+ )
486
+ return response_data.response
487
+
488
+ def _get_now_api_status_serialize(
489
+ self,
490
+ _request_auth,
491
+ _content_type,
492
+ _headers,
493
+ _host_index,
494
+ ) -> RequestSerialized:
495
+
496
+ _host = None
497
+
498
+ _collection_formats: Dict[str, str] = {}
499
+
500
+ _path_params: Dict[str, str] = {}
501
+ _query_params: List[Tuple[str, str]] = []
502
+ _header_params: Dict[str, Optional[str]] = _headers or {}
503
+ _form_params: List[Tuple[str, str]] = []
504
+ _files: Dict[
505
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
506
+ ] = {}
507
+ _body_params: Optional[bytes] = None
508
+
509
+ # process the path parameters
510
+ # process the query parameters
511
+ # process the header parameters
512
+ # process the form parameters
513
+ # process the body parameter
514
+
515
+ # set the HTTP header `Accept`
516
+ if "Accept" not in _header_params:
517
+ _header_params["Accept"] = self.api_client.select_header_accept(
518
+ ["application/json"]
519
+ )
520
+
521
+ # authentication setting
522
+ _auth_settings: List[str] = []
523
+
524
+ return self.api_client.param_serialize(
525
+ method="GET",
526
+ resource_path="/now/status",
527
+ path_params=_path_params,
528
+ query_params=_query_params,
529
+ header_params=_header_params,
530
+ body=_body_params,
531
+ post_params=_form_params,
532
+ files=_files,
533
+ auth_settings=_auth_settings,
534
+ collection_formats=_collection_formats,
535
+ _host=_host,
536
+ _request_auth=_request_auth,
537
+ )
538
+
539
+ @validate_call
540
+ async def handle_now_webhook(
541
+ self,
542
+ x_nowpayments_sig: Annotated[
543
+ StrictStr, Field(description="Signature for the webhook")
544
+ ],
545
+ now_webhook_payload: NowWebhookPayload,
546
+ _request_timeout: Union[
547
+ None,
548
+ Annotated[StrictFloat, Field(gt=0)],
549
+ Tuple[
550
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
551
+ ],
552
+ ] = None,
553
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
554
+ _content_type: Optional[StrictStr] = None,
555
+ _headers: Optional[Dict[StrictStr, Any]] = None,
556
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
557
+ ) -> object:
558
+ """Handle Webhook
559
+
560
+ Handle NOWPayments webhook notifications (IPN). Validates the signature, updates the payment status and creates a product subscription if the payment is successful.
561
+
562
+ :param x_nowpayments_sig: Signature for the webhook (required)
563
+ :type x_nowpayments_sig: str
564
+ :param now_webhook_payload: (required)
565
+ :type now_webhook_payload: NowWebhookPayload
566
+ :param _request_timeout: timeout setting for this request. If one
567
+ number provided, it will be total request
568
+ timeout. It can also be a pair (tuple) of
569
+ (connection, read) timeouts.
570
+ :type _request_timeout: int, tuple(int, int), optional
571
+ :param _request_auth: set to override the auth_settings for an a single
572
+ request; this effectively ignores the
573
+ authentication in the spec for a single request.
574
+ :type _request_auth: dict, optional
575
+ :param _content_type: force content-type for the request.
576
+ :type _content_type: str, Optional
577
+ :param _headers: set to override the headers for a single
578
+ request; this effectively ignores the headers
579
+ in the spec for a single request.
580
+ :type _headers: dict, optional
581
+ :param _host_index: set to override the host_index for a single
582
+ request; this effectively ignores the host_index
583
+ in the spec for a single request.
584
+ :type _host_index: int, optional
585
+ :return: Returns the result object.
586
+ """ # noqa: E501
587
+
588
+ _param = self._handle_now_webhook_serialize(
589
+ x_nowpayments_sig=x_nowpayments_sig,
590
+ now_webhook_payload=now_webhook_payload,
591
+ _request_auth=_request_auth,
592
+ _content_type=_content_type,
593
+ _headers=_headers,
594
+ _host_index=_host_index,
595
+ )
596
+
597
+ _response_types_map: Dict[str, Optional[str]] = {
598
+ "200": "object",
599
+ "422": "HTTPValidationError",
600
+ }
601
+ response_data = await self.api_client.call_api(
602
+ *_param, _request_timeout=_request_timeout
603
+ )
604
+ await response_data.read()
605
+ return self.api_client.response_deserialize(
606
+ response_data=response_data,
607
+ response_types_map=_response_types_map,
608
+ ).data
609
+
610
+ @validate_call
611
+ async def handle_now_webhook_with_http_info(
612
+ self,
613
+ x_nowpayments_sig: Annotated[
614
+ StrictStr, Field(description="Signature for the webhook")
615
+ ],
616
+ now_webhook_payload: NowWebhookPayload,
617
+ _request_timeout: Union[
618
+ None,
619
+ Annotated[StrictFloat, Field(gt=0)],
620
+ Tuple[
621
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
622
+ ],
623
+ ] = None,
624
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
625
+ _content_type: Optional[StrictStr] = None,
626
+ _headers: Optional[Dict[StrictStr, Any]] = None,
627
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
628
+ ) -> ApiResponse[object]:
629
+ """Handle Webhook
630
+
631
+ Handle NOWPayments webhook notifications (IPN). Validates the signature, updates the payment status and creates a product subscription if the payment is successful.
632
+
633
+ :param x_nowpayments_sig: Signature for the webhook (required)
634
+ :type x_nowpayments_sig: str
635
+ :param now_webhook_payload: (required)
636
+ :type now_webhook_payload: NowWebhookPayload
637
+ :param _request_timeout: timeout setting for this request. If one
638
+ number provided, it will be total request
639
+ timeout. It can also be a pair (tuple) of
640
+ (connection, read) timeouts.
641
+ :type _request_timeout: int, tuple(int, int), optional
642
+ :param _request_auth: set to override the auth_settings for an a single
643
+ request; this effectively ignores the
644
+ authentication in the spec for a single request.
645
+ :type _request_auth: dict, optional
646
+ :param _content_type: force content-type for the request.
647
+ :type _content_type: str, Optional
648
+ :param _headers: set to override the headers for a single
649
+ request; this effectively ignores the headers
650
+ in the spec for a single request.
651
+ :type _headers: dict, optional
652
+ :param _host_index: set to override the host_index for a single
653
+ request; this effectively ignores the host_index
654
+ in the spec for a single request.
655
+ :type _host_index: int, optional
656
+ :return: Returns the result object.
657
+ """ # noqa: E501
658
+
659
+ _param = self._handle_now_webhook_serialize(
660
+ x_nowpayments_sig=x_nowpayments_sig,
661
+ now_webhook_payload=now_webhook_payload,
662
+ _request_auth=_request_auth,
663
+ _content_type=_content_type,
664
+ _headers=_headers,
665
+ _host_index=_host_index,
666
+ )
667
+
668
+ _response_types_map: Dict[str, Optional[str]] = {
669
+ "200": "object",
670
+ "422": "HTTPValidationError",
671
+ }
672
+ response_data = await self.api_client.call_api(
673
+ *_param, _request_timeout=_request_timeout
674
+ )
675
+ await response_data.read()
676
+ return self.api_client.response_deserialize(
677
+ response_data=response_data,
678
+ response_types_map=_response_types_map,
679
+ )
680
+
681
+ @validate_call
682
+ async def handle_now_webhook_without_preload_content(
683
+ self,
684
+ x_nowpayments_sig: Annotated[
685
+ StrictStr, Field(description="Signature for the webhook")
686
+ ],
687
+ now_webhook_payload: NowWebhookPayload,
688
+ _request_timeout: Union[
689
+ None,
690
+ Annotated[StrictFloat, Field(gt=0)],
691
+ Tuple[
692
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
693
+ ],
694
+ ] = None,
695
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
696
+ _content_type: Optional[StrictStr] = None,
697
+ _headers: Optional[Dict[StrictStr, Any]] = None,
698
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
699
+ ) -> RESTResponseType:
700
+ """Handle Webhook
701
+
702
+ Handle NOWPayments webhook notifications (IPN). Validates the signature, updates the payment status and creates a product subscription if the payment is successful.
703
+
704
+ :param x_nowpayments_sig: Signature for the webhook (required)
705
+ :type x_nowpayments_sig: str
706
+ :param now_webhook_payload: (required)
707
+ :type now_webhook_payload: NowWebhookPayload
708
+ :param _request_timeout: timeout setting for this request. If one
709
+ number provided, it will be total request
710
+ timeout. It can also be a pair (tuple) of
711
+ (connection, read) timeouts.
712
+ :type _request_timeout: int, tuple(int, int), optional
713
+ :param _request_auth: set to override the auth_settings for an a single
714
+ request; this effectively ignores the
715
+ authentication in the spec for a single request.
716
+ :type _request_auth: dict, optional
717
+ :param _content_type: force content-type for the request.
718
+ :type _content_type: str, Optional
719
+ :param _headers: set to override the headers for a single
720
+ request; this effectively ignores the headers
721
+ in the spec for a single request.
722
+ :type _headers: dict, optional
723
+ :param _host_index: set to override the host_index for a single
724
+ request; this effectively ignores the host_index
725
+ in the spec for a single request.
726
+ :type _host_index: int, optional
727
+ :return: Returns the result object.
728
+ """ # noqa: E501
729
+
730
+ _param = self._handle_now_webhook_serialize(
731
+ x_nowpayments_sig=x_nowpayments_sig,
732
+ now_webhook_payload=now_webhook_payload,
733
+ _request_auth=_request_auth,
734
+ _content_type=_content_type,
735
+ _headers=_headers,
736
+ _host_index=_host_index,
737
+ )
738
+
739
+ _response_types_map: Dict[str, Optional[str]] = {
740
+ "200": "object",
741
+ "422": "HTTPValidationError",
742
+ }
743
+ response_data = await self.api_client.call_api(
744
+ *_param, _request_timeout=_request_timeout
745
+ )
746
+ return response_data.response
747
+
748
+ def _handle_now_webhook_serialize(
749
+ self,
750
+ x_nowpayments_sig,
751
+ now_webhook_payload,
752
+ _request_auth,
753
+ _content_type,
754
+ _headers,
755
+ _host_index,
756
+ ) -> RequestSerialized:
757
+
758
+ _host = None
759
+
760
+ _collection_formats: Dict[str, str] = {}
761
+
762
+ _path_params: Dict[str, str] = {}
763
+ _query_params: List[Tuple[str, str]] = []
764
+ _header_params: Dict[str, Optional[str]] = _headers or {}
765
+ _form_params: List[Tuple[str, str]] = []
766
+ _files: Dict[
767
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
768
+ ] = {}
769
+ _body_params: Optional[bytes] = None
770
+
771
+ # process the path parameters
772
+ # process the query parameters
773
+ # process the header parameters
774
+ if x_nowpayments_sig is not None:
775
+ _header_params["x-nowpayments-sig"] = x_nowpayments_sig
776
+ # process the form parameters
777
+ # process the body parameter
778
+ if now_webhook_payload is not None:
779
+ _body_params = now_webhook_payload
780
+
781
+ # set the HTTP header `Accept`
782
+ if "Accept" not in _header_params:
783
+ _header_params["Accept"] = self.api_client.select_header_accept(
784
+ ["application/json"]
785
+ )
786
+
787
+ # set the HTTP header `Content-Type`
788
+ if _content_type:
789
+ _header_params["Content-Type"] = _content_type
790
+ else:
791
+ _default_content_type = self.api_client.select_header_content_type(
792
+ ["application/json"]
793
+ )
794
+ if _default_content_type is not None:
795
+ _header_params["Content-Type"] = _default_content_type
796
+
797
+ # authentication setting
798
+ _auth_settings: List[str] = []
799
+
800
+ return self.api_client.param_serialize(
801
+ method="POST",
802
+ resource_path="/now/webhook",
803
+ path_params=_path_params,
804
+ query_params=_query_params,
805
+ header_params=_header_params,
806
+ body=_body_params,
807
+ post_params=_form_params,
808
+ files=_files,
809
+ auth_settings=_auth_settings,
810
+ collection_formats=_collection_formats,
811
+ _host=_host,
812
+ _request_auth=_request_auth,
813
+ )