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,891 @@
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 StrictInt, StrictStr
20
+ from typing import Any, Dict, List, Optional
21
+ from crypticorn.pay.client.models.product_model import ProductModel
22
+
23
+ from crypticorn.pay.client.api_client import ApiClient, RequestSerialized
24
+ from crypticorn.pay.client.api_response import ApiResponse
25
+ from crypticorn.pay.client.rest import RESTResponseType
26
+
27
+
28
+ class ProductsApi:
29
+ """NOTE: This class is auto generated by OpenAPI Generator
30
+ Ref: https://openapi-generator.tech
31
+
32
+ Do not edit the class manually.
33
+ """
34
+
35
+ def __init__(self, api_client=None) -> None:
36
+ if api_client is None:
37
+ api_client = ApiClient.get_default()
38
+ self.api_client = api_client
39
+
40
+ @validate_call
41
+ async def create_product(
42
+ self,
43
+ product_model: ProductModel,
44
+ access_token: Optional[StrictStr] = None,
45
+ _request_timeout: Union[
46
+ None,
47
+ Annotated[StrictFloat, Field(gt=0)],
48
+ Tuple[
49
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
50
+ ],
51
+ ] = None,
52
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
53
+ _content_type: Optional[StrictStr] = None,
54
+ _headers: Optional[Dict[StrictStr, Any]] = None,
55
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
56
+ ) -> object:
57
+ """Create Product
58
+
59
+ Create a new product
60
+
61
+ :param product_model: (required)
62
+ :type product_model: ProductModel
63
+ :param access_token:
64
+ :type access_token: str
65
+ :param _request_timeout: timeout setting for this request. If one
66
+ number provided, it will be total request
67
+ timeout. It can also be a pair (tuple) of
68
+ (connection, read) timeouts.
69
+ :type _request_timeout: int, tuple(int, int), optional
70
+ :param _request_auth: set to override the auth_settings for an a single
71
+ request; this effectively ignores the
72
+ authentication in the spec for a single request.
73
+ :type _request_auth: dict, optional
74
+ :param _content_type: force content-type for the request.
75
+ :type _content_type: str, Optional
76
+ :param _headers: set to override the headers for a single
77
+ request; this effectively ignores the headers
78
+ in the spec for a single request.
79
+ :type _headers: dict, optional
80
+ :param _host_index: set to override the host_index for a single
81
+ request; this effectively ignores the host_index
82
+ in the spec for a single request.
83
+ :type _host_index: int, optional
84
+ :return: Returns the result object.
85
+ """ # noqa: E501
86
+
87
+ _param = self._create_product_serialize(
88
+ product_model=product_model,
89
+ access_token=access_token,
90
+ _request_auth=_request_auth,
91
+ _content_type=_content_type,
92
+ _headers=_headers,
93
+ _host_index=_host_index,
94
+ )
95
+
96
+ _response_types_map: Dict[str, Optional[str]] = {
97
+ "200": "object",
98
+ "422": "HTTPValidationError",
99
+ }
100
+ response_data = await self.api_client.call_api(
101
+ *_param, _request_timeout=_request_timeout
102
+ )
103
+ await response_data.read()
104
+ return self.api_client.response_deserialize(
105
+ response_data=response_data,
106
+ response_types_map=_response_types_map,
107
+ ).data
108
+
109
+ @validate_call
110
+ async def create_product_with_http_info(
111
+ self,
112
+ product_model: ProductModel,
113
+ access_token: Optional[StrictStr] = None,
114
+ _request_timeout: Union[
115
+ None,
116
+ Annotated[StrictFloat, Field(gt=0)],
117
+ Tuple[
118
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
119
+ ],
120
+ ] = None,
121
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
122
+ _content_type: Optional[StrictStr] = None,
123
+ _headers: Optional[Dict[StrictStr, Any]] = None,
124
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
125
+ ) -> ApiResponse[object]:
126
+ """Create Product
127
+
128
+ Create a new product
129
+
130
+ :param product_model: (required)
131
+ :type product_model: ProductModel
132
+ :param access_token:
133
+ :type access_token: str
134
+ :param _request_timeout: timeout setting for this request. If one
135
+ number provided, it will be total request
136
+ timeout. It can also be a pair (tuple) of
137
+ (connection, read) timeouts.
138
+ :type _request_timeout: int, tuple(int, int), optional
139
+ :param _request_auth: set to override the auth_settings for an a single
140
+ request; this effectively ignores the
141
+ authentication in the spec for a single request.
142
+ :type _request_auth: dict, optional
143
+ :param _content_type: force content-type for the request.
144
+ :type _content_type: str, Optional
145
+ :param _headers: set to override the headers for a single
146
+ request; this effectively ignores the headers
147
+ in the spec for a single request.
148
+ :type _headers: dict, optional
149
+ :param _host_index: set to override the host_index for a single
150
+ request; this effectively ignores the host_index
151
+ in the spec for a single request.
152
+ :type _host_index: int, optional
153
+ :return: Returns the result object.
154
+ """ # noqa: E501
155
+
156
+ _param = self._create_product_serialize(
157
+ product_model=product_model,
158
+ access_token=access_token,
159
+ _request_auth=_request_auth,
160
+ _content_type=_content_type,
161
+ _headers=_headers,
162
+ _host_index=_host_index,
163
+ )
164
+
165
+ _response_types_map: Dict[str, Optional[str]] = {
166
+ "200": "object",
167
+ "422": "HTTPValidationError",
168
+ }
169
+ response_data = await self.api_client.call_api(
170
+ *_param, _request_timeout=_request_timeout
171
+ )
172
+ await response_data.read()
173
+ return self.api_client.response_deserialize(
174
+ response_data=response_data,
175
+ response_types_map=_response_types_map,
176
+ )
177
+
178
+ @validate_call
179
+ async def create_product_without_preload_content(
180
+ self,
181
+ product_model: ProductModel,
182
+ access_token: Optional[StrictStr] = None,
183
+ _request_timeout: Union[
184
+ None,
185
+ Annotated[StrictFloat, Field(gt=0)],
186
+ Tuple[
187
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
188
+ ],
189
+ ] = None,
190
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
191
+ _content_type: Optional[StrictStr] = None,
192
+ _headers: Optional[Dict[StrictStr, Any]] = None,
193
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
194
+ ) -> RESTResponseType:
195
+ """Create Product
196
+
197
+ Create a new product
198
+
199
+ :param product_model: (required)
200
+ :type product_model: ProductModel
201
+ :param access_token:
202
+ :type access_token: str
203
+ :param _request_timeout: timeout setting for this request. If one
204
+ number provided, it will be total request
205
+ timeout. It can also be a pair (tuple) of
206
+ (connection, read) timeouts.
207
+ :type _request_timeout: int, tuple(int, int), optional
208
+ :param _request_auth: set to override the auth_settings for an a single
209
+ request; this effectively ignores the
210
+ authentication in the spec for a single request.
211
+ :type _request_auth: dict, optional
212
+ :param _content_type: force content-type for the request.
213
+ :type _content_type: str, Optional
214
+ :param _headers: set to override the headers for a single
215
+ request; this effectively ignores the headers
216
+ in the spec for a single request.
217
+ :type _headers: dict, optional
218
+ :param _host_index: set to override the host_index for a single
219
+ request; this effectively ignores the host_index
220
+ in the spec for a single request.
221
+ :type _host_index: int, optional
222
+ :return: Returns the result object.
223
+ """ # noqa: E501
224
+
225
+ _param = self._create_product_serialize(
226
+ product_model=product_model,
227
+ access_token=access_token,
228
+ _request_auth=_request_auth,
229
+ _content_type=_content_type,
230
+ _headers=_headers,
231
+ _host_index=_host_index,
232
+ )
233
+
234
+ _response_types_map: Dict[str, Optional[str]] = {
235
+ "200": "object",
236
+ "422": "HTTPValidationError",
237
+ }
238
+ response_data = await self.api_client.call_api(
239
+ *_param, _request_timeout=_request_timeout
240
+ )
241
+ return response_data.response
242
+
243
+ def _create_product_serialize(
244
+ self,
245
+ product_model,
246
+ access_token,
247
+ _request_auth,
248
+ _content_type,
249
+ _headers,
250
+ _host_index,
251
+ ) -> RequestSerialized:
252
+
253
+ _host = None
254
+
255
+ _collection_formats: Dict[str, str] = {}
256
+
257
+ _path_params: Dict[str, str] = {}
258
+ _query_params: List[Tuple[str, str]] = []
259
+ _header_params: Dict[str, Optional[str]] = _headers or {}
260
+ _form_params: List[Tuple[str, str]] = []
261
+ _files: Dict[
262
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
263
+ ] = {}
264
+ _body_params: Optional[bytes] = None
265
+
266
+ # process the path parameters
267
+ # process the query parameters
268
+ # process the header parameters
269
+ # process the form parameters
270
+ # process the body parameter
271
+ if product_model is not None:
272
+ _body_params = product_model
273
+
274
+ # set the HTTP header `Accept`
275
+ if "Accept" not in _header_params:
276
+ _header_params["Accept"] = self.api_client.select_header_accept(
277
+ ["application/json"]
278
+ )
279
+
280
+ # set the HTTP header `Content-Type`
281
+ if _content_type:
282
+ _header_params["Content-Type"] = _content_type
283
+ else:
284
+ _default_content_type = self.api_client.select_header_content_type(
285
+ ["application/json"]
286
+ )
287
+ if _default_content_type is not None:
288
+ _header_params["Content-Type"] = _default_content_type
289
+
290
+ # authentication setting
291
+ _auth_settings: List[str] = ["HTTPBearer"]
292
+
293
+ return self.api_client.param_serialize(
294
+ method="POST",
295
+ resource_path="/products",
296
+ path_params=_path_params,
297
+ query_params=_query_params,
298
+ header_params=_header_params,
299
+ body=_body_params,
300
+ post_params=_form_params,
301
+ files=_files,
302
+ auth_settings=_auth_settings,
303
+ collection_formats=_collection_formats,
304
+ _host=_host,
305
+ _request_auth=_request_auth,
306
+ )
307
+
308
+ @validate_call
309
+ async def get_products(
310
+ self,
311
+ limit: Optional[StrictInt] = None,
312
+ offset: Optional[StrictInt] = None,
313
+ access_token: Optional[StrictStr] = None,
314
+ body: Optional[Dict[str, Any]] = None,
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
+ ) -> List[ProductModel]:
327
+ """Get Products
328
+
329
+ Get all products
330
+
331
+ :param limit:
332
+ :type limit: int
333
+ :param offset:
334
+ :type offset: int
335
+ :param access_token:
336
+ :type access_token: str
337
+ :param body:
338
+ :type body: object
339
+ :param _request_timeout: timeout setting for this request. If one
340
+ number provided, it will be total request
341
+ timeout. It can also be a pair (tuple) of
342
+ (connection, read) timeouts.
343
+ :type _request_timeout: int, tuple(int, int), optional
344
+ :param _request_auth: set to override the auth_settings for an a single
345
+ request; this effectively ignores the
346
+ authentication in the spec for a single request.
347
+ :type _request_auth: dict, optional
348
+ :param _content_type: force content-type for the request.
349
+ :type _content_type: str, Optional
350
+ :param _headers: set to override the headers for a single
351
+ request; this effectively ignores the headers
352
+ in the spec for a single request.
353
+ :type _headers: dict, optional
354
+ :param _host_index: set to override the host_index for a single
355
+ request; this effectively ignores the host_index
356
+ in the spec for a single request.
357
+ :type _host_index: int, optional
358
+ :return: Returns the result object.
359
+ """ # noqa: E501
360
+
361
+ _param = self._get_products_serialize(
362
+ limit=limit,
363
+ offset=offset,
364
+ access_token=access_token,
365
+ body=body,
366
+ _request_auth=_request_auth,
367
+ _content_type=_content_type,
368
+ _headers=_headers,
369
+ _host_index=_host_index,
370
+ )
371
+
372
+ _response_types_map: Dict[str, Optional[str]] = {
373
+ "200": "List[ProductModel]",
374
+ "422": "HTTPValidationError",
375
+ }
376
+ response_data = await self.api_client.call_api(
377
+ *_param, _request_timeout=_request_timeout
378
+ )
379
+ await response_data.read()
380
+ return self.api_client.response_deserialize(
381
+ response_data=response_data,
382
+ response_types_map=_response_types_map,
383
+ ).data
384
+
385
+ @validate_call
386
+ async def get_products_with_http_info(
387
+ self,
388
+ limit: Optional[StrictInt] = None,
389
+ offset: Optional[StrictInt] = None,
390
+ access_token: Optional[StrictStr] = None,
391
+ body: Optional[Dict[str, Any]] = None,
392
+ _request_timeout: Union[
393
+ None,
394
+ Annotated[StrictFloat, Field(gt=0)],
395
+ Tuple[
396
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
397
+ ],
398
+ ] = None,
399
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
400
+ _content_type: Optional[StrictStr] = None,
401
+ _headers: Optional[Dict[StrictStr, Any]] = None,
402
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
403
+ ) -> ApiResponse[List[ProductModel]]:
404
+ """Get Products
405
+
406
+ Get all products
407
+
408
+ :param limit:
409
+ :type limit: int
410
+ :param offset:
411
+ :type offset: int
412
+ :param access_token:
413
+ :type access_token: str
414
+ :param body:
415
+ :type body: object
416
+ :param _request_timeout: timeout setting for this request. If one
417
+ number provided, it will be total request
418
+ timeout. It can also be a pair (tuple) of
419
+ (connection, read) timeouts.
420
+ :type _request_timeout: int, tuple(int, int), optional
421
+ :param _request_auth: set to override the auth_settings for an a single
422
+ request; this effectively ignores the
423
+ authentication in the spec for a single request.
424
+ :type _request_auth: dict, optional
425
+ :param _content_type: force content-type for the request.
426
+ :type _content_type: str, Optional
427
+ :param _headers: set to override the headers for a single
428
+ request; this effectively ignores the headers
429
+ in the spec for a single request.
430
+ :type _headers: dict, optional
431
+ :param _host_index: set to override the host_index for a single
432
+ request; this effectively ignores the host_index
433
+ in the spec for a single request.
434
+ :type _host_index: int, optional
435
+ :return: Returns the result object.
436
+ """ # noqa: E501
437
+
438
+ _param = self._get_products_serialize(
439
+ limit=limit,
440
+ offset=offset,
441
+ access_token=access_token,
442
+ body=body,
443
+ _request_auth=_request_auth,
444
+ _content_type=_content_type,
445
+ _headers=_headers,
446
+ _host_index=_host_index,
447
+ )
448
+
449
+ _response_types_map: Dict[str, Optional[str]] = {
450
+ "200": "List[ProductModel]",
451
+ "422": "HTTPValidationError",
452
+ }
453
+ response_data = await self.api_client.call_api(
454
+ *_param, _request_timeout=_request_timeout
455
+ )
456
+ await response_data.read()
457
+ return self.api_client.response_deserialize(
458
+ response_data=response_data,
459
+ response_types_map=_response_types_map,
460
+ )
461
+
462
+ @validate_call
463
+ async def get_products_without_preload_content(
464
+ self,
465
+ limit: Optional[StrictInt] = None,
466
+ offset: Optional[StrictInt] = None,
467
+ access_token: Optional[StrictStr] = None,
468
+ body: Optional[Dict[str, Any]] = None,
469
+ _request_timeout: Union[
470
+ None,
471
+ Annotated[StrictFloat, Field(gt=0)],
472
+ Tuple[
473
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
474
+ ],
475
+ ] = None,
476
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
477
+ _content_type: Optional[StrictStr] = None,
478
+ _headers: Optional[Dict[StrictStr, Any]] = None,
479
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
480
+ ) -> RESTResponseType:
481
+ """Get Products
482
+
483
+ Get all products
484
+
485
+ :param limit:
486
+ :type limit: int
487
+ :param offset:
488
+ :type offset: int
489
+ :param access_token:
490
+ :type access_token: str
491
+ :param body:
492
+ :type body: object
493
+ :param _request_timeout: timeout setting for this request. If one
494
+ number provided, it will be total request
495
+ timeout. It can also be a pair (tuple) of
496
+ (connection, read) timeouts.
497
+ :type _request_timeout: int, tuple(int, int), optional
498
+ :param _request_auth: set to override the auth_settings for an a single
499
+ request; this effectively ignores the
500
+ authentication in the spec for a single request.
501
+ :type _request_auth: dict, optional
502
+ :param _content_type: force content-type for the request.
503
+ :type _content_type: str, Optional
504
+ :param _headers: set to override the headers for a single
505
+ request; this effectively ignores the headers
506
+ in the spec for a single request.
507
+ :type _headers: dict, optional
508
+ :param _host_index: set to override the host_index for a single
509
+ request; this effectively ignores the host_index
510
+ in the spec for a single request.
511
+ :type _host_index: int, optional
512
+ :return: Returns the result object.
513
+ """ # noqa: E501
514
+
515
+ _param = self._get_products_serialize(
516
+ limit=limit,
517
+ offset=offset,
518
+ access_token=access_token,
519
+ body=body,
520
+ _request_auth=_request_auth,
521
+ _content_type=_content_type,
522
+ _headers=_headers,
523
+ _host_index=_host_index,
524
+ )
525
+
526
+ _response_types_map: Dict[str, Optional[str]] = {
527
+ "200": "List[ProductModel]",
528
+ "422": "HTTPValidationError",
529
+ }
530
+ response_data = await self.api_client.call_api(
531
+ *_param, _request_timeout=_request_timeout
532
+ )
533
+ return response_data.response
534
+
535
+ def _get_products_serialize(
536
+ self,
537
+ limit,
538
+ offset,
539
+ access_token,
540
+ body,
541
+ _request_auth,
542
+ _content_type,
543
+ _headers,
544
+ _host_index,
545
+ ) -> RequestSerialized:
546
+
547
+ _host = None
548
+
549
+ _collection_formats: Dict[str, str] = {}
550
+
551
+ _path_params: Dict[str, str] = {}
552
+ _query_params: List[Tuple[str, str]] = []
553
+ _header_params: Dict[str, Optional[str]] = _headers or {}
554
+ _form_params: List[Tuple[str, str]] = []
555
+ _files: Dict[
556
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
557
+ ] = {}
558
+ _body_params: Optional[bytes] = None
559
+
560
+ # process the path parameters
561
+ # process the query parameters
562
+ if limit is not None:
563
+
564
+ _query_params.append(("limit", limit))
565
+
566
+ if offset is not None:
567
+
568
+ _query_params.append(("offset", offset))
569
+
570
+ # process the header parameters
571
+ # process the form parameters
572
+ # process the body parameter
573
+ if body is not None:
574
+ _body_params = body
575
+
576
+ # set the HTTP header `Accept`
577
+ if "Accept" not in _header_params:
578
+ _header_params["Accept"] = self.api_client.select_header_accept(
579
+ ["application/json"]
580
+ )
581
+
582
+ # set the HTTP header `Content-Type`
583
+ if _content_type:
584
+ _header_params["Content-Type"] = _content_type
585
+ else:
586
+ _default_content_type = self.api_client.select_header_content_type(
587
+ ["application/json"]
588
+ )
589
+ if _default_content_type is not None:
590
+ _header_params["Content-Type"] = _default_content_type
591
+
592
+ # authentication setting
593
+ _auth_settings: List[str] = ["HTTPBearer"]
594
+
595
+ return self.api_client.param_serialize(
596
+ method="GET",
597
+ resource_path="/products",
598
+ path_params=_path_params,
599
+ query_params=_query_params,
600
+ header_params=_header_params,
601
+ body=_body_params,
602
+ post_params=_form_params,
603
+ files=_files,
604
+ auth_settings=_auth_settings,
605
+ collection_formats=_collection_formats,
606
+ _host=_host,
607
+ _request_auth=_request_auth,
608
+ )
609
+
610
+ @validate_call
611
+ async def update_product(
612
+ self,
613
+ id: StrictStr,
614
+ product_model: ProductModel,
615
+ access_token: Optional[StrictStr] = None,
616
+ _request_timeout: Union[
617
+ None,
618
+ Annotated[StrictFloat, Field(gt=0)],
619
+ Tuple[
620
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
621
+ ],
622
+ ] = None,
623
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
624
+ _content_type: Optional[StrictStr] = None,
625
+ _headers: Optional[Dict[StrictStr, Any]] = None,
626
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
627
+ ) -> object:
628
+ """Update Product
629
+
630
+ Update an existing product
631
+
632
+ :param id: (required)
633
+ :type id: str
634
+ :param product_model: (required)
635
+ :type product_model: ProductModel
636
+ :param access_token:
637
+ :type access_token: str
638
+ :param _request_timeout: timeout setting for this request. If one
639
+ number provided, it will be total request
640
+ timeout. It can also be a pair (tuple) of
641
+ (connection, read) timeouts.
642
+ :type _request_timeout: int, tuple(int, int), optional
643
+ :param _request_auth: set to override the auth_settings for an a single
644
+ request; this effectively ignores the
645
+ authentication in the spec for a single request.
646
+ :type _request_auth: dict, optional
647
+ :param _content_type: force content-type for the request.
648
+ :type _content_type: str, Optional
649
+ :param _headers: set to override the headers for a single
650
+ request; this effectively ignores the headers
651
+ in the spec for a single request.
652
+ :type _headers: dict, optional
653
+ :param _host_index: set to override the host_index for a single
654
+ request; this effectively ignores the host_index
655
+ in the spec for a single request.
656
+ :type _host_index: int, optional
657
+ :return: Returns the result object.
658
+ """ # noqa: E501
659
+
660
+ _param = self._update_product_serialize(
661
+ id=id,
662
+ product_model=product_model,
663
+ access_token=access_token,
664
+ _request_auth=_request_auth,
665
+ _content_type=_content_type,
666
+ _headers=_headers,
667
+ _host_index=_host_index,
668
+ )
669
+
670
+ _response_types_map: Dict[str, Optional[str]] = {
671
+ "200": "object",
672
+ "422": "HTTPValidationError",
673
+ }
674
+ response_data = await self.api_client.call_api(
675
+ *_param, _request_timeout=_request_timeout
676
+ )
677
+ await response_data.read()
678
+ return self.api_client.response_deserialize(
679
+ response_data=response_data,
680
+ response_types_map=_response_types_map,
681
+ ).data
682
+
683
+ @validate_call
684
+ async def update_product_with_http_info(
685
+ self,
686
+ id: StrictStr,
687
+ product_model: ProductModel,
688
+ access_token: Optional[StrictStr] = None,
689
+ _request_timeout: Union[
690
+ None,
691
+ Annotated[StrictFloat, Field(gt=0)],
692
+ Tuple[
693
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
694
+ ],
695
+ ] = None,
696
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
697
+ _content_type: Optional[StrictStr] = None,
698
+ _headers: Optional[Dict[StrictStr, Any]] = None,
699
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
700
+ ) -> ApiResponse[object]:
701
+ """Update Product
702
+
703
+ Update an existing product
704
+
705
+ :param id: (required)
706
+ :type id: str
707
+ :param product_model: (required)
708
+ :type product_model: ProductModel
709
+ :param access_token:
710
+ :type access_token: str
711
+ :param _request_timeout: timeout setting for this request. If one
712
+ number provided, it will be total request
713
+ timeout. It can also be a pair (tuple) of
714
+ (connection, read) timeouts.
715
+ :type _request_timeout: int, tuple(int, int), optional
716
+ :param _request_auth: set to override the auth_settings for an a single
717
+ request; this effectively ignores the
718
+ authentication in the spec for a single request.
719
+ :type _request_auth: dict, optional
720
+ :param _content_type: force content-type for the request.
721
+ :type _content_type: str, Optional
722
+ :param _headers: set to override the headers for a single
723
+ request; this effectively ignores the headers
724
+ in the spec for a single request.
725
+ :type _headers: dict, optional
726
+ :param _host_index: set to override the host_index for a single
727
+ request; this effectively ignores the host_index
728
+ in the spec for a single request.
729
+ :type _host_index: int, optional
730
+ :return: Returns the result object.
731
+ """ # noqa: E501
732
+
733
+ _param = self._update_product_serialize(
734
+ id=id,
735
+ product_model=product_model,
736
+ access_token=access_token,
737
+ _request_auth=_request_auth,
738
+ _content_type=_content_type,
739
+ _headers=_headers,
740
+ _host_index=_host_index,
741
+ )
742
+
743
+ _response_types_map: Dict[str, Optional[str]] = {
744
+ "200": "object",
745
+ "422": "HTTPValidationError",
746
+ }
747
+ response_data = await self.api_client.call_api(
748
+ *_param, _request_timeout=_request_timeout
749
+ )
750
+ await response_data.read()
751
+ return self.api_client.response_deserialize(
752
+ response_data=response_data,
753
+ response_types_map=_response_types_map,
754
+ )
755
+
756
+ @validate_call
757
+ async def update_product_without_preload_content(
758
+ self,
759
+ id: StrictStr,
760
+ product_model: ProductModel,
761
+ access_token: Optional[StrictStr] = None,
762
+ _request_timeout: Union[
763
+ None,
764
+ Annotated[StrictFloat, Field(gt=0)],
765
+ Tuple[
766
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
767
+ ],
768
+ ] = None,
769
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
770
+ _content_type: Optional[StrictStr] = None,
771
+ _headers: Optional[Dict[StrictStr, Any]] = None,
772
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
773
+ ) -> RESTResponseType:
774
+ """Update Product
775
+
776
+ Update an existing product
777
+
778
+ :param id: (required)
779
+ :type id: str
780
+ :param product_model: (required)
781
+ :type product_model: ProductModel
782
+ :param access_token:
783
+ :type access_token: str
784
+ :param _request_timeout: timeout setting for this request. If one
785
+ number provided, it will be total request
786
+ timeout. It can also be a pair (tuple) of
787
+ (connection, read) timeouts.
788
+ :type _request_timeout: int, tuple(int, int), optional
789
+ :param _request_auth: set to override the auth_settings for an a single
790
+ request; this effectively ignores the
791
+ authentication in the spec for a single request.
792
+ :type _request_auth: dict, optional
793
+ :param _content_type: force content-type for the request.
794
+ :type _content_type: str, Optional
795
+ :param _headers: set to override the headers for a single
796
+ request; this effectively ignores the headers
797
+ in the spec for a single request.
798
+ :type _headers: dict, optional
799
+ :param _host_index: set to override the host_index for a single
800
+ request; this effectively ignores the host_index
801
+ in the spec for a single request.
802
+ :type _host_index: int, optional
803
+ :return: Returns the result object.
804
+ """ # noqa: E501
805
+
806
+ _param = self._update_product_serialize(
807
+ id=id,
808
+ product_model=product_model,
809
+ access_token=access_token,
810
+ _request_auth=_request_auth,
811
+ _content_type=_content_type,
812
+ _headers=_headers,
813
+ _host_index=_host_index,
814
+ )
815
+
816
+ _response_types_map: Dict[str, Optional[str]] = {
817
+ "200": "object",
818
+ "422": "HTTPValidationError",
819
+ }
820
+ response_data = await self.api_client.call_api(
821
+ *_param, _request_timeout=_request_timeout
822
+ )
823
+ return response_data.response
824
+
825
+ def _update_product_serialize(
826
+ self,
827
+ id,
828
+ product_model,
829
+ access_token,
830
+ _request_auth,
831
+ _content_type,
832
+ _headers,
833
+ _host_index,
834
+ ) -> RequestSerialized:
835
+
836
+ _host = None
837
+
838
+ _collection_formats: Dict[str, str] = {}
839
+
840
+ _path_params: Dict[str, str] = {}
841
+ _query_params: List[Tuple[str, str]] = []
842
+ _header_params: Dict[str, Optional[str]] = _headers or {}
843
+ _form_params: List[Tuple[str, str]] = []
844
+ _files: Dict[
845
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
846
+ ] = {}
847
+ _body_params: Optional[bytes] = None
848
+
849
+ # process the path parameters
850
+ if id is not None:
851
+ _path_params["id"] = id
852
+ # process the query parameters
853
+ # process the header parameters
854
+ # process the form parameters
855
+ # process the body parameter
856
+ if product_model is not None:
857
+ _body_params = product_model
858
+
859
+ # set the HTTP header `Accept`
860
+ if "Accept" not in _header_params:
861
+ _header_params["Accept"] = self.api_client.select_header_accept(
862
+ ["application/json"]
863
+ )
864
+
865
+ # set the HTTP header `Content-Type`
866
+ if _content_type:
867
+ _header_params["Content-Type"] = _content_type
868
+ else:
869
+ _default_content_type = self.api_client.select_header_content_type(
870
+ ["application/json"]
871
+ )
872
+ if _default_content_type is not None:
873
+ _header_params["Content-Type"] = _default_content_type
874
+
875
+ # authentication setting
876
+ _auth_settings: List[str] = ["HTTPBearer"]
877
+
878
+ return self.api_client.param_serialize(
879
+ method="PUT",
880
+ resource_path="/products/{id}",
881
+ path_params=_path_params,
882
+ query_params=_query_params,
883
+ header_params=_header_params,
884
+ body=_body_params,
885
+ post_params=_form_params,
886
+ files=_files,
887
+ auth_settings=_auth_settings,
888
+ collection_formats=_collection_formats,
889
+ _host=_host,
890
+ _request_auth=_request_auth,
891
+ )