orbuculum-client 0.2.3__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 (130) hide show
  1. orbuculum_client/__init__.py +425 -0
  2. orbuculum_client/api/__init__.py +38 -0
  3. orbuculum_client/api/account_api.py +1534 -0
  4. orbuculum_client/api/account_permissions_api.py +1196 -0
  5. orbuculum_client/api/authentication_api.py +319 -0
  6. orbuculum_client/api/custom_api.py +1468 -0
  7. orbuculum_client/api/entity_api.py +1471 -0
  8. orbuculum_client/api/entity_permissions_api.py +918 -0
  9. orbuculum_client/api/label_api.py +1224 -0
  10. orbuculum_client/api/label_permissions_api.py +938 -0
  11. orbuculum_client/api/limitation_api.py +935 -0
  12. orbuculum_client/api/transaction_api.py +1532 -0
  13. orbuculum_client/api_client.py +804 -0
  14. orbuculum_client/api_response.py +21 -0
  15. orbuculum_client/configuration.py +586 -0
  16. orbuculum_client/exceptions.py +216 -0
  17. orbuculum_client/models/__init__.py +243 -0
  18. orbuculum_client/models/account.py +116 -0
  19. orbuculum_client/models/account_created_response.py +93 -0
  20. orbuculum_client/models/account_created_response_data.py +89 -0
  21. orbuculum_client/models/account_deleted_response.py +93 -0
  22. orbuculum_client/models/account_deleted_response_data.py +91 -0
  23. orbuculum_client/models/account_permission.py +95 -0
  24. orbuculum_client/models/account_updated_response.py +93 -0
  25. orbuculum_client/models/account_updated_response_data.py +89 -0
  26. orbuculum_client/models/activate_account_request.py +87 -0
  27. orbuculum_client/models/activate_entity200_response.py +93 -0
  28. orbuculum_client/models/activate_entity200_response_data.py +91 -0
  29. orbuculum_client/models/activate_entity_request.py +89 -0
  30. orbuculum_client/models/add_commission_request.py +102 -0
  31. orbuculum_client/models/column_info.py +107 -0
  32. orbuculum_client/models/commission_created_response.py +89 -0
  33. orbuculum_client/models/commission_data.py +89 -0
  34. orbuculum_client/models/create_account_permission_request.py +95 -0
  35. orbuculum_client/models/create_account_request.py +154 -0
  36. orbuculum_client/models/create_custom_record_request.py +91 -0
  37. orbuculum_client/models/create_custom_record_response.py +91 -0
  38. orbuculum_client/models/create_entity201_response.py +93 -0
  39. orbuculum_client/models/create_entity201_response_data.py +95 -0
  40. orbuculum_client/models/create_entity_permission_request.py +98 -0
  41. orbuculum_client/models/create_entity_request.py +91 -0
  42. orbuculum_client/models/create_label_permission_request.py +97 -0
  43. orbuculum_client/models/create_label_request.py +93 -0
  44. orbuculum_client/models/create_transaction409_response.py +89 -0
  45. orbuculum_client/models/create_transaction_request.py +165 -0
  46. orbuculum_client/models/custom_records_data_with_pagination.py +93 -0
  47. orbuculum_client/models/custom_table_filter.py +114 -0
  48. orbuculum_client/models/custom_table_filter_group.py +96 -0
  49. orbuculum_client/models/custom_table_filter_value.py +184 -0
  50. orbuculum_client/models/custom_table_filter_value_one_of_inner.py +155 -0
  51. orbuculum_client/models/custom_table_info.py +99 -0
  52. orbuculum_client/models/custom_table_order_by.py +96 -0
  53. orbuculum_client/models/custom_value.py +177 -0
  54. orbuculum_client/models/delete_custom_records_request.py +91 -0
  55. orbuculum_client/models/delete_custom_records_response.py +96 -0
  56. orbuculum_client/models/delete_entity200_response.py +93 -0
  57. orbuculum_client/models/delete_entity200_response_data.py +101 -0
  58. orbuculum_client/models/delete_entity_permission_request.py +93 -0
  59. orbuculum_client/models/delete_entity_request.py +89 -0
  60. orbuculum_client/models/delete_label_permission_request.py +95 -0
  61. orbuculum_client/models/delete_transaction_request.py +89 -0
  62. orbuculum_client/models/edit_account_permission_request.py +95 -0
  63. orbuculum_client/models/entity_permission.py +95 -0
  64. orbuculum_client/models/error_response.py +89 -0
  65. orbuculum_client/models/error_response400.py +89 -0
  66. orbuculum_client/models/error_response401.py +89 -0
  67. orbuculum_client/models/error_response403.py +89 -0
  68. orbuculum_client/models/error_response404.py +89 -0
  69. orbuculum_client/models/error_response405.py +89 -0
  70. orbuculum_client/models/error_response409.py +89 -0
  71. orbuculum_client/models/error_response500.py +89 -0
  72. orbuculum_client/models/get_account_permissions_response.py +93 -0
  73. orbuculum_client/models/get_account_permissions_response_data.py +91 -0
  74. orbuculum_client/models/get_account_permissions_response_data_permissions.py +104 -0
  75. orbuculum_client/models/get_account_response.py +93 -0
  76. orbuculum_client/models/get_account_response_data.py +140 -0
  77. orbuculum_client/models/get_custom_tables_response.py +104 -0
  78. orbuculum_client/models/get_entities200_response.py +93 -0
  79. orbuculum_client/models/get_entities200_response_data.py +140 -0
  80. orbuculum_client/models/get_entities200_response_data_one_of_inner.py +95 -0
  81. orbuculum_client/models/get_entity_permissions_response.py +93 -0
  82. orbuculum_client/models/get_entity_permissions_response_data.py +91 -0
  83. orbuculum_client/models/get_entity_permissions_response_data_permissions.py +113 -0
  84. orbuculum_client/models/get_label_permissions_response.py +93 -0
  85. orbuculum_client/models/get_label_permissions_response_data.py +91 -0
  86. orbuculum_client/models/get_label_permissions_response_data_permissions.py +104 -0
  87. orbuculum_client/models/get_labels_response.py +93 -0
  88. orbuculum_client/models/get_labels_response_data.py +140 -0
  89. orbuculum_client/models/get_limitations_response.py +93 -0
  90. orbuculum_client/models/get_limitations_response_data.py +104 -0
  91. orbuculum_client/models/label.py +95 -0
  92. orbuculum_client/models/label_created_response.py +95 -0
  93. orbuculum_client/models/label_created_response_data.py +93 -0
  94. orbuculum_client/models/label_permission.py +95 -0
  95. orbuculum_client/models/limitation.py +97 -0
  96. orbuculum_client/models/limitation_managed_response.py +96 -0
  97. orbuculum_client/models/login_request.py +89 -0
  98. orbuculum_client/models/login_response.py +93 -0
  99. orbuculum_client/models/login_response_data.py +93 -0
  100. orbuculum_client/models/login_response_data_user.py +96 -0
  101. orbuculum_client/models/manage_account_limitation_request.py +102 -0
  102. orbuculum_client/models/manage_entity_limitation_request.py +102 -0
  103. orbuculum_client/models/pagination_meta.py +93 -0
  104. orbuculum_client/models/permission_created_response.py +91 -0
  105. orbuculum_client/models/read_custom_records_request.py +161 -0
  106. orbuculum_client/models/read_custom_records_response.py +93 -0
  107. orbuculum_client/models/success_response.py +93 -0
  108. orbuculum_client/models/success_response_data.py +87 -0
  109. orbuculum_client/models/transaction.py +201 -0
  110. orbuculum_client/models/transaction_created_data.py +108 -0
  111. orbuculum_client/models/transaction_created_response.py +93 -0
  112. orbuculum_client/models/transaction_list_response.py +97 -0
  113. orbuculum_client/models/update_account_request.py +124 -0
  114. orbuculum_client/models/update_custom_records_request.py +93 -0
  115. orbuculum_client/models/update_custom_records_response.py +91 -0
  116. orbuculum_client/models/update_entity200_response.py +93 -0
  117. orbuculum_client/models/update_entity200_response_data.py +95 -0
  118. orbuculum_client/models/update_entity_request.py +93 -0
  119. orbuculum_client/models/update_label_request.py +97 -0
  120. orbuculum_client/models/update_label_response.py +95 -0
  121. orbuculum_client/models/update_label_response_data.py +93 -0
  122. orbuculum_client/models/update_transaction409_response.py +89 -0
  123. orbuculum_client/models/update_transaction_request.py +159 -0
  124. orbuculum_client/py.typed +0 -0
  125. orbuculum_client/rest.py +258 -0
  126. orbuculum_client-0.2.3.dist-info/METADATA +511 -0
  127. orbuculum_client-0.2.3.dist-info/RECORD +130 -0
  128. orbuculum_client-0.2.3.dist-info/WHEEL +5 -0
  129. orbuculum_client-0.2.3.dist-info/licenses/LICENSE +21 -0
  130. orbuculum_client-0.2.3.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1534 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Orbuculum API
5
+
6
+ Orbuculum API documentation
7
+
8
+ The version of the OpenAPI document: 0.10.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, StrictInt
20
+ from typing import Optional
21
+ from typing_extensions import Annotated
22
+ from orbuculum_client.models.account_created_response import AccountCreatedResponse
23
+ from orbuculum_client.models.account_deleted_response import AccountDeletedResponse
24
+ from orbuculum_client.models.account_updated_response import AccountUpdatedResponse
25
+ from orbuculum_client.models.activate_account_request import ActivateAccountRequest
26
+ from orbuculum_client.models.create_account_request import CreateAccountRequest
27
+ from orbuculum_client.models.get_account_response import GetAccountResponse
28
+ from orbuculum_client.models.success_response import SuccessResponse
29
+ from orbuculum_client.models.update_account_request import UpdateAccountRequest
30
+
31
+ from orbuculum_client.api_client import ApiClient, RequestSerialized
32
+ from orbuculum_client.api_response import ApiResponse
33
+ from orbuculum_client.rest import RESTResponseType
34
+
35
+
36
+ class AccountApi:
37
+ """NOTE: This class is auto generated by OpenAPI Generator
38
+ Ref: https://openapi-generator.tech
39
+
40
+ Do not edit the class manually.
41
+ """
42
+
43
+ def __init__(self, api_client=None) -> None:
44
+ if api_client is None:
45
+ api_client = ApiClient.get_default()
46
+ self.api_client = api_client
47
+
48
+
49
+ @validate_call
50
+ def activate_account(
51
+ self,
52
+ id: Annotated[StrictInt, Field(description="Account ID to activate")],
53
+ activate_account_request: ActivateAccountRequest,
54
+ _request_timeout: Union[
55
+ None,
56
+ Annotated[StrictFloat, Field(gt=0)],
57
+ Tuple[
58
+ Annotated[StrictFloat, Field(gt=0)],
59
+ Annotated[StrictFloat, Field(gt=0)]
60
+ ]
61
+ ] = None,
62
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
63
+ _content_type: Optional[StrictStr] = None,
64
+ _headers: Optional[Dict[StrictStr, Any]] = None,
65
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
66
+ ) -> SuccessResponse:
67
+ """Activate an existing account
68
+
69
+ Activates a previously deactivated account, making it available for transactions
70
+
71
+ :param id: Account ID to activate (required)
72
+ :type id: int
73
+ :param activate_account_request: (required)
74
+ :type activate_account_request: ActivateAccountRequest
75
+ :param _request_timeout: timeout setting for this request. If one
76
+ number provided, it will be total request
77
+ timeout. It can also be a pair (tuple) of
78
+ (connection, read) timeouts.
79
+ :type _request_timeout: int, tuple(int, int), optional
80
+ :param _request_auth: set to override the auth_settings for an a single
81
+ request; this effectively ignores the
82
+ authentication in the spec for a single request.
83
+ :type _request_auth: dict, optional
84
+ :param _content_type: force content-type for the request.
85
+ :type _content_type: str, Optional
86
+ :param _headers: set to override the headers for a single
87
+ request; this effectively ignores the headers
88
+ in the spec for a single request.
89
+ :type _headers: dict, optional
90
+ :param _host_index: set to override the host_index for a single
91
+ request; this effectively ignores the host_index
92
+ in the spec for a single request.
93
+ :type _host_index: int, optional
94
+ :return: Returns the result object.
95
+ """ # noqa: E501
96
+
97
+ _param = self._activate_account_serialize(
98
+ id=id,
99
+ activate_account_request=activate_account_request,
100
+ _request_auth=_request_auth,
101
+ _content_type=_content_type,
102
+ _headers=_headers,
103
+ _host_index=_host_index
104
+ )
105
+
106
+ _response_types_map: Dict[str, Optional[str]] = {
107
+ '200': "SuccessResponse",
108
+ '400': "ErrorResponse400",
109
+ '401': "ErrorResponse401",
110
+ '404': "ErrorResponse404",
111
+ '500': "ErrorResponse500",
112
+ }
113
+ response_data = self.api_client.call_api(
114
+ *_param,
115
+ _request_timeout=_request_timeout
116
+ )
117
+ response_data.read()
118
+ return self.api_client.response_deserialize(
119
+ response_data=response_data,
120
+ response_types_map=_response_types_map,
121
+ ).data
122
+
123
+
124
+ @validate_call
125
+ def activate_account_with_http_info(
126
+ self,
127
+ id: Annotated[StrictInt, Field(description="Account ID to activate")],
128
+ activate_account_request: ActivateAccountRequest,
129
+ _request_timeout: Union[
130
+ None,
131
+ Annotated[StrictFloat, Field(gt=0)],
132
+ Tuple[
133
+ Annotated[StrictFloat, Field(gt=0)],
134
+ Annotated[StrictFloat, Field(gt=0)]
135
+ ]
136
+ ] = None,
137
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
138
+ _content_type: Optional[StrictStr] = None,
139
+ _headers: Optional[Dict[StrictStr, Any]] = None,
140
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
141
+ ) -> ApiResponse[SuccessResponse]:
142
+ """Activate an existing account
143
+
144
+ Activates a previously deactivated account, making it available for transactions
145
+
146
+ :param id: Account ID to activate (required)
147
+ :type id: int
148
+ :param activate_account_request: (required)
149
+ :type activate_account_request: ActivateAccountRequest
150
+ :param _request_timeout: timeout setting for this request. If one
151
+ number provided, it will be total request
152
+ timeout. It can also be a pair (tuple) of
153
+ (connection, read) timeouts.
154
+ :type _request_timeout: int, tuple(int, int), optional
155
+ :param _request_auth: set to override the auth_settings for an a single
156
+ request; this effectively ignores the
157
+ authentication in the spec for a single request.
158
+ :type _request_auth: dict, optional
159
+ :param _content_type: force content-type for the request.
160
+ :type _content_type: str, Optional
161
+ :param _headers: set to override the headers for a single
162
+ request; this effectively ignores the headers
163
+ in the spec for a single request.
164
+ :type _headers: dict, optional
165
+ :param _host_index: set to override the host_index for a single
166
+ request; this effectively ignores the host_index
167
+ in the spec for a single request.
168
+ :type _host_index: int, optional
169
+ :return: Returns the result object.
170
+ """ # noqa: E501
171
+
172
+ _param = self._activate_account_serialize(
173
+ id=id,
174
+ activate_account_request=activate_account_request,
175
+ _request_auth=_request_auth,
176
+ _content_type=_content_type,
177
+ _headers=_headers,
178
+ _host_index=_host_index
179
+ )
180
+
181
+ _response_types_map: Dict[str, Optional[str]] = {
182
+ '200': "SuccessResponse",
183
+ '400': "ErrorResponse400",
184
+ '401': "ErrorResponse401",
185
+ '404': "ErrorResponse404",
186
+ '500': "ErrorResponse500",
187
+ }
188
+ response_data = self.api_client.call_api(
189
+ *_param,
190
+ _request_timeout=_request_timeout
191
+ )
192
+ response_data.read()
193
+ return self.api_client.response_deserialize(
194
+ response_data=response_data,
195
+ response_types_map=_response_types_map,
196
+ )
197
+
198
+
199
+ @validate_call
200
+ def activate_account_without_preload_content(
201
+ self,
202
+ id: Annotated[StrictInt, Field(description="Account ID to activate")],
203
+ activate_account_request: ActivateAccountRequest,
204
+ _request_timeout: Union[
205
+ None,
206
+ Annotated[StrictFloat, Field(gt=0)],
207
+ Tuple[
208
+ Annotated[StrictFloat, Field(gt=0)],
209
+ Annotated[StrictFloat, Field(gt=0)]
210
+ ]
211
+ ] = None,
212
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
213
+ _content_type: Optional[StrictStr] = None,
214
+ _headers: Optional[Dict[StrictStr, Any]] = None,
215
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
216
+ ) -> RESTResponseType:
217
+ """Activate an existing account
218
+
219
+ Activates a previously deactivated account, making it available for transactions
220
+
221
+ :param id: Account ID to activate (required)
222
+ :type id: int
223
+ :param activate_account_request: (required)
224
+ :type activate_account_request: ActivateAccountRequest
225
+ :param _request_timeout: timeout setting for this request. If one
226
+ number provided, it will be total request
227
+ timeout. It can also be a pair (tuple) of
228
+ (connection, read) timeouts.
229
+ :type _request_timeout: int, tuple(int, int), optional
230
+ :param _request_auth: set to override the auth_settings for an a single
231
+ request; this effectively ignores the
232
+ authentication in the spec for a single request.
233
+ :type _request_auth: dict, optional
234
+ :param _content_type: force content-type for the request.
235
+ :type _content_type: str, Optional
236
+ :param _headers: set to override the headers for a single
237
+ request; this effectively ignores the headers
238
+ in the spec for a single request.
239
+ :type _headers: dict, optional
240
+ :param _host_index: set to override the host_index for a single
241
+ request; this effectively ignores the host_index
242
+ in the spec for a single request.
243
+ :type _host_index: int, optional
244
+ :return: Returns the result object.
245
+ """ # noqa: E501
246
+
247
+ _param = self._activate_account_serialize(
248
+ id=id,
249
+ activate_account_request=activate_account_request,
250
+ _request_auth=_request_auth,
251
+ _content_type=_content_type,
252
+ _headers=_headers,
253
+ _host_index=_host_index
254
+ )
255
+
256
+ _response_types_map: Dict[str, Optional[str]] = {
257
+ '200': "SuccessResponse",
258
+ '400': "ErrorResponse400",
259
+ '401': "ErrorResponse401",
260
+ '404': "ErrorResponse404",
261
+ '500': "ErrorResponse500",
262
+ }
263
+ response_data = self.api_client.call_api(
264
+ *_param,
265
+ _request_timeout=_request_timeout
266
+ )
267
+ return response_data.response
268
+
269
+
270
+ def _activate_account_serialize(
271
+ self,
272
+ id,
273
+ activate_account_request,
274
+ _request_auth,
275
+ _content_type,
276
+ _headers,
277
+ _host_index,
278
+ ) -> RequestSerialized:
279
+
280
+ _host = None
281
+
282
+ _collection_formats: Dict[str, str] = {
283
+ }
284
+
285
+ _path_params: Dict[str, str] = {}
286
+ _query_params: List[Tuple[str, str]] = []
287
+ _header_params: Dict[str, Optional[str]] = _headers or {}
288
+ _form_params: List[Tuple[str, str]] = []
289
+ _files: Dict[
290
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
291
+ ] = {}
292
+ _body_params: Optional[bytes] = None
293
+
294
+ # process the path parameters
295
+ # process the query parameters
296
+ if id is not None:
297
+
298
+ _query_params.append(('id', id))
299
+
300
+ # process the header parameters
301
+ # process the form parameters
302
+ # process the body parameter
303
+ if activate_account_request is not None:
304
+ _body_params = activate_account_request
305
+
306
+
307
+ # set the HTTP header `Accept`
308
+ if 'Accept' not in _header_params:
309
+ _header_params['Accept'] = self.api_client.select_header_accept(
310
+ [
311
+ 'application/json'
312
+ ]
313
+ )
314
+
315
+ # set the HTTP header `Content-Type`
316
+ if _content_type:
317
+ _header_params['Content-Type'] = _content_type
318
+ else:
319
+ _default_content_type = (
320
+ self.api_client.select_header_content_type(
321
+ [
322
+ 'application/json'
323
+ ]
324
+ )
325
+ )
326
+ if _default_content_type is not None:
327
+ _header_params['Content-Type'] = _default_content_type
328
+
329
+ # authentication setting
330
+ _auth_settings: List[str] = [
331
+ 'bearerAuth'
332
+ ]
333
+
334
+ return self.api_client.param_serialize(
335
+ method='POST',
336
+ resource_path='/api/account/activate',
337
+ path_params=_path_params,
338
+ query_params=_query_params,
339
+ header_params=_header_params,
340
+ body=_body_params,
341
+ post_params=_form_params,
342
+ files=_files,
343
+ auth_settings=_auth_settings,
344
+ collection_formats=_collection_formats,
345
+ _host=_host,
346
+ _request_auth=_request_auth
347
+ )
348
+
349
+
350
+
351
+
352
+ @validate_call
353
+ def create_account(
354
+ self,
355
+ create_account_request: CreateAccountRequest,
356
+ _request_timeout: Union[
357
+ None,
358
+ Annotated[StrictFloat, Field(gt=0)],
359
+ Tuple[
360
+ Annotated[StrictFloat, Field(gt=0)],
361
+ Annotated[StrictFloat, Field(gt=0)]
362
+ ]
363
+ ] = None,
364
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
365
+ _content_type: Optional[StrictStr] = None,
366
+ _headers: Optional[Dict[StrictStr, Any]] = None,
367
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
368
+ ) -> AccountCreatedResponse:
369
+ """Create a new account
370
+
371
+ Creates a new account for a specific project and entity with optional currency and commission settings
372
+
373
+ :param create_account_request: (required)
374
+ :type create_account_request: CreateAccountRequest
375
+ :param _request_timeout: timeout setting for this request. If one
376
+ number provided, it will be total request
377
+ timeout. It can also be a pair (tuple) of
378
+ (connection, read) timeouts.
379
+ :type _request_timeout: int, tuple(int, int), optional
380
+ :param _request_auth: set to override the auth_settings for an a single
381
+ request; this effectively ignores the
382
+ authentication in the spec for a single request.
383
+ :type _request_auth: dict, optional
384
+ :param _content_type: force content-type for the request.
385
+ :type _content_type: str, Optional
386
+ :param _headers: set to override the headers for a single
387
+ request; this effectively ignores the headers
388
+ in the spec for a single request.
389
+ :type _headers: dict, optional
390
+ :param _host_index: set to override the host_index for a single
391
+ request; this effectively ignores the host_index
392
+ in the spec for a single request.
393
+ :type _host_index: int, optional
394
+ :return: Returns the result object.
395
+ """ # noqa: E501
396
+
397
+ _param = self._create_account_serialize(
398
+ create_account_request=create_account_request,
399
+ _request_auth=_request_auth,
400
+ _content_type=_content_type,
401
+ _headers=_headers,
402
+ _host_index=_host_index
403
+ )
404
+
405
+ _response_types_map: Dict[str, Optional[str]] = {
406
+ '201': "AccountCreatedResponse",
407
+ '400': "ErrorResponse400",
408
+ '401': "ErrorResponse401",
409
+ '403': "ErrorResponse403",
410
+ '405': "ErrorResponse405",
411
+ '500': "ErrorResponse500",
412
+ }
413
+ response_data = self.api_client.call_api(
414
+ *_param,
415
+ _request_timeout=_request_timeout
416
+ )
417
+ response_data.read()
418
+ return self.api_client.response_deserialize(
419
+ response_data=response_data,
420
+ response_types_map=_response_types_map,
421
+ ).data
422
+
423
+
424
+ @validate_call
425
+ def create_account_with_http_info(
426
+ self,
427
+ create_account_request: CreateAccountRequest,
428
+ _request_timeout: Union[
429
+ None,
430
+ Annotated[StrictFloat, Field(gt=0)],
431
+ Tuple[
432
+ Annotated[StrictFloat, Field(gt=0)],
433
+ Annotated[StrictFloat, Field(gt=0)]
434
+ ]
435
+ ] = None,
436
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
437
+ _content_type: Optional[StrictStr] = None,
438
+ _headers: Optional[Dict[StrictStr, Any]] = None,
439
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
440
+ ) -> ApiResponse[AccountCreatedResponse]:
441
+ """Create a new account
442
+
443
+ Creates a new account for a specific project and entity with optional currency and commission settings
444
+
445
+ :param create_account_request: (required)
446
+ :type create_account_request: CreateAccountRequest
447
+ :param _request_timeout: timeout setting for this request. If one
448
+ number provided, it will be total request
449
+ timeout. It can also be a pair (tuple) of
450
+ (connection, read) timeouts.
451
+ :type _request_timeout: int, tuple(int, int), optional
452
+ :param _request_auth: set to override the auth_settings for an a single
453
+ request; this effectively ignores the
454
+ authentication in the spec for a single request.
455
+ :type _request_auth: dict, optional
456
+ :param _content_type: force content-type for the request.
457
+ :type _content_type: str, Optional
458
+ :param _headers: set to override the headers for a single
459
+ request; this effectively ignores the headers
460
+ in the spec for a single request.
461
+ :type _headers: dict, optional
462
+ :param _host_index: set to override the host_index for a single
463
+ request; this effectively ignores the host_index
464
+ in the spec for a single request.
465
+ :type _host_index: int, optional
466
+ :return: Returns the result object.
467
+ """ # noqa: E501
468
+
469
+ _param = self._create_account_serialize(
470
+ create_account_request=create_account_request,
471
+ _request_auth=_request_auth,
472
+ _content_type=_content_type,
473
+ _headers=_headers,
474
+ _host_index=_host_index
475
+ )
476
+
477
+ _response_types_map: Dict[str, Optional[str]] = {
478
+ '201': "AccountCreatedResponse",
479
+ '400': "ErrorResponse400",
480
+ '401': "ErrorResponse401",
481
+ '403': "ErrorResponse403",
482
+ '405': "ErrorResponse405",
483
+ '500': "ErrorResponse500",
484
+ }
485
+ response_data = self.api_client.call_api(
486
+ *_param,
487
+ _request_timeout=_request_timeout
488
+ )
489
+ response_data.read()
490
+ return self.api_client.response_deserialize(
491
+ response_data=response_data,
492
+ response_types_map=_response_types_map,
493
+ )
494
+
495
+
496
+ @validate_call
497
+ def create_account_without_preload_content(
498
+ self,
499
+ create_account_request: CreateAccountRequest,
500
+ _request_timeout: Union[
501
+ None,
502
+ Annotated[StrictFloat, Field(gt=0)],
503
+ Tuple[
504
+ Annotated[StrictFloat, Field(gt=0)],
505
+ Annotated[StrictFloat, Field(gt=0)]
506
+ ]
507
+ ] = None,
508
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
509
+ _content_type: Optional[StrictStr] = None,
510
+ _headers: Optional[Dict[StrictStr, Any]] = None,
511
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
512
+ ) -> RESTResponseType:
513
+ """Create a new account
514
+
515
+ Creates a new account for a specific project and entity with optional currency and commission settings
516
+
517
+ :param create_account_request: (required)
518
+ :type create_account_request: CreateAccountRequest
519
+ :param _request_timeout: timeout setting for this request. If one
520
+ number provided, it will be total request
521
+ timeout. It can also be a pair (tuple) of
522
+ (connection, read) timeouts.
523
+ :type _request_timeout: int, tuple(int, int), optional
524
+ :param _request_auth: set to override the auth_settings for an a single
525
+ request; this effectively ignores the
526
+ authentication in the spec for a single request.
527
+ :type _request_auth: dict, optional
528
+ :param _content_type: force content-type for the request.
529
+ :type _content_type: str, Optional
530
+ :param _headers: set to override the headers for a single
531
+ request; this effectively ignores the headers
532
+ in the spec for a single request.
533
+ :type _headers: dict, optional
534
+ :param _host_index: set to override the host_index for a single
535
+ request; this effectively ignores the host_index
536
+ in the spec for a single request.
537
+ :type _host_index: int, optional
538
+ :return: Returns the result object.
539
+ """ # noqa: E501
540
+
541
+ _param = self._create_account_serialize(
542
+ create_account_request=create_account_request,
543
+ _request_auth=_request_auth,
544
+ _content_type=_content_type,
545
+ _headers=_headers,
546
+ _host_index=_host_index
547
+ )
548
+
549
+ _response_types_map: Dict[str, Optional[str]] = {
550
+ '201': "AccountCreatedResponse",
551
+ '400': "ErrorResponse400",
552
+ '401': "ErrorResponse401",
553
+ '403': "ErrorResponse403",
554
+ '405': "ErrorResponse405",
555
+ '500': "ErrorResponse500",
556
+ }
557
+ response_data = self.api_client.call_api(
558
+ *_param,
559
+ _request_timeout=_request_timeout
560
+ )
561
+ return response_data.response
562
+
563
+
564
+ def _create_account_serialize(
565
+ self,
566
+ create_account_request,
567
+ _request_auth,
568
+ _content_type,
569
+ _headers,
570
+ _host_index,
571
+ ) -> RequestSerialized:
572
+
573
+ _host = None
574
+
575
+ _collection_formats: Dict[str, str] = {
576
+ }
577
+
578
+ _path_params: Dict[str, str] = {}
579
+ _query_params: List[Tuple[str, str]] = []
580
+ _header_params: Dict[str, Optional[str]] = _headers or {}
581
+ _form_params: List[Tuple[str, str]] = []
582
+ _files: Dict[
583
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
584
+ ] = {}
585
+ _body_params: Optional[bytes] = None
586
+
587
+ # process the path parameters
588
+ # process the query parameters
589
+ # process the header parameters
590
+ # process the form parameters
591
+ # process the body parameter
592
+ if create_account_request is not None:
593
+ _body_params = create_account_request
594
+
595
+
596
+ # set the HTTP header `Accept`
597
+ if 'Accept' not in _header_params:
598
+ _header_params['Accept'] = self.api_client.select_header_accept(
599
+ [
600
+ 'application/json'
601
+ ]
602
+ )
603
+
604
+ # set the HTTP header `Content-Type`
605
+ if _content_type:
606
+ _header_params['Content-Type'] = _content_type
607
+ else:
608
+ _default_content_type = (
609
+ self.api_client.select_header_content_type(
610
+ [
611
+ 'application/json'
612
+ ]
613
+ )
614
+ )
615
+ if _default_content_type is not None:
616
+ _header_params['Content-Type'] = _default_content_type
617
+
618
+ # authentication setting
619
+ _auth_settings: List[str] = [
620
+ 'bearerAuth'
621
+ ]
622
+
623
+ return self.api_client.param_serialize(
624
+ method='POST',
625
+ resource_path='/api/account/create',
626
+ path_params=_path_params,
627
+ query_params=_query_params,
628
+ header_params=_header_params,
629
+ body=_body_params,
630
+ post_params=_form_params,
631
+ files=_files,
632
+ auth_settings=_auth_settings,
633
+ collection_formats=_collection_formats,
634
+ _host=_host,
635
+ _request_auth=_request_auth
636
+ )
637
+
638
+
639
+
640
+
641
+ @validate_call
642
+ def delete_account(
643
+ self,
644
+ workspace_id: Annotated[StrictInt, Field(description="Workspace ID")],
645
+ id: Annotated[StrictInt, Field(description="Account ID to delete")],
646
+ _request_timeout: Union[
647
+ None,
648
+ Annotated[StrictFloat, Field(gt=0)],
649
+ Tuple[
650
+ Annotated[StrictFloat, Field(gt=0)],
651
+ Annotated[StrictFloat, Field(gt=0)]
652
+ ]
653
+ ] = None,
654
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
655
+ _content_type: Optional[StrictStr] = None,
656
+ _headers: Optional[Dict[StrictStr, Any]] = None,
657
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
658
+ ) -> AccountDeletedResponse:
659
+ """Delete an existing account
660
+
661
+ Deletes an existing account from the system. This action cannot be undone.
662
+
663
+ :param workspace_id: Workspace ID (required)
664
+ :type workspace_id: int
665
+ :param id: Account ID to delete (required)
666
+ :type id: int
667
+ :param _request_timeout: timeout setting for this request. If one
668
+ number provided, it will be total request
669
+ timeout. It can also be a pair (tuple) of
670
+ (connection, read) timeouts.
671
+ :type _request_timeout: int, tuple(int, int), optional
672
+ :param _request_auth: set to override the auth_settings for an a single
673
+ request; this effectively ignores the
674
+ authentication in the spec for a single request.
675
+ :type _request_auth: dict, optional
676
+ :param _content_type: force content-type for the request.
677
+ :type _content_type: str, Optional
678
+ :param _headers: set to override the headers for a single
679
+ request; this effectively ignores the headers
680
+ in the spec for a single request.
681
+ :type _headers: dict, optional
682
+ :param _host_index: set to override the host_index for a single
683
+ request; this effectively ignores the host_index
684
+ in the spec for a single request.
685
+ :type _host_index: int, optional
686
+ :return: Returns the result object.
687
+ """ # noqa: E501
688
+
689
+ _param = self._delete_account_serialize(
690
+ workspace_id=workspace_id,
691
+ id=id,
692
+ _request_auth=_request_auth,
693
+ _content_type=_content_type,
694
+ _headers=_headers,
695
+ _host_index=_host_index
696
+ )
697
+
698
+ _response_types_map: Dict[str, Optional[str]] = {
699
+ '200': "AccountDeletedResponse",
700
+ '400': "ErrorResponse400",
701
+ '401': "ErrorResponse401",
702
+ '404': "ErrorResponse404",
703
+ '500': "ErrorResponse500",
704
+ }
705
+ response_data = self.api_client.call_api(
706
+ *_param,
707
+ _request_timeout=_request_timeout
708
+ )
709
+ response_data.read()
710
+ return self.api_client.response_deserialize(
711
+ response_data=response_data,
712
+ response_types_map=_response_types_map,
713
+ ).data
714
+
715
+
716
+ @validate_call
717
+ def delete_account_with_http_info(
718
+ self,
719
+ workspace_id: Annotated[StrictInt, Field(description="Workspace ID")],
720
+ id: Annotated[StrictInt, Field(description="Account ID to delete")],
721
+ _request_timeout: Union[
722
+ None,
723
+ Annotated[StrictFloat, Field(gt=0)],
724
+ Tuple[
725
+ Annotated[StrictFloat, Field(gt=0)],
726
+ Annotated[StrictFloat, Field(gt=0)]
727
+ ]
728
+ ] = None,
729
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
730
+ _content_type: Optional[StrictStr] = None,
731
+ _headers: Optional[Dict[StrictStr, Any]] = None,
732
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
733
+ ) -> ApiResponse[AccountDeletedResponse]:
734
+ """Delete an existing account
735
+
736
+ Deletes an existing account from the system. This action cannot be undone.
737
+
738
+ :param workspace_id: Workspace ID (required)
739
+ :type workspace_id: int
740
+ :param id: Account ID to delete (required)
741
+ :type id: int
742
+ :param _request_timeout: timeout setting for this request. If one
743
+ number provided, it will be total request
744
+ timeout. It can also be a pair (tuple) of
745
+ (connection, read) timeouts.
746
+ :type _request_timeout: int, tuple(int, int), optional
747
+ :param _request_auth: set to override the auth_settings for an a single
748
+ request; this effectively ignores the
749
+ authentication in the spec for a single request.
750
+ :type _request_auth: dict, optional
751
+ :param _content_type: force content-type for the request.
752
+ :type _content_type: str, Optional
753
+ :param _headers: set to override the headers for a single
754
+ request; this effectively ignores the headers
755
+ in the spec for a single request.
756
+ :type _headers: dict, optional
757
+ :param _host_index: set to override the host_index for a single
758
+ request; this effectively ignores the host_index
759
+ in the spec for a single request.
760
+ :type _host_index: int, optional
761
+ :return: Returns the result object.
762
+ """ # noqa: E501
763
+
764
+ _param = self._delete_account_serialize(
765
+ workspace_id=workspace_id,
766
+ id=id,
767
+ _request_auth=_request_auth,
768
+ _content_type=_content_type,
769
+ _headers=_headers,
770
+ _host_index=_host_index
771
+ )
772
+
773
+ _response_types_map: Dict[str, Optional[str]] = {
774
+ '200': "AccountDeletedResponse",
775
+ '400': "ErrorResponse400",
776
+ '401': "ErrorResponse401",
777
+ '404': "ErrorResponse404",
778
+ '500': "ErrorResponse500",
779
+ }
780
+ response_data = self.api_client.call_api(
781
+ *_param,
782
+ _request_timeout=_request_timeout
783
+ )
784
+ response_data.read()
785
+ return self.api_client.response_deserialize(
786
+ response_data=response_data,
787
+ response_types_map=_response_types_map,
788
+ )
789
+
790
+
791
+ @validate_call
792
+ def delete_account_without_preload_content(
793
+ self,
794
+ workspace_id: Annotated[StrictInt, Field(description="Workspace ID")],
795
+ id: Annotated[StrictInt, Field(description="Account ID to delete")],
796
+ _request_timeout: Union[
797
+ None,
798
+ Annotated[StrictFloat, Field(gt=0)],
799
+ Tuple[
800
+ Annotated[StrictFloat, Field(gt=0)],
801
+ Annotated[StrictFloat, Field(gt=0)]
802
+ ]
803
+ ] = None,
804
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
805
+ _content_type: Optional[StrictStr] = None,
806
+ _headers: Optional[Dict[StrictStr, Any]] = None,
807
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
808
+ ) -> RESTResponseType:
809
+ """Delete an existing account
810
+
811
+ Deletes an existing account from the system. This action cannot be undone.
812
+
813
+ :param workspace_id: Workspace ID (required)
814
+ :type workspace_id: int
815
+ :param id: Account ID to delete (required)
816
+ :type id: int
817
+ :param _request_timeout: timeout setting for this request. If one
818
+ number provided, it will be total request
819
+ timeout. It can also be a pair (tuple) of
820
+ (connection, read) timeouts.
821
+ :type _request_timeout: int, tuple(int, int), optional
822
+ :param _request_auth: set to override the auth_settings for an a single
823
+ request; this effectively ignores the
824
+ authentication in the spec for a single request.
825
+ :type _request_auth: dict, optional
826
+ :param _content_type: force content-type for the request.
827
+ :type _content_type: str, Optional
828
+ :param _headers: set to override the headers for a single
829
+ request; this effectively ignores the headers
830
+ in the spec for a single request.
831
+ :type _headers: dict, optional
832
+ :param _host_index: set to override the host_index for a single
833
+ request; this effectively ignores the host_index
834
+ in the spec for a single request.
835
+ :type _host_index: int, optional
836
+ :return: Returns the result object.
837
+ """ # noqa: E501
838
+
839
+ _param = self._delete_account_serialize(
840
+ workspace_id=workspace_id,
841
+ id=id,
842
+ _request_auth=_request_auth,
843
+ _content_type=_content_type,
844
+ _headers=_headers,
845
+ _host_index=_host_index
846
+ )
847
+
848
+ _response_types_map: Dict[str, Optional[str]] = {
849
+ '200': "AccountDeletedResponse",
850
+ '400': "ErrorResponse400",
851
+ '401': "ErrorResponse401",
852
+ '404': "ErrorResponse404",
853
+ '500': "ErrorResponse500",
854
+ }
855
+ response_data = self.api_client.call_api(
856
+ *_param,
857
+ _request_timeout=_request_timeout
858
+ )
859
+ return response_data.response
860
+
861
+
862
+ def _delete_account_serialize(
863
+ self,
864
+ workspace_id,
865
+ id,
866
+ _request_auth,
867
+ _content_type,
868
+ _headers,
869
+ _host_index,
870
+ ) -> RequestSerialized:
871
+
872
+ _host = None
873
+
874
+ _collection_formats: Dict[str, str] = {
875
+ }
876
+
877
+ _path_params: Dict[str, str] = {}
878
+ _query_params: List[Tuple[str, str]] = []
879
+ _header_params: Dict[str, Optional[str]] = _headers or {}
880
+ _form_params: List[Tuple[str, str]] = []
881
+ _files: Dict[
882
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
883
+ ] = {}
884
+ _body_params: Optional[bytes] = None
885
+
886
+ # process the path parameters
887
+ # process the query parameters
888
+ if workspace_id is not None:
889
+
890
+ _query_params.append(('workspace_id', workspace_id))
891
+
892
+ if id is not None:
893
+
894
+ _query_params.append(('id', id))
895
+
896
+ # process the header parameters
897
+ # process the form parameters
898
+ # process the body parameter
899
+
900
+
901
+ # set the HTTP header `Accept`
902
+ if 'Accept' not in _header_params:
903
+ _header_params['Accept'] = self.api_client.select_header_accept(
904
+ [
905
+ 'application/json'
906
+ ]
907
+ )
908
+
909
+
910
+ # authentication setting
911
+ _auth_settings: List[str] = [
912
+ 'bearerAuth'
913
+ ]
914
+
915
+ return self.api_client.param_serialize(
916
+ method='DELETE',
917
+ resource_path='/api/account/delete',
918
+ path_params=_path_params,
919
+ query_params=_query_params,
920
+ header_params=_header_params,
921
+ body=_body_params,
922
+ post_params=_form_params,
923
+ files=_files,
924
+ auth_settings=_auth_settings,
925
+ collection_formats=_collection_formats,
926
+ _host=_host,
927
+ _request_auth=_request_auth
928
+ )
929
+
930
+
931
+
932
+
933
+ @validate_call
934
+ def get_account(
935
+ self,
936
+ workspace_id: Annotated[StrictInt, Field(description="Workspace ID")],
937
+ id: Annotated[Optional[StrictInt], Field(description="Account ID (optional, to get specific account)")] = None,
938
+ entity_id: Annotated[Optional[StrictInt], Field(description="Entity ID (optional, to get all accounts for specific entity)")] = None,
939
+ _request_timeout: Union[
940
+ None,
941
+ Annotated[StrictFloat, Field(gt=0)],
942
+ Tuple[
943
+ Annotated[StrictFloat, Field(gt=0)],
944
+ Annotated[StrictFloat, Field(gt=0)]
945
+ ]
946
+ ] = None,
947
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
948
+ _content_type: Optional[StrictStr] = None,
949
+ _headers: Optional[Dict[StrictStr, Any]] = None,
950
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
951
+ ) -> GetAccountResponse:
952
+ """Get account details
953
+
954
+ Retrieves details of a specific account by workspace ID and account ID. Requires JWT authentication.
955
+
956
+ :param workspace_id: Workspace ID (required)
957
+ :type workspace_id: int
958
+ :param id: Account ID (optional, to get specific account)
959
+ :type id: int
960
+ :param entity_id: Entity ID (optional, to get all accounts for specific entity)
961
+ :type entity_id: int
962
+ :param _request_timeout: timeout setting for this request. If one
963
+ number provided, it will be total request
964
+ timeout. It can also be a pair (tuple) of
965
+ (connection, read) timeouts.
966
+ :type _request_timeout: int, tuple(int, int), optional
967
+ :param _request_auth: set to override the auth_settings for an a single
968
+ request; this effectively ignores the
969
+ authentication in the spec for a single request.
970
+ :type _request_auth: dict, optional
971
+ :param _content_type: force content-type for the request.
972
+ :type _content_type: str, Optional
973
+ :param _headers: set to override the headers for a single
974
+ request; this effectively ignores the headers
975
+ in the spec for a single request.
976
+ :type _headers: dict, optional
977
+ :param _host_index: set to override the host_index for a single
978
+ request; this effectively ignores the host_index
979
+ in the spec for a single request.
980
+ :type _host_index: int, optional
981
+ :return: Returns the result object.
982
+ """ # noqa: E501
983
+
984
+ _param = self._get_account_serialize(
985
+ workspace_id=workspace_id,
986
+ id=id,
987
+ entity_id=entity_id,
988
+ _request_auth=_request_auth,
989
+ _content_type=_content_type,
990
+ _headers=_headers,
991
+ _host_index=_host_index
992
+ )
993
+
994
+ _response_types_map: Dict[str, Optional[str]] = {
995
+ '200': "GetAccountResponse",
996
+ '400': "ErrorResponse400",
997
+ '401': "ErrorResponse401",
998
+ '403': "ErrorResponse403",
999
+ '404': "ErrorResponse404",
1000
+ '500': "ErrorResponse500",
1001
+ }
1002
+ response_data = self.api_client.call_api(
1003
+ *_param,
1004
+ _request_timeout=_request_timeout
1005
+ )
1006
+ response_data.read()
1007
+ return self.api_client.response_deserialize(
1008
+ response_data=response_data,
1009
+ response_types_map=_response_types_map,
1010
+ ).data
1011
+
1012
+
1013
+ @validate_call
1014
+ def get_account_with_http_info(
1015
+ self,
1016
+ workspace_id: Annotated[StrictInt, Field(description="Workspace ID")],
1017
+ id: Annotated[Optional[StrictInt], Field(description="Account ID (optional, to get specific account)")] = None,
1018
+ entity_id: Annotated[Optional[StrictInt], Field(description="Entity ID (optional, to get all accounts for specific entity)")] = None,
1019
+ _request_timeout: Union[
1020
+ None,
1021
+ Annotated[StrictFloat, Field(gt=0)],
1022
+ Tuple[
1023
+ Annotated[StrictFloat, Field(gt=0)],
1024
+ Annotated[StrictFloat, Field(gt=0)]
1025
+ ]
1026
+ ] = None,
1027
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1028
+ _content_type: Optional[StrictStr] = None,
1029
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1030
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1031
+ ) -> ApiResponse[GetAccountResponse]:
1032
+ """Get account details
1033
+
1034
+ Retrieves details of a specific account by workspace ID and account ID. Requires JWT authentication.
1035
+
1036
+ :param workspace_id: Workspace ID (required)
1037
+ :type workspace_id: int
1038
+ :param id: Account ID (optional, to get specific account)
1039
+ :type id: int
1040
+ :param entity_id: Entity ID (optional, to get all accounts for specific entity)
1041
+ :type entity_id: int
1042
+ :param _request_timeout: timeout setting for this request. If one
1043
+ number provided, it will be total request
1044
+ timeout. It can also be a pair (tuple) of
1045
+ (connection, read) timeouts.
1046
+ :type _request_timeout: int, tuple(int, int), optional
1047
+ :param _request_auth: set to override the auth_settings for an a single
1048
+ request; this effectively ignores the
1049
+ authentication in the spec for a single request.
1050
+ :type _request_auth: dict, optional
1051
+ :param _content_type: force content-type for the request.
1052
+ :type _content_type: str, Optional
1053
+ :param _headers: set to override the headers for a single
1054
+ request; this effectively ignores the headers
1055
+ in the spec for a single request.
1056
+ :type _headers: dict, optional
1057
+ :param _host_index: set to override the host_index for a single
1058
+ request; this effectively ignores the host_index
1059
+ in the spec for a single request.
1060
+ :type _host_index: int, optional
1061
+ :return: Returns the result object.
1062
+ """ # noqa: E501
1063
+
1064
+ _param = self._get_account_serialize(
1065
+ workspace_id=workspace_id,
1066
+ id=id,
1067
+ entity_id=entity_id,
1068
+ _request_auth=_request_auth,
1069
+ _content_type=_content_type,
1070
+ _headers=_headers,
1071
+ _host_index=_host_index
1072
+ )
1073
+
1074
+ _response_types_map: Dict[str, Optional[str]] = {
1075
+ '200': "GetAccountResponse",
1076
+ '400': "ErrorResponse400",
1077
+ '401': "ErrorResponse401",
1078
+ '403': "ErrorResponse403",
1079
+ '404': "ErrorResponse404",
1080
+ '500': "ErrorResponse500",
1081
+ }
1082
+ response_data = self.api_client.call_api(
1083
+ *_param,
1084
+ _request_timeout=_request_timeout
1085
+ )
1086
+ response_data.read()
1087
+ return self.api_client.response_deserialize(
1088
+ response_data=response_data,
1089
+ response_types_map=_response_types_map,
1090
+ )
1091
+
1092
+
1093
+ @validate_call
1094
+ def get_account_without_preload_content(
1095
+ self,
1096
+ workspace_id: Annotated[StrictInt, Field(description="Workspace ID")],
1097
+ id: Annotated[Optional[StrictInt], Field(description="Account ID (optional, to get specific account)")] = None,
1098
+ entity_id: Annotated[Optional[StrictInt], Field(description="Entity ID (optional, to get all accounts for specific entity)")] = None,
1099
+ _request_timeout: Union[
1100
+ None,
1101
+ Annotated[StrictFloat, Field(gt=0)],
1102
+ Tuple[
1103
+ Annotated[StrictFloat, Field(gt=0)],
1104
+ Annotated[StrictFloat, Field(gt=0)]
1105
+ ]
1106
+ ] = None,
1107
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1108
+ _content_type: Optional[StrictStr] = None,
1109
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1110
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1111
+ ) -> RESTResponseType:
1112
+ """Get account details
1113
+
1114
+ Retrieves details of a specific account by workspace ID and account ID. Requires JWT authentication.
1115
+
1116
+ :param workspace_id: Workspace ID (required)
1117
+ :type workspace_id: int
1118
+ :param id: Account ID (optional, to get specific account)
1119
+ :type id: int
1120
+ :param entity_id: Entity ID (optional, to get all accounts for specific entity)
1121
+ :type entity_id: int
1122
+ :param _request_timeout: timeout setting for this request. If one
1123
+ number provided, it will be total request
1124
+ timeout. It can also be a pair (tuple) of
1125
+ (connection, read) timeouts.
1126
+ :type _request_timeout: int, tuple(int, int), optional
1127
+ :param _request_auth: set to override the auth_settings for an a single
1128
+ request; this effectively ignores the
1129
+ authentication in the spec for a single request.
1130
+ :type _request_auth: dict, optional
1131
+ :param _content_type: force content-type for the request.
1132
+ :type _content_type: str, Optional
1133
+ :param _headers: set to override the headers for a single
1134
+ request; this effectively ignores the headers
1135
+ in the spec for a single request.
1136
+ :type _headers: dict, optional
1137
+ :param _host_index: set to override the host_index for a single
1138
+ request; this effectively ignores the host_index
1139
+ in the spec for a single request.
1140
+ :type _host_index: int, optional
1141
+ :return: Returns the result object.
1142
+ """ # noqa: E501
1143
+
1144
+ _param = self._get_account_serialize(
1145
+ workspace_id=workspace_id,
1146
+ id=id,
1147
+ entity_id=entity_id,
1148
+ _request_auth=_request_auth,
1149
+ _content_type=_content_type,
1150
+ _headers=_headers,
1151
+ _host_index=_host_index
1152
+ )
1153
+
1154
+ _response_types_map: Dict[str, Optional[str]] = {
1155
+ '200': "GetAccountResponse",
1156
+ '400': "ErrorResponse400",
1157
+ '401': "ErrorResponse401",
1158
+ '403': "ErrorResponse403",
1159
+ '404': "ErrorResponse404",
1160
+ '500': "ErrorResponse500",
1161
+ }
1162
+ response_data = self.api_client.call_api(
1163
+ *_param,
1164
+ _request_timeout=_request_timeout
1165
+ )
1166
+ return response_data.response
1167
+
1168
+
1169
+ def _get_account_serialize(
1170
+ self,
1171
+ workspace_id,
1172
+ id,
1173
+ entity_id,
1174
+ _request_auth,
1175
+ _content_type,
1176
+ _headers,
1177
+ _host_index,
1178
+ ) -> RequestSerialized:
1179
+
1180
+ _host = None
1181
+
1182
+ _collection_formats: Dict[str, str] = {
1183
+ }
1184
+
1185
+ _path_params: Dict[str, str] = {}
1186
+ _query_params: List[Tuple[str, str]] = []
1187
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1188
+ _form_params: List[Tuple[str, str]] = []
1189
+ _files: Dict[
1190
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1191
+ ] = {}
1192
+ _body_params: Optional[bytes] = None
1193
+
1194
+ # process the path parameters
1195
+ # process the query parameters
1196
+ if workspace_id is not None:
1197
+
1198
+ _query_params.append(('workspace_id', workspace_id))
1199
+
1200
+ if id is not None:
1201
+
1202
+ _query_params.append(('id', id))
1203
+
1204
+ if entity_id is not None:
1205
+
1206
+ _query_params.append(('entity_id', entity_id))
1207
+
1208
+ # process the header parameters
1209
+ # process the form parameters
1210
+ # process the body parameter
1211
+
1212
+
1213
+ # set the HTTP header `Accept`
1214
+ if 'Accept' not in _header_params:
1215
+ _header_params['Accept'] = self.api_client.select_header_accept(
1216
+ [
1217
+ 'application/json'
1218
+ ]
1219
+ )
1220
+
1221
+
1222
+ # authentication setting
1223
+ _auth_settings: List[str] = [
1224
+ 'bearerAuth'
1225
+ ]
1226
+
1227
+ return self.api_client.param_serialize(
1228
+ method='GET',
1229
+ resource_path='/api/account/get',
1230
+ path_params=_path_params,
1231
+ query_params=_query_params,
1232
+ header_params=_header_params,
1233
+ body=_body_params,
1234
+ post_params=_form_params,
1235
+ files=_files,
1236
+ auth_settings=_auth_settings,
1237
+ collection_formats=_collection_formats,
1238
+ _host=_host,
1239
+ _request_auth=_request_auth
1240
+ )
1241
+
1242
+
1243
+
1244
+
1245
+ @validate_call
1246
+ def update_account(
1247
+ self,
1248
+ update_account_request: UpdateAccountRequest,
1249
+ _request_timeout: Union[
1250
+ None,
1251
+ Annotated[StrictFloat, Field(gt=0)],
1252
+ Tuple[
1253
+ Annotated[StrictFloat, Field(gt=0)],
1254
+ Annotated[StrictFloat, Field(gt=0)]
1255
+ ]
1256
+ ] = None,
1257
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1258
+ _content_type: Optional[StrictStr] = None,
1259
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1260
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1261
+ ) -> AccountUpdatedResponse:
1262
+ """Update an existing account
1263
+
1264
+ Updates an existing account with new information such as name, currency, commission settings
1265
+
1266
+ :param update_account_request: (required)
1267
+ :type update_account_request: UpdateAccountRequest
1268
+ :param _request_timeout: timeout setting for this request. If one
1269
+ number provided, it will be total request
1270
+ timeout. It can also be a pair (tuple) of
1271
+ (connection, read) timeouts.
1272
+ :type _request_timeout: int, tuple(int, int), optional
1273
+ :param _request_auth: set to override the auth_settings for an a single
1274
+ request; this effectively ignores the
1275
+ authentication in the spec for a single request.
1276
+ :type _request_auth: dict, optional
1277
+ :param _content_type: force content-type for the request.
1278
+ :type _content_type: str, Optional
1279
+ :param _headers: set to override the headers for a single
1280
+ request; this effectively ignores the headers
1281
+ in the spec for a single request.
1282
+ :type _headers: dict, optional
1283
+ :param _host_index: set to override the host_index for a single
1284
+ request; this effectively ignores the host_index
1285
+ in the spec for a single request.
1286
+ :type _host_index: int, optional
1287
+ :return: Returns the result object.
1288
+ """ # noqa: E501
1289
+
1290
+ _param = self._update_account_serialize(
1291
+ update_account_request=update_account_request,
1292
+ _request_auth=_request_auth,
1293
+ _content_type=_content_type,
1294
+ _headers=_headers,
1295
+ _host_index=_host_index
1296
+ )
1297
+
1298
+ _response_types_map: Dict[str, Optional[str]] = {
1299
+ '200': "AccountUpdatedResponse",
1300
+ '400': "ErrorResponse400",
1301
+ '401': "ErrorResponse401",
1302
+ '403': "ErrorResponse403",
1303
+ '404': "ErrorResponse404",
1304
+ '405': "ErrorResponse405",
1305
+ '500': "ErrorResponse500",
1306
+ }
1307
+ response_data = self.api_client.call_api(
1308
+ *_param,
1309
+ _request_timeout=_request_timeout
1310
+ )
1311
+ response_data.read()
1312
+ return self.api_client.response_deserialize(
1313
+ response_data=response_data,
1314
+ response_types_map=_response_types_map,
1315
+ ).data
1316
+
1317
+
1318
+ @validate_call
1319
+ def update_account_with_http_info(
1320
+ self,
1321
+ update_account_request: UpdateAccountRequest,
1322
+ _request_timeout: Union[
1323
+ None,
1324
+ Annotated[StrictFloat, Field(gt=0)],
1325
+ Tuple[
1326
+ Annotated[StrictFloat, Field(gt=0)],
1327
+ Annotated[StrictFloat, Field(gt=0)]
1328
+ ]
1329
+ ] = None,
1330
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1331
+ _content_type: Optional[StrictStr] = None,
1332
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1333
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1334
+ ) -> ApiResponse[AccountUpdatedResponse]:
1335
+ """Update an existing account
1336
+
1337
+ Updates an existing account with new information such as name, currency, commission settings
1338
+
1339
+ :param update_account_request: (required)
1340
+ :type update_account_request: UpdateAccountRequest
1341
+ :param _request_timeout: timeout setting for this request. If one
1342
+ number provided, it will be total request
1343
+ timeout. It can also be a pair (tuple) of
1344
+ (connection, read) timeouts.
1345
+ :type _request_timeout: int, tuple(int, int), optional
1346
+ :param _request_auth: set to override the auth_settings for an a single
1347
+ request; this effectively ignores the
1348
+ authentication in the spec for a single request.
1349
+ :type _request_auth: dict, optional
1350
+ :param _content_type: force content-type for the request.
1351
+ :type _content_type: str, Optional
1352
+ :param _headers: set to override the headers for a single
1353
+ request; this effectively ignores the headers
1354
+ in the spec for a single request.
1355
+ :type _headers: dict, optional
1356
+ :param _host_index: set to override the host_index for a single
1357
+ request; this effectively ignores the host_index
1358
+ in the spec for a single request.
1359
+ :type _host_index: int, optional
1360
+ :return: Returns the result object.
1361
+ """ # noqa: E501
1362
+
1363
+ _param = self._update_account_serialize(
1364
+ update_account_request=update_account_request,
1365
+ _request_auth=_request_auth,
1366
+ _content_type=_content_type,
1367
+ _headers=_headers,
1368
+ _host_index=_host_index
1369
+ )
1370
+
1371
+ _response_types_map: Dict[str, Optional[str]] = {
1372
+ '200': "AccountUpdatedResponse",
1373
+ '400': "ErrorResponse400",
1374
+ '401': "ErrorResponse401",
1375
+ '403': "ErrorResponse403",
1376
+ '404': "ErrorResponse404",
1377
+ '405': "ErrorResponse405",
1378
+ '500': "ErrorResponse500",
1379
+ }
1380
+ response_data = self.api_client.call_api(
1381
+ *_param,
1382
+ _request_timeout=_request_timeout
1383
+ )
1384
+ response_data.read()
1385
+ return self.api_client.response_deserialize(
1386
+ response_data=response_data,
1387
+ response_types_map=_response_types_map,
1388
+ )
1389
+
1390
+
1391
+ @validate_call
1392
+ def update_account_without_preload_content(
1393
+ self,
1394
+ update_account_request: UpdateAccountRequest,
1395
+ _request_timeout: Union[
1396
+ None,
1397
+ Annotated[StrictFloat, Field(gt=0)],
1398
+ Tuple[
1399
+ Annotated[StrictFloat, Field(gt=0)],
1400
+ Annotated[StrictFloat, Field(gt=0)]
1401
+ ]
1402
+ ] = None,
1403
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1404
+ _content_type: Optional[StrictStr] = None,
1405
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1406
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1407
+ ) -> RESTResponseType:
1408
+ """Update an existing account
1409
+
1410
+ Updates an existing account with new information such as name, currency, commission settings
1411
+
1412
+ :param update_account_request: (required)
1413
+ :type update_account_request: UpdateAccountRequest
1414
+ :param _request_timeout: timeout setting for this request. If one
1415
+ number provided, it will be total request
1416
+ timeout. It can also be a pair (tuple) of
1417
+ (connection, read) timeouts.
1418
+ :type _request_timeout: int, tuple(int, int), optional
1419
+ :param _request_auth: set to override the auth_settings for an a single
1420
+ request; this effectively ignores the
1421
+ authentication in the spec for a single request.
1422
+ :type _request_auth: dict, optional
1423
+ :param _content_type: force content-type for the request.
1424
+ :type _content_type: str, Optional
1425
+ :param _headers: set to override the headers for a single
1426
+ request; this effectively ignores the headers
1427
+ in the spec for a single request.
1428
+ :type _headers: dict, optional
1429
+ :param _host_index: set to override the host_index for a single
1430
+ request; this effectively ignores the host_index
1431
+ in the spec for a single request.
1432
+ :type _host_index: int, optional
1433
+ :return: Returns the result object.
1434
+ """ # noqa: E501
1435
+
1436
+ _param = self._update_account_serialize(
1437
+ update_account_request=update_account_request,
1438
+ _request_auth=_request_auth,
1439
+ _content_type=_content_type,
1440
+ _headers=_headers,
1441
+ _host_index=_host_index
1442
+ )
1443
+
1444
+ _response_types_map: Dict[str, Optional[str]] = {
1445
+ '200': "AccountUpdatedResponse",
1446
+ '400': "ErrorResponse400",
1447
+ '401': "ErrorResponse401",
1448
+ '403': "ErrorResponse403",
1449
+ '404': "ErrorResponse404",
1450
+ '405': "ErrorResponse405",
1451
+ '500': "ErrorResponse500",
1452
+ }
1453
+ response_data = self.api_client.call_api(
1454
+ *_param,
1455
+ _request_timeout=_request_timeout
1456
+ )
1457
+ return response_data.response
1458
+
1459
+
1460
+ def _update_account_serialize(
1461
+ self,
1462
+ update_account_request,
1463
+ _request_auth,
1464
+ _content_type,
1465
+ _headers,
1466
+ _host_index,
1467
+ ) -> RequestSerialized:
1468
+
1469
+ _host = None
1470
+
1471
+ _collection_formats: Dict[str, str] = {
1472
+ }
1473
+
1474
+ _path_params: Dict[str, str] = {}
1475
+ _query_params: List[Tuple[str, str]] = []
1476
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1477
+ _form_params: List[Tuple[str, str]] = []
1478
+ _files: Dict[
1479
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1480
+ ] = {}
1481
+ _body_params: Optional[bytes] = None
1482
+
1483
+ # process the path parameters
1484
+ # process the query parameters
1485
+ # process the header parameters
1486
+ # process the form parameters
1487
+ # process the body parameter
1488
+ if update_account_request is not None:
1489
+ _body_params = update_account_request
1490
+
1491
+
1492
+ # set the HTTP header `Accept`
1493
+ if 'Accept' not in _header_params:
1494
+ _header_params['Accept'] = self.api_client.select_header_accept(
1495
+ [
1496
+ 'application/json'
1497
+ ]
1498
+ )
1499
+
1500
+ # set the HTTP header `Content-Type`
1501
+ if _content_type:
1502
+ _header_params['Content-Type'] = _content_type
1503
+ else:
1504
+ _default_content_type = (
1505
+ self.api_client.select_header_content_type(
1506
+ [
1507
+ 'application/json'
1508
+ ]
1509
+ )
1510
+ )
1511
+ if _default_content_type is not None:
1512
+ _header_params['Content-Type'] = _default_content_type
1513
+
1514
+ # authentication setting
1515
+ _auth_settings: List[str] = [
1516
+ 'bearerAuth'
1517
+ ]
1518
+
1519
+ return self.api_client.param_serialize(
1520
+ method='POST',
1521
+ resource_path='/api/account/update',
1522
+ path_params=_path_params,
1523
+ query_params=_query_params,
1524
+ header_params=_header_params,
1525
+ body=_body_params,
1526
+ post_params=_form_params,
1527
+ files=_files,
1528
+ auth_settings=_auth_settings,
1529
+ collection_formats=_collection_formats,
1530
+ _host=_host,
1531
+ _request_auth=_request_auth
1532
+ )
1533
+
1534
+