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.
- lunchmoney/__init__.py +205 -0
- lunchmoney/api/__init__.py +16 -0
- lunchmoney/api/categories_api.py +1499 -0
- lunchmoney/api/manual_accounts_api.py +1479 -0
- lunchmoney/api/me_api.py +293 -0
- lunchmoney/api/plaid_accounts_api.py +909 -0
- lunchmoney/api/recurring_items_api.py +702 -0
- lunchmoney/api/summary_api.py +434 -0
- lunchmoney/api/tags_api.py +1465 -0
- lunchmoney/api/transactions_api.py +914 -0
- lunchmoney/api/transactions_bulk_api.py +1527 -0
- lunchmoney/api/transactions_files_api.py +891 -0
- lunchmoney/api/transactions_group_api.py +601 -0
- lunchmoney/api/transactions_split_api.py +616 -0
- lunchmoney/api_client.py +805 -0
- lunchmoney/api_response.py +21 -0
- lunchmoney/configuration.py +620 -0
- lunchmoney/exceptions.py +217 -0
- lunchmoney/models/__init__.py +84 -0
- lunchmoney/models/account_type_enum.py +46 -0
- lunchmoney/models/aligned_category_totals_object.py +108 -0
- lunchmoney/models/aligned_summary_category_object.py +110 -0
- lunchmoney/models/aligned_summary_response_object.py +104 -0
- lunchmoney/models/category_object.py +146 -0
- lunchmoney/models/child_category_object.py +141 -0
- lunchmoney/models/child_transaction_object.py +219 -0
- lunchmoney/models/create_category_request_object.py +137 -0
- lunchmoney/models/create_category_request_object_children_inner.py +159 -0
- lunchmoney/models/create_manual_account_request_object.py +138 -0
- lunchmoney/models/create_manual_account_request_object_balance.py +145 -0
- lunchmoney/models/create_new_transactions_request.py +103 -0
- lunchmoney/models/create_tag_request_object.py +112 -0
- lunchmoney/models/currency_enum.py +198 -0
- lunchmoney/models/delete_category_response_with_dependencies.py +94 -0
- lunchmoney/models/delete_category_response_with_dependencies_dependents.py +98 -0
- lunchmoney/models/delete_tag_response_with_dependencies.py +94 -0
- lunchmoney/models/delete_tag_response_with_dependencies_dependents.py +90 -0
- lunchmoney/models/delete_transactions_request.py +89 -0
- lunchmoney/models/error_response_object.py +98 -0
- lunchmoney/models/error_response_object_errors_inner.py +101 -0
- lunchmoney/models/get_all_categories200_response.py +96 -0
- lunchmoney/models/get_all_manual_accounts200_response.py +96 -0
- lunchmoney/models/get_all_plaid_accounts200_response.py +96 -0
- lunchmoney/models/get_all_recurring200_response.py +96 -0
- lunchmoney/models/get_all_tags200_response.py +96 -0
- lunchmoney/models/get_all_transactions200_response.py +100 -0
- lunchmoney/models/get_all_transactions_created_since_parameter.py +145 -0
- lunchmoney/models/get_budget_summary200_response.py +138 -0
- lunchmoney/models/get_transaction_attachment_url200_response.py +91 -0
- lunchmoney/models/group_transactions_request.py +122 -0
- lunchmoney/models/insert_transaction_object.py +164 -0
- lunchmoney/models/insert_transaction_object_amount.py +145 -0
- lunchmoney/models/insert_transactions_response_object.py +106 -0
- lunchmoney/models/manual_account_object.py +158 -0
- lunchmoney/models/non_aligned_category_totals_object.py +94 -0
- lunchmoney/models/non_aligned_summary_category_object.py +94 -0
- lunchmoney/models/non_aligned_summary_response_object.py +104 -0
- lunchmoney/models/plaid_account_object.py +168 -0
- lunchmoney/models/recurring_object.py +143 -0
- lunchmoney/models/recurring_object_matches.py +105 -0
- lunchmoney/models/recurring_object_matches_found_transactions_inner.py +91 -0
- lunchmoney/models/recurring_object_overrides.py +92 -0
- lunchmoney/models/recurring_object_transaction_criteria.py +149 -0
- lunchmoney/models/skipped_existing_external_id_object.py +108 -0
- lunchmoney/models/split_transaction_object.py +102 -0
- lunchmoney/models/split_transaction_object_amount.py +145 -0
- lunchmoney/models/split_transaction_request.py +97 -0
- lunchmoney/models/summary_category_occurrence_object.py +126 -0
- lunchmoney/models/summary_recurring_transaction_object.py +100 -0
- lunchmoney/models/summary_rollover_pool_adjustment_object.py +98 -0
- lunchmoney/models/summary_rollover_pool_object.py +98 -0
- lunchmoney/models/summary_totals_breakdown_object.py +98 -0
- lunchmoney/models/summary_totals_object.py +97 -0
- lunchmoney/models/tag_object.py +125 -0
- lunchmoney/models/transaction_attachment_object.py +106 -0
- lunchmoney/models/transaction_object.py +229 -0
- lunchmoney/models/update_category_request_object.py +156 -0
- lunchmoney/models/update_manual_account_request_object.py +156 -0
- lunchmoney/models/update_manual_account_request_object_balance.py +145 -0
- lunchmoney/models/update_tag_request_object.py +126 -0
- lunchmoney/models/update_transaction_object.py +228 -0
- lunchmoney/models/update_transaction_object_amount.py +145 -0
- lunchmoney/models/update_transactions200_response.py +96 -0
- lunchmoney/models/update_transactions_request.py +97 -0
- lunchmoney/models/update_transactions_request_transactions_inner.py +228 -0
- lunchmoney/models/user_object.py +106 -0
- lunchmoney/py.typed +0 -0
- lunchmoney/rest.py +259 -0
- lunchmoney_python-2.9.0.dist-info/METADATA +285 -0
- lunchmoney_python-2.9.0.dist-info/RECORD +92 -0
- lunchmoney_python-2.9.0.dist-info/WHEEL +5 -0
- lunchmoney_python-2.9.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1527 @@
|
|
|
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 datetime import date
|
|
21
|
+
from pydantic import Field, StrictBool, StrictInt, StrictStr, field_validator
|
|
22
|
+
from typing import Any, Optional
|
|
23
|
+
from typing_extensions import Annotated
|
|
24
|
+
from lunchmoney.models.create_new_transactions_request import CreateNewTransactionsRequest
|
|
25
|
+
from lunchmoney.models.delete_transactions_request import DeleteTransactionsRequest
|
|
26
|
+
from lunchmoney.models.get_all_transactions200_response import GetAllTransactions200Response
|
|
27
|
+
from lunchmoney.models.insert_transactions_response_object import InsertTransactionsResponseObject
|
|
28
|
+
from lunchmoney.models.update_transactions200_response import UpdateTransactions200Response
|
|
29
|
+
from lunchmoney.models.update_transactions_request import UpdateTransactionsRequest
|
|
30
|
+
|
|
31
|
+
from lunchmoney.api_client import ApiClient, RequestSerialized
|
|
32
|
+
from lunchmoney.api_response import ApiResponse
|
|
33
|
+
from lunchmoney.rest import RESTResponseType
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class TransactionsBulkApi:
|
|
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 create_new_transactions(
|
|
51
|
+
self,
|
|
52
|
+
create_new_transactions_request: CreateNewTransactionsRequest,
|
|
53
|
+
_request_timeout: Union[
|
|
54
|
+
None,
|
|
55
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
56
|
+
Tuple[
|
|
57
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
58
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
59
|
+
]
|
|
60
|
+
] = None,
|
|
61
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
62
|
+
_content_type: Optional[StrictStr] = None,
|
|
63
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
64
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
65
|
+
) -> InsertTransactionsResponseObject:
|
|
66
|
+
"""Insert one or more transactions.
|
|
67
|
+
|
|
68
|
+
Use this endpoint to add transactions to a budget.<br><br> The request body for this endpoint must include a list of transactions with at least one transaction and not more than 500 transactions to insert.<br><br> The successful request to this endpoint will return a response body which will include two arrays: <br> - `transactions`: A list of transactions that were successfully inserted.<br> - `skipped_duplicates`: A list of transactions that were duplicates of existing transactions and were not inserted.
|
|
69
|
+
|
|
70
|
+
:param create_new_transactions_request: (required)
|
|
71
|
+
:type create_new_transactions_request: CreateNewTransactionsRequest
|
|
72
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
73
|
+
number provided, it will be total request
|
|
74
|
+
timeout. It can also be a pair (tuple) of
|
|
75
|
+
(connection, read) timeouts.
|
|
76
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
77
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
78
|
+
request; this effectively ignores the
|
|
79
|
+
authentication in the spec for a single request.
|
|
80
|
+
:type _request_auth: dict, optional
|
|
81
|
+
:param _content_type: force content-type for the request.
|
|
82
|
+
:type _content_type: str, Optional
|
|
83
|
+
:param _headers: set to override the headers for a single
|
|
84
|
+
request; this effectively ignores the headers
|
|
85
|
+
in the spec for a single request.
|
|
86
|
+
:type _headers: dict, optional
|
|
87
|
+
:param _host_index: set to override the host_index for a single
|
|
88
|
+
request; this effectively ignores the host_index
|
|
89
|
+
in the spec for a single request.
|
|
90
|
+
:type _host_index: int, optional
|
|
91
|
+
:return: Returns the result object.
|
|
92
|
+
""" # noqa: E501
|
|
93
|
+
|
|
94
|
+
_param = self._create_new_transactions_serialize(
|
|
95
|
+
create_new_transactions_request=create_new_transactions_request,
|
|
96
|
+
_request_auth=_request_auth,
|
|
97
|
+
_content_type=_content_type,
|
|
98
|
+
_headers=_headers,
|
|
99
|
+
_host_index=_host_index
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
103
|
+
'201': "InsertTransactionsResponseObject",
|
|
104
|
+
'400': "ErrorResponseObject",
|
|
105
|
+
'401': "ErrorResponseObject",
|
|
106
|
+
'429': "ErrorResponseObject",
|
|
107
|
+
'500': "ErrorResponseObject",
|
|
108
|
+
}
|
|
109
|
+
response_data = self.api_client.call_api(
|
|
110
|
+
*_param,
|
|
111
|
+
_request_timeout=_request_timeout
|
|
112
|
+
)
|
|
113
|
+
response_data.read()
|
|
114
|
+
return self.api_client.response_deserialize(
|
|
115
|
+
response_data=response_data,
|
|
116
|
+
response_types_map=_response_types_map,
|
|
117
|
+
).data
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
@validate_call
|
|
121
|
+
def create_new_transactions_with_http_info(
|
|
122
|
+
self,
|
|
123
|
+
create_new_transactions_request: CreateNewTransactionsRequest,
|
|
124
|
+
_request_timeout: Union[
|
|
125
|
+
None,
|
|
126
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
127
|
+
Tuple[
|
|
128
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
129
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
130
|
+
]
|
|
131
|
+
] = None,
|
|
132
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
133
|
+
_content_type: Optional[StrictStr] = None,
|
|
134
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
135
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
136
|
+
) -> ApiResponse[InsertTransactionsResponseObject]:
|
|
137
|
+
"""Insert one or more transactions.
|
|
138
|
+
|
|
139
|
+
Use this endpoint to add transactions to a budget.<br><br> The request body for this endpoint must include a list of transactions with at least one transaction and not more than 500 transactions to insert.<br><br> The successful request to this endpoint will return a response body which will include two arrays: <br> - `transactions`: A list of transactions that were successfully inserted.<br> - `skipped_duplicates`: A list of transactions that were duplicates of existing transactions and were not inserted.
|
|
140
|
+
|
|
141
|
+
:param create_new_transactions_request: (required)
|
|
142
|
+
:type create_new_transactions_request: CreateNewTransactionsRequest
|
|
143
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
144
|
+
number provided, it will be total request
|
|
145
|
+
timeout. It can also be a pair (tuple) of
|
|
146
|
+
(connection, read) timeouts.
|
|
147
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
148
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
149
|
+
request; this effectively ignores the
|
|
150
|
+
authentication in the spec for a single request.
|
|
151
|
+
:type _request_auth: dict, optional
|
|
152
|
+
:param _content_type: force content-type for the request.
|
|
153
|
+
:type _content_type: str, Optional
|
|
154
|
+
:param _headers: set to override the headers for a single
|
|
155
|
+
request; this effectively ignores the headers
|
|
156
|
+
in the spec for a single request.
|
|
157
|
+
:type _headers: dict, optional
|
|
158
|
+
:param _host_index: set to override the host_index for a single
|
|
159
|
+
request; this effectively ignores the host_index
|
|
160
|
+
in the spec for a single request.
|
|
161
|
+
:type _host_index: int, optional
|
|
162
|
+
:return: Returns the result object.
|
|
163
|
+
""" # noqa: E501
|
|
164
|
+
|
|
165
|
+
_param = self._create_new_transactions_serialize(
|
|
166
|
+
create_new_transactions_request=create_new_transactions_request,
|
|
167
|
+
_request_auth=_request_auth,
|
|
168
|
+
_content_type=_content_type,
|
|
169
|
+
_headers=_headers,
|
|
170
|
+
_host_index=_host_index
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
174
|
+
'201': "InsertTransactionsResponseObject",
|
|
175
|
+
'400': "ErrorResponseObject",
|
|
176
|
+
'401': "ErrorResponseObject",
|
|
177
|
+
'429': "ErrorResponseObject",
|
|
178
|
+
'500': "ErrorResponseObject",
|
|
179
|
+
}
|
|
180
|
+
response_data = self.api_client.call_api(
|
|
181
|
+
*_param,
|
|
182
|
+
_request_timeout=_request_timeout
|
|
183
|
+
)
|
|
184
|
+
response_data.read()
|
|
185
|
+
return self.api_client.response_deserialize(
|
|
186
|
+
response_data=response_data,
|
|
187
|
+
response_types_map=_response_types_map,
|
|
188
|
+
)
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
@validate_call
|
|
192
|
+
def create_new_transactions_without_preload_content(
|
|
193
|
+
self,
|
|
194
|
+
create_new_transactions_request: CreateNewTransactionsRequest,
|
|
195
|
+
_request_timeout: Union[
|
|
196
|
+
None,
|
|
197
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
198
|
+
Tuple[
|
|
199
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
200
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
201
|
+
]
|
|
202
|
+
] = None,
|
|
203
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
204
|
+
_content_type: Optional[StrictStr] = None,
|
|
205
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
206
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
207
|
+
) -> RESTResponseType:
|
|
208
|
+
"""Insert one or more transactions.
|
|
209
|
+
|
|
210
|
+
Use this endpoint to add transactions to a budget.<br><br> The request body for this endpoint must include a list of transactions with at least one transaction and not more than 500 transactions to insert.<br><br> The successful request to this endpoint will return a response body which will include two arrays: <br> - `transactions`: A list of transactions that were successfully inserted.<br> - `skipped_duplicates`: A list of transactions that were duplicates of existing transactions and were not inserted.
|
|
211
|
+
|
|
212
|
+
:param create_new_transactions_request: (required)
|
|
213
|
+
:type create_new_transactions_request: CreateNewTransactionsRequest
|
|
214
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
215
|
+
number provided, it will be total request
|
|
216
|
+
timeout. It can also be a pair (tuple) of
|
|
217
|
+
(connection, read) timeouts.
|
|
218
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
219
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
220
|
+
request; this effectively ignores the
|
|
221
|
+
authentication in the spec for a single request.
|
|
222
|
+
:type _request_auth: dict, optional
|
|
223
|
+
:param _content_type: force content-type for the request.
|
|
224
|
+
:type _content_type: str, Optional
|
|
225
|
+
:param _headers: set to override the headers for a single
|
|
226
|
+
request; this effectively ignores the headers
|
|
227
|
+
in the spec for a single request.
|
|
228
|
+
:type _headers: dict, optional
|
|
229
|
+
:param _host_index: set to override the host_index for a single
|
|
230
|
+
request; this effectively ignores the host_index
|
|
231
|
+
in the spec for a single request.
|
|
232
|
+
:type _host_index: int, optional
|
|
233
|
+
:return: Returns the result object.
|
|
234
|
+
""" # noqa: E501
|
|
235
|
+
|
|
236
|
+
_param = self._create_new_transactions_serialize(
|
|
237
|
+
create_new_transactions_request=create_new_transactions_request,
|
|
238
|
+
_request_auth=_request_auth,
|
|
239
|
+
_content_type=_content_type,
|
|
240
|
+
_headers=_headers,
|
|
241
|
+
_host_index=_host_index
|
|
242
|
+
)
|
|
243
|
+
|
|
244
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
245
|
+
'201': "InsertTransactionsResponseObject",
|
|
246
|
+
'400': "ErrorResponseObject",
|
|
247
|
+
'401': "ErrorResponseObject",
|
|
248
|
+
'429': "ErrorResponseObject",
|
|
249
|
+
'500': "ErrorResponseObject",
|
|
250
|
+
}
|
|
251
|
+
response_data = self.api_client.call_api(
|
|
252
|
+
*_param,
|
|
253
|
+
_request_timeout=_request_timeout
|
|
254
|
+
)
|
|
255
|
+
return response_data.response
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
def _create_new_transactions_serialize(
|
|
259
|
+
self,
|
|
260
|
+
create_new_transactions_request,
|
|
261
|
+
_request_auth,
|
|
262
|
+
_content_type,
|
|
263
|
+
_headers,
|
|
264
|
+
_host_index,
|
|
265
|
+
) -> RequestSerialized:
|
|
266
|
+
|
|
267
|
+
_host = None
|
|
268
|
+
|
|
269
|
+
_collection_formats: Dict[str, str] = {
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
_path_params: Dict[str, str] = {}
|
|
273
|
+
_query_params: List[Tuple[str, str]] = []
|
|
274
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
275
|
+
_form_params: List[Tuple[str, str]] = []
|
|
276
|
+
_files: Dict[
|
|
277
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
278
|
+
] = {}
|
|
279
|
+
_body_params: Optional[bytes] = None
|
|
280
|
+
|
|
281
|
+
# process the path parameters
|
|
282
|
+
# process the query parameters
|
|
283
|
+
# process the header parameters
|
|
284
|
+
# process the form parameters
|
|
285
|
+
# process the body parameter
|
|
286
|
+
if create_new_transactions_request is not None:
|
|
287
|
+
_body_params = create_new_transactions_request
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
# set the HTTP header `Accept`
|
|
291
|
+
if 'Accept' not in _header_params:
|
|
292
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
293
|
+
[
|
|
294
|
+
'application/json'
|
|
295
|
+
]
|
|
296
|
+
)
|
|
297
|
+
|
|
298
|
+
# set the HTTP header `Content-Type`
|
|
299
|
+
if _content_type:
|
|
300
|
+
_header_params['Content-Type'] = _content_type
|
|
301
|
+
else:
|
|
302
|
+
_default_content_type = (
|
|
303
|
+
self.api_client.select_header_content_type(
|
|
304
|
+
[
|
|
305
|
+
'application/json'
|
|
306
|
+
]
|
|
307
|
+
)
|
|
308
|
+
)
|
|
309
|
+
if _default_content_type is not None:
|
|
310
|
+
_header_params['Content-Type'] = _default_content_type
|
|
311
|
+
|
|
312
|
+
# authentication setting
|
|
313
|
+
_auth_settings: List[str] = [
|
|
314
|
+
'cookieAuth',
|
|
315
|
+
'bearerSecurity'
|
|
316
|
+
]
|
|
317
|
+
|
|
318
|
+
return self.api_client.param_serialize(
|
|
319
|
+
method='POST',
|
|
320
|
+
resource_path='/transactions',
|
|
321
|
+
path_params=_path_params,
|
|
322
|
+
query_params=_query_params,
|
|
323
|
+
header_params=_header_params,
|
|
324
|
+
body=_body_params,
|
|
325
|
+
post_params=_form_params,
|
|
326
|
+
files=_files,
|
|
327
|
+
auth_settings=_auth_settings,
|
|
328
|
+
collection_formats=_collection_formats,
|
|
329
|
+
_host=_host,
|
|
330
|
+
_request_auth=_request_auth
|
|
331
|
+
)
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
@validate_call
|
|
337
|
+
def delete_transactions(
|
|
338
|
+
self,
|
|
339
|
+
delete_transactions_request: DeleteTransactionsRequest,
|
|
340
|
+
_request_timeout: Union[
|
|
341
|
+
None,
|
|
342
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
343
|
+
Tuple[
|
|
344
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
345
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
346
|
+
]
|
|
347
|
+
] = None,
|
|
348
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
349
|
+
_content_type: Optional[StrictStr] = None,
|
|
350
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
351
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
352
|
+
) -> None:
|
|
353
|
+
"""Bulk delete existing transactions
|
|
354
|
+
|
|
355
|
+
Deletes the transaction with the IDs specified in the request body.<br> If any of the specified transactions are a split transaction or a split parent, or if any are a grouped transactions or part of a transaction group, the request will fail with a suggestion on how to unsplit or ungroup the transaction(s) prior to deletion. This will also fail if any of the specified transaction IDs do not exist.<br> Otherwise, the specified transactions are deleted.<br><br> **Use with caution. This action is not reversible!**
|
|
356
|
+
|
|
357
|
+
:param delete_transactions_request: (required)
|
|
358
|
+
:type delete_transactions_request: DeleteTransactionsRequest
|
|
359
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
360
|
+
number provided, it will be total request
|
|
361
|
+
timeout. It can also be a pair (tuple) of
|
|
362
|
+
(connection, read) timeouts.
|
|
363
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
364
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
365
|
+
request; this effectively ignores the
|
|
366
|
+
authentication in the spec for a single request.
|
|
367
|
+
:type _request_auth: dict, optional
|
|
368
|
+
:param _content_type: force content-type for the request.
|
|
369
|
+
:type _content_type: str, Optional
|
|
370
|
+
:param _headers: set to override the headers for a single
|
|
371
|
+
request; this effectively ignores the headers
|
|
372
|
+
in the spec for a single request.
|
|
373
|
+
:type _headers: dict, optional
|
|
374
|
+
:param _host_index: set to override the host_index for a single
|
|
375
|
+
request; this effectively ignores the host_index
|
|
376
|
+
in the spec for a single request.
|
|
377
|
+
:type _host_index: int, optional
|
|
378
|
+
:return: Returns the result object.
|
|
379
|
+
""" # noqa: E501
|
|
380
|
+
|
|
381
|
+
_param = self._delete_transactions_serialize(
|
|
382
|
+
delete_transactions_request=delete_transactions_request,
|
|
383
|
+
_request_auth=_request_auth,
|
|
384
|
+
_content_type=_content_type,
|
|
385
|
+
_headers=_headers,
|
|
386
|
+
_host_index=_host_index
|
|
387
|
+
)
|
|
388
|
+
|
|
389
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
390
|
+
'204': None,
|
|
391
|
+
'400': "ErrorResponseObject",
|
|
392
|
+
'401': "ErrorResponseObject",
|
|
393
|
+
'404': "ErrorResponseObject",
|
|
394
|
+
'429': "ErrorResponseObject",
|
|
395
|
+
'500': "ErrorResponseObject",
|
|
396
|
+
}
|
|
397
|
+
response_data = self.api_client.call_api(
|
|
398
|
+
*_param,
|
|
399
|
+
_request_timeout=_request_timeout
|
|
400
|
+
)
|
|
401
|
+
response_data.read()
|
|
402
|
+
return self.api_client.response_deserialize(
|
|
403
|
+
response_data=response_data,
|
|
404
|
+
response_types_map=_response_types_map,
|
|
405
|
+
).data
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
@validate_call
|
|
409
|
+
def delete_transactions_with_http_info(
|
|
410
|
+
self,
|
|
411
|
+
delete_transactions_request: DeleteTransactionsRequest,
|
|
412
|
+
_request_timeout: Union[
|
|
413
|
+
None,
|
|
414
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
415
|
+
Tuple[
|
|
416
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
417
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
418
|
+
]
|
|
419
|
+
] = None,
|
|
420
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
421
|
+
_content_type: Optional[StrictStr] = None,
|
|
422
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
423
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
424
|
+
) -> ApiResponse[None]:
|
|
425
|
+
"""Bulk delete existing transactions
|
|
426
|
+
|
|
427
|
+
Deletes the transaction with the IDs specified in the request body.<br> If any of the specified transactions are a split transaction or a split parent, or if any are a grouped transactions or part of a transaction group, the request will fail with a suggestion on how to unsplit or ungroup the transaction(s) prior to deletion. This will also fail if any of the specified transaction IDs do not exist.<br> Otherwise, the specified transactions are deleted.<br><br> **Use with caution. This action is not reversible!**
|
|
428
|
+
|
|
429
|
+
:param delete_transactions_request: (required)
|
|
430
|
+
:type delete_transactions_request: DeleteTransactionsRequest
|
|
431
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
432
|
+
number provided, it will be total request
|
|
433
|
+
timeout. It can also be a pair (tuple) of
|
|
434
|
+
(connection, read) timeouts.
|
|
435
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
436
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
437
|
+
request; this effectively ignores the
|
|
438
|
+
authentication in the spec for a single request.
|
|
439
|
+
:type _request_auth: dict, optional
|
|
440
|
+
:param _content_type: force content-type for the request.
|
|
441
|
+
:type _content_type: str, Optional
|
|
442
|
+
:param _headers: set to override the headers for a single
|
|
443
|
+
request; this effectively ignores the headers
|
|
444
|
+
in the spec for a single request.
|
|
445
|
+
:type _headers: dict, optional
|
|
446
|
+
:param _host_index: set to override the host_index for a single
|
|
447
|
+
request; this effectively ignores the host_index
|
|
448
|
+
in the spec for a single request.
|
|
449
|
+
:type _host_index: int, optional
|
|
450
|
+
:return: Returns the result object.
|
|
451
|
+
""" # noqa: E501
|
|
452
|
+
|
|
453
|
+
_param = self._delete_transactions_serialize(
|
|
454
|
+
delete_transactions_request=delete_transactions_request,
|
|
455
|
+
_request_auth=_request_auth,
|
|
456
|
+
_content_type=_content_type,
|
|
457
|
+
_headers=_headers,
|
|
458
|
+
_host_index=_host_index
|
|
459
|
+
)
|
|
460
|
+
|
|
461
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
462
|
+
'204': None,
|
|
463
|
+
'400': "ErrorResponseObject",
|
|
464
|
+
'401': "ErrorResponseObject",
|
|
465
|
+
'404': "ErrorResponseObject",
|
|
466
|
+
'429': "ErrorResponseObject",
|
|
467
|
+
'500': "ErrorResponseObject",
|
|
468
|
+
}
|
|
469
|
+
response_data = self.api_client.call_api(
|
|
470
|
+
*_param,
|
|
471
|
+
_request_timeout=_request_timeout
|
|
472
|
+
)
|
|
473
|
+
response_data.read()
|
|
474
|
+
return self.api_client.response_deserialize(
|
|
475
|
+
response_data=response_data,
|
|
476
|
+
response_types_map=_response_types_map,
|
|
477
|
+
)
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
@validate_call
|
|
481
|
+
def delete_transactions_without_preload_content(
|
|
482
|
+
self,
|
|
483
|
+
delete_transactions_request: DeleteTransactionsRequest,
|
|
484
|
+
_request_timeout: Union[
|
|
485
|
+
None,
|
|
486
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
487
|
+
Tuple[
|
|
488
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
489
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
490
|
+
]
|
|
491
|
+
] = None,
|
|
492
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
493
|
+
_content_type: Optional[StrictStr] = None,
|
|
494
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
495
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
496
|
+
) -> RESTResponseType:
|
|
497
|
+
"""Bulk delete existing transactions
|
|
498
|
+
|
|
499
|
+
Deletes the transaction with the IDs specified in the request body.<br> If any of the specified transactions are a split transaction or a split parent, or if any are a grouped transactions or part of a transaction group, the request will fail with a suggestion on how to unsplit or ungroup the transaction(s) prior to deletion. This will also fail if any of the specified transaction IDs do not exist.<br> Otherwise, the specified transactions are deleted.<br><br> **Use with caution. This action is not reversible!**
|
|
500
|
+
|
|
501
|
+
:param delete_transactions_request: (required)
|
|
502
|
+
:type delete_transactions_request: DeleteTransactionsRequest
|
|
503
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
504
|
+
number provided, it will be total request
|
|
505
|
+
timeout. It can also be a pair (tuple) of
|
|
506
|
+
(connection, read) timeouts.
|
|
507
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
508
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
509
|
+
request; this effectively ignores the
|
|
510
|
+
authentication in the spec for a single request.
|
|
511
|
+
:type _request_auth: dict, optional
|
|
512
|
+
:param _content_type: force content-type for the request.
|
|
513
|
+
:type _content_type: str, Optional
|
|
514
|
+
:param _headers: set to override the headers for a single
|
|
515
|
+
request; this effectively ignores the headers
|
|
516
|
+
in the spec for a single request.
|
|
517
|
+
:type _headers: dict, optional
|
|
518
|
+
:param _host_index: set to override the host_index for a single
|
|
519
|
+
request; this effectively ignores the host_index
|
|
520
|
+
in the spec for a single request.
|
|
521
|
+
:type _host_index: int, optional
|
|
522
|
+
:return: Returns the result object.
|
|
523
|
+
""" # noqa: E501
|
|
524
|
+
|
|
525
|
+
_param = self._delete_transactions_serialize(
|
|
526
|
+
delete_transactions_request=delete_transactions_request,
|
|
527
|
+
_request_auth=_request_auth,
|
|
528
|
+
_content_type=_content_type,
|
|
529
|
+
_headers=_headers,
|
|
530
|
+
_host_index=_host_index
|
|
531
|
+
)
|
|
532
|
+
|
|
533
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
534
|
+
'204': None,
|
|
535
|
+
'400': "ErrorResponseObject",
|
|
536
|
+
'401': "ErrorResponseObject",
|
|
537
|
+
'404': "ErrorResponseObject",
|
|
538
|
+
'429': "ErrorResponseObject",
|
|
539
|
+
'500': "ErrorResponseObject",
|
|
540
|
+
}
|
|
541
|
+
response_data = self.api_client.call_api(
|
|
542
|
+
*_param,
|
|
543
|
+
_request_timeout=_request_timeout
|
|
544
|
+
)
|
|
545
|
+
return response_data.response
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
def _delete_transactions_serialize(
|
|
549
|
+
self,
|
|
550
|
+
delete_transactions_request,
|
|
551
|
+
_request_auth,
|
|
552
|
+
_content_type,
|
|
553
|
+
_headers,
|
|
554
|
+
_host_index,
|
|
555
|
+
) -> RequestSerialized:
|
|
556
|
+
|
|
557
|
+
_host = None
|
|
558
|
+
|
|
559
|
+
_collection_formats: Dict[str, str] = {
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
_path_params: Dict[str, str] = {}
|
|
563
|
+
_query_params: List[Tuple[str, str]] = []
|
|
564
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
565
|
+
_form_params: List[Tuple[str, str]] = []
|
|
566
|
+
_files: Dict[
|
|
567
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
568
|
+
] = {}
|
|
569
|
+
_body_params: Optional[bytes] = None
|
|
570
|
+
|
|
571
|
+
# process the path parameters
|
|
572
|
+
# process the query parameters
|
|
573
|
+
# process the header parameters
|
|
574
|
+
# process the form parameters
|
|
575
|
+
# process the body parameter
|
|
576
|
+
if delete_transactions_request is not None:
|
|
577
|
+
_body_params = delete_transactions_request
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
# set the HTTP header `Accept`
|
|
581
|
+
if 'Accept' not in _header_params:
|
|
582
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
583
|
+
[
|
|
584
|
+
'application/json'
|
|
585
|
+
]
|
|
586
|
+
)
|
|
587
|
+
|
|
588
|
+
# set the HTTP header `Content-Type`
|
|
589
|
+
if _content_type:
|
|
590
|
+
_header_params['Content-Type'] = _content_type
|
|
591
|
+
else:
|
|
592
|
+
_default_content_type = (
|
|
593
|
+
self.api_client.select_header_content_type(
|
|
594
|
+
[
|
|
595
|
+
'application/json'
|
|
596
|
+
]
|
|
597
|
+
)
|
|
598
|
+
)
|
|
599
|
+
if _default_content_type is not None:
|
|
600
|
+
_header_params['Content-Type'] = _default_content_type
|
|
601
|
+
|
|
602
|
+
# authentication setting
|
|
603
|
+
_auth_settings: List[str] = [
|
|
604
|
+
'cookieAuth',
|
|
605
|
+
'bearerSecurity'
|
|
606
|
+
]
|
|
607
|
+
|
|
608
|
+
return self.api_client.param_serialize(
|
|
609
|
+
method='DELETE',
|
|
610
|
+
resource_path='/transactions',
|
|
611
|
+
path_params=_path_params,
|
|
612
|
+
query_params=_query_params,
|
|
613
|
+
header_params=_header_params,
|
|
614
|
+
body=_body_params,
|
|
615
|
+
post_params=_form_params,
|
|
616
|
+
files=_files,
|
|
617
|
+
auth_settings=_auth_settings,
|
|
618
|
+
collection_formats=_collection_formats,
|
|
619
|
+
_host=_host,
|
|
620
|
+
_request_auth=_request_auth
|
|
621
|
+
)
|
|
622
|
+
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
|
|
626
|
+
@validate_call
|
|
627
|
+
def get_all_transactions(
|
|
628
|
+
self,
|
|
629
|
+
start_date: Annotated[Optional[date], Field(description="Denotes the beginning of the time period to fetch transactions for. If omitted, the most recent transactions will be returned. See `limit`. Required if end_date exists. <br>")] = None,
|
|
630
|
+
end_date: Annotated[Optional[date], Field(description="Denotes the end of the time period you'd like to get transactions for. Required if start_date exists. ")] = None,
|
|
631
|
+
created_since: Annotated[Optional[Any], Field(description="Filter transactions to those created after the specified timestamp. Accepts either a date (YYYY-MM-DD) or ISO 8601 datetime string. Date-only values are interpreted as midnight UTC (00:00:00Z).")] = None,
|
|
632
|
+
updated_since: Annotated[Optional[Any], Field(description="Filter transactions to those updated after the specified timestamp. Accepts either a date (YYYY-MM-DD) or ISO 8601 datetime string. Date-only values are interpreted as midnight UTC (00:00:00Z).")] = None,
|
|
633
|
+
manual_account_id: Annotated[Optional[StrictInt], Field(description="Filter transactions to those associated with specified manual account ID or set this to 0 to omit any transactions from manual accounts. Setting both this and `plaid_account_id` to 0 will return transactions with no account. These are listed as \"Cash Transactions\" in the Lunch Money GUI.<br> Note that transaction groups are not associated with any account. If you want the response to include transactions from transaction groups, set the `include_group_children` query parameter to `true` when filtering by manual accounts.")] = None,
|
|
634
|
+
plaid_account_id: Annotated[Optional[StrictInt], Field(description="Filter transactions to those associated with specified plaid account ID or set this to 0 to omit any transactions from plaid accounts. Setting both this and `manual_account_id` to 0 will return transactions with no account. These are listed as \"Cash Transactions\" in the Lunch Money GUI.<br> Note that transaction groups are not associated with any account. If you want the response to include transactions from transaction groups, set the `include_group_children` query parameter to `true` when filtering by plaid accounts.")] = None,
|
|
635
|
+
recurring_id: Annotated[Optional[StrictInt], Field(description="Filter transactions to those associated with specified Recurring Item ID ")] = None,
|
|
636
|
+
category_id: Annotated[Optional[StrictInt], Field(description="Filter transactions to those associated with the specified category ID. Will also match category groups. Set this to 0 to return only un-categorized transactions")] = None,
|
|
637
|
+
tag_id: Annotated[Optional[StrictInt], Field(description="Filter transactions to those that have a tag with the specified Tag ID")] = None,
|
|
638
|
+
is_group_parent: Annotated[Optional[StrictBool], Field(description="Filter by group (returns only transaction groups if `true`)")] = None,
|
|
639
|
+
status: Annotated[Optional[StrictStr], Field(description="Filter transactions to those with the specified status:<br> - `reviewed`: Only user reviewed transactions or those that were automatically marked as reviewed due to reviewed recurring_item logic<br> - `unreviewed`: Only transactions that need to be reviewed<br> - `delete_pending`: Only transactions that require manual intervention because the plaid account deleted this transaction after it was updated by the user.")] = None,
|
|
640
|
+
is_pending: Annotated[Optional[StrictBool], Field(description="Filter transactions by pending status. Set to `true` to return only pending transactions, or `false` to return only non-pending transactions. When this parameter is set, it takes precedence over `include_pending`. Note: Pending transactions always have a status of `unreviewed`, so when setting this parameter to `true`, either omit the `status` parameter or set it to `unreviewed`. ")] = None,
|
|
641
|
+
include_pending: Annotated[Optional[StrictBool], Field(description="By default, pending transactions are excluded from results. Set to `true` to include imported transactions with a pending status in the results. This query param is ignored if the `is_pending` query param is also set. ")] = None,
|
|
642
|
+
include_metadata: Annotated[Optional[StrictBool], Field(description="By default, custom and plaid metadata are not included in the response. Set to true if you'd like the returned transactions objects to include any metadata associated with the transactions.")] = None,
|
|
643
|
+
include_split_parents: Annotated[Optional[StrictBool], Field(description="By default, transactions that were split into multiple transactions are not included in the response. Set to true if you'd like the returned transactions objects to include any transactions that were split into multiple transactions. Use with caution as this data is normally not exposed after the split transactions are created.")] = None,
|
|
644
|
+
include_group_children: Annotated[Optional[StrictBool], Field(description="By default, individual transactions that joined into a transaction group are not included in the response. Set to true if you'd like the returned transactions objects to include any transactions that joined into a transaction group.")] = None,
|
|
645
|
+
include_children: Annotated[Optional[StrictBool], Field(description="By default, the `children` property is not included in the response. Set to true if you'd like the children property to be populated with the transactions that make up a transaction group, or, if the `include_split_parents` query param is also set, the transactions that were split from a parent transaction.")] = None,
|
|
646
|
+
include_files: Annotated[Optional[StrictBool], Field(description="By default, the `files` property is not included in the response. Set to true if you'd like the responses to include a list of of objects that describe any files attached to the transactions.")] = None,
|
|
647
|
+
limit: Annotated[Optional[Annotated[int, Field(le=2000, strict=True, ge=1)]], Field(description="Sets the maximum number of transactions to return. If more match the filter criteria, the response will include a `has_more` attribute set to `true`. See [Pagination](https://alpha.lunchmoney.dev/v2/pagination)")] = None,
|
|
648
|
+
offset: Annotated[Optional[StrictInt], Field(description="Sets the offset for the records returned. This is typically set automatically in the header. See [Pagination](https://alpha.lunchmoney.dev/v2/pagination)")] = None,
|
|
649
|
+
_request_timeout: Union[
|
|
650
|
+
None,
|
|
651
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
652
|
+
Tuple[
|
|
653
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
654
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
655
|
+
]
|
|
656
|
+
] = None,
|
|
657
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
658
|
+
_content_type: Optional[StrictStr] = None,
|
|
659
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
660
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
661
|
+
) -> GetAllTransactions200Response:
|
|
662
|
+
"""Get all transactions
|
|
663
|
+
|
|
664
|
+
Retrieve a list of all transactions associated with a user's account. <br>If called with no parameters, this endpoint will return the most recent transactions up to `limit` number of transactions.
|
|
665
|
+
|
|
666
|
+
:param start_date: Denotes the beginning of the time period to fetch transactions for. If omitted, the most recent transactions will be returned. See `limit`. Required if end_date exists. <br>
|
|
667
|
+
:type start_date: date
|
|
668
|
+
:param end_date: Denotes the end of the time period you'd like to get transactions for. Required if start_date exists.
|
|
669
|
+
:type end_date: date
|
|
670
|
+
:param created_since: Filter transactions to those created after the specified timestamp. Accepts either a date (YYYY-MM-DD) or ISO 8601 datetime string. Date-only values are interpreted as midnight UTC (00:00:00Z).
|
|
671
|
+
:type created_since: GetAllTransactionsCreatedSinceParameter
|
|
672
|
+
:param updated_since: Filter transactions to those updated after the specified timestamp. Accepts either a date (YYYY-MM-DD) or ISO 8601 datetime string. Date-only values are interpreted as midnight UTC (00:00:00Z).
|
|
673
|
+
:type updated_since: GetAllTransactionsCreatedSinceParameter
|
|
674
|
+
:param manual_account_id: Filter transactions to those associated with specified manual account ID or set this to 0 to omit any transactions from manual accounts. Setting both this and `plaid_account_id` to 0 will return transactions with no account. These are listed as \"Cash Transactions\" in the Lunch Money GUI.<br> Note that transaction groups are not associated with any account. If you want the response to include transactions from transaction groups, set the `include_group_children` query parameter to `true` when filtering by manual accounts.
|
|
675
|
+
:type manual_account_id: int
|
|
676
|
+
:param plaid_account_id: Filter transactions to those associated with specified plaid account ID or set this to 0 to omit any transactions from plaid accounts. Setting both this and `manual_account_id` to 0 will return transactions with no account. These are listed as \"Cash Transactions\" in the Lunch Money GUI.<br> Note that transaction groups are not associated with any account. If you want the response to include transactions from transaction groups, set the `include_group_children` query parameter to `true` when filtering by plaid accounts.
|
|
677
|
+
:type plaid_account_id: int
|
|
678
|
+
:param recurring_id: Filter transactions to those associated with specified Recurring Item ID
|
|
679
|
+
:type recurring_id: int
|
|
680
|
+
:param category_id: Filter transactions to those associated with the specified category ID. Will also match category groups. Set this to 0 to return only un-categorized transactions
|
|
681
|
+
:type category_id: int
|
|
682
|
+
:param tag_id: Filter transactions to those that have a tag with the specified Tag ID
|
|
683
|
+
:type tag_id: int
|
|
684
|
+
:param is_group_parent: Filter by group (returns only transaction groups if `true`)
|
|
685
|
+
:type is_group_parent: bool
|
|
686
|
+
:param status: Filter transactions to those with the specified status:<br> - `reviewed`: Only user reviewed transactions or those that were automatically marked as reviewed due to reviewed recurring_item logic<br> - `unreviewed`: Only transactions that need to be reviewed<br> - `delete_pending`: Only transactions that require manual intervention because the plaid account deleted this transaction after it was updated by the user.
|
|
687
|
+
:type status: str
|
|
688
|
+
:param is_pending: Filter transactions by pending status. Set to `true` to return only pending transactions, or `false` to return only non-pending transactions. When this parameter is set, it takes precedence over `include_pending`. Note: Pending transactions always have a status of `unreviewed`, so when setting this parameter to `true`, either omit the `status` parameter or set it to `unreviewed`.
|
|
689
|
+
:type is_pending: bool
|
|
690
|
+
:param include_pending: By default, pending transactions are excluded from results. Set to `true` to include imported transactions with a pending status in the results. This query param is ignored if the `is_pending` query param is also set.
|
|
691
|
+
:type include_pending: bool
|
|
692
|
+
:param include_metadata: By default, custom and plaid metadata are not included in the response. Set to true if you'd like the returned transactions objects to include any metadata associated with the transactions.
|
|
693
|
+
:type include_metadata: bool
|
|
694
|
+
:param include_split_parents: By default, transactions that were split into multiple transactions are not included in the response. Set to true if you'd like the returned transactions objects to include any transactions that were split into multiple transactions. Use with caution as this data is normally not exposed after the split transactions are created.
|
|
695
|
+
:type include_split_parents: bool
|
|
696
|
+
:param include_group_children: By default, individual transactions that joined into a transaction group are not included in the response. Set to true if you'd like the returned transactions objects to include any transactions that joined into a transaction group.
|
|
697
|
+
:type include_group_children: bool
|
|
698
|
+
:param include_children: By default, the `children` property is not included in the response. Set to true if you'd like the children property to be populated with the transactions that make up a transaction group, or, if the `include_split_parents` query param is also set, the transactions that were split from a parent transaction.
|
|
699
|
+
:type include_children: bool
|
|
700
|
+
:param include_files: By default, the `files` property is not included in the response. Set to true if you'd like the responses to include a list of of objects that describe any files attached to the transactions.
|
|
701
|
+
:type include_files: bool
|
|
702
|
+
:param limit: Sets the maximum number of transactions to return. If more match the filter criteria, the response will include a `has_more` attribute set to `true`. See [Pagination](https://alpha.lunchmoney.dev/v2/pagination)
|
|
703
|
+
:type limit: int
|
|
704
|
+
:param offset: Sets the offset for the records returned. This is typically set automatically in the header. See [Pagination](https://alpha.lunchmoney.dev/v2/pagination)
|
|
705
|
+
:type offset: int
|
|
706
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
707
|
+
number provided, it will be total request
|
|
708
|
+
timeout. It can also be a pair (tuple) of
|
|
709
|
+
(connection, read) timeouts.
|
|
710
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
711
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
712
|
+
request; this effectively ignores the
|
|
713
|
+
authentication in the spec for a single request.
|
|
714
|
+
:type _request_auth: dict, optional
|
|
715
|
+
:param _content_type: force content-type for the request.
|
|
716
|
+
:type _content_type: str, Optional
|
|
717
|
+
:param _headers: set to override the headers for a single
|
|
718
|
+
request; this effectively ignores the headers
|
|
719
|
+
in the spec for a single request.
|
|
720
|
+
:type _headers: dict, optional
|
|
721
|
+
:param _host_index: set to override the host_index for a single
|
|
722
|
+
request; this effectively ignores the host_index
|
|
723
|
+
in the spec for a single request.
|
|
724
|
+
:type _host_index: int, optional
|
|
725
|
+
:return: Returns the result object.
|
|
726
|
+
""" # noqa: E501
|
|
727
|
+
|
|
728
|
+
_param = self._get_all_transactions_serialize(
|
|
729
|
+
start_date=start_date,
|
|
730
|
+
end_date=end_date,
|
|
731
|
+
created_since=created_since,
|
|
732
|
+
updated_since=updated_since,
|
|
733
|
+
manual_account_id=manual_account_id,
|
|
734
|
+
plaid_account_id=plaid_account_id,
|
|
735
|
+
recurring_id=recurring_id,
|
|
736
|
+
category_id=category_id,
|
|
737
|
+
tag_id=tag_id,
|
|
738
|
+
is_group_parent=is_group_parent,
|
|
739
|
+
status=status,
|
|
740
|
+
is_pending=is_pending,
|
|
741
|
+
include_pending=include_pending,
|
|
742
|
+
include_metadata=include_metadata,
|
|
743
|
+
include_split_parents=include_split_parents,
|
|
744
|
+
include_group_children=include_group_children,
|
|
745
|
+
include_children=include_children,
|
|
746
|
+
include_files=include_files,
|
|
747
|
+
limit=limit,
|
|
748
|
+
offset=offset,
|
|
749
|
+
_request_auth=_request_auth,
|
|
750
|
+
_content_type=_content_type,
|
|
751
|
+
_headers=_headers,
|
|
752
|
+
_host_index=_host_index
|
|
753
|
+
)
|
|
754
|
+
|
|
755
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
756
|
+
'200': "GetAllTransactions200Response",
|
|
757
|
+
'400': "ErrorResponseObject",
|
|
758
|
+
'401': "ErrorResponseObject",
|
|
759
|
+
'429': "ErrorResponseObject",
|
|
760
|
+
'500': "ErrorResponseObject",
|
|
761
|
+
}
|
|
762
|
+
response_data = self.api_client.call_api(
|
|
763
|
+
*_param,
|
|
764
|
+
_request_timeout=_request_timeout
|
|
765
|
+
)
|
|
766
|
+
response_data.read()
|
|
767
|
+
return self.api_client.response_deserialize(
|
|
768
|
+
response_data=response_data,
|
|
769
|
+
response_types_map=_response_types_map,
|
|
770
|
+
).data
|
|
771
|
+
|
|
772
|
+
|
|
773
|
+
@validate_call
|
|
774
|
+
def get_all_transactions_with_http_info(
|
|
775
|
+
self,
|
|
776
|
+
start_date: Annotated[Optional[date], Field(description="Denotes the beginning of the time period to fetch transactions for. If omitted, the most recent transactions will be returned. See `limit`. Required if end_date exists. <br>")] = None,
|
|
777
|
+
end_date: Annotated[Optional[date], Field(description="Denotes the end of the time period you'd like to get transactions for. Required if start_date exists. ")] = None,
|
|
778
|
+
created_since: Annotated[Optional[Any], Field(description="Filter transactions to those created after the specified timestamp. Accepts either a date (YYYY-MM-DD) or ISO 8601 datetime string. Date-only values are interpreted as midnight UTC (00:00:00Z).")] = None,
|
|
779
|
+
updated_since: Annotated[Optional[Any], Field(description="Filter transactions to those updated after the specified timestamp. Accepts either a date (YYYY-MM-DD) or ISO 8601 datetime string. Date-only values are interpreted as midnight UTC (00:00:00Z).")] = None,
|
|
780
|
+
manual_account_id: Annotated[Optional[StrictInt], Field(description="Filter transactions to those associated with specified manual account ID or set this to 0 to omit any transactions from manual accounts. Setting both this and `plaid_account_id` to 0 will return transactions with no account. These are listed as \"Cash Transactions\" in the Lunch Money GUI.<br> Note that transaction groups are not associated with any account. If you want the response to include transactions from transaction groups, set the `include_group_children` query parameter to `true` when filtering by manual accounts.")] = None,
|
|
781
|
+
plaid_account_id: Annotated[Optional[StrictInt], Field(description="Filter transactions to those associated with specified plaid account ID or set this to 0 to omit any transactions from plaid accounts. Setting both this and `manual_account_id` to 0 will return transactions with no account. These are listed as \"Cash Transactions\" in the Lunch Money GUI.<br> Note that transaction groups are not associated with any account. If you want the response to include transactions from transaction groups, set the `include_group_children` query parameter to `true` when filtering by plaid accounts.")] = None,
|
|
782
|
+
recurring_id: Annotated[Optional[StrictInt], Field(description="Filter transactions to those associated with specified Recurring Item ID ")] = None,
|
|
783
|
+
category_id: Annotated[Optional[StrictInt], Field(description="Filter transactions to those associated with the specified category ID. Will also match category groups. Set this to 0 to return only un-categorized transactions")] = None,
|
|
784
|
+
tag_id: Annotated[Optional[StrictInt], Field(description="Filter transactions to those that have a tag with the specified Tag ID")] = None,
|
|
785
|
+
is_group_parent: Annotated[Optional[StrictBool], Field(description="Filter by group (returns only transaction groups if `true`)")] = None,
|
|
786
|
+
status: Annotated[Optional[StrictStr], Field(description="Filter transactions to those with the specified status:<br> - `reviewed`: Only user reviewed transactions or those that were automatically marked as reviewed due to reviewed recurring_item logic<br> - `unreviewed`: Only transactions that need to be reviewed<br> - `delete_pending`: Only transactions that require manual intervention because the plaid account deleted this transaction after it was updated by the user.")] = None,
|
|
787
|
+
is_pending: Annotated[Optional[StrictBool], Field(description="Filter transactions by pending status. Set to `true` to return only pending transactions, or `false` to return only non-pending transactions. When this parameter is set, it takes precedence over `include_pending`. Note: Pending transactions always have a status of `unreviewed`, so when setting this parameter to `true`, either omit the `status` parameter or set it to `unreviewed`. ")] = None,
|
|
788
|
+
include_pending: Annotated[Optional[StrictBool], Field(description="By default, pending transactions are excluded from results. Set to `true` to include imported transactions with a pending status in the results. This query param is ignored if the `is_pending` query param is also set. ")] = None,
|
|
789
|
+
include_metadata: Annotated[Optional[StrictBool], Field(description="By default, custom and plaid metadata are not included in the response. Set to true if you'd like the returned transactions objects to include any metadata associated with the transactions.")] = None,
|
|
790
|
+
include_split_parents: Annotated[Optional[StrictBool], Field(description="By default, transactions that were split into multiple transactions are not included in the response. Set to true if you'd like the returned transactions objects to include any transactions that were split into multiple transactions. Use with caution as this data is normally not exposed after the split transactions are created.")] = None,
|
|
791
|
+
include_group_children: Annotated[Optional[StrictBool], Field(description="By default, individual transactions that joined into a transaction group are not included in the response. Set to true if you'd like the returned transactions objects to include any transactions that joined into a transaction group.")] = None,
|
|
792
|
+
include_children: Annotated[Optional[StrictBool], Field(description="By default, the `children` property is not included in the response. Set to true if you'd like the children property to be populated with the transactions that make up a transaction group, or, if the `include_split_parents` query param is also set, the transactions that were split from a parent transaction.")] = None,
|
|
793
|
+
include_files: Annotated[Optional[StrictBool], Field(description="By default, the `files` property is not included in the response. Set to true if you'd like the responses to include a list of of objects that describe any files attached to the transactions.")] = None,
|
|
794
|
+
limit: Annotated[Optional[Annotated[int, Field(le=2000, strict=True, ge=1)]], Field(description="Sets the maximum number of transactions to return. If more match the filter criteria, the response will include a `has_more` attribute set to `true`. See [Pagination](https://alpha.lunchmoney.dev/v2/pagination)")] = None,
|
|
795
|
+
offset: Annotated[Optional[StrictInt], Field(description="Sets the offset for the records returned. This is typically set automatically in the header. See [Pagination](https://alpha.lunchmoney.dev/v2/pagination)")] = None,
|
|
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
|
+
) -> ApiResponse[GetAllTransactions200Response]:
|
|
809
|
+
"""Get all transactions
|
|
810
|
+
|
|
811
|
+
Retrieve a list of all transactions associated with a user's account. <br>If called with no parameters, this endpoint will return the most recent transactions up to `limit` number of transactions.
|
|
812
|
+
|
|
813
|
+
:param start_date: Denotes the beginning of the time period to fetch transactions for. If omitted, the most recent transactions will be returned. See `limit`. Required if end_date exists. <br>
|
|
814
|
+
:type start_date: date
|
|
815
|
+
:param end_date: Denotes the end of the time period you'd like to get transactions for. Required if start_date exists.
|
|
816
|
+
:type end_date: date
|
|
817
|
+
:param created_since: Filter transactions to those created after the specified timestamp. Accepts either a date (YYYY-MM-DD) or ISO 8601 datetime string. Date-only values are interpreted as midnight UTC (00:00:00Z).
|
|
818
|
+
:type created_since: GetAllTransactionsCreatedSinceParameter
|
|
819
|
+
:param updated_since: Filter transactions to those updated after the specified timestamp. Accepts either a date (YYYY-MM-DD) or ISO 8601 datetime string. Date-only values are interpreted as midnight UTC (00:00:00Z).
|
|
820
|
+
:type updated_since: GetAllTransactionsCreatedSinceParameter
|
|
821
|
+
:param manual_account_id: Filter transactions to those associated with specified manual account ID or set this to 0 to omit any transactions from manual accounts. Setting both this and `plaid_account_id` to 0 will return transactions with no account. These are listed as \"Cash Transactions\" in the Lunch Money GUI.<br> Note that transaction groups are not associated with any account. If you want the response to include transactions from transaction groups, set the `include_group_children` query parameter to `true` when filtering by manual accounts.
|
|
822
|
+
:type manual_account_id: int
|
|
823
|
+
:param plaid_account_id: Filter transactions to those associated with specified plaid account ID or set this to 0 to omit any transactions from plaid accounts. Setting both this and `manual_account_id` to 0 will return transactions with no account. These are listed as \"Cash Transactions\" in the Lunch Money GUI.<br> Note that transaction groups are not associated with any account. If you want the response to include transactions from transaction groups, set the `include_group_children` query parameter to `true` when filtering by plaid accounts.
|
|
824
|
+
:type plaid_account_id: int
|
|
825
|
+
:param recurring_id: Filter transactions to those associated with specified Recurring Item ID
|
|
826
|
+
:type recurring_id: int
|
|
827
|
+
:param category_id: Filter transactions to those associated with the specified category ID. Will also match category groups. Set this to 0 to return only un-categorized transactions
|
|
828
|
+
:type category_id: int
|
|
829
|
+
:param tag_id: Filter transactions to those that have a tag with the specified Tag ID
|
|
830
|
+
:type tag_id: int
|
|
831
|
+
:param is_group_parent: Filter by group (returns only transaction groups if `true`)
|
|
832
|
+
:type is_group_parent: bool
|
|
833
|
+
:param status: Filter transactions to those with the specified status:<br> - `reviewed`: Only user reviewed transactions or those that were automatically marked as reviewed due to reviewed recurring_item logic<br> - `unreviewed`: Only transactions that need to be reviewed<br> - `delete_pending`: Only transactions that require manual intervention because the plaid account deleted this transaction after it was updated by the user.
|
|
834
|
+
:type status: str
|
|
835
|
+
:param is_pending: Filter transactions by pending status. Set to `true` to return only pending transactions, or `false` to return only non-pending transactions. When this parameter is set, it takes precedence over `include_pending`. Note: Pending transactions always have a status of `unreviewed`, so when setting this parameter to `true`, either omit the `status` parameter or set it to `unreviewed`.
|
|
836
|
+
:type is_pending: bool
|
|
837
|
+
:param include_pending: By default, pending transactions are excluded from results. Set to `true` to include imported transactions with a pending status in the results. This query param is ignored if the `is_pending` query param is also set.
|
|
838
|
+
:type include_pending: bool
|
|
839
|
+
:param include_metadata: By default, custom and plaid metadata are not included in the response. Set to true if you'd like the returned transactions objects to include any metadata associated with the transactions.
|
|
840
|
+
:type include_metadata: bool
|
|
841
|
+
:param include_split_parents: By default, transactions that were split into multiple transactions are not included in the response. Set to true if you'd like the returned transactions objects to include any transactions that were split into multiple transactions. Use with caution as this data is normally not exposed after the split transactions are created.
|
|
842
|
+
:type include_split_parents: bool
|
|
843
|
+
:param include_group_children: By default, individual transactions that joined into a transaction group are not included in the response. Set to true if you'd like the returned transactions objects to include any transactions that joined into a transaction group.
|
|
844
|
+
:type include_group_children: bool
|
|
845
|
+
:param include_children: By default, the `children` property is not included in the response. Set to true if you'd like the children property to be populated with the transactions that make up a transaction group, or, if the `include_split_parents` query param is also set, the transactions that were split from a parent transaction.
|
|
846
|
+
:type include_children: bool
|
|
847
|
+
:param include_files: By default, the `files` property is not included in the response. Set to true if you'd like the responses to include a list of of objects that describe any files attached to the transactions.
|
|
848
|
+
:type include_files: bool
|
|
849
|
+
:param limit: Sets the maximum number of transactions to return. If more match the filter criteria, the response will include a `has_more` attribute set to `true`. See [Pagination](https://alpha.lunchmoney.dev/v2/pagination)
|
|
850
|
+
:type limit: int
|
|
851
|
+
:param offset: Sets the offset for the records returned. This is typically set automatically in the header. See [Pagination](https://alpha.lunchmoney.dev/v2/pagination)
|
|
852
|
+
:type offset: int
|
|
853
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
854
|
+
number provided, it will be total request
|
|
855
|
+
timeout. It can also be a pair (tuple) of
|
|
856
|
+
(connection, read) timeouts.
|
|
857
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
858
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
859
|
+
request; this effectively ignores the
|
|
860
|
+
authentication in the spec for a single request.
|
|
861
|
+
:type _request_auth: dict, optional
|
|
862
|
+
:param _content_type: force content-type for the request.
|
|
863
|
+
:type _content_type: str, Optional
|
|
864
|
+
:param _headers: set to override the headers for a single
|
|
865
|
+
request; this effectively ignores the headers
|
|
866
|
+
in the spec for a single request.
|
|
867
|
+
:type _headers: dict, optional
|
|
868
|
+
:param _host_index: set to override the host_index for a single
|
|
869
|
+
request; this effectively ignores the host_index
|
|
870
|
+
in the spec for a single request.
|
|
871
|
+
:type _host_index: int, optional
|
|
872
|
+
:return: Returns the result object.
|
|
873
|
+
""" # noqa: E501
|
|
874
|
+
|
|
875
|
+
_param = self._get_all_transactions_serialize(
|
|
876
|
+
start_date=start_date,
|
|
877
|
+
end_date=end_date,
|
|
878
|
+
created_since=created_since,
|
|
879
|
+
updated_since=updated_since,
|
|
880
|
+
manual_account_id=manual_account_id,
|
|
881
|
+
plaid_account_id=plaid_account_id,
|
|
882
|
+
recurring_id=recurring_id,
|
|
883
|
+
category_id=category_id,
|
|
884
|
+
tag_id=tag_id,
|
|
885
|
+
is_group_parent=is_group_parent,
|
|
886
|
+
status=status,
|
|
887
|
+
is_pending=is_pending,
|
|
888
|
+
include_pending=include_pending,
|
|
889
|
+
include_metadata=include_metadata,
|
|
890
|
+
include_split_parents=include_split_parents,
|
|
891
|
+
include_group_children=include_group_children,
|
|
892
|
+
include_children=include_children,
|
|
893
|
+
include_files=include_files,
|
|
894
|
+
limit=limit,
|
|
895
|
+
offset=offset,
|
|
896
|
+
_request_auth=_request_auth,
|
|
897
|
+
_content_type=_content_type,
|
|
898
|
+
_headers=_headers,
|
|
899
|
+
_host_index=_host_index
|
|
900
|
+
)
|
|
901
|
+
|
|
902
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
903
|
+
'200': "GetAllTransactions200Response",
|
|
904
|
+
'400': "ErrorResponseObject",
|
|
905
|
+
'401': "ErrorResponseObject",
|
|
906
|
+
'429': "ErrorResponseObject",
|
|
907
|
+
'500': "ErrorResponseObject",
|
|
908
|
+
}
|
|
909
|
+
response_data = self.api_client.call_api(
|
|
910
|
+
*_param,
|
|
911
|
+
_request_timeout=_request_timeout
|
|
912
|
+
)
|
|
913
|
+
response_data.read()
|
|
914
|
+
return self.api_client.response_deserialize(
|
|
915
|
+
response_data=response_data,
|
|
916
|
+
response_types_map=_response_types_map,
|
|
917
|
+
)
|
|
918
|
+
|
|
919
|
+
|
|
920
|
+
@validate_call
|
|
921
|
+
def get_all_transactions_without_preload_content(
|
|
922
|
+
self,
|
|
923
|
+
start_date: Annotated[Optional[date], Field(description="Denotes the beginning of the time period to fetch transactions for. If omitted, the most recent transactions will be returned. See `limit`. Required if end_date exists. <br>")] = None,
|
|
924
|
+
end_date: Annotated[Optional[date], Field(description="Denotes the end of the time period you'd like to get transactions for. Required if start_date exists. ")] = None,
|
|
925
|
+
created_since: Annotated[Optional[Any], Field(description="Filter transactions to those created after the specified timestamp. Accepts either a date (YYYY-MM-DD) or ISO 8601 datetime string. Date-only values are interpreted as midnight UTC (00:00:00Z).")] = None,
|
|
926
|
+
updated_since: Annotated[Optional[Any], Field(description="Filter transactions to those updated after the specified timestamp. Accepts either a date (YYYY-MM-DD) or ISO 8601 datetime string. Date-only values are interpreted as midnight UTC (00:00:00Z).")] = None,
|
|
927
|
+
manual_account_id: Annotated[Optional[StrictInt], Field(description="Filter transactions to those associated with specified manual account ID or set this to 0 to omit any transactions from manual accounts. Setting both this and `plaid_account_id` to 0 will return transactions with no account. These are listed as \"Cash Transactions\" in the Lunch Money GUI.<br> Note that transaction groups are not associated with any account. If you want the response to include transactions from transaction groups, set the `include_group_children` query parameter to `true` when filtering by manual accounts.")] = None,
|
|
928
|
+
plaid_account_id: Annotated[Optional[StrictInt], Field(description="Filter transactions to those associated with specified plaid account ID or set this to 0 to omit any transactions from plaid accounts. Setting both this and `manual_account_id` to 0 will return transactions with no account. These are listed as \"Cash Transactions\" in the Lunch Money GUI.<br> Note that transaction groups are not associated with any account. If you want the response to include transactions from transaction groups, set the `include_group_children` query parameter to `true` when filtering by plaid accounts.")] = None,
|
|
929
|
+
recurring_id: Annotated[Optional[StrictInt], Field(description="Filter transactions to those associated with specified Recurring Item ID ")] = None,
|
|
930
|
+
category_id: Annotated[Optional[StrictInt], Field(description="Filter transactions to those associated with the specified category ID. Will also match category groups. Set this to 0 to return only un-categorized transactions")] = None,
|
|
931
|
+
tag_id: Annotated[Optional[StrictInt], Field(description="Filter transactions to those that have a tag with the specified Tag ID")] = None,
|
|
932
|
+
is_group_parent: Annotated[Optional[StrictBool], Field(description="Filter by group (returns only transaction groups if `true`)")] = None,
|
|
933
|
+
status: Annotated[Optional[StrictStr], Field(description="Filter transactions to those with the specified status:<br> - `reviewed`: Only user reviewed transactions or those that were automatically marked as reviewed due to reviewed recurring_item logic<br> - `unreviewed`: Only transactions that need to be reviewed<br> - `delete_pending`: Only transactions that require manual intervention because the plaid account deleted this transaction after it was updated by the user.")] = None,
|
|
934
|
+
is_pending: Annotated[Optional[StrictBool], Field(description="Filter transactions by pending status. Set to `true` to return only pending transactions, or `false` to return only non-pending transactions. When this parameter is set, it takes precedence over `include_pending`. Note: Pending transactions always have a status of `unreviewed`, so when setting this parameter to `true`, either omit the `status` parameter or set it to `unreviewed`. ")] = None,
|
|
935
|
+
include_pending: Annotated[Optional[StrictBool], Field(description="By default, pending transactions are excluded from results. Set to `true` to include imported transactions with a pending status in the results. This query param is ignored if the `is_pending` query param is also set. ")] = None,
|
|
936
|
+
include_metadata: Annotated[Optional[StrictBool], Field(description="By default, custom and plaid metadata are not included in the response. Set to true if you'd like the returned transactions objects to include any metadata associated with the transactions.")] = None,
|
|
937
|
+
include_split_parents: Annotated[Optional[StrictBool], Field(description="By default, transactions that were split into multiple transactions are not included in the response. Set to true if you'd like the returned transactions objects to include any transactions that were split into multiple transactions. Use with caution as this data is normally not exposed after the split transactions are created.")] = None,
|
|
938
|
+
include_group_children: Annotated[Optional[StrictBool], Field(description="By default, individual transactions that joined into a transaction group are not included in the response. Set to true if you'd like the returned transactions objects to include any transactions that joined into a transaction group.")] = None,
|
|
939
|
+
include_children: Annotated[Optional[StrictBool], Field(description="By default, the `children` property is not included in the response. Set to true if you'd like the children property to be populated with the transactions that make up a transaction group, or, if the `include_split_parents` query param is also set, the transactions that were split from a parent transaction.")] = None,
|
|
940
|
+
include_files: Annotated[Optional[StrictBool], Field(description="By default, the `files` property is not included in the response. Set to true if you'd like the responses to include a list of of objects that describe any files attached to the transactions.")] = None,
|
|
941
|
+
limit: Annotated[Optional[Annotated[int, Field(le=2000, strict=True, ge=1)]], Field(description="Sets the maximum number of transactions to return. If more match the filter criteria, the response will include a `has_more` attribute set to `true`. See [Pagination](https://alpha.lunchmoney.dev/v2/pagination)")] = None,
|
|
942
|
+
offset: Annotated[Optional[StrictInt], Field(description="Sets the offset for the records returned. This is typically set automatically in the header. See [Pagination](https://alpha.lunchmoney.dev/v2/pagination)")] = None,
|
|
943
|
+
_request_timeout: Union[
|
|
944
|
+
None,
|
|
945
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
946
|
+
Tuple[
|
|
947
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
948
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
949
|
+
]
|
|
950
|
+
] = None,
|
|
951
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
952
|
+
_content_type: Optional[StrictStr] = None,
|
|
953
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
954
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
955
|
+
) -> RESTResponseType:
|
|
956
|
+
"""Get all transactions
|
|
957
|
+
|
|
958
|
+
Retrieve a list of all transactions associated with a user's account. <br>If called with no parameters, this endpoint will return the most recent transactions up to `limit` number of transactions.
|
|
959
|
+
|
|
960
|
+
:param start_date: Denotes the beginning of the time period to fetch transactions for. If omitted, the most recent transactions will be returned. See `limit`. Required if end_date exists. <br>
|
|
961
|
+
:type start_date: date
|
|
962
|
+
:param end_date: Denotes the end of the time period you'd like to get transactions for. Required if start_date exists.
|
|
963
|
+
:type end_date: date
|
|
964
|
+
:param created_since: Filter transactions to those created after the specified timestamp. Accepts either a date (YYYY-MM-DD) or ISO 8601 datetime string. Date-only values are interpreted as midnight UTC (00:00:00Z).
|
|
965
|
+
:type created_since: GetAllTransactionsCreatedSinceParameter
|
|
966
|
+
:param updated_since: Filter transactions to those updated after the specified timestamp. Accepts either a date (YYYY-MM-DD) or ISO 8601 datetime string. Date-only values are interpreted as midnight UTC (00:00:00Z).
|
|
967
|
+
:type updated_since: GetAllTransactionsCreatedSinceParameter
|
|
968
|
+
:param manual_account_id: Filter transactions to those associated with specified manual account ID or set this to 0 to omit any transactions from manual accounts. Setting both this and `plaid_account_id` to 0 will return transactions with no account. These are listed as \"Cash Transactions\" in the Lunch Money GUI.<br> Note that transaction groups are not associated with any account. If you want the response to include transactions from transaction groups, set the `include_group_children` query parameter to `true` when filtering by manual accounts.
|
|
969
|
+
:type manual_account_id: int
|
|
970
|
+
:param plaid_account_id: Filter transactions to those associated with specified plaid account ID or set this to 0 to omit any transactions from plaid accounts. Setting both this and `manual_account_id` to 0 will return transactions with no account. These are listed as \"Cash Transactions\" in the Lunch Money GUI.<br> Note that transaction groups are not associated with any account. If you want the response to include transactions from transaction groups, set the `include_group_children` query parameter to `true` when filtering by plaid accounts.
|
|
971
|
+
:type plaid_account_id: int
|
|
972
|
+
:param recurring_id: Filter transactions to those associated with specified Recurring Item ID
|
|
973
|
+
:type recurring_id: int
|
|
974
|
+
:param category_id: Filter transactions to those associated with the specified category ID. Will also match category groups. Set this to 0 to return only un-categorized transactions
|
|
975
|
+
:type category_id: int
|
|
976
|
+
:param tag_id: Filter transactions to those that have a tag with the specified Tag ID
|
|
977
|
+
:type tag_id: int
|
|
978
|
+
:param is_group_parent: Filter by group (returns only transaction groups if `true`)
|
|
979
|
+
:type is_group_parent: bool
|
|
980
|
+
:param status: Filter transactions to those with the specified status:<br> - `reviewed`: Only user reviewed transactions or those that were automatically marked as reviewed due to reviewed recurring_item logic<br> - `unreviewed`: Only transactions that need to be reviewed<br> - `delete_pending`: Only transactions that require manual intervention because the plaid account deleted this transaction after it was updated by the user.
|
|
981
|
+
:type status: str
|
|
982
|
+
:param is_pending: Filter transactions by pending status. Set to `true` to return only pending transactions, or `false` to return only non-pending transactions. When this parameter is set, it takes precedence over `include_pending`. Note: Pending transactions always have a status of `unreviewed`, so when setting this parameter to `true`, either omit the `status` parameter or set it to `unreviewed`.
|
|
983
|
+
:type is_pending: bool
|
|
984
|
+
:param include_pending: By default, pending transactions are excluded from results. Set to `true` to include imported transactions with a pending status in the results. This query param is ignored if the `is_pending` query param is also set.
|
|
985
|
+
:type include_pending: bool
|
|
986
|
+
:param include_metadata: By default, custom and plaid metadata are not included in the response. Set to true if you'd like the returned transactions objects to include any metadata associated with the transactions.
|
|
987
|
+
:type include_metadata: bool
|
|
988
|
+
:param include_split_parents: By default, transactions that were split into multiple transactions are not included in the response. Set to true if you'd like the returned transactions objects to include any transactions that were split into multiple transactions. Use with caution as this data is normally not exposed after the split transactions are created.
|
|
989
|
+
:type include_split_parents: bool
|
|
990
|
+
:param include_group_children: By default, individual transactions that joined into a transaction group are not included in the response. Set to true if you'd like the returned transactions objects to include any transactions that joined into a transaction group.
|
|
991
|
+
:type include_group_children: bool
|
|
992
|
+
:param include_children: By default, the `children` property is not included in the response. Set to true if you'd like the children property to be populated with the transactions that make up a transaction group, or, if the `include_split_parents` query param is also set, the transactions that were split from a parent transaction.
|
|
993
|
+
:type include_children: bool
|
|
994
|
+
:param include_files: By default, the `files` property is not included in the response. Set to true if you'd like the responses to include a list of of objects that describe any files attached to the transactions.
|
|
995
|
+
:type include_files: bool
|
|
996
|
+
:param limit: Sets the maximum number of transactions to return. If more match the filter criteria, the response will include a `has_more` attribute set to `true`. See [Pagination](https://alpha.lunchmoney.dev/v2/pagination)
|
|
997
|
+
:type limit: int
|
|
998
|
+
:param offset: Sets the offset for the records returned. This is typically set automatically in the header. See [Pagination](https://alpha.lunchmoney.dev/v2/pagination)
|
|
999
|
+
:type offset: int
|
|
1000
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1001
|
+
number provided, it will be total request
|
|
1002
|
+
timeout. It can also be a pair (tuple) of
|
|
1003
|
+
(connection, read) timeouts.
|
|
1004
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1005
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1006
|
+
request; this effectively ignores the
|
|
1007
|
+
authentication in the spec for a single request.
|
|
1008
|
+
:type _request_auth: dict, optional
|
|
1009
|
+
:param _content_type: force content-type for the request.
|
|
1010
|
+
:type _content_type: str, Optional
|
|
1011
|
+
:param _headers: set to override the headers for a single
|
|
1012
|
+
request; this effectively ignores the headers
|
|
1013
|
+
in the spec for a single request.
|
|
1014
|
+
:type _headers: dict, optional
|
|
1015
|
+
:param _host_index: set to override the host_index for a single
|
|
1016
|
+
request; this effectively ignores the host_index
|
|
1017
|
+
in the spec for a single request.
|
|
1018
|
+
:type _host_index: int, optional
|
|
1019
|
+
:return: Returns the result object.
|
|
1020
|
+
""" # noqa: E501
|
|
1021
|
+
|
|
1022
|
+
_param = self._get_all_transactions_serialize(
|
|
1023
|
+
start_date=start_date,
|
|
1024
|
+
end_date=end_date,
|
|
1025
|
+
created_since=created_since,
|
|
1026
|
+
updated_since=updated_since,
|
|
1027
|
+
manual_account_id=manual_account_id,
|
|
1028
|
+
plaid_account_id=plaid_account_id,
|
|
1029
|
+
recurring_id=recurring_id,
|
|
1030
|
+
category_id=category_id,
|
|
1031
|
+
tag_id=tag_id,
|
|
1032
|
+
is_group_parent=is_group_parent,
|
|
1033
|
+
status=status,
|
|
1034
|
+
is_pending=is_pending,
|
|
1035
|
+
include_pending=include_pending,
|
|
1036
|
+
include_metadata=include_metadata,
|
|
1037
|
+
include_split_parents=include_split_parents,
|
|
1038
|
+
include_group_children=include_group_children,
|
|
1039
|
+
include_children=include_children,
|
|
1040
|
+
include_files=include_files,
|
|
1041
|
+
limit=limit,
|
|
1042
|
+
offset=offset,
|
|
1043
|
+
_request_auth=_request_auth,
|
|
1044
|
+
_content_type=_content_type,
|
|
1045
|
+
_headers=_headers,
|
|
1046
|
+
_host_index=_host_index
|
|
1047
|
+
)
|
|
1048
|
+
|
|
1049
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1050
|
+
'200': "GetAllTransactions200Response",
|
|
1051
|
+
'400': "ErrorResponseObject",
|
|
1052
|
+
'401': "ErrorResponseObject",
|
|
1053
|
+
'429': "ErrorResponseObject",
|
|
1054
|
+
'500': "ErrorResponseObject",
|
|
1055
|
+
}
|
|
1056
|
+
response_data = self.api_client.call_api(
|
|
1057
|
+
*_param,
|
|
1058
|
+
_request_timeout=_request_timeout
|
|
1059
|
+
)
|
|
1060
|
+
return response_data.response
|
|
1061
|
+
|
|
1062
|
+
|
|
1063
|
+
def _get_all_transactions_serialize(
|
|
1064
|
+
self,
|
|
1065
|
+
start_date,
|
|
1066
|
+
end_date,
|
|
1067
|
+
created_since,
|
|
1068
|
+
updated_since,
|
|
1069
|
+
manual_account_id,
|
|
1070
|
+
plaid_account_id,
|
|
1071
|
+
recurring_id,
|
|
1072
|
+
category_id,
|
|
1073
|
+
tag_id,
|
|
1074
|
+
is_group_parent,
|
|
1075
|
+
status,
|
|
1076
|
+
is_pending,
|
|
1077
|
+
include_pending,
|
|
1078
|
+
include_metadata,
|
|
1079
|
+
include_split_parents,
|
|
1080
|
+
include_group_children,
|
|
1081
|
+
include_children,
|
|
1082
|
+
include_files,
|
|
1083
|
+
limit,
|
|
1084
|
+
offset,
|
|
1085
|
+
_request_auth,
|
|
1086
|
+
_content_type,
|
|
1087
|
+
_headers,
|
|
1088
|
+
_host_index,
|
|
1089
|
+
) -> RequestSerialized:
|
|
1090
|
+
|
|
1091
|
+
_host = None
|
|
1092
|
+
|
|
1093
|
+
_collection_formats: Dict[str, str] = {
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
_path_params: Dict[str, str] = {}
|
|
1097
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1098
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1099
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1100
|
+
_files: Dict[
|
|
1101
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1102
|
+
] = {}
|
|
1103
|
+
_body_params: Optional[bytes] = None
|
|
1104
|
+
|
|
1105
|
+
# process the path parameters
|
|
1106
|
+
# process the query parameters
|
|
1107
|
+
if start_date is not None:
|
|
1108
|
+
if isinstance(start_date, date):
|
|
1109
|
+
_query_params.append(
|
|
1110
|
+
(
|
|
1111
|
+
'start_date',
|
|
1112
|
+
start_date.strftime(
|
|
1113
|
+
self.api_client.configuration.date_format
|
|
1114
|
+
)
|
|
1115
|
+
)
|
|
1116
|
+
)
|
|
1117
|
+
else:
|
|
1118
|
+
_query_params.append(('start_date', start_date))
|
|
1119
|
+
|
|
1120
|
+
if end_date is not None:
|
|
1121
|
+
if isinstance(end_date, date):
|
|
1122
|
+
_query_params.append(
|
|
1123
|
+
(
|
|
1124
|
+
'end_date',
|
|
1125
|
+
end_date.strftime(
|
|
1126
|
+
self.api_client.configuration.date_format
|
|
1127
|
+
)
|
|
1128
|
+
)
|
|
1129
|
+
)
|
|
1130
|
+
else:
|
|
1131
|
+
_query_params.append(('end_date', end_date))
|
|
1132
|
+
|
|
1133
|
+
if created_since is not None:
|
|
1134
|
+
|
|
1135
|
+
_query_params.append(('created_since', created_since))
|
|
1136
|
+
|
|
1137
|
+
if updated_since is not None:
|
|
1138
|
+
|
|
1139
|
+
_query_params.append(('updated_since', updated_since))
|
|
1140
|
+
|
|
1141
|
+
if manual_account_id is not None:
|
|
1142
|
+
|
|
1143
|
+
_query_params.append(('manual_account_id', manual_account_id))
|
|
1144
|
+
|
|
1145
|
+
if plaid_account_id is not None:
|
|
1146
|
+
|
|
1147
|
+
_query_params.append(('plaid_account_id', plaid_account_id))
|
|
1148
|
+
|
|
1149
|
+
if recurring_id is not None:
|
|
1150
|
+
|
|
1151
|
+
_query_params.append(('recurring_id', recurring_id))
|
|
1152
|
+
|
|
1153
|
+
if category_id is not None:
|
|
1154
|
+
|
|
1155
|
+
_query_params.append(('category_id', category_id))
|
|
1156
|
+
|
|
1157
|
+
if tag_id is not None:
|
|
1158
|
+
|
|
1159
|
+
_query_params.append(('tag_id', tag_id))
|
|
1160
|
+
|
|
1161
|
+
if is_group_parent is not None:
|
|
1162
|
+
|
|
1163
|
+
_query_params.append(('is_group_parent', is_group_parent))
|
|
1164
|
+
|
|
1165
|
+
if status is not None:
|
|
1166
|
+
|
|
1167
|
+
_query_params.append(('status', status))
|
|
1168
|
+
|
|
1169
|
+
if is_pending is not None:
|
|
1170
|
+
|
|
1171
|
+
_query_params.append(('is_pending', is_pending))
|
|
1172
|
+
|
|
1173
|
+
if include_pending is not None:
|
|
1174
|
+
|
|
1175
|
+
_query_params.append(('include_pending', include_pending))
|
|
1176
|
+
|
|
1177
|
+
if include_metadata is not None:
|
|
1178
|
+
|
|
1179
|
+
_query_params.append(('include_metadata', include_metadata))
|
|
1180
|
+
|
|
1181
|
+
if include_split_parents is not None:
|
|
1182
|
+
|
|
1183
|
+
_query_params.append(('include_split_parents', include_split_parents))
|
|
1184
|
+
|
|
1185
|
+
if include_group_children is not None:
|
|
1186
|
+
|
|
1187
|
+
_query_params.append(('include_group_children', include_group_children))
|
|
1188
|
+
|
|
1189
|
+
if include_children is not None:
|
|
1190
|
+
|
|
1191
|
+
_query_params.append(('include_children', include_children))
|
|
1192
|
+
|
|
1193
|
+
if include_files is not None:
|
|
1194
|
+
|
|
1195
|
+
_query_params.append(('include_files', include_files))
|
|
1196
|
+
|
|
1197
|
+
if limit is not None:
|
|
1198
|
+
|
|
1199
|
+
_query_params.append(('limit', limit))
|
|
1200
|
+
|
|
1201
|
+
if offset is not None:
|
|
1202
|
+
|
|
1203
|
+
_query_params.append(('offset', offset))
|
|
1204
|
+
|
|
1205
|
+
# process the header parameters
|
|
1206
|
+
# process the form parameters
|
|
1207
|
+
# process the body parameter
|
|
1208
|
+
|
|
1209
|
+
|
|
1210
|
+
# set the HTTP header `Accept`
|
|
1211
|
+
if 'Accept' not in _header_params:
|
|
1212
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1213
|
+
[
|
|
1214
|
+
'application/json'
|
|
1215
|
+
]
|
|
1216
|
+
)
|
|
1217
|
+
|
|
1218
|
+
|
|
1219
|
+
# authentication setting
|
|
1220
|
+
_auth_settings: List[str] = [
|
|
1221
|
+
'cookieAuth',
|
|
1222
|
+
'bearerSecurity'
|
|
1223
|
+
]
|
|
1224
|
+
|
|
1225
|
+
return self.api_client.param_serialize(
|
|
1226
|
+
method='GET',
|
|
1227
|
+
resource_path='/transactions',
|
|
1228
|
+
path_params=_path_params,
|
|
1229
|
+
query_params=_query_params,
|
|
1230
|
+
header_params=_header_params,
|
|
1231
|
+
body=_body_params,
|
|
1232
|
+
post_params=_form_params,
|
|
1233
|
+
files=_files,
|
|
1234
|
+
auth_settings=_auth_settings,
|
|
1235
|
+
collection_formats=_collection_formats,
|
|
1236
|
+
_host=_host,
|
|
1237
|
+
_request_auth=_request_auth
|
|
1238
|
+
)
|
|
1239
|
+
|
|
1240
|
+
|
|
1241
|
+
|
|
1242
|
+
|
|
1243
|
+
@validate_call
|
|
1244
|
+
def update_transactions(
|
|
1245
|
+
self,
|
|
1246
|
+
update_transactions_request: UpdateTransactionsRequest,
|
|
1247
|
+
_request_timeout: Union[
|
|
1248
|
+
None,
|
|
1249
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1250
|
+
Tuple[
|
|
1251
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1252
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1253
|
+
]
|
|
1254
|
+
] = None,
|
|
1255
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1256
|
+
_content_type: Optional[StrictStr] = None,
|
|
1257
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1258
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1259
|
+
) -> UpdateTransactions200Response:
|
|
1260
|
+
"""Update multiple transactions
|
|
1261
|
+
|
|
1262
|
+
Modifies the properties of multiple existing transactions in a single request.<br><br> You may submit complete transaction objects from the response returned by a `GET /transactions` in the request body for each transaction, 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`, `is_pending`, `created_at`, `updated_at`, `source`, and `plaid_metadata`.<br><br> Transactions that have been previously split or grouped may not be modified by this endpoint. Therefore the `is_split_parent`, `split_parent_id`, `is_group_parent`, `group_parent_id`, and `children` properties are also ignored when provided in the request body.<br><br> Each transaction in the array **must** include an `id` property to identify which transaction to update, along with at least one other property to be updated. For example, a transaction object that contains only an `id` and `category_id` property is valid.<br><br> The request can include between 1 and 500 transactions to update in a single call.
|
|
1263
|
+
|
|
1264
|
+
:param update_transactions_request: (required)
|
|
1265
|
+
:type update_transactions_request: UpdateTransactionsRequest
|
|
1266
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1267
|
+
number provided, it will be total request
|
|
1268
|
+
timeout. It can also be a pair (tuple) of
|
|
1269
|
+
(connection, read) timeouts.
|
|
1270
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1271
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1272
|
+
request; this effectively ignores the
|
|
1273
|
+
authentication in the spec for a single request.
|
|
1274
|
+
:type _request_auth: dict, optional
|
|
1275
|
+
:param _content_type: force content-type for the request.
|
|
1276
|
+
:type _content_type: str, Optional
|
|
1277
|
+
:param _headers: set to override the headers for a single
|
|
1278
|
+
request; this effectively ignores the headers
|
|
1279
|
+
in the spec for a single request.
|
|
1280
|
+
:type _headers: dict, optional
|
|
1281
|
+
:param _host_index: set to override the host_index for a single
|
|
1282
|
+
request; this effectively ignores the host_index
|
|
1283
|
+
in the spec for a single request.
|
|
1284
|
+
:type _host_index: int, optional
|
|
1285
|
+
:return: Returns the result object.
|
|
1286
|
+
""" # noqa: E501
|
|
1287
|
+
|
|
1288
|
+
_param = self._update_transactions_serialize(
|
|
1289
|
+
update_transactions_request=update_transactions_request,
|
|
1290
|
+
_request_auth=_request_auth,
|
|
1291
|
+
_content_type=_content_type,
|
|
1292
|
+
_headers=_headers,
|
|
1293
|
+
_host_index=_host_index
|
|
1294
|
+
)
|
|
1295
|
+
|
|
1296
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1297
|
+
'200': "UpdateTransactions200Response",
|
|
1298
|
+
'400': "ErrorResponseObject",
|
|
1299
|
+
'401': "ErrorResponseObject",
|
|
1300
|
+
'429': "ErrorResponseObject",
|
|
1301
|
+
'500': "ErrorResponseObject",
|
|
1302
|
+
}
|
|
1303
|
+
response_data = self.api_client.call_api(
|
|
1304
|
+
*_param,
|
|
1305
|
+
_request_timeout=_request_timeout
|
|
1306
|
+
)
|
|
1307
|
+
response_data.read()
|
|
1308
|
+
return self.api_client.response_deserialize(
|
|
1309
|
+
response_data=response_data,
|
|
1310
|
+
response_types_map=_response_types_map,
|
|
1311
|
+
).data
|
|
1312
|
+
|
|
1313
|
+
|
|
1314
|
+
@validate_call
|
|
1315
|
+
def update_transactions_with_http_info(
|
|
1316
|
+
self,
|
|
1317
|
+
update_transactions_request: UpdateTransactionsRequest,
|
|
1318
|
+
_request_timeout: Union[
|
|
1319
|
+
None,
|
|
1320
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1321
|
+
Tuple[
|
|
1322
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1323
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1324
|
+
]
|
|
1325
|
+
] = None,
|
|
1326
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1327
|
+
_content_type: Optional[StrictStr] = None,
|
|
1328
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1329
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1330
|
+
) -> ApiResponse[UpdateTransactions200Response]:
|
|
1331
|
+
"""Update multiple transactions
|
|
1332
|
+
|
|
1333
|
+
Modifies the properties of multiple existing transactions in a single request.<br><br> You may submit complete transaction objects from the response returned by a `GET /transactions` in the request body for each transaction, 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`, `is_pending`, `created_at`, `updated_at`, `source`, and `plaid_metadata`.<br><br> Transactions that have been previously split or grouped may not be modified by this endpoint. Therefore the `is_split_parent`, `split_parent_id`, `is_group_parent`, `group_parent_id`, and `children` properties are also ignored when provided in the request body.<br><br> Each transaction in the array **must** include an `id` property to identify which transaction to update, along with at least one other property to be updated. For example, a transaction object that contains only an `id` and `category_id` property is valid.<br><br> The request can include between 1 and 500 transactions to update in a single call.
|
|
1334
|
+
|
|
1335
|
+
:param update_transactions_request: (required)
|
|
1336
|
+
:type update_transactions_request: UpdateTransactionsRequest
|
|
1337
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1338
|
+
number provided, it will be total request
|
|
1339
|
+
timeout. It can also be a pair (tuple) of
|
|
1340
|
+
(connection, read) timeouts.
|
|
1341
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1342
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1343
|
+
request; this effectively ignores the
|
|
1344
|
+
authentication in the spec for a single request.
|
|
1345
|
+
:type _request_auth: dict, optional
|
|
1346
|
+
:param _content_type: force content-type for the request.
|
|
1347
|
+
:type _content_type: str, Optional
|
|
1348
|
+
:param _headers: set to override the headers for a single
|
|
1349
|
+
request; this effectively ignores the headers
|
|
1350
|
+
in the spec for a single request.
|
|
1351
|
+
:type _headers: dict, optional
|
|
1352
|
+
:param _host_index: set to override the host_index for a single
|
|
1353
|
+
request; this effectively ignores the host_index
|
|
1354
|
+
in the spec for a single request.
|
|
1355
|
+
:type _host_index: int, optional
|
|
1356
|
+
:return: Returns the result object.
|
|
1357
|
+
""" # noqa: E501
|
|
1358
|
+
|
|
1359
|
+
_param = self._update_transactions_serialize(
|
|
1360
|
+
update_transactions_request=update_transactions_request,
|
|
1361
|
+
_request_auth=_request_auth,
|
|
1362
|
+
_content_type=_content_type,
|
|
1363
|
+
_headers=_headers,
|
|
1364
|
+
_host_index=_host_index
|
|
1365
|
+
)
|
|
1366
|
+
|
|
1367
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1368
|
+
'200': "UpdateTransactions200Response",
|
|
1369
|
+
'400': "ErrorResponseObject",
|
|
1370
|
+
'401': "ErrorResponseObject",
|
|
1371
|
+
'429': "ErrorResponseObject",
|
|
1372
|
+
'500': "ErrorResponseObject",
|
|
1373
|
+
}
|
|
1374
|
+
response_data = self.api_client.call_api(
|
|
1375
|
+
*_param,
|
|
1376
|
+
_request_timeout=_request_timeout
|
|
1377
|
+
)
|
|
1378
|
+
response_data.read()
|
|
1379
|
+
return self.api_client.response_deserialize(
|
|
1380
|
+
response_data=response_data,
|
|
1381
|
+
response_types_map=_response_types_map,
|
|
1382
|
+
)
|
|
1383
|
+
|
|
1384
|
+
|
|
1385
|
+
@validate_call
|
|
1386
|
+
def update_transactions_without_preload_content(
|
|
1387
|
+
self,
|
|
1388
|
+
update_transactions_request: UpdateTransactionsRequest,
|
|
1389
|
+
_request_timeout: Union[
|
|
1390
|
+
None,
|
|
1391
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1392
|
+
Tuple[
|
|
1393
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1394
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1395
|
+
]
|
|
1396
|
+
] = None,
|
|
1397
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1398
|
+
_content_type: Optional[StrictStr] = None,
|
|
1399
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1400
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1401
|
+
) -> RESTResponseType:
|
|
1402
|
+
"""Update multiple transactions
|
|
1403
|
+
|
|
1404
|
+
Modifies the properties of multiple existing transactions in a single request.<br><br> You may submit complete transaction objects from the response returned by a `GET /transactions` in the request body for each transaction, 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`, `is_pending`, `created_at`, `updated_at`, `source`, and `plaid_metadata`.<br><br> Transactions that have been previously split or grouped may not be modified by this endpoint. Therefore the `is_split_parent`, `split_parent_id`, `is_group_parent`, `group_parent_id`, and `children` properties are also ignored when provided in the request body.<br><br> Each transaction in the array **must** include an `id` property to identify which transaction to update, along with at least one other property to be updated. For example, a transaction object that contains only an `id` and `category_id` property is valid.<br><br> The request can include between 1 and 500 transactions to update in a single call.
|
|
1405
|
+
|
|
1406
|
+
:param update_transactions_request: (required)
|
|
1407
|
+
:type update_transactions_request: UpdateTransactionsRequest
|
|
1408
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1409
|
+
number provided, it will be total request
|
|
1410
|
+
timeout. It can also be a pair (tuple) of
|
|
1411
|
+
(connection, read) timeouts.
|
|
1412
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1413
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1414
|
+
request; this effectively ignores the
|
|
1415
|
+
authentication in the spec for a single request.
|
|
1416
|
+
:type _request_auth: dict, optional
|
|
1417
|
+
:param _content_type: force content-type for the request.
|
|
1418
|
+
:type _content_type: str, Optional
|
|
1419
|
+
:param _headers: set to override the headers for a single
|
|
1420
|
+
request; this effectively ignores the headers
|
|
1421
|
+
in the spec for a single request.
|
|
1422
|
+
:type _headers: dict, optional
|
|
1423
|
+
:param _host_index: set to override the host_index for a single
|
|
1424
|
+
request; this effectively ignores the host_index
|
|
1425
|
+
in the spec for a single request.
|
|
1426
|
+
:type _host_index: int, optional
|
|
1427
|
+
:return: Returns the result object.
|
|
1428
|
+
""" # noqa: E501
|
|
1429
|
+
|
|
1430
|
+
_param = self._update_transactions_serialize(
|
|
1431
|
+
update_transactions_request=update_transactions_request,
|
|
1432
|
+
_request_auth=_request_auth,
|
|
1433
|
+
_content_type=_content_type,
|
|
1434
|
+
_headers=_headers,
|
|
1435
|
+
_host_index=_host_index
|
|
1436
|
+
)
|
|
1437
|
+
|
|
1438
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1439
|
+
'200': "UpdateTransactions200Response",
|
|
1440
|
+
'400': "ErrorResponseObject",
|
|
1441
|
+
'401': "ErrorResponseObject",
|
|
1442
|
+
'429': "ErrorResponseObject",
|
|
1443
|
+
'500': "ErrorResponseObject",
|
|
1444
|
+
}
|
|
1445
|
+
response_data = self.api_client.call_api(
|
|
1446
|
+
*_param,
|
|
1447
|
+
_request_timeout=_request_timeout
|
|
1448
|
+
)
|
|
1449
|
+
return response_data.response
|
|
1450
|
+
|
|
1451
|
+
|
|
1452
|
+
def _update_transactions_serialize(
|
|
1453
|
+
self,
|
|
1454
|
+
update_transactions_request,
|
|
1455
|
+
_request_auth,
|
|
1456
|
+
_content_type,
|
|
1457
|
+
_headers,
|
|
1458
|
+
_host_index,
|
|
1459
|
+
) -> RequestSerialized:
|
|
1460
|
+
|
|
1461
|
+
_host = None
|
|
1462
|
+
|
|
1463
|
+
_collection_formats: Dict[str, str] = {
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1466
|
+
_path_params: Dict[str, str] = {}
|
|
1467
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1468
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1469
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1470
|
+
_files: Dict[
|
|
1471
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1472
|
+
] = {}
|
|
1473
|
+
_body_params: Optional[bytes] = None
|
|
1474
|
+
|
|
1475
|
+
# process the path parameters
|
|
1476
|
+
# process the query parameters
|
|
1477
|
+
# process the header parameters
|
|
1478
|
+
# process the form parameters
|
|
1479
|
+
# process the body parameter
|
|
1480
|
+
if update_transactions_request is not None:
|
|
1481
|
+
_body_params = update_transactions_request
|
|
1482
|
+
|
|
1483
|
+
|
|
1484
|
+
# set the HTTP header `Accept`
|
|
1485
|
+
if 'Accept' not in _header_params:
|
|
1486
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1487
|
+
[
|
|
1488
|
+
'application/json'
|
|
1489
|
+
]
|
|
1490
|
+
)
|
|
1491
|
+
|
|
1492
|
+
# set the HTTP header `Content-Type`
|
|
1493
|
+
if _content_type:
|
|
1494
|
+
_header_params['Content-Type'] = _content_type
|
|
1495
|
+
else:
|
|
1496
|
+
_default_content_type = (
|
|
1497
|
+
self.api_client.select_header_content_type(
|
|
1498
|
+
[
|
|
1499
|
+
'application/json'
|
|
1500
|
+
]
|
|
1501
|
+
)
|
|
1502
|
+
)
|
|
1503
|
+
if _default_content_type is not None:
|
|
1504
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1505
|
+
|
|
1506
|
+
# authentication setting
|
|
1507
|
+
_auth_settings: List[str] = [
|
|
1508
|
+
'cookieAuth',
|
|
1509
|
+
'bearerSecurity'
|
|
1510
|
+
]
|
|
1511
|
+
|
|
1512
|
+
return self.api_client.param_serialize(
|
|
1513
|
+
method='PUT',
|
|
1514
|
+
resource_path='/transactions',
|
|
1515
|
+
path_params=_path_params,
|
|
1516
|
+
query_params=_query_params,
|
|
1517
|
+
header_params=_header_params,
|
|
1518
|
+
body=_body_params,
|
|
1519
|
+
post_params=_form_params,
|
|
1520
|
+
files=_files,
|
|
1521
|
+
auth_settings=_auth_settings,
|
|
1522
|
+
collection_formats=_collection_formats,
|
|
1523
|
+
_host=_host,
|
|
1524
|
+
_request_auth=_request_auth
|
|
1525
|
+
)
|
|
1526
|
+
|
|
1527
|
+
|