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,434 @@
|
|
|
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
|
|
22
|
+
from typing import Optional
|
|
23
|
+
from typing_extensions import Annotated
|
|
24
|
+
from lunchmoney.models.get_budget_summary200_response import GetBudgetSummary200Response
|
|
25
|
+
|
|
26
|
+
from lunchmoney.api_client import ApiClient, RequestSerialized
|
|
27
|
+
from lunchmoney.api_response import ApiResponse
|
|
28
|
+
from lunchmoney.rest import RESTResponseType
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class SummaryApi:
|
|
32
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
33
|
+
Ref: https://openapi-generator.tech
|
|
34
|
+
|
|
35
|
+
Do not edit the class manually.
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
def __init__(self, api_client=None) -> None:
|
|
39
|
+
if api_client is None:
|
|
40
|
+
api_client = ApiClient.get_default()
|
|
41
|
+
self.api_client = api_client
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@validate_call
|
|
45
|
+
def get_budget_summary(
|
|
46
|
+
self,
|
|
47
|
+
start_date: Annotated[date, Field(description="Start of date range in ISO 8601 date format (YYYY-MM-DD).")],
|
|
48
|
+
end_date: Annotated[date, Field(description="End of date range in ISO 8601 date format (YYYY-MM-DD).")],
|
|
49
|
+
include_exclude_from_budgets: Annotated[Optional[StrictBool], Field(description="Enable to include categories that have the 'Exclude from Budgets' flag set in the returned `categories` array.")] = None,
|
|
50
|
+
include_occurrences: Annotated[Optional[StrictBool], Field(description="Enable to include an `occurrences` array for each category in an aligned response. Each array will include an object for each budget period that falls within the specified date range which includes details on the activity for the budget period.")] = None,
|
|
51
|
+
include_past_budget_dates: Annotated[Optional[StrictBool], Field(description="Enable to include the three budget occurrences prior to the start date in the `occurrences` array for each category in an aligned response. This property is ignored if `include_occurrences` is not also set to `true`.")] = None,
|
|
52
|
+
include_totals: Annotated[Optional[StrictBool], Field(description="Enable to include a top-level `totals` section that summarizes the inflow and outflow across all transactions for the specified date range.")] = None,
|
|
53
|
+
include_rollover_pool: Annotated[Optional[StrictBool], Field(description="Enable to include a `rollover_pool` section that summarizes the current rollover pool balance and all previous adjustments.")] = None,
|
|
54
|
+
_request_timeout: Union[
|
|
55
|
+
None,
|
|
56
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
57
|
+
Tuple[
|
|
58
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
59
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
60
|
+
]
|
|
61
|
+
] = None,
|
|
62
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
63
|
+
_content_type: Optional[StrictStr] = None,
|
|
64
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
65
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
66
|
+
) -> GetBudgetSummary200Response:
|
|
67
|
+
"""Get summary
|
|
68
|
+
|
|
69
|
+
Returns a summary of the budget activity for the specified date range.
|
|
70
|
+
|
|
71
|
+
:param start_date: Start of date range in ISO 8601 date format (YYYY-MM-DD). (required)
|
|
72
|
+
:type start_date: date
|
|
73
|
+
:param end_date: End of date range in ISO 8601 date format (YYYY-MM-DD). (required)
|
|
74
|
+
:type end_date: date
|
|
75
|
+
:param include_exclude_from_budgets: Enable to include categories that have the 'Exclude from Budgets' flag set in the returned `categories` array.
|
|
76
|
+
:type include_exclude_from_budgets: bool
|
|
77
|
+
:param include_occurrences: Enable to include an `occurrences` array for each category in an aligned response. Each array will include an object for each budget period that falls within the specified date range which includes details on the activity for the budget period.
|
|
78
|
+
:type include_occurrences: bool
|
|
79
|
+
:param include_past_budget_dates: Enable to include the three budget occurrences prior to the start date in the `occurrences` array for each category in an aligned response. This property is ignored if `include_occurrences` is not also set to `true`.
|
|
80
|
+
:type include_past_budget_dates: bool
|
|
81
|
+
:param include_totals: Enable to include a top-level `totals` section that summarizes the inflow and outflow across all transactions for the specified date range.
|
|
82
|
+
:type include_totals: bool
|
|
83
|
+
:param include_rollover_pool: Enable to include a `rollover_pool` section that summarizes the current rollover pool balance and all previous adjustments.
|
|
84
|
+
:type include_rollover_pool: bool
|
|
85
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
86
|
+
number provided, it will be total request
|
|
87
|
+
timeout. It can also be a pair (tuple) of
|
|
88
|
+
(connection, read) timeouts.
|
|
89
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
90
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
91
|
+
request; this effectively ignores the
|
|
92
|
+
authentication in the spec for a single request.
|
|
93
|
+
:type _request_auth: dict, optional
|
|
94
|
+
:param _content_type: force content-type for the request.
|
|
95
|
+
:type _content_type: str, Optional
|
|
96
|
+
:param _headers: set to override the headers for a single
|
|
97
|
+
request; this effectively ignores the headers
|
|
98
|
+
in the spec for a single request.
|
|
99
|
+
:type _headers: dict, optional
|
|
100
|
+
:param _host_index: set to override the host_index for a single
|
|
101
|
+
request; this effectively ignores the host_index
|
|
102
|
+
in the spec for a single request.
|
|
103
|
+
:type _host_index: int, optional
|
|
104
|
+
:return: Returns the result object.
|
|
105
|
+
""" # noqa: E501
|
|
106
|
+
|
|
107
|
+
_param = self._get_budget_summary_serialize(
|
|
108
|
+
start_date=start_date,
|
|
109
|
+
end_date=end_date,
|
|
110
|
+
include_exclude_from_budgets=include_exclude_from_budgets,
|
|
111
|
+
include_occurrences=include_occurrences,
|
|
112
|
+
include_past_budget_dates=include_past_budget_dates,
|
|
113
|
+
include_totals=include_totals,
|
|
114
|
+
include_rollover_pool=include_rollover_pool,
|
|
115
|
+
_request_auth=_request_auth,
|
|
116
|
+
_content_type=_content_type,
|
|
117
|
+
_headers=_headers,
|
|
118
|
+
_host_index=_host_index
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
122
|
+
'200': "GetBudgetSummary200Response",
|
|
123
|
+
'401': "ErrorResponseObject",
|
|
124
|
+
'429': "ErrorResponseObject",
|
|
125
|
+
'500': "ErrorResponseObject",
|
|
126
|
+
}
|
|
127
|
+
response_data = self.api_client.call_api(
|
|
128
|
+
*_param,
|
|
129
|
+
_request_timeout=_request_timeout
|
|
130
|
+
)
|
|
131
|
+
response_data.read()
|
|
132
|
+
return self.api_client.response_deserialize(
|
|
133
|
+
response_data=response_data,
|
|
134
|
+
response_types_map=_response_types_map,
|
|
135
|
+
).data
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
@validate_call
|
|
139
|
+
def get_budget_summary_with_http_info(
|
|
140
|
+
self,
|
|
141
|
+
start_date: Annotated[date, Field(description="Start of date range in ISO 8601 date format (YYYY-MM-DD).")],
|
|
142
|
+
end_date: Annotated[date, Field(description="End of date range in ISO 8601 date format (YYYY-MM-DD).")],
|
|
143
|
+
include_exclude_from_budgets: Annotated[Optional[StrictBool], Field(description="Enable to include categories that have the 'Exclude from Budgets' flag set in the returned `categories` array.")] = None,
|
|
144
|
+
include_occurrences: Annotated[Optional[StrictBool], Field(description="Enable to include an `occurrences` array for each category in an aligned response. Each array will include an object for each budget period that falls within the specified date range which includes details on the activity for the budget period.")] = None,
|
|
145
|
+
include_past_budget_dates: Annotated[Optional[StrictBool], Field(description="Enable to include the three budget occurrences prior to the start date in the `occurrences` array for each category in an aligned response. This property is ignored if `include_occurrences` is not also set to `true`.")] = None,
|
|
146
|
+
include_totals: Annotated[Optional[StrictBool], Field(description="Enable to include a top-level `totals` section that summarizes the inflow and outflow across all transactions for the specified date range.")] = None,
|
|
147
|
+
include_rollover_pool: Annotated[Optional[StrictBool], Field(description="Enable to include a `rollover_pool` section that summarizes the current rollover pool balance and all previous adjustments.")] = None,
|
|
148
|
+
_request_timeout: Union[
|
|
149
|
+
None,
|
|
150
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
151
|
+
Tuple[
|
|
152
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
153
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
154
|
+
]
|
|
155
|
+
] = None,
|
|
156
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
157
|
+
_content_type: Optional[StrictStr] = None,
|
|
158
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
159
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
160
|
+
) -> ApiResponse[GetBudgetSummary200Response]:
|
|
161
|
+
"""Get summary
|
|
162
|
+
|
|
163
|
+
Returns a summary of the budget activity for the specified date range.
|
|
164
|
+
|
|
165
|
+
:param start_date: Start of date range in ISO 8601 date format (YYYY-MM-DD). (required)
|
|
166
|
+
:type start_date: date
|
|
167
|
+
:param end_date: End of date range in ISO 8601 date format (YYYY-MM-DD). (required)
|
|
168
|
+
:type end_date: date
|
|
169
|
+
:param include_exclude_from_budgets: Enable to include categories that have the 'Exclude from Budgets' flag set in the returned `categories` array.
|
|
170
|
+
:type include_exclude_from_budgets: bool
|
|
171
|
+
:param include_occurrences: Enable to include an `occurrences` array for each category in an aligned response. Each array will include an object for each budget period that falls within the specified date range which includes details on the activity for the budget period.
|
|
172
|
+
:type include_occurrences: bool
|
|
173
|
+
:param include_past_budget_dates: Enable to include the three budget occurrences prior to the start date in the `occurrences` array for each category in an aligned response. This property is ignored if `include_occurrences` is not also set to `true`.
|
|
174
|
+
:type include_past_budget_dates: bool
|
|
175
|
+
:param include_totals: Enable to include a top-level `totals` section that summarizes the inflow and outflow across all transactions for the specified date range.
|
|
176
|
+
:type include_totals: bool
|
|
177
|
+
:param include_rollover_pool: Enable to include a `rollover_pool` section that summarizes the current rollover pool balance and all previous adjustments.
|
|
178
|
+
:type include_rollover_pool: bool
|
|
179
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
180
|
+
number provided, it will be total request
|
|
181
|
+
timeout. It can also be a pair (tuple) of
|
|
182
|
+
(connection, read) timeouts.
|
|
183
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
184
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
185
|
+
request; this effectively ignores the
|
|
186
|
+
authentication in the spec for a single request.
|
|
187
|
+
:type _request_auth: dict, optional
|
|
188
|
+
:param _content_type: force content-type for the request.
|
|
189
|
+
:type _content_type: str, Optional
|
|
190
|
+
:param _headers: set to override the headers for a single
|
|
191
|
+
request; this effectively ignores the headers
|
|
192
|
+
in the spec for a single request.
|
|
193
|
+
:type _headers: dict, optional
|
|
194
|
+
:param _host_index: set to override the host_index for a single
|
|
195
|
+
request; this effectively ignores the host_index
|
|
196
|
+
in the spec for a single request.
|
|
197
|
+
:type _host_index: int, optional
|
|
198
|
+
:return: Returns the result object.
|
|
199
|
+
""" # noqa: E501
|
|
200
|
+
|
|
201
|
+
_param = self._get_budget_summary_serialize(
|
|
202
|
+
start_date=start_date,
|
|
203
|
+
end_date=end_date,
|
|
204
|
+
include_exclude_from_budgets=include_exclude_from_budgets,
|
|
205
|
+
include_occurrences=include_occurrences,
|
|
206
|
+
include_past_budget_dates=include_past_budget_dates,
|
|
207
|
+
include_totals=include_totals,
|
|
208
|
+
include_rollover_pool=include_rollover_pool,
|
|
209
|
+
_request_auth=_request_auth,
|
|
210
|
+
_content_type=_content_type,
|
|
211
|
+
_headers=_headers,
|
|
212
|
+
_host_index=_host_index
|
|
213
|
+
)
|
|
214
|
+
|
|
215
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
216
|
+
'200': "GetBudgetSummary200Response",
|
|
217
|
+
'401': "ErrorResponseObject",
|
|
218
|
+
'429': "ErrorResponseObject",
|
|
219
|
+
'500': "ErrorResponseObject",
|
|
220
|
+
}
|
|
221
|
+
response_data = self.api_client.call_api(
|
|
222
|
+
*_param,
|
|
223
|
+
_request_timeout=_request_timeout
|
|
224
|
+
)
|
|
225
|
+
response_data.read()
|
|
226
|
+
return self.api_client.response_deserialize(
|
|
227
|
+
response_data=response_data,
|
|
228
|
+
response_types_map=_response_types_map,
|
|
229
|
+
)
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
@validate_call
|
|
233
|
+
def get_budget_summary_without_preload_content(
|
|
234
|
+
self,
|
|
235
|
+
start_date: Annotated[date, Field(description="Start of date range in ISO 8601 date format (YYYY-MM-DD).")],
|
|
236
|
+
end_date: Annotated[date, Field(description="End of date range in ISO 8601 date format (YYYY-MM-DD).")],
|
|
237
|
+
include_exclude_from_budgets: Annotated[Optional[StrictBool], Field(description="Enable to include categories that have the 'Exclude from Budgets' flag set in the returned `categories` array.")] = None,
|
|
238
|
+
include_occurrences: Annotated[Optional[StrictBool], Field(description="Enable to include an `occurrences` array for each category in an aligned response. Each array will include an object for each budget period that falls within the specified date range which includes details on the activity for the budget period.")] = None,
|
|
239
|
+
include_past_budget_dates: Annotated[Optional[StrictBool], Field(description="Enable to include the three budget occurrences prior to the start date in the `occurrences` array for each category in an aligned response. This property is ignored if `include_occurrences` is not also set to `true`.")] = None,
|
|
240
|
+
include_totals: Annotated[Optional[StrictBool], Field(description="Enable to include a top-level `totals` section that summarizes the inflow and outflow across all transactions for the specified date range.")] = None,
|
|
241
|
+
include_rollover_pool: Annotated[Optional[StrictBool], Field(description="Enable to include a `rollover_pool` section that summarizes the current rollover pool balance and all previous adjustments.")] = None,
|
|
242
|
+
_request_timeout: Union[
|
|
243
|
+
None,
|
|
244
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
245
|
+
Tuple[
|
|
246
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
247
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
248
|
+
]
|
|
249
|
+
] = None,
|
|
250
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
251
|
+
_content_type: Optional[StrictStr] = None,
|
|
252
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
253
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
254
|
+
) -> RESTResponseType:
|
|
255
|
+
"""Get summary
|
|
256
|
+
|
|
257
|
+
Returns a summary of the budget activity for the specified date range.
|
|
258
|
+
|
|
259
|
+
:param start_date: Start of date range in ISO 8601 date format (YYYY-MM-DD). (required)
|
|
260
|
+
:type start_date: date
|
|
261
|
+
:param end_date: End of date range in ISO 8601 date format (YYYY-MM-DD). (required)
|
|
262
|
+
:type end_date: date
|
|
263
|
+
:param include_exclude_from_budgets: Enable to include categories that have the 'Exclude from Budgets' flag set in the returned `categories` array.
|
|
264
|
+
:type include_exclude_from_budgets: bool
|
|
265
|
+
:param include_occurrences: Enable to include an `occurrences` array for each category in an aligned response. Each array will include an object for each budget period that falls within the specified date range which includes details on the activity for the budget period.
|
|
266
|
+
:type include_occurrences: bool
|
|
267
|
+
:param include_past_budget_dates: Enable to include the three budget occurrences prior to the start date in the `occurrences` array for each category in an aligned response. This property is ignored if `include_occurrences` is not also set to `true`.
|
|
268
|
+
:type include_past_budget_dates: bool
|
|
269
|
+
:param include_totals: Enable to include a top-level `totals` section that summarizes the inflow and outflow across all transactions for the specified date range.
|
|
270
|
+
:type include_totals: bool
|
|
271
|
+
:param include_rollover_pool: Enable to include a `rollover_pool` section that summarizes the current rollover pool balance and all previous adjustments.
|
|
272
|
+
:type include_rollover_pool: bool
|
|
273
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
274
|
+
number provided, it will be total request
|
|
275
|
+
timeout. It can also be a pair (tuple) of
|
|
276
|
+
(connection, read) timeouts.
|
|
277
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
278
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
279
|
+
request; this effectively ignores the
|
|
280
|
+
authentication in the spec for a single request.
|
|
281
|
+
:type _request_auth: dict, optional
|
|
282
|
+
:param _content_type: force content-type for the request.
|
|
283
|
+
:type _content_type: str, Optional
|
|
284
|
+
:param _headers: set to override the headers for a single
|
|
285
|
+
request; this effectively ignores the headers
|
|
286
|
+
in the spec for a single request.
|
|
287
|
+
:type _headers: dict, optional
|
|
288
|
+
:param _host_index: set to override the host_index for a single
|
|
289
|
+
request; this effectively ignores the host_index
|
|
290
|
+
in the spec for a single request.
|
|
291
|
+
:type _host_index: int, optional
|
|
292
|
+
:return: Returns the result object.
|
|
293
|
+
""" # noqa: E501
|
|
294
|
+
|
|
295
|
+
_param = self._get_budget_summary_serialize(
|
|
296
|
+
start_date=start_date,
|
|
297
|
+
end_date=end_date,
|
|
298
|
+
include_exclude_from_budgets=include_exclude_from_budgets,
|
|
299
|
+
include_occurrences=include_occurrences,
|
|
300
|
+
include_past_budget_dates=include_past_budget_dates,
|
|
301
|
+
include_totals=include_totals,
|
|
302
|
+
include_rollover_pool=include_rollover_pool,
|
|
303
|
+
_request_auth=_request_auth,
|
|
304
|
+
_content_type=_content_type,
|
|
305
|
+
_headers=_headers,
|
|
306
|
+
_host_index=_host_index
|
|
307
|
+
)
|
|
308
|
+
|
|
309
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
310
|
+
'200': "GetBudgetSummary200Response",
|
|
311
|
+
'401': "ErrorResponseObject",
|
|
312
|
+
'429': "ErrorResponseObject",
|
|
313
|
+
'500': "ErrorResponseObject",
|
|
314
|
+
}
|
|
315
|
+
response_data = self.api_client.call_api(
|
|
316
|
+
*_param,
|
|
317
|
+
_request_timeout=_request_timeout
|
|
318
|
+
)
|
|
319
|
+
return response_data.response
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
def _get_budget_summary_serialize(
|
|
323
|
+
self,
|
|
324
|
+
start_date,
|
|
325
|
+
end_date,
|
|
326
|
+
include_exclude_from_budgets,
|
|
327
|
+
include_occurrences,
|
|
328
|
+
include_past_budget_dates,
|
|
329
|
+
include_totals,
|
|
330
|
+
include_rollover_pool,
|
|
331
|
+
_request_auth,
|
|
332
|
+
_content_type,
|
|
333
|
+
_headers,
|
|
334
|
+
_host_index,
|
|
335
|
+
) -> RequestSerialized:
|
|
336
|
+
|
|
337
|
+
_host = None
|
|
338
|
+
|
|
339
|
+
_collection_formats: Dict[str, str] = {
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
_path_params: Dict[str, str] = {}
|
|
343
|
+
_query_params: List[Tuple[str, str]] = []
|
|
344
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
345
|
+
_form_params: List[Tuple[str, str]] = []
|
|
346
|
+
_files: Dict[
|
|
347
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
348
|
+
] = {}
|
|
349
|
+
_body_params: Optional[bytes] = None
|
|
350
|
+
|
|
351
|
+
# process the path parameters
|
|
352
|
+
# process the query parameters
|
|
353
|
+
if start_date is not None:
|
|
354
|
+
if isinstance(start_date, date):
|
|
355
|
+
_query_params.append(
|
|
356
|
+
(
|
|
357
|
+
'start_date',
|
|
358
|
+
start_date.strftime(
|
|
359
|
+
self.api_client.configuration.date_format
|
|
360
|
+
)
|
|
361
|
+
)
|
|
362
|
+
)
|
|
363
|
+
else:
|
|
364
|
+
_query_params.append(('start_date', start_date))
|
|
365
|
+
|
|
366
|
+
if end_date is not None:
|
|
367
|
+
if isinstance(end_date, date):
|
|
368
|
+
_query_params.append(
|
|
369
|
+
(
|
|
370
|
+
'end_date',
|
|
371
|
+
end_date.strftime(
|
|
372
|
+
self.api_client.configuration.date_format
|
|
373
|
+
)
|
|
374
|
+
)
|
|
375
|
+
)
|
|
376
|
+
else:
|
|
377
|
+
_query_params.append(('end_date', end_date))
|
|
378
|
+
|
|
379
|
+
if include_exclude_from_budgets is not None:
|
|
380
|
+
|
|
381
|
+
_query_params.append(('include_exclude_from_budgets', include_exclude_from_budgets))
|
|
382
|
+
|
|
383
|
+
if include_occurrences is not None:
|
|
384
|
+
|
|
385
|
+
_query_params.append(('include_occurrences', include_occurrences))
|
|
386
|
+
|
|
387
|
+
if include_past_budget_dates is not None:
|
|
388
|
+
|
|
389
|
+
_query_params.append(('include_past_budget_dates', include_past_budget_dates))
|
|
390
|
+
|
|
391
|
+
if include_totals is not None:
|
|
392
|
+
|
|
393
|
+
_query_params.append(('include_totals', include_totals))
|
|
394
|
+
|
|
395
|
+
if include_rollover_pool is not None:
|
|
396
|
+
|
|
397
|
+
_query_params.append(('include_rollover_pool', include_rollover_pool))
|
|
398
|
+
|
|
399
|
+
# process the header parameters
|
|
400
|
+
# process the form parameters
|
|
401
|
+
# process the body parameter
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
# set the HTTP header `Accept`
|
|
405
|
+
if 'Accept' not in _header_params:
|
|
406
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
407
|
+
[
|
|
408
|
+
'application/json'
|
|
409
|
+
]
|
|
410
|
+
)
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
# authentication setting
|
|
414
|
+
_auth_settings: List[str] = [
|
|
415
|
+
'cookieAuth',
|
|
416
|
+
'bearerSecurity'
|
|
417
|
+
]
|
|
418
|
+
|
|
419
|
+
return self.api_client.param_serialize(
|
|
420
|
+
method='GET',
|
|
421
|
+
resource_path='/summary',
|
|
422
|
+
path_params=_path_params,
|
|
423
|
+
query_params=_query_params,
|
|
424
|
+
header_params=_header_params,
|
|
425
|
+
body=_body_params,
|
|
426
|
+
post_params=_form_params,
|
|
427
|
+
files=_files,
|
|
428
|
+
auth_settings=_auth_settings,
|
|
429
|
+
collection_formats=_collection_formats,
|
|
430
|
+
_host=_host,
|
|
431
|
+
_request_auth=_request_auth
|
|
432
|
+
)
|
|
433
|
+
|
|
434
|
+
|