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,94 @@
|
|
|
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
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List
|
|
23
|
+
from lunchmoney.models.delete_tag_response_with_dependencies_dependents import DeleteTagResponseWithDependenciesDependents
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class DeleteTagResponseWithDependencies(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
DeleteTagResponseWithDependencies
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
tag_name: StrictStr = Field(description="The name of the tag")
|
|
32
|
+
dependents: DeleteTagResponseWithDependenciesDependents
|
|
33
|
+
__properties: ClassVar[List[str]] = ["tag_name", "dependents"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
populate_by_name=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def to_str(self) -> str:
|
|
43
|
+
"""Returns the string representation of the model using alias"""
|
|
44
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
45
|
+
|
|
46
|
+
def to_json(self) -> str:
|
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
|
48
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
49
|
+
return json.dumps(self.to_dict())
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
+
"""Create an instance of DeleteTagResponseWithDependencies from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
57
|
+
"""Return the dictionary representation of the model using alias.
|
|
58
|
+
|
|
59
|
+
This has the following differences from calling pydantic's
|
|
60
|
+
`self.model_dump(by_alias=True)`:
|
|
61
|
+
|
|
62
|
+
* `None` is only added to the output dict for nullable fields that
|
|
63
|
+
were set at model initialization. Other fields with value `None`
|
|
64
|
+
are ignored.
|
|
65
|
+
"""
|
|
66
|
+
excluded_fields: Set[str] = set([
|
|
67
|
+
])
|
|
68
|
+
|
|
69
|
+
_dict = self.model_dump(
|
|
70
|
+
by_alias=True,
|
|
71
|
+
exclude=excluded_fields,
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
# override the default output from pydantic by calling `to_dict()` of dependents
|
|
75
|
+
if self.dependents:
|
|
76
|
+
_dict['dependents'] = self.dependents.to_dict()
|
|
77
|
+
return _dict
|
|
78
|
+
|
|
79
|
+
@classmethod
|
|
80
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
81
|
+
"""Create an instance of DeleteTagResponseWithDependencies from a dict"""
|
|
82
|
+
if obj is None:
|
|
83
|
+
return None
|
|
84
|
+
|
|
85
|
+
if not isinstance(obj, dict):
|
|
86
|
+
return cls.model_validate(obj)
|
|
87
|
+
|
|
88
|
+
_obj = cls.model_validate({
|
|
89
|
+
"tag_name": obj.get("tag_name"),
|
|
90
|
+
"dependents": DeleteTagResponseWithDependenciesDependents.from_dict(obj["dependents"]) if obj.get("dependents") is not None else None
|
|
91
|
+
})
|
|
92
|
+
return _obj
|
|
93
|
+
|
|
94
|
+
|
|
@@ -0,0 +1,90 @@
|
|
|
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
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt
|
|
22
|
+
from typing import Any, ClassVar, Dict, List
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class DeleteTagResponseWithDependenciesDependents(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
DeleteTagResponseWithDependenciesDependents
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
rules: StrictInt = Field(description="The number of rules depending on the tag")
|
|
31
|
+
transactions: StrictInt = Field(description="The number of transactions with the tag")
|
|
32
|
+
__properties: ClassVar[List[str]] = ["rules", "transactions"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
populate_by_name=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of DeleteTagResponseWithDependenciesDependents from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set([
|
|
66
|
+
])
|
|
67
|
+
|
|
68
|
+
_dict = self.model_dump(
|
|
69
|
+
by_alias=True,
|
|
70
|
+
exclude=excluded_fields,
|
|
71
|
+
exclude_none=True,
|
|
72
|
+
)
|
|
73
|
+
return _dict
|
|
74
|
+
|
|
75
|
+
@classmethod
|
|
76
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
77
|
+
"""Create an instance of DeleteTagResponseWithDependenciesDependents from a dict"""
|
|
78
|
+
if obj is None:
|
|
79
|
+
return None
|
|
80
|
+
|
|
81
|
+
if not isinstance(obj, dict):
|
|
82
|
+
return cls.model_validate(obj)
|
|
83
|
+
|
|
84
|
+
_obj = cls.model_validate({
|
|
85
|
+
"rules": obj.get("rules"),
|
|
86
|
+
"transactions": obj.get("transactions")
|
|
87
|
+
})
|
|
88
|
+
return _obj
|
|
89
|
+
|
|
90
|
+
|
|
@@ -0,0 +1,89 @@
|
|
|
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
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt
|
|
22
|
+
from typing import Any, ClassVar, Dict, List
|
|
23
|
+
from typing_extensions import Annotated
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class DeleteTransactionsRequest(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
DeleteTransactionsRequest
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
ids: Annotated[List[StrictInt], Field(min_length=1, max_length=500)] = Field(description="Array of existing Transaction IDs to delete")
|
|
32
|
+
__properties: ClassVar[List[str]] = ["ids"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
populate_by_name=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of DeleteTransactionsRequest from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set([
|
|
66
|
+
])
|
|
67
|
+
|
|
68
|
+
_dict = self.model_dump(
|
|
69
|
+
by_alias=True,
|
|
70
|
+
exclude=excluded_fields,
|
|
71
|
+
exclude_none=True,
|
|
72
|
+
)
|
|
73
|
+
return _dict
|
|
74
|
+
|
|
75
|
+
@classmethod
|
|
76
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
77
|
+
"""Create an instance of DeleteTransactionsRequest from a dict"""
|
|
78
|
+
if obj is None:
|
|
79
|
+
return None
|
|
80
|
+
|
|
81
|
+
if not isinstance(obj, dict):
|
|
82
|
+
return cls.model_validate(obj)
|
|
83
|
+
|
|
84
|
+
_obj = cls.model_validate({
|
|
85
|
+
"ids": obj.get("ids")
|
|
86
|
+
})
|
|
87
|
+
return _obj
|
|
88
|
+
|
|
89
|
+
|
|
@@ -0,0 +1,98 @@
|
|
|
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
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List
|
|
23
|
+
from lunchmoney.models.error_response_object_errors_inner import ErrorResponseObjectErrorsInner
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class ErrorResponseObject(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
ErrorResponseObject
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
message: StrictStr = Field(description="overall error message")
|
|
32
|
+
errors: List[ErrorResponseObjectErrorsInner]
|
|
33
|
+
__properties: ClassVar[List[str]] = ["message", "errors"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
populate_by_name=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def to_str(self) -> str:
|
|
43
|
+
"""Returns the string representation of the model using alias"""
|
|
44
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
45
|
+
|
|
46
|
+
def to_json(self) -> str:
|
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
|
48
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
49
|
+
return json.dumps(self.to_dict())
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
+
"""Create an instance of ErrorResponseObject from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
57
|
+
"""Return the dictionary representation of the model using alias.
|
|
58
|
+
|
|
59
|
+
This has the following differences from calling pydantic's
|
|
60
|
+
`self.model_dump(by_alias=True)`:
|
|
61
|
+
|
|
62
|
+
* `None` is only added to the output dict for nullable fields that
|
|
63
|
+
were set at model initialization. Other fields with value `None`
|
|
64
|
+
are ignored.
|
|
65
|
+
"""
|
|
66
|
+
excluded_fields: Set[str] = set([
|
|
67
|
+
])
|
|
68
|
+
|
|
69
|
+
_dict = self.model_dump(
|
|
70
|
+
by_alias=True,
|
|
71
|
+
exclude=excluded_fields,
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
# override the default output from pydantic by calling `to_dict()` of each item in errors (list)
|
|
75
|
+
_items = []
|
|
76
|
+
if self.errors:
|
|
77
|
+
for _item_errors in self.errors:
|
|
78
|
+
if _item_errors:
|
|
79
|
+
_items.append(_item_errors.to_dict())
|
|
80
|
+
_dict['errors'] = _items
|
|
81
|
+
return _dict
|
|
82
|
+
|
|
83
|
+
@classmethod
|
|
84
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
85
|
+
"""Create an instance of ErrorResponseObject from a dict"""
|
|
86
|
+
if obj is None:
|
|
87
|
+
return None
|
|
88
|
+
|
|
89
|
+
if not isinstance(obj, dict):
|
|
90
|
+
return cls.model_validate(obj)
|
|
91
|
+
|
|
92
|
+
_obj = cls.model_validate({
|
|
93
|
+
"message": obj.get("message"),
|
|
94
|
+
"errors": [ErrorResponseObjectErrorsInner.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None
|
|
95
|
+
})
|
|
96
|
+
return _obj
|
|
97
|
+
|
|
98
|
+
|
|
@@ -0,0 +1,101 @@
|
|
|
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
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class ErrorResponseObjectErrorsInner(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
ErrorResponseObjectErrorsInner
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
err_msg: StrictStr = Field(description="Human-readable error message", alias="errMsg")
|
|
31
|
+
additional_properties: Dict[str, Any] = {}
|
|
32
|
+
__properties: ClassVar[List[str]] = ["errMsg"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
populate_by_name=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of ErrorResponseObjectErrorsInner from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
65
|
+
"""
|
|
66
|
+
excluded_fields: Set[str] = set([
|
|
67
|
+
"additional_properties",
|
|
68
|
+
])
|
|
69
|
+
|
|
70
|
+
_dict = self.model_dump(
|
|
71
|
+
by_alias=True,
|
|
72
|
+
exclude=excluded_fields,
|
|
73
|
+
exclude_none=True,
|
|
74
|
+
)
|
|
75
|
+
# puts key-value pairs in additional_properties in the top level
|
|
76
|
+
if self.additional_properties is not None:
|
|
77
|
+
for _key, _value in self.additional_properties.items():
|
|
78
|
+
_dict[_key] = _value
|
|
79
|
+
|
|
80
|
+
return _dict
|
|
81
|
+
|
|
82
|
+
@classmethod
|
|
83
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
84
|
+
"""Create an instance of ErrorResponseObjectErrorsInner from a dict"""
|
|
85
|
+
if obj is None:
|
|
86
|
+
return None
|
|
87
|
+
|
|
88
|
+
if not isinstance(obj, dict):
|
|
89
|
+
return cls.model_validate(obj)
|
|
90
|
+
|
|
91
|
+
_obj = cls.model_validate({
|
|
92
|
+
"errMsg": obj.get("errMsg")
|
|
93
|
+
})
|
|
94
|
+
# store additional fields in additional_properties
|
|
95
|
+
for _key in obj.keys():
|
|
96
|
+
if _key not in cls.__properties:
|
|
97
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
98
|
+
|
|
99
|
+
return _obj
|
|
100
|
+
|
|
101
|
+
|
|
@@ -0,0 +1,96 @@
|
|
|
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
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from lunchmoney.models.category_object import CategoryObject
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class GetAllCategories200Response(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
GetAllCategories200Response
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
categories: Optional[List[CategoryObject]] = None
|
|
32
|
+
__properties: ClassVar[List[str]] = ["categories"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
populate_by_name=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of GetAllCategories200Response from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set([
|
|
66
|
+
])
|
|
67
|
+
|
|
68
|
+
_dict = self.model_dump(
|
|
69
|
+
by_alias=True,
|
|
70
|
+
exclude=excluded_fields,
|
|
71
|
+
exclude_none=True,
|
|
72
|
+
)
|
|
73
|
+
# override the default output from pydantic by calling `to_dict()` of each item in categories (list)
|
|
74
|
+
_items = []
|
|
75
|
+
if self.categories:
|
|
76
|
+
for _item_categories in self.categories:
|
|
77
|
+
if _item_categories:
|
|
78
|
+
_items.append(_item_categories.to_dict())
|
|
79
|
+
_dict['categories'] = _items
|
|
80
|
+
return _dict
|
|
81
|
+
|
|
82
|
+
@classmethod
|
|
83
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
84
|
+
"""Create an instance of GetAllCategories200Response from a dict"""
|
|
85
|
+
if obj is None:
|
|
86
|
+
return None
|
|
87
|
+
|
|
88
|
+
if not isinstance(obj, dict):
|
|
89
|
+
return cls.model_validate(obj)
|
|
90
|
+
|
|
91
|
+
_obj = cls.model_validate({
|
|
92
|
+
"categories": [CategoryObject.from_dict(_item) for _item in obj["categories"]] if obj.get("categories") is not None else None
|
|
93
|
+
})
|
|
94
|
+
return _obj
|
|
95
|
+
|
|
96
|
+
|