ynab-cli 0.3.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.
- ynab_cli/__init__.py +0 -0
- ynab_cli/adapters/__init__.py +0 -0
- ynab_cli/adapters/rich/__init__.py +0 -0
- ynab_cli/adapters/rich/io.py +38 -0
- ynab_cli/adapters/textual/__init__.py +0 -0
- ynab_cli/adapters/textual/io.py +62 -0
- ynab_cli/adapters/ynab/__init__.py +8 -0
- ynab_cli/adapters/ynab/api/__init__.py +1 -0
- ynab_cli/adapters/ynab/api/accounts/__init__.py +1 -0
- ynab_cli/adapters/ynab/api/accounts/create_account.py +186 -0
- ynab_cli/adapters/ynab/api/accounts/get_account_by_id.py +177 -0
- ynab_cli/adapters/ynab/api/accounts/get_accounts.py +184 -0
- ynab_cli/adapters/ynab/api/budgets/__init__.py +1 -0
- ynab_cli/adapters/ynab/api/budgets/get_budget_by_id.py +188 -0
- ynab_cli/adapters/ynab/api/budgets/get_budget_settings_by_id.py +163 -0
- ynab_cli/adapters/ynab/api/budgets/get_budgets.py +171 -0
- ynab_cli/adapters/ynab/api/categories/__init__.py +1 -0
- ynab_cli/adapters/ynab/api/categories/get_categories.py +188 -0
- ynab_cli/adapters/ynab/api/categories/get_category_by_id.py +180 -0
- ynab_cli/adapters/ynab/api/categories/get_month_category_by_id.py +194 -0
- ynab_cli/adapters/ynab/api/categories/update_category.py +199 -0
- ynab_cli/adapters/ynab/api/categories/update_month_category.py +213 -0
- ynab_cli/adapters/ynab/api/months/__init__.py +1 -0
- ynab_cli/adapters/ynab/api/months/get_budget_month.py +177 -0
- ynab_cli/adapters/ynab/api/months/get_budget_months.py +184 -0
- ynab_cli/adapters/ynab/api/payee_locations/__init__.py +1 -0
- ynab_cli/adapters/ynab/api/payee_locations/get_payee_location_by_id.py +176 -0
- ynab_cli/adapters/ynab/api/payee_locations/get_payee_locations.py +163 -0
- ynab_cli/adapters/ynab/api/payee_locations/get_payee_locations_by_payee.py +176 -0
- ynab_cli/adapters/ynab/api/payees/__init__.py +1 -0
- ynab_cli/adapters/ynab/api/payees/get_payee_by_id.py +176 -0
- ynab_cli/adapters/ynab/api/payees/get_payees.py +184 -0
- ynab_cli/adapters/ynab/api/payees/update_payee.py +199 -0
- ynab_cli/adapters/ynab/api/scheduled_transactions/__init__.py +1 -0
- ynab_cli/adapters/ynab/api/scheduled_transactions/create_scheduled_transaction.py +186 -0
- ynab_cli/adapters/ynab/api/scheduled_transactions/delete_scheduled_transaction.py +176 -0
- ynab_cli/adapters/ynab/api/scheduled_transactions/get_scheduled_transaction_by_id.py +176 -0
- ynab_cli/adapters/ynab/api/scheduled_transactions/get_scheduled_transactions.py +184 -0
- ynab_cli/adapters/ynab/api/scheduled_transactions/update_scheduled_transaction.py +199 -0
- ynab_cli/adapters/ynab/api/transactions/__init__.py +1 -0
- ynab_cli/adapters/ynab/api/transactions/create_transaction.py +202 -0
- ynab_cli/adapters/ynab/api/transactions/delete_transaction.py +176 -0
- ynab_cli/adapters/ynab/api/transactions/get_transaction_by_id.py +176 -0
- ynab_cli/adapters/ynab/api/transactions/get_transactions.py +227 -0
- ynab_cli/adapters/ynab/api/transactions/get_transactions_by_account.py +236 -0
- ynab_cli/adapters/ynab/api/transactions/get_transactions_by_category.py +236 -0
- ynab_cli/adapters/ynab/api/transactions/get_transactions_by_month.py +236 -0
- ynab_cli/adapters/ynab/api/transactions/get_transactions_by_payee.py +236 -0
- ynab_cli/adapters/ynab/api/transactions/import_transactions.py +183 -0
- ynab_cli/adapters/ynab/api/transactions/update_transaction.py +199 -0
- ynab_cli/adapters/ynab/api/transactions/update_transactions.py +177 -0
- ynab_cli/adapters/ynab/api/user/__init__.py +1 -0
- ynab_cli/adapters/ynab/api/user/get_user.py +130 -0
- ynab_cli/adapters/ynab/client.py +268 -0
- ynab_cli/adapters/ynab/errors.py +16 -0
- ynab_cli/adapters/ynab/models/__init__.py +229 -0
- ynab_cli/adapters/ynab/models/account.py +345 -0
- ynab_cli/adapters/ynab/models/account_response.py +65 -0
- ynab_cli/adapters/ynab/models/account_response_data.py +65 -0
- ynab_cli/adapters/ynab/models/account_type.py +23 -0
- ynab_cli/adapters/ynab/models/accounts_response.py +65 -0
- ynab_cli/adapters/ynab/models/accounts_response_data.py +81 -0
- ynab_cli/adapters/ynab/models/budget_detail.py +405 -0
- ynab_cli/adapters/ynab/models/budget_detail_response.py +65 -0
- ynab_cli/adapters/ynab/models/budget_detail_response_data.py +73 -0
- ynab_cli/adapters/ynab/models/budget_settings.py +115 -0
- ynab_cli/adapters/ynab/models/budget_settings_response.py +65 -0
- ynab_cli/adapters/ynab/models/budget_settings_response_data.py +65 -0
- ynab_cli/adapters/ynab/models/budget_summary.py +216 -0
- ynab_cli/adapters/ynab/models/budget_summary_response.py +65 -0
- ynab_cli/adapters/ynab/models/budget_summary_response_data.py +91 -0
- ynab_cli/adapters/ynab/models/bulk_response.py +65 -0
- ynab_cli/adapters/ynab/models/bulk_response_data.py +65 -0
- ynab_cli/adapters/ynab/models/bulk_response_data_bulk.py +68 -0
- ynab_cli/adapters/ynab/models/bulk_transactions.py +75 -0
- ynab_cli/adapters/ynab/models/categories_response.py +65 -0
- ynab_cli/adapters/ynab/models/categories_response_data.py +81 -0
- ynab_cli/adapters/ynab/models/category.py +519 -0
- ynab_cli/adapters/ynab/models/category_goal_type_type_1.py +15 -0
- ynab_cli/adapters/ynab/models/category_goal_type_type_2_type_1.py +15 -0
- ynab_cli/adapters/ynab/models/category_goal_type_type_3_type_1.py +15 -0
- ynab_cli/adapters/ynab/models/category_group.py +85 -0
- ynab_cli/adapters/ynab/models/category_group_with_categories.py +108 -0
- ynab_cli/adapters/ynab/models/category_response.py +65 -0
- ynab_cli/adapters/ynab/models/category_response_data.py +65 -0
- ynab_cli/adapters/ynab/models/currency_format_type_0.py +117 -0
- ynab_cli/adapters/ynab/models/date_format_type_0.py +61 -0
- ynab_cli/adapters/ynab/models/error_detail.py +75 -0
- ynab_cli/adapters/ynab/models/error_response.py +65 -0
- ynab_cli/adapters/ynab/models/existing_transaction.py +322 -0
- ynab_cli/adapters/ynab/models/get_transactions_by_account_type.py +12 -0
- ynab_cli/adapters/ynab/models/get_transactions_by_category_type.py +12 -0
- ynab_cli/adapters/ynab/models/get_transactions_by_month_type.py +12 -0
- ynab_cli/adapters/ynab/models/get_transactions_by_payee_type.py +12 -0
- ynab_cli/adapters/ynab/models/get_transactions_type.py +12 -0
- ynab_cli/adapters/ynab/models/hybrid_transaction.py +567 -0
- ynab_cli/adapters/ynab/models/hybrid_transaction_type.py +12 -0
- ynab_cli/adapters/ynab/models/hybrid_transactions_response.py +65 -0
- ynab_cli/adapters/ynab/models/hybrid_transactions_response_data.py +84 -0
- ynab_cli/adapters/ynab/models/loan_account_periodic_value_type_0.py +44 -0
- ynab_cli/adapters/ynab/models/month_detail.py +168 -0
- ynab_cli/adapters/ynab/models/month_detail_response.py +65 -0
- ynab_cli/adapters/ynab/models/month_detail_response_data.py +65 -0
- ynab_cli/adapters/ynab/models/month_summaries_response.py +65 -0
- ynab_cli/adapters/ynab/models/month_summaries_response_data.py +81 -0
- ynab_cli/adapters/ynab/models/month_summary.py +145 -0
- ynab_cli/adapters/ynab/models/new_transaction.py +352 -0
- ynab_cli/adapters/ynab/models/patch_category_wrapper.py +65 -0
- ynab_cli/adapters/ynab/models/patch_month_category_wrapper.py +65 -0
- ynab_cli/adapters/ynab/models/patch_payee_wrapper.py +65 -0
- ynab_cli/adapters/ynab/models/patch_transactions_wrapper.py +73 -0
- ynab_cli/adapters/ynab/models/payee.py +100 -0
- ynab_cli/adapters/ynab/models/payee_location.py +93 -0
- ynab_cli/adapters/ynab/models/payee_location_response.py +65 -0
- ynab_cli/adapters/ynab/models/payee_location_response_data.py +65 -0
- ynab_cli/adapters/ynab/models/payee_locations_response.py +65 -0
- ynab_cli/adapters/ynab/models/payee_locations_response_data.py +73 -0
- ynab_cli/adapters/ynab/models/payee_response.py +65 -0
- ynab_cli/adapters/ynab/models/payee_response_data.py +65 -0
- ynab_cli/adapters/ynab/models/payees_response.py +65 -0
- ynab_cli/adapters/ynab/models/payees_response_data.py +81 -0
- ynab_cli/adapters/ynab/models/post_account_wrapper.py +65 -0
- ynab_cli/adapters/ynab/models/post_scheduled_transaction_wrapper.py +65 -0
- ynab_cli/adapters/ynab/models/post_transactions_wrapper.py +91 -0
- ynab_cli/adapters/ynab/models/put_scheduled_transaction_wrapper.py +65 -0
- ynab_cli/adapters/ynab/models/put_transaction_wrapper.py +65 -0
- ynab_cli/adapters/ynab/models/save_account.py +77 -0
- ynab_cli/adapters/ynab/models/save_category.py +129 -0
- ynab_cli/adapters/ynab/models/save_category_response.py +65 -0
- ynab_cli/adapters/ynab/models/save_category_response_data.py +73 -0
- ynab_cli/adapters/ynab/models/save_month_category.py +59 -0
- ynab_cli/adapters/ynab/models/save_payee.py +59 -0
- ynab_cli/adapters/ynab/models/save_payee_response.py +65 -0
- ynab_cli/adapters/ynab/models/save_payee_response_data.py +73 -0
- ynab_cli/adapters/ynab/models/save_scheduled_transaction.py +269 -0
- ynab_cli/adapters/ynab/models/save_sub_transaction.py +166 -0
- ynab_cli/adapters/ynab/models/save_transaction_with_id_or_import_id.py +366 -0
- ynab_cli/adapters/ynab/models/save_transaction_with_optional_fields.py +322 -0
- ynab_cli/adapters/ynab/models/save_transactions_response.py +65 -0
- ynab_cli/adapters/ynab/models/save_transactions_response_data.py +123 -0
- ynab_cli/adapters/ynab/models/scheduled_sub_transaction.py +238 -0
- ynab_cli/adapters/ynab/models/scheduled_transaction_detail.py +381 -0
- ynab_cli/adapters/ynab/models/scheduled_transaction_frequency.py +23 -0
- ynab_cli/adapters/ynab/models/scheduled_transaction_response.py +65 -0
- ynab_cli/adapters/ynab/models/scheduled_transaction_response_data.py +65 -0
- ynab_cli/adapters/ynab/models/scheduled_transaction_summary.py +310 -0
- ynab_cli/adapters/ynab/models/scheduled_transaction_summary_frequency.py +23 -0
- ynab_cli/adapters/ynab/models/scheduled_transactions_response.py +65 -0
- ynab_cli/adapters/ynab/models/scheduled_transactions_response_data.py +81 -0
- ynab_cli/adapters/ynab/models/sub_transaction.py +259 -0
- ynab_cli/adapters/ynab/models/transaction_cleared_status.py +13 -0
- ynab_cli/adapters/ynab/models/transaction_detail.py +570 -0
- ynab_cli/adapters/ynab/models/transaction_flag_color_type_1.py +16 -0
- ynab_cli/adapters/ynab/models/transaction_flag_color_type_2_type_1.py +16 -0
- ynab_cli/adapters/ynab/models/transaction_flag_color_type_3_type_1.py +16 -0
- ynab_cli/adapters/ynab/models/transaction_response.py +65 -0
- ynab_cli/adapters/ynab/models/transaction_response_data.py +65 -0
- ynab_cli/adapters/ynab/models/transaction_summary.py +499 -0
- ynab_cli/adapters/ynab/models/transaction_summary_debt_transaction_type_type_1.py +18 -0
- ynab_cli/adapters/ynab/models/transaction_summary_debt_transaction_type_type_2_type_1.py +18 -0
- ynab_cli/adapters/ynab/models/transaction_summary_debt_transaction_type_type_3_type_1.py +18 -0
- ynab_cli/adapters/ynab/models/transactions_import_response.py +65 -0
- ynab_cli/adapters/ynab/models/transactions_import_response_data.py +59 -0
- ynab_cli/adapters/ynab/models/transactions_response.py +65 -0
- ynab_cli/adapters/ynab/models/transactions_response_data.py +81 -0
- ynab_cli/adapters/ynab/models/user.py +60 -0
- ynab_cli/adapters/ynab/models/user_response.py +65 -0
- ynab_cli/adapters/ynab/models/user_response_data.py +65 -0
- ynab_cli/adapters/ynab/types.py +46 -0
- ynab_cli/adapters/ynab/util.py +78 -0
- ynab_cli/domain/__init__.py +0 -0
- ynab_cli/domain/constants.py +3 -0
- ynab_cli/domain/models/__init__.py +0 -0
- ynab_cli/domain/models/rules.py +37 -0
- ynab_cli/domain/ports/__init__.py +5 -0
- ynab_cli/domain/ports/io.py +63 -0
- ynab_cli/domain/settings.py +16 -0
- ynab_cli/domain/use_cases/__init__.py +0 -0
- ynab_cli/domain/use_cases/categories.py +105 -0
- ynab_cli/domain/use_cases/payees.py +232 -0
- ynab_cli/domain/use_cases/transactions.py +93 -0
- ynab_cli/host/__init__.py +14 -0
- ynab_cli/host/cli.py +37 -0
- ynab_cli/host/click/__init__.py +0 -0
- ynab_cli/host/click/cli.py +44 -0
- ynab_cli/host/click/commands/__init__.py +0 -0
- ynab_cli/host/click/commands/categories.py +92 -0
- ynab_cli/host/click/commands/payees.py +157 -0
- ynab_cli/host/click/commands/rich/__init__.py +0 -0
- ynab_cli/host/click/commands/rich/progress_table.py +37 -0
- ynab_cli/host/click/commands/transactions.py +76 -0
- ynab_cli/host/constants.py +3 -0
- ynab_cli/host/textual/__init__.py +0 -0
- ynab_cli/host/textual/app.py +98 -0
- ynab_cli/host/textual/app.tcss +47 -0
- ynab_cli/host/textual/cli.py +42 -0
- ynab_cli/host/textual/widgets/__init__.py +58 -0
- ynab_cli/host/textual/widgets/categories.py +90 -0
- ynab_cli/host/textual/widgets/payees.py +154 -0
- ynab_cli/host/textual/widgets/transactions.py +89 -0
- ynab_cli/py.typed +0 -0
- ynab_cli-0.3.0.dist-info/METADATA +102 -0
- ynab_cli-0.3.0.dist-info/RECORD +206 -0
- ynab_cli-0.3.0.dist-info/WHEEL +4 -0
- ynab_cli-0.3.0.dist-info/entry_points.txt +2 -0
- ynab_cli-0.3.0.dist-info/licenses/LICENSE.md +21 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
from ynab_cli.adapters.ynab.types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
from ynab_cli.adapters.ynab.models.hybrid_transaction import HybridTransaction
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="HybridTransactionsResponseData")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class HybridTransactionsResponseData:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
transactions (list['HybridTransaction']):
|
|
21
|
+
server_knowledge (Union[Unset, int]): The knowledge of the server
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
transactions: list["HybridTransaction"]
|
|
25
|
+
server_knowledge: Unset | int = UNSET
|
|
26
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
27
|
+
|
|
28
|
+
def to_dict(self) -> dict[str, Any]:
|
|
29
|
+
transactions = []
|
|
30
|
+
for transactions_item_data in self.transactions:
|
|
31
|
+
transactions_item = transactions_item_data.to_dict()
|
|
32
|
+
transactions.append(transactions_item)
|
|
33
|
+
|
|
34
|
+
server_knowledge = self.server_knowledge
|
|
35
|
+
|
|
36
|
+
field_dict: dict[str, Any] = {}
|
|
37
|
+
field_dict.update(self.additional_properties)
|
|
38
|
+
field_dict.update(
|
|
39
|
+
{
|
|
40
|
+
"transactions": transactions,
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
if server_knowledge is not UNSET:
|
|
44
|
+
field_dict["server_knowledge"] = server_knowledge
|
|
45
|
+
|
|
46
|
+
return field_dict
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
50
|
+
from ynab_cli.adapters.ynab.models.hybrid_transaction import HybridTransaction
|
|
51
|
+
|
|
52
|
+
d = dict(src_dict)
|
|
53
|
+
transactions = []
|
|
54
|
+
_transactions = d.pop("transactions")
|
|
55
|
+
for transactions_item_data in _transactions:
|
|
56
|
+
transactions_item = HybridTransaction.from_dict(transactions_item_data)
|
|
57
|
+
|
|
58
|
+
transactions.append(transactions_item)
|
|
59
|
+
|
|
60
|
+
server_knowledge = d.pop("server_knowledge", UNSET)
|
|
61
|
+
|
|
62
|
+
hybrid_transactions_response_data = cls(
|
|
63
|
+
transactions=transactions,
|
|
64
|
+
server_knowledge=server_knowledge,
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
hybrid_transactions_response_data.additional_properties = d
|
|
68
|
+
return hybrid_transactions_response_data
|
|
69
|
+
|
|
70
|
+
@property
|
|
71
|
+
def additional_keys(self) -> list[str]:
|
|
72
|
+
return list(self.additional_properties.keys())
|
|
73
|
+
|
|
74
|
+
def __getitem__(self, key: str) -> Any:
|
|
75
|
+
return self.additional_properties[key]
|
|
76
|
+
|
|
77
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
78
|
+
self.additional_properties[key] = value
|
|
79
|
+
|
|
80
|
+
def __delitem__(self, key: str) -> None:
|
|
81
|
+
del self.additional_properties[key]
|
|
82
|
+
|
|
83
|
+
def __contains__(self, key: str) -> bool:
|
|
84
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
T = TypeVar("T", bound="LoanAccountPeriodicValueType0")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@_attrs_define
|
|
11
|
+
class LoanAccountPeriodicValueType0:
|
|
12
|
+
""" """
|
|
13
|
+
|
|
14
|
+
additional_properties: dict[str, int] = _attrs_field(init=False, factory=dict)
|
|
15
|
+
|
|
16
|
+
def to_dict(self) -> dict[str, Any]:
|
|
17
|
+
field_dict: dict[str, Any] = {}
|
|
18
|
+
field_dict.update(self.additional_properties)
|
|
19
|
+
|
|
20
|
+
return field_dict
|
|
21
|
+
|
|
22
|
+
@classmethod
|
|
23
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
24
|
+
d = dict(src_dict)
|
|
25
|
+
loan_account_periodic_value_type_0 = cls()
|
|
26
|
+
|
|
27
|
+
loan_account_periodic_value_type_0.additional_properties = d
|
|
28
|
+
return loan_account_periodic_value_type_0
|
|
29
|
+
|
|
30
|
+
@property
|
|
31
|
+
def additional_keys(self) -> list[str]:
|
|
32
|
+
return list(self.additional_properties.keys())
|
|
33
|
+
|
|
34
|
+
def __getitem__(self, key: str) -> int:
|
|
35
|
+
return self.additional_properties[key]
|
|
36
|
+
|
|
37
|
+
def __setitem__(self, key: str, value: int) -> None:
|
|
38
|
+
self.additional_properties[key] = value
|
|
39
|
+
|
|
40
|
+
def __delitem__(self, key: str) -> None:
|
|
41
|
+
del self.additional_properties[key]
|
|
42
|
+
|
|
43
|
+
def __contains__(self, key: str) -> bool:
|
|
44
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
from collections.abc import Mapping
|
|
3
|
+
from typing import TYPE_CHECKING, Any, TypeVar, cast
|
|
4
|
+
|
|
5
|
+
from attrs import define as _attrs_define
|
|
6
|
+
from attrs import field as _attrs_field
|
|
7
|
+
from dateutil.parser import isoparse
|
|
8
|
+
|
|
9
|
+
from ynab_cli.adapters.ynab.types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
if TYPE_CHECKING:
|
|
12
|
+
from ynab_cli.adapters.ynab.models.category import Category
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
T = TypeVar("T", bound="MonthDetail")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@_attrs_define
|
|
19
|
+
class MonthDetail:
|
|
20
|
+
"""
|
|
21
|
+
Attributes:
|
|
22
|
+
month (datetime.date):
|
|
23
|
+
income (int): The total amount of transactions categorized to 'Inflow: Ready to Assign' in the month
|
|
24
|
+
budgeted (int): The total amount budgeted in the month
|
|
25
|
+
activity (int): The total amount of transactions in the month, excluding those categorized to 'Inflow: Ready to
|
|
26
|
+
Assign'
|
|
27
|
+
to_be_budgeted (int): The available amount for 'Ready to Assign'
|
|
28
|
+
deleted (bool): Whether or not the month has been deleted. Deleted months will only be included in delta
|
|
29
|
+
requests.
|
|
30
|
+
categories (list['Category']): The budget month categories. Amounts (budgeted, activity, balance, etc.) are
|
|
31
|
+
specific to the {month} parameter specified.
|
|
32
|
+
note (Union[None, Unset, str]):
|
|
33
|
+
age_of_money (Union[None, Unset, int]): The Age of Money as of the month
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
month: datetime.date
|
|
37
|
+
income: int
|
|
38
|
+
budgeted: int
|
|
39
|
+
activity: int
|
|
40
|
+
to_be_budgeted: int
|
|
41
|
+
deleted: bool
|
|
42
|
+
categories: list["Category"]
|
|
43
|
+
note: None | Unset | str = UNSET
|
|
44
|
+
age_of_money: None | Unset | int = UNSET
|
|
45
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
46
|
+
|
|
47
|
+
def to_dict(self) -> dict[str, Any]:
|
|
48
|
+
month = self.month.isoformat()
|
|
49
|
+
|
|
50
|
+
income = self.income
|
|
51
|
+
|
|
52
|
+
budgeted = self.budgeted
|
|
53
|
+
|
|
54
|
+
activity = self.activity
|
|
55
|
+
|
|
56
|
+
to_be_budgeted = self.to_be_budgeted
|
|
57
|
+
|
|
58
|
+
deleted = self.deleted
|
|
59
|
+
|
|
60
|
+
categories = []
|
|
61
|
+
for categories_item_data in self.categories:
|
|
62
|
+
categories_item = categories_item_data.to_dict()
|
|
63
|
+
categories.append(categories_item)
|
|
64
|
+
|
|
65
|
+
note: None | Unset | str
|
|
66
|
+
if isinstance(self.note, Unset):
|
|
67
|
+
note = UNSET
|
|
68
|
+
else:
|
|
69
|
+
note = self.note
|
|
70
|
+
|
|
71
|
+
age_of_money: None | Unset | int
|
|
72
|
+
if isinstance(self.age_of_money, Unset):
|
|
73
|
+
age_of_money = UNSET
|
|
74
|
+
else:
|
|
75
|
+
age_of_money = self.age_of_money
|
|
76
|
+
|
|
77
|
+
field_dict: dict[str, Any] = {}
|
|
78
|
+
field_dict.update(self.additional_properties)
|
|
79
|
+
field_dict.update(
|
|
80
|
+
{
|
|
81
|
+
"month": month,
|
|
82
|
+
"income": income,
|
|
83
|
+
"budgeted": budgeted,
|
|
84
|
+
"activity": activity,
|
|
85
|
+
"to_be_budgeted": to_be_budgeted,
|
|
86
|
+
"deleted": deleted,
|
|
87
|
+
"categories": categories,
|
|
88
|
+
}
|
|
89
|
+
)
|
|
90
|
+
if note is not UNSET:
|
|
91
|
+
field_dict["note"] = note
|
|
92
|
+
if age_of_money is not UNSET:
|
|
93
|
+
field_dict["age_of_money"] = age_of_money
|
|
94
|
+
|
|
95
|
+
return field_dict
|
|
96
|
+
|
|
97
|
+
@classmethod
|
|
98
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
99
|
+
from ynab_cli.adapters.ynab.models.category import Category
|
|
100
|
+
|
|
101
|
+
d = dict(src_dict)
|
|
102
|
+
month = isoparse(d.pop("month")).date()
|
|
103
|
+
|
|
104
|
+
income = d.pop("income")
|
|
105
|
+
|
|
106
|
+
budgeted = d.pop("budgeted")
|
|
107
|
+
|
|
108
|
+
activity = d.pop("activity")
|
|
109
|
+
|
|
110
|
+
to_be_budgeted = d.pop("to_be_budgeted")
|
|
111
|
+
|
|
112
|
+
deleted = d.pop("deleted")
|
|
113
|
+
|
|
114
|
+
categories = []
|
|
115
|
+
_categories = d.pop("categories")
|
|
116
|
+
for categories_item_data in _categories:
|
|
117
|
+
categories_item = Category.from_dict(categories_item_data)
|
|
118
|
+
|
|
119
|
+
categories.append(categories_item)
|
|
120
|
+
|
|
121
|
+
def _parse_note(data: object) -> None | Unset | str:
|
|
122
|
+
if data is None:
|
|
123
|
+
return data
|
|
124
|
+
if isinstance(data, Unset):
|
|
125
|
+
return data
|
|
126
|
+
return cast(None | Unset | str, data)
|
|
127
|
+
|
|
128
|
+
note = _parse_note(d.pop("note", UNSET))
|
|
129
|
+
|
|
130
|
+
def _parse_age_of_money(data: object) -> None | Unset | int:
|
|
131
|
+
if data is None:
|
|
132
|
+
return data
|
|
133
|
+
if isinstance(data, Unset):
|
|
134
|
+
return data
|
|
135
|
+
return cast(None | Unset | int, data)
|
|
136
|
+
|
|
137
|
+
age_of_money = _parse_age_of_money(d.pop("age_of_money", UNSET))
|
|
138
|
+
|
|
139
|
+
month_detail = cls(
|
|
140
|
+
month=month,
|
|
141
|
+
income=income,
|
|
142
|
+
budgeted=budgeted,
|
|
143
|
+
activity=activity,
|
|
144
|
+
to_be_budgeted=to_be_budgeted,
|
|
145
|
+
deleted=deleted,
|
|
146
|
+
categories=categories,
|
|
147
|
+
note=note,
|
|
148
|
+
age_of_money=age_of_money,
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
month_detail.additional_properties = d
|
|
152
|
+
return month_detail
|
|
153
|
+
|
|
154
|
+
@property
|
|
155
|
+
def additional_keys(self) -> list[str]:
|
|
156
|
+
return list(self.additional_properties.keys())
|
|
157
|
+
|
|
158
|
+
def __getitem__(self, key: str) -> Any:
|
|
159
|
+
return self.additional_properties[key]
|
|
160
|
+
|
|
161
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
162
|
+
self.additional_properties[key] = value
|
|
163
|
+
|
|
164
|
+
def __delitem__(self, key: str) -> None:
|
|
165
|
+
del self.additional_properties[key]
|
|
166
|
+
|
|
167
|
+
def __contains__(self, key: str) -> bool:
|
|
168
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from ynab_cli.adapters.ynab.models.month_detail_response_data import MonthDetailResponseData
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="MonthDetailResponse")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class MonthDetailResponse:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
data (MonthDetailResponseData):
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
data: "MonthDetailResponseData"
|
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
data = self.data.to_dict()
|
|
26
|
+
|
|
27
|
+
field_dict: dict[str, Any] = {}
|
|
28
|
+
field_dict.update(self.additional_properties)
|
|
29
|
+
field_dict.update(
|
|
30
|
+
{
|
|
31
|
+
"data": data,
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
return field_dict
|
|
36
|
+
|
|
37
|
+
@classmethod
|
|
38
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
39
|
+
from ynab_cli.adapters.ynab.models.month_detail_response_data import MonthDetailResponseData
|
|
40
|
+
|
|
41
|
+
d = dict(src_dict)
|
|
42
|
+
data = MonthDetailResponseData.from_dict(d.pop("data"))
|
|
43
|
+
|
|
44
|
+
month_detail_response = cls(
|
|
45
|
+
data=data,
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
month_detail_response.additional_properties = d
|
|
49
|
+
return month_detail_response
|
|
50
|
+
|
|
51
|
+
@property
|
|
52
|
+
def additional_keys(self) -> list[str]:
|
|
53
|
+
return list(self.additional_properties.keys())
|
|
54
|
+
|
|
55
|
+
def __getitem__(self, key: str) -> Any:
|
|
56
|
+
return self.additional_properties[key]
|
|
57
|
+
|
|
58
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
59
|
+
self.additional_properties[key] = value
|
|
60
|
+
|
|
61
|
+
def __delitem__(self, key: str) -> None:
|
|
62
|
+
del self.additional_properties[key]
|
|
63
|
+
|
|
64
|
+
def __contains__(self, key: str) -> bool:
|
|
65
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from ynab_cli.adapters.ynab.models.month_detail import MonthDetail
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="MonthDetailResponseData")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class MonthDetailResponseData:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
month (MonthDetail):
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
month: "MonthDetail"
|
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
month = self.month.to_dict()
|
|
26
|
+
|
|
27
|
+
field_dict: dict[str, Any] = {}
|
|
28
|
+
field_dict.update(self.additional_properties)
|
|
29
|
+
field_dict.update(
|
|
30
|
+
{
|
|
31
|
+
"month": month,
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
return field_dict
|
|
36
|
+
|
|
37
|
+
@classmethod
|
|
38
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
39
|
+
from ynab_cli.adapters.ynab.models.month_detail import MonthDetail
|
|
40
|
+
|
|
41
|
+
d = dict(src_dict)
|
|
42
|
+
month = MonthDetail.from_dict(d.pop("month"))
|
|
43
|
+
|
|
44
|
+
month_detail_response_data = cls(
|
|
45
|
+
month=month,
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
month_detail_response_data.additional_properties = d
|
|
49
|
+
return month_detail_response_data
|
|
50
|
+
|
|
51
|
+
@property
|
|
52
|
+
def additional_keys(self) -> list[str]:
|
|
53
|
+
return list(self.additional_properties.keys())
|
|
54
|
+
|
|
55
|
+
def __getitem__(self, key: str) -> Any:
|
|
56
|
+
return self.additional_properties[key]
|
|
57
|
+
|
|
58
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
59
|
+
self.additional_properties[key] = value
|
|
60
|
+
|
|
61
|
+
def __delitem__(self, key: str) -> None:
|
|
62
|
+
del self.additional_properties[key]
|
|
63
|
+
|
|
64
|
+
def __contains__(self, key: str) -> bool:
|
|
65
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from ynab_cli.adapters.ynab.models.month_summaries_response_data import MonthSummariesResponseData
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="MonthSummariesResponse")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class MonthSummariesResponse:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
data (MonthSummariesResponseData):
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
data: "MonthSummariesResponseData"
|
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
data = self.data.to_dict()
|
|
26
|
+
|
|
27
|
+
field_dict: dict[str, Any] = {}
|
|
28
|
+
field_dict.update(self.additional_properties)
|
|
29
|
+
field_dict.update(
|
|
30
|
+
{
|
|
31
|
+
"data": data,
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
return field_dict
|
|
36
|
+
|
|
37
|
+
@classmethod
|
|
38
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
39
|
+
from ynab_cli.adapters.ynab.models.month_summaries_response_data import MonthSummariesResponseData
|
|
40
|
+
|
|
41
|
+
d = dict(src_dict)
|
|
42
|
+
data = MonthSummariesResponseData.from_dict(d.pop("data"))
|
|
43
|
+
|
|
44
|
+
month_summaries_response = cls(
|
|
45
|
+
data=data,
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
month_summaries_response.additional_properties = d
|
|
49
|
+
return month_summaries_response
|
|
50
|
+
|
|
51
|
+
@property
|
|
52
|
+
def additional_keys(self) -> list[str]:
|
|
53
|
+
return list(self.additional_properties.keys())
|
|
54
|
+
|
|
55
|
+
def __getitem__(self, key: str) -> Any:
|
|
56
|
+
return self.additional_properties[key]
|
|
57
|
+
|
|
58
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
59
|
+
self.additional_properties[key] = value
|
|
60
|
+
|
|
61
|
+
def __delitem__(self, key: str) -> None:
|
|
62
|
+
del self.additional_properties[key]
|
|
63
|
+
|
|
64
|
+
def __contains__(self, key: str) -> bool:
|
|
65
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from ynab_cli.adapters.ynab.models.month_summary import MonthSummary
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="MonthSummariesResponseData")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class MonthSummariesResponseData:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
months (list['MonthSummary']):
|
|
19
|
+
server_knowledge (int): The knowledge of the server
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
months: list["MonthSummary"]
|
|
23
|
+
server_knowledge: int
|
|
24
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
25
|
+
|
|
26
|
+
def to_dict(self) -> dict[str, Any]:
|
|
27
|
+
months = []
|
|
28
|
+
for months_item_data in self.months:
|
|
29
|
+
months_item = months_item_data.to_dict()
|
|
30
|
+
months.append(months_item)
|
|
31
|
+
|
|
32
|
+
server_knowledge = self.server_knowledge
|
|
33
|
+
|
|
34
|
+
field_dict: dict[str, Any] = {}
|
|
35
|
+
field_dict.update(self.additional_properties)
|
|
36
|
+
field_dict.update(
|
|
37
|
+
{
|
|
38
|
+
"months": months,
|
|
39
|
+
"server_knowledge": server_knowledge,
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
return field_dict
|
|
44
|
+
|
|
45
|
+
@classmethod
|
|
46
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
47
|
+
from ynab_cli.adapters.ynab.models.month_summary import MonthSummary
|
|
48
|
+
|
|
49
|
+
d = dict(src_dict)
|
|
50
|
+
months = []
|
|
51
|
+
_months = d.pop("months")
|
|
52
|
+
for months_item_data in _months:
|
|
53
|
+
months_item = MonthSummary.from_dict(months_item_data)
|
|
54
|
+
|
|
55
|
+
months.append(months_item)
|
|
56
|
+
|
|
57
|
+
server_knowledge = d.pop("server_knowledge")
|
|
58
|
+
|
|
59
|
+
month_summaries_response_data = cls(
|
|
60
|
+
months=months,
|
|
61
|
+
server_knowledge=server_knowledge,
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
month_summaries_response_data.additional_properties = d
|
|
65
|
+
return month_summaries_response_data
|
|
66
|
+
|
|
67
|
+
@property
|
|
68
|
+
def additional_keys(self) -> list[str]:
|
|
69
|
+
return list(self.additional_properties.keys())
|
|
70
|
+
|
|
71
|
+
def __getitem__(self, key: str) -> Any:
|
|
72
|
+
return self.additional_properties[key]
|
|
73
|
+
|
|
74
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
75
|
+
self.additional_properties[key] = value
|
|
76
|
+
|
|
77
|
+
def __delitem__(self, key: str) -> None:
|
|
78
|
+
del self.additional_properties[key]
|
|
79
|
+
|
|
80
|
+
def __contains__(self, key: str) -> bool:
|
|
81
|
+
return key in self.additional_properties
|