lunchmoney-python 2.9.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. lunchmoney/__init__.py +205 -0
  2. lunchmoney/api/__init__.py +16 -0
  3. lunchmoney/api/categories_api.py +1499 -0
  4. lunchmoney/api/manual_accounts_api.py +1479 -0
  5. lunchmoney/api/me_api.py +293 -0
  6. lunchmoney/api/plaid_accounts_api.py +909 -0
  7. lunchmoney/api/recurring_items_api.py +702 -0
  8. lunchmoney/api/summary_api.py +434 -0
  9. lunchmoney/api/tags_api.py +1465 -0
  10. lunchmoney/api/transactions_api.py +914 -0
  11. lunchmoney/api/transactions_bulk_api.py +1527 -0
  12. lunchmoney/api/transactions_files_api.py +891 -0
  13. lunchmoney/api/transactions_group_api.py +601 -0
  14. lunchmoney/api/transactions_split_api.py +616 -0
  15. lunchmoney/api_client.py +805 -0
  16. lunchmoney/api_response.py +21 -0
  17. lunchmoney/configuration.py +620 -0
  18. lunchmoney/exceptions.py +217 -0
  19. lunchmoney/models/__init__.py +84 -0
  20. lunchmoney/models/account_type_enum.py +46 -0
  21. lunchmoney/models/aligned_category_totals_object.py +108 -0
  22. lunchmoney/models/aligned_summary_category_object.py +110 -0
  23. lunchmoney/models/aligned_summary_response_object.py +104 -0
  24. lunchmoney/models/category_object.py +146 -0
  25. lunchmoney/models/child_category_object.py +141 -0
  26. lunchmoney/models/child_transaction_object.py +219 -0
  27. lunchmoney/models/create_category_request_object.py +137 -0
  28. lunchmoney/models/create_category_request_object_children_inner.py +159 -0
  29. lunchmoney/models/create_manual_account_request_object.py +138 -0
  30. lunchmoney/models/create_manual_account_request_object_balance.py +145 -0
  31. lunchmoney/models/create_new_transactions_request.py +103 -0
  32. lunchmoney/models/create_tag_request_object.py +112 -0
  33. lunchmoney/models/currency_enum.py +198 -0
  34. lunchmoney/models/delete_category_response_with_dependencies.py +94 -0
  35. lunchmoney/models/delete_category_response_with_dependencies_dependents.py +98 -0
  36. lunchmoney/models/delete_tag_response_with_dependencies.py +94 -0
  37. lunchmoney/models/delete_tag_response_with_dependencies_dependents.py +90 -0
  38. lunchmoney/models/delete_transactions_request.py +89 -0
  39. lunchmoney/models/error_response_object.py +98 -0
  40. lunchmoney/models/error_response_object_errors_inner.py +101 -0
  41. lunchmoney/models/get_all_categories200_response.py +96 -0
  42. lunchmoney/models/get_all_manual_accounts200_response.py +96 -0
  43. lunchmoney/models/get_all_plaid_accounts200_response.py +96 -0
  44. lunchmoney/models/get_all_recurring200_response.py +96 -0
  45. lunchmoney/models/get_all_tags200_response.py +96 -0
  46. lunchmoney/models/get_all_transactions200_response.py +100 -0
  47. lunchmoney/models/get_all_transactions_created_since_parameter.py +145 -0
  48. lunchmoney/models/get_budget_summary200_response.py +138 -0
  49. lunchmoney/models/get_transaction_attachment_url200_response.py +91 -0
  50. lunchmoney/models/group_transactions_request.py +122 -0
  51. lunchmoney/models/insert_transaction_object.py +164 -0
  52. lunchmoney/models/insert_transaction_object_amount.py +145 -0
  53. lunchmoney/models/insert_transactions_response_object.py +106 -0
  54. lunchmoney/models/manual_account_object.py +158 -0
  55. lunchmoney/models/non_aligned_category_totals_object.py +94 -0
  56. lunchmoney/models/non_aligned_summary_category_object.py +94 -0
  57. lunchmoney/models/non_aligned_summary_response_object.py +104 -0
  58. lunchmoney/models/plaid_account_object.py +168 -0
  59. lunchmoney/models/recurring_object.py +143 -0
  60. lunchmoney/models/recurring_object_matches.py +105 -0
  61. lunchmoney/models/recurring_object_matches_found_transactions_inner.py +91 -0
  62. lunchmoney/models/recurring_object_overrides.py +92 -0
  63. lunchmoney/models/recurring_object_transaction_criteria.py +149 -0
  64. lunchmoney/models/skipped_existing_external_id_object.py +108 -0
  65. lunchmoney/models/split_transaction_object.py +102 -0
  66. lunchmoney/models/split_transaction_object_amount.py +145 -0
  67. lunchmoney/models/split_transaction_request.py +97 -0
  68. lunchmoney/models/summary_category_occurrence_object.py +126 -0
  69. lunchmoney/models/summary_recurring_transaction_object.py +100 -0
  70. lunchmoney/models/summary_rollover_pool_adjustment_object.py +98 -0
  71. lunchmoney/models/summary_rollover_pool_object.py +98 -0
  72. lunchmoney/models/summary_totals_breakdown_object.py +98 -0
  73. lunchmoney/models/summary_totals_object.py +97 -0
  74. lunchmoney/models/tag_object.py +125 -0
  75. lunchmoney/models/transaction_attachment_object.py +106 -0
  76. lunchmoney/models/transaction_object.py +229 -0
  77. lunchmoney/models/update_category_request_object.py +156 -0
  78. lunchmoney/models/update_manual_account_request_object.py +156 -0
  79. lunchmoney/models/update_manual_account_request_object_balance.py +145 -0
  80. lunchmoney/models/update_tag_request_object.py +126 -0
  81. lunchmoney/models/update_transaction_object.py +228 -0
  82. lunchmoney/models/update_transaction_object_amount.py +145 -0
  83. lunchmoney/models/update_transactions200_response.py +96 -0
  84. lunchmoney/models/update_transactions_request.py +97 -0
  85. lunchmoney/models/update_transactions_request_transactions_inner.py +228 -0
  86. lunchmoney/models/user_object.py +106 -0
  87. lunchmoney/py.typed +0 -0
  88. lunchmoney/rest.py +259 -0
  89. lunchmoney_python-2.9.0.dist-info/METADATA +285 -0
  90. lunchmoney_python-2.9.0.dist-info/RECORD +92 -0
  91. lunchmoney_python-2.9.0.dist-info/WHEEL +5 -0
  92. lunchmoney_python-2.9.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,103 @@
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, StrictBool
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from typing_extensions import Annotated
24
+ from lunchmoney.models.insert_transaction_object import InsertTransactionObject
25
+ from typing import Optional, Set
26
+ from typing_extensions import Self
27
+
28
+ class CreateNewTransactionsRequest(BaseModel):
29
+ """
30
+ CreateNewTransactionsRequest
31
+ """ # noqa: E501
32
+ transactions: Annotated[List[InsertTransactionObject], Field(min_length=1, max_length=500)] = Field(description="List of transactions to insert.")
33
+ apply_rules: Optional[StrictBool] = Field(default=False, description="If `true`, any rules associated with the account specified by the `manual_account_id` property for each transaction will be applied.")
34
+ skip_duplicates: Optional[StrictBool] = Field(default=False, description="If `true`, the system will flag new transactions that have the same `date`, `payee`, `amount`, and account_id (plaid or manual), as an existing transaction, as a duplicate. <br><br> Note that deduplication based on `external_id` will always occur regardless of how this property is set.")
35
+ skip_balance_update: Optional[StrictBool] = Field(default=False, description="If `true`, and new transactions include a `manual_account_id`, the balances of these accounts will not be updated, when the transactions are inserted.")
36
+ __properties: ClassVar[List[str]] = ["transactions", "apply_rules", "skip_duplicates", "skip_balance_update"]
37
+
38
+ model_config = ConfigDict(
39
+ populate_by_name=True,
40
+ validate_assignment=True,
41
+ protected_namespaces=(),
42
+ )
43
+
44
+
45
+ def to_str(self) -> str:
46
+ """Returns the string representation of the model using alias"""
47
+ return pprint.pformat(self.model_dump(by_alias=True))
48
+
49
+ def to_json(self) -> str:
50
+ """Returns the JSON representation of the model using alias"""
51
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
52
+ return json.dumps(self.to_dict())
53
+
54
+ @classmethod
55
+ def from_json(cls, json_str: str) -> Optional[Self]:
56
+ """Create an instance of CreateNewTransactionsRequest from a JSON string"""
57
+ return cls.from_dict(json.loads(json_str))
58
+
59
+ def to_dict(self) -> Dict[str, Any]:
60
+ """Return the dictionary representation of the model using alias.
61
+
62
+ This has the following differences from calling pydantic's
63
+ `self.model_dump(by_alias=True)`:
64
+
65
+ * `None` is only added to the output dict for nullable fields that
66
+ were set at model initialization. Other fields with value `None`
67
+ are ignored.
68
+ """
69
+ excluded_fields: Set[str] = set([
70
+ ])
71
+
72
+ _dict = self.model_dump(
73
+ by_alias=True,
74
+ exclude=excluded_fields,
75
+ exclude_none=True,
76
+ )
77
+ # override the default output from pydantic by calling `to_dict()` of each item in transactions (list)
78
+ _items = []
79
+ if self.transactions:
80
+ for _item_transactions in self.transactions:
81
+ if _item_transactions:
82
+ _items.append(_item_transactions.to_dict())
83
+ _dict['transactions'] = _items
84
+ return _dict
85
+
86
+ @classmethod
87
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
88
+ """Create an instance of CreateNewTransactionsRequest from a dict"""
89
+ if obj is None:
90
+ return None
91
+
92
+ if not isinstance(obj, dict):
93
+ return cls.model_validate(obj)
94
+
95
+ _obj = cls.model_validate({
96
+ "transactions": [InsertTransactionObject.from_dict(_item) for _item in obj["transactions"]] if obj.get("transactions") is not None else None,
97
+ "apply_rules": obj.get("apply_rules") if obj.get("apply_rules") is not None else False,
98
+ "skip_duplicates": obj.get("skip_duplicates") if obj.get("skip_duplicates") is not None else False,
99
+ "skip_balance_update": obj.get("skip_balance_update") if obj.get("skip_balance_update") is not None else False
100
+ })
101
+ return _obj
102
+
103
+
@@ -0,0 +1,112 @@
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, StrictBool, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from typing_extensions import Annotated
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class CreateTagRequestObject(BaseModel):
28
+ """
29
+ CreateTagRequestObject
30
+ """ # noqa: E501
31
+ name: Annotated[str, Field(min_length=1, strict=True, max_length=100)] = Field(description="The name of the new tag. Must be between 1 and 100 characters. Must not match the name of any existing tags.")
32
+ description: Optional[Annotated[str, Field(strict=True, max_length=200)]] = Field(default=None, description="The description of the tag. Must not exceed 200 characters.")
33
+ text_color: Optional[StrictStr] = Field(default=None, description="The text color of the tag.")
34
+ background_color: Optional[StrictStr] = Field(default=None, description="The background color of the tag.")
35
+ archived: Optional[StrictBool] = Field(default=False, description="If `true`, the tag is archived and not displayed in relevant areas of the Lunch Money app.")
36
+ __properties: ClassVar[List[str]] = ["name", "description", "text_color", "background_color", "archived"]
37
+
38
+ model_config = ConfigDict(
39
+ populate_by_name=True,
40
+ validate_assignment=True,
41
+ protected_namespaces=(),
42
+ )
43
+
44
+
45
+ def to_str(self) -> str:
46
+ """Returns the string representation of the model using alias"""
47
+ return pprint.pformat(self.model_dump(by_alias=True))
48
+
49
+ def to_json(self) -> str:
50
+ """Returns the JSON representation of the model using alias"""
51
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
52
+ return json.dumps(self.to_dict())
53
+
54
+ @classmethod
55
+ def from_json(cls, json_str: str) -> Optional[Self]:
56
+ """Create an instance of CreateTagRequestObject from a JSON string"""
57
+ return cls.from_dict(json.loads(json_str))
58
+
59
+ def to_dict(self) -> Dict[str, Any]:
60
+ """Return the dictionary representation of the model using alias.
61
+
62
+ This has the following differences from calling pydantic's
63
+ `self.model_dump(by_alias=True)`:
64
+
65
+ * `None` is only added to the output dict for nullable fields that
66
+ were set at model initialization. Other fields with value `None`
67
+ are ignored.
68
+ """
69
+ excluded_fields: Set[str] = set([
70
+ ])
71
+
72
+ _dict = self.model_dump(
73
+ by_alias=True,
74
+ exclude=excluded_fields,
75
+ exclude_none=True,
76
+ )
77
+ # set to None if description (nullable) is None
78
+ # and model_fields_set contains the field
79
+ if self.description is None and "description" in self.model_fields_set:
80
+ _dict['description'] = None
81
+
82
+ # set to None if text_color (nullable) is None
83
+ # and model_fields_set contains the field
84
+ if self.text_color is None and "text_color" in self.model_fields_set:
85
+ _dict['text_color'] = None
86
+
87
+ # set to None if background_color (nullable) is None
88
+ # and model_fields_set contains the field
89
+ if self.background_color is None and "background_color" in self.model_fields_set:
90
+ _dict['background_color'] = None
91
+
92
+ return _dict
93
+
94
+ @classmethod
95
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
96
+ """Create an instance of CreateTagRequestObject from a dict"""
97
+ if obj is None:
98
+ return None
99
+
100
+ if not isinstance(obj, dict):
101
+ return cls.model_validate(obj)
102
+
103
+ _obj = cls.model_validate({
104
+ "name": obj.get("name"),
105
+ "description": obj.get("description"),
106
+ "text_color": obj.get("text_color"),
107
+ "background_color": obj.get("background_color"),
108
+ "archived": obj.get("archived") if obj.get("archived") is not None else False
109
+ })
110
+ return _obj
111
+
112
+
@@ -0,0 +1,198 @@
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 json
18
+ from enum import Enum
19
+ from typing_extensions import Self
20
+
21
+
22
+ class CurrencyEnum(str, Enum):
23
+ """
24
+ CurrencyEnum
25
+ """
26
+
27
+ """
28
+ allowed enum values
29
+ """
30
+ AED = 'aed'
31
+ AFN = 'afn'
32
+ ALL = 'all'
33
+ AMD = 'amd'
34
+ ANG = 'ang'
35
+ AOA = 'aoa'
36
+ ARS = 'ars'
37
+ AUD = 'aud'
38
+ AWG = 'awg'
39
+ AZN = 'azn'
40
+ BAM = 'bam'
41
+ BBD = 'bbd'
42
+ BDT = 'bdt'
43
+ BGN = 'bgn'
44
+ BHD = 'bhd'
45
+ BIF = 'bif'
46
+ BMD = 'bmd'
47
+ BND = 'bnd'
48
+ BOB = 'bob'
49
+ BRL = 'brl'
50
+ BSD = 'bsd'
51
+ BTC = 'btc'
52
+ BTN = 'btn'
53
+ BWP = 'bwp'
54
+ BYN = 'byn'
55
+ BZD = 'bzd'
56
+ CAD = 'cad'
57
+ CDF = 'cdf'
58
+ CHF = 'chf'
59
+ CLP = 'clp'
60
+ CNY = 'cny'
61
+ COP = 'cop'
62
+ CRC = 'crc'
63
+ CUC = 'cuc'
64
+ CUP = 'cup'
65
+ CVE = 'cve'
66
+ CZK = 'czk'
67
+ DJF = 'djf'
68
+ DKK = 'dkk'
69
+ DOP = 'dop'
70
+ DZD = 'dzd'
71
+ EGP = 'egp'
72
+ ERN = 'ern'
73
+ ETB = 'etb'
74
+ EUR = 'eur'
75
+ FJD = 'fjd'
76
+ FKP = 'fkp'
77
+ GBP = 'gbp'
78
+ GEL = 'gel'
79
+ GGP = 'ggp'
80
+ GHS = 'ghs'
81
+ GIP = 'gip'
82
+ GMD = 'gmd'
83
+ GNF = 'gnf'
84
+ GTQ = 'gtq'
85
+ GYD = 'gyd'
86
+ HKD = 'hkd'
87
+ HNL = 'hnl'
88
+ HRK = 'hrk'
89
+ HTG = 'htg'
90
+ HUF = 'huf'
91
+ IDR = 'idr'
92
+ ILS = 'ils'
93
+ IMP = 'imp'
94
+ INR = 'inr'
95
+ IQD = 'iqd'
96
+ IRR = 'irr'
97
+ ISK = 'isk'
98
+ JEP = 'jep'
99
+ JMD = 'jmd'
100
+ JOD = 'jod'
101
+ JPY = 'jpy'
102
+ KES = 'kes'
103
+ KGS = 'kgs'
104
+ KHR = 'khr'
105
+ KMF = 'kmf'
106
+ KPW = 'kpw'
107
+ KRW = 'krw'
108
+ KWD = 'kwd'
109
+ KYD = 'kyd'
110
+ KZT = 'kzt'
111
+ LAK = 'lak'
112
+ LBP = 'lbp'
113
+ LKR = 'lkr'
114
+ LRD = 'lrd'
115
+ LSL = 'lsl'
116
+ LTL = 'ltl'
117
+ LVL = 'lvl'
118
+ LYD = 'lyd'
119
+ MAD = 'mad'
120
+ MDL = 'mdl'
121
+ MGA = 'mga'
122
+ MKD = 'mkd'
123
+ MMK = 'mmk'
124
+ MNT = 'mnt'
125
+ MOP = 'mop'
126
+ MRO = 'mro'
127
+ MUR = 'mur'
128
+ MVR = 'mvr'
129
+ MWK = 'mwk'
130
+ MXN = 'mxn'
131
+ MYR = 'myr'
132
+ MZN = 'mzn'
133
+ NAD = 'nad'
134
+ NGN = 'ngn'
135
+ NIO = 'nio'
136
+ NOK = 'nok'
137
+ NPR = 'npr'
138
+ NZD = 'nzd'
139
+ OMR = 'omr'
140
+ PAB = 'pab'
141
+ PEN = 'pen'
142
+ PGK = 'pgk'
143
+ PHP = 'php'
144
+ PKR = 'pkr'
145
+ PLN = 'pln'
146
+ PYG = 'pyg'
147
+ QAR = 'qar'
148
+ RON = 'ron'
149
+ RSD = 'rsd'
150
+ RUB = 'rub'
151
+ RWF = 'rwf'
152
+ SAR = 'sar'
153
+ SBD = 'sbd'
154
+ SCR = 'scr'
155
+ SDG = 'sdg'
156
+ SEK = 'sek'
157
+ SGD = 'sgd'
158
+ SHP = 'shp'
159
+ SLL = 'sll'
160
+ SOS = 'sos'
161
+ SRD = 'srd'
162
+ STD = 'std'
163
+ SVC = 'svc'
164
+ SYP = 'syp'
165
+ SZL = 'szl'
166
+ THB = 'thb'
167
+ TJS = 'tjs'
168
+ TMT = 'tmt'
169
+ TND = 'tnd'
170
+ TOP = 'top'
171
+ TRY = 'try'
172
+ TTD = 'ttd'
173
+ TWD = 'twd'
174
+ TZS = 'tzs'
175
+ UAH = 'uah'
176
+ UGX = 'ugx'
177
+ USD = 'usd'
178
+ UYU = 'uyu'
179
+ UZS = 'uzs'
180
+ VEF = 'vef'
181
+ VND = 'vnd'
182
+ VUV = 'vuv'
183
+ WST = 'wst'
184
+ XAF = 'xaf'
185
+ XCD = 'xcd'
186
+ XOF = 'xof'
187
+ XPF = 'xpf'
188
+ YER = 'yer'
189
+ ZAR = 'zar'
190
+ ZMW = 'zmw'
191
+ ZWL = 'zwl'
192
+
193
+ @classmethod
194
+ def from_json(cls, json_str: str) -> Self:
195
+ """Create an instance of CurrencyEnum from a JSON string"""
196
+ return cls(json.loads(json_str))
197
+
198
+
@@ -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_category_response_with_dependencies_dependents import DeleteCategoryResponseWithDependenciesDependents
24
+ from typing import Optional, Set
25
+ from typing_extensions import Self
26
+
27
+ class DeleteCategoryResponseWithDependencies(BaseModel):
28
+ """
29
+ DeleteCategoryResponseWithDependencies
30
+ """ # noqa: E501
31
+ category_name: StrictStr = Field(description="The name of the category")
32
+ dependents: DeleteCategoryResponseWithDependenciesDependents
33
+ __properties: ClassVar[List[str]] = ["category_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 DeleteCategoryResponseWithDependencies 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 DeleteCategoryResponseWithDependencies 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
+ "category_name": obj.get("category_name"),
90
+ "dependents": DeleteCategoryResponseWithDependenciesDependents.from_dict(obj["dependents"]) if obj.get("dependents") is not None else None
91
+ })
92
+ return _obj
93
+
94
+
@@ -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, StrictInt
22
+ from typing import Any, ClassVar, Dict, List
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class DeleteCategoryResponseWithDependenciesDependents(BaseModel):
27
+ """
28
+ DeleteCategoryResponseWithDependenciesDependents
29
+ """ # noqa: E501
30
+ budget: StrictInt = Field(description="The number of budgets depending on the category")
31
+ category_rules: StrictInt = Field(description="The number of category rules depending on the category")
32
+ transactions: StrictInt = Field(description="The number of transactions depending on the category")
33
+ children: StrictInt = Field(description="The number of child categories in the category group")
34
+ recurring: StrictInt = Field(description="The number of recurring transactions depending on the category")
35
+ plaid_cats: StrictInt = Field(description="The number of auto created categories based on Plaid categories")
36
+ __properties: ClassVar[List[str]] = ["budget", "category_rules", "transactions", "children", "recurring", "plaid_cats"]
37
+
38
+ model_config = ConfigDict(
39
+ populate_by_name=True,
40
+ validate_assignment=True,
41
+ protected_namespaces=(),
42
+ )
43
+
44
+
45
+ def to_str(self) -> str:
46
+ """Returns the string representation of the model using alias"""
47
+ return pprint.pformat(self.model_dump(by_alias=True))
48
+
49
+ def to_json(self) -> str:
50
+ """Returns the JSON representation of the model using alias"""
51
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
52
+ return json.dumps(self.to_dict())
53
+
54
+ @classmethod
55
+ def from_json(cls, json_str: str) -> Optional[Self]:
56
+ """Create an instance of DeleteCategoryResponseWithDependenciesDependents from a JSON string"""
57
+ return cls.from_dict(json.loads(json_str))
58
+
59
+ def to_dict(self) -> Dict[str, Any]:
60
+ """Return the dictionary representation of the model using alias.
61
+
62
+ This has the following differences from calling pydantic's
63
+ `self.model_dump(by_alias=True)`:
64
+
65
+ * `None` is only added to the output dict for nullable fields that
66
+ were set at model initialization. Other fields with value `None`
67
+ are ignored.
68
+ """
69
+ excluded_fields: Set[str] = set([
70
+ ])
71
+
72
+ _dict = self.model_dump(
73
+ by_alias=True,
74
+ exclude=excluded_fields,
75
+ exclude_none=True,
76
+ )
77
+ return _dict
78
+
79
+ @classmethod
80
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
81
+ """Create an instance of DeleteCategoryResponseWithDependenciesDependents 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
+ "budget": obj.get("budget"),
90
+ "category_rules": obj.get("category_rules"),
91
+ "transactions": obj.get("transactions"),
92
+ "children": obj.get("children"),
93
+ "recurring": obj.get("recurring"),
94
+ "plaid_cats": obj.get("plaid_cats")
95
+ })
96
+ return _obj
97
+
98
+