lunchmoney-python 2.9.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 (92) hide show
  1. lunchmoney/__init__.py +205 -0
  2. lunchmoney/api/__init__.py +16 -0
  3. lunchmoney/api/categories_api.py +1499 -0
  4. lunchmoney/api/manual_accounts_api.py +1479 -0
  5. lunchmoney/api/me_api.py +293 -0
  6. lunchmoney/api/plaid_accounts_api.py +909 -0
  7. lunchmoney/api/recurring_items_api.py +702 -0
  8. lunchmoney/api/summary_api.py +434 -0
  9. lunchmoney/api/tags_api.py +1465 -0
  10. lunchmoney/api/transactions_api.py +914 -0
  11. lunchmoney/api/transactions_bulk_api.py +1527 -0
  12. lunchmoney/api/transactions_files_api.py +891 -0
  13. lunchmoney/api/transactions_group_api.py +601 -0
  14. lunchmoney/api/transactions_split_api.py +616 -0
  15. lunchmoney/api_client.py +805 -0
  16. lunchmoney/api_response.py +21 -0
  17. lunchmoney/configuration.py +620 -0
  18. lunchmoney/exceptions.py +217 -0
  19. lunchmoney/models/__init__.py +84 -0
  20. lunchmoney/models/account_type_enum.py +46 -0
  21. lunchmoney/models/aligned_category_totals_object.py +108 -0
  22. lunchmoney/models/aligned_summary_category_object.py +110 -0
  23. lunchmoney/models/aligned_summary_response_object.py +104 -0
  24. lunchmoney/models/category_object.py +146 -0
  25. lunchmoney/models/child_category_object.py +141 -0
  26. lunchmoney/models/child_transaction_object.py +219 -0
  27. lunchmoney/models/create_category_request_object.py +137 -0
  28. lunchmoney/models/create_category_request_object_children_inner.py +159 -0
  29. lunchmoney/models/create_manual_account_request_object.py +138 -0
  30. lunchmoney/models/create_manual_account_request_object_balance.py +145 -0
  31. lunchmoney/models/create_new_transactions_request.py +103 -0
  32. lunchmoney/models/create_tag_request_object.py +112 -0
  33. lunchmoney/models/currency_enum.py +198 -0
  34. lunchmoney/models/delete_category_response_with_dependencies.py +94 -0
  35. lunchmoney/models/delete_category_response_with_dependencies_dependents.py +98 -0
  36. lunchmoney/models/delete_tag_response_with_dependencies.py +94 -0
  37. lunchmoney/models/delete_tag_response_with_dependencies_dependents.py +90 -0
  38. lunchmoney/models/delete_transactions_request.py +89 -0
  39. lunchmoney/models/error_response_object.py +98 -0
  40. lunchmoney/models/error_response_object_errors_inner.py +101 -0
  41. lunchmoney/models/get_all_categories200_response.py +96 -0
  42. lunchmoney/models/get_all_manual_accounts200_response.py +96 -0
  43. lunchmoney/models/get_all_plaid_accounts200_response.py +96 -0
  44. lunchmoney/models/get_all_recurring200_response.py +96 -0
  45. lunchmoney/models/get_all_tags200_response.py +96 -0
  46. lunchmoney/models/get_all_transactions200_response.py +100 -0
  47. lunchmoney/models/get_all_transactions_created_since_parameter.py +145 -0
  48. lunchmoney/models/get_budget_summary200_response.py +138 -0
  49. lunchmoney/models/get_transaction_attachment_url200_response.py +91 -0
  50. lunchmoney/models/group_transactions_request.py +122 -0
  51. lunchmoney/models/insert_transaction_object.py +164 -0
  52. lunchmoney/models/insert_transaction_object_amount.py +145 -0
  53. lunchmoney/models/insert_transactions_response_object.py +106 -0
  54. lunchmoney/models/manual_account_object.py +158 -0
  55. lunchmoney/models/non_aligned_category_totals_object.py +94 -0
  56. lunchmoney/models/non_aligned_summary_category_object.py +94 -0
  57. lunchmoney/models/non_aligned_summary_response_object.py +104 -0
  58. lunchmoney/models/plaid_account_object.py +168 -0
  59. lunchmoney/models/recurring_object.py +143 -0
  60. lunchmoney/models/recurring_object_matches.py +105 -0
  61. lunchmoney/models/recurring_object_matches_found_transactions_inner.py +91 -0
  62. lunchmoney/models/recurring_object_overrides.py +92 -0
  63. lunchmoney/models/recurring_object_transaction_criteria.py +149 -0
  64. lunchmoney/models/skipped_existing_external_id_object.py +108 -0
  65. lunchmoney/models/split_transaction_object.py +102 -0
  66. lunchmoney/models/split_transaction_object_amount.py +145 -0
  67. lunchmoney/models/split_transaction_request.py +97 -0
  68. lunchmoney/models/summary_category_occurrence_object.py +126 -0
  69. lunchmoney/models/summary_recurring_transaction_object.py +100 -0
  70. lunchmoney/models/summary_rollover_pool_adjustment_object.py +98 -0
  71. lunchmoney/models/summary_rollover_pool_object.py +98 -0
  72. lunchmoney/models/summary_totals_breakdown_object.py +98 -0
  73. lunchmoney/models/summary_totals_object.py +97 -0
  74. lunchmoney/models/tag_object.py +125 -0
  75. lunchmoney/models/transaction_attachment_object.py +106 -0
  76. lunchmoney/models/transaction_object.py +229 -0
  77. lunchmoney/models/update_category_request_object.py +156 -0
  78. lunchmoney/models/update_manual_account_request_object.py +156 -0
  79. lunchmoney/models/update_manual_account_request_object_balance.py +145 -0
  80. lunchmoney/models/update_tag_request_object.py +126 -0
  81. lunchmoney/models/update_transaction_object.py +228 -0
  82. lunchmoney/models/update_transaction_object_amount.py +145 -0
  83. lunchmoney/models/update_transactions200_response.py +96 -0
  84. lunchmoney/models/update_transactions_request.py +97 -0
  85. lunchmoney/models/update_transactions_request_transactions_inner.py +228 -0
  86. lunchmoney/models/user_object.py +106 -0
  87. lunchmoney/py.typed +0 -0
  88. lunchmoney/rest.py +259 -0
  89. lunchmoney_python-2.9.0.dist-info/METADATA +285 -0
  90. lunchmoney_python-2.9.0.dist-info/RECORD +92 -0
  91. lunchmoney_python-2.9.0.dist-info/WHEEL +5 -0
  92. lunchmoney_python-2.9.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1479 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Lunch Money API - v2
5
+
6
+ Welcome to the Lunch Money v2 API. A working version of this API is now available through these docs, or directly at: `https://api.lunchmoney.dev/v2` <span class=\"red-text\"><strong>This is in alpha launch of a major API update. It is still subject to change during this alpha review period and bugs may still exist. Users are strongly encouraged to use the mock service or to create a test budget with example data as the first step to interacting with the v2 API.</strong></span> See the [Getting Started Guide](https://alpha.lunchmoney.dev/v2/getting-started) for more information on using a test budget.<br<br> If you are new to the v2 API, you may wish to review the [v2 API Overview of Changes](https://alpha.lunchmoney.dev/v2/changelog). ### Static Mock Server You may also use these docs to explore the API using a static mock server endpoint.<p> This enables users to become familiar with the API without having to create an access token, and eliminates the possibility of modifying real data. <p> To access this endpoint select the second endpoint in the the \"Server\" dropdown to the right. When selected you should see \"Static Mock v2 Lunch Money API Server\".<br> When using this server, set your Bearer token to any string with 11 or more characters. ### Migrating from V1 The v2 API is NOT backwards compatible with the v1 API. Developers are encouraged to review the [Migration Guide](https://alpha.lunchmoney.dev/v2/migration-guide) to understand the changes and plan their migration. ### Acknowledgments If you have been providing feedback on the API during our iterative design process, **THANK YOU**. We are happy to provide the opportunity to finally interact with the working API that was built based on your feedback. ### Useful links: - [Getting Started](https://alpha.lunchmoney.dev/v2/getting-started) - [v2 API Changelog](https://alpha.lunchmoney.dev/v2/changelog) - [Migration Guide](https://alpha.lunchmoney.dev/v2/migration-guide) - [Rate Limits](https://alpha.lunchmoney.dev/v2/rate-limits) - [Current v1 Lunch Money API Documentation](https://lunchmoney.dev) - [Awesome Lunch Money Projects](https://github.com/lunch-money/awesome-lunchmoney?tab=readme-ov-file)
7
+
8
+ The version of the OpenAPI document: 2.8.4
9
+ Contact: devsupport@lunchmoney.app
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """ # noqa: E501
14
+
15
+ import warnings
16
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
17
+ from typing import Any, Dict, List, Optional, Tuple, Union
18
+ from typing_extensions import Annotated
19
+
20
+ from pydantic import Field, StrictBool, StrictInt
21
+ from typing import Optional
22
+ from typing_extensions import Annotated
23
+ from lunchmoney.models.create_manual_account_request_object import CreateManualAccountRequestObject
24
+ from lunchmoney.models.get_all_manual_accounts200_response import GetAllManualAccounts200Response
25
+ from lunchmoney.models.manual_account_object import ManualAccountObject
26
+ from lunchmoney.models.update_manual_account_request_object import UpdateManualAccountRequestObject
27
+
28
+ from lunchmoney.api_client import ApiClient, RequestSerialized
29
+ from lunchmoney.api_response import ApiResponse
30
+ from lunchmoney.rest import RESTResponseType
31
+
32
+
33
+ class ManualAccountsApi:
34
+ """NOTE: This class is auto generated by OpenAPI Generator
35
+ Ref: https://openapi-generator.tech
36
+
37
+ Do not edit the class manually.
38
+ """
39
+
40
+ def __init__(self, api_client=None) -> None:
41
+ if api_client is None:
42
+ api_client = ApiClient.get_default()
43
+ self.api_client = api_client
44
+
45
+
46
+ @validate_call
47
+ def create_manual_account(
48
+ self,
49
+ create_manual_account_request_object: CreateManualAccountRequestObject,
50
+ _request_timeout: Union[
51
+ None,
52
+ Annotated[StrictFloat, Field(gt=0)],
53
+ Tuple[
54
+ Annotated[StrictFloat, Field(gt=0)],
55
+ Annotated[StrictFloat, Field(gt=0)]
56
+ ]
57
+ ] = None,
58
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
59
+ _content_type: Optional[StrictStr] = None,
60
+ _headers: Optional[Dict[StrictStr, Any]] = None,
61
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
62
+ ) -> ManualAccountObject:
63
+ """Create a manual account
64
+
65
+ Creates a new manually-managed account.
66
+
67
+ :param create_manual_account_request_object: (required)
68
+ :type create_manual_account_request_object: CreateManualAccountRequestObject
69
+ :param _request_timeout: timeout setting for this request. If one
70
+ number provided, it will be total request
71
+ timeout. It can also be a pair (tuple) of
72
+ (connection, read) timeouts.
73
+ :type _request_timeout: int, tuple(int, int), optional
74
+ :param _request_auth: set to override the auth_settings for an a single
75
+ request; this effectively ignores the
76
+ authentication in the spec for a single request.
77
+ :type _request_auth: dict, optional
78
+ :param _content_type: force content-type for the request.
79
+ :type _content_type: str, Optional
80
+ :param _headers: set to override the headers for a single
81
+ request; this effectively ignores the headers
82
+ in the spec for a single request.
83
+ :type _headers: dict, optional
84
+ :param _host_index: set to override the host_index for a single
85
+ request; this effectively ignores the host_index
86
+ in the spec for a single request.
87
+ :type _host_index: int, optional
88
+ :return: Returns the result object.
89
+ """ # noqa: E501
90
+
91
+ _param = self._create_manual_account_serialize(
92
+ create_manual_account_request_object=create_manual_account_request_object,
93
+ _request_auth=_request_auth,
94
+ _content_type=_content_type,
95
+ _headers=_headers,
96
+ _host_index=_host_index
97
+ )
98
+
99
+ _response_types_map: Dict[str, Optional[str]] = {
100
+ '201': "ManualAccountObject",
101
+ '400': "ErrorResponseObject",
102
+ '401': "ErrorResponseObject",
103
+ '429': "ErrorResponseObject",
104
+ '500': "ErrorResponseObject",
105
+ }
106
+ response_data = self.api_client.call_api(
107
+ *_param,
108
+ _request_timeout=_request_timeout
109
+ )
110
+ response_data.read()
111
+ return self.api_client.response_deserialize(
112
+ response_data=response_data,
113
+ response_types_map=_response_types_map,
114
+ ).data
115
+
116
+
117
+ @validate_call
118
+ def create_manual_account_with_http_info(
119
+ self,
120
+ create_manual_account_request_object: CreateManualAccountRequestObject,
121
+ _request_timeout: Union[
122
+ None,
123
+ Annotated[StrictFloat, Field(gt=0)],
124
+ Tuple[
125
+ Annotated[StrictFloat, Field(gt=0)],
126
+ Annotated[StrictFloat, Field(gt=0)]
127
+ ]
128
+ ] = None,
129
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
130
+ _content_type: Optional[StrictStr] = None,
131
+ _headers: Optional[Dict[StrictStr, Any]] = None,
132
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
133
+ ) -> ApiResponse[ManualAccountObject]:
134
+ """Create a manual account
135
+
136
+ Creates a new manually-managed account.
137
+
138
+ :param create_manual_account_request_object: (required)
139
+ :type create_manual_account_request_object: CreateManualAccountRequestObject
140
+ :param _request_timeout: timeout setting for this request. If one
141
+ number provided, it will be total request
142
+ timeout. It can also be a pair (tuple) of
143
+ (connection, read) timeouts.
144
+ :type _request_timeout: int, tuple(int, int), optional
145
+ :param _request_auth: set to override the auth_settings for an a single
146
+ request; this effectively ignores the
147
+ authentication in the spec for a single request.
148
+ :type _request_auth: dict, optional
149
+ :param _content_type: force content-type for the request.
150
+ :type _content_type: str, Optional
151
+ :param _headers: set to override the headers for a single
152
+ request; this effectively ignores the headers
153
+ in the spec for a single request.
154
+ :type _headers: dict, optional
155
+ :param _host_index: set to override the host_index for a single
156
+ request; this effectively ignores the host_index
157
+ in the spec for a single request.
158
+ :type _host_index: int, optional
159
+ :return: Returns the result object.
160
+ """ # noqa: E501
161
+
162
+ _param = self._create_manual_account_serialize(
163
+ create_manual_account_request_object=create_manual_account_request_object,
164
+ _request_auth=_request_auth,
165
+ _content_type=_content_type,
166
+ _headers=_headers,
167
+ _host_index=_host_index
168
+ )
169
+
170
+ _response_types_map: Dict[str, Optional[str]] = {
171
+ '201': "ManualAccountObject",
172
+ '400': "ErrorResponseObject",
173
+ '401': "ErrorResponseObject",
174
+ '429': "ErrorResponseObject",
175
+ '500': "ErrorResponseObject",
176
+ }
177
+ response_data = self.api_client.call_api(
178
+ *_param,
179
+ _request_timeout=_request_timeout
180
+ )
181
+ response_data.read()
182
+ return self.api_client.response_deserialize(
183
+ response_data=response_data,
184
+ response_types_map=_response_types_map,
185
+ )
186
+
187
+
188
+ @validate_call
189
+ def create_manual_account_without_preload_content(
190
+ self,
191
+ create_manual_account_request_object: CreateManualAccountRequestObject,
192
+ _request_timeout: Union[
193
+ None,
194
+ Annotated[StrictFloat, Field(gt=0)],
195
+ Tuple[
196
+ Annotated[StrictFloat, Field(gt=0)],
197
+ Annotated[StrictFloat, Field(gt=0)]
198
+ ]
199
+ ] = None,
200
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
201
+ _content_type: Optional[StrictStr] = None,
202
+ _headers: Optional[Dict[StrictStr, Any]] = None,
203
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
204
+ ) -> RESTResponseType:
205
+ """Create a manual account
206
+
207
+ Creates a new manually-managed account.
208
+
209
+ :param create_manual_account_request_object: (required)
210
+ :type create_manual_account_request_object: CreateManualAccountRequestObject
211
+ :param _request_timeout: timeout setting for this request. If one
212
+ number provided, it will be total request
213
+ timeout. It can also be a pair (tuple) of
214
+ (connection, read) timeouts.
215
+ :type _request_timeout: int, tuple(int, int), optional
216
+ :param _request_auth: set to override the auth_settings for an a single
217
+ request; this effectively ignores the
218
+ authentication in the spec for a single request.
219
+ :type _request_auth: dict, optional
220
+ :param _content_type: force content-type for the request.
221
+ :type _content_type: str, Optional
222
+ :param _headers: set to override the headers for a single
223
+ request; this effectively ignores the headers
224
+ in the spec for a single request.
225
+ :type _headers: dict, optional
226
+ :param _host_index: set to override the host_index for a single
227
+ request; this effectively ignores the host_index
228
+ in the spec for a single request.
229
+ :type _host_index: int, optional
230
+ :return: Returns the result object.
231
+ """ # noqa: E501
232
+
233
+ _param = self._create_manual_account_serialize(
234
+ create_manual_account_request_object=create_manual_account_request_object,
235
+ _request_auth=_request_auth,
236
+ _content_type=_content_type,
237
+ _headers=_headers,
238
+ _host_index=_host_index
239
+ )
240
+
241
+ _response_types_map: Dict[str, Optional[str]] = {
242
+ '201': "ManualAccountObject",
243
+ '400': "ErrorResponseObject",
244
+ '401': "ErrorResponseObject",
245
+ '429': "ErrorResponseObject",
246
+ '500': "ErrorResponseObject",
247
+ }
248
+ response_data = self.api_client.call_api(
249
+ *_param,
250
+ _request_timeout=_request_timeout
251
+ )
252
+ return response_data.response
253
+
254
+
255
+ def _create_manual_account_serialize(
256
+ self,
257
+ create_manual_account_request_object,
258
+ _request_auth,
259
+ _content_type,
260
+ _headers,
261
+ _host_index,
262
+ ) -> RequestSerialized:
263
+
264
+ _host = None
265
+
266
+ _collection_formats: Dict[str, str] = {
267
+ }
268
+
269
+ _path_params: Dict[str, str] = {}
270
+ _query_params: List[Tuple[str, str]] = []
271
+ _header_params: Dict[str, Optional[str]] = _headers or {}
272
+ _form_params: List[Tuple[str, str]] = []
273
+ _files: Dict[
274
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
275
+ ] = {}
276
+ _body_params: Optional[bytes] = None
277
+
278
+ # process the path parameters
279
+ # process the query parameters
280
+ # process the header parameters
281
+ # process the form parameters
282
+ # process the body parameter
283
+ if create_manual_account_request_object is not None:
284
+ _body_params = create_manual_account_request_object
285
+
286
+
287
+ # set the HTTP header `Accept`
288
+ if 'Accept' not in _header_params:
289
+ _header_params['Accept'] = self.api_client.select_header_accept(
290
+ [
291
+ 'application/json'
292
+ ]
293
+ )
294
+
295
+ # set the HTTP header `Content-Type`
296
+ if _content_type:
297
+ _header_params['Content-Type'] = _content_type
298
+ else:
299
+ _default_content_type = (
300
+ self.api_client.select_header_content_type(
301
+ [
302
+ 'application/json'
303
+ ]
304
+ )
305
+ )
306
+ if _default_content_type is not None:
307
+ _header_params['Content-Type'] = _default_content_type
308
+
309
+ # authentication setting
310
+ _auth_settings: List[str] = [
311
+ 'cookieAuth',
312
+ 'bearerSecurity'
313
+ ]
314
+
315
+ return self.api_client.param_serialize(
316
+ method='POST',
317
+ resource_path='/manual_accounts',
318
+ path_params=_path_params,
319
+ query_params=_query_params,
320
+ header_params=_header_params,
321
+ body=_body_params,
322
+ post_params=_form_params,
323
+ files=_files,
324
+ auth_settings=_auth_settings,
325
+ collection_formats=_collection_formats,
326
+ _host=_host,
327
+ _request_auth=_request_auth
328
+ )
329
+
330
+
331
+
332
+
333
+ @validate_call
334
+ def delete_manual_account(
335
+ self,
336
+ id: Annotated[StrictInt, Field(description="ID of the manual account to delete")],
337
+ delete_items: Annotated[Optional[StrictBool], Field(description="When set to true will also delete any transactions, rules, and recurring items associated with this account. Use this option with caution, it is irreversible!")] = None,
338
+ delete_balance_history: Annotated[Optional[StrictBool], Field(description="When set to true will delete any balance history associated with this account.")] = None,
339
+ _request_timeout: Union[
340
+ None,
341
+ Annotated[StrictFloat, Field(gt=0)],
342
+ Tuple[
343
+ Annotated[StrictFloat, Field(gt=0)],
344
+ Annotated[StrictFloat, Field(gt=0)]
345
+ ]
346
+ ] = None,
347
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
348
+ _content_type: Optional[StrictStr] = None,
349
+ _headers: Optional[Dict[StrictStr, Any]] = None,
350
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
351
+ ) -> None:
352
+ """Delete a manual account
353
+
354
+ Deletes the single manual account with the ID specified on the path. If any transactions exist with the `manual_account_id` property set to this account's ID they will appear with a warning when displayed in the web view.
355
+
356
+ :param id: ID of the manual account to delete (required)
357
+ :type id: int
358
+ :param delete_items: When set to true will also delete any transactions, rules, and recurring items associated with this account. Use this option with caution, it is irreversible!
359
+ :type delete_items: bool
360
+ :param delete_balance_history: When set to true will delete any balance history associated with this account.
361
+ :type delete_balance_history: bool
362
+ :param _request_timeout: timeout setting for this request. If one
363
+ number provided, it will be total request
364
+ timeout. It can also be a pair (tuple) of
365
+ (connection, read) timeouts.
366
+ :type _request_timeout: int, tuple(int, int), optional
367
+ :param _request_auth: set to override the auth_settings for an a single
368
+ request; this effectively ignores the
369
+ authentication in the spec for a single request.
370
+ :type _request_auth: dict, optional
371
+ :param _content_type: force content-type for the request.
372
+ :type _content_type: str, Optional
373
+ :param _headers: set to override the headers for a single
374
+ request; this effectively ignores the headers
375
+ in the spec for a single request.
376
+ :type _headers: dict, optional
377
+ :param _host_index: set to override the host_index for a single
378
+ request; this effectively ignores the host_index
379
+ in the spec for a single request.
380
+ :type _host_index: int, optional
381
+ :return: Returns the result object.
382
+ """ # noqa: E501
383
+
384
+ _param = self._delete_manual_account_serialize(
385
+ id=id,
386
+ delete_items=delete_items,
387
+ delete_balance_history=delete_balance_history,
388
+ _request_auth=_request_auth,
389
+ _content_type=_content_type,
390
+ _headers=_headers,
391
+ _host_index=_host_index
392
+ )
393
+
394
+ _response_types_map: Dict[str, Optional[str]] = {
395
+ '204': None,
396
+ '401': "ErrorResponseObject",
397
+ '404': "ErrorResponseObject",
398
+ '429': "ErrorResponseObject",
399
+ '500': "ErrorResponseObject",
400
+ }
401
+ response_data = self.api_client.call_api(
402
+ *_param,
403
+ _request_timeout=_request_timeout
404
+ )
405
+ response_data.read()
406
+ return self.api_client.response_deserialize(
407
+ response_data=response_data,
408
+ response_types_map=_response_types_map,
409
+ ).data
410
+
411
+
412
+ @validate_call
413
+ def delete_manual_account_with_http_info(
414
+ self,
415
+ id: Annotated[StrictInt, Field(description="ID of the manual account to delete")],
416
+ delete_items: Annotated[Optional[StrictBool], Field(description="When set to true will also delete any transactions, rules, and recurring items associated with this account. Use this option with caution, it is irreversible!")] = None,
417
+ delete_balance_history: Annotated[Optional[StrictBool], Field(description="When set to true will delete any balance history associated with this account.")] = None,
418
+ _request_timeout: Union[
419
+ None,
420
+ Annotated[StrictFloat, Field(gt=0)],
421
+ Tuple[
422
+ Annotated[StrictFloat, Field(gt=0)],
423
+ Annotated[StrictFloat, Field(gt=0)]
424
+ ]
425
+ ] = None,
426
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
427
+ _content_type: Optional[StrictStr] = None,
428
+ _headers: Optional[Dict[StrictStr, Any]] = None,
429
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
430
+ ) -> ApiResponse[None]:
431
+ """Delete a manual account
432
+
433
+ Deletes the single manual account with the ID specified on the path. If any transactions exist with the `manual_account_id` property set to this account's ID they will appear with a warning when displayed in the web view.
434
+
435
+ :param id: ID of the manual account to delete (required)
436
+ :type id: int
437
+ :param delete_items: When set to true will also delete any transactions, rules, and recurring items associated with this account. Use this option with caution, it is irreversible!
438
+ :type delete_items: bool
439
+ :param delete_balance_history: When set to true will delete any balance history associated with this account.
440
+ :type delete_balance_history: bool
441
+ :param _request_timeout: timeout setting for this request. If one
442
+ number provided, it will be total request
443
+ timeout. It can also be a pair (tuple) of
444
+ (connection, read) timeouts.
445
+ :type _request_timeout: int, tuple(int, int), optional
446
+ :param _request_auth: set to override the auth_settings for an a single
447
+ request; this effectively ignores the
448
+ authentication in the spec for a single request.
449
+ :type _request_auth: dict, optional
450
+ :param _content_type: force content-type for the request.
451
+ :type _content_type: str, Optional
452
+ :param _headers: set to override the headers for a single
453
+ request; this effectively ignores the headers
454
+ in the spec for a single request.
455
+ :type _headers: dict, optional
456
+ :param _host_index: set to override the host_index for a single
457
+ request; this effectively ignores the host_index
458
+ in the spec for a single request.
459
+ :type _host_index: int, optional
460
+ :return: Returns the result object.
461
+ """ # noqa: E501
462
+
463
+ _param = self._delete_manual_account_serialize(
464
+ id=id,
465
+ delete_items=delete_items,
466
+ delete_balance_history=delete_balance_history,
467
+ _request_auth=_request_auth,
468
+ _content_type=_content_type,
469
+ _headers=_headers,
470
+ _host_index=_host_index
471
+ )
472
+
473
+ _response_types_map: Dict[str, Optional[str]] = {
474
+ '204': None,
475
+ '401': "ErrorResponseObject",
476
+ '404': "ErrorResponseObject",
477
+ '429': "ErrorResponseObject",
478
+ '500': "ErrorResponseObject",
479
+ }
480
+ response_data = self.api_client.call_api(
481
+ *_param,
482
+ _request_timeout=_request_timeout
483
+ )
484
+ response_data.read()
485
+ return self.api_client.response_deserialize(
486
+ response_data=response_data,
487
+ response_types_map=_response_types_map,
488
+ )
489
+
490
+
491
+ @validate_call
492
+ def delete_manual_account_without_preload_content(
493
+ self,
494
+ id: Annotated[StrictInt, Field(description="ID of the manual account to delete")],
495
+ delete_items: Annotated[Optional[StrictBool], Field(description="When set to true will also delete any transactions, rules, and recurring items associated with this account. Use this option with caution, it is irreversible!")] = None,
496
+ delete_balance_history: Annotated[Optional[StrictBool], Field(description="When set to true will delete any balance history associated with this account.")] = None,
497
+ _request_timeout: Union[
498
+ None,
499
+ Annotated[StrictFloat, Field(gt=0)],
500
+ Tuple[
501
+ Annotated[StrictFloat, Field(gt=0)],
502
+ Annotated[StrictFloat, Field(gt=0)]
503
+ ]
504
+ ] = None,
505
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
506
+ _content_type: Optional[StrictStr] = None,
507
+ _headers: Optional[Dict[StrictStr, Any]] = None,
508
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
509
+ ) -> RESTResponseType:
510
+ """Delete a manual account
511
+
512
+ Deletes the single manual account with the ID specified on the path. If any transactions exist with the `manual_account_id` property set to this account's ID they will appear with a warning when displayed in the web view.
513
+
514
+ :param id: ID of the manual account to delete (required)
515
+ :type id: int
516
+ :param delete_items: When set to true will also delete any transactions, rules, and recurring items associated with this account. Use this option with caution, it is irreversible!
517
+ :type delete_items: bool
518
+ :param delete_balance_history: When set to true will delete any balance history associated with this account.
519
+ :type delete_balance_history: bool
520
+ :param _request_timeout: timeout setting for this request. If one
521
+ number provided, it will be total request
522
+ timeout. It can also be a pair (tuple) of
523
+ (connection, read) timeouts.
524
+ :type _request_timeout: int, tuple(int, int), optional
525
+ :param _request_auth: set to override the auth_settings for an a single
526
+ request; this effectively ignores the
527
+ authentication in the spec for a single request.
528
+ :type _request_auth: dict, optional
529
+ :param _content_type: force content-type for the request.
530
+ :type _content_type: str, Optional
531
+ :param _headers: set to override the headers for a single
532
+ request; this effectively ignores the headers
533
+ in the spec for a single request.
534
+ :type _headers: dict, optional
535
+ :param _host_index: set to override the host_index for a single
536
+ request; this effectively ignores the host_index
537
+ in the spec for a single request.
538
+ :type _host_index: int, optional
539
+ :return: Returns the result object.
540
+ """ # noqa: E501
541
+
542
+ _param = self._delete_manual_account_serialize(
543
+ id=id,
544
+ delete_items=delete_items,
545
+ delete_balance_history=delete_balance_history,
546
+ _request_auth=_request_auth,
547
+ _content_type=_content_type,
548
+ _headers=_headers,
549
+ _host_index=_host_index
550
+ )
551
+
552
+ _response_types_map: Dict[str, Optional[str]] = {
553
+ '204': None,
554
+ '401': "ErrorResponseObject",
555
+ '404': "ErrorResponseObject",
556
+ '429': "ErrorResponseObject",
557
+ '500': "ErrorResponseObject",
558
+ }
559
+ response_data = self.api_client.call_api(
560
+ *_param,
561
+ _request_timeout=_request_timeout
562
+ )
563
+ return response_data.response
564
+
565
+
566
+ def _delete_manual_account_serialize(
567
+ self,
568
+ id,
569
+ delete_items,
570
+ delete_balance_history,
571
+ _request_auth,
572
+ _content_type,
573
+ _headers,
574
+ _host_index,
575
+ ) -> RequestSerialized:
576
+
577
+ _host = None
578
+
579
+ _collection_formats: Dict[str, str] = {
580
+ }
581
+
582
+ _path_params: Dict[str, str] = {}
583
+ _query_params: List[Tuple[str, str]] = []
584
+ _header_params: Dict[str, Optional[str]] = _headers or {}
585
+ _form_params: List[Tuple[str, str]] = []
586
+ _files: Dict[
587
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
588
+ ] = {}
589
+ _body_params: Optional[bytes] = None
590
+
591
+ # process the path parameters
592
+ if id is not None:
593
+ _path_params['id'] = id
594
+ # process the query parameters
595
+ if delete_items is not None:
596
+
597
+ _query_params.append(('delete_items', delete_items))
598
+
599
+ if delete_balance_history is not None:
600
+
601
+ _query_params.append(('delete_balance_history', delete_balance_history))
602
+
603
+ # process the header parameters
604
+ # process the form parameters
605
+ # process the body parameter
606
+
607
+
608
+ # set the HTTP header `Accept`
609
+ if 'Accept' not in _header_params:
610
+ _header_params['Accept'] = self.api_client.select_header_accept(
611
+ [
612
+ 'application/json'
613
+ ]
614
+ )
615
+
616
+
617
+ # authentication setting
618
+ _auth_settings: List[str] = [
619
+ 'cookieAuth',
620
+ 'bearerSecurity'
621
+ ]
622
+
623
+ return self.api_client.param_serialize(
624
+ method='DELETE',
625
+ resource_path='/manual_accounts/{id}',
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 get_all_manual_accounts(
643
+ self,
644
+ _request_timeout: Union[
645
+ None,
646
+ Annotated[StrictFloat, Field(gt=0)],
647
+ Tuple[
648
+ Annotated[StrictFloat, Field(gt=0)],
649
+ Annotated[StrictFloat, Field(gt=0)]
650
+ ]
651
+ ] = None,
652
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
653
+ _content_type: Optional[StrictStr] = None,
654
+ _headers: Optional[Dict[StrictStr, Any]] = None,
655
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
656
+ ) -> GetAllManualAccounts200Response:
657
+ """Get all manual accounts
658
+
659
+ Retrieve a list of all manually-managed accounts associated with the user's account.
660
+
661
+ :param _request_timeout: timeout setting for this request. If one
662
+ number provided, it will be total request
663
+ timeout. It can also be a pair (tuple) of
664
+ (connection, read) timeouts.
665
+ :type _request_timeout: int, tuple(int, int), optional
666
+ :param _request_auth: set to override the auth_settings for an a single
667
+ request; this effectively ignores the
668
+ authentication in the spec for a single request.
669
+ :type _request_auth: dict, optional
670
+ :param _content_type: force content-type for the request.
671
+ :type _content_type: str, Optional
672
+ :param _headers: set to override the headers for a single
673
+ request; this effectively ignores the headers
674
+ in the spec for a single request.
675
+ :type _headers: dict, optional
676
+ :param _host_index: set to override the host_index for a single
677
+ request; this effectively ignores the host_index
678
+ in the spec for a single request.
679
+ :type _host_index: int, optional
680
+ :return: Returns the result object.
681
+ """ # noqa: E501
682
+
683
+ _param = self._get_all_manual_accounts_serialize(
684
+ _request_auth=_request_auth,
685
+ _content_type=_content_type,
686
+ _headers=_headers,
687
+ _host_index=_host_index
688
+ )
689
+
690
+ _response_types_map: Dict[str, Optional[str]] = {
691
+ '200': "GetAllManualAccounts200Response",
692
+ '400': "ErrorResponseObject",
693
+ '401': "ErrorResponseObject",
694
+ '429': "ErrorResponseObject",
695
+ '500': "ErrorResponseObject",
696
+ }
697
+ response_data = self.api_client.call_api(
698
+ *_param,
699
+ _request_timeout=_request_timeout
700
+ )
701
+ response_data.read()
702
+ return self.api_client.response_deserialize(
703
+ response_data=response_data,
704
+ response_types_map=_response_types_map,
705
+ ).data
706
+
707
+
708
+ @validate_call
709
+ def get_all_manual_accounts_with_http_info(
710
+ self,
711
+ _request_timeout: Union[
712
+ None,
713
+ Annotated[StrictFloat, Field(gt=0)],
714
+ Tuple[
715
+ Annotated[StrictFloat, Field(gt=0)],
716
+ Annotated[StrictFloat, Field(gt=0)]
717
+ ]
718
+ ] = None,
719
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
720
+ _content_type: Optional[StrictStr] = None,
721
+ _headers: Optional[Dict[StrictStr, Any]] = None,
722
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
723
+ ) -> ApiResponse[GetAllManualAccounts200Response]:
724
+ """Get all manual accounts
725
+
726
+ Retrieve a list of all manually-managed accounts associated with the user's account.
727
+
728
+ :param _request_timeout: timeout setting for this request. If one
729
+ number provided, it will be total request
730
+ timeout. It can also be a pair (tuple) of
731
+ (connection, read) timeouts.
732
+ :type _request_timeout: int, tuple(int, int), optional
733
+ :param _request_auth: set to override the auth_settings for an a single
734
+ request; this effectively ignores the
735
+ authentication in the spec for a single request.
736
+ :type _request_auth: dict, optional
737
+ :param _content_type: force content-type for the request.
738
+ :type _content_type: str, Optional
739
+ :param _headers: set to override the headers for a single
740
+ request; this effectively ignores the headers
741
+ in the spec for a single request.
742
+ :type _headers: dict, optional
743
+ :param _host_index: set to override the host_index for a single
744
+ request; this effectively ignores the host_index
745
+ in the spec for a single request.
746
+ :type _host_index: int, optional
747
+ :return: Returns the result object.
748
+ """ # noqa: E501
749
+
750
+ _param = self._get_all_manual_accounts_serialize(
751
+ _request_auth=_request_auth,
752
+ _content_type=_content_type,
753
+ _headers=_headers,
754
+ _host_index=_host_index
755
+ )
756
+
757
+ _response_types_map: Dict[str, Optional[str]] = {
758
+ '200': "GetAllManualAccounts200Response",
759
+ '400': "ErrorResponseObject",
760
+ '401': "ErrorResponseObject",
761
+ '429': "ErrorResponseObject",
762
+ '500': "ErrorResponseObject",
763
+ }
764
+ response_data = self.api_client.call_api(
765
+ *_param,
766
+ _request_timeout=_request_timeout
767
+ )
768
+ response_data.read()
769
+ return self.api_client.response_deserialize(
770
+ response_data=response_data,
771
+ response_types_map=_response_types_map,
772
+ )
773
+
774
+
775
+ @validate_call
776
+ def get_all_manual_accounts_without_preload_content(
777
+ self,
778
+ _request_timeout: Union[
779
+ None,
780
+ Annotated[StrictFloat, Field(gt=0)],
781
+ Tuple[
782
+ Annotated[StrictFloat, Field(gt=0)],
783
+ Annotated[StrictFloat, Field(gt=0)]
784
+ ]
785
+ ] = None,
786
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
787
+ _content_type: Optional[StrictStr] = None,
788
+ _headers: Optional[Dict[StrictStr, Any]] = None,
789
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
790
+ ) -> RESTResponseType:
791
+ """Get all manual accounts
792
+
793
+ Retrieve a list of all manually-managed accounts associated with the user's account.
794
+
795
+ :param _request_timeout: timeout setting for this request. If one
796
+ number provided, it will be total request
797
+ timeout. It can also be a pair (tuple) of
798
+ (connection, read) timeouts.
799
+ :type _request_timeout: int, tuple(int, int), optional
800
+ :param _request_auth: set to override the auth_settings for an a single
801
+ request; this effectively ignores the
802
+ authentication in the spec for a single request.
803
+ :type _request_auth: dict, optional
804
+ :param _content_type: force content-type for the request.
805
+ :type _content_type: str, Optional
806
+ :param _headers: set to override the headers for a single
807
+ request; this effectively ignores the headers
808
+ in the spec for a single request.
809
+ :type _headers: dict, optional
810
+ :param _host_index: set to override the host_index for a single
811
+ request; this effectively ignores the host_index
812
+ in the spec for a single request.
813
+ :type _host_index: int, optional
814
+ :return: Returns the result object.
815
+ """ # noqa: E501
816
+
817
+ _param = self._get_all_manual_accounts_serialize(
818
+ _request_auth=_request_auth,
819
+ _content_type=_content_type,
820
+ _headers=_headers,
821
+ _host_index=_host_index
822
+ )
823
+
824
+ _response_types_map: Dict[str, Optional[str]] = {
825
+ '200': "GetAllManualAccounts200Response",
826
+ '400': "ErrorResponseObject",
827
+ '401': "ErrorResponseObject",
828
+ '429': "ErrorResponseObject",
829
+ '500': "ErrorResponseObject",
830
+ }
831
+ response_data = self.api_client.call_api(
832
+ *_param,
833
+ _request_timeout=_request_timeout
834
+ )
835
+ return response_data.response
836
+
837
+
838
+ def _get_all_manual_accounts_serialize(
839
+ self,
840
+ _request_auth,
841
+ _content_type,
842
+ _headers,
843
+ _host_index,
844
+ ) -> RequestSerialized:
845
+
846
+ _host = None
847
+
848
+ _collection_formats: Dict[str, str] = {
849
+ }
850
+
851
+ _path_params: Dict[str, str] = {}
852
+ _query_params: List[Tuple[str, str]] = []
853
+ _header_params: Dict[str, Optional[str]] = _headers or {}
854
+ _form_params: List[Tuple[str, str]] = []
855
+ _files: Dict[
856
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
857
+ ] = {}
858
+ _body_params: Optional[bytes] = None
859
+
860
+ # process the path parameters
861
+ # process the query parameters
862
+ # process the header parameters
863
+ # process the form parameters
864
+ # process the body parameter
865
+
866
+
867
+ # set the HTTP header `Accept`
868
+ if 'Accept' not in _header_params:
869
+ _header_params['Accept'] = self.api_client.select_header_accept(
870
+ [
871
+ 'application/json'
872
+ ]
873
+ )
874
+
875
+
876
+ # authentication setting
877
+ _auth_settings: List[str] = [
878
+ 'cookieAuth',
879
+ 'bearerSecurity'
880
+ ]
881
+
882
+ return self.api_client.param_serialize(
883
+ method='GET',
884
+ resource_path='/manual_accounts',
885
+ path_params=_path_params,
886
+ query_params=_query_params,
887
+ header_params=_header_params,
888
+ body=_body_params,
889
+ post_params=_form_params,
890
+ files=_files,
891
+ auth_settings=_auth_settings,
892
+ collection_formats=_collection_formats,
893
+ _host=_host,
894
+ _request_auth=_request_auth
895
+ )
896
+
897
+
898
+
899
+
900
+ @validate_call
901
+ def get_manual_account_by_id(
902
+ self,
903
+ id: Annotated[StrictInt, Field(description="ID of the manual account to retrieve")],
904
+ _request_timeout: Union[
905
+ None,
906
+ Annotated[StrictFloat, Field(gt=0)],
907
+ Tuple[
908
+ Annotated[StrictFloat, Field(gt=0)],
909
+ Annotated[StrictFloat, Field(gt=0)]
910
+ ]
911
+ ] = None,
912
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
913
+ _content_type: Optional[StrictStr] = None,
914
+ _headers: Optional[Dict[StrictStr, Any]] = None,
915
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
916
+ ) -> ManualAccountObject:
917
+ """Get a single manual account
918
+
919
+ Retrieve the details of the manual account with the specified ID.
920
+
921
+ :param id: ID of the manual account to retrieve (required)
922
+ :type id: int
923
+ :param _request_timeout: timeout setting for this request. If one
924
+ number provided, it will be total request
925
+ timeout. It can also be a pair (tuple) of
926
+ (connection, read) timeouts.
927
+ :type _request_timeout: int, tuple(int, int), optional
928
+ :param _request_auth: set to override the auth_settings for an a single
929
+ request; this effectively ignores the
930
+ authentication in the spec for a single request.
931
+ :type _request_auth: dict, optional
932
+ :param _content_type: force content-type for the request.
933
+ :type _content_type: str, Optional
934
+ :param _headers: set to override the headers for a single
935
+ request; this effectively ignores the headers
936
+ in the spec for a single request.
937
+ :type _headers: dict, optional
938
+ :param _host_index: set to override the host_index for a single
939
+ request; this effectively ignores the host_index
940
+ in the spec for a single request.
941
+ :type _host_index: int, optional
942
+ :return: Returns the result object.
943
+ """ # noqa: E501
944
+
945
+ _param = self._get_manual_account_by_id_serialize(
946
+ id=id,
947
+ _request_auth=_request_auth,
948
+ _content_type=_content_type,
949
+ _headers=_headers,
950
+ _host_index=_host_index
951
+ )
952
+
953
+ _response_types_map: Dict[str, Optional[str]] = {
954
+ '200': "ManualAccountObject",
955
+ '400': "ErrorResponseObject",
956
+ '401': "ErrorResponseObject",
957
+ '404': "ErrorResponseObject",
958
+ '429': "ErrorResponseObject",
959
+ '500': "ErrorResponseObject",
960
+ }
961
+ response_data = self.api_client.call_api(
962
+ *_param,
963
+ _request_timeout=_request_timeout
964
+ )
965
+ response_data.read()
966
+ return self.api_client.response_deserialize(
967
+ response_data=response_data,
968
+ response_types_map=_response_types_map,
969
+ ).data
970
+
971
+
972
+ @validate_call
973
+ def get_manual_account_by_id_with_http_info(
974
+ self,
975
+ id: Annotated[StrictInt, Field(description="ID of the manual account to retrieve")],
976
+ _request_timeout: Union[
977
+ None,
978
+ Annotated[StrictFloat, Field(gt=0)],
979
+ Tuple[
980
+ Annotated[StrictFloat, Field(gt=0)],
981
+ Annotated[StrictFloat, Field(gt=0)]
982
+ ]
983
+ ] = None,
984
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
985
+ _content_type: Optional[StrictStr] = None,
986
+ _headers: Optional[Dict[StrictStr, Any]] = None,
987
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
988
+ ) -> ApiResponse[ManualAccountObject]:
989
+ """Get a single manual account
990
+
991
+ Retrieve the details of the manual account with the specified ID.
992
+
993
+ :param id: ID of the manual account to retrieve (required)
994
+ :type id: int
995
+ :param _request_timeout: timeout setting for this request. If one
996
+ number provided, it will be total request
997
+ timeout. It can also be a pair (tuple) of
998
+ (connection, read) timeouts.
999
+ :type _request_timeout: int, tuple(int, int), optional
1000
+ :param _request_auth: set to override the auth_settings for an a single
1001
+ request; this effectively ignores the
1002
+ authentication in the spec for a single request.
1003
+ :type _request_auth: dict, optional
1004
+ :param _content_type: force content-type for the request.
1005
+ :type _content_type: str, Optional
1006
+ :param _headers: set to override the headers for a single
1007
+ request; this effectively ignores the headers
1008
+ in the spec for a single request.
1009
+ :type _headers: dict, optional
1010
+ :param _host_index: set to override the host_index for a single
1011
+ request; this effectively ignores the host_index
1012
+ in the spec for a single request.
1013
+ :type _host_index: int, optional
1014
+ :return: Returns the result object.
1015
+ """ # noqa: E501
1016
+
1017
+ _param = self._get_manual_account_by_id_serialize(
1018
+ id=id,
1019
+ _request_auth=_request_auth,
1020
+ _content_type=_content_type,
1021
+ _headers=_headers,
1022
+ _host_index=_host_index
1023
+ )
1024
+
1025
+ _response_types_map: Dict[str, Optional[str]] = {
1026
+ '200': "ManualAccountObject",
1027
+ '400': "ErrorResponseObject",
1028
+ '401': "ErrorResponseObject",
1029
+ '404': "ErrorResponseObject",
1030
+ '429': "ErrorResponseObject",
1031
+ '500': "ErrorResponseObject",
1032
+ }
1033
+ response_data = self.api_client.call_api(
1034
+ *_param,
1035
+ _request_timeout=_request_timeout
1036
+ )
1037
+ response_data.read()
1038
+ return self.api_client.response_deserialize(
1039
+ response_data=response_data,
1040
+ response_types_map=_response_types_map,
1041
+ )
1042
+
1043
+
1044
+ @validate_call
1045
+ def get_manual_account_by_id_without_preload_content(
1046
+ self,
1047
+ id: Annotated[StrictInt, Field(description="ID of the manual account to retrieve")],
1048
+ _request_timeout: Union[
1049
+ None,
1050
+ Annotated[StrictFloat, Field(gt=0)],
1051
+ Tuple[
1052
+ Annotated[StrictFloat, Field(gt=0)],
1053
+ Annotated[StrictFloat, Field(gt=0)]
1054
+ ]
1055
+ ] = None,
1056
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1057
+ _content_type: Optional[StrictStr] = None,
1058
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1059
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1060
+ ) -> RESTResponseType:
1061
+ """Get a single manual account
1062
+
1063
+ Retrieve the details of the manual account with the specified ID.
1064
+
1065
+ :param id: ID of the manual account to retrieve (required)
1066
+ :type id: int
1067
+ :param _request_timeout: timeout setting for this request. If one
1068
+ number provided, it will be total request
1069
+ timeout. It can also be a pair (tuple) of
1070
+ (connection, read) timeouts.
1071
+ :type _request_timeout: int, tuple(int, int), optional
1072
+ :param _request_auth: set to override the auth_settings for an a single
1073
+ request; this effectively ignores the
1074
+ authentication in the spec for a single request.
1075
+ :type _request_auth: dict, optional
1076
+ :param _content_type: force content-type for the request.
1077
+ :type _content_type: str, Optional
1078
+ :param _headers: set to override the headers for a single
1079
+ request; this effectively ignores the headers
1080
+ in the spec for a single request.
1081
+ :type _headers: dict, optional
1082
+ :param _host_index: set to override the host_index for a single
1083
+ request; this effectively ignores the host_index
1084
+ in the spec for a single request.
1085
+ :type _host_index: int, optional
1086
+ :return: Returns the result object.
1087
+ """ # noqa: E501
1088
+
1089
+ _param = self._get_manual_account_by_id_serialize(
1090
+ id=id,
1091
+ _request_auth=_request_auth,
1092
+ _content_type=_content_type,
1093
+ _headers=_headers,
1094
+ _host_index=_host_index
1095
+ )
1096
+
1097
+ _response_types_map: Dict[str, Optional[str]] = {
1098
+ '200': "ManualAccountObject",
1099
+ '400': "ErrorResponseObject",
1100
+ '401': "ErrorResponseObject",
1101
+ '404': "ErrorResponseObject",
1102
+ '429': "ErrorResponseObject",
1103
+ '500': "ErrorResponseObject",
1104
+ }
1105
+ response_data = self.api_client.call_api(
1106
+ *_param,
1107
+ _request_timeout=_request_timeout
1108
+ )
1109
+ return response_data.response
1110
+
1111
+
1112
+ def _get_manual_account_by_id_serialize(
1113
+ self,
1114
+ id,
1115
+ _request_auth,
1116
+ _content_type,
1117
+ _headers,
1118
+ _host_index,
1119
+ ) -> RequestSerialized:
1120
+
1121
+ _host = None
1122
+
1123
+ _collection_formats: Dict[str, str] = {
1124
+ }
1125
+
1126
+ _path_params: Dict[str, str] = {}
1127
+ _query_params: List[Tuple[str, str]] = []
1128
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1129
+ _form_params: List[Tuple[str, str]] = []
1130
+ _files: Dict[
1131
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1132
+ ] = {}
1133
+ _body_params: Optional[bytes] = None
1134
+
1135
+ # process the path parameters
1136
+ if id is not None:
1137
+ _path_params['id'] = id
1138
+ # process the query parameters
1139
+ # process the header parameters
1140
+ # process the form parameters
1141
+ # process the body parameter
1142
+
1143
+
1144
+ # set the HTTP header `Accept`
1145
+ if 'Accept' not in _header_params:
1146
+ _header_params['Accept'] = self.api_client.select_header_accept(
1147
+ [
1148
+ 'application/json'
1149
+ ]
1150
+ )
1151
+
1152
+
1153
+ # authentication setting
1154
+ _auth_settings: List[str] = [
1155
+ 'cookieAuth',
1156
+ 'bearerSecurity'
1157
+ ]
1158
+
1159
+ return self.api_client.param_serialize(
1160
+ method='GET',
1161
+ resource_path='/manual_accounts/{id}',
1162
+ path_params=_path_params,
1163
+ query_params=_query_params,
1164
+ header_params=_header_params,
1165
+ body=_body_params,
1166
+ post_params=_form_params,
1167
+ files=_files,
1168
+ auth_settings=_auth_settings,
1169
+ collection_formats=_collection_formats,
1170
+ _host=_host,
1171
+ _request_auth=_request_auth
1172
+ )
1173
+
1174
+
1175
+
1176
+
1177
+ @validate_call
1178
+ def update_manual_account(
1179
+ self,
1180
+ id: Annotated[StrictInt, Field(description="ID of the manual account to update")],
1181
+ update_manual_account_request_object: UpdateManualAccountRequestObject,
1182
+ _request_timeout: Union[
1183
+ None,
1184
+ Annotated[StrictFloat, Field(gt=0)],
1185
+ Tuple[
1186
+ Annotated[StrictFloat, Field(gt=0)],
1187
+ Annotated[StrictFloat, Field(gt=0)]
1188
+ ]
1189
+ ] = None,
1190
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1191
+ _content_type: Optional[StrictStr] = None,
1192
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1193
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1194
+ ) -> ManualAccountObject:
1195
+ """Update an existing manual account
1196
+
1197
+ Modifies the properties of an existing manual account.<br><br> You may submit the response from a `GET /manual_accounts/{id}` as the request body, however only certain properties can be updated using this API. The following system set properties are accepted in the request body but their values will be ignored: `id`, `to_base`, `created_at`, and `updated_at`.<br><br> It is also possible to provide only the properties to be updated in the request body, as long as the request includes at least one of the properties that is not listed above. For example a request body that contains only a `name` property is valid.<br><br>
1198
+
1199
+ :param id: ID of the manual account to update (required)
1200
+ :type id: int
1201
+ :param update_manual_account_request_object: (required)
1202
+ :type update_manual_account_request_object: UpdateManualAccountRequestObject
1203
+ :param _request_timeout: timeout setting for this request. If one
1204
+ number provided, it will be total request
1205
+ timeout. It can also be a pair (tuple) of
1206
+ (connection, read) timeouts.
1207
+ :type _request_timeout: int, tuple(int, int), optional
1208
+ :param _request_auth: set to override the auth_settings for an a single
1209
+ request; this effectively ignores the
1210
+ authentication in the spec for a single request.
1211
+ :type _request_auth: dict, optional
1212
+ :param _content_type: force content-type for the request.
1213
+ :type _content_type: str, Optional
1214
+ :param _headers: set to override the headers for a single
1215
+ request; this effectively ignores the headers
1216
+ in the spec for a single request.
1217
+ :type _headers: dict, optional
1218
+ :param _host_index: set to override the host_index for a single
1219
+ request; this effectively ignores the host_index
1220
+ in the spec for a single request.
1221
+ :type _host_index: int, optional
1222
+ :return: Returns the result object.
1223
+ """ # noqa: E501
1224
+
1225
+ _param = self._update_manual_account_serialize(
1226
+ id=id,
1227
+ update_manual_account_request_object=update_manual_account_request_object,
1228
+ _request_auth=_request_auth,
1229
+ _content_type=_content_type,
1230
+ _headers=_headers,
1231
+ _host_index=_host_index
1232
+ )
1233
+
1234
+ _response_types_map: Dict[str, Optional[str]] = {
1235
+ '200': "ManualAccountObject",
1236
+ '400': "ErrorResponseObject",
1237
+ '401': "ErrorResponseObject",
1238
+ '404': "ErrorResponseObject",
1239
+ '429': "ErrorResponseObject",
1240
+ '500': "ErrorResponseObject",
1241
+ }
1242
+ response_data = self.api_client.call_api(
1243
+ *_param,
1244
+ _request_timeout=_request_timeout
1245
+ )
1246
+ response_data.read()
1247
+ return self.api_client.response_deserialize(
1248
+ response_data=response_data,
1249
+ response_types_map=_response_types_map,
1250
+ ).data
1251
+
1252
+
1253
+ @validate_call
1254
+ def update_manual_account_with_http_info(
1255
+ self,
1256
+ id: Annotated[StrictInt, Field(description="ID of the manual account to update")],
1257
+ update_manual_account_request_object: UpdateManualAccountRequestObject,
1258
+ _request_timeout: Union[
1259
+ None,
1260
+ Annotated[StrictFloat, Field(gt=0)],
1261
+ Tuple[
1262
+ Annotated[StrictFloat, Field(gt=0)],
1263
+ Annotated[StrictFloat, Field(gt=0)]
1264
+ ]
1265
+ ] = None,
1266
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1267
+ _content_type: Optional[StrictStr] = None,
1268
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1269
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1270
+ ) -> ApiResponse[ManualAccountObject]:
1271
+ """Update an existing manual account
1272
+
1273
+ Modifies the properties of an existing manual account.<br><br> You may submit the response from a `GET /manual_accounts/{id}` as the request body, however only certain properties can be updated using this API. The following system set properties are accepted in the request body but their values will be ignored: `id`, `to_base`, `created_at`, and `updated_at`.<br><br> It is also possible to provide only the properties to be updated in the request body, as long as the request includes at least one of the properties that is not listed above. For example a request body that contains only a `name` property is valid.<br><br>
1274
+
1275
+ :param id: ID of the manual account to update (required)
1276
+ :type id: int
1277
+ :param update_manual_account_request_object: (required)
1278
+ :type update_manual_account_request_object: UpdateManualAccountRequestObject
1279
+ :param _request_timeout: timeout setting for this request. If one
1280
+ number provided, it will be total request
1281
+ timeout. It can also be a pair (tuple) of
1282
+ (connection, read) timeouts.
1283
+ :type _request_timeout: int, tuple(int, int), optional
1284
+ :param _request_auth: set to override the auth_settings for an a single
1285
+ request; this effectively ignores the
1286
+ authentication in the spec for a single request.
1287
+ :type _request_auth: dict, optional
1288
+ :param _content_type: force content-type for the request.
1289
+ :type _content_type: str, Optional
1290
+ :param _headers: set to override the headers for a single
1291
+ request; this effectively ignores the headers
1292
+ in the spec for a single request.
1293
+ :type _headers: dict, optional
1294
+ :param _host_index: set to override the host_index for a single
1295
+ request; this effectively ignores the host_index
1296
+ in the spec for a single request.
1297
+ :type _host_index: int, optional
1298
+ :return: Returns the result object.
1299
+ """ # noqa: E501
1300
+
1301
+ _param = self._update_manual_account_serialize(
1302
+ id=id,
1303
+ update_manual_account_request_object=update_manual_account_request_object,
1304
+ _request_auth=_request_auth,
1305
+ _content_type=_content_type,
1306
+ _headers=_headers,
1307
+ _host_index=_host_index
1308
+ )
1309
+
1310
+ _response_types_map: Dict[str, Optional[str]] = {
1311
+ '200': "ManualAccountObject",
1312
+ '400': "ErrorResponseObject",
1313
+ '401': "ErrorResponseObject",
1314
+ '404': "ErrorResponseObject",
1315
+ '429': "ErrorResponseObject",
1316
+ '500': "ErrorResponseObject",
1317
+ }
1318
+ response_data = self.api_client.call_api(
1319
+ *_param,
1320
+ _request_timeout=_request_timeout
1321
+ )
1322
+ response_data.read()
1323
+ return self.api_client.response_deserialize(
1324
+ response_data=response_data,
1325
+ response_types_map=_response_types_map,
1326
+ )
1327
+
1328
+
1329
+ @validate_call
1330
+ def update_manual_account_without_preload_content(
1331
+ self,
1332
+ id: Annotated[StrictInt, Field(description="ID of the manual account to update")],
1333
+ update_manual_account_request_object: UpdateManualAccountRequestObject,
1334
+ _request_timeout: Union[
1335
+ None,
1336
+ Annotated[StrictFloat, Field(gt=0)],
1337
+ Tuple[
1338
+ Annotated[StrictFloat, Field(gt=0)],
1339
+ Annotated[StrictFloat, Field(gt=0)]
1340
+ ]
1341
+ ] = None,
1342
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1343
+ _content_type: Optional[StrictStr] = None,
1344
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1345
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1346
+ ) -> RESTResponseType:
1347
+ """Update an existing manual account
1348
+
1349
+ Modifies the properties of an existing manual account.<br><br> You may submit the response from a `GET /manual_accounts/{id}` as the request body, however only certain properties can be updated using this API. The following system set properties are accepted in the request body but their values will be ignored: `id`, `to_base`, `created_at`, and `updated_at`.<br><br> It is also possible to provide only the properties to be updated in the request body, as long as the request includes at least one of the properties that is not listed above. For example a request body that contains only a `name` property is valid.<br><br>
1350
+
1351
+ :param id: ID of the manual account to update (required)
1352
+ :type id: int
1353
+ :param update_manual_account_request_object: (required)
1354
+ :type update_manual_account_request_object: UpdateManualAccountRequestObject
1355
+ :param _request_timeout: timeout setting for this request. If one
1356
+ number provided, it will be total request
1357
+ timeout. It can also be a pair (tuple) of
1358
+ (connection, read) timeouts.
1359
+ :type _request_timeout: int, tuple(int, int), optional
1360
+ :param _request_auth: set to override the auth_settings for an a single
1361
+ request; this effectively ignores the
1362
+ authentication in the spec for a single request.
1363
+ :type _request_auth: dict, optional
1364
+ :param _content_type: force content-type for the request.
1365
+ :type _content_type: str, Optional
1366
+ :param _headers: set to override the headers for a single
1367
+ request; this effectively ignores the headers
1368
+ in the spec for a single request.
1369
+ :type _headers: dict, optional
1370
+ :param _host_index: set to override the host_index for a single
1371
+ request; this effectively ignores the host_index
1372
+ in the spec for a single request.
1373
+ :type _host_index: int, optional
1374
+ :return: Returns the result object.
1375
+ """ # noqa: E501
1376
+
1377
+ _param = self._update_manual_account_serialize(
1378
+ id=id,
1379
+ update_manual_account_request_object=update_manual_account_request_object,
1380
+ _request_auth=_request_auth,
1381
+ _content_type=_content_type,
1382
+ _headers=_headers,
1383
+ _host_index=_host_index
1384
+ )
1385
+
1386
+ _response_types_map: Dict[str, Optional[str]] = {
1387
+ '200': "ManualAccountObject",
1388
+ '400': "ErrorResponseObject",
1389
+ '401': "ErrorResponseObject",
1390
+ '404': "ErrorResponseObject",
1391
+ '429': "ErrorResponseObject",
1392
+ '500': "ErrorResponseObject",
1393
+ }
1394
+ response_data = self.api_client.call_api(
1395
+ *_param,
1396
+ _request_timeout=_request_timeout
1397
+ )
1398
+ return response_data.response
1399
+
1400
+
1401
+ def _update_manual_account_serialize(
1402
+ self,
1403
+ id,
1404
+ update_manual_account_request_object,
1405
+ _request_auth,
1406
+ _content_type,
1407
+ _headers,
1408
+ _host_index,
1409
+ ) -> RequestSerialized:
1410
+
1411
+ _host = None
1412
+
1413
+ _collection_formats: Dict[str, str] = {
1414
+ }
1415
+
1416
+ _path_params: Dict[str, str] = {}
1417
+ _query_params: List[Tuple[str, str]] = []
1418
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1419
+ _form_params: List[Tuple[str, str]] = []
1420
+ _files: Dict[
1421
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1422
+ ] = {}
1423
+ _body_params: Optional[bytes] = None
1424
+
1425
+ # process the path parameters
1426
+ if id is not None:
1427
+ _path_params['id'] = id
1428
+ # process the query parameters
1429
+ # process the header parameters
1430
+ # process the form parameters
1431
+ # process the body parameter
1432
+ if update_manual_account_request_object is not None:
1433
+ _body_params = update_manual_account_request_object
1434
+
1435
+
1436
+ # set the HTTP header `Accept`
1437
+ if 'Accept' not in _header_params:
1438
+ _header_params['Accept'] = self.api_client.select_header_accept(
1439
+ [
1440
+ 'application/json'
1441
+ ]
1442
+ )
1443
+
1444
+ # set the HTTP header `Content-Type`
1445
+ if _content_type:
1446
+ _header_params['Content-Type'] = _content_type
1447
+ else:
1448
+ _default_content_type = (
1449
+ self.api_client.select_header_content_type(
1450
+ [
1451
+ 'application/json'
1452
+ ]
1453
+ )
1454
+ )
1455
+ if _default_content_type is not None:
1456
+ _header_params['Content-Type'] = _default_content_type
1457
+
1458
+ # authentication setting
1459
+ _auth_settings: List[str] = [
1460
+ 'cookieAuth',
1461
+ 'bearerSecurity'
1462
+ ]
1463
+
1464
+ return self.api_client.param_serialize(
1465
+ method='PUT',
1466
+ resource_path='/manual_accounts/{id}',
1467
+ path_params=_path_params,
1468
+ query_params=_query_params,
1469
+ header_params=_header_params,
1470
+ body=_body_params,
1471
+ post_params=_form_params,
1472
+ files=_files,
1473
+ auth_settings=_auth_settings,
1474
+ collection_formats=_collection_formats,
1475
+ _host=_host,
1476
+ _request_auth=_request_auth
1477
+ )
1478
+
1479
+