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,601 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Lunch Money API - v2
|
|
5
|
+
|
|
6
|
+
Welcome to the Lunch Money v2 API. A working version of this API is now available through these docs, or directly at: `https://api.lunchmoney.dev/v2` <span class=\"red-text\"><strong>This is in alpha launch of a major API update. It is still subject to change during this alpha review period and bugs may still exist. Users are strongly encouraged to use the mock service or to create a test budget with example data as the first step to interacting with the v2 API.</strong></span> See the [Getting Started Guide](https://alpha.lunchmoney.dev/v2/getting-started) for more information on using a test budget.<br<br> If you are new to the v2 API, you may wish to review the [v2 API Overview of Changes](https://alpha.lunchmoney.dev/v2/changelog). ### Static Mock Server You may also use these docs to explore the API using a static mock server endpoint.<p> This enables users to become familiar with the API without having to create an access token, and eliminates the possibility of modifying real data. <p> To access this endpoint select the second endpoint in the the \"Server\" dropdown to the right. When selected you should see \"Static Mock v2 Lunch Money API Server\".<br> When using this server, set your Bearer token to any string with 11 or more characters. ### Migrating from V1 The v2 API is NOT backwards compatible with the v1 API. Developers are encouraged to review the [Migration Guide](https://alpha.lunchmoney.dev/v2/migration-guide) to understand the changes and plan their migration. ### Acknowledgments If you have been providing feedback on the API during our iterative design process, **THANK YOU**. We are happy to provide the opportunity to finally interact with the working API that was built based on your feedback. ### Useful links: - [Getting Started](https://alpha.lunchmoney.dev/v2/getting-started) - [v2 API Changelog](https://alpha.lunchmoney.dev/v2/changelog) - [Migration Guide](https://alpha.lunchmoney.dev/v2/migration-guide) - [Rate Limits](https://alpha.lunchmoney.dev/v2/rate-limits) - [Current v1 Lunch Money API Documentation](https://lunchmoney.dev) - [Awesome Lunch Money Projects](https://github.com/lunch-money/awesome-lunchmoney?tab=readme-ov-file)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 2.8.4
|
|
9
|
+
Contact: devsupport@lunchmoney.app
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
import warnings
|
|
16
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
17
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
18
|
+
from typing_extensions import Annotated
|
|
19
|
+
|
|
20
|
+
from pydantic import Field, StrictInt
|
|
21
|
+
from typing_extensions import Annotated
|
|
22
|
+
from lunchmoney.models.group_transactions_request import GroupTransactionsRequest
|
|
23
|
+
from lunchmoney.models.transaction_object import TransactionObject
|
|
24
|
+
|
|
25
|
+
from lunchmoney.api_client import ApiClient, RequestSerialized
|
|
26
|
+
from lunchmoney.api_response import ApiResponse
|
|
27
|
+
from lunchmoney.rest import RESTResponseType
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class TransactionsGroupApi:
|
|
31
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
32
|
+
Ref: https://openapi-generator.tech
|
|
33
|
+
|
|
34
|
+
Do not edit the class manually.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
def __init__(self, api_client=None) -> None:
|
|
38
|
+
if api_client is None:
|
|
39
|
+
api_client = ApiClient.get_default()
|
|
40
|
+
self.api_client = api_client
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
@validate_call
|
|
44
|
+
def group_transactions(
|
|
45
|
+
self,
|
|
46
|
+
group_transactions_request: GroupTransactionsRequest,
|
|
47
|
+
_request_timeout: Union[
|
|
48
|
+
None,
|
|
49
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
50
|
+
Tuple[
|
|
51
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
52
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
53
|
+
]
|
|
54
|
+
] = None,
|
|
55
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
56
|
+
_content_type: Optional[StrictStr] = None,
|
|
57
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
58
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
59
|
+
) -> TransactionObject:
|
|
60
|
+
"""Create a transaction group
|
|
61
|
+
|
|
62
|
+
Specify a set of existing transaction IDs to group together as a single grouped transaction. The new transaction will have an amount equal to the sum of the grouped transaction amounts. If the grouped transactions have different currencies, the new group transaction will be set in the user's default currency.<br><br> After a transaction has been grouped, the original transactions are no longer shown on the transactions page or returned by a `GET /transactions` request. The newly created grouped transaction is returned instead. To see the details of the original transactions that were used to create a transaction group, use the `GET /transactions/{id}` endpoint and pass the ID of the grouped transaction. The grouped transactions will be included in the `children` property of the transaction returned in the response
|
|
63
|
+
|
|
64
|
+
:param group_transactions_request: (required)
|
|
65
|
+
:type group_transactions_request: GroupTransactionsRequest
|
|
66
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
67
|
+
number provided, it will be total request
|
|
68
|
+
timeout. It can also be a pair (tuple) of
|
|
69
|
+
(connection, read) timeouts.
|
|
70
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
71
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
72
|
+
request; this effectively ignores the
|
|
73
|
+
authentication in the spec for a single request.
|
|
74
|
+
:type _request_auth: dict, optional
|
|
75
|
+
:param _content_type: force content-type for the request.
|
|
76
|
+
:type _content_type: str, Optional
|
|
77
|
+
:param _headers: set to override the headers for a single
|
|
78
|
+
request; this effectively ignores the headers
|
|
79
|
+
in the spec for a single request.
|
|
80
|
+
:type _headers: dict, optional
|
|
81
|
+
:param _host_index: set to override the host_index for a single
|
|
82
|
+
request; this effectively ignores the host_index
|
|
83
|
+
in the spec for a single request.
|
|
84
|
+
:type _host_index: int, optional
|
|
85
|
+
:return: Returns the result object.
|
|
86
|
+
""" # noqa: E501
|
|
87
|
+
|
|
88
|
+
_param = self._group_transactions_serialize(
|
|
89
|
+
group_transactions_request=group_transactions_request,
|
|
90
|
+
_request_auth=_request_auth,
|
|
91
|
+
_content_type=_content_type,
|
|
92
|
+
_headers=_headers,
|
|
93
|
+
_host_index=_host_index
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
97
|
+
'201': "TransactionObject",
|
|
98
|
+
'400': "ErrorResponseObject",
|
|
99
|
+
'401': "ErrorResponseObject",
|
|
100
|
+
'429': "ErrorResponseObject",
|
|
101
|
+
'500': "ErrorResponseObject",
|
|
102
|
+
}
|
|
103
|
+
response_data = self.api_client.call_api(
|
|
104
|
+
*_param,
|
|
105
|
+
_request_timeout=_request_timeout
|
|
106
|
+
)
|
|
107
|
+
response_data.read()
|
|
108
|
+
return self.api_client.response_deserialize(
|
|
109
|
+
response_data=response_data,
|
|
110
|
+
response_types_map=_response_types_map,
|
|
111
|
+
).data
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
@validate_call
|
|
115
|
+
def group_transactions_with_http_info(
|
|
116
|
+
self,
|
|
117
|
+
group_transactions_request: GroupTransactionsRequest,
|
|
118
|
+
_request_timeout: Union[
|
|
119
|
+
None,
|
|
120
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
121
|
+
Tuple[
|
|
122
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
123
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
124
|
+
]
|
|
125
|
+
] = None,
|
|
126
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
127
|
+
_content_type: Optional[StrictStr] = None,
|
|
128
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
129
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
130
|
+
) -> ApiResponse[TransactionObject]:
|
|
131
|
+
"""Create a transaction group
|
|
132
|
+
|
|
133
|
+
Specify a set of existing transaction IDs to group together as a single grouped transaction. The new transaction will have an amount equal to the sum of the grouped transaction amounts. If the grouped transactions have different currencies, the new group transaction will be set in the user's default currency.<br><br> After a transaction has been grouped, the original transactions are no longer shown on the transactions page or returned by a `GET /transactions` request. The newly created grouped transaction is returned instead. To see the details of the original transactions that were used to create a transaction group, use the `GET /transactions/{id}` endpoint and pass the ID of the grouped transaction. The grouped transactions will be included in the `children` property of the transaction returned in the response
|
|
134
|
+
|
|
135
|
+
:param group_transactions_request: (required)
|
|
136
|
+
:type group_transactions_request: GroupTransactionsRequest
|
|
137
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
138
|
+
number provided, it will be total request
|
|
139
|
+
timeout. It can also be a pair (tuple) of
|
|
140
|
+
(connection, read) timeouts.
|
|
141
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
142
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
143
|
+
request; this effectively ignores the
|
|
144
|
+
authentication in the spec for a single request.
|
|
145
|
+
:type _request_auth: dict, optional
|
|
146
|
+
:param _content_type: force content-type for the request.
|
|
147
|
+
:type _content_type: str, Optional
|
|
148
|
+
:param _headers: set to override the headers for a single
|
|
149
|
+
request; this effectively ignores the headers
|
|
150
|
+
in the spec for a single request.
|
|
151
|
+
:type _headers: dict, optional
|
|
152
|
+
:param _host_index: set to override the host_index for a single
|
|
153
|
+
request; this effectively ignores the host_index
|
|
154
|
+
in the spec for a single request.
|
|
155
|
+
:type _host_index: int, optional
|
|
156
|
+
:return: Returns the result object.
|
|
157
|
+
""" # noqa: E501
|
|
158
|
+
|
|
159
|
+
_param = self._group_transactions_serialize(
|
|
160
|
+
group_transactions_request=group_transactions_request,
|
|
161
|
+
_request_auth=_request_auth,
|
|
162
|
+
_content_type=_content_type,
|
|
163
|
+
_headers=_headers,
|
|
164
|
+
_host_index=_host_index
|
|
165
|
+
)
|
|
166
|
+
|
|
167
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
168
|
+
'201': "TransactionObject",
|
|
169
|
+
'400': "ErrorResponseObject",
|
|
170
|
+
'401': "ErrorResponseObject",
|
|
171
|
+
'429': "ErrorResponseObject",
|
|
172
|
+
'500': "ErrorResponseObject",
|
|
173
|
+
}
|
|
174
|
+
response_data = self.api_client.call_api(
|
|
175
|
+
*_param,
|
|
176
|
+
_request_timeout=_request_timeout
|
|
177
|
+
)
|
|
178
|
+
response_data.read()
|
|
179
|
+
return self.api_client.response_deserialize(
|
|
180
|
+
response_data=response_data,
|
|
181
|
+
response_types_map=_response_types_map,
|
|
182
|
+
)
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
@validate_call
|
|
186
|
+
def group_transactions_without_preload_content(
|
|
187
|
+
self,
|
|
188
|
+
group_transactions_request: GroupTransactionsRequest,
|
|
189
|
+
_request_timeout: Union[
|
|
190
|
+
None,
|
|
191
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
192
|
+
Tuple[
|
|
193
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
194
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
195
|
+
]
|
|
196
|
+
] = None,
|
|
197
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
198
|
+
_content_type: Optional[StrictStr] = None,
|
|
199
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
200
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
201
|
+
) -> RESTResponseType:
|
|
202
|
+
"""Create a transaction group
|
|
203
|
+
|
|
204
|
+
Specify a set of existing transaction IDs to group together as a single grouped transaction. The new transaction will have an amount equal to the sum of the grouped transaction amounts. If the grouped transactions have different currencies, the new group transaction will be set in the user's default currency.<br><br> After a transaction has been grouped, the original transactions are no longer shown on the transactions page or returned by a `GET /transactions` request. The newly created grouped transaction is returned instead. To see the details of the original transactions that were used to create a transaction group, use the `GET /transactions/{id}` endpoint and pass the ID of the grouped transaction. The grouped transactions will be included in the `children` property of the transaction returned in the response
|
|
205
|
+
|
|
206
|
+
:param group_transactions_request: (required)
|
|
207
|
+
:type group_transactions_request: GroupTransactionsRequest
|
|
208
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
209
|
+
number provided, it will be total request
|
|
210
|
+
timeout. It can also be a pair (tuple) of
|
|
211
|
+
(connection, read) timeouts.
|
|
212
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
213
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
214
|
+
request; this effectively ignores the
|
|
215
|
+
authentication in the spec for a single request.
|
|
216
|
+
:type _request_auth: dict, optional
|
|
217
|
+
:param _content_type: force content-type for the request.
|
|
218
|
+
:type _content_type: str, Optional
|
|
219
|
+
:param _headers: set to override the headers for a single
|
|
220
|
+
request; this effectively ignores the headers
|
|
221
|
+
in the spec for a single request.
|
|
222
|
+
:type _headers: dict, optional
|
|
223
|
+
:param _host_index: set to override the host_index for a single
|
|
224
|
+
request; this effectively ignores the host_index
|
|
225
|
+
in the spec for a single request.
|
|
226
|
+
:type _host_index: int, optional
|
|
227
|
+
:return: Returns the result object.
|
|
228
|
+
""" # noqa: E501
|
|
229
|
+
|
|
230
|
+
_param = self._group_transactions_serialize(
|
|
231
|
+
group_transactions_request=group_transactions_request,
|
|
232
|
+
_request_auth=_request_auth,
|
|
233
|
+
_content_type=_content_type,
|
|
234
|
+
_headers=_headers,
|
|
235
|
+
_host_index=_host_index
|
|
236
|
+
)
|
|
237
|
+
|
|
238
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
239
|
+
'201': "TransactionObject",
|
|
240
|
+
'400': "ErrorResponseObject",
|
|
241
|
+
'401': "ErrorResponseObject",
|
|
242
|
+
'429': "ErrorResponseObject",
|
|
243
|
+
'500': "ErrorResponseObject",
|
|
244
|
+
}
|
|
245
|
+
response_data = self.api_client.call_api(
|
|
246
|
+
*_param,
|
|
247
|
+
_request_timeout=_request_timeout
|
|
248
|
+
)
|
|
249
|
+
return response_data.response
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
def _group_transactions_serialize(
|
|
253
|
+
self,
|
|
254
|
+
group_transactions_request,
|
|
255
|
+
_request_auth,
|
|
256
|
+
_content_type,
|
|
257
|
+
_headers,
|
|
258
|
+
_host_index,
|
|
259
|
+
) -> RequestSerialized:
|
|
260
|
+
|
|
261
|
+
_host = None
|
|
262
|
+
|
|
263
|
+
_collection_formats: Dict[str, str] = {
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
_path_params: Dict[str, str] = {}
|
|
267
|
+
_query_params: List[Tuple[str, str]] = []
|
|
268
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
269
|
+
_form_params: List[Tuple[str, str]] = []
|
|
270
|
+
_files: Dict[
|
|
271
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
272
|
+
] = {}
|
|
273
|
+
_body_params: Optional[bytes] = None
|
|
274
|
+
|
|
275
|
+
# process the path parameters
|
|
276
|
+
# process the query parameters
|
|
277
|
+
# process the header parameters
|
|
278
|
+
# process the form parameters
|
|
279
|
+
# process the body parameter
|
|
280
|
+
if group_transactions_request is not None:
|
|
281
|
+
_body_params = group_transactions_request
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
# set the HTTP header `Accept`
|
|
285
|
+
if 'Accept' not in _header_params:
|
|
286
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
287
|
+
[
|
|
288
|
+
'application/json'
|
|
289
|
+
]
|
|
290
|
+
)
|
|
291
|
+
|
|
292
|
+
# set the HTTP header `Content-Type`
|
|
293
|
+
if _content_type:
|
|
294
|
+
_header_params['Content-Type'] = _content_type
|
|
295
|
+
else:
|
|
296
|
+
_default_content_type = (
|
|
297
|
+
self.api_client.select_header_content_type(
|
|
298
|
+
[
|
|
299
|
+
'application/json'
|
|
300
|
+
]
|
|
301
|
+
)
|
|
302
|
+
)
|
|
303
|
+
if _default_content_type is not None:
|
|
304
|
+
_header_params['Content-Type'] = _default_content_type
|
|
305
|
+
|
|
306
|
+
# authentication setting
|
|
307
|
+
_auth_settings: List[str] = [
|
|
308
|
+
'cookieAuth',
|
|
309
|
+
'bearerSecurity'
|
|
310
|
+
]
|
|
311
|
+
|
|
312
|
+
return self.api_client.param_serialize(
|
|
313
|
+
method='POST',
|
|
314
|
+
resource_path='/transactions/group',
|
|
315
|
+
path_params=_path_params,
|
|
316
|
+
query_params=_query_params,
|
|
317
|
+
header_params=_header_params,
|
|
318
|
+
body=_body_params,
|
|
319
|
+
post_params=_form_params,
|
|
320
|
+
files=_files,
|
|
321
|
+
auth_settings=_auth_settings,
|
|
322
|
+
collection_formats=_collection_formats,
|
|
323
|
+
_host=_host,
|
|
324
|
+
_request_auth=_request_auth
|
|
325
|
+
)
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
@validate_call
|
|
331
|
+
def ungroup_transactions(
|
|
332
|
+
self,
|
|
333
|
+
id: Annotated[StrictInt, Field(description="ID of the transaction group to delete")],
|
|
334
|
+
_request_timeout: Union[
|
|
335
|
+
None,
|
|
336
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
337
|
+
Tuple[
|
|
338
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
339
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
340
|
+
]
|
|
341
|
+
] = None,
|
|
342
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
343
|
+
_content_type: Optional[StrictStr] = None,
|
|
344
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
345
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
346
|
+
) -> None:
|
|
347
|
+
"""Delete a transaction group
|
|
348
|
+
|
|
349
|
+
Deletes the transaction group with the ID specified on the path.<br> The transactions within the group are not removed and will subsequently be treated as \"normal\" ungrouped transactions.
|
|
350
|
+
|
|
351
|
+
:param id: ID of the transaction group to delete (required)
|
|
352
|
+
:type id: int
|
|
353
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
354
|
+
number provided, it will be total request
|
|
355
|
+
timeout. It can also be a pair (tuple) of
|
|
356
|
+
(connection, read) timeouts.
|
|
357
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
358
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
359
|
+
request; this effectively ignores the
|
|
360
|
+
authentication in the spec for a single request.
|
|
361
|
+
:type _request_auth: dict, optional
|
|
362
|
+
:param _content_type: force content-type for the request.
|
|
363
|
+
:type _content_type: str, Optional
|
|
364
|
+
:param _headers: set to override the headers for a single
|
|
365
|
+
request; this effectively ignores the headers
|
|
366
|
+
in the spec for a single request.
|
|
367
|
+
:type _headers: dict, optional
|
|
368
|
+
:param _host_index: set to override the host_index for a single
|
|
369
|
+
request; this effectively ignores the host_index
|
|
370
|
+
in the spec for a single request.
|
|
371
|
+
:type _host_index: int, optional
|
|
372
|
+
:return: Returns the result object.
|
|
373
|
+
""" # noqa: E501
|
|
374
|
+
|
|
375
|
+
_param = self._ungroup_transactions_serialize(
|
|
376
|
+
id=id,
|
|
377
|
+
_request_auth=_request_auth,
|
|
378
|
+
_content_type=_content_type,
|
|
379
|
+
_headers=_headers,
|
|
380
|
+
_host_index=_host_index
|
|
381
|
+
)
|
|
382
|
+
|
|
383
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
384
|
+
'204': None,
|
|
385
|
+
'401': "ErrorResponseObject",
|
|
386
|
+
'404': "ErrorResponseObject",
|
|
387
|
+
'429': "ErrorResponseObject",
|
|
388
|
+
'500': "ErrorResponseObject",
|
|
389
|
+
}
|
|
390
|
+
response_data = self.api_client.call_api(
|
|
391
|
+
*_param,
|
|
392
|
+
_request_timeout=_request_timeout
|
|
393
|
+
)
|
|
394
|
+
response_data.read()
|
|
395
|
+
return self.api_client.response_deserialize(
|
|
396
|
+
response_data=response_data,
|
|
397
|
+
response_types_map=_response_types_map,
|
|
398
|
+
).data
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
@validate_call
|
|
402
|
+
def ungroup_transactions_with_http_info(
|
|
403
|
+
self,
|
|
404
|
+
id: Annotated[StrictInt, Field(description="ID of the transaction group to delete")],
|
|
405
|
+
_request_timeout: Union[
|
|
406
|
+
None,
|
|
407
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
408
|
+
Tuple[
|
|
409
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
410
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
411
|
+
]
|
|
412
|
+
] = None,
|
|
413
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
414
|
+
_content_type: Optional[StrictStr] = None,
|
|
415
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
416
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
417
|
+
) -> ApiResponse[None]:
|
|
418
|
+
"""Delete a transaction group
|
|
419
|
+
|
|
420
|
+
Deletes the transaction group with the ID specified on the path.<br> The transactions within the group are not removed and will subsequently be treated as \"normal\" ungrouped transactions.
|
|
421
|
+
|
|
422
|
+
:param id: ID of the transaction group to delete (required)
|
|
423
|
+
:type id: int
|
|
424
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
425
|
+
number provided, it will be total request
|
|
426
|
+
timeout. It can also be a pair (tuple) of
|
|
427
|
+
(connection, read) timeouts.
|
|
428
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
429
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
430
|
+
request; this effectively ignores the
|
|
431
|
+
authentication in the spec for a single request.
|
|
432
|
+
:type _request_auth: dict, optional
|
|
433
|
+
:param _content_type: force content-type for the request.
|
|
434
|
+
:type _content_type: str, Optional
|
|
435
|
+
:param _headers: set to override the headers for a single
|
|
436
|
+
request; this effectively ignores the headers
|
|
437
|
+
in the spec for a single request.
|
|
438
|
+
:type _headers: dict, optional
|
|
439
|
+
:param _host_index: set to override the host_index for a single
|
|
440
|
+
request; this effectively ignores the host_index
|
|
441
|
+
in the spec for a single request.
|
|
442
|
+
:type _host_index: int, optional
|
|
443
|
+
:return: Returns the result object.
|
|
444
|
+
""" # noqa: E501
|
|
445
|
+
|
|
446
|
+
_param = self._ungroup_transactions_serialize(
|
|
447
|
+
id=id,
|
|
448
|
+
_request_auth=_request_auth,
|
|
449
|
+
_content_type=_content_type,
|
|
450
|
+
_headers=_headers,
|
|
451
|
+
_host_index=_host_index
|
|
452
|
+
)
|
|
453
|
+
|
|
454
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
455
|
+
'204': None,
|
|
456
|
+
'401': "ErrorResponseObject",
|
|
457
|
+
'404': "ErrorResponseObject",
|
|
458
|
+
'429': "ErrorResponseObject",
|
|
459
|
+
'500': "ErrorResponseObject",
|
|
460
|
+
}
|
|
461
|
+
response_data = self.api_client.call_api(
|
|
462
|
+
*_param,
|
|
463
|
+
_request_timeout=_request_timeout
|
|
464
|
+
)
|
|
465
|
+
response_data.read()
|
|
466
|
+
return self.api_client.response_deserialize(
|
|
467
|
+
response_data=response_data,
|
|
468
|
+
response_types_map=_response_types_map,
|
|
469
|
+
)
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
@validate_call
|
|
473
|
+
def ungroup_transactions_without_preload_content(
|
|
474
|
+
self,
|
|
475
|
+
id: Annotated[StrictInt, Field(description="ID of the transaction group to delete")],
|
|
476
|
+
_request_timeout: Union[
|
|
477
|
+
None,
|
|
478
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
479
|
+
Tuple[
|
|
480
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
481
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
482
|
+
]
|
|
483
|
+
] = None,
|
|
484
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
485
|
+
_content_type: Optional[StrictStr] = None,
|
|
486
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
487
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
488
|
+
) -> RESTResponseType:
|
|
489
|
+
"""Delete a transaction group
|
|
490
|
+
|
|
491
|
+
Deletes the transaction group with the ID specified on the path.<br> The transactions within the group are not removed and will subsequently be treated as \"normal\" ungrouped transactions.
|
|
492
|
+
|
|
493
|
+
:param id: ID of the transaction group to delete (required)
|
|
494
|
+
:type id: int
|
|
495
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
496
|
+
number provided, it will be total request
|
|
497
|
+
timeout. It can also be a pair (tuple) of
|
|
498
|
+
(connection, read) timeouts.
|
|
499
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
500
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
501
|
+
request; this effectively ignores the
|
|
502
|
+
authentication in the spec for a single request.
|
|
503
|
+
:type _request_auth: dict, optional
|
|
504
|
+
:param _content_type: force content-type for the request.
|
|
505
|
+
:type _content_type: str, Optional
|
|
506
|
+
:param _headers: set to override the headers for a single
|
|
507
|
+
request; this effectively ignores the headers
|
|
508
|
+
in the spec for a single request.
|
|
509
|
+
:type _headers: dict, optional
|
|
510
|
+
:param _host_index: set to override the host_index for a single
|
|
511
|
+
request; this effectively ignores the host_index
|
|
512
|
+
in the spec for a single request.
|
|
513
|
+
:type _host_index: int, optional
|
|
514
|
+
:return: Returns the result object.
|
|
515
|
+
""" # noqa: E501
|
|
516
|
+
|
|
517
|
+
_param = self._ungroup_transactions_serialize(
|
|
518
|
+
id=id,
|
|
519
|
+
_request_auth=_request_auth,
|
|
520
|
+
_content_type=_content_type,
|
|
521
|
+
_headers=_headers,
|
|
522
|
+
_host_index=_host_index
|
|
523
|
+
)
|
|
524
|
+
|
|
525
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
526
|
+
'204': None,
|
|
527
|
+
'401': "ErrorResponseObject",
|
|
528
|
+
'404': "ErrorResponseObject",
|
|
529
|
+
'429': "ErrorResponseObject",
|
|
530
|
+
'500': "ErrorResponseObject",
|
|
531
|
+
}
|
|
532
|
+
response_data = self.api_client.call_api(
|
|
533
|
+
*_param,
|
|
534
|
+
_request_timeout=_request_timeout
|
|
535
|
+
)
|
|
536
|
+
return response_data.response
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
def _ungroup_transactions_serialize(
|
|
540
|
+
self,
|
|
541
|
+
id,
|
|
542
|
+
_request_auth,
|
|
543
|
+
_content_type,
|
|
544
|
+
_headers,
|
|
545
|
+
_host_index,
|
|
546
|
+
) -> RequestSerialized:
|
|
547
|
+
|
|
548
|
+
_host = None
|
|
549
|
+
|
|
550
|
+
_collection_formats: Dict[str, str] = {
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
_path_params: Dict[str, str] = {}
|
|
554
|
+
_query_params: List[Tuple[str, str]] = []
|
|
555
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
556
|
+
_form_params: List[Tuple[str, str]] = []
|
|
557
|
+
_files: Dict[
|
|
558
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
559
|
+
] = {}
|
|
560
|
+
_body_params: Optional[bytes] = None
|
|
561
|
+
|
|
562
|
+
# process the path parameters
|
|
563
|
+
if id is not None:
|
|
564
|
+
_path_params['id'] = id
|
|
565
|
+
# process the query parameters
|
|
566
|
+
# process the header parameters
|
|
567
|
+
# process the form parameters
|
|
568
|
+
# process the body parameter
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
# set the HTTP header `Accept`
|
|
572
|
+
if 'Accept' not in _header_params:
|
|
573
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
574
|
+
[
|
|
575
|
+
'application/json'
|
|
576
|
+
]
|
|
577
|
+
)
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
# authentication setting
|
|
581
|
+
_auth_settings: List[str] = [
|
|
582
|
+
'cookieAuth',
|
|
583
|
+
'bearerSecurity'
|
|
584
|
+
]
|
|
585
|
+
|
|
586
|
+
return self.api_client.param_serialize(
|
|
587
|
+
method='DELETE',
|
|
588
|
+
resource_path='/transactions/group/{id}',
|
|
589
|
+
path_params=_path_params,
|
|
590
|
+
query_params=_query_params,
|
|
591
|
+
header_params=_header_params,
|
|
592
|
+
body=_body_params,
|
|
593
|
+
post_params=_form_params,
|
|
594
|
+
files=_files,
|
|
595
|
+
auth_settings=_auth_settings,
|
|
596
|
+
collection_formats=_collection_formats,
|
|
597
|
+
_host=_host,
|
|
598
|
+
_request_auth=_request_auth
|
|
599
|
+
)
|
|
600
|
+
|
|
601
|
+
|