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,293 @@
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 lunchmoney.models.user_object import UserObject
21
+
22
+ from lunchmoney.api_client import ApiClient, RequestSerialized
23
+ from lunchmoney.api_response import ApiResponse
24
+ from lunchmoney.rest import RESTResponseType
25
+
26
+
27
+ class MeApi:
28
+ """NOTE: This class is auto generated by OpenAPI Generator
29
+ Ref: https://openapi-generator.tech
30
+
31
+ Do not edit the class manually.
32
+ """
33
+
34
+ def __init__(self, api_client=None) -> None:
35
+ if api_client is None:
36
+ api_client = ApiClient.get_default()
37
+ self.api_client = api_client
38
+
39
+
40
+ @validate_call
41
+ def get_me(
42
+ self,
43
+ _request_timeout: Union[
44
+ None,
45
+ Annotated[StrictFloat, Field(gt=0)],
46
+ Tuple[
47
+ Annotated[StrictFloat, Field(gt=0)],
48
+ Annotated[StrictFloat, Field(gt=0)]
49
+ ]
50
+ ] = None,
51
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
52
+ _content_type: Optional[StrictStr] = None,
53
+ _headers: Optional[Dict[StrictStr, Any]] = None,
54
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
55
+ ) -> UserObject:
56
+ """Get current user
57
+
58
+ Get details about the user associated with the supplied authorization token.
59
+
60
+ :param _request_timeout: timeout setting for this request. If one
61
+ number provided, it will be total request
62
+ timeout. It can also be a pair (tuple) of
63
+ (connection, read) timeouts.
64
+ :type _request_timeout: int, tuple(int, int), optional
65
+ :param _request_auth: set to override the auth_settings for an a single
66
+ request; this effectively ignores the
67
+ authentication in the spec for a single request.
68
+ :type _request_auth: dict, optional
69
+ :param _content_type: force content-type for the request.
70
+ :type _content_type: str, Optional
71
+ :param _headers: set to override the headers for a single
72
+ request; this effectively ignores the headers
73
+ in the spec for a single request.
74
+ :type _headers: dict, optional
75
+ :param _host_index: set to override the host_index for a single
76
+ request; this effectively ignores the host_index
77
+ in the spec for a single request.
78
+ :type _host_index: int, optional
79
+ :return: Returns the result object.
80
+ """ # noqa: E501
81
+
82
+ _param = self._get_me_serialize(
83
+ _request_auth=_request_auth,
84
+ _content_type=_content_type,
85
+ _headers=_headers,
86
+ _host_index=_host_index
87
+ )
88
+
89
+ _response_types_map: Dict[str, Optional[str]] = {
90
+ '200': "UserObject",
91
+ '401': "ErrorResponseObject",
92
+ '429': "ErrorResponseObject",
93
+ '500': "ErrorResponseObject",
94
+ }
95
+ response_data = self.api_client.call_api(
96
+ *_param,
97
+ _request_timeout=_request_timeout
98
+ )
99
+ response_data.read()
100
+ return self.api_client.response_deserialize(
101
+ response_data=response_data,
102
+ response_types_map=_response_types_map,
103
+ ).data
104
+
105
+
106
+ @validate_call
107
+ def get_me_with_http_info(
108
+ self,
109
+ _request_timeout: Union[
110
+ None,
111
+ Annotated[StrictFloat, Field(gt=0)],
112
+ Tuple[
113
+ Annotated[StrictFloat, Field(gt=0)],
114
+ Annotated[StrictFloat, Field(gt=0)]
115
+ ]
116
+ ] = None,
117
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
118
+ _content_type: Optional[StrictStr] = None,
119
+ _headers: Optional[Dict[StrictStr, Any]] = None,
120
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
121
+ ) -> ApiResponse[UserObject]:
122
+ """Get current user
123
+
124
+ Get details about the user associated with the supplied authorization token.
125
+
126
+ :param _request_timeout: timeout setting for this request. If one
127
+ number provided, it will be total request
128
+ timeout. It can also be a pair (tuple) of
129
+ (connection, read) timeouts.
130
+ :type _request_timeout: int, tuple(int, int), optional
131
+ :param _request_auth: set to override the auth_settings for an a single
132
+ request; this effectively ignores the
133
+ authentication in the spec for a single request.
134
+ :type _request_auth: dict, optional
135
+ :param _content_type: force content-type for the request.
136
+ :type _content_type: str, Optional
137
+ :param _headers: set to override the headers for a single
138
+ request; this effectively ignores the headers
139
+ in the spec for a single request.
140
+ :type _headers: dict, optional
141
+ :param _host_index: set to override the host_index for a single
142
+ request; this effectively ignores the host_index
143
+ in the spec for a single request.
144
+ :type _host_index: int, optional
145
+ :return: Returns the result object.
146
+ """ # noqa: E501
147
+
148
+ _param = self._get_me_serialize(
149
+ _request_auth=_request_auth,
150
+ _content_type=_content_type,
151
+ _headers=_headers,
152
+ _host_index=_host_index
153
+ )
154
+
155
+ _response_types_map: Dict[str, Optional[str]] = {
156
+ '200': "UserObject",
157
+ '401': "ErrorResponseObject",
158
+ '429': "ErrorResponseObject",
159
+ '500': "ErrorResponseObject",
160
+ }
161
+ response_data = self.api_client.call_api(
162
+ *_param,
163
+ _request_timeout=_request_timeout
164
+ )
165
+ response_data.read()
166
+ return self.api_client.response_deserialize(
167
+ response_data=response_data,
168
+ response_types_map=_response_types_map,
169
+ )
170
+
171
+
172
+ @validate_call
173
+ def get_me_without_preload_content(
174
+ self,
175
+ _request_timeout: Union[
176
+ None,
177
+ Annotated[StrictFloat, Field(gt=0)],
178
+ Tuple[
179
+ Annotated[StrictFloat, Field(gt=0)],
180
+ Annotated[StrictFloat, Field(gt=0)]
181
+ ]
182
+ ] = None,
183
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
184
+ _content_type: Optional[StrictStr] = None,
185
+ _headers: Optional[Dict[StrictStr, Any]] = None,
186
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
187
+ ) -> RESTResponseType:
188
+ """Get current user
189
+
190
+ Get details about the user associated with the supplied authorization token.
191
+
192
+ :param _request_timeout: timeout setting for this request. If one
193
+ number provided, it will be total request
194
+ timeout. It can also be a pair (tuple) of
195
+ (connection, read) timeouts.
196
+ :type _request_timeout: int, tuple(int, int), optional
197
+ :param _request_auth: set to override the auth_settings for an a single
198
+ request; this effectively ignores the
199
+ authentication in the spec for a single request.
200
+ :type _request_auth: dict, optional
201
+ :param _content_type: force content-type for the request.
202
+ :type _content_type: str, Optional
203
+ :param _headers: set to override the headers for a single
204
+ request; this effectively ignores the headers
205
+ in the spec for a single request.
206
+ :type _headers: dict, optional
207
+ :param _host_index: set to override the host_index for a single
208
+ request; this effectively ignores the host_index
209
+ in the spec for a single request.
210
+ :type _host_index: int, optional
211
+ :return: Returns the result object.
212
+ """ # noqa: E501
213
+
214
+ _param = self._get_me_serialize(
215
+ _request_auth=_request_auth,
216
+ _content_type=_content_type,
217
+ _headers=_headers,
218
+ _host_index=_host_index
219
+ )
220
+
221
+ _response_types_map: Dict[str, Optional[str]] = {
222
+ '200': "UserObject",
223
+ '401': "ErrorResponseObject",
224
+ '429': "ErrorResponseObject",
225
+ '500': "ErrorResponseObject",
226
+ }
227
+ response_data = self.api_client.call_api(
228
+ *_param,
229
+ _request_timeout=_request_timeout
230
+ )
231
+ return response_data.response
232
+
233
+
234
+ def _get_me_serialize(
235
+ self,
236
+ _request_auth,
237
+ _content_type,
238
+ _headers,
239
+ _host_index,
240
+ ) -> RequestSerialized:
241
+
242
+ _host = None
243
+
244
+ _collection_formats: Dict[str, str] = {
245
+ }
246
+
247
+ _path_params: Dict[str, str] = {}
248
+ _query_params: List[Tuple[str, str]] = []
249
+ _header_params: Dict[str, Optional[str]] = _headers or {}
250
+ _form_params: List[Tuple[str, str]] = []
251
+ _files: Dict[
252
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
253
+ ] = {}
254
+ _body_params: Optional[bytes] = None
255
+
256
+ # process the path parameters
257
+ # process the query parameters
258
+ # process the header parameters
259
+ # process the form parameters
260
+ # process the body parameter
261
+
262
+
263
+ # set the HTTP header `Accept`
264
+ if 'Accept' not in _header_params:
265
+ _header_params['Accept'] = self.api_client.select_header_accept(
266
+ [
267
+ 'application/json'
268
+ ]
269
+ )
270
+
271
+
272
+ # authentication setting
273
+ _auth_settings: List[str] = [
274
+ 'cookieAuth',
275
+ 'bearerSecurity'
276
+ ]
277
+
278
+ return self.api_client.param_serialize(
279
+ method='GET',
280
+ resource_path='/me',
281
+ path_params=_path_params,
282
+ query_params=_query_params,
283
+ header_params=_header_params,
284
+ body=_body_params,
285
+ post_params=_form_params,
286
+ files=_files,
287
+ auth_settings=_auth_settings,
288
+ collection_formats=_collection_formats,
289
+ _host=_host,
290
+ _request_auth=_request_auth
291
+ )
292
+
293
+