From aa52e632b866b51d455787a96bcd2f5a63b7ac89 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 19 Aug 2019 00:19:38 -0400 Subject: move ynab-api to its own repository --- .gitignore | 3 +- .openapi-generator-ignore | 23 + .openapi-generator/VERSION | 1 + .travis.yml | 1 + Cargo.lock | 1927 -------------------- Cargo.toml | 24 +- README.md | 157 ++ bin/regen-ynab-api | 27 +- data/openapi.yaml | 2 + docs/Account.md | 21 + docs/AccountResponse.md | 11 + docs/AccountResponseData.md | 11 + docs/AccountsApi.md | 83 + docs/AccountsResponse.md | 11 + docs/AccountsResponseData.md | 12 + docs/BudgetDetail.md | 27 + docs/BudgetDetailAllOf.md | 20 + docs/BudgetDetailResponse.md | 11 + docs/BudgetDetailResponseData.md | 12 + docs/BudgetSettings.md | 12 + docs/BudgetSettingsResponse.md | 11 + docs/BudgetSettingsResponseData.md | 11 + docs/BudgetSummary.md | 17 + docs/BudgetSummaryResponse.md | 11 + docs/BudgetSummaryResponseData.md | 12 + docs/BudgetsApi.md | 110 ++ docs/BulkResponse.md | 11 + docs/BulkResponseData.md | 11 + docs/BulkResponseDataBulk.md | 12 + docs/BulkTransactions.md | 11 + docs/CategoriesApi.md | 152 ++ docs/CategoriesResponse.md | 11 + docs/CategoriesResponseData.md | 12 + docs/Category.md | 25 + docs/CategoryGroup.md | 14 + docs/CategoryGroupWithCategories.md | 15 + docs/CategoryGroupWithCategoriesAllOf.md | 11 + docs/CategoryResponse.md | 11 + docs/CategoryResponseData.md | 11 + docs/CurrencyFormat.md | 18 + docs/DateFormat.md | 11 + docs/DeprecatedApi.md | 41 + docs/ErrorDetail.md | 13 + docs/ErrorResponse.md | 11 + docs/HybridTransaction.md | 30 + docs/HybridTransactionAllOf.md | 15 + docs/HybridTransactionsResponse.md | 11 + docs/HybridTransactionsResponseData.md | 11 + docs/MonthDetail.md | 19 + docs/MonthDetailAllOf.md | 11 + docs/MonthDetailResponse.md | 11 + docs/MonthDetailResponseData.md | 11 + docs/MonthSummariesResponse.md | 11 + docs/MonthSummariesResponseData.md | 12 + docs/MonthSummary.md | 18 + docs/MonthsApi.md | 83 + docs/Payee.md | 14 + docs/PayeeLocation.md | 15 + docs/PayeeLocationResponse.md | 11 + docs/PayeeLocationResponseData.md | 11 + docs/PayeeLocationsApi.md | 106 ++ docs/PayeeLocationsResponse.md | 11 + docs/PayeeLocationsResponseData.md | 11 + docs/PayeeResponse.md | 11 + docs/PayeeResponseData.md | 11 + docs/PayeesApi.md | 83 + docs/PayeesResponse.md | 11 + docs/PayeesResponseData.md | 12 + docs/SaveCategoryResponse.md | 11 + docs/SaveCategoryResponseData.md | 12 + docs/SaveMonthCategory.md | 11 + docs/SaveMonthCategoryWrapper.md | 11 + docs/SaveTransaction.md | 21 + docs/SaveTransactionWrapper.md | 11 + docs/SaveTransactionsResponse.md | 11 + docs/SaveTransactionsResponseData.md | 15 + docs/SaveTransactionsWrapper.md | 12 + docs/ScheduledSubTransaction.md | 18 + docs/ScheduledTransactionDetail.md | 26 + docs/ScheduledTransactionDetailAllOf.md | 14 + docs/ScheduledTransactionResponse.md | 11 + docs/ScheduledTransactionResponseData.md | 11 + docs/ScheduledTransactionSummary.md | 22 + docs/ScheduledTransactionsApi.md | 83 + docs/ScheduledTransactionsResponse.md | 11 + docs/ScheduledTransactionsResponseData.md | 12 + docs/SubTransaction.md | 18 + docs/TransactionDetail.md | 29 + docs/TransactionDetailAllOf.md | 14 + docs/TransactionResponse.md | 11 + docs/TransactionResponseData.md | 11 + docs/TransactionSummary.md | 25 + docs/TransactionsApi.md | 323 ++++ docs/TransactionsResponse.md | 11 + docs/TransactionsResponseData.md | 12 + docs/UpdateTransaction.md | 22 + docs/UpdateTransactionWrapper.md | 11 + docs/UpdateTransactionsResponse.md | 11 + docs/UpdateTransactionsWrapper.md | 12 + docs/User.md | 11 + docs/UserApi.md | 36 + docs/UserResponse.md | 11 + docs/UserResponseData.md | 11 + git_push.sh | 52 + src/apis/accounts_api.rs | 87 + src/apis/budgets_api.rs | 113 ++ src/apis/categories_api.rs | 140 ++ src/apis/client.rs | 78 + src/apis/configuration.rs | 50 + src/apis/deprecated_api.rs | 61 + src/apis/mod.rs | 57 + src/apis/months_api.rs | 87 + src/apis/payee_locations_api.rs | 112 ++ src/apis/payees_api.rs | 87 + src/apis/scheduled_transactions_api.rs | 87 + src/apis/transactions_api.rs | 257 +++ src/apis/user_api.rs | 60 + src/app.rs | 46 - src/lib.rs | 10 + src/main.rs | 37 - src/models/account.rs | 94 + src/models/account_response.rs | 30 + src/models/account_response_data.rs | 30 + src/models/accounts_response.rs | 30 + src/models/accounts_response_data.rs | 34 + src/models/budget_detail.rs | 81 + src/models/budget_detail_all_of.rs | 57 + src/models/budget_detail_response.rs | 30 + src/models/budget_detail_response_data.rs | 34 + src/models/budget_settings.rs | 33 + src/models/budget_settings_response.rs | 30 + src/models/budget_settings_response_data.rs | 30 + src/models/budget_summary.rs | 51 + src/models/budget_summary_response.rs | 30 + src/models/budget_summary_response_data.rs | 33 + src/models/bulk_response.rs | 30 + src/models/bulk_response_data.rs | 30 + src/models/bulk_response_data_bulk.rs | 35 + src/models/bulk_transactions.rs | 30 + src/models/categories_response.rs | 30 + src/models/categories_response_data.rs | 34 + src/models/category.rs | 93 + src/models/category_group.rs | 41 + src/models/category_group_with_categories.rs | 45 + .../category_group_with_categories_all_of.rs | 31 + src/models/category_response.rs | 30 + src/models/category_response_data.rs | 30 + src/models/currency_format.rs | 53 + src/models/date_format.rs | 32 + src/models/error_detail.rs | 36 + src/models/error_response.rs | 30 + src/models/hybrid_transaction.rs | 133 ++ src/models/hybrid_transaction_all_of.rs | 52 + src/models/hybrid_transactions_response.rs | 30 + src/models/hybrid_transactions_response_data.rs | 30 + src/models/mod.rs | 168 ++ src/models/month_detail.rs | 61 + src/models/month_detail_all_of.rs | 31 + src/models/month_detail_response.rs | 30 + src/models/month_detail_response_data.rs | 30 + src/models/month_summaries_response.rs | 30 + src/models/month_summaries_response_data.rs | 34 + src/models/month_summary.rs | 57 + src/models/payee.rs | 41 + src/models/payee_location.rs | 43 + src/models/payee_location_response.rs | 30 + src/models/payee_location_response_data.rs | 30 + src/models/payee_locations_response.rs | 30 + src/models/payee_locations_response_data.rs | 30 + src/models/payee_response.rs | 30 + src/models/payee_response_data.rs | 30 + src/models/payees_response.rs | 30 + src/models/payees_response_data.rs | 34 + src/models/save_category_response.rs | 30 + src/models/save_category_response_data.rs | 34 + src/models/save_month_category.rs | 31 + src/models/save_month_category_wrapper.rs | 30 + src/models/save_transaction.rs | 95 + src/models/save_transaction_wrapper.rs | 30 + src/models/save_transactions_response.rs | 30 + src/models/save_transactions_response_data.rs | 46 + src/models/save_transactions_wrapper.rs | 33 + src/models/scheduled_sub_transaction.rs | 54 + src/models/scheduled_transaction_detail.rs | 128 ++ src/models/scheduled_transaction_detail_all_of.rs | 40 + src/models/scheduled_transaction_response.rs | 30 + src/models/scheduled_transaction_response_data.rs | 30 + src/models/scheduled_transaction_summary.rs | 115 ++ src/models/scheduled_transactions_response.rs | 30 + src/models/scheduled_transactions_response_data.rs | 34 + src/models/sub_transaction.rs | 54 + src/models/transaction_detail.rs | 121 ++ src/models/transaction_detail_all_of.rs | 40 + src/models/transaction_response.rs | 30 + src/models/transaction_response_data.rs | 30 + src/models/transaction_summary.rs | 108 ++ src/models/transactions_response.rs | 30 + src/models/transactions_response_data.rs | 34 + src/models/update_transaction.rs | 98 + src/models/update_transaction_wrapper.rs | 30 + src/models/update_transactions_response.rs | 30 + src/models/update_transactions_wrapper.rs | 33 + src/models/user.rs | 30 + src/models/user_response.rs | 30 + src/models/user_response_data.rs | 30 + src/paths.rs | 56 - src/views.rs | 5 - src/views/txn_table.rs | 151 -- src/views/txn_tables.rs | 353 ---- src/views/util.rs | 5 - src/ynab.rs | 10 - src/ynab/budget.rs | 216 --- src/ynab/client.rs | 76 - src/ynab/transaction.rs | 101 - src/ynab/util.rs | 6 - ynab-api/.gitignore | 3 - ynab-api/.openapi-generator-ignore | 23 - ynab-api/.openapi-generator/VERSION | 1 - ynab-api/.travis.yml | 1 - ynab-api/Cargo.toml | 13 - ynab-api/README.md | 154 -- ynab-api/docs/Account.md | 21 - ynab-api/docs/AccountResponse.md | 11 - ynab-api/docs/AccountResponseData.md | 11 - ynab-api/docs/AccountsApi.md | 83 - ynab-api/docs/AccountsResponse.md | 11 - ynab-api/docs/AccountsResponseData.md | 12 - ynab-api/docs/BudgetDetail.md | 27 - ynab-api/docs/BudgetDetailAllOf.md | 20 - ynab-api/docs/BudgetDetailResponse.md | 11 - ynab-api/docs/BudgetDetailResponseData.md | 12 - ynab-api/docs/BudgetSettings.md | 12 - ynab-api/docs/BudgetSettingsResponse.md | 11 - ynab-api/docs/BudgetSettingsResponseData.md | 11 - ynab-api/docs/BudgetSummary.md | 17 - ynab-api/docs/BudgetSummaryResponse.md | 11 - ynab-api/docs/BudgetSummaryResponseData.md | 12 - ynab-api/docs/BudgetsApi.md | 110 -- ynab-api/docs/BulkResponse.md | 11 - ynab-api/docs/BulkResponseData.md | 11 - ynab-api/docs/BulkResponseDataBulk.md | 12 - ynab-api/docs/BulkTransactions.md | 11 - ynab-api/docs/CategoriesApi.md | 152 -- ynab-api/docs/CategoriesResponse.md | 11 - ynab-api/docs/CategoriesResponseData.md | 12 - ynab-api/docs/Category.md | 25 - ynab-api/docs/CategoryGroup.md | 14 - ynab-api/docs/CategoryGroupWithCategories.md | 15 - ynab-api/docs/CategoryGroupWithCategoriesAllOf.md | 11 - ynab-api/docs/CategoryResponse.md | 11 - ynab-api/docs/CategoryResponseData.md | 11 - ynab-api/docs/CurrencyFormat.md | 18 - ynab-api/docs/DateFormat.md | 11 - ynab-api/docs/DeprecatedApi.md | 41 - ynab-api/docs/ErrorDetail.md | 13 - ynab-api/docs/ErrorResponse.md | 11 - ynab-api/docs/HybridTransaction.md | 30 - ynab-api/docs/HybridTransactionAllOf.md | 15 - ynab-api/docs/HybridTransactionsResponse.md | 11 - ynab-api/docs/HybridTransactionsResponseData.md | 11 - ynab-api/docs/MonthDetail.md | 19 - ynab-api/docs/MonthDetailAllOf.md | 11 - ynab-api/docs/MonthDetailResponse.md | 11 - ynab-api/docs/MonthDetailResponseData.md | 11 - ynab-api/docs/MonthSummariesResponse.md | 11 - ynab-api/docs/MonthSummariesResponseData.md | 12 - ynab-api/docs/MonthSummary.md | 18 - ynab-api/docs/MonthsApi.md | 83 - ynab-api/docs/Payee.md | 14 - ynab-api/docs/PayeeLocation.md | 15 - ynab-api/docs/PayeeLocationResponse.md | 11 - ynab-api/docs/PayeeLocationResponseData.md | 11 - ynab-api/docs/PayeeLocationsApi.md | 106 -- ynab-api/docs/PayeeLocationsResponse.md | 11 - ynab-api/docs/PayeeLocationsResponseData.md | 11 - ynab-api/docs/PayeeResponse.md | 11 - ynab-api/docs/PayeeResponseData.md | 11 - ynab-api/docs/PayeesApi.md | 83 - ynab-api/docs/PayeesResponse.md | 11 - ynab-api/docs/PayeesResponseData.md | 12 - ynab-api/docs/SaveCategoryResponse.md | 11 - ynab-api/docs/SaveCategoryResponseData.md | 12 - ynab-api/docs/SaveMonthCategory.md | 11 - ynab-api/docs/SaveMonthCategoryWrapper.md | 11 - ynab-api/docs/SaveTransaction.md | 21 - ynab-api/docs/SaveTransactionWrapper.md | 11 - ynab-api/docs/SaveTransactionsResponse.md | 11 - ynab-api/docs/SaveTransactionsResponseData.md | 15 - ynab-api/docs/SaveTransactionsWrapper.md | 12 - ynab-api/docs/ScheduledSubTransaction.md | 18 - ynab-api/docs/ScheduledTransactionDetail.md | 26 - ynab-api/docs/ScheduledTransactionDetailAllOf.md | 14 - ynab-api/docs/ScheduledTransactionResponse.md | 11 - ynab-api/docs/ScheduledTransactionResponseData.md | 11 - ynab-api/docs/ScheduledTransactionSummary.md | 22 - ynab-api/docs/ScheduledTransactionsApi.md | 83 - ynab-api/docs/ScheduledTransactionsResponse.md | 11 - ynab-api/docs/ScheduledTransactionsResponseData.md | 12 - ynab-api/docs/SubTransaction.md | 18 - ynab-api/docs/TransactionDetail.md | 29 - ynab-api/docs/TransactionDetailAllOf.md | 14 - ynab-api/docs/TransactionResponse.md | 11 - ynab-api/docs/TransactionResponseData.md | 11 - ynab-api/docs/TransactionSummary.md | 25 - ynab-api/docs/TransactionsApi.md | 323 ---- ynab-api/docs/TransactionsResponse.md | 11 - ynab-api/docs/TransactionsResponseData.md | 12 - ynab-api/docs/UpdateTransaction.md | 22 - ynab-api/docs/UpdateTransactionWrapper.md | 11 - ynab-api/docs/UpdateTransactionsResponse.md | 11 - ynab-api/docs/UpdateTransactionsWrapper.md | 12 - ynab-api/docs/User.md | 11 - ynab-api/docs/UserApi.md | 36 - ynab-api/docs/UserResponse.md | 11 - ynab-api/docs/UserResponseData.md | 11 - ynab-api/git_push.sh | 52 - ynab-api/src/apis/accounts_api.rs | 87 - ynab-api/src/apis/budgets_api.rs | 113 -- ynab-api/src/apis/categories_api.rs | 140 -- ynab-api/src/apis/client.rs | 78 - ynab-api/src/apis/configuration.rs | 50 - ynab-api/src/apis/deprecated_api.rs | 61 - ynab-api/src/apis/mod.rs | 57 - ynab-api/src/apis/months_api.rs | 87 - ynab-api/src/apis/payee_locations_api.rs | 112 -- ynab-api/src/apis/payees_api.rs | 87 - ynab-api/src/apis/scheduled_transactions_api.rs | 87 - ynab-api/src/apis/transactions_api.rs | 257 --- ynab-api/src/apis/user_api.rs | 60 - ynab-api/src/lib.rs | 10 - ynab-api/src/models/account.rs | 94 - ynab-api/src/models/account_response.rs | 30 - ynab-api/src/models/account_response_data.rs | 30 - ynab-api/src/models/accounts_response.rs | 30 - ynab-api/src/models/accounts_response_data.rs | 34 - ynab-api/src/models/budget_detail.rs | 81 - ynab-api/src/models/budget_detail_all_of.rs | 57 - ynab-api/src/models/budget_detail_response.rs | 30 - ynab-api/src/models/budget_detail_response_data.rs | 34 - ynab-api/src/models/budget_settings.rs | 33 - ynab-api/src/models/budget_settings_response.rs | 30 - .../src/models/budget_settings_response_data.rs | 30 - ynab-api/src/models/budget_summary.rs | 51 - ynab-api/src/models/budget_summary_response.rs | 30 - .../src/models/budget_summary_response_data.rs | 33 - ynab-api/src/models/bulk_response.rs | 30 - ynab-api/src/models/bulk_response_data.rs | 30 - ynab-api/src/models/bulk_response_data_bulk.rs | 35 - ynab-api/src/models/bulk_transactions.rs | 30 - ynab-api/src/models/categories_response.rs | 30 - ynab-api/src/models/categories_response_data.rs | 34 - ynab-api/src/models/category.rs | 93 - ynab-api/src/models/category_group.rs | 41 - .../src/models/category_group_with_categories.rs | 45 - .../category_group_with_categories_all_of.rs | 31 - ynab-api/src/models/category_response.rs | 30 - ynab-api/src/models/category_response_data.rs | 30 - ynab-api/src/models/currency_format.rs | 53 - ynab-api/src/models/date_format.rs | 32 - ynab-api/src/models/error_detail.rs | 36 - ynab-api/src/models/error_response.rs | 30 - ynab-api/src/models/hybrid_transaction.rs | 133 -- ynab-api/src/models/hybrid_transaction_all_of.rs | 52 - .../src/models/hybrid_transactions_response.rs | 30 - .../models/hybrid_transactions_response_data.rs | 30 - ynab-api/src/models/mod.rs | 168 -- ynab-api/src/models/month_detail.rs | 61 - ynab-api/src/models/month_detail_all_of.rs | 31 - ynab-api/src/models/month_detail_response.rs | 30 - ynab-api/src/models/month_detail_response_data.rs | 30 - ynab-api/src/models/month_summaries_response.rs | 30 - .../src/models/month_summaries_response_data.rs | 34 - ynab-api/src/models/month_summary.rs | 57 - ynab-api/src/models/payee.rs | 41 - ynab-api/src/models/payee_location.rs | 43 - ynab-api/src/models/payee_location_response.rs | 30 - .../src/models/payee_location_response_data.rs | 30 - ynab-api/src/models/payee_locations_response.rs | 30 - .../src/models/payee_locations_response_data.rs | 30 - ynab-api/src/models/payee_response.rs | 30 - ynab-api/src/models/payee_response_data.rs | 30 - ynab-api/src/models/payees_response.rs | 30 - ynab-api/src/models/payees_response_data.rs | 34 - ynab-api/src/models/save_category_response.rs | 30 - ynab-api/src/models/save_category_response_data.rs | 34 - ynab-api/src/models/save_month_category.rs | 31 - ynab-api/src/models/save_month_category_wrapper.rs | 30 - ynab-api/src/models/save_transaction.rs | 95 - ynab-api/src/models/save_transaction_wrapper.rs | 30 - ynab-api/src/models/save_transactions_response.rs | 30 - .../src/models/save_transactions_response_data.rs | 46 - ynab-api/src/models/save_transactions_wrapper.rs | 33 - ynab-api/src/models/scheduled_sub_transaction.rs | 54 - .../src/models/scheduled_transaction_detail.rs | 128 -- .../models/scheduled_transaction_detail_all_of.rs | 40 - .../src/models/scheduled_transaction_response.rs | 30 - .../models/scheduled_transaction_response_data.rs | 30 - .../src/models/scheduled_transaction_summary.rs | 115 -- .../src/models/scheduled_transactions_response.rs | 30 - .../models/scheduled_transactions_response_data.rs | 34 - ynab-api/src/models/sub_transaction.rs | 54 - ynab-api/src/models/transaction_detail.rs | 121 -- ynab-api/src/models/transaction_detail_all_of.rs | 40 - ynab-api/src/models/transaction_response.rs | 30 - ynab-api/src/models/transaction_response_data.rs | 30 - ynab-api/src/models/transaction_summary.rs | 108 -- ynab-api/src/models/transactions_response.rs | 30 - ynab-api/src/models/transactions_response_data.rs | 34 - ynab-api/src/models/update_transaction.rs | 98 - ynab-api/src/models/update_transaction_wrapper.rs | 30 - .../src/models/update_transactions_response.rs | 30 - ynab-api/src/models/update_transactions_wrapper.rs | 33 - ynab-api/src/models/user.rs | 30 - ynab-api/src/models/user_response.rs | 30 - ynab-api/src/models/user_response_data.rs | 30 - 415 files changed, 7615 insertions(+), 10593 deletions(-) create mode 100644 .openapi-generator-ignore create mode 100644 .openapi-generator/VERSION create mode 100644 .travis.yml delete mode 100644 Cargo.lock create mode 100644 README.md create mode 100644 data/openapi.yaml create mode 100644 docs/Account.md create mode 100644 docs/AccountResponse.md create mode 100644 docs/AccountResponseData.md create mode 100644 docs/AccountsApi.md create mode 100644 docs/AccountsResponse.md create mode 100644 docs/AccountsResponseData.md create mode 100644 docs/BudgetDetail.md create mode 100644 docs/BudgetDetailAllOf.md create mode 100644 docs/BudgetDetailResponse.md create mode 100644 docs/BudgetDetailResponseData.md create mode 100644 docs/BudgetSettings.md create mode 100644 docs/BudgetSettingsResponse.md create mode 100644 docs/BudgetSettingsResponseData.md create mode 100644 docs/BudgetSummary.md create mode 100644 docs/BudgetSummaryResponse.md create mode 100644 docs/BudgetSummaryResponseData.md create mode 100644 docs/BudgetsApi.md create mode 100644 docs/BulkResponse.md create mode 100644 docs/BulkResponseData.md create mode 100644 docs/BulkResponseDataBulk.md create mode 100644 docs/BulkTransactions.md create mode 100644 docs/CategoriesApi.md create mode 100644 docs/CategoriesResponse.md create mode 100644 docs/CategoriesResponseData.md create mode 100644 docs/Category.md create mode 100644 docs/CategoryGroup.md create mode 100644 docs/CategoryGroupWithCategories.md create mode 100644 docs/CategoryGroupWithCategoriesAllOf.md create mode 100644 docs/CategoryResponse.md create mode 100644 docs/CategoryResponseData.md create mode 100644 docs/CurrencyFormat.md create mode 100644 docs/DateFormat.md create mode 100644 docs/DeprecatedApi.md create mode 100644 docs/ErrorDetail.md create mode 100644 docs/ErrorResponse.md create mode 100644 docs/HybridTransaction.md create mode 100644 docs/HybridTransactionAllOf.md create mode 100644 docs/HybridTransactionsResponse.md create mode 100644 docs/HybridTransactionsResponseData.md create mode 100644 docs/MonthDetail.md create mode 100644 docs/MonthDetailAllOf.md create mode 100644 docs/MonthDetailResponse.md create mode 100644 docs/MonthDetailResponseData.md create mode 100644 docs/MonthSummariesResponse.md create mode 100644 docs/MonthSummariesResponseData.md create mode 100644 docs/MonthSummary.md create mode 100644 docs/MonthsApi.md create mode 100644 docs/Payee.md create mode 100644 docs/PayeeLocation.md create mode 100644 docs/PayeeLocationResponse.md create mode 100644 docs/PayeeLocationResponseData.md create mode 100644 docs/PayeeLocationsApi.md create mode 100644 docs/PayeeLocationsResponse.md create mode 100644 docs/PayeeLocationsResponseData.md create mode 100644 docs/PayeeResponse.md create mode 100644 docs/PayeeResponseData.md create mode 100644 docs/PayeesApi.md create mode 100644 docs/PayeesResponse.md create mode 100644 docs/PayeesResponseData.md create mode 100644 docs/SaveCategoryResponse.md create mode 100644 docs/SaveCategoryResponseData.md create mode 100644 docs/SaveMonthCategory.md create mode 100644 docs/SaveMonthCategoryWrapper.md create mode 100644 docs/SaveTransaction.md create mode 100644 docs/SaveTransactionWrapper.md create mode 100644 docs/SaveTransactionsResponse.md create mode 100644 docs/SaveTransactionsResponseData.md create mode 100644 docs/SaveTransactionsWrapper.md create mode 100644 docs/ScheduledSubTransaction.md create mode 100644 docs/ScheduledTransactionDetail.md create mode 100644 docs/ScheduledTransactionDetailAllOf.md create mode 100644 docs/ScheduledTransactionResponse.md create mode 100644 docs/ScheduledTransactionResponseData.md create mode 100644 docs/ScheduledTransactionSummary.md create mode 100644 docs/ScheduledTransactionsApi.md create mode 100644 docs/ScheduledTransactionsResponse.md create mode 100644 docs/ScheduledTransactionsResponseData.md create mode 100644 docs/SubTransaction.md create mode 100644 docs/TransactionDetail.md create mode 100644 docs/TransactionDetailAllOf.md create mode 100644 docs/TransactionResponse.md create mode 100644 docs/TransactionResponseData.md create mode 100644 docs/TransactionSummary.md create mode 100644 docs/TransactionsApi.md create mode 100644 docs/TransactionsResponse.md create mode 100644 docs/TransactionsResponseData.md create mode 100644 docs/UpdateTransaction.md create mode 100644 docs/UpdateTransactionWrapper.md create mode 100644 docs/UpdateTransactionsResponse.md create mode 100644 docs/UpdateTransactionsWrapper.md create mode 100644 docs/User.md create mode 100644 docs/UserApi.md create mode 100644 docs/UserResponse.md create mode 100644 docs/UserResponseData.md create mode 100644 git_push.sh create mode 100644 src/apis/accounts_api.rs create mode 100644 src/apis/budgets_api.rs create mode 100644 src/apis/categories_api.rs create mode 100644 src/apis/client.rs create mode 100644 src/apis/configuration.rs create mode 100644 src/apis/deprecated_api.rs create mode 100644 src/apis/mod.rs create mode 100644 src/apis/months_api.rs create mode 100644 src/apis/payee_locations_api.rs create mode 100644 src/apis/payees_api.rs create mode 100644 src/apis/scheduled_transactions_api.rs create mode 100644 src/apis/transactions_api.rs create mode 100644 src/apis/user_api.rs delete mode 100644 src/app.rs create mode 100644 src/lib.rs delete mode 100644 src/main.rs create mode 100644 src/models/account.rs create mode 100644 src/models/account_response.rs create mode 100644 src/models/account_response_data.rs create mode 100644 src/models/accounts_response.rs create mode 100644 src/models/accounts_response_data.rs create mode 100644 src/models/budget_detail.rs create mode 100644 src/models/budget_detail_all_of.rs create mode 100644 src/models/budget_detail_response.rs create mode 100644 src/models/budget_detail_response_data.rs create mode 100644 src/models/budget_settings.rs create mode 100644 src/models/budget_settings_response.rs create mode 100644 src/models/budget_settings_response_data.rs create mode 100644 src/models/budget_summary.rs create mode 100644 src/models/budget_summary_response.rs create mode 100644 src/models/budget_summary_response_data.rs create mode 100644 src/models/bulk_response.rs create mode 100644 src/models/bulk_response_data.rs create mode 100644 src/models/bulk_response_data_bulk.rs create mode 100644 src/models/bulk_transactions.rs create mode 100644 src/models/categories_response.rs create mode 100644 src/models/categories_response_data.rs create mode 100644 src/models/category.rs create mode 100644 src/models/category_group.rs create mode 100644 src/models/category_group_with_categories.rs create mode 100644 src/models/category_group_with_categories_all_of.rs create mode 100644 src/models/category_response.rs create mode 100644 src/models/category_response_data.rs create mode 100644 src/models/currency_format.rs create mode 100644 src/models/date_format.rs create mode 100644 src/models/error_detail.rs create mode 100644 src/models/error_response.rs create mode 100644 src/models/hybrid_transaction.rs create mode 100644 src/models/hybrid_transaction_all_of.rs create mode 100644 src/models/hybrid_transactions_response.rs create mode 100644 src/models/hybrid_transactions_response_data.rs create mode 100644 src/models/mod.rs create mode 100644 src/models/month_detail.rs create mode 100644 src/models/month_detail_all_of.rs create mode 100644 src/models/month_detail_response.rs create mode 100644 src/models/month_detail_response_data.rs create mode 100644 src/models/month_summaries_response.rs create mode 100644 src/models/month_summaries_response_data.rs create mode 100644 src/models/month_summary.rs create mode 100644 src/models/payee.rs create mode 100644 src/models/payee_location.rs create mode 100644 src/models/payee_location_response.rs create mode 100644 src/models/payee_location_response_data.rs create mode 100644 src/models/payee_locations_response.rs create mode 100644 src/models/payee_locations_response_data.rs create mode 100644 src/models/payee_response.rs create mode 100644 src/models/payee_response_data.rs create mode 100644 src/models/payees_response.rs create mode 100644 src/models/payees_response_data.rs create mode 100644 src/models/save_category_response.rs create mode 100644 src/models/save_category_response_data.rs create mode 100644 src/models/save_month_category.rs create mode 100644 src/models/save_month_category_wrapper.rs create mode 100644 src/models/save_transaction.rs create mode 100644 src/models/save_transaction_wrapper.rs create mode 100644 src/models/save_transactions_response.rs create mode 100644 src/models/save_transactions_response_data.rs create mode 100644 src/models/save_transactions_wrapper.rs create mode 100644 src/models/scheduled_sub_transaction.rs create mode 100644 src/models/scheduled_transaction_detail.rs create mode 100644 src/models/scheduled_transaction_detail_all_of.rs create mode 100644 src/models/scheduled_transaction_response.rs create mode 100644 src/models/scheduled_transaction_response_data.rs create mode 100644 src/models/scheduled_transaction_summary.rs create mode 100644 src/models/scheduled_transactions_response.rs create mode 100644 src/models/scheduled_transactions_response_data.rs create mode 100644 src/models/sub_transaction.rs create mode 100644 src/models/transaction_detail.rs create mode 100644 src/models/transaction_detail_all_of.rs create mode 100644 src/models/transaction_response.rs create mode 100644 src/models/transaction_response_data.rs create mode 100644 src/models/transaction_summary.rs create mode 100644 src/models/transactions_response.rs create mode 100644 src/models/transactions_response_data.rs create mode 100644 src/models/update_transaction.rs create mode 100644 src/models/update_transaction_wrapper.rs create mode 100644 src/models/update_transactions_response.rs create mode 100644 src/models/update_transactions_wrapper.rs create mode 100644 src/models/user.rs create mode 100644 src/models/user_response.rs create mode 100644 src/models/user_response_data.rs delete mode 100644 src/paths.rs delete mode 100644 src/views.rs delete mode 100644 src/views/txn_table.rs delete mode 100644 src/views/txn_tables.rs delete mode 100644 src/views/util.rs delete mode 100644 src/ynab.rs delete mode 100644 src/ynab/budget.rs delete mode 100644 src/ynab/client.rs delete mode 100644 src/ynab/transaction.rs delete mode 100644 src/ynab/util.rs delete mode 100644 ynab-api/.gitignore delete mode 100644 ynab-api/.openapi-generator-ignore delete mode 100644 ynab-api/.openapi-generator/VERSION delete mode 100644 ynab-api/.travis.yml delete mode 100644 ynab-api/Cargo.toml delete mode 100644 ynab-api/README.md delete mode 100644 ynab-api/docs/Account.md delete mode 100644 ynab-api/docs/AccountResponse.md delete mode 100644 ynab-api/docs/AccountResponseData.md delete mode 100644 ynab-api/docs/AccountsApi.md delete mode 100644 ynab-api/docs/AccountsResponse.md delete mode 100644 ynab-api/docs/AccountsResponseData.md delete mode 100644 ynab-api/docs/BudgetDetail.md delete mode 100644 ynab-api/docs/BudgetDetailAllOf.md delete mode 100644 ynab-api/docs/BudgetDetailResponse.md delete mode 100644 ynab-api/docs/BudgetDetailResponseData.md delete mode 100644 ynab-api/docs/BudgetSettings.md delete mode 100644 ynab-api/docs/BudgetSettingsResponse.md delete mode 100644 ynab-api/docs/BudgetSettingsResponseData.md delete mode 100644 ynab-api/docs/BudgetSummary.md delete mode 100644 ynab-api/docs/BudgetSummaryResponse.md delete mode 100644 ynab-api/docs/BudgetSummaryResponseData.md delete mode 100644 ynab-api/docs/BudgetsApi.md delete mode 100644 ynab-api/docs/BulkResponse.md delete mode 100644 ynab-api/docs/BulkResponseData.md delete mode 100644 ynab-api/docs/BulkResponseDataBulk.md delete mode 100644 ynab-api/docs/BulkTransactions.md delete mode 100644 ynab-api/docs/CategoriesApi.md delete mode 100644 ynab-api/docs/CategoriesResponse.md delete mode 100644 ynab-api/docs/CategoriesResponseData.md delete mode 100644 ynab-api/docs/Category.md delete mode 100644 ynab-api/docs/CategoryGroup.md delete mode 100644 ynab-api/docs/CategoryGroupWithCategories.md delete mode 100644 ynab-api/docs/CategoryGroupWithCategoriesAllOf.md delete mode 100644 ynab-api/docs/CategoryResponse.md delete mode 100644 ynab-api/docs/CategoryResponseData.md delete mode 100644 ynab-api/docs/CurrencyFormat.md delete mode 100644 ynab-api/docs/DateFormat.md delete mode 100644 ynab-api/docs/DeprecatedApi.md delete mode 100644 ynab-api/docs/ErrorDetail.md delete mode 100644 ynab-api/docs/ErrorResponse.md delete mode 100644 ynab-api/docs/HybridTransaction.md delete mode 100644 ynab-api/docs/HybridTransactionAllOf.md delete mode 100644 ynab-api/docs/HybridTransactionsResponse.md delete mode 100644 ynab-api/docs/HybridTransactionsResponseData.md delete mode 100644 ynab-api/docs/MonthDetail.md delete mode 100644 ynab-api/docs/MonthDetailAllOf.md delete mode 100644 ynab-api/docs/MonthDetailResponse.md delete mode 100644 ynab-api/docs/MonthDetailResponseData.md delete mode 100644 ynab-api/docs/MonthSummariesResponse.md delete mode 100644 ynab-api/docs/MonthSummariesResponseData.md delete mode 100644 ynab-api/docs/MonthSummary.md delete mode 100644 ynab-api/docs/MonthsApi.md delete mode 100644 ynab-api/docs/Payee.md delete mode 100644 ynab-api/docs/PayeeLocation.md delete mode 100644 ynab-api/docs/PayeeLocationResponse.md delete mode 100644 ynab-api/docs/PayeeLocationResponseData.md delete mode 100644 ynab-api/docs/PayeeLocationsApi.md delete mode 100644 ynab-api/docs/PayeeLocationsResponse.md delete mode 100644 ynab-api/docs/PayeeLocationsResponseData.md delete mode 100644 ynab-api/docs/PayeeResponse.md delete mode 100644 ynab-api/docs/PayeeResponseData.md delete mode 100644 ynab-api/docs/PayeesApi.md delete mode 100644 ynab-api/docs/PayeesResponse.md delete mode 100644 ynab-api/docs/PayeesResponseData.md delete mode 100644 ynab-api/docs/SaveCategoryResponse.md delete mode 100644 ynab-api/docs/SaveCategoryResponseData.md delete mode 100644 ynab-api/docs/SaveMonthCategory.md delete mode 100644 ynab-api/docs/SaveMonthCategoryWrapper.md delete mode 100644 ynab-api/docs/SaveTransaction.md delete mode 100644 ynab-api/docs/SaveTransactionWrapper.md delete mode 100644 ynab-api/docs/SaveTransactionsResponse.md delete mode 100644 ynab-api/docs/SaveTransactionsResponseData.md delete mode 100644 ynab-api/docs/SaveTransactionsWrapper.md delete mode 100644 ynab-api/docs/ScheduledSubTransaction.md delete mode 100644 ynab-api/docs/ScheduledTransactionDetail.md delete mode 100644 ynab-api/docs/ScheduledTransactionDetailAllOf.md delete mode 100644 ynab-api/docs/ScheduledTransactionResponse.md delete mode 100644 ynab-api/docs/ScheduledTransactionResponseData.md delete mode 100644 ynab-api/docs/ScheduledTransactionSummary.md delete mode 100644 ynab-api/docs/ScheduledTransactionsApi.md delete mode 100644 ynab-api/docs/ScheduledTransactionsResponse.md delete mode 100644 ynab-api/docs/ScheduledTransactionsResponseData.md delete mode 100644 ynab-api/docs/SubTransaction.md delete mode 100644 ynab-api/docs/TransactionDetail.md delete mode 100644 ynab-api/docs/TransactionDetailAllOf.md delete mode 100644 ynab-api/docs/TransactionResponse.md delete mode 100644 ynab-api/docs/TransactionResponseData.md delete mode 100644 ynab-api/docs/TransactionSummary.md delete mode 100644 ynab-api/docs/TransactionsApi.md delete mode 100644 ynab-api/docs/TransactionsResponse.md delete mode 100644 ynab-api/docs/TransactionsResponseData.md delete mode 100644 ynab-api/docs/UpdateTransaction.md delete mode 100644 ynab-api/docs/UpdateTransactionWrapper.md delete mode 100644 ynab-api/docs/UpdateTransactionsResponse.md delete mode 100644 ynab-api/docs/UpdateTransactionsWrapper.md delete mode 100644 ynab-api/docs/User.md delete mode 100644 ynab-api/docs/UserApi.md delete mode 100644 ynab-api/docs/UserResponse.md delete mode 100644 ynab-api/docs/UserResponseData.md delete mode 100644 ynab-api/git_push.sh delete mode 100644 ynab-api/src/apis/accounts_api.rs delete mode 100644 ynab-api/src/apis/budgets_api.rs delete mode 100644 ynab-api/src/apis/categories_api.rs delete mode 100644 ynab-api/src/apis/client.rs delete mode 100644 ynab-api/src/apis/configuration.rs delete mode 100644 ynab-api/src/apis/deprecated_api.rs delete mode 100644 ynab-api/src/apis/mod.rs delete mode 100644 ynab-api/src/apis/months_api.rs delete mode 100644 ynab-api/src/apis/payee_locations_api.rs delete mode 100644 ynab-api/src/apis/payees_api.rs delete mode 100644 ynab-api/src/apis/scheduled_transactions_api.rs delete mode 100644 ynab-api/src/apis/transactions_api.rs delete mode 100644 ynab-api/src/apis/user_api.rs delete mode 100644 ynab-api/src/lib.rs delete mode 100644 ynab-api/src/models/account.rs delete mode 100644 ynab-api/src/models/account_response.rs delete mode 100644 ynab-api/src/models/account_response_data.rs delete mode 100644 ynab-api/src/models/accounts_response.rs delete mode 100644 ynab-api/src/models/accounts_response_data.rs delete mode 100644 ynab-api/src/models/budget_detail.rs delete mode 100644 ynab-api/src/models/budget_detail_all_of.rs delete mode 100644 ynab-api/src/models/budget_detail_response.rs delete mode 100644 ynab-api/src/models/budget_detail_response_data.rs delete mode 100644 ynab-api/src/models/budget_settings.rs delete mode 100644 ynab-api/src/models/budget_settings_response.rs delete mode 100644 ynab-api/src/models/budget_settings_response_data.rs delete mode 100644 ynab-api/src/models/budget_summary.rs delete mode 100644 ynab-api/src/models/budget_summary_response.rs delete mode 100644 ynab-api/src/models/budget_summary_response_data.rs delete mode 100644 ynab-api/src/models/bulk_response.rs delete mode 100644 ynab-api/src/models/bulk_response_data.rs delete mode 100644 ynab-api/src/models/bulk_response_data_bulk.rs delete mode 100644 ynab-api/src/models/bulk_transactions.rs delete mode 100644 ynab-api/src/models/categories_response.rs delete mode 100644 ynab-api/src/models/categories_response_data.rs delete mode 100644 ynab-api/src/models/category.rs delete mode 100644 ynab-api/src/models/category_group.rs delete mode 100644 ynab-api/src/models/category_group_with_categories.rs delete mode 100644 ynab-api/src/models/category_group_with_categories_all_of.rs delete mode 100644 ynab-api/src/models/category_response.rs delete mode 100644 ynab-api/src/models/category_response_data.rs delete mode 100644 ynab-api/src/models/currency_format.rs delete mode 100644 ynab-api/src/models/date_format.rs delete mode 100644 ynab-api/src/models/error_detail.rs delete mode 100644 ynab-api/src/models/error_response.rs delete mode 100644 ynab-api/src/models/hybrid_transaction.rs delete mode 100644 ynab-api/src/models/hybrid_transaction_all_of.rs delete mode 100644 ynab-api/src/models/hybrid_transactions_response.rs delete mode 100644 ynab-api/src/models/hybrid_transactions_response_data.rs delete mode 100644 ynab-api/src/models/mod.rs delete mode 100644 ynab-api/src/models/month_detail.rs delete mode 100644 ynab-api/src/models/month_detail_all_of.rs delete mode 100644 ynab-api/src/models/month_detail_response.rs delete mode 100644 ynab-api/src/models/month_detail_response_data.rs delete mode 100644 ynab-api/src/models/month_summaries_response.rs delete mode 100644 ynab-api/src/models/month_summaries_response_data.rs delete mode 100644 ynab-api/src/models/month_summary.rs delete mode 100644 ynab-api/src/models/payee.rs delete mode 100644 ynab-api/src/models/payee_location.rs delete mode 100644 ynab-api/src/models/payee_location_response.rs delete mode 100644 ynab-api/src/models/payee_location_response_data.rs delete mode 100644 ynab-api/src/models/payee_locations_response.rs delete mode 100644 ynab-api/src/models/payee_locations_response_data.rs delete mode 100644 ynab-api/src/models/payee_response.rs delete mode 100644 ynab-api/src/models/payee_response_data.rs delete mode 100644 ynab-api/src/models/payees_response.rs delete mode 100644 ynab-api/src/models/payees_response_data.rs delete mode 100644 ynab-api/src/models/save_category_response.rs delete mode 100644 ynab-api/src/models/save_category_response_data.rs delete mode 100644 ynab-api/src/models/save_month_category.rs delete mode 100644 ynab-api/src/models/save_month_category_wrapper.rs delete mode 100644 ynab-api/src/models/save_transaction.rs delete mode 100644 ynab-api/src/models/save_transaction_wrapper.rs delete mode 100644 ynab-api/src/models/save_transactions_response.rs delete mode 100644 ynab-api/src/models/save_transactions_response_data.rs delete mode 100644 ynab-api/src/models/save_transactions_wrapper.rs delete mode 100644 ynab-api/src/models/scheduled_sub_transaction.rs delete mode 100644 ynab-api/src/models/scheduled_transaction_detail.rs delete mode 100644 ynab-api/src/models/scheduled_transaction_detail_all_of.rs delete mode 100644 ynab-api/src/models/scheduled_transaction_response.rs delete mode 100644 ynab-api/src/models/scheduled_transaction_response_data.rs delete mode 100644 ynab-api/src/models/scheduled_transaction_summary.rs delete mode 100644 ynab-api/src/models/scheduled_transactions_response.rs delete mode 100644 ynab-api/src/models/scheduled_transactions_response_data.rs delete mode 100644 ynab-api/src/models/sub_transaction.rs delete mode 100644 ynab-api/src/models/transaction_detail.rs delete mode 100644 ynab-api/src/models/transaction_detail_all_of.rs delete mode 100644 ynab-api/src/models/transaction_response.rs delete mode 100644 ynab-api/src/models/transaction_response_data.rs delete mode 100644 ynab-api/src/models/transaction_summary.rs delete mode 100644 ynab-api/src/models/transactions_response.rs delete mode 100644 ynab-api/src/models/transactions_response_data.rs delete mode 100644 ynab-api/src/models/update_transaction.rs delete mode 100644 ynab-api/src/models/update_transaction_wrapper.rs delete mode 100644 ynab-api/src/models/update_transactions_response.rs delete mode 100644 ynab-api/src/models/update_transactions_wrapper.rs delete mode 100644 ynab-api/src/models/user.rs delete mode 100644 ynab-api/src/models/user_response.rs delete mode 100644 ynab-api/src/models/user_response_data.rs diff --git a/.gitignore b/.gitignore index 53eaa21..6aa1064 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ -/target +/target/ **/*.rs.bk +Cargo.lock diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore new file mode 100644 index 0000000..7484ee5 --- /dev/null +++ b/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# 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 OpenAPI Generator 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/.openapi-generator/VERSION b/.openapi-generator/VERSION new file mode 100644 index 0000000..aa31e71 --- /dev/null +++ b/.openapi-generator/VERSION @@ -0,0 +1 @@ +4.0.3 \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..22761ba --- /dev/null +++ b/.travis.yml @@ -0,0 +1 @@ +language: rust diff --git a/Cargo.lock b/Cargo.lock deleted file mode 100644 index 17dc685..0000000 --- a/Cargo.lock +++ /dev/null @@ -1,1927 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -[[package]] -name = "adler32" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "aho-corasick" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "arc-swap" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "array-macro" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "arrayref" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "arrayvec" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "autocfg" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "backtrace" -version = "0.3.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "backtrace-sys 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "backtrace-sys" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cc 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "base64" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "bitflags" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "blake2b_simd" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "constant_time_eq 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "byteorder" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "bytes" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "c2-chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ppv-lite86 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "cc" -version = "1.0.40" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "cfg-if" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "chrono" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "constant_time_eq" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "cookie" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "cookie_store" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "publicsuffix 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "try_from 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "core-foundation" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "core-foundation-sys" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "crc32fast" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "crossbeam-channel" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "crossbeam-deque" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "crossbeam-epoch 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "memoffset 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "crossbeam-queue" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "crossbeam-utils" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "cursive" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "chrono 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-channel 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "enum-map 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "enumset 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hashbrown 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "maplit 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "ncurses 5.99.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "signal-hook 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "term_size 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-segmentation 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "xi-unicode 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "cursive_table_view" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cursive 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "darling" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "darling_core 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "darling_macro 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "darling_core" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "ident_case 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "darling_macro" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "darling_core 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "directories" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "dirs-sys 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "dirs-sys" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_users 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "doc-comment" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "dtoa" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "either" -version = "1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "encoding_rs" -version = "0.8.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "enum-map" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "enum-map-derive 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "enum-map-internals 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "enum-map-derive" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "enum-map-internals" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "array-macro 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "enumset" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "enumset_derive 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "enumset_derive" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "darling 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "error-chain" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "backtrace 0.3.34 (registry+https://github.com/rust-lang/crates.io-index)", - "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "failure" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "backtrace 0.3.34 (registry+https://github.com/rust-lang/crates.io-index)", - "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "failure_derive" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", - "synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "flate2" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "miniz_oxide 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "fnv" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "fuchsia-cprng" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "fuchsia-zircon" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "fuchsia-zircon-sys" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "futures" -version = "0.1.28" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "futures-cpupool" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "getrandom" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "wasi 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "h2" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "hashbrown" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "http" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "http-body" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "httparse" -version = "1.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "hyper" -version = "0.12.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "h2 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "http-body 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "want 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "hyper-tls" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.33 (registry+https://github.com/rust-lang/crates.io-index)", - "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "idna" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "indexmap" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "iovec" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "itoa" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "lazy_static" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "libc" -version = "0.2.62" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "lock_api" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "log" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "maplit" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "matches" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "memchr" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "memoffset" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "mime" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unicase 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "mime_guess" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "miniz_oxide" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "mio" -version = "0.6.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "miow" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "native-tls" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl 0.10.24 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.49 (registry+https://github.com/rust-lang/crates.io-index)", - "schannel 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "ncurses" -version = "5.99.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cc 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "net2" -version = "0.2.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "nodrop" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "num" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num-complex 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", - "num-iter 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", - "num-rational 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num-complex" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num-integer" -version = "0.1.41" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num-iter" -version = "0.1.39" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num-rational" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num-traits" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num_cpus" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "openssl" -version = "0.10.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.49 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "openssl-probe" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "openssl-sys" -version = "0.9.49" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "vcpkg 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "owning_ref" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "parking_lot" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "parking_lot_core" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "percent-encoding" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "pkg-config" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "ppv-lite86" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "proc-macro2" -version = "0.4.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "proc-macro2" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "publicsuffix" -version = "1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", - "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "quote" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "quote" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "getrandom 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_chacha" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_chacha" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "c2-chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_core" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_core" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "rand_core" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "getrandom 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_hc" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_isaac" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_jitter" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_os" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_pcg" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_xorshift" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rdrand" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "redox_syscall" -version = "0.1.56" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "redox_users" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", - "rust-argon2 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "regex" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "regex-syntax" -version = "0.6.11" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "remove_dir_all" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "reqwest" -version = "0.9.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cookie_store 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "encoding_rs 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.12.33 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper-tls 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", - "mime_guess 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_urlencoded 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", - "winreg 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rust-argon2" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "blake2b_simd 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "ryu" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "schannel" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "scopeguard" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "scopeguard" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "security-framework" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", - "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "security-framework-sys" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "serde" -version = "1.0.99" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "serde_derive 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "serde_derive" -version = "1.0.99" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "serde_json" -version = "1.0.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "serde_urlencoded" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "signal-hook" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "signal-hook-registry 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "signal-hook-registry" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "arc-swap 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "slab" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "smallvec" -version = "0.6.10" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "snafu" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "backtrace 0.3.34 (registry+https://github.com/rust-lang/crates.io-index)", - "doc-comment 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "snafu-derive 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "snafu-derive" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "stable_deref_trait" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "string" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "strsim" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "syn" -version = "0.15.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "syn" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "synstructure" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tempfile" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", - "remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "term_size" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "thread_local" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "time" -version = "0.1.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tokio" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-threadpool 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tokio-buf" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tokio-current-thread" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tokio-executor" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tokio-io" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tokio-reactor" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-sync 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tokio-sync" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tokio-tcp" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tokio-threadpool" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tokio-timer" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "toml" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "serde 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "try-lock" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "try_from" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unicase" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unicode-normalization" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unicode-segmentation" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unicode-width" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unicode-xid" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unicode-xid" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "url" -version = "1.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "uuid" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "vcpkg" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "version_check" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "want" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "wasi" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winreg" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "ws2_32-sys" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "xi-unicode" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "ynab-api" -version = "1.0.0" -dependencies = [ - "reqwest 0.9.19 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "ynab-reimbursements" -version = "0.1.0" -dependencies = [ - "cursive 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "cursive_table_view 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "directories 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "snafu 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "ynab-api 1.0.0", -] - -[metadata] -"checksum adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e522997b529f05601e05166c07ed17789691f562762c7f3b987263d2dedee5c" -"checksum aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "58fb5e95d83b38284460a5fda7d6470aa0b8844d283a0b614b8535e880800d2d" -"checksum arc-swap 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "854ede29f7a0ce90519fb2439d030320c6201119b87dab0ee96044603e1130b9" -"checksum array-macro 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7c4ff37a25fb442a1fecfd399be0dde685558bca30fb998420532889a36852d2" -"checksum arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0d382e583f07208808f6b1249e60848879ba3543f57c32277bf52d69c2f0f0ee" -"checksum arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b8d73f9beda665eaa98ab9e4f7442bd4e7de6652587de55b2525e52e29c1b0ba" -"checksum autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "22130e92352b948e7e82a49cdb0aa94f2211761117f29e052dd397c1ac33542b" -"checksum backtrace 0.3.34 (registry+https://github.com/rust-lang/crates.io-index)" = "b5164d292487f037ece34ec0de2fcede2faa162f085dd96d2385ab81b12765ba" -"checksum backtrace-sys 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)" = "82a830b4ef2d1124a711c71d263c5abdc710ef8e907bd508c88be475cebc422b" -"checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" -"checksum bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3d155346769a6855b86399e9bc3814ab343cd3d62c7e985113d46a0ec3c281fd" -"checksum blake2b_simd 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "461f4b879a8eb70c1debf7d0788a9a5ff15f1ea9d25925fea264ef4258bed6b2" -"checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" -"checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" -"checksum c2-chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7d64d04786e0f528460fc884753cf8dddcc466be308f6026f8e355c41a0e4101" -"checksum cc 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)" = "b548a4ee81fccb95919d4e22cfea83c7693ebfd78f0495493178db20b3139da7" -"checksum cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "b486ce3ccf7ffd79fdeb678eac06a9e6c09fc88d33836340becb8fffe87c5e33" -"checksum chrono 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "77d81f58b7301084de3b958691458a53c3f7e0b1d702f77e550b6a88e3a88abe" -"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -"checksum constant_time_eq 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8ff012e225ce166d4422e0e78419d901719760f62ae2b7969ca6b564d1b54a9e" -"checksum cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "888604f00b3db336d2af898ec3c1d5d0ddf5e6d462220f2ededc33a87ac4bbd5" -"checksum cookie_store 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "46750b3f362965f197996c4448e4a0935e791bf7d6631bfce9ee0af3d24c919c" -"checksum core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d" -"checksum core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" -"checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" -"checksum crossbeam-channel 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c8ec7fcd21571dc78f96cc96243cab8d8f035247c3efd16c687be154c3fa9efa" -"checksum crossbeam-deque 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b18cd2e169ad86297e6bc0ad9aa679aee9daa4f19e8163860faf7c164e4f5a71" -"checksum crossbeam-epoch 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "fedcd6772e37f3da2a9af9bf12ebe046c0dfe657992377b4df982a2b54cd37a9" -"checksum crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" -"checksum crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6" -"checksum cursive 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b7ecc7282b5361471b607c26f44148205607e26d48a2fc65bd16e7619b1ebb78" -"checksum cursive_table_view 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9dd5f62c7bef9a9fbbe65b39c5a7453e394bfca01034b7c22ac07cc330005a03" -"checksum darling 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fcfbcb0c5961907597a7d1148e3af036268f2b773886b8bb3eeb1e1281d3d3d6" -"checksum darling_core 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6afc018370c3bff3eb51f89256a6bdb18b4fdcda72d577982a14954a7a0b402c" -"checksum darling_macro 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c6d8dac1c6f1d29a41c4712b4400f878cb4fcc4c7628f298dd75038e024998d1" -"checksum directories 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "551a778172a450d7fc12e629ca3b0428d00f6afa9a43da1b630d54604e97371c" -"checksum dirs-sys 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "afa0b23de8fd801745c471deffa6e12d248f962c9fd4b4c33787b055599bde7b" -"checksum doc-comment 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "923dea538cea0aa3025e8685b20d6ee21ef99c4f77e954a30febbaac5ec73a97" -"checksum dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ea57b42383d091c85abcc2706240b94ab2a8fa1fc81c10ff23c4de06e2a90b5e" -"checksum either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5527cfe0d098f36e3f8839852688e63c8fff1c90b2b405aef730615f9a7bcf7b" -"checksum encoding_rs 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)" = "4155785c79f2f6701f185eb2e6b4caf0555ec03477cb4c70db67b465311620ed" -"checksum enum-map 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ccd9b2d5e0eb5c2ff851791e2af90ab4531b1168cfc239d1c0bf467e60ba3c89" -"checksum enum-map-derive 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6dfc5eff4193f33a536598aff7b77260c6ed1c353b2bb59a3e50636f47410bb0" -"checksum enum-map-internals 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d2436d68e28d1ec1646f3e54003c6b4c4e192785532a687d52a3d2ba56c346bb" -"checksum enumset 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cac0a22e173f6570a7d69a2ab9e3fe79cf0dcdd0fdb162bfc932b97158f2b2a7" -"checksum enumset_derive 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "01d93b926a992a4a526c2a14e2faf734fdef5bf9d0a52ba69a2ca7d4494c284b" -"checksum error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3ab49e9dcb602294bc42f9a7dfc9bc6e936fca4418ea300dbfb84fe16de0b7d9" -"checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2" -"checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1" -"checksum flate2 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)" = "2adaffba6388640136149e18ed080b77a78611c1e1d6de75aedcdf78df5d4682" -"checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" -"checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -"checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" -"checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" -"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" -"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" -"checksum futures 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "45dc39533a6cae6da2b56da48edae506bb767ec07370f86f70fc062e9d435869" -"checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" -"checksum getrandom 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "6171a6cc63fbabbe27c2b5ee268e8b7fe5dc1eb0dd2dfad537c1dfed6f69117e" -"checksum h2 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)" = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462" -"checksum hashbrown 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "29fba9abe4742d586dfd0c06ae4f7e73a1c2d86b856933509b269d82cdf06e18" -"checksum http 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "372bcb56f939e449117fb0869c2e8fd8753a8223d92a172c6e808cf123a5b6e4" -"checksum http-body 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6741c859c1b2463a423a1dbce98d418e6c3c3fc720fb0d45528657320920292d" -"checksum httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" -"checksum hyper 0.12.33 (registry+https://github.com/rust-lang/crates.io-index)" = "7cb44cbce9d8ee4fb36e4c0ad7b794ac44ebaad924b9c8291a63215bb44c2c8f" -"checksum hyper-tls 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3a800d6aa50af4b5850b2b0f659625ce9504df908e9733b635720483be26174f" -"checksum ident_case 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" -"checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" -"checksum indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7e81a7c05f79578dbc15793d8b619db9ba32b4577003ef3af1a91c416798c58d" -"checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" -"checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" -"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -"checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14" -"checksum libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)" = "34fcd2c08d2f832f376f4173a231990fa5aef4e99fb569867318a227ef4c06ba" -"checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" -"checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" -"checksum maplit 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "08cbb6b4fef96b6d77bfc40ec491b1690c779e77b05cd9f07f787ed376fd4c43" -"checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" -"checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e" -"checksum memoffset 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ce6075db033bbbb7ee5a0bbd3a3186bbae616f57fb001c485c7ff77955f8177f" -"checksum mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)" = "3e27ca21f40a310bd06d9031785f4801710d566c184a6e15bad4f1d9b65f9425" -"checksum mime_guess 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1a0ed03949aef72dbdf3116a383d7b38b4768e6f960528cd6a6044aa9ed68599" -"checksum miniz_oxide 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7108aff85b876d06f22503dcce091e29f76733b2bfdd91eebce81f5e68203a10" -"checksum mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)" = "83f51996a3ed004ef184e16818edc51fadffe8e7ca68be67f9dee67d84d0ff23" -"checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" -"checksum native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4b2df1a4c22fd44a62147fd8f13dd0f95c9d8ca7b2610299b2a2f9cf8964274e" -"checksum ncurses 5.99.0 (registry+https://github.com/rust-lang/crates.io-index)" = "15699bee2f37e9f8828c7b35b2bc70d13846db453f2d507713b758fabe536b82" -"checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" -"checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" -"checksum num 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cf4825417e1e1406b3782a8ce92f4d53f26ec055e3622e1881ca8e9f5f9e08db" -"checksum num-complex 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "fcb0cf31fb3ff77e6d2a6ebd6800df7fdcd106f2ad89113c9130bcd07f93dffc" -"checksum num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)" = "b85e541ef8255f6cf42bbfe4ef361305c6c135d10919ecc26126c4e5ae94bc09" -"checksum num-iter 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "76bd5272412d173d6bf9afdf98db8612bbabc9a7a830b7bfc9c188911716132e" -"checksum num-rational 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f2885278d5fe2adc2f75ced642d52d879bffaceb5a2e0b1d4309ffdfb239b454" -"checksum num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "6ba9a427cfca2be13aa6f6403b0b7e7368fe982bfa16fccc450ce74c46cd9b32" -"checksum num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bcef43580c035376c0705c42792c294b66974abbfd2789b511784023f71f3273" -"checksum openssl 0.10.24 (registry+https://github.com/rust-lang/crates.io-index)" = "8152bb5a9b5b721538462336e3bef9a539f892715e5037fda0f984577311af15" -"checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" -"checksum openssl-sys 0.9.49 (registry+https://github.com/rust-lang/crates.io-index)" = "f4fad9e54bd23bd4cbbe48fdc08a1b8091707ac869ef8508edea2fec77dcc884" -"checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" -"checksum parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ab41b4aed082705d1056416ae4468b6ea99d52599ecf3169b00088d43113e337" -"checksum parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9" -"checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" -"checksum pkg-config 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c1d2cfa5a714db3b5f24f0915e74fcdf91d09d496ba61329705dda7774d2af" -"checksum ppv-lite86 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e3cbf9f658cdb5000fcf6f362b8ea2ba154b9f146a61c7a20d647034c6b6561b" -"checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" -"checksum proc-macro2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4c5c2380ae88876faae57698be9e9775e3544decad214599c3a6266cca6ac802" -"checksum publicsuffix 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5afecba86dcf1e4fd610246f89899d1924fe12e1e89f555eb7c7f710f3c5ad1d" -"checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" -"checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" -"checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" -"checksum rand 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d47eab0e83d9693d40f825f86948aa16eff6750ead4bdffc4ab95b8b3a7f052c" -"checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" -"checksum rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853" -"checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" -"checksum rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" -"checksum rand_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "615e683324e75af5d43d8f7a39ffe3ee4a9dc42c5c701167a71dc59c3a493aca" -"checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" -"checksum rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -"checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" -"checksum rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" -"checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" -"checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" -"checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" -"checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" -"checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" -"checksum redox_users 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4ecedbca3bf205f8d8f5c2b44d83cd0690e39ee84b951ed649e9f1841132b66d" -"checksum regex 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88c3d9193984285d544df4a30c23a4e62ead42edf70a4452ceb76dac1ce05c26" -"checksum regex-syntax 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b143cceb2ca5e56d5671988ef8b15615733e7ee16cd348e064333b251b89343f" -"checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" -"checksum reqwest 0.9.19 (registry+https://github.com/rust-lang/crates.io-index)" = "1d0777154c2c3eb54f5c480db01de845652d941e47191277cc673634c3853939" -"checksum rust-argon2 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4ca4eaef519b494d1f2848fc602d18816fed808a981aedf4f1f00ceb7c9d32cf" -"checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" -"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -"checksum ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997" -"checksum schannel 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "f2f6abf258d99c3c1c5c2131d99d064e94b7b3dd5f416483057f308fea253339" -"checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" -"checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" -"checksum security-framework 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eee63d0f4a9ec776eeb30e220f0bc1e092c3ad744b2a379e3993070364d3adc2" -"checksum security-framework-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9636f8989cbf61385ae4824b98c1aaa54c994d7d8b41f11c601ed799f0549a56" -"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" -"checksum serde 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)" = "fec2851eb56d010dc9a21b89ca53ee75e6528bab60c11e89d38390904982da9f" -"checksum serde_derive 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)" = "cb4dc18c61206b08dc98216c98faa0232f4337e1e1b8574551d5bad29ea1b425" -"checksum serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)" = "051c49229f282f7c6f3813f8286cc1e3323e8051823fce42c7ea80fe13521704" -"checksum serde_urlencoded 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "642dd69105886af2efd227f75a520ec9b44a820d65bc133a9131f7d229fd165a" -"checksum signal-hook 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4f61c4d59f3aaa9f61bba6450a9b80ba48362fd7d651689e7a10c453b1f6dc68" -"checksum signal-hook-registry 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1797d48f38f91643908bb14e35e79928f9f4b3cefb2420a564dde0991b4358dc" -"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" -"checksum smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7" -"checksum snafu 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b028158eb06caa8345bee10cccfb25fa632beccf0ef5308832b4fd4b78a7db48" -"checksum snafu-derive 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bf50aaef500c248a590e2696e8bf8c7620ca2235b9bb90a70363d82dd1abec6a" -"checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" -"checksum string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d24114bfcceb867ca7f71a0d3fe45d45619ec47a6fbfa98cb14e14250bfa5d6d" -"checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550" -"checksum syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)" = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" -"checksum syn 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "158521e6f544e7e3dcfc370ac180794aa38cb34a1b1e07609376d4adcf429b93" -"checksum synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "02353edf96d6e4dc81aea2d8490a7e9db177bf8acb0e951c24940bf866cb313f" -"checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" -"checksum term_size 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9e5b9a66db815dcfd2da92db471106457082577c3c278d4138ab3e3b4e189327" -"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" -"checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" -"checksum tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)" = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" -"checksum tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8fb220f46c53859a4b7ec083e41dec9778ff0b1851c0942b211edb89e0ccdc46" -"checksum tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "d16217cad7f1b840c5a97dfb3c43b0c871fef423a6e8d2118c604e843662a443" -"checksum tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "0f27ee0e6db01c5f0b2973824547ce7e637b2ed79b891a9677b0de9bd532b6ac" -"checksum tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5090db468dad16e1a7a54c8c67280c5e4b544f3d3e018f0b913b400261f85926" -"checksum tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6af16bfac7e112bea8b0442542161bfc41cbfa4466b580bdda7d18cb88b911ce" -"checksum tokio-sync 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2162248ff317e2bc713b261f242b69dbb838b85248ed20bb21df56d60ea4cae7" -"checksum tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1d14b10654be682ac43efee27401d792507e30fd8d26389e1da3b185de2e4119" -"checksum tokio-threadpool 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "90ca01319dea1e376a001e8dc192d42ebde6dd532532a5bad988ac37db365b19" -"checksum tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "f2106812d500ed25a4f38235b9cae8f78a09edf43203e16e59c3b769a342a60e" -"checksum toml 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c7aabe75941d914b72bf3e5d3932ed92ce0664d49d8432305a8b547c37227724" -"checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" -"checksum try_from 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "283d3b89e1368717881a9d51dad843cc435380d8109c9e47d38780a324698d8b" -"checksum unicase 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a84e5511b2a947f3ae965dcb29b13b7b1691b6e7332cf5dbc1744138d5acb7f6" -"checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" -"checksum unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "141339a08b982d942be2ca06ff8b076563cbe223d1befd5450716790d44e2426" -"checksum unicode-segmentation 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1967f4cdfc355b37fd76d2a954fb2ed3871034eb4f26d60537d88795cfc332a9" -"checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526" -"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" -"checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" -"checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" -"checksum uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "90dbc611eb48397705a6b0f6e917da23ae517e4d127123d2cf7674206627d32a" -"checksum vcpkg 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "33dd455d0f96e90a75803cfeb7f948768c08d70a6de9a8d2362461935698bf95" -"checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" -"checksum want 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b6395efa4784b027708f7451087e647ec73cc74f5d9bc2e418404248d679a230" -"checksum wasi 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fd5442abcac6525a045cc8c795aedb60da7a2e5e89c7bf18a0d5357849bb23c7" -"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" -"checksum winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "f10e386af2b13e47c89e7236a7a14a086791a2b88ebad6df9bf42040195cf770" -"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" -"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -"checksum winreg 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b2986deb581c4fe11b621998a5e53361efe6b48a151178d0cd9eeffa4dc6acc9" -"checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" -"checksum xi-unicode 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "12ea8eda4b1eb72f02d148402e23832d56a33f55d8c1b2d5bcdde91d79d47cb1" diff --git a/Cargo.toml b/Cargo.toml index a153006..ee8992e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,13 +1,17 @@ [package] -name = "ynab-reimbursements" -version = "0.1.0" -authors = ["Jesse Luehrs "] -edition = "2018" +name = "ynab-api" +version = "1.0.0" +authors = ["Jesse Luehrs ", "You Need A Budget, LLC"] +description = "OpenAPI-generated API bindings for the YNAB API" +repository = "https://git.tozt.net/ynab-api" +license = "Apache-2.0" + [dependencies] -cursive = "0.12" -# cursive = { version = "0.12", default-features = false, features = ["crossterm-backend"] } -cursive_table_view = "0.10" -directories = "2.0" -snafu = "0.4" -ynab-api = { path = "ynab-api" } +serde = "^1.0" +serde_derive = "^1.0" +serde_json = "^1.0" +url = "1.5" +reqwest = "~0.9" + +[dev-dependencies] diff --git a/README.md b/README.md new file mode 100644 index 0000000..d7e64d9 --- /dev/null +++ b/README.md @@ -0,0 +1,157 @@ +# Rust API client for 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 + +## Overview + +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: org.openapitools.codegen.languages.RustClientCodegen + +## Installation + +Put the package under your project folder and add the following to `Cargo.toml` under `[dependencies]`: + +``` + openapi = { path = "./generated" } +``` + +## 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_budget_settings_by_id**](docs/BudgetsApi.md#get_budget_settings_by_id) | **get** /budgets/{budget_id}/settings | Budget Settings +*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 +*CategoriesApi* | [**get_month_category_by_id**](docs/CategoriesApi.md#get_month_category_by_id) | **get** /budgets/{budget_id}/months/{month}/categories/{category_id} | Single category for a specific budget month +*CategoriesApi* | [**update_month_category**](docs/CategoriesApi.md#update_month_category) | **patch** /budgets/{budget_id}/months/{month}/categories/{category_id} | Update a category for a specific month +*DeprecatedApi* | [**bulk_create_transactions**](docs/DeprecatedApi.md#bulk_create_transactions) | **post** /budgets/{budget_id}/transactions/bulk | Bulk create transactions +*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* | [**create_transaction**](docs/TransactionsApi.md#create_transaction) | **post** /budgets/{budget_id}/transactions | Create a single transaction or multiple transactions +*TransactionsApi* | [**get_transaction_by_id**](docs/TransactionsApi.md#get_transaction_by_id) | **get** /budgets/{budget_id}/transactions/{transaction_id} | Single 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_payee**](docs/TransactionsApi.md#get_transactions_by_payee) | **get** /budgets/{budget_id}/payees/{payee_id}/transactions | List payee transactions +*TransactionsApi* | [**update_transaction**](docs/TransactionsApi.md#update_transaction) | **put** /budgets/{budget_id}/transactions/{transaction_id} | Updates an existing transaction +*TransactionsApi* | [**update_transactions**](docs/TransactionsApi.md#update_transactions) | **patch** /budgets/{budget_id}/transactions | Update multiple transactions +*UserApi* | [**get_user**](docs/UserApi.md#get_user) | **get** /user | User info + + +## Documentation For Models + + - [Account](docs/Account.md) + - [AccountResponse](docs/AccountResponse.md) + - [AccountResponseData](docs/AccountResponseData.md) + - [AccountsResponse](docs/AccountsResponse.md) + - [AccountsResponseData](docs/AccountsResponseData.md) + - [BudgetDetail](docs/BudgetDetail.md) + - [BudgetDetailAllOf](docs/BudgetDetailAllOf.md) + - [BudgetDetailResponse](docs/BudgetDetailResponse.md) + - [BudgetDetailResponseData](docs/BudgetDetailResponseData.md) + - [BudgetSettings](docs/BudgetSettings.md) + - [BudgetSettingsResponse](docs/BudgetSettingsResponse.md) + - [BudgetSettingsResponseData](docs/BudgetSettingsResponseData.md) + - [BudgetSummary](docs/BudgetSummary.md) + - [BudgetSummaryResponse](docs/BudgetSummaryResponse.md) + - [BudgetSummaryResponseData](docs/BudgetSummaryResponseData.md) + - [BulkResponse](docs/BulkResponse.md) + - [BulkResponseData](docs/BulkResponseData.md) + - [BulkResponseDataBulk](docs/BulkResponseDataBulk.md) + - [BulkTransactions](docs/BulkTransactions.md) + - [CategoriesResponse](docs/CategoriesResponse.md) + - [CategoriesResponseData](docs/CategoriesResponseData.md) + - [Category](docs/Category.md) + - [CategoryGroup](docs/CategoryGroup.md) + - [CategoryGroupWithCategories](docs/CategoryGroupWithCategories.md) + - [CategoryGroupWithCategoriesAllOf](docs/CategoryGroupWithCategoriesAllOf.md) + - [CategoryResponse](docs/CategoryResponse.md) + - [CategoryResponseData](docs/CategoryResponseData.md) + - [CurrencyFormat](docs/CurrencyFormat.md) + - [DateFormat](docs/DateFormat.md) + - [ErrorDetail](docs/ErrorDetail.md) + - [ErrorResponse](docs/ErrorResponse.md) + - [HybridTransaction](docs/HybridTransaction.md) + - [HybridTransactionAllOf](docs/HybridTransactionAllOf.md) + - [HybridTransactionsResponse](docs/HybridTransactionsResponse.md) + - [HybridTransactionsResponseData](docs/HybridTransactionsResponseData.md) + - [MonthDetail](docs/MonthDetail.md) + - [MonthDetailAllOf](docs/MonthDetailAllOf.md) + - [MonthDetailResponse](docs/MonthDetailResponse.md) + - [MonthDetailResponseData](docs/MonthDetailResponseData.md) + - [MonthSummariesResponse](docs/MonthSummariesResponse.md) + - [MonthSummariesResponseData](docs/MonthSummariesResponseData.md) + - [MonthSummary](docs/MonthSummary.md) + - [Payee](docs/Payee.md) + - [PayeeLocation](docs/PayeeLocation.md) + - [PayeeLocationResponse](docs/PayeeLocationResponse.md) + - [PayeeLocationResponseData](docs/PayeeLocationResponseData.md) + - [PayeeLocationsResponse](docs/PayeeLocationsResponse.md) + - [PayeeLocationsResponseData](docs/PayeeLocationsResponseData.md) + - [PayeeResponse](docs/PayeeResponse.md) + - [PayeeResponseData](docs/PayeeResponseData.md) + - [PayeesResponse](docs/PayeesResponse.md) + - [PayeesResponseData](docs/PayeesResponseData.md) + - [SaveCategoryResponse](docs/SaveCategoryResponse.md) + - [SaveCategoryResponseData](docs/SaveCategoryResponseData.md) + - [SaveMonthCategory](docs/SaveMonthCategory.md) + - [SaveMonthCategoryWrapper](docs/SaveMonthCategoryWrapper.md) + - [SaveTransaction](docs/SaveTransaction.md) + - [SaveTransactionWrapper](docs/SaveTransactionWrapper.md) + - [SaveTransactionsResponse](docs/SaveTransactionsResponse.md) + - [SaveTransactionsResponseData](docs/SaveTransactionsResponseData.md) + - [SaveTransactionsWrapper](docs/SaveTransactionsWrapper.md) + - [ScheduledSubTransaction](docs/ScheduledSubTransaction.md) + - [ScheduledTransactionDetail](docs/ScheduledTransactionDetail.md) + - [ScheduledTransactionDetailAllOf](docs/ScheduledTransactionDetailAllOf.md) + - [ScheduledTransactionResponse](docs/ScheduledTransactionResponse.md) + - [ScheduledTransactionResponseData](docs/ScheduledTransactionResponseData.md) + - [ScheduledTransactionSummary](docs/ScheduledTransactionSummary.md) + - [ScheduledTransactionsResponse](docs/ScheduledTransactionsResponse.md) + - [ScheduledTransactionsResponseData](docs/ScheduledTransactionsResponseData.md) + - [SubTransaction](docs/SubTransaction.md) + - [TransactionDetail](docs/TransactionDetail.md) + - [TransactionDetailAllOf](docs/TransactionDetailAllOf.md) + - [TransactionResponse](docs/TransactionResponse.md) + - [TransactionResponseData](docs/TransactionResponseData.md) + - [TransactionSummary](docs/TransactionSummary.md) + - [TransactionsResponse](docs/TransactionsResponse.md) + - [TransactionsResponseData](docs/TransactionsResponseData.md) + - [UpdateTransaction](docs/UpdateTransaction.md) + - [UpdateTransactionWrapper](docs/UpdateTransactionWrapper.md) + - [UpdateTransactionsResponse](docs/UpdateTransactionsResponse.md) + - [UpdateTransactionsWrapper](docs/UpdateTransactionsWrapper.md) + - [User](docs/User.md) + - [UserResponse](docs/UserResponse.md) + - [UserResponseData](docs/UserResponseData.md) + + +To get access to the crate's generated documentation, use: + +``` +cargo doc --open +``` + +## Author + + + +Jesse Luehrs + +Based on the OpenAPI spec found at https://github.com/ynab/ynab-sdk-js/blob/master/spec-v1-swagger.json by You Need A Budget, LLC diff --git a/bin/regen-ynab-api b/bin/regen-ynab-api index a252d23..2f7c8ac 100755 --- a/bin/regen-ynab-api +++ b/bin/regen-ynab-api @@ -1,15 +1,32 @@ #!/bin/sh set -eu +metadata=$(cat <<'EOF' +authors = ["Jesse Luehrs ", "You Need A Budget, LLC"] +description = "OpenAPI-generated API bindings for the YNAB API" +repository = "https://git.tozt.net/ynab-api" +license = "Apache-2.0" +EOF +) + +extra_readme=$(cat <<'EOF' +Jesse Luehrs + +Based on the OpenAPI spec found at https://github.com/ynab/ynab-sdk-js/blob/master/spec-v1-swagger.json by You Need A Budget, LLC +EOF +) + cd "$(dirname "$0")/.." -rm -rf ynab-api -mkdir ynab-api -cd ynab-api +rm -rf src docs openapi-generator-cli \ generate \ -g rust \ --library reqwest \ - -i ../data/spec-v1-swagger.json -sed -i 's/^name = "openapi"$/name = "ynab-api"/' Cargo.toml + -i data/spec-v1-swagger.json \ + -c data/openapi.yaml \ + --package-name ynab-api + +echo "$metadata" | perl -i -nlE'/^author/ ? print : print' Cargo.toml +echo "$extra_readme" >> README.md diff --git a/data/openapi.yaml b/data/openapi.yaml new file mode 100644 index 0000000..a33d674 --- /dev/null +++ b/data/openapi.yaml @@ -0,0 +1,2 @@ +--- +packageVersion: "1.0.0" diff --git a/docs/Account.md b/docs/Account.md new file mode 100644 index 0000000..265294b --- /dev/null +++ b/docs/Account.md @@ -0,0 +1,21 @@ +# Account + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**name** | **String** | | +**_type** | **String** | The type of account. Note: payPal, merchantAccount, investmentAccount, and mortgage types have been deprecated and will be removed in the future. | +**on_budget** | **bool** | Whether this account is on budget or not | +**closed** | **bool** | Whether this account is closed or not | +**note** | **String** | | [optional] +**balance** | **i64** | The current balance of the account in milliunits format | +**cleared_balance** | **i64** | The current cleared balance of the account in milliunits format | +**uncleared_balance** | **i64** | The current uncleared balance of the account in milliunits format | +**transfer_payee_id** | **String** | The payee id which should be used when transferring to this account | +**deleted** | **bool** | Whether or not the account has been deleted. Deleted accounts will only be included in delta requests. | + +[[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/docs/AccountResponse.md b/docs/AccountResponse.md new file mode 100644 index 0000000..eb39808 --- /dev/null +++ b/docs/AccountResponse.md @@ -0,0 +1,11 @@ +# AccountResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [***::models::AccountResponseData**](AccountResponse_data.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/docs/AccountResponseData.md b/docs/AccountResponseData.md new file mode 100644 index 0000000..d437a2f --- /dev/null +++ b/docs/AccountResponseData.md @@ -0,0 +1,11 @@ +# AccountResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account** | [***::models::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/docs/AccountsApi.md b/docs/AccountsApi.md new file mode 100644 index 0000000..98270b9 --- /dev/null +++ b/docs/AccountsApi.md @@ -0,0 +1,83 @@ +# \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 + +> ::models::AccountResponse get_account_by_id(ctx, budget_id, account_id) +Single account + +Returns a single account + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | + **account_id** | [**String**](.md)| The id of the account | + +### Return type + +[**::models::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 + +> ::models::AccountsResponse get_accounts(ctx, budget_id, optional) +Account list + +Returns all accounts + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | + **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | + +### Return type + +[**::models::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/docs/AccountsResponse.md b/docs/AccountsResponse.md new file mode 100644 index 0000000..6dc10dd --- /dev/null +++ b/docs/AccountsResponse.md @@ -0,0 +1,11 @@ +# AccountsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [***::models::AccountsResponseData**](AccountsResponse_data.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/docs/AccountsResponseData.md b/docs/AccountsResponseData.md new file mode 100644 index 0000000..968cad8 --- /dev/null +++ b/docs/AccountsResponseData.md @@ -0,0 +1,12 @@ +# AccountsResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**accounts** | [**Vec<::models::Account>**](Account.md) | | +**server_knowledge** | **i64** | 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/docs/BudgetDetail.md b/docs/BudgetDetail.md new file mode 100644 index 0000000..3dac64b --- /dev/null +++ b/docs/BudgetDetail.md @@ -0,0 +1,27 @@ +# BudgetDetail + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**name** | **String** | | +**last_modified_on** | **String** | The last time any changes were made to the budget from either a web or mobile client | [optional] +**first_month** | [***String**](string.md) | The earliest budget month | [optional] +**last_month** | [***String**](string.md) | The latest budget month | [optional] +**date_format** | [***::models::DateFormat**](DateFormat.md) | | [optional] +**currency_format** | [***::models::CurrencyFormat**](CurrencyFormat.md) | | [optional] +**accounts** | [**Vec<::models::Account>**](Account.md) | | [optional] +**payees** | [**Vec<::models::Payee>**](Payee.md) | | [optional] +**payee_locations** | [**Vec<::models::PayeeLocation>**](PayeeLocation.md) | | [optional] +**category_groups** | [**Vec<::models::CategoryGroup>**](CategoryGroup.md) | | [optional] +**categories** | [**Vec<::models::Category>**](Category.md) | | [optional] +**months** | [**Vec<::models::MonthDetail>**](MonthDetail.md) | | [optional] +**transactions** | [**Vec<::models::TransactionSummary>**](TransactionSummary.md) | | [optional] +**subtransactions** | [**Vec<::models::SubTransaction>**](SubTransaction.md) | | [optional] +**scheduled_transactions** | [**Vec<::models::ScheduledTransactionSummary>**](ScheduledTransactionSummary.md) | | [optional] +**scheduled_subtransactions** | [**Vec<::models::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/docs/BudgetDetailAllOf.md b/docs/BudgetDetailAllOf.md new file mode 100644 index 0000000..f5df347 --- /dev/null +++ b/docs/BudgetDetailAllOf.md @@ -0,0 +1,20 @@ +# BudgetDetailAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**accounts** | [**Vec<::models::Account>**](Account.md) | | [optional] +**payees** | [**Vec<::models::Payee>**](Payee.md) | | [optional] +**payee_locations** | [**Vec<::models::PayeeLocation>**](PayeeLocation.md) | | [optional] +**category_groups** | [**Vec<::models::CategoryGroup>**](CategoryGroup.md) | | [optional] +**categories** | [**Vec<::models::Category>**](Category.md) | | [optional] +**months** | [**Vec<::models::MonthDetail>**](MonthDetail.md) | | [optional] +**transactions** | [**Vec<::models::TransactionSummary>**](TransactionSummary.md) | | [optional] +**subtransactions** | [**Vec<::models::SubTransaction>**](SubTransaction.md) | | [optional] +**scheduled_transactions** | [**Vec<::models::ScheduledTransactionSummary>**](ScheduledTransactionSummary.md) | | [optional] +**scheduled_subtransactions** | [**Vec<::models::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/docs/BudgetDetailResponse.md b/docs/BudgetDetailResponse.md new file mode 100644 index 0000000..97cc82e --- /dev/null +++ b/docs/BudgetDetailResponse.md @@ -0,0 +1,11 @@ +# BudgetDetailResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [***::models::BudgetDetailResponseData**](BudgetDetailResponse_data.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/docs/BudgetDetailResponseData.md b/docs/BudgetDetailResponseData.md new file mode 100644 index 0000000..8697aae --- /dev/null +++ b/docs/BudgetDetailResponseData.md @@ -0,0 +1,12 @@ +# BudgetDetailResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**budget** | [***::models::BudgetDetail**](BudgetDetail.md) | | +**server_knowledge** | **i64** | 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/docs/BudgetSettings.md b/docs/BudgetSettings.md new file mode 100644 index 0000000..b0604b4 --- /dev/null +++ b/docs/BudgetSettings.md @@ -0,0 +1,12 @@ +# BudgetSettings + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**date_format** | [***::models::DateFormat**](DateFormat.md) | | +**currency_format** | [***::models::CurrencyFormat**](CurrencyFormat.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/docs/BudgetSettingsResponse.md b/docs/BudgetSettingsResponse.md new file mode 100644 index 0000000..ee92163 --- /dev/null +++ b/docs/BudgetSettingsResponse.md @@ -0,0 +1,11 @@ +# BudgetSettingsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [***::models::BudgetSettingsResponseData**](BudgetSettingsResponse_data.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/docs/BudgetSettingsResponseData.md b/docs/BudgetSettingsResponseData.md new file mode 100644 index 0000000..3d2c4cc --- /dev/null +++ b/docs/BudgetSettingsResponseData.md @@ -0,0 +1,11 @@ +# BudgetSettingsResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**settings** | [***::models::BudgetSettings**](BudgetSettings.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/docs/BudgetSummary.md b/docs/BudgetSummary.md new file mode 100644 index 0000000..f2e444b --- /dev/null +++ b/docs/BudgetSummary.md @@ -0,0 +1,17 @@ +# BudgetSummary + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**name** | **String** | | +**last_modified_on** | **String** | The last time any changes were made to the budget from either a web or mobile client | [optional] +**first_month** | [***String**](string.md) | The earliest budget month | [optional] +**last_month** | [***String**](string.md) | The latest budget month | [optional] +**date_format** | [***::models::DateFormat**](DateFormat.md) | | [optional] +**currency_format** | [***::models::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/docs/BudgetSummaryResponse.md b/docs/BudgetSummaryResponse.md new file mode 100644 index 0000000..5b029dd --- /dev/null +++ b/docs/BudgetSummaryResponse.md @@ -0,0 +1,11 @@ +# BudgetSummaryResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [***::models::BudgetSummaryResponseData**](BudgetSummaryResponse_data.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/docs/BudgetSummaryResponseData.md b/docs/BudgetSummaryResponseData.md new file mode 100644 index 0000000..2836bfa --- /dev/null +++ b/docs/BudgetSummaryResponseData.md @@ -0,0 +1,12 @@ +# BudgetSummaryResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**budgets** | [**Vec<::models::BudgetSummary>**](BudgetSummary.md) | | +**default_budget** | [***::models::BudgetSummary**](BudgetSummary.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/docs/BudgetsApi.md b/docs/BudgetsApi.md new file mode 100644 index 0000000..563b754 --- /dev/null +++ b/docs/BudgetsApi.md @@ -0,0 +1,110 @@ +# \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_budget_settings_by_id**](BudgetsApi.md#get_budget_settings_by_id) | **get** /budgets/{budget_id}/settings | Budget Settings +[**get_budgets**](BudgetsApi.md#get_budgets) | **get** /budgets | List budgets + + + +## get_budget_by_id + +> ::models::BudgetDetailResponse get_budget_by_id(ctx, budget_id, optional) +Single budget + +Returns a single budget with all related entities. This resource is effectively a full budget export. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | + **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | + +### Return type + +[**::models::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_budget_settings_by_id + +> ::models::BudgetSettingsResponse get_budget_settings_by_id(ctx, budget_id) +Budget Settings + +Returns settings for a budget + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | + +### Return type + +[**::models::BudgetSettingsResponse**](BudgetSettingsResponse.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 + +> ::models::BudgetSummaryResponse get_budgets(ctx, ) +List budgets + +Returns budgets list with summary information + +### Required Parameters + +This endpoint does not need any parameter. + +### Return type + +[**::models::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/docs/BulkResponse.md b/docs/BulkResponse.md new file mode 100644 index 0000000..009e60c --- /dev/null +++ b/docs/BulkResponse.md @@ -0,0 +1,11 @@ +# BulkResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [***::models::BulkResponseData**](BulkResponse_data.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/docs/BulkResponseData.md b/docs/BulkResponseData.md new file mode 100644 index 0000000..82fef82 --- /dev/null +++ b/docs/BulkResponseData.md @@ -0,0 +1,11 @@ +# BulkResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bulk** | [***::models::BulkResponseDataBulk**](BulkResponse_data_bulk.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/docs/BulkResponseDataBulk.md b/docs/BulkResponseDataBulk.md new file mode 100644 index 0000000..97ff1dc --- /dev/null +++ b/docs/BulkResponseDataBulk.md @@ -0,0 +1,12 @@ +# BulkResponseDataBulk + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**transaction_ids** | **Vec** | The list of Transaction ids that were created. | +**duplicate_import_ids** | **Vec** | 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/docs/BulkTransactions.md b/docs/BulkTransactions.md new file mode 100644 index 0000000..dc990e4 --- /dev/null +++ b/docs/BulkTransactions.md @@ -0,0 +1,11 @@ +# BulkTransactions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**transactions** | [**Vec<::models::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/docs/CategoriesApi.md b/docs/CategoriesApi.md new file mode 100644 index 0000000..00294b8 --- /dev/null +++ b/docs/CategoriesApi.md @@ -0,0 +1,152 @@ +# \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_month_category_by_id**](CategoriesApi.md#get_month_category_by_id) | **get** /budgets/{budget_id}/months/{month}/categories/{category_id} | Single category for a specific budget month +[**update_month_category**](CategoriesApi.md#update_month_category) | **patch** /budgets/{budget_id}/months/{month}/categories/{category_id} | Update a category for a specific month + + + +## get_categories + +> ::models::CategoriesResponse get_categories(ctx, budget_id, optional) +List categories + +Returns all categories grouped by category group. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC). + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | + **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | + +### Return type + +[**::models::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 + +> ::models::CategoryResponse get_category_by_id(ctx, budget_id, category_id) +Single category + +Returns a single category. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC). + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | + **category_id** | **String**| The id of the category | + +### Return type + +[**::models::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) + + +## get_month_category_by_id + +> ::models::CategoryResponse get_month_category_by_id(ctx, budget_id, month, category_id) +Single category for a specific budget month + +Returns a single category for a specific budget month. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC). + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | + **month** | **String**| The budget month in ISO format (e.g. 2016-12-01) (\"current\" can also be used to specify the current calendar month (UTC)) | + **category_id** | **String**| The id of the category | + +### Return type + +[**::models::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) + + +## update_month_category + +> ::models::SaveCategoryResponse update_month_category(ctx, budget_id, month, category_id, data) +Update a category for a specific month + +Update a category for a specific month + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | + **month** | **String**| The budget month in ISO format (e.g. 2016-12-01) (\"current\" can also be used to specify the current calendar month (UTC)) | + **category_id** | **String**| The id of the category | + **data** | [**SaveMonthCategoryWrapper**](SaveMonthCategoryWrapper.md)| The category to update | + +### Return type + +[**::models::SaveCategoryResponse**](SaveCategoryResponse.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/docs/CategoriesResponse.md b/docs/CategoriesResponse.md new file mode 100644 index 0000000..e760b74 --- /dev/null +++ b/docs/CategoriesResponse.md @@ -0,0 +1,11 @@ +# CategoriesResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [***::models::CategoriesResponseData**](CategoriesResponse_data.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/docs/CategoriesResponseData.md b/docs/CategoriesResponseData.md new file mode 100644 index 0000000..766aae4 --- /dev/null +++ b/docs/CategoriesResponseData.md @@ -0,0 +1,12 @@ +# CategoriesResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**category_groups** | [**Vec<::models::CategoryGroupWithCategories>**](CategoryGroupWithCategories.md) | | +**server_knowledge** | **i64** | 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/docs/Category.md b/docs/Category.md new file mode 100644 index 0000000..217979b --- /dev/null +++ b/docs/Category.md @@ -0,0 +1,25 @@ +# Category + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**category_group_id** | **String** | | +**name** | **String** | | +**hidden** | **bool** | Whether or not the category is hidden | +**original_category_group_id** | **String** | If category is hidden this is the id of the category group it originally belonged to before it was hidden. | [optional] +**note** | **String** | | [optional] +**budgeted** | **i64** | Budgeted amount in milliunits format | +**activity** | **i64** | Activity amount in milliunits format | +**balance** | **i64** | Balance in milliunits format | +**goal_type** | **String** | The type of goal, if the cagegory has a goal (TB=Target Category Balance, TBD=Target Category Balance by Date, MF=Monthly Funding) | [optional] +**goal_creation_month** | [***String**](string.md) | The month a goal was created | [optional] +**goal_target** | **i64** | The goal target amount in milliunits | +**goal_target_month** | [***String**](string.md) | If the goal type is 'TBD' (Target Category Balance by Date), this is the target month for the goal to be completed | [optional] +**goal_percentage_complete** | **i32** | The percentage completion of the goal | [optional] +**deleted** | **bool** | Whether or not the category has been deleted. Deleted categories will only be included in delta requests. | + +[[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/docs/CategoryGroup.md b/docs/CategoryGroup.md new file mode 100644 index 0000000..498f3c5 --- /dev/null +++ b/docs/CategoryGroup.md @@ -0,0 +1,14 @@ +# CategoryGroup + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**name** | **String** | | +**hidden** | **bool** | Whether or not the category group is hidden | +**deleted** | **bool** | Whether or not the category group has been deleted. Deleted category groups will only be included in delta requests. | + +[[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/docs/CategoryGroupWithCategories.md b/docs/CategoryGroupWithCategories.md new file mode 100644 index 0000000..c1355c2 --- /dev/null +++ b/docs/CategoryGroupWithCategories.md @@ -0,0 +1,15 @@ +# CategoryGroupWithCategories + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**name** | **String** | | +**hidden** | **bool** | Whether or not the category group is hidden | +**deleted** | **bool** | Whether or not the category group has been deleted. Deleted category groups will only be included in delta requests. | +**categories** | [**Vec<::models::Category>**](Category.md) | Category group categories. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC). | + +[[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/docs/CategoryGroupWithCategoriesAllOf.md b/docs/CategoryGroupWithCategoriesAllOf.md new file mode 100644 index 0000000..0a11fb9 --- /dev/null +++ b/docs/CategoryGroupWithCategoriesAllOf.md @@ -0,0 +1,11 @@ +# CategoryGroupWithCategoriesAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**categories** | [**Vec<::models::Category>**](Category.md) | Category group categories. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC). | + +[[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/docs/CategoryResponse.md b/docs/CategoryResponse.md new file mode 100644 index 0000000..efe3d40 --- /dev/null +++ b/docs/CategoryResponse.md @@ -0,0 +1,11 @@ +# CategoryResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [***::models::CategoryResponseData**](CategoryResponse_data.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/docs/CategoryResponseData.md b/docs/CategoryResponseData.md new file mode 100644 index 0000000..187bf07 --- /dev/null +++ b/docs/CategoryResponseData.md @@ -0,0 +1,11 @@ +# CategoryResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**category** | [***::models::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/docs/CurrencyFormat.md b/docs/CurrencyFormat.md new file mode 100644 index 0000000..98cd6fd --- /dev/null +++ b/docs/CurrencyFormat.md @@ -0,0 +1,18 @@ +# CurrencyFormat + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**iso_code** | **String** | | +**example_format** | **String** | | +**decimal_digits** | **i32** | | +**decimal_separator** | **String** | | +**symbol_first** | **bool** | | +**group_separator** | **String** | | +**currency_symbol** | **String** | | +**display_symbol** | **bool** | | + +[[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/docs/DateFormat.md b/docs/DateFormat.md new file mode 100644 index 0000000..53add08 --- /dev/null +++ b/docs/DateFormat.md @@ -0,0 +1,11 @@ +# DateFormat + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**format** | **String** | | + +[[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/docs/DeprecatedApi.md b/docs/DeprecatedApi.md new file mode 100644 index 0000000..85bdc80 --- /dev/null +++ b/docs/DeprecatedApi.md @@ -0,0 +1,41 @@ +# \DeprecatedApi + +All URIs are relative to *https://api.youneedabudget.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**bulk_create_transactions**](DeprecatedApi.md#bulk_create_transactions) | **post** /budgets/{budget_id}/transactions/bulk | Bulk create transactions + + + +## bulk_create_transactions + +> ::models::BulkResponse bulk_create_transactions(ctx, budget_id, transactions) +Bulk create transactions + +Creates multiple transactions. Although this endpoint is still supported, it is recommended to use 'POST /budgets/{budget_id}/transactions' to create multiple transactions. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | + **transactions** | [**BulkTransactions**](BulkTransactions.md)| The list of transactions to create | + +### Return type + +[**::models::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) + diff --git a/docs/ErrorDetail.md b/docs/ErrorDetail.md new file mode 100644 index 0000000..dd6d022 --- /dev/null +++ b/docs/ErrorDetail.md @@ -0,0 +1,13 @@ +# ErrorDetail + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**name** | **String** | | +**detail** | **String** | | + +[[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/docs/ErrorResponse.md b/docs/ErrorResponse.md new file mode 100644 index 0000000..382b263 --- /dev/null +++ b/docs/ErrorResponse.md @@ -0,0 +1,11 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | [***::models::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/docs/HybridTransaction.md b/docs/HybridTransaction.md new file mode 100644 index 0000000..c168944 --- /dev/null +++ b/docs/HybridTransaction.md @@ -0,0 +1,30 @@ +# HybridTransaction + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**date** | [***String**](string.md) | The transaction date in ISO format (e.g. 2016-12-01) | +**amount** | **i64** | The transaction amount in milliunits format | +**memo** | **String** | | [optional] +**cleared** | **String** | The cleared status of the transaction | +**approved** | **bool** | Whether or not the transaction is approved | +**flag_color** | **String** | The transaction flag | [optional] +**account_id** | **String** | | +**payee_id** | **String** | | [optional] +**category_id** | **String** | | [optional] +**transfer_account_id** | **String** | If a transfer transaction, the account to which it transfers | [optional] +**transfer_transaction_id** | **String** | If a transfer transaction, the id of transaction on the other side of the transfer | [optional] +**matched_transaction_id** | **String** | If transaction is matched, the id of the matched transaction | [optional] +**import_id** | **String** | If the Transaction was imported, this field is a unique (by account) import identifier. If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. | [optional] +**deleted** | **bool** | Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests. | +**_type** | **String** | Whether the hybrid transaction represents a regular transaction or a subtransaction | +**parent_transaction_id** | **String** | For subtransaction types, this is the id of the pararent transaction. For transaction types, this id will be always be null. | [optional] +**account_name** | **String** | | +**payee_name** | **String** | | [optional] +**category_name** | **String** | | + +[[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/docs/HybridTransactionAllOf.md b/docs/HybridTransactionAllOf.md new file mode 100644 index 0000000..af38160 --- /dev/null +++ b/docs/HybridTransactionAllOf.md @@ -0,0 +1,15 @@ +# HybridTransactionAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_type** | **String** | Whether the hybrid transaction represents a regular transaction or a subtransaction | +**parent_transaction_id** | **String** | For subtransaction types, this is the id of the pararent transaction. For transaction types, this id will be always be null. | [optional] +**account_name** | **String** | | +**payee_name** | **String** | | [optional] +**category_name** | **String** | | + +[[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/docs/HybridTransactionsResponse.md b/docs/HybridTransactionsResponse.md new file mode 100644 index 0000000..df8437a --- /dev/null +++ b/docs/HybridTransactionsResponse.md @@ -0,0 +1,11 @@ +# HybridTransactionsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [***::models::HybridTransactionsResponseData**](HybridTransactionsResponse_data.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/docs/HybridTransactionsResponseData.md b/docs/HybridTransactionsResponseData.md new file mode 100644 index 0000000..241e7b6 --- /dev/null +++ b/docs/HybridTransactionsResponseData.md @@ -0,0 +1,11 @@ +# HybridTransactionsResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**transactions** | [**Vec<::models::HybridTransaction>**](HybridTransaction.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/docs/MonthDetail.md b/docs/MonthDetail.md new file mode 100644 index 0000000..1d7a22b --- /dev/null +++ b/docs/MonthDetail.md @@ -0,0 +1,19 @@ +# MonthDetail + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**month** | [***String**](string.md) | | +**note** | **String** | | [optional] +**income** | **i64** | The total amount in transactions categorized to 'Inflow: To be Budgeted' in the month | +**budgeted** | **i64** | The total amount budgeted in the month | +**activity** | **i64** | The total amount in transactions in the month, excluding those categorized to 'Inflow: To be Budgeted' | +**to_be_budgeted** | **i64** | The available amount for 'To be Budgeted' | +**age_of_money** | **i32** | The Age of Money as of the month | [optional] +**deleted** | **bool** | Whether or not the month has been deleted. Deleted months will only be included in delta requests. | +**categories** | [**Vec<::models::Category>**](Category.md) | The budget month categories. Amounts (budgeted, activity, balance, etc.) are specific to the {month} parameter specified. | + +[[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/docs/MonthDetailAllOf.md b/docs/MonthDetailAllOf.md new file mode 100644 index 0000000..81da8f5 --- /dev/null +++ b/docs/MonthDetailAllOf.md @@ -0,0 +1,11 @@ +# MonthDetailAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**categories** | [**Vec<::models::Category>**](Category.md) | The budget month categories. Amounts (budgeted, activity, balance, etc.) are specific to the {month} parameter specified. | + +[[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/docs/MonthDetailResponse.md b/docs/MonthDetailResponse.md new file mode 100644 index 0000000..bfeaae8 --- /dev/null +++ b/docs/MonthDetailResponse.md @@ -0,0 +1,11 @@ +# MonthDetailResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [***::models::MonthDetailResponseData**](MonthDetailResponse_data.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/docs/MonthDetailResponseData.md b/docs/MonthDetailResponseData.md new file mode 100644 index 0000000..83bab88 --- /dev/null +++ b/docs/MonthDetailResponseData.md @@ -0,0 +1,11 @@ +# MonthDetailResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**month** | [***::models::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/docs/MonthSummariesResponse.md b/docs/MonthSummariesResponse.md new file mode 100644 index 0000000..fb7f315 --- /dev/null +++ b/docs/MonthSummariesResponse.md @@ -0,0 +1,11 @@ +# MonthSummariesResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [***::models::MonthSummariesResponseData**](MonthSummariesResponse_data.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/docs/MonthSummariesResponseData.md b/docs/MonthSummariesResponseData.md new file mode 100644 index 0000000..f9907b3 --- /dev/null +++ b/docs/MonthSummariesResponseData.md @@ -0,0 +1,12 @@ +# MonthSummariesResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**months** | [**Vec<::models::MonthSummary>**](MonthSummary.md) | | +**server_knowledge** | **i64** | 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/docs/MonthSummary.md b/docs/MonthSummary.md new file mode 100644 index 0000000..a78cbfc --- /dev/null +++ b/docs/MonthSummary.md @@ -0,0 +1,18 @@ +# MonthSummary + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**month** | [***String**](string.md) | | +**note** | **String** | | [optional] +**income** | **i64** | The total amount in transactions categorized to 'Inflow: To be Budgeted' in the month | +**budgeted** | **i64** | The total amount budgeted in the month | +**activity** | **i64** | The total amount in transactions in the month, excluding those categorized to 'Inflow: To be Budgeted' | +**to_be_budgeted** | **i64** | The available amount for 'To be Budgeted' | +**age_of_money** | **i32** | The Age of Money as of the month | [optional] +**deleted** | **bool** | Whether or not the month has been deleted. Deleted months will only be included in delta requests. | + +[[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/docs/MonthsApi.md b/docs/MonthsApi.md new file mode 100644 index 0000000..337c03c --- /dev/null +++ b/docs/MonthsApi.md @@ -0,0 +1,83 @@ +# \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 + +> ::models::MonthDetailResponse get_budget_month(ctx, budget_id, month) +Single budget month + +Returns a single budget month + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | + **month** | **String**| The budget month in ISO format (e.g. 2016-12-01) (\"current\" can also be used to specify the current calendar month (UTC)) | + +### Return type + +[**::models::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 + +> ::models::MonthSummariesResponse get_budget_months(ctx, budget_id, optional) +List budget months + +Returns all budget months + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | + **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | + +### Return type + +[**::models::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/docs/Payee.md b/docs/Payee.md new file mode 100644 index 0000000..ff886e6 --- /dev/null +++ b/docs/Payee.md @@ -0,0 +1,14 @@ +# Payee + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**name** | **String** | | +**transfer_account_id** | **String** | If a transfer payee, the account_id to which this payee transfers to | [optional] +**deleted** | **bool** | Whether or not the payee has been deleted. Deleted payees will only be included in delta requests. | + +[[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/docs/PayeeLocation.md b/docs/PayeeLocation.md new file mode 100644 index 0000000..f73c3be --- /dev/null +++ b/docs/PayeeLocation.md @@ -0,0 +1,15 @@ +# PayeeLocation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**payee_id** | **String** | | +**latitude** | **String** | | +**longitude** | **String** | | +**deleted** | **bool** | Whether or not the payee location has been deleted. Deleted payee locations will only be included in delta requests. | + +[[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/docs/PayeeLocationResponse.md b/docs/PayeeLocationResponse.md new file mode 100644 index 0000000..b34e691 --- /dev/null +++ b/docs/PayeeLocationResponse.md @@ -0,0 +1,11 @@ +# PayeeLocationResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [***::models::PayeeLocationResponseData**](PayeeLocationResponse_data.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/docs/PayeeLocationResponseData.md b/docs/PayeeLocationResponseData.md new file mode 100644 index 0000000..bba1cb7 --- /dev/null +++ b/docs/PayeeLocationResponseData.md @@ -0,0 +1,11 @@ +# PayeeLocationResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**payee_location** | [***::models::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/docs/PayeeLocationsApi.md b/docs/PayeeLocationsApi.md new file mode 100644 index 0000000..e51787a --- /dev/null +++ b/docs/PayeeLocationsApi.md @@ -0,0 +1,106 @@ +# \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 + +> ::models::PayeeLocationResponse get_payee_location_by_id(ctx, budget_id, payee_location_id) +Single payee location + +Returns a single payee location + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | + **payee_location_id** | **String**| id of payee location | + +### Return type + +[**::models::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 + +> ::models::PayeeLocationsResponse get_payee_locations(ctx, budget_id) +List payee locations + +Returns all payee locations + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | + +### Return type + +[**::models::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 + +> ::models::PayeeLocationsResponse get_payee_locations_by_payee(ctx, budget_id, payee_id) +List locations for a payee + +Returns all payee locations for the specified payee + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | + **payee_id** | **String**| id of payee | + +### Return type + +[**::models::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/docs/PayeeLocationsResponse.md b/docs/PayeeLocationsResponse.md new file mode 100644 index 0000000..f118e8e --- /dev/null +++ b/docs/PayeeLocationsResponse.md @@ -0,0 +1,11 @@ +# PayeeLocationsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [***::models::PayeeLocationsResponseData**](PayeeLocationsResponse_data.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/docs/PayeeLocationsResponseData.md b/docs/PayeeLocationsResponseData.md new file mode 100644 index 0000000..4ad0748 --- /dev/null +++ b/docs/PayeeLocationsResponseData.md @@ -0,0 +1,11 @@ +# PayeeLocationsResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**payee_locations** | [**Vec<::models::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/docs/PayeeResponse.md b/docs/PayeeResponse.md new file mode 100644 index 0000000..6a38dfd --- /dev/null +++ b/docs/PayeeResponse.md @@ -0,0 +1,11 @@ +# PayeeResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [***::models::PayeeResponseData**](PayeeResponse_data.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/docs/PayeeResponseData.md b/docs/PayeeResponseData.md new file mode 100644 index 0000000..9618470 --- /dev/null +++ b/docs/PayeeResponseData.md @@ -0,0 +1,11 @@ +# PayeeResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**payee** | [***::models::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/docs/PayeesApi.md b/docs/PayeesApi.md new file mode 100644 index 0000000..173c79d --- /dev/null +++ b/docs/PayeesApi.md @@ -0,0 +1,83 @@ +# \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 + +> ::models::PayeeResponse get_payee_by_id(ctx, budget_id, payee_id) +Single payee + +Returns single payee + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | + **payee_id** | **String**| The id of the payee | + +### Return type + +[**::models::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 + +> ::models::PayeesResponse get_payees(ctx, budget_id, optional) +List payees + +Returns all payees + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | + **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | + +### Return type + +[**::models::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/docs/PayeesResponse.md b/docs/PayeesResponse.md new file mode 100644 index 0000000..18bd7d2 --- /dev/null +++ b/docs/PayeesResponse.md @@ -0,0 +1,11 @@ +# PayeesResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [***::models::PayeesResponseData**](PayeesResponse_data.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/docs/PayeesResponseData.md b/docs/PayeesResponseData.md new file mode 100644 index 0000000..c3a5518 --- /dev/null +++ b/docs/PayeesResponseData.md @@ -0,0 +1,12 @@ +# PayeesResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**payees** | [**Vec<::models::Payee>**](Payee.md) | | +**server_knowledge** | **i64** | 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/docs/SaveCategoryResponse.md b/docs/SaveCategoryResponse.md new file mode 100644 index 0000000..64a832f --- /dev/null +++ b/docs/SaveCategoryResponse.md @@ -0,0 +1,11 @@ +# SaveCategoryResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [***::models::SaveCategoryResponseData**](SaveCategoryResponse_data.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/docs/SaveCategoryResponseData.md b/docs/SaveCategoryResponseData.md new file mode 100644 index 0000000..941f72f --- /dev/null +++ b/docs/SaveCategoryResponseData.md @@ -0,0 +1,12 @@ +# SaveCategoryResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**category** | [***::models::Category**](Category.md) | | +**server_knowledge** | **i64** | 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/docs/SaveMonthCategory.md b/docs/SaveMonthCategory.md new file mode 100644 index 0000000..1c4abb9 --- /dev/null +++ b/docs/SaveMonthCategory.md @@ -0,0 +1,11 @@ +# SaveMonthCategory + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**budgeted** | **i64** | Budgeted 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/docs/SaveMonthCategoryWrapper.md b/docs/SaveMonthCategoryWrapper.md new file mode 100644 index 0000000..1b7e38a --- /dev/null +++ b/docs/SaveMonthCategoryWrapper.md @@ -0,0 +1,11 @@ +# SaveMonthCategoryWrapper + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**category** | [***::models::SaveMonthCategory**](SaveMonthCategory.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/docs/SaveTransaction.md b/docs/SaveTransaction.md new file mode 100644 index 0000000..dabee87 --- /dev/null +++ b/docs/SaveTransaction.md @@ -0,0 +1,21 @@ +# SaveTransaction + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account_id** | **String** | | +**date** | [***String**](string.md) | The transaction date in ISO format (e.g. 2016-12-01). Future dates (scheduled transactions) are not permitted. Split transaction dates cannot be changed and if a different date is supplied it will be ignored. | +**amount** | **i64** | The transaction amount in milliunits format. Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored. | +**payee_id** | **String** | The payee for the transaction | [optional] +**payee_name** | **String** | The payee name. If a payee_name value is provided and payee_id has a null value, the payee_name value will be used to resolve the payee by either (1) a matching payee rename rule (only if import_id is also specified) or (2) a payee with the same name or (3) creation of a new payee. | [optional] +**category_id** | **String** | The category for the transaction. Split and Credit Card Payment categories are not permitted and will be ignored if supplied. If an existing transaction has a Split category it cannot be changed. | [optional] +**memo** | **String** | | [optional] +**cleared** | **String** | 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] +**flag_color** | **String** | The transaction flag | [optional] +**import_id** | **String** | If specified, the new transaction will be assigned this import_id and considered \"imported\". *At the time of import* we will attempt to match \"imported\" transactions with non-imported (i.e. \"user-entered\") transactions.

Transactions imported through File Based Import or Direct Import (not through the API) are assigned an import_id in the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. Using a consistent format will prevent duplicates through Direct Import and File Based Import.

If import_id is omitted or specified as null, the transaction will be treated as a \"user-entered\" transaction. As such, it will be eligible to be matched against transactions later being imported (via DI, FBI, or API). | [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/docs/SaveTransactionWrapper.md b/docs/SaveTransactionWrapper.md new file mode 100644 index 0000000..a9f3fcc --- /dev/null +++ b/docs/SaveTransactionWrapper.md @@ -0,0 +1,11 @@ +# SaveTransactionWrapper + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**transaction** | [***::models::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/docs/SaveTransactionsResponse.md b/docs/SaveTransactionsResponse.md new file mode 100644 index 0000000..0458ef6 --- /dev/null +++ b/docs/SaveTransactionsResponse.md @@ -0,0 +1,11 @@ +# SaveTransactionsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [***::models::SaveTransactionsResponseData**](SaveTransactionsResponse_data.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/docs/SaveTransactionsResponseData.md b/docs/SaveTransactionsResponseData.md new file mode 100644 index 0000000..8617702 --- /dev/null +++ b/docs/SaveTransactionsResponseData.md @@ -0,0 +1,15 @@ +# SaveTransactionsResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**transaction_ids** | **Vec** | The transaction ids that were saved | +**transaction** | [***::models::TransactionDetail**](TransactionDetail.md) | | [optional] +**transactions** | [**Vec<::models::TransactionDetail>**](TransactionDetail.md) | If multiple transactions were specified, the transactions that were saved | [optional] +**duplicate_import_ids** | **Vec** | If multiple transactions were specified, a list of import_ids that were not created because of an existing import_id found on the same account | [optional] +**server_knowledge** | **i64** | 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/docs/SaveTransactionsWrapper.md b/docs/SaveTransactionsWrapper.md new file mode 100644 index 0000000..d79e4ee --- /dev/null +++ b/docs/SaveTransactionsWrapper.md @@ -0,0 +1,12 @@ +# SaveTransactionsWrapper + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**transaction** | [***::models::SaveTransaction**](SaveTransaction.md) | | [optional] +**transactions** | [**Vec<::models::SaveTransaction>**](SaveTransaction.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/docs/ScheduledSubTransaction.md b/docs/ScheduledSubTransaction.md new file mode 100644 index 0000000..6178bab --- /dev/null +++ b/docs/ScheduledSubTransaction.md @@ -0,0 +1,18 @@ +# ScheduledSubTransaction + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**scheduled_transaction_id** | **String** | | +**amount** | **i64** | The scheduled subtransaction amount in milliunits format | +**memo** | **String** | | [optional] +**payee_id** | **String** | | [optional] +**category_id** | **String** | | +**transfer_account_id** | **String** | If a transfer, the account_id which the scheduled subtransaction transfers to | [optional] +**deleted** | **bool** | Whether or not the scheduled subtransaction has been deleted. Deleted scheduled subtransactions will only be included in delta requests. | + +[[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/docs/ScheduledTransactionDetail.md b/docs/ScheduledTransactionDetail.md new file mode 100644 index 0000000..5f45c7e --- /dev/null +++ b/docs/ScheduledTransactionDetail.md @@ -0,0 +1,26 @@ +# ScheduledTransactionDetail + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**date_first** | [***String**](string.md) | The first date for which the Scheduled Transaction was scheduled. | +**date_next** | [***String**](string.md) | The next date for which the Scheduled Transaction is scheduled. | +**frequency** | **String** | | +**amount** | **i64** | The scheduled transaction amount in milliunits format | +**memo** | **String** | | [optional] +**flag_color** | **String** | The scheduled transaction flag | +**account_id** | **String** | | +**payee_id** | **String** | | [optional] +**category_id** | **String** | | +**transfer_account_id** | **String** | If a transfer, the account_id which the scheduled transaction transfers to | [optional] +**deleted** | **bool** | Whether or not the scheduled transaction has been deleted. Deleted scheduled transactions will only be included in delta requests. | +**account_name** | **String** | | +**payee_name** | **String** | | +**category_name** | **String** | | +**subtransactions** | [**Vec<::models::ScheduledSubTransaction>**](ScheduledSubTransaction.md) | If a split scheduled transaction, the subtransactions. | + +[[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/docs/ScheduledTransactionDetailAllOf.md b/docs/ScheduledTransactionDetailAllOf.md new file mode 100644 index 0000000..3c2757f --- /dev/null +++ b/docs/ScheduledTransactionDetailAllOf.md @@ -0,0 +1,14 @@ +# ScheduledTransactionDetailAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account_name** | **String** | | +**payee_name** | **String** | | +**category_name** | **String** | | +**subtransactions** | [**Vec<::models::ScheduledSubTransaction>**](ScheduledSubTransaction.md) | If a split scheduled transaction, the subtransactions. | + +[[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/docs/ScheduledTransactionResponse.md b/docs/ScheduledTransactionResponse.md new file mode 100644 index 0000000..28c4b7e --- /dev/null +++ b/docs/ScheduledTransactionResponse.md @@ -0,0 +1,11 @@ +# ScheduledTransactionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [***::models::ScheduledTransactionResponseData**](ScheduledTransactionResponse_data.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/docs/ScheduledTransactionResponseData.md b/docs/ScheduledTransactionResponseData.md new file mode 100644 index 0000000..bd05d93 --- /dev/null +++ b/docs/ScheduledTransactionResponseData.md @@ -0,0 +1,11 @@ +# ScheduledTransactionResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scheduled_transaction** | [***::models::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/docs/ScheduledTransactionSummary.md b/docs/ScheduledTransactionSummary.md new file mode 100644 index 0000000..4b248b0 --- /dev/null +++ b/docs/ScheduledTransactionSummary.md @@ -0,0 +1,22 @@ +# ScheduledTransactionSummary + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**date_first** | [***String**](string.md) | The first date for which the Scheduled Transaction was scheduled. | +**date_next** | [***String**](string.md) | The next date for which the Scheduled Transaction is scheduled. | +**frequency** | **String** | | +**amount** | **i64** | The scheduled transaction amount in milliunits format | +**memo** | **String** | | [optional] +**flag_color** | **String** | The scheduled transaction flag | +**account_id** | **String** | | +**payee_id** | **String** | | [optional] +**category_id** | **String** | | +**transfer_account_id** | **String** | If a transfer, the account_id which the scheduled transaction transfers to | [optional] +**deleted** | **bool** | Whether or not the scheduled transaction has been deleted. Deleted scheduled transactions will only be included in delta requests. | + +[[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/docs/ScheduledTransactionsApi.md b/docs/ScheduledTransactionsApi.md new file mode 100644 index 0000000..48856a7 --- /dev/null +++ b/docs/ScheduledTransactionsApi.md @@ -0,0 +1,83 @@ +# \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 + +> ::models::ScheduledTransactionResponse get_scheduled_transaction_by_id(ctx, budget_id, scheduled_transaction_id) +Single scheduled transaction + +Returns a single scheduled transaction + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | + **scheduled_transaction_id** | **String**| The id of the scheduled transaction | + +### Return type + +[**::models::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 + +> ::models::ScheduledTransactionsResponse get_scheduled_transactions(ctx, budget_id, optional) +List scheduled transactions + +Returns all scheduled transactions + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | + **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | + +### Return type + +[**::models::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/docs/ScheduledTransactionsResponse.md b/docs/ScheduledTransactionsResponse.md new file mode 100644 index 0000000..b3dbffc --- /dev/null +++ b/docs/ScheduledTransactionsResponse.md @@ -0,0 +1,11 @@ +# ScheduledTransactionsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [***::models::ScheduledTransactionsResponseData**](ScheduledTransactionsResponse_data.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/docs/ScheduledTransactionsResponseData.md b/docs/ScheduledTransactionsResponseData.md new file mode 100644 index 0000000..f5bc860 --- /dev/null +++ b/docs/ScheduledTransactionsResponseData.md @@ -0,0 +1,12 @@ +# ScheduledTransactionsResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scheduled_transactions** | [**Vec<::models::ScheduledTransactionDetail>**](ScheduledTransactionDetail.md) | | +**server_knowledge** | **i64** | 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/docs/SubTransaction.md b/docs/SubTransaction.md new file mode 100644 index 0000000..77bad7f --- /dev/null +++ b/docs/SubTransaction.md @@ -0,0 +1,18 @@ +# SubTransaction + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**transaction_id** | **String** | | +**amount** | **i64** | The subtransaction amount in milliunits format | +**memo** | **String** | | [optional] +**payee_id** | **String** | | [optional] +**category_id** | **String** | | [optional] +**transfer_account_id** | **String** | If a transfer, the account_id which the subtransaction transfers to | [optional] +**deleted** | **bool** | Whether or not the subtransaction has been deleted. Deleted subtransactions will only be included in delta requests. | + +[[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/docs/TransactionDetail.md b/docs/TransactionDetail.md new file mode 100644 index 0000000..3d23f44 --- /dev/null +++ b/docs/TransactionDetail.md @@ -0,0 +1,29 @@ +# TransactionDetail + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**date** | [***String**](string.md) | The transaction date in ISO format (e.g. 2016-12-01) | +**amount** | **i64** | The transaction amount in milliunits format | +**memo** | **String** | | [optional] +**cleared** | **String** | The cleared status of the transaction | +**approved** | **bool** | Whether or not the transaction is approved | +**flag_color** | **String** | The transaction flag | [optional] +**account_id** | **String** | | +**payee_id** | **String** | | [optional] +**category_id** | **String** | | [optional] +**transfer_account_id** | **String** | If a transfer transaction, the account to which it transfers | [optional] +**transfer_transaction_id** | **String** | If a transfer transaction, the id of transaction on the other side of the transfer | [optional] +**matched_transaction_id** | **String** | If transaction is matched, the id of the matched transaction | [optional] +**import_id** | **String** | If the Transaction was imported, this field is a unique (by account) import identifier. If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. | [optional] +**deleted** | **bool** | Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests. | +**account_name** | **String** | | +**payee_name** | **String** | | [optional] +**category_name** | **String** | | [optional] +**subtransactions** | [**Vec<::models::SubTransaction>**](SubTransaction.md) | If a split transaction, the subtransactions. | + +[[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/docs/TransactionDetailAllOf.md b/docs/TransactionDetailAllOf.md new file mode 100644 index 0000000..2db8459 --- /dev/null +++ b/docs/TransactionDetailAllOf.md @@ -0,0 +1,14 @@ +# TransactionDetailAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account_name** | **String** | | +**payee_name** | **String** | | [optional] +**category_name** | **String** | | [optional] +**subtransactions** | [**Vec<::models::SubTransaction>**](SubTransaction.md) | If a split transaction, the subtransactions. | + +[[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/docs/TransactionResponse.md b/docs/TransactionResponse.md new file mode 100644 index 0000000..ac81dfa --- /dev/null +++ b/docs/TransactionResponse.md @@ -0,0 +1,11 @@ +# TransactionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [***::models::TransactionResponseData**](TransactionResponse_data.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/docs/TransactionResponseData.md b/docs/TransactionResponseData.md new file mode 100644 index 0000000..81977f0 --- /dev/null +++ b/docs/TransactionResponseData.md @@ -0,0 +1,11 @@ +# TransactionResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**transaction** | [***::models::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/docs/TransactionSummary.md b/docs/TransactionSummary.md new file mode 100644 index 0000000..fd93b15 --- /dev/null +++ b/docs/TransactionSummary.md @@ -0,0 +1,25 @@ +# TransactionSummary + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**date** | [***String**](string.md) | The transaction date in ISO format (e.g. 2016-12-01) | +**amount** | **i64** | The transaction amount in milliunits format | +**memo** | **String** | | [optional] +**cleared** | **String** | The cleared status of the transaction | +**approved** | **bool** | Whether or not the transaction is approved | +**flag_color** | **String** | The transaction flag | [optional] +**account_id** | **String** | | +**payee_id** | **String** | | [optional] +**category_id** | **String** | | [optional] +**transfer_account_id** | **String** | If a transfer transaction, the account to which it transfers | [optional] +**transfer_transaction_id** | **String** | If a transfer transaction, the id of transaction on the other side of the transfer | [optional] +**matched_transaction_id** | **String** | If transaction is matched, the id of the matched transaction | [optional] +**import_id** | **String** | If the Transaction was imported, this field is a unique (by account) import identifier. If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. | [optional] +**deleted** | **bool** | Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests. | + +[[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/docs/TransactionsApi.md b/docs/TransactionsApi.md new file mode 100644 index 0000000..64ecb4b --- /dev/null +++ b/docs/TransactionsApi.md @@ -0,0 +1,323 @@ +# \TransactionsApi + +All URIs are relative to *https://api.youneedabudget.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_transaction**](TransactionsApi.md#create_transaction) | **post** /budgets/{budget_id}/transactions | Create a single transaction or multiple transactions +[**get_transaction_by_id**](TransactionsApi.md#get_transaction_by_id) | **get** /budgets/{budget_id}/transactions/{transaction_id} | Single 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_payee**](TransactionsApi.md#get_transactions_by_payee) | **get** /budgets/{budget_id}/payees/{payee_id}/transactions | List payee transactions +[**update_transaction**](TransactionsApi.md#update_transaction) | **put** /budgets/{budget_id}/transactions/{transaction_id} | Updates an existing transaction +[**update_transactions**](TransactionsApi.md#update_transactions) | **patch** /budgets/{budget_id}/transactions | Update multiple transactions + + + +## create_transaction + +> ::models::SaveTransactionsResponse create_transaction(ctx, budget_id, data) +Create a single transaction or multiple transactions + +Creates a single transaction or multiple transactions. If you provide a body containing a 'transaction' object, a single transaction will be created and if you provide a body containing a 'transactions' array, multiple transactions will be created. Scheduled transactions cannot be created on this endpoint. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | + **data** | [**SaveTransactionsWrapper**](SaveTransactionsWrapper.md)| The transaction or transactions to create. To create a single transaction you can specify a value for the 'transaction' object and to create multiple transactions you can specify an array of 'transactions'. It is expected that you will only provide a value for one of these objects. | + +### Return type + +[**::models::SaveTransactionsResponse**](SaveTransactionsResponse.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_transaction_by_id + +> ::models::TransactionResponse get_transaction_by_id(ctx, budget_id, transaction_id) +Single transaction + +Returns a single transaction + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | + **transaction_id** | **String**| The id of the transaction | + +### Return type + +[**::models::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 + +> ::models::TransactionsResponse get_transactions(ctx, budget_id, optional) +List transactions + +Returns budget transactions + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | + **since_date** | **String**| If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). | + **_type** | **String**| If specified, only transactions of the specified type will be included. 'uncategorized' and 'unapproved' are currently supported. | + **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | + +### Return type + +[**::models::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 + +> ::models::TransactionsResponse get_transactions_by_account(ctx, budget_id, account_id, optional) +List account transactions + +Returns all transactions for a specified account + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | + **account_id** | **String**| The id of the account | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | + **account_id** | **String**| The id of the account | + **since_date** | **String**| If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). | + **_type** | **String**| If specified, only transactions of the specified type will be included. 'uncategorized' and 'unapproved' are currently supported. | + **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | + +### Return type + +[**::models::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 + +> ::models::HybridTransactionsResponse get_transactions_by_category(ctx, budget_id, category_id, optional) +List category transactions + +Returns all transactions for a specified category + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | + **category_id** | **String**| The id of the category | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | + **category_id** | **String**| The id of the category | + **since_date** | **String**| If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). | + **_type** | **String**| If specified, only transactions of the specified type will be included. 'uncategorized' and 'unapproved' are currently supported. | + **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | + +### Return type + +[**::models::HybridTransactionsResponse**](HybridTransactionsResponse.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_payee + +> ::models::HybridTransactionsResponse get_transactions_by_payee(ctx, budget_id, payee_id, optional) +List payee transactions + +Returns all transactions for a specified payee + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | + **payee_id** | **String**| The id of the payee | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters + +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | + **payee_id** | **String**| The id of the payee | + **since_date** | **String**| If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). | + **_type** | **String**| If specified, only transactions of the specified type will be included. 'uncategorized' and 'unapproved' are currently supported. | + **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | + +### Return type + +[**::models::HybridTransactionsResponse**](HybridTransactionsResponse.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 + +> ::models::TransactionResponse update_transaction(ctx, budget_id, transaction_id, data) +Updates an existing transaction + +Updates a transaction + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | + **transaction_id** | **String**| The id of the transaction | + **data** | [**UpdateTransactionWrapper**](UpdateTransactionWrapper.md)| The transaction to update | + +### Return type + +[**::models::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_transactions + +> ::models::UpdateTransactionsResponse update_transactions(ctx, budget_id, data) +Update multiple transactions + +Updates multiple transactions, by 'id' or 'import_id'. + +### Required Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | + **data** | [**UpdateTransactionsWrapper**](UpdateTransactionsWrapper.md)| The transactions to update. Optionally, transaction 'id' value(s) can be specified as null and an 'import_id' value can be provided which will allow transaction(s) to updated by their import_id. | + +### Return type + +[**::models::UpdateTransactionsResponse**](UpdateTransactionsResponse.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/docs/TransactionsResponse.md b/docs/TransactionsResponse.md new file mode 100644 index 0000000..fec6f21 --- /dev/null +++ b/docs/TransactionsResponse.md @@ -0,0 +1,11 @@ +# TransactionsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [***::models::TransactionsResponseData**](TransactionsResponse_data.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/docs/TransactionsResponseData.md b/docs/TransactionsResponseData.md new file mode 100644 index 0000000..2b64bf7 --- /dev/null +++ b/docs/TransactionsResponseData.md @@ -0,0 +1,12 @@ +# TransactionsResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**transactions** | [**Vec<::models::TransactionDetail>**](TransactionDetail.md) | | +**server_knowledge** | **i64** | 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/docs/UpdateTransaction.md b/docs/UpdateTransaction.md new file mode 100644 index 0000000..6d6ecb0 --- /dev/null +++ b/docs/UpdateTransaction.md @@ -0,0 +1,22 @@ +# UpdateTransaction + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [optional] +**account_id** | **String** | | +**date** | [***String**](string.md) | The transaction date in ISO format (e.g. 2016-12-01). Future dates (scheduled transactions) are not permitted. Split transaction dates cannot be changed and if a different date is supplied it will be ignored. | +**amount** | **i64** | The transaction amount in milliunits format. Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored. | +**payee_id** | **String** | The payee for the transaction | [optional] +**payee_name** | **String** | The payee name. If a payee_name value is provided and payee_id has a null value, the payee_name value will be used to resolve the payee by either (1) a matching payee rename rule (only if import_id is also specified) or (2) a payee with the same name or (3) creation of a new payee. | [optional] +**category_id** | **String** | The category for the transaction. Split and Credit Card Payment categories are not permitted and will be ignored if supplied. If an existing transaction has a Split category it cannot be changed. | [optional] +**memo** | **String** | | [optional] +**cleared** | **String** | 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] +**flag_color** | **String** | The transaction flag | [optional] +**import_id** | **String** | If specified, the new transaction will be assigned this import_id and considered \"imported\". *At the time of import* we will attempt to match \"imported\" transactions with non-imported (i.e. \"user-entered\") transactions.

Transactions imported through File Based Import or Direct Import (not through the API) are assigned an import_id in the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. Using a consistent format will prevent duplicates through Direct Import and File Based Import.

If import_id is omitted or specified as null, the transaction will be treated as a \"user-entered\" transaction. As such, it will be eligible to be matched against transactions later being imported (via DI, FBI, or API). | [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/docs/UpdateTransactionWrapper.md b/docs/UpdateTransactionWrapper.md new file mode 100644 index 0000000..df6846f --- /dev/null +++ b/docs/UpdateTransactionWrapper.md @@ -0,0 +1,11 @@ +# UpdateTransactionWrapper + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**transaction** | [***::models::UpdateTransaction**](UpdateTransaction.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/docs/UpdateTransactionsResponse.md b/docs/UpdateTransactionsResponse.md new file mode 100644 index 0000000..77e6431 --- /dev/null +++ b/docs/UpdateTransactionsResponse.md @@ -0,0 +1,11 @@ +# UpdateTransactionsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [***::models::SaveTransactionsResponseData**](SaveTransactionsResponse_data.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/docs/UpdateTransactionsWrapper.md b/docs/UpdateTransactionsWrapper.md new file mode 100644 index 0000000..f039804 --- /dev/null +++ b/docs/UpdateTransactionsWrapper.md @@ -0,0 +1,12 @@ +# UpdateTransactionsWrapper + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**transaction** | [***::models::UpdateTransaction**](UpdateTransaction.md) | | [optional] +**transactions** | [**Vec<::models::UpdateTransaction>**](UpdateTransaction.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/docs/User.md b/docs/User.md new file mode 100644 index 0000000..28cb9e0 --- /dev/null +++ b/docs/User.md @@ -0,0 +1,11 @@ +# User + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | + +[[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/docs/UserApi.md b/docs/UserApi.md new file mode 100644 index 0000000..c2f9359 --- /dev/null +++ b/docs/UserApi.md @@ -0,0 +1,36 @@ +# \UserApi + +All URIs are relative to *https://api.youneedabudget.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_user**](UserApi.md#get_user) | **get** /user | User info + + + +## get_user + +> ::models::UserResponse get_user(ctx, ) +User info + +Returns authenticated user information + +### Required Parameters + +This endpoint does not need any parameter. + +### Return type + +[**::models::UserResponse**](UserResponse.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/docs/UserResponse.md b/docs/UserResponse.md new file mode 100644 index 0000000..31b0d2f --- /dev/null +++ b/docs/UserResponse.md @@ -0,0 +1,11 @@ +# UserResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [***::models::UserResponseData**](UserResponse_data.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/docs/UserResponseData.md b/docs/UserResponseData.md new file mode 100644 index 0000000..3aff41b --- /dev/null +++ b/docs/UserResponseData.md @@ -0,0 +1,11 @@ +# UserResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user** | [***::models::User**](User.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/git_push.sh b/git_push.sh new file mode 100644 index 0000000..8442b80 --- /dev/null +++ b/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 openapi-pestore-perl "minor update" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + 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/src/apis/accounts_api.rs b/src/apis/accounts_api.rs new file mode 100644 index 0000000..616476e --- /dev/null +++ b/src/apis/accounts_api.rs @@ -0,0 +1,87 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use std::rc::Rc; +use std::borrow::Borrow; + +use reqwest; + +use super::{Error, configuration, urlencode}; + +pub struct AccountsApiClient { + configuration: Rc, +} + +impl AccountsApiClient { + pub fn new(configuration: Rc) -> AccountsApiClient { + AccountsApiClient { + configuration: configuration, + } + } +} + +pub trait AccountsApi { + fn get_account_by_id(&self, budget_id: &str, account_id: &str) -> Result<::models::AccountResponse, Error>; + fn get_accounts(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::AccountsResponse, Error>; +} + +impl AccountsApi for AccountsApiClient { + fn get_account_by_id(&self, budget_id: &str, account_id: &str) -> Result<::models::AccountResponse, Error> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + let client = &configuration.client; + + let uri_str = format!("{}/budgets/{budget_id}/accounts/{account_id}", configuration.base_path, budget_id=urlencode(budget_id), account_id=account_id); + let mut req_builder = client.get(uri_str.as_str()); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", val); + }; + + // send request + let req = req_builder.build()?; + + Ok(client.execute(req)?.error_for_status()?.json()?) + } + + fn get_accounts(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::AccountsResponse, Error> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + let client = &configuration.client; + + let uri_str = format!("{}/budgets/{budget_id}/accounts", configuration.base_path, budget_id=urlencode(budget_id)); + let mut req_builder = client.get(uri_str.as_str()); + + req_builder = req_builder.query(&[("last_knowledge_of_server", &last_knowledge_of_server.to_string())]); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", val); + }; + + // send request + let req = req_builder.build()?; + + Ok(client.execute(req)?.error_for_status()?.json()?) + } + +} diff --git a/src/apis/budgets_api.rs b/src/apis/budgets_api.rs new file mode 100644 index 0000000..663dc59 --- /dev/null +++ b/src/apis/budgets_api.rs @@ -0,0 +1,113 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use std::rc::Rc; +use std::borrow::Borrow; + +use reqwest; + +use super::{Error, configuration, urlencode}; + +pub struct BudgetsApiClient { + configuration: Rc, +} + +impl BudgetsApiClient { + pub fn new(configuration: Rc) -> BudgetsApiClient { + BudgetsApiClient { + configuration: configuration, + } + } +} + +pub trait BudgetsApi { + fn get_budget_by_id(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::BudgetDetailResponse, Error>; + fn get_budget_settings_by_id(&self, budget_id: &str) -> Result<::models::BudgetSettingsResponse, Error>; + fn get_budgets(&self, ) -> Result<::models::BudgetSummaryResponse, Error>; +} + +impl BudgetsApi for BudgetsApiClient { + fn get_budget_by_id(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::BudgetDetailResponse, Error> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + let client = &configuration.client; + + let uri_str = format!("{}/budgets/{budget_id}", configuration.base_path, budget_id=urlencode(budget_id)); + let mut req_builder = client.get(uri_str.as_str()); + + req_builder = req_builder.query(&[("last_knowledge_of_server", &last_knowledge_of_server.to_string())]); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", val); + }; + + // send request + let req = req_builder.build()?; + + Ok(client.execute(req)?.error_for_status()?.json()?) + } + + fn get_budget_settings_by_id(&self, budget_id: &str) -> Result<::models::BudgetSettingsResponse, Error> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + let client = &configuration.client; + + let uri_str = format!("{}/budgets/{budget_id}/settings", configuration.base_path, budget_id=urlencode(budget_id)); + let mut req_builder = client.get(uri_str.as_str()); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", val); + }; + + // send request + let req = req_builder.build()?; + + Ok(client.execute(req)?.error_for_status()?.json()?) + } + + fn get_budgets(&self, ) -> Result<::models::BudgetSummaryResponse, Error> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + let client = &configuration.client; + + let uri_str = format!("{}/budgets", configuration.base_path); + let mut req_builder = client.get(uri_str.as_str()); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", val); + }; + + // send request + let req = req_builder.build()?; + + Ok(client.execute(req)?.error_for_status()?.json()?) + } + +} diff --git a/src/apis/categories_api.rs b/src/apis/categories_api.rs new file mode 100644 index 0000000..417a2d9 --- /dev/null +++ b/src/apis/categories_api.rs @@ -0,0 +1,140 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use std::rc::Rc; +use std::borrow::Borrow; + +use reqwest; + +use super::{Error, configuration, urlencode}; + +pub struct CategoriesApiClient { + configuration: Rc, +} + +impl CategoriesApiClient { + pub fn new(configuration: Rc) -> CategoriesApiClient { + CategoriesApiClient { + configuration: configuration, + } + } +} + +pub trait CategoriesApi { + fn get_categories(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::CategoriesResponse, Error>; + fn get_category_by_id(&self, budget_id: &str, category_id: &str) -> Result<::models::CategoryResponse, Error>; + fn get_month_category_by_id(&self, budget_id: &str, month: String, category_id: &str) -> Result<::models::CategoryResponse, Error>; + fn update_month_category(&self, budget_id: &str, month: String, category_id: &str, data: ::models::SaveMonthCategoryWrapper) -> Result<::models::SaveCategoryResponse, Error>; +} + +impl CategoriesApi for CategoriesApiClient { + fn get_categories(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::CategoriesResponse, Error> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + let client = &configuration.client; + + let uri_str = format!("{}/budgets/{budget_id}/categories", configuration.base_path, budget_id=urlencode(budget_id)); + let mut req_builder = client.get(uri_str.as_str()); + + req_builder = req_builder.query(&[("last_knowledge_of_server", &last_knowledge_of_server.to_string())]); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", val); + }; + + // send request + let req = req_builder.build()?; + + Ok(client.execute(req)?.error_for_status()?.json()?) + } + + fn get_category_by_id(&self, budget_id: &str, category_id: &str) -> Result<::models::CategoryResponse, Error> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + let client = &configuration.client; + + let uri_str = format!("{}/budgets/{budget_id}/categories/{category_id}", configuration.base_path, budget_id=urlencode(budget_id), category_id=urlencode(category_id)); + let mut req_builder = client.get(uri_str.as_str()); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", val); + }; + + // send request + let req = req_builder.build()?; + + Ok(client.execute(req)?.error_for_status()?.json()?) + } + + fn get_month_category_by_id(&self, budget_id: &str, month: String, category_id: &str) -> Result<::models::CategoryResponse, Error> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + let client = &configuration.client; + + let uri_str = format!("{}/budgets/{budget_id}/months/{month}/categories/{category_id}", configuration.base_path, budget_id=urlencode(budget_id), month=month, category_id=urlencode(category_id)); + let mut req_builder = client.get(uri_str.as_str()); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", val); + }; + + // send request + let req = req_builder.build()?; + + Ok(client.execute(req)?.error_for_status()?.json()?) + } + + fn update_month_category(&self, budget_id: &str, month: String, category_id: &str, data: ::models::SaveMonthCategoryWrapper) -> Result<::models::SaveCategoryResponse, Error> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + let client = &configuration.client; + + let uri_str = format!("{}/budgets/{budget_id}/months/{month}/categories/{category_id}", configuration.base_path, budget_id=urlencode(budget_id), month=month, category_id=urlencode(category_id)); + let mut req_builder = client.patch(uri_str.as_str()); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", val); + }; + req_builder = req_builder.json(&data); + + // send request + let req = req_builder.build()?; + + Ok(client.execute(req)?.error_for_status()?.json()?) + } + +} diff --git a/src/apis/client.rs b/src/apis/client.rs new file mode 100644 index 0000000..2776f11 --- /dev/null +++ b/src/apis/client.rs @@ -0,0 +1,78 @@ +use std::rc::Rc; + +use super::configuration::Configuration; + +pub struct APIClient { + configuration: Rc, + accounts_api: Box<::apis::AccountsApi>, + budgets_api: Box<::apis::BudgetsApi>, + categories_api: Box<::apis::CategoriesApi>, + deprecated_api: Box<::apis::DeprecatedApi>, + months_api: Box<::apis::MonthsApi>, + payee_locations_api: Box<::apis::PayeeLocationsApi>, + payees_api: Box<::apis::PayeesApi>, + scheduled_transactions_api: Box<::apis::ScheduledTransactionsApi>, + transactions_api: Box<::apis::TransactionsApi>, + user_api: Box<::apis::UserApi>, +} + +impl APIClient { + pub fn new(configuration: Configuration) -> APIClient { + let rc = Rc::new(configuration); + + APIClient { + configuration: rc.clone(), + accounts_api: Box::new(::apis::AccountsApiClient::new(rc.clone())), + budgets_api: Box::new(::apis::BudgetsApiClient::new(rc.clone())), + categories_api: Box::new(::apis::CategoriesApiClient::new(rc.clone())), + deprecated_api: Box::new(::apis::DeprecatedApiClient::new(rc.clone())), + months_api: Box::new(::apis::MonthsApiClient::new(rc.clone())), + payee_locations_api: Box::new(::apis::PayeeLocationsApiClient::new(rc.clone())), + payees_api: Box::new(::apis::PayeesApiClient::new(rc.clone())), + scheduled_transactions_api: Box::new(::apis::ScheduledTransactionsApiClient::new(rc.clone())), + transactions_api: Box::new(::apis::TransactionsApiClient::new(rc.clone())), + user_api: Box::new(::apis::UserApiClient::new(rc.clone())), + } + } + + pub fn accounts_api(&self) -> &::apis::AccountsApi{ + self.accounts_api.as_ref() + } + + pub fn budgets_api(&self) -> &::apis::BudgetsApi{ + self.budgets_api.as_ref() + } + + pub fn categories_api(&self) -> &::apis::CategoriesApi{ + self.categories_api.as_ref() + } + + pub fn deprecated_api(&self) -> &::apis::DeprecatedApi{ + self.deprecated_api.as_ref() + } + + pub fn months_api(&self) -> &::apis::MonthsApi{ + self.months_api.as_ref() + } + + pub fn payee_locations_api(&self) -> &::apis::PayeeLocationsApi{ + self.payee_locations_api.as_ref() + } + + pub fn payees_api(&self) -> &::apis::PayeesApi{ + self.payees_api.as_ref() + } + + pub fn scheduled_transactions_api(&self) -> &::apis::ScheduledTransactionsApi{ + self.scheduled_transactions_api.as_ref() + } + + pub fn transactions_api(&self) -> &::apis::TransactionsApi{ + self.transactions_api.as_ref() + } + + pub fn user_api(&self) -> &::apis::UserApi{ + self.user_api.as_ref() + } + +} diff --git a/src/apis/configuration.rs b/src/apis/configuration.rs new file mode 100644 index 0000000..4378dfa --- /dev/null +++ b/src/apis/configuration.rs @@ -0,0 +1,50 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +use reqwest; + +pub struct Configuration { + pub base_path: String, + pub user_agent: Option, + pub client: reqwest::Client, + pub basic_auth: Option, + pub oauth_access_token: Option, + pub bearer_access_token: Option, + pub api_key: Option, + // TODO: take an oauth2 token source, similar to the go one +} + +pub type BasicAuth = (String, Option); + +pub struct ApiKey { + pub prefix: Option, + pub key: String, +} + +impl Configuration { + pub fn new() -> Configuration { + Configuration::default() + } +} + +impl Default for Configuration { + fn default() -> Self { + Configuration { + base_path: "https://api.youneedabudget.com/v1".to_owned(), + user_agent: Some("OpenAPI-Generator/1.0.0/rust".to_owned()), + client: reqwest::Client::new(), + basic_auth: None, + oauth_access_token: None, + bearer_access_token: None, + api_key: None, + } + } +} diff --git a/src/apis/deprecated_api.rs b/src/apis/deprecated_api.rs new file mode 100644 index 0000000..a148248 --- /dev/null +++ b/src/apis/deprecated_api.rs @@ -0,0 +1,61 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use std::rc::Rc; +use std::borrow::Borrow; + +use reqwest; + +use super::{Error, configuration, urlencode}; + +pub struct DeprecatedApiClient { + configuration: Rc, +} + +impl DeprecatedApiClient { + pub fn new(configuration: Rc) -> DeprecatedApiClient { + DeprecatedApiClient { + configuration: configuration, + } + } +} + +pub trait DeprecatedApi { + fn bulk_create_transactions(&self, budget_id: &str, transactions: ::models::BulkTransactions) -> Result<::models::BulkResponse, Error>; +} + +impl DeprecatedApi for DeprecatedApiClient { + fn bulk_create_transactions(&self, budget_id: &str, transactions: ::models::BulkTransactions) -> Result<::models::BulkResponse, Error> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + let client = &configuration.client; + + let uri_str = format!("{}/budgets/{budget_id}/transactions/bulk", configuration.base_path, budget_id=urlencode(budget_id)); + let mut req_builder = client.post(uri_str.as_str()); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", val); + }; + req_builder = req_builder.json(&transactions); + + // send request + let req = req_builder.build()?; + + Ok(client.execute(req)?.error_for_status()?.json()?) + } + +} diff --git a/src/apis/mod.rs b/src/apis/mod.rs new file mode 100644 index 0000000..910bd7e --- /dev/null +++ b/src/apis/mod.rs @@ -0,0 +1,57 @@ +use reqwest; +use serde_json; + +#[derive(Debug)] +pub enum Error { + Reqwest(reqwest::Error), + Serde(serde_json::Error), + Io(std::io::Error), +} + +impl From for Error { + fn from(e: reqwest::Error) -> Self { + Error::Reqwest(e) + } +} + +impl From for Error { + fn from(e: serde_json::Error) -> Self { + Error::Serde(e) + } +} + +impl From for Error { + fn from(e: std::io::Error) -> Self { + Error::Io(e) + } +} + +pub fn urlencode>(s: T) -> String { + ::url::form_urlencoded::byte_serialize(s.as_ref().as_bytes()).collect() +} + +use super::models::*; + +mod accounts_api; +pub use self::accounts_api::{ AccountsApi, AccountsApiClient }; +mod budgets_api; +pub use self::budgets_api::{ BudgetsApi, BudgetsApiClient }; +mod categories_api; +pub use self::categories_api::{ CategoriesApi, CategoriesApiClient }; +mod deprecated_api; +pub use self::deprecated_api::{ DeprecatedApi, DeprecatedApiClient }; +mod months_api; +pub use self::months_api::{ MonthsApi, MonthsApiClient }; +mod payee_locations_api; +pub use self::payee_locations_api::{ PayeeLocationsApi, PayeeLocationsApiClient }; +mod payees_api; +pub use self::payees_api::{ PayeesApi, PayeesApiClient }; +mod scheduled_transactions_api; +pub use self::scheduled_transactions_api::{ ScheduledTransactionsApi, ScheduledTransactionsApiClient }; +mod transactions_api; +pub use self::transactions_api::{ TransactionsApi, TransactionsApiClient }; +mod user_api; +pub use self::user_api::{ UserApi, UserApiClient }; + +pub mod configuration; +pub mod client; diff --git a/src/apis/months_api.rs b/src/apis/months_api.rs new file mode 100644 index 0000000..3bee3fe --- /dev/null +++ b/src/apis/months_api.rs @@ -0,0 +1,87 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use std::rc::Rc; +use std::borrow::Borrow; + +use reqwest; + +use super::{Error, configuration, urlencode}; + +pub struct MonthsApiClient { + configuration: Rc, +} + +impl MonthsApiClient { + pub fn new(configuration: Rc) -> MonthsApiClient { + MonthsApiClient { + configuration: configuration, + } + } +} + +pub trait MonthsApi { + fn get_budget_month(&self, budget_id: &str, month: String) -> Result<::models::MonthDetailResponse, Error>; + fn get_budget_months(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::MonthSummariesResponse, Error>; +} + +impl MonthsApi for MonthsApiClient { + fn get_budget_month(&self, budget_id: &str, month: String) -> Result<::models::MonthDetailResponse, Error> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + let client = &configuration.client; + + let uri_str = format!("{}/budgets/{budget_id}/months/{month}", configuration.base_path, budget_id=urlencode(budget_id), month=month); + let mut req_builder = client.get(uri_str.as_str()); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", val); + }; + + // send request + let req = req_builder.build()?; + + Ok(client.execute(req)?.error_for_status()?.json()?) + } + + fn get_budget_months(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::MonthSummariesResponse, Error> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + let client = &configuration.client; + + let uri_str = format!("{}/budgets/{budget_id}/months", configuration.base_path, budget_id=urlencode(budget_id)); + let mut req_builder = client.get(uri_str.as_str()); + + req_builder = req_builder.query(&[("last_knowledge_of_server", &last_knowledge_of_server.to_string())]); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", val); + }; + + // send request + let req = req_builder.build()?; + + Ok(client.execute(req)?.error_for_status()?.json()?) + } + +} diff --git a/src/apis/payee_locations_api.rs b/src/apis/payee_locations_api.rs new file mode 100644 index 0000000..88f12e1 --- /dev/null +++ b/src/apis/payee_locations_api.rs @@ -0,0 +1,112 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use std::rc::Rc; +use std::borrow::Borrow; + +use reqwest; + +use super::{Error, configuration, urlencode}; + +pub struct PayeeLocationsApiClient { + configuration: Rc, +} + +impl PayeeLocationsApiClient { + pub fn new(configuration: Rc) -> PayeeLocationsApiClient { + PayeeLocationsApiClient { + configuration: configuration, + } + } +} + +pub trait PayeeLocationsApi { + fn get_payee_location_by_id(&self, budget_id: &str, payee_location_id: &str) -> Result<::models::PayeeLocationResponse, Error>; + fn get_payee_locations(&self, budget_id: &str) -> Result<::models::PayeeLocationsResponse, Error>; + fn get_payee_locations_by_payee(&self, budget_id: &str, payee_id: &str) -> Result<::models::PayeeLocationsResponse, Error>; +} + +impl PayeeLocationsApi for PayeeLocationsApiClient { + fn get_payee_location_by_id(&self, budget_id: &str, payee_location_id: &str) -> Result<::models::PayeeLocationResponse, Error> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + let client = &configuration.client; + + let uri_str = format!("{}/budgets/{budget_id}/payee_locations/{payee_location_id}", configuration.base_path, budget_id=urlencode(budget_id), payee_location_id=urlencode(payee_location_id)); + let mut req_builder = client.get(uri_str.as_str()); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", val); + }; + + // send request + let req = req_builder.build()?; + + Ok(client.execute(req)?.error_for_status()?.json()?) + } + + fn get_payee_locations(&self, budget_id: &str) -> Result<::models::PayeeLocationsResponse, Error> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + let client = &configuration.client; + + let uri_str = format!("{}/budgets/{budget_id}/payee_locations", configuration.base_path, budget_id=urlencode(budget_id)); + let mut req_builder = client.get(uri_str.as_str()); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", val); + }; + + // send request + let req = req_builder.build()?; + + Ok(client.execute(req)?.error_for_status()?.json()?) + } + + fn get_payee_locations_by_payee(&self, budget_id: &str, payee_id: &str) -> Result<::models::PayeeLocationsResponse, Error> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + let client = &configuration.client; + + let uri_str = format!("{}/budgets/{budget_id}/payees/{payee_id}/payee_locations", configuration.base_path, budget_id=urlencode(budget_id), payee_id=urlencode(payee_id)); + let mut req_builder = client.get(uri_str.as_str()); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", val); + }; + + // send request + let req = req_builder.build()?; + + Ok(client.execute(req)?.error_for_status()?.json()?) + } + +} diff --git a/src/apis/payees_api.rs b/src/apis/payees_api.rs new file mode 100644 index 0000000..77db5bb --- /dev/null +++ b/src/apis/payees_api.rs @@ -0,0 +1,87 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use std::rc::Rc; +use std::borrow::Borrow; + +use reqwest; + +use super::{Error, configuration, urlencode}; + +pub struct PayeesApiClient { + configuration: Rc, +} + +impl PayeesApiClient { + pub fn new(configuration: Rc) -> PayeesApiClient { + PayeesApiClient { + configuration: configuration, + } + } +} + +pub trait PayeesApi { + fn get_payee_by_id(&self, budget_id: &str, payee_id: &str) -> Result<::models::PayeeResponse, Error>; + fn get_payees(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::PayeesResponse, Error>; +} + +impl PayeesApi for PayeesApiClient { + fn get_payee_by_id(&self, budget_id: &str, payee_id: &str) -> Result<::models::PayeeResponse, Error> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + let client = &configuration.client; + + let uri_str = format!("{}/budgets/{budget_id}/payees/{payee_id}", configuration.base_path, budget_id=urlencode(budget_id), payee_id=urlencode(payee_id)); + let mut req_builder = client.get(uri_str.as_str()); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", val); + }; + + // send request + let req = req_builder.build()?; + + Ok(client.execute(req)?.error_for_status()?.json()?) + } + + fn get_payees(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::PayeesResponse, Error> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + let client = &configuration.client; + + let uri_str = format!("{}/budgets/{budget_id}/payees", configuration.base_path, budget_id=urlencode(budget_id)); + let mut req_builder = client.get(uri_str.as_str()); + + req_builder = req_builder.query(&[("last_knowledge_of_server", &last_knowledge_of_server.to_string())]); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", val); + }; + + // send request + let req = req_builder.build()?; + + Ok(client.execute(req)?.error_for_status()?.json()?) + } + +} diff --git a/src/apis/scheduled_transactions_api.rs b/src/apis/scheduled_transactions_api.rs new file mode 100644 index 0000000..8ab30a8 --- /dev/null +++ b/src/apis/scheduled_transactions_api.rs @@ -0,0 +1,87 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use std::rc::Rc; +use std::borrow::Borrow; + +use reqwest; + +use super::{Error, configuration, urlencode}; + +pub struct ScheduledTransactionsApiClient { + configuration: Rc, +} + +impl ScheduledTransactionsApiClient { + pub fn new(configuration: Rc) -> ScheduledTransactionsApiClient { + ScheduledTransactionsApiClient { + configuration: configuration, + } + } +} + +pub trait ScheduledTransactionsApi { + fn get_scheduled_transaction_by_id(&self, budget_id: &str, scheduled_transaction_id: &str) -> Result<::models::ScheduledTransactionResponse, Error>; + fn get_scheduled_transactions(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::ScheduledTransactionsResponse, Error>; +} + +impl ScheduledTransactionsApi for ScheduledTransactionsApiClient { + fn get_scheduled_transaction_by_id(&self, budget_id: &str, scheduled_transaction_id: &str) -> Result<::models::ScheduledTransactionResponse, Error> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + let client = &configuration.client; + + let uri_str = format!("{}/budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id}", configuration.base_path, budget_id=urlencode(budget_id), scheduled_transaction_id=urlencode(scheduled_transaction_id)); + let mut req_builder = client.get(uri_str.as_str()); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", val); + }; + + // send request + let req = req_builder.build()?; + + Ok(client.execute(req)?.error_for_status()?.json()?) + } + + fn get_scheduled_transactions(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::ScheduledTransactionsResponse, Error> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + let client = &configuration.client; + + let uri_str = format!("{}/budgets/{budget_id}/scheduled_transactions", configuration.base_path, budget_id=urlencode(budget_id)); + let mut req_builder = client.get(uri_str.as_str()); + + req_builder = req_builder.query(&[("last_knowledge_of_server", &last_knowledge_of_server.to_string())]); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", val); + }; + + // send request + let req = req_builder.build()?; + + Ok(client.execute(req)?.error_for_status()?.json()?) + } + +} diff --git a/src/apis/transactions_api.rs b/src/apis/transactions_api.rs new file mode 100644 index 0000000..a6386a0 --- /dev/null +++ b/src/apis/transactions_api.rs @@ -0,0 +1,257 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use std::rc::Rc; +use std::borrow::Borrow; + +use reqwest; + +use super::{Error, configuration, urlencode}; + +pub struct TransactionsApiClient { + configuration: Rc, +} + +impl TransactionsApiClient { + pub fn new(configuration: Rc) -> TransactionsApiClient { + TransactionsApiClient { + configuration: configuration, + } + } +} + +pub trait TransactionsApi { + fn create_transaction(&self, budget_id: &str, data: ::models::SaveTransactionsWrapper) -> Result<::models::SaveTransactionsResponse, Error>; + fn get_transaction_by_id(&self, budget_id: &str, transaction_id: &str) -> Result<::models::TransactionResponse, Error>; + fn get_transactions(&self, budget_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::TransactionsResponse, Error>; + fn get_transactions_by_account(&self, budget_id: &str, account_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::TransactionsResponse, Error>; + fn get_transactions_by_category(&self, budget_id: &str, category_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::HybridTransactionsResponse, Error>; + fn get_transactions_by_payee(&self, budget_id: &str, payee_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::HybridTransactionsResponse, Error>; + fn update_transaction(&self, budget_id: &str, transaction_id: &str, data: ::models::UpdateTransactionWrapper) -> Result<::models::TransactionResponse, Error>; + fn update_transactions(&self, budget_id: &str, data: ::models::UpdateTransactionsWrapper) -> Result<::models::UpdateTransactionsResponse, Error>; +} + +impl TransactionsApi for TransactionsApiClient { + fn create_transaction(&self, budget_id: &str, data: ::models::SaveTransactionsWrapper) -> Result<::models::SaveTransactionsResponse, Error> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + let client = &configuration.client; + + let uri_str = format!("{}/budgets/{budget_id}/transactions", configuration.base_path, budget_id=urlencode(budget_id)); + let mut req_builder = client.post(uri_str.as_str()); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", val); + }; + req_builder = req_builder.json(&data); + + // send request + let req = req_builder.build()?; + + Ok(client.execute(req)?.error_for_status()?.json()?) + } + + fn get_transaction_by_id(&self, budget_id: &str, transaction_id: &str) -> Result<::models::TransactionResponse, Error> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + let client = &configuration.client; + + let uri_str = format!("{}/budgets/{budget_id}/transactions/{transaction_id}", configuration.base_path, budget_id=urlencode(budget_id), transaction_id=urlencode(transaction_id)); + let mut req_builder = client.get(uri_str.as_str()); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", val); + }; + + // send request + let req = req_builder.build()?; + + Ok(client.execute(req)?.error_for_status()?.json()?) + } + + fn get_transactions(&self, budget_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::TransactionsResponse, Error> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + let client = &configuration.client; + + let uri_str = format!("{}/budgets/{budget_id}/transactions", configuration.base_path, budget_id=urlencode(budget_id)); + let mut req_builder = client.get(uri_str.as_str()); + + req_builder = req_builder.query(&[("since_date", &since_date.to_string())]); + req_builder = req_builder.query(&[("type", &_type.to_string())]); + req_builder = req_builder.query(&[("last_knowledge_of_server", &last_knowledge_of_server.to_string())]); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", val); + }; + + // send request + let req = req_builder.build()?; + + Ok(client.execute(req)?.error_for_status()?.json()?) + } + + fn get_transactions_by_account(&self, budget_id: &str, account_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::TransactionsResponse, Error> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + let client = &configuration.client; + + let uri_str = format!("{}/budgets/{budget_id}/accounts/{account_id}/transactions", configuration.base_path, budget_id=urlencode(budget_id), account_id=urlencode(account_id)); + let mut req_builder = client.get(uri_str.as_str()); + + req_builder = req_builder.query(&[("since_date", &since_date.to_string())]); + req_builder = req_builder.query(&[("type", &_type.to_string())]); + req_builder = req_builder.query(&[("last_knowledge_of_server", &last_knowledge_of_server.to_string())]); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", val); + }; + + // send request + let req = req_builder.build()?; + + Ok(client.execute(req)?.error_for_status()?.json()?) + } + + fn get_transactions_by_category(&self, budget_id: &str, category_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::HybridTransactionsResponse, Error> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + let client = &configuration.client; + + let uri_str = format!("{}/budgets/{budget_id}/categories/{category_id}/transactions", configuration.base_path, budget_id=urlencode(budget_id), category_id=urlencode(category_id)); + let mut req_builder = client.get(uri_str.as_str()); + + req_builder = req_builder.query(&[("since_date", &since_date.to_string())]); + req_builder = req_builder.query(&[("type", &_type.to_string())]); + req_builder = req_builder.query(&[("last_knowledge_of_server", &last_knowledge_of_server.to_string())]); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", val); + }; + + // send request + let req = req_builder.build()?; + + Ok(client.execute(req)?.error_for_status()?.json()?) + } + + fn get_transactions_by_payee(&self, budget_id: &str, payee_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::HybridTransactionsResponse, Error> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + let client = &configuration.client; + + let uri_str = format!("{}/budgets/{budget_id}/payees/{payee_id}/transactions", configuration.base_path, budget_id=urlencode(budget_id), payee_id=urlencode(payee_id)); + let mut req_builder = client.get(uri_str.as_str()); + + req_builder = req_builder.query(&[("since_date", &since_date.to_string())]); + req_builder = req_builder.query(&[("type", &_type.to_string())]); + req_builder = req_builder.query(&[("last_knowledge_of_server", &last_knowledge_of_server.to_string())]); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", val); + }; + + // send request + let req = req_builder.build()?; + + Ok(client.execute(req)?.error_for_status()?.json()?) + } + + fn update_transaction(&self, budget_id: &str, transaction_id: &str, data: ::models::UpdateTransactionWrapper) -> Result<::models::TransactionResponse, Error> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + let client = &configuration.client; + + let uri_str = format!("{}/budgets/{budget_id}/transactions/{transaction_id}", configuration.base_path, budget_id=urlencode(budget_id), transaction_id=urlencode(transaction_id)); + let mut req_builder = client.put(uri_str.as_str()); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", val); + }; + req_builder = req_builder.json(&data); + + // send request + let req = req_builder.build()?; + + Ok(client.execute(req)?.error_for_status()?.json()?) + } + + fn update_transactions(&self, budget_id: &str, data: ::models::UpdateTransactionsWrapper) -> Result<::models::UpdateTransactionsResponse, Error> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + let client = &configuration.client; + + let uri_str = format!("{}/budgets/{budget_id}/transactions", configuration.base_path, budget_id=urlencode(budget_id)); + let mut req_builder = client.patch(uri_str.as_str()); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", val); + }; + req_builder = req_builder.json(&data); + + // send request + let req = req_builder.build()?; + + Ok(client.execute(req)?.error_for_status()?.json()?) + } + +} diff --git a/src/apis/user_api.rs b/src/apis/user_api.rs new file mode 100644 index 0000000..50c243e --- /dev/null +++ b/src/apis/user_api.rs @@ -0,0 +1,60 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +use std::rc::Rc; +use std::borrow::Borrow; + +use reqwest; + +use super::{Error, configuration, urlencode}; + +pub struct UserApiClient { + configuration: Rc, +} + +impl UserApiClient { + pub fn new(configuration: Rc) -> UserApiClient { + UserApiClient { + configuration: configuration, + } + } +} + +pub trait UserApi { + fn get_user(&self, ) -> Result<::models::UserResponse, Error>; +} + +impl UserApi for UserApiClient { + fn get_user(&self, ) -> Result<::models::UserResponse, Error> { + let configuration: &configuration::Configuration = self.configuration.borrow(); + let client = &configuration.client; + + let uri_str = format!("{}/user", configuration.base_path); + let mut req_builder = client.get(uri_str.as_str()); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let val = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", val); + }; + + // send request + let req = req_builder.build()?; + + Ok(client.execute(req)?.error_for_status()?.json()?) + } + +} diff --git a/src/app.rs b/src/app.rs deleted file mode 100644 index 22bf543..0000000 --- a/src/app.rs +++ /dev/null @@ -1,46 +0,0 @@ -pub struct App { - cursive: cursive::Cursive, -} - -impl App { - pub fn new(budget: crate::ynab::Budget) -> Self { - let mut app = cursive::Cursive::default(); - let term_width = app.screen_size().x; - app.set_theme(Self::theme()); - app.add_global_callback('q', |s| s.quit()); - - let mut layout = cursive::views::LinearLayout::vertical(); - layout.add_child(cursive::views::TextView::new(format!( - "Budget: {} ({})\n{}", - budget.name(), - budget.id(), - "=".repeat(term_width), - ))); - - layout.add_child(crate::views::TxnTables::new("txn_tables", &budget)); - - app.set_user_data(budget); - app.add_fullscreen_layer(layout); - - Self { cursive: app } - } - - pub fn run(&mut self) { - self.cursive.run(); - } - - fn theme() -> cursive::theme::Theme { - let mut palette = cursive::theme::Palette::default(); - palette[cursive::theme::PaletteColor::Background] = - cursive::theme::Color::TerminalDefault; - palette[cursive::theme::PaletteColor::View] = - cursive::theme::Color::TerminalDefault; - palette[cursive::theme::PaletteColor::Primary] = - cursive::theme::Color::TerminalDefault; - cursive::theme::Theme { - shadow: false, - borders: cursive::theme::BorderStyle::Simple, - palette, - } - } -} diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..c1dd666 --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,10 @@ +#[macro_use] +extern crate serde_derive; + +extern crate serde; +extern crate serde_json; +extern crate url; +extern crate reqwest; + +pub mod apis; +pub mod models; diff --git a/src/main.rs b/src/main.rs deleted file mode 100644 index d53ce1c..0000000 --- a/src/main.rs +++ /dev/null @@ -1,37 +0,0 @@ -mod app; -mod paths; -mod views; -mod ynab; - -use snafu::ResultExt; - -#[derive(Debug, snafu::Snafu)] -pub enum Error { - #[snafu(display("failed to get api key: {}", source))] - GetApiKey { source: crate::paths::Error }, - - #[snafu(display("failed to load budget: {}", source))] - LoadBudget { source: crate::ynab::BudgetError }, -} - -pub type Result = std::result::Result; - -fn run() -> Result<()> { - let key = paths::read_api_key().context(GetApiKey)?; - let budget = ynab::Budget::new(&key).context(LoadBudget)?; - - let mut app = app::App::new(budget); - app.run(); - - Ok(()) -} - -fn main() { - match run() { - Ok(_) => {} - Err(e) => { - eprintln!("ynab-reimbursements: {}", e); - std::process::exit(1); - } - } -} diff --git a/src/models/account.rs b/src/models/account.rs new file mode 100644 index 0000000..6ffa1d5 --- /dev/null +++ b/src/models/account.rs @@ -0,0 +1,94 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct Account { + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "name")] + pub name: String, + /// The type of account. Note: payPal, merchantAccount, investmentAccount, and mortgage types have been deprecated and will be removed in the future. + #[serde(rename = "type")] + pub _type: String, + /// Whether this account is on budget or not + #[serde(rename = "on_budget")] + pub on_budget: bool, + /// Whether this account is closed or not + #[serde(rename = "closed")] + pub closed: bool, + #[serde(rename = "note", skip_serializing_if = "Option::is_none")] + pub note: Option, + /// The current balance of the account in milliunits format + #[serde(rename = "balance")] + pub balance: i64, + /// The current cleared balance of the account in milliunits format + #[serde(rename = "cleared_balance")] + pub cleared_balance: i64, + /// The current uncleared balance of the account in milliunits format + #[serde(rename = "uncleared_balance")] + pub uncleared_balance: i64, + /// The payee id which should be used when transferring to this account + #[serde(rename = "transfer_payee_id")] + pub transfer_payee_id: String, + /// Whether or not the account has been deleted. Deleted accounts will only be included in delta requests. + #[serde(rename = "deleted")] + pub deleted: bool, +} + +impl Account { + pub fn new(id: String, name: String, _type: String, on_budget: bool, closed: bool, balance: i64, cleared_balance: i64, uncleared_balance: i64, transfer_payee_id: String, deleted: bool) -> Account { + Account { + id: id, + name: name, + _type: _type, + on_budget: on_budget, + closed: closed, + note: None, + balance: balance, + cleared_balance: cleared_balance, + uncleared_balance: uncleared_balance, + transfer_payee_id: transfer_payee_id, + deleted: deleted, + } + } +} + +/// The type of account. Note: payPal, merchantAccount, investmentAccount, and mortgage types have been deprecated and will be removed in the future. +#[derive(Debug, Serialize, Deserialize)] +pub enum Type { + #[serde(rename = "checking")] + Checking, + #[serde(rename = "savings")] + Savings, + #[serde(rename = "cash")] + Cash, + #[serde(rename = "creditCard")] + CreditCard, + #[serde(rename = "lineOfCredit")] + LineOfCredit, + #[serde(rename = "otherAsset")] + OtherAsset, + #[serde(rename = "otherLiability")] + OtherLiability, + #[serde(rename = "payPal")] + PayPal, + #[serde(rename = "merchantAccount")] + MerchantAccount, + #[serde(rename = "investmentAccount")] + InvestmentAccount, + #[serde(rename = "mortgage")] + Mortgage, +} + diff --git a/src/models/account_response.rs b/src/models/account_response.rs new file mode 100644 index 0000000..633bacb --- /dev/null +++ b/src/models/account_response.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct AccountResponse { + #[serde(rename = "data")] + pub data: ::models::AccountResponseData, +} + +impl AccountResponse { + pub fn new(data: ::models::AccountResponseData) -> AccountResponse { + AccountResponse { + data: data, + } + } +} + + diff --git a/src/models/account_response_data.rs b/src/models/account_response_data.rs new file mode 100644 index 0000000..9340a0f --- /dev/null +++ b/src/models/account_response_data.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct AccountResponseData { + #[serde(rename = "account")] + pub account: ::models::Account, +} + +impl AccountResponseData { + pub fn new(account: ::models::Account) -> AccountResponseData { + AccountResponseData { + account: account, + } + } +} + + diff --git a/src/models/accounts_response.rs b/src/models/accounts_response.rs new file mode 100644 index 0000000..d2bd25d --- /dev/null +++ b/src/models/accounts_response.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct AccountsResponse { + #[serde(rename = "data")] + pub data: ::models::AccountsResponseData, +} + +impl AccountsResponse { + pub fn new(data: ::models::AccountsResponseData) -> AccountsResponse { + AccountsResponse { + data: data, + } + } +} + + diff --git a/src/models/accounts_response_data.rs b/src/models/accounts_response_data.rs new file mode 100644 index 0000000..1324953 --- /dev/null +++ b/src/models/accounts_response_data.rs @@ -0,0 +1,34 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct AccountsResponseData { + #[serde(rename = "accounts")] + pub accounts: Vec<::models::Account>, + /// The knowledge of the server + #[serde(rename = "server_knowledge")] + pub server_knowledge: i64, +} + +impl AccountsResponseData { + pub fn new(accounts: Vec<::models::Account>, server_knowledge: i64) -> AccountsResponseData { + AccountsResponseData { + accounts: accounts, + server_knowledge: server_knowledge, + } + } +} + + diff --git a/src/models/budget_detail.rs b/src/models/budget_detail.rs new file mode 100644 index 0000000..8553aad --- /dev/null +++ b/src/models/budget_detail.rs @@ -0,0 +1,81 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct BudgetDetail { + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "name")] + pub name: String, + /// The last time any changes were made to the budget from either a web or mobile client + #[serde(rename = "last_modified_on", skip_serializing_if = "Option::is_none")] + pub last_modified_on: Option, + /// The earliest budget month + #[serde(rename = "first_month", skip_serializing_if = "Option::is_none")] + pub first_month: Option, + /// The latest budget month + #[serde(rename = "last_month", skip_serializing_if = "Option::is_none")] + pub last_month: Option, + #[serde(rename = "date_format", skip_serializing_if = "Option::is_none")] + pub date_format: Option<::models::DateFormat>, + #[serde(rename = "currency_format", skip_serializing_if = "Option::is_none")] + pub currency_format: Option<::models::CurrencyFormat>, + #[serde(rename = "accounts", skip_serializing_if = "Option::is_none")] + pub accounts: Option>, + #[serde(rename = "payees", skip_serializing_if = "Option::is_none")] + pub payees: Option>, + #[serde(rename = "payee_locations", skip_serializing_if = "Option::is_none")] + pub payee_locations: Option>, + #[serde(rename = "category_groups", skip_serializing_if = "Option::is_none")] + pub category_groups: Option>, + #[serde(rename = "categories", skip_serializing_if = "Option::is_none")] + pub categories: Option>, + #[serde(rename = "months", skip_serializing_if = "Option::is_none")] + pub months: Option>, + #[serde(rename = "transactions", skip_serializing_if = "Option::is_none")] + pub transactions: Option>, + #[serde(rename = "subtransactions", skip_serializing_if = "Option::is_none")] + pub subtransactions: Option>, + #[serde(rename = "scheduled_transactions", skip_serializing_if = "Option::is_none")] + pub scheduled_transactions: Option>, + #[serde(rename = "scheduled_subtransactions", skip_serializing_if = "Option::is_none")] + pub scheduled_subtransactions: Option>, +} + +impl BudgetDetail { + pub fn new(id: String, name: String) -> BudgetDetail { + BudgetDetail { + id: id, + name: name, + last_modified_on: None, + first_month: None, + last_month: 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, + } + } +} + + diff --git a/src/models/budget_detail_all_of.rs b/src/models/budget_detail_all_of.rs new file mode 100644 index 0000000..90a621e --- /dev/null +++ b/src/models/budget_detail_all_of.rs @@ -0,0 +1,57 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct BudgetDetailAllOf { + #[serde(rename = "accounts", skip_serializing_if = "Option::is_none")] + pub accounts: Option>, + #[serde(rename = "payees", skip_serializing_if = "Option::is_none")] + pub payees: Option>, + #[serde(rename = "payee_locations", skip_serializing_if = "Option::is_none")] + pub payee_locations: Option>, + #[serde(rename = "category_groups", skip_serializing_if = "Option::is_none")] + pub category_groups: Option>, + #[serde(rename = "categories", skip_serializing_if = "Option::is_none")] + pub categories: Option>, + #[serde(rename = "months", skip_serializing_if = "Option::is_none")] + pub months: Option>, + #[serde(rename = "transactions", skip_serializing_if = "Option::is_none")] + pub transactions: Option>, + #[serde(rename = "subtransactions", skip_serializing_if = "Option::is_none")] + pub subtransactions: Option>, + #[serde(rename = "scheduled_transactions", skip_serializing_if = "Option::is_none")] + pub scheduled_transactions: Option>, + #[serde(rename = "scheduled_subtransactions", skip_serializing_if = "Option::is_none")] + pub scheduled_subtransactions: Option>, +} + +impl BudgetDetailAllOf { + pub fn new() -> BudgetDetailAllOf { + BudgetDetailAllOf { + accounts: None, + payees: None, + payee_locations: None, + category_groups: None, + categories: None, + months: None, + transactions: None, + subtransactions: None, + scheduled_transactions: None, + scheduled_subtransactions: None, + } + } +} + + diff --git a/src/models/budget_detail_response.rs b/src/models/budget_detail_response.rs new file mode 100644 index 0000000..5fe15c9 --- /dev/null +++ b/src/models/budget_detail_response.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct BudgetDetailResponse { + #[serde(rename = "data")] + pub data: ::models::BudgetDetailResponseData, +} + +impl BudgetDetailResponse { + pub fn new(data: ::models::BudgetDetailResponseData) -> BudgetDetailResponse { + BudgetDetailResponse { + data: data, + } + } +} + + diff --git a/src/models/budget_detail_response_data.rs b/src/models/budget_detail_response_data.rs new file mode 100644 index 0000000..301479d --- /dev/null +++ b/src/models/budget_detail_response_data.rs @@ -0,0 +1,34 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct BudgetDetailResponseData { + #[serde(rename = "budget")] + pub budget: ::models::BudgetDetail, + /// The knowledge of the server + #[serde(rename = "server_knowledge")] + pub server_knowledge: i64, +} + +impl BudgetDetailResponseData { + pub fn new(budget: ::models::BudgetDetail, server_knowledge: i64) -> BudgetDetailResponseData { + BudgetDetailResponseData { + budget: budget, + server_knowledge: server_knowledge, + } + } +} + + diff --git a/src/models/budget_settings.rs b/src/models/budget_settings.rs new file mode 100644 index 0000000..25985b5 --- /dev/null +++ b/src/models/budget_settings.rs @@ -0,0 +1,33 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct BudgetSettings { + #[serde(rename = "date_format")] + pub date_format: ::models::DateFormat, + #[serde(rename = "currency_format")] + pub currency_format: ::models::CurrencyFormat, +} + +impl BudgetSettings { + pub fn new(date_format: ::models::DateFormat, currency_format: ::models::CurrencyFormat) -> BudgetSettings { + BudgetSettings { + date_format: date_format, + currency_format: currency_format, + } + } +} + + diff --git a/src/models/budget_settings_response.rs b/src/models/budget_settings_response.rs new file mode 100644 index 0000000..c5c0ee3 --- /dev/null +++ b/src/models/budget_settings_response.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct BudgetSettingsResponse { + #[serde(rename = "data")] + pub data: ::models::BudgetSettingsResponseData, +} + +impl BudgetSettingsResponse { + pub fn new(data: ::models::BudgetSettingsResponseData) -> BudgetSettingsResponse { + BudgetSettingsResponse { + data: data, + } + } +} + + diff --git a/src/models/budget_settings_response_data.rs b/src/models/budget_settings_response_data.rs new file mode 100644 index 0000000..e484234 --- /dev/null +++ b/src/models/budget_settings_response_data.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct BudgetSettingsResponseData { + #[serde(rename = "settings")] + pub settings: ::models::BudgetSettings, +} + +impl BudgetSettingsResponseData { + pub fn new(settings: ::models::BudgetSettings) -> BudgetSettingsResponseData { + BudgetSettingsResponseData { + settings: settings, + } + } +} + + diff --git a/src/models/budget_summary.rs b/src/models/budget_summary.rs new file mode 100644 index 0000000..b380593 --- /dev/null +++ b/src/models/budget_summary.rs @@ -0,0 +1,51 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct BudgetSummary { + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "name")] + pub name: String, + /// The last time any changes were made to the budget from either a web or mobile client + #[serde(rename = "last_modified_on", skip_serializing_if = "Option::is_none")] + pub last_modified_on: Option, + /// The earliest budget month + #[serde(rename = "first_month", skip_serializing_if = "Option::is_none")] + pub first_month: Option, + /// The latest budget month + #[serde(rename = "last_month", skip_serializing_if = "Option::is_none")] + pub last_month: Option, + #[serde(rename = "date_format", skip_serializing_if = "Option::is_none")] + pub date_format: Option<::models::DateFormat>, + #[serde(rename = "currency_format", skip_serializing_if = "Option::is_none")] + pub currency_format: Option<::models::CurrencyFormat>, +} + +impl BudgetSummary { + pub fn new(id: String, name: String) -> BudgetSummary { + BudgetSummary { + id: id, + name: name, + last_modified_on: None, + first_month: None, + last_month: None, + date_format: None, + currency_format: None, + } + } +} + + diff --git a/src/models/budget_summary_response.rs b/src/models/budget_summary_response.rs new file mode 100644 index 0000000..422dfae --- /dev/null +++ b/src/models/budget_summary_response.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct BudgetSummaryResponse { + #[serde(rename = "data")] + pub data: ::models::BudgetSummaryResponseData, +} + +impl BudgetSummaryResponse { + pub fn new(data: ::models::BudgetSummaryResponseData) -> BudgetSummaryResponse { + BudgetSummaryResponse { + data: data, + } + } +} + + diff --git a/src/models/budget_summary_response_data.rs b/src/models/budget_summary_response_data.rs new file mode 100644 index 0000000..f6bec05 --- /dev/null +++ b/src/models/budget_summary_response_data.rs @@ -0,0 +1,33 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct BudgetSummaryResponseData { + #[serde(rename = "budgets")] + pub budgets: Vec<::models::BudgetSummary>, + #[serde(rename = "default_budget", skip_serializing_if = "Option::is_none")] + pub default_budget: Option<::models::BudgetSummary>, +} + +impl BudgetSummaryResponseData { + pub fn new(budgets: Vec<::models::BudgetSummary>) -> BudgetSummaryResponseData { + BudgetSummaryResponseData { + budgets: budgets, + default_budget: None, + } + } +} + + diff --git a/src/models/bulk_response.rs b/src/models/bulk_response.rs new file mode 100644 index 0000000..bf98b29 --- /dev/null +++ b/src/models/bulk_response.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct BulkResponse { + #[serde(rename = "data")] + pub data: ::models::BulkResponseData, +} + +impl BulkResponse { + pub fn new(data: ::models::BulkResponseData) -> BulkResponse { + BulkResponse { + data: data, + } + } +} + + diff --git a/src/models/bulk_response_data.rs b/src/models/bulk_response_data.rs new file mode 100644 index 0000000..e347af0 --- /dev/null +++ b/src/models/bulk_response_data.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct BulkResponseData { + #[serde(rename = "bulk")] + pub bulk: ::models::BulkResponseDataBulk, +} + +impl BulkResponseData { + pub fn new(bulk: ::models::BulkResponseDataBulk) -> BulkResponseData { + BulkResponseData { + bulk: bulk, + } + } +} + + diff --git a/src/models/bulk_response_data_bulk.rs b/src/models/bulk_response_data_bulk.rs new file mode 100644 index 0000000..3993078 --- /dev/null +++ b/src/models/bulk_response_data_bulk.rs @@ -0,0 +1,35 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct BulkResponseDataBulk { + /// The list of Transaction ids that were created. + #[serde(rename = "transaction_ids")] + pub transaction_ids: Vec, + /// 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. + #[serde(rename = "duplicate_import_ids")] + pub duplicate_import_ids: Vec, +} + +impl BulkResponseDataBulk { + pub fn new(transaction_ids: Vec, duplicate_import_ids: Vec) -> BulkResponseDataBulk { + BulkResponseDataBulk { + transaction_ids: transaction_ids, + duplicate_import_ids: duplicate_import_ids, + } + } +} + + diff --git a/src/models/bulk_transactions.rs b/src/models/bulk_transactions.rs new file mode 100644 index 0000000..e80c1c3 --- /dev/null +++ b/src/models/bulk_transactions.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct BulkTransactions { + #[serde(rename = "transactions")] + pub transactions: Vec<::models::SaveTransaction>, +} + +impl BulkTransactions { + pub fn new(transactions: Vec<::models::SaveTransaction>) -> BulkTransactions { + BulkTransactions { + transactions: transactions, + } + } +} + + diff --git a/src/models/categories_response.rs b/src/models/categories_response.rs new file mode 100644 index 0000000..08fbafd --- /dev/null +++ b/src/models/categories_response.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct CategoriesResponse { + #[serde(rename = "data")] + pub data: ::models::CategoriesResponseData, +} + +impl CategoriesResponse { + pub fn new(data: ::models::CategoriesResponseData) -> CategoriesResponse { + CategoriesResponse { + data: data, + } + } +} + + diff --git a/src/models/categories_response_data.rs b/src/models/categories_response_data.rs new file mode 100644 index 0000000..980505e --- /dev/null +++ b/src/models/categories_response_data.rs @@ -0,0 +1,34 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct CategoriesResponseData { + #[serde(rename = "category_groups")] + pub category_groups: Vec<::models::CategoryGroupWithCategories>, + /// The knowledge of the server + #[serde(rename = "server_knowledge")] + pub server_knowledge: i64, +} + +impl CategoriesResponseData { + pub fn new(category_groups: Vec<::models::CategoryGroupWithCategories>, server_knowledge: i64) -> CategoriesResponseData { + CategoriesResponseData { + category_groups: category_groups, + server_knowledge: server_knowledge, + } + } +} + + diff --git a/src/models/category.rs b/src/models/category.rs new file mode 100644 index 0000000..1a62c6a --- /dev/null +++ b/src/models/category.rs @@ -0,0 +1,93 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct Category { + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "category_group_id")] + pub category_group_id: String, + #[serde(rename = "name")] + pub name: String, + /// Whether or not the category is hidden + #[serde(rename = "hidden")] + pub hidden: bool, + /// If category is hidden this is the id of the category group it originally belonged to before it was hidden. + #[serde(rename = "original_category_group_id", skip_serializing_if = "Option::is_none")] + pub original_category_group_id: Option, + #[serde(rename = "note", skip_serializing_if = "Option::is_none")] + pub note: Option, + /// Budgeted amount in milliunits format + #[serde(rename = "budgeted")] + pub budgeted: i64, + /// Activity amount in milliunits format + #[serde(rename = "activity")] + pub activity: i64, + /// Balance in milliunits format + #[serde(rename = "balance")] + pub balance: i64, + /// The type of goal, if the cagegory has a goal (TB=Target Category Balance, TBD=Target Category Balance by Date, MF=Monthly Funding) + #[serde(rename = "goal_type", skip_serializing_if = "Option::is_none")] + pub goal_type: Option, + /// The month a goal was created + #[serde(rename = "goal_creation_month", skip_serializing_if = "Option::is_none")] + pub goal_creation_month: Option, + /// The goal target amount in milliunits + #[serde(rename = "goal_target")] + pub goal_target: i64, + /// If the goal type is 'TBD' (Target Category Balance by Date), this is the target month for the goal to be completed + #[serde(rename = "goal_target_month", skip_serializing_if = "Option::is_none")] + pub goal_target_month: Option, + /// The percentage completion of the goal + #[serde(rename = "goal_percentage_complete", skip_serializing_if = "Option::is_none")] + pub goal_percentage_complete: Option, + /// Whether or not the category has been deleted. Deleted categories will only be included in delta requests. + #[serde(rename = "deleted")] + pub deleted: bool, +} + +impl Category { + pub fn new(id: String, category_group_id: String, name: String, hidden: bool, budgeted: i64, activity: i64, balance: i64, goal_target: i64, deleted: bool) -> Category { + Category { + id: id, + category_group_id: category_group_id, + name: name, + hidden: hidden, + original_category_group_id: None, + note: None, + budgeted: budgeted, + activity: activity, + balance: balance, + goal_type: None, + goal_creation_month: None, + goal_target: goal_target, + goal_target_month: None, + goal_percentage_complete: None, + deleted: deleted, + } + } +} + +/// The type of goal, if the cagegory has a goal (TB=Target Category Balance, TBD=Target Category Balance by Date, MF=Monthly Funding) +#[derive(Debug, Serialize, Deserialize)] +pub enum GoalType { + #[serde(rename = "TB")] + TB, + #[serde(rename = "TBD")] + TBD, + #[serde(rename = "MF")] + MF, +} + diff --git a/src/models/category_group.rs b/src/models/category_group.rs new file mode 100644 index 0000000..2f674e2 --- /dev/null +++ b/src/models/category_group.rs @@ -0,0 +1,41 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct CategoryGroup { + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "name")] + pub name: String, + /// Whether or not the category group is hidden + #[serde(rename = "hidden")] + pub hidden: bool, + /// Whether or not the category group has been deleted. Deleted category groups will only be included in delta requests. + #[serde(rename = "deleted")] + pub deleted: bool, +} + +impl CategoryGroup { + pub fn new(id: String, name: String, hidden: bool, deleted: bool) -> CategoryGroup { + CategoryGroup { + id: id, + name: name, + hidden: hidden, + deleted: deleted, + } + } +} + + diff --git a/src/models/category_group_with_categories.rs b/src/models/category_group_with_categories.rs new file mode 100644 index 0000000..38cfd88 --- /dev/null +++ b/src/models/category_group_with_categories.rs @@ -0,0 +1,45 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct CategoryGroupWithCategories { + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "name")] + pub name: String, + /// Whether or not the category group is hidden + #[serde(rename = "hidden")] + pub hidden: bool, + /// Whether or not the category group has been deleted. Deleted category groups will only be included in delta requests. + #[serde(rename = "deleted")] + pub deleted: bool, + /// Category group categories. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC). + #[serde(rename = "categories")] + pub categories: Vec<::models::Category>, +} + +impl CategoryGroupWithCategories { + pub fn new(id: String, name: String, hidden: bool, deleted: bool, categories: Vec<::models::Category>) -> CategoryGroupWithCategories { + CategoryGroupWithCategories { + id: id, + name: name, + hidden: hidden, + deleted: deleted, + categories: categories, + } + } +} + + diff --git a/src/models/category_group_with_categories_all_of.rs b/src/models/category_group_with_categories_all_of.rs new file mode 100644 index 0000000..f34d3bb --- /dev/null +++ b/src/models/category_group_with_categories_all_of.rs @@ -0,0 +1,31 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct CategoryGroupWithCategoriesAllOf { + /// Category group categories. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC). + #[serde(rename = "categories")] + pub categories: Vec<::models::Category>, +} + +impl CategoryGroupWithCategoriesAllOf { + pub fn new(categories: Vec<::models::Category>) -> CategoryGroupWithCategoriesAllOf { + CategoryGroupWithCategoriesAllOf { + categories: categories, + } + } +} + + diff --git a/src/models/category_response.rs b/src/models/category_response.rs new file mode 100644 index 0000000..35f2f40 --- /dev/null +++ b/src/models/category_response.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct CategoryResponse { + #[serde(rename = "data")] + pub data: ::models::CategoryResponseData, +} + +impl CategoryResponse { + pub fn new(data: ::models::CategoryResponseData) -> CategoryResponse { + CategoryResponse { + data: data, + } + } +} + + diff --git a/src/models/category_response_data.rs b/src/models/category_response_data.rs new file mode 100644 index 0000000..4e81fbb --- /dev/null +++ b/src/models/category_response_data.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct CategoryResponseData { + #[serde(rename = "category")] + pub category: ::models::Category, +} + +impl CategoryResponseData { + pub fn new(category: ::models::Category) -> CategoryResponseData { + CategoryResponseData { + category: category, + } + } +} + + diff --git a/src/models/currency_format.rs b/src/models/currency_format.rs new file mode 100644 index 0000000..476856a --- /dev/null +++ b/src/models/currency_format.rs @@ -0,0 +1,53 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +/// CurrencyFormat : The currency format setting for the budget. In some cases the format will not be available and will be specified as null. + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct CurrencyFormat { + #[serde(rename = "iso_code")] + pub iso_code: String, + #[serde(rename = "example_format")] + pub example_format: String, + #[serde(rename = "decimal_digits")] + pub decimal_digits: i32, + #[serde(rename = "decimal_separator")] + pub decimal_separator: String, + #[serde(rename = "symbol_first")] + pub symbol_first: bool, + #[serde(rename = "group_separator")] + pub group_separator: String, + #[serde(rename = "currency_symbol")] + pub currency_symbol: String, + #[serde(rename = "display_symbol")] + pub display_symbol: bool, +} + +impl CurrencyFormat { + /// The currency format setting for the budget. In some cases the format will not be available and will be specified as null. + pub fn new(iso_code: String, example_format: String, decimal_digits: i32, decimal_separator: String, symbol_first: bool, group_separator: String, currency_symbol: String, display_symbol: bool) -> CurrencyFormat { + CurrencyFormat { + iso_code: iso_code, + example_format: example_format, + decimal_digits: decimal_digits, + decimal_separator: decimal_separator, + symbol_first: symbol_first, + group_separator: group_separator, + currency_symbol: currency_symbol, + display_symbol: display_symbol, + } + } +} + + diff --git a/src/models/date_format.rs b/src/models/date_format.rs new file mode 100644 index 0000000..cf88395 --- /dev/null +++ b/src/models/date_format.rs @@ -0,0 +1,32 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + +/// DateFormat : The date format setting for the budget. In some cases the format will not be available and will be specified as null. + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct DateFormat { + #[serde(rename = "format")] + pub format: String, +} + +impl DateFormat { + /// The date format setting for the budget. In some cases the format will not be available and will be specified as null. + pub fn new(format: String) -> DateFormat { + DateFormat { + format: format, + } + } +} + + diff --git a/src/models/error_detail.rs b/src/models/error_detail.rs new file mode 100644 index 0000000..4745cf3 --- /dev/null +++ b/src/models/error_detail.rs @@ -0,0 +1,36 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct ErrorDetail { + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "name")] + pub name: String, + #[serde(rename = "detail")] + pub detail: String, +} + +impl ErrorDetail { + pub fn new(id: String, name: String, detail: String) -> ErrorDetail { + ErrorDetail { + id: id, + name: name, + detail: detail, + } + } +} + + diff --git a/src/models/error_response.rs b/src/models/error_response.rs new file mode 100644 index 0000000..c321726 --- /dev/null +++ b/src/models/error_response.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct ErrorResponse { + #[serde(rename = "error")] + pub error: ::models::ErrorDetail, +} + +impl ErrorResponse { + pub fn new(error: ::models::ErrorDetail) -> ErrorResponse { + ErrorResponse { + error: error, + } + } +} + + diff --git a/src/models/hybrid_transaction.rs b/src/models/hybrid_transaction.rs new file mode 100644 index 0000000..802813b --- /dev/null +++ b/src/models/hybrid_transaction.rs @@ -0,0 +1,133 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct HybridTransaction { + #[serde(rename = "id")] + pub id: String, + /// The transaction date in ISO format (e.g. 2016-12-01) + #[serde(rename = "date")] + pub date: String, + /// The transaction amount in milliunits format + #[serde(rename = "amount")] + pub amount: i64, + #[serde(rename = "memo", skip_serializing_if = "Option::is_none")] + pub memo: Option, + /// The cleared status of the transaction + #[serde(rename = "cleared")] + pub cleared: String, + /// Whether or not the transaction is approved + #[serde(rename = "approved")] + pub approved: bool, + /// The transaction flag + #[serde(rename = "flag_color", skip_serializing_if = "Option::is_none")] + pub flag_color: Option, + #[serde(rename = "account_id")] + pub account_id: String, + #[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")] + pub payee_id: Option, + #[serde(rename = "category_id", skip_serializing_if = "Option::is_none")] + pub category_id: Option, + /// If a transfer transaction, the account to which it transfers + #[serde(rename = "transfer_account_id", skip_serializing_if = "Option::is_none")] + pub transfer_account_id: Option, + /// If a transfer transaction, the id of transaction on the other side of the transfer + #[serde(rename = "transfer_transaction_id", skip_serializing_if = "Option::is_none")] + pub transfer_transaction_id: Option, + /// If transaction is matched, the id of the matched transaction + #[serde(rename = "matched_transaction_id", skip_serializing_if = "Option::is_none")] + pub matched_transaction_id: Option, + /// If the Transaction was imported, this field is a unique (by account) import identifier. If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. + #[serde(rename = "import_id", skip_serializing_if = "Option::is_none")] + pub import_id: Option, + /// Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests. + #[serde(rename = "deleted")] + pub deleted: bool, + /// Whether the hybrid transaction represents a regular transaction or a subtransaction + #[serde(rename = "type")] + pub _type: String, + /// For subtransaction types, this is the id of the pararent transaction. For transaction types, this id will be always be null. + #[serde(rename = "parent_transaction_id", skip_serializing_if = "Option::is_none")] + pub parent_transaction_id: Option, + #[serde(rename = "account_name")] + pub account_name: String, + #[serde(rename = "payee_name", skip_serializing_if = "Option::is_none")] + pub payee_name: Option, + #[serde(rename = "category_name")] + pub category_name: String, +} + +impl HybridTransaction { + pub fn new(id: String, date: String, amount: i64, cleared: String, approved: bool, account_id: String, deleted: bool, _type: String, account_name: String, category_name: String) -> HybridTransaction { + HybridTransaction { + id: id, + date: date, + amount: amount, + memo: None, + cleared: cleared, + approved: approved, + flag_color: None, + account_id: account_id, + payee_id: None, + category_id: None, + transfer_account_id: None, + transfer_transaction_id: None, + matched_transaction_id: None, + import_id: None, + deleted: deleted, + _type: _type, + parent_transaction_id: None, + account_name: account_name, + payee_name: None, + category_name: category_name, + } + } +} + +/// The cleared status of the transaction +#[derive(Debug, Serialize, Deserialize)] +pub enum Cleared { + #[serde(rename = "cleared")] + Cleared, + #[serde(rename = "uncleared")] + Uncleared, + #[serde(rename = "reconciled")] + Reconciled, +} +/// The transaction flag +#[derive(Debug, Serialize, Deserialize)] +pub enum FlagColor { + #[serde(rename = "red")] + Red, + #[serde(rename = "orange")] + Orange, + #[serde(rename = "yellow")] + Yellow, + #[serde(rename = "green")] + Green, + #[serde(rename = "blue")] + Blue, + #[serde(rename = "purple")] + Purple, +} +/// Whether the hybrid transaction represents a regular transaction or a subtransaction +#[derive(Debug, Serialize, Deserialize)] +pub enum Type { + #[serde(rename = "transaction")] + Transaction, + #[serde(rename = "subtransaction")] + Subtransaction, +} + diff --git a/src/models/hybrid_transaction_all_of.rs b/src/models/hybrid_transaction_all_of.rs new file mode 100644 index 0000000..42fd515 --- /dev/null +++ b/src/models/hybrid_transaction_all_of.rs @@ -0,0 +1,52 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct HybridTransactionAllOf { + /// Whether the hybrid transaction represents a regular transaction or a subtransaction + #[serde(rename = "type")] + pub _type: String, + /// For subtransaction types, this is the id of the pararent transaction. For transaction types, this id will be always be null. + #[serde(rename = "parent_transaction_id", skip_serializing_if = "Option::is_none")] + pub parent_transaction_id: Option, + #[serde(rename = "account_name")] + pub account_name: String, + #[serde(rename = "payee_name", skip_serializing_if = "Option::is_none")] + pub payee_name: Option, + #[serde(rename = "category_name")] + pub category_name: String, +} + +impl HybridTransactionAllOf { + pub fn new(_type: String, account_name: String, category_name: String) -> HybridTransactionAllOf { + HybridTransactionAllOf { + _type: _type, + parent_transaction_id: None, + account_name: account_name, + payee_name: None, + category_name: category_name, + } + } +} + +/// Whether the hybrid transaction represents a regular transaction or a subtransaction +#[derive(Debug, Serialize, Deserialize)] +pub enum Type { + #[serde(rename = "transaction")] + Transaction, + #[serde(rename = "subtransaction")] + Subtransaction, +} + diff --git a/src/models/hybrid_transactions_response.rs b/src/models/hybrid_transactions_response.rs new file mode 100644 index 0000000..493582e --- /dev/null +++ b/src/models/hybrid_transactions_response.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct HybridTransactionsResponse { + #[serde(rename = "data")] + pub data: ::models::HybridTransactionsResponseData, +} + +impl HybridTransactionsResponse { + pub fn new(data: ::models::HybridTransactionsResponseData) -> HybridTransactionsResponse { + HybridTransactionsResponse { + data: data, + } + } +} + + diff --git a/src/models/hybrid_transactions_response_data.rs b/src/models/hybrid_transactions_response_data.rs new file mode 100644 index 0000000..8e329e4 --- /dev/null +++ b/src/models/hybrid_transactions_response_data.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct HybridTransactionsResponseData { + #[serde(rename = "transactions")] + pub transactions: Vec<::models::HybridTransaction>, +} + +impl HybridTransactionsResponseData { + pub fn new(transactions: Vec<::models::HybridTransaction>) -> HybridTransactionsResponseData { + HybridTransactionsResponseData { + transactions: transactions, + } + } +} + + diff --git a/src/models/mod.rs b/src/models/mod.rs new file mode 100644 index 0000000..ba8b351 --- /dev/null +++ b/src/models/mod.rs @@ -0,0 +1,168 @@ +mod account; +pub use self::account::Account; +mod account_response; +pub use self::account_response::AccountResponse; +mod account_response_data; +pub use self::account_response_data::AccountResponseData; +mod accounts_response; +pub use self::accounts_response::AccountsResponse; +mod accounts_response_data; +pub use self::accounts_response_data::AccountsResponseData; +mod budget_detail; +pub use self::budget_detail::BudgetDetail; +mod budget_detail_all_of; +pub use self::budget_detail_all_of::BudgetDetailAllOf; +mod budget_detail_response; +pub use self::budget_detail_response::BudgetDetailResponse; +mod budget_detail_response_data; +pub use self::budget_detail_response_data::BudgetDetailResponseData; +mod budget_settings; +pub use self::budget_settings::BudgetSettings; +mod budget_settings_response; +pub use self::budget_settings_response::BudgetSettingsResponse; +mod budget_settings_response_data; +pub use self::budget_settings_response_data::BudgetSettingsResponseData; +mod budget_summary; +pub use self::budget_summary::BudgetSummary; +mod budget_summary_response; +pub use self::budget_summary_response::BudgetSummaryResponse; +mod budget_summary_response_data; +pub use self::budget_summary_response_data::BudgetSummaryResponseData; +mod bulk_response; +pub use self::bulk_response::BulkResponse; +mod bulk_response_data; +pub use self::bulk_response_data::BulkResponseData; +mod bulk_response_data_bulk; +pub use self::bulk_response_data_bulk::BulkResponseDataBulk; +mod bulk_transactions; +pub use self::bulk_transactions::BulkTransactions; +mod categories_response; +pub use self::categories_response::CategoriesResponse; +mod categories_response_data; +pub use self::categories_response_data::CategoriesResponseData; +mod category; +pub use self::category::Category; +mod category_group; +pub use self::category_group::CategoryGroup; +mod category_group_with_categories; +pub use self::category_group_with_categories::CategoryGroupWithCategories; +mod category_group_with_categories_all_of; +pub use self::category_group_with_categories_all_of::CategoryGroupWithCategoriesAllOf; +mod category_response; +pub use self::category_response::CategoryResponse; +mod category_response_data; +pub use self::category_response_data::CategoryResponseData; +mod currency_format; +pub use self::currency_format::CurrencyFormat; +mod date_format; +pub use self::date_format::DateFormat; +mod error_detail; +pub use self::error_detail::ErrorDetail; +mod error_response; +pub use self::error_response::ErrorResponse; +mod hybrid_transaction; +pub use self::hybrid_transaction::HybridTransaction; +mod hybrid_transaction_all_of; +pub use self::hybrid_transaction_all_of::HybridTransactionAllOf; +mod hybrid_transactions_response; +pub use self::hybrid_transactions_response::HybridTransactionsResponse; +mod hybrid_transactions_response_data; +pub use self::hybrid_transactions_response_data::HybridTransactionsResponseData; +mod month_detail; +pub use self::month_detail::MonthDetail; +mod month_detail_all_of; +pub use self::month_detail_all_of::MonthDetailAllOf; +mod month_detail_response; +pub use self::month_detail_response::MonthDetailResponse; +mod month_detail_response_data; +pub use self::month_detail_response_data::MonthDetailResponseData; +mod month_summaries_response; +pub use self::month_summaries_response::MonthSummariesResponse; +mod month_summaries_response_data; +pub use self::month_summaries_response_data::MonthSummariesResponseData; +mod month_summary; +pub use self::month_summary::MonthSummary; +mod payee; +pub use self::payee::Payee; +mod payee_location; +pub use self::payee_location::PayeeLocation; +mod payee_location_response; +pub use self::payee_location_response::PayeeLocationResponse; +mod payee_location_response_data; +pub use self::payee_location_response_data::PayeeLocationResponseData; +mod payee_locations_response; +pub use self::payee_locations_response::PayeeLocationsResponse; +mod payee_locations_response_data; +pub use self::payee_locations_response_data::PayeeLocationsResponseData; +mod payee_response; +pub use self::payee_response::PayeeResponse; +mod payee_response_data; +pub use self::payee_response_data::PayeeResponseData; +mod payees_response; +pub use self::payees_response::PayeesResponse; +mod payees_response_data; +pub use self::payees_response_data::PayeesResponseData; +mod save_category_response; +pub use self::save_category_response::SaveCategoryResponse; +mod save_category_response_data; +pub use self::save_category_response_data::SaveCategoryResponseData; +mod save_month_category; +pub use self::save_month_category::SaveMonthCategory; +mod save_month_category_wrapper; +pub use self::save_month_category_wrapper::SaveMonthCategoryWrapper; +mod save_transaction; +pub use self::save_transaction::SaveTransaction; +mod save_transaction_wrapper; +pub use self::save_transaction_wrapper::SaveTransactionWrapper; +mod save_transactions_response; +pub use self::save_transactions_response::SaveTransactionsResponse; +mod save_transactions_response_data; +pub use self::save_transactions_response_data::SaveTransactionsResponseData; +mod save_transactions_wrapper; +pub use self::save_transactions_wrapper::SaveTransactionsWrapper; +mod scheduled_sub_transaction; +pub use self::scheduled_sub_transaction::ScheduledSubTransaction; +mod scheduled_transaction_detail; +pub use self::scheduled_transaction_detail::ScheduledTransactionDetail; +mod scheduled_transaction_detail_all_of; +pub use self::scheduled_transaction_detail_all_of::ScheduledTransactionDetailAllOf; +mod scheduled_transaction_response; +pub use self::scheduled_transaction_response::ScheduledTransactionResponse; +mod scheduled_transaction_response_data; +pub use self::scheduled_transaction_response_data::ScheduledTransactionResponseData; +mod scheduled_transaction_summary; +pub use self::scheduled_transaction_summary::ScheduledTransactionSummary; +mod scheduled_transactions_response; +pub use self::scheduled_transactions_response::ScheduledTransactionsResponse; +mod scheduled_transactions_response_data; +pub use self::scheduled_transactions_response_data::ScheduledTransactionsResponseData; +mod sub_transaction; +pub use self::sub_transaction::SubTransaction; +mod transaction_detail; +pub use self::transaction_detail::TransactionDetail; +mod transaction_detail_all_of; +pub use self::transaction_detail_all_of::TransactionDetailAllOf; +mod transaction_response; +pub use self::transaction_response::TransactionResponse; +mod transaction_response_data; +pub use self::transaction_response_data::TransactionResponseData; +mod transaction_summary; +pub use self::transaction_summary::TransactionSummary; +mod transactions_response; +pub use self::transactions_response::TransactionsResponse; +mod transactions_response_data; +pub use self::transactions_response_data::TransactionsResponseData; +mod update_transaction; +pub use self::update_transaction::UpdateTransaction; +mod update_transaction_wrapper; +pub use self::update_transaction_wrapper::UpdateTransactionWrapper; +mod update_transactions_response; +pub use self::update_transactions_response::UpdateTransactionsResponse; +mod update_transactions_wrapper; +pub use self::update_transactions_wrapper::UpdateTransactionsWrapper; +mod user; +pub use self::user::User; +mod user_response; +pub use self::user_response::UserResponse; +mod user_response_data; +pub use self::user_response_data::UserResponseData; diff --git a/src/models/month_detail.rs b/src/models/month_detail.rs new file mode 100644 index 0000000..a6f55d4 --- /dev/null +++ b/src/models/month_detail.rs @@ -0,0 +1,61 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct MonthDetail { + #[serde(rename = "month")] + pub month: String, + #[serde(rename = "note", skip_serializing_if = "Option::is_none")] + pub note: Option, + /// The total amount in transactions categorized to 'Inflow: To be Budgeted' in the month + #[serde(rename = "income")] + pub income: i64, + /// The total amount budgeted in the month + #[serde(rename = "budgeted")] + pub budgeted: i64, + /// The total amount in transactions in the month, excluding those categorized to 'Inflow: To be Budgeted' + #[serde(rename = "activity")] + pub activity: i64, + /// The available amount for 'To be Budgeted' + #[serde(rename = "to_be_budgeted")] + pub to_be_budgeted: i64, + /// The Age of Money as of the month + #[serde(rename = "age_of_money", skip_serializing_if = "Option::is_none")] + pub age_of_money: Option, + /// Whether or not the month has been deleted. Deleted months will only be included in delta requests. + #[serde(rename = "deleted")] + pub deleted: bool, + /// The budget month categories. Amounts (budgeted, activity, balance, etc.) are specific to the {month} parameter specified. + #[serde(rename = "categories")] + pub categories: Vec<::models::Category>, +} + +impl MonthDetail { + pub fn new(month: String, income: i64, budgeted: i64, activity: i64, to_be_budgeted: i64, deleted: bool, categories: Vec<::models::Category>) -> MonthDetail { + MonthDetail { + month: month, + note: None, + income: income, + budgeted: budgeted, + activity: activity, + to_be_budgeted: to_be_budgeted, + age_of_money: None, + deleted: deleted, + categories: categories, + } + } +} + + diff --git a/src/models/month_detail_all_of.rs b/src/models/month_detail_all_of.rs new file mode 100644 index 0000000..0f07326 --- /dev/null +++ b/src/models/month_detail_all_of.rs @@ -0,0 +1,31 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct MonthDetailAllOf { + /// The budget month categories. Amounts (budgeted, activity, balance, etc.) are specific to the {month} parameter specified. + #[serde(rename = "categories")] + pub categories: Vec<::models::Category>, +} + +impl MonthDetailAllOf { + pub fn new(categories: Vec<::models::Category>) -> MonthDetailAllOf { + MonthDetailAllOf { + categories: categories, + } + } +} + + diff --git a/src/models/month_detail_response.rs b/src/models/month_detail_response.rs new file mode 100644 index 0000000..c144afb --- /dev/null +++ b/src/models/month_detail_response.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct MonthDetailResponse { + #[serde(rename = "data")] + pub data: ::models::MonthDetailResponseData, +} + +impl MonthDetailResponse { + pub fn new(data: ::models::MonthDetailResponseData) -> MonthDetailResponse { + MonthDetailResponse { + data: data, + } + } +} + + diff --git a/src/models/month_detail_response_data.rs b/src/models/month_detail_response_data.rs new file mode 100644 index 0000000..0948763 --- /dev/null +++ b/src/models/month_detail_response_data.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct MonthDetailResponseData { + #[serde(rename = "month")] + pub month: ::models::MonthDetail, +} + +impl MonthDetailResponseData { + pub fn new(month: ::models::MonthDetail) -> MonthDetailResponseData { + MonthDetailResponseData { + month: month, + } + } +} + + diff --git a/src/models/month_summaries_response.rs b/src/models/month_summaries_response.rs new file mode 100644 index 0000000..44d5d66 --- /dev/null +++ b/src/models/month_summaries_response.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct MonthSummariesResponse { + #[serde(rename = "data")] + pub data: ::models::MonthSummariesResponseData, +} + +impl MonthSummariesResponse { + pub fn new(data: ::models::MonthSummariesResponseData) -> MonthSummariesResponse { + MonthSummariesResponse { + data: data, + } + } +} + + diff --git a/src/models/month_summaries_response_data.rs b/src/models/month_summaries_response_data.rs new file mode 100644 index 0000000..6237601 --- /dev/null +++ b/src/models/month_summaries_response_data.rs @@ -0,0 +1,34 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct MonthSummariesResponseData { + #[serde(rename = "months")] + pub months: Vec<::models::MonthSummary>, + /// The knowledge of the server + #[serde(rename = "server_knowledge")] + pub server_knowledge: i64, +} + +impl MonthSummariesResponseData { + pub fn new(months: Vec<::models::MonthSummary>, server_knowledge: i64) -> MonthSummariesResponseData { + MonthSummariesResponseData { + months: months, + server_knowledge: server_knowledge, + } + } +} + + diff --git a/src/models/month_summary.rs b/src/models/month_summary.rs new file mode 100644 index 0000000..3c705d3 --- /dev/null +++ b/src/models/month_summary.rs @@ -0,0 +1,57 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct MonthSummary { + #[serde(rename = "month")] + pub month: String, + #[serde(rename = "note", skip_serializing_if = "Option::is_none")] + pub note: Option, + /// The total amount in transactions categorized to 'Inflow: To be Budgeted' in the month + #[serde(rename = "income")] + pub income: i64, + /// The total amount budgeted in the month + #[serde(rename = "budgeted")] + pub budgeted: i64, + /// The total amount in transactions in the month, excluding those categorized to 'Inflow: To be Budgeted' + #[serde(rename = "activity")] + pub activity: i64, + /// The available amount for 'To be Budgeted' + #[serde(rename = "to_be_budgeted")] + pub to_be_budgeted: i64, + /// The Age of Money as of the month + #[serde(rename = "age_of_money", skip_serializing_if = "Option::is_none")] + pub age_of_money: Option, + /// Whether or not the month has been deleted. Deleted months will only be included in delta requests. + #[serde(rename = "deleted")] + pub deleted: bool, +} + +impl MonthSummary { + pub fn new(month: String, income: i64, budgeted: i64, activity: i64, to_be_budgeted: i64, deleted: bool) -> MonthSummary { + MonthSummary { + month: month, + note: None, + income: income, + budgeted: budgeted, + activity: activity, + to_be_budgeted: to_be_budgeted, + age_of_money: None, + deleted: deleted, + } + } +} + + diff --git a/src/models/payee.rs b/src/models/payee.rs new file mode 100644 index 0000000..13ad103 --- /dev/null +++ b/src/models/payee.rs @@ -0,0 +1,41 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct Payee { + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "name")] + pub name: String, + /// If a transfer payee, the account_id to which this payee transfers to + #[serde(rename = "transfer_account_id", skip_serializing_if = "Option::is_none")] + pub transfer_account_id: Option, + /// Whether or not the payee has been deleted. Deleted payees will only be included in delta requests. + #[serde(rename = "deleted")] + pub deleted: bool, +} + +impl Payee { + pub fn new(id: String, name: String, deleted: bool) -> Payee { + Payee { + id: id, + name: name, + transfer_account_id: None, + deleted: deleted, + } + } +} + + diff --git a/src/models/payee_location.rs b/src/models/payee_location.rs new file mode 100644 index 0000000..afb050e --- /dev/null +++ b/src/models/payee_location.rs @@ -0,0 +1,43 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct PayeeLocation { + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "payee_id")] + pub payee_id: String, + #[serde(rename = "latitude")] + pub latitude: String, + #[serde(rename = "longitude")] + pub longitude: String, + /// Whether or not the payee location has been deleted. Deleted payee locations will only be included in delta requests. + #[serde(rename = "deleted")] + pub deleted: bool, +} + +impl PayeeLocation { + pub fn new(id: String, payee_id: String, latitude: String, longitude: String, deleted: bool) -> PayeeLocation { + PayeeLocation { + id: id, + payee_id: payee_id, + latitude: latitude, + longitude: longitude, + deleted: deleted, + } + } +} + + diff --git a/src/models/payee_location_response.rs b/src/models/payee_location_response.rs new file mode 100644 index 0000000..e6d2608 --- /dev/null +++ b/src/models/payee_location_response.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct PayeeLocationResponse { + #[serde(rename = "data")] + pub data: ::models::PayeeLocationResponseData, +} + +impl PayeeLocationResponse { + pub fn new(data: ::models::PayeeLocationResponseData) -> PayeeLocationResponse { + PayeeLocationResponse { + data: data, + } + } +} + + diff --git a/src/models/payee_location_response_data.rs b/src/models/payee_location_response_data.rs new file mode 100644 index 0000000..869c4ea --- /dev/null +++ b/src/models/payee_location_response_data.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct PayeeLocationResponseData { + #[serde(rename = "payee_location")] + pub payee_location: ::models::PayeeLocation, +} + +impl PayeeLocationResponseData { + pub fn new(payee_location: ::models::PayeeLocation) -> PayeeLocationResponseData { + PayeeLocationResponseData { + payee_location: payee_location, + } + } +} + + diff --git a/src/models/payee_locations_response.rs b/src/models/payee_locations_response.rs new file mode 100644 index 0000000..916a19e --- /dev/null +++ b/src/models/payee_locations_response.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct PayeeLocationsResponse { + #[serde(rename = "data")] + pub data: ::models::PayeeLocationsResponseData, +} + +impl PayeeLocationsResponse { + pub fn new(data: ::models::PayeeLocationsResponseData) -> PayeeLocationsResponse { + PayeeLocationsResponse { + data: data, + } + } +} + + diff --git a/src/models/payee_locations_response_data.rs b/src/models/payee_locations_response_data.rs new file mode 100644 index 0000000..ea46038 --- /dev/null +++ b/src/models/payee_locations_response_data.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct PayeeLocationsResponseData { + #[serde(rename = "payee_locations")] + pub payee_locations: Vec<::models::PayeeLocation>, +} + +impl PayeeLocationsResponseData { + pub fn new(payee_locations: Vec<::models::PayeeLocation>) -> PayeeLocationsResponseData { + PayeeLocationsResponseData { + payee_locations: payee_locations, + } + } +} + + diff --git a/src/models/payee_response.rs b/src/models/payee_response.rs new file mode 100644 index 0000000..690913a --- /dev/null +++ b/src/models/payee_response.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct PayeeResponse { + #[serde(rename = "data")] + pub data: ::models::PayeeResponseData, +} + +impl PayeeResponse { + pub fn new(data: ::models::PayeeResponseData) -> PayeeResponse { + PayeeResponse { + data: data, + } + } +} + + diff --git a/src/models/payee_response_data.rs b/src/models/payee_response_data.rs new file mode 100644 index 0000000..f19f7ea --- /dev/null +++ b/src/models/payee_response_data.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct PayeeResponseData { + #[serde(rename = "payee")] + pub payee: ::models::Payee, +} + +impl PayeeResponseData { + pub fn new(payee: ::models::Payee) -> PayeeResponseData { + PayeeResponseData { + payee: payee, + } + } +} + + diff --git a/src/models/payees_response.rs b/src/models/payees_response.rs new file mode 100644 index 0000000..dba96f3 --- /dev/null +++ b/src/models/payees_response.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct PayeesResponse { + #[serde(rename = "data")] + pub data: ::models::PayeesResponseData, +} + +impl PayeesResponse { + pub fn new(data: ::models::PayeesResponseData) -> PayeesResponse { + PayeesResponse { + data: data, + } + } +} + + diff --git a/src/models/payees_response_data.rs b/src/models/payees_response_data.rs new file mode 100644 index 0000000..4897b15 --- /dev/null +++ b/src/models/payees_response_data.rs @@ -0,0 +1,34 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct PayeesResponseData { + #[serde(rename = "payees")] + pub payees: Vec<::models::Payee>, + /// The knowledge of the server + #[serde(rename = "server_knowledge")] + pub server_knowledge: i64, +} + +impl PayeesResponseData { + pub fn new(payees: Vec<::models::Payee>, server_knowledge: i64) -> PayeesResponseData { + PayeesResponseData { + payees: payees, + server_knowledge: server_knowledge, + } + } +} + + diff --git a/src/models/save_category_response.rs b/src/models/save_category_response.rs new file mode 100644 index 0000000..37744c1 --- /dev/null +++ b/src/models/save_category_response.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct SaveCategoryResponse { + #[serde(rename = "data")] + pub data: ::models::SaveCategoryResponseData, +} + +impl SaveCategoryResponse { + pub fn new(data: ::models::SaveCategoryResponseData) -> SaveCategoryResponse { + SaveCategoryResponse { + data: data, + } + } +} + + diff --git a/src/models/save_category_response_data.rs b/src/models/save_category_response_data.rs new file mode 100644 index 0000000..b61b206 --- /dev/null +++ b/src/models/save_category_response_data.rs @@ -0,0 +1,34 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct SaveCategoryResponseData { + #[serde(rename = "category")] + pub category: ::models::Category, + /// The knowledge of the server + #[serde(rename = "server_knowledge")] + pub server_knowledge: i64, +} + +impl SaveCategoryResponseData { + pub fn new(category: ::models::Category, server_knowledge: i64) -> SaveCategoryResponseData { + SaveCategoryResponseData { + category: category, + server_knowledge: server_knowledge, + } + } +} + + diff --git a/src/models/save_month_category.rs b/src/models/save_month_category.rs new file mode 100644 index 0000000..40d1b2e --- /dev/null +++ b/src/models/save_month_category.rs @@ -0,0 +1,31 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct SaveMonthCategory { + /// Budgeted amount in milliunits format + #[serde(rename = "budgeted")] + pub budgeted: i64, +} + +impl SaveMonthCategory { + pub fn new(budgeted: i64) -> SaveMonthCategory { + SaveMonthCategory { + budgeted: budgeted, + } + } +} + + diff --git a/src/models/save_month_category_wrapper.rs b/src/models/save_month_category_wrapper.rs new file mode 100644 index 0000000..ef67116 --- /dev/null +++ b/src/models/save_month_category_wrapper.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct SaveMonthCategoryWrapper { + #[serde(rename = "category")] + pub category: ::models::SaveMonthCategory, +} + +impl SaveMonthCategoryWrapper { + pub fn new(category: ::models::SaveMonthCategory) -> SaveMonthCategoryWrapper { + SaveMonthCategoryWrapper { + category: category, + } + } +} + + diff --git a/src/models/save_transaction.rs b/src/models/save_transaction.rs new file mode 100644 index 0000000..c2fc6b7 --- /dev/null +++ b/src/models/save_transaction.rs @@ -0,0 +1,95 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct SaveTransaction { + #[serde(rename = "account_id")] + pub account_id: String, + /// The transaction date in ISO format (e.g. 2016-12-01). Future dates (scheduled transactions) are not permitted. Split transaction dates cannot be changed and if a different date is supplied it will be ignored. + #[serde(rename = "date")] + pub date: String, + /// The transaction amount in milliunits format. Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored. + #[serde(rename = "amount")] + pub amount: i64, + /// The payee for the transaction + #[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")] + pub payee_id: Option, + /// The payee name. If a payee_name value is provided and payee_id has a null value, the payee_name value will be used to resolve the payee by either (1) a matching payee rename rule (only if import_id is also specified) or (2) a payee with the same name or (3) creation of a new payee. + #[serde(rename = "payee_name", skip_serializing_if = "Option::is_none")] + pub payee_name: Option, + /// The category for the transaction. Split and Credit Card Payment categories are not permitted and will be ignored if supplied. If an existing transaction has a Split category it cannot be changed. + #[serde(rename = "category_id", skip_serializing_if = "Option::is_none")] + pub category_id: Option, + #[serde(rename = "memo", skip_serializing_if = "Option::is_none")] + pub memo: Option, + /// The cleared status of the transaction + #[serde(rename = "cleared", skip_serializing_if = "Option::is_none")] + pub cleared: Option, + /// Whether or not the transaction is approved. If not supplied, transaction will be unapproved by default. + #[serde(rename = "approved", skip_serializing_if = "Option::is_none")] + pub approved: Option, + /// The transaction flag + #[serde(rename = "flag_color", skip_serializing_if = "Option::is_none")] + pub flag_color: Option, + /// If specified, the new transaction will be assigned this import_id and considered \"imported\". *At the time of import* we will attempt to match \"imported\" transactions with non-imported (i.e. \"user-entered\") transactions.

Transactions imported through File Based Import or Direct Import (not through the API) are assigned an import_id in the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. Using a consistent format will prevent duplicates through Direct Import and File Based Import.

If import_id is omitted or specified as null, the transaction will be treated as a \"user-entered\" transaction. As such, it will be eligible to be matched against transactions later being imported (via DI, FBI, or API). + #[serde(rename = "import_id", skip_serializing_if = "Option::is_none")] + pub import_id: Option, +} + +impl SaveTransaction { + pub fn new(account_id: String, date: String, amount: i64) -> SaveTransaction { + SaveTransaction { + account_id: account_id, + date: date, + amount: amount, + payee_id: None, + payee_name: None, + category_id: None, + memo: None, + cleared: None, + approved: None, + flag_color: None, + import_id: None, + } + } +} + +/// The cleared status of the transaction +#[derive(Debug, Serialize, Deserialize)] +pub enum Cleared { + #[serde(rename = "cleared")] + Cleared, + #[serde(rename = "uncleared")] + Uncleared, + #[serde(rename = "reconciled")] + Reconciled, +} +/// The transaction flag +#[derive(Debug, Serialize, Deserialize)] +pub enum FlagColor { + #[serde(rename = "red")] + Red, + #[serde(rename = "orange")] + Orange, + #[serde(rename = "yellow")] + Yellow, + #[serde(rename = "green")] + Green, + #[serde(rename = "blue")] + Blue, + #[serde(rename = "purple")] + Purple, +} + diff --git a/src/models/save_transaction_wrapper.rs b/src/models/save_transaction_wrapper.rs new file mode 100644 index 0000000..71bc7cd --- /dev/null +++ b/src/models/save_transaction_wrapper.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct SaveTransactionWrapper { + #[serde(rename = "transaction")] + pub transaction: ::models::SaveTransaction, +} + +impl SaveTransactionWrapper { + pub fn new(transaction: ::models::SaveTransaction) -> SaveTransactionWrapper { + SaveTransactionWrapper { + transaction: transaction, + } + } +} + + diff --git a/src/models/save_transactions_response.rs b/src/models/save_transactions_response.rs new file mode 100644 index 0000000..be0782c --- /dev/null +++ b/src/models/save_transactions_response.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct SaveTransactionsResponse { + #[serde(rename = "data")] + pub data: ::models::SaveTransactionsResponseData, +} + +impl SaveTransactionsResponse { + pub fn new(data: ::models::SaveTransactionsResponseData) -> SaveTransactionsResponse { + SaveTransactionsResponse { + data: data, + } + } +} + + diff --git a/src/models/save_transactions_response_data.rs b/src/models/save_transactions_response_data.rs new file mode 100644 index 0000000..0086874 --- /dev/null +++ b/src/models/save_transactions_response_data.rs @@ -0,0 +1,46 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct SaveTransactionsResponseData { + /// The transaction ids that were saved + #[serde(rename = "transaction_ids")] + pub transaction_ids: Vec, + #[serde(rename = "transaction", skip_serializing_if = "Option::is_none")] + pub transaction: Option<::models::TransactionDetail>, + /// If multiple transactions were specified, the transactions that were saved + #[serde(rename = "transactions", skip_serializing_if = "Option::is_none")] + pub transactions: Option>, + /// If multiple transactions were specified, a list of import_ids that were not created because of an existing import_id found on the same account + #[serde(rename = "duplicate_import_ids", skip_serializing_if = "Option::is_none")] + pub duplicate_import_ids: Option>, + /// The knowledge of the server + #[serde(rename = "server_knowledge")] + pub server_knowledge: i64, +} + +impl SaveTransactionsResponseData { + pub fn new(transaction_ids: Vec, server_knowledge: i64) -> SaveTransactionsResponseData { + SaveTransactionsResponseData { + transaction_ids: transaction_ids, + transaction: None, + transactions: None, + duplicate_import_ids: None, + server_knowledge: server_knowledge, + } + } +} + + diff --git a/src/models/save_transactions_wrapper.rs b/src/models/save_transactions_wrapper.rs new file mode 100644 index 0000000..ed49180 --- /dev/null +++ b/src/models/save_transactions_wrapper.rs @@ -0,0 +1,33 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct SaveTransactionsWrapper { + #[serde(rename = "transaction", skip_serializing_if = "Option::is_none")] + pub transaction: Option<::models::SaveTransaction>, + #[serde(rename = "transactions", skip_serializing_if = "Option::is_none")] + pub transactions: Option>, +} + +impl SaveTransactionsWrapper { + pub fn new() -> SaveTransactionsWrapper { + SaveTransactionsWrapper { + transaction: None, + transactions: None, + } + } +} + + diff --git a/src/models/scheduled_sub_transaction.rs b/src/models/scheduled_sub_transaction.rs new file mode 100644 index 0000000..dfc0aca --- /dev/null +++ b/src/models/scheduled_sub_transaction.rs @@ -0,0 +1,54 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct ScheduledSubTransaction { + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "scheduled_transaction_id")] + pub scheduled_transaction_id: String, + /// The scheduled subtransaction amount in milliunits format + #[serde(rename = "amount")] + pub amount: i64, + #[serde(rename = "memo", skip_serializing_if = "Option::is_none")] + pub memo: Option, + #[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")] + pub payee_id: Option, + #[serde(rename = "category_id")] + pub category_id: String, + /// If a transfer, the account_id which the scheduled subtransaction transfers to + #[serde(rename = "transfer_account_id", skip_serializing_if = "Option::is_none")] + pub transfer_account_id: Option, + /// Whether or not the scheduled subtransaction has been deleted. Deleted scheduled subtransactions will only be included in delta requests. + #[serde(rename = "deleted")] + pub deleted: bool, +} + +impl ScheduledSubTransaction { + pub fn new(id: String, scheduled_transaction_id: String, amount: i64, category_id: String, deleted: bool) -> ScheduledSubTransaction { + ScheduledSubTransaction { + id: id, + scheduled_transaction_id: scheduled_transaction_id, + amount: amount, + memo: None, + payee_id: None, + category_id: category_id, + transfer_account_id: None, + deleted: deleted, + } + } +} + + diff --git a/src/models/scheduled_transaction_detail.rs b/src/models/scheduled_transaction_detail.rs new file mode 100644 index 0000000..d86ef25 --- /dev/null +++ b/src/models/scheduled_transaction_detail.rs @@ -0,0 +1,128 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct ScheduledTransactionDetail { + #[serde(rename = "id")] + pub id: String, + /// The first date for which the Scheduled Transaction was scheduled. + #[serde(rename = "date_first")] + pub date_first: String, + /// The next date for which the Scheduled Transaction is scheduled. + #[serde(rename = "date_next")] + pub date_next: String, + #[serde(rename = "frequency")] + pub frequency: String, + /// The scheduled transaction amount in milliunits format + #[serde(rename = "amount")] + pub amount: i64, + #[serde(rename = "memo", skip_serializing_if = "Option::is_none")] + pub memo: Option, + /// The scheduled transaction flag + #[serde(rename = "flag_color")] + pub flag_color: String, + #[serde(rename = "account_id")] + pub account_id: String, + #[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")] + pub payee_id: Option, + #[serde(rename = "category_id")] + pub category_id: String, + /// If a transfer, the account_id which the scheduled transaction transfers to + #[serde(rename = "transfer_account_id", skip_serializing_if = "Option::is_none")] + pub transfer_account_id: Option, + /// Whether or not the scheduled transaction has been deleted. Deleted scheduled transactions will only be included in delta requests. + #[serde(rename = "deleted")] + pub deleted: bool, + #[serde(rename = "account_name")] + pub account_name: String, + #[serde(rename = "payee_name")] + pub payee_name: String, + #[serde(rename = "category_name")] + pub category_name: String, + /// If a split scheduled transaction, the subtransactions. + #[serde(rename = "subtransactions")] + pub subtransactions: Vec<::models::ScheduledSubTransaction>, +} + +impl ScheduledTransactionDetail { + pub fn new(id: String, date_first: String, date_next: String, frequency: String, amount: i64, flag_color: String, account_id: String, category_id: String, deleted: bool, account_name: String, payee_name: String, category_name: String, subtransactions: Vec<::models::ScheduledSubTransaction>) -> ScheduledTransactionDetail { + ScheduledTransactionDetail { + id: id, + date_first: date_first, + date_next: date_next, + frequency: frequency, + amount: amount, + memo: None, + flag_color: flag_color, + account_id: account_id, + payee_id: None, + category_id: category_id, + transfer_account_id: None, + deleted: deleted, + account_name: account_name, + payee_name: payee_name, + category_name: category_name, + subtransactions: subtransactions, + } + } +} + +/// +#[derive(Debug, Serialize, Deserialize)] +pub enum Frequency { + #[serde(rename = "never")] + Never, + #[serde(rename = "daily")] + Daily, + #[serde(rename = "weekly")] + Weekly, + #[serde(rename = "everyOtherWeek")] + EveryOtherWeek, + #[serde(rename = "twiceAMonth")] + TwiceAMonth, + #[serde(rename = "every4Weeks")] + Every4Weeks, + #[serde(rename = "monthly")] + Monthly, + #[serde(rename = "everyOtherMonth")] + EveryOtherMonth, + #[serde(rename = "every3Months")] + Every3Months, + #[serde(rename = "every4Months")] + Every4Months, + #[serde(rename = "twiceAYear")] + TwiceAYear, + #[serde(rename = "yearly")] + Yearly, + #[serde(rename = "everyOtherYear")] + EveryOtherYear, +} +/// The scheduled transaction flag +#[derive(Debug, Serialize, Deserialize)] +pub enum FlagColor { + #[serde(rename = "red")] + Red, + #[serde(rename = "orange")] + Orange, + #[serde(rename = "yellow")] + Yellow, + #[serde(rename = "green")] + Green, + #[serde(rename = "blue")] + Blue, + #[serde(rename = "purple")] + Purple, +} + diff --git a/src/models/scheduled_transaction_detail_all_of.rs b/src/models/scheduled_transaction_detail_all_of.rs new file mode 100644 index 0000000..cf7e6c7 --- /dev/null +++ b/src/models/scheduled_transaction_detail_all_of.rs @@ -0,0 +1,40 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct ScheduledTransactionDetailAllOf { + #[serde(rename = "account_name")] + pub account_name: String, + #[serde(rename = "payee_name")] + pub payee_name: String, + #[serde(rename = "category_name")] + pub category_name: String, + /// If a split scheduled transaction, the subtransactions. + #[serde(rename = "subtransactions")] + pub subtransactions: Vec<::models::ScheduledSubTransaction>, +} + +impl ScheduledTransactionDetailAllOf { + pub fn new(account_name: String, payee_name: String, category_name: String, subtransactions: Vec<::models::ScheduledSubTransaction>) -> ScheduledTransactionDetailAllOf { + ScheduledTransactionDetailAllOf { + account_name: account_name, + payee_name: payee_name, + category_name: category_name, + subtransactions: subtransactions, + } + } +} + + diff --git a/src/models/scheduled_transaction_response.rs b/src/models/scheduled_transaction_response.rs new file mode 100644 index 0000000..25286cd --- /dev/null +++ b/src/models/scheduled_transaction_response.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct ScheduledTransactionResponse { + #[serde(rename = "data")] + pub data: ::models::ScheduledTransactionResponseData, +} + +impl ScheduledTransactionResponse { + pub fn new(data: ::models::ScheduledTransactionResponseData) -> ScheduledTransactionResponse { + ScheduledTransactionResponse { + data: data, + } + } +} + + diff --git a/src/models/scheduled_transaction_response_data.rs b/src/models/scheduled_transaction_response_data.rs new file mode 100644 index 0000000..70db916 --- /dev/null +++ b/src/models/scheduled_transaction_response_data.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct ScheduledTransactionResponseData { + #[serde(rename = "scheduled_transaction")] + pub scheduled_transaction: ::models::ScheduledTransactionDetail, +} + +impl ScheduledTransactionResponseData { + pub fn new(scheduled_transaction: ::models::ScheduledTransactionDetail) -> ScheduledTransactionResponseData { + ScheduledTransactionResponseData { + scheduled_transaction: scheduled_transaction, + } + } +} + + diff --git a/src/models/scheduled_transaction_summary.rs b/src/models/scheduled_transaction_summary.rs new file mode 100644 index 0000000..7966d2c --- /dev/null +++ b/src/models/scheduled_transaction_summary.rs @@ -0,0 +1,115 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct ScheduledTransactionSummary { + #[serde(rename = "id")] + pub id: String, + /// The first date for which the Scheduled Transaction was scheduled. + #[serde(rename = "date_first")] + pub date_first: String, + /// The next date for which the Scheduled Transaction is scheduled. + #[serde(rename = "date_next")] + pub date_next: String, + #[serde(rename = "frequency")] + pub frequency: String, + /// The scheduled transaction amount in milliunits format + #[serde(rename = "amount")] + pub amount: i64, + #[serde(rename = "memo", skip_serializing_if = "Option::is_none")] + pub memo: Option, + /// The scheduled transaction flag + #[serde(rename = "flag_color")] + pub flag_color: String, + #[serde(rename = "account_id")] + pub account_id: String, + #[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")] + pub payee_id: Option, + #[serde(rename = "category_id")] + pub category_id: String, + /// If a transfer, the account_id which the scheduled transaction transfers to + #[serde(rename = "transfer_account_id", skip_serializing_if = "Option::is_none")] + pub transfer_account_id: Option, + /// Whether or not the scheduled transaction has been deleted. Deleted scheduled transactions will only be included in delta requests. + #[serde(rename = "deleted")] + pub deleted: bool, +} + +impl ScheduledTransactionSummary { + pub fn new(id: String, date_first: String, date_next: String, frequency: String, amount: i64, flag_color: String, account_id: String, category_id: String, deleted: bool) -> ScheduledTransactionSummary { + ScheduledTransactionSummary { + id: id, + date_first: date_first, + date_next: date_next, + frequency: frequency, + amount: amount, + memo: None, + flag_color: flag_color, + account_id: account_id, + payee_id: None, + category_id: category_id, + transfer_account_id: None, + deleted: deleted, + } + } +} + +/// +#[derive(Debug, Serialize, Deserialize)] +pub enum Frequency { + #[serde(rename = "never")] + Never, + #[serde(rename = "daily")] + Daily, + #[serde(rename = "weekly")] + Weekly, + #[serde(rename = "everyOtherWeek")] + EveryOtherWeek, + #[serde(rename = "twiceAMonth")] + TwiceAMonth, + #[serde(rename = "every4Weeks")] + Every4Weeks, + #[serde(rename = "monthly")] + Monthly, + #[serde(rename = "everyOtherMonth")] + EveryOtherMonth, + #[serde(rename = "every3Months")] + Every3Months, + #[serde(rename = "every4Months")] + Every4Months, + #[serde(rename = "twiceAYear")] + TwiceAYear, + #[serde(rename = "yearly")] + Yearly, + #[serde(rename = "everyOtherYear")] + EveryOtherYear, +} +/// The scheduled transaction flag +#[derive(Debug, Serialize, Deserialize)] +pub enum FlagColor { + #[serde(rename = "red")] + Red, + #[serde(rename = "orange")] + Orange, + #[serde(rename = "yellow")] + Yellow, + #[serde(rename = "green")] + Green, + #[serde(rename = "blue")] + Blue, + #[serde(rename = "purple")] + Purple, +} + diff --git a/src/models/scheduled_transactions_response.rs b/src/models/scheduled_transactions_response.rs new file mode 100644 index 0000000..8ff8378 --- /dev/null +++ b/src/models/scheduled_transactions_response.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct ScheduledTransactionsResponse { + #[serde(rename = "data")] + pub data: ::models::ScheduledTransactionsResponseData, +} + +impl ScheduledTransactionsResponse { + pub fn new(data: ::models::ScheduledTransactionsResponseData) -> ScheduledTransactionsResponse { + ScheduledTransactionsResponse { + data: data, + } + } +} + + diff --git a/src/models/scheduled_transactions_response_data.rs b/src/models/scheduled_transactions_response_data.rs new file mode 100644 index 0000000..71e5c79 --- /dev/null +++ b/src/models/scheduled_transactions_response_data.rs @@ -0,0 +1,34 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct ScheduledTransactionsResponseData { + #[serde(rename = "scheduled_transactions")] + pub scheduled_transactions: Vec<::models::ScheduledTransactionDetail>, + /// The knowledge of the server + #[serde(rename = "server_knowledge")] + pub server_knowledge: i64, +} + +impl ScheduledTransactionsResponseData { + pub fn new(scheduled_transactions: Vec<::models::ScheduledTransactionDetail>, server_knowledge: i64) -> ScheduledTransactionsResponseData { + ScheduledTransactionsResponseData { + scheduled_transactions: scheduled_transactions, + server_knowledge: server_knowledge, + } + } +} + + diff --git a/src/models/sub_transaction.rs b/src/models/sub_transaction.rs new file mode 100644 index 0000000..633ae38 --- /dev/null +++ b/src/models/sub_transaction.rs @@ -0,0 +1,54 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct SubTransaction { + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "transaction_id")] + pub transaction_id: String, + /// The subtransaction amount in milliunits format + #[serde(rename = "amount")] + pub amount: i64, + #[serde(rename = "memo", skip_serializing_if = "Option::is_none")] + pub memo: Option, + #[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")] + pub payee_id: Option, + #[serde(rename = "category_id", skip_serializing_if = "Option::is_none")] + pub category_id: Option, + /// If a transfer, the account_id which the subtransaction transfers to + #[serde(rename = "transfer_account_id", skip_serializing_if = "Option::is_none")] + pub transfer_account_id: Option, + /// Whether or not the subtransaction has been deleted. Deleted subtransactions will only be included in delta requests. + #[serde(rename = "deleted")] + pub deleted: bool, +} + +impl SubTransaction { + pub fn new(id: String, transaction_id: String, amount: i64, deleted: bool) -> SubTransaction { + SubTransaction { + id: id, + transaction_id: transaction_id, + amount: amount, + memo: None, + payee_id: None, + category_id: None, + transfer_account_id: None, + deleted: deleted, + } + } +} + + diff --git a/src/models/transaction_detail.rs b/src/models/transaction_detail.rs new file mode 100644 index 0000000..956eae9 --- /dev/null +++ b/src/models/transaction_detail.rs @@ -0,0 +1,121 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct TransactionDetail { + #[serde(rename = "id")] + pub id: String, + /// The transaction date in ISO format (e.g. 2016-12-01) + #[serde(rename = "date")] + pub date: String, + /// The transaction amount in milliunits format + #[serde(rename = "amount")] + pub amount: i64, + #[serde(rename = "memo", skip_serializing_if = "Option::is_none")] + pub memo: Option, + /// The cleared status of the transaction + #[serde(rename = "cleared")] + pub cleared: String, + /// Whether or not the transaction is approved + #[serde(rename = "approved")] + pub approved: bool, + /// The transaction flag + #[serde(rename = "flag_color", skip_serializing_if = "Option::is_none")] + pub flag_color: Option, + #[serde(rename = "account_id")] + pub account_id: String, + #[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")] + pub payee_id: Option, + #[serde(rename = "category_id", skip_serializing_if = "Option::is_none")] + pub category_id: Option, + /// If a transfer transaction, the account to which it transfers + #[serde(rename = "transfer_account_id", skip_serializing_if = "Option::is_none")] + pub transfer_account_id: Option, + /// If a transfer transaction, the id of transaction on the other side of the transfer + #[serde(rename = "transfer_transaction_id", skip_serializing_if = "Option::is_none")] + pub transfer_transaction_id: Option, + /// If transaction is matched, the id of the matched transaction + #[serde(rename = "matched_transaction_id", skip_serializing_if = "Option::is_none")] + pub matched_transaction_id: Option, + /// If the Transaction was imported, this field is a unique (by account) import identifier. If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. + #[serde(rename = "import_id", skip_serializing_if = "Option::is_none")] + pub import_id: Option, + /// Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests. + #[serde(rename = "deleted")] + pub deleted: bool, + #[serde(rename = "account_name")] + pub account_name: String, + #[serde(rename = "payee_name", skip_serializing_if = "Option::is_none")] + pub payee_name: Option, + #[serde(rename = "category_name", skip_serializing_if = "Option::is_none")] + pub category_name: Option, + /// If a split transaction, the subtransactions. + #[serde(rename = "subtransactions")] + pub subtransactions: Vec<::models::SubTransaction>, +} + +impl TransactionDetail { + pub fn new(id: String, date: String, amount: i64, cleared: String, approved: bool, account_id: String, deleted: bool, account_name: String, subtransactions: Vec<::models::SubTransaction>) -> TransactionDetail { + TransactionDetail { + id: id, + date: date, + amount: amount, + memo: None, + cleared: cleared, + approved: approved, + flag_color: None, + account_id: account_id, + payee_id: None, + category_id: None, + transfer_account_id: None, + transfer_transaction_id: None, + matched_transaction_id: None, + import_id: None, + deleted: deleted, + account_name: account_name, + payee_name: None, + category_name: None, + subtransactions: subtransactions, + } + } +} + +/// The cleared status of the transaction +#[derive(Debug, Serialize, Deserialize)] +pub enum Cleared { + #[serde(rename = "cleared")] + Cleared, + #[serde(rename = "uncleared")] + Uncleared, + #[serde(rename = "reconciled")] + Reconciled, +} +/// The transaction flag +#[derive(Debug, Serialize, Deserialize)] +pub enum FlagColor { + #[serde(rename = "red")] + Red, + #[serde(rename = "orange")] + Orange, + #[serde(rename = "yellow")] + Yellow, + #[serde(rename = "green")] + Green, + #[serde(rename = "blue")] + Blue, + #[serde(rename = "purple")] + Purple, +} + diff --git a/src/models/transaction_detail_all_of.rs b/src/models/transaction_detail_all_of.rs new file mode 100644 index 0000000..cead8f5 --- /dev/null +++ b/src/models/transaction_detail_all_of.rs @@ -0,0 +1,40 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct TransactionDetailAllOf { + #[serde(rename = "account_name")] + pub account_name: String, + #[serde(rename = "payee_name", skip_serializing_if = "Option::is_none")] + pub payee_name: Option, + #[serde(rename = "category_name", skip_serializing_if = "Option::is_none")] + pub category_name: Option, + /// If a split transaction, the subtransactions. + #[serde(rename = "subtransactions")] + pub subtransactions: Vec<::models::SubTransaction>, +} + +impl TransactionDetailAllOf { + pub fn new(account_name: String, subtransactions: Vec<::models::SubTransaction>) -> TransactionDetailAllOf { + TransactionDetailAllOf { + account_name: account_name, + payee_name: None, + category_name: None, + subtransactions: subtransactions, + } + } +} + + diff --git a/src/models/transaction_response.rs b/src/models/transaction_response.rs new file mode 100644 index 0000000..cc65780 --- /dev/null +++ b/src/models/transaction_response.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct TransactionResponse { + #[serde(rename = "data")] + pub data: ::models::TransactionResponseData, +} + +impl TransactionResponse { + pub fn new(data: ::models::TransactionResponseData) -> TransactionResponse { + TransactionResponse { + data: data, + } + } +} + + diff --git a/src/models/transaction_response_data.rs b/src/models/transaction_response_data.rs new file mode 100644 index 0000000..5f96108 --- /dev/null +++ b/src/models/transaction_response_data.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct TransactionResponseData { + #[serde(rename = "transaction")] + pub transaction: ::models::TransactionDetail, +} + +impl TransactionResponseData { + pub fn new(transaction: ::models::TransactionDetail) -> TransactionResponseData { + TransactionResponseData { + transaction: transaction, + } + } +} + + diff --git a/src/models/transaction_summary.rs b/src/models/transaction_summary.rs new file mode 100644 index 0000000..94ce164 --- /dev/null +++ b/src/models/transaction_summary.rs @@ -0,0 +1,108 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct TransactionSummary { + #[serde(rename = "id")] + pub id: String, + /// The transaction date in ISO format (e.g. 2016-12-01) + #[serde(rename = "date")] + pub date: String, + /// The transaction amount in milliunits format + #[serde(rename = "amount")] + pub amount: i64, + #[serde(rename = "memo", skip_serializing_if = "Option::is_none")] + pub memo: Option, + /// The cleared status of the transaction + #[serde(rename = "cleared")] + pub cleared: String, + /// Whether or not the transaction is approved + #[serde(rename = "approved")] + pub approved: bool, + /// The transaction flag + #[serde(rename = "flag_color", skip_serializing_if = "Option::is_none")] + pub flag_color: Option, + #[serde(rename = "account_id")] + pub account_id: String, + #[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")] + pub payee_id: Option, + #[serde(rename = "category_id", skip_serializing_if = "Option::is_none")] + pub category_id: Option, + /// If a transfer transaction, the account to which it transfers + #[serde(rename = "transfer_account_id", skip_serializing_if = "Option::is_none")] + pub transfer_account_id: Option, + /// If a transfer transaction, the id of transaction on the other side of the transfer + #[serde(rename = "transfer_transaction_id", skip_serializing_if = "Option::is_none")] + pub transfer_transaction_id: Option, + /// If transaction is matched, the id of the matched transaction + #[serde(rename = "matched_transaction_id", skip_serializing_if = "Option::is_none")] + pub matched_transaction_id: Option, + /// If the Transaction was imported, this field is a unique (by account) import identifier. If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. + #[serde(rename = "import_id", skip_serializing_if = "Option::is_none")] + pub import_id: Option, + /// Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests. + #[serde(rename = "deleted")] + pub deleted: bool, +} + +impl TransactionSummary { + pub fn new(id: String, date: String, amount: i64, cleared: String, approved: bool, account_id: String, deleted: bool) -> TransactionSummary { + TransactionSummary { + id: id, + date: date, + amount: amount, + memo: None, + cleared: cleared, + approved: approved, + flag_color: None, + account_id: account_id, + payee_id: None, + category_id: None, + transfer_account_id: None, + transfer_transaction_id: None, + matched_transaction_id: None, + import_id: None, + deleted: deleted, + } + } +} + +/// The cleared status of the transaction +#[derive(Debug, Serialize, Deserialize)] +pub enum Cleared { + #[serde(rename = "cleared")] + Cleared, + #[serde(rename = "uncleared")] + Uncleared, + #[serde(rename = "reconciled")] + Reconciled, +} +/// The transaction flag +#[derive(Debug, Serialize, Deserialize)] +pub enum FlagColor { + #[serde(rename = "red")] + Red, + #[serde(rename = "orange")] + Orange, + #[serde(rename = "yellow")] + Yellow, + #[serde(rename = "green")] + Green, + #[serde(rename = "blue")] + Blue, + #[serde(rename = "purple")] + Purple, +} + diff --git a/src/models/transactions_response.rs b/src/models/transactions_response.rs new file mode 100644 index 0000000..cda3c1f --- /dev/null +++ b/src/models/transactions_response.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct TransactionsResponse { + #[serde(rename = "data")] + pub data: ::models::TransactionsResponseData, +} + +impl TransactionsResponse { + pub fn new(data: ::models::TransactionsResponseData) -> TransactionsResponse { + TransactionsResponse { + data: data, + } + } +} + + diff --git a/src/models/transactions_response_data.rs b/src/models/transactions_response_data.rs new file mode 100644 index 0000000..4ac9438 --- /dev/null +++ b/src/models/transactions_response_data.rs @@ -0,0 +1,34 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct TransactionsResponseData { + #[serde(rename = "transactions")] + pub transactions: Vec<::models::TransactionDetail>, + /// The knowledge of the server + #[serde(rename = "server_knowledge")] + pub server_knowledge: i64, +} + +impl TransactionsResponseData { + pub fn new(transactions: Vec<::models::TransactionDetail>, server_knowledge: i64) -> TransactionsResponseData { + TransactionsResponseData { + transactions: transactions, + server_knowledge: server_knowledge, + } + } +} + + diff --git a/src/models/update_transaction.rs b/src/models/update_transaction.rs new file mode 100644 index 0000000..5e93837 --- /dev/null +++ b/src/models/update_transaction.rs @@ -0,0 +1,98 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct UpdateTransaction { + #[serde(rename = "id", skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(rename = "account_id")] + pub account_id: String, + /// The transaction date in ISO format (e.g. 2016-12-01). Future dates (scheduled transactions) are not permitted. Split transaction dates cannot be changed and if a different date is supplied it will be ignored. + #[serde(rename = "date")] + pub date: String, + /// The transaction amount in milliunits format. Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored. + #[serde(rename = "amount")] + pub amount: i64, + /// The payee for the transaction + #[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")] + pub payee_id: Option, + /// The payee name. If a payee_name value is provided and payee_id has a null value, the payee_name value will be used to resolve the payee by either (1) a matching payee rename rule (only if import_id is also specified) or (2) a payee with the same name or (3) creation of a new payee. + #[serde(rename = "payee_name", skip_serializing_if = "Option::is_none")] + pub payee_name: Option, + /// The category for the transaction. Split and Credit Card Payment categories are not permitted and will be ignored if supplied. If an existing transaction has a Split category it cannot be changed. + #[serde(rename = "category_id", skip_serializing_if = "Option::is_none")] + pub category_id: Option, + #[serde(rename = "memo", skip_serializing_if = "Option::is_none")] + pub memo: Option, + /// The cleared status of the transaction + #[serde(rename = "cleared", skip_serializing_if = "Option::is_none")] + pub cleared: Option, + /// Whether or not the transaction is approved. If not supplied, transaction will be unapproved by default. + #[serde(rename = "approved", skip_serializing_if = "Option::is_none")] + pub approved: Option, + /// The transaction flag + #[serde(rename = "flag_color", skip_serializing_if = "Option::is_none")] + pub flag_color: Option, + /// If specified, the new transaction will be assigned this import_id and considered \"imported\". *At the time of import* we will attempt to match \"imported\" transactions with non-imported (i.e. \"user-entered\") transactions.

Transactions imported through File Based Import or Direct Import (not through the API) are assigned an import_id in the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. Using a consistent format will prevent duplicates through Direct Import and File Based Import.

If import_id is omitted or specified as null, the transaction will be treated as a \"user-entered\" transaction. As such, it will be eligible to be matched against transactions later being imported (via DI, FBI, or API). + #[serde(rename = "import_id", skip_serializing_if = "Option::is_none")] + pub import_id: Option, +} + +impl UpdateTransaction { + pub fn new(account_id: String, date: String, amount: i64) -> UpdateTransaction { + UpdateTransaction { + id: None, + account_id: account_id, + date: date, + amount: amount, + payee_id: None, + payee_name: None, + category_id: None, + memo: None, + cleared: None, + approved: None, + flag_color: None, + import_id: None, + } + } +} + +/// The cleared status of the transaction +#[derive(Debug, Serialize, Deserialize)] +pub enum Cleared { + #[serde(rename = "cleared")] + Cleared, + #[serde(rename = "uncleared")] + Uncleared, + #[serde(rename = "reconciled")] + Reconciled, +} +/// The transaction flag +#[derive(Debug, Serialize, Deserialize)] +pub enum FlagColor { + #[serde(rename = "red")] + Red, + #[serde(rename = "orange")] + Orange, + #[serde(rename = "yellow")] + Yellow, + #[serde(rename = "green")] + Green, + #[serde(rename = "blue")] + Blue, + #[serde(rename = "purple")] + Purple, +} + diff --git a/src/models/update_transaction_wrapper.rs b/src/models/update_transaction_wrapper.rs new file mode 100644 index 0000000..5c34fbb --- /dev/null +++ b/src/models/update_transaction_wrapper.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct UpdateTransactionWrapper { + #[serde(rename = "transaction")] + pub transaction: ::models::UpdateTransaction, +} + +impl UpdateTransactionWrapper { + pub fn new(transaction: ::models::UpdateTransaction) -> UpdateTransactionWrapper { + UpdateTransactionWrapper { + transaction: transaction, + } + } +} + + diff --git a/src/models/update_transactions_response.rs b/src/models/update_transactions_response.rs new file mode 100644 index 0000000..c56d2b3 --- /dev/null +++ b/src/models/update_transactions_response.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct UpdateTransactionsResponse { + #[serde(rename = "data")] + pub data: ::models::SaveTransactionsResponseData, +} + +impl UpdateTransactionsResponse { + pub fn new(data: ::models::SaveTransactionsResponseData) -> UpdateTransactionsResponse { + UpdateTransactionsResponse { + data: data, + } + } +} + + diff --git a/src/models/update_transactions_wrapper.rs b/src/models/update_transactions_wrapper.rs new file mode 100644 index 0000000..810d054 --- /dev/null +++ b/src/models/update_transactions_wrapper.rs @@ -0,0 +1,33 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct UpdateTransactionsWrapper { + #[serde(rename = "transaction", skip_serializing_if = "Option::is_none")] + pub transaction: Option<::models::UpdateTransaction>, + #[serde(rename = "transactions", skip_serializing_if = "Option::is_none")] + pub transactions: Option>, +} + +impl UpdateTransactionsWrapper { + pub fn new() -> UpdateTransactionsWrapper { + UpdateTransactionsWrapper { + transaction: None, + transactions: None, + } + } +} + + diff --git a/src/models/user.rs b/src/models/user.rs new file mode 100644 index 0000000..8143284 --- /dev/null +++ b/src/models/user.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct User { + #[serde(rename = "id")] + pub id: String, +} + +impl User { + pub fn new(id: String) -> User { + User { + id: id, + } + } +} + + diff --git a/src/models/user_response.rs b/src/models/user_response.rs new file mode 100644 index 0000000..e2427e0 --- /dev/null +++ b/src/models/user_response.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct UserResponse { + #[serde(rename = "data")] + pub data: ::models::UserResponseData, +} + +impl UserResponse { + pub fn new(data: ::models::UserResponseData) -> UserResponse { + UserResponse { + data: data, + } + } +} + + diff --git a/src/models/user_response_data.rs b/src/models/user_response_data.rs new file mode 100644 index 0000000..9fc30f8 --- /dev/null +++ b/src/models/user_response_data.rs @@ -0,0 +1,30 @@ +/* + * 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 + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct UserResponseData { + #[serde(rename = "user")] + pub user: ::models::User, +} + +impl UserResponseData { + pub fn new(user: ::models::User) -> UserResponseData { + UserResponseData { + user: user, + } + } +} + + diff --git a/src/paths.rs b/src/paths.rs deleted file mode 100644 index f53bef5..0000000 --- a/src/paths.rs +++ /dev/null @@ -1,56 +0,0 @@ -use snafu::{OptionExt, ResultExt}; -use std::io::Read; - -#[derive(Debug, snafu::Snafu)] -pub enum Error { - #[snafu(display("couldn't find config path for project {}", name))] - FindConfigDir { name: String }, - - #[snafu(display( - "couldn't open file {}: {}", - file.to_string_lossy(), - source - ))] - OpenFile { - file: std::path::PathBuf, - source: std::io::Error, - }, - - #[snafu(display( - "couldn't read file {}: {}", - file.to_string_lossy(), - source - ))] - ReadFile { - file: std::path::PathBuf, - source: std::io::Error, - }, -} - -pub type Result = std::result::Result; - -const PROJECT_NAME: &str = "ynab"; - -pub fn api_key() -> Result { - Ok(directories::ProjectDirs::from("", "", PROJECT_NAME) - .with_context(|| FindConfigDir { - name: PROJECT_NAME.to_string(), - })? - .config_dir() - .join("api-key")) -} - -pub fn read_api_key() -> Result { - let mut key = String::new(); - let key_file = api_key()?; - std::fs::File::open(key_file.clone()) - .with_context(|| OpenFile { - file: key_file.clone(), - })? - .read_to_string(&mut key) - .with_context(|| ReadFile { - file: key_file.clone(), - })?; - let key = key.trim(); - Ok(key.to_string()) -} diff --git a/src/views.rs b/src/views.rs deleted file mode 100644 index 6129e53..0000000 --- a/src/views.rs +++ /dev/null @@ -1,5 +0,0 @@ -mod txn_table; -mod txn_tables; -mod util; - -pub use txn_tables::TxnTables; diff --git a/src/views/txn_table.rs b/src/views/txn_table.rs deleted file mode 100644 index b71a92e..0000000 --- a/src/views/txn_table.rs +++ /dev/null @@ -1,151 +0,0 @@ -use cursive::view::{Identifiable, View, ViewWrapper}; - -#[derive(Clone, Copy, Eq, Hash, PartialEq)] -pub enum TxnColumn { - Selected, - Date, - Account, - Payee, - Amount, - TotalAmount, -} - -pub type TxnTableView = - cursive_table_view::TableView; -pub struct TxnTable { - view: super::util::FullView, -} - -impl cursive::view::ViewWrapper for TxnTable { - cursive::wrap_impl!(self.view: super::util::FullView); -} - -impl TxnTable { - pub fn new( - txns: Vec, - id: &'static str, - ) -> Self { - let mut table = cursive_table_view::TableView::new() - .column(TxnColumn::Selected, "Sel", |c| c.width(3)) - .column(TxnColumn::Date, "Date", |c| c.width(10)) - .column(TxnColumn::Account, "Account", |c| c.width(15)) - .column(TxnColumn::Payee, "Payee", |c| c) - .column(TxnColumn::Amount, "Amount", |c| { - c.align(cursive::align::HAlign::Right).width(10) - }) - .column(TxnColumn::TotalAmount, "", |c| { - c.align(cursive::align::HAlign::Right).width(10) - }) - .default_column(TxnColumn::Date) - .on_submit(|s, _, _| { - s.on_event(cursive::event::Event::Key( - cursive::event::Key::F0, - )); - }); - table.set_items(txns); - let view = cursive::views::OnEventView::new(table) - .on_event_inner(' ', |v: &mut TxnTableView, _| { - if let Some(idx) = v.item() { - let txn = v.borrow_item_mut(idx).unwrap(); - txn.selected = !txn.selected; - } - None - }) - .on_event_inner('h', |v: &mut TxnTableView, _| { - v.on_event(cursive::event::Event::Key( - cursive::event::Key::Left, - )); - None - }) - .on_event_inner('j', |v: &mut TxnTableView, _| { - v.on_event(cursive::event::Event::Key( - cursive::event::Key::Down, - )); - None - }) - .on_event_inner('k', |v: &mut TxnTableView, _| { - v.on_event(cursive::event::Event::Key( - cursive::event::Key::Up, - )); - None - }) - .on_event_inner('l', |v: &mut TxnTableView, _| { - v.on_event(cursive::event::Event::Key( - cursive::event::Key::Right, - )); - None - }) - .on_event_inner('g', |v: &mut TxnTableView, _| { - v.set_selected_row(0); - None - }) - .on_event_inner('G', |v: &mut TxnTableView, _| { - v.set_selected_row(v.len() - 1); - None - }) - .with_id(id); - TxnTable { view } - } - - pub fn len(&self) -> usize { - self.view - .with_view(|v| v.with_view(|v| v.len()).unwrap()) - .unwrap() - } - - // XXX why does borrow_items require &mut self? - pub fn amount(&mut self) -> i64 { - self.view - .get_mut() - .get_inner_mut() - .borrow_items() - .iter() - .map(|t| t.amount) - .sum() - } -} - -impl cursive_table_view::TableViewItem - for crate::ynab::Transaction -{ - fn to_column(&self, column: TxnColumn) -> String { - match column { - TxnColumn::Selected => { - if self.selected { - "[x]".to_string() - } else { - "[ ]".to_string() - } - } - TxnColumn::Date => self.date.clone(), - TxnColumn::Account => { - self.account.clone().unwrap_or_else(|| "".to_string()) - } - TxnColumn::Payee => { - self.payee.clone().unwrap_or_else(|| "".to_string()) - } - TxnColumn::Amount => crate::ynab::format_amount(self.amount), - TxnColumn::TotalAmount => { - if self.amount == self.total_amount { - "".to_string() - } else { - crate::ynab::format_amount(self.total_amount) - } - } - } - } - - fn cmp(&self, other: &Self, column: TxnColumn) -> std::cmp::Ordering - where - Self: Sized, - { - match column { - TxnColumn::Selected => std::cmp::Ordering::Equal, - TxnColumn::Date => self.date.cmp(&other.date), - TxnColumn::Account => self.account.cmp(&other.account), - TxnColumn::Payee => self.payee.cmp(&other.payee), - TxnColumn::Amount => self.amount.cmp(&other.amount), - TxnColumn::TotalAmount => self.amount.cmp(&other.total_amount), - } - } -} diff --git a/src/views/txn_tables.rs b/src/views/txn_tables.rs deleted file mode 100644 index 62539ac..0000000 --- a/src/views/txn_tables.rs +++ /dev/null @@ -1,353 +0,0 @@ -use cursive::view::{Identifiable, View}; - -const SELECTED_TOTAL_ID: &str = "selected_total"; -const INFLOWS_TABLE_ID: &str = "inflows_table"; -const OUTFLOWS_TABLE_ID: &str = "outflows_table"; - -pub struct TxnTables { - view: super::util::FullView, -} - -impl cursive::view::ViewWrapper for TxnTables { - cursive::wrap_impl!( - self.view: super::util::FullView - ); -} - -impl TxnTables { - pub fn new(id: &'static str, budget: &crate::ynab::Budget) -> Self { - let mut layout = cursive::views::LinearLayout::vertical(); - - layout.add_child( - cursive::views::TextView::new("Selected: $0.00 (0 transactions)") - .h_align(cursive::align::HAlign::Right) - .with_id(SELECTED_TOTAL_ID), - ); - - let inflows = budget - .reimbursables() - .iter() - .filter(|t| !t.reimbursed && t.amount > 0) - .cloned() - .collect(); - let mut inflows_table = - super::txn_table::TxnTable::new(inflows, INFLOWS_TABLE_ID); - layout.add_child(cursive::views::TextView::new(format!( - "Inflows: {} ({} transaction{}", - crate::ynab::format_amount(inflows_table.amount()), - inflows_table.len(), - if inflows_table.len() == 1 { ") " } else { "s)" } - ))); - layout.add_child(cursive::views::CircularFocus::wrap_arrows( - cursive::views::BoxView::with_min_height( - std::cmp::min(std::cmp::max(inflows_table.len(), 1), 5) + 2, - cursive::views::BoxView::with_full_width(inflows_table), - ), - )); - - layout.add_child(cursive::views::TextView::new(" ")); - - let outflows = budget - .reimbursables() - .iter() - .filter(|t| !t.reimbursed && t.amount <= 0) - .cloned() - .collect(); - let mut outflows_table = - super::txn_table::TxnTable::new(outflows, OUTFLOWS_TABLE_ID); - layout.add_child(cursive::views::TextView::new(format!( - "Outflows: {} ({} transaction{}", - crate::ynab::format_amount(outflows_table.amount()), - outflows_table.len(), - if outflows_table.len() == 1 { - ") " - } else { - "s)" - } - ))); - layout.add_child(cursive::views::CircularFocus::wrap_arrows( - cursive::views::BoxView::with_full_screen(outflows_table), - )); - - let event_view = cursive::views::OnEventView::new(layout) - .on_event(cursive::event::Key::F0, move |s| { - submit(s); - }) - .on_event('r', move |s| { - refresh(s); - }) - .on_pre_event_inner(' ', |v, _| select(v)) - .with_id(id); - - TxnTables { view: event_view } - } -} - -fn submit(s: &mut cursive::Cursive) { - let inflows: Vec<_> = s - .call_on_id( - INFLOWS_TABLE_ID, - |v: &mut cursive::views::OnEventView< - super::txn_table::TxnTableView, - >| { - v.get_inner_mut() - .borrow_items() - .iter() - .filter(|t| t.selected) - .cloned() - .collect() - }, - ) - .unwrap(); - let outflows: Vec<_> = s - .call_on_id( - OUTFLOWS_TABLE_ID, - |v: &mut cursive::views::OnEventView< - super::txn_table::TxnTableView, - >| { - v.get_inner_mut() - .borrow_items() - .iter() - .filter(|t| t.selected) - .cloned() - .collect() - }, - ) - .unwrap(); - let total_inflow: i64 = inflows.iter().map(|t| t.amount).sum(); - let total_outflow: i64 = outflows.iter().map(|t| t.amount).sum(); - let total_amount = total_inflow + total_outflow; - if total_amount == 0 && (inflows.len() + outflows.len() > 0) { - let budget: &mut crate::ynab::Budget = s.user_data().unwrap(); - let txns: Vec<_> = inflows.iter().chain(outflows.iter()).collect(); - let err = budget.reconcile_transactions(&txns); - if let Err(err) = err { - s.add_layer(super::util::dialog(&format!("Error: {}", err))) - } else { - s.add_layer(super::util::dialog(&format!( - "Successfully updated {} transactions", - txns.len() - ))); - s.call_on_id( - INFLOWS_TABLE_ID, - |v: &mut cursive::views::OnEventView< - super::txn_table::TxnTableView, - >| { - let v = v.get_inner_mut(); - let all_txns = v.borrow_items_mut(); - for id in txns.iter().map(|t| t.id.clone()) { - if let Some(idx) = - all_txns.iter().position(|t| t.id == id) - { - all_txns.remove(idx); - } - } - if let Some(row) = v.row() { - if row >= v.len() { - v.set_selected_row(v.len() - 1); - } - } - }, - ) - .unwrap(); - s.call_on_id( - OUTFLOWS_TABLE_ID, - |v: &mut cursive::views::OnEventView< - super::txn_table::TxnTableView, - >| { - let v = v.get_inner_mut(); - let all_txns = v.borrow_items_mut(); - for id in txns.iter().map(|t| t.id.clone()) { - if let Some(idx) = - all_txns.iter().position(|t| t.id == id) - { - all_txns.remove(idx); - } - } - if let Some(row) = v.row() { - if row >= v.len() { - v.set_selected_row(v.len() - 1); - } - } - }, - ) - .unwrap(); - } - } else if total_amount != 0 { - s.add_layer(super::util::dialog(&format!( - "Selected amount is {}, must be 0", - crate::ynab::format_amount(total_amount) - ))) - } -} - -fn refresh(s: &mut cursive::Cursive) { - let budget: &mut crate::ynab::Budget = s.user_data().unwrap(); - let err = budget.refresh(); - if let Err(err) = err { - s.add_layer(super::util::dialog(&format!("Error: {}", err))); - return; - } - - let mut inflows: Vec<_> = budget - .reimbursables() - .iter() - .filter(|t| !t.reimbursed && t.amount > 0) - .cloned() - .collect(); - s.call_on_id( - INFLOWS_TABLE_ID, - |v: &mut cursive::views::OnEventView< - super::txn_table::TxnTableView, - >| { - let v = v.get_inner_mut(); - let selected: std::collections::HashSet<_> = v - .borrow_items() - .iter() - .filter(|t| t.selected) - .map(|t| t.id.clone()) - .collect(); - let row = v - .item() - .and_then(|idx| v.borrow_item(idx).map(|t| t.id.clone())); - for mut t in inflows.iter_mut() { - if selected.contains(&t.id) { - t.selected = true; - } - } - let idx = - row.and_then(|id| inflows.iter().position(|t| t.id == id)); - v.set_items(inflows); - if let Some(idx) = idx { - v.set_selected_item(idx); - } - }, - ) - .unwrap(); - - let budget: &mut crate::ynab::Budget = s.user_data().unwrap(); - let mut outflows: Vec<_> = budget - .reimbursables() - .iter() - .filter(|t| !t.reimbursed && t.amount <= 0) - .cloned() - .collect(); - s.call_on_id( - OUTFLOWS_TABLE_ID, - |v: &mut cursive::views::OnEventView< - super::txn_table::TxnTableView, - >| { - let v = v.get_inner_mut(); - let selected: std::collections::HashSet<_> = v - .borrow_items() - .iter() - .filter(|t| t.selected) - .map(|t| t.id.clone()) - .collect(); - let row = v - .item() - .and_then(|idx| v.borrow_item(idx).map(|t| t.id.clone())); - for mut t in outflows.iter_mut() { - if selected.contains(&t.id) { - t.selected = true; - } - } - let idx = - row.and_then(|id| outflows.iter().position(|t| t.id == id)); - v.set_items(outflows); - if let Some(idx) = idx { - v.set_selected_item(idx); - } - }, - ) - .unwrap(); - - render_selected_total(s); -} - -fn select( - v: &mut cursive::views::LinearLayout, -) -> Option { - let idx = v.get_focus_index(); - let child = v.get_child_mut(idx).unwrap(); - child.call_on_any( - &cursive::view::Selector::Id(INFLOWS_TABLE_ID), - Box::new(|v| { - v.downcast_mut::, - >>() - .map(|v| v.on_event(cursive::event::Event::Char(' '))); - }), - ); - child.call_on_any( - &cursive::view::Selector::Id(OUTFLOWS_TABLE_ID), - Box::new(|v| { - v.downcast_mut::, - >>() - .map(|v| v.on_event(cursive::event::Event::Char(' '))); - }), - ); - Some(cursive::event::EventResult::with_cb(|s| { - render_selected_total(s); - })) -} - -fn render_selected_total(s: &mut cursive::Cursive) { - let inflows: Vec<_> = s - .call_on_id( - INFLOWS_TABLE_ID, - |v: &mut cursive::views::OnEventView< - super::txn_table::TxnTableView, - >| { - v.get_inner_mut() - .borrow_items() - .iter() - .filter(|t| t.selected) - .map(|t| t.amount) - .collect() - }, - ) - .unwrap(); - let outflows: Vec<_> = s - .call_on_id( - OUTFLOWS_TABLE_ID, - |v: &mut cursive::views::OnEventView< - super::txn_table::TxnTableView, - >| { - v.get_inner_mut() - .borrow_items() - .iter() - .filter(|t| t.selected) - .map(|t| t.amount) - .collect() - }, - ) - .unwrap(); - let outflow: i64 = outflows.iter().sum(); - let inflow: i64 = inflows.iter().sum(); - let amount = outflow + inflow; - s.call_on_id(SELECTED_TOTAL_ID, |v: &mut cursive::views::TextView| { - let mut sstr = - cursive::utils::markup::StyledString::plain("Selected: "); - let color = if amount == 0 && outflows.len() + inflows.len() != 0 { - cursive::theme::Color::Dark(cursive::theme::BaseColor::Green) - } else { - cursive::theme::Color::TerminalDefault - }; - sstr.append(cursive::utils::markup::StyledString::styled( - crate::ynab::format_amount(amount), - color, - )); - sstr.append(format!( - " ({} transaction{}", - outflows.len() + inflows.len(), - if outflows.len() + inflows.len() == 1 { - ") " - } else { - "s)" - } - )); - v.set_content(sstr); - }); -} diff --git a/src/views/util.rs b/src/views/util.rs deleted file mode 100644 index eb22976..0000000 --- a/src/views/util.rs +++ /dev/null @@ -1,5 +0,0 @@ -pub type FullView = cursive::views::IdView>; - -pub fn dialog(s: &str) -> impl cursive::view::View { - cursive::views::Panel::new(cursive::views::Dialog::info(s)) -} diff --git a/src/ynab.rs b/src/ynab.rs deleted file mode 100644 index f07d86e..0000000 --- a/src/ynab.rs +++ /dev/null @@ -1,10 +0,0 @@ -mod budget; -mod client; -mod transaction; -mod util; - -pub use budget::Budget; -pub use budget::Error as BudgetError; -pub use client::Client; -pub use transaction::Transaction; -pub use util::format_amount; diff --git a/src/ynab/budget.rs b/src/ynab/budget.rs deleted file mode 100644 index e3275bb..0000000 --- a/src/ynab/budget.rs +++ /dev/null @@ -1,216 +0,0 @@ -use snafu::{OptionExt, ResultExt}; - -#[derive(Debug, snafu::Snafu)] -pub enum Error { - #[snafu(display("couldn't get default budget: {}", source))] - GetBudget { source: super::client::Error }, - - #[snafu(display("couldn't update transactions: {}", source))] - UpdateTransactions { source: super::client::Error }, - - #[snafu(display("couldn't find the reimbursables category"))] - FindReimbursablesCategory, -} - -pub type Result = std::result::Result; - -pub struct Budget { - client: super::client::Client, - id: String, - name: String, - reimbursables: Vec, -} - -impl Budget { - pub fn new(key: &str) -> Result { - let client = super::client::Client::new(key); - let budget = client.default_budget().context(GetBudget)?; - let reimbursables = Self::get_reimbursables(&budget)?; - let budget = Self { - client, - id: budget.id.clone(), - name: budget.name.clone(), - reimbursables, - }; - budget.check(); - Ok(budget) - } - - #[must_use] - pub fn refresh(&mut self) -> Result<()> { - let budget = self.client.default_budget().context(GetBudget)?; - self.id = budget.id.clone(); - self.name = budget.name.clone(); - self.reimbursables = Self::get_reimbursables(&budget)?; - self.check(); - Ok(()) - } - - pub fn name(&self) -> String { - self.name.clone() - } - - pub fn id(&self) -> String { - self.id.clone() - } - - pub fn reimbursables(&self) -> &[super::transaction::Transaction] { - &self.reimbursables - } - - #[must_use] - pub fn reconcile_transactions( - &self, - txns: &[&super::transaction::Transaction], - ) -> Result<()> { - let mut to_update = - ynab_api::models::UpdateTransactionsWrapper::new(); - to_update.transactions = Some( - txns.iter() - .map(|t| { - let mut ut = t.to_update_transaction(); - ut.flag_color = Some("green".to_string()); - ut - }) - .collect(), - ); - self.client - .update_transactions(&self.id, to_update) - .context(UpdateTransactions)?; - Ok(()) - } - - fn get_reimbursables( - budget: &ynab_api::models::BudgetDetail, - ) -> Result> { - let reimbursables_id = budget - .categories - .as_ref() - .and_then(|categories| { - categories - .iter() - .find(|c| c.name == "Reimbursables") - .map(|c| c.id.clone()) - }) - .context(FindReimbursablesCategory)?; - - let mut payee_map = std::collections::HashMap::new(); - if let Some(payees) = &budget.payees { - for p in payees { - payee_map.insert(p.id.clone(), p.name.clone()); - } - } - let payee_map = payee_map; - - let mut account_map = std::collections::HashMap::new(); - if let Some(accounts) = &budget.accounts { - for a in accounts { - account_map.insert(a.id.clone(), a.name.clone()); - } - } - let account_map = account_map; - - let mut reimbursables = vec![]; - - let mut transaction_map = std::collections::HashMap::new(); - if let Some(transactions) = &budget.transactions { - for t in transactions { - transaction_map.insert(t.id.clone(), t); - - if let Some(category_id) = &t.category_id { - if category_id != &reimbursables_id { - continue; - } - } else { - continue; - } - - let payee = t - .payee_id - .iter() - .map(|payee_id| payee_map.get(payee_id).cloned()) - .next() - .unwrap_or(None); - let account = account_map.get(&t.account_id).cloned(); - - let mut txn = - super::transaction::Transaction::from_transaction(t); - txn.payee = payee; - txn.account = account; - reimbursables.push(txn); - } - } - let transaction_map = transaction_map; - - if let Some(subtransactions) = &budget.subtransactions { - for st in subtransactions { - if let Some(category_id) = &st.category_id { - if category_id != &reimbursables_id { - continue; - } - } else { - continue; - } - - let t = transaction_map[&st.transaction_id]; - let payee = st - .payee_id - .iter() - .map(|payee_id| payee_map.get(payee_id).cloned()) - .next() - .unwrap_or_else(|| { - t.payee_id - .iter() - .map(|payee_id| payee_map.get(payee_id).cloned()) - .next() - .unwrap_or(None) - }); - let account = account_map.get(&t.account_id).cloned(); - - let mut txn = - super::transaction::Transaction::from_sub_transaction( - t, st, - ); - txn.payee = payee; - txn.account = account; - reimbursables.push(txn); - } - } - - reimbursables.sort_by_cached_key(|t| t.date.clone()); - Ok(reimbursables) - } - - fn check(&self) { - self.check_reconciled(); - self.check_has_inflows(); - } - - fn check_reconciled(&self) { - let reconciled_amount: i64 = self - .reimbursables() - .iter() - .filter(|t| t.reimbursed) - .map(|t| t.amount) - .sum(); - if reconciled_amount != 0 { - eprintln!( - "reconciled reimbursables don't sum to $0.00: ${}", - crate::ynab::format_amount(reconciled_amount) - ); - std::process::exit(1); - } - } - - fn check_has_inflows(&self) { - let txns = self - .reimbursables() - .iter() - .filter(|t| !t.reimbursed && t.amount > 0) - .count(); - if txns == 0 { - eprintln!("no transactions to reconcile"); - std::process::exit(1); - } - } -} diff --git a/src/ynab/client.rs b/src/ynab/client.rs deleted file mode 100644 index 19b456b..0000000 --- a/src/ynab/client.rs +++ /dev/null @@ -1,76 +0,0 @@ -#[derive(Debug, snafu::Snafu)] -pub enum Error { - // ynab-api error types don't implement Error, so can't use the - // auto-source behavior - #[snafu(display("failed to update transactions: {}", source_msg))] - UpdateTransactions { source_msg: String }, - - #[snafu(display("failed to get budgets: {}", source_msg))] - GetBudgets { source_msg: String }, - - #[snafu(display("failed to get budget {}: {}", id, source_msg))] - GetBudgetById { id: String, source_msg: String }, -} - -pub type Result = std::result::Result; - -pub struct Client { - api: ynab_api::apis::client::APIClient, -} - -impl Client { - pub fn new(key: &str) -> Self { - let mut ynab_config = - ynab_api::apis::configuration::Configuration::new(); - ynab_config.api_key = Some(ynab_api::apis::configuration::ApiKey { - prefix: Some("Bearer".to_string()), - key: key.to_string(), - }); - Self { - api: ynab_api::apis::client::APIClient::new(ynab_config), - } - } - - pub fn default_budget(&self) -> Result { - let budget_id = self - .api - .budgets_api() - .get_budgets() - .map_err(|e| Error::GetBudgets { - source_msg: format!("{:?}", e), - })? - .data - .budgets - .iter() - .next() - .ok_or_else(|| Error::GetBudgets { - source_msg: "no budgets found".to_string(), - })? - .id - .clone(); - Ok(self - .api - .budgets_api() - .get_budget_by_id(&budget_id, 0) - .map_err(|e| Error::GetBudgetById { - id: budget_id.clone(), - source_msg: format!("{:?}", e), - })? - .data - .budget) - } - - pub fn update_transactions( - &self, - budget_id: &str, - transactions: ynab_api::models::UpdateTransactionsWrapper, - ) -> Result<()> { - self.api - .transactions_api() - .update_transactions(budget_id, transactions) - .map(|_| ()) - .map_err(|e| Error::UpdateTransactions { - source_msg: format!("{:?}", e), - }) - } -} diff --git a/src/ynab/transaction.rs b/src/ynab/transaction.rs deleted file mode 100644 index be31019..0000000 --- a/src/ynab/transaction.rs +++ /dev/null @@ -1,101 +0,0 @@ -#[derive(Clone, Debug)] -pub struct Transaction { - pub id: String, - pub date: String, - pub amount: i64, - pub memo: Option, - pub cleared: String, - pub approved: bool, - pub flag_color: Option, - pub account_id: String, - pub payee_id: Option, - pub category_id: Option, - pub import_id: Option, - - pub account: Option, - pub payee: Option, - pub total_amount: i64, - pub reimbursed: bool, - pub selected: bool, -} - -impl Transaction { - pub fn from_transaction( - t: &ynab_api::models::TransactionSummary, - ) -> Self { - let reimbursed = if let Some(color) = &t.flag_color { - color == "green" - } else { - false - }; - Self { - id: t.id.clone(), - date: t.date.clone(), - amount: t.amount, - memo: t.memo.clone(), - cleared: t.cleared.clone(), - approved: t.approved, - flag_color: t.flag_color.clone(), - account_id: t.account_id.clone(), - payee_id: t.payee_id.clone(), - category_id: t.category_id.clone(), - import_id: t.import_id.clone(), - - account: None, - payee: None, - total_amount: t.amount, - reimbursed, - selected: false, - } - } - - pub fn from_sub_transaction( - t: &ynab_api::models::TransactionSummary, - st: &ynab_api::models::SubTransaction, - ) -> Self { - let reimbursed = if let Some(color) = &t.flag_color { - color == "green" - } else { - false - }; - Self { - id: t.id.clone(), - date: t.date.clone(), - amount: st.amount, - memo: t.memo.clone(), - cleared: t.cleared.clone(), - approved: t.approved, - flag_color: t.flag_color.clone(), - account_id: t.account_id.clone(), - payee_id: t.payee_id.clone(), - category_id: t.category_id.clone(), - import_id: t.import_id.clone(), - - account: None, - payee: None, - total_amount: t.amount, - reimbursed, - selected: false, - } - } - - pub fn to_update_transaction( - &self, - ) -> ynab_api::models::UpdateTransaction { - let mut ut = ynab_api::models::UpdateTransaction::new( - self.account_id.clone(), - self.date.clone(), - self.amount, - ); - ut.id = Some(self.id.clone()); - ut.payee_id = self.payee_id.clone(); - ut.category_id = self.category_id.clone(); - ut.memo = self.memo.clone(); - ut.cleared = Some(self.cleared.clone()); - ut.approved = Some(self.approved); - ut.flag_color = self.flag_color.clone(); - ut.import_id = self.import_id.clone(); - - ut - } -} diff --git a/src/ynab/util.rs b/src/ynab/util.rs deleted file mode 100644 index af8a8d1..0000000 --- a/src/ynab/util.rs +++ /dev/null @@ -1,6 +0,0 @@ -pub fn format_amount(amount: i64) -> String { - let dollars = amount.abs() / 1000; - let cents = (amount.abs() % 1000) / 10; - let sign = if amount < 0 { "-" } else { "" }; - format!("${}{}.{:02}", sign, dollars, cents) -} diff --git a/ynab-api/.gitignore b/ynab-api/.gitignore deleted file mode 100644 index 6aa1064..0000000 --- a/ynab-api/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/target/ -**/*.rs.bk -Cargo.lock diff --git a/ynab-api/.openapi-generator-ignore b/ynab-api/.openapi-generator-ignore deleted file mode 100644 index 7484ee5..0000000 --- a/ynab-api/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# 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 OpenAPI Generator 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/.openapi-generator/VERSION b/ynab-api/.openapi-generator/VERSION deleted file mode 100644 index aa31e71..0000000 --- a/ynab-api/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -4.0.3 \ No newline at end of file diff --git a/ynab-api/.travis.yml b/ynab-api/.travis.yml deleted file mode 100644 index 22761ba..0000000 --- a/ynab-api/.travis.yml +++ /dev/null @@ -1 +0,0 @@ -language: rust diff --git a/ynab-api/Cargo.toml b/ynab-api/Cargo.toml deleted file mode 100644 index cbe32f4..0000000 --- a/ynab-api/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "ynab-api" -version = "1.0.0" -authors = ["OpenAPI Generator team and contributors"] - -[dependencies] -serde = "^1.0" -serde_derive = "^1.0" -serde_json = "^1.0" -url = "1.5" -reqwest = "~0.9" - -[dev-dependencies] diff --git a/ynab-api/README.md b/ynab-api/README.md deleted file mode 100644 index 77efbeb..0000000 --- a/ynab-api/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Rust API client for openapi - -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 - -## Overview - -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.RustClientCodegen - -## Installation - -Put the package under your project folder and add the following to `Cargo.toml` under `[dependencies]`: - -``` - openapi = { path = "./generated" } -``` - -## 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_budget_settings_by_id**](docs/BudgetsApi.md#get_budget_settings_by_id) | **get** /budgets/{budget_id}/settings | Budget Settings -*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 -*CategoriesApi* | [**get_month_category_by_id**](docs/CategoriesApi.md#get_month_category_by_id) | **get** /budgets/{budget_id}/months/{month}/categories/{category_id} | Single category for a specific budget month -*CategoriesApi* | [**update_month_category**](docs/CategoriesApi.md#update_month_category) | **patch** /budgets/{budget_id}/months/{month}/categories/{category_id} | Update a category for a specific month -*DeprecatedApi* | [**bulk_create_transactions**](docs/DeprecatedApi.md#bulk_create_transactions) | **post** /budgets/{budget_id}/transactions/bulk | Bulk create transactions -*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* | [**create_transaction**](docs/TransactionsApi.md#create_transaction) | **post** /budgets/{budget_id}/transactions | Create a single transaction or multiple transactions -*TransactionsApi* | [**get_transaction_by_id**](docs/TransactionsApi.md#get_transaction_by_id) | **get** /budgets/{budget_id}/transactions/{transaction_id} | Single 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_payee**](docs/TransactionsApi.md#get_transactions_by_payee) | **get** /budgets/{budget_id}/payees/{payee_id}/transactions | List payee transactions -*TransactionsApi* | [**update_transaction**](docs/TransactionsApi.md#update_transaction) | **put** /budgets/{budget_id}/transactions/{transaction_id} | Updates an existing transaction -*TransactionsApi* | [**update_transactions**](docs/TransactionsApi.md#update_transactions) | **patch** /budgets/{budget_id}/transactions | Update multiple transactions -*UserApi* | [**get_user**](docs/UserApi.md#get_user) | **get** /user | User info - - -## Documentation For Models - - - [Account](docs/Account.md) - - [AccountResponse](docs/AccountResponse.md) - - [AccountResponseData](docs/AccountResponseData.md) - - [AccountsResponse](docs/AccountsResponse.md) - - [AccountsResponseData](docs/AccountsResponseData.md) - - [BudgetDetail](docs/BudgetDetail.md) - - [BudgetDetailAllOf](docs/BudgetDetailAllOf.md) - - [BudgetDetailResponse](docs/BudgetDetailResponse.md) - - [BudgetDetailResponseData](docs/BudgetDetailResponseData.md) - - [BudgetSettings](docs/BudgetSettings.md) - - [BudgetSettingsResponse](docs/BudgetSettingsResponse.md) - - [BudgetSettingsResponseData](docs/BudgetSettingsResponseData.md) - - [BudgetSummary](docs/BudgetSummary.md) - - [BudgetSummaryResponse](docs/BudgetSummaryResponse.md) - - [BudgetSummaryResponseData](docs/BudgetSummaryResponseData.md) - - [BulkResponse](docs/BulkResponse.md) - - [BulkResponseData](docs/BulkResponseData.md) - - [BulkResponseDataBulk](docs/BulkResponseDataBulk.md) - - [BulkTransactions](docs/BulkTransactions.md) - - [CategoriesResponse](docs/CategoriesResponse.md) - - [CategoriesResponseData](docs/CategoriesResponseData.md) - - [Category](docs/Category.md) - - [CategoryGroup](docs/CategoryGroup.md) - - [CategoryGroupWithCategories](docs/CategoryGroupWithCategories.md) - - [CategoryGroupWithCategoriesAllOf](docs/CategoryGroupWithCategoriesAllOf.md) - - [CategoryResponse](docs/CategoryResponse.md) - - [CategoryResponseData](docs/CategoryResponseData.md) - - [CurrencyFormat](docs/CurrencyFormat.md) - - [DateFormat](docs/DateFormat.md) - - [ErrorDetail](docs/ErrorDetail.md) - - [ErrorResponse](docs/ErrorResponse.md) - - [HybridTransaction](docs/HybridTransaction.md) - - [HybridTransactionAllOf](docs/HybridTransactionAllOf.md) - - [HybridTransactionsResponse](docs/HybridTransactionsResponse.md) - - [HybridTransactionsResponseData](docs/HybridTransactionsResponseData.md) - - [MonthDetail](docs/MonthDetail.md) - - [MonthDetailAllOf](docs/MonthDetailAllOf.md) - - [MonthDetailResponse](docs/MonthDetailResponse.md) - - [MonthDetailResponseData](docs/MonthDetailResponseData.md) - - [MonthSummariesResponse](docs/MonthSummariesResponse.md) - - [MonthSummariesResponseData](docs/MonthSummariesResponseData.md) - - [MonthSummary](docs/MonthSummary.md) - - [Payee](docs/Payee.md) - - [PayeeLocation](docs/PayeeLocation.md) - - [PayeeLocationResponse](docs/PayeeLocationResponse.md) - - [PayeeLocationResponseData](docs/PayeeLocationResponseData.md) - - [PayeeLocationsResponse](docs/PayeeLocationsResponse.md) - - [PayeeLocationsResponseData](docs/PayeeLocationsResponseData.md) - - [PayeeResponse](docs/PayeeResponse.md) - - [PayeeResponseData](docs/PayeeResponseData.md) - - [PayeesResponse](docs/PayeesResponse.md) - - [PayeesResponseData](docs/PayeesResponseData.md) - - [SaveCategoryResponse](docs/SaveCategoryResponse.md) - - [SaveCategoryResponseData](docs/SaveCategoryResponseData.md) - - [SaveMonthCategory](docs/SaveMonthCategory.md) - - [SaveMonthCategoryWrapper](docs/SaveMonthCategoryWrapper.md) - - [SaveTransaction](docs/SaveTransaction.md) - - [SaveTransactionWrapper](docs/SaveTransactionWrapper.md) - - [SaveTransactionsResponse](docs/SaveTransactionsResponse.md) - - [SaveTransactionsResponseData](docs/SaveTransactionsResponseData.md) - - [SaveTransactionsWrapper](docs/SaveTransactionsWrapper.md) - - [ScheduledSubTransaction](docs/ScheduledSubTransaction.md) - - [ScheduledTransactionDetail](docs/ScheduledTransactionDetail.md) - - [ScheduledTransactionDetailAllOf](docs/ScheduledTransactionDetailAllOf.md) - - [ScheduledTransactionResponse](docs/ScheduledTransactionResponse.md) - - [ScheduledTransactionResponseData](docs/ScheduledTransactionResponseData.md) - - [ScheduledTransactionSummary](docs/ScheduledTransactionSummary.md) - - [ScheduledTransactionsResponse](docs/ScheduledTransactionsResponse.md) - - [ScheduledTransactionsResponseData](docs/ScheduledTransactionsResponseData.md) - - [SubTransaction](docs/SubTransaction.md) - - [TransactionDetail](docs/TransactionDetail.md) - - [TransactionDetailAllOf](docs/TransactionDetailAllOf.md) - - [TransactionResponse](docs/TransactionResponse.md) - - [TransactionResponseData](docs/TransactionResponseData.md) - - [TransactionSummary](docs/TransactionSummary.md) - - [TransactionsResponse](docs/TransactionsResponse.md) - - [TransactionsResponseData](docs/TransactionsResponseData.md) - - [UpdateTransaction](docs/UpdateTransaction.md) - - [UpdateTransactionWrapper](docs/UpdateTransactionWrapper.md) - - [UpdateTransactionsResponse](docs/UpdateTransactionsResponse.md) - - [UpdateTransactionsWrapper](docs/UpdateTransactionsWrapper.md) - - [User](docs/User.md) - - [UserResponse](docs/UserResponse.md) - - [UserResponseData](docs/UserResponseData.md) - - -To get access to the crate's generated documentation, use: - -``` -cargo doc --open -``` - -## Author - - - diff --git a/ynab-api/docs/Account.md b/ynab-api/docs/Account.md deleted file mode 100644 index 265294b..0000000 --- a/ynab-api/docs/Account.md +++ /dev/null @@ -1,21 +0,0 @@ -# Account - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | | -**name** | **String** | | -**_type** | **String** | The type of account. Note: payPal, merchantAccount, investmentAccount, and mortgage types have been deprecated and will be removed in the future. | -**on_budget** | **bool** | Whether this account is on budget or not | -**closed** | **bool** | Whether this account is closed or not | -**note** | **String** | | [optional] -**balance** | **i64** | The current balance of the account in milliunits format | -**cleared_balance** | **i64** | The current cleared balance of the account in milliunits format | -**uncleared_balance** | **i64** | The current uncleared balance of the account in milliunits format | -**transfer_payee_id** | **String** | The payee id which should be used when transferring to this account | -**deleted** | **bool** | Whether or not the account has been deleted. Deleted accounts will only be included in delta requests. | - -[[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 deleted file mode 100644 index eb39808..0000000 --- a/ynab-api/docs/AccountResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# AccountResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [***::models::AccountResponseData**](AccountResponse_data.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/AccountResponseData.md b/ynab-api/docs/AccountResponseData.md deleted file mode 100644 index d437a2f..0000000 --- a/ynab-api/docs/AccountResponseData.md +++ /dev/null @@ -1,11 +0,0 @@ -# AccountResponseData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account** | [***::models::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 deleted file mode 100644 index 98270b9..0000000 --- a/ynab-api/docs/AccountsApi.md +++ /dev/null @@ -1,83 +0,0 @@ -# \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 - -> ::models::AccountResponse get_account_by_id(ctx, budget_id, account_id) -Single account - -Returns a single account - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **account_id** | [**String**](.md)| The id of the account | - -### Return type - -[**::models::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 - -> ::models::AccountsResponse get_accounts(ctx, budget_id, optional) -Account list - -Returns all accounts - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **optional** | **map[string]interface{}** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a map[string]interface{}. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | - -### Return type - -[**::models::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 deleted file mode 100644 index 6dc10dd..0000000 --- a/ynab-api/docs/AccountsResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# AccountsResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [***::models::AccountsResponseData**](AccountsResponse_data.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/AccountsResponseData.md b/ynab-api/docs/AccountsResponseData.md deleted file mode 100644 index 968cad8..0000000 --- a/ynab-api/docs/AccountsResponseData.md +++ /dev/null @@ -1,12 +0,0 @@ -# AccountsResponseData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**accounts** | [**Vec<::models::Account>**](Account.md) | | -**server_knowledge** | **i64** | 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/BudgetDetail.md b/ynab-api/docs/BudgetDetail.md deleted file mode 100644 index 3dac64b..0000000 --- a/ynab-api/docs/BudgetDetail.md +++ /dev/null @@ -1,27 +0,0 @@ -# BudgetDetail - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | | -**name** | **String** | | -**last_modified_on** | **String** | The last time any changes were made to the budget from either a web or mobile client | [optional] -**first_month** | [***String**](string.md) | The earliest budget month | [optional] -**last_month** | [***String**](string.md) | The latest budget month | [optional] -**date_format** | [***::models::DateFormat**](DateFormat.md) | | [optional] -**currency_format** | [***::models::CurrencyFormat**](CurrencyFormat.md) | | [optional] -**accounts** | [**Vec<::models::Account>**](Account.md) | | [optional] -**payees** | [**Vec<::models::Payee>**](Payee.md) | | [optional] -**payee_locations** | [**Vec<::models::PayeeLocation>**](PayeeLocation.md) | | [optional] -**category_groups** | [**Vec<::models::CategoryGroup>**](CategoryGroup.md) | | [optional] -**categories** | [**Vec<::models::Category>**](Category.md) | | [optional] -**months** | [**Vec<::models::MonthDetail>**](MonthDetail.md) | | [optional] -**transactions** | [**Vec<::models::TransactionSummary>**](TransactionSummary.md) | | [optional] -**subtransactions** | [**Vec<::models::SubTransaction>**](SubTransaction.md) | | [optional] -**scheduled_transactions** | [**Vec<::models::ScheduledTransactionSummary>**](ScheduledTransactionSummary.md) | | [optional] -**scheduled_subtransactions** | [**Vec<::models::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/BudgetDetailAllOf.md b/ynab-api/docs/BudgetDetailAllOf.md deleted file mode 100644 index f5df347..0000000 --- a/ynab-api/docs/BudgetDetailAllOf.md +++ /dev/null @@ -1,20 +0,0 @@ -# BudgetDetailAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**accounts** | [**Vec<::models::Account>**](Account.md) | | [optional] -**payees** | [**Vec<::models::Payee>**](Payee.md) | | [optional] -**payee_locations** | [**Vec<::models::PayeeLocation>**](PayeeLocation.md) | | [optional] -**category_groups** | [**Vec<::models::CategoryGroup>**](CategoryGroup.md) | | [optional] -**categories** | [**Vec<::models::Category>**](Category.md) | | [optional] -**months** | [**Vec<::models::MonthDetail>**](MonthDetail.md) | | [optional] -**transactions** | [**Vec<::models::TransactionSummary>**](TransactionSummary.md) | | [optional] -**subtransactions** | [**Vec<::models::SubTransaction>**](SubTransaction.md) | | [optional] -**scheduled_transactions** | [**Vec<::models::ScheduledTransactionSummary>**](ScheduledTransactionSummary.md) | | [optional] -**scheduled_subtransactions** | [**Vec<::models::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 deleted file mode 100644 index 97cc82e..0000000 --- a/ynab-api/docs/BudgetDetailResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# BudgetDetailResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [***::models::BudgetDetailResponseData**](BudgetDetailResponse_data.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/BudgetDetailResponseData.md b/ynab-api/docs/BudgetDetailResponseData.md deleted file mode 100644 index 8697aae..0000000 --- a/ynab-api/docs/BudgetDetailResponseData.md +++ /dev/null @@ -1,12 +0,0 @@ -# BudgetDetailResponseData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**budget** | [***::models::BudgetDetail**](BudgetDetail.md) | | -**server_knowledge** | **i64** | 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/BudgetSettings.md b/ynab-api/docs/BudgetSettings.md deleted file mode 100644 index b0604b4..0000000 --- a/ynab-api/docs/BudgetSettings.md +++ /dev/null @@ -1,12 +0,0 @@ -# BudgetSettings - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**date_format** | [***::models::DateFormat**](DateFormat.md) | | -**currency_format** | [***::models::CurrencyFormat**](CurrencyFormat.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/BudgetSettingsResponse.md b/ynab-api/docs/BudgetSettingsResponse.md deleted file mode 100644 index ee92163..0000000 --- a/ynab-api/docs/BudgetSettingsResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# BudgetSettingsResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [***::models::BudgetSettingsResponseData**](BudgetSettingsResponse_data.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/BudgetSettingsResponseData.md b/ynab-api/docs/BudgetSettingsResponseData.md deleted file mode 100644 index 3d2c4cc..0000000 --- a/ynab-api/docs/BudgetSettingsResponseData.md +++ /dev/null @@ -1,11 +0,0 @@ -# BudgetSettingsResponseData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**settings** | [***::models::BudgetSettings**](BudgetSettings.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/BudgetSummary.md b/ynab-api/docs/BudgetSummary.md deleted file mode 100644 index f2e444b..0000000 --- a/ynab-api/docs/BudgetSummary.md +++ /dev/null @@ -1,17 +0,0 @@ -# BudgetSummary - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | | -**name** | **String** | | -**last_modified_on** | **String** | The last time any changes were made to the budget from either a web or mobile client | [optional] -**first_month** | [***String**](string.md) | The earliest budget month | [optional] -**last_month** | [***String**](string.md) | The latest budget month | [optional] -**date_format** | [***::models::DateFormat**](DateFormat.md) | | [optional] -**currency_format** | [***::models::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 deleted file mode 100644 index 5b029dd..0000000 --- a/ynab-api/docs/BudgetSummaryResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# BudgetSummaryResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [***::models::BudgetSummaryResponseData**](BudgetSummaryResponse_data.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/BudgetSummaryResponseData.md b/ynab-api/docs/BudgetSummaryResponseData.md deleted file mode 100644 index 2836bfa..0000000 --- a/ynab-api/docs/BudgetSummaryResponseData.md +++ /dev/null @@ -1,12 +0,0 @@ -# BudgetSummaryResponseData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**budgets** | [**Vec<::models::BudgetSummary>**](BudgetSummary.md) | | -**default_budget** | [***::models::BudgetSummary**](BudgetSummary.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/BudgetsApi.md b/ynab-api/docs/BudgetsApi.md deleted file mode 100644 index 563b754..0000000 --- a/ynab-api/docs/BudgetsApi.md +++ /dev/null @@ -1,110 +0,0 @@ -# \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_budget_settings_by_id**](BudgetsApi.md#get_budget_settings_by_id) | **get** /budgets/{budget_id}/settings | Budget Settings -[**get_budgets**](BudgetsApi.md#get_budgets) | **get** /budgets | List budgets - - - -## get_budget_by_id - -> ::models::BudgetDetailResponse get_budget_by_id(ctx, budget_id, optional) -Single budget - -Returns a single budget with all related entities. This resource is effectively a full budget export. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **optional** | **map[string]interface{}** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a map[string]interface{}. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | - -### Return type - -[**::models::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_budget_settings_by_id - -> ::models::BudgetSettingsResponse get_budget_settings_by_id(ctx, budget_id) -Budget Settings - -Returns settings for a budget - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - -### Return type - -[**::models::BudgetSettingsResponse**](BudgetSettingsResponse.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 - -> ::models::BudgetSummaryResponse get_budgets(ctx, ) -List budgets - -Returns budgets list with summary information - -### Required Parameters - -This endpoint does not need any parameter. - -### Return type - -[**::models::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/BulkResponse.md b/ynab-api/docs/BulkResponse.md deleted file mode 100644 index 009e60c..0000000 --- a/ynab-api/docs/BulkResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# BulkResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [***::models::BulkResponseData**](BulkResponse_data.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/BulkResponseData.md b/ynab-api/docs/BulkResponseData.md deleted file mode 100644 index 82fef82..0000000 --- a/ynab-api/docs/BulkResponseData.md +++ /dev/null @@ -1,11 +0,0 @@ -# BulkResponseData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bulk** | [***::models::BulkResponseDataBulk**](BulkResponse_data_bulk.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/BulkResponseDataBulk.md b/ynab-api/docs/BulkResponseDataBulk.md deleted file mode 100644 index 97ff1dc..0000000 --- a/ynab-api/docs/BulkResponseDataBulk.md +++ /dev/null @@ -1,12 +0,0 @@ -# BulkResponseDataBulk - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**transaction_ids** | **Vec** | The list of Transaction ids that were created. | -**duplicate_import_ids** | **Vec** | 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/BulkTransactions.md b/ynab-api/docs/BulkTransactions.md deleted file mode 100644 index dc990e4..0000000 --- a/ynab-api/docs/BulkTransactions.md +++ /dev/null @@ -1,11 +0,0 @@ -# BulkTransactions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**transactions** | [**Vec<::models::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 deleted file mode 100644 index 00294b8..0000000 --- a/ynab-api/docs/CategoriesApi.md +++ /dev/null @@ -1,152 +0,0 @@ -# \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_month_category_by_id**](CategoriesApi.md#get_month_category_by_id) | **get** /budgets/{budget_id}/months/{month}/categories/{category_id} | Single category for a specific budget month -[**update_month_category**](CategoriesApi.md#update_month_category) | **patch** /budgets/{budget_id}/months/{month}/categories/{category_id} | Update a category for a specific month - - - -## get_categories - -> ::models::CategoriesResponse get_categories(ctx, budget_id, optional) -List categories - -Returns all categories grouped by category group. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC). - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **optional** | **map[string]interface{}** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a map[string]interface{}. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | - -### Return type - -[**::models::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 - -> ::models::CategoryResponse get_category_by_id(ctx, budget_id, category_id) -Single category - -Returns a single category. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC). - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **category_id** | **String**| The id of the category | - -### Return type - -[**::models::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) - - -## get_month_category_by_id - -> ::models::CategoryResponse get_month_category_by_id(ctx, budget_id, month, category_id) -Single category for a specific budget month - -Returns a single category for a specific budget month. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC). - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **month** | **String**| The budget month in ISO format (e.g. 2016-12-01) (\"current\" can also be used to specify the current calendar month (UTC)) | - **category_id** | **String**| The id of the category | - -### Return type - -[**::models::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) - - -## update_month_category - -> ::models::SaveCategoryResponse update_month_category(ctx, budget_id, month, category_id, data) -Update a category for a specific month - -Update a category for a specific month - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **month** | **String**| The budget month in ISO format (e.g. 2016-12-01) (\"current\" can also be used to specify the current calendar month (UTC)) | - **category_id** | **String**| The id of the category | - **data** | [**SaveMonthCategoryWrapper**](SaveMonthCategoryWrapper.md)| The category to update | - -### Return type - -[**::models::SaveCategoryResponse**](SaveCategoryResponse.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 deleted file mode 100644 index e760b74..0000000 --- a/ynab-api/docs/CategoriesResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# CategoriesResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [***::models::CategoriesResponseData**](CategoriesResponse_data.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/CategoriesResponseData.md b/ynab-api/docs/CategoriesResponseData.md deleted file mode 100644 index 766aae4..0000000 --- a/ynab-api/docs/CategoriesResponseData.md +++ /dev/null @@ -1,12 +0,0 @@ -# CategoriesResponseData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**category_groups** | [**Vec<::models::CategoryGroupWithCategories>**](CategoryGroupWithCategories.md) | | -**server_knowledge** | **i64** | 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/Category.md b/ynab-api/docs/Category.md deleted file mode 100644 index 217979b..0000000 --- a/ynab-api/docs/Category.md +++ /dev/null @@ -1,25 +0,0 @@ -# Category - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | | -**category_group_id** | **String** | | -**name** | **String** | | -**hidden** | **bool** | Whether or not the category is hidden | -**original_category_group_id** | **String** | If category is hidden this is the id of the category group it originally belonged to before it was hidden. | [optional] -**note** | **String** | | [optional] -**budgeted** | **i64** | Budgeted amount in milliunits format | -**activity** | **i64** | Activity amount in milliunits format | -**balance** | **i64** | Balance in milliunits format | -**goal_type** | **String** | The type of goal, if the cagegory has a goal (TB=Target Category Balance, TBD=Target Category Balance by Date, MF=Monthly Funding) | [optional] -**goal_creation_month** | [***String**](string.md) | The month a goal was created | [optional] -**goal_target** | **i64** | The goal target amount in milliunits | -**goal_target_month** | [***String**](string.md) | If the goal type is 'TBD' (Target Category Balance by Date), this is the target month for the goal to be completed | [optional] -**goal_percentage_complete** | **i32** | The percentage completion of the goal | [optional] -**deleted** | **bool** | Whether or not the category has been deleted. Deleted categories will only be included in delta requests. | - -[[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 deleted file mode 100644 index 498f3c5..0000000 --- a/ynab-api/docs/CategoryGroup.md +++ /dev/null @@ -1,14 +0,0 @@ -# CategoryGroup - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | | -**name** | **String** | | -**hidden** | **bool** | Whether or not the category group is hidden | -**deleted** | **bool** | Whether or not the category group has been deleted. Deleted category groups will only be included in delta requests. | - -[[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 deleted file mode 100644 index c1355c2..0000000 --- a/ynab-api/docs/CategoryGroupWithCategories.md +++ /dev/null @@ -1,15 +0,0 @@ -# CategoryGroupWithCategories - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | | -**name** | **String** | | -**hidden** | **bool** | Whether or not the category group is hidden | -**deleted** | **bool** | Whether or not the category group has been deleted. Deleted category groups will only be included in delta requests. | -**categories** | [**Vec<::models::Category>**](Category.md) | Category group categories. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC). | - -[[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/CategoryGroupWithCategoriesAllOf.md b/ynab-api/docs/CategoryGroupWithCategoriesAllOf.md deleted file mode 100644 index 0a11fb9..0000000 --- a/ynab-api/docs/CategoryGroupWithCategoriesAllOf.md +++ /dev/null @@ -1,11 +0,0 @@ -# CategoryGroupWithCategoriesAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**categories** | [**Vec<::models::Category>**](Category.md) | Category group categories. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC). | - -[[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 deleted file mode 100644 index efe3d40..0000000 --- a/ynab-api/docs/CategoryResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# CategoryResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [***::models::CategoryResponseData**](CategoryResponse_data.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/CategoryResponseData.md b/ynab-api/docs/CategoryResponseData.md deleted file mode 100644 index 187bf07..0000000 --- a/ynab-api/docs/CategoryResponseData.md +++ /dev/null @@ -1,11 +0,0 @@ -# CategoryResponseData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**category** | [***::models::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 deleted file mode 100644 index 98cd6fd..0000000 --- a/ynab-api/docs/CurrencyFormat.md +++ /dev/null @@ -1,18 +0,0 @@ -# CurrencyFormat - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**iso_code** | **String** | | -**example_format** | **String** | | -**decimal_digits** | **i32** | | -**decimal_separator** | **String** | | -**symbol_first** | **bool** | | -**group_separator** | **String** | | -**currency_symbol** | **String** | | -**display_symbol** | **bool** | | - -[[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 deleted file mode 100644 index 53add08..0000000 --- a/ynab-api/docs/DateFormat.md +++ /dev/null @@ -1,11 +0,0 @@ -# DateFormat - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**format** | **String** | | - -[[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/DeprecatedApi.md b/ynab-api/docs/DeprecatedApi.md deleted file mode 100644 index 85bdc80..0000000 --- a/ynab-api/docs/DeprecatedApi.md +++ /dev/null @@ -1,41 +0,0 @@ -# \DeprecatedApi - -All URIs are relative to *https://api.youneedabudget.com/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**bulk_create_transactions**](DeprecatedApi.md#bulk_create_transactions) | **post** /budgets/{budget_id}/transactions/bulk | Bulk create transactions - - - -## bulk_create_transactions - -> ::models::BulkResponse bulk_create_transactions(ctx, budget_id, transactions) -Bulk create transactions - -Creates multiple transactions. Although this endpoint is still supported, it is recommended to use 'POST /budgets/{budget_id}/transactions' to create multiple transactions. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **transactions** | [**BulkTransactions**](BulkTransactions.md)| The list of transactions to create | - -### Return type - -[**::models::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) - diff --git a/ynab-api/docs/ErrorDetail.md b/ynab-api/docs/ErrorDetail.md deleted file mode 100644 index dd6d022..0000000 --- a/ynab-api/docs/ErrorDetail.md +++ /dev/null @@ -1,13 +0,0 @@ -# ErrorDetail - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | | -**name** | **String** | | -**detail** | **String** | | - -[[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 deleted file mode 100644 index 382b263..0000000 --- a/ynab-api/docs/ErrorResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# ErrorResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | [***::models::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/HybridTransaction.md b/ynab-api/docs/HybridTransaction.md deleted file mode 100644 index c168944..0000000 --- a/ynab-api/docs/HybridTransaction.md +++ /dev/null @@ -1,30 +0,0 @@ -# HybridTransaction - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | | -**date** | [***String**](string.md) | The transaction date in ISO format (e.g. 2016-12-01) | -**amount** | **i64** | The transaction amount in milliunits format | -**memo** | **String** | | [optional] -**cleared** | **String** | The cleared status of the transaction | -**approved** | **bool** | Whether or not the transaction is approved | -**flag_color** | **String** | The transaction flag | [optional] -**account_id** | **String** | | -**payee_id** | **String** | | [optional] -**category_id** | **String** | | [optional] -**transfer_account_id** | **String** | If a transfer transaction, the account to which it transfers | [optional] -**transfer_transaction_id** | **String** | If a transfer transaction, the id of transaction on the other side of the transfer | [optional] -**matched_transaction_id** | **String** | If transaction is matched, the id of the matched transaction | [optional] -**import_id** | **String** | If the Transaction was imported, this field is a unique (by account) import identifier. If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. | [optional] -**deleted** | **bool** | Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests. | -**_type** | **String** | Whether the hybrid transaction represents a regular transaction or a subtransaction | -**parent_transaction_id** | **String** | For subtransaction types, this is the id of the pararent transaction. For transaction types, this id will be always be null. | [optional] -**account_name** | **String** | | -**payee_name** | **String** | | [optional] -**category_name** | **String** | | - -[[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/HybridTransactionAllOf.md b/ynab-api/docs/HybridTransactionAllOf.md deleted file mode 100644 index af38160..0000000 --- a/ynab-api/docs/HybridTransactionAllOf.md +++ /dev/null @@ -1,15 +0,0 @@ -# HybridTransactionAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_type** | **String** | Whether the hybrid transaction represents a regular transaction or a subtransaction | -**parent_transaction_id** | **String** | For subtransaction types, this is the id of the pararent transaction. For transaction types, this id will be always be null. | [optional] -**account_name** | **String** | | -**payee_name** | **String** | | [optional] -**category_name** | **String** | | - -[[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/HybridTransactionsResponse.md b/ynab-api/docs/HybridTransactionsResponse.md deleted file mode 100644 index df8437a..0000000 --- a/ynab-api/docs/HybridTransactionsResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# HybridTransactionsResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [***::models::HybridTransactionsResponseData**](HybridTransactionsResponse_data.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/HybridTransactionsResponseData.md b/ynab-api/docs/HybridTransactionsResponseData.md deleted file mode 100644 index 241e7b6..0000000 --- a/ynab-api/docs/HybridTransactionsResponseData.md +++ /dev/null @@ -1,11 +0,0 @@ -# HybridTransactionsResponseData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**transactions** | [**Vec<::models::HybridTransaction>**](HybridTransaction.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 deleted file mode 100644 index 1d7a22b..0000000 --- a/ynab-api/docs/MonthDetail.md +++ /dev/null @@ -1,19 +0,0 @@ -# MonthDetail - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**month** | [***String**](string.md) | | -**note** | **String** | | [optional] -**income** | **i64** | The total amount in transactions categorized to 'Inflow: To be Budgeted' in the month | -**budgeted** | **i64** | The total amount budgeted in the month | -**activity** | **i64** | The total amount in transactions in the month, excluding those categorized to 'Inflow: To be Budgeted' | -**to_be_budgeted** | **i64** | The available amount for 'To be Budgeted' | -**age_of_money** | **i32** | The Age of Money as of the month | [optional] -**deleted** | **bool** | Whether or not the month has been deleted. Deleted months will only be included in delta requests. | -**categories** | [**Vec<::models::Category>**](Category.md) | The budget month categories. Amounts (budgeted, activity, balance, etc.) are specific to the {month} parameter specified. | - -[[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/MonthDetailAllOf.md b/ynab-api/docs/MonthDetailAllOf.md deleted file mode 100644 index 81da8f5..0000000 --- a/ynab-api/docs/MonthDetailAllOf.md +++ /dev/null @@ -1,11 +0,0 @@ -# MonthDetailAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**categories** | [**Vec<::models::Category>**](Category.md) | The budget month categories. Amounts (budgeted, activity, balance, etc.) are specific to the {month} parameter specified. | - -[[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 deleted file mode 100644 index bfeaae8..0000000 --- a/ynab-api/docs/MonthDetailResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# MonthDetailResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [***::models::MonthDetailResponseData**](MonthDetailResponse_data.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/MonthDetailResponseData.md b/ynab-api/docs/MonthDetailResponseData.md deleted file mode 100644 index 83bab88..0000000 --- a/ynab-api/docs/MonthDetailResponseData.md +++ /dev/null @@ -1,11 +0,0 @@ -# MonthDetailResponseData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**month** | [***::models::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 deleted file mode 100644 index fb7f315..0000000 --- a/ynab-api/docs/MonthSummariesResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# MonthSummariesResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [***::models::MonthSummariesResponseData**](MonthSummariesResponse_data.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/MonthSummariesResponseData.md b/ynab-api/docs/MonthSummariesResponseData.md deleted file mode 100644 index f9907b3..0000000 --- a/ynab-api/docs/MonthSummariesResponseData.md +++ /dev/null @@ -1,12 +0,0 @@ -# MonthSummariesResponseData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**months** | [**Vec<::models::MonthSummary>**](MonthSummary.md) | | -**server_knowledge** | **i64** | 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/MonthSummary.md b/ynab-api/docs/MonthSummary.md deleted file mode 100644 index a78cbfc..0000000 --- a/ynab-api/docs/MonthSummary.md +++ /dev/null @@ -1,18 +0,0 @@ -# MonthSummary - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**month** | [***String**](string.md) | | -**note** | **String** | | [optional] -**income** | **i64** | The total amount in transactions categorized to 'Inflow: To be Budgeted' in the month | -**budgeted** | **i64** | The total amount budgeted in the month | -**activity** | **i64** | The total amount in transactions in the month, excluding those categorized to 'Inflow: To be Budgeted' | -**to_be_budgeted** | **i64** | The available amount for 'To be Budgeted' | -**age_of_money** | **i32** | The Age of Money as of the month | [optional] -**deleted** | **bool** | Whether or not the month has been deleted. Deleted months will only be included in delta requests. | - -[[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 deleted file mode 100644 index 337c03c..0000000 --- a/ynab-api/docs/MonthsApi.md +++ /dev/null @@ -1,83 +0,0 @@ -# \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 - -> ::models::MonthDetailResponse get_budget_month(ctx, budget_id, month) -Single budget month - -Returns a single budget month - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **month** | **String**| The budget month in ISO format (e.g. 2016-12-01) (\"current\" can also be used to specify the current calendar month (UTC)) | - -### Return type - -[**::models::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 - -> ::models::MonthSummariesResponse get_budget_months(ctx, budget_id, optional) -List budget months - -Returns all budget months - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **optional** | **map[string]interface{}** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a map[string]interface{}. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | - -### Return type - -[**::models::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 deleted file mode 100644 index ff886e6..0000000 --- a/ynab-api/docs/Payee.md +++ /dev/null @@ -1,14 +0,0 @@ -# Payee - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | | -**name** | **String** | | -**transfer_account_id** | **String** | If a transfer payee, the account_id to which this payee transfers to | [optional] -**deleted** | **bool** | Whether or not the payee has been deleted. Deleted payees will only be included in delta requests. | - -[[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 deleted file mode 100644 index f73c3be..0000000 --- a/ynab-api/docs/PayeeLocation.md +++ /dev/null @@ -1,15 +0,0 @@ -# PayeeLocation - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | | -**payee_id** | **String** | | -**latitude** | **String** | | -**longitude** | **String** | | -**deleted** | **bool** | Whether or not the payee location has been deleted. Deleted payee locations will only be included in delta requests. | - -[[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 deleted file mode 100644 index b34e691..0000000 --- a/ynab-api/docs/PayeeLocationResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# PayeeLocationResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [***::models::PayeeLocationResponseData**](PayeeLocationResponse_data.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/PayeeLocationResponseData.md b/ynab-api/docs/PayeeLocationResponseData.md deleted file mode 100644 index bba1cb7..0000000 --- a/ynab-api/docs/PayeeLocationResponseData.md +++ /dev/null @@ -1,11 +0,0 @@ -# PayeeLocationResponseData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**payee_location** | [***::models::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 deleted file mode 100644 index e51787a..0000000 --- a/ynab-api/docs/PayeeLocationsApi.md +++ /dev/null @@ -1,106 +0,0 @@ -# \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 - -> ::models::PayeeLocationResponse get_payee_location_by_id(ctx, budget_id, payee_location_id) -Single payee location - -Returns a single payee location - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **payee_location_id** | **String**| id of payee location | - -### Return type - -[**::models::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 - -> ::models::PayeeLocationsResponse get_payee_locations(ctx, budget_id) -List payee locations - -Returns all payee locations - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - -### Return type - -[**::models::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 - -> ::models::PayeeLocationsResponse get_payee_locations_by_payee(ctx, budget_id, payee_id) -List locations for a payee - -Returns all payee locations for the specified payee - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **payee_id** | **String**| id of payee | - -### Return type - -[**::models::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 deleted file mode 100644 index f118e8e..0000000 --- a/ynab-api/docs/PayeeLocationsResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# PayeeLocationsResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [***::models::PayeeLocationsResponseData**](PayeeLocationsResponse_data.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/PayeeLocationsResponseData.md b/ynab-api/docs/PayeeLocationsResponseData.md deleted file mode 100644 index 4ad0748..0000000 --- a/ynab-api/docs/PayeeLocationsResponseData.md +++ /dev/null @@ -1,11 +0,0 @@ -# PayeeLocationsResponseData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**payee_locations** | [**Vec<::models::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 deleted file mode 100644 index 6a38dfd..0000000 --- a/ynab-api/docs/PayeeResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# PayeeResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [***::models::PayeeResponseData**](PayeeResponse_data.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/PayeeResponseData.md b/ynab-api/docs/PayeeResponseData.md deleted file mode 100644 index 9618470..0000000 --- a/ynab-api/docs/PayeeResponseData.md +++ /dev/null @@ -1,11 +0,0 @@ -# PayeeResponseData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**payee** | [***::models::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 deleted file mode 100644 index 173c79d..0000000 --- a/ynab-api/docs/PayeesApi.md +++ /dev/null @@ -1,83 +0,0 @@ -# \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 - -> ::models::PayeeResponse get_payee_by_id(ctx, budget_id, payee_id) -Single payee - -Returns single payee - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **payee_id** | **String**| The id of the payee | - -### Return type - -[**::models::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 - -> ::models::PayeesResponse get_payees(ctx, budget_id, optional) -List payees - -Returns all payees - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **optional** | **map[string]interface{}** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a map[string]interface{}. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | - -### Return type - -[**::models::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 deleted file mode 100644 index 18bd7d2..0000000 --- a/ynab-api/docs/PayeesResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# PayeesResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [***::models::PayeesResponseData**](PayeesResponse_data.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/PayeesResponseData.md b/ynab-api/docs/PayeesResponseData.md deleted file mode 100644 index c3a5518..0000000 --- a/ynab-api/docs/PayeesResponseData.md +++ /dev/null @@ -1,12 +0,0 @@ -# PayeesResponseData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**payees** | [**Vec<::models::Payee>**](Payee.md) | | -**server_knowledge** | **i64** | 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/SaveCategoryResponse.md b/ynab-api/docs/SaveCategoryResponse.md deleted file mode 100644 index 64a832f..0000000 --- a/ynab-api/docs/SaveCategoryResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# SaveCategoryResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [***::models::SaveCategoryResponseData**](SaveCategoryResponse_data.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/SaveCategoryResponseData.md b/ynab-api/docs/SaveCategoryResponseData.md deleted file mode 100644 index 941f72f..0000000 --- a/ynab-api/docs/SaveCategoryResponseData.md +++ /dev/null @@ -1,12 +0,0 @@ -# SaveCategoryResponseData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**category** | [***::models::Category**](Category.md) | | -**server_knowledge** | **i64** | 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/SaveMonthCategory.md b/ynab-api/docs/SaveMonthCategory.md deleted file mode 100644 index 1c4abb9..0000000 --- a/ynab-api/docs/SaveMonthCategory.md +++ /dev/null @@ -1,11 +0,0 @@ -# SaveMonthCategory - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**budgeted** | **i64** | Budgeted 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/SaveMonthCategoryWrapper.md b/ynab-api/docs/SaveMonthCategoryWrapper.md deleted file mode 100644 index 1b7e38a..0000000 --- a/ynab-api/docs/SaveMonthCategoryWrapper.md +++ /dev/null @@ -1,11 +0,0 @@ -# SaveMonthCategoryWrapper - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**category** | [***::models::SaveMonthCategory**](SaveMonthCategory.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 deleted file mode 100644 index dabee87..0000000 --- a/ynab-api/docs/SaveTransaction.md +++ /dev/null @@ -1,21 +0,0 @@ -# SaveTransaction - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account_id** | **String** | | -**date** | [***String**](string.md) | The transaction date in ISO format (e.g. 2016-12-01). Future dates (scheduled transactions) are not permitted. Split transaction dates cannot be changed and if a different date is supplied it will be ignored. | -**amount** | **i64** | The transaction amount in milliunits format. Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored. | -**payee_id** | **String** | The payee for the transaction | [optional] -**payee_name** | **String** | The payee name. If a payee_name value is provided and payee_id has a null value, the payee_name value will be used to resolve the payee by either (1) a matching payee rename rule (only if import_id is also specified) or (2) a payee with the same name or (3) creation of a new payee. | [optional] -**category_id** | **String** | The category for the transaction. Split and Credit Card Payment categories are not permitted and will be ignored if supplied. If an existing transaction has a Split category it cannot be changed. | [optional] -**memo** | **String** | | [optional] -**cleared** | **String** | 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] -**flag_color** | **String** | The transaction flag | [optional] -**import_id** | **String** | If specified, the new transaction will be assigned this import_id and considered \"imported\". *At the time of import* we will attempt to match \"imported\" transactions with non-imported (i.e. \"user-entered\") transactions.

Transactions imported through File Based Import or Direct Import (not through the API) are assigned an import_id in the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. Using a consistent format will prevent duplicates through Direct Import and File Based Import.

If import_id is omitted or specified as null, the transaction will be treated as a \"user-entered\" transaction. As such, it will be eligible to be matched against transactions later being imported (via DI, FBI, or API). | [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 deleted file mode 100644 index a9f3fcc..0000000 --- a/ynab-api/docs/SaveTransactionWrapper.md +++ /dev/null @@ -1,11 +0,0 @@ -# SaveTransactionWrapper - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**transaction** | [***::models::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/SaveTransactionsResponse.md b/ynab-api/docs/SaveTransactionsResponse.md deleted file mode 100644 index 0458ef6..0000000 --- a/ynab-api/docs/SaveTransactionsResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# SaveTransactionsResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [***::models::SaveTransactionsResponseData**](SaveTransactionsResponse_data.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/SaveTransactionsResponseData.md b/ynab-api/docs/SaveTransactionsResponseData.md deleted file mode 100644 index 8617702..0000000 --- a/ynab-api/docs/SaveTransactionsResponseData.md +++ /dev/null @@ -1,15 +0,0 @@ -# SaveTransactionsResponseData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**transaction_ids** | **Vec** | The transaction ids that were saved | -**transaction** | [***::models::TransactionDetail**](TransactionDetail.md) | | [optional] -**transactions** | [**Vec<::models::TransactionDetail>**](TransactionDetail.md) | If multiple transactions were specified, the transactions that were saved | [optional] -**duplicate_import_ids** | **Vec** | If multiple transactions were specified, a list of import_ids that were not created because of an existing import_id found on the same account | [optional] -**server_knowledge** | **i64** | 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/SaveTransactionsWrapper.md b/ynab-api/docs/SaveTransactionsWrapper.md deleted file mode 100644 index d79e4ee..0000000 --- a/ynab-api/docs/SaveTransactionsWrapper.md +++ /dev/null @@ -1,12 +0,0 @@ -# SaveTransactionsWrapper - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**transaction** | [***::models::SaveTransaction**](SaveTransaction.md) | | [optional] -**transactions** | [**Vec<::models::SaveTransaction>**](SaveTransaction.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/ScheduledSubTransaction.md b/ynab-api/docs/ScheduledSubTransaction.md deleted file mode 100644 index 6178bab..0000000 --- a/ynab-api/docs/ScheduledSubTransaction.md +++ /dev/null @@ -1,18 +0,0 @@ -# ScheduledSubTransaction - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | | -**scheduled_transaction_id** | **String** | | -**amount** | **i64** | The scheduled subtransaction amount in milliunits format | -**memo** | **String** | | [optional] -**payee_id** | **String** | | [optional] -**category_id** | **String** | | -**transfer_account_id** | **String** | If a transfer, the account_id which the scheduled subtransaction transfers to | [optional] -**deleted** | **bool** | Whether or not the scheduled subtransaction has been deleted. Deleted scheduled subtransactions will only be included in delta requests. | - -[[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 deleted file mode 100644 index 5f45c7e..0000000 --- a/ynab-api/docs/ScheduledTransactionDetail.md +++ /dev/null @@ -1,26 +0,0 @@ -# ScheduledTransactionDetail - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | | -**date_first** | [***String**](string.md) | The first date for which the Scheduled Transaction was scheduled. | -**date_next** | [***String**](string.md) | The next date for which the Scheduled Transaction is scheduled. | -**frequency** | **String** | | -**amount** | **i64** | The scheduled transaction amount in milliunits format | -**memo** | **String** | | [optional] -**flag_color** | **String** | The scheduled transaction flag | -**account_id** | **String** | | -**payee_id** | **String** | | [optional] -**category_id** | **String** | | -**transfer_account_id** | **String** | If a transfer, the account_id which the scheduled transaction transfers to | [optional] -**deleted** | **bool** | Whether or not the scheduled transaction has been deleted. Deleted scheduled transactions will only be included in delta requests. | -**account_name** | **String** | | -**payee_name** | **String** | | -**category_name** | **String** | | -**subtransactions** | [**Vec<::models::ScheduledSubTransaction>**](ScheduledSubTransaction.md) | If a split scheduled transaction, the subtransactions. | - -[[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/ScheduledTransactionDetailAllOf.md b/ynab-api/docs/ScheduledTransactionDetailAllOf.md deleted file mode 100644 index 3c2757f..0000000 --- a/ynab-api/docs/ScheduledTransactionDetailAllOf.md +++ /dev/null @@ -1,14 +0,0 @@ -# ScheduledTransactionDetailAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account_name** | **String** | | -**payee_name** | **String** | | -**category_name** | **String** | | -**subtransactions** | [**Vec<::models::ScheduledSubTransaction>**](ScheduledSubTransaction.md) | If a split scheduled transaction, the subtransactions. | - -[[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 deleted file mode 100644 index 28c4b7e..0000000 --- a/ynab-api/docs/ScheduledTransactionResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# ScheduledTransactionResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [***::models::ScheduledTransactionResponseData**](ScheduledTransactionResponse_data.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/ScheduledTransactionResponseData.md b/ynab-api/docs/ScheduledTransactionResponseData.md deleted file mode 100644 index bd05d93..0000000 --- a/ynab-api/docs/ScheduledTransactionResponseData.md +++ /dev/null @@ -1,11 +0,0 @@ -# ScheduledTransactionResponseData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scheduled_transaction** | [***::models::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/ScheduledTransactionSummary.md b/ynab-api/docs/ScheduledTransactionSummary.md deleted file mode 100644 index 4b248b0..0000000 --- a/ynab-api/docs/ScheduledTransactionSummary.md +++ /dev/null @@ -1,22 +0,0 @@ -# ScheduledTransactionSummary - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | | -**date_first** | [***String**](string.md) | The first date for which the Scheduled Transaction was scheduled. | -**date_next** | [***String**](string.md) | The next date for which the Scheduled Transaction is scheduled. | -**frequency** | **String** | | -**amount** | **i64** | The scheduled transaction amount in milliunits format | -**memo** | **String** | | [optional] -**flag_color** | **String** | The scheduled transaction flag | -**account_id** | **String** | | -**payee_id** | **String** | | [optional] -**category_id** | **String** | | -**transfer_account_id** | **String** | If a transfer, the account_id which the scheduled transaction transfers to | [optional] -**deleted** | **bool** | Whether or not the scheduled transaction has been deleted. Deleted scheduled transactions will only be included in delta requests. | - -[[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 deleted file mode 100644 index 48856a7..0000000 --- a/ynab-api/docs/ScheduledTransactionsApi.md +++ /dev/null @@ -1,83 +0,0 @@ -# \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 - -> ::models::ScheduledTransactionResponse get_scheduled_transaction_by_id(ctx, budget_id, scheduled_transaction_id) -Single scheduled transaction - -Returns a single scheduled transaction - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **scheduled_transaction_id** | **String**| The id of the scheduled transaction | - -### Return type - -[**::models::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 - -> ::models::ScheduledTransactionsResponse get_scheduled_transactions(ctx, budget_id, optional) -List scheduled transactions - -Returns all scheduled transactions - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **optional** | **map[string]interface{}** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a map[string]interface{}. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | - -### Return type - -[**::models::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 deleted file mode 100644 index b3dbffc..0000000 --- a/ynab-api/docs/ScheduledTransactionsResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# ScheduledTransactionsResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [***::models::ScheduledTransactionsResponseData**](ScheduledTransactionsResponse_data.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/ScheduledTransactionsResponseData.md b/ynab-api/docs/ScheduledTransactionsResponseData.md deleted file mode 100644 index f5bc860..0000000 --- a/ynab-api/docs/ScheduledTransactionsResponseData.md +++ /dev/null @@ -1,12 +0,0 @@ -# ScheduledTransactionsResponseData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**scheduled_transactions** | [**Vec<::models::ScheduledTransactionDetail>**](ScheduledTransactionDetail.md) | | -**server_knowledge** | **i64** | 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/SubTransaction.md b/ynab-api/docs/SubTransaction.md deleted file mode 100644 index 77bad7f..0000000 --- a/ynab-api/docs/SubTransaction.md +++ /dev/null @@ -1,18 +0,0 @@ -# SubTransaction - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | | -**transaction_id** | **String** | | -**amount** | **i64** | The subtransaction amount in milliunits format | -**memo** | **String** | | [optional] -**payee_id** | **String** | | [optional] -**category_id** | **String** | | [optional] -**transfer_account_id** | **String** | If a transfer, the account_id which the subtransaction transfers to | [optional] -**deleted** | **bool** | Whether or not the subtransaction has been deleted. Deleted subtransactions will only be included in delta requests. | - -[[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 deleted file mode 100644 index 3d23f44..0000000 --- a/ynab-api/docs/TransactionDetail.md +++ /dev/null @@ -1,29 +0,0 @@ -# TransactionDetail - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | | -**date** | [***String**](string.md) | The transaction date in ISO format (e.g. 2016-12-01) | -**amount** | **i64** | The transaction amount in milliunits format | -**memo** | **String** | | [optional] -**cleared** | **String** | The cleared status of the transaction | -**approved** | **bool** | Whether or not the transaction is approved | -**flag_color** | **String** | The transaction flag | [optional] -**account_id** | **String** | | -**payee_id** | **String** | | [optional] -**category_id** | **String** | | [optional] -**transfer_account_id** | **String** | If a transfer transaction, the account to which it transfers | [optional] -**transfer_transaction_id** | **String** | If a transfer transaction, the id of transaction on the other side of the transfer | [optional] -**matched_transaction_id** | **String** | If transaction is matched, the id of the matched transaction | [optional] -**import_id** | **String** | If the Transaction was imported, this field is a unique (by account) import identifier. If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. | [optional] -**deleted** | **bool** | Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests. | -**account_name** | **String** | | -**payee_name** | **String** | | [optional] -**category_name** | **String** | | [optional] -**subtransactions** | [**Vec<::models::SubTransaction>**](SubTransaction.md) | If a split transaction, the subtransactions. | - -[[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/TransactionDetailAllOf.md b/ynab-api/docs/TransactionDetailAllOf.md deleted file mode 100644 index 2db8459..0000000 --- a/ynab-api/docs/TransactionDetailAllOf.md +++ /dev/null @@ -1,14 +0,0 @@ -# TransactionDetailAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account_name** | **String** | | -**payee_name** | **String** | | [optional] -**category_name** | **String** | | [optional] -**subtransactions** | [**Vec<::models::SubTransaction>**](SubTransaction.md) | If a split transaction, the subtransactions. | - -[[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 deleted file mode 100644 index ac81dfa..0000000 --- a/ynab-api/docs/TransactionResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# TransactionResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [***::models::TransactionResponseData**](TransactionResponse_data.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/TransactionResponseData.md b/ynab-api/docs/TransactionResponseData.md deleted file mode 100644 index 81977f0..0000000 --- a/ynab-api/docs/TransactionResponseData.md +++ /dev/null @@ -1,11 +0,0 @@ -# TransactionResponseData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**transaction** | [***::models::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/TransactionSummary.md b/ynab-api/docs/TransactionSummary.md deleted file mode 100644 index fd93b15..0000000 --- a/ynab-api/docs/TransactionSummary.md +++ /dev/null @@ -1,25 +0,0 @@ -# TransactionSummary - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | | -**date** | [***String**](string.md) | The transaction date in ISO format (e.g. 2016-12-01) | -**amount** | **i64** | The transaction amount in milliunits format | -**memo** | **String** | | [optional] -**cleared** | **String** | The cleared status of the transaction | -**approved** | **bool** | Whether or not the transaction is approved | -**flag_color** | **String** | The transaction flag | [optional] -**account_id** | **String** | | -**payee_id** | **String** | | [optional] -**category_id** | **String** | | [optional] -**transfer_account_id** | **String** | If a transfer transaction, the account to which it transfers | [optional] -**transfer_transaction_id** | **String** | If a transfer transaction, the id of transaction on the other side of the transfer | [optional] -**matched_transaction_id** | **String** | If transaction is matched, the id of the matched transaction | [optional] -**import_id** | **String** | If the Transaction was imported, this field is a unique (by account) import identifier. If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. | [optional] -**deleted** | **bool** | Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests. | - -[[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 deleted file mode 100644 index 64ecb4b..0000000 --- a/ynab-api/docs/TransactionsApi.md +++ /dev/null @@ -1,323 +0,0 @@ -# \TransactionsApi - -All URIs are relative to *https://api.youneedabudget.com/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_transaction**](TransactionsApi.md#create_transaction) | **post** /budgets/{budget_id}/transactions | Create a single transaction or multiple transactions -[**get_transaction_by_id**](TransactionsApi.md#get_transaction_by_id) | **get** /budgets/{budget_id}/transactions/{transaction_id} | Single 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_payee**](TransactionsApi.md#get_transactions_by_payee) | **get** /budgets/{budget_id}/payees/{payee_id}/transactions | List payee transactions -[**update_transaction**](TransactionsApi.md#update_transaction) | **put** /budgets/{budget_id}/transactions/{transaction_id} | Updates an existing transaction -[**update_transactions**](TransactionsApi.md#update_transactions) | **patch** /budgets/{budget_id}/transactions | Update multiple transactions - - - -## create_transaction - -> ::models::SaveTransactionsResponse create_transaction(ctx, budget_id, data) -Create a single transaction or multiple transactions - -Creates a single transaction or multiple transactions. If you provide a body containing a 'transaction' object, a single transaction will be created and if you provide a body containing a 'transactions' array, multiple transactions will be created. Scheduled transactions cannot be created on this endpoint. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **data** | [**SaveTransactionsWrapper**](SaveTransactionsWrapper.md)| The transaction or transactions to create. To create a single transaction you can specify a value for the 'transaction' object and to create multiple transactions you can specify an array of 'transactions'. It is expected that you will only provide a value for one of these objects. | - -### Return type - -[**::models::SaveTransactionsResponse**](SaveTransactionsResponse.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_transaction_by_id - -> ::models::TransactionResponse get_transaction_by_id(ctx, budget_id, transaction_id) -Single transaction - -Returns a single transaction - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **transaction_id** | **String**| The id of the transaction | - -### Return type - -[**::models::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 - -> ::models::TransactionsResponse get_transactions(ctx, budget_id, optional) -List transactions - -Returns budget transactions - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **optional** | **map[string]interface{}** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a map[string]interface{}. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **since_date** | **String**| If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). | - **_type** | **String**| If specified, only transactions of the specified type will be included. 'uncategorized' and 'unapproved' are currently supported. | - **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | - -### Return type - -[**::models::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 - -> ::models::TransactionsResponse get_transactions_by_account(ctx, budget_id, account_id, optional) -List account transactions - -Returns all transactions for a specified account - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **account_id** | **String**| The id of the account | - **optional** | **map[string]interface{}** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a map[string]interface{}. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **account_id** | **String**| The id of the account | - **since_date** | **String**| If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). | - **_type** | **String**| If specified, only transactions of the specified type will be included. 'uncategorized' and 'unapproved' are currently supported. | - **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | - -### Return type - -[**::models::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 - -> ::models::HybridTransactionsResponse get_transactions_by_category(ctx, budget_id, category_id, optional) -List category transactions - -Returns all transactions for a specified category - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **category_id** | **String**| The id of the category | - **optional** | **map[string]interface{}** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a map[string]interface{}. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **category_id** | **String**| The id of the category | - **since_date** | **String**| If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). | - **_type** | **String**| If specified, only transactions of the specified type will be included. 'uncategorized' and 'unapproved' are currently supported. | - **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | - -### Return type - -[**::models::HybridTransactionsResponse**](HybridTransactionsResponse.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_payee - -> ::models::HybridTransactionsResponse get_transactions_by_payee(ctx, budget_id, payee_id, optional) -List payee transactions - -Returns all transactions for a specified payee - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **payee_id** | **String**| The id of the payee | - **optional** | **map[string]interface{}** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a map[string]interface{}. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **payee_id** | **String**| The id of the payee | - **since_date** | **String**| If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). | - **_type** | **String**| If specified, only transactions of the specified type will be included. 'uncategorized' and 'unapproved' are currently supported. | - **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | - -### Return type - -[**::models::HybridTransactionsResponse**](HybridTransactionsResponse.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 - -> ::models::TransactionResponse update_transaction(ctx, budget_id, transaction_id, data) -Updates an existing transaction - -Updates a transaction - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **transaction_id** | **String**| The id of the transaction | - **data** | [**UpdateTransactionWrapper**](UpdateTransactionWrapper.md)| The transaction to update | - -### Return type - -[**::models::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_transactions - -> ::models::UpdateTransactionsResponse update_transactions(ctx, budget_id, data) -Update multiple transactions - -Updates multiple transactions, by 'id' or 'import_id'. - -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **data** | [**UpdateTransactionsWrapper**](UpdateTransactionsWrapper.md)| The transactions to update. Optionally, transaction 'id' value(s) can be specified as null and an 'import_id' value can be provided which will allow transaction(s) to updated by their import_id. | - -### Return type - -[**::models::UpdateTransactionsResponse**](UpdateTransactionsResponse.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 deleted file mode 100644 index fec6f21..0000000 --- a/ynab-api/docs/TransactionsResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# TransactionsResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [***::models::TransactionsResponseData**](TransactionsResponse_data.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/TransactionsResponseData.md b/ynab-api/docs/TransactionsResponseData.md deleted file mode 100644 index 2b64bf7..0000000 --- a/ynab-api/docs/TransactionsResponseData.md +++ /dev/null @@ -1,12 +0,0 @@ -# TransactionsResponseData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**transactions** | [**Vec<::models::TransactionDetail>**](TransactionDetail.md) | | -**server_knowledge** | **i64** | 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/UpdateTransaction.md b/ynab-api/docs/UpdateTransaction.md deleted file mode 100644 index 6d6ecb0..0000000 --- a/ynab-api/docs/UpdateTransaction.md +++ /dev/null @@ -1,22 +0,0 @@ -# UpdateTransaction - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | | [optional] -**account_id** | **String** | | -**date** | [***String**](string.md) | The transaction date in ISO format (e.g. 2016-12-01). Future dates (scheduled transactions) are not permitted. Split transaction dates cannot be changed and if a different date is supplied it will be ignored. | -**amount** | **i64** | The transaction amount in milliunits format. Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored. | -**payee_id** | **String** | The payee for the transaction | [optional] -**payee_name** | **String** | The payee name. If a payee_name value is provided and payee_id has a null value, the payee_name value will be used to resolve the payee by either (1) a matching payee rename rule (only if import_id is also specified) or (2) a payee with the same name or (3) creation of a new payee. | [optional] -**category_id** | **String** | The category for the transaction. Split and Credit Card Payment categories are not permitted and will be ignored if supplied. If an existing transaction has a Split category it cannot be changed. | [optional] -**memo** | **String** | | [optional] -**cleared** | **String** | 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] -**flag_color** | **String** | The transaction flag | [optional] -**import_id** | **String** | If specified, the new transaction will be assigned this import_id and considered \"imported\". *At the time of import* we will attempt to match \"imported\" transactions with non-imported (i.e. \"user-entered\") transactions.

Transactions imported through File Based Import or Direct Import (not through the API) are assigned an import_id in the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. Using a consistent format will prevent duplicates through Direct Import and File Based Import.

If import_id is omitted or specified as null, the transaction will be treated as a \"user-entered\" transaction. As such, it will be eligible to be matched against transactions later being imported (via DI, FBI, or API). | [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/UpdateTransactionWrapper.md b/ynab-api/docs/UpdateTransactionWrapper.md deleted file mode 100644 index df6846f..0000000 --- a/ynab-api/docs/UpdateTransactionWrapper.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateTransactionWrapper - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**transaction** | [***::models::UpdateTransaction**](UpdateTransaction.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/UpdateTransactionsResponse.md b/ynab-api/docs/UpdateTransactionsResponse.md deleted file mode 100644 index 77e6431..0000000 --- a/ynab-api/docs/UpdateTransactionsResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateTransactionsResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [***::models::SaveTransactionsResponseData**](SaveTransactionsResponse_data.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/UpdateTransactionsWrapper.md b/ynab-api/docs/UpdateTransactionsWrapper.md deleted file mode 100644 index f039804..0000000 --- a/ynab-api/docs/UpdateTransactionsWrapper.md +++ /dev/null @@ -1,12 +0,0 @@ -# UpdateTransactionsWrapper - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**transaction** | [***::models::UpdateTransaction**](UpdateTransaction.md) | | [optional] -**transactions** | [**Vec<::models::UpdateTransaction>**](UpdateTransaction.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/User.md b/ynab-api/docs/User.md deleted file mode 100644 index 28cb9e0..0000000 --- a/ynab-api/docs/User.md +++ /dev/null @@ -1,11 +0,0 @@ -# User - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **String** | | - -[[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/UserApi.md b/ynab-api/docs/UserApi.md deleted file mode 100644 index c2f9359..0000000 --- a/ynab-api/docs/UserApi.md +++ /dev/null @@ -1,36 +0,0 @@ -# \UserApi - -All URIs are relative to *https://api.youneedabudget.com/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_user**](UserApi.md#get_user) | **get** /user | User info - - - -## get_user - -> ::models::UserResponse get_user(ctx, ) -User info - -Returns authenticated user information - -### Required Parameters - -This endpoint does not need any parameter. - -### Return type - -[**::models::UserResponse**](UserResponse.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/UserResponse.md b/ynab-api/docs/UserResponse.md deleted file mode 100644 index 31b0d2f..0000000 --- a/ynab-api/docs/UserResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# UserResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [***::models::UserResponseData**](UserResponse_data.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/UserResponseData.md b/ynab-api/docs/UserResponseData.md deleted file mode 100644 index 3aff41b..0000000 --- a/ynab-api/docs/UserResponseData.md +++ /dev/null @@ -1,11 +0,0 @@ -# UserResponseData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user** | [***::models::User**](User.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 deleted file mode 100644 index 8442b80..0000000 --- a/ynab-api/git_push.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/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 openapi-pestore-perl "minor update" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - 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/src/apis/accounts_api.rs b/ynab-api/src/apis/accounts_api.rs deleted file mode 100644 index 616476e..0000000 --- a/ynab-api/src/apis/accounts_api.rs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use std::rc::Rc; -use std::borrow::Borrow; - -use reqwest; - -use super::{Error, configuration, urlencode}; - -pub struct AccountsApiClient { - configuration: Rc, -} - -impl AccountsApiClient { - pub fn new(configuration: Rc) -> AccountsApiClient { - AccountsApiClient { - configuration: configuration, - } - } -} - -pub trait AccountsApi { - fn get_account_by_id(&self, budget_id: &str, account_id: &str) -> Result<::models::AccountResponse, Error>; - fn get_accounts(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::AccountsResponse, Error>; -} - -impl AccountsApi for AccountsApiClient { - fn get_account_by_id(&self, budget_id: &str, account_id: &str) -> Result<::models::AccountResponse, Error> { - let configuration: &configuration::Configuration = self.configuration.borrow(); - let client = &configuration.client; - - let uri_str = format!("{}/budgets/{budget_id}/accounts/{account_id}", configuration.base_path, budget_id=urlencode(budget_id), account_id=account_id); - let mut req_builder = client.get(uri_str.as_str()); - - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let val = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", val); - }; - - // send request - let req = req_builder.build()?; - - Ok(client.execute(req)?.error_for_status()?.json()?) - } - - fn get_accounts(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::AccountsResponse, Error> { - let configuration: &configuration::Configuration = self.configuration.borrow(); - let client = &configuration.client; - - let uri_str = format!("{}/budgets/{budget_id}/accounts", configuration.base_path, budget_id=urlencode(budget_id)); - let mut req_builder = client.get(uri_str.as_str()); - - req_builder = req_builder.query(&[("last_knowledge_of_server", &last_knowledge_of_server.to_string())]); - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let val = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", val); - }; - - // send request - let req = req_builder.build()?; - - Ok(client.execute(req)?.error_for_status()?.json()?) - } - -} diff --git a/ynab-api/src/apis/budgets_api.rs b/ynab-api/src/apis/budgets_api.rs deleted file mode 100644 index 663dc59..0000000 --- a/ynab-api/src/apis/budgets_api.rs +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use std::rc::Rc; -use std::borrow::Borrow; - -use reqwest; - -use super::{Error, configuration, urlencode}; - -pub struct BudgetsApiClient { - configuration: Rc, -} - -impl BudgetsApiClient { - pub fn new(configuration: Rc) -> BudgetsApiClient { - BudgetsApiClient { - configuration: configuration, - } - } -} - -pub trait BudgetsApi { - fn get_budget_by_id(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::BudgetDetailResponse, Error>; - fn get_budget_settings_by_id(&self, budget_id: &str) -> Result<::models::BudgetSettingsResponse, Error>; - fn get_budgets(&self, ) -> Result<::models::BudgetSummaryResponse, Error>; -} - -impl BudgetsApi for BudgetsApiClient { - fn get_budget_by_id(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::BudgetDetailResponse, Error> { - let configuration: &configuration::Configuration = self.configuration.borrow(); - let client = &configuration.client; - - let uri_str = format!("{}/budgets/{budget_id}", configuration.base_path, budget_id=urlencode(budget_id)); - let mut req_builder = client.get(uri_str.as_str()); - - req_builder = req_builder.query(&[("last_knowledge_of_server", &last_knowledge_of_server.to_string())]); - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let val = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", val); - }; - - // send request - let req = req_builder.build()?; - - Ok(client.execute(req)?.error_for_status()?.json()?) - } - - fn get_budget_settings_by_id(&self, budget_id: &str) -> Result<::models::BudgetSettingsResponse, Error> { - let configuration: &configuration::Configuration = self.configuration.borrow(); - let client = &configuration.client; - - let uri_str = format!("{}/budgets/{budget_id}/settings", configuration.base_path, budget_id=urlencode(budget_id)); - let mut req_builder = client.get(uri_str.as_str()); - - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let val = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", val); - }; - - // send request - let req = req_builder.build()?; - - Ok(client.execute(req)?.error_for_status()?.json()?) - } - - fn get_budgets(&self, ) -> Result<::models::BudgetSummaryResponse, Error> { - let configuration: &configuration::Configuration = self.configuration.borrow(); - let client = &configuration.client; - - let uri_str = format!("{}/budgets", configuration.base_path); - let mut req_builder = client.get(uri_str.as_str()); - - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let val = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", val); - }; - - // send request - let req = req_builder.build()?; - - Ok(client.execute(req)?.error_for_status()?.json()?) - } - -} diff --git a/ynab-api/src/apis/categories_api.rs b/ynab-api/src/apis/categories_api.rs deleted file mode 100644 index 417a2d9..0000000 --- a/ynab-api/src/apis/categories_api.rs +++ /dev/null @@ -1,140 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use std::rc::Rc; -use std::borrow::Borrow; - -use reqwest; - -use super::{Error, configuration, urlencode}; - -pub struct CategoriesApiClient { - configuration: Rc, -} - -impl CategoriesApiClient { - pub fn new(configuration: Rc) -> CategoriesApiClient { - CategoriesApiClient { - configuration: configuration, - } - } -} - -pub trait CategoriesApi { - fn get_categories(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::CategoriesResponse, Error>; - fn get_category_by_id(&self, budget_id: &str, category_id: &str) -> Result<::models::CategoryResponse, Error>; - fn get_month_category_by_id(&self, budget_id: &str, month: String, category_id: &str) -> Result<::models::CategoryResponse, Error>; - fn update_month_category(&self, budget_id: &str, month: String, category_id: &str, data: ::models::SaveMonthCategoryWrapper) -> Result<::models::SaveCategoryResponse, Error>; -} - -impl CategoriesApi for CategoriesApiClient { - fn get_categories(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::CategoriesResponse, Error> { - let configuration: &configuration::Configuration = self.configuration.borrow(); - let client = &configuration.client; - - let uri_str = format!("{}/budgets/{budget_id}/categories", configuration.base_path, budget_id=urlencode(budget_id)); - let mut req_builder = client.get(uri_str.as_str()); - - req_builder = req_builder.query(&[("last_knowledge_of_server", &last_knowledge_of_server.to_string())]); - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let val = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", val); - }; - - // send request - let req = req_builder.build()?; - - Ok(client.execute(req)?.error_for_status()?.json()?) - } - - fn get_category_by_id(&self, budget_id: &str, category_id: &str) -> Result<::models::CategoryResponse, Error> { - let configuration: &configuration::Configuration = self.configuration.borrow(); - let client = &configuration.client; - - let uri_str = format!("{}/budgets/{budget_id}/categories/{category_id}", configuration.base_path, budget_id=urlencode(budget_id), category_id=urlencode(category_id)); - let mut req_builder = client.get(uri_str.as_str()); - - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let val = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", val); - }; - - // send request - let req = req_builder.build()?; - - Ok(client.execute(req)?.error_for_status()?.json()?) - } - - fn get_month_category_by_id(&self, budget_id: &str, month: String, category_id: &str) -> Result<::models::CategoryResponse, Error> { - let configuration: &configuration::Configuration = self.configuration.borrow(); - let client = &configuration.client; - - let uri_str = format!("{}/budgets/{budget_id}/months/{month}/categories/{category_id}", configuration.base_path, budget_id=urlencode(budget_id), month=month, category_id=urlencode(category_id)); - let mut req_builder = client.get(uri_str.as_str()); - - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let val = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", val); - }; - - // send request - let req = req_builder.build()?; - - Ok(client.execute(req)?.error_for_status()?.json()?) - } - - fn update_month_category(&self, budget_id: &str, month: String, category_id: &str, data: ::models::SaveMonthCategoryWrapper) -> Result<::models::SaveCategoryResponse, Error> { - let configuration: &configuration::Configuration = self.configuration.borrow(); - let client = &configuration.client; - - let uri_str = format!("{}/budgets/{budget_id}/months/{month}/categories/{category_id}", configuration.base_path, budget_id=urlencode(budget_id), month=month, category_id=urlencode(category_id)); - let mut req_builder = client.patch(uri_str.as_str()); - - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let val = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", val); - }; - req_builder = req_builder.json(&data); - - // send request - let req = req_builder.build()?; - - Ok(client.execute(req)?.error_for_status()?.json()?) - } - -} diff --git a/ynab-api/src/apis/client.rs b/ynab-api/src/apis/client.rs deleted file mode 100644 index 2776f11..0000000 --- a/ynab-api/src/apis/client.rs +++ /dev/null @@ -1,78 +0,0 @@ -use std::rc::Rc; - -use super::configuration::Configuration; - -pub struct APIClient { - configuration: Rc, - accounts_api: Box<::apis::AccountsApi>, - budgets_api: Box<::apis::BudgetsApi>, - categories_api: Box<::apis::CategoriesApi>, - deprecated_api: Box<::apis::DeprecatedApi>, - months_api: Box<::apis::MonthsApi>, - payee_locations_api: Box<::apis::PayeeLocationsApi>, - payees_api: Box<::apis::PayeesApi>, - scheduled_transactions_api: Box<::apis::ScheduledTransactionsApi>, - transactions_api: Box<::apis::TransactionsApi>, - user_api: Box<::apis::UserApi>, -} - -impl APIClient { - pub fn new(configuration: Configuration) -> APIClient { - let rc = Rc::new(configuration); - - APIClient { - configuration: rc.clone(), - accounts_api: Box::new(::apis::AccountsApiClient::new(rc.clone())), - budgets_api: Box::new(::apis::BudgetsApiClient::new(rc.clone())), - categories_api: Box::new(::apis::CategoriesApiClient::new(rc.clone())), - deprecated_api: Box::new(::apis::DeprecatedApiClient::new(rc.clone())), - months_api: Box::new(::apis::MonthsApiClient::new(rc.clone())), - payee_locations_api: Box::new(::apis::PayeeLocationsApiClient::new(rc.clone())), - payees_api: Box::new(::apis::PayeesApiClient::new(rc.clone())), - scheduled_transactions_api: Box::new(::apis::ScheduledTransactionsApiClient::new(rc.clone())), - transactions_api: Box::new(::apis::TransactionsApiClient::new(rc.clone())), - user_api: Box::new(::apis::UserApiClient::new(rc.clone())), - } - } - - pub fn accounts_api(&self) -> &::apis::AccountsApi{ - self.accounts_api.as_ref() - } - - pub fn budgets_api(&self) -> &::apis::BudgetsApi{ - self.budgets_api.as_ref() - } - - pub fn categories_api(&self) -> &::apis::CategoriesApi{ - self.categories_api.as_ref() - } - - pub fn deprecated_api(&self) -> &::apis::DeprecatedApi{ - self.deprecated_api.as_ref() - } - - pub fn months_api(&self) -> &::apis::MonthsApi{ - self.months_api.as_ref() - } - - pub fn payee_locations_api(&self) -> &::apis::PayeeLocationsApi{ - self.payee_locations_api.as_ref() - } - - pub fn payees_api(&self) -> &::apis::PayeesApi{ - self.payees_api.as_ref() - } - - pub fn scheduled_transactions_api(&self) -> &::apis::ScheduledTransactionsApi{ - self.scheduled_transactions_api.as_ref() - } - - pub fn transactions_api(&self) -> &::apis::TransactionsApi{ - self.transactions_api.as_ref() - } - - pub fn user_api(&self) -> &::apis::UserApi{ - self.user_api.as_ref() - } - -} diff --git a/ynab-api/src/apis/configuration.rs b/ynab-api/src/apis/configuration.rs deleted file mode 100644 index 4378dfa..0000000 --- a/ynab-api/src/apis/configuration.rs +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -use reqwest; - -pub struct Configuration { - pub base_path: String, - pub user_agent: Option, - pub client: reqwest::Client, - pub basic_auth: Option, - pub oauth_access_token: Option, - pub bearer_access_token: Option, - pub api_key: Option, - // TODO: take an oauth2 token source, similar to the go one -} - -pub type BasicAuth = (String, Option); - -pub struct ApiKey { - pub prefix: Option, - pub key: String, -} - -impl Configuration { - pub fn new() -> Configuration { - Configuration::default() - } -} - -impl Default for Configuration { - fn default() -> Self { - Configuration { - base_path: "https://api.youneedabudget.com/v1".to_owned(), - user_agent: Some("OpenAPI-Generator/1.0.0/rust".to_owned()), - client: reqwest::Client::new(), - basic_auth: None, - oauth_access_token: None, - bearer_access_token: None, - api_key: None, - } - } -} diff --git a/ynab-api/src/apis/deprecated_api.rs b/ynab-api/src/apis/deprecated_api.rs deleted file mode 100644 index a148248..0000000 --- a/ynab-api/src/apis/deprecated_api.rs +++ /dev/null @@ -1,61 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use std::rc::Rc; -use std::borrow::Borrow; - -use reqwest; - -use super::{Error, configuration, urlencode}; - -pub struct DeprecatedApiClient { - configuration: Rc, -} - -impl DeprecatedApiClient { - pub fn new(configuration: Rc) -> DeprecatedApiClient { - DeprecatedApiClient { - configuration: configuration, - } - } -} - -pub trait DeprecatedApi { - fn bulk_create_transactions(&self, budget_id: &str, transactions: ::models::BulkTransactions) -> Result<::models::BulkResponse, Error>; -} - -impl DeprecatedApi for DeprecatedApiClient { - fn bulk_create_transactions(&self, budget_id: &str, transactions: ::models::BulkTransactions) -> Result<::models::BulkResponse, Error> { - let configuration: &configuration::Configuration = self.configuration.borrow(); - let client = &configuration.client; - - let uri_str = format!("{}/budgets/{budget_id}/transactions/bulk", configuration.base_path, budget_id=urlencode(budget_id)); - let mut req_builder = client.post(uri_str.as_str()); - - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let val = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", val); - }; - req_builder = req_builder.json(&transactions); - - // send request - let req = req_builder.build()?; - - Ok(client.execute(req)?.error_for_status()?.json()?) - } - -} diff --git a/ynab-api/src/apis/mod.rs b/ynab-api/src/apis/mod.rs deleted file mode 100644 index 910bd7e..0000000 --- a/ynab-api/src/apis/mod.rs +++ /dev/null @@ -1,57 +0,0 @@ -use reqwest; -use serde_json; - -#[derive(Debug)] -pub enum Error { - Reqwest(reqwest::Error), - Serde(serde_json::Error), - Io(std::io::Error), -} - -impl From for Error { - fn from(e: reqwest::Error) -> Self { - Error::Reqwest(e) - } -} - -impl From for Error { - fn from(e: serde_json::Error) -> Self { - Error::Serde(e) - } -} - -impl From for Error { - fn from(e: std::io::Error) -> Self { - Error::Io(e) - } -} - -pub fn urlencode>(s: T) -> String { - ::url::form_urlencoded::byte_serialize(s.as_ref().as_bytes()).collect() -} - -use super::models::*; - -mod accounts_api; -pub use self::accounts_api::{ AccountsApi, AccountsApiClient }; -mod budgets_api; -pub use self::budgets_api::{ BudgetsApi, BudgetsApiClient }; -mod categories_api; -pub use self::categories_api::{ CategoriesApi, CategoriesApiClient }; -mod deprecated_api; -pub use self::deprecated_api::{ DeprecatedApi, DeprecatedApiClient }; -mod months_api; -pub use self::months_api::{ MonthsApi, MonthsApiClient }; -mod payee_locations_api; -pub use self::payee_locations_api::{ PayeeLocationsApi, PayeeLocationsApiClient }; -mod payees_api; -pub use self::payees_api::{ PayeesApi, PayeesApiClient }; -mod scheduled_transactions_api; -pub use self::scheduled_transactions_api::{ ScheduledTransactionsApi, ScheduledTransactionsApiClient }; -mod transactions_api; -pub use self::transactions_api::{ TransactionsApi, TransactionsApiClient }; -mod user_api; -pub use self::user_api::{ UserApi, UserApiClient }; - -pub mod configuration; -pub mod client; diff --git a/ynab-api/src/apis/months_api.rs b/ynab-api/src/apis/months_api.rs deleted file mode 100644 index 3bee3fe..0000000 --- a/ynab-api/src/apis/months_api.rs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use std::rc::Rc; -use std::borrow::Borrow; - -use reqwest; - -use super::{Error, configuration, urlencode}; - -pub struct MonthsApiClient { - configuration: Rc, -} - -impl MonthsApiClient { - pub fn new(configuration: Rc) -> MonthsApiClient { - MonthsApiClient { - configuration: configuration, - } - } -} - -pub trait MonthsApi { - fn get_budget_month(&self, budget_id: &str, month: String) -> Result<::models::MonthDetailResponse, Error>; - fn get_budget_months(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::MonthSummariesResponse, Error>; -} - -impl MonthsApi for MonthsApiClient { - fn get_budget_month(&self, budget_id: &str, month: String) -> Result<::models::MonthDetailResponse, Error> { - let configuration: &configuration::Configuration = self.configuration.borrow(); - let client = &configuration.client; - - let uri_str = format!("{}/budgets/{budget_id}/months/{month}", configuration.base_path, budget_id=urlencode(budget_id), month=month); - let mut req_builder = client.get(uri_str.as_str()); - - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let val = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", val); - }; - - // send request - let req = req_builder.build()?; - - Ok(client.execute(req)?.error_for_status()?.json()?) - } - - fn get_budget_months(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::MonthSummariesResponse, Error> { - let configuration: &configuration::Configuration = self.configuration.borrow(); - let client = &configuration.client; - - let uri_str = format!("{}/budgets/{budget_id}/months", configuration.base_path, budget_id=urlencode(budget_id)); - let mut req_builder = client.get(uri_str.as_str()); - - req_builder = req_builder.query(&[("last_knowledge_of_server", &last_knowledge_of_server.to_string())]); - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let val = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", val); - }; - - // send request - let req = req_builder.build()?; - - Ok(client.execute(req)?.error_for_status()?.json()?) - } - -} diff --git a/ynab-api/src/apis/payee_locations_api.rs b/ynab-api/src/apis/payee_locations_api.rs deleted file mode 100644 index 88f12e1..0000000 --- a/ynab-api/src/apis/payee_locations_api.rs +++ /dev/null @@ -1,112 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use std::rc::Rc; -use std::borrow::Borrow; - -use reqwest; - -use super::{Error, configuration, urlencode}; - -pub struct PayeeLocationsApiClient { - configuration: Rc, -} - -impl PayeeLocationsApiClient { - pub fn new(configuration: Rc) -> PayeeLocationsApiClient { - PayeeLocationsApiClient { - configuration: configuration, - } - } -} - -pub trait PayeeLocationsApi { - fn get_payee_location_by_id(&self, budget_id: &str, payee_location_id: &str) -> Result<::models::PayeeLocationResponse, Error>; - fn get_payee_locations(&self, budget_id: &str) -> Result<::models::PayeeLocationsResponse, Error>; - fn get_payee_locations_by_payee(&self, budget_id: &str, payee_id: &str) -> Result<::models::PayeeLocationsResponse, Error>; -} - -impl PayeeLocationsApi for PayeeLocationsApiClient { - fn get_payee_location_by_id(&self, budget_id: &str, payee_location_id: &str) -> Result<::models::PayeeLocationResponse, Error> { - let configuration: &configuration::Configuration = self.configuration.borrow(); - let client = &configuration.client; - - let uri_str = format!("{}/budgets/{budget_id}/payee_locations/{payee_location_id}", configuration.base_path, budget_id=urlencode(budget_id), payee_location_id=urlencode(payee_location_id)); - let mut req_builder = client.get(uri_str.as_str()); - - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let val = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", val); - }; - - // send request - let req = req_builder.build()?; - - Ok(client.execute(req)?.error_for_status()?.json()?) - } - - fn get_payee_locations(&self, budget_id: &str) -> Result<::models::PayeeLocationsResponse, Error> { - let configuration: &configuration::Configuration = self.configuration.borrow(); - let client = &configuration.client; - - let uri_str = format!("{}/budgets/{budget_id}/payee_locations", configuration.base_path, budget_id=urlencode(budget_id)); - let mut req_builder = client.get(uri_str.as_str()); - - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let val = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", val); - }; - - // send request - let req = req_builder.build()?; - - Ok(client.execute(req)?.error_for_status()?.json()?) - } - - fn get_payee_locations_by_payee(&self, budget_id: &str, payee_id: &str) -> Result<::models::PayeeLocationsResponse, Error> { - let configuration: &configuration::Configuration = self.configuration.borrow(); - let client = &configuration.client; - - let uri_str = format!("{}/budgets/{budget_id}/payees/{payee_id}/payee_locations", configuration.base_path, budget_id=urlencode(budget_id), payee_id=urlencode(payee_id)); - let mut req_builder = client.get(uri_str.as_str()); - - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let val = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", val); - }; - - // send request - let req = req_builder.build()?; - - Ok(client.execute(req)?.error_for_status()?.json()?) - } - -} diff --git a/ynab-api/src/apis/payees_api.rs b/ynab-api/src/apis/payees_api.rs deleted file mode 100644 index 77db5bb..0000000 --- a/ynab-api/src/apis/payees_api.rs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use std::rc::Rc; -use std::borrow::Borrow; - -use reqwest; - -use super::{Error, configuration, urlencode}; - -pub struct PayeesApiClient { - configuration: Rc, -} - -impl PayeesApiClient { - pub fn new(configuration: Rc) -> PayeesApiClient { - PayeesApiClient { - configuration: configuration, - } - } -} - -pub trait PayeesApi { - fn get_payee_by_id(&self, budget_id: &str, payee_id: &str) -> Result<::models::PayeeResponse, Error>; - fn get_payees(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::PayeesResponse, Error>; -} - -impl PayeesApi for PayeesApiClient { - fn get_payee_by_id(&self, budget_id: &str, payee_id: &str) -> Result<::models::PayeeResponse, Error> { - let configuration: &configuration::Configuration = self.configuration.borrow(); - let client = &configuration.client; - - let uri_str = format!("{}/budgets/{budget_id}/payees/{payee_id}", configuration.base_path, budget_id=urlencode(budget_id), payee_id=urlencode(payee_id)); - let mut req_builder = client.get(uri_str.as_str()); - - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let val = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", val); - }; - - // send request - let req = req_builder.build()?; - - Ok(client.execute(req)?.error_for_status()?.json()?) - } - - fn get_payees(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::PayeesResponse, Error> { - let configuration: &configuration::Configuration = self.configuration.borrow(); - let client = &configuration.client; - - let uri_str = format!("{}/budgets/{budget_id}/payees", configuration.base_path, budget_id=urlencode(budget_id)); - let mut req_builder = client.get(uri_str.as_str()); - - req_builder = req_builder.query(&[("last_knowledge_of_server", &last_knowledge_of_server.to_string())]); - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let val = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", val); - }; - - // send request - let req = req_builder.build()?; - - Ok(client.execute(req)?.error_for_status()?.json()?) - } - -} diff --git a/ynab-api/src/apis/scheduled_transactions_api.rs b/ynab-api/src/apis/scheduled_transactions_api.rs deleted file mode 100644 index 8ab30a8..0000000 --- a/ynab-api/src/apis/scheduled_transactions_api.rs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use std::rc::Rc; -use std::borrow::Borrow; - -use reqwest; - -use super::{Error, configuration, urlencode}; - -pub struct ScheduledTransactionsApiClient { - configuration: Rc, -} - -impl ScheduledTransactionsApiClient { - pub fn new(configuration: Rc) -> ScheduledTransactionsApiClient { - ScheduledTransactionsApiClient { - configuration: configuration, - } - } -} - -pub trait ScheduledTransactionsApi { - fn get_scheduled_transaction_by_id(&self, budget_id: &str, scheduled_transaction_id: &str) -> Result<::models::ScheduledTransactionResponse, Error>; - fn get_scheduled_transactions(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::ScheduledTransactionsResponse, Error>; -} - -impl ScheduledTransactionsApi for ScheduledTransactionsApiClient { - fn get_scheduled_transaction_by_id(&self, budget_id: &str, scheduled_transaction_id: &str) -> Result<::models::ScheduledTransactionResponse, Error> { - let configuration: &configuration::Configuration = self.configuration.borrow(); - let client = &configuration.client; - - let uri_str = format!("{}/budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id}", configuration.base_path, budget_id=urlencode(budget_id), scheduled_transaction_id=urlencode(scheduled_transaction_id)); - let mut req_builder = client.get(uri_str.as_str()); - - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let val = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", val); - }; - - // send request - let req = req_builder.build()?; - - Ok(client.execute(req)?.error_for_status()?.json()?) - } - - fn get_scheduled_transactions(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::ScheduledTransactionsResponse, Error> { - let configuration: &configuration::Configuration = self.configuration.borrow(); - let client = &configuration.client; - - let uri_str = format!("{}/budgets/{budget_id}/scheduled_transactions", configuration.base_path, budget_id=urlencode(budget_id)); - let mut req_builder = client.get(uri_str.as_str()); - - req_builder = req_builder.query(&[("last_knowledge_of_server", &last_knowledge_of_server.to_string())]); - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let val = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", val); - }; - - // send request - let req = req_builder.build()?; - - Ok(client.execute(req)?.error_for_status()?.json()?) - } - -} diff --git a/ynab-api/src/apis/transactions_api.rs b/ynab-api/src/apis/transactions_api.rs deleted file mode 100644 index a6386a0..0000000 --- a/ynab-api/src/apis/transactions_api.rs +++ /dev/null @@ -1,257 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use std::rc::Rc; -use std::borrow::Borrow; - -use reqwest; - -use super::{Error, configuration, urlencode}; - -pub struct TransactionsApiClient { - configuration: Rc, -} - -impl TransactionsApiClient { - pub fn new(configuration: Rc) -> TransactionsApiClient { - TransactionsApiClient { - configuration: configuration, - } - } -} - -pub trait TransactionsApi { - fn create_transaction(&self, budget_id: &str, data: ::models::SaveTransactionsWrapper) -> Result<::models::SaveTransactionsResponse, Error>; - fn get_transaction_by_id(&self, budget_id: &str, transaction_id: &str) -> Result<::models::TransactionResponse, Error>; - fn get_transactions(&self, budget_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::TransactionsResponse, Error>; - fn get_transactions_by_account(&self, budget_id: &str, account_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::TransactionsResponse, Error>; - fn get_transactions_by_category(&self, budget_id: &str, category_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::HybridTransactionsResponse, Error>; - fn get_transactions_by_payee(&self, budget_id: &str, payee_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::HybridTransactionsResponse, Error>; - fn update_transaction(&self, budget_id: &str, transaction_id: &str, data: ::models::UpdateTransactionWrapper) -> Result<::models::TransactionResponse, Error>; - fn update_transactions(&self, budget_id: &str, data: ::models::UpdateTransactionsWrapper) -> Result<::models::UpdateTransactionsResponse, Error>; -} - -impl TransactionsApi for TransactionsApiClient { - fn create_transaction(&self, budget_id: &str, data: ::models::SaveTransactionsWrapper) -> Result<::models::SaveTransactionsResponse, Error> { - let configuration: &configuration::Configuration = self.configuration.borrow(); - let client = &configuration.client; - - let uri_str = format!("{}/budgets/{budget_id}/transactions", configuration.base_path, budget_id=urlencode(budget_id)); - let mut req_builder = client.post(uri_str.as_str()); - - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let val = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", val); - }; - req_builder = req_builder.json(&data); - - // send request - let req = req_builder.build()?; - - Ok(client.execute(req)?.error_for_status()?.json()?) - } - - fn get_transaction_by_id(&self, budget_id: &str, transaction_id: &str) -> Result<::models::TransactionResponse, Error> { - let configuration: &configuration::Configuration = self.configuration.borrow(); - let client = &configuration.client; - - let uri_str = format!("{}/budgets/{budget_id}/transactions/{transaction_id}", configuration.base_path, budget_id=urlencode(budget_id), transaction_id=urlencode(transaction_id)); - let mut req_builder = client.get(uri_str.as_str()); - - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let val = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", val); - }; - - // send request - let req = req_builder.build()?; - - Ok(client.execute(req)?.error_for_status()?.json()?) - } - - fn get_transactions(&self, budget_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::TransactionsResponse, Error> { - let configuration: &configuration::Configuration = self.configuration.borrow(); - let client = &configuration.client; - - let uri_str = format!("{}/budgets/{budget_id}/transactions", configuration.base_path, budget_id=urlencode(budget_id)); - let mut req_builder = client.get(uri_str.as_str()); - - req_builder = req_builder.query(&[("since_date", &since_date.to_string())]); - req_builder = req_builder.query(&[("type", &_type.to_string())]); - req_builder = req_builder.query(&[("last_knowledge_of_server", &last_knowledge_of_server.to_string())]); - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let val = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", val); - }; - - // send request - let req = req_builder.build()?; - - Ok(client.execute(req)?.error_for_status()?.json()?) - } - - fn get_transactions_by_account(&self, budget_id: &str, account_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::TransactionsResponse, Error> { - let configuration: &configuration::Configuration = self.configuration.borrow(); - let client = &configuration.client; - - let uri_str = format!("{}/budgets/{budget_id}/accounts/{account_id}/transactions", configuration.base_path, budget_id=urlencode(budget_id), account_id=urlencode(account_id)); - let mut req_builder = client.get(uri_str.as_str()); - - req_builder = req_builder.query(&[("since_date", &since_date.to_string())]); - req_builder = req_builder.query(&[("type", &_type.to_string())]); - req_builder = req_builder.query(&[("last_knowledge_of_server", &last_knowledge_of_server.to_string())]); - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let val = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", val); - }; - - // send request - let req = req_builder.build()?; - - Ok(client.execute(req)?.error_for_status()?.json()?) - } - - fn get_transactions_by_category(&self, budget_id: &str, category_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::HybridTransactionsResponse, Error> { - let configuration: &configuration::Configuration = self.configuration.borrow(); - let client = &configuration.client; - - let uri_str = format!("{}/budgets/{budget_id}/categories/{category_id}/transactions", configuration.base_path, budget_id=urlencode(budget_id), category_id=urlencode(category_id)); - let mut req_builder = client.get(uri_str.as_str()); - - req_builder = req_builder.query(&[("since_date", &since_date.to_string())]); - req_builder = req_builder.query(&[("type", &_type.to_string())]); - req_builder = req_builder.query(&[("last_knowledge_of_server", &last_knowledge_of_server.to_string())]); - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let val = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", val); - }; - - // send request - let req = req_builder.build()?; - - Ok(client.execute(req)?.error_for_status()?.json()?) - } - - fn get_transactions_by_payee(&self, budget_id: &str, payee_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::HybridTransactionsResponse, Error> { - let configuration: &configuration::Configuration = self.configuration.borrow(); - let client = &configuration.client; - - let uri_str = format!("{}/budgets/{budget_id}/payees/{payee_id}/transactions", configuration.base_path, budget_id=urlencode(budget_id), payee_id=urlencode(payee_id)); - let mut req_builder = client.get(uri_str.as_str()); - - req_builder = req_builder.query(&[("since_date", &since_date.to_string())]); - req_builder = req_builder.query(&[("type", &_type.to_string())]); - req_builder = req_builder.query(&[("last_knowledge_of_server", &last_knowledge_of_server.to_string())]); - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let val = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", val); - }; - - // send request - let req = req_builder.build()?; - - Ok(client.execute(req)?.error_for_status()?.json()?) - } - - fn update_transaction(&self, budget_id: &str, transaction_id: &str, data: ::models::UpdateTransactionWrapper) -> Result<::models::TransactionResponse, Error> { - let configuration: &configuration::Configuration = self.configuration.borrow(); - let client = &configuration.client; - - let uri_str = format!("{}/budgets/{budget_id}/transactions/{transaction_id}", configuration.base_path, budget_id=urlencode(budget_id), transaction_id=urlencode(transaction_id)); - let mut req_builder = client.put(uri_str.as_str()); - - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let val = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", val); - }; - req_builder = req_builder.json(&data); - - // send request - let req = req_builder.build()?; - - Ok(client.execute(req)?.error_for_status()?.json()?) - } - - fn update_transactions(&self, budget_id: &str, data: ::models::UpdateTransactionsWrapper) -> Result<::models::UpdateTransactionsResponse, Error> { - let configuration: &configuration::Configuration = self.configuration.borrow(); - let client = &configuration.client; - - let uri_str = format!("{}/budgets/{budget_id}/transactions", configuration.base_path, budget_id=urlencode(budget_id)); - let mut req_builder = client.patch(uri_str.as_str()); - - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let val = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", val); - }; - req_builder = req_builder.json(&data); - - // send request - let req = req_builder.build()?; - - Ok(client.execute(req)?.error_for_status()?.json()?) - } - -} diff --git a/ynab-api/src/apis/user_api.rs b/ynab-api/src/apis/user_api.rs deleted file mode 100644 index 50c243e..0000000 --- a/ynab-api/src/apis/user_api.rs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -use std::rc::Rc; -use std::borrow::Borrow; - -use reqwest; - -use super::{Error, configuration, urlencode}; - -pub struct UserApiClient { - configuration: Rc, -} - -impl UserApiClient { - pub fn new(configuration: Rc) -> UserApiClient { - UserApiClient { - configuration: configuration, - } - } -} - -pub trait UserApi { - fn get_user(&self, ) -> Result<::models::UserResponse, Error>; -} - -impl UserApi for UserApiClient { - fn get_user(&self, ) -> Result<::models::UserResponse, Error> { - let configuration: &configuration::Configuration = self.configuration.borrow(); - let client = &configuration.client; - - let uri_str = format!("{}/user", configuration.base_path); - let mut req_builder = client.get(uri_str.as_str()); - - if let Some(ref user_agent) = configuration.user_agent { - req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); - } - if let Some(ref apikey) = configuration.api_key { - let key = apikey.key.clone(); - let val = match apikey.prefix { - Some(ref prefix) => format!("{} {}", prefix, key), - None => key, - }; - req_builder = req_builder.header("Authorization", val); - }; - - // send request - let req = req_builder.build()?; - - Ok(client.execute(req)?.error_for_status()?.json()?) - } - -} diff --git a/ynab-api/src/lib.rs b/ynab-api/src/lib.rs deleted file mode 100644 index c1dd666..0000000 --- a/ynab-api/src/lib.rs +++ /dev/null @@ -1,10 +0,0 @@ -#[macro_use] -extern crate serde_derive; - -extern crate serde; -extern crate serde_json; -extern crate url; -extern crate reqwest; - -pub mod apis; -pub mod models; diff --git a/ynab-api/src/models/account.rs b/ynab-api/src/models/account.rs deleted file mode 100644 index 6ffa1d5..0000000 --- a/ynab-api/src/models/account.rs +++ /dev/null @@ -1,94 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct Account { - #[serde(rename = "id")] - pub id: String, - #[serde(rename = "name")] - pub name: String, - /// The type of account. Note: payPal, merchantAccount, investmentAccount, and mortgage types have been deprecated and will be removed in the future. - #[serde(rename = "type")] - pub _type: String, - /// Whether this account is on budget or not - #[serde(rename = "on_budget")] - pub on_budget: bool, - /// Whether this account is closed or not - #[serde(rename = "closed")] - pub closed: bool, - #[serde(rename = "note", skip_serializing_if = "Option::is_none")] - pub note: Option, - /// The current balance of the account in milliunits format - #[serde(rename = "balance")] - pub balance: i64, - /// The current cleared balance of the account in milliunits format - #[serde(rename = "cleared_balance")] - pub cleared_balance: i64, - /// The current uncleared balance of the account in milliunits format - #[serde(rename = "uncleared_balance")] - pub uncleared_balance: i64, - /// The payee id which should be used when transferring to this account - #[serde(rename = "transfer_payee_id")] - pub transfer_payee_id: String, - /// Whether or not the account has been deleted. Deleted accounts will only be included in delta requests. - #[serde(rename = "deleted")] - pub deleted: bool, -} - -impl Account { - pub fn new(id: String, name: String, _type: String, on_budget: bool, closed: bool, balance: i64, cleared_balance: i64, uncleared_balance: i64, transfer_payee_id: String, deleted: bool) -> Account { - Account { - id: id, - name: name, - _type: _type, - on_budget: on_budget, - closed: closed, - note: None, - balance: balance, - cleared_balance: cleared_balance, - uncleared_balance: uncleared_balance, - transfer_payee_id: transfer_payee_id, - deleted: deleted, - } - } -} - -/// The type of account. Note: payPal, merchantAccount, investmentAccount, and mortgage types have been deprecated and will be removed in the future. -#[derive(Debug, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "checking")] - Checking, - #[serde(rename = "savings")] - Savings, - #[serde(rename = "cash")] - Cash, - #[serde(rename = "creditCard")] - CreditCard, - #[serde(rename = "lineOfCredit")] - LineOfCredit, - #[serde(rename = "otherAsset")] - OtherAsset, - #[serde(rename = "otherLiability")] - OtherLiability, - #[serde(rename = "payPal")] - PayPal, - #[serde(rename = "merchantAccount")] - MerchantAccount, - #[serde(rename = "investmentAccount")] - InvestmentAccount, - #[serde(rename = "mortgage")] - Mortgage, -} - diff --git a/ynab-api/src/models/account_response.rs b/ynab-api/src/models/account_response.rs deleted file mode 100644 index 633bacb..0000000 --- a/ynab-api/src/models/account_response.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct AccountResponse { - #[serde(rename = "data")] - pub data: ::models::AccountResponseData, -} - -impl AccountResponse { - pub fn new(data: ::models::AccountResponseData) -> AccountResponse { - AccountResponse { - data: data, - } - } -} - - diff --git a/ynab-api/src/models/account_response_data.rs b/ynab-api/src/models/account_response_data.rs deleted file mode 100644 index 9340a0f..0000000 --- a/ynab-api/src/models/account_response_data.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct AccountResponseData { - #[serde(rename = "account")] - pub account: ::models::Account, -} - -impl AccountResponseData { - pub fn new(account: ::models::Account) -> AccountResponseData { - AccountResponseData { - account: account, - } - } -} - - diff --git a/ynab-api/src/models/accounts_response.rs b/ynab-api/src/models/accounts_response.rs deleted file mode 100644 index d2bd25d..0000000 --- a/ynab-api/src/models/accounts_response.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct AccountsResponse { - #[serde(rename = "data")] - pub data: ::models::AccountsResponseData, -} - -impl AccountsResponse { - pub fn new(data: ::models::AccountsResponseData) -> AccountsResponse { - AccountsResponse { - data: data, - } - } -} - - diff --git a/ynab-api/src/models/accounts_response_data.rs b/ynab-api/src/models/accounts_response_data.rs deleted file mode 100644 index 1324953..0000000 --- a/ynab-api/src/models/accounts_response_data.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct AccountsResponseData { - #[serde(rename = "accounts")] - pub accounts: Vec<::models::Account>, - /// The knowledge of the server - #[serde(rename = "server_knowledge")] - pub server_knowledge: i64, -} - -impl AccountsResponseData { - pub fn new(accounts: Vec<::models::Account>, server_knowledge: i64) -> AccountsResponseData { - AccountsResponseData { - accounts: accounts, - server_knowledge: server_knowledge, - } - } -} - - diff --git a/ynab-api/src/models/budget_detail.rs b/ynab-api/src/models/budget_detail.rs deleted file mode 100644 index 8553aad..0000000 --- a/ynab-api/src/models/budget_detail.rs +++ /dev/null @@ -1,81 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct BudgetDetail { - #[serde(rename = "id")] - pub id: String, - #[serde(rename = "name")] - pub name: String, - /// The last time any changes were made to the budget from either a web or mobile client - #[serde(rename = "last_modified_on", skip_serializing_if = "Option::is_none")] - pub last_modified_on: Option, - /// The earliest budget month - #[serde(rename = "first_month", skip_serializing_if = "Option::is_none")] - pub first_month: Option, - /// The latest budget month - #[serde(rename = "last_month", skip_serializing_if = "Option::is_none")] - pub last_month: Option, - #[serde(rename = "date_format", skip_serializing_if = "Option::is_none")] - pub date_format: Option<::models::DateFormat>, - #[serde(rename = "currency_format", skip_serializing_if = "Option::is_none")] - pub currency_format: Option<::models::CurrencyFormat>, - #[serde(rename = "accounts", skip_serializing_if = "Option::is_none")] - pub accounts: Option>, - #[serde(rename = "payees", skip_serializing_if = "Option::is_none")] - pub payees: Option>, - #[serde(rename = "payee_locations", skip_serializing_if = "Option::is_none")] - pub payee_locations: Option>, - #[serde(rename = "category_groups", skip_serializing_if = "Option::is_none")] - pub category_groups: Option>, - #[serde(rename = "categories", skip_serializing_if = "Option::is_none")] - pub categories: Option>, - #[serde(rename = "months", skip_serializing_if = "Option::is_none")] - pub months: Option>, - #[serde(rename = "transactions", skip_serializing_if = "Option::is_none")] - pub transactions: Option>, - #[serde(rename = "subtransactions", skip_serializing_if = "Option::is_none")] - pub subtransactions: Option>, - #[serde(rename = "scheduled_transactions", skip_serializing_if = "Option::is_none")] - pub scheduled_transactions: Option>, - #[serde(rename = "scheduled_subtransactions", skip_serializing_if = "Option::is_none")] - pub scheduled_subtransactions: Option>, -} - -impl BudgetDetail { - pub fn new(id: String, name: String) -> BudgetDetail { - BudgetDetail { - id: id, - name: name, - last_modified_on: None, - first_month: None, - last_month: 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, - } - } -} - - diff --git a/ynab-api/src/models/budget_detail_all_of.rs b/ynab-api/src/models/budget_detail_all_of.rs deleted file mode 100644 index 90a621e..0000000 --- a/ynab-api/src/models/budget_detail_all_of.rs +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct BudgetDetailAllOf { - #[serde(rename = "accounts", skip_serializing_if = "Option::is_none")] - pub accounts: Option>, - #[serde(rename = "payees", skip_serializing_if = "Option::is_none")] - pub payees: Option>, - #[serde(rename = "payee_locations", skip_serializing_if = "Option::is_none")] - pub payee_locations: Option>, - #[serde(rename = "category_groups", skip_serializing_if = "Option::is_none")] - pub category_groups: Option>, - #[serde(rename = "categories", skip_serializing_if = "Option::is_none")] - pub categories: Option>, - #[serde(rename = "months", skip_serializing_if = "Option::is_none")] - pub months: Option>, - #[serde(rename = "transactions", skip_serializing_if = "Option::is_none")] - pub transactions: Option>, - #[serde(rename = "subtransactions", skip_serializing_if = "Option::is_none")] - pub subtransactions: Option>, - #[serde(rename = "scheduled_transactions", skip_serializing_if = "Option::is_none")] - pub scheduled_transactions: Option>, - #[serde(rename = "scheduled_subtransactions", skip_serializing_if = "Option::is_none")] - pub scheduled_subtransactions: Option>, -} - -impl BudgetDetailAllOf { - pub fn new() -> BudgetDetailAllOf { - BudgetDetailAllOf { - accounts: None, - payees: None, - payee_locations: None, - category_groups: None, - categories: None, - months: None, - transactions: None, - subtransactions: None, - scheduled_transactions: None, - scheduled_subtransactions: None, - } - } -} - - diff --git a/ynab-api/src/models/budget_detail_response.rs b/ynab-api/src/models/budget_detail_response.rs deleted file mode 100644 index 5fe15c9..0000000 --- a/ynab-api/src/models/budget_detail_response.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct BudgetDetailResponse { - #[serde(rename = "data")] - pub data: ::models::BudgetDetailResponseData, -} - -impl BudgetDetailResponse { - pub fn new(data: ::models::BudgetDetailResponseData) -> BudgetDetailResponse { - BudgetDetailResponse { - data: data, - } - } -} - - diff --git a/ynab-api/src/models/budget_detail_response_data.rs b/ynab-api/src/models/budget_detail_response_data.rs deleted file mode 100644 index 301479d..0000000 --- a/ynab-api/src/models/budget_detail_response_data.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct BudgetDetailResponseData { - #[serde(rename = "budget")] - pub budget: ::models::BudgetDetail, - /// The knowledge of the server - #[serde(rename = "server_knowledge")] - pub server_knowledge: i64, -} - -impl BudgetDetailResponseData { - pub fn new(budget: ::models::BudgetDetail, server_knowledge: i64) -> BudgetDetailResponseData { - BudgetDetailResponseData { - budget: budget, - server_knowledge: server_knowledge, - } - } -} - - diff --git a/ynab-api/src/models/budget_settings.rs b/ynab-api/src/models/budget_settings.rs deleted file mode 100644 index 25985b5..0000000 --- a/ynab-api/src/models/budget_settings.rs +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct BudgetSettings { - #[serde(rename = "date_format")] - pub date_format: ::models::DateFormat, - #[serde(rename = "currency_format")] - pub currency_format: ::models::CurrencyFormat, -} - -impl BudgetSettings { - pub fn new(date_format: ::models::DateFormat, currency_format: ::models::CurrencyFormat) -> BudgetSettings { - BudgetSettings { - date_format: date_format, - currency_format: currency_format, - } - } -} - - diff --git a/ynab-api/src/models/budget_settings_response.rs b/ynab-api/src/models/budget_settings_response.rs deleted file mode 100644 index c5c0ee3..0000000 --- a/ynab-api/src/models/budget_settings_response.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct BudgetSettingsResponse { - #[serde(rename = "data")] - pub data: ::models::BudgetSettingsResponseData, -} - -impl BudgetSettingsResponse { - pub fn new(data: ::models::BudgetSettingsResponseData) -> BudgetSettingsResponse { - BudgetSettingsResponse { - data: data, - } - } -} - - diff --git a/ynab-api/src/models/budget_settings_response_data.rs b/ynab-api/src/models/budget_settings_response_data.rs deleted file mode 100644 index e484234..0000000 --- a/ynab-api/src/models/budget_settings_response_data.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct BudgetSettingsResponseData { - #[serde(rename = "settings")] - pub settings: ::models::BudgetSettings, -} - -impl BudgetSettingsResponseData { - pub fn new(settings: ::models::BudgetSettings) -> BudgetSettingsResponseData { - BudgetSettingsResponseData { - settings: settings, - } - } -} - - diff --git a/ynab-api/src/models/budget_summary.rs b/ynab-api/src/models/budget_summary.rs deleted file mode 100644 index b380593..0000000 --- a/ynab-api/src/models/budget_summary.rs +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct BudgetSummary { - #[serde(rename = "id")] - pub id: String, - #[serde(rename = "name")] - pub name: String, - /// The last time any changes were made to the budget from either a web or mobile client - #[serde(rename = "last_modified_on", skip_serializing_if = "Option::is_none")] - pub last_modified_on: Option, - /// The earliest budget month - #[serde(rename = "first_month", skip_serializing_if = "Option::is_none")] - pub first_month: Option, - /// The latest budget month - #[serde(rename = "last_month", skip_serializing_if = "Option::is_none")] - pub last_month: Option, - #[serde(rename = "date_format", skip_serializing_if = "Option::is_none")] - pub date_format: Option<::models::DateFormat>, - #[serde(rename = "currency_format", skip_serializing_if = "Option::is_none")] - pub currency_format: Option<::models::CurrencyFormat>, -} - -impl BudgetSummary { - pub fn new(id: String, name: String) -> BudgetSummary { - BudgetSummary { - id: id, - name: name, - last_modified_on: None, - first_month: None, - last_month: None, - date_format: None, - currency_format: None, - } - } -} - - diff --git a/ynab-api/src/models/budget_summary_response.rs b/ynab-api/src/models/budget_summary_response.rs deleted file mode 100644 index 422dfae..0000000 --- a/ynab-api/src/models/budget_summary_response.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct BudgetSummaryResponse { - #[serde(rename = "data")] - pub data: ::models::BudgetSummaryResponseData, -} - -impl BudgetSummaryResponse { - pub fn new(data: ::models::BudgetSummaryResponseData) -> BudgetSummaryResponse { - BudgetSummaryResponse { - data: data, - } - } -} - - diff --git a/ynab-api/src/models/budget_summary_response_data.rs b/ynab-api/src/models/budget_summary_response_data.rs deleted file mode 100644 index f6bec05..0000000 --- a/ynab-api/src/models/budget_summary_response_data.rs +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct BudgetSummaryResponseData { - #[serde(rename = "budgets")] - pub budgets: Vec<::models::BudgetSummary>, - #[serde(rename = "default_budget", skip_serializing_if = "Option::is_none")] - pub default_budget: Option<::models::BudgetSummary>, -} - -impl BudgetSummaryResponseData { - pub fn new(budgets: Vec<::models::BudgetSummary>) -> BudgetSummaryResponseData { - BudgetSummaryResponseData { - budgets: budgets, - default_budget: None, - } - } -} - - diff --git a/ynab-api/src/models/bulk_response.rs b/ynab-api/src/models/bulk_response.rs deleted file mode 100644 index bf98b29..0000000 --- a/ynab-api/src/models/bulk_response.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct BulkResponse { - #[serde(rename = "data")] - pub data: ::models::BulkResponseData, -} - -impl BulkResponse { - pub fn new(data: ::models::BulkResponseData) -> BulkResponse { - BulkResponse { - data: data, - } - } -} - - diff --git a/ynab-api/src/models/bulk_response_data.rs b/ynab-api/src/models/bulk_response_data.rs deleted file mode 100644 index e347af0..0000000 --- a/ynab-api/src/models/bulk_response_data.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct BulkResponseData { - #[serde(rename = "bulk")] - pub bulk: ::models::BulkResponseDataBulk, -} - -impl BulkResponseData { - pub fn new(bulk: ::models::BulkResponseDataBulk) -> BulkResponseData { - BulkResponseData { - bulk: bulk, - } - } -} - - diff --git a/ynab-api/src/models/bulk_response_data_bulk.rs b/ynab-api/src/models/bulk_response_data_bulk.rs deleted file mode 100644 index 3993078..0000000 --- a/ynab-api/src/models/bulk_response_data_bulk.rs +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct BulkResponseDataBulk { - /// The list of Transaction ids that were created. - #[serde(rename = "transaction_ids")] - pub transaction_ids: Vec, - /// 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. - #[serde(rename = "duplicate_import_ids")] - pub duplicate_import_ids: Vec, -} - -impl BulkResponseDataBulk { - pub fn new(transaction_ids: Vec, duplicate_import_ids: Vec) -> BulkResponseDataBulk { - BulkResponseDataBulk { - transaction_ids: transaction_ids, - duplicate_import_ids: duplicate_import_ids, - } - } -} - - diff --git a/ynab-api/src/models/bulk_transactions.rs b/ynab-api/src/models/bulk_transactions.rs deleted file mode 100644 index e80c1c3..0000000 --- a/ynab-api/src/models/bulk_transactions.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct BulkTransactions { - #[serde(rename = "transactions")] - pub transactions: Vec<::models::SaveTransaction>, -} - -impl BulkTransactions { - pub fn new(transactions: Vec<::models::SaveTransaction>) -> BulkTransactions { - BulkTransactions { - transactions: transactions, - } - } -} - - diff --git a/ynab-api/src/models/categories_response.rs b/ynab-api/src/models/categories_response.rs deleted file mode 100644 index 08fbafd..0000000 --- a/ynab-api/src/models/categories_response.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct CategoriesResponse { - #[serde(rename = "data")] - pub data: ::models::CategoriesResponseData, -} - -impl CategoriesResponse { - pub fn new(data: ::models::CategoriesResponseData) -> CategoriesResponse { - CategoriesResponse { - data: data, - } - } -} - - diff --git a/ynab-api/src/models/categories_response_data.rs b/ynab-api/src/models/categories_response_data.rs deleted file mode 100644 index 980505e..0000000 --- a/ynab-api/src/models/categories_response_data.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct CategoriesResponseData { - #[serde(rename = "category_groups")] - pub category_groups: Vec<::models::CategoryGroupWithCategories>, - /// The knowledge of the server - #[serde(rename = "server_knowledge")] - pub server_knowledge: i64, -} - -impl CategoriesResponseData { - pub fn new(category_groups: Vec<::models::CategoryGroupWithCategories>, server_knowledge: i64) -> CategoriesResponseData { - CategoriesResponseData { - category_groups: category_groups, - server_knowledge: server_knowledge, - } - } -} - - diff --git a/ynab-api/src/models/category.rs b/ynab-api/src/models/category.rs deleted file mode 100644 index 1a62c6a..0000000 --- a/ynab-api/src/models/category.rs +++ /dev/null @@ -1,93 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct Category { - #[serde(rename = "id")] - pub id: String, - #[serde(rename = "category_group_id")] - pub category_group_id: String, - #[serde(rename = "name")] - pub name: String, - /// Whether or not the category is hidden - #[serde(rename = "hidden")] - pub hidden: bool, - /// If category is hidden this is the id of the category group it originally belonged to before it was hidden. - #[serde(rename = "original_category_group_id", skip_serializing_if = "Option::is_none")] - pub original_category_group_id: Option, - #[serde(rename = "note", skip_serializing_if = "Option::is_none")] - pub note: Option, - /// Budgeted amount in milliunits format - #[serde(rename = "budgeted")] - pub budgeted: i64, - /// Activity amount in milliunits format - #[serde(rename = "activity")] - pub activity: i64, - /// Balance in milliunits format - #[serde(rename = "balance")] - pub balance: i64, - /// The type of goal, if the cagegory has a goal (TB=Target Category Balance, TBD=Target Category Balance by Date, MF=Monthly Funding) - #[serde(rename = "goal_type", skip_serializing_if = "Option::is_none")] - pub goal_type: Option, - /// The month a goal was created - #[serde(rename = "goal_creation_month", skip_serializing_if = "Option::is_none")] - pub goal_creation_month: Option, - /// The goal target amount in milliunits - #[serde(rename = "goal_target")] - pub goal_target: i64, - /// If the goal type is 'TBD' (Target Category Balance by Date), this is the target month for the goal to be completed - #[serde(rename = "goal_target_month", skip_serializing_if = "Option::is_none")] - pub goal_target_month: Option, - /// The percentage completion of the goal - #[serde(rename = "goal_percentage_complete", skip_serializing_if = "Option::is_none")] - pub goal_percentage_complete: Option, - /// Whether or not the category has been deleted. Deleted categories will only be included in delta requests. - #[serde(rename = "deleted")] - pub deleted: bool, -} - -impl Category { - pub fn new(id: String, category_group_id: String, name: String, hidden: bool, budgeted: i64, activity: i64, balance: i64, goal_target: i64, deleted: bool) -> Category { - Category { - id: id, - category_group_id: category_group_id, - name: name, - hidden: hidden, - original_category_group_id: None, - note: None, - budgeted: budgeted, - activity: activity, - balance: balance, - goal_type: None, - goal_creation_month: None, - goal_target: goal_target, - goal_target_month: None, - goal_percentage_complete: None, - deleted: deleted, - } - } -} - -/// The type of goal, if the cagegory has a goal (TB=Target Category Balance, TBD=Target Category Balance by Date, MF=Monthly Funding) -#[derive(Debug, Serialize, Deserialize)] -pub enum GoalType { - #[serde(rename = "TB")] - TB, - #[serde(rename = "TBD")] - TBD, - #[serde(rename = "MF")] - MF, -} - diff --git a/ynab-api/src/models/category_group.rs b/ynab-api/src/models/category_group.rs deleted file mode 100644 index 2f674e2..0000000 --- a/ynab-api/src/models/category_group.rs +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct CategoryGroup { - #[serde(rename = "id")] - pub id: String, - #[serde(rename = "name")] - pub name: String, - /// Whether or not the category group is hidden - #[serde(rename = "hidden")] - pub hidden: bool, - /// Whether or not the category group has been deleted. Deleted category groups will only be included in delta requests. - #[serde(rename = "deleted")] - pub deleted: bool, -} - -impl CategoryGroup { - pub fn new(id: String, name: String, hidden: bool, deleted: bool) -> CategoryGroup { - CategoryGroup { - id: id, - name: name, - hidden: hidden, - deleted: deleted, - } - } -} - - diff --git a/ynab-api/src/models/category_group_with_categories.rs b/ynab-api/src/models/category_group_with_categories.rs deleted file mode 100644 index 38cfd88..0000000 --- a/ynab-api/src/models/category_group_with_categories.rs +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct CategoryGroupWithCategories { - #[serde(rename = "id")] - pub id: String, - #[serde(rename = "name")] - pub name: String, - /// Whether or not the category group is hidden - #[serde(rename = "hidden")] - pub hidden: bool, - /// Whether or not the category group has been deleted. Deleted category groups will only be included in delta requests. - #[serde(rename = "deleted")] - pub deleted: bool, - /// Category group categories. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC). - #[serde(rename = "categories")] - pub categories: Vec<::models::Category>, -} - -impl CategoryGroupWithCategories { - pub fn new(id: String, name: String, hidden: bool, deleted: bool, categories: Vec<::models::Category>) -> CategoryGroupWithCategories { - CategoryGroupWithCategories { - id: id, - name: name, - hidden: hidden, - deleted: deleted, - categories: categories, - } - } -} - - diff --git a/ynab-api/src/models/category_group_with_categories_all_of.rs b/ynab-api/src/models/category_group_with_categories_all_of.rs deleted file mode 100644 index f34d3bb..0000000 --- a/ynab-api/src/models/category_group_with_categories_all_of.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct CategoryGroupWithCategoriesAllOf { - /// Category group categories. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC). - #[serde(rename = "categories")] - pub categories: Vec<::models::Category>, -} - -impl CategoryGroupWithCategoriesAllOf { - pub fn new(categories: Vec<::models::Category>) -> CategoryGroupWithCategoriesAllOf { - CategoryGroupWithCategoriesAllOf { - categories: categories, - } - } -} - - diff --git a/ynab-api/src/models/category_response.rs b/ynab-api/src/models/category_response.rs deleted file mode 100644 index 35f2f40..0000000 --- a/ynab-api/src/models/category_response.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct CategoryResponse { - #[serde(rename = "data")] - pub data: ::models::CategoryResponseData, -} - -impl CategoryResponse { - pub fn new(data: ::models::CategoryResponseData) -> CategoryResponse { - CategoryResponse { - data: data, - } - } -} - - diff --git a/ynab-api/src/models/category_response_data.rs b/ynab-api/src/models/category_response_data.rs deleted file mode 100644 index 4e81fbb..0000000 --- a/ynab-api/src/models/category_response_data.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct CategoryResponseData { - #[serde(rename = "category")] - pub category: ::models::Category, -} - -impl CategoryResponseData { - pub fn new(category: ::models::Category) -> CategoryResponseData { - CategoryResponseData { - category: category, - } - } -} - - diff --git a/ynab-api/src/models/currency_format.rs b/ynab-api/src/models/currency_format.rs deleted file mode 100644 index 476856a..0000000 --- a/ynab-api/src/models/currency_format.rs +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -/// CurrencyFormat : The currency format setting for the budget. In some cases the format will not be available and will be specified as null. - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct CurrencyFormat { - #[serde(rename = "iso_code")] - pub iso_code: String, - #[serde(rename = "example_format")] - pub example_format: String, - #[serde(rename = "decimal_digits")] - pub decimal_digits: i32, - #[serde(rename = "decimal_separator")] - pub decimal_separator: String, - #[serde(rename = "symbol_first")] - pub symbol_first: bool, - #[serde(rename = "group_separator")] - pub group_separator: String, - #[serde(rename = "currency_symbol")] - pub currency_symbol: String, - #[serde(rename = "display_symbol")] - pub display_symbol: bool, -} - -impl CurrencyFormat { - /// The currency format setting for the budget. In some cases the format will not be available and will be specified as null. - pub fn new(iso_code: String, example_format: String, decimal_digits: i32, decimal_separator: String, symbol_first: bool, group_separator: String, currency_symbol: String, display_symbol: bool) -> CurrencyFormat { - CurrencyFormat { - iso_code: iso_code, - example_format: example_format, - decimal_digits: decimal_digits, - decimal_separator: decimal_separator, - symbol_first: symbol_first, - group_separator: group_separator, - currency_symbol: currency_symbol, - display_symbol: display_symbol, - } - } -} - - diff --git a/ynab-api/src/models/date_format.rs b/ynab-api/src/models/date_format.rs deleted file mode 100644 index cf88395..0000000 --- a/ynab-api/src/models/date_format.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - -/// DateFormat : The date format setting for the budget. In some cases the format will not be available and will be specified as null. - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct DateFormat { - #[serde(rename = "format")] - pub format: String, -} - -impl DateFormat { - /// The date format setting for the budget. In some cases the format will not be available and will be specified as null. - pub fn new(format: String) -> DateFormat { - DateFormat { - format: format, - } - } -} - - diff --git a/ynab-api/src/models/error_detail.rs b/ynab-api/src/models/error_detail.rs deleted file mode 100644 index 4745cf3..0000000 --- a/ynab-api/src/models/error_detail.rs +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct ErrorDetail { - #[serde(rename = "id")] - pub id: String, - #[serde(rename = "name")] - pub name: String, - #[serde(rename = "detail")] - pub detail: String, -} - -impl ErrorDetail { - pub fn new(id: String, name: String, detail: String) -> ErrorDetail { - ErrorDetail { - id: id, - name: name, - detail: detail, - } - } -} - - diff --git a/ynab-api/src/models/error_response.rs b/ynab-api/src/models/error_response.rs deleted file mode 100644 index c321726..0000000 --- a/ynab-api/src/models/error_response.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct ErrorResponse { - #[serde(rename = "error")] - pub error: ::models::ErrorDetail, -} - -impl ErrorResponse { - pub fn new(error: ::models::ErrorDetail) -> ErrorResponse { - ErrorResponse { - error: error, - } - } -} - - diff --git a/ynab-api/src/models/hybrid_transaction.rs b/ynab-api/src/models/hybrid_transaction.rs deleted file mode 100644 index 802813b..0000000 --- a/ynab-api/src/models/hybrid_transaction.rs +++ /dev/null @@ -1,133 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct HybridTransaction { - #[serde(rename = "id")] - pub id: String, - /// The transaction date in ISO format (e.g. 2016-12-01) - #[serde(rename = "date")] - pub date: String, - /// The transaction amount in milliunits format - #[serde(rename = "amount")] - pub amount: i64, - #[serde(rename = "memo", skip_serializing_if = "Option::is_none")] - pub memo: Option, - /// The cleared status of the transaction - #[serde(rename = "cleared")] - pub cleared: String, - /// Whether or not the transaction is approved - #[serde(rename = "approved")] - pub approved: bool, - /// The transaction flag - #[serde(rename = "flag_color", skip_serializing_if = "Option::is_none")] - pub flag_color: Option, - #[serde(rename = "account_id")] - pub account_id: String, - #[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")] - pub payee_id: Option, - #[serde(rename = "category_id", skip_serializing_if = "Option::is_none")] - pub category_id: Option, - /// If a transfer transaction, the account to which it transfers - #[serde(rename = "transfer_account_id", skip_serializing_if = "Option::is_none")] - pub transfer_account_id: Option, - /// If a transfer transaction, the id of transaction on the other side of the transfer - #[serde(rename = "transfer_transaction_id", skip_serializing_if = "Option::is_none")] - pub transfer_transaction_id: Option, - /// If transaction is matched, the id of the matched transaction - #[serde(rename = "matched_transaction_id", skip_serializing_if = "Option::is_none")] - pub matched_transaction_id: Option, - /// If the Transaction was imported, this field is a unique (by account) import identifier. If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. - #[serde(rename = "import_id", skip_serializing_if = "Option::is_none")] - pub import_id: Option, - /// Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests. - #[serde(rename = "deleted")] - pub deleted: bool, - /// Whether the hybrid transaction represents a regular transaction or a subtransaction - #[serde(rename = "type")] - pub _type: String, - /// For subtransaction types, this is the id of the pararent transaction. For transaction types, this id will be always be null. - #[serde(rename = "parent_transaction_id", skip_serializing_if = "Option::is_none")] - pub parent_transaction_id: Option, - #[serde(rename = "account_name")] - pub account_name: String, - #[serde(rename = "payee_name", skip_serializing_if = "Option::is_none")] - pub payee_name: Option, - #[serde(rename = "category_name")] - pub category_name: String, -} - -impl HybridTransaction { - pub fn new(id: String, date: String, amount: i64, cleared: String, approved: bool, account_id: String, deleted: bool, _type: String, account_name: String, category_name: String) -> HybridTransaction { - HybridTransaction { - id: id, - date: date, - amount: amount, - memo: None, - cleared: cleared, - approved: approved, - flag_color: None, - account_id: account_id, - payee_id: None, - category_id: None, - transfer_account_id: None, - transfer_transaction_id: None, - matched_transaction_id: None, - import_id: None, - deleted: deleted, - _type: _type, - parent_transaction_id: None, - account_name: account_name, - payee_name: None, - category_name: category_name, - } - } -} - -/// The cleared status of the transaction -#[derive(Debug, Serialize, Deserialize)] -pub enum Cleared { - #[serde(rename = "cleared")] - Cleared, - #[serde(rename = "uncleared")] - Uncleared, - #[serde(rename = "reconciled")] - Reconciled, -} -/// The transaction flag -#[derive(Debug, Serialize, Deserialize)] -pub enum FlagColor { - #[serde(rename = "red")] - Red, - #[serde(rename = "orange")] - Orange, - #[serde(rename = "yellow")] - Yellow, - #[serde(rename = "green")] - Green, - #[serde(rename = "blue")] - Blue, - #[serde(rename = "purple")] - Purple, -} -/// Whether the hybrid transaction represents a regular transaction or a subtransaction -#[derive(Debug, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "transaction")] - Transaction, - #[serde(rename = "subtransaction")] - Subtransaction, -} - diff --git a/ynab-api/src/models/hybrid_transaction_all_of.rs b/ynab-api/src/models/hybrid_transaction_all_of.rs deleted file mode 100644 index 42fd515..0000000 --- a/ynab-api/src/models/hybrid_transaction_all_of.rs +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct HybridTransactionAllOf { - /// Whether the hybrid transaction represents a regular transaction or a subtransaction - #[serde(rename = "type")] - pub _type: String, - /// For subtransaction types, this is the id of the pararent transaction. For transaction types, this id will be always be null. - #[serde(rename = "parent_transaction_id", skip_serializing_if = "Option::is_none")] - pub parent_transaction_id: Option, - #[serde(rename = "account_name")] - pub account_name: String, - #[serde(rename = "payee_name", skip_serializing_if = "Option::is_none")] - pub payee_name: Option, - #[serde(rename = "category_name")] - pub category_name: String, -} - -impl HybridTransactionAllOf { - pub fn new(_type: String, account_name: String, category_name: String) -> HybridTransactionAllOf { - HybridTransactionAllOf { - _type: _type, - parent_transaction_id: None, - account_name: account_name, - payee_name: None, - category_name: category_name, - } - } -} - -/// Whether the hybrid transaction represents a regular transaction or a subtransaction -#[derive(Debug, Serialize, Deserialize)] -pub enum Type { - #[serde(rename = "transaction")] - Transaction, - #[serde(rename = "subtransaction")] - Subtransaction, -} - diff --git a/ynab-api/src/models/hybrid_transactions_response.rs b/ynab-api/src/models/hybrid_transactions_response.rs deleted file mode 100644 index 493582e..0000000 --- a/ynab-api/src/models/hybrid_transactions_response.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct HybridTransactionsResponse { - #[serde(rename = "data")] - pub data: ::models::HybridTransactionsResponseData, -} - -impl HybridTransactionsResponse { - pub fn new(data: ::models::HybridTransactionsResponseData) -> HybridTransactionsResponse { - HybridTransactionsResponse { - data: data, - } - } -} - - diff --git a/ynab-api/src/models/hybrid_transactions_response_data.rs b/ynab-api/src/models/hybrid_transactions_response_data.rs deleted file mode 100644 index 8e329e4..0000000 --- a/ynab-api/src/models/hybrid_transactions_response_data.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct HybridTransactionsResponseData { - #[serde(rename = "transactions")] - pub transactions: Vec<::models::HybridTransaction>, -} - -impl HybridTransactionsResponseData { - pub fn new(transactions: Vec<::models::HybridTransaction>) -> HybridTransactionsResponseData { - HybridTransactionsResponseData { - transactions: transactions, - } - } -} - - diff --git a/ynab-api/src/models/mod.rs b/ynab-api/src/models/mod.rs deleted file mode 100644 index ba8b351..0000000 --- a/ynab-api/src/models/mod.rs +++ /dev/null @@ -1,168 +0,0 @@ -mod account; -pub use self::account::Account; -mod account_response; -pub use self::account_response::AccountResponse; -mod account_response_data; -pub use self::account_response_data::AccountResponseData; -mod accounts_response; -pub use self::accounts_response::AccountsResponse; -mod accounts_response_data; -pub use self::accounts_response_data::AccountsResponseData; -mod budget_detail; -pub use self::budget_detail::BudgetDetail; -mod budget_detail_all_of; -pub use self::budget_detail_all_of::BudgetDetailAllOf; -mod budget_detail_response; -pub use self::budget_detail_response::BudgetDetailResponse; -mod budget_detail_response_data; -pub use self::budget_detail_response_data::BudgetDetailResponseData; -mod budget_settings; -pub use self::budget_settings::BudgetSettings; -mod budget_settings_response; -pub use self::budget_settings_response::BudgetSettingsResponse; -mod budget_settings_response_data; -pub use self::budget_settings_response_data::BudgetSettingsResponseData; -mod budget_summary; -pub use self::budget_summary::BudgetSummary; -mod budget_summary_response; -pub use self::budget_summary_response::BudgetSummaryResponse; -mod budget_summary_response_data; -pub use self::budget_summary_response_data::BudgetSummaryResponseData; -mod bulk_response; -pub use self::bulk_response::BulkResponse; -mod bulk_response_data; -pub use self::bulk_response_data::BulkResponseData; -mod bulk_response_data_bulk; -pub use self::bulk_response_data_bulk::BulkResponseDataBulk; -mod bulk_transactions; -pub use self::bulk_transactions::BulkTransactions; -mod categories_response; -pub use self::categories_response::CategoriesResponse; -mod categories_response_data; -pub use self::categories_response_data::CategoriesResponseData; -mod category; -pub use self::category::Category; -mod category_group; -pub use self::category_group::CategoryGroup; -mod category_group_with_categories; -pub use self::category_group_with_categories::CategoryGroupWithCategories; -mod category_group_with_categories_all_of; -pub use self::category_group_with_categories_all_of::CategoryGroupWithCategoriesAllOf; -mod category_response; -pub use self::category_response::CategoryResponse; -mod category_response_data; -pub use self::category_response_data::CategoryResponseData; -mod currency_format; -pub use self::currency_format::CurrencyFormat; -mod date_format; -pub use self::date_format::DateFormat; -mod error_detail; -pub use self::error_detail::ErrorDetail; -mod error_response; -pub use self::error_response::ErrorResponse; -mod hybrid_transaction; -pub use self::hybrid_transaction::HybridTransaction; -mod hybrid_transaction_all_of; -pub use self::hybrid_transaction_all_of::HybridTransactionAllOf; -mod hybrid_transactions_response; -pub use self::hybrid_transactions_response::HybridTransactionsResponse; -mod hybrid_transactions_response_data; -pub use self::hybrid_transactions_response_data::HybridTransactionsResponseData; -mod month_detail; -pub use self::month_detail::MonthDetail; -mod month_detail_all_of; -pub use self::month_detail_all_of::MonthDetailAllOf; -mod month_detail_response; -pub use self::month_detail_response::MonthDetailResponse; -mod month_detail_response_data; -pub use self::month_detail_response_data::MonthDetailResponseData; -mod month_summaries_response; -pub use self::month_summaries_response::MonthSummariesResponse; -mod month_summaries_response_data; -pub use self::month_summaries_response_data::MonthSummariesResponseData; -mod month_summary; -pub use self::month_summary::MonthSummary; -mod payee; -pub use self::payee::Payee; -mod payee_location; -pub use self::payee_location::PayeeLocation; -mod payee_location_response; -pub use self::payee_location_response::PayeeLocationResponse; -mod payee_location_response_data; -pub use self::payee_location_response_data::PayeeLocationResponseData; -mod payee_locations_response; -pub use self::payee_locations_response::PayeeLocationsResponse; -mod payee_locations_response_data; -pub use self::payee_locations_response_data::PayeeLocationsResponseData; -mod payee_response; -pub use self::payee_response::PayeeResponse; -mod payee_response_data; -pub use self::payee_response_data::PayeeResponseData; -mod payees_response; -pub use self::payees_response::PayeesResponse; -mod payees_response_data; -pub use self::payees_response_data::PayeesResponseData; -mod save_category_response; -pub use self::save_category_response::SaveCategoryResponse; -mod save_category_response_data; -pub use self::save_category_response_data::SaveCategoryResponseData; -mod save_month_category; -pub use self::save_month_category::SaveMonthCategory; -mod save_month_category_wrapper; -pub use self::save_month_category_wrapper::SaveMonthCategoryWrapper; -mod save_transaction; -pub use self::save_transaction::SaveTransaction; -mod save_transaction_wrapper; -pub use self::save_transaction_wrapper::SaveTransactionWrapper; -mod save_transactions_response; -pub use self::save_transactions_response::SaveTransactionsResponse; -mod save_transactions_response_data; -pub use self::save_transactions_response_data::SaveTransactionsResponseData; -mod save_transactions_wrapper; -pub use self::save_transactions_wrapper::SaveTransactionsWrapper; -mod scheduled_sub_transaction; -pub use self::scheduled_sub_transaction::ScheduledSubTransaction; -mod scheduled_transaction_detail; -pub use self::scheduled_transaction_detail::ScheduledTransactionDetail; -mod scheduled_transaction_detail_all_of; -pub use self::scheduled_transaction_detail_all_of::ScheduledTransactionDetailAllOf; -mod scheduled_transaction_response; -pub use self::scheduled_transaction_response::ScheduledTransactionResponse; -mod scheduled_transaction_response_data; -pub use self::scheduled_transaction_response_data::ScheduledTransactionResponseData; -mod scheduled_transaction_summary; -pub use self::scheduled_transaction_summary::ScheduledTransactionSummary; -mod scheduled_transactions_response; -pub use self::scheduled_transactions_response::ScheduledTransactionsResponse; -mod scheduled_transactions_response_data; -pub use self::scheduled_transactions_response_data::ScheduledTransactionsResponseData; -mod sub_transaction; -pub use self::sub_transaction::SubTransaction; -mod transaction_detail; -pub use self::transaction_detail::TransactionDetail; -mod transaction_detail_all_of; -pub use self::transaction_detail_all_of::TransactionDetailAllOf; -mod transaction_response; -pub use self::transaction_response::TransactionResponse; -mod transaction_response_data; -pub use self::transaction_response_data::TransactionResponseData; -mod transaction_summary; -pub use self::transaction_summary::TransactionSummary; -mod transactions_response; -pub use self::transactions_response::TransactionsResponse; -mod transactions_response_data; -pub use self::transactions_response_data::TransactionsResponseData; -mod update_transaction; -pub use self::update_transaction::UpdateTransaction; -mod update_transaction_wrapper; -pub use self::update_transaction_wrapper::UpdateTransactionWrapper; -mod update_transactions_response; -pub use self::update_transactions_response::UpdateTransactionsResponse; -mod update_transactions_wrapper; -pub use self::update_transactions_wrapper::UpdateTransactionsWrapper; -mod user; -pub use self::user::User; -mod user_response; -pub use self::user_response::UserResponse; -mod user_response_data; -pub use self::user_response_data::UserResponseData; diff --git a/ynab-api/src/models/month_detail.rs b/ynab-api/src/models/month_detail.rs deleted file mode 100644 index a6f55d4..0000000 --- a/ynab-api/src/models/month_detail.rs +++ /dev/null @@ -1,61 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct MonthDetail { - #[serde(rename = "month")] - pub month: String, - #[serde(rename = "note", skip_serializing_if = "Option::is_none")] - pub note: Option, - /// The total amount in transactions categorized to 'Inflow: To be Budgeted' in the month - #[serde(rename = "income")] - pub income: i64, - /// The total amount budgeted in the month - #[serde(rename = "budgeted")] - pub budgeted: i64, - /// The total amount in transactions in the month, excluding those categorized to 'Inflow: To be Budgeted' - #[serde(rename = "activity")] - pub activity: i64, - /// The available amount for 'To be Budgeted' - #[serde(rename = "to_be_budgeted")] - pub to_be_budgeted: i64, - /// The Age of Money as of the month - #[serde(rename = "age_of_money", skip_serializing_if = "Option::is_none")] - pub age_of_money: Option, - /// Whether or not the month has been deleted. Deleted months will only be included in delta requests. - #[serde(rename = "deleted")] - pub deleted: bool, - /// The budget month categories. Amounts (budgeted, activity, balance, etc.) are specific to the {month} parameter specified. - #[serde(rename = "categories")] - pub categories: Vec<::models::Category>, -} - -impl MonthDetail { - pub fn new(month: String, income: i64, budgeted: i64, activity: i64, to_be_budgeted: i64, deleted: bool, categories: Vec<::models::Category>) -> MonthDetail { - MonthDetail { - month: month, - note: None, - income: income, - budgeted: budgeted, - activity: activity, - to_be_budgeted: to_be_budgeted, - age_of_money: None, - deleted: deleted, - categories: categories, - } - } -} - - diff --git a/ynab-api/src/models/month_detail_all_of.rs b/ynab-api/src/models/month_detail_all_of.rs deleted file mode 100644 index 0f07326..0000000 --- a/ynab-api/src/models/month_detail_all_of.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct MonthDetailAllOf { - /// The budget month categories. Amounts (budgeted, activity, balance, etc.) are specific to the {month} parameter specified. - #[serde(rename = "categories")] - pub categories: Vec<::models::Category>, -} - -impl MonthDetailAllOf { - pub fn new(categories: Vec<::models::Category>) -> MonthDetailAllOf { - MonthDetailAllOf { - categories: categories, - } - } -} - - diff --git a/ynab-api/src/models/month_detail_response.rs b/ynab-api/src/models/month_detail_response.rs deleted file mode 100644 index c144afb..0000000 --- a/ynab-api/src/models/month_detail_response.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct MonthDetailResponse { - #[serde(rename = "data")] - pub data: ::models::MonthDetailResponseData, -} - -impl MonthDetailResponse { - pub fn new(data: ::models::MonthDetailResponseData) -> MonthDetailResponse { - MonthDetailResponse { - data: data, - } - } -} - - diff --git a/ynab-api/src/models/month_detail_response_data.rs b/ynab-api/src/models/month_detail_response_data.rs deleted file mode 100644 index 0948763..0000000 --- a/ynab-api/src/models/month_detail_response_data.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct MonthDetailResponseData { - #[serde(rename = "month")] - pub month: ::models::MonthDetail, -} - -impl MonthDetailResponseData { - pub fn new(month: ::models::MonthDetail) -> MonthDetailResponseData { - MonthDetailResponseData { - month: month, - } - } -} - - diff --git a/ynab-api/src/models/month_summaries_response.rs b/ynab-api/src/models/month_summaries_response.rs deleted file mode 100644 index 44d5d66..0000000 --- a/ynab-api/src/models/month_summaries_response.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct MonthSummariesResponse { - #[serde(rename = "data")] - pub data: ::models::MonthSummariesResponseData, -} - -impl MonthSummariesResponse { - pub fn new(data: ::models::MonthSummariesResponseData) -> MonthSummariesResponse { - MonthSummariesResponse { - data: data, - } - } -} - - diff --git a/ynab-api/src/models/month_summaries_response_data.rs b/ynab-api/src/models/month_summaries_response_data.rs deleted file mode 100644 index 6237601..0000000 --- a/ynab-api/src/models/month_summaries_response_data.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct MonthSummariesResponseData { - #[serde(rename = "months")] - pub months: Vec<::models::MonthSummary>, - /// The knowledge of the server - #[serde(rename = "server_knowledge")] - pub server_knowledge: i64, -} - -impl MonthSummariesResponseData { - pub fn new(months: Vec<::models::MonthSummary>, server_knowledge: i64) -> MonthSummariesResponseData { - MonthSummariesResponseData { - months: months, - server_knowledge: server_knowledge, - } - } -} - - diff --git a/ynab-api/src/models/month_summary.rs b/ynab-api/src/models/month_summary.rs deleted file mode 100644 index 3c705d3..0000000 --- a/ynab-api/src/models/month_summary.rs +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct MonthSummary { - #[serde(rename = "month")] - pub month: String, - #[serde(rename = "note", skip_serializing_if = "Option::is_none")] - pub note: Option, - /// The total amount in transactions categorized to 'Inflow: To be Budgeted' in the month - #[serde(rename = "income")] - pub income: i64, - /// The total amount budgeted in the month - #[serde(rename = "budgeted")] - pub budgeted: i64, - /// The total amount in transactions in the month, excluding those categorized to 'Inflow: To be Budgeted' - #[serde(rename = "activity")] - pub activity: i64, - /// The available amount for 'To be Budgeted' - #[serde(rename = "to_be_budgeted")] - pub to_be_budgeted: i64, - /// The Age of Money as of the month - #[serde(rename = "age_of_money", skip_serializing_if = "Option::is_none")] - pub age_of_money: Option, - /// Whether or not the month has been deleted. Deleted months will only be included in delta requests. - #[serde(rename = "deleted")] - pub deleted: bool, -} - -impl MonthSummary { - pub fn new(month: String, income: i64, budgeted: i64, activity: i64, to_be_budgeted: i64, deleted: bool) -> MonthSummary { - MonthSummary { - month: month, - note: None, - income: income, - budgeted: budgeted, - activity: activity, - to_be_budgeted: to_be_budgeted, - age_of_money: None, - deleted: deleted, - } - } -} - - diff --git a/ynab-api/src/models/payee.rs b/ynab-api/src/models/payee.rs deleted file mode 100644 index 13ad103..0000000 --- a/ynab-api/src/models/payee.rs +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct Payee { - #[serde(rename = "id")] - pub id: String, - #[serde(rename = "name")] - pub name: String, - /// If a transfer payee, the account_id to which this payee transfers to - #[serde(rename = "transfer_account_id", skip_serializing_if = "Option::is_none")] - pub transfer_account_id: Option, - /// Whether or not the payee has been deleted. Deleted payees will only be included in delta requests. - #[serde(rename = "deleted")] - pub deleted: bool, -} - -impl Payee { - pub fn new(id: String, name: String, deleted: bool) -> Payee { - Payee { - id: id, - name: name, - transfer_account_id: None, - deleted: deleted, - } - } -} - - diff --git a/ynab-api/src/models/payee_location.rs b/ynab-api/src/models/payee_location.rs deleted file mode 100644 index afb050e..0000000 --- a/ynab-api/src/models/payee_location.rs +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct PayeeLocation { - #[serde(rename = "id")] - pub id: String, - #[serde(rename = "payee_id")] - pub payee_id: String, - #[serde(rename = "latitude")] - pub latitude: String, - #[serde(rename = "longitude")] - pub longitude: String, - /// Whether or not the payee location has been deleted. Deleted payee locations will only be included in delta requests. - #[serde(rename = "deleted")] - pub deleted: bool, -} - -impl PayeeLocation { - pub fn new(id: String, payee_id: String, latitude: String, longitude: String, deleted: bool) -> PayeeLocation { - PayeeLocation { - id: id, - payee_id: payee_id, - latitude: latitude, - longitude: longitude, - deleted: deleted, - } - } -} - - diff --git a/ynab-api/src/models/payee_location_response.rs b/ynab-api/src/models/payee_location_response.rs deleted file mode 100644 index e6d2608..0000000 --- a/ynab-api/src/models/payee_location_response.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct PayeeLocationResponse { - #[serde(rename = "data")] - pub data: ::models::PayeeLocationResponseData, -} - -impl PayeeLocationResponse { - pub fn new(data: ::models::PayeeLocationResponseData) -> PayeeLocationResponse { - PayeeLocationResponse { - data: data, - } - } -} - - diff --git a/ynab-api/src/models/payee_location_response_data.rs b/ynab-api/src/models/payee_location_response_data.rs deleted file mode 100644 index 869c4ea..0000000 --- a/ynab-api/src/models/payee_location_response_data.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct PayeeLocationResponseData { - #[serde(rename = "payee_location")] - pub payee_location: ::models::PayeeLocation, -} - -impl PayeeLocationResponseData { - pub fn new(payee_location: ::models::PayeeLocation) -> PayeeLocationResponseData { - PayeeLocationResponseData { - payee_location: payee_location, - } - } -} - - diff --git a/ynab-api/src/models/payee_locations_response.rs b/ynab-api/src/models/payee_locations_response.rs deleted file mode 100644 index 916a19e..0000000 --- a/ynab-api/src/models/payee_locations_response.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct PayeeLocationsResponse { - #[serde(rename = "data")] - pub data: ::models::PayeeLocationsResponseData, -} - -impl PayeeLocationsResponse { - pub fn new(data: ::models::PayeeLocationsResponseData) -> PayeeLocationsResponse { - PayeeLocationsResponse { - data: data, - } - } -} - - diff --git a/ynab-api/src/models/payee_locations_response_data.rs b/ynab-api/src/models/payee_locations_response_data.rs deleted file mode 100644 index ea46038..0000000 --- a/ynab-api/src/models/payee_locations_response_data.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct PayeeLocationsResponseData { - #[serde(rename = "payee_locations")] - pub payee_locations: Vec<::models::PayeeLocation>, -} - -impl PayeeLocationsResponseData { - pub fn new(payee_locations: Vec<::models::PayeeLocation>) -> PayeeLocationsResponseData { - PayeeLocationsResponseData { - payee_locations: payee_locations, - } - } -} - - diff --git a/ynab-api/src/models/payee_response.rs b/ynab-api/src/models/payee_response.rs deleted file mode 100644 index 690913a..0000000 --- a/ynab-api/src/models/payee_response.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct PayeeResponse { - #[serde(rename = "data")] - pub data: ::models::PayeeResponseData, -} - -impl PayeeResponse { - pub fn new(data: ::models::PayeeResponseData) -> PayeeResponse { - PayeeResponse { - data: data, - } - } -} - - diff --git a/ynab-api/src/models/payee_response_data.rs b/ynab-api/src/models/payee_response_data.rs deleted file mode 100644 index f19f7ea..0000000 --- a/ynab-api/src/models/payee_response_data.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct PayeeResponseData { - #[serde(rename = "payee")] - pub payee: ::models::Payee, -} - -impl PayeeResponseData { - pub fn new(payee: ::models::Payee) -> PayeeResponseData { - PayeeResponseData { - payee: payee, - } - } -} - - diff --git a/ynab-api/src/models/payees_response.rs b/ynab-api/src/models/payees_response.rs deleted file mode 100644 index dba96f3..0000000 --- a/ynab-api/src/models/payees_response.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct PayeesResponse { - #[serde(rename = "data")] - pub data: ::models::PayeesResponseData, -} - -impl PayeesResponse { - pub fn new(data: ::models::PayeesResponseData) -> PayeesResponse { - PayeesResponse { - data: data, - } - } -} - - diff --git a/ynab-api/src/models/payees_response_data.rs b/ynab-api/src/models/payees_response_data.rs deleted file mode 100644 index 4897b15..0000000 --- a/ynab-api/src/models/payees_response_data.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct PayeesResponseData { - #[serde(rename = "payees")] - pub payees: Vec<::models::Payee>, - /// The knowledge of the server - #[serde(rename = "server_knowledge")] - pub server_knowledge: i64, -} - -impl PayeesResponseData { - pub fn new(payees: Vec<::models::Payee>, server_knowledge: i64) -> PayeesResponseData { - PayeesResponseData { - payees: payees, - server_knowledge: server_knowledge, - } - } -} - - diff --git a/ynab-api/src/models/save_category_response.rs b/ynab-api/src/models/save_category_response.rs deleted file mode 100644 index 37744c1..0000000 --- a/ynab-api/src/models/save_category_response.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct SaveCategoryResponse { - #[serde(rename = "data")] - pub data: ::models::SaveCategoryResponseData, -} - -impl SaveCategoryResponse { - pub fn new(data: ::models::SaveCategoryResponseData) -> SaveCategoryResponse { - SaveCategoryResponse { - data: data, - } - } -} - - diff --git a/ynab-api/src/models/save_category_response_data.rs b/ynab-api/src/models/save_category_response_data.rs deleted file mode 100644 index b61b206..0000000 --- a/ynab-api/src/models/save_category_response_data.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct SaveCategoryResponseData { - #[serde(rename = "category")] - pub category: ::models::Category, - /// The knowledge of the server - #[serde(rename = "server_knowledge")] - pub server_knowledge: i64, -} - -impl SaveCategoryResponseData { - pub fn new(category: ::models::Category, server_knowledge: i64) -> SaveCategoryResponseData { - SaveCategoryResponseData { - category: category, - server_knowledge: server_knowledge, - } - } -} - - diff --git a/ynab-api/src/models/save_month_category.rs b/ynab-api/src/models/save_month_category.rs deleted file mode 100644 index 40d1b2e..0000000 --- a/ynab-api/src/models/save_month_category.rs +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct SaveMonthCategory { - /// Budgeted amount in milliunits format - #[serde(rename = "budgeted")] - pub budgeted: i64, -} - -impl SaveMonthCategory { - pub fn new(budgeted: i64) -> SaveMonthCategory { - SaveMonthCategory { - budgeted: budgeted, - } - } -} - - diff --git a/ynab-api/src/models/save_month_category_wrapper.rs b/ynab-api/src/models/save_month_category_wrapper.rs deleted file mode 100644 index ef67116..0000000 --- a/ynab-api/src/models/save_month_category_wrapper.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct SaveMonthCategoryWrapper { - #[serde(rename = "category")] - pub category: ::models::SaveMonthCategory, -} - -impl SaveMonthCategoryWrapper { - pub fn new(category: ::models::SaveMonthCategory) -> SaveMonthCategoryWrapper { - SaveMonthCategoryWrapper { - category: category, - } - } -} - - diff --git a/ynab-api/src/models/save_transaction.rs b/ynab-api/src/models/save_transaction.rs deleted file mode 100644 index c2fc6b7..0000000 --- a/ynab-api/src/models/save_transaction.rs +++ /dev/null @@ -1,95 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct SaveTransaction { - #[serde(rename = "account_id")] - pub account_id: String, - /// The transaction date in ISO format (e.g. 2016-12-01). Future dates (scheduled transactions) are not permitted. Split transaction dates cannot be changed and if a different date is supplied it will be ignored. - #[serde(rename = "date")] - pub date: String, - /// The transaction amount in milliunits format. Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored. - #[serde(rename = "amount")] - pub amount: i64, - /// The payee for the transaction - #[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")] - pub payee_id: Option, - /// The payee name. If a payee_name value is provided and payee_id has a null value, the payee_name value will be used to resolve the payee by either (1) a matching payee rename rule (only if import_id is also specified) or (2) a payee with the same name or (3) creation of a new payee. - #[serde(rename = "payee_name", skip_serializing_if = "Option::is_none")] - pub payee_name: Option, - /// The category for the transaction. Split and Credit Card Payment categories are not permitted and will be ignored if supplied. If an existing transaction has a Split category it cannot be changed. - #[serde(rename = "category_id", skip_serializing_if = "Option::is_none")] - pub category_id: Option, - #[serde(rename = "memo", skip_serializing_if = "Option::is_none")] - pub memo: Option, - /// The cleared status of the transaction - #[serde(rename = "cleared", skip_serializing_if = "Option::is_none")] - pub cleared: Option, - /// Whether or not the transaction is approved. If not supplied, transaction will be unapproved by default. - #[serde(rename = "approved", skip_serializing_if = "Option::is_none")] - pub approved: Option, - /// The transaction flag - #[serde(rename = "flag_color", skip_serializing_if = "Option::is_none")] - pub flag_color: Option, - /// If specified, the new transaction will be assigned this import_id and considered \"imported\". *At the time of import* we will attempt to match \"imported\" transactions with non-imported (i.e. \"user-entered\") transactions.

Transactions imported through File Based Import or Direct Import (not through the API) are assigned an import_id in the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. Using a consistent format will prevent duplicates through Direct Import and File Based Import.

If import_id is omitted or specified as null, the transaction will be treated as a \"user-entered\" transaction. As such, it will be eligible to be matched against transactions later being imported (via DI, FBI, or API). - #[serde(rename = "import_id", skip_serializing_if = "Option::is_none")] - pub import_id: Option, -} - -impl SaveTransaction { - pub fn new(account_id: String, date: String, amount: i64) -> SaveTransaction { - SaveTransaction { - account_id: account_id, - date: date, - amount: amount, - payee_id: None, - payee_name: None, - category_id: None, - memo: None, - cleared: None, - approved: None, - flag_color: None, - import_id: None, - } - } -} - -/// The cleared status of the transaction -#[derive(Debug, Serialize, Deserialize)] -pub enum Cleared { - #[serde(rename = "cleared")] - Cleared, - #[serde(rename = "uncleared")] - Uncleared, - #[serde(rename = "reconciled")] - Reconciled, -} -/// The transaction flag -#[derive(Debug, Serialize, Deserialize)] -pub enum FlagColor { - #[serde(rename = "red")] - Red, - #[serde(rename = "orange")] - Orange, - #[serde(rename = "yellow")] - Yellow, - #[serde(rename = "green")] - Green, - #[serde(rename = "blue")] - Blue, - #[serde(rename = "purple")] - Purple, -} - diff --git a/ynab-api/src/models/save_transaction_wrapper.rs b/ynab-api/src/models/save_transaction_wrapper.rs deleted file mode 100644 index 71bc7cd..0000000 --- a/ynab-api/src/models/save_transaction_wrapper.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct SaveTransactionWrapper { - #[serde(rename = "transaction")] - pub transaction: ::models::SaveTransaction, -} - -impl SaveTransactionWrapper { - pub fn new(transaction: ::models::SaveTransaction) -> SaveTransactionWrapper { - SaveTransactionWrapper { - transaction: transaction, - } - } -} - - diff --git a/ynab-api/src/models/save_transactions_response.rs b/ynab-api/src/models/save_transactions_response.rs deleted file mode 100644 index be0782c..0000000 --- a/ynab-api/src/models/save_transactions_response.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct SaveTransactionsResponse { - #[serde(rename = "data")] - pub data: ::models::SaveTransactionsResponseData, -} - -impl SaveTransactionsResponse { - pub fn new(data: ::models::SaveTransactionsResponseData) -> SaveTransactionsResponse { - SaveTransactionsResponse { - data: data, - } - } -} - - diff --git a/ynab-api/src/models/save_transactions_response_data.rs b/ynab-api/src/models/save_transactions_response_data.rs deleted file mode 100644 index 0086874..0000000 --- a/ynab-api/src/models/save_transactions_response_data.rs +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct SaveTransactionsResponseData { - /// The transaction ids that were saved - #[serde(rename = "transaction_ids")] - pub transaction_ids: Vec, - #[serde(rename = "transaction", skip_serializing_if = "Option::is_none")] - pub transaction: Option<::models::TransactionDetail>, - /// If multiple transactions were specified, the transactions that were saved - #[serde(rename = "transactions", skip_serializing_if = "Option::is_none")] - pub transactions: Option>, - /// If multiple transactions were specified, a list of import_ids that were not created because of an existing import_id found on the same account - #[serde(rename = "duplicate_import_ids", skip_serializing_if = "Option::is_none")] - pub duplicate_import_ids: Option>, - /// The knowledge of the server - #[serde(rename = "server_knowledge")] - pub server_knowledge: i64, -} - -impl SaveTransactionsResponseData { - pub fn new(transaction_ids: Vec, server_knowledge: i64) -> SaveTransactionsResponseData { - SaveTransactionsResponseData { - transaction_ids: transaction_ids, - transaction: None, - transactions: None, - duplicate_import_ids: None, - server_knowledge: server_knowledge, - } - } -} - - diff --git a/ynab-api/src/models/save_transactions_wrapper.rs b/ynab-api/src/models/save_transactions_wrapper.rs deleted file mode 100644 index ed49180..0000000 --- a/ynab-api/src/models/save_transactions_wrapper.rs +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct SaveTransactionsWrapper { - #[serde(rename = "transaction", skip_serializing_if = "Option::is_none")] - pub transaction: Option<::models::SaveTransaction>, - #[serde(rename = "transactions", skip_serializing_if = "Option::is_none")] - pub transactions: Option>, -} - -impl SaveTransactionsWrapper { - pub fn new() -> SaveTransactionsWrapper { - SaveTransactionsWrapper { - transaction: None, - transactions: None, - } - } -} - - diff --git a/ynab-api/src/models/scheduled_sub_transaction.rs b/ynab-api/src/models/scheduled_sub_transaction.rs deleted file mode 100644 index dfc0aca..0000000 --- a/ynab-api/src/models/scheduled_sub_transaction.rs +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct ScheduledSubTransaction { - #[serde(rename = "id")] - pub id: String, - #[serde(rename = "scheduled_transaction_id")] - pub scheduled_transaction_id: String, - /// The scheduled subtransaction amount in milliunits format - #[serde(rename = "amount")] - pub amount: i64, - #[serde(rename = "memo", skip_serializing_if = "Option::is_none")] - pub memo: Option, - #[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")] - pub payee_id: Option, - #[serde(rename = "category_id")] - pub category_id: String, - /// If a transfer, the account_id which the scheduled subtransaction transfers to - #[serde(rename = "transfer_account_id", skip_serializing_if = "Option::is_none")] - pub transfer_account_id: Option, - /// Whether or not the scheduled subtransaction has been deleted. Deleted scheduled subtransactions will only be included in delta requests. - #[serde(rename = "deleted")] - pub deleted: bool, -} - -impl ScheduledSubTransaction { - pub fn new(id: String, scheduled_transaction_id: String, amount: i64, category_id: String, deleted: bool) -> ScheduledSubTransaction { - ScheduledSubTransaction { - id: id, - scheduled_transaction_id: scheduled_transaction_id, - amount: amount, - memo: None, - payee_id: None, - category_id: category_id, - transfer_account_id: None, - deleted: deleted, - } - } -} - - diff --git a/ynab-api/src/models/scheduled_transaction_detail.rs b/ynab-api/src/models/scheduled_transaction_detail.rs deleted file mode 100644 index d86ef25..0000000 --- a/ynab-api/src/models/scheduled_transaction_detail.rs +++ /dev/null @@ -1,128 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct ScheduledTransactionDetail { - #[serde(rename = "id")] - pub id: String, - /// The first date for which the Scheduled Transaction was scheduled. - #[serde(rename = "date_first")] - pub date_first: String, - /// The next date for which the Scheduled Transaction is scheduled. - #[serde(rename = "date_next")] - pub date_next: String, - #[serde(rename = "frequency")] - pub frequency: String, - /// The scheduled transaction amount in milliunits format - #[serde(rename = "amount")] - pub amount: i64, - #[serde(rename = "memo", skip_serializing_if = "Option::is_none")] - pub memo: Option, - /// The scheduled transaction flag - #[serde(rename = "flag_color")] - pub flag_color: String, - #[serde(rename = "account_id")] - pub account_id: String, - #[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")] - pub payee_id: Option, - #[serde(rename = "category_id")] - pub category_id: String, - /// If a transfer, the account_id which the scheduled transaction transfers to - #[serde(rename = "transfer_account_id", skip_serializing_if = "Option::is_none")] - pub transfer_account_id: Option, - /// Whether or not the scheduled transaction has been deleted. Deleted scheduled transactions will only be included in delta requests. - #[serde(rename = "deleted")] - pub deleted: bool, - #[serde(rename = "account_name")] - pub account_name: String, - #[serde(rename = "payee_name")] - pub payee_name: String, - #[serde(rename = "category_name")] - pub category_name: String, - /// If a split scheduled transaction, the subtransactions. - #[serde(rename = "subtransactions")] - pub subtransactions: Vec<::models::ScheduledSubTransaction>, -} - -impl ScheduledTransactionDetail { - pub fn new(id: String, date_first: String, date_next: String, frequency: String, amount: i64, flag_color: String, account_id: String, category_id: String, deleted: bool, account_name: String, payee_name: String, category_name: String, subtransactions: Vec<::models::ScheduledSubTransaction>) -> ScheduledTransactionDetail { - ScheduledTransactionDetail { - id: id, - date_first: date_first, - date_next: date_next, - frequency: frequency, - amount: amount, - memo: None, - flag_color: flag_color, - account_id: account_id, - payee_id: None, - category_id: category_id, - transfer_account_id: None, - deleted: deleted, - account_name: account_name, - payee_name: payee_name, - category_name: category_name, - subtransactions: subtransactions, - } - } -} - -/// -#[derive(Debug, Serialize, Deserialize)] -pub enum Frequency { - #[serde(rename = "never")] - Never, - #[serde(rename = "daily")] - Daily, - #[serde(rename = "weekly")] - Weekly, - #[serde(rename = "everyOtherWeek")] - EveryOtherWeek, - #[serde(rename = "twiceAMonth")] - TwiceAMonth, - #[serde(rename = "every4Weeks")] - Every4Weeks, - #[serde(rename = "monthly")] - Monthly, - #[serde(rename = "everyOtherMonth")] - EveryOtherMonth, - #[serde(rename = "every3Months")] - Every3Months, - #[serde(rename = "every4Months")] - Every4Months, - #[serde(rename = "twiceAYear")] - TwiceAYear, - #[serde(rename = "yearly")] - Yearly, - #[serde(rename = "everyOtherYear")] - EveryOtherYear, -} -/// The scheduled transaction flag -#[derive(Debug, Serialize, Deserialize)] -pub enum FlagColor { - #[serde(rename = "red")] - Red, - #[serde(rename = "orange")] - Orange, - #[serde(rename = "yellow")] - Yellow, - #[serde(rename = "green")] - Green, - #[serde(rename = "blue")] - Blue, - #[serde(rename = "purple")] - Purple, -} - diff --git a/ynab-api/src/models/scheduled_transaction_detail_all_of.rs b/ynab-api/src/models/scheduled_transaction_detail_all_of.rs deleted file mode 100644 index cf7e6c7..0000000 --- a/ynab-api/src/models/scheduled_transaction_detail_all_of.rs +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct ScheduledTransactionDetailAllOf { - #[serde(rename = "account_name")] - pub account_name: String, - #[serde(rename = "payee_name")] - pub payee_name: String, - #[serde(rename = "category_name")] - pub category_name: String, - /// If a split scheduled transaction, the subtransactions. - #[serde(rename = "subtransactions")] - pub subtransactions: Vec<::models::ScheduledSubTransaction>, -} - -impl ScheduledTransactionDetailAllOf { - pub fn new(account_name: String, payee_name: String, category_name: String, subtransactions: Vec<::models::ScheduledSubTransaction>) -> ScheduledTransactionDetailAllOf { - ScheduledTransactionDetailAllOf { - account_name: account_name, - payee_name: payee_name, - category_name: category_name, - subtransactions: subtransactions, - } - } -} - - diff --git a/ynab-api/src/models/scheduled_transaction_response.rs b/ynab-api/src/models/scheduled_transaction_response.rs deleted file mode 100644 index 25286cd..0000000 --- a/ynab-api/src/models/scheduled_transaction_response.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct ScheduledTransactionResponse { - #[serde(rename = "data")] - pub data: ::models::ScheduledTransactionResponseData, -} - -impl ScheduledTransactionResponse { - pub fn new(data: ::models::ScheduledTransactionResponseData) -> ScheduledTransactionResponse { - ScheduledTransactionResponse { - data: data, - } - } -} - - diff --git a/ynab-api/src/models/scheduled_transaction_response_data.rs b/ynab-api/src/models/scheduled_transaction_response_data.rs deleted file mode 100644 index 70db916..0000000 --- a/ynab-api/src/models/scheduled_transaction_response_data.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct ScheduledTransactionResponseData { - #[serde(rename = "scheduled_transaction")] - pub scheduled_transaction: ::models::ScheduledTransactionDetail, -} - -impl ScheduledTransactionResponseData { - pub fn new(scheduled_transaction: ::models::ScheduledTransactionDetail) -> ScheduledTransactionResponseData { - ScheduledTransactionResponseData { - scheduled_transaction: scheduled_transaction, - } - } -} - - diff --git a/ynab-api/src/models/scheduled_transaction_summary.rs b/ynab-api/src/models/scheduled_transaction_summary.rs deleted file mode 100644 index 7966d2c..0000000 --- a/ynab-api/src/models/scheduled_transaction_summary.rs +++ /dev/null @@ -1,115 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct ScheduledTransactionSummary { - #[serde(rename = "id")] - pub id: String, - /// The first date for which the Scheduled Transaction was scheduled. - #[serde(rename = "date_first")] - pub date_first: String, - /// The next date for which the Scheduled Transaction is scheduled. - #[serde(rename = "date_next")] - pub date_next: String, - #[serde(rename = "frequency")] - pub frequency: String, - /// The scheduled transaction amount in milliunits format - #[serde(rename = "amount")] - pub amount: i64, - #[serde(rename = "memo", skip_serializing_if = "Option::is_none")] - pub memo: Option, - /// The scheduled transaction flag - #[serde(rename = "flag_color")] - pub flag_color: String, - #[serde(rename = "account_id")] - pub account_id: String, - #[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")] - pub payee_id: Option, - #[serde(rename = "category_id")] - pub category_id: String, - /// If a transfer, the account_id which the scheduled transaction transfers to - #[serde(rename = "transfer_account_id", skip_serializing_if = "Option::is_none")] - pub transfer_account_id: Option, - /// Whether or not the scheduled transaction has been deleted. Deleted scheduled transactions will only be included in delta requests. - #[serde(rename = "deleted")] - pub deleted: bool, -} - -impl ScheduledTransactionSummary { - pub fn new(id: String, date_first: String, date_next: String, frequency: String, amount: i64, flag_color: String, account_id: String, category_id: String, deleted: bool) -> ScheduledTransactionSummary { - ScheduledTransactionSummary { - id: id, - date_first: date_first, - date_next: date_next, - frequency: frequency, - amount: amount, - memo: None, - flag_color: flag_color, - account_id: account_id, - payee_id: None, - category_id: category_id, - transfer_account_id: None, - deleted: deleted, - } - } -} - -/// -#[derive(Debug, Serialize, Deserialize)] -pub enum Frequency { - #[serde(rename = "never")] - Never, - #[serde(rename = "daily")] - Daily, - #[serde(rename = "weekly")] - Weekly, - #[serde(rename = "everyOtherWeek")] - EveryOtherWeek, - #[serde(rename = "twiceAMonth")] - TwiceAMonth, - #[serde(rename = "every4Weeks")] - Every4Weeks, - #[serde(rename = "monthly")] - Monthly, - #[serde(rename = "everyOtherMonth")] - EveryOtherMonth, - #[serde(rename = "every3Months")] - Every3Months, - #[serde(rename = "every4Months")] - Every4Months, - #[serde(rename = "twiceAYear")] - TwiceAYear, - #[serde(rename = "yearly")] - Yearly, - #[serde(rename = "everyOtherYear")] - EveryOtherYear, -} -/// The scheduled transaction flag -#[derive(Debug, Serialize, Deserialize)] -pub enum FlagColor { - #[serde(rename = "red")] - Red, - #[serde(rename = "orange")] - Orange, - #[serde(rename = "yellow")] - Yellow, - #[serde(rename = "green")] - Green, - #[serde(rename = "blue")] - Blue, - #[serde(rename = "purple")] - Purple, -} - diff --git a/ynab-api/src/models/scheduled_transactions_response.rs b/ynab-api/src/models/scheduled_transactions_response.rs deleted file mode 100644 index 8ff8378..0000000 --- a/ynab-api/src/models/scheduled_transactions_response.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct ScheduledTransactionsResponse { - #[serde(rename = "data")] - pub data: ::models::ScheduledTransactionsResponseData, -} - -impl ScheduledTransactionsResponse { - pub fn new(data: ::models::ScheduledTransactionsResponseData) -> ScheduledTransactionsResponse { - ScheduledTransactionsResponse { - data: data, - } - } -} - - diff --git a/ynab-api/src/models/scheduled_transactions_response_data.rs b/ynab-api/src/models/scheduled_transactions_response_data.rs deleted file mode 100644 index 71e5c79..0000000 --- a/ynab-api/src/models/scheduled_transactions_response_data.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct ScheduledTransactionsResponseData { - #[serde(rename = "scheduled_transactions")] - pub scheduled_transactions: Vec<::models::ScheduledTransactionDetail>, - /// The knowledge of the server - #[serde(rename = "server_knowledge")] - pub server_knowledge: i64, -} - -impl ScheduledTransactionsResponseData { - pub fn new(scheduled_transactions: Vec<::models::ScheduledTransactionDetail>, server_knowledge: i64) -> ScheduledTransactionsResponseData { - ScheduledTransactionsResponseData { - scheduled_transactions: scheduled_transactions, - server_knowledge: server_knowledge, - } - } -} - - diff --git a/ynab-api/src/models/sub_transaction.rs b/ynab-api/src/models/sub_transaction.rs deleted file mode 100644 index 633ae38..0000000 --- a/ynab-api/src/models/sub_transaction.rs +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct SubTransaction { - #[serde(rename = "id")] - pub id: String, - #[serde(rename = "transaction_id")] - pub transaction_id: String, - /// The subtransaction amount in milliunits format - #[serde(rename = "amount")] - pub amount: i64, - #[serde(rename = "memo", skip_serializing_if = "Option::is_none")] - pub memo: Option, - #[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")] - pub payee_id: Option, - #[serde(rename = "category_id", skip_serializing_if = "Option::is_none")] - pub category_id: Option, - /// If a transfer, the account_id which the subtransaction transfers to - #[serde(rename = "transfer_account_id", skip_serializing_if = "Option::is_none")] - pub transfer_account_id: Option, - /// Whether or not the subtransaction has been deleted. Deleted subtransactions will only be included in delta requests. - #[serde(rename = "deleted")] - pub deleted: bool, -} - -impl SubTransaction { - pub fn new(id: String, transaction_id: String, amount: i64, deleted: bool) -> SubTransaction { - SubTransaction { - id: id, - transaction_id: transaction_id, - amount: amount, - memo: None, - payee_id: None, - category_id: None, - transfer_account_id: None, - deleted: deleted, - } - } -} - - diff --git a/ynab-api/src/models/transaction_detail.rs b/ynab-api/src/models/transaction_detail.rs deleted file mode 100644 index 956eae9..0000000 --- a/ynab-api/src/models/transaction_detail.rs +++ /dev/null @@ -1,121 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct TransactionDetail { - #[serde(rename = "id")] - pub id: String, - /// The transaction date in ISO format (e.g. 2016-12-01) - #[serde(rename = "date")] - pub date: String, - /// The transaction amount in milliunits format - #[serde(rename = "amount")] - pub amount: i64, - #[serde(rename = "memo", skip_serializing_if = "Option::is_none")] - pub memo: Option, - /// The cleared status of the transaction - #[serde(rename = "cleared")] - pub cleared: String, - /// Whether or not the transaction is approved - #[serde(rename = "approved")] - pub approved: bool, - /// The transaction flag - #[serde(rename = "flag_color", skip_serializing_if = "Option::is_none")] - pub flag_color: Option, - #[serde(rename = "account_id")] - pub account_id: String, - #[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")] - pub payee_id: Option, - #[serde(rename = "category_id", skip_serializing_if = "Option::is_none")] - pub category_id: Option, - /// If a transfer transaction, the account to which it transfers - #[serde(rename = "transfer_account_id", skip_serializing_if = "Option::is_none")] - pub transfer_account_id: Option, - /// If a transfer transaction, the id of transaction on the other side of the transfer - #[serde(rename = "transfer_transaction_id", skip_serializing_if = "Option::is_none")] - pub transfer_transaction_id: Option, - /// If transaction is matched, the id of the matched transaction - #[serde(rename = "matched_transaction_id", skip_serializing_if = "Option::is_none")] - pub matched_transaction_id: Option, - /// If the Transaction was imported, this field is a unique (by account) import identifier. If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. - #[serde(rename = "import_id", skip_serializing_if = "Option::is_none")] - pub import_id: Option, - /// Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests. - #[serde(rename = "deleted")] - pub deleted: bool, - #[serde(rename = "account_name")] - pub account_name: String, - #[serde(rename = "payee_name", skip_serializing_if = "Option::is_none")] - pub payee_name: Option, - #[serde(rename = "category_name", skip_serializing_if = "Option::is_none")] - pub category_name: Option, - /// If a split transaction, the subtransactions. - #[serde(rename = "subtransactions")] - pub subtransactions: Vec<::models::SubTransaction>, -} - -impl TransactionDetail { - pub fn new(id: String, date: String, amount: i64, cleared: String, approved: bool, account_id: String, deleted: bool, account_name: String, subtransactions: Vec<::models::SubTransaction>) -> TransactionDetail { - TransactionDetail { - id: id, - date: date, - amount: amount, - memo: None, - cleared: cleared, - approved: approved, - flag_color: None, - account_id: account_id, - payee_id: None, - category_id: None, - transfer_account_id: None, - transfer_transaction_id: None, - matched_transaction_id: None, - import_id: None, - deleted: deleted, - account_name: account_name, - payee_name: None, - category_name: None, - subtransactions: subtransactions, - } - } -} - -/// The cleared status of the transaction -#[derive(Debug, Serialize, Deserialize)] -pub enum Cleared { - #[serde(rename = "cleared")] - Cleared, - #[serde(rename = "uncleared")] - Uncleared, - #[serde(rename = "reconciled")] - Reconciled, -} -/// The transaction flag -#[derive(Debug, Serialize, Deserialize)] -pub enum FlagColor { - #[serde(rename = "red")] - Red, - #[serde(rename = "orange")] - Orange, - #[serde(rename = "yellow")] - Yellow, - #[serde(rename = "green")] - Green, - #[serde(rename = "blue")] - Blue, - #[serde(rename = "purple")] - Purple, -} - diff --git a/ynab-api/src/models/transaction_detail_all_of.rs b/ynab-api/src/models/transaction_detail_all_of.rs deleted file mode 100644 index cead8f5..0000000 --- a/ynab-api/src/models/transaction_detail_all_of.rs +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct TransactionDetailAllOf { - #[serde(rename = "account_name")] - pub account_name: String, - #[serde(rename = "payee_name", skip_serializing_if = "Option::is_none")] - pub payee_name: Option, - #[serde(rename = "category_name", skip_serializing_if = "Option::is_none")] - pub category_name: Option, - /// If a split transaction, the subtransactions. - #[serde(rename = "subtransactions")] - pub subtransactions: Vec<::models::SubTransaction>, -} - -impl TransactionDetailAllOf { - pub fn new(account_name: String, subtransactions: Vec<::models::SubTransaction>) -> TransactionDetailAllOf { - TransactionDetailAllOf { - account_name: account_name, - payee_name: None, - category_name: None, - subtransactions: subtransactions, - } - } -} - - diff --git a/ynab-api/src/models/transaction_response.rs b/ynab-api/src/models/transaction_response.rs deleted file mode 100644 index cc65780..0000000 --- a/ynab-api/src/models/transaction_response.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct TransactionResponse { - #[serde(rename = "data")] - pub data: ::models::TransactionResponseData, -} - -impl TransactionResponse { - pub fn new(data: ::models::TransactionResponseData) -> TransactionResponse { - TransactionResponse { - data: data, - } - } -} - - diff --git a/ynab-api/src/models/transaction_response_data.rs b/ynab-api/src/models/transaction_response_data.rs deleted file mode 100644 index 5f96108..0000000 --- a/ynab-api/src/models/transaction_response_data.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct TransactionResponseData { - #[serde(rename = "transaction")] - pub transaction: ::models::TransactionDetail, -} - -impl TransactionResponseData { - pub fn new(transaction: ::models::TransactionDetail) -> TransactionResponseData { - TransactionResponseData { - transaction: transaction, - } - } -} - - diff --git a/ynab-api/src/models/transaction_summary.rs b/ynab-api/src/models/transaction_summary.rs deleted file mode 100644 index 94ce164..0000000 --- a/ynab-api/src/models/transaction_summary.rs +++ /dev/null @@ -1,108 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct TransactionSummary { - #[serde(rename = "id")] - pub id: String, - /// The transaction date in ISO format (e.g. 2016-12-01) - #[serde(rename = "date")] - pub date: String, - /// The transaction amount in milliunits format - #[serde(rename = "amount")] - pub amount: i64, - #[serde(rename = "memo", skip_serializing_if = "Option::is_none")] - pub memo: Option, - /// The cleared status of the transaction - #[serde(rename = "cleared")] - pub cleared: String, - /// Whether or not the transaction is approved - #[serde(rename = "approved")] - pub approved: bool, - /// The transaction flag - #[serde(rename = "flag_color", skip_serializing_if = "Option::is_none")] - pub flag_color: Option, - #[serde(rename = "account_id")] - pub account_id: String, - #[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")] - pub payee_id: Option, - #[serde(rename = "category_id", skip_serializing_if = "Option::is_none")] - pub category_id: Option, - /// If a transfer transaction, the account to which it transfers - #[serde(rename = "transfer_account_id", skip_serializing_if = "Option::is_none")] - pub transfer_account_id: Option, - /// If a transfer transaction, the id of transaction on the other side of the transfer - #[serde(rename = "transfer_transaction_id", skip_serializing_if = "Option::is_none")] - pub transfer_transaction_id: Option, - /// If transaction is matched, the id of the matched transaction - #[serde(rename = "matched_transaction_id", skip_serializing_if = "Option::is_none")] - pub matched_transaction_id: Option, - /// If the Transaction was imported, this field is a unique (by account) import identifier. If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. - #[serde(rename = "import_id", skip_serializing_if = "Option::is_none")] - pub import_id: Option, - /// Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests. - #[serde(rename = "deleted")] - pub deleted: bool, -} - -impl TransactionSummary { - pub fn new(id: String, date: String, amount: i64, cleared: String, approved: bool, account_id: String, deleted: bool) -> TransactionSummary { - TransactionSummary { - id: id, - date: date, - amount: amount, - memo: None, - cleared: cleared, - approved: approved, - flag_color: None, - account_id: account_id, - payee_id: None, - category_id: None, - transfer_account_id: None, - transfer_transaction_id: None, - matched_transaction_id: None, - import_id: None, - deleted: deleted, - } - } -} - -/// The cleared status of the transaction -#[derive(Debug, Serialize, Deserialize)] -pub enum Cleared { - #[serde(rename = "cleared")] - Cleared, - #[serde(rename = "uncleared")] - Uncleared, - #[serde(rename = "reconciled")] - Reconciled, -} -/// The transaction flag -#[derive(Debug, Serialize, Deserialize)] -pub enum FlagColor { - #[serde(rename = "red")] - Red, - #[serde(rename = "orange")] - Orange, - #[serde(rename = "yellow")] - Yellow, - #[serde(rename = "green")] - Green, - #[serde(rename = "blue")] - Blue, - #[serde(rename = "purple")] - Purple, -} - diff --git a/ynab-api/src/models/transactions_response.rs b/ynab-api/src/models/transactions_response.rs deleted file mode 100644 index cda3c1f..0000000 --- a/ynab-api/src/models/transactions_response.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct TransactionsResponse { - #[serde(rename = "data")] - pub data: ::models::TransactionsResponseData, -} - -impl TransactionsResponse { - pub fn new(data: ::models::TransactionsResponseData) -> TransactionsResponse { - TransactionsResponse { - data: data, - } - } -} - - diff --git a/ynab-api/src/models/transactions_response_data.rs b/ynab-api/src/models/transactions_response_data.rs deleted file mode 100644 index 4ac9438..0000000 --- a/ynab-api/src/models/transactions_response_data.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct TransactionsResponseData { - #[serde(rename = "transactions")] - pub transactions: Vec<::models::TransactionDetail>, - /// The knowledge of the server - #[serde(rename = "server_knowledge")] - pub server_knowledge: i64, -} - -impl TransactionsResponseData { - pub fn new(transactions: Vec<::models::TransactionDetail>, server_knowledge: i64) -> TransactionsResponseData { - TransactionsResponseData { - transactions: transactions, - server_knowledge: server_knowledge, - } - } -} - - diff --git a/ynab-api/src/models/update_transaction.rs b/ynab-api/src/models/update_transaction.rs deleted file mode 100644 index 5e93837..0000000 --- a/ynab-api/src/models/update_transaction.rs +++ /dev/null @@ -1,98 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct UpdateTransaction { - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde(rename = "account_id")] - pub account_id: String, - /// The transaction date in ISO format (e.g. 2016-12-01). Future dates (scheduled transactions) are not permitted. Split transaction dates cannot be changed and if a different date is supplied it will be ignored. - #[serde(rename = "date")] - pub date: String, - /// The transaction amount in milliunits format. Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored. - #[serde(rename = "amount")] - pub amount: i64, - /// The payee for the transaction - #[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")] - pub payee_id: Option, - /// The payee name. If a payee_name value is provided and payee_id has a null value, the payee_name value will be used to resolve the payee by either (1) a matching payee rename rule (only if import_id is also specified) or (2) a payee with the same name or (3) creation of a new payee. - #[serde(rename = "payee_name", skip_serializing_if = "Option::is_none")] - pub payee_name: Option, - /// The category for the transaction. Split and Credit Card Payment categories are not permitted and will be ignored if supplied. If an existing transaction has a Split category it cannot be changed. - #[serde(rename = "category_id", skip_serializing_if = "Option::is_none")] - pub category_id: Option, - #[serde(rename = "memo", skip_serializing_if = "Option::is_none")] - pub memo: Option, - /// The cleared status of the transaction - #[serde(rename = "cleared", skip_serializing_if = "Option::is_none")] - pub cleared: Option, - /// Whether or not the transaction is approved. If not supplied, transaction will be unapproved by default. - #[serde(rename = "approved", skip_serializing_if = "Option::is_none")] - pub approved: Option, - /// The transaction flag - #[serde(rename = "flag_color", skip_serializing_if = "Option::is_none")] - pub flag_color: Option, - /// If specified, the new transaction will be assigned this import_id and considered \"imported\". *At the time of import* we will attempt to match \"imported\" transactions with non-imported (i.e. \"user-entered\") transactions.

Transactions imported through File Based Import or Direct Import (not through the API) are assigned an import_id in the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. Using a consistent format will prevent duplicates through Direct Import and File Based Import.

If import_id is omitted or specified as null, the transaction will be treated as a \"user-entered\" transaction. As such, it will be eligible to be matched against transactions later being imported (via DI, FBI, or API). - #[serde(rename = "import_id", skip_serializing_if = "Option::is_none")] - pub import_id: Option, -} - -impl UpdateTransaction { - pub fn new(account_id: String, date: String, amount: i64) -> UpdateTransaction { - UpdateTransaction { - id: None, - account_id: account_id, - date: date, - amount: amount, - payee_id: None, - payee_name: None, - category_id: None, - memo: None, - cleared: None, - approved: None, - flag_color: None, - import_id: None, - } - } -} - -/// The cleared status of the transaction -#[derive(Debug, Serialize, Deserialize)] -pub enum Cleared { - #[serde(rename = "cleared")] - Cleared, - #[serde(rename = "uncleared")] - Uncleared, - #[serde(rename = "reconciled")] - Reconciled, -} -/// The transaction flag -#[derive(Debug, Serialize, Deserialize)] -pub enum FlagColor { - #[serde(rename = "red")] - Red, - #[serde(rename = "orange")] - Orange, - #[serde(rename = "yellow")] - Yellow, - #[serde(rename = "green")] - Green, - #[serde(rename = "blue")] - Blue, - #[serde(rename = "purple")] - Purple, -} - diff --git a/ynab-api/src/models/update_transaction_wrapper.rs b/ynab-api/src/models/update_transaction_wrapper.rs deleted file mode 100644 index 5c34fbb..0000000 --- a/ynab-api/src/models/update_transaction_wrapper.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct UpdateTransactionWrapper { - #[serde(rename = "transaction")] - pub transaction: ::models::UpdateTransaction, -} - -impl UpdateTransactionWrapper { - pub fn new(transaction: ::models::UpdateTransaction) -> UpdateTransactionWrapper { - UpdateTransactionWrapper { - transaction: transaction, - } - } -} - - diff --git a/ynab-api/src/models/update_transactions_response.rs b/ynab-api/src/models/update_transactions_response.rs deleted file mode 100644 index c56d2b3..0000000 --- a/ynab-api/src/models/update_transactions_response.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct UpdateTransactionsResponse { - #[serde(rename = "data")] - pub data: ::models::SaveTransactionsResponseData, -} - -impl UpdateTransactionsResponse { - pub fn new(data: ::models::SaveTransactionsResponseData) -> UpdateTransactionsResponse { - UpdateTransactionsResponse { - data: data, - } - } -} - - diff --git a/ynab-api/src/models/update_transactions_wrapper.rs b/ynab-api/src/models/update_transactions_wrapper.rs deleted file mode 100644 index 810d054..0000000 --- a/ynab-api/src/models/update_transactions_wrapper.rs +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct UpdateTransactionsWrapper { - #[serde(rename = "transaction", skip_serializing_if = "Option::is_none")] - pub transaction: Option<::models::UpdateTransaction>, - #[serde(rename = "transactions", skip_serializing_if = "Option::is_none")] - pub transactions: Option>, -} - -impl UpdateTransactionsWrapper { - pub fn new() -> UpdateTransactionsWrapper { - UpdateTransactionsWrapper { - transaction: None, - transactions: None, - } - } -} - - diff --git a/ynab-api/src/models/user.rs b/ynab-api/src/models/user.rs deleted file mode 100644 index 8143284..0000000 --- a/ynab-api/src/models/user.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct User { - #[serde(rename = "id")] - pub id: String, -} - -impl User { - pub fn new(id: String) -> User { - User { - id: id, - } - } -} - - diff --git a/ynab-api/src/models/user_response.rs b/ynab-api/src/models/user_response.rs deleted file mode 100644 index e2427e0..0000000 --- a/ynab-api/src/models/user_response.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct UserResponse { - #[serde(rename = "data")] - pub data: ::models::UserResponseData, -} - -impl UserResponse { - pub fn new(data: ::models::UserResponseData) -> UserResponse { - UserResponse { - data: data, - } - } -} - - diff --git a/ynab-api/src/models/user_response_data.rs b/ynab-api/src/models/user_response_data.rs deleted file mode 100644 index 9fc30f8..0000000 --- a/ynab-api/src/models/user_response_data.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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 - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct UserResponseData { - #[serde(rename = "user")] - pub user: ::models::User, -} - -impl UserResponseData { - pub fn new(user: ::models::User) -> UserResponseData { - UserResponseData { - user: user, - } - } -} - - -- cgit v1.2.3