From 71e83f7fb4c8f2007cae99b8993e77ddb53698bf Mon Sep 17 00:00:00 2001 From: rienafairefr Date: Thu, 22 Feb 2018 21:48:27 +0100 Subject: [PATCH] commit the generated code, after all --- .gitignore | 2 - ynab-api/.gitignore | 64 ++ ynab-api/.swagger-codegen-ignore | 23 + ynab-api/.swagger-codegen/VERSION | 1 + ynab-api/.travis.yml | 14 + ynab-api/README.md | 177 ++++ ynab-api/docs/Account.md | 17 + ynab-api/docs/AccountResponse.md | 10 + ynab-api/docs/AccountWrapper.md | 10 + ynab-api/docs/AccountsApi.md | 120 +++ ynab-api/docs/AccountsResponse.md | 10 + ynab-api/docs/AccountsWrapper.md | 10 + ynab-api/docs/BudgetDetail.md | 23 + ynab-api/docs/BudgetDetailResponse.md | 10 + ynab-api/docs/BudgetDetailWrapper.md | 11 + ynab-api/docs/BudgetSummary.md | 13 + ynab-api/docs/BudgetSummaryResponse.md | 10 + ynab-api/docs/BudgetSummaryWrapper.md | 10 + ynab-api/docs/BudgetsApi.md | 116 +++ ynab-api/docs/BulkIdWrapper.md | 10 + ynab-api/docs/BulkIds.md | 11 + ynab-api/docs/BulkResponse.md | 10 + ynab-api/docs/BulkTransactions.md | 10 + ynab-api/docs/CategoriesApi.md | 120 +++ ynab-api/docs/CategoriesResponse.md | 10 + ynab-api/docs/Category.md | 16 + ynab-api/docs/CategoryGroup.md | 12 + ynab-api/docs/CategoryGroupWithCategories.md | 13 + ynab-api/docs/CategoryGroupsWrapper.md | 10 + ynab-api/docs/CategoryResponse.md | 10 + ynab-api/docs/CategoryWrapper.md | 10 + ynab-api/docs/CurrencyFormat.md | 9 + ynab-api/docs/DateFormat.md | 9 + ynab-api/docs/ErrorDetail.md | 12 + ynab-api/docs/ErrorResponse.md | 10 + ynab-api/docs/MonthDetail.md | 11 + ynab-api/docs/MonthDetailResponse.md | 10 + ynab-api/docs/MonthDetailWrapper.md | 10 + ynab-api/docs/MonthSummariesResponse.md | 10 + ynab-api/docs/MonthSummariesWrapper.md | 10 + ynab-api/docs/MonthSummary.md | 10 + ynab-api/docs/MonthsApi.md | 120 +++ ynab-api/docs/Payee.md | 11 + ynab-api/docs/PayeeLocation.md | 11 + ynab-api/docs/PayeeLocationResponse.md | 10 + ynab-api/docs/PayeeLocationWrapper.md | 10 + ynab-api/docs/PayeeLocationsApi.md | 177 ++++ ynab-api/docs/PayeeLocationsResponse.md | 10 + ynab-api/docs/PayeeLocationsWrapper.md | 10 + ynab-api/docs/PayeeResponse.md | 10 + ynab-api/docs/PayeeWrapper.md | 10 + ynab-api/docs/PayeesApi.md | 120 +++ ynab-api/docs/PayeesResponse.md | 10 + ynab-api/docs/PayeesWrapper.md | 10 + ynab-api/docs/SaveTransaction.md | 14 + ynab-api/docs/SaveTransactionWrapper.md | 10 + ynab-api/docs/ScheduledSubTransaction.md | 12 + ynab-api/docs/ScheduledTransactionDetail.md | 16 + ynab-api/docs/ScheduledTransactionResponse.md | 10 + ynab-api/docs/ScheduledTransactionSummary.md | 15 + ynab-api/docs/ScheduledTransactionWrapper.md | 10 + ynab-api/docs/ScheduledTransactionsApi.md | 120 +++ .../docs/ScheduledTransactionsResponse.md | 10 + ynab-api/docs/ScheduledTransactionsWrapper.md | 10 + ynab-api/docs/SubTransaction.md | 12 + ynab-api/docs/TransactionDetail.md | 16 + ynab-api/docs/TransactionResponse.md | 10 + ynab-api/docs/TransactionSummary.md | 15 + ynab-api/docs/TransactionWrapper.md | 10 + ynab-api/docs/TransactionsApi.md | 415 ++++++++++ ynab-api/docs/TransactionsResponse.md | 10 + ynab-api/docs/TransactionsWrapper.md | 10 + ynab-api/git_push.sh | 52 ++ ynab-api/requirements.txt | 5 + ynab-api/setup.py | 40 + ynab-api/test-requirements.txt | 5 + ynab-api/test/__init__.py | 0 ynab-api/test/test_account.py | 40 + ynab-api/test/test_account_response.py | 40 + ynab-api/test/test_account_wrapper.py | 40 + ynab-api/test/test_accounts_api.py | 48 ++ ynab-api/test/test_accounts_response.py | 40 + ynab-api/test/test_accounts_wrapper.py | 40 + ynab-api/test/test_budget_detail.py | 40 + ynab-api/test/test_budget_detail_response.py | 40 + ynab-api/test/test_budget_detail_wrapper.py | 40 + ynab-api/test/test_budget_summary.py | 40 + ynab-api/test/test_budget_summary_response.py | 40 + ynab-api/test/test_budget_summary_wrapper.py | 40 + ynab-api/test/test_budgets_api.py | 48 ++ ynab-api/test/test_bulk_id_wrapper.py | 40 + ynab-api/test/test_bulk_ids.py | 40 + ynab-api/test/test_bulk_response.py | 40 + ynab-api/test/test_bulk_transactions.py | 40 + ynab-api/test/test_categories_api.py | 48 ++ ynab-api/test/test_categories_response.py | 40 + ynab-api/test/test_category.py | 40 + ynab-api/test/test_category_group.py | 40 + .../test_category_group_with_categories.py | 40 + ynab-api/test/test_category_groups_wrapper.py | 40 + ynab-api/test/test_category_response.py | 40 + ynab-api/test/test_category_wrapper.py | 40 + ynab-api/test/test_currency_format.py | 40 + ynab-api/test/test_date_format.py | 40 + ynab-api/test/test_error_detail.py | 40 + ynab-api/test/test_error_response.py | 40 + ynab-api/test/test_month_detail.py | 40 + ynab-api/test/test_month_detail_response.py | 40 + ynab-api/test/test_month_detail_wrapper.py | 40 + .../test/test_month_summaries_response.py | 40 + ynab-api/test/test_month_summaries_wrapper.py | 40 + ynab-api/test/test_month_summary.py | 40 + ynab-api/test/test_months_api.py | 48 ++ ynab-api/test/test_payee.py | 40 + ynab-api/test/test_payee_location.py | 40 + ynab-api/test/test_payee_location_response.py | 40 + ynab-api/test/test_payee_location_wrapper.py | 40 + ynab-api/test/test_payee_locations_api.py | 55 ++ .../test/test_payee_locations_response.py | 40 + ynab-api/test/test_payee_locations_wrapper.py | 40 + ynab-api/test/test_payee_response.py | 40 + ynab-api/test/test_payee_wrapper.py | 40 + ynab-api/test/test_payees_api.py | 48 ++ ynab-api/test/test_payees_response.py | 40 + ynab-api/test/test_payees_wrapper.py | 40 + ynab-api/test/test_save_transaction.py | 40 + .../test/test_save_transaction_wrapper.py | 40 + .../test/test_scheduled_sub_transaction.py | 40 + .../test/test_scheduled_transaction_detail.py | 40 + .../test_scheduled_transaction_response.py | 40 + .../test_scheduled_transaction_summary.py | 40 + .../test_scheduled_transaction_wrapper.py | 40 + .../test/test_scheduled_transactions_api.py | 48 ++ .../test_scheduled_transactions_response.py | 40 + .../test_scheduled_transactions_wrapper.py | 40 + ynab-api/test/test_sub_transaction.py | 40 + ynab-api/test/test_transaction_detail.py | 40 + ynab-api/test/test_transaction_response.py | 40 + ynab-api/test/test_transaction_summary.py | 40 + ynab-api/test/test_transaction_wrapper.py | 40 + ynab-api/test/test_transactions_api.py | 83 ++ ynab-api/test/test_transactions_response.py | 40 + ynab-api/test/test_transactions_wrapper.py | 40 + ynab-api/tox.ini | 10 + ynab-api/ynab_api/__init__.py | 89 ++ ynab-api/ynab_api/api/__init__.py | 13 + ynab-api/ynab_api/api/accounts_api.py | 232 ++++++ ynab-api/ynab_api/api/budgets_api.py | 220 +++++ ynab-api/ynab_api/api/categories_api.py | 232 ++++++ ynab-api/ynab_api/api/months_api.py | 232 ++++++ ynab-api/ynab_api/api/payee_locations_api.py | 335 ++++++++ ynab-api/ynab_api/api/payees_api.py | 232 ++++++ .../api/scheduled_transactions_api.py | 232 ++++++ ynab-api/ynab_api/api/transactions_api.py | 771 ++++++++++++++++++ ynab-api/ynab_api/api_client.py | 621 ++++++++++++++ ynab-api/ynab_api/configuration.py | 247 ++++++ ynab-api/ynab_api/models/__init__.py | 75 ++ ynab-api/ynab_api/models/account.py | 318 ++++++++ ynab-api/ynab_api/models/account_response.py | 115 +++ ynab-api/ynab_api/models/account_wrapper.py | 115 +++ ynab-api/ynab_api/models/accounts_response.py | 115 +++ ynab-api/ynab_api/models/accounts_wrapper.py | 115 +++ ynab-api/ynab_api/models/budget_detail.py | 466 +++++++++++ .../ynab_api/models/budget_detail_response.py | 115 +++ .../ynab_api/models/budget_detail_wrapper.py | 144 ++++ ynab-api/ynab_api/models/budget_summary.py | 195 +++++ .../models/budget_summary_response.py | 115 +++ .../ynab_api/models/budget_summary_wrapper.py | 115 +++ ynab-api/ynab_api/models/bulk_id_wrapper.py | 115 +++ ynab-api/ynab_api/models/bulk_ids.py | 144 ++++ ynab-api/ynab_api/models/bulk_response.py | 115 +++ ynab-api/ynab_api/models/bulk_transactions.py | 115 +++ .../ynab_api/models/categories_response.py | 115 +++ ynab-api/ynab_api/models/category.py | 283 +++++++ ynab-api/ynab_api/models/category_group.py | 169 ++++ .../models/category_group_with_categories.py | 201 +++++ .../models/category_groups_wrapper.py | 115 +++ ynab-api/ynab_api/models/category_response.py | 115 +++ ynab-api/ynab_api/models/category_wrapper.py | 115 +++ ynab-api/ynab_api/models/currency_format.py | 84 ++ ynab-api/ynab_api/models/date_format.py | 84 ++ ynab-api/ynab_api/models/error_detail.py | 167 ++++ ynab-api/ynab_api/models/error_response.py | 115 +++ ynab-api/ynab_api/models/month_detail.py | 145 ++++ .../ynab_api/models/month_detail_response.py | 115 +++ .../ynab_api/models/month_detail_wrapper.py | 115 +++ .../models/month_summaries_response.py | 115 +++ .../models/month_summaries_wrapper.py | 115 +++ ynab-api/ynab_api/models/month_summary.py | 113 +++ ynab-api/ynab_api/models/payee.py | 140 ++++ ynab-api/ynab_api/models/payee_location.py | 140 ++++ .../models/payee_location_response.py | 115 +++ .../ynab_api/models/payee_location_wrapper.py | 115 +++ .../models/payee_locations_response.py | 115 +++ .../models/payee_locations_wrapper.py | 115 +++ ynab-api/ynab_api/models/payee_response.py | 115 +++ ynab-api/ynab_api/models/payee_wrapper.py | 115 +++ ynab-api/ynab_api/models/payees_response.py | 115 +++ ynab-api/ynab_api/models/payees_wrapper.py | 115 +++ ynab-api/ynab_api/models/save_transaction.py | 231 ++++++ .../models/save_transaction_wrapper.py | 115 +++ .../models/scheduled_sub_transaction.py | 169 ++++ .../models/scheduled_transaction_detail.py | 292 +++++++ .../models/scheduled_transaction_response.py | 115 +++ .../models/scheduled_transaction_summary.py | 260 ++++++ .../models/scheduled_transaction_wrapper.py | 115 +++ .../models/scheduled_transactions_response.py | 115 +++ .../models/scheduled_transactions_wrapper.py | 115 +++ ynab-api/ynab_api/models/sub_transaction.py | 169 ++++ .../ynab_api/models/transaction_detail.py | 292 +++++++ .../ynab_api/models/transaction_response.py | 115 +++ .../ynab_api/models/transaction_summary.py | 260 ++++++ .../ynab_api/models/transaction_wrapper.py | 115 +++ .../ynab_api/models/transactions_response.py | 115 +++ .../ynab_api/models/transactions_wrapper.py | 115 +++ ynab-api/ynab_api/rest.py | 323 ++++++++ 216 files changed, 17554 insertions(+), 2 deletions(-) create mode 100644 ynab-api/.gitignore create mode 100644 ynab-api/.swagger-codegen-ignore create mode 100644 ynab-api/.swagger-codegen/VERSION create mode 100644 ynab-api/.travis.yml create mode 100644 ynab-api/README.md create mode 100644 ynab-api/docs/Account.md create mode 100644 ynab-api/docs/AccountResponse.md create mode 100644 ynab-api/docs/AccountWrapper.md create mode 100644 ynab-api/docs/AccountsApi.md create mode 100644 ynab-api/docs/AccountsResponse.md create mode 100644 ynab-api/docs/AccountsWrapper.md create mode 100644 ynab-api/docs/BudgetDetail.md create mode 100644 ynab-api/docs/BudgetDetailResponse.md create mode 100644 ynab-api/docs/BudgetDetailWrapper.md create mode 100644 ynab-api/docs/BudgetSummary.md create mode 100644 ynab-api/docs/BudgetSummaryResponse.md create mode 100644 ynab-api/docs/BudgetSummaryWrapper.md create mode 100644 ynab-api/docs/BudgetsApi.md create mode 100644 ynab-api/docs/BulkIdWrapper.md create mode 100644 ynab-api/docs/BulkIds.md create mode 100644 ynab-api/docs/BulkResponse.md create mode 100644 ynab-api/docs/BulkTransactions.md create mode 100644 ynab-api/docs/CategoriesApi.md create mode 100644 ynab-api/docs/CategoriesResponse.md create mode 100644 ynab-api/docs/Category.md create mode 100644 ynab-api/docs/CategoryGroup.md create mode 100644 ynab-api/docs/CategoryGroupWithCategories.md create mode 100644 ynab-api/docs/CategoryGroupsWrapper.md create mode 100644 ynab-api/docs/CategoryResponse.md create mode 100644 ynab-api/docs/CategoryWrapper.md create mode 100644 ynab-api/docs/CurrencyFormat.md create mode 100644 ynab-api/docs/DateFormat.md create mode 100644 ynab-api/docs/ErrorDetail.md create mode 100644 ynab-api/docs/ErrorResponse.md create mode 100644 ynab-api/docs/MonthDetail.md create mode 100644 ynab-api/docs/MonthDetailResponse.md create mode 100644 ynab-api/docs/MonthDetailWrapper.md create mode 100644 ynab-api/docs/MonthSummariesResponse.md create mode 100644 ynab-api/docs/MonthSummariesWrapper.md create mode 100644 ynab-api/docs/MonthSummary.md create mode 100644 ynab-api/docs/MonthsApi.md create mode 100644 ynab-api/docs/Payee.md create mode 100644 ynab-api/docs/PayeeLocation.md create mode 100644 ynab-api/docs/PayeeLocationResponse.md create mode 100644 ynab-api/docs/PayeeLocationWrapper.md create mode 100644 ynab-api/docs/PayeeLocationsApi.md create mode 100644 ynab-api/docs/PayeeLocationsResponse.md create mode 100644 ynab-api/docs/PayeeLocationsWrapper.md create mode 100644 ynab-api/docs/PayeeResponse.md create mode 100644 ynab-api/docs/PayeeWrapper.md create mode 100644 ynab-api/docs/PayeesApi.md create mode 100644 ynab-api/docs/PayeesResponse.md create mode 100644 ynab-api/docs/PayeesWrapper.md create mode 100644 ynab-api/docs/SaveTransaction.md create mode 100644 ynab-api/docs/SaveTransactionWrapper.md create mode 100644 ynab-api/docs/ScheduledSubTransaction.md create mode 100644 ynab-api/docs/ScheduledTransactionDetail.md create mode 100644 ynab-api/docs/ScheduledTransactionResponse.md create mode 100644 ynab-api/docs/ScheduledTransactionSummary.md create mode 100644 ynab-api/docs/ScheduledTransactionWrapper.md create mode 100644 ynab-api/docs/ScheduledTransactionsApi.md create mode 100644 ynab-api/docs/ScheduledTransactionsResponse.md create mode 100644 ynab-api/docs/ScheduledTransactionsWrapper.md create mode 100644 ynab-api/docs/SubTransaction.md create mode 100644 ynab-api/docs/TransactionDetail.md create mode 100644 ynab-api/docs/TransactionResponse.md create mode 100644 ynab-api/docs/TransactionSummary.md create mode 100644 ynab-api/docs/TransactionWrapper.md create mode 100644 ynab-api/docs/TransactionsApi.md create mode 100644 ynab-api/docs/TransactionsResponse.md create mode 100644 ynab-api/docs/TransactionsWrapper.md create mode 100644 ynab-api/git_push.sh create mode 100644 ynab-api/requirements.txt create mode 100644 ynab-api/setup.py create mode 100644 ynab-api/test-requirements.txt create mode 100644 ynab-api/test/__init__.py create mode 100644 ynab-api/test/test_account.py create mode 100644 ynab-api/test/test_account_response.py create mode 100644 ynab-api/test/test_account_wrapper.py create mode 100644 ynab-api/test/test_accounts_api.py create mode 100644 ynab-api/test/test_accounts_response.py create mode 100644 ynab-api/test/test_accounts_wrapper.py create mode 100644 ynab-api/test/test_budget_detail.py create mode 100644 ynab-api/test/test_budget_detail_response.py create mode 100644 ynab-api/test/test_budget_detail_wrapper.py create mode 100644 ynab-api/test/test_budget_summary.py create mode 100644 ynab-api/test/test_budget_summary_response.py create mode 100644 ynab-api/test/test_budget_summary_wrapper.py create mode 100644 ynab-api/test/test_budgets_api.py create mode 100644 ynab-api/test/test_bulk_id_wrapper.py create mode 100644 ynab-api/test/test_bulk_ids.py create mode 100644 ynab-api/test/test_bulk_response.py create mode 100644 ynab-api/test/test_bulk_transactions.py create mode 100644 ynab-api/test/test_categories_api.py create mode 100644 ynab-api/test/test_categories_response.py create mode 100644 ynab-api/test/test_category.py create mode 100644 ynab-api/test/test_category_group.py create mode 100644 ynab-api/test/test_category_group_with_categories.py create mode 100644 ynab-api/test/test_category_groups_wrapper.py create mode 100644 ynab-api/test/test_category_response.py create mode 100644 ynab-api/test/test_category_wrapper.py create mode 100644 ynab-api/test/test_currency_format.py create mode 100644 ynab-api/test/test_date_format.py create mode 100644 ynab-api/test/test_error_detail.py create mode 100644 ynab-api/test/test_error_response.py create mode 100644 ynab-api/test/test_month_detail.py create mode 100644 ynab-api/test/test_month_detail_response.py create mode 100644 ynab-api/test/test_month_detail_wrapper.py create mode 100644 ynab-api/test/test_month_summaries_response.py create mode 100644 ynab-api/test/test_month_summaries_wrapper.py create mode 100644 ynab-api/test/test_month_summary.py create mode 100644 ynab-api/test/test_months_api.py create mode 100644 ynab-api/test/test_payee.py create mode 100644 ynab-api/test/test_payee_location.py create mode 100644 ynab-api/test/test_payee_location_response.py create mode 100644 ynab-api/test/test_payee_location_wrapper.py create mode 100644 ynab-api/test/test_payee_locations_api.py create mode 100644 ynab-api/test/test_payee_locations_response.py create mode 100644 ynab-api/test/test_payee_locations_wrapper.py create mode 100644 ynab-api/test/test_payee_response.py create mode 100644 ynab-api/test/test_payee_wrapper.py create mode 100644 ynab-api/test/test_payees_api.py create mode 100644 ynab-api/test/test_payees_response.py create mode 100644 ynab-api/test/test_payees_wrapper.py create mode 100644 ynab-api/test/test_save_transaction.py create mode 100644 ynab-api/test/test_save_transaction_wrapper.py create mode 100644 ynab-api/test/test_scheduled_sub_transaction.py create mode 100644 ynab-api/test/test_scheduled_transaction_detail.py create mode 100644 ynab-api/test/test_scheduled_transaction_response.py create mode 100644 ynab-api/test/test_scheduled_transaction_summary.py create mode 100644 ynab-api/test/test_scheduled_transaction_wrapper.py create mode 100644 ynab-api/test/test_scheduled_transactions_api.py create mode 100644 ynab-api/test/test_scheduled_transactions_response.py create mode 100644 ynab-api/test/test_scheduled_transactions_wrapper.py create mode 100644 ynab-api/test/test_sub_transaction.py create mode 100644 ynab-api/test/test_transaction_detail.py create mode 100644 ynab-api/test/test_transaction_response.py create mode 100644 ynab-api/test/test_transaction_summary.py create mode 100644 ynab-api/test/test_transaction_wrapper.py create mode 100644 ynab-api/test/test_transactions_api.py create mode 100644 ynab-api/test/test_transactions_response.py create mode 100644 ynab-api/test/test_transactions_wrapper.py create mode 100644 ynab-api/tox.ini create mode 100644 ynab-api/ynab_api/__init__.py create mode 100644 ynab-api/ynab_api/api/__init__.py create mode 100644 ynab-api/ynab_api/api/accounts_api.py create mode 100644 ynab-api/ynab_api/api/budgets_api.py create mode 100644 ynab-api/ynab_api/api/categories_api.py create mode 100644 ynab-api/ynab_api/api/months_api.py create mode 100644 ynab-api/ynab_api/api/payee_locations_api.py create mode 100644 ynab-api/ynab_api/api/payees_api.py create mode 100644 ynab-api/ynab_api/api/scheduled_transactions_api.py create mode 100644 ynab-api/ynab_api/api/transactions_api.py create mode 100644 ynab-api/ynab_api/api_client.py create mode 100644 ynab-api/ynab_api/configuration.py create mode 100644 ynab-api/ynab_api/models/__init__.py create mode 100644 ynab-api/ynab_api/models/account.py create mode 100644 ynab-api/ynab_api/models/account_response.py create mode 100644 ynab-api/ynab_api/models/account_wrapper.py create mode 100644 ynab-api/ynab_api/models/accounts_response.py create mode 100644 ynab-api/ynab_api/models/accounts_wrapper.py create mode 100644 ynab-api/ynab_api/models/budget_detail.py create mode 100644 ynab-api/ynab_api/models/budget_detail_response.py create mode 100644 ynab-api/ynab_api/models/budget_detail_wrapper.py create mode 100644 ynab-api/ynab_api/models/budget_summary.py create mode 100644 ynab-api/ynab_api/models/budget_summary_response.py create mode 100644 ynab-api/ynab_api/models/budget_summary_wrapper.py create mode 100644 ynab-api/ynab_api/models/bulk_id_wrapper.py create mode 100644 ynab-api/ynab_api/models/bulk_ids.py create mode 100644 ynab-api/ynab_api/models/bulk_response.py create mode 100644 ynab-api/ynab_api/models/bulk_transactions.py create mode 100644 ynab-api/ynab_api/models/categories_response.py create mode 100644 ynab-api/ynab_api/models/category.py create mode 100644 ynab-api/ynab_api/models/category_group.py create mode 100644 ynab-api/ynab_api/models/category_group_with_categories.py create mode 100644 ynab-api/ynab_api/models/category_groups_wrapper.py create mode 100644 ynab-api/ynab_api/models/category_response.py create mode 100644 ynab-api/ynab_api/models/category_wrapper.py create mode 100644 ynab-api/ynab_api/models/currency_format.py create mode 100644 ynab-api/ynab_api/models/date_format.py create mode 100644 ynab-api/ynab_api/models/error_detail.py create mode 100644 ynab-api/ynab_api/models/error_response.py create mode 100644 ynab-api/ynab_api/models/month_detail.py create mode 100644 ynab-api/ynab_api/models/month_detail_response.py create mode 100644 ynab-api/ynab_api/models/month_detail_wrapper.py create mode 100644 ynab-api/ynab_api/models/month_summaries_response.py create mode 100644 ynab-api/ynab_api/models/month_summaries_wrapper.py create mode 100644 ynab-api/ynab_api/models/month_summary.py create mode 100644 ynab-api/ynab_api/models/payee.py create mode 100644 ynab-api/ynab_api/models/payee_location.py create mode 100644 ynab-api/ynab_api/models/payee_location_response.py create mode 100644 ynab-api/ynab_api/models/payee_location_wrapper.py create mode 100644 ynab-api/ynab_api/models/payee_locations_response.py create mode 100644 ynab-api/ynab_api/models/payee_locations_wrapper.py create mode 100644 ynab-api/ynab_api/models/payee_response.py create mode 100644 ynab-api/ynab_api/models/payee_wrapper.py create mode 100644 ynab-api/ynab_api/models/payees_response.py create mode 100644 ynab-api/ynab_api/models/payees_wrapper.py create mode 100644 ynab-api/ynab_api/models/save_transaction.py create mode 100644 ynab-api/ynab_api/models/save_transaction_wrapper.py create mode 100644 ynab-api/ynab_api/models/scheduled_sub_transaction.py create mode 100644 ynab-api/ynab_api/models/scheduled_transaction_detail.py create mode 100644 ynab-api/ynab_api/models/scheduled_transaction_response.py create mode 100644 ynab-api/ynab_api/models/scheduled_transaction_summary.py create mode 100644 ynab-api/ynab_api/models/scheduled_transaction_wrapper.py create mode 100644 ynab-api/ynab_api/models/scheduled_transactions_response.py create mode 100644 ynab-api/ynab_api/models/scheduled_transactions_wrapper.py create mode 100644 ynab-api/ynab_api/models/sub_transaction.py create mode 100644 ynab-api/ynab_api/models/transaction_detail.py create mode 100644 ynab-api/ynab_api/models/transaction_response.py create mode 100644 ynab-api/ynab_api/models/transaction_summary.py create mode 100644 ynab-api/ynab_api/models/transaction_wrapper.py create mode 100644 ynab-api/ynab_api/models/transactions_response.py create mode 100644 ynab-api/ynab_api/models/transactions_wrapper.py create mode 100644 ynab-api/ynab_api/rest.py diff --git a/.gitignore b/.gitignore index d981694..646787f 100644 --- a/.gitignore +++ b/.gitignore @@ -13,5 +13,3 @@ ynab.yaml nosetests*.xml tests/*.json testscripts/*.json - -ynab-api/ diff --git a/ynab-api/.gitignore b/ynab-api/.gitignore new file mode 100644 index 0000000..a655050 --- /dev/null +++ b/ynab-api/.gitignore @@ -0,0 +1,64 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ +venv/ +.python-version + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +#Ipython Notebook +.ipynb_checkpoints diff --git a/ynab-api/.swagger-codegen-ignore b/ynab-api/.swagger-codegen-ignore new file mode 100644 index 0000000..c5fa491 --- /dev/null +++ b/ynab-api/.swagger-codegen-ignore @@ -0,0 +1,23 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/ynab-api/.swagger-codegen/VERSION b/ynab-api/.swagger-codegen/VERSION new file mode 100644 index 0000000..cc6612c --- /dev/null +++ b/ynab-api/.swagger-codegen/VERSION @@ -0,0 +1 @@ +2.3.0 \ No newline at end of file diff --git a/ynab-api/.travis.yml b/ynab-api/.travis.yml new file mode 100644 index 0000000..86211e2 --- /dev/null +++ b/ynab-api/.travis.yml @@ -0,0 +1,14 @@ +# ref: https://docs.travis-ci.com/user/languages/python +language: python +python: + - "2.7" + - "3.2" + - "3.3" + - "3.4" + - "3.5" + #- "3.5-dev" # 3.5 development branch + #- "nightly" # points to the latest development branch e.g. 3.6-dev +# command to install dependencies +install: "pip install -r requirements.txt" +# command to run tests +script: nosetests diff --git a/ynab-api/README.md b/ynab-api/README.md new file mode 100644 index 0000000..9edf925 --- /dev/null +++ b/ynab-api/README.md @@ -0,0 +1,177 @@ +# ynab_api +Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com + +This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: + +- API version: 1.0.0 +- Package version: dev +- Build package: io.swagger.codegen.languages.PythonClientCodegen + +## Requirements. + +Python 2.7 and 3.4+ + +## Installation & Usage +### pip install + +If the python package is hosted on Github, you can install directly from Github + +```sh +pip install git+https://github.com/rienafairefr/pynYNAB.git +``` +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/rienafairefr/pynYNAB.git`) + +Then import the package: +```python +import ynab_api +``` + +### Setuptools + +Install via [Setuptools](http://pypi.python.org/pypi/setuptools). + +```sh +python setup.py install --user +``` +(or `sudo python setup.py install` to install the package for all users) + +Then import the package: +```python +import ynab_api +``` + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```python +from __future__ import print_function +import time +import ynab_api +from ynab_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: bearer +ynab_api.configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# ynab_api.configuration.api_key_prefix['Authorization'] = 'Bearer' +# create an instance of the API class +api_instance = ynab_api.AccountsApi() +budget_id = 'budget_id_example' # str | The ID of the Budget. +account_id = 'account_id_example' # str | The ID of the Account. + +try: + # Single account + api_response = api_instance.get_account_by_id(budget_id, account_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling AccountsApi->get_account_by_id: %s\n" % e) + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.youneedabudget.com/v1* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AccountsApi* | [**get_account_by_id**](docs/AccountsApi.md#get_account_by_id) | **GET** /budgets/{budget_id}/accounts/{account_id} | Single account +*AccountsApi* | [**get_accounts**](docs/AccountsApi.md#get_accounts) | **GET** /budgets/{budget_id}/accounts | Account list +*BudgetsApi* | [**get_budget_by_id**](docs/BudgetsApi.md#get_budget_by_id) | **GET** /budgets/{budget_id} | Single budget +*BudgetsApi* | [**get_budgets**](docs/BudgetsApi.md#get_budgets) | **GET** /budgets | List budgets +*CategoriesApi* | [**get_categories**](docs/CategoriesApi.md#get_categories) | **GET** /budgets/{budget_id}/categories | List categories +*CategoriesApi* | [**get_category_by_id**](docs/CategoriesApi.md#get_category_by_id) | **GET** /budgets/{budget_id}/categories/{category_id} | Single category +*MonthsApi* | [**get_budget_month**](docs/MonthsApi.md#get_budget_month) | **GET** /budgets/{budget_id}/months/{month} | Single budget month +*MonthsApi* | [**get_budget_months**](docs/MonthsApi.md#get_budget_months) | **GET** /budgets/{budget_id}/months | List budget months +*PayeeLocationsApi* | [**get_payee_location_by_id**](docs/PayeeLocationsApi.md#get_payee_location_by_id) | **GET** /budgets/{budget_id}/payee_locations/{payee_location_id} | Single payee location +*PayeeLocationsApi* | [**get_payee_locations**](docs/PayeeLocationsApi.md#get_payee_locations) | **GET** /budgets/{budget_id}/payee_locations | List payee locations +*PayeeLocationsApi* | [**get_payee_locations_by_payee**](docs/PayeeLocationsApi.md#get_payee_locations_by_payee) | **GET** /budgets/{budget_id}/payees/{payee_id}/payee_locations | List locations for a payee +*PayeesApi* | [**get_payee_by_id**](docs/PayeesApi.md#get_payee_by_id) | **GET** /budgets/{budget_id}/payees/{payee_id} | Single payee +*PayeesApi* | [**get_payees**](docs/PayeesApi.md#get_payees) | **GET** /budgets/{budget_id}/payees | List payees +*ScheduledTransactionsApi* | [**get_scheduled_transaction_by_id**](docs/ScheduledTransactionsApi.md#get_scheduled_transaction_by_id) | **GET** /budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id} | Single scheduled transaction +*ScheduledTransactionsApi* | [**get_scheduled_transactions**](docs/ScheduledTransactionsApi.md#get_scheduled_transactions) | **GET** /budgets/{budget_id}/scheduled_transactions | List scheduled transactions +*TransactionsApi* | [**bulk_create_transactions**](docs/TransactionsApi.md#bulk_create_transactions) | **POST** /budgets/{budget_id}/transactions/bulk | Bulk create transactions +*TransactionsApi* | [**create_transaction**](docs/TransactionsApi.md#create_transaction) | **POST** /budgets/{budget_id}/transactions | Create new transaction +*TransactionsApi* | [**get_transactions**](docs/TransactionsApi.md#get_transactions) | **GET** /budgets/{budget_id}/transactions | List transactions +*TransactionsApi* | [**get_transactions_by_account**](docs/TransactionsApi.md#get_transactions_by_account) | **GET** /budgets/{budget_id}/accounts/{account_id}/transactions | List account transactions +*TransactionsApi* | [**get_transactions_by_category**](docs/TransactionsApi.md#get_transactions_by_category) | **GET** /budgets/{budget_id}/categories/{category_id}/transactions | List category transactions +*TransactionsApi* | [**get_transactions_by_id**](docs/TransactionsApi.md#get_transactions_by_id) | **GET** /budgets/{budget_id}/transactions/{transaction_id} | Single transaction +*TransactionsApi* | [**update_transaction**](docs/TransactionsApi.md#update_transaction) | **PUT** /budgets/{budget_id}/transactions/{transaction_id} | Updates an existing transaction + + +## Documentation For Models + + - [Account](docs/Account.md) + - [AccountResponse](docs/AccountResponse.md) + - [AccountWrapper](docs/AccountWrapper.md) + - [AccountsResponse](docs/AccountsResponse.md) + - [AccountsWrapper](docs/AccountsWrapper.md) + - [BudgetDetailResponse](docs/BudgetDetailResponse.md) + - [BudgetDetailWrapper](docs/BudgetDetailWrapper.md) + - [BudgetSummary](docs/BudgetSummary.md) + - [BudgetSummaryResponse](docs/BudgetSummaryResponse.md) + - [BudgetSummaryWrapper](docs/BudgetSummaryWrapper.md) + - [BulkIdWrapper](docs/BulkIdWrapper.md) + - [BulkIds](docs/BulkIds.md) + - [BulkResponse](docs/BulkResponse.md) + - [BulkTransactions](docs/BulkTransactions.md) + - [CategoriesResponse](docs/CategoriesResponse.md) + - [Category](docs/Category.md) + - [CategoryGroup](docs/CategoryGroup.md) + - [CategoryGroupsWrapper](docs/CategoryGroupsWrapper.md) + - [CategoryResponse](docs/CategoryResponse.md) + - [CategoryWrapper](docs/CategoryWrapper.md) + - [CurrencyFormat](docs/CurrencyFormat.md) + - [DateFormat](docs/DateFormat.md) + - [ErrorDetail](docs/ErrorDetail.md) + - [ErrorResponse](docs/ErrorResponse.md) + - [MonthDetailResponse](docs/MonthDetailResponse.md) + - [MonthDetailWrapper](docs/MonthDetailWrapper.md) + - [MonthSummariesResponse](docs/MonthSummariesResponse.md) + - [MonthSummariesWrapper](docs/MonthSummariesWrapper.md) + - [MonthSummary](docs/MonthSummary.md) + - [Payee](docs/Payee.md) + - [PayeeLocation](docs/PayeeLocation.md) + - [PayeeLocationResponse](docs/PayeeLocationResponse.md) + - [PayeeLocationWrapper](docs/PayeeLocationWrapper.md) + - [PayeeLocationsResponse](docs/PayeeLocationsResponse.md) + - [PayeeLocationsWrapper](docs/PayeeLocationsWrapper.md) + - [PayeeResponse](docs/PayeeResponse.md) + - [PayeeWrapper](docs/PayeeWrapper.md) + - [PayeesResponse](docs/PayeesResponse.md) + - [PayeesWrapper](docs/PayeesWrapper.md) + - [SaveTransaction](docs/SaveTransaction.md) + - [SaveTransactionWrapper](docs/SaveTransactionWrapper.md) + - [ScheduledSubTransaction](docs/ScheduledSubTransaction.md) + - [ScheduledTransactionResponse](docs/ScheduledTransactionResponse.md) + - [ScheduledTransactionSummary](docs/ScheduledTransactionSummary.md) + - [ScheduledTransactionWrapper](docs/ScheduledTransactionWrapper.md) + - [ScheduledTransactionsResponse](docs/ScheduledTransactionsResponse.md) + - [ScheduledTransactionsWrapper](docs/ScheduledTransactionsWrapper.md) + - [SubTransaction](docs/SubTransaction.md) + - [TransactionResponse](docs/TransactionResponse.md) + - [TransactionSummary](docs/TransactionSummary.md) + - [TransactionWrapper](docs/TransactionWrapper.md) + - [TransactionsResponse](docs/TransactionsResponse.md) + - [TransactionsWrapper](docs/TransactionsWrapper.md) + - [BudgetDetail](docs/BudgetDetail.md) + - [CategoryGroupWithCategories](docs/CategoryGroupWithCategories.md) + - [MonthDetail](docs/MonthDetail.md) + - [ScheduledTransactionDetail](docs/ScheduledTransactionDetail.md) + - [TransactionDetail](docs/TransactionDetail.md) + + +## Documentation For Authorization + + +## bearer + +- **Type**: API key +- **API key parameter name**: Authorization +- **Location**: HTTP header + + +## Author + + + diff --git a/ynab-api/docs/Account.md b/ynab-api/docs/Account.md new file mode 100644 index 0000000..d8f66df --- /dev/null +++ b/ynab-api/docs/Account.md @@ -0,0 +1,17 @@ +# Account + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | | +**type** | **str** | | +**on_budget** | **bool** | Whether this account is on budget or not | +**closed** | **bool** | Whether this account is closed or not | +**balance** | **float** | The current balance of the account in milliunits format | +**cleared_balance** | **float** | The current cleared balance of the account in milliunits format | +**uncleared_balance** | **float** | The current uncleared balance of the account in milliunits format | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/AccountResponse.md b/ynab-api/docs/AccountResponse.md new file mode 100644 index 0000000..5418630 --- /dev/null +++ b/ynab-api/docs/AccountResponse.md @@ -0,0 +1,10 @@ +# AccountResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**AccountWrapper**](AccountWrapper.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/AccountWrapper.md b/ynab-api/docs/AccountWrapper.md new file mode 100644 index 0000000..cfe11ac --- /dev/null +++ b/ynab-api/docs/AccountWrapper.md @@ -0,0 +1,10 @@ +# AccountWrapper + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account** | [**Account**](Account.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/AccountsApi.md b/ynab-api/docs/AccountsApi.md new file mode 100644 index 0000000..b2abc0f --- /dev/null +++ b/ynab-api/docs/AccountsApi.md @@ -0,0 +1,120 @@ +# ynab_api.AccountsApi + +All URIs are relative to *https://api.youneedabudget.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_account_by_id**](AccountsApi.md#get_account_by_id) | **GET** /budgets/{budget_id}/accounts/{account_id} | Single account +[**get_accounts**](AccountsApi.md#get_accounts) | **GET** /budgets/{budget_id}/accounts | Account list + + +# **get_account_by_id** +> AccountResponse get_account_by_id(budget_id, account_id) + +Single account + +Returns a single account + +### Example +```python +from __future__ import print_function +import time +import ynab_api +from ynab_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: bearer +configuration = ynab_api.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' + +# create an instance of the API class +api_instance = ynab_api.AccountsApi(ynab_api.ApiClient(configuration)) +budget_id = 'budget_id_example' # str | The ID of the Budget. +account_id = 'account_id_example' # str | The ID of the Account. + +try: + # Single account + api_response = api_instance.get_account_by_id(budget_id, account_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling AccountsApi->get_account_by_id: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **budget_id** | [**str**](.md)| The ID of the Budget. | + **account_id** | [**str**](.md)| The ID of the Account. | + +### Return type + +[**AccountResponse**](AccountResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_accounts** +> AccountsResponse get_accounts(budget_id) + +Account list + +Returns all accounts + +### Example +```python +from __future__ import print_function +import time +import ynab_api +from ynab_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: bearer +configuration = ynab_api.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' + +# create an instance of the API class +api_instance = ynab_api.AccountsApi(ynab_api.ApiClient(configuration)) +budget_id = 'budget_id_example' # str | The ID of the Budget. + +try: + # Account list + api_response = api_instance.get_accounts(budget_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling AccountsApi->get_accounts: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **budget_id** | [**str**](.md)| The ID of the Budget. | + +### Return type + +[**AccountsResponse**](AccountsResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/ynab-api/docs/AccountsResponse.md b/ynab-api/docs/AccountsResponse.md new file mode 100644 index 0000000..1d026e0 --- /dev/null +++ b/ynab-api/docs/AccountsResponse.md @@ -0,0 +1,10 @@ +# AccountsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**AccountsWrapper**](AccountsWrapper.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/AccountsWrapper.md b/ynab-api/docs/AccountsWrapper.md new file mode 100644 index 0000000..be0ef49 --- /dev/null +++ b/ynab-api/docs/AccountsWrapper.md @@ -0,0 +1,10 @@ +# AccountsWrapper + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**accounts** | [**list[Account]**](Account.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/BudgetDetail.md b/ynab-api/docs/BudgetDetail.md new file mode 100644 index 0000000..cf4653e --- /dev/null +++ b/ynab-api/docs/BudgetDetail.md @@ -0,0 +1,23 @@ +# BudgetDetail + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | | +**date_format** | [**DateFormat**](DateFormat.md) | | [optional] +**currency_format** | [**CurrencyFormat**](CurrencyFormat.md) | | [optional] +**accounts** | [**list[Account]**](Account.md) | | [optional] +**payees** | [**list[Payee]**](Payee.md) | | [optional] +**payee_locations** | [**list[PayeeLocation]**](PayeeLocation.md) | | [optional] +**category_groups** | [**list[CategoryGroup]**](CategoryGroup.md) | | [optional] +**categories** | [**list[Category]**](Category.md) | | [optional] +**months** | [**list[MonthDetail]**](MonthDetail.md) | | [optional] +**transactions** | [**list[TransactionSummary]**](TransactionSummary.md) | | [optional] +**subtransactions** | [**list[SubTransaction]**](SubTransaction.md) | | [optional] +**scheduled_transactions** | [**list[ScheduledTransactionSummary]**](ScheduledTransactionSummary.md) | | [optional] +**scheduled_subtransactions** | [**list[ScheduledSubTransaction]**](ScheduledSubTransaction.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/BudgetDetailResponse.md b/ynab-api/docs/BudgetDetailResponse.md new file mode 100644 index 0000000..2eb7cff --- /dev/null +++ b/ynab-api/docs/BudgetDetailResponse.md @@ -0,0 +1,10 @@ +# BudgetDetailResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**BudgetDetailWrapper**](BudgetDetailWrapper.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/BudgetDetailWrapper.md b/ynab-api/docs/BudgetDetailWrapper.md new file mode 100644 index 0000000..61ede97 --- /dev/null +++ b/ynab-api/docs/BudgetDetailWrapper.md @@ -0,0 +1,11 @@ +# BudgetDetailWrapper + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**budget** | [**BudgetDetail**](BudgetDetail.md) | | +**server_knowledge** | **float** | The knowledge of the server | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/BudgetSummary.md b/ynab-api/docs/BudgetSummary.md new file mode 100644 index 0000000..dd117af --- /dev/null +++ b/ynab-api/docs/BudgetSummary.md @@ -0,0 +1,13 @@ +# BudgetSummary + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | | +**date_format** | [**DateFormat**](DateFormat.md) | | [optional] +**currency_format** | [**CurrencyFormat**](CurrencyFormat.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/BudgetSummaryResponse.md b/ynab-api/docs/BudgetSummaryResponse.md new file mode 100644 index 0000000..1bb36d5 --- /dev/null +++ b/ynab-api/docs/BudgetSummaryResponse.md @@ -0,0 +1,10 @@ +# BudgetSummaryResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**BudgetSummaryWrapper**](BudgetSummaryWrapper.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/BudgetSummaryWrapper.md b/ynab-api/docs/BudgetSummaryWrapper.md new file mode 100644 index 0000000..f19dfa1 --- /dev/null +++ b/ynab-api/docs/BudgetSummaryWrapper.md @@ -0,0 +1,10 @@ +# BudgetSummaryWrapper + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**budgets** | [**list[BudgetSummary]**](BudgetSummary.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/BudgetsApi.md b/ynab-api/docs/BudgetsApi.md new file mode 100644 index 0000000..9d05a45 --- /dev/null +++ b/ynab-api/docs/BudgetsApi.md @@ -0,0 +1,116 @@ +# ynab_api.BudgetsApi + +All URIs are relative to *https://api.youneedabudget.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_budget_by_id**](BudgetsApi.md#get_budget_by_id) | **GET** /budgets/{budget_id} | Single budget +[**get_budgets**](BudgetsApi.md#get_budgets) | **GET** /budgets | List budgets + + +# **get_budget_by_id** +> BudgetDetailResponse get_budget_by_id(budget_id, last_knowledge_of_server=last_knowledge_of_server) + +Single budget + +Returns a single budget with all related entities. This resource is effectively a full budget export. + +### Example +```python +from __future__ import print_function +import time +import ynab_api +from ynab_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: bearer +configuration = ynab_api.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' + +# create an instance of the API class +api_instance = ynab_api.BudgetsApi(ynab_api.ApiClient(configuration)) +budget_id = 'budget_id_example' # str | The ID of the Budget. +last_knowledge_of_server = 8.14 # float | The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. (optional) + +try: + # Single budget + api_response = api_instance.get_budget_by_id(budget_id, last_knowledge_of_server=last_knowledge_of_server) + pprint(api_response) +except ApiException as e: + print("Exception when calling BudgetsApi->get_budget_by_id: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **budget_id** | [**str**](.md)| The ID of the Budget. | + **last_knowledge_of_server** | **float**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | [optional] + +### Return type + +[**BudgetDetailResponse**](BudgetDetailResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_budgets** +> BudgetSummaryResponse get_budgets() + +List budgets + +Returns budgets list with summary information. + +### Example +```python +from __future__ import print_function +import time +import ynab_api +from ynab_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: bearer +configuration = ynab_api.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' + +# create an instance of the API class +api_instance = ynab_api.BudgetsApi(ynab_api.ApiClient(configuration)) + +try: + # List budgets + api_response = api_instance.get_budgets() + pprint(api_response) +except ApiException as e: + print("Exception when calling BudgetsApi->get_budgets: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**BudgetSummaryResponse**](BudgetSummaryResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/ynab-api/docs/BulkIdWrapper.md b/ynab-api/docs/BulkIdWrapper.md new file mode 100644 index 0000000..684ce68 --- /dev/null +++ b/ynab-api/docs/BulkIdWrapper.md @@ -0,0 +1,10 @@ +# BulkIdWrapper + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bulk** | [**BulkIds**](BulkIds.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/BulkIds.md b/ynab-api/docs/BulkIds.md new file mode 100644 index 0000000..cdfe489 --- /dev/null +++ b/ynab-api/docs/BulkIds.md @@ -0,0 +1,11 @@ +# BulkIds + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**transaction_ids** | **list[str]** | The list of Transaction IDs that were created. | +**duplicate_import_ids** | **list[str]** | If any Transactions were not created because they had an import_id matching a transaction already on the same account, the specified import_id(s) will be included in this list. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/BulkResponse.md b/ynab-api/docs/BulkResponse.md new file mode 100644 index 0000000..5d381b3 --- /dev/null +++ b/ynab-api/docs/BulkResponse.md @@ -0,0 +1,10 @@ +# BulkResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**BulkIdWrapper**](BulkIdWrapper.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/BulkTransactions.md b/ynab-api/docs/BulkTransactions.md new file mode 100644 index 0000000..e101fa0 --- /dev/null +++ b/ynab-api/docs/BulkTransactions.md @@ -0,0 +1,10 @@ +# BulkTransactions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**transactions** | [**list[SaveTransaction]**](SaveTransaction.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/CategoriesApi.md b/ynab-api/docs/CategoriesApi.md new file mode 100644 index 0000000..23eaa82 --- /dev/null +++ b/ynab-api/docs/CategoriesApi.md @@ -0,0 +1,120 @@ +# ynab_api.CategoriesApi + +All URIs are relative to *https://api.youneedabudget.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_categories**](CategoriesApi.md#get_categories) | **GET** /budgets/{budget_id}/categories | List categories +[**get_category_by_id**](CategoriesApi.md#get_category_by_id) | **GET** /budgets/{budget_id}/categories/{category_id} | Single category + + +# **get_categories** +> CategoriesResponse get_categories(budget_id) + +List categories + +Returns all categories grouped by category group. + +### Example +```python +from __future__ import print_function +import time +import ynab_api +from ynab_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: bearer +configuration = ynab_api.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' + +# create an instance of the API class +api_instance = ynab_api.CategoriesApi(ynab_api.ApiClient(configuration)) +budget_id = 'budget_id_example' # str | The ID of the Budget. + +try: + # List categories + api_response = api_instance.get_categories(budget_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling CategoriesApi->get_categories: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **budget_id** | [**str**](.md)| The ID of the Budget. | + +### Return type + +[**CategoriesResponse**](CategoriesResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_category_by_id** +> CategoryResponse get_category_by_id(budget_id, category_id) + +Single category + +Returns a single category + +### Example +```python +from __future__ import print_function +import time +import ynab_api +from ynab_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: bearer +configuration = ynab_api.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' + +# create an instance of the API class +api_instance = ynab_api.CategoriesApi(ynab_api.ApiClient(configuration)) +budget_id = 'budget_id_example' # str | The ID of the Budget. +category_id = 'category_id_example' # str | The ID of the Category. + +try: + # Single category + api_response = api_instance.get_category_by_id(budget_id, category_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling CategoriesApi->get_category_by_id: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **budget_id** | [**str**](.md)| The ID of the Budget. | + **category_id** | [**str**](.md)| The ID of the Category. | + +### Return type + +[**CategoryResponse**](CategoryResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/ynab-api/docs/CategoriesResponse.md b/ynab-api/docs/CategoriesResponse.md new file mode 100644 index 0000000..0d9bd92 --- /dev/null +++ b/ynab-api/docs/CategoriesResponse.md @@ -0,0 +1,10 @@ +# CategoriesResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**CategoryGroupsWrapper**](CategoryGroupsWrapper.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/Category.md b/ynab-api/docs/Category.md new file mode 100644 index 0000000..0b059a0 --- /dev/null +++ b/ynab-api/docs/Category.md @@ -0,0 +1,16 @@ +# Category + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**category_group_id** | **str** | | +**name** | **str** | | +**hidden** | **bool** | Whether or not the category is hidden | +**budgeted** | **float** | Budgeted amount in current month in milliunits format | +**activity** | **float** | Activity amount in current month in milliunits format | +**balance** | **float** | Balance in current month in milliunits format | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/CategoryGroup.md b/ynab-api/docs/CategoryGroup.md new file mode 100644 index 0000000..af4f181 --- /dev/null +++ b/ynab-api/docs/CategoryGroup.md @@ -0,0 +1,12 @@ +# CategoryGroup + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | | +**hidden** | **bool** | Whether or not the category group is hidden | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/CategoryGroupWithCategories.md b/ynab-api/docs/CategoryGroupWithCategories.md new file mode 100644 index 0000000..df0f653 --- /dev/null +++ b/ynab-api/docs/CategoryGroupWithCategories.md @@ -0,0 +1,13 @@ +# CategoryGroupWithCategories + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | | +**hidden** | **bool** | Whether or not the category group is hidden | +**categories** | [**list[Category]**](Category.md) | Category group categories | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/CategoryGroupsWrapper.md b/ynab-api/docs/CategoryGroupsWrapper.md new file mode 100644 index 0000000..14cd2f6 --- /dev/null +++ b/ynab-api/docs/CategoryGroupsWrapper.md @@ -0,0 +1,10 @@ +# CategoryGroupsWrapper + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**category_groups** | [**list[CategoryGroupWithCategories]**](CategoryGroupWithCategories.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/CategoryResponse.md b/ynab-api/docs/CategoryResponse.md new file mode 100644 index 0000000..3b179f6 --- /dev/null +++ b/ynab-api/docs/CategoryResponse.md @@ -0,0 +1,10 @@ +# CategoryResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**CategoryWrapper**](CategoryWrapper.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/CategoryWrapper.md b/ynab-api/docs/CategoryWrapper.md new file mode 100644 index 0000000..eadb832 --- /dev/null +++ b/ynab-api/docs/CategoryWrapper.md @@ -0,0 +1,10 @@ +# CategoryWrapper + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**category** | [**Category**](Category.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/CurrencyFormat.md b/ynab-api/docs/CurrencyFormat.md new file mode 100644 index 0000000..4fa1076 --- /dev/null +++ b/ynab-api/docs/CurrencyFormat.md @@ -0,0 +1,9 @@ +# CurrencyFormat + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/DateFormat.md b/ynab-api/docs/DateFormat.md new file mode 100644 index 0000000..06c5c81 --- /dev/null +++ b/ynab-api/docs/DateFormat.md @@ -0,0 +1,9 @@ +# DateFormat + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/ErrorDetail.md b/ynab-api/docs/ErrorDetail.md new file mode 100644 index 0000000..1b99cf5 --- /dev/null +++ b/ynab-api/docs/ErrorDetail.md @@ -0,0 +1,12 @@ +# ErrorDetail + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | | +**detail** | **str** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/ErrorResponse.md b/ynab-api/docs/ErrorResponse.md new file mode 100644 index 0000000..7bd29d0 --- /dev/null +++ b/ynab-api/docs/ErrorResponse.md @@ -0,0 +1,10 @@ +# ErrorResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | [**ErrorDetail**](ErrorDetail.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/MonthDetail.md b/ynab-api/docs/MonthDetail.md new file mode 100644 index 0000000..401dbfb --- /dev/null +++ b/ynab-api/docs/MonthDetail.md @@ -0,0 +1,11 @@ +# MonthDetail + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**month** | **date** | | +**categories** | [**list[Category]**](Category.md) | The budget month categories | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/MonthDetailResponse.md b/ynab-api/docs/MonthDetailResponse.md new file mode 100644 index 0000000..5ce21ac --- /dev/null +++ b/ynab-api/docs/MonthDetailResponse.md @@ -0,0 +1,10 @@ +# MonthDetailResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**MonthDetailWrapper**](MonthDetailWrapper.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/MonthDetailWrapper.md b/ynab-api/docs/MonthDetailWrapper.md new file mode 100644 index 0000000..94cf7dd --- /dev/null +++ b/ynab-api/docs/MonthDetailWrapper.md @@ -0,0 +1,10 @@ +# MonthDetailWrapper + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**month** | [**MonthDetail**](MonthDetail.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/MonthSummariesResponse.md b/ynab-api/docs/MonthSummariesResponse.md new file mode 100644 index 0000000..73a40c2 --- /dev/null +++ b/ynab-api/docs/MonthSummariesResponse.md @@ -0,0 +1,10 @@ +# MonthSummariesResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**MonthSummariesWrapper**](MonthSummariesWrapper.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/MonthSummariesWrapper.md b/ynab-api/docs/MonthSummariesWrapper.md new file mode 100644 index 0000000..0750b2a --- /dev/null +++ b/ynab-api/docs/MonthSummariesWrapper.md @@ -0,0 +1,10 @@ +# MonthSummariesWrapper + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**months** | [**list[MonthSummary]**](MonthSummary.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/MonthSummary.md b/ynab-api/docs/MonthSummary.md new file mode 100644 index 0000000..ef01f3f --- /dev/null +++ b/ynab-api/docs/MonthSummary.md @@ -0,0 +1,10 @@ +# MonthSummary + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**month** | **date** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/MonthsApi.md b/ynab-api/docs/MonthsApi.md new file mode 100644 index 0000000..2e972c5 --- /dev/null +++ b/ynab-api/docs/MonthsApi.md @@ -0,0 +1,120 @@ +# ynab_api.MonthsApi + +All URIs are relative to *https://api.youneedabudget.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_budget_month**](MonthsApi.md#get_budget_month) | **GET** /budgets/{budget_id}/months/{month} | Single budget month +[**get_budget_months**](MonthsApi.md#get_budget_months) | **GET** /budgets/{budget_id}/months | List budget months + + +# **get_budget_month** +> MonthDetailResponse get_budget_month(budget_id, month) + +Single budget month + +Returns a single budget month + +### Example +```python +from __future__ import print_function +import time +import ynab_api +from ynab_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: bearer +configuration = ynab_api.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' + +# create an instance of the API class +api_instance = ynab_api.MonthsApi(ynab_api.ApiClient(configuration)) +budget_id = 'budget_id_example' # str | The ID of the Budget. +month = '2013-10-20' # date | The Budget Month. \"current\" can also be used to specify the current calendar month (UTC). + +try: + # Single budget month + api_response = api_instance.get_budget_month(budget_id, month) + pprint(api_response) +except ApiException as e: + print("Exception when calling MonthsApi->get_budget_month: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **budget_id** | [**str**](.md)| The ID of the Budget. | + **month** | **date**| The Budget Month. \"current\" can also be used to specify the current calendar month (UTC). | + +### Return type + +[**MonthDetailResponse**](MonthDetailResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_budget_months** +> MonthSummariesResponse get_budget_months(budget_id) + +List budget months + +Returns all budget months + +### Example +```python +from __future__ import print_function +import time +import ynab_api +from ynab_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: bearer +configuration = ynab_api.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' + +# create an instance of the API class +api_instance = ynab_api.MonthsApi(ynab_api.ApiClient(configuration)) +budget_id = 'budget_id_example' # str | The ID of the Budget. + +try: + # List budget months + api_response = api_instance.get_budget_months(budget_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling MonthsApi->get_budget_months: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **budget_id** | [**str**](.md)| The ID of the Budget. | + +### Return type + +[**MonthSummariesResponse**](MonthSummariesResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/ynab-api/docs/Payee.md b/ynab-api/docs/Payee.md new file mode 100644 index 0000000..8bab27b --- /dev/null +++ b/ynab-api/docs/Payee.md @@ -0,0 +1,11 @@ +# Payee + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/PayeeLocation.md b/ynab-api/docs/PayeeLocation.md new file mode 100644 index 0000000..b53d3f7 --- /dev/null +++ b/ynab-api/docs/PayeeLocation.md @@ -0,0 +1,11 @@ +# PayeeLocation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**payee_id** | **str** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/PayeeLocationResponse.md b/ynab-api/docs/PayeeLocationResponse.md new file mode 100644 index 0000000..5e30202 --- /dev/null +++ b/ynab-api/docs/PayeeLocationResponse.md @@ -0,0 +1,10 @@ +# PayeeLocationResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**PayeeLocationWrapper**](PayeeLocationWrapper.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/PayeeLocationWrapper.md b/ynab-api/docs/PayeeLocationWrapper.md new file mode 100644 index 0000000..0df4e14 --- /dev/null +++ b/ynab-api/docs/PayeeLocationWrapper.md @@ -0,0 +1,10 @@ +# PayeeLocationWrapper + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**payee_location** | [**PayeeLocation**](PayeeLocation.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/PayeeLocationsApi.md b/ynab-api/docs/PayeeLocationsApi.md new file mode 100644 index 0000000..1997816 --- /dev/null +++ b/ynab-api/docs/PayeeLocationsApi.md @@ -0,0 +1,177 @@ +# ynab_api.PayeeLocationsApi + +All URIs are relative to *https://api.youneedabudget.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_payee_location_by_id**](PayeeLocationsApi.md#get_payee_location_by_id) | **GET** /budgets/{budget_id}/payee_locations/{payee_location_id} | Single payee location +[**get_payee_locations**](PayeeLocationsApi.md#get_payee_locations) | **GET** /budgets/{budget_id}/payee_locations | List payee locations +[**get_payee_locations_by_payee**](PayeeLocationsApi.md#get_payee_locations_by_payee) | **GET** /budgets/{budget_id}/payees/{payee_id}/payee_locations | List locations for a payee + + +# **get_payee_location_by_id** +> PayeeLocationResponse get_payee_location_by_id(budget_id, payee_location_id) + +Single payee location + +Returns a single payee location + +### Example +```python +from __future__ import print_function +import time +import ynab_api +from ynab_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: bearer +configuration = ynab_api.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' + +# create an instance of the API class +api_instance = ynab_api.PayeeLocationsApi(ynab_api.ApiClient(configuration)) +budget_id = 'budget_id_example' # str | The ID of the Budget. +payee_location_id = 'payee_location_id_example' # str | ID of payee location + +try: + # Single payee location + api_response = api_instance.get_payee_location_by_id(budget_id, payee_location_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling PayeeLocationsApi->get_payee_location_by_id: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **budget_id** | [**str**](.md)| The ID of the Budget. | + **payee_location_id** | [**str**](.md)| ID of payee location | + +### Return type + +[**PayeeLocationResponse**](PayeeLocationResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_payee_locations** +> PayeeLocationsResponse get_payee_locations(budget_id) + +List payee locations + +Returns all payee locations + +### Example +```python +from __future__ import print_function +import time +import ynab_api +from ynab_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: bearer +configuration = ynab_api.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' + +# create an instance of the API class +api_instance = ynab_api.PayeeLocationsApi(ynab_api.ApiClient(configuration)) +budget_id = 'budget_id_example' # str | The ID of the Budget. + +try: + # List payee locations + api_response = api_instance.get_payee_locations(budget_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling PayeeLocationsApi->get_payee_locations: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **budget_id** | [**str**](.md)| The ID of the Budget. | + +### Return type + +[**PayeeLocationsResponse**](PayeeLocationsResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_payee_locations_by_payee** +> PayeeLocationsResponse get_payee_locations_by_payee(budget_id, payee_id) + +List locations for a payee + +Returns all payee locations for the specified payee + +### Example +```python +from __future__ import print_function +import time +import ynab_api +from ynab_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: bearer +configuration = ynab_api.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' + +# create an instance of the API class +api_instance = ynab_api.PayeeLocationsApi(ynab_api.ApiClient(configuration)) +budget_id = 'budget_id_example' # str | The ID of the Budget. +payee_id = 'payee_id_example' # str | ID of payee + +try: + # List locations for a payee + api_response = api_instance.get_payee_locations_by_payee(budget_id, payee_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling PayeeLocationsApi->get_payee_locations_by_payee: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **budget_id** | [**str**](.md)| The ID of the Budget. | + **payee_id** | [**str**](.md)| ID of payee | + +### Return type + +[**PayeeLocationsResponse**](PayeeLocationsResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/ynab-api/docs/PayeeLocationsResponse.md b/ynab-api/docs/PayeeLocationsResponse.md new file mode 100644 index 0000000..ebec63f --- /dev/null +++ b/ynab-api/docs/PayeeLocationsResponse.md @@ -0,0 +1,10 @@ +# PayeeLocationsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**PayeeLocationsWrapper**](PayeeLocationsWrapper.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/PayeeLocationsWrapper.md b/ynab-api/docs/PayeeLocationsWrapper.md new file mode 100644 index 0000000..2a8bcc4 --- /dev/null +++ b/ynab-api/docs/PayeeLocationsWrapper.md @@ -0,0 +1,10 @@ +# PayeeLocationsWrapper + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**payee_locations** | [**list[PayeeLocation]**](PayeeLocation.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/PayeeResponse.md b/ynab-api/docs/PayeeResponse.md new file mode 100644 index 0000000..9e735b4 --- /dev/null +++ b/ynab-api/docs/PayeeResponse.md @@ -0,0 +1,10 @@ +# PayeeResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**PayeeWrapper**](PayeeWrapper.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/PayeeWrapper.md b/ynab-api/docs/PayeeWrapper.md new file mode 100644 index 0000000..7bdfcca --- /dev/null +++ b/ynab-api/docs/PayeeWrapper.md @@ -0,0 +1,10 @@ +# PayeeWrapper + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**payee** | [**Payee**](Payee.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/PayeesApi.md b/ynab-api/docs/PayeesApi.md new file mode 100644 index 0000000..7d2f52d --- /dev/null +++ b/ynab-api/docs/PayeesApi.md @@ -0,0 +1,120 @@ +# ynab_api.PayeesApi + +All URIs are relative to *https://api.youneedabudget.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_payee_by_id**](PayeesApi.md#get_payee_by_id) | **GET** /budgets/{budget_id}/payees/{payee_id} | Single payee +[**get_payees**](PayeesApi.md#get_payees) | **GET** /budgets/{budget_id}/payees | List payees + + +# **get_payee_by_id** +> PayeeResponse get_payee_by_id(budget_id, payee_id) + +Single payee + +Returns single payee + +### Example +```python +from __future__ import print_function +import time +import ynab_api +from ynab_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: bearer +configuration = ynab_api.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' + +# create an instance of the API class +api_instance = ynab_api.PayeesApi(ynab_api.ApiClient(configuration)) +budget_id = 'budget_id_example' # str | The ID of the Budget. +payee_id = 'payee_id_example' # str | The ID of the Payee. + +try: + # Single payee + api_response = api_instance.get_payee_by_id(budget_id, payee_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling PayeesApi->get_payee_by_id: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **budget_id** | [**str**](.md)| The ID of the Budget. | + **payee_id** | [**str**](.md)| The ID of the Payee. | + +### Return type + +[**PayeeResponse**](PayeeResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_payees** +> PayeesResponse get_payees(budget_id) + +List payees + +Returns all payees + +### Example +```python +from __future__ import print_function +import time +import ynab_api +from ynab_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: bearer +configuration = ynab_api.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' + +# create an instance of the API class +api_instance = ynab_api.PayeesApi(ynab_api.ApiClient(configuration)) +budget_id = 'budget_id_example' # str | The ID of the Budget. + +try: + # List payees + api_response = api_instance.get_payees(budget_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling PayeesApi->get_payees: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **budget_id** | [**str**](.md)| The ID of the Budget. | + +### Return type + +[**PayeesResponse**](PayeesResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/ynab-api/docs/PayeesResponse.md b/ynab-api/docs/PayeesResponse.md new file mode 100644 index 0000000..5d14cb5 --- /dev/null +++ b/ynab-api/docs/PayeesResponse.md @@ -0,0 +1,10 @@ +# PayeesResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**PayeesWrapper**](PayeesWrapper.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/PayeesWrapper.md b/ynab-api/docs/PayeesWrapper.md new file mode 100644 index 0000000..f652538 --- /dev/null +++ b/ynab-api/docs/PayeesWrapper.md @@ -0,0 +1,10 @@ +# PayeesWrapper + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**payees** | [**list[Payee]**](Payee.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/SaveTransaction.md b/ynab-api/docs/SaveTransaction.md new file mode 100644 index 0000000..461161a --- /dev/null +++ b/ynab-api/docs/SaveTransaction.md @@ -0,0 +1,14 @@ +# SaveTransaction + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account_id** | **str** | | +**date** | **date** | | +**amount** | **float** | The transaction amount in milliunits format | +**cleared** | **str** | The cleared status of the transaction | [optional] +**approved** | **bool** | Whether or not the transaction is approved. If not supplied, transaction will be unapproved by default. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/SaveTransactionWrapper.md b/ynab-api/docs/SaveTransactionWrapper.md new file mode 100644 index 0000000..35dccb0 --- /dev/null +++ b/ynab-api/docs/SaveTransactionWrapper.md @@ -0,0 +1,10 @@ +# SaveTransactionWrapper + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**transaction** | [**SaveTransaction**](SaveTransaction.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/ScheduledSubTransaction.md b/ynab-api/docs/ScheduledSubTransaction.md new file mode 100644 index 0000000..0fce877 --- /dev/null +++ b/ynab-api/docs/ScheduledSubTransaction.md @@ -0,0 +1,12 @@ +# ScheduledSubTransaction + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**scheduled_transaction_id** | **str** | | +**amount** | **float** | The scheduled sub-transaction amount in milliunits format | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/ScheduledTransactionDetail.md b/ynab-api/docs/ScheduledTransactionDetail.md new file mode 100644 index 0000000..30390a0 --- /dev/null +++ b/ynab-api/docs/ScheduledTransactionDetail.md @@ -0,0 +1,16 @@ +# ScheduledTransactionDetail + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**date_first** | **date** | The first date for which the Scheduled Transaction was scheduled. | +**date_next** | **date** | The next date for which the Scheduled Transaction is scheduled. | +**frequency** | **str** | | +**amount** | **float** | The scheduled transaction amount in milliunits format | +**account_id** | **str** | | +**subtransactions** | [**list[ScheduledSubTransaction]**](ScheduledSubTransaction.md) | If a split scheduled transaction, the sub-transactions. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/ScheduledTransactionResponse.md b/ynab-api/docs/ScheduledTransactionResponse.md new file mode 100644 index 0000000..b31265e --- /dev/null +++ b/ynab-api/docs/ScheduledTransactionResponse.md @@ -0,0 +1,10 @@ +# ScheduledTransactionResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**ScheduledTransactionWrapper**](ScheduledTransactionWrapper.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/ScheduledTransactionSummary.md b/ynab-api/docs/ScheduledTransactionSummary.md new file mode 100644 index 0000000..ed4a90c --- /dev/null +++ b/ynab-api/docs/ScheduledTransactionSummary.md @@ -0,0 +1,15 @@ +# ScheduledTransactionSummary + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**date_first** | **date** | The first date for which the Scheduled Transaction was scheduled. | +**date_next** | **date** | The next date for which the Scheduled Transaction is scheduled. | +**frequency** | **str** | | +**amount** | **float** | The scheduled transaction amount in milliunits format | +**account_id** | **str** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/ScheduledTransactionWrapper.md b/ynab-api/docs/ScheduledTransactionWrapper.md new file mode 100644 index 0000000..b0ccbdd --- /dev/null +++ b/ynab-api/docs/ScheduledTransactionWrapper.md @@ -0,0 +1,10 @@ +# ScheduledTransactionWrapper + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scheduled_transaction** | [**ScheduledTransactionDetail**](ScheduledTransactionDetail.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/ScheduledTransactionsApi.md b/ynab-api/docs/ScheduledTransactionsApi.md new file mode 100644 index 0000000..1ebcb61 --- /dev/null +++ b/ynab-api/docs/ScheduledTransactionsApi.md @@ -0,0 +1,120 @@ +# ynab_api.ScheduledTransactionsApi + +All URIs are relative to *https://api.youneedabudget.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_scheduled_transaction_by_id**](ScheduledTransactionsApi.md#get_scheduled_transaction_by_id) | **GET** /budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id} | Single scheduled transaction +[**get_scheduled_transactions**](ScheduledTransactionsApi.md#get_scheduled_transactions) | **GET** /budgets/{budget_id}/scheduled_transactions | List scheduled transactions + + +# **get_scheduled_transaction_by_id** +> ScheduledTransactionResponse get_scheduled_transaction_by_id(budget_id, scheduled_transaction_id) + +Single scheduled transaction + +Returns a single scheduled transaction + +### Example +```python +from __future__ import print_function +import time +import ynab_api +from ynab_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: bearer +configuration = ynab_api.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' + +# create an instance of the API class +api_instance = ynab_api.ScheduledTransactionsApi(ynab_api.ApiClient(configuration)) +budget_id = 'budget_id_example' # str | The ID of the Budget. +scheduled_transaction_id = 'scheduled_transaction_id_example' # str | The ID of the Scheduled Transaction. + +try: + # Single scheduled transaction + api_response = api_instance.get_scheduled_transaction_by_id(budget_id, scheduled_transaction_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling ScheduledTransactionsApi->get_scheduled_transaction_by_id: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **budget_id** | [**str**](.md)| The ID of the Budget. | + **scheduled_transaction_id** | [**str**](.md)| The ID of the Scheduled Transaction. | + +### Return type + +[**ScheduledTransactionResponse**](ScheduledTransactionResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_scheduled_transactions** +> ScheduledTransactionsResponse get_scheduled_transactions(budget_id) + +List scheduled transactions + +Returns all scheduled transactions + +### Example +```python +from __future__ import print_function +import time +import ynab_api +from ynab_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: bearer +configuration = ynab_api.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' + +# create an instance of the API class +api_instance = ynab_api.ScheduledTransactionsApi(ynab_api.ApiClient(configuration)) +budget_id = 'budget_id_example' # str | The ID of the Budget. + +try: + # List scheduled transactions + api_response = api_instance.get_scheduled_transactions(budget_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling ScheduledTransactionsApi->get_scheduled_transactions: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **budget_id** | [**str**](.md)| The ID of the Budget. | + +### Return type + +[**ScheduledTransactionsResponse**](ScheduledTransactionsResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/ynab-api/docs/ScheduledTransactionsResponse.md b/ynab-api/docs/ScheduledTransactionsResponse.md new file mode 100644 index 0000000..1ce9be7 --- /dev/null +++ b/ynab-api/docs/ScheduledTransactionsResponse.md @@ -0,0 +1,10 @@ +# ScheduledTransactionsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**ScheduledTransactionsWrapper**](ScheduledTransactionsWrapper.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/ScheduledTransactionsWrapper.md b/ynab-api/docs/ScheduledTransactionsWrapper.md new file mode 100644 index 0000000..07be84f --- /dev/null +++ b/ynab-api/docs/ScheduledTransactionsWrapper.md @@ -0,0 +1,10 @@ +# ScheduledTransactionsWrapper + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scheduled_transactions** | [**list[ScheduledTransactionDetail]**](ScheduledTransactionDetail.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/SubTransaction.md b/ynab-api/docs/SubTransaction.md new file mode 100644 index 0000000..9a0fb30 --- /dev/null +++ b/ynab-api/docs/SubTransaction.md @@ -0,0 +1,12 @@ +# SubTransaction + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**transaction_id** | **str** | | +**amount** | **float** | The sub-transaction amount in milliunits format | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/TransactionDetail.md b/ynab-api/docs/TransactionDetail.md new file mode 100644 index 0000000..5427a41 --- /dev/null +++ b/ynab-api/docs/TransactionDetail.md @@ -0,0 +1,16 @@ +# TransactionDetail + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**date** | **date** | | +**amount** | **float** | The transaction amount in milliunits format | +**cleared** | **str** | The cleared status of the transaction | +**approved** | **bool** | Whether or not the transaction is approved | +**account_id** | **str** | | +**subtransactions** | [**list[SubTransaction]**](SubTransaction.md) | If a split transaction, the sub-transactions. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/TransactionResponse.md b/ynab-api/docs/TransactionResponse.md new file mode 100644 index 0000000..2d46c5f --- /dev/null +++ b/ynab-api/docs/TransactionResponse.md @@ -0,0 +1,10 @@ +# TransactionResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**TransactionWrapper**](TransactionWrapper.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/TransactionSummary.md b/ynab-api/docs/TransactionSummary.md new file mode 100644 index 0000000..76ba566 --- /dev/null +++ b/ynab-api/docs/TransactionSummary.md @@ -0,0 +1,15 @@ +# TransactionSummary + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**date** | **date** | | +**amount** | **float** | The transaction amount in milliunits format | +**cleared** | **str** | The cleared status of the transaction | +**approved** | **bool** | Whether or not the transaction is approved | +**account_id** | **str** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/TransactionWrapper.md b/ynab-api/docs/TransactionWrapper.md new file mode 100644 index 0000000..29c2a74 --- /dev/null +++ b/ynab-api/docs/TransactionWrapper.md @@ -0,0 +1,10 @@ +# TransactionWrapper + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**transaction** | [**TransactionDetail**](TransactionDetail.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/TransactionsApi.md b/ynab-api/docs/TransactionsApi.md new file mode 100644 index 0000000..4623ee3 --- /dev/null +++ b/ynab-api/docs/TransactionsApi.md @@ -0,0 +1,415 @@ +# ynab_api.TransactionsApi + +All URIs are relative to *https://api.youneedabudget.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**bulk_create_transactions**](TransactionsApi.md#bulk_create_transactions) | **POST** /budgets/{budget_id}/transactions/bulk | Bulk create transactions +[**create_transaction**](TransactionsApi.md#create_transaction) | **POST** /budgets/{budget_id}/transactions | Create new transaction +[**get_transactions**](TransactionsApi.md#get_transactions) | **GET** /budgets/{budget_id}/transactions | List transactions +[**get_transactions_by_account**](TransactionsApi.md#get_transactions_by_account) | **GET** /budgets/{budget_id}/accounts/{account_id}/transactions | List account transactions +[**get_transactions_by_category**](TransactionsApi.md#get_transactions_by_category) | **GET** /budgets/{budget_id}/categories/{category_id}/transactions | List category transactions +[**get_transactions_by_id**](TransactionsApi.md#get_transactions_by_id) | **GET** /budgets/{budget_id}/transactions/{transaction_id} | Single transaction +[**update_transaction**](TransactionsApi.md#update_transaction) | **PUT** /budgets/{budget_id}/transactions/{transaction_id} | Updates an existing transaction + + +# **bulk_create_transactions** +> BulkResponse bulk_create_transactions(budget_id, transactions) + +Bulk create transactions + +Creates multiple transactions + +### Example +```python +from __future__ import print_function +import time +import ynab_api +from ynab_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: bearer +configuration = ynab_api.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' + +# create an instance of the API class +api_instance = ynab_api.TransactionsApi(ynab_api.ApiClient(configuration)) +budget_id = 'budget_id_example' # str | The ID of the Budget. +transactions = ynab_api.BulkTransactions() # BulkTransactions | The list of Transactions to create. + +try: + # Bulk create transactions + api_response = api_instance.bulk_create_transactions(budget_id, transactions) + pprint(api_response) +except ApiException as e: + print("Exception when calling TransactionsApi->bulk_create_transactions: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **budget_id** | [**str**](.md)| The ID of the Budget. | + **transactions** | [**BulkTransactions**](BulkTransactions.md)| The list of Transactions to create. | + +### Return type + +[**BulkResponse**](BulkResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_transaction** +> TransactionResponse create_transaction(budget_id, transaction) + +Create new transaction + +Creates a transaction + +### Example +```python +from __future__ import print_function +import time +import ynab_api +from ynab_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: bearer +configuration = ynab_api.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' + +# create an instance of the API class +api_instance = ynab_api.TransactionsApi(ynab_api.ApiClient(configuration)) +budget_id = 'budget_id_example' # str | The ID of the Budget. +transaction = ynab_api.SaveTransactionWrapper() # SaveTransactionWrapper | The Transaction to create. + +try: + # Create new transaction + api_response = api_instance.create_transaction(budget_id, transaction) + pprint(api_response) +except ApiException as e: + print("Exception when calling TransactionsApi->create_transaction: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **budget_id** | [**str**](.md)| The ID of the Budget. | + **transaction** | [**SaveTransactionWrapper**](SaveTransactionWrapper.md)| The Transaction to create. | + +### Return type + +[**TransactionResponse**](TransactionResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_transactions** +> TransactionsResponse get_transactions(budget_id, since_date=since_date, type=type) + +List transactions + +Returns budget transactions + +### Example +```python +from __future__ import print_function +import time +import ynab_api +from ynab_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: bearer +configuration = ynab_api.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' + +# create an instance of the API class +api_instance = ynab_api.TransactionsApi(ynab_api.ApiClient(configuration)) +budget_id = 'budget_id_example' # str | The ID of the Budget. +since_date = '2013-10-20' # date | Only return transactions on or after this date. (optional) +type = 'type_example' # str | Only return transactions of a certain type (i.e. 'uncategorized', 'unapproved') (optional) + +try: + # List transactions + api_response = api_instance.get_transactions(budget_id, since_date=since_date, type=type) + pprint(api_response) +except ApiException as e: + print("Exception when calling TransactionsApi->get_transactions: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **budget_id** | [**str**](.md)| The ID of the Budget. | + **since_date** | **date**| Only return transactions on or after this date. | [optional] + **type** | **str**| Only return transactions of a certain type (i.e. 'uncategorized', 'unapproved') | [optional] + +### Return type + +[**TransactionsResponse**](TransactionsResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_transactions_by_account** +> TransactionsResponse get_transactions_by_account(budget_id, account_id, since_date=since_date) + +List account transactions + +Returns all transactions for a specified account + +### Example +```python +from __future__ import print_function +import time +import ynab_api +from ynab_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: bearer +configuration = ynab_api.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' + +# create an instance of the API class +api_instance = ynab_api.TransactionsApi(ynab_api.ApiClient(configuration)) +budget_id = 'budget_id_example' # str | The ID of the Budget. +account_id = 'account_id_example' # str | The ID of the Account. +since_date = '2013-10-20' # date | Only return transactions on or after this date. (optional) + +try: + # List account transactions + api_response = api_instance.get_transactions_by_account(budget_id, account_id, since_date=since_date) + pprint(api_response) +except ApiException as e: + print("Exception when calling TransactionsApi->get_transactions_by_account: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **budget_id** | [**str**](.md)| The ID of the Budget. | + **account_id** | [**str**](.md)| The ID of the Account. | + **since_date** | **date**| Only return transactions on or after this date. | [optional] + +### Return type + +[**TransactionsResponse**](TransactionsResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_transactions_by_category** +> TransactionsResponse get_transactions_by_category(budget_id, category_id, since_date=since_date) + +List category transactions + +Returns all transactions for a specified category + +### Example +```python +from __future__ import print_function +import time +import ynab_api +from ynab_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: bearer +configuration = ynab_api.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' + +# create an instance of the API class +api_instance = ynab_api.TransactionsApi(ynab_api.ApiClient(configuration)) +budget_id = 'budget_id_example' # str | The ID of the Budget. +category_id = 'category_id_example' # str | The ID of the Category. +since_date = '2013-10-20' # date | Only return transactions on or after this date. (optional) + +try: + # List category transactions + api_response = api_instance.get_transactions_by_category(budget_id, category_id, since_date=since_date) + pprint(api_response) +except ApiException as e: + print("Exception when calling TransactionsApi->get_transactions_by_category: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **budget_id** | [**str**](.md)| The ID of the Budget. | + **category_id** | [**str**](.md)| The ID of the Category. | + **since_date** | **date**| Only return transactions on or after this date. | [optional] + +### Return type + +[**TransactionsResponse**](TransactionsResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_transactions_by_id** +> TransactionResponse get_transactions_by_id(budget_id, transaction_id) + +Single transaction + +Returns a single transaction + +### Example +```python +from __future__ import print_function +import time +import ynab_api +from ynab_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: bearer +configuration = ynab_api.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' + +# create an instance of the API class +api_instance = ynab_api.TransactionsApi(ynab_api.ApiClient(configuration)) +budget_id = 'budget_id_example' # str | The ID of the Budget. +transaction_id = 'transaction_id_example' # str | The ID of the Transaction. + +try: + # Single transaction + api_response = api_instance.get_transactions_by_id(budget_id, transaction_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling TransactionsApi->get_transactions_by_id: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **budget_id** | [**str**](.md)| The ID of the Budget. | + **transaction_id** | [**str**](.md)| The ID of the Transaction. | + +### Return type + +[**TransactionResponse**](TransactionResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_transaction** +> TransactionResponse update_transaction(budget_id, transaction_id, transaction) + +Updates an existing transaction + +Updates a transaction + +### Example +```python +from __future__ import print_function +import time +import ynab_api +from ynab_api.rest import ApiException +from pprint import pprint + +# Configure API key authorization: bearer +configuration = ynab_api.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' + +# create an instance of the API class +api_instance = ynab_api.TransactionsApi(ynab_api.ApiClient(configuration)) +budget_id = 'budget_id_example' # str | The ID of the Budget. +transaction_id = 'transaction_id_example' # str | The ID of the Transaction. +transaction = ynab_api.SaveTransactionWrapper() # SaveTransactionWrapper | The Transaction to update. + +try: + # Updates an existing transaction + api_response = api_instance.update_transaction(budget_id, transaction_id, transaction) + pprint(api_response) +except ApiException as e: + print("Exception when calling TransactionsApi->update_transaction: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **budget_id** | [**str**](.md)| The ID of the Budget. | + **transaction_id** | [**str**](.md)| The ID of the Transaction. | + **transaction** | [**SaveTransactionWrapper**](SaveTransactionWrapper.md)| The Transaction to update. | + +### Return type + +[**TransactionResponse**](TransactionResponse.md) + +### Authorization + +[bearer](../README.md#bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/ynab-api/docs/TransactionsResponse.md b/ynab-api/docs/TransactionsResponse.md new file mode 100644 index 0000000..8715a41 --- /dev/null +++ b/ynab-api/docs/TransactionsResponse.md @@ -0,0 +1,10 @@ +# TransactionsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**TransactionsWrapper**](TransactionsWrapper.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/docs/TransactionsWrapper.md b/ynab-api/docs/TransactionsWrapper.md new file mode 100644 index 0000000..b5fa271 --- /dev/null +++ b/ynab-api/docs/TransactionsWrapper.md @@ -0,0 +1,10 @@ +# TransactionsWrapper + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**transactions** | [**list[TransactionDetail]**](TransactionDetail.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/ynab-api/git_push.sh b/ynab-api/git_push.sh new file mode 100644 index 0000000..2255002 --- /dev/null +++ b/ynab-api/git_push.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 + +if [ "$git_user_id" = "" ]; then + git_user_id="rienafairefr" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="pynYNAB" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/ynab-api/requirements.txt b/ynab-api/requirements.txt new file mode 100644 index 0000000..bafdc07 --- /dev/null +++ b/ynab-api/requirements.txt @@ -0,0 +1,5 @@ +certifi >= 14.05.14 +six >= 1.10 +python_dateutil >= 2.5.3 +setuptools >= 21.0.0 +urllib3 >= 1.15.1 diff --git a/ynab-api/setup.py b/ynab-api/setup.py new file mode 100644 index 0000000..4a98f6f --- /dev/null +++ b/ynab-api/setup.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from setuptools import setup, find_packages # noqa: H301 + +NAME = "ynab_api" +VERSION = "dev" +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools + +REQUIRES = ["urllib3 >= 1.15", "six >= 1.10", "certifi", "python-dateutil"] + +setup( + name=NAME, + version=VERSION, + description="YNAB API Endpoints", + author_email="", + url="", + keywords=["Swagger", "YNAB API Endpoints"], + install_requires=REQUIRES, + packages=find_packages(), + include_package_data=True, + long_description="""\ + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + """ +) diff --git a/ynab-api/test-requirements.txt b/ynab-api/test-requirements.txt new file mode 100644 index 0000000..2702246 --- /dev/null +++ b/ynab-api/test-requirements.txt @@ -0,0 +1,5 @@ +coverage>=4.0.3 +nose>=1.3.7 +pluggy>=0.3.1 +py>=1.4.31 +randomize>=0.13 diff --git a/ynab-api/test/__init__.py b/ynab-api/test/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/ynab-api/test/test_account.py b/ynab-api/test/test_account.py new file mode 100644 index 0000000..4452b99 --- /dev/null +++ b/ynab-api/test/test_account.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.account import Account # noqa: E501 +from ynab_api.rest import ApiException + + +class TestAccount(unittest.TestCase): + """Account unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAccount(self): + """Test Account""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.account.Account() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_account_response.py b/ynab-api/test/test_account_response.py new file mode 100644 index 0000000..8ccac6d --- /dev/null +++ b/ynab-api/test/test_account_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.account_response import AccountResponse # noqa: E501 +from ynab_api.rest import ApiException + + +class TestAccountResponse(unittest.TestCase): + """AccountResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAccountResponse(self): + """Test AccountResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.account_response.AccountResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_account_wrapper.py b/ynab-api/test/test_account_wrapper.py new file mode 100644 index 0000000..11d6415 --- /dev/null +++ b/ynab-api/test/test_account_wrapper.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.account_wrapper import AccountWrapper # noqa: E501 +from ynab_api.rest import ApiException + + +class TestAccountWrapper(unittest.TestCase): + """AccountWrapper unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAccountWrapper(self): + """Test AccountWrapper""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.account_wrapper.AccountWrapper() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_accounts_api.py b/ynab-api/test/test_accounts_api.py new file mode 100644 index 0000000..cab16a9 --- /dev/null +++ b/ynab-api/test/test_accounts_api.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.api.accounts_api import AccountsApi # noqa: E501 +from ynab_api.rest import ApiException + + +class TestAccountsApi(unittest.TestCase): + """AccountsApi unit test stubs""" + + def setUp(self): + self.api = ynab_api.api.accounts_api.AccountsApi() # noqa: E501 + + def tearDown(self): + pass + + def test_get_account_by_id(self): + """Test case for get_account_by_id + + Single account # noqa: E501 + """ + pass + + def test_get_accounts(self): + """Test case for get_accounts + + Account list # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_accounts_response.py b/ynab-api/test/test_accounts_response.py new file mode 100644 index 0000000..d578b48 --- /dev/null +++ b/ynab-api/test/test_accounts_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.accounts_response import AccountsResponse # noqa: E501 +from ynab_api.rest import ApiException + + +class TestAccountsResponse(unittest.TestCase): + """AccountsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAccountsResponse(self): + """Test AccountsResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.accounts_response.AccountsResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_accounts_wrapper.py b/ynab-api/test/test_accounts_wrapper.py new file mode 100644 index 0000000..8f8b942 --- /dev/null +++ b/ynab-api/test/test_accounts_wrapper.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.accounts_wrapper import AccountsWrapper # noqa: E501 +from ynab_api.rest import ApiException + + +class TestAccountsWrapper(unittest.TestCase): + """AccountsWrapper unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAccountsWrapper(self): + """Test AccountsWrapper""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.accounts_wrapper.AccountsWrapper() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_budget_detail.py b/ynab-api/test/test_budget_detail.py new file mode 100644 index 0000000..94d5f1f --- /dev/null +++ b/ynab-api/test/test_budget_detail.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.budget_detail import BudgetDetail # noqa: E501 +from ynab_api.rest import ApiException + + +class TestBudgetDetail(unittest.TestCase): + """BudgetDetail unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBudgetDetail(self): + """Test BudgetDetail""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.budget_detail.BudgetDetail() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_budget_detail_response.py b/ynab-api/test/test_budget_detail_response.py new file mode 100644 index 0000000..1e84aa7 --- /dev/null +++ b/ynab-api/test/test_budget_detail_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.budget_detail_response import BudgetDetailResponse # noqa: E501 +from ynab_api.rest import ApiException + + +class TestBudgetDetailResponse(unittest.TestCase): + """BudgetDetailResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBudgetDetailResponse(self): + """Test BudgetDetailResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.budget_detail_response.BudgetDetailResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_budget_detail_wrapper.py b/ynab-api/test/test_budget_detail_wrapper.py new file mode 100644 index 0000000..c03fdeb --- /dev/null +++ b/ynab-api/test/test_budget_detail_wrapper.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.budget_detail_wrapper import BudgetDetailWrapper # noqa: E501 +from ynab_api.rest import ApiException + + +class TestBudgetDetailWrapper(unittest.TestCase): + """BudgetDetailWrapper unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBudgetDetailWrapper(self): + """Test BudgetDetailWrapper""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.budget_detail_wrapper.BudgetDetailWrapper() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_budget_summary.py b/ynab-api/test/test_budget_summary.py new file mode 100644 index 0000000..7fb8d92 --- /dev/null +++ b/ynab-api/test/test_budget_summary.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.budget_summary import BudgetSummary # noqa: E501 +from ynab_api.rest import ApiException + + +class TestBudgetSummary(unittest.TestCase): + """BudgetSummary unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBudgetSummary(self): + """Test BudgetSummary""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.budget_summary.BudgetSummary() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_budget_summary_response.py b/ynab-api/test/test_budget_summary_response.py new file mode 100644 index 0000000..0f6fa25 --- /dev/null +++ b/ynab-api/test/test_budget_summary_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.budget_summary_response import BudgetSummaryResponse # noqa: E501 +from ynab_api.rest import ApiException + + +class TestBudgetSummaryResponse(unittest.TestCase): + """BudgetSummaryResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBudgetSummaryResponse(self): + """Test BudgetSummaryResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.budget_summary_response.BudgetSummaryResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_budget_summary_wrapper.py b/ynab-api/test/test_budget_summary_wrapper.py new file mode 100644 index 0000000..efe561a --- /dev/null +++ b/ynab-api/test/test_budget_summary_wrapper.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.budget_summary_wrapper import BudgetSummaryWrapper # noqa: E501 +from ynab_api.rest import ApiException + + +class TestBudgetSummaryWrapper(unittest.TestCase): + """BudgetSummaryWrapper unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBudgetSummaryWrapper(self): + """Test BudgetSummaryWrapper""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.budget_summary_wrapper.BudgetSummaryWrapper() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_budgets_api.py b/ynab-api/test/test_budgets_api.py new file mode 100644 index 0000000..56883e1 --- /dev/null +++ b/ynab-api/test/test_budgets_api.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.api.budgets_api import BudgetsApi # noqa: E501 +from ynab_api.rest import ApiException + + +class TestBudgetsApi(unittest.TestCase): + """BudgetsApi unit test stubs""" + + def setUp(self): + self.api = ynab_api.api.budgets_api.BudgetsApi() # noqa: E501 + + def tearDown(self): + pass + + def test_get_budget_by_id(self): + """Test case for get_budget_by_id + + Single budget # noqa: E501 + """ + pass + + def test_get_budgets(self): + """Test case for get_budgets + + List budgets # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_bulk_id_wrapper.py b/ynab-api/test/test_bulk_id_wrapper.py new file mode 100644 index 0000000..0b61eab --- /dev/null +++ b/ynab-api/test/test_bulk_id_wrapper.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.bulk_id_wrapper import BulkIdWrapper # noqa: E501 +from ynab_api.rest import ApiException + + +class TestBulkIdWrapper(unittest.TestCase): + """BulkIdWrapper unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBulkIdWrapper(self): + """Test BulkIdWrapper""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.bulk_id_wrapper.BulkIdWrapper() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_bulk_ids.py b/ynab-api/test/test_bulk_ids.py new file mode 100644 index 0000000..384b0ae --- /dev/null +++ b/ynab-api/test/test_bulk_ids.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.bulk_ids import BulkIds # noqa: E501 +from ynab_api.rest import ApiException + + +class TestBulkIds(unittest.TestCase): + """BulkIds unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBulkIds(self): + """Test BulkIds""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.bulk_ids.BulkIds() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_bulk_response.py b/ynab-api/test/test_bulk_response.py new file mode 100644 index 0000000..79f0b68 --- /dev/null +++ b/ynab-api/test/test_bulk_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.bulk_response import BulkResponse # noqa: E501 +from ynab_api.rest import ApiException + + +class TestBulkResponse(unittest.TestCase): + """BulkResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBulkResponse(self): + """Test BulkResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.bulk_response.BulkResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_bulk_transactions.py b/ynab-api/test/test_bulk_transactions.py new file mode 100644 index 0000000..642a8ec --- /dev/null +++ b/ynab-api/test/test_bulk_transactions.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.bulk_transactions import BulkTransactions # noqa: E501 +from ynab_api.rest import ApiException + + +class TestBulkTransactions(unittest.TestCase): + """BulkTransactions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBulkTransactions(self): + """Test BulkTransactions""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.bulk_transactions.BulkTransactions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_categories_api.py b/ynab-api/test/test_categories_api.py new file mode 100644 index 0000000..27915fa --- /dev/null +++ b/ynab-api/test/test_categories_api.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.api.categories_api import CategoriesApi # noqa: E501 +from ynab_api.rest import ApiException + + +class TestCategoriesApi(unittest.TestCase): + """CategoriesApi unit test stubs""" + + def setUp(self): + self.api = ynab_api.api.categories_api.CategoriesApi() # noqa: E501 + + def tearDown(self): + pass + + def test_get_categories(self): + """Test case for get_categories + + List categories # noqa: E501 + """ + pass + + def test_get_category_by_id(self): + """Test case for get_category_by_id + + Single category # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_categories_response.py b/ynab-api/test/test_categories_response.py new file mode 100644 index 0000000..d0bfe76 --- /dev/null +++ b/ynab-api/test/test_categories_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.categories_response import CategoriesResponse # noqa: E501 +from ynab_api.rest import ApiException + + +class TestCategoriesResponse(unittest.TestCase): + """CategoriesResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCategoriesResponse(self): + """Test CategoriesResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.categories_response.CategoriesResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_category.py b/ynab-api/test/test_category.py new file mode 100644 index 0000000..618b5f3 --- /dev/null +++ b/ynab-api/test/test_category.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.category import Category # noqa: E501 +from ynab_api.rest import ApiException + + +class TestCategory(unittest.TestCase): + """Category unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCategory(self): + """Test Category""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.category.Category() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_category_group.py b/ynab-api/test/test_category_group.py new file mode 100644 index 0000000..544f472 --- /dev/null +++ b/ynab-api/test/test_category_group.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.category_group import CategoryGroup # noqa: E501 +from ynab_api.rest import ApiException + + +class TestCategoryGroup(unittest.TestCase): + """CategoryGroup unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCategoryGroup(self): + """Test CategoryGroup""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.category_group.CategoryGroup() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_category_group_with_categories.py b/ynab-api/test/test_category_group_with_categories.py new file mode 100644 index 0000000..ed3cd30 --- /dev/null +++ b/ynab-api/test/test_category_group_with_categories.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.category_group_with_categories import CategoryGroupWithCategories # noqa: E501 +from ynab_api.rest import ApiException + + +class TestCategoryGroupWithCategories(unittest.TestCase): + """CategoryGroupWithCategories unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCategoryGroupWithCategories(self): + """Test CategoryGroupWithCategories""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.category_group_with_categories.CategoryGroupWithCategories() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_category_groups_wrapper.py b/ynab-api/test/test_category_groups_wrapper.py new file mode 100644 index 0000000..2fd3cc9 --- /dev/null +++ b/ynab-api/test/test_category_groups_wrapper.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.category_groups_wrapper import CategoryGroupsWrapper # noqa: E501 +from ynab_api.rest import ApiException + + +class TestCategoryGroupsWrapper(unittest.TestCase): + """CategoryGroupsWrapper unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCategoryGroupsWrapper(self): + """Test CategoryGroupsWrapper""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.category_groups_wrapper.CategoryGroupsWrapper() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_category_response.py b/ynab-api/test/test_category_response.py new file mode 100644 index 0000000..abbca2c --- /dev/null +++ b/ynab-api/test/test_category_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.category_response import CategoryResponse # noqa: E501 +from ynab_api.rest import ApiException + + +class TestCategoryResponse(unittest.TestCase): + """CategoryResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCategoryResponse(self): + """Test CategoryResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.category_response.CategoryResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_category_wrapper.py b/ynab-api/test/test_category_wrapper.py new file mode 100644 index 0000000..afa92a8 --- /dev/null +++ b/ynab-api/test/test_category_wrapper.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.category_wrapper import CategoryWrapper # noqa: E501 +from ynab_api.rest import ApiException + + +class TestCategoryWrapper(unittest.TestCase): + """CategoryWrapper unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCategoryWrapper(self): + """Test CategoryWrapper""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.category_wrapper.CategoryWrapper() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_currency_format.py b/ynab-api/test/test_currency_format.py new file mode 100644 index 0000000..100ca77 --- /dev/null +++ b/ynab-api/test/test_currency_format.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.currency_format import CurrencyFormat # noqa: E501 +from ynab_api.rest import ApiException + + +class TestCurrencyFormat(unittest.TestCase): + """CurrencyFormat unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCurrencyFormat(self): + """Test CurrencyFormat""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.currency_format.CurrencyFormat() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_date_format.py b/ynab-api/test/test_date_format.py new file mode 100644 index 0000000..9ca7b74 --- /dev/null +++ b/ynab-api/test/test_date_format.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.date_format import DateFormat # noqa: E501 +from ynab_api.rest import ApiException + + +class TestDateFormat(unittest.TestCase): + """DateFormat unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDateFormat(self): + """Test DateFormat""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.date_format.DateFormat() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_error_detail.py b/ynab-api/test/test_error_detail.py new file mode 100644 index 0000000..a2b1dc9 --- /dev/null +++ b/ynab-api/test/test_error_detail.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.error_detail import ErrorDetail # noqa: E501 +from ynab_api.rest import ApiException + + +class TestErrorDetail(unittest.TestCase): + """ErrorDetail unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testErrorDetail(self): + """Test ErrorDetail""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.error_detail.ErrorDetail() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_error_response.py b/ynab-api/test/test_error_response.py new file mode 100644 index 0000000..4818427 --- /dev/null +++ b/ynab-api/test/test_error_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.error_response import ErrorResponse # noqa: E501 +from ynab_api.rest import ApiException + + +class TestErrorResponse(unittest.TestCase): + """ErrorResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testErrorResponse(self): + """Test ErrorResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.error_response.ErrorResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_month_detail.py b/ynab-api/test/test_month_detail.py new file mode 100644 index 0000000..3905a19 --- /dev/null +++ b/ynab-api/test/test_month_detail.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.month_detail import MonthDetail # noqa: E501 +from ynab_api.rest import ApiException + + +class TestMonthDetail(unittest.TestCase): + """MonthDetail unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMonthDetail(self): + """Test MonthDetail""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.month_detail.MonthDetail() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_month_detail_response.py b/ynab-api/test/test_month_detail_response.py new file mode 100644 index 0000000..ae9de8f --- /dev/null +++ b/ynab-api/test/test_month_detail_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.month_detail_response import MonthDetailResponse # noqa: E501 +from ynab_api.rest import ApiException + + +class TestMonthDetailResponse(unittest.TestCase): + """MonthDetailResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMonthDetailResponse(self): + """Test MonthDetailResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.month_detail_response.MonthDetailResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_month_detail_wrapper.py b/ynab-api/test/test_month_detail_wrapper.py new file mode 100644 index 0000000..a76dda2 --- /dev/null +++ b/ynab-api/test/test_month_detail_wrapper.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.month_detail_wrapper import MonthDetailWrapper # noqa: E501 +from ynab_api.rest import ApiException + + +class TestMonthDetailWrapper(unittest.TestCase): + """MonthDetailWrapper unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMonthDetailWrapper(self): + """Test MonthDetailWrapper""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.month_detail_wrapper.MonthDetailWrapper() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_month_summaries_response.py b/ynab-api/test/test_month_summaries_response.py new file mode 100644 index 0000000..8f4dbbc --- /dev/null +++ b/ynab-api/test/test_month_summaries_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.month_summaries_response import MonthSummariesResponse # noqa: E501 +from ynab_api.rest import ApiException + + +class TestMonthSummariesResponse(unittest.TestCase): + """MonthSummariesResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMonthSummariesResponse(self): + """Test MonthSummariesResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.month_summaries_response.MonthSummariesResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_month_summaries_wrapper.py b/ynab-api/test/test_month_summaries_wrapper.py new file mode 100644 index 0000000..4894ab4 --- /dev/null +++ b/ynab-api/test/test_month_summaries_wrapper.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.month_summaries_wrapper import MonthSummariesWrapper # noqa: E501 +from ynab_api.rest import ApiException + + +class TestMonthSummariesWrapper(unittest.TestCase): + """MonthSummariesWrapper unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMonthSummariesWrapper(self): + """Test MonthSummariesWrapper""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.month_summaries_wrapper.MonthSummariesWrapper() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_month_summary.py b/ynab-api/test/test_month_summary.py new file mode 100644 index 0000000..2844af5 --- /dev/null +++ b/ynab-api/test/test_month_summary.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.month_summary import MonthSummary # noqa: E501 +from ynab_api.rest import ApiException + + +class TestMonthSummary(unittest.TestCase): + """MonthSummary unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMonthSummary(self): + """Test MonthSummary""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.month_summary.MonthSummary() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_months_api.py b/ynab-api/test/test_months_api.py new file mode 100644 index 0000000..01b182c --- /dev/null +++ b/ynab-api/test/test_months_api.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.api.months_api import MonthsApi # noqa: E501 +from ynab_api.rest import ApiException + + +class TestMonthsApi(unittest.TestCase): + """MonthsApi unit test stubs""" + + def setUp(self): + self.api = ynab_api.api.months_api.MonthsApi() # noqa: E501 + + def tearDown(self): + pass + + def test_get_budget_month(self): + """Test case for get_budget_month + + Single budget month # noqa: E501 + """ + pass + + def test_get_budget_months(self): + """Test case for get_budget_months + + List budget months # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_payee.py b/ynab-api/test/test_payee.py new file mode 100644 index 0000000..5c596fb --- /dev/null +++ b/ynab-api/test/test_payee.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.payee import Payee # noqa: E501 +from ynab_api.rest import ApiException + + +class TestPayee(unittest.TestCase): + """Payee unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPayee(self): + """Test Payee""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.payee.Payee() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_payee_location.py b/ynab-api/test/test_payee_location.py new file mode 100644 index 0000000..7159400 --- /dev/null +++ b/ynab-api/test/test_payee_location.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.payee_location import PayeeLocation # noqa: E501 +from ynab_api.rest import ApiException + + +class TestPayeeLocation(unittest.TestCase): + """PayeeLocation unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPayeeLocation(self): + """Test PayeeLocation""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.payee_location.PayeeLocation() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_payee_location_response.py b/ynab-api/test/test_payee_location_response.py new file mode 100644 index 0000000..fbe6b99 --- /dev/null +++ b/ynab-api/test/test_payee_location_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.payee_location_response import PayeeLocationResponse # noqa: E501 +from ynab_api.rest import ApiException + + +class TestPayeeLocationResponse(unittest.TestCase): + """PayeeLocationResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPayeeLocationResponse(self): + """Test PayeeLocationResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.payee_location_response.PayeeLocationResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_payee_location_wrapper.py b/ynab-api/test/test_payee_location_wrapper.py new file mode 100644 index 0000000..489f26c --- /dev/null +++ b/ynab-api/test/test_payee_location_wrapper.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.payee_location_wrapper import PayeeLocationWrapper # noqa: E501 +from ynab_api.rest import ApiException + + +class TestPayeeLocationWrapper(unittest.TestCase): + """PayeeLocationWrapper unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPayeeLocationWrapper(self): + """Test PayeeLocationWrapper""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.payee_location_wrapper.PayeeLocationWrapper() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_payee_locations_api.py b/ynab-api/test/test_payee_locations_api.py new file mode 100644 index 0000000..917d920 --- /dev/null +++ b/ynab-api/test/test_payee_locations_api.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.api.payee_locations_api import PayeeLocationsApi # noqa: E501 +from ynab_api.rest import ApiException + + +class TestPayeeLocationsApi(unittest.TestCase): + """PayeeLocationsApi unit test stubs""" + + def setUp(self): + self.api = ynab_api.api.payee_locations_api.PayeeLocationsApi() # noqa: E501 + + def tearDown(self): + pass + + def test_get_payee_location_by_id(self): + """Test case for get_payee_location_by_id + + Single payee location # noqa: E501 + """ + pass + + def test_get_payee_locations(self): + """Test case for get_payee_locations + + List payee locations # noqa: E501 + """ + pass + + def test_get_payee_locations_by_payee(self): + """Test case for get_payee_locations_by_payee + + List locations for a payee # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_payee_locations_response.py b/ynab-api/test/test_payee_locations_response.py new file mode 100644 index 0000000..81d3ac2 --- /dev/null +++ b/ynab-api/test/test_payee_locations_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.payee_locations_response import PayeeLocationsResponse # noqa: E501 +from ynab_api.rest import ApiException + + +class TestPayeeLocationsResponse(unittest.TestCase): + """PayeeLocationsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPayeeLocationsResponse(self): + """Test PayeeLocationsResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.payee_locations_response.PayeeLocationsResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_payee_locations_wrapper.py b/ynab-api/test/test_payee_locations_wrapper.py new file mode 100644 index 0000000..e39b964 --- /dev/null +++ b/ynab-api/test/test_payee_locations_wrapper.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.payee_locations_wrapper import PayeeLocationsWrapper # noqa: E501 +from ynab_api.rest import ApiException + + +class TestPayeeLocationsWrapper(unittest.TestCase): + """PayeeLocationsWrapper unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPayeeLocationsWrapper(self): + """Test PayeeLocationsWrapper""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.payee_locations_wrapper.PayeeLocationsWrapper() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_payee_response.py b/ynab-api/test/test_payee_response.py new file mode 100644 index 0000000..eb345f2 --- /dev/null +++ b/ynab-api/test/test_payee_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.payee_response import PayeeResponse # noqa: E501 +from ynab_api.rest import ApiException + + +class TestPayeeResponse(unittest.TestCase): + """PayeeResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPayeeResponse(self): + """Test PayeeResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.payee_response.PayeeResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_payee_wrapper.py b/ynab-api/test/test_payee_wrapper.py new file mode 100644 index 0000000..a6e47f4 --- /dev/null +++ b/ynab-api/test/test_payee_wrapper.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.payee_wrapper import PayeeWrapper # noqa: E501 +from ynab_api.rest import ApiException + + +class TestPayeeWrapper(unittest.TestCase): + """PayeeWrapper unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPayeeWrapper(self): + """Test PayeeWrapper""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.payee_wrapper.PayeeWrapper() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_payees_api.py b/ynab-api/test/test_payees_api.py new file mode 100644 index 0000000..e9b3144 --- /dev/null +++ b/ynab-api/test/test_payees_api.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.api.payees_api import PayeesApi # noqa: E501 +from ynab_api.rest import ApiException + + +class TestPayeesApi(unittest.TestCase): + """PayeesApi unit test stubs""" + + def setUp(self): + self.api = ynab_api.api.payees_api.PayeesApi() # noqa: E501 + + def tearDown(self): + pass + + def test_get_payee_by_id(self): + """Test case for get_payee_by_id + + Single payee # noqa: E501 + """ + pass + + def test_get_payees(self): + """Test case for get_payees + + List payees # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_payees_response.py b/ynab-api/test/test_payees_response.py new file mode 100644 index 0000000..6d0a9a7 --- /dev/null +++ b/ynab-api/test/test_payees_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.payees_response import PayeesResponse # noqa: E501 +from ynab_api.rest import ApiException + + +class TestPayeesResponse(unittest.TestCase): + """PayeesResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPayeesResponse(self): + """Test PayeesResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.payees_response.PayeesResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_payees_wrapper.py b/ynab-api/test/test_payees_wrapper.py new file mode 100644 index 0000000..6127c14 --- /dev/null +++ b/ynab-api/test/test_payees_wrapper.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.payees_wrapper import PayeesWrapper # noqa: E501 +from ynab_api.rest import ApiException + + +class TestPayeesWrapper(unittest.TestCase): + """PayeesWrapper unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPayeesWrapper(self): + """Test PayeesWrapper""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.payees_wrapper.PayeesWrapper() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_save_transaction.py b/ynab-api/test/test_save_transaction.py new file mode 100644 index 0000000..30ffb53 --- /dev/null +++ b/ynab-api/test/test_save_transaction.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.save_transaction import SaveTransaction # noqa: E501 +from ynab_api.rest import ApiException + + +class TestSaveTransaction(unittest.TestCase): + """SaveTransaction unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSaveTransaction(self): + """Test SaveTransaction""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.save_transaction.SaveTransaction() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_save_transaction_wrapper.py b/ynab-api/test/test_save_transaction_wrapper.py new file mode 100644 index 0000000..0a03fa4 --- /dev/null +++ b/ynab-api/test/test_save_transaction_wrapper.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.save_transaction_wrapper import SaveTransactionWrapper # noqa: E501 +from ynab_api.rest import ApiException + + +class TestSaveTransactionWrapper(unittest.TestCase): + """SaveTransactionWrapper unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSaveTransactionWrapper(self): + """Test SaveTransactionWrapper""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.save_transaction_wrapper.SaveTransactionWrapper() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_scheduled_sub_transaction.py b/ynab-api/test/test_scheduled_sub_transaction.py new file mode 100644 index 0000000..cea9c58 --- /dev/null +++ b/ynab-api/test/test_scheduled_sub_transaction.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.scheduled_sub_transaction import ScheduledSubTransaction # noqa: E501 +from ynab_api.rest import ApiException + + +class TestScheduledSubTransaction(unittest.TestCase): + """ScheduledSubTransaction unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScheduledSubTransaction(self): + """Test ScheduledSubTransaction""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.scheduled_sub_transaction.ScheduledSubTransaction() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_scheduled_transaction_detail.py b/ynab-api/test/test_scheduled_transaction_detail.py new file mode 100644 index 0000000..a3487e0 --- /dev/null +++ b/ynab-api/test/test_scheduled_transaction_detail.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.scheduled_transaction_detail import ScheduledTransactionDetail # noqa: E501 +from ynab_api.rest import ApiException + + +class TestScheduledTransactionDetail(unittest.TestCase): + """ScheduledTransactionDetail unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScheduledTransactionDetail(self): + """Test ScheduledTransactionDetail""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.scheduled_transaction_detail.ScheduledTransactionDetail() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_scheduled_transaction_response.py b/ynab-api/test/test_scheduled_transaction_response.py new file mode 100644 index 0000000..8568163 --- /dev/null +++ b/ynab-api/test/test_scheduled_transaction_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.scheduled_transaction_response import ScheduledTransactionResponse # noqa: E501 +from ynab_api.rest import ApiException + + +class TestScheduledTransactionResponse(unittest.TestCase): + """ScheduledTransactionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScheduledTransactionResponse(self): + """Test ScheduledTransactionResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.scheduled_transaction_response.ScheduledTransactionResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_scheduled_transaction_summary.py b/ynab-api/test/test_scheduled_transaction_summary.py new file mode 100644 index 0000000..541e490 --- /dev/null +++ b/ynab-api/test/test_scheduled_transaction_summary.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.scheduled_transaction_summary import ScheduledTransactionSummary # noqa: E501 +from ynab_api.rest import ApiException + + +class TestScheduledTransactionSummary(unittest.TestCase): + """ScheduledTransactionSummary unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScheduledTransactionSummary(self): + """Test ScheduledTransactionSummary""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.scheduled_transaction_summary.ScheduledTransactionSummary() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_scheduled_transaction_wrapper.py b/ynab-api/test/test_scheduled_transaction_wrapper.py new file mode 100644 index 0000000..59df708 --- /dev/null +++ b/ynab-api/test/test_scheduled_transaction_wrapper.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.scheduled_transaction_wrapper import ScheduledTransactionWrapper # noqa: E501 +from ynab_api.rest import ApiException + + +class TestScheduledTransactionWrapper(unittest.TestCase): + """ScheduledTransactionWrapper unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScheduledTransactionWrapper(self): + """Test ScheduledTransactionWrapper""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.scheduled_transaction_wrapper.ScheduledTransactionWrapper() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_scheduled_transactions_api.py b/ynab-api/test/test_scheduled_transactions_api.py new file mode 100644 index 0000000..17c3cb9 --- /dev/null +++ b/ynab-api/test/test_scheduled_transactions_api.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.api.scheduled_transactions_api import ScheduledTransactionsApi # noqa: E501 +from ynab_api.rest import ApiException + + +class TestScheduledTransactionsApi(unittest.TestCase): + """ScheduledTransactionsApi unit test stubs""" + + def setUp(self): + self.api = ynab_api.api.scheduled_transactions_api.ScheduledTransactionsApi() # noqa: E501 + + def tearDown(self): + pass + + def test_get_scheduled_transaction_by_id(self): + """Test case for get_scheduled_transaction_by_id + + Single scheduled transaction # noqa: E501 + """ + pass + + def test_get_scheduled_transactions(self): + """Test case for get_scheduled_transactions + + List scheduled transactions # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_scheduled_transactions_response.py b/ynab-api/test/test_scheduled_transactions_response.py new file mode 100644 index 0000000..805c408 --- /dev/null +++ b/ynab-api/test/test_scheduled_transactions_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.scheduled_transactions_response import ScheduledTransactionsResponse # noqa: E501 +from ynab_api.rest import ApiException + + +class TestScheduledTransactionsResponse(unittest.TestCase): + """ScheduledTransactionsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScheduledTransactionsResponse(self): + """Test ScheduledTransactionsResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.scheduled_transactions_response.ScheduledTransactionsResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_scheduled_transactions_wrapper.py b/ynab-api/test/test_scheduled_transactions_wrapper.py new file mode 100644 index 0000000..ce260e6 --- /dev/null +++ b/ynab-api/test/test_scheduled_transactions_wrapper.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.scheduled_transactions_wrapper import ScheduledTransactionsWrapper # noqa: E501 +from ynab_api.rest import ApiException + + +class TestScheduledTransactionsWrapper(unittest.TestCase): + """ScheduledTransactionsWrapper unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testScheduledTransactionsWrapper(self): + """Test ScheduledTransactionsWrapper""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.scheduled_transactions_wrapper.ScheduledTransactionsWrapper() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_sub_transaction.py b/ynab-api/test/test_sub_transaction.py new file mode 100644 index 0000000..41cdea8 --- /dev/null +++ b/ynab-api/test/test_sub_transaction.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.sub_transaction import SubTransaction # noqa: E501 +from ynab_api.rest import ApiException + + +class TestSubTransaction(unittest.TestCase): + """SubTransaction unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSubTransaction(self): + """Test SubTransaction""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.sub_transaction.SubTransaction() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_transaction_detail.py b/ynab-api/test/test_transaction_detail.py new file mode 100644 index 0000000..a92c378 --- /dev/null +++ b/ynab-api/test/test_transaction_detail.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.transaction_detail import TransactionDetail # noqa: E501 +from ynab_api.rest import ApiException + + +class TestTransactionDetail(unittest.TestCase): + """TransactionDetail unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTransactionDetail(self): + """Test TransactionDetail""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.transaction_detail.TransactionDetail() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_transaction_response.py b/ynab-api/test/test_transaction_response.py new file mode 100644 index 0000000..6f8f6d0 --- /dev/null +++ b/ynab-api/test/test_transaction_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.transaction_response import TransactionResponse # noqa: E501 +from ynab_api.rest import ApiException + + +class TestTransactionResponse(unittest.TestCase): + """TransactionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTransactionResponse(self): + """Test TransactionResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.transaction_response.TransactionResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_transaction_summary.py b/ynab-api/test/test_transaction_summary.py new file mode 100644 index 0000000..79f8cd9 --- /dev/null +++ b/ynab-api/test/test_transaction_summary.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.transaction_summary import TransactionSummary # noqa: E501 +from ynab_api.rest import ApiException + + +class TestTransactionSummary(unittest.TestCase): + """TransactionSummary unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTransactionSummary(self): + """Test TransactionSummary""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.transaction_summary.TransactionSummary() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_transaction_wrapper.py b/ynab-api/test/test_transaction_wrapper.py new file mode 100644 index 0000000..029fad1 --- /dev/null +++ b/ynab-api/test/test_transaction_wrapper.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.transaction_wrapper import TransactionWrapper # noqa: E501 +from ynab_api.rest import ApiException + + +class TestTransactionWrapper(unittest.TestCase): + """TransactionWrapper unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTransactionWrapper(self): + """Test TransactionWrapper""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.transaction_wrapper.TransactionWrapper() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_transactions_api.py b/ynab-api/test/test_transactions_api.py new file mode 100644 index 0000000..8c29e12 --- /dev/null +++ b/ynab-api/test/test_transactions_api.py @@ -0,0 +1,83 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.api.transactions_api import TransactionsApi # noqa: E501 +from ynab_api.rest import ApiException + + +class TestTransactionsApi(unittest.TestCase): + """TransactionsApi unit test stubs""" + + def setUp(self): + self.api = ynab_api.api.transactions_api.TransactionsApi() # noqa: E501 + + def tearDown(self): + pass + + def test_bulk_create_transactions(self): + """Test case for bulk_create_transactions + + Bulk create transactions # noqa: E501 + """ + pass + + def test_create_transaction(self): + """Test case for create_transaction + + Create new transaction # noqa: E501 + """ + pass + + def test_get_transactions(self): + """Test case for get_transactions + + List transactions # noqa: E501 + """ + pass + + def test_get_transactions_by_account(self): + """Test case for get_transactions_by_account + + List account transactions # noqa: E501 + """ + pass + + def test_get_transactions_by_category(self): + """Test case for get_transactions_by_category + + List category transactions # noqa: E501 + """ + pass + + def test_get_transactions_by_id(self): + """Test case for get_transactions_by_id + + Single transaction # noqa: E501 + """ + pass + + def test_update_transaction(self): + """Test case for update_transaction + + Updates an existing transaction # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_transactions_response.py b/ynab-api/test/test_transactions_response.py new file mode 100644 index 0000000..1de27f1 --- /dev/null +++ b/ynab-api/test/test_transactions_response.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.transactions_response import TransactionsResponse # noqa: E501 +from ynab_api.rest import ApiException + + +class TestTransactionsResponse(unittest.TestCase): + """TransactionsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTransactionsResponse(self): + """Test TransactionsResponse""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.transactions_response.TransactionsResponse() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/test/test_transactions_wrapper.py b/ynab-api/test/test_transactions_wrapper.py new file mode 100644 index 0000000..52f3805 --- /dev/null +++ b/ynab-api/test/test_transactions_wrapper.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import ynab_api +from ynab_api.models.transactions_wrapper import TransactionsWrapper # noqa: E501 +from ynab_api.rest import ApiException + + +class TestTransactionsWrapper(unittest.TestCase): + """TransactionsWrapper unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTransactionsWrapper(self): + """Test TransactionsWrapper""" + # FIXME: construct object with mandatory attributes with example values + # model = ynab_api.models.transactions_wrapper.TransactionsWrapper() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/ynab-api/tox.ini b/ynab-api/tox.ini new file mode 100644 index 0000000..1cf0829 --- /dev/null +++ b/ynab-api/tox.ini @@ -0,0 +1,10 @@ +[tox] +envlist = py27, py3 + +[testenv] +deps=-r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + +commands= + nosetests \ + [] \ No newline at end of file diff --git a/ynab-api/ynab_api/__init__.py b/ynab-api/ynab_api/__init__.py new file mode 100644 index 0000000..f25de82 --- /dev/null +++ b/ynab-api/ynab_api/__init__.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +# flake8: noqa + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +# import apis into sdk package +from ynab_api.api.accounts_api import AccountsApi +from ynab_api.api.budgets_api import BudgetsApi +from ynab_api.api.categories_api import CategoriesApi +from ynab_api.api.months_api import MonthsApi +from ynab_api.api.payee_locations_api import PayeeLocationsApi +from ynab_api.api.payees_api import PayeesApi +from ynab_api.api.scheduled_transactions_api import ScheduledTransactionsApi +from ynab_api.api.transactions_api import TransactionsApi + +# import ApiClient +from ynab_api.api_client import ApiClient +from ynab_api.configuration import Configuration +# import models into sdk package +from ynab_api.models.account import Account +from ynab_api.models.account_response import AccountResponse +from ynab_api.models.account_wrapper import AccountWrapper +from ynab_api.models.accounts_response import AccountsResponse +from ynab_api.models.accounts_wrapper import AccountsWrapper +from ynab_api.models.budget_detail_response import BudgetDetailResponse +from ynab_api.models.budget_detail_wrapper import BudgetDetailWrapper +from ynab_api.models.budget_summary import BudgetSummary +from ynab_api.models.budget_summary_response import BudgetSummaryResponse +from ynab_api.models.budget_summary_wrapper import BudgetSummaryWrapper +from ynab_api.models.bulk_id_wrapper import BulkIdWrapper +from ynab_api.models.bulk_ids import BulkIds +from ynab_api.models.bulk_response import BulkResponse +from ynab_api.models.bulk_transactions import BulkTransactions +from ynab_api.models.categories_response import CategoriesResponse +from ynab_api.models.category import Category +from ynab_api.models.category_group import CategoryGroup +from ynab_api.models.category_groups_wrapper import CategoryGroupsWrapper +from ynab_api.models.category_response import CategoryResponse +from ynab_api.models.category_wrapper import CategoryWrapper +from ynab_api.models.currency_format import CurrencyFormat +from ynab_api.models.date_format import DateFormat +from ynab_api.models.error_detail import ErrorDetail +from ynab_api.models.error_response import ErrorResponse +from ynab_api.models.month_detail_response import MonthDetailResponse +from ynab_api.models.month_detail_wrapper import MonthDetailWrapper +from ynab_api.models.month_summaries_response import MonthSummariesResponse +from ynab_api.models.month_summaries_wrapper import MonthSummariesWrapper +from ynab_api.models.month_summary import MonthSummary +from ynab_api.models.payee import Payee +from ynab_api.models.payee_location import PayeeLocation +from ynab_api.models.payee_location_response import PayeeLocationResponse +from ynab_api.models.payee_location_wrapper import PayeeLocationWrapper +from ynab_api.models.payee_locations_response import PayeeLocationsResponse +from ynab_api.models.payee_locations_wrapper import PayeeLocationsWrapper +from ynab_api.models.payee_response import PayeeResponse +from ynab_api.models.payee_wrapper import PayeeWrapper +from ynab_api.models.payees_response import PayeesResponse +from ynab_api.models.payees_wrapper import PayeesWrapper +from ynab_api.models.save_transaction import SaveTransaction +from ynab_api.models.save_transaction_wrapper import SaveTransactionWrapper +from ynab_api.models.scheduled_sub_transaction import ScheduledSubTransaction +from ynab_api.models.scheduled_transaction_response import ScheduledTransactionResponse +from ynab_api.models.scheduled_transaction_summary import ScheduledTransactionSummary +from ynab_api.models.scheduled_transaction_wrapper import ScheduledTransactionWrapper +from ynab_api.models.scheduled_transactions_response import ScheduledTransactionsResponse +from ynab_api.models.scheduled_transactions_wrapper import ScheduledTransactionsWrapper +from ynab_api.models.sub_transaction import SubTransaction +from ynab_api.models.transaction_response import TransactionResponse +from ynab_api.models.transaction_summary import TransactionSummary +from ynab_api.models.transaction_wrapper import TransactionWrapper +from ynab_api.models.transactions_response import TransactionsResponse +from ynab_api.models.transactions_wrapper import TransactionsWrapper +from ynab_api.models.budget_detail import BudgetDetail +from ynab_api.models.category_group_with_categories import CategoryGroupWithCategories +from ynab_api.models.month_detail import MonthDetail +from ynab_api.models.scheduled_transaction_detail import ScheduledTransactionDetail +from ynab_api.models.transaction_detail import TransactionDetail diff --git a/ynab-api/ynab_api/api/__init__.py b/ynab-api/ynab_api/api/__init__.py new file mode 100644 index 0000000..6a9c11d --- /dev/null +++ b/ynab-api/ynab_api/api/__init__.py @@ -0,0 +1,13 @@ +from __future__ import absolute_import + +# flake8: noqa + +# import apis into api package +from ynab_api.api.accounts_api import AccountsApi +from ynab_api.api.budgets_api import BudgetsApi +from ynab_api.api.categories_api import CategoriesApi +from ynab_api.api.months_api import MonthsApi +from ynab_api.api.payee_locations_api import PayeeLocationsApi +from ynab_api.api.payees_api import PayeesApi +from ynab_api.api.scheduled_transactions_api import ScheduledTransactionsApi +from ynab_api.api.transactions_api import TransactionsApi diff --git a/ynab-api/ynab_api/api/accounts_api.py b/ynab-api/ynab_api/api/accounts_api.py new file mode 100644 index 0000000..004a2f5 --- /dev/null +++ b/ynab-api/ynab_api/api/accounts_api.py @@ -0,0 +1,232 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from ynab_api.api_client import ApiClient + + +class AccountsApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def get_account_by_id(self, budget_id, account_id, **kwargs): # noqa: E501 + """Single account # noqa: E501 + + Returns a single account # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_account_by_id(budget_id, account_id, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :param str account_id: The ID of the Account. (required) + :return: AccountResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_account_by_id_with_http_info(budget_id, account_id, **kwargs) # noqa: E501 + else: + (data) = self.get_account_by_id_with_http_info(budget_id, account_id, **kwargs) # noqa: E501 + return data + + def get_account_by_id_with_http_info(self, budget_id, account_id, **kwargs): # noqa: E501 + """Single account # noqa: E501 + + Returns a single account # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_account_by_id_with_http_info(budget_id, account_id, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :param str account_id: The ID of the Account. (required) + :return: AccountResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['budget_id', 'account_id'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_account_by_id" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'budget_id' is set + if ('budget_id' not in params or + params['budget_id'] is None): + raise ValueError("Missing the required parameter `budget_id` when calling `get_account_by_id`") # noqa: E501 + # verify the required parameter 'account_id' is set + if ('account_id' not in params or + params['account_id'] is None): + raise ValueError("Missing the required parameter `account_id` when calling `get_account_by_id`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'budget_id' in params: + path_params['budget_id'] = params['budget_id'] # noqa: E501 + if 'account_id' in params: + path_params['account_id'] = params['account_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearer'] # noqa: E501 + + return self.api_client.call_api( + '/budgets/{budget_id}/accounts/{account_id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AccountResponse', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_accounts(self, budget_id, **kwargs): # noqa: E501 + """Account list # noqa: E501 + + Returns all accounts # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_accounts(budget_id, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :return: AccountsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_accounts_with_http_info(budget_id, **kwargs) # noqa: E501 + else: + (data) = self.get_accounts_with_http_info(budget_id, **kwargs) # noqa: E501 + return data + + def get_accounts_with_http_info(self, budget_id, **kwargs): # noqa: E501 + """Account list # noqa: E501 + + Returns all accounts # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_accounts_with_http_info(budget_id, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :return: AccountsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['budget_id'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_accounts" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'budget_id' is set + if ('budget_id' not in params or + params['budget_id'] is None): + raise ValueError("Missing the required parameter `budget_id` when calling `get_accounts`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'budget_id' in params: + path_params['budget_id'] = params['budget_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearer'] # noqa: E501 + + return self.api_client.call_api( + '/budgets/{budget_id}/accounts', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AccountsResponse', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/ynab-api/ynab_api/api/budgets_api.py b/ynab-api/ynab_api/api/budgets_api.py new file mode 100644 index 0000000..eb9f5a1 --- /dev/null +++ b/ynab-api/ynab_api/api/budgets_api.py @@ -0,0 +1,220 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from ynab_api.api_client import ApiClient + + +class BudgetsApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def get_budget_by_id(self, budget_id, **kwargs): # noqa: E501 + """Single budget # noqa: E501 + + Returns a single budget with all related entities. This resource is effectively a full budget export. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_budget_by_id(budget_id, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :param float last_knowledge_of_server: The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. + :return: BudgetDetailResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_budget_by_id_with_http_info(budget_id, **kwargs) # noqa: E501 + else: + (data) = self.get_budget_by_id_with_http_info(budget_id, **kwargs) # noqa: E501 + return data + + def get_budget_by_id_with_http_info(self, budget_id, **kwargs): # noqa: E501 + """Single budget # noqa: E501 + + Returns a single budget with all related entities. This resource is effectively a full budget export. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_budget_by_id_with_http_info(budget_id, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :param float last_knowledge_of_server: The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. + :return: BudgetDetailResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['budget_id', 'last_knowledge_of_server'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_budget_by_id" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'budget_id' is set + if ('budget_id' not in params or + params['budget_id'] is None): + raise ValueError("Missing the required parameter `budget_id` when calling `get_budget_by_id`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'budget_id' in params: + path_params['budget_id'] = params['budget_id'] # noqa: E501 + + query_params = [] + if 'last_knowledge_of_server' in params: + query_params.append(('last_knowledge_of_server', params['last_knowledge_of_server'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearer'] # noqa: E501 + + return self.api_client.call_api( + '/budgets/{budget_id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='BudgetDetailResponse', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_budgets(self, **kwargs): # noqa: E501 + """List budgets # noqa: E501 + + Returns budgets list with summary information. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_budgets(async=True) + >>> result = thread.get() + + :param async bool + :return: BudgetSummaryResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_budgets_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.get_budgets_with_http_info(**kwargs) # noqa: E501 + return data + + def get_budgets_with_http_info(self, **kwargs): # noqa: E501 + """List budgets # noqa: E501 + + Returns budgets list with summary information. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_budgets_with_http_info(async=True) + >>> result = thread.get() + + :param async bool + :return: BudgetSummaryResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_budgets" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearer'] # noqa: E501 + + return self.api_client.call_api( + '/budgets', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='BudgetSummaryResponse', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/ynab-api/ynab_api/api/categories_api.py b/ynab-api/ynab_api/api/categories_api.py new file mode 100644 index 0000000..8426cf6 --- /dev/null +++ b/ynab-api/ynab_api/api/categories_api.py @@ -0,0 +1,232 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from ynab_api.api_client import ApiClient + + +class CategoriesApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def get_categories(self, budget_id, **kwargs): # noqa: E501 + """List categories # noqa: E501 + + Returns all categories grouped by category group. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_categories(budget_id, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :return: CategoriesResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_categories_with_http_info(budget_id, **kwargs) # noqa: E501 + else: + (data) = self.get_categories_with_http_info(budget_id, **kwargs) # noqa: E501 + return data + + def get_categories_with_http_info(self, budget_id, **kwargs): # noqa: E501 + """List categories # noqa: E501 + + Returns all categories grouped by category group. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_categories_with_http_info(budget_id, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :return: CategoriesResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['budget_id'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_categories" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'budget_id' is set + if ('budget_id' not in params or + params['budget_id'] is None): + raise ValueError("Missing the required parameter `budget_id` when calling `get_categories`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'budget_id' in params: + path_params['budget_id'] = params['budget_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearer'] # noqa: E501 + + return self.api_client.call_api( + '/budgets/{budget_id}/categories', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CategoriesResponse', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_category_by_id(self, budget_id, category_id, **kwargs): # noqa: E501 + """Single category # noqa: E501 + + Returns a single category # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_category_by_id(budget_id, category_id, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :param str category_id: The ID of the Category. (required) + :return: CategoryResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_category_by_id_with_http_info(budget_id, category_id, **kwargs) # noqa: E501 + else: + (data) = self.get_category_by_id_with_http_info(budget_id, category_id, **kwargs) # noqa: E501 + return data + + def get_category_by_id_with_http_info(self, budget_id, category_id, **kwargs): # noqa: E501 + """Single category # noqa: E501 + + Returns a single category # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_category_by_id_with_http_info(budget_id, category_id, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :param str category_id: The ID of the Category. (required) + :return: CategoryResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['budget_id', 'category_id'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_category_by_id" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'budget_id' is set + if ('budget_id' not in params or + params['budget_id'] is None): + raise ValueError("Missing the required parameter `budget_id` when calling `get_category_by_id`") # noqa: E501 + # verify the required parameter 'category_id' is set + if ('category_id' not in params or + params['category_id'] is None): + raise ValueError("Missing the required parameter `category_id` when calling `get_category_by_id`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'budget_id' in params: + path_params['budget_id'] = params['budget_id'] # noqa: E501 + if 'category_id' in params: + path_params['category_id'] = params['category_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearer'] # noqa: E501 + + return self.api_client.call_api( + '/budgets/{budget_id}/categories/{category_id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CategoryResponse', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/ynab-api/ynab_api/api/months_api.py b/ynab-api/ynab_api/api/months_api.py new file mode 100644 index 0000000..6016626 --- /dev/null +++ b/ynab-api/ynab_api/api/months_api.py @@ -0,0 +1,232 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from ynab_api.api_client import ApiClient + + +class MonthsApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def get_budget_month(self, budget_id, month, **kwargs): # noqa: E501 + """Single budget month # noqa: E501 + + Returns a single budget month # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_budget_month(budget_id, month, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :param date month: The Budget Month. \"current\" can also be used to specify the current calendar month (UTC). (required) + :return: MonthDetailResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_budget_month_with_http_info(budget_id, month, **kwargs) # noqa: E501 + else: + (data) = self.get_budget_month_with_http_info(budget_id, month, **kwargs) # noqa: E501 + return data + + def get_budget_month_with_http_info(self, budget_id, month, **kwargs): # noqa: E501 + """Single budget month # noqa: E501 + + Returns a single budget month # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_budget_month_with_http_info(budget_id, month, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :param date month: The Budget Month. \"current\" can also be used to specify the current calendar month (UTC). (required) + :return: MonthDetailResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['budget_id', 'month'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_budget_month" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'budget_id' is set + if ('budget_id' not in params or + params['budget_id'] is None): + raise ValueError("Missing the required parameter `budget_id` when calling `get_budget_month`") # noqa: E501 + # verify the required parameter 'month' is set + if ('month' not in params or + params['month'] is None): + raise ValueError("Missing the required parameter `month` when calling `get_budget_month`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'budget_id' in params: + path_params['budget_id'] = params['budget_id'] # noqa: E501 + if 'month' in params: + path_params['month'] = params['month'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearer'] # noqa: E501 + + return self.api_client.call_api( + '/budgets/{budget_id}/months/{month}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='MonthDetailResponse', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_budget_months(self, budget_id, **kwargs): # noqa: E501 + """List budget months # noqa: E501 + + Returns all budget months # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_budget_months(budget_id, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :return: MonthSummariesResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_budget_months_with_http_info(budget_id, **kwargs) # noqa: E501 + else: + (data) = self.get_budget_months_with_http_info(budget_id, **kwargs) # noqa: E501 + return data + + def get_budget_months_with_http_info(self, budget_id, **kwargs): # noqa: E501 + """List budget months # noqa: E501 + + Returns all budget months # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_budget_months_with_http_info(budget_id, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :return: MonthSummariesResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['budget_id'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_budget_months" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'budget_id' is set + if ('budget_id' not in params or + params['budget_id'] is None): + raise ValueError("Missing the required parameter `budget_id` when calling `get_budget_months`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'budget_id' in params: + path_params['budget_id'] = params['budget_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearer'] # noqa: E501 + + return self.api_client.call_api( + '/budgets/{budget_id}/months', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='MonthSummariesResponse', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/ynab-api/ynab_api/api/payee_locations_api.py b/ynab-api/ynab_api/api/payee_locations_api.py new file mode 100644 index 0000000..62208da --- /dev/null +++ b/ynab-api/ynab_api/api/payee_locations_api.py @@ -0,0 +1,335 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from ynab_api.api_client import ApiClient + + +class PayeeLocationsApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def get_payee_location_by_id(self, budget_id, payee_location_id, **kwargs): # noqa: E501 + """Single payee location # noqa: E501 + + Returns a single payee location # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_payee_location_by_id(budget_id, payee_location_id, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :param str payee_location_id: ID of payee location (required) + :return: PayeeLocationResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_payee_location_by_id_with_http_info(budget_id, payee_location_id, **kwargs) # noqa: E501 + else: + (data) = self.get_payee_location_by_id_with_http_info(budget_id, payee_location_id, **kwargs) # noqa: E501 + return data + + def get_payee_location_by_id_with_http_info(self, budget_id, payee_location_id, **kwargs): # noqa: E501 + """Single payee location # noqa: E501 + + Returns a single payee location # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_payee_location_by_id_with_http_info(budget_id, payee_location_id, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :param str payee_location_id: ID of payee location (required) + :return: PayeeLocationResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['budget_id', 'payee_location_id'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_payee_location_by_id" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'budget_id' is set + if ('budget_id' not in params or + params['budget_id'] is None): + raise ValueError("Missing the required parameter `budget_id` when calling `get_payee_location_by_id`") # noqa: E501 + # verify the required parameter 'payee_location_id' is set + if ('payee_location_id' not in params or + params['payee_location_id'] is None): + raise ValueError("Missing the required parameter `payee_location_id` when calling `get_payee_location_by_id`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'budget_id' in params: + path_params['budget_id'] = params['budget_id'] # noqa: E501 + if 'payee_location_id' in params: + path_params['payee_location_id'] = params['payee_location_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearer'] # noqa: E501 + + return self.api_client.call_api( + '/budgets/{budget_id}/payee_locations/{payee_location_id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PayeeLocationResponse', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_payee_locations(self, budget_id, **kwargs): # noqa: E501 + """List payee locations # noqa: E501 + + Returns all payee locations # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_payee_locations(budget_id, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :return: PayeeLocationsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_payee_locations_with_http_info(budget_id, **kwargs) # noqa: E501 + else: + (data) = self.get_payee_locations_with_http_info(budget_id, **kwargs) # noqa: E501 + return data + + def get_payee_locations_with_http_info(self, budget_id, **kwargs): # noqa: E501 + """List payee locations # noqa: E501 + + Returns all payee locations # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_payee_locations_with_http_info(budget_id, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :return: PayeeLocationsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['budget_id'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_payee_locations" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'budget_id' is set + if ('budget_id' not in params or + params['budget_id'] is None): + raise ValueError("Missing the required parameter `budget_id` when calling `get_payee_locations`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'budget_id' in params: + path_params['budget_id'] = params['budget_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearer'] # noqa: E501 + + return self.api_client.call_api( + '/budgets/{budget_id}/payee_locations', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PayeeLocationsResponse', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_payee_locations_by_payee(self, budget_id, payee_id, **kwargs): # noqa: E501 + """List locations for a payee # noqa: E501 + + Returns all payee locations for the specified payee # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_payee_locations_by_payee(budget_id, payee_id, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :param str payee_id: ID of payee (required) + :return: PayeeLocationsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_payee_locations_by_payee_with_http_info(budget_id, payee_id, **kwargs) # noqa: E501 + else: + (data) = self.get_payee_locations_by_payee_with_http_info(budget_id, payee_id, **kwargs) # noqa: E501 + return data + + def get_payee_locations_by_payee_with_http_info(self, budget_id, payee_id, **kwargs): # noqa: E501 + """List locations for a payee # noqa: E501 + + Returns all payee locations for the specified payee # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_payee_locations_by_payee_with_http_info(budget_id, payee_id, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :param str payee_id: ID of payee (required) + :return: PayeeLocationsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['budget_id', 'payee_id'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_payee_locations_by_payee" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'budget_id' is set + if ('budget_id' not in params or + params['budget_id'] is None): + raise ValueError("Missing the required parameter `budget_id` when calling `get_payee_locations_by_payee`") # noqa: E501 + # verify the required parameter 'payee_id' is set + if ('payee_id' not in params or + params['payee_id'] is None): + raise ValueError("Missing the required parameter `payee_id` when calling `get_payee_locations_by_payee`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'budget_id' in params: + path_params['budget_id'] = params['budget_id'] # noqa: E501 + if 'payee_id' in params: + path_params['payee_id'] = params['payee_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearer'] # noqa: E501 + + return self.api_client.call_api( + '/budgets/{budget_id}/payees/{payee_id}/payee_locations', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PayeeLocationsResponse', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/ynab-api/ynab_api/api/payees_api.py b/ynab-api/ynab_api/api/payees_api.py new file mode 100644 index 0000000..c1e3358 --- /dev/null +++ b/ynab-api/ynab_api/api/payees_api.py @@ -0,0 +1,232 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from ynab_api.api_client import ApiClient + + +class PayeesApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def get_payee_by_id(self, budget_id, payee_id, **kwargs): # noqa: E501 + """Single payee # noqa: E501 + + Returns single payee # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_payee_by_id(budget_id, payee_id, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :param str payee_id: The ID of the Payee. (required) + :return: PayeeResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_payee_by_id_with_http_info(budget_id, payee_id, **kwargs) # noqa: E501 + else: + (data) = self.get_payee_by_id_with_http_info(budget_id, payee_id, **kwargs) # noqa: E501 + return data + + def get_payee_by_id_with_http_info(self, budget_id, payee_id, **kwargs): # noqa: E501 + """Single payee # noqa: E501 + + Returns single payee # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_payee_by_id_with_http_info(budget_id, payee_id, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :param str payee_id: The ID of the Payee. (required) + :return: PayeeResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['budget_id', 'payee_id'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_payee_by_id" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'budget_id' is set + if ('budget_id' not in params or + params['budget_id'] is None): + raise ValueError("Missing the required parameter `budget_id` when calling `get_payee_by_id`") # noqa: E501 + # verify the required parameter 'payee_id' is set + if ('payee_id' not in params or + params['payee_id'] is None): + raise ValueError("Missing the required parameter `payee_id` when calling `get_payee_by_id`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'budget_id' in params: + path_params['budget_id'] = params['budget_id'] # noqa: E501 + if 'payee_id' in params: + path_params['payee_id'] = params['payee_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearer'] # noqa: E501 + + return self.api_client.call_api( + '/budgets/{budget_id}/payees/{payee_id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PayeeResponse', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_payees(self, budget_id, **kwargs): # noqa: E501 + """List payees # noqa: E501 + + Returns all payees # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_payees(budget_id, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :return: PayeesResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_payees_with_http_info(budget_id, **kwargs) # noqa: E501 + else: + (data) = self.get_payees_with_http_info(budget_id, **kwargs) # noqa: E501 + return data + + def get_payees_with_http_info(self, budget_id, **kwargs): # noqa: E501 + """List payees # noqa: E501 + + Returns all payees # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_payees_with_http_info(budget_id, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :return: PayeesResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['budget_id'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_payees" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'budget_id' is set + if ('budget_id' not in params or + params['budget_id'] is None): + raise ValueError("Missing the required parameter `budget_id` when calling `get_payees`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'budget_id' in params: + path_params['budget_id'] = params['budget_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearer'] # noqa: E501 + + return self.api_client.call_api( + '/budgets/{budget_id}/payees', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PayeesResponse', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/ynab-api/ynab_api/api/scheduled_transactions_api.py b/ynab-api/ynab_api/api/scheduled_transactions_api.py new file mode 100644 index 0000000..c35f601 --- /dev/null +++ b/ynab-api/ynab_api/api/scheduled_transactions_api.py @@ -0,0 +1,232 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from ynab_api.api_client import ApiClient + + +class ScheduledTransactionsApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def get_scheduled_transaction_by_id(self, budget_id, scheduled_transaction_id, **kwargs): # noqa: E501 + """Single scheduled transaction # noqa: E501 + + Returns a single scheduled transaction # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_scheduled_transaction_by_id(budget_id, scheduled_transaction_id, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :param str scheduled_transaction_id: The ID of the Scheduled Transaction. (required) + :return: ScheduledTransactionResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_scheduled_transaction_by_id_with_http_info(budget_id, scheduled_transaction_id, **kwargs) # noqa: E501 + else: + (data) = self.get_scheduled_transaction_by_id_with_http_info(budget_id, scheduled_transaction_id, **kwargs) # noqa: E501 + return data + + def get_scheduled_transaction_by_id_with_http_info(self, budget_id, scheduled_transaction_id, **kwargs): # noqa: E501 + """Single scheduled transaction # noqa: E501 + + Returns a single scheduled transaction # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_scheduled_transaction_by_id_with_http_info(budget_id, scheduled_transaction_id, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :param str scheduled_transaction_id: The ID of the Scheduled Transaction. (required) + :return: ScheduledTransactionResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['budget_id', 'scheduled_transaction_id'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_scheduled_transaction_by_id" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'budget_id' is set + if ('budget_id' not in params or + params['budget_id'] is None): + raise ValueError("Missing the required parameter `budget_id` when calling `get_scheduled_transaction_by_id`") # noqa: E501 + # verify the required parameter 'scheduled_transaction_id' is set + if ('scheduled_transaction_id' not in params or + params['scheduled_transaction_id'] is None): + raise ValueError("Missing the required parameter `scheduled_transaction_id` when calling `get_scheduled_transaction_by_id`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'budget_id' in params: + path_params['budget_id'] = params['budget_id'] # noqa: E501 + if 'scheduled_transaction_id' in params: + path_params['scheduled_transaction_id'] = params['scheduled_transaction_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearer'] # noqa: E501 + + return self.api_client.call_api( + '/budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ScheduledTransactionResponse', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_scheduled_transactions(self, budget_id, **kwargs): # noqa: E501 + """List scheduled transactions # noqa: E501 + + Returns all scheduled transactions # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_scheduled_transactions(budget_id, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :return: ScheduledTransactionsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_scheduled_transactions_with_http_info(budget_id, **kwargs) # noqa: E501 + else: + (data) = self.get_scheduled_transactions_with_http_info(budget_id, **kwargs) # noqa: E501 + return data + + def get_scheduled_transactions_with_http_info(self, budget_id, **kwargs): # noqa: E501 + """List scheduled transactions # noqa: E501 + + Returns all scheduled transactions # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_scheduled_transactions_with_http_info(budget_id, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :return: ScheduledTransactionsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['budget_id'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_scheduled_transactions" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'budget_id' is set + if ('budget_id' not in params or + params['budget_id'] is None): + raise ValueError("Missing the required parameter `budget_id` when calling `get_scheduled_transactions`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'budget_id' in params: + path_params['budget_id'] = params['budget_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearer'] # noqa: E501 + + return self.api_client.call_api( + '/budgets/{budget_id}/scheduled_transactions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ScheduledTransactionsResponse', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/ynab-api/ynab_api/api/transactions_api.py b/ynab-api/ynab_api/api/transactions_api.py new file mode 100644 index 0000000..48c483b --- /dev/null +++ b/ynab-api/ynab_api/api/transactions_api.py @@ -0,0 +1,771 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from ynab_api.api_client import ApiClient + + +class TransactionsApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def bulk_create_transactions(self, budget_id, transactions, **kwargs): # noqa: E501 + """Bulk create transactions # noqa: E501 + + Creates multiple transactions # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.bulk_create_transactions(budget_id, transactions, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :param BulkTransactions transactions: The list of Transactions to create. (required) + :return: BulkResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.bulk_create_transactions_with_http_info(budget_id, transactions, **kwargs) # noqa: E501 + else: + (data) = self.bulk_create_transactions_with_http_info(budget_id, transactions, **kwargs) # noqa: E501 + return data + + def bulk_create_transactions_with_http_info(self, budget_id, transactions, **kwargs): # noqa: E501 + """Bulk create transactions # noqa: E501 + + Creates multiple transactions # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.bulk_create_transactions_with_http_info(budget_id, transactions, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :param BulkTransactions transactions: The list of Transactions to create. (required) + :return: BulkResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['budget_id', 'transactions'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method bulk_create_transactions" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'budget_id' is set + if ('budget_id' not in params or + params['budget_id'] is None): + raise ValueError("Missing the required parameter `budget_id` when calling `bulk_create_transactions`") # noqa: E501 + # verify the required parameter 'transactions' is set + if ('transactions' not in params or + params['transactions'] is None): + raise ValueError("Missing the required parameter `transactions` when calling `bulk_create_transactions`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'budget_id' in params: + path_params['budget_id'] = params['budget_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'transactions' in params: + body_params = params['transactions'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearer'] # noqa: E501 + + return self.api_client.call_api( + '/budgets/{budget_id}/transactions/bulk', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='BulkResponse', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def create_transaction(self, budget_id, transaction, **kwargs): # noqa: E501 + """Create new transaction # noqa: E501 + + Creates a transaction # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.create_transaction(budget_id, transaction, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :param SaveTransactionWrapper transaction: The Transaction to create. (required) + :return: TransactionResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.create_transaction_with_http_info(budget_id, transaction, **kwargs) # noqa: E501 + else: + (data) = self.create_transaction_with_http_info(budget_id, transaction, **kwargs) # noqa: E501 + return data + + def create_transaction_with_http_info(self, budget_id, transaction, **kwargs): # noqa: E501 + """Create new transaction # noqa: E501 + + Creates a transaction # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.create_transaction_with_http_info(budget_id, transaction, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :param SaveTransactionWrapper transaction: The Transaction to create. (required) + :return: TransactionResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['budget_id', 'transaction'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method create_transaction" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'budget_id' is set + if ('budget_id' not in params or + params['budget_id'] is None): + raise ValueError("Missing the required parameter `budget_id` when calling `create_transaction`") # noqa: E501 + # verify the required parameter 'transaction' is set + if ('transaction' not in params or + params['transaction'] is None): + raise ValueError("Missing the required parameter `transaction` when calling `create_transaction`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'budget_id' in params: + path_params['budget_id'] = params['budget_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'transaction' in params: + body_params = params['transaction'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearer'] # noqa: E501 + + return self.api_client.call_api( + '/budgets/{budget_id}/transactions', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TransactionResponse', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_transactions(self, budget_id, **kwargs): # noqa: E501 + """List transactions # noqa: E501 + + Returns budget transactions # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_transactions(budget_id, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :param date since_date: Only return transactions on or after this date. + :param str type: Only return transactions of a certain type (i.e. 'uncategorized', 'unapproved') + :return: TransactionsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_transactions_with_http_info(budget_id, **kwargs) # noqa: E501 + else: + (data) = self.get_transactions_with_http_info(budget_id, **kwargs) # noqa: E501 + return data + + def get_transactions_with_http_info(self, budget_id, **kwargs): # noqa: E501 + """List transactions # noqa: E501 + + Returns budget transactions # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_transactions_with_http_info(budget_id, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :param date since_date: Only return transactions on or after this date. + :param str type: Only return transactions of a certain type (i.e. 'uncategorized', 'unapproved') + :return: TransactionsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['budget_id', 'since_date', 'type'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_transactions" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'budget_id' is set + if ('budget_id' not in params or + params['budget_id'] is None): + raise ValueError("Missing the required parameter `budget_id` when calling `get_transactions`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'budget_id' in params: + path_params['budget_id'] = params['budget_id'] # noqa: E501 + + query_params = [] + if 'since_date' in params: + query_params.append(('since_date', params['since_date'])) # noqa: E501 + if 'type' in params: + query_params.append(('type', params['type'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearer'] # noqa: E501 + + return self.api_client.call_api( + '/budgets/{budget_id}/transactions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TransactionsResponse', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_transactions_by_account(self, budget_id, account_id, **kwargs): # noqa: E501 + """List account transactions # noqa: E501 + + Returns all transactions for a specified account # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_transactions_by_account(budget_id, account_id, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :param str account_id: The ID of the Account. (required) + :param date since_date: Only return transactions on or after this date. + :return: TransactionsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_transactions_by_account_with_http_info(budget_id, account_id, **kwargs) # noqa: E501 + else: + (data) = self.get_transactions_by_account_with_http_info(budget_id, account_id, **kwargs) # noqa: E501 + return data + + def get_transactions_by_account_with_http_info(self, budget_id, account_id, **kwargs): # noqa: E501 + """List account transactions # noqa: E501 + + Returns all transactions for a specified account # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_transactions_by_account_with_http_info(budget_id, account_id, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :param str account_id: The ID of the Account. (required) + :param date since_date: Only return transactions on or after this date. + :return: TransactionsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['budget_id', 'account_id', 'since_date'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_transactions_by_account" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'budget_id' is set + if ('budget_id' not in params or + params['budget_id'] is None): + raise ValueError("Missing the required parameter `budget_id` when calling `get_transactions_by_account`") # noqa: E501 + # verify the required parameter 'account_id' is set + if ('account_id' not in params or + params['account_id'] is None): + raise ValueError("Missing the required parameter `account_id` when calling `get_transactions_by_account`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'budget_id' in params: + path_params['budget_id'] = params['budget_id'] # noqa: E501 + if 'account_id' in params: + path_params['account_id'] = params['account_id'] # noqa: E501 + + query_params = [] + if 'since_date' in params: + query_params.append(('since_date', params['since_date'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearer'] # noqa: E501 + + return self.api_client.call_api( + '/budgets/{budget_id}/accounts/{account_id}/transactions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TransactionsResponse', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_transactions_by_category(self, budget_id, category_id, **kwargs): # noqa: E501 + """List category transactions # noqa: E501 + + Returns all transactions for a specified category # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_transactions_by_category(budget_id, category_id, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :param str category_id: The ID of the Category. (required) + :param date since_date: Only return transactions on or after this date. + :return: TransactionsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_transactions_by_category_with_http_info(budget_id, category_id, **kwargs) # noqa: E501 + else: + (data) = self.get_transactions_by_category_with_http_info(budget_id, category_id, **kwargs) # noqa: E501 + return data + + def get_transactions_by_category_with_http_info(self, budget_id, category_id, **kwargs): # noqa: E501 + """List category transactions # noqa: E501 + + Returns all transactions for a specified category # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_transactions_by_category_with_http_info(budget_id, category_id, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :param str category_id: The ID of the Category. (required) + :param date since_date: Only return transactions on or after this date. + :return: TransactionsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['budget_id', 'category_id', 'since_date'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_transactions_by_category" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'budget_id' is set + if ('budget_id' not in params or + params['budget_id'] is None): + raise ValueError("Missing the required parameter `budget_id` when calling `get_transactions_by_category`") # noqa: E501 + # verify the required parameter 'category_id' is set + if ('category_id' not in params or + params['category_id'] is None): + raise ValueError("Missing the required parameter `category_id` when calling `get_transactions_by_category`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'budget_id' in params: + path_params['budget_id'] = params['budget_id'] # noqa: E501 + if 'category_id' in params: + path_params['category_id'] = params['category_id'] # noqa: E501 + + query_params = [] + if 'since_date' in params: + query_params.append(('since_date', params['since_date'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearer'] # noqa: E501 + + return self.api_client.call_api( + '/budgets/{budget_id}/categories/{category_id}/transactions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TransactionsResponse', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_transactions_by_id(self, budget_id, transaction_id, **kwargs): # noqa: E501 + """Single transaction # noqa: E501 + + Returns a single transaction # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_transactions_by_id(budget_id, transaction_id, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :param str transaction_id: The ID of the Transaction. (required) + :return: TransactionResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.get_transactions_by_id_with_http_info(budget_id, transaction_id, **kwargs) # noqa: E501 + else: + (data) = self.get_transactions_by_id_with_http_info(budget_id, transaction_id, **kwargs) # noqa: E501 + return data + + def get_transactions_by_id_with_http_info(self, budget_id, transaction_id, **kwargs): # noqa: E501 + """Single transaction # noqa: E501 + + Returns a single transaction # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.get_transactions_by_id_with_http_info(budget_id, transaction_id, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :param str transaction_id: The ID of the Transaction. (required) + :return: TransactionResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['budget_id', 'transaction_id'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_transactions_by_id" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'budget_id' is set + if ('budget_id' not in params or + params['budget_id'] is None): + raise ValueError("Missing the required parameter `budget_id` when calling `get_transactions_by_id`") # noqa: E501 + # verify the required parameter 'transaction_id' is set + if ('transaction_id' not in params or + params['transaction_id'] is None): + raise ValueError("Missing the required parameter `transaction_id` when calling `get_transactions_by_id`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'budget_id' in params: + path_params['budget_id'] = params['budget_id'] # noqa: E501 + if 'transaction_id' in params: + path_params['transaction_id'] = params['transaction_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearer'] # noqa: E501 + + return self.api_client.call_api( + '/budgets/{budget_id}/transactions/{transaction_id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TransactionResponse', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def update_transaction(self, budget_id, transaction_id, transaction, **kwargs): # noqa: E501 + """Updates an existing transaction # noqa: E501 + + Updates a transaction # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.update_transaction(budget_id, transaction_id, transaction, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :param str transaction_id: The ID of the Transaction. (required) + :param SaveTransactionWrapper transaction: The Transaction to update. (required) + :return: TransactionResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async'): + return self.update_transaction_with_http_info(budget_id, transaction_id, transaction, **kwargs) # noqa: E501 + else: + (data) = self.update_transaction_with_http_info(budget_id, transaction_id, transaction, **kwargs) # noqa: E501 + return data + + def update_transaction_with_http_info(self, budget_id, transaction_id, transaction, **kwargs): # noqa: E501 + """Updates an existing transaction # noqa: E501 + + Updates a transaction # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async=True + >>> thread = api.update_transaction_with_http_info(budget_id, transaction_id, transaction, async=True) + >>> result = thread.get() + + :param async bool + :param str budget_id: The ID of the Budget. (required) + :param str transaction_id: The ID of the Transaction. (required) + :param SaveTransactionWrapper transaction: The Transaction to update. (required) + :return: TransactionResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['budget_id', 'transaction_id', 'transaction'] # noqa: E501 + all_params.append('async') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method update_transaction" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'budget_id' is set + if ('budget_id' not in params or + params['budget_id'] is None): + raise ValueError("Missing the required parameter `budget_id` when calling `update_transaction`") # noqa: E501 + # verify the required parameter 'transaction_id' is set + if ('transaction_id' not in params or + params['transaction_id'] is None): + raise ValueError("Missing the required parameter `transaction_id` when calling `update_transaction`") # noqa: E501 + # verify the required parameter 'transaction' is set + if ('transaction' not in params or + params['transaction'] is None): + raise ValueError("Missing the required parameter `transaction` when calling `update_transaction`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'budget_id' in params: + path_params['budget_id'] = params['budget_id'] # noqa: E501 + if 'transaction_id' in params: + path_params['transaction_id'] = params['transaction_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'transaction' in params: + body_params = params['transaction'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['bearer'] # noqa: E501 + + return self.api_client.call_api( + '/budgets/{budget_id}/transactions/{transaction_id}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TransactionResponse', # noqa: E501 + auth_settings=auth_settings, + async=params.get('async'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/ynab-api/ynab_api/api_client.py b/ynab-api/ynab_api/api_client.py new file mode 100644 index 0000000..55984cd --- /dev/null +++ b/ynab-api/ynab_api/api_client.py @@ -0,0 +1,621 @@ +# coding: utf-8 +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import datetime +import json +import mimetypes +from multiprocessing.pool import ThreadPool +import os +import re +import tempfile + +# python 2 and python 3 compatibility library +import six +from six.moves.urllib.parse import quote + +from ynab_api.configuration import Configuration +import ynab_api.models +from ynab_api import rest + + +class ApiClient(object): + """Generic API client for Swagger client library builds. + + Swagger generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the Swagger + templates. + + NOTE: This class is auto generated by the swagger code generator program. + Ref: https://github.com/swagger-api/swagger-codegen + Do not edit the class manually. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int if six.PY3 else long, # noqa: F821 + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + + def __init__(self, configuration=None, header_name=None, header_value=None, + cookie=None): + if configuration is None: + configuration = Configuration() + self.configuration = configuration + + self.pool = ThreadPool() + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'Swagger-Codegen/dev/python' + + def __del__(self): + self.pool.close() + self.pool.join() + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + def __call_api( + self, resource_path, method, path_params=None, + query_params=None, header_params=None, body=None, post_params=None, + files=None, response_type=None, auth_settings=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None): + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict(self.parameters_to_tuples(header_params, + collection_formats)) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples(path_params, + collection_formats) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + query_params = self.parameters_to_tuples(query_params, + collection_formats) + + # post parameters + if post_params or files: + post_params = self.prepare_post_parameters(post_params, files) + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples(post_params, + collection_formats) + + # auth setting + self.update_params_for_auth(header_params, query_params, auth_settings) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + url = self.configuration.host + resource_path + + # perform request and return response + response_data = self.request( + method, url, query_params=query_params, headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + + self.last_response = response_data + + return_data = response_data + if _preload_content: + # deserialize response data + if response_type: + return_data = self.deserialize(response_data, response_type) + else: + return_data = None + + if _return_http_data_only: + return (return_data) + else: + return (return_data, response_data.status, + response_data.getheaders()) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is swagger model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [self.sanitize_for_serialization(sub_obj) + for sub_obj in obj] + elif isinstance(obj, tuple): + return tuple(self.sanitize_for_serialization(sub_obj) + for sub_obj in obj) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + if isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `swagger_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) + for attr, _ in six.iteritems(obj.swagger_types) + if getattr(obj, attr) is not None} + + return {key: self.sanitize_for_serialization(val) + for key, val in six.iteritems(obj_dict)} + + def deserialize(self, response, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + # handle file downloading + # save response body into a tmp file and return the instance + if response_type == "file": + return self.__deserialize_file(response) + + # fetch data from response object + try: + data = json.loads(response.data) + except ValueError: + data = response.data + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if type(klass) == str: + if klass.startswith('list['): + sub_kls = re.match('list\[(.*)\]', klass).group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('dict('): + sub_kls = re.match('dict\(([^,]*), (.*)\)', klass).group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in six.iteritems(data)} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(ynab_api.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datatime(data) + else: + return self.__deserialize_model(data, klass) + + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_type=None, auth_settings=None, async=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None): + """Makes the HTTP request (synchronous) and returns deserialized data. + + To make an async request, set the async parameter. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response: Response data type. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param async bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: + If async parameter is True, + the request will be called asynchronously. + The method will return the request thread. + If parameter async is False or missing, + then the method will return the response directly. + """ + if not async: + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_type, auth_settings, + _return_http_data_only, collection_formats, + _preload_content, _request_timeout) + else: + thread = self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, query_params, + header_params, body, + post_params, files, + response_type, auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, _request_timeout)) + return thread + + def request(self, method, url, query_params=None, headers=None, + post_params=None, body=None, _preload_content=True, + _request_timeout=None): + """Makes the HTTP request using RESTClient.""" + if method == "GET": + return self.rest_client.GET(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "HEAD": + return self.rest_client.HEAD(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "OPTIONS": + return self.rest_client.OPTIONS(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "POST": + return self.rest_client.POST(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PUT": + return self.rest_client.PUT(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PATCH": + return self.rest_client.PATCH(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "DELETE": + return self.rest_client.DELETE(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + else: + raise ValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501 + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def prepare_post_parameters(self, post_params=None, files=None): + """Builds form parameters. + + :param post_params: Normal form parameters. + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + + if post_params: + params = post_params + + if files: + for k, v in six.iteritems(files): + if not v: + continue + file_names = v if type(v) is list else [v] + for n in file_names: + with open(n, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([k, tuple([filename, filedata, mimetype])])) + + return params + + def select_header_accept(self, accepts): + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return + + accepts = [x.lower() for x in accepts] + + if 'application/json' in accepts: + return 'application/json' + else: + return ', '.join(accepts) + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return 'application/json' + + content_types = [x.lower() for x in content_types] + + if 'application/json' in content_types or '*/*' in content_types: + return 'application/json' + else: + return content_types[0] + + def update_params_for_auth(self, headers, querys, auth_settings): + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param querys: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + """ + if not auth_settings: + return + + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + if not auth_setting['value']: + continue + elif auth_setting['in'] == 'header': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + querys.append((auth_setting['key'], auth_setting['value'])) + else: + raise ValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return six.u(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return a original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + from dateutil.parser import parse + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datatime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + from dateutil.parser import parse + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + if not klass.swagger_types and not hasattr(klass, + 'get_real_child_model'): + return data + + kwargs = {} + if klass.swagger_types is not None: + for attr, attr_type in six.iteritems(klass.swagger_types): + if (data is not None and + klass.attribute_map[attr] in data and + isinstance(data, (list, dict))): + value = data[klass.attribute_map[attr]] + kwargs[attr] = self.__deserialize(value, attr_type) + + instance = klass(**kwargs) + + if hasattr(instance, 'get_real_child_model'): + klass_name = instance.get_real_child_model(data) + if klass_name: + instance = self.__deserialize(data, klass_name) + return instance diff --git a/ynab-api/ynab_api/configuration.py b/ynab-api/ynab_api/configuration.py new file mode 100644 index 0000000..2f052ec --- /dev/null +++ b/ynab-api/ynab_api/configuration.py @@ -0,0 +1,247 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import copy +import logging +import multiprocessing +import sys +import urllib3 + +import six +from six.moves import http_client as httplib + + +class TypeWithDefault(type): + def __init__(cls, name, bases, dct): + super(TypeWithDefault, cls).__init__(name, bases, dct) + cls._default = None + + def __call__(cls): + if cls._default is None: + cls._default = type.__call__(cls) + return copy.copy(cls._default) + + def set_default(cls, default): + cls._default = copy.copy(default) + + +class Configuration(six.with_metaclass(TypeWithDefault, object)): + """NOTE: This class is auto generated by the swagger code generator program. + + Ref: https://github.com/swagger-api/swagger-codegen + Do not edit the class manually. + """ + + def __init__(self): + """Constructor""" + # Default Base url + self.host = "https://api.youneedabudget.com/v1" + # Temp file folder for downloading files + self.temp_folder_path = None + + # Authentication Settings + # dict to store API key(s) + self.api_key = {} + # dict to store API prefix (e.g. Bearer) + self.api_key_prefix = {} + # Username for HTTP basic authentication + self.username = "" + # Password for HTTP basic authentication + self.password = "" + + # Logging Settings + self.logger = {} + self.logger["package_logger"] = logging.getLogger("ynab_api") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + # Log format + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + # Log stream handler + self.logger_stream_handler = None + # Log file handler + self.logger_file_handler = None + # Debug file location + self.logger_file = None + # Debug switch + self.debug = False + + # SSL/TLS verification + # Set this to false to skip verifying SSL certificate when calling API + # from https server. + self.verify_ssl = True + # Set this to customize the certificate file to verify the peer. + self.ssl_ca_cert = None + # client certificate file + self.cert_file = None + # client key file + self.key_file = None + # Set this to True/False to enable/disable SSL hostname verification. + self.assert_hostname = None + + # urllib3 connection pool's maximum number of connections saved + # per pool. urllib3 uses 1 connection as default value, but this is + # not the best value when you are making a lot of possibly parallel + # requests to the same host, which is often the case here. + # cpu_count * 5 is used as default value to increase performance. + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + + # Proxy URL + self.proxy = None + # Safe chars for path_param + self.safe_chars_for_path_param = '' + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in six.iteritems(self.logger): + logger.addHandler(self.logger_file_handler) + if self.logger_stream_handler: + logger.removeHandler(self.logger_stream_handler) + else: + # If not set logging file, + # then add stream handler and remove file handler. + self.logger_stream_handler = logging.StreamHandler() + self.logger_stream_handler.setFormatter(self.logger_formatter) + for _, logger in six.iteritems(self.logger): + logger.addHandler(self.logger_stream_handler) + if self.logger_file_handler: + logger.removeHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in six.iteritems(self.logger): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in six.iteritems(self.logger): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :return: The token for api key authentication. + """ + if (self.api_key.get(identifier) and + self.api_key_prefix.get(identifier)): + return self.api_key_prefix[identifier] + ' ' + self.api_key[identifier] # noqa: E501 + elif self.api_key.get(identifier): + return self.api_key[identifier] + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + return urllib3.util.make_headers( + basic_auth=self.username + ':' + self.password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + return { + 'bearer': + { + 'type': 'api_key', + 'in': 'header', + 'key': 'Authorization', + 'value': self.get_api_key_with_prefix('Authorization') + }, + + } + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 1.0.0\n"\ + "SDK Package Version: dev".\ + format(env=sys.platform, pyversion=sys.version) diff --git a/ynab-api/ynab_api/models/__init__.py b/ynab-api/ynab_api/models/__init__.py new file mode 100644 index 0000000..c70ed5b --- /dev/null +++ b/ynab-api/ynab_api/models/__init__.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +# flake8: noqa +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +# import models into model package +from ynab_api.models.account import Account +from ynab_api.models.account_response import AccountResponse +from ynab_api.models.account_wrapper import AccountWrapper +from ynab_api.models.accounts_response import AccountsResponse +from ynab_api.models.accounts_wrapper import AccountsWrapper +from ynab_api.models.budget_detail_response import BudgetDetailResponse +from ynab_api.models.budget_detail_wrapper import BudgetDetailWrapper +from ynab_api.models.budget_summary import BudgetSummary +from ynab_api.models.budget_summary_response import BudgetSummaryResponse +from ynab_api.models.budget_summary_wrapper import BudgetSummaryWrapper +from ynab_api.models.bulk_id_wrapper import BulkIdWrapper +from ynab_api.models.bulk_ids import BulkIds +from ynab_api.models.bulk_response import BulkResponse +from ynab_api.models.bulk_transactions import BulkTransactions +from ynab_api.models.categories_response import CategoriesResponse +from ynab_api.models.category import Category +from ynab_api.models.category_group import CategoryGroup +from ynab_api.models.category_groups_wrapper import CategoryGroupsWrapper +from ynab_api.models.category_response import CategoryResponse +from ynab_api.models.category_wrapper import CategoryWrapper +from ynab_api.models.currency_format import CurrencyFormat +from ynab_api.models.date_format import DateFormat +from ynab_api.models.error_detail import ErrorDetail +from ynab_api.models.error_response import ErrorResponse +from ynab_api.models.month_detail_response import MonthDetailResponse +from ynab_api.models.month_detail_wrapper import MonthDetailWrapper +from ynab_api.models.month_summaries_response import MonthSummariesResponse +from ynab_api.models.month_summaries_wrapper import MonthSummariesWrapper +from ynab_api.models.month_summary import MonthSummary +from ynab_api.models.payee import Payee +from ynab_api.models.payee_location import PayeeLocation +from ynab_api.models.payee_location_response import PayeeLocationResponse +from ynab_api.models.payee_location_wrapper import PayeeLocationWrapper +from ynab_api.models.payee_locations_response import PayeeLocationsResponse +from ynab_api.models.payee_locations_wrapper import PayeeLocationsWrapper +from ynab_api.models.payee_response import PayeeResponse +from ynab_api.models.payee_wrapper import PayeeWrapper +from ynab_api.models.payees_response import PayeesResponse +from ynab_api.models.payees_wrapper import PayeesWrapper +from ynab_api.models.save_transaction import SaveTransaction +from ynab_api.models.save_transaction_wrapper import SaveTransactionWrapper +from ynab_api.models.scheduled_sub_transaction import ScheduledSubTransaction +from ynab_api.models.scheduled_transaction_response import ScheduledTransactionResponse +from ynab_api.models.scheduled_transaction_summary import ScheduledTransactionSummary +from ynab_api.models.scheduled_transaction_wrapper import ScheduledTransactionWrapper +from ynab_api.models.scheduled_transactions_response import ScheduledTransactionsResponse +from ynab_api.models.scheduled_transactions_wrapper import ScheduledTransactionsWrapper +from ynab_api.models.sub_transaction import SubTransaction +from ynab_api.models.transaction_response import TransactionResponse +from ynab_api.models.transaction_summary import TransactionSummary +from ynab_api.models.transaction_wrapper import TransactionWrapper +from ynab_api.models.transactions_response import TransactionsResponse +from ynab_api.models.transactions_wrapper import TransactionsWrapper +from ynab_api.models.budget_detail import BudgetDetail +from ynab_api.models.category_group_with_categories import CategoryGroupWithCategories +from ynab_api.models.month_detail import MonthDetail +from ynab_api.models.scheduled_transaction_detail import ScheduledTransactionDetail +from ynab_api.models.transaction_detail import TransactionDetail diff --git a/ynab-api/ynab_api/models/account.py b/ynab-api/ynab_api/models/account.py new file mode 100644 index 0000000..f87af8f --- /dev/null +++ b/ynab-api/ynab_api/models/account.py @@ -0,0 +1,318 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class Account(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'name': 'str', + 'type': 'str', + 'on_budget': 'bool', + 'closed': 'bool', + 'balance': 'float', + 'cleared_balance': 'float', + 'uncleared_balance': 'float' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'type': 'type', + 'on_budget': 'on_budget', + 'closed': 'closed', + 'balance': 'balance', + 'cleared_balance': 'cleared_balance', + 'uncleared_balance': 'uncleared_balance' + } + + def __init__(self, id=None, name=None, type=None, on_budget=None, closed=None, balance=None, cleared_balance=None, uncleared_balance=None): # noqa: E501 + """Account - a model defined in Swagger""" # noqa: E501 + + self._id = None + self._name = None + self._type = None + self._on_budget = None + self._closed = None + self._balance = None + self._cleared_balance = None + self._uncleared_balance = None + self.discriminator = None + + self.id = id + self.name = name + self.type = type + self.on_budget = on_budget + self.closed = closed + self.balance = balance + self.cleared_balance = cleared_balance + self.uncleared_balance = uncleared_balance + + @property + def id(self): + """Gets the id of this Account. # noqa: E501 + + + :return: The id of this Account. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Account. + + + :param id: The id of this Account. # noqa: E501 + :type: str + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def name(self): + """Gets the name of this Account. # noqa: E501 + + + :return: The name of this Account. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Account. + + + :param name: The name of this Account. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def type(self): + """Gets the type of this Account. # noqa: E501 + + + :return: The type of this Account. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this Account. + + + :param type: The type of this Account. # noqa: E501 + :type: str + """ + if type is None: + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + allowed_values = ["checking", "savings", "creditCard"] # noqa: E501 + if type not in allowed_values: + raise ValueError( + "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 + .format(type, allowed_values) + ) + + self._type = type + + @property + def on_budget(self): + """Gets the on_budget of this Account. # noqa: E501 + + Whether this account is on budget or not # noqa: E501 + + :return: The on_budget of this Account. # noqa: E501 + :rtype: bool + """ + return self._on_budget + + @on_budget.setter + def on_budget(self, on_budget): + """Sets the on_budget of this Account. + + Whether this account is on budget or not # noqa: E501 + + :param on_budget: The on_budget of this Account. # noqa: E501 + :type: bool + """ + if on_budget is None: + raise ValueError("Invalid value for `on_budget`, must not be `None`") # noqa: E501 + + self._on_budget = on_budget + + @property + def closed(self): + """Gets the closed of this Account. # noqa: E501 + + Whether this account is closed or not # noqa: E501 + + :return: The closed of this Account. # noqa: E501 + :rtype: bool + """ + return self._closed + + @closed.setter + def closed(self, closed): + """Sets the closed of this Account. + + Whether this account is closed or not # noqa: E501 + + :param closed: The closed of this Account. # noqa: E501 + :type: bool + """ + if closed is None: + raise ValueError("Invalid value for `closed`, must not be `None`") # noqa: E501 + + self._closed = closed + + @property + def balance(self): + """Gets the balance of this Account. # noqa: E501 + + The current balance of the account in milliunits format # noqa: E501 + + :return: The balance of this Account. # noqa: E501 + :rtype: float + """ + return self._balance + + @balance.setter + def balance(self, balance): + """Sets the balance of this Account. + + The current balance of the account in milliunits format # noqa: E501 + + :param balance: The balance of this Account. # noqa: E501 + :type: float + """ + if balance is None: + raise ValueError("Invalid value for `balance`, must not be `None`") # noqa: E501 + + self._balance = balance + + @property + def cleared_balance(self): + """Gets the cleared_balance of this Account. # noqa: E501 + + The current cleared balance of the account in milliunits format # noqa: E501 + + :return: The cleared_balance of this Account. # noqa: E501 + :rtype: float + """ + return self._cleared_balance + + @cleared_balance.setter + def cleared_balance(self, cleared_balance): + """Sets the cleared_balance of this Account. + + The current cleared balance of the account in milliunits format # noqa: E501 + + :param cleared_balance: The cleared_balance of this Account. # noqa: E501 + :type: float + """ + if cleared_balance is None: + raise ValueError("Invalid value for `cleared_balance`, must not be `None`") # noqa: E501 + + self._cleared_balance = cleared_balance + + @property + def uncleared_balance(self): + """Gets the uncleared_balance of this Account. # noqa: E501 + + The current uncleared balance of the account in milliunits format # noqa: E501 + + :return: The uncleared_balance of this Account. # noqa: E501 + :rtype: float + """ + return self._uncleared_balance + + @uncleared_balance.setter + def uncleared_balance(self, uncleared_balance): + """Sets the uncleared_balance of this Account. + + The current uncleared balance of the account in milliunits format # noqa: E501 + + :param uncleared_balance: The uncleared_balance of this Account. # noqa: E501 + :type: float + """ + if uncleared_balance is None: + raise ValueError("Invalid value for `uncleared_balance`, must not be `None`") # noqa: E501 + + self._uncleared_balance = uncleared_balance + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Account): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/account_response.py b/ynab-api/ynab_api/models/account_response.py new file mode 100644 index 0000000..b88cd5b --- /dev/null +++ b/ynab-api/ynab_api/models/account_response.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.account_wrapper import AccountWrapper # noqa: F401,E501 + + +class AccountResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'AccountWrapper' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): # noqa: E501 + """AccountResponse - a model defined in Swagger""" # noqa: E501 + + self._data = None + self.discriminator = None + + self.data = data + + @property + def data(self): + """Gets the data of this AccountResponse. # noqa: E501 + + + :return: The data of this AccountResponse. # noqa: E501 + :rtype: AccountWrapper + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this AccountResponse. + + + :param data: The data of this AccountResponse. # noqa: E501 + :type: AccountWrapper + """ + if data is None: + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AccountResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/account_wrapper.py b/ynab-api/ynab_api/models/account_wrapper.py new file mode 100644 index 0000000..1e0e0ad --- /dev/null +++ b/ynab-api/ynab_api/models/account_wrapper.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.account import Account # noqa: F401,E501 + + +class AccountWrapper(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'account': 'Account' + } + + attribute_map = { + 'account': 'account' + } + + def __init__(self, account=None): # noqa: E501 + """AccountWrapper - a model defined in Swagger""" # noqa: E501 + + self._account = None + self.discriminator = None + + self.account = account + + @property + def account(self): + """Gets the account of this AccountWrapper. # noqa: E501 + + + :return: The account of this AccountWrapper. # noqa: E501 + :rtype: Account + """ + return self._account + + @account.setter + def account(self, account): + """Sets the account of this AccountWrapper. + + + :param account: The account of this AccountWrapper. # noqa: E501 + :type: Account + """ + if account is None: + raise ValueError("Invalid value for `account`, must not be `None`") # noqa: E501 + + self._account = account + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AccountWrapper): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/accounts_response.py b/ynab-api/ynab_api/models/accounts_response.py new file mode 100644 index 0000000..e231d1c --- /dev/null +++ b/ynab-api/ynab_api/models/accounts_response.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.accounts_wrapper import AccountsWrapper # noqa: F401,E501 + + +class AccountsResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'AccountsWrapper' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): # noqa: E501 + """AccountsResponse - a model defined in Swagger""" # noqa: E501 + + self._data = None + self.discriminator = None + + self.data = data + + @property + def data(self): + """Gets the data of this AccountsResponse. # noqa: E501 + + + :return: The data of this AccountsResponse. # noqa: E501 + :rtype: AccountsWrapper + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this AccountsResponse. + + + :param data: The data of this AccountsResponse. # noqa: E501 + :type: AccountsWrapper + """ + if data is None: + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AccountsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/accounts_wrapper.py b/ynab-api/ynab_api/models/accounts_wrapper.py new file mode 100644 index 0000000..3ce551d --- /dev/null +++ b/ynab-api/ynab_api/models/accounts_wrapper.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.account import Account # noqa: F401,E501 + + +class AccountsWrapper(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'accounts': 'list[Account]' + } + + attribute_map = { + 'accounts': 'accounts' + } + + def __init__(self, accounts=None): # noqa: E501 + """AccountsWrapper - a model defined in Swagger""" # noqa: E501 + + self._accounts = None + self.discriminator = None + + self.accounts = accounts + + @property + def accounts(self): + """Gets the accounts of this AccountsWrapper. # noqa: E501 + + + :return: The accounts of this AccountsWrapper. # noqa: E501 + :rtype: list[Account] + """ + return self._accounts + + @accounts.setter + def accounts(self, accounts): + """Sets the accounts of this AccountsWrapper. + + + :param accounts: The accounts of this AccountsWrapper. # noqa: E501 + :type: list[Account] + """ + if accounts is None: + raise ValueError("Invalid value for `accounts`, must not be `None`") # noqa: E501 + + self._accounts = accounts + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AccountsWrapper): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/budget_detail.py b/ynab-api/ynab_api/models/budget_detail.py new file mode 100644 index 0000000..773dd30 --- /dev/null +++ b/ynab-api/ynab_api/models/budget_detail.py @@ -0,0 +1,466 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.account import Account # noqa: F401,E501 +from ynab_api.models.budget_summary import BudgetSummary # noqa: F401,E501 +from ynab_api.models.category import Category # noqa: F401,E501 +from ynab_api.models.category_group import CategoryGroup # noqa: F401,E501 +from ynab_api.models.currency_format import CurrencyFormat # noqa: F401,E501 +from ynab_api.models.date_format import DateFormat # noqa: F401,E501 +from ynab_api.models.month_detail import MonthDetail # noqa: F401,E501 +from ynab_api.models.payee import Payee # noqa: F401,E501 +from ynab_api.models.payee_location import PayeeLocation # noqa: F401,E501 +from ynab_api.models.scheduled_sub_transaction import ScheduledSubTransaction # noqa: F401,E501 +from ynab_api.models.scheduled_transaction_summary import ScheduledTransactionSummary # noqa: F401,E501 +from ynab_api.models.sub_transaction import SubTransaction # noqa: F401,E501 +from ynab_api.models.transaction_summary import TransactionSummary # noqa: F401,E501 + + +class BudgetDetail(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'name': 'str', + 'date_format': 'DateFormat', + 'currency_format': 'CurrencyFormat', + 'accounts': 'list[Account]', + 'payees': 'list[Payee]', + 'payee_locations': 'list[PayeeLocation]', + 'category_groups': 'list[CategoryGroup]', + 'categories': 'list[Category]', + 'months': 'list[MonthDetail]', + 'transactions': 'list[TransactionSummary]', + 'subtransactions': 'list[SubTransaction]', + 'scheduled_transactions': 'list[ScheduledTransactionSummary]', + 'scheduled_subtransactions': 'list[ScheduledSubTransaction]' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'date_format': 'date_format', + 'currency_format': 'currency_format', + 'accounts': 'accounts', + 'payees': 'payees', + 'payee_locations': 'payee_locations', + 'category_groups': 'category_groups', + 'categories': 'categories', + 'months': 'months', + 'transactions': 'transactions', + 'subtransactions': 'subtransactions', + 'scheduled_transactions': 'scheduled_transactions', + 'scheduled_subtransactions': 'scheduled_subtransactions' + } + + def __init__(self, id=None, name=None, date_format=None, currency_format=None, accounts=None, payees=None, payee_locations=None, category_groups=None, categories=None, months=None, transactions=None, subtransactions=None, scheduled_transactions=None, scheduled_subtransactions=None): # noqa: E501 + """BudgetDetail - a model defined in Swagger""" # noqa: E501 + + self._id = None + self._name = None + self._date_format = None + self._currency_format = None + self._accounts = None + self._payees = None + self._payee_locations = None + self._category_groups = None + self._categories = None + self._months = None + self._transactions = None + self._subtransactions = None + self._scheduled_transactions = None + self._scheduled_subtransactions = None + self.discriminator = None + + self.id = id + self.name = name + if date_format is not None: + self.date_format = date_format + if currency_format is not None: + self.currency_format = currency_format + if accounts is not None: + self.accounts = accounts + if payees is not None: + self.payees = payees + if payee_locations is not None: + self.payee_locations = payee_locations + if category_groups is not None: + self.category_groups = category_groups + if categories is not None: + self.categories = categories + if months is not None: + self.months = months + if transactions is not None: + self.transactions = transactions + if subtransactions is not None: + self.subtransactions = subtransactions + if scheduled_transactions is not None: + self.scheduled_transactions = scheduled_transactions + if scheduled_subtransactions is not None: + self.scheduled_subtransactions = scheduled_subtransactions + + @property + def id(self): + """Gets the id of this BudgetDetail. # noqa: E501 + + + :return: The id of this BudgetDetail. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this BudgetDetail. + + + :param id: The id of this BudgetDetail. # noqa: E501 + :type: str + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def name(self): + """Gets the name of this BudgetDetail. # noqa: E501 + + + :return: The name of this BudgetDetail. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this BudgetDetail. + + + :param name: The name of this BudgetDetail. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def date_format(self): + """Gets the date_format of this BudgetDetail. # noqa: E501 + + + :return: The date_format of this BudgetDetail. # noqa: E501 + :rtype: DateFormat + """ + return self._date_format + + @date_format.setter + def date_format(self, date_format): + """Sets the date_format of this BudgetDetail. + + + :param date_format: The date_format of this BudgetDetail. # noqa: E501 + :type: DateFormat + """ + + self._date_format = date_format + + @property + def currency_format(self): + """Gets the currency_format of this BudgetDetail. # noqa: E501 + + + :return: The currency_format of this BudgetDetail. # noqa: E501 + :rtype: CurrencyFormat + """ + return self._currency_format + + @currency_format.setter + def currency_format(self, currency_format): + """Sets the currency_format of this BudgetDetail. + + + :param currency_format: The currency_format of this BudgetDetail. # noqa: E501 + :type: CurrencyFormat + """ + + self._currency_format = currency_format + + @property + def accounts(self): + """Gets the accounts of this BudgetDetail. # noqa: E501 + + + :return: The accounts of this BudgetDetail. # noqa: E501 + :rtype: list[Account] + """ + return self._accounts + + @accounts.setter + def accounts(self, accounts): + """Sets the accounts of this BudgetDetail. + + + :param accounts: The accounts of this BudgetDetail. # noqa: E501 + :type: list[Account] + """ + + self._accounts = accounts + + @property + def payees(self): + """Gets the payees of this BudgetDetail. # noqa: E501 + + + :return: The payees of this BudgetDetail. # noqa: E501 + :rtype: list[Payee] + """ + return self._payees + + @payees.setter + def payees(self, payees): + """Sets the payees of this BudgetDetail. + + + :param payees: The payees of this BudgetDetail. # noqa: E501 + :type: list[Payee] + """ + + self._payees = payees + + @property + def payee_locations(self): + """Gets the payee_locations of this BudgetDetail. # noqa: E501 + + + :return: The payee_locations of this BudgetDetail. # noqa: E501 + :rtype: list[PayeeLocation] + """ + return self._payee_locations + + @payee_locations.setter + def payee_locations(self, payee_locations): + """Sets the payee_locations of this BudgetDetail. + + + :param payee_locations: The payee_locations of this BudgetDetail. # noqa: E501 + :type: list[PayeeLocation] + """ + + self._payee_locations = payee_locations + + @property + def category_groups(self): + """Gets the category_groups of this BudgetDetail. # noqa: E501 + + + :return: The category_groups of this BudgetDetail. # noqa: E501 + :rtype: list[CategoryGroup] + """ + return self._category_groups + + @category_groups.setter + def category_groups(self, category_groups): + """Sets the category_groups of this BudgetDetail. + + + :param category_groups: The category_groups of this BudgetDetail. # noqa: E501 + :type: list[CategoryGroup] + """ + + self._category_groups = category_groups + + @property + def categories(self): + """Gets the categories of this BudgetDetail. # noqa: E501 + + + :return: The categories of this BudgetDetail. # noqa: E501 + :rtype: list[Category] + """ + return self._categories + + @categories.setter + def categories(self, categories): + """Sets the categories of this BudgetDetail. + + + :param categories: The categories of this BudgetDetail. # noqa: E501 + :type: list[Category] + """ + + self._categories = categories + + @property + def months(self): + """Gets the months of this BudgetDetail. # noqa: E501 + + + :return: The months of this BudgetDetail. # noqa: E501 + :rtype: list[MonthDetail] + """ + return self._months + + @months.setter + def months(self, months): + """Sets the months of this BudgetDetail. + + + :param months: The months of this BudgetDetail. # noqa: E501 + :type: list[MonthDetail] + """ + + self._months = months + + @property + def transactions(self): + """Gets the transactions of this BudgetDetail. # noqa: E501 + + + :return: The transactions of this BudgetDetail. # noqa: E501 + :rtype: list[TransactionSummary] + """ + return self._transactions + + @transactions.setter + def transactions(self, transactions): + """Sets the transactions of this BudgetDetail. + + + :param transactions: The transactions of this BudgetDetail. # noqa: E501 + :type: list[TransactionSummary] + """ + + self._transactions = transactions + + @property + def subtransactions(self): + """Gets the subtransactions of this BudgetDetail. # noqa: E501 + + + :return: The subtransactions of this BudgetDetail. # noqa: E501 + :rtype: list[SubTransaction] + """ + return self._subtransactions + + @subtransactions.setter + def subtransactions(self, subtransactions): + """Sets the subtransactions of this BudgetDetail. + + + :param subtransactions: The subtransactions of this BudgetDetail. # noqa: E501 + :type: list[SubTransaction] + """ + + self._subtransactions = subtransactions + + @property + def scheduled_transactions(self): + """Gets the scheduled_transactions of this BudgetDetail. # noqa: E501 + + + :return: The scheduled_transactions of this BudgetDetail. # noqa: E501 + :rtype: list[ScheduledTransactionSummary] + """ + return self._scheduled_transactions + + @scheduled_transactions.setter + def scheduled_transactions(self, scheduled_transactions): + """Sets the scheduled_transactions of this BudgetDetail. + + + :param scheduled_transactions: The scheduled_transactions of this BudgetDetail. # noqa: E501 + :type: list[ScheduledTransactionSummary] + """ + + self._scheduled_transactions = scheduled_transactions + + @property + def scheduled_subtransactions(self): + """Gets the scheduled_subtransactions of this BudgetDetail. # noqa: E501 + + + :return: The scheduled_subtransactions of this BudgetDetail. # noqa: E501 + :rtype: list[ScheduledSubTransaction] + """ + return self._scheduled_subtransactions + + @scheduled_subtransactions.setter + def scheduled_subtransactions(self, scheduled_subtransactions): + """Sets the scheduled_subtransactions of this BudgetDetail. + + + :param scheduled_subtransactions: The scheduled_subtransactions of this BudgetDetail. # noqa: E501 + :type: list[ScheduledSubTransaction] + """ + + self._scheduled_subtransactions = scheduled_subtransactions + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BudgetDetail): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/budget_detail_response.py b/ynab-api/ynab_api/models/budget_detail_response.py new file mode 100644 index 0000000..eca4ee8 --- /dev/null +++ b/ynab-api/ynab_api/models/budget_detail_response.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.budget_detail_wrapper import BudgetDetailWrapper # noqa: F401,E501 + + +class BudgetDetailResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'BudgetDetailWrapper' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): # noqa: E501 + """BudgetDetailResponse - a model defined in Swagger""" # noqa: E501 + + self._data = None + self.discriminator = None + + self.data = data + + @property + def data(self): + """Gets the data of this BudgetDetailResponse. # noqa: E501 + + + :return: The data of this BudgetDetailResponse. # noqa: E501 + :rtype: BudgetDetailWrapper + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this BudgetDetailResponse. + + + :param data: The data of this BudgetDetailResponse. # noqa: E501 + :type: BudgetDetailWrapper + """ + if data is None: + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BudgetDetailResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/budget_detail_wrapper.py b/ynab-api/ynab_api/models/budget_detail_wrapper.py new file mode 100644 index 0000000..6cd3fa2 --- /dev/null +++ b/ynab-api/ynab_api/models/budget_detail_wrapper.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.budget_detail import BudgetDetail # noqa: F401,E501 + + +class BudgetDetailWrapper(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'budget': 'BudgetDetail', + 'server_knowledge': 'float' + } + + attribute_map = { + 'budget': 'budget', + 'server_knowledge': 'server_knowledge' + } + + def __init__(self, budget=None, server_knowledge=None): # noqa: E501 + """BudgetDetailWrapper - a model defined in Swagger""" # noqa: E501 + + self._budget = None + self._server_knowledge = None + self.discriminator = None + + self.budget = budget + self.server_knowledge = server_knowledge + + @property + def budget(self): + """Gets the budget of this BudgetDetailWrapper. # noqa: E501 + + + :return: The budget of this BudgetDetailWrapper. # noqa: E501 + :rtype: BudgetDetail + """ + return self._budget + + @budget.setter + def budget(self, budget): + """Sets the budget of this BudgetDetailWrapper. + + + :param budget: The budget of this BudgetDetailWrapper. # noqa: E501 + :type: BudgetDetail + """ + if budget is None: + raise ValueError("Invalid value for `budget`, must not be `None`") # noqa: E501 + + self._budget = budget + + @property + def server_knowledge(self): + """Gets the server_knowledge of this BudgetDetailWrapper. # noqa: E501 + + The knowledge of the server # noqa: E501 + + :return: The server_knowledge of this BudgetDetailWrapper. # noqa: E501 + :rtype: float + """ + return self._server_knowledge + + @server_knowledge.setter + def server_knowledge(self, server_knowledge): + """Sets the server_knowledge of this BudgetDetailWrapper. + + The knowledge of the server # noqa: E501 + + :param server_knowledge: The server_knowledge of this BudgetDetailWrapper. # noqa: E501 + :type: float + """ + if server_knowledge is None: + raise ValueError("Invalid value for `server_knowledge`, must not be `None`") # noqa: E501 + + self._server_knowledge = server_knowledge + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BudgetDetailWrapper): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/budget_summary.py b/ynab-api/ynab_api/models/budget_summary.py new file mode 100644 index 0000000..b7b7041 --- /dev/null +++ b/ynab-api/ynab_api/models/budget_summary.py @@ -0,0 +1,195 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.currency_format import CurrencyFormat # noqa: F401,E501 +from ynab_api.models.date_format import DateFormat # noqa: F401,E501 + + +class BudgetSummary(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'name': 'str', + 'date_format': 'DateFormat', + 'currency_format': 'CurrencyFormat' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'date_format': 'date_format', + 'currency_format': 'currency_format' + } + + def __init__(self, id=None, name=None, date_format=None, currency_format=None): # noqa: E501 + """BudgetSummary - a model defined in Swagger""" # noqa: E501 + + self._id = None + self._name = None + self._date_format = None + self._currency_format = None + self.discriminator = None + + self.id = id + self.name = name + if date_format is not None: + self.date_format = date_format + if currency_format is not None: + self.currency_format = currency_format + + @property + def id(self): + """Gets the id of this BudgetSummary. # noqa: E501 + + + :return: The id of this BudgetSummary. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this BudgetSummary. + + + :param id: The id of this BudgetSummary. # noqa: E501 + :type: str + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def name(self): + """Gets the name of this BudgetSummary. # noqa: E501 + + + :return: The name of this BudgetSummary. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this BudgetSummary. + + + :param name: The name of this BudgetSummary. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def date_format(self): + """Gets the date_format of this BudgetSummary. # noqa: E501 + + + :return: The date_format of this BudgetSummary. # noqa: E501 + :rtype: DateFormat + """ + return self._date_format + + @date_format.setter + def date_format(self, date_format): + """Sets the date_format of this BudgetSummary. + + + :param date_format: The date_format of this BudgetSummary. # noqa: E501 + :type: DateFormat + """ + + self._date_format = date_format + + @property + def currency_format(self): + """Gets the currency_format of this BudgetSummary. # noqa: E501 + + + :return: The currency_format of this BudgetSummary. # noqa: E501 + :rtype: CurrencyFormat + """ + return self._currency_format + + @currency_format.setter + def currency_format(self, currency_format): + """Sets the currency_format of this BudgetSummary. + + + :param currency_format: The currency_format of this BudgetSummary. # noqa: E501 + :type: CurrencyFormat + """ + + self._currency_format = currency_format + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BudgetSummary): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/budget_summary_response.py b/ynab-api/ynab_api/models/budget_summary_response.py new file mode 100644 index 0000000..e230f51 --- /dev/null +++ b/ynab-api/ynab_api/models/budget_summary_response.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.budget_summary_wrapper import BudgetSummaryWrapper # noqa: F401,E501 + + +class BudgetSummaryResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'BudgetSummaryWrapper' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): # noqa: E501 + """BudgetSummaryResponse - a model defined in Swagger""" # noqa: E501 + + self._data = None + self.discriminator = None + + self.data = data + + @property + def data(self): + """Gets the data of this BudgetSummaryResponse. # noqa: E501 + + + :return: The data of this BudgetSummaryResponse. # noqa: E501 + :rtype: BudgetSummaryWrapper + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this BudgetSummaryResponse. + + + :param data: The data of this BudgetSummaryResponse. # noqa: E501 + :type: BudgetSummaryWrapper + """ + if data is None: + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BudgetSummaryResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/budget_summary_wrapper.py b/ynab-api/ynab_api/models/budget_summary_wrapper.py new file mode 100644 index 0000000..47b4566 --- /dev/null +++ b/ynab-api/ynab_api/models/budget_summary_wrapper.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.budget_summary import BudgetSummary # noqa: F401,E501 + + +class BudgetSummaryWrapper(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'budgets': 'list[BudgetSummary]' + } + + attribute_map = { + 'budgets': 'budgets' + } + + def __init__(self, budgets=None): # noqa: E501 + """BudgetSummaryWrapper - a model defined in Swagger""" # noqa: E501 + + self._budgets = None + self.discriminator = None + + self.budgets = budgets + + @property + def budgets(self): + """Gets the budgets of this BudgetSummaryWrapper. # noqa: E501 + + + :return: The budgets of this BudgetSummaryWrapper. # noqa: E501 + :rtype: list[BudgetSummary] + """ + return self._budgets + + @budgets.setter + def budgets(self, budgets): + """Sets the budgets of this BudgetSummaryWrapper. + + + :param budgets: The budgets of this BudgetSummaryWrapper. # noqa: E501 + :type: list[BudgetSummary] + """ + if budgets is None: + raise ValueError("Invalid value for `budgets`, must not be `None`") # noqa: E501 + + self._budgets = budgets + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BudgetSummaryWrapper): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/bulk_id_wrapper.py b/ynab-api/ynab_api/models/bulk_id_wrapper.py new file mode 100644 index 0000000..aa89216 --- /dev/null +++ b/ynab-api/ynab_api/models/bulk_id_wrapper.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.bulk_ids import BulkIds # noqa: F401,E501 + + +class BulkIdWrapper(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'bulk': 'BulkIds' + } + + attribute_map = { + 'bulk': 'bulk' + } + + def __init__(self, bulk=None): # noqa: E501 + """BulkIdWrapper - a model defined in Swagger""" # noqa: E501 + + self._bulk = None + self.discriminator = None + + self.bulk = bulk + + @property + def bulk(self): + """Gets the bulk of this BulkIdWrapper. # noqa: E501 + + + :return: The bulk of this BulkIdWrapper. # noqa: E501 + :rtype: BulkIds + """ + return self._bulk + + @bulk.setter + def bulk(self, bulk): + """Sets the bulk of this BulkIdWrapper. + + + :param bulk: The bulk of this BulkIdWrapper. # noqa: E501 + :type: BulkIds + """ + if bulk is None: + raise ValueError("Invalid value for `bulk`, must not be `None`") # noqa: E501 + + self._bulk = bulk + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BulkIdWrapper): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/bulk_ids.py b/ynab-api/ynab_api/models/bulk_ids.py new file mode 100644 index 0000000..7c45c3d --- /dev/null +++ b/ynab-api/ynab_api/models/bulk_ids.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class BulkIds(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'transaction_ids': 'list[str]', + 'duplicate_import_ids': 'list[str]' + } + + attribute_map = { + 'transaction_ids': 'transaction_ids', + 'duplicate_import_ids': 'duplicate_import_ids' + } + + def __init__(self, transaction_ids=None, duplicate_import_ids=None): # noqa: E501 + """BulkIds - a model defined in Swagger""" # noqa: E501 + + self._transaction_ids = None + self._duplicate_import_ids = None + self.discriminator = None + + self.transaction_ids = transaction_ids + self.duplicate_import_ids = duplicate_import_ids + + @property + def transaction_ids(self): + """Gets the transaction_ids of this BulkIds. # noqa: E501 + + The list of Transaction IDs that were created. # noqa: E501 + + :return: The transaction_ids of this BulkIds. # noqa: E501 + :rtype: list[str] + """ + return self._transaction_ids + + @transaction_ids.setter + def transaction_ids(self, transaction_ids): + """Sets the transaction_ids of this BulkIds. + + The list of Transaction IDs that were created. # noqa: E501 + + :param transaction_ids: The transaction_ids of this BulkIds. # noqa: E501 + :type: list[str] + """ + if transaction_ids is None: + raise ValueError("Invalid value for `transaction_ids`, must not be `None`") # noqa: E501 + + self._transaction_ids = transaction_ids + + @property + def duplicate_import_ids(self): + """Gets the duplicate_import_ids of this BulkIds. # noqa: E501 + + If any Transactions were not created because they had an import_id matching a transaction already on the same account, the specified import_id(s) will be included in this list. # noqa: E501 + + :return: The duplicate_import_ids of this BulkIds. # noqa: E501 + :rtype: list[str] + """ + return self._duplicate_import_ids + + @duplicate_import_ids.setter + def duplicate_import_ids(self, duplicate_import_ids): + """Sets the duplicate_import_ids of this BulkIds. + + If any Transactions were not created because they had an import_id matching a transaction already on the same account, the specified import_id(s) will be included in this list. # noqa: E501 + + :param duplicate_import_ids: The duplicate_import_ids of this BulkIds. # noqa: E501 + :type: list[str] + """ + if duplicate_import_ids is None: + raise ValueError("Invalid value for `duplicate_import_ids`, must not be `None`") # noqa: E501 + + self._duplicate_import_ids = duplicate_import_ids + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BulkIds): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/bulk_response.py b/ynab-api/ynab_api/models/bulk_response.py new file mode 100644 index 0000000..bcd4bc2 --- /dev/null +++ b/ynab-api/ynab_api/models/bulk_response.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.bulk_id_wrapper import BulkIdWrapper # noqa: F401,E501 + + +class BulkResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'BulkIdWrapper' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): # noqa: E501 + """BulkResponse - a model defined in Swagger""" # noqa: E501 + + self._data = None + self.discriminator = None + + self.data = data + + @property + def data(self): + """Gets the data of this BulkResponse. # noqa: E501 + + + :return: The data of this BulkResponse. # noqa: E501 + :rtype: BulkIdWrapper + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this BulkResponse. + + + :param data: The data of this BulkResponse. # noqa: E501 + :type: BulkIdWrapper + """ + if data is None: + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BulkResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/bulk_transactions.py b/ynab-api/ynab_api/models/bulk_transactions.py new file mode 100644 index 0000000..24277ed --- /dev/null +++ b/ynab-api/ynab_api/models/bulk_transactions.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.save_transaction import SaveTransaction # noqa: F401,E501 + + +class BulkTransactions(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'transactions': 'list[SaveTransaction]' + } + + attribute_map = { + 'transactions': 'transactions' + } + + def __init__(self, transactions=None): # noqa: E501 + """BulkTransactions - a model defined in Swagger""" # noqa: E501 + + self._transactions = None + self.discriminator = None + + self.transactions = transactions + + @property + def transactions(self): + """Gets the transactions of this BulkTransactions. # noqa: E501 + + + :return: The transactions of this BulkTransactions. # noqa: E501 + :rtype: list[SaveTransaction] + """ + return self._transactions + + @transactions.setter + def transactions(self, transactions): + """Sets the transactions of this BulkTransactions. + + + :param transactions: The transactions of this BulkTransactions. # noqa: E501 + :type: list[SaveTransaction] + """ + if transactions is None: + raise ValueError("Invalid value for `transactions`, must not be `None`") # noqa: E501 + + self._transactions = transactions + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BulkTransactions): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/categories_response.py b/ynab-api/ynab_api/models/categories_response.py new file mode 100644 index 0000000..b940c2b --- /dev/null +++ b/ynab-api/ynab_api/models/categories_response.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.category_groups_wrapper import CategoryGroupsWrapper # noqa: F401,E501 + + +class CategoriesResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'CategoryGroupsWrapper' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): # noqa: E501 + """CategoriesResponse - a model defined in Swagger""" # noqa: E501 + + self._data = None + self.discriminator = None + + self.data = data + + @property + def data(self): + """Gets the data of this CategoriesResponse. # noqa: E501 + + + :return: The data of this CategoriesResponse. # noqa: E501 + :rtype: CategoryGroupsWrapper + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this CategoriesResponse. + + + :param data: The data of this CategoriesResponse. # noqa: E501 + :type: CategoryGroupsWrapper + """ + if data is None: + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CategoriesResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/category.py b/ynab-api/ynab_api/models/category.py new file mode 100644 index 0000000..e5f6a5c --- /dev/null +++ b/ynab-api/ynab_api/models/category.py @@ -0,0 +1,283 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class Category(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'category_group_id': 'str', + 'name': 'str', + 'hidden': 'bool', + 'budgeted': 'float', + 'activity': 'float', + 'balance': 'float' + } + + attribute_map = { + 'id': 'id', + 'category_group_id': 'category_group_id', + 'name': 'name', + 'hidden': 'hidden', + 'budgeted': 'budgeted', + 'activity': 'activity', + 'balance': 'balance' + } + + def __init__(self, id=None, category_group_id=None, name=None, hidden=None, budgeted=None, activity=None, balance=None): # noqa: E501 + """Category - a model defined in Swagger""" # noqa: E501 + + self._id = None + self._category_group_id = None + self._name = None + self._hidden = None + self._budgeted = None + self._activity = None + self._balance = None + self.discriminator = None + + self.id = id + self.category_group_id = category_group_id + self.name = name + self.hidden = hidden + self.budgeted = budgeted + self.activity = activity + self.balance = balance + + @property + def id(self): + """Gets the id of this Category. # noqa: E501 + + + :return: The id of this Category. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Category. + + + :param id: The id of this Category. # noqa: E501 + :type: str + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def category_group_id(self): + """Gets the category_group_id of this Category. # noqa: E501 + + + :return: The category_group_id of this Category. # noqa: E501 + :rtype: str + """ + return self._category_group_id + + @category_group_id.setter + def category_group_id(self, category_group_id): + """Sets the category_group_id of this Category. + + + :param category_group_id: The category_group_id of this Category. # noqa: E501 + :type: str + """ + if category_group_id is None: + raise ValueError("Invalid value for `category_group_id`, must not be `None`") # noqa: E501 + + self._category_group_id = category_group_id + + @property + def name(self): + """Gets the name of this Category. # noqa: E501 + + + :return: The name of this Category. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Category. + + + :param name: The name of this Category. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def hidden(self): + """Gets the hidden of this Category. # noqa: E501 + + Whether or not the category is hidden # noqa: E501 + + :return: The hidden of this Category. # noqa: E501 + :rtype: bool + """ + return self._hidden + + @hidden.setter + def hidden(self, hidden): + """Sets the hidden of this Category. + + Whether or not the category is hidden # noqa: E501 + + :param hidden: The hidden of this Category. # noqa: E501 + :type: bool + """ + if hidden is None: + raise ValueError("Invalid value for `hidden`, must not be `None`") # noqa: E501 + + self._hidden = hidden + + @property + def budgeted(self): + """Gets the budgeted of this Category. # noqa: E501 + + Budgeted amount in current month in milliunits format # noqa: E501 + + :return: The budgeted of this Category. # noqa: E501 + :rtype: float + """ + return self._budgeted + + @budgeted.setter + def budgeted(self, budgeted): + """Sets the budgeted of this Category. + + Budgeted amount in current month in milliunits format # noqa: E501 + + :param budgeted: The budgeted of this Category. # noqa: E501 + :type: float + """ + if budgeted is None: + raise ValueError("Invalid value for `budgeted`, must not be `None`") # noqa: E501 + + self._budgeted = budgeted + + @property + def activity(self): + """Gets the activity of this Category. # noqa: E501 + + Activity amount in current month in milliunits format # noqa: E501 + + :return: The activity of this Category. # noqa: E501 + :rtype: float + """ + return self._activity + + @activity.setter + def activity(self, activity): + """Sets the activity of this Category. + + Activity amount in current month in milliunits format # noqa: E501 + + :param activity: The activity of this Category. # noqa: E501 + :type: float + """ + if activity is None: + raise ValueError("Invalid value for `activity`, must not be `None`") # noqa: E501 + + self._activity = activity + + @property + def balance(self): + """Gets the balance of this Category. # noqa: E501 + + Balance in current month in milliunits format # noqa: E501 + + :return: The balance of this Category. # noqa: E501 + :rtype: float + """ + return self._balance + + @balance.setter + def balance(self, balance): + """Sets the balance of this Category. + + Balance in current month in milliunits format # noqa: E501 + + :param balance: The balance of this Category. # noqa: E501 + :type: float + """ + if balance is None: + raise ValueError("Invalid value for `balance`, must not be `None`") # noqa: E501 + + self._balance = balance + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Category): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/category_group.py b/ynab-api/ynab_api/models/category_group.py new file mode 100644 index 0000000..93ffe84 --- /dev/null +++ b/ynab-api/ynab_api/models/category_group.py @@ -0,0 +1,169 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class CategoryGroup(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'name': 'str', + 'hidden': 'bool' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'hidden': 'hidden' + } + + def __init__(self, id=None, name=None, hidden=None): # noqa: E501 + """CategoryGroup - a model defined in Swagger""" # noqa: E501 + + self._id = None + self._name = None + self._hidden = None + self.discriminator = None + + self.id = id + self.name = name + self.hidden = hidden + + @property + def id(self): + """Gets the id of this CategoryGroup. # noqa: E501 + + + :return: The id of this CategoryGroup. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this CategoryGroup. + + + :param id: The id of this CategoryGroup. # noqa: E501 + :type: str + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def name(self): + """Gets the name of this CategoryGroup. # noqa: E501 + + + :return: The name of this CategoryGroup. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CategoryGroup. + + + :param name: The name of this CategoryGroup. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def hidden(self): + """Gets the hidden of this CategoryGroup. # noqa: E501 + + Whether or not the category group is hidden # noqa: E501 + + :return: The hidden of this CategoryGroup. # noqa: E501 + :rtype: bool + """ + return self._hidden + + @hidden.setter + def hidden(self, hidden): + """Sets the hidden of this CategoryGroup. + + Whether or not the category group is hidden # noqa: E501 + + :param hidden: The hidden of this CategoryGroup. # noqa: E501 + :type: bool + """ + if hidden is None: + raise ValueError("Invalid value for `hidden`, must not be `None`") # noqa: E501 + + self._hidden = hidden + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CategoryGroup): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/category_group_with_categories.py b/ynab-api/ynab_api/models/category_group_with_categories.py new file mode 100644 index 0000000..2ab29ab --- /dev/null +++ b/ynab-api/ynab_api/models/category_group_with_categories.py @@ -0,0 +1,201 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.category import Category # noqa: F401,E501 +from ynab_api.models.category_group import CategoryGroup # noqa: F401,E501 + + +class CategoryGroupWithCategories(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'name': 'str', + 'hidden': 'bool', + 'categories': 'list[Category]' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'hidden': 'hidden', + 'categories': 'categories' + } + + def __init__(self, id=None, name=None, hidden=None, categories=None): # noqa: E501 + """CategoryGroupWithCategories - a model defined in Swagger""" # noqa: E501 + + self._id = None + self._name = None + self._hidden = None + self._categories = None + self.discriminator = None + + self.id = id + self.name = name + self.hidden = hidden + self.categories = categories + + @property + def id(self): + """Gets the id of this CategoryGroupWithCategories. # noqa: E501 + + + :return: The id of this CategoryGroupWithCategories. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this CategoryGroupWithCategories. + + + :param id: The id of this CategoryGroupWithCategories. # noqa: E501 + :type: str + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def name(self): + """Gets the name of this CategoryGroupWithCategories. # noqa: E501 + + + :return: The name of this CategoryGroupWithCategories. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CategoryGroupWithCategories. + + + :param name: The name of this CategoryGroupWithCategories. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def hidden(self): + """Gets the hidden of this CategoryGroupWithCategories. # noqa: E501 + + Whether or not the category group is hidden # noqa: E501 + + :return: The hidden of this CategoryGroupWithCategories. # noqa: E501 + :rtype: bool + """ + return self._hidden + + @hidden.setter + def hidden(self, hidden): + """Sets the hidden of this CategoryGroupWithCategories. + + Whether or not the category group is hidden # noqa: E501 + + :param hidden: The hidden of this CategoryGroupWithCategories. # noqa: E501 + :type: bool + """ + if hidden is None: + raise ValueError("Invalid value for `hidden`, must not be `None`") # noqa: E501 + + self._hidden = hidden + + @property + def categories(self): + """Gets the categories of this CategoryGroupWithCategories. # noqa: E501 + + Category group categories # noqa: E501 + + :return: The categories of this CategoryGroupWithCategories. # noqa: E501 + :rtype: list[Category] + """ + return self._categories + + @categories.setter + def categories(self, categories): + """Sets the categories of this CategoryGroupWithCategories. + + Category group categories # noqa: E501 + + :param categories: The categories of this CategoryGroupWithCategories. # noqa: E501 + :type: list[Category] + """ + if categories is None: + raise ValueError("Invalid value for `categories`, must not be `None`") # noqa: E501 + + self._categories = categories + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CategoryGroupWithCategories): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/category_groups_wrapper.py b/ynab-api/ynab_api/models/category_groups_wrapper.py new file mode 100644 index 0000000..3a158a5 --- /dev/null +++ b/ynab-api/ynab_api/models/category_groups_wrapper.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.category_group_with_categories import CategoryGroupWithCategories # noqa: F401,E501 + + +class CategoryGroupsWrapper(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'category_groups': 'list[CategoryGroupWithCategories]' + } + + attribute_map = { + 'category_groups': 'category_groups' + } + + def __init__(self, category_groups=None): # noqa: E501 + """CategoryGroupsWrapper - a model defined in Swagger""" # noqa: E501 + + self._category_groups = None + self.discriminator = None + + self.category_groups = category_groups + + @property + def category_groups(self): + """Gets the category_groups of this CategoryGroupsWrapper. # noqa: E501 + + + :return: The category_groups of this CategoryGroupsWrapper. # noqa: E501 + :rtype: list[CategoryGroupWithCategories] + """ + return self._category_groups + + @category_groups.setter + def category_groups(self, category_groups): + """Sets the category_groups of this CategoryGroupsWrapper. + + + :param category_groups: The category_groups of this CategoryGroupsWrapper. # noqa: E501 + :type: list[CategoryGroupWithCategories] + """ + if category_groups is None: + raise ValueError("Invalid value for `category_groups`, must not be `None`") # noqa: E501 + + self._category_groups = category_groups + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CategoryGroupsWrapper): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/category_response.py b/ynab-api/ynab_api/models/category_response.py new file mode 100644 index 0000000..1491d99 --- /dev/null +++ b/ynab-api/ynab_api/models/category_response.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.category_wrapper import CategoryWrapper # noqa: F401,E501 + + +class CategoryResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'CategoryWrapper' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): # noqa: E501 + """CategoryResponse - a model defined in Swagger""" # noqa: E501 + + self._data = None + self.discriminator = None + + self.data = data + + @property + def data(self): + """Gets the data of this CategoryResponse. # noqa: E501 + + + :return: The data of this CategoryResponse. # noqa: E501 + :rtype: CategoryWrapper + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this CategoryResponse. + + + :param data: The data of this CategoryResponse. # noqa: E501 + :type: CategoryWrapper + """ + if data is None: + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CategoryResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/category_wrapper.py b/ynab-api/ynab_api/models/category_wrapper.py new file mode 100644 index 0000000..d61c766 --- /dev/null +++ b/ynab-api/ynab_api/models/category_wrapper.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.category import Category # noqa: F401,E501 + + +class CategoryWrapper(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'category': 'Category' + } + + attribute_map = { + 'category': 'category' + } + + def __init__(self, category=None): # noqa: E501 + """CategoryWrapper - a model defined in Swagger""" # noqa: E501 + + self._category = None + self.discriminator = None + + self.category = category + + @property + def category(self): + """Gets the category of this CategoryWrapper. # noqa: E501 + + + :return: The category of this CategoryWrapper. # noqa: E501 + :rtype: Category + """ + return self._category + + @category.setter + def category(self, category): + """Sets the category of this CategoryWrapper. + + + :param category: The category of this CategoryWrapper. # noqa: E501 + :type: Category + """ + if category is None: + raise ValueError("Invalid value for `category`, must not be `None`") # noqa: E501 + + self._category = category + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CategoryWrapper): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/currency_format.py b/ynab-api/ynab_api/models/currency_format.py new file mode 100644 index 0000000..2afff89 --- /dev/null +++ b/ynab-api/ynab_api/models/currency_format.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class CurrencyFormat(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """CurrencyFormat - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CurrencyFormat): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/date_format.py b/ynab-api/ynab_api/models/date_format.py new file mode 100644 index 0000000..9d92cd4 --- /dev/null +++ b/ynab-api/ynab_api/models/date_format.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class DateFormat(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """DateFormat - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DateFormat): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/error_detail.py b/ynab-api/ynab_api/models/error_detail.py new file mode 100644 index 0000000..1751760 --- /dev/null +++ b/ynab-api/ynab_api/models/error_detail.py @@ -0,0 +1,167 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class ErrorDetail(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'name': 'str', + 'detail': 'str' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'detail': 'detail' + } + + def __init__(self, id=None, name=None, detail=None): # noqa: E501 + """ErrorDetail - a model defined in Swagger""" # noqa: E501 + + self._id = None + self._name = None + self._detail = None + self.discriminator = None + + self.id = id + self.name = name + self.detail = detail + + @property + def id(self): + """Gets the id of this ErrorDetail. # noqa: E501 + + + :return: The id of this ErrorDetail. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ErrorDetail. + + + :param id: The id of this ErrorDetail. # noqa: E501 + :type: str + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def name(self): + """Gets the name of this ErrorDetail. # noqa: E501 + + + :return: The name of this ErrorDetail. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ErrorDetail. + + + :param name: The name of this ErrorDetail. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def detail(self): + """Gets the detail of this ErrorDetail. # noqa: E501 + + + :return: The detail of this ErrorDetail. # noqa: E501 + :rtype: str + """ + return self._detail + + @detail.setter + def detail(self, detail): + """Sets the detail of this ErrorDetail. + + + :param detail: The detail of this ErrorDetail. # noqa: E501 + :type: str + """ + if detail is None: + raise ValueError("Invalid value for `detail`, must not be `None`") # noqa: E501 + + self._detail = detail + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ErrorDetail): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/error_response.py b/ynab-api/ynab_api/models/error_response.py new file mode 100644 index 0000000..68792ec --- /dev/null +++ b/ynab-api/ynab_api/models/error_response.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.error_detail import ErrorDetail # noqa: F401,E501 + + +class ErrorResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'error': 'ErrorDetail' + } + + attribute_map = { + 'error': 'error' + } + + def __init__(self, error=None): # noqa: E501 + """ErrorResponse - a model defined in Swagger""" # noqa: E501 + + self._error = None + self.discriminator = None + + self.error = error + + @property + def error(self): + """Gets the error of this ErrorResponse. # noqa: E501 + + + :return: The error of this ErrorResponse. # noqa: E501 + :rtype: ErrorDetail + """ + return self._error + + @error.setter + def error(self, error): + """Sets the error of this ErrorResponse. + + + :param error: The error of this ErrorResponse. # noqa: E501 + :type: ErrorDetail + """ + if error is None: + raise ValueError("Invalid value for `error`, must not be `None`") # noqa: E501 + + self._error = error + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ErrorResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/month_detail.py b/ynab-api/ynab_api/models/month_detail.py new file mode 100644 index 0000000..7c1d557 --- /dev/null +++ b/ynab-api/ynab_api/models/month_detail.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.category import Category # noqa: F401,E501 +from ynab_api.models.month_summary import MonthSummary # noqa: F401,E501 + + +class MonthDetail(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'month': 'date', + 'categories': 'list[Category]' + } + + attribute_map = { + 'month': 'month', + 'categories': 'categories' + } + + def __init__(self, month=None, categories=None): # noqa: E501 + """MonthDetail - a model defined in Swagger""" # noqa: E501 + + self._month = None + self._categories = None + self.discriminator = None + + self.month = month + self.categories = categories + + @property + def month(self): + """Gets the month of this MonthDetail. # noqa: E501 + + + :return: The month of this MonthDetail. # noqa: E501 + :rtype: date + """ + return self._month + + @month.setter + def month(self, month): + """Sets the month of this MonthDetail. + + + :param month: The month of this MonthDetail. # noqa: E501 + :type: date + """ + if month is None: + raise ValueError("Invalid value for `month`, must not be `None`") # noqa: E501 + + self._month = month + + @property + def categories(self): + """Gets the categories of this MonthDetail. # noqa: E501 + + The budget month categories # noqa: E501 + + :return: The categories of this MonthDetail. # noqa: E501 + :rtype: list[Category] + """ + return self._categories + + @categories.setter + def categories(self, categories): + """Sets the categories of this MonthDetail. + + The budget month categories # noqa: E501 + + :param categories: The categories of this MonthDetail. # noqa: E501 + :type: list[Category] + """ + if categories is None: + raise ValueError("Invalid value for `categories`, must not be `None`") # noqa: E501 + + self._categories = categories + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MonthDetail): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/month_detail_response.py b/ynab-api/ynab_api/models/month_detail_response.py new file mode 100644 index 0000000..8c4a50a --- /dev/null +++ b/ynab-api/ynab_api/models/month_detail_response.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.month_detail_wrapper import MonthDetailWrapper # noqa: F401,E501 + + +class MonthDetailResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'MonthDetailWrapper' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): # noqa: E501 + """MonthDetailResponse - a model defined in Swagger""" # noqa: E501 + + self._data = None + self.discriminator = None + + self.data = data + + @property + def data(self): + """Gets the data of this MonthDetailResponse. # noqa: E501 + + + :return: The data of this MonthDetailResponse. # noqa: E501 + :rtype: MonthDetailWrapper + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this MonthDetailResponse. + + + :param data: The data of this MonthDetailResponse. # noqa: E501 + :type: MonthDetailWrapper + """ + if data is None: + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MonthDetailResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/month_detail_wrapper.py b/ynab-api/ynab_api/models/month_detail_wrapper.py new file mode 100644 index 0000000..ef3f79a --- /dev/null +++ b/ynab-api/ynab_api/models/month_detail_wrapper.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.month_detail import MonthDetail # noqa: F401,E501 + + +class MonthDetailWrapper(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'month': 'MonthDetail' + } + + attribute_map = { + 'month': 'month' + } + + def __init__(self, month=None): # noqa: E501 + """MonthDetailWrapper - a model defined in Swagger""" # noqa: E501 + + self._month = None + self.discriminator = None + + self.month = month + + @property + def month(self): + """Gets the month of this MonthDetailWrapper. # noqa: E501 + + + :return: The month of this MonthDetailWrapper. # noqa: E501 + :rtype: MonthDetail + """ + return self._month + + @month.setter + def month(self, month): + """Sets the month of this MonthDetailWrapper. + + + :param month: The month of this MonthDetailWrapper. # noqa: E501 + :type: MonthDetail + """ + if month is None: + raise ValueError("Invalid value for `month`, must not be `None`") # noqa: E501 + + self._month = month + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MonthDetailWrapper): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/month_summaries_response.py b/ynab-api/ynab_api/models/month_summaries_response.py new file mode 100644 index 0000000..da8efb3 --- /dev/null +++ b/ynab-api/ynab_api/models/month_summaries_response.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.month_summaries_wrapper import MonthSummariesWrapper # noqa: F401,E501 + + +class MonthSummariesResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'MonthSummariesWrapper' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): # noqa: E501 + """MonthSummariesResponse - a model defined in Swagger""" # noqa: E501 + + self._data = None + self.discriminator = None + + self.data = data + + @property + def data(self): + """Gets the data of this MonthSummariesResponse. # noqa: E501 + + + :return: The data of this MonthSummariesResponse. # noqa: E501 + :rtype: MonthSummariesWrapper + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this MonthSummariesResponse. + + + :param data: The data of this MonthSummariesResponse. # noqa: E501 + :type: MonthSummariesWrapper + """ + if data is None: + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MonthSummariesResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/month_summaries_wrapper.py b/ynab-api/ynab_api/models/month_summaries_wrapper.py new file mode 100644 index 0000000..2ba0e13 --- /dev/null +++ b/ynab-api/ynab_api/models/month_summaries_wrapper.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.month_summary import MonthSummary # noqa: F401,E501 + + +class MonthSummariesWrapper(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'months': 'list[MonthSummary]' + } + + attribute_map = { + 'months': 'months' + } + + def __init__(self, months=None): # noqa: E501 + """MonthSummariesWrapper - a model defined in Swagger""" # noqa: E501 + + self._months = None + self.discriminator = None + + self.months = months + + @property + def months(self): + """Gets the months of this MonthSummariesWrapper. # noqa: E501 + + + :return: The months of this MonthSummariesWrapper. # noqa: E501 + :rtype: list[MonthSummary] + """ + return self._months + + @months.setter + def months(self, months): + """Sets the months of this MonthSummariesWrapper. + + + :param months: The months of this MonthSummariesWrapper. # noqa: E501 + :type: list[MonthSummary] + """ + if months is None: + raise ValueError("Invalid value for `months`, must not be `None`") # noqa: E501 + + self._months = months + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MonthSummariesWrapper): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/month_summary.py b/ynab-api/ynab_api/models/month_summary.py new file mode 100644 index 0000000..fcd3eaf --- /dev/null +++ b/ynab-api/ynab_api/models/month_summary.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class MonthSummary(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'month': 'date' + } + + attribute_map = { + 'month': 'month' + } + + def __init__(self, month=None): # noqa: E501 + """MonthSummary - a model defined in Swagger""" # noqa: E501 + + self._month = None + self.discriminator = None + + self.month = month + + @property + def month(self): + """Gets the month of this MonthSummary. # noqa: E501 + + + :return: The month of this MonthSummary. # noqa: E501 + :rtype: date + """ + return self._month + + @month.setter + def month(self, month): + """Sets the month of this MonthSummary. + + + :param month: The month of this MonthSummary. # noqa: E501 + :type: date + """ + if month is None: + raise ValueError("Invalid value for `month`, must not be `None`") # noqa: E501 + + self._month = month + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MonthSummary): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/payee.py b/ynab-api/ynab_api/models/payee.py new file mode 100644 index 0000000..8f5b4d6 --- /dev/null +++ b/ynab-api/ynab_api/models/payee.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class Payee(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'name': 'str' + } + + attribute_map = { + 'id': 'id', + 'name': 'name' + } + + def __init__(self, id=None, name=None): # noqa: E501 + """Payee - a model defined in Swagger""" # noqa: E501 + + self._id = None + self._name = None + self.discriminator = None + + self.id = id + self.name = name + + @property + def id(self): + """Gets the id of this Payee. # noqa: E501 + + + :return: The id of this Payee. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Payee. + + + :param id: The id of this Payee. # noqa: E501 + :type: str + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def name(self): + """Gets the name of this Payee. # noqa: E501 + + + :return: The name of this Payee. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Payee. + + + :param name: The name of this Payee. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Payee): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/payee_location.py b/ynab-api/ynab_api/models/payee_location.py new file mode 100644 index 0000000..08b6fb4 --- /dev/null +++ b/ynab-api/ynab_api/models/payee_location.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class PayeeLocation(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'payee_id': 'str' + } + + attribute_map = { + 'id': 'id', + 'payee_id': 'payee_id' + } + + def __init__(self, id=None, payee_id=None): # noqa: E501 + """PayeeLocation - a model defined in Swagger""" # noqa: E501 + + self._id = None + self._payee_id = None + self.discriminator = None + + self.id = id + self.payee_id = payee_id + + @property + def id(self): + """Gets the id of this PayeeLocation. # noqa: E501 + + + :return: The id of this PayeeLocation. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this PayeeLocation. + + + :param id: The id of this PayeeLocation. # noqa: E501 + :type: str + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def payee_id(self): + """Gets the payee_id of this PayeeLocation. # noqa: E501 + + + :return: The payee_id of this PayeeLocation. # noqa: E501 + :rtype: str + """ + return self._payee_id + + @payee_id.setter + def payee_id(self, payee_id): + """Sets the payee_id of this PayeeLocation. + + + :param payee_id: The payee_id of this PayeeLocation. # noqa: E501 + :type: str + """ + if payee_id is None: + raise ValueError("Invalid value for `payee_id`, must not be `None`") # noqa: E501 + + self._payee_id = payee_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PayeeLocation): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/payee_location_response.py b/ynab-api/ynab_api/models/payee_location_response.py new file mode 100644 index 0000000..82ed8e4 --- /dev/null +++ b/ynab-api/ynab_api/models/payee_location_response.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.payee_location_wrapper import PayeeLocationWrapper # noqa: F401,E501 + + +class PayeeLocationResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'PayeeLocationWrapper' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): # noqa: E501 + """PayeeLocationResponse - a model defined in Swagger""" # noqa: E501 + + self._data = None + self.discriminator = None + + self.data = data + + @property + def data(self): + """Gets the data of this PayeeLocationResponse. # noqa: E501 + + + :return: The data of this PayeeLocationResponse. # noqa: E501 + :rtype: PayeeLocationWrapper + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PayeeLocationResponse. + + + :param data: The data of this PayeeLocationResponse. # noqa: E501 + :type: PayeeLocationWrapper + """ + if data is None: + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PayeeLocationResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/payee_location_wrapper.py b/ynab-api/ynab_api/models/payee_location_wrapper.py new file mode 100644 index 0000000..621c06f --- /dev/null +++ b/ynab-api/ynab_api/models/payee_location_wrapper.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.payee_location import PayeeLocation # noqa: F401,E501 + + +class PayeeLocationWrapper(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'payee_location': 'PayeeLocation' + } + + attribute_map = { + 'payee_location': 'payee_location' + } + + def __init__(self, payee_location=None): # noqa: E501 + """PayeeLocationWrapper - a model defined in Swagger""" # noqa: E501 + + self._payee_location = None + self.discriminator = None + + self.payee_location = payee_location + + @property + def payee_location(self): + """Gets the payee_location of this PayeeLocationWrapper. # noqa: E501 + + + :return: The payee_location of this PayeeLocationWrapper. # noqa: E501 + :rtype: PayeeLocation + """ + return self._payee_location + + @payee_location.setter + def payee_location(self, payee_location): + """Sets the payee_location of this PayeeLocationWrapper. + + + :param payee_location: The payee_location of this PayeeLocationWrapper. # noqa: E501 + :type: PayeeLocation + """ + if payee_location is None: + raise ValueError("Invalid value for `payee_location`, must not be `None`") # noqa: E501 + + self._payee_location = payee_location + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PayeeLocationWrapper): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/payee_locations_response.py b/ynab-api/ynab_api/models/payee_locations_response.py new file mode 100644 index 0000000..de7fc47 --- /dev/null +++ b/ynab-api/ynab_api/models/payee_locations_response.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.payee_locations_wrapper import PayeeLocationsWrapper # noqa: F401,E501 + + +class PayeeLocationsResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'PayeeLocationsWrapper' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): # noqa: E501 + """PayeeLocationsResponse - a model defined in Swagger""" # noqa: E501 + + self._data = None + self.discriminator = None + + self.data = data + + @property + def data(self): + """Gets the data of this PayeeLocationsResponse. # noqa: E501 + + + :return: The data of this PayeeLocationsResponse. # noqa: E501 + :rtype: PayeeLocationsWrapper + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PayeeLocationsResponse. + + + :param data: The data of this PayeeLocationsResponse. # noqa: E501 + :type: PayeeLocationsWrapper + """ + if data is None: + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PayeeLocationsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/payee_locations_wrapper.py b/ynab-api/ynab_api/models/payee_locations_wrapper.py new file mode 100644 index 0000000..6891550 --- /dev/null +++ b/ynab-api/ynab_api/models/payee_locations_wrapper.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.payee_location import PayeeLocation # noqa: F401,E501 + + +class PayeeLocationsWrapper(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'payee_locations': 'list[PayeeLocation]' + } + + attribute_map = { + 'payee_locations': 'payee_locations' + } + + def __init__(self, payee_locations=None): # noqa: E501 + """PayeeLocationsWrapper - a model defined in Swagger""" # noqa: E501 + + self._payee_locations = None + self.discriminator = None + + self.payee_locations = payee_locations + + @property + def payee_locations(self): + """Gets the payee_locations of this PayeeLocationsWrapper. # noqa: E501 + + + :return: The payee_locations of this PayeeLocationsWrapper. # noqa: E501 + :rtype: list[PayeeLocation] + """ + return self._payee_locations + + @payee_locations.setter + def payee_locations(self, payee_locations): + """Sets the payee_locations of this PayeeLocationsWrapper. + + + :param payee_locations: The payee_locations of this PayeeLocationsWrapper. # noqa: E501 + :type: list[PayeeLocation] + """ + if payee_locations is None: + raise ValueError("Invalid value for `payee_locations`, must not be `None`") # noqa: E501 + + self._payee_locations = payee_locations + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PayeeLocationsWrapper): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/payee_response.py b/ynab-api/ynab_api/models/payee_response.py new file mode 100644 index 0000000..1f9f541 --- /dev/null +++ b/ynab-api/ynab_api/models/payee_response.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.payee_wrapper import PayeeWrapper # noqa: F401,E501 + + +class PayeeResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'PayeeWrapper' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): # noqa: E501 + """PayeeResponse - a model defined in Swagger""" # noqa: E501 + + self._data = None + self.discriminator = None + + self.data = data + + @property + def data(self): + """Gets the data of this PayeeResponse. # noqa: E501 + + + :return: The data of this PayeeResponse. # noqa: E501 + :rtype: PayeeWrapper + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PayeeResponse. + + + :param data: The data of this PayeeResponse. # noqa: E501 + :type: PayeeWrapper + """ + if data is None: + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PayeeResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/payee_wrapper.py b/ynab-api/ynab_api/models/payee_wrapper.py new file mode 100644 index 0000000..7d331e2 --- /dev/null +++ b/ynab-api/ynab_api/models/payee_wrapper.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.payee import Payee # noqa: F401,E501 + + +class PayeeWrapper(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'payee': 'Payee' + } + + attribute_map = { + 'payee': 'payee' + } + + def __init__(self, payee=None): # noqa: E501 + """PayeeWrapper - a model defined in Swagger""" # noqa: E501 + + self._payee = None + self.discriminator = None + + self.payee = payee + + @property + def payee(self): + """Gets the payee of this PayeeWrapper. # noqa: E501 + + + :return: The payee of this PayeeWrapper. # noqa: E501 + :rtype: Payee + """ + return self._payee + + @payee.setter + def payee(self, payee): + """Sets the payee of this PayeeWrapper. + + + :param payee: The payee of this PayeeWrapper. # noqa: E501 + :type: Payee + """ + if payee is None: + raise ValueError("Invalid value for `payee`, must not be `None`") # noqa: E501 + + self._payee = payee + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PayeeWrapper): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/payees_response.py b/ynab-api/ynab_api/models/payees_response.py new file mode 100644 index 0000000..85a63de --- /dev/null +++ b/ynab-api/ynab_api/models/payees_response.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.payees_wrapper import PayeesWrapper # noqa: F401,E501 + + +class PayeesResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'PayeesWrapper' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): # noqa: E501 + """PayeesResponse - a model defined in Swagger""" # noqa: E501 + + self._data = None + self.discriminator = None + + self.data = data + + @property + def data(self): + """Gets the data of this PayeesResponse. # noqa: E501 + + + :return: The data of this PayeesResponse. # noqa: E501 + :rtype: PayeesWrapper + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this PayeesResponse. + + + :param data: The data of this PayeesResponse. # noqa: E501 + :type: PayeesWrapper + """ + if data is None: + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PayeesResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/payees_wrapper.py b/ynab-api/ynab_api/models/payees_wrapper.py new file mode 100644 index 0000000..c0c54f1 --- /dev/null +++ b/ynab-api/ynab_api/models/payees_wrapper.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.payee import Payee # noqa: F401,E501 + + +class PayeesWrapper(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'payees': 'list[Payee]' + } + + attribute_map = { + 'payees': 'payees' + } + + def __init__(self, payees=None): # noqa: E501 + """PayeesWrapper - a model defined in Swagger""" # noqa: E501 + + self._payees = None + self.discriminator = None + + self.payees = payees + + @property + def payees(self): + """Gets the payees of this PayeesWrapper. # noqa: E501 + + + :return: The payees of this PayeesWrapper. # noqa: E501 + :rtype: list[Payee] + """ + return self._payees + + @payees.setter + def payees(self, payees): + """Sets the payees of this PayeesWrapper. + + + :param payees: The payees of this PayeesWrapper. # noqa: E501 + :type: list[Payee] + """ + if payees is None: + raise ValueError("Invalid value for `payees`, must not be `None`") # noqa: E501 + + self._payees = payees + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PayeesWrapper): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/save_transaction.py b/ynab-api/ynab_api/models/save_transaction.py new file mode 100644 index 0000000..6a8050f --- /dev/null +++ b/ynab-api/ynab_api/models/save_transaction.py @@ -0,0 +1,231 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class SaveTransaction(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'account_id': 'str', + 'date': 'date', + 'amount': 'float', + 'cleared': 'str', + 'approved': 'bool' + } + + attribute_map = { + 'account_id': 'account_id', + 'date': 'date', + 'amount': 'amount', + 'cleared': 'cleared', + 'approved': 'approved' + } + + def __init__(self, account_id=None, date=None, amount=None, cleared=None, approved=None): # noqa: E501 + """SaveTransaction - a model defined in Swagger""" # noqa: E501 + + self._account_id = None + self._date = None + self._amount = None + self._cleared = None + self._approved = None + self.discriminator = None + + self.account_id = account_id + self.date = date + self.amount = amount + if cleared is not None: + self.cleared = cleared + if approved is not None: + self.approved = approved + + @property + def account_id(self): + """Gets the account_id of this SaveTransaction. # noqa: E501 + + + :return: The account_id of this SaveTransaction. # noqa: E501 + :rtype: str + """ + return self._account_id + + @account_id.setter + def account_id(self, account_id): + """Sets the account_id of this SaveTransaction. + + + :param account_id: The account_id of this SaveTransaction. # noqa: E501 + :type: str + """ + if account_id is None: + raise ValueError("Invalid value for `account_id`, must not be `None`") # noqa: E501 + + self._account_id = account_id + + @property + def date(self): + """Gets the date of this SaveTransaction. # noqa: E501 + + + :return: The date of this SaveTransaction. # noqa: E501 + :rtype: date + """ + return self._date + + @date.setter + def date(self, date): + """Sets the date of this SaveTransaction. + + + :param date: The date of this SaveTransaction. # noqa: E501 + :type: date + """ + if date is None: + raise ValueError("Invalid value for `date`, must not be `None`") # noqa: E501 + + self._date = date + + @property + def amount(self): + """Gets the amount of this SaveTransaction. # noqa: E501 + + The transaction amount in milliunits format # noqa: E501 + + :return: The amount of this SaveTransaction. # noqa: E501 + :rtype: float + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this SaveTransaction. + + The transaction amount in milliunits format # noqa: E501 + + :param amount: The amount of this SaveTransaction. # noqa: E501 + :type: float + """ + if amount is None: + raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 + + self._amount = amount + + @property + def cleared(self): + """Gets the cleared of this SaveTransaction. # noqa: E501 + + The cleared status of the transaction # noqa: E501 + + :return: The cleared of this SaveTransaction. # noqa: E501 + :rtype: str + """ + return self._cleared + + @cleared.setter + def cleared(self, cleared): + """Sets the cleared of this SaveTransaction. + + The cleared status of the transaction # noqa: E501 + + :param cleared: The cleared of this SaveTransaction. # noqa: E501 + :type: str + """ + allowed_values = ["cleared", "uncleared", "reconciled"] # noqa: E501 + if cleared not in allowed_values: + raise ValueError( + "Invalid value for `cleared` ({0}), must be one of {1}" # noqa: E501 + .format(cleared, allowed_values) + ) + + self._cleared = cleared + + @property + def approved(self): + """Gets the approved of this SaveTransaction. # noqa: E501 + + Whether or not the transaction is approved. If not supplied, transaction will be unapproved by default. # noqa: E501 + + :return: The approved of this SaveTransaction. # noqa: E501 + :rtype: bool + """ + return self._approved + + @approved.setter + def approved(self, approved): + """Sets the approved of this SaveTransaction. + + Whether or not the transaction is approved. If not supplied, transaction will be unapproved by default. # noqa: E501 + + :param approved: The approved of this SaveTransaction. # noqa: E501 + :type: bool + """ + + self._approved = approved + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SaveTransaction): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/save_transaction_wrapper.py b/ynab-api/ynab_api/models/save_transaction_wrapper.py new file mode 100644 index 0000000..7659d05 --- /dev/null +++ b/ynab-api/ynab_api/models/save_transaction_wrapper.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.save_transaction import SaveTransaction # noqa: F401,E501 + + +class SaveTransactionWrapper(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'transaction': 'SaveTransaction' + } + + attribute_map = { + 'transaction': 'transaction' + } + + def __init__(self, transaction=None): # noqa: E501 + """SaveTransactionWrapper - a model defined in Swagger""" # noqa: E501 + + self._transaction = None + self.discriminator = None + + self.transaction = transaction + + @property + def transaction(self): + """Gets the transaction of this SaveTransactionWrapper. # noqa: E501 + + + :return: The transaction of this SaveTransactionWrapper. # noqa: E501 + :rtype: SaveTransaction + """ + return self._transaction + + @transaction.setter + def transaction(self, transaction): + """Sets the transaction of this SaveTransactionWrapper. + + + :param transaction: The transaction of this SaveTransactionWrapper. # noqa: E501 + :type: SaveTransaction + """ + if transaction is None: + raise ValueError("Invalid value for `transaction`, must not be `None`") # noqa: E501 + + self._transaction = transaction + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SaveTransactionWrapper): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/scheduled_sub_transaction.py b/ynab-api/ynab_api/models/scheduled_sub_transaction.py new file mode 100644 index 0000000..4ba4727 --- /dev/null +++ b/ynab-api/ynab_api/models/scheduled_sub_transaction.py @@ -0,0 +1,169 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class ScheduledSubTransaction(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'scheduled_transaction_id': 'str', + 'amount': 'float' + } + + attribute_map = { + 'id': 'id', + 'scheduled_transaction_id': 'scheduled_transaction_id', + 'amount': 'amount' + } + + def __init__(self, id=None, scheduled_transaction_id=None, amount=None): # noqa: E501 + """ScheduledSubTransaction - a model defined in Swagger""" # noqa: E501 + + self._id = None + self._scheduled_transaction_id = None + self._amount = None + self.discriminator = None + + self.id = id + self.scheduled_transaction_id = scheduled_transaction_id + self.amount = amount + + @property + def id(self): + """Gets the id of this ScheduledSubTransaction. # noqa: E501 + + + :return: The id of this ScheduledSubTransaction. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ScheduledSubTransaction. + + + :param id: The id of this ScheduledSubTransaction. # noqa: E501 + :type: str + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def scheduled_transaction_id(self): + """Gets the scheduled_transaction_id of this ScheduledSubTransaction. # noqa: E501 + + + :return: The scheduled_transaction_id of this ScheduledSubTransaction. # noqa: E501 + :rtype: str + """ + return self._scheduled_transaction_id + + @scheduled_transaction_id.setter + def scheduled_transaction_id(self, scheduled_transaction_id): + """Sets the scheduled_transaction_id of this ScheduledSubTransaction. + + + :param scheduled_transaction_id: The scheduled_transaction_id of this ScheduledSubTransaction. # noqa: E501 + :type: str + """ + if scheduled_transaction_id is None: + raise ValueError("Invalid value for `scheduled_transaction_id`, must not be `None`") # noqa: E501 + + self._scheduled_transaction_id = scheduled_transaction_id + + @property + def amount(self): + """Gets the amount of this ScheduledSubTransaction. # noqa: E501 + + The scheduled sub-transaction amount in milliunits format # noqa: E501 + + :return: The amount of this ScheduledSubTransaction. # noqa: E501 + :rtype: float + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this ScheduledSubTransaction. + + The scheduled sub-transaction amount in milliunits format # noqa: E501 + + :param amount: The amount of this ScheduledSubTransaction. # noqa: E501 + :type: float + """ + if amount is None: + raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 + + self._amount = amount + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ScheduledSubTransaction): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/scheduled_transaction_detail.py b/ynab-api/ynab_api/models/scheduled_transaction_detail.py new file mode 100644 index 0000000..7897582 --- /dev/null +++ b/ynab-api/ynab_api/models/scheduled_transaction_detail.py @@ -0,0 +1,292 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.scheduled_sub_transaction import ScheduledSubTransaction # noqa: F401,E501 +from ynab_api.models.scheduled_transaction_summary import ScheduledTransactionSummary # noqa: F401,E501 + + +class ScheduledTransactionDetail(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'date_first': 'date', + 'date_next': 'date', + 'frequency': 'str', + 'amount': 'float', + 'account_id': 'str', + 'subtransactions': 'list[ScheduledSubTransaction]' + } + + attribute_map = { + 'id': 'id', + 'date_first': 'date_first', + 'date_next': 'date_next', + 'frequency': 'frequency', + 'amount': 'amount', + 'account_id': 'account_id', + 'subtransactions': 'subtransactions' + } + + def __init__(self, id=None, date_first=None, date_next=None, frequency=None, amount=None, account_id=None, subtransactions=None): # noqa: E501 + """ScheduledTransactionDetail - a model defined in Swagger""" # noqa: E501 + + self._id = None + self._date_first = None + self._date_next = None + self._frequency = None + self._amount = None + self._account_id = None + self._subtransactions = None + self.discriminator = None + + self.id = id + self.date_first = date_first + self.date_next = date_next + self.frequency = frequency + self.amount = amount + self.account_id = account_id + self.subtransactions = subtransactions + + @property + def id(self): + """Gets the id of this ScheduledTransactionDetail. # noqa: E501 + + + :return: The id of this ScheduledTransactionDetail. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ScheduledTransactionDetail. + + + :param id: The id of this ScheduledTransactionDetail. # noqa: E501 + :type: str + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def date_first(self): + """Gets the date_first of this ScheduledTransactionDetail. # noqa: E501 + + The first date for which the Scheduled Transaction was scheduled. # noqa: E501 + + :return: The date_first of this ScheduledTransactionDetail. # noqa: E501 + :rtype: date + """ + return self._date_first + + @date_first.setter + def date_first(self, date_first): + """Sets the date_first of this ScheduledTransactionDetail. + + The first date for which the Scheduled Transaction was scheduled. # noqa: E501 + + :param date_first: The date_first of this ScheduledTransactionDetail. # noqa: E501 + :type: date + """ + if date_first is None: + raise ValueError("Invalid value for `date_first`, must not be `None`") # noqa: E501 + + self._date_first = date_first + + @property + def date_next(self): + """Gets the date_next of this ScheduledTransactionDetail. # noqa: E501 + + The next date for which the Scheduled Transaction is scheduled. # noqa: E501 + + :return: The date_next of this ScheduledTransactionDetail. # noqa: E501 + :rtype: date + """ + return self._date_next + + @date_next.setter + def date_next(self, date_next): + """Sets the date_next of this ScheduledTransactionDetail. + + The next date for which the Scheduled Transaction is scheduled. # noqa: E501 + + :param date_next: The date_next of this ScheduledTransactionDetail. # noqa: E501 + :type: date + """ + if date_next is None: + raise ValueError("Invalid value for `date_next`, must not be `None`") # noqa: E501 + + self._date_next = date_next + + @property + def frequency(self): + """Gets the frequency of this ScheduledTransactionDetail. # noqa: E501 + + + :return: The frequency of this ScheduledTransactionDetail. # noqa: E501 + :rtype: str + """ + return self._frequency + + @frequency.setter + def frequency(self, frequency): + """Sets the frequency of this ScheduledTransactionDetail. + + + :param frequency: The frequency of this ScheduledTransactionDetail. # noqa: E501 + :type: str + """ + if frequency is None: + raise ValueError("Invalid value for `frequency`, must not be `None`") # noqa: E501 + allowed_values = ["never", "daily", "weekly", "everyOtherWeek", "twiceAMonth", "every4Weeks", "monthly", "everyOtherMonth", "every3Months", "every4Months", "twiceAYear", "yearly", "everyOtherYear"] # noqa: E501 + if frequency not in allowed_values: + raise ValueError( + "Invalid value for `frequency` ({0}), must be one of {1}" # noqa: E501 + .format(frequency, allowed_values) + ) + + self._frequency = frequency + + @property + def amount(self): + """Gets the amount of this ScheduledTransactionDetail. # noqa: E501 + + The scheduled transaction amount in milliunits format # noqa: E501 + + :return: The amount of this ScheduledTransactionDetail. # noqa: E501 + :rtype: float + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this ScheduledTransactionDetail. + + The scheduled transaction amount in milliunits format # noqa: E501 + + :param amount: The amount of this ScheduledTransactionDetail. # noqa: E501 + :type: float + """ + if amount is None: + raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 + + self._amount = amount + + @property + def account_id(self): + """Gets the account_id of this ScheduledTransactionDetail. # noqa: E501 + + + :return: The account_id of this ScheduledTransactionDetail. # noqa: E501 + :rtype: str + """ + return self._account_id + + @account_id.setter + def account_id(self, account_id): + """Sets the account_id of this ScheduledTransactionDetail. + + + :param account_id: The account_id of this ScheduledTransactionDetail. # noqa: E501 + :type: str + """ + if account_id is None: + raise ValueError("Invalid value for `account_id`, must not be `None`") # noqa: E501 + + self._account_id = account_id + + @property + def subtransactions(self): + """Gets the subtransactions of this ScheduledTransactionDetail. # noqa: E501 + + If a split scheduled transaction, the sub-transactions. # noqa: E501 + + :return: The subtransactions of this ScheduledTransactionDetail. # noqa: E501 + :rtype: list[ScheduledSubTransaction] + """ + return self._subtransactions + + @subtransactions.setter + def subtransactions(self, subtransactions): + """Sets the subtransactions of this ScheduledTransactionDetail. + + If a split scheduled transaction, the sub-transactions. # noqa: E501 + + :param subtransactions: The subtransactions of this ScheduledTransactionDetail. # noqa: E501 + :type: list[ScheduledSubTransaction] + """ + if subtransactions is None: + raise ValueError("Invalid value for `subtransactions`, must not be `None`") # noqa: E501 + + self._subtransactions = subtransactions + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ScheduledTransactionDetail): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/scheduled_transaction_response.py b/ynab-api/ynab_api/models/scheduled_transaction_response.py new file mode 100644 index 0000000..274d0ad --- /dev/null +++ b/ynab-api/ynab_api/models/scheduled_transaction_response.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.scheduled_transaction_wrapper import ScheduledTransactionWrapper # noqa: F401,E501 + + +class ScheduledTransactionResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'ScheduledTransactionWrapper' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): # noqa: E501 + """ScheduledTransactionResponse - a model defined in Swagger""" # noqa: E501 + + self._data = None + self.discriminator = None + + self.data = data + + @property + def data(self): + """Gets the data of this ScheduledTransactionResponse. # noqa: E501 + + + :return: The data of this ScheduledTransactionResponse. # noqa: E501 + :rtype: ScheduledTransactionWrapper + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this ScheduledTransactionResponse. + + + :param data: The data of this ScheduledTransactionResponse. # noqa: E501 + :type: ScheduledTransactionWrapper + """ + if data is None: + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ScheduledTransactionResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/scheduled_transaction_summary.py b/ynab-api/ynab_api/models/scheduled_transaction_summary.py new file mode 100644 index 0000000..b5e5a73 --- /dev/null +++ b/ynab-api/ynab_api/models/scheduled_transaction_summary.py @@ -0,0 +1,260 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class ScheduledTransactionSummary(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'date_first': 'date', + 'date_next': 'date', + 'frequency': 'str', + 'amount': 'float', + 'account_id': 'str' + } + + attribute_map = { + 'id': 'id', + 'date_first': 'date_first', + 'date_next': 'date_next', + 'frequency': 'frequency', + 'amount': 'amount', + 'account_id': 'account_id' + } + + def __init__(self, id=None, date_first=None, date_next=None, frequency=None, amount=None, account_id=None): # noqa: E501 + """ScheduledTransactionSummary - a model defined in Swagger""" # noqa: E501 + + self._id = None + self._date_first = None + self._date_next = None + self._frequency = None + self._amount = None + self._account_id = None + self.discriminator = None + + self.id = id + self.date_first = date_first + self.date_next = date_next + self.frequency = frequency + self.amount = amount + self.account_id = account_id + + @property + def id(self): + """Gets the id of this ScheduledTransactionSummary. # noqa: E501 + + + :return: The id of this ScheduledTransactionSummary. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ScheduledTransactionSummary. + + + :param id: The id of this ScheduledTransactionSummary. # noqa: E501 + :type: str + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def date_first(self): + """Gets the date_first of this ScheduledTransactionSummary. # noqa: E501 + + The first date for which the Scheduled Transaction was scheduled. # noqa: E501 + + :return: The date_first of this ScheduledTransactionSummary. # noqa: E501 + :rtype: date + """ + return self._date_first + + @date_first.setter + def date_first(self, date_first): + """Sets the date_first of this ScheduledTransactionSummary. + + The first date for which the Scheduled Transaction was scheduled. # noqa: E501 + + :param date_first: The date_first of this ScheduledTransactionSummary. # noqa: E501 + :type: date + """ + if date_first is None: + raise ValueError("Invalid value for `date_first`, must not be `None`") # noqa: E501 + + self._date_first = date_first + + @property + def date_next(self): + """Gets the date_next of this ScheduledTransactionSummary. # noqa: E501 + + The next date for which the Scheduled Transaction is scheduled. # noqa: E501 + + :return: The date_next of this ScheduledTransactionSummary. # noqa: E501 + :rtype: date + """ + return self._date_next + + @date_next.setter + def date_next(self, date_next): + """Sets the date_next of this ScheduledTransactionSummary. + + The next date for which the Scheduled Transaction is scheduled. # noqa: E501 + + :param date_next: The date_next of this ScheduledTransactionSummary. # noqa: E501 + :type: date + """ + if date_next is None: + raise ValueError("Invalid value for `date_next`, must not be `None`") # noqa: E501 + + self._date_next = date_next + + @property + def frequency(self): + """Gets the frequency of this ScheduledTransactionSummary. # noqa: E501 + + + :return: The frequency of this ScheduledTransactionSummary. # noqa: E501 + :rtype: str + """ + return self._frequency + + @frequency.setter + def frequency(self, frequency): + """Sets the frequency of this ScheduledTransactionSummary. + + + :param frequency: The frequency of this ScheduledTransactionSummary. # noqa: E501 + :type: str + """ + if frequency is None: + raise ValueError("Invalid value for `frequency`, must not be `None`") # noqa: E501 + allowed_values = ["never", "daily", "weekly", "everyOtherWeek", "twiceAMonth", "every4Weeks", "monthly", "everyOtherMonth", "every3Months", "every4Months", "twiceAYear", "yearly", "everyOtherYear"] # noqa: E501 + if frequency not in allowed_values: + raise ValueError( + "Invalid value for `frequency` ({0}), must be one of {1}" # noqa: E501 + .format(frequency, allowed_values) + ) + + self._frequency = frequency + + @property + def amount(self): + """Gets the amount of this ScheduledTransactionSummary. # noqa: E501 + + The scheduled transaction amount in milliunits format # noqa: E501 + + :return: The amount of this ScheduledTransactionSummary. # noqa: E501 + :rtype: float + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this ScheduledTransactionSummary. + + The scheduled transaction amount in milliunits format # noqa: E501 + + :param amount: The amount of this ScheduledTransactionSummary. # noqa: E501 + :type: float + """ + if amount is None: + raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 + + self._amount = amount + + @property + def account_id(self): + """Gets the account_id of this ScheduledTransactionSummary. # noqa: E501 + + + :return: The account_id of this ScheduledTransactionSummary. # noqa: E501 + :rtype: str + """ + return self._account_id + + @account_id.setter + def account_id(self, account_id): + """Sets the account_id of this ScheduledTransactionSummary. + + + :param account_id: The account_id of this ScheduledTransactionSummary. # noqa: E501 + :type: str + """ + if account_id is None: + raise ValueError("Invalid value for `account_id`, must not be `None`") # noqa: E501 + + self._account_id = account_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ScheduledTransactionSummary): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/scheduled_transaction_wrapper.py b/ynab-api/ynab_api/models/scheduled_transaction_wrapper.py new file mode 100644 index 0000000..a62c63e --- /dev/null +++ b/ynab-api/ynab_api/models/scheduled_transaction_wrapper.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.scheduled_transaction_detail import ScheduledTransactionDetail # noqa: F401,E501 + + +class ScheduledTransactionWrapper(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'scheduled_transaction': 'ScheduledTransactionDetail' + } + + attribute_map = { + 'scheduled_transaction': 'scheduled_transaction' + } + + def __init__(self, scheduled_transaction=None): # noqa: E501 + """ScheduledTransactionWrapper - a model defined in Swagger""" # noqa: E501 + + self._scheduled_transaction = None + self.discriminator = None + + self.scheduled_transaction = scheduled_transaction + + @property + def scheduled_transaction(self): + """Gets the scheduled_transaction of this ScheduledTransactionWrapper. # noqa: E501 + + + :return: The scheduled_transaction of this ScheduledTransactionWrapper. # noqa: E501 + :rtype: ScheduledTransactionDetail + """ + return self._scheduled_transaction + + @scheduled_transaction.setter + def scheduled_transaction(self, scheduled_transaction): + """Sets the scheduled_transaction of this ScheduledTransactionWrapper. + + + :param scheduled_transaction: The scheduled_transaction of this ScheduledTransactionWrapper. # noqa: E501 + :type: ScheduledTransactionDetail + """ + if scheduled_transaction is None: + raise ValueError("Invalid value for `scheduled_transaction`, must not be `None`") # noqa: E501 + + self._scheduled_transaction = scheduled_transaction + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ScheduledTransactionWrapper): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/scheduled_transactions_response.py b/ynab-api/ynab_api/models/scheduled_transactions_response.py new file mode 100644 index 0000000..79bfa04 --- /dev/null +++ b/ynab-api/ynab_api/models/scheduled_transactions_response.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.scheduled_transactions_wrapper import ScheduledTransactionsWrapper # noqa: F401,E501 + + +class ScheduledTransactionsResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'ScheduledTransactionsWrapper' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): # noqa: E501 + """ScheduledTransactionsResponse - a model defined in Swagger""" # noqa: E501 + + self._data = None + self.discriminator = None + + self.data = data + + @property + def data(self): + """Gets the data of this ScheduledTransactionsResponse. # noqa: E501 + + + :return: The data of this ScheduledTransactionsResponse. # noqa: E501 + :rtype: ScheduledTransactionsWrapper + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this ScheduledTransactionsResponse. + + + :param data: The data of this ScheduledTransactionsResponse. # noqa: E501 + :type: ScheduledTransactionsWrapper + """ + if data is None: + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ScheduledTransactionsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/scheduled_transactions_wrapper.py b/ynab-api/ynab_api/models/scheduled_transactions_wrapper.py new file mode 100644 index 0000000..7a52a3c --- /dev/null +++ b/ynab-api/ynab_api/models/scheduled_transactions_wrapper.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.scheduled_transaction_detail import ScheduledTransactionDetail # noqa: F401,E501 + + +class ScheduledTransactionsWrapper(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'scheduled_transactions': 'list[ScheduledTransactionDetail]' + } + + attribute_map = { + 'scheduled_transactions': 'scheduled_transactions' + } + + def __init__(self, scheduled_transactions=None): # noqa: E501 + """ScheduledTransactionsWrapper - a model defined in Swagger""" # noqa: E501 + + self._scheduled_transactions = None + self.discriminator = None + + self.scheduled_transactions = scheduled_transactions + + @property + def scheduled_transactions(self): + """Gets the scheduled_transactions of this ScheduledTransactionsWrapper. # noqa: E501 + + + :return: The scheduled_transactions of this ScheduledTransactionsWrapper. # noqa: E501 + :rtype: list[ScheduledTransactionDetail] + """ + return self._scheduled_transactions + + @scheduled_transactions.setter + def scheduled_transactions(self, scheduled_transactions): + """Sets the scheduled_transactions of this ScheduledTransactionsWrapper. + + + :param scheduled_transactions: The scheduled_transactions of this ScheduledTransactionsWrapper. # noqa: E501 + :type: list[ScheduledTransactionDetail] + """ + if scheduled_transactions is None: + raise ValueError("Invalid value for `scheduled_transactions`, must not be `None`") # noqa: E501 + + self._scheduled_transactions = scheduled_transactions + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ScheduledTransactionsWrapper): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/sub_transaction.py b/ynab-api/ynab_api/models/sub_transaction.py new file mode 100644 index 0000000..9ad9183 --- /dev/null +++ b/ynab-api/ynab_api/models/sub_transaction.py @@ -0,0 +1,169 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class SubTransaction(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'transaction_id': 'str', + 'amount': 'float' + } + + attribute_map = { + 'id': 'id', + 'transaction_id': 'transaction_id', + 'amount': 'amount' + } + + def __init__(self, id=None, transaction_id=None, amount=None): # noqa: E501 + """SubTransaction - a model defined in Swagger""" # noqa: E501 + + self._id = None + self._transaction_id = None + self._amount = None + self.discriminator = None + + self.id = id + self.transaction_id = transaction_id + self.amount = amount + + @property + def id(self): + """Gets the id of this SubTransaction. # noqa: E501 + + + :return: The id of this SubTransaction. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this SubTransaction. + + + :param id: The id of this SubTransaction. # noqa: E501 + :type: str + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def transaction_id(self): + """Gets the transaction_id of this SubTransaction. # noqa: E501 + + + :return: The transaction_id of this SubTransaction. # noqa: E501 + :rtype: str + """ + return self._transaction_id + + @transaction_id.setter + def transaction_id(self, transaction_id): + """Sets the transaction_id of this SubTransaction. + + + :param transaction_id: The transaction_id of this SubTransaction. # noqa: E501 + :type: str + """ + if transaction_id is None: + raise ValueError("Invalid value for `transaction_id`, must not be `None`") # noqa: E501 + + self._transaction_id = transaction_id + + @property + def amount(self): + """Gets the amount of this SubTransaction. # noqa: E501 + + The sub-transaction amount in milliunits format # noqa: E501 + + :return: The amount of this SubTransaction. # noqa: E501 + :rtype: float + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this SubTransaction. + + The sub-transaction amount in milliunits format # noqa: E501 + + :param amount: The amount of this SubTransaction. # noqa: E501 + :type: float + """ + if amount is None: + raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 + + self._amount = amount + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SubTransaction): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/transaction_detail.py b/ynab-api/ynab_api/models/transaction_detail.py new file mode 100644 index 0000000..c89f362 --- /dev/null +++ b/ynab-api/ynab_api/models/transaction_detail.py @@ -0,0 +1,292 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.sub_transaction import SubTransaction # noqa: F401,E501 +from ynab_api.models.transaction_summary import TransactionSummary # noqa: F401,E501 + + +class TransactionDetail(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'date': 'date', + 'amount': 'float', + 'cleared': 'str', + 'approved': 'bool', + 'account_id': 'str', + 'subtransactions': 'list[SubTransaction]' + } + + attribute_map = { + 'id': 'id', + 'date': 'date', + 'amount': 'amount', + 'cleared': 'cleared', + 'approved': 'approved', + 'account_id': 'account_id', + 'subtransactions': 'subtransactions' + } + + def __init__(self, id=None, date=None, amount=None, cleared=None, approved=None, account_id=None, subtransactions=None): # noqa: E501 + """TransactionDetail - a model defined in Swagger""" # noqa: E501 + + self._id = None + self._date = None + self._amount = None + self._cleared = None + self._approved = None + self._account_id = None + self._subtransactions = None + self.discriminator = None + + self.id = id + self.date = date + self.amount = amount + self.cleared = cleared + self.approved = approved + self.account_id = account_id + self.subtransactions = subtransactions + + @property + def id(self): + """Gets the id of this TransactionDetail. # noqa: E501 + + + :return: The id of this TransactionDetail. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this TransactionDetail. + + + :param id: The id of this TransactionDetail. # noqa: E501 + :type: str + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def date(self): + """Gets the date of this TransactionDetail. # noqa: E501 + + + :return: The date of this TransactionDetail. # noqa: E501 + :rtype: date + """ + return self._date + + @date.setter + def date(self, date): + """Sets the date of this TransactionDetail. + + + :param date: The date of this TransactionDetail. # noqa: E501 + :type: date + """ + if date is None: + raise ValueError("Invalid value for `date`, must not be `None`") # noqa: E501 + + self._date = date + + @property + def amount(self): + """Gets the amount of this TransactionDetail. # noqa: E501 + + The transaction amount in milliunits format # noqa: E501 + + :return: The amount of this TransactionDetail. # noqa: E501 + :rtype: float + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this TransactionDetail. + + The transaction amount in milliunits format # noqa: E501 + + :param amount: The amount of this TransactionDetail. # noqa: E501 + :type: float + """ + if amount is None: + raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 + + self._amount = amount + + @property + def cleared(self): + """Gets the cleared of this TransactionDetail. # noqa: E501 + + The cleared status of the transaction # noqa: E501 + + :return: The cleared of this TransactionDetail. # noqa: E501 + :rtype: str + """ + return self._cleared + + @cleared.setter + def cleared(self, cleared): + """Sets the cleared of this TransactionDetail. + + The cleared status of the transaction # noqa: E501 + + :param cleared: The cleared of this TransactionDetail. # noqa: E501 + :type: str + """ + if cleared is None: + raise ValueError("Invalid value for `cleared`, must not be `None`") # noqa: E501 + allowed_values = ["cleared", "uncleared", "reconciled"] # noqa: E501 + if cleared not in allowed_values: + raise ValueError( + "Invalid value for `cleared` ({0}), must be one of {1}" # noqa: E501 + .format(cleared, allowed_values) + ) + + self._cleared = cleared + + @property + def approved(self): + """Gets the approved of this TransactionDetail. # noqa: E501 + + Whether or not the transaction is approved # noqa: E501 + + :return: The approved of this TransactionDetail. # noqa: E501 + :rtype: bool + """ + return self._approved + + @approved.setter + def approved(self, approved): + """Sets the approved of this TransactionDetail. + + Whether or not the transaction is approved # noqa: E501 + + :param approved: The approved of this TransactionDetail. # noqa: E501 + :type: bool + """ + if approved is None: + raise ValueError("Invalid value for `approved`, must not be `None`") # noqa: E501 + + self._approved = approved + + @property + def account_id(self): + """Gets the account_id of this TransactionDetail. # noqa: E501 + + + :return: The account_id of this TransactionDetail. # noqa: E501 + :rtype: str + """ + return self._account_id + + @account_id.setter + def account_id(self, account_id): + """Sets the account_id of this TransactionDetail. + + + :param account_id: The account_id of this TransactionDetail. # noqa: E501 + :type: str + """ + if account_id is None: + raise ValueError("Invalid value for `account_id`, must not be `None`") # noqa: E501 + + self._account_id = account_id + + @property + def subtransactions(self): + """Gets the subtransactions of this TransactionDetail. # noqa: E501 + + If a split transaction, the sub-transactions. # noqa: E501 + + :return: The subtransactions of this TransactionDetail. # noqa: E501 + :rtype: list[SubTransaction] + """ + return self._subtransactions + + @subtransactions.setter + def subtransactions(self, subtransactions): + """Sets the subtransactions of this TransactionDetail. + + If a split transaction, the sub-transactions. # noqa: E501 + + :param subtransactions: The subtransactions of this TransactionDetail. # noqa: E501 + :type: list[SubTransaction] + """ + if subtransactions is None: + raise ValueError("Invalid value for `subtransactions`, must not be `None`") # noqa: E501 + + self._subtransactions = subtransactions + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TransactionDetail): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/transaction_response.py b/ynab-api/ynab_api/models/transaction_response.py new file mode 100644 index 0000000..d8c8930 --- /dev/null +++ b/ynab-api/ynab_api/models/transaction_response.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.transaction_wrapper import TransactionWrapper # noqa: F401,E501 + + +class TransactionResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'TransactionWrapper' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): # noqa: E501 + """TransactionResponse - a model defined in Swagger""" # noqa: E501 + + self._data = None + self.discriminator = None + + self.data = data + + @property + def data(self): + """Gets the data of this TransactionResponse. # noqa: E501 + + + :return: The data of this TransactionResponse. # noqa: E501 + :rtype: TransactionWrapper + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this TransactionResponse. + + + :param data: The data of this TransactionResponse. # noqa: E501 + :type: TransactionWrapper + """ + if data is None: + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TransactionResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/transaction_summary.py b/ynab-api/ynab_api/models/transaction_summary.py new file mode 100644 index 0000000..365ca7b --- /dev/null +++ b/ynab-api/ynab_api/models/transaction_summary.py @@ -0,0 +1,260 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class TransactionSummary(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'str', + 'date': 'date', + 'amount': 'float', + 'cleared': 'str', + 'approved': 'bool', + 'account_id': 'str' + } + + attribute_map = { + 'id': 'id', + 'date': 'date', + 'amount': 'amount', + 'cleared': 'cleared', + 'approved': 'approved', + 'account_id': 'account_id' + } + + def __init__(self, id=None, date=None, amount=None, cleared=None, approved=None, account_id=None): # noqa: E501 + """TransactionSummary - a model defined in Swagger""" # noqa: E501 + + self._id = None + self._date = None + self._amount = None + self._cleared = None + self._approved = None + self._account_id = None + self.discriminator = None + + self.id = id + self.date = date + self.amount = amount + self.cleared = cleared + self.approved = approved + self.account_id = account_id + + @property + def id(self): + """Gets the id of this TransactionSummary. # noqa: E501 + + + :return: The id of this TransactionSummary. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this TransactionSummary. + + + :param id: The id of this TransactionSummary. # noqa: E501 + :type: str + """ + if id is None: + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def date(self): + """Gets the date of this TransactionSummary. # noqa: E501 + + + :return: The date of this TransactionSummary. # noqa: E501 + :rtype: date + """ + return self._date + + @date.setter + def date(self, date): + """Sets the date of this TransactionSummary. + + + :param date: The date of this TransactionSummary. # noqa: E501 + :type: date + """ + if date is None: + raise ValueError("Invalid value for `date`, must not be `None`") # noqa: E501 + + self._date = date + + @property + def amount(self): + """Gets the amount of this TransactionSummary. # noqa: E501 + + The transaction amount in milliunits format # noqa: E501 + + :return: The amount of this TransactionSummary. # noqa: E501 + :rtype: float + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this TransactionSummary. + + The transaction amount in milliunits format # noqa: E501 + + :param amount: The amount of this TransactionSummary. # noqa: E501 + :type: float + """ + if amount is None: + raise ValueError("Invalid value for `amount`, must not be `None`") # noqa: E501 + + self._amount = amount + + @property + def cleared(self): + """Gets the cleared of this TransactionSummary. # noqa: E501 + + The cleared status of the transaction # noqa: E501 + + :return: The cleared of this TransactionSummary. # noqa: E501 + :rtype: str + """ + return self._cleared + + @cleared.setter + def cleared(self, cleared): + """Sets the cleared of this TransactionSummary. + + The cleared status of the transaction # noqa: E501 + + :param cleared: The cleared of this TransactionSummary. # noqa: E501 + :type: str + """ + if cleared is None: + raise ValueError("Invalid value for `cleared`, must not be `None`") # noqa: E501 + allowed_values = ["cleared", "uncleared", "reconciled"] # noqa: E501 + if cleared not in allowed_values: + raise ValueError( + "Invalid value for `cleared` ({0}), must be one of {1}" # noqa: E501 + .format(cleared, allowed_values) + ) + + self._cleared = cleared + + @property + def approved(self): + """Gets the approved of this TransactionSummary. # noqa: E501 + + Whether or not the transaction is approved # noqa: E501 + + :return: The approved of this TransactionSummary. # noqa: E501 + :rtype: bool + """ + return self._approved + + @approved.setter + def approved(self, approved): + """Sets the approved of this TransactionSummary. + + Whether or not the transaction is approved # noqa: E501 + + :param approved: The approved of this TransactionSummary. # noqa: E501 + :type: bool + """ + if approved is None: + raise ValueError("Invalid value for `approved`, must not be `None`") # noqa: E501 + + self._approved = approved + + @property + def account_id(self): + """Gets the account_id of this TransactionSummary. # noqa: E501 + + + :return: The account_id of this TransactionSummary. # noqa: E501 + :rtype: str + """ + return self._account_id + + @account_id.setter + def account_id(self, account_id): + """Sets the account_id of this TransactionSummary. + + + :param account_id: The account_id of this TransactionSummary. # noqa: E501 + :type: str + """ + if account_id is None: + raise ValueError("Invalid value for `account_id`, must not be `None`") # noqa: E501 + + self._account_id = account_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TransactionSummary): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/transaction_wrapper.py b/ynab-api/ynab_api/models/transaction_wrapper.py new file mode 100644 index 0000000..7548b3a --- /dev/null +++ b/ynab-api/ynab_api/models/transaction_wrapper.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.transaction_detail import TransactionDetail # noqa: F401,E501 + + +class TransactionWrapper(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'transaction': 'TransactionDetail' + } + + attribute_map = { + 'transaction': 'transaction' + } + + def __init__(self, transaction=None): # noqa: E501 + """TransactionWrapper - a model defined in Swagger""" # noqa: E501 + + self._transaction = None + self.discriminator = None + + self.transaction = transaction + + @property + def transaction(self): + """Gets the transaction of this TransactionWrapper. # noqa: E501 + + + :return: The transaction of this TransactionWrapper. # noqa: E501 + :rtype: TransactionDetail + """ + return self._transaction + + @transaction.setter + def transaction(self, transaction): + """Sets the transaction of this TransactionWrapper. + + + :param transaction: The transaction of this TransactionWrapper. # noqa: E501 + :type: TransactionDetail + """ + if transaction is None: + raise ValueError("Invalid value for `transaction`, must not be `None`") # noqa: E501 + + self._transaction = transaction + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TransactionWrapper): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/transactions_response.py b/ynab-api/ynab_api/models/transactions_response.py new file mode 100644 index 0000000..692fee2 --- /dev/null +++ b/ynab-api/ynab_api/models/transactions_response.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.transactions_wrapper import TransactionsWrapper # noqa: F401,E501 + + +class TransactionsResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'data': 'TransactionsWrapper' + } + + attribute_map = { + 'data': 'data' + } + + def __init__(self, data=None): # noqa: E501 + """TransactionsResponse - a model defined in Swagger""" # noqa: E501 + + self._data = None + self.discriminator = None + + self.data = data + + @property + def data(self): + """Gets the data of this TransactionsResponse. # noqa: E501 + + + :return: The data of this TransactionsResponse. # noqa: E501 + :rtype: TransactionsWrapper + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this TransactionsResponse. + + + :param data: The data of this TransactionsResponse. # noqa: E501 + :type: TransactionsWrapper + """ + if data is None: + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TransactionsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/models/transactions_wrapper.py b/ynab-api/ynab_api/models/transactions_wrapper.py new file mode 100644 index 0000000..d9f4cfa --- /dev/null +++ b/ynab-api/ynab_api/models/transactions_wrapper.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from ynab_api.models.transaction_detail import TransactionDetail # noqa: F401,E501 + + +class TransactionsWrapper(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'transactions': 'list[TransactionDetail]' + } + + attribute_map = { + 'transactions': 'transactions' + } + + def __init__(self, transactions=None): # noqa: E501 + """TransactionsWrapper - a model defined in Swagger""" # noqa: E501 + + self._transactions = None + self.discriminator = None + + self.transactions = transactions + + @property + def transactions(self): + """Gets the transactions of this TransactionsWrapper. # noqa: E501 + + + :return: The transactions of this TransactionsWrapper. # noqa: E501 + :rtype: list[TransactionDetail] + """ + return self._transactions + + @transactions.setter + def transactions(self, transactions): + """Sets the transactions of this TransactionsWrapper. + + + :param transactions: The transactions of this TransactionsWrapper. # noqa: E501 + :type: list[TransactionDetail] + """ + if transactions is None: + raise ValueError("Invalid value for `transactions`, must not be `None`") # noqa: E501 + + self._transactions = transactions + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TransactionsWrapper): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/ynab-api/ynab_api/rest.py b/ynab-api/ynab_api/rest.py new file mode 100644 index 0000000..0a38fe6 --- /dev/null +++ b/ynab-api/ynab_api/rest.py @@ -0,0 +1,323 @@ +# coding: utf-8 + +""" + YNAB API Endpoints + + Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com # noqa: E501 + + OpenAPI spec version: 1.0.0 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import io +import json +import logging +import re +import ssl + +import certifi +# python 2 and python 3 compatibility library +import six +from six.moves.urllib.parse import urlencode + +try: + import urllib3 +except ImportError: + raise ImportError('Swagger python client requires urllib3.') + + +logger = logging.getLogger(__name__) + + +class RESTResponse(io.IOBase): + + def __init__(self, resp): + self.urllib3_response = resp + self.status = resp.status + self.reason = resp.reason + self.data = resp.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.urllib3_response.getheaders() + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.urllib3_response.getheader(name, default) + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + # ca_certs + if configuration.ssl_ca_cert: + ca_certs = configuration.ssl_ca_cert + else: + # if not set certificate file, use Mozilla's root certificates. + ca_certs = certifi.where() + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request(self, method, url, query_params=None, headers=None, + body=None, post_params=None, _preload_content=True, + _request_timeout=None): + """Perform requests. + + :param method: http request method + :param url: http request url + :param query_params: query parameters in the url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + """ + method = method.upper() + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] + + if post_params and body: + raise ValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 + timeout = urllib3.Timeout(total=_request_timeout) + elif (isinstance(_request_timeout, tuple) and + len(_request_timeout) == 2): + timeout = urllib3.Timeout( + connect=_request_timeout[0], read=_request_timeout[1]) + + if 'Content-Type' not in headers: + headers['Content-Type'] = 'application/json' + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + if query_params: + url += '?' + urlencode(query_params) + if re.search('json', headers['Content-Type'], re.IGNORECASE): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=False, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=True, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is + # provided in serialized form + elif isinstance(body, str): + request_body = body + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request(method, url, + fields=query_params, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + except urllib3.exceptions.SSLError as e: + msg = "{0}\n{1}".format(type(e).__name__, str(e)) + raise ApiException(status=0, reason=msg) + + if _preload_content: + r = RESTResponse(r) + + # In the python 3, the response.data is bytes. + # we need to decode it to string. + if six.PY3: + r.data = r.data.decode('utf8') + + # log response body + logger.debug("response body: %s", r.data) + + if not 200 <= r.status <= 299: + raise ApiException(http_resp=r) + + return r + + def GET(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("GET", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def HEAD(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("HEAD", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def OPTIONS(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("OPTIONS", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def DELETE(self, url, headers=None, query_params=None, body=None, + _preload_content=True, _request_timeout=None): + return self.request("DELETE", url, + headers=headers, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def POST(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("POST", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PUT(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PUT", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PATCH(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PATCH", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + +class ApiException(Exception): + + def __init__(self, status=None, reason=None, http_resp=None): + if http_resp: + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data + self.headers = http_resp.getheaders() + else: + self.status = status + self.reason = reason + self.body = None + self.headers = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + return error_message