From a942c7c8e17eb829ef1581c0b556665784f19e33 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Thu, 7 Nov 2019 03:57:33 -0500 Subject: update openapi spec and regenerate with newer openapi-generator the newer openapi-generator picks up fixes for optional parameters, among other things --- .openapi-generator/VERSION | 2 +- data/spec-v1-swagger.json | 23 ++- docs/Account.md | 2 +- docs/AccountResponse.md | 2 +- docs/AccountResponseData.md | 2 +- docs/AccountsApi.md | 8 +- docs/AccountsResponse.md | 2 +- docs/BudgetDetail.md | 30 ++-- docs/BudgetDetailAllOf.md | 20 +-- docs/BudgetDetailResponse.md | 2 +- docs/BudgetDetailResponseData.md | 2 +- docs/BudgetSettings.md | 4 +- docs/BudgetSettingsResponse.md | 2 +- docs/BudgetSettingsResponseData.md | 2 +- docs/BudgetSummary.md | 10 +- docs/BudgetSummaryResponse.md | 2 +- docs/BudgetSummaryResponseData.md | 2 +- docs/BudgetsApi.md | 6 +- docs/BulkResponse.md | 2 +- docs/BulkResponseData.md | 2 +- docs/CategoriesApi.md | 22 +-- docs/CategoriesResponse.md | 2 +- docs/Category.md | 14 +- docs/CategoryResponse.md | 2 +- docs/CategoryResponseData.md | 2 +- docs/DeprecatedApi.md | 4 +- docs/ErrorResponse.md | 2 +- docs/HybridTransaction.md | 24 +-- docs/HybridTransactionAllOf.md | 6 +- docs/HybridTransactionsResponse.md | 2 +- docs/MonthDetail.md | 6 +- docs/MonthDetailResponse.md | 2 +- docs/MonthDetailResponseData.md | 2 +- docs/MonthSummariesResponse.md | 2 +- docs/MonthSummary.md | 6 +- docs/MonthsApi.md | 8 +- docs/Payee.md | 2 +- docs/PayeeLocationResponse.md | 2 +- docs/PayeeLocationResponseData.md | 2 +- docs/PayeeLocationsApi.md | 10 +- docs/PayeeLocationsResponse.md | 2 +- docs/PayeeResponse.md | 2 +- docs/PayeeResponseData.md | 2 +- docs/PayeesApi.md | 8 +- docs/PayeesResponse.md | 2 +- docs/SaveCategoryResponse.md | 2 +- docs/SaveCategoryResponseData.md | 2 +- docs/SaveMonthCategoryWrapper.md | 2 +- docs/SaveTransaction.md | 18 +-- docs/SaveTransactionWrapper.md | 2 +- docs/SaveTransactionsResponse.md | 2 +- docs/SaveTransactionsResponseData.md | 6 +- docs/SaveTransactionsWrapper.md | 4 +- docs/ScheduledSubTransaction.md | 8 +- docs/ScheduledTransactionDetail.md | 18 +-- docs/ScheduledTransactionDetailAllOf.md | 4 +- docs/ScheduledTransactionResponse.md | 2 +- docs/ScheduledTransactionResponseData.md | 2 +- docs/ScheduledTransactionSummary.md | 14 +- docs/ScheduledTransactionsApi.md | 8 +- docs/ScheduledTransactionsResponse.md | 2 +- docs/SubTransaction.md | 8 +- docs/TransactionDetail.md | 22 +-- docs/TransactionDetailAllOf.md | 4 +- docs/TransactionResponse.md | 2 +- docs/TransactionResponseData.md | 2 +- docs/TransactionSummary.md | 18 +-- docs/TransactionsApi.md | 56 +++---- docs/TransactionsResponse.md | 2 +- docs/UpdateTransaction.md | 18 +-- docs/UserResponse.md | 2 +- docs/UserResponseData.md | 2 +- git_push.sh | 16 +- src/apis/accounts_api.rs | 12 +- src/apis/budgets_api.rs | 12 +- src/apis/categories_api.rs | 12 +- src/apis/client.rs | 40 ++--- src/apis/deprecated_api.rs | 4 +- src/apis/months_api.rs | 12 +- src/apis/payee_locations_api.rs | 4 +- src/apis/payees_api.rs | 12 +- src/apis/scheduled_transactions_api.rs | 12 +- src/apis/transactions_api.rs | 68 ++++++--- src/apis/user_api.rs | 4 +- src/models/account.rs | 21 +-- src/models/account_response.rs | 3 +- src/models/account_response_data.rs | 3 +- src/models/accounts_response.rs | 3 +- src/models/accounts_response_data.rs | 5 +- src/models/budget_detail.rs | 5 +- src/models/budget_detail_all_of.rs | 1 + src/models/budget_detail_response.rs | 3 +- src/models/budget_detail_response_data.rs | 5 +- src/models/budget_settings.rs | 5 +- src/models/budget_settings_response.rs | 3 +- src/models/budget_settings_response_data.rs | 3 +- src/models/budget_summary.rs | 5 +- src/models/budget_summary_response.rs | 3 +- src/models/budget_summary_response_data.rs | 3 +- src/models/bulk_response.rs | 3 +- src/models/bulk_response_data.rs | 3 +- src/models/bulk_response_data_bulk.rs | 5 +- src/models/bulk_transactions.rs | 3 +- src/models/categories_response.rs | 3 +- src/models/categories_response_data.rs | 5 +- src/models/category.rs | 25 ++-- src/models/category_group.rs | 9 +- src/models/category_group_with_categories.rs | 11 +- .../category_group_with_categories_all_of.rs | 3 +- src/models/category_response.rs | 3 +- src/models/category_response_data.rs | 3 +- src/models/currency_format.rs | 17 ++- src/models/date_format.rs | 3 +- src/models/error_detail.rs | 7 +- src/models/error_response.rs | 3 +- src/models/hybrid_transaction.rs | 51 +++++-- src/models/hybrid_transaction_all_of.rs | 5 +- src/models/hybrid_transactions_response.rs | 3 +- src/models/hybrid_transactions_response_data.rs | 3 +- src/models/mod.rs | 166 ++++++++++----------- src/models/month_detail.rs | 15 +- src/models/month_detail_all_of.rs | 3 +- src/models/month_detail_response.rs | 3 +- src/models/month_detail_response_data.rs | 3 +- src/models/month_summaries_response.rs | 3 +- src/models/month_summaries_response_data.rs | 5 +- src/models/month_summary.rs | 13 +- src/models/payee.rs | 7 +- src/models/payee_location.rs | 11 +- src/models/payee_location_response.rs | 3 +- src/models/payee_location_response_data.rs | 3 +- src/models/payee_locations_response.rs | 3 +- src/models/payee_locations_response_data.rs | 3 +- src/models/payee_response.rs | 3 +- src/models/payee_response_data.rs | 3 +- src/models/payees_response.rs | 3 +- src/models/payees_response_data.rs | 5 +- src/models/save_category_response.rs | 3 +- src/models/save_category_response_data.rs | 5 +- src/models/save_month_category.rs | 3 +- src/models/save_month_category_wrapper.rs | 3 +- src/models/save_transaction.rs | 37 ++++- src/models/save_transaction_wrapper.rs | 3 +- src/models/save_transactions_response.rs | 3 +- src/models/save_transactions_response_data.rs | 5 +- src/models/save_transactions_wrapper.rs | 1 + src/models/scheduled_sub_transaction.rs | 9 +- src/models/scheduled_transaction_detail.rs | 71 +++++++-- src/models/scheduled_transaction_detail_all_of.rs | 5 +- src/models/scheduled_transaction_response.rs | 3 +- src/models/scheduled_transaction_response_data.rs | 3 +- src/models/scheduled_transaction_summary.rs | 67 +++++++-- src/models/scheduled_transactions_response.rs | 3 +- src/models/scheduled_transactions_response_data.rs | 5 +- src/models/sub_transaction.rs | 9 +- src/models/transaction_detail.rs | 51 +++++-- src/models/transaction_detail_all_of.rs | 5 +- src/models/transaction_response.rs | 3 +- src/models/transaction_response_data.rs | 3 +- src/models/transaction_summary.rs | 47 ++++-- src/models/transactions_response.rs | 3 +- src/models/transactions_response_data.rs | 5 +- src/models/update_transaction.rs | 39 ++++- src/models/update_transaction_all_of.rs | 3 +- src/models/update_transactions_wrapper.rs | 3 +- src/models/user.rs | 3 +- src/models/user_response.rs | 3 +- src/models/user_response_data.rs | 3 +- 168 files changed, 997 insertions(+), 611 deletions(-) diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 2582ddd..ef8d756 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -4.1.1 \ No newline at end of file +4.2.0 \ No newline at end of file diff --git a/data/spec-v1-swagger.json b/data/spec-v1-swagger.json index 586ada1..d591a41 100644 --- a/data/spec-v1-swagger.json +++ b/data/spec-v1-swagger.json @@ -1851,7 +1851,6 @@ "budgeted", "activity", "balance", - "goal_target", "deleted" ], "properties": { @@ -2191,6 +2190,7 @@ }, "cleared": { "type": "string", + "enum": ["cleared", "uncleared", "reconciled"], "description": "The cleared status of the transaction" }, "approved": { @@ -2199,6 +2199,7 @@ }, "flag_color": { "type": "string", + "enum": ["red", "orange", "yellow", "green", "blue", "purple", null], "description": "The transaction flag" }, "import_id": { @@ -2295,6 +2296,7 @@ }, "cleared": { "type": "string", + "enum": ["cleared", "uncleared", "reconciled"], "description": "The cleared status of the transaction" }, "approved": { @@ -2303,6 +2305,7 @@ }, "flag_color": { "type": "string", + "enum": ["red", "orange", "yellow", "green", "blue", "purple", null], "description": "The transaction flag" }, "account_id": { @@ -2571,7 +2574,22 @@ "description": "The next date for which the Scheduled Transaction is scheduled." }, "frequency": { - "type": "string" + "type": "string", + "enum": [ + "never", + "daily", + "weekly", + "everyOtherWeek", + "twiceAMonth", + "every4Weeks", + "monthly", + "everyOtherMonth", + "every3Months", + "every4Months", + "twiceAYear", + "yearly", + "everyOtherYear" + ] }, "amount": { "type": "integer", @@ -2583,6 +2601,7 @@ }, "flag_color": { "type": "string", + "enum": ["red", "orange", "yellow", "green", "blue", "purple", null], "description": "The scheduled transaction flag" }, "account_id": { diff --git a/docs/Account.md b/docs/Account.md index 265294b..6acef65 100644 --- a/docs/Account.md +++ b/docs/Account.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **_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] +**note** | Option<**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 | diff --git a/docs/AccountResponse.md b/docs/AccountResponse.md index dbb74b3..e584238 100644 --- a/docs/AccountResponse.md +++ b/docs/AccountResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***crate::models::AccountResponseData**](AccountResponse_data.md) | | +**data** | [**crate::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 index 3ae5b7c..aed4cf1 100644 --- a/docs/AccountResponseData.md +++ b/docs/AccountResponseData.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**account** | [***crate::models::Account**](Account.md) | | +**account** | [**crate::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 index 1958f71..ff6d67f 100644 --- a/docs/AccountsApi.md +++ b/docs/AccountsApi.md @@ -21,8 +21,8 @@ Returns a single account Name | Type | Description | Required | 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) | Required | -**account_id** | [**String**](.md) | The id of the account | Required | +**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) | [required] | +**account_id** | [**String**](.md) | The id of the account | [required] | ### Return type @@ -52,8 +52,8 @@ Returns all accounts Name | Type | Description | Required | 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) | Required | -**last_knowledge_of_server** | **i64** | The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | | +**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) | [required] | +**last_knowledge_of_server** | Option<**i64**> | The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | | ### Return type diff --git a/docs/AccountsResponse.md b/docs/AccountsResponse.md index 8ae5bea..7138cff 100644 --- a/docs/AccountsResponse.md +++ b/docs/AccountsResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***crate::models::AccountsResponseData**](AccountsResponse_data.md) | | +**data** | [**crate::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/BudgetDetail.md b/docs/BudgetDetail.md index 41741b1..92dccc2 100644 --- a/docs/BudgetDetail.md +++ b/docs/BudgetDetail.md @@ -6,21 +6,21 @@ 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** | [***crate::models::DateFormat**](DateFormat.md) | | [optional] -**currency_format** | [***crate::models::CurrencyFormat**](CurrencyFormat.md) | | [optional] -**accounts** | [**Vec**](Account.md) | | [optional] -**payees** | [**Vec**](Payee.md) | | [optional] -**payee_locations** | [**Vec**](PayeeLocation.md) | | [optional] -**category_groups** | [**Vec**](CategoryGroup.md) | | [optional] -**categories** | [**Vec**](Category.md) | | [optional] -**months** | [**Vec**](MonthDetail.md) | | [optional] -**transactions** | [**Vec**](TransactionSummary.md) | | [optional] -**subtransactions** | [**Vec**](SubTransaction.md) | | [optional] -**scheduled_transactions** | [**Vec**](ScheduledTransactionSummary.md) | | [optional] -**scheduled_subtransactions** | [**Vec**](ScheduledSubTransaction.md) | | [optional] +**last_modified_on** | Option<**String**> | The last time any changes were made to the budget from either a web or mobile client | [optional] +**first_month** | Option<[**String**](string.md)> | The earliest budget month | [optional] +**last_month** | Option<[**String**](string.md)> | The latest budget month | [optional] +**date_format** | Option<[**crate::models::DateFormat**](DateFormat.md)> | | [optional] +**currency_format** | Option<[**crate::models::CurrencyFormat**](CurrencyFormat.md)> | | [optional] +**accounts** | Option<[**Vec**](Account.md)> | | [optional] +**payees** | Option<[**Vec**](Payee.md)> | | [optional] +**payee_locations** | Option<[**Vec**](PayeeLocation.md)> | | [optional] +**category_groups** | Option<[**Vec**](CategoryGroup.md)> | | [optional] +**categories** | Option<[**Vec**](Category.md)> | | [optional] +**months** | Option<[**Vec**](MonthDetail.md)> | | [optional] +**transactions** | Option<[**Vec**](TransactionSummary.md)> | | [optional] +**subtransactions** | Option<[**Vec**](SubTransaction.md)> | | [optional] +**scheduled_transactions** | Option<[**Vec**](ScheduledTransactionSummary.md)> | | [optional] +**scheduled_subtransactions** | Option<[**Vec**](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 index 6a922f5..22621bb 100644 --- a/docs/BudgetDetailAllOf.md +++ b/docs/BudgetDetailAllOf.md @@ -4,16 +4,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**accounts** | [**Vec**](Account.md) | | [optional] -**payees** | [**Vec**](Payee.md) | | [optional] -**payee_locations** | [**Vec**](PayeeLocation.md) | | [optional] -**category_groups** | [**Vec**](CategoryGroup.md) | | [optional] -**categories** | [**Vec**](Category.md) | | [optional] -**months** | [**Vec**](MonthDetail.md) | | [optional] -**transactions** | [**Vec**](TransactionSummary.md) | | [optional] -**subtransactions** | [**Vec**](SubTransaction.md) | | [optional] -**scheduled_transactions** | [**Vec**](ScheduledTransactionSummary.md) | | [optional] -**scheduled_subtransactions** | [**Vec**](ScheduledSubTransaction.md) | | [optional] +**accounts** | Option<[**Vec**](Account.md)> | | [optional] +**payees** | Option<[**Vec**](Payee.md)> | | [optional] +**payee_locations** | Option<[**Vec**](PayeeLocation.md)> | | [optional] +**category_groups** | Option<[**Vec**](CategoryGroup.md)> | | [optional] +**categories** | Option<[**Vec**](Category.md)> | | [optional] +**months** | Option<[**Vec**](MonthDetail.md)> | | [optional] +**transactions** | Option<[**Vec**](TransactionSummary.md)> | | [optional] +**subtransactions** | Option<[**Vec**](SubTransaction.md)> | | [optional] +**scheduled_transactions** | Option<[**Vec**](ScheduledTransactionSummary.md)> | | [optional] +**scheduled_subtransactions** | Option<[**Vec**](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 index 08d9d7b..211dac0 100644 --- a/docs/BudgetDetailResponse.md +++ b/docs/BudgetDetailResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***crate::models::BudgetDetailResponseData**](BudgetDetailResponse_data.md) | | +**data** | [**crate::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 index 88e4c7a..e66bc3f 100644 --- a/docs/BudgetDetailResponseData.md +++ b/docs/BudgetDetailResponseData.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**budget** | [***crate::models::BudgetDetail**](BudgetDetail.md) | | +**budget** | [**crate::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 index ff8d6b0..6679a67 100644 --- a/docs/BudgetSettings.md +++ b/docs/BudgetSettings.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**date_format** | [***crate::models::DateFormat**](DateFormat.md) | | -**currency_format** | [***crate::models::CurrencyFormat**](CurrencyFormat.md) | | +**date_format** | [**crate::models::DateFormat**](DateFormat.md) | | +**currency_format** | [**crate::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 index 1b88253..f507f65 100644 --- a/docs/BudgetSettingsResponse.md +++ b/docs/BudgetSettingsResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***crate::models::BudgetSettingsResponseData**](BudgetSettingsResponse_data.md) | | +**data** | [**crate::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 index a84371e..5da106c 100644 --- a/docs/BudgetSettingsResponseData.md +++ b/docs/BudgetSettingsResponseData.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**settings** | [***crate::models::BudgetSettings**](BudgetSettings.md) | | +**settings** | [**crate::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 index eec8fba..4ac3e6d 100644 --- a/docs/BudgetSummary.md +++ b/docs/BudgetSummary.md @@ -6,11 +6,11 @@ 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** | [***crate::models::DateFormat**](DateFormat.md) | | [optional] -**currency_format** | [***crate::models::CurrencyFormat**](CurrencyFormat.md) | | [optional] +**last_modified_on** | Option<**String**> | The last time any changes were made to the budget from either a web or mobile client | [optional] +**first_month** | Option<[**String**](string.md)> | The earliest budget month | [optional] +**last_month** | Option<[**String**](string.md)> | The latest budget month | [optional] +**date_format** | Option<[**crate::models::DateFormat**](DateFormat.md)> | | [optional] +**currency_format** | Option<[**crate::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 index 5c16c83..887edf1 100644 --- a/docs/BudgetSummaryResponse.md +++ b/docs/BudgetSummaryResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***crate::models::BudgetSummaryResponseData**](BudgetSummaryResponse_data.md) | | +**data** | [**crate::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 index ecd5854..ef51be4 100644 --- a/docs/BudgetSummaryResponseData.md +++ b/docs/BudgetSummaryResponseData.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **budgets** | [**Vec**](BudgetSummary.md) | | -**default_budget** | [***crate::models::BudgetSummary**](BudgetSummary.md) | | [optional] +**default_budget** | Option<[**crate::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 index d91cd6d..3636f7b 100644 --- a/docs/BudgetsApi.md +++ b/docs/BudgetsApi.md @@ -22,8 +22,8 @@ Returns a single budget with all related entities. This resource is effectively Name | Type | Description | Required | 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) | Required | -**last_knowledge_of_server** | **i64** | The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | | +**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) | [required] | +**last_knowledge_of_server** | Option<**i64**> | The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | | ### Return type @@ -53,7 +53,7 @@ Returns settings for a budget Name | Type | Description | Required | 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) | Required | +**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) | [required] | ### Return type diff --git a/docs/BulkResponse.md b/docs/BulkResponse.md index edcad4c..1983fa9 100644 --- a/docs/BulkResponse.md +++ b/docs/BulkResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***crate::models::BulkResponseData**](BulkResponse_data.md) | | +**data** | [**crate::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 index 0ae0658..96a7d12 100644 --- a/docs/BulkResponseData.md +++ b/docs/BulkResponseData.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bulk** | [***crate::models::BulkResponseDataBulk**](BulkResponse_data_bulk.md) | | +**bulk** | [**crate::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/CategoriesApi.md b/docs/CategoriesApi.md index 4266752..29ecc5b 100644 --- a/docs/CategoriesApi.md +++ b/docs/CategoriesApi.md @@ -23,8 +23,8 @@ Returns all categories grouped by category group. Amounts (budgeted, activity, Name | Type | Description | Required | 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) | Required | -**last_knowledge_of_server** | **i64** | The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | | +**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) | [required] | +**last_knowledge_of_server** | Option<**i64**> | The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | | ### Return type @@ -54,8 +54,8 @@ Returns a single category. Amounts (budgeted, activity, balance, etc.) are spec Name | Type | Description | Required | 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) | Required | -**category_id** | **String** | The id of the category | Required | +**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) | [required] | +**category_id** | **String** | The id of the category | [required] | ### Return type @@ -85,9 +85,9 @@ Returns a single category for a specific budget month. Amounts (budgeted, activ Name | Type | Description | Required | 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) | Required | -**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)) | Required | -**category_id** | **String** | The id of the category | Required | +**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) | [required] | +**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)) | [required] | +**category_id** | **String** | The id of the category | [required] | ### Return type @@ -117,10 +117,10 @@ Update a category for a specific month Name | Type | Description | Required | 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) | Required | -**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)) | Required | -**category_id** | **String** | The id of the category | Required | -**data** | [**SaveMonthCategoryWrapper**](SaveMonthCategoryWrapper.md) | The category to update | Required | +**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) | [required] | +**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)) | [required] | +**category_id** | **String** | The id of the category | [required] | +**data** | [**SaveMonthCategoryWrapper**](SaveMonthCategoryWrapper.md) | The category to update | [required] | ### Return type diff --git a/docs/CategoriesResponse.md b/docs/CategoriesResponse.md index 1d0374c..b79f85a 100644 --- a/docs/CategoriesResponse.md +++ b/docs/CategoriesResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***crate::models::CategoriesResponseData**](CategoriesResponse_data.md) | | +**data** | [**crate::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/Category.md b/docs/Category.md index 9b6f7c9..d0c6208 100644 --- a/docs/Category.md +++ b/docs/Category.md @@ -8,16 +8,16 @@ Name | Type | Description | Notes **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] +**original_category_group_id** | Option<**String**> | If category is hidden this is the id of the category group it originally belonged to before it was hidden. | [optional] +**note** | Option<**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 category 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] +**goal_type** | Option<**String**> | The type of goal, if the category has a goal (TB=Target Category Balance, TBD=Target Category Balance by Date, MF=Monthly Funding) | [optional] +**goal_creation_month** | Option<[**String**](string.md)> | The month a goal was created | [optional] +**goal_target** | Option<**i64**> | The goal target amount in milliunits | [optional] +**goal_target_month** | Option<[**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** | Option<**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/CategoryResponse.md b/docs/CategoryResponse.md index 84bb949..247327a 100644 --- a/docs/CategoryResponse.md +++ b/docs/CategoryResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***crate::models::CategoryResponseData**](CategoryResponse_data.md) | | +**data** | [**crate::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 index 1507ab4..49fb17c 100644 --- a/docs/CategoryResponseData.md +++ b/docs/CategoryResponseData.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**category** | [***crate::models::Category**](Category.md) | | +**category** | [**crate::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/DeprecatedApi.md b/docs/DeprecatedApi.md index 712a3d9..0e3af9d 100644 --- a/docs/DeprecatedApi.md +++ b/docs/DeprecatedApi.md @@ -20,8 +20,8 @@ Creates multiple transactions. Although this endpoint is still supported, it is Name | Type | Description | Required | 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) | Required | -**transactions** | [**BulkTransactions**](BulkTransactions.md) | The list of transactions to create | Required | +**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) | [required] | +**transactions** | [**BulkTransactions**](BulkTransactions.md) | The list of transactions to create | [required] | ### Return type diff --git a/docs/ErrorResponse.md b/docs/ErrorResponse.md index 4e7daa3..ecb5983 100644 --- a/docs/ErrorResponse.md +++ b/docs/ErrorResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**error** | [***crate::models::ErrorDetail**](ErrorDetail.md) | | +**error** | [**crate::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 index a18de00..b765f51 100644 --- a/docs/HybridTransaction.md +++ b/docs/HybridTransaction.md @@ -5,25 +5,25 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **String** | | -**date** | [***String**](string.md) | The transaction date in ISO format (e.g. 2016-12-01) | +**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] +**memo** | Option<**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] +**flag_color** | Option<**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] +**payee_id** | Option<**String**> | | [optional] +**category_id** | Option<**String**> | | [optional] +**transfer_account_id** | Option<**String**> | If a transfer transaction, the account to which it transfers | [optional] +**transfer_transaction_id** | Option<**String**> | If a transfer transaction, the id of transaction on the other side of the transfer | [optional] +**matched_transaction_id** | Option<**String**> | If transaction is matched, the id of the matched transaction | [optional] +**import_id** | Option<**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 parent transaction. For transaction types, this id will be always be null. | [optional] +**parent_transaction_id** | Option<**String**> | For subtransaction types, this is the id of the parent transaction. For transaction types, this id will be always be null. | [optional] **account_name** | **String** | | -**payee_name** | **String** | | [optional] -**category_name** | **String** | | [optional] +**payee_name** | Option<**String**> | | [optional] +**category_name** | Option<**String**> | | [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/HybridTransactionAllOf.md b/docs/HybridTransactionAllOf.md index cb16249..7e4372b 100644 --- a/docs/HybridTransactionAllOf.md +++ b/docs/HybridTransactionAllOf.md @@ -5,10 +5,10 @@ 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 parent transaction. For transaction types, this id will be always be null. | [optional] +**parent_transaction_id** | Option<**String**> | For subtransaction types, this is the id of the parent transaction. For transaction types, this id will be always be null. | [optional] **account_name** | **String** | | -**payee_name** | **String** | | [optional] -**category_name** | **String** | | [optional] +**payee_name** | Option<**String**> | | [optional] +**category_name** | Option<**String**> | | [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/HybridTransactionsResponse.md b/docs/HybridTransactionsResponse.md index bd8be57..d179114 100644 --- a/docs/HybridTransactionsResponse.md +++ b/docs/HybridTransactionsResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***crate::models::HybridTransactionsResponseData**](HybridTransactionsResponse_data.md) | | +**data** | [**crate::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/MonthDetail.md b/docs/MonthDetail.md index 6b7b52e..ac58a28 100644 --- a/docs/MonthDetail.md +++ b/docs/MonthDetail.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**month** | [***String**](string.md) | | -**note** | **String** | | [optional] +**month** | [**String**](string.md) | | +**note** | Option<**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] +**age_of_money** | Option<**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**](Category.md) | The budget month categories. Amounts (budgeted, activity, balance, etc.) are specific to the {month} parameter specified. | diff --git a/docs/MonthDetailResponse.md b/docs/MonthDetailResponse.md index 72755c2..149ec91 100644 --- a/docs/MonthDetailResponse.md +++ b/docs/MonthDetailResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***crate::models::MonthDetailResponseData**](MonthDetailResponse_data.md) | | +**data** | [**crate::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 index 030e5a9..162273f 100644 --- a/docs/MonthDetailResponseData.md +++ b/docs/MonthDetailResponseData.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**month** | [***crate::models::MonthDetail**](MonthDetail.md) | | +**month** | [**crate::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 index 1f97b29..133e251 100644 --- a/docs/MonthSummariesResponse.md +++ b/docs/MonthSummariesResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***crate::models::MonthSummariesResponseData**](MonthSummariesResponse_data.md) | | +**data** | [**crate::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/MonthSummary.md b/docs/MonthSummary.md index a78cbfc..8c0b086 100644 --- a/docs/MonthSummary.md +++ b/docs/MonthSummary.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**month** | [***String**](string.md) | | -**note** | **String** | | [optional] +**month** | [**String**](string.md) | | +**note** | Option<**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] +**age_of_money** | Option<**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 index afa4884..aecf1ce 100644 --- a/docs/MonthsApi.md +++ b/docs/MonthsApi.md @@ -21,8 +21,8 @@ Returns a single budget month Name | Type | Description | Required | 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) | Required | -**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)) | Required | +**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) | [required] | +**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)) | [required] | ### Return type @@ -52,8 +52,8 @@ Returns all budget months Name | Type | Description | Required | 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) | Required | -**last_knowledge_of_server** | **i64** | The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | | +**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) | [required] | +**last_knowledge_of_server** | Option<**i64**> | The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | | ### Return type diff --git a/docs/Payee.md b/docs/Payee.md index ff886e6..19d9ab6 100644 --- a/docs/Payee.md +++ b/docs/Payee.md @@ -6,7 +6,7 @@ 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] +**transfer_account_id** | Option<**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/PayeeLocationResponse.md b/docs/PayeeLocationResponse.md index 83e7b59..c5b3d2d 100644 --- a/docs/PayeeLocationResponse.md +++ b/docs/PayeeLocationResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***crate::models::PayeeLocationResponseData**](PayeeLocationResponse_data.md) | | +**data** | [**crate::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 index 292a39d..e52c0bc 100644 --- a/docs/PayeeLocationResponseData.md +++ b/docs/PayeeLocationResponseData.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**payee_location** | [***crate::models::PayeeLocation**](PayeeLocation.md) | | +**payee_location** | [**crate::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 index d64a8fa..25cc850 100644 --- a/docs/PayeeLocationsApi.md +++ b/docs/PayeeLocationsApi.md @@ -22,8 +22,8 @@ Returns a single payee location Name | Type | Description | Required | 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) | Required | -**payee_location_id** | **String** | id of payee location | Required | +**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) | [required] | +**payee_location_id** | **String** | id of payee location | [required] | ### Return type @@ -53,7 +53,7 @@ Returns all payee locations Name | Type | Description | Required | 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) | Required | +**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) | [required] | ### Return type @@ -83,8 +83,8 @@ Returns all payee locations for the specified payee Name | Type | Description | Required | 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) | Required | -**payee_id** | **String** | id of payee | Required | +**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) | [required] | +**payee_id** | **String** | id of payee | [required] | ### Return type diff --git a/docs/PayeeLocationsResponse.md b/docs/PayeeLocationsResponse.md index b18dfd8..dd47ec2 100644 --- a/docs/PayeeLocationsResponse.md +++ b/docs/PayeeLocationsResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***crate::models::PayeeLocationsResponseData**](PayeeLocationsResponse_data.md) | | +**data** | [**crate::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/PayeeResponse.md b/docs/PayeeResponse.md index 6b4174d..0ff0db4 100644 --- a/docs/PayeeResponse.md +++ b/docs/PayeeResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***crate::models::PayeeResponseData**](PayeeResponse_data.md) | | +**data** | [**crate::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 index 8e3e6e2..8b5e3ab 100644 --- a/docs/PayeeResponseData.md +++ b/docs/PayeeResponseData.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**payee** | [***crate::models::Payee**](Payee.md) | | +**payee** | [**crate::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 index dfa1a17..6ee2d4d 100644 --- a/docs/PayeesApi.md +++ b/docs/PayeesApi.md @@ -21,8 +21,8 @@ Returns single payee Name | Type | Description | Required | 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) | Required | -**payee_id** | **String** | The id of the payee | Required | +**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) | [required] | +**payee_id** | **String** | The id of the payee | [required] | ### Return type @@ -52,8 +52,8 @@ Returns all payees Name | Type | Description | Required | 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) | Required | -**last_knowledge_of_server** | **i64** | The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | | +**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) | [required] | +**last_knowledge_of_server** | Option<**i64**> | The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | | ### Return type diff --git a/docs/PayeesResponse.md b/docs/PayeesResponse.md index a2bcfcf..ba10f6a 100644 --- a/docs/PayeesResponse.md +++ b/docs/PayeesResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***crate::models::PayeesResponseData**](PayeesResponse_data.md) | | +**data** | [**crate::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/SaveCategoryResponse.md b/docs/SaveCategoryResponse.md index 05aa2f2..97c0df9 100644 --- a/docs/SaveCategoryResponse.md +++ b/docs/SaveCategoryResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***crate::models::SaveCategoryResponseData**](SaveCategoryResponse_data.md) | | +**data** | [**crate::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 index 92dfdc2..d6b4961 100644 --- a/docs/SaveCategoryResponseData.md +++ b/docs/SaveCategoryResponseData.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**category** | [***crate::models::Category**](Category.md) | | +**category** | [**crate::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/SaveMonthCategoryWrapper.md b/docs/SaveMonthCategoryWrapper.md index 65d4917..3a3a65d 100644 --- a/docs/SaveMonthCategoryWrapper.md +++ b/docs/SaveMonthCategoryWrapper.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**category** | [***crate::models::SaveMonthCategory**](SaveMonthCategory.md) | | +**category** | [**crate::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 index 77ab098..62675bd 100644 --- a/docs/SaveTransaction.md +++ b/docs/SaveTransaction.md @@ -5,16 +5,16 @@ 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. | +**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. To create a transfer between two accounts, use the account transfer payee pointing to the target account. Account transfer payees are specified as tranfer_payee_id on the account resource. | [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\". We will also attempt to match this imported transaction to an existing \"user-entered\" transation on the same account, with the same amount, and with a date +/-10 days from the imported transaction date.

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] +**payee_id** | Option<**String**> | The payee for the transaction. To create a transfer between two accounts, use the account transfer payee pointing to the target account. Account transfer payees are specified as tranfer_payee_id on the account resource. | [optional] +**payee_name** | Option<**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** | Option<**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** | Option<**String**> | | [optional] +**cleared** | Option<**String**> | The cleared status of the transaction | [optional] +**approved** | Option<**bool**> | Whether or not the transaction is approved. If not supplied, transaction will be unapproved by default. | [optional] +**flag_color** | Option<**String**> | The transaction flag | [optional] +**import_id** | Option<**String**> | If specified, the new transaction will be assigned this import_id and considered \"imported\". We will also attempt to match this imported transaction to an existing \"user-entered\" transation on the same account, with the same amount, and with a date +/-10 days from the imported transaction date.

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 index 1bc9fda..143b778 100644 --- a/docs/SaveTransactionWrapper.md +++ b/docs/SaveTransactionWrapper.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**transaction** | [***crate::models::SaveTransaction**](SaveTransaction.md) | | +**transaction** | [**crate::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 index 9a13135..d7a067b 100644 --- a/docs/SaveTransactionsResponse.md +++ b/docs/SaveTransactionsResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***crate::models::SaveTransactionsResponseData**](SaveTransactionsResponse_data.md) | | +**data** | [**crate::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 index 98b414b..7675def 100644 --- a/docs/SaveTransactionsResponseData.md +++ b/docs/SaveTransactionsResponseData.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **transaction_ids** | **Vec** | The transaction ids that were saved | -**transaction** | [***crate::models::TransactionDetail**](TransactionDetail.md) | | [optional] -**transactions** | [**Vec**](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] +**transaction** | Option<[**crate::models::TransactionDetail**](TransactionDetail.md)> | | [optional] +**transactions** | Option<[**Vec**](TransactionDetail.md)> | If multiple transactions were specified, the transactions that were saved | [optional] +**duplicate_import_ids** | Option<**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 index 6f2dcfd..bff3f3f 100644 --- a/docs/SaveTransactionsWrapper.md +++ b/docs/SaveTransactionsWrapper.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**transaction** | [***crate::models::SaveTransaction**](SaveTransaction.md) | | [optional] -**transactions** | [**Vec**](SaveTransaction.md) | | [optional] +**transaction** | Option<[**crate::models::SaveTransaction**](SaveTransaction.md)> | | [optional] +**transactions** | Option<[**Vec**](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 index 7b3cae4..c23b676 100644 --- a/docs/ScheduledSubTransaction.md +++ b/docs/ScheduledSubTransaction.md @@ -7,10 +7,10 @@ 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** | | [optional] -**transfer_account_id** | **String** | If a transfer, the account_id which the scheduled subtransaction transfers to | [optional] +**memo** | Option<**String**> | | [optional] +**payee_id** | Option<**String**> | | [optional] +**category_id** | Option<**String**> | | [optional] +**transfer_account_id** | Option<**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 index a29c019..3324e0c 100644 --- a/docs/ScheduledTransactionDetail.md +++ b/docs/ScheduledTransactionDetail.md @@ -5,20 +5,20 @@ 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. | +**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 | [optional] +**memo** | Option<**String**> | | [optional] +**flag_color** | Option<**String**> | The scheduled transaction flag | [optional] **account_id** | **String** | | -**payee_id** | **String** | | [optional] -**category_id** | **String** | | [optional] -**transfer_account_id** | **String** | If a transfer, the account_id which the scheduled transaction transfers to | [optional] +**payee_id** | Option<**String**> | | [optional] +**category_id** | Option<**String**> | | [optional] +**transfer_account_id** | Option<**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** | | [optional] -**category_name** | **String** | | [optional] +**payee_name** | Option<**String**> | | [optional] +**category_name** | Option<**String**> | | [optional] **subtransactions** | [**Vec**](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 index dc70d71..1699e6f 100644 --- a/docs/ScheduledTransactionDetailAllOf.md +++ b/docs/ScheduledTransactionDetailAllOf.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **account_name** | **String** | | -**payee_name** | **String** | | [optional] -**category_name** | **String** | | [optional] +**payee_name** | Option<**String**> | | [optional] +**category_name** | Option<**String**> | | [optional] **subtransactions** | [**Vec**](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 index 4bc90f1..0f6368f 100644 --- a/docs/ScheduledTransactionResponse.md +++ b/docs/ScheduledTransactionResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***crate::models::ScheduledTransactionResponseData**](ScheduledTransactionResponse_data.md) | | +**data** | [**crate::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 index 87dbc5d..111b248 100644 --- a/docs/ScheduledTransactionResponseData.md +++ b/docs/ScheduledTransactionResponseData.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**scheduled_transaction** | [***crate::models::ScheduledTransactionDetail**](ScheduledTransactionDetail.md) | | +**scheduled_transaction** | [**crate::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 index 4dda3bb..117f4e3 100644 --- a/docs/ScheduledTransactionSummary.md +++ b/docs/ScheduledTransactionSummary.md @@ -5,16 +5,16 @@ 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. | +**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 | [optional] +**memo** | Option<**String**> | | [optional] +**flag_color** | Option<**String**> | The scheduled transaction flag | [optional] **account_id** | **String** | | -**payee_id** | **String** | | [optional] -**category_id** | **String** | | [optional] -**transfer_account_id** | **String** | If a transfer, the account_id which the scheduled transaction transfers to | [optional] +**payee_id** | Option<**String**> | | [optional] +**category_id** | Option<**String**> | | [optional] +**transfer_account_id** | Option<**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 index eebb224..c03c0de 100644 --- a/docs/ScheduledTransactionsApi.md +++ b/docs/ScheduledTransactionsApi.md @@ -21,8 +21,8 @@ Returns a single scheduled transaction Name | Type | Description | Required | 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) | Required | -**scheduled_transaction_id** | **String** | The id of the scheduled transaction | Required | +**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) | [required] | +**scheduled_transaction_id** | **String** | The id of the scheduled transaction | [required] | ### Return type @@ -52,8 +52,8 @@ Returns all scheduled transactions Name | Type | Description | Required | 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) | Required | -**last_knowledge_of_server** | **i64** | The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | | +**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) | [required] | +**last_knowledge_of_server** | Option<**i64**> | The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | | ### Return type diff --git a/docs/ScheduledTransactionsResponse.md b/docs/ScheduledTransactionsResponse.md index 982dc02..abd0ecf 100644 --- a/docs/ScheduledTransactionsResponse.md +++ b/docs/ScheduledTransactionsResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***crate::models::ScheduledTransactionsResponseData**](ScheduledTransactionsResponse_data.md) | | +**data** | [**crate::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/SubTransaction.md b/docs/SubTransaction.md index 77bad7f..1e3b0ec 100644 --- a/docs/SubTransaction.md +++ b/docs/SubTransaction.md @@ -7,10 +7,10 @@ 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] +**memo** | Option<**String**> | | [optional] +**payee_id** | Option<**String**> | | [optional] +**category_id** | Option<**String**> | | [optional] +**transfer_account_id** | Option<**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 index 3ba9072..b354332 100644 --- a/docs/TransactionDetail.md +++ b/docs/TransactionDetail.md @@ -5,23 +5,23 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **String** | | -**date** | [***String**](string.md) | The transaction date in ISO format (e.g. 2016-12-01) | +**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] +**memo** | Option<**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] +**flag_color** | Option<**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] +**payee_id** | Option<**String**> | | [optional] +**category_id** | Option<**String**> | | [optional] +**transfer_account_id** | Option<**String**> | If a transfer transaction, the account to which it transfers | [optional] +**transfer_transaction_id** | Option<**String**> | If a transfer transaction, the id of transaction on the other side of the transfer | [optional] +**matched_transaction_id** | Option<**String**> | If transaction is matched, the id of the matched transaction | [optional] +**import_id** | Option<**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] +**payee_name** | Option<**String**> | | [optional] +**category_name** | Option<**String**> | | [optional] **subtransactions** | [**Vec**](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 index 663f5f6..6cc4c8b 100644 --- a/docs/TransactionDetailAllOf.md +++ b/docs/TransactionDetailAllOf.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **account_name** | **String** | | -**payee_name** | **String** | | [optional] -**category_name** | **String** | | [optional] +**payee_name** | Option<**String**> | | [optional] +**category_name** | Option<**String**> | | [optional] **subtransactions** | [**Vec**](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 index 16e54b9..8897033 100644 --- a/docs/TransactionResponse.md +++ b/docs/TransactionResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***crate::models::TransactionResponseData**](TransactionResponse_data.md) | | +**data** | [**crate::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 index be390dd..a1731b6 100644 --- a/docs/TransactionResponseData.md +++ b/docs/TransactionResponseData.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**transaction** | [***crate::models::TransactionDetail**](TransactionDetail.md) | | +**transaction** | [**crate::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 index fd93b15..e8e7db6 100644 --- a/docs/TransactionSummary.md +++ b/docs/TransactionSummary.md @@ -5,19 +5,19 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **String** | | -**date** | [***String**](string.md) | The transaction date in ISO format (e.g. 2016-12-01) | +**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] +**memo** | Option<**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] +**flag_color** | Option<**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] +**payee_id** | Option<**String**> | | [optional] +**category_id** | Option<**String**> | | [optional] +**transfer_account_id** | Option<**String**> | If a transfer transaction, the account to which it transfers | [optional] +**transfer_transaction_id** | Option<**String**> | If a transfer transaction, the id of transaction on the other side of the transfer | [optional] +**matched_transaction_id** | Option<**String**> | If transaction is matched, the id of the matched transaction | [optional] +**import_id** | Option<**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 index 689031e..8e7a646 100644 --- a/docs/TransactionsApi.md +++ b/docs/TransactionsApi.md @@ -27,8 +27,8 @@ Creates a single transaction or multiple transactions. If you provide a body co Name | Type | Description | Required | 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) | Required | -**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. | Required | +**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) | [required] | +**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. | [required] | ### Return type @@ -58,8 +58,8 @@ Returns a single transaction Name | Type | Description | Required | 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) | Required | -**transaction_id** | **String** | The id of the transaction | Required | +**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) | [required] | +**transaction_id** | **String** | The id of the transaction | [required] | ### Return type @@ -89,10 +89,10 @@ Returns budget transactions Name | Type | Description | Required | 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) | Required | -**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. | | +**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) | [required] | +**since_date** | Option<**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** | Option<**String**> | If specified, only transactions of the specified type will be included. 'uncategorized' and 'unapproved' are currently supported. | | +**last_knowledge_of_server** | Option<**i64**> | The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | | ### Return type @@ -122,11 +122,11 @@ Returns all transactions for a specified account Name | Type | Description | Required | 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) | Required | -**account_id** | **String** | The id of the account | Required | -**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. | | +**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) | [required] | +**account_id** | **String** | The id of the account | [required] | +**since_date** | Option<**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** | Option<**String**> | If specified, only transactions of the specified type will be included. 'uncategorized' and 'unapproved' are currently supported. | | +**last_knowledge_of_server** | Option<**i64**> | The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | | ### Return type @@ -156,11 +156,11 @@ Returns all transactions for a specified category Name | Type | Description | Required | 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) | Required | -**category_id** | **String** | The id of the category | Required | -**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. | | +**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) | [required] | +**category_id** | **String** | The id of the category | [required] | +**since_date** | Option<**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** | Option<**String**> | If specified, only transactions of the specified type will be included. 'uncategorized' and 'unapproved' are currently supported. | | +**last_knowledge_of_server** | Option<**i64**> | The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | | ### Return type @@ -190,11 +190,11 @@ Returns all transactions for a specified payee Name | Type | Description | Required | 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) | Required | -**payee_id** | **String** | The id of the payee | Required | -**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. | | +**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) | [required] | +**payee_id** | **String** | The id of the payee | [required] | +**since_date** | Option<**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** | Option<**String**> | If specified, only transactions of the specified type will be included. 'uncategorized' and 'unapproved' are currently supported. | | +**last_knowledge_of_server** | Option<**i64**> | The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | | ### Return type @@ -224,9 +224,9 @@ Updates a transaction Name | Type | Description | Required | 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) | Required | -**transaction_id** | **String** | The id of the transaction | Required | -**data** | [**SaveTransactionWrapper**](SaveTransactionWrapper.md) | The transaction to update | Required | +**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) | [required] | +**transaction_id** | **String** | The id of the transaction | [required] | +**data** | [**SaveTransactionWrapper**](SaveTransactionWrapper.md) | The transaction to update | [required] | ### Return type @@ -256,8 +256,8 @@ Updates multiple transactions, by 'id' or 'import_id'. Name | Type | Description | Required | 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) | Required | -**data** | [**UpdateTransactionsWrapper**](UpdateTransactionsWrapper.md) | The transactions to update. Each transaction must have either an 'id' or 'import_id' specified. If 'id' is specified as null an 'import_id' value can be provided which will allow transaction(s) to be updated by their import_id. If an id is specified, it will always be used for lookup. | Required | +**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) | [required] | +**data** | [**UpdateTransactionsWrapper**](UpdateTransactionsWrapper.md) | The transactions to update. Each transaction must have either an 'id' or 'import_id' specified. If 'id' is specified as null an 'import_id' value can be provided which will allow transaction(s) to be updated by their import_id. If an id is specified, it will always be used for lookup. | [required] | ### Return type diff --git a/docs/TransactionsResponse.md b/docs/TransactionsResponse.md index 956caa7..81fcfa6 100644 --- a/docs/TransactionsResponse.md +++ b/docs/TransactionsResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***crate::models::TransactionsResponseData**](TransactionsResponse_data.md) | | +**data** | [**crate::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/UpdateTransaction.md b/docs/UpdateTransaction.md index bb01087..5c42d0c 100644 --- a/docs/UpdateTransaction.md +++ b/docs/UpdateTransaction.md @@ -6,16 +6,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **String** | | **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. | +**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. To create a transfer between two accounts, use the account transfer payee pointing to the target account. Account transfer payees are specified as tranfer_payee_id on the account resource. | [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\". We will also attempt to match this imported transaction to an existing \"user-entered\" transation on the same account, with the same amount, and with a date +/-10 days from the imported transaction date.

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] +**payee_id** | Option<**String**> | The payee for the transaction. To create a transfer between two accounts, use the account transfer payee pointing to the target account. Account transfer payees are specified as tranfer_payee_id on the account resource. | [optional] +**payee_name** | Option<**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** | Option<**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** | Option<**String**> | | [optional] +**cleared** | Option<**String**> | The cleared status of the transaction | [optional] +**approved** | Option<**bool**> | Whether or not the transaction is approved. If not supplied, transaction will be unapproved by default. | [optional] +**flag_color** | Option<**String**> | The transaction flag | [optional] +**import_id** | Option<**String**> | If specified, the new transaction will be assigned this import_id and considered \"imported\". We will also attempt to match this imported transaction to an existing \"user-entered\" transation on the same account, with the same amount, and with a date +/-10 days from the imported transaction date.

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/UserResponse.md b/docs/UserResponse.md index ea094b4..98138a3 100644 --- a/docs/UserResponse.md +++ b/docs/UserResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***crate::models::UserResponseData**](UserResponse_data.md) | | +**data** | [**crate::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 index 9669e8a..81e3343 100644 --- a/docs/UserResponseData.md +++ b/docs/UserResponseData.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**user** | [***crate::models::User**](User.md) | | +**user** | [**crate::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 index 8442b80..ced3be2 100644 --- a/git_push.sh +++ b/git_push.sh @@ -1,11 +1,17 @@ #!/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" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi if [ "$git_user_id" = "" ]; then git_user_id="GIT_USER_ID" @@ -28,7 +34,7 @@ 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. +# Commits the tracked changes and prepares them to be pushed to a remote repository. git commit -m "$release_note" # Sets the new remote @@ -37,9 +43,9 @@ 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 + git remote add origin https://${git_host}/${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 + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git fi fi @@ -47,6 +53,6 @@ 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" +echo "Git pushing to https://${git_host}/${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 index b536e89..b0c0bf9 100644 --- a/src/apis/accounts_api.rs +++ b/src/apis/accounts_api.rs @@ -10,6 +10,8 @@ use std::rc::Rc; use std::borrow::Borrow; +#[allow(unused_imports)] +use std::option::Option; use reqwest; @@ -22,14 +24,14 @@ pub struct AccountsApiClient { impl AccountsApiClient { pub fn new(configuration: Rc) -> AccountsApiClient { AccountsApiClient { - configuration: configuration, + configuration, } } } pub trait AccountsApi { fn get_account_by_id(&self, budget_id: &str, account_id: &str) -> Result; - fn get_accounts(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result; + fn get_accounts(&self, budget_id: &str, last_knowledge_of_server: Option) -> Result; } impl AccountsApi for AccountsApiClient { @@ -58,14 +60,16 @@ impl AccountsApi for AccountsApiClient { Ok(client.execute(req)?.error_for_status()?.json()?) } - fn get_accounts(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result { + fn get_accounts(&self, budget_id: &str, last_knowledge_of_server: Option) -> Result { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; let uri_str = format!("{}/budgets/{budget_id}/accounts", configuration.base_path, budget_id=crate::apis::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 s) = last_knowledge_of_server { + req_builder = req_builder.query(&[("last_knowledge_of_server", &s.to_string())]); + } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } diff --git a/src/apis/budgets_api.rs b/src/apis/budgets_api.rs index e1002ed..9ddfd9d 100644 --- a/src/apis/budgets_api.rs +++ b/src/apis/budgets_api.rs @@ -10,6 +10,8 @@ use std::rc::Rc; use std::borrow::Borrow; +#[allow(unused_imports)] +use std::option::Option; use reqwest; @@ -22,26 +24,28 @@ pub struct BudgetsApiClient { impl BudgetsApiClient { pub fn new(configuration: Rc) -> BudgetsApiClient { BudgetsApiClient { - configuration: configuration, + configuration, } } } pub trait BudgetsApi { - fn get_budget_by_id(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result; + fn get_budget_by_id(&self, budget_id: &str, last_knowledge_of_server: Option) -> Result; fn get_budget_settings_by_id(&self, budget_id: &str) -> Result; fn get_budgets(&self, ) -> Result; } impl BudgetsApi for BudgetsApiClient { - fn get_budget_by_id(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result { + fn get_budget_by_id(&self, budget_id: &str, last_knowledge_of_server: Option) -> Result { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; let uri_str = format!("{}/budgets/{budget_id}", configuration.base_path, budget_id=crate::apis::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 s) = last_knowledge_of_server { + req_builder = req_builder.query(&[("last_knowledge_of_server", &s.to_string())]); + } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } diff --git a/src/apis/categories_api.rs b/src/apis/categories_api.rs index f57d38b..b6624b9 100644 --- a/src/apis/categories_api.rs +++ b/src/apis/categories_api.rs @@ -10,6 +10,8 @@ use std::rc::Rc; use std::borrow::Borrow; +#[allow(unused_imports)] +use std::option::Option; use reqwest; @@ -22,27 +24,29 @@ pub struct CategoriesApiClient { impl CategoriesApiClient { pub fn new(configuration: Rc) -> CategoriesApiClient { CategoriesApiClient { - configuration: configuration, + configuration, } } } pub trait CategoriesApi { - fn get_categories(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result; + fn get_categories(&self, budget_id: &str, last_knowledge_of_server: Option) -> Result; fn get_category_by_id(&self, budget_id: &str, category_id: &str) -> Result; fn get_month_category_by_id(&self, budget_id: &str, month: String, category_id: &str) -> Result; fn update_month_category(&self, budget_id: &str, month: String, category_id: &str, data: crate::models::SaveMonthCategoryWrapper) -> Result; } impl CategoriesApi for CategoriesApiClient { - fn get_categories(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result { + fn get_categories(&self, budget_id: &str, last_knowledge_of_server: Option) -> Result { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; let uri_str = format!("{}/budgets/{budget_id}/categories", configuration.base_path, budget_id=crate::apis::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 s) = last_knowledge_of_server { + req_builder = req_builder.query(&[("last_knowledge_of_server", &s.to_string())]); + } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } diff --git a/src/apis/client.rs b/src/apis/client.rs index 387df63..d7558a7 100644 --- a/src/apis/client.rs +++ b/src/apis/client.rs @@ -3,16 +3,16 @@ use std::rc::Rc; use super::configuration::Configuration; pub struct APIClient { - accounts_api: Box, - budgets_api: Box, - categories_api: Box, - deprecated_api: Box, - months_api: Box, - payee_locations_api: Box, - payees_api: Box, - scheduled_transactions_api: Box, - transactions_api: Box, - user_api: Box, + accounts_api: Box, + budgets_api: Box, + categories_api: Box, + deprecated_api: Box, + months_api: Box, + payee_locations_api: Box, + payees_api: Box, + scheduled_transactions_api: Box, + transactions_api: Box, + user_api: Box, } impl APIClient { @@ -33,43 +33,43 @@ impl APIClient { } } - pub fn accounts_api(&self) -> &crate::apis::AccountsApi{ + pub fn accounts_api(&self) -> &dyn crate::apis::AccountsApi{ self.accounts_api.as_ref() } - pub fn budgets_api(&self) -> &crate::apis::BudgetsApi{ + pub fn budgets_api(&self) -> &dyn crate::apis::BudgetsApi{ self.budgets_api.as_ref() } - pub fn categories_api(&self) -> &crate::apis::CategoriesApi{ + pub fn categories_api(&self) -> &dyn crate::apis::CategoriesApi{ self.categories_api.as_ref() } - pub fn deprecated_api(&self) -> &crate::apis::DeprecatedApi{ + pub fn deprecated_api(&self) -> &dyn crate::apis::DeprecatedApi{ self.deprecated_api.as_ref() } - pub fn months_api(&self) -> &crate::apis::MonthsApi{ + pub fn months_api(&self) -> &dyn crate::apis::MonthsApi{ self.months_api.as_ref() } - pub fn payee_locations_api(&self) -> &crate::apis::PayeeLocationsApi{ + pub fn payee_locations_api(&self) -> &dyn crate::apis::PayeeLocationsApi{ self.payee_locations_api.as_ref() } - pub fn payees_api(&self) -> &crate::apis::PayeesApi{ + pub fn payees_api(&self) -> &dyn crate::apis::PayeesApi{ self.payees_api.as_ref() } - pub fn scheduled_transactions_api(&self) -> &crate::apis::ScheduledTransactionsApi{ + pub fn scheduled_transactions_api(&self) -> &dyn crate::apis::ScheduledTransactionsApi{ self.scheduled_transactions_api.as_ref() } - pub fn transactions_api(&self) -> &crate::apis::TransactionsApi{ + pub fn transactions_api(&self) -> &dyn crate::apis::TransactionsApi{ self.transactions_api.as_ref() } - pub fn user_api(&self) -> &crate::apis::UserApi{ + pub fn user_api(&self) -> &dyn crate::apis::UserApi{ self.user_api.as_ref() } diff --git a/src/apis/deprecated_api.rs b/src/apis/deprecated_api.rs index aab34ff..0d4fe6b 100644 --- a/src/apis/deprecated_api.rs +++ b/src/apis/deprecated_api.rs @@ -10,6 +10,8 @@ use std::rc::Rc; use std::borrow::Borrow; +#[allow(unused_imports)] +use std::option::Option; use reqwest; @@ -22,7 +24,7 @@ pub struct DeprecatedApiClient { impl DeprecatedApiClient { pub fn new(configuration: Rc) -> DeprecatedApiClient { DeprecatedApiClient { - configuration: configuration, + configuration, } } } diff --git a/src/apis/months_api.rs b/src/apis/months_api.rs index 48d586b..03c6a29 100644 --- a/src/apis/months_api.rs +++ b/src/apis/months_api.rs @@ -10,6 +10,8 @@ use std::rc::Rc; use std::borrow::Borrow; +#[allow(unused_imports)] +use std::option::Option; use reqwest; @@ -22,14 +24,14 @@ pub struct MonthsApiClient { impl MonthsApiClient { pub fn new(configuration: Rc) -> MonthsApiClient { MonthsApiClient { - configuration: configuration, + configuration, } } } pub trait MonthsApi { fn get_budget_month(&self, budget_id: &str, month: String) -> Result; - fn get_budget_months(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result; + fn get_budget_months(&self, budget_id: &str, last_knowledge_of_server: Option) -> Result; } impl MonthsApi for MonthsApiClient { @@ -58,14 +60,16 @@ impl MonthsApi for MonthsApiClient { Ok(client.execute(req)?.error_for_status()?.json()?) } - fn get_budget_months(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result { + fn get_budget_months(&self, budget_id: &str, last_knowledge_of_server: Option) -> Result { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; let uri_str = format!("{}/budgets/{budget_id}/months", configuration.base_path, budget_id=crate::apis::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 s) = last_knowledge_of_server { + req_builder = req_builder.query(&[("last_knowledge_of_server", &s.to_string())]); + } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } diff --git a/src/apis/payee_locations_api.rs b/src/apis/payee_locations_api.rs index 823dea4..1a1e35d 100644 --- a/src/apis/payee_locations_api.rs +++ b/src/apis/payee_locations_api.rs @@ -10,6 +10,8 @@ use std::rc::Rc; use std::borrow::Borrow; +#[allow(unused_imports)] +use std::option::Option; use reqwest; @@ -22,7 +24,7 @@ pub struct PayeeLocationsApiClient { impl PayeeLocationsApiClient { pub fn new(configuration: Rc) -> PayeeLocationsApiClient { PayeeLocationsApiClient { - configuration: configuration, + configuration, } } } diff --git a/src/apis/payees_api.rs b/src/apis/payees_api.rs index 890920c..71f4125 100644 --- a/src/apis/payees_api.rs +++ b/src/apis/payees_api.rs @@ -10,6 +10,8 @@ use std::rc::Rc; use std::borrow::Borrow; +#[allow(unused_imports)] +use std::option::Option; use reqwest; @@ -22,14 +24,14 @@ pub struct PayeesApiClient { impl PayeesApiClient { pub fn new(configuration: Rc) -> PayeesApiClient { PayeesApiClient { - configuration: configuration, + configuration, } } } pub trait PayeesApi { fn get_payee_by_id(&self, budget_id: &str, payee_id: &str) -> Result; - fn get_payees(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result; + fn get_payees(&self, budget_id: &str, last_knowledge_of_server: Option) -> Result; } impl PayeesApi for PayeesApiClient { @@ -58,14 +60,16 @@ impl PayeesApi for PayeesApiClient { Ok(client.execute(req)?.error_for_status()?.json()?) } - fn get_payees(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result { + fn get_payees(&self, budget_id: &str, last_knowledge_of_server: Option) -> Result { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; let uri_str = format!("{}/budgets/{budget_id}/payees", configuration.base_path, budget_id=crate::apis::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 s) = last_knowledge_of_server { + req_builder = req_builder.query(&[("last_knowledge_of_server", &s.to_string())]); + } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } diff --git a/src/apis/scheduled_transactions_api.rs b/src/apis/scheduled_transactions_api.rs index fe8c959..f44d782 100644 --- a/src/apis/scheduled_transactions_api.rs +++ b/src/apis/scheduled_transactions_api.rs @@ -10,6 +10,8 @@ use std::rc::Rc; use std::borrow::Borrow; +#[allow(unused_imports)] +use std::option::Option; use reqwest; @@ -22,14 +24,14 @@ pub struct ScheduledTransactionsApiClient { impl ScheduledTransactionsApiClient { pub fn new(configuration: Rc) -> ScheduledTransactionsApiClient { ScheduledTransactionsApiClient { - configuration: configuration, + configuration, } } } pub trait ScheduledTransactionsApi { fn get_scheduled_transaction_by_id(&self, budget_id: &str, scheduled_transaction_id: &str) -> Result; - fn get_scheduled_transactions(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result; + fn get_scheduled_transactions(&self, budget_id: &str, last_knowledge_of_server: Option) -> Result; } impl ScheduledTransactionsApi for ScheduledTransactionsApiClient { @@ -58,14 +60,16 @@ impl ScheduledTransactionsApi for ScheduledTransactionsApiClient { Ok(client.execute(req)?.error_for_status()?.json()?) } - fn get_scheduled_transactions(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result { + fn get_scheduled_transactions(&self, budget_id: &str, last_knowledge_of_server: Option) -> Result { 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=crate::apis::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 s) = last_knowledge_of_server { + req_builder = req_builder.query(&[("last_knowledge_of_server", &s.to_string())]); + } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } diff --git a/src/apis/transactions_api.rs b/src/apis/transactions_api.rs index 9b3fcb4..138fa4d 100644 --- a/src/apis/transactions_api.rs +++ b/src/apis/transactions_api.rs @@ -10,6 +10,8 @@ use std::rc::Rc; use std::borrow::Borrow; +#[allow(unused_imports)] +use std::option::Option; use reqwest; @@ -22,7 +24,7 @@ pub struct TransactionsApiClient { impl TransactionsApiClient { pub fn new(configuration: Rc) -> TransactionsApiClient { TransactionsApiClient { - configuration: configuration, + configuration, } } } @@ -30,10 +32,10 @@ impl TransactionsApiClient { pub trait TransactionsApi { fn create_transaction(&self, budget_id: &str, data: crate::models::SaveTransactionsWrapper) -> Result; fn get_transaction_by_id(&self, budget_id: &str, transaction_id: &str) -> Result; - fn get_transactions(&self, budget_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result; - fn get_transactions_by_account(&self, budget_id: &str, account_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result; - fn get_transactions_by_category(&self, budget_id: &str, category_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result; - fn get_transactions_by_payee(&self, budget_id: &str, payee_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result; + fn get_transactions(&self, budget_id: &str, since_date: Option, _type: Option<&str>, last_knowledge_of_server: Option) -> Result; + fn get_transactions_by_account(&self, budget_id: &str, account_id: &str, since_date: Option, _type: Option<&str>, last_knowledge_of_server: Option) -> Result; + fn get_transactions_by_category(&self, budget_id: &str, category_id: &str, since_date: Option, _type: Option<&str>, last_knowledge_of_server: Option) -> Result; + fn get_transactions_by_payee(&self, budget_id: &str, payee_id: &str, since_date: Option, _type: Option<&str>, last_knowledge_of_server: Option) -> Result; fn update_transaction(&self, budget_id: &str, transaction_id: &str, data: crate::models::SaveTransactionWrapper) -> Result; fn update_transactions(&self, budget_id: &str, data: crate::models::UpdateTransactionsWrapper) -> Result; } @@ -90,16 +92,22 @@ impl TransactionsApi for TransactionsApiClient { 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 { + fn get_transactions(&self, budget_id: &str, since_date: Option, _type: Option<&str>, last_knowledge_of_server: Option) -> Result { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; let uri_str = format!("{}/budgets/{budget_id}/transactions", configuration.base_path, budget_id=crate::apis::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 s) = since_date { + req_builder = req_builder.query(&[("since_date", &s.to_string())]); + } + if let Some(ref s) = _type { + req_builder = req_builder.query(&[("type", &s.to_string())]); + } + if let Some(ref s) = last_knowledge_of_server { + req_builder = req_builder.query(&[("last_knowledge_of_server", &s.to_string())]); + } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } @@ -118,16 +126,22 @@ impl TransactionsApi for TransactionsApiClient { 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 { + fn get_transactions_by_account(&self, budget_id: &str, account_id: &str, since_date: Option, _type: Option<&str>, last_knowledge_of_server: Option) -> Result { 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=crate::apis::urlencode(budget_id), account_id=crate::apis::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 s) = since_date { + req_builder = req_builder.query(&[("since_date", &s.to_string())]); + } + if let Some(ref s) = _type { + req_builder = req_builder.query(&[("type", &s.to_string())]); + } + if let Some(ref s) = last_knowledge_of_server { + req_builder = req_builder.query(&[("last_knowledge_of_server", &s.to_string())]); + } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } @@ -146,16 +160,22 @@ impl TransactionsApi for TransactionsApiClient { 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 { + fn get_transactions_by_category(&self, budget_id: &str, category_id: &str, since_date: Option, _type: Option<&str>, last_knowledge_of_server: Option) -> Result { 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=crate::apis::urlencode(budget_id), category_id=crate::apis::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 s) = since_date { + req_builder = req_builder.query(&[("since_date", &s.to_string())]); + } + if let Some(ref s) = _type { + req_builder = req_builder.query(&[("type", &s.to_string())]); + } + if let Some(ref s) = last_knowledge_of_server { + req_builder = req_builder.query(&[("last_knowledge_of_server", &s.to_string())]); + } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } @@ -174,16 +194,22 @@ impl TransactionsApi for TransactionsApiClient { 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 { + fn get_transactions_by_payee(&self, budget_id: &str, payee_id: &str, since_date: Option, _type: Option<&str>, last_knowledge_of_server: Option) -> Result { 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=crate::apis::urlencode(budget_id), payee_id=crate::apis::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 s) = since_date { + req_builder = req_builder.query(&[("since_date", &s.to_string())]); + } + if let Some(ref s) = _type { + req_builder = req_builder.query(&[("type", &s.to_string())]); + } + if let Some(ref s) = last_knowledge_of_server { + req_builder = req_builder.query(&[("last_knowledge_of_server", &s.to_string())]); + } if let Some(ref user_agent) = configuration.user_agent { req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } diff --git a/src/apis/user_api.rs b/src/apis/user_api.rs index 870ecc4..652fb55 100644 --- a/src/apis/user_api.rs +++ b/src/apis/user_api.rs @@ -10,6 +10,8 @@ use std::rc::Rc; use std::borrow::Borrow; +#[allow(unused_imports)] +use std::option::Option; use reqwest; @@ -22,7 +24,7 @@ pub struct UserApiClient { impl UserApiClient { pub fn new(configuration: Rc) -> UserApiClient { UserApiClient { - configuration: configuration, + configuration, } } } diff --git a/src/models/account.rs b/src/models/account.rs index 44ad808..c2581f0 100644 --- a/src/models/account.rs +++ b/src/models/account.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct Account { #[serde(rename = "id")] @@ -47,17 +48,17 @@ pub struct Account { impl Account { pub fn new(id: String, name: String, _type: Type, 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, + id, + name, + _type, + on_budget, + closed, note: None, - balance: balance, - cleared_balance: cleared_balance, - uncleared_balance: uncleared_balance, - transfer_payee_id: transfer_payee_id, - deleted: deleted, + balance, + cleared_balance, + uncleared_balance, + transfer_payee_id, + deleted, } } } diff --git a/src/models/account_response.rs b/src/models/account_response.rs index 3f24283..5f90ddf 100644 --- a/src/models/account_response.rs +++ b/src/models/account_response.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct AccountResponse { #[serde(rename = "data")] @@ -19,7 +20,7 @@ pub struct AccountResponse { impl AccountResponse { pub fn new(data: crate::models::AccountResponseData) -> AccountResponse { AccountResponse { - data: data, + data, } } } diff --git a/src/models/account_response_data.rs b/src/models/account_response_data.rs index c74e20a..f08e252 100644 --- a/src/models/account_response_data.rs +++ b/src/models/account_response_data.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct AccountResponseData { #[serde(rename = "account")] @@ -19,7 +20,7 @@ pub struct AccountResponseData { impl AccountResponseData { pub fn new(account: crate::models::Account) -> AccountResponseData { AccountResponseData { - account: account, + account, } } } diff --git a/src/models/accounts_response.rs b/src/models/accounts_response.rs index ccf8809..0d2b696 100644 --- a/src/models/accounts_response.rs +++ b/src/models/accounts_response.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct AccountsResponse { #[serde(rename = "data")] @@ -19,7 +20,7 @@ pub struct AccountsResponse { impl AccountsResponse { pub fn new(data: crate::models::AccountsResponseData) -> AccountsResponse { AccountsResponse { - data: data, + data, } } } diff --git a/src/models/accounts_response_data.rs b/src/models/accounts_response_data.rs index 670c777..effeec4 100644 --- a/src/models/accounts_response_data.rs +++ b/src/models/accounts_response_data.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct AccountsResponseData { #[serde(rename = "accounts")] @@ -22,8 +23,8 @@ pub struct AccountsResponseData { impl AccountsResponseData { pub fn new(accounts: Vec, server_knowledge: i64) -> AccountsResponseData { AccountsResponseData { - accounts: accounts, - server_knowledge: server_knowledge, + accounts, + server_knowledge, } } } diff --git a/src/models/budget_detail.rs b/src/models/budget_detail.rs index b14f4b0..2ab61ac 100644 --- a/src/models/budget_detail.rs +++ b/src/models/budget_detail.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct BudgetDetail { #[serde(rename = "id")] @@ -54,8 +55,8 @@ pub struct BudgetDetail { impl BudgetDetail { pub fn new(id: String, name: String) -> BudgetDetail { BudgetDetail { - id: id, - name: name, + id, + name, last_modified_on: None, first_month: None, last_month: None, diff --git a/src/models/budget_detail_all_of.rs b/src/models/budget_detail_all_of.rs index 8b7da42..058494a 100644 --- a/src/models/budget_detail_all_of.rs +++ b/src/models/budget_detail_all_of.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct BudgetDetailAllOf { #[serde(rename = "accounts", skip_serializing_if = "Option::is_none")] diff --git a/src/models/budget_detail_response.rs b/src/models/budget_detail_response.rs index 3ffcdcd..f068af4 100644 --- a/src/models/budget_detail_response.rs +++ b/src/models/budget_detail_response.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct BudgetDetailResponse { #[serde(rename = "data")] @@ -19,7 +20,7 @@ pub struct BudgetDetailResponse { impl BudgetDetailResponse { pub fn new(data: crate::models::BudgetDetailResponseData) -> BudgetDetailResponse { BudgetDetailResponse { - data: data, + data, } } } diff --git a/src/models/budget_detail_response_data.rs b/src/models/budget_detail_response_data.rs index 13dd651..e83ab1a 100644 --- a/src/models/budget_detail_response_data.rs +++ b/src/models/budget_detail_response_data.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct BudgetDetailResponseData { #[serde(rename = "budget")] @@ -22,8 +23,8 @@ pub struct BudgetDetailResponseData { impl BudgetDetailResponseData { pub fn new(budget: crate::models::BudgetDetail, server_knowledge: i64) -> BudgetDetailResponseData { BudgetDetailResponseData { - budget: budget, - server_knowledge: server_knowledge, + budget, + server_knowledge, } } } diff --git a/src/models/budget_settings.rs b/src/models/budget_settings.rs index adb2d78..c1506bf 100644 --- a/src/models/budget_settings.rs +++ b/src/models/budget_settings.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct BudgetSettings { #[serde(rename = "date_format")] @@ -21,8 +22,8 @@ pub struct BudgetSettings { impl BudgetSettings { pub fn new(date_format: crate::models::DateFormat, currency_format: crate::models::CurrencyFormat) -> BudgetSettings { BudgetSettings { - date_format: date_format, - currency_format: currency_format, + date_format, + currency_format, } } } diff --git a/src/models/budget_settings_response.rs b/src/models/budget_settings_response.rs index e6a3fb8..fe93039 100644 --- a/src/models/budget_settings_response.rs +++ b/src/models/budget_settings_response.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct BudgetSettingsResponse { #[serde(rename = "data")] @@ -19,7 +20,7 @@ pub struct BudgetSettingsResponse { impl BudgetSettingsResponse { pub fn new(data: crate::models::BudgetSettingsResponseData) -> BudgetSettingsResponse { BudgetSettingsResponse { - data: data, + data, } } } diff --git a/src/models/budget_settings_response_data.rs b/src/models/budget_settings_response_data.rs index bc9045e..63879fb 100644 --- a/src/models/budget_settings_response_data.rs +++ b/src/models/budget_settings_response_data.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct BudgetSettingsResponseData { #[serde(rename = "settings")] @@ -19,7 +20,7 @@ pub struct BudgetSettingsResponseData { impl BudgetSettingsResponseData { pub fn new(settings: crate::models::BudgetSettings) -> BudgetSettingsResponseData { BudgetSettingsResponseData { - settings: settings, + settings, } } } diff --git a/src/models/budget_summary.rs b/src/models/budget_summary.rs index 742fcdf..a36abd8 100644 --- a/src/models/budget_summary.rs +++ b/src/models/budget_summary.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct BudgetSummary { #[serde(rename = "id")] @@ -34,8 +35,8 @@ pub struct BudgetSummary { impl BudgetSummary { pub fn new(id: String, name: String) -> BudgetSummary { BudgetSummary { - id: id, - name: name, + id, + name, last_modified_on: None, first_month: None, last_month: None, diff --git a/src/models/budget_summary_response.rs b/src/models/budget_summary_response.rs index 2327d4d..e2a0bc4 100644 --- a/src/models/budget_summary_response.rs +++ b/src/models/budget_summary_response.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct BudgetSummaryResponse { #[serde(rename = "data")] @@ -19,7 +20,7 @@ pub struct BudgetSummaryResponse { impl BudgetSummaryResponse { pub fn new(data: crate::models::BudgetSummaryResponseData) -> BudgetSummaryResponse { BudgetSummaryResponse { - data: data, + data, } } } diff --git a/src/models/budget_summary_response_data.rs b/src/models/budget_summary_response_data.rs index 90802e7..938775d 100644 --- a/src/models/budget_summary_response_data.rs +++ b/src/models/budget_summary_response_data.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct BudgetSummaryResponseData { #[serde(rename = "budgets")] @@ -21,7 +22,7 @@ pub struct BudgetSummaryResponseData { impl BudgetSummaryResponseData { pub fn new(budgets: Vec) -> BudgetSummaryResponseData { BudgetSummaryResponseData { - budgets: budgets, + budgets, default_budget: None, } } diff --git a/src/models/bulk_response.rs b/src/models/bulk_response.rs index f40b58b..f6a9438 100644 --- a/src/models/bulk_response.rs +++ b/src/models/bulk_response.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct BulkResponse { #[serde(rename = "data")] @@ -19,7 +20,7 @@ pub struct BulkResponse { impl BulkResponse { pub fn new(data: crate::models::BulkResponseData) -> BulkResponse { BulkResponse { - data: data, + data, } } } diff --git a/src/models/bulk_response_data.rs b/src/models/bulk_response_data.rs index 192b489..389e2c5 100644 --- a/src/models/bulk_response_data.rs +++ b/src/models/bulk_response_data.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct BulkResponseData { #[serde(rename = "bulk")] @@ -19,7 +20,7 @@ pub struct BulkResponseData { impl BulkResponseData { pub fn new(bulk: crate::models::BulkResponseDataBulk) -> BulkResponseData { BulkResponseData { - bulk: bulk, + bulk, } } } diff --git a/src/models/bulk_response_data_bulk.rs b/src/models/bulk_response_data_bulk.rs index 538f48c..4ca0e45 100644 --- a/src/models/bulk_response_data_bulk.rs +++ b/src/models/bulk_response_data_bulk.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct BulkResponseDataBulk { /// The list of Transaction ids that were created. @@ -23,8 +24,8 @@ pub struct BulkResponseDataBulk { impl BulkResponseDataBulk { pub fn new(transaction_ids: Vec, duplicate_import_ids: Vec) -> BulkResponseDataBulk { BulkResponseDataBulk { - transaction_ids: transaction_ids, - duplicate_import_ids: duplicate_import_ids, + transaction_ids, + duplicate_import_ids, } } } diff --git a/src/models/bulk_transactions.rs b/src/models/bulk_transactions.rs index b3e0466..f84874c 100644 --- a/src/models/bulk_transactions.rs +++ b/src/models/bulk_transactions.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct BulkTransactions { #[serde(rename = "transactions")] @@ -19,7 +20,7 @@ pub struct BulkTransactions { impl BulkTransactions { pub fn new(transactions: Vec) -> BulkTransactions { BulkTransactions { - transactions: transactions, + transactions, } } } diff --git a/src/models/categories_response.rs b/src/models/categories_response.rs index 8b804c0..f4d570f 100644 --- a/src/models/categories_response.rs +++ b/src/models/categories_response.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct CategoriesResponse { #[serde(rename = "data")] @@ -19,7 +20,7 @@ pub struct CategoriesResponse { impl CategoriesResponse { pub fn new(data: crate::models::CategoriesResponseData) -> CategoriesResponse { CategoriesResponse { - data: data, + data, } } } diff --git a/src/models/categories_response_data.rs b/src/models/categories_response_data.rs index 5a1dad3..62c3002 100644 --- a/src/models/categories_response_data.rs +++ b/src/models/categories_response_data.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct CategoriesResponseData { #[serde(rename = "category_groups")] @@ -22,8 +23,8 @@ pub struct CategoriesResponseData { impl CategoriesResponseData { pub fn new(category_groups: Vec, server_knowledge: i64) -> CategoriesResponseData { CategoriesResponseData { - category_groups: category_groups, - server_knowledge: server_knowledge, + category_groups, + server_knowledge, } } } diff --git a/src/models/category.rs b/src/models/category.rs index 6677f8d..253f061 100644 --- a/src/models/category.rs +++ b/src/models/category.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct Category { #[serde(rename = "id")] @@ -42,8 +43,8 @@ pub struct Category { #[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, + #[serde(rename = "goal_target", skip_serializing_if = "Option::is_none")] + pub goal_target: Option, /// 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, @@ -56,23 +57,23 @@ pub struct Category { } 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 { + pub fn new(id: String, category_group_id: String, name: String, hidden: bool, budgeted: i64, activity: i64, balance: i64, deleted: bool) -> Category { Category { - id: id, - category_group_id: category_group_id, - name: name, - hidden: hidden, + id, + category_group_id, + name, + hidden, original_category_group_id: None, note: None, - budgeted: budgeted, - activity: activity, - balance: balance, + budgeted, + activity, + balance, goal_type: None, goal_creation_month: None, - goal_target: goal_target, + goal_target: None, goal_target_month: None, goal_percentage_complete: None, - deleted: deleted, + deleted, } } } diff --git a/src/models/category_group.rs b/src/models/category_group.rs index b4f75ee..9200d80 100644 --- a/src/models/category_group.rs +++ b/src/models/category_group.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct CategoryGroup { #[serde(rename = "id")] @@ -27,10 +28,10 @@ pub struct CategoryGroup { impl CategoryGroup { pub fn new(id: String, name: String, hidden: bool, deleted: bool) -> CategoryGroup { CategoryGroup { - id: id, - name: name, - hidden: hidden, - deleted: deleted, + id, + name, + hidden, + deleted, } } } diff --git a/src/models/category_group_with_categories.rs b/src/models/category_group_with_categories.rs index f674b4c..161294a 100644 --- a/src/models/category_group_with_categories.rs +++ b/src/models/category_group_with_categories.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct CategoryGroupWithCategories { #[serde(rename = "id")] @@ -30,11 +31,11 @@ pub struct CategoryGroupWithCategories { impl CategoryGroupWithCategories { pub fn new(id: String, name: String, hidden: bool, deleted: bool, categories: Vec) -> CategoryGroupWithCategories { CategoryGroupWithCategories { - id: id, - name: name, - hidden: hidden, - deleted: deleted, - categories: categories, + id, + name, + hidden, + deleted, + categories, } } } diff --git a/src/models/category_group_with_categories_all_of.rs b/src/models/category_group_with_categories_all_of.rs index 0820aef..83dcd00 100644 --- a/src/models/category_group_with_categories_all_of.rs +++ b/src/models/category_group_with_categories_all_of.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct CategoryGroupWithCategoriesAllOf { /// Category group categories. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC). @@ -20,7 +21,7 @@ pub struct CategoryGroupWithCategoriesAllOf { impl CategoryGroupWithCategoriesAllOf { pub fn new(categories: Vec) -> CategoryGroupWithCategoriesAllOf { CategoryGroupWithCategoriesAllOf { - categories: categories, + categories, } } } diff --git a/src/models/category_response.rs b/src/models/category_response.rs index 13dff4a..179fc1b 100644 --- a/src/models/category_response.rs +++ b/src/models/category_response.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct CategoryResponse { #[serde(rename = "data")] @@ -19,7 +20,7 @@ pub struct CategoryResponse { impl CategoryResponse { pub fn new(data: crate::models::CategoryResponseData) -> CategoryResponse { CategoryResponse { - data: data, + data, } } } diff --git a/src/models/category_response_data.rs b/src/models/category_response_data.rs index 078f720..9afeb49 100644 --- a/src/models/category_response_data.rs +++ b/src/models/category_response_data.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct CategoryResponseData { #[serde(rename = "category")] @@ -19,7 +20,7 @@ pub struct CategoryResponseData { impl CategoryResponseData { pub fn new(category: crate::models::Category) -> CategoryResponseData { CategoryResponseData { - category: category, + category, } } } diff --git a/src/models/currency_format.rs b/src/models/currency_format.rs index 8831679..44a99aa 100644 --- a/src/models/currency_format.rs +++ b/src/models/currency_format.rs @@ -11,6 +11,7 @@ /// CurrencyFormat : The currency format setting for the budget. In some cases the format will not be available and will be specified as null. + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct CurrencyFormat { #[serde(rename = "iso_code")] @@ -35,14 +36,14 @@ 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, + iso_code, + example_format, + decimal_digits, + decimal_separator, + symbol_first, + group_separator, + currency_symbol, + display_symbol, } } } diff --git a/src/models/date_format.rs b/src/models/date_format.rs index d9259d9..9a4ce0f 100644 --- a/src/models/date_format.rs +++ b/src/models/date_format.rs @@ -11,6 +11,7 @@ /// DateFormat : The date format setting for the budget. In some cases the format will not be available and will be specified as null. + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct DateFormat { #[serde(rename = "format")] @@ -21,7 +22,7 @@ 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, + format, } } } diff --git a/src/models/error_detail.rs b/src/models/error_detail.rs index 32e0380..b8ce02a 100644 --- a/src/models/error_detail.rs +++ b/src/models/error_detail.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct ErrorDetail { #[serde(rename = "id")] @@ -23,9 +24,9 @@ pub struct ErrorDetail { impl ErrorDetail { pub fn new(id: String, name: String, detail: String) -> ErrorDetail { ErrorDetail { - id: id, - name: name, - detail: detail, + id, + name, + detail, } } } diff --git a/src/models/error_response.rs b/src/models/error_response.rs index 49760b3..7c43363 100644 --- a/src/models/error_response.rs +++ b/src/models/error_response.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct ErrorResponse { #[serde(rename = "error")] @@ -19,7 +20,7 @@ pub struct ErrorResponse { impl ErrorResponse { pub fn new(error: crate::models::ErrorDetail) -> ErrorResponse { ErrorResponse { - error: error, + error, } } } diff --git a/src/models/hybrid_transaction.rs b/src/models/hybrid_transaction.rs index a0b0f07..9085d6f 100644 --- a/src/models/hybrid_transaction.rs +++ b/src/models/hybrid_transaction.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct HybridTransaction { #[serde(rename = "id")] @@ -24,13 +25,13 @@ pub struct HybridTransaction { pub memo: Option, /// The cleared status of the transaction #[serde(rename = "cleared")] - pub cleared: String, + pub cleared: Cleared, /// 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, + pub flag_color: Option, #[serde(rename = "account_id")] pub account_id: String, #[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")] @@ -67,32 +68,58 @@ pub struct HybridTransaction { } impl HybridTransaction { - pub fn new(id: String, date: String, amount: i64, cleared: String, approved: bool, account_id: String, deleted: bool, _type: Type, account_name: String) -> HybridTransaction { + pub fn new(id: String, date: String, amount: i64, cleared: Cleared, approved: bool, account_id: String, deleted: bool, _type: Type, account_name: String) -> HybridTransaction { HybridTransaction { - id: id, - date: date, - amount: amount, + id, + date, + amount, memo: None, - cleared: cleared, - approved: approved, + cleared, + approved, flag_color: None, - account_id: 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, + deleted, + _type, parent_transaction_id: None, - account_name: account_name, + account_name, payee_name: None, category_name: None, } } } +/// The cleared status of the transaction +#[derive(Debug, PartialEq, Serialize, Deserialize)] +pub enum Cleared { + #[serde(rename = "cleared")] + Cleared, + #[serde(rename = "uncleared")] + Uncleared, + #[serde(rename = "reconciled")] + Reconciled, +} +/// The transaction flag +#[derive(Debug, PartialEq, 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, PartialEq, Serialize, Deserialize)] pub enum Type { diff --git a/src/models/hybrid_transaction_all_of.rs b/src/models/hybrid_transaction_all_of.rs index 7092a71..c5ff791 100644 --- a/src/models/hybrid_transaction_all_of.rs +++ b/src/models/hybrid_transaction_all_of.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct HybridTransactionAllOf { /// Whether the hybrid transaction represents a regular transaction or a subtransaction @@ -29,9 +30,9 @@ pub struct HybridTransactionAllOf { impl HybridTransactionAllOf { pub fn new(_type: Type, account_name: String) -> HybridTransactionAllOf { HybridTransactionAllOf { - _type: _type, + _type, parent_transaction_id: None, - account_name: account_name, + account_name, payee_name: None, category_name: None, } diff --git a/src/models/hybrid_transactions_response.rs b/src/models/hybrid_transactions_response.rs index 11926f7..46896dd 100644 --- a/src/models/hybrid_transactions_response.rs +++ b/src/models/hybrid_transactions_response.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct HybridTransactionsResponse { #[serde(rename = "data")] @@ -19,7 +20,7 @@ pub struct HybridTransactionsResponse { impl HybridTransactionsResponse { pub fn new(data: crate::models::HybridTransactionsResponseData) -> HybridTransactionsResponse { HybridTransactionsResponse { - data: data, + data, } } } diff --git a/src/models/hybrid_transactions_response_data.rs b/src/models/hybrid_transactions_response_data.rs index b0b8143..a2b62d1 100644 --- a/src/models/hybrid_transactions_response_data.rs +++ b/src/models/hybrid_transactions_response_data.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct HybridTransactionsResponseData { #[serde(rename = "transactions")] @@ -19,7 +20,7 @@ pub struct HybridTransactionsResponseData { impl HybridTransactionsResponseData { pub fn new(transactions: Vec) -> HybridTransactionsResponseData { HybridTransactionsResponseData { - transactions: transactions, + transactions, } } } diff --git a/src/models/mod.rs b/src/models/mod.rs index 45b8f62..b8ec6a1 100644 --- a/src/models/mod.rs +++ b/src/models/mod.rs @@ -1,166 +1,166 @@ -mod account; +pub mod account; pub use self::account::Account; -mod account_response; +pub mod account_response; pub use self::account_response::AccountResponse; -mod account_response_data; +pub mod account_response_data; pub use self::account_response_data::AccountResponseData; -mod accounts_response; +pub mod accounts_response; pub use self::accounts_response::AccountsResponse; -mod accounts_response_data; +pub mod accounts_response_data; pub use self::accounts_response_data::AccountsResponseData; -mod budget_detail; +pub mod budget_detail; pub use self::budget_detail::BudgetDetail; -mod budget_detail_all_of; +pub mod budget_detail_all_of; pub use self::budget_detail_all_of::BudgetDetailAllOf; -mod budget_detail_response; +pub mod budget_detail_response; pub use self::budget_detail_response::BudgetDetailResponse; -mod budget_detail_response_data; +pub mod budget_detail_response_data; pub use self::budget_detail_response_data::BudgetDetailResponseData; -mod budget_settings; +pub mod budget_settings; pub use self::budget_settings::BudgetSettings; -mod budget_settings_response; +pub mod budget_settings_response; pub use self::budget_settings_response::BudgetSettingsResponse; -mod budget_settings_response_data; +pub mod budget_settings_response_data; pub use self::budget_settings_response_data::BudgetSettingsResponseData; -mod budget_summary; +pub mod budget_summary; pub use self::budget_summary::BudgetSummary; -mod budget_summary_response; +pub mod budget_summary_response; pub use self::budget_summary_response::BudgetSummaryResponse; -mod budget_summary_response_data; +pub mod budget_summary_response_data; pub use self::budget_summary_response_data::BudgetSummaryResponseData; -mod bulk_response; +pub mod bulk_response; pub use self::bulk_response::BulkResponse; -mod bulk_response_data; +pub mod bulk_response_data; pub use self::bulk_response_data::BulkResponseData; -mod bulk_response_data_bulk; +pub mod bulk_response_data_bulk; pub use self::bulk_response_data_bulk::BulkResponseDataBulk; -mod bulk_transactions; +pub mod bulk_transactions; pub use self::bulk_transactions::BulkTransactions; -mod categories_response; +pub mod categories_response; pub use self::categories_response::CategoriesResponse; -mod categories_response_data; +pub mod categories_response_data; pub use self::categories_response_data::CategoriesResponseData; -mod category; +pub mod category; pub use self::category::Category; -mod category_group; +pub mod category_group; pub use self::category_group::CategoryGroup; -mod category_group_with_categories; +pub mod category_group_with_categories; pub use self::category_group_with_categories::CategoryGroupWithCategories; -mod category_group_with_categories_all_of; +pub mod category_group_with_categories_all_of; pub use self::category_group_with_categories_all_of::CategoryGroupWithCategoriesAllOf; -mod category_response; +pub mod category_response; pub use self::category_response::CategoryResponse; -mod category_response_data; +pub mod category_response_data; pub use self::category_response_data::CategoryResponseData; -mod currency_format; +pub mod currency_format; pub use self::currency_format::CurrencyFormat; -mod date_format; +pub mod date_format; pub use self::date_format::DateFormat; -mod error_detail; +pub mod error_detail; pub use self::error_detail::ErrorDetail; -mod error_response; +pub mod error_response; pub use self::error_response::ErrorResponse; -mod hybrid_transaction; +pub mod hybrid_transaction; pub use self::hybrid_transaction::HybridTransaction; -mod hybrid_transaction_all_of; +pub mod hybrid_transaction_all_of; pub use self::hybrid_transaction_all_of::HybridTransactionAllOf; -mod hybrid_transactions_response; +pub mod hybrid_transactions_response; pub use self::hybrid_transactions_response::HybridTransactionsResponse; -mod hybrid_transactions_response_data; +pub mod hybrid_transactions_response_data; pub use self::hybrid_transactions_response_data::HybridTransactionsResponseData; -mod month_detail; +pub mod month_detail; pub use self::month_detail::MonthDetail; -mod month_detail_all_of; +pub mod month_detail_all_of; pub use self::month_detail_all_of::MonthDetailAllOf; -mod month_detail_response; +pub mod month_detail_response; pub use self::month_detail_response::MonthDetailResponse; -mod month_detail_response_data; +pub mod month_detail_response_data; pub use self::month_detail_response_data::MonthDetailResponseData; -mod month_summaries_response; +pub mod month_summaries_response; pub use self::month_summaries_response::MonthSummariesResponse; -mod month_summaries_response_data; +pub mod month_summaries_response_data; pub use self::month_summaries_response_data::MonthSummariesResponseData; -mod month_summary; +pub mod month_summary; pub use self::month_summary::MonthSummary; -mod payee; +pub mod payee; pub use self::payee::Payee; -mod payee_location; +pub mod payee_location; pub use self::payee_location::PayeeLocation; -mod payee_location_response; +pub mod payee_location_response; pub use self::payee_location_response::PayeeLocationResponse; -mod payee_location_response_data; +pub mod payee_location_response_data; pub use self::payee_location_response_data::PayeeLocationResponseData; -mod payee_locations_response; +pub mod payee_locations_response; pub use self::payee_locations_response::PayeeLocationsResponse; -mod payee_locations_response_data; +pub mod payee_locations_response_data; pub use self::payee_locations_response_data::PayeeLocationsResponseData; -mod payee_response; +pub mod payee_response; pub use self::payee_response::PayeeResponse; -mod payee_response_data; +pub mod payee_response_data; pub use self::payee_response_data::PayeeResponseData; -mod payees_response; +pub mod payees_response; pub use self::payees_response::PayeesResponse; -mod payees_response_data; +pub mod payees_response_data; pub use self::payees_response_data::PayeesResponseData; -mod save_category_response; +pub mod save_category_response; pub use self::save_category_response::SaveCategoryResponse; -mod save_category_response_data; +pub mod save_category_response_data; pub use self::save_category_response_data::SaveCategoryResponseData; -mod save_month_category; +pub mod save_month_category; pub use self::save_month_category::SaveMonthCategory; -mod save_month_category_wrapper; +pub mod save_month_category_wrapper; pub use self::save_month_category_wrapper::SaveMonthCategoryWrapper; -mod save_transaction; +pub mod save_transaction; pub use self::save_transaction::SaveTransaction; -mod save_transaction_wrapper; +pub mod save_transaction_wrapper; pub use self::save_transaction_wrapper::SaveTransactionWrapper; -mod save_transactions_response; +pub mod save_transactions_response; pub use self::save_transactions_response::SaveTransactionsResponse; -mod save_transactions_response_data; +pub mod save_transactions_response_data; pub use self::save_transactions_response_data::SaveTransactionsResponseData; -mod save_transactions_wrapper; +pub mod save_transactions_wrapper; pub use self::save_transactions_wrapper::SaveTransactionsWrapper; -mod scheduled_sub_transaction; +pub mod scheduled_sub_transaction; pub use self::scheduled_sub_transaction::ScheduledSubTransaction; -mod scheduled_transaction_detail; +pub mod scheduled_transaction_detail; pub use self::scheduled_transaction_detail::ScheduledTransactionDetail; -mod scheduled_transaction_detail_all_of; +pub mod scheduled_transaction_detail_all_of; pub use self::scheduled_transaction_detail_all_of::ScheduledTransactionDetailAllOf; -mod scheduled_transaction_response; +pub mod scheduled_transaction_response; pub use self::scheduled_transaction_response::ScheduledTransactionResponse; -mod scheduled_transaction_response_data; +pub mod scheduled_transaction_response_data; pub use self::scheduled_transaction_response_data::ScheduledTransactionResponseData; -mod scheduled_transaction_summary; +pub mod scheduled_transaction_summary; pub use self::scheduled_transaction_summary::ScheduledTransactionSummary; -mod scheduled_transactions_response; +pub mod scheduled_transactions_response; pub use self::scheduled_transactions_response::ScheduledTransactionsResponse; -mod scheduled_transactions_response_data; +pub mod scheduled_transactions_response_data; pub use self::scheduled_transactions_response_data::ScheduledTransactionsResponseData; -mod sub_transaction; +pub mod sub_transaction; pub use self::sub_transaction::SubTransaction; -mod transaction_detail; +pub mod transaction_detail; pub use self::transaction_detail::TransactionDetail; -mod transaction_detail_all_of; +pub mod transaction_detail_all_of; pub use self::transaction_detail_all_of::TransactionDetailAllOf; -mod transaction_response; +pub mod transaction_response; pub use self::transaction_response::TransactionResponse; -mod transaction_response_data; +pub mod transaction_response_data; pub use self::transaction_response_data::TransactionResponseData; -mod transaction_summary; +pub mod transaction_summary; pub use self::transaction_summary::TransactionSummary; -mod transactions_response; +pub mod transactions_response; pub use self::transactions_response::TransactionsResponse; -mod transactions_response_data; +pub mod transactions_response_data; pub use self::transactions_response_data::TransactionsResponseData; -mod update_transaction; +pub mod update_transaction; pub use self::update_transaction::UpdateTransaction; -mod update_transaction_all_of; +pub mod update_transaction_all_of; pub use self::update_transaction_all_of::UpdateTransactionAllOf; -mod update_transactions_wrapper; +pub mod update_transactions_wrapper; pub use self::update_transactions_wrapper::UpdateTransactionsWrapper; -mod user; +pub mod user; pub use self::user::User; -mod user_response; +pub mod user_response; pub use self::user_response::UserResponse; -mod user_response_data; +pub 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 index 28b6d56..32b6f9e 100644 --- a/src/models/month_detail.rs +++ b/src/models/month_detail.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct MonthDetail { #[serde(rename = "month")] @@ -42,15 +43,15 @@ pub struct MonthDetail { impl MonthDetail { pub fn new(month: String, income: i64, budgeted: i64, activity: i64, to_be_budgeted: i64, deleted: bool, categories: Vec) -> MonthDetail { MonthDetail { - month: month, + month, note: None, - income: income, - budgeted: budgeted, - activity: activity, - to_be_budgeted: to_be_budgeted, + income, + budgeted, + activity, + to_be_budgeted, age_of_money: None, - deleted: deleted, - categories: categories, + deleted, + categories, } } } diff --git a/src/models/month_detail_all_of.rs b/src/models/month_detail_all_of.rs index a805bba..2d816a8 100644 --- a/src/models/month_detail_all_of.rs +++ b/src/models/month_detail_all_of.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct MonthDetailAllOf { /// The budget month categories. Amounts (budgeted, activity, balance, etc.) are specific to the {month} parameter specified. @@ -20,7 +21,7 @@ pub struct MonthDetailAllOf { impl MonthDetailAllOf { pub fn new(categories: Vec) -> MonthDetailAllOf { MonthDetailAllOf { - categories: categories, + categories, } } } diff --git a/src/models/month_detail_response.rs b/src/models/month_detail_response.rs index 9c6d3b9..a0447a4 100644 --- a/src/models/month_detail_response.rs +++ b/src/models/month_detail_response.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct MonthDetailResponse { #[serde(rename = "data")] @@ -19,7 +20,7 @@ pub struct MonthDetailResponse { impl MonthDetailResponse { pub fn new(data: crate::models::MonthDetailResponseData) -> MonthDetailResponse { MonthDetailResponse { - data: data, + data, } } } diff --git a/src/models/month_detail_response_data.rs b/src/models/month_detail_response_data.rs index 3a60eb5..703648d 100644 --- a/src/models/month_detail_response_data.rs +++ b/src/models/month_detail_response_data.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct MonthDetailResponseData { #[serde(rename = "month")] @@ -19,7 +20,7 @@ pub struct MonthDetailResponseData { impl MonthDetailResponseData { pub fn new(month: crate::models::MonthDetail) -> MonthDetailResponseData { MonthDetailResponseData { - month: month, + month, } } } diff --git a/src/models/month_summaries_response.rs b/src/models/month_summaries_response.rs index 7158753..3f376f9 100644 --- a/src/models/month_summaries_response.rs +++ b/src/models/month_summaries_response.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct MonthSummariesResponse { #[serde(rename = "data")] @@ -19,7 +20,7 @@ pub struct MonthSummariesResponse { impl MonthSummariesResponse { pub fn new(data: crate::models::MonthSummariesResponseData) -> MonthSummariesResponse { MonthSummariesResponse { - data: data, + data, } } } diff --git a/src/models/month_summaries_response_data.rs b/src/models/month_summaries_response_data.rs index 03ed9d5..4d32a69 100644 --- a/src/models/month_summaries_response_data.rs +++ b/src/models/month_summaries_response_data.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct MonthSummariesResponseData { #[serde(rename = "months")] @@ -22,8 +23,8 @@ pub struct MonthSummariesResponseData { impl MonthSummariesResponseData { pub fn new(months: Vec, server_knowledge: i64) -> MonthSummariesResponseData { MonthSummariesResponseData { - months: months, - server_knowledge: server_knowledge, + months, + server_knowledge, } } } diff --git a/src/models/month_summary.rs b/src/models/month_summary.rs index f1efaee..b0d67e9 100644 --- a/src/models/month_summary.rs +++ b/src/models/month_summary.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct MonthSummary { #[serde(rename = "month")] @@ -39,14 +40,14 @@ pub struct MonthSummary { impl MonthSummary { pub fn new(month: String, income: i64, budgeted: i64, activity: i64, to_be_budgeted: i64, deleted: bool) -> MonthSummary { MonthSummary { - month: month, + month, note: None, - income: income, - budgeted: budgeted, - activity: activity, - to_be_budgeted: to_be_budgeted, + income, + budgeted, + activity, + to_be_budgeted, age_of_money: None, - deleted: deleted, + deleted, } } } diff --git a/src/models/payee.rs b/src/models/payee.rs index 0f17785..5822d85 100644 --- a/src/models/payee.rs +++ b/src/models/payee.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct Payee { #[serde(rename = "id")] @@ -27,10 +28,10 @@ pub struct Payee { impl Payee { pub fn new(id: String, name: String, deleted: bool) -> Payee { Payee { - id: id, - name: name, + id, + name, transfer_account_id: None, - deleted: deleted, + deleted, } } } diff --git a/src/models/payee_location.rs b/src/models/payee_location.rs index e40eea2..eca0584 100644 --- a/src/models/payee_location.rs +++ b/src/models/payee_location.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct PayeeLocation { #[serde(rename = "id")] @@ -28,11 +29,11 @@ pub struct PayeeLocation { 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, + id, + payee_id, + latitude, + longitude, + deleted, } } } diff --git a/src/models/payee_location_response.rs b/src/models/payee_location_response.rs index 66e2698..162d6d5 100644 --- a/src/models/payee_location_response.rs +++ b/src/models/payee_location_response.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct PayeeLocationResponse { #[serde(rename = "data")] @@ -19,7 +20,7 @@ pub struct PayeeLocationResponse { impl PayeeLocationResponse { pub fn new(data: crate::models::PayeeLocationResponseData) -> PayeeLocationResponse { PayeeLocationResponse { - data: data, + data, } } } diff --git a/src/models/payee_location_response_data.rs b/src/models/payee_location_response_data.rs index 0da3992..99101d4 100644 --- a/src/models/payee_location_response_data.rs +++ b/src/models/payee_location_response_data.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct PayeeLocationResponseData { #[serde(rename = "payee_location")] @@ -19,7 +20,7 @@ pub struct PayeeLocationResponseData { impl PayeeLocationResponseData { pub fn new(payee_location: crate::models::PayeeLocation) -> PayeeLocationResponseData { PayeeLocationResponseData { - payee_location: payee_location, + payee_location, } } } diff --git a/src/models/payee_locations_response.rs b/src/models/payee_locations_response.rs index ab05f6e..147904a 100644 --- a/src/models/payee_locations_response.rs +++ b/src/models/payee_locations_response.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct PayeeLocationsResponse { #[serde(rename = "data")] @@ -19,7 +20,7 @@ pub struct PayeeLocationsResponse { impl PayeeLocationsResponse { pub fn new(data: crate::models::PayeeLocationsResponseData) -> PayeeLocationsResponse { PayeeLocationsResponse { - data: data, + data, } } } diff --git a/src/models/payee_locations_response_data.rs b/src/models/payee_locations_response_data.rs index 32e061d..4557fac 100644 --- a/src/models/payee_locations_response_data.rs +++ b/src/models/payee_locations_response_data.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct PayeeLocationsResponseData { #[serde(rename = "payee_locations")] @@ -19,7 +20,7 @@ pub struct PayeeLocationsResponseData { impl PayeeLocationsResponseData { pub fn new(payee_locations: Vec) -> PayeeLocationsResponseData { PayeeLocationsResponseData { - payee_locations: payee_locations, + payee_locations, } } } diff --git a/src/models/payee_response.rs b/src/models/payee_response.rs index 650c90d..911fd18 100644 --- a/src/models/payee_response.rs +++ b/src/models/payee_response.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct PayeeResponse { #[serde(rename = "data")] @@ -19,7 +20,7 @@ pub struct PayeeResponse { impl PayeeResponse { pub fn new(data: crate::models::PayeeResponseData) -> PayeeResponse { PayeeResponse { - data: data, + data, } } } diff --git a/src/models/payee_response_data.rs b/src/models/payee_response_data.rs index ff8e342..5c09b85 100644 --- a/src/models/payee_response_data.rs +++ b/src/models/payee_response_data.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct PayeeResponseData { #[serde(rename = "payee")] @@ -19,7 +20,7 @@ pub struct PayeeResponseData { impl PayeeResponseData { pub fn new(payee: crate::models::Payee) -> PayeeResponseData { PayeeResponseData { - payee: payee, + payee, } } } diff --git a/src/models/payees_response.rs b/src/models/payees_response.rs index bd6d6e1..bbe713d 100644 --- a/src/models/payees_response.rs +++ b/src/models/payees_response.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct PayeesResponse { #[serde(rename = "data")] @@ -19,7 +20,7 @@ pub struct PayeesResponse { impl PayeesResponse { pub fn new(data: crate::models::PayeesResponseData) -> PayeesResponse { PayeesResponse { - data: data, + data, } } } diff --git a/src/models/payees_response_data.rs b/src/models/payees_response_data.rs index efa3313..7ce35d9 100644 --- a/src/models/payees_response_data.rs +++ b/src/models/payees_response_data.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct PayeesResponseData { #[serde(rename = "payees")] @@ -22,8 +23,8 @@ pub struct PayeesResponseData { impl PayeesResponseData { pub fn new(payees: Vec, server_knowledge: i64) -> PayeesResponseData { PayeesResponseData { - payees: payees, - server_knowledge: server_knowledge, + payees, + server_knowledge, } } } diff --git a/src/models/save_category_response.rs b/src/models/save_category_response.rs index 3d33509..153501c 100644 --- a/src/models/save_category_response.rs +++ b/src/models/save_category_response.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct SaveCategoryResponse { #[serde(rename = "data")] @@ -19,7 +20,7 @@ pub struct SaveCategoryResponse { impl SaveCategoryResponse { pub fn new(data: crate::models::SaveCategoryResponseData) -> SaveCategoryResponse { SaveCategoryResponse { - data: data, + data, } } } diff --git a/src/models/save_category_response_data.rs b/src/models/save_category_response_data.rs index 536ba30..8f84251 100644 --- a/src/models/save_category_response_data.rs +++ b/src/models/save_category_response_data.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct SaveCategoryResponseData { #[serde(rename = "category")] @@ -22,8 +23,8 @@ pub struct SaveCategoryResponseData { impl SaveCategoryResponseData { pub fn new(category: crate::models::Category, server_knowledge: i64) -> SaveCategoryResponseData { SaveCategoryResponseData { - category: category, - server_knowledge: server_knowledge, + category, + server_knowledge, } } } diff --git a/src/models/save_month_category.rs b/src/models/save_month_category.rs index e2862eb..786f8ce 100644 --- a/src/models/save_month_category.rs +++ b/src/models/save_month_category.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct SaveMonthCategory { /// Budgeted amount in milliunits format @@ -20,7 +21,7 @@ pub struct SaveMonthCategory { impl SaveMonthCategory { pub fn new(budgeted: i64) -> SaveMonthCategory { SaveMonthCategory { - budgeted: budgeted, + budgeted, } } } diff --git a/src/models/save_month_category_wrapper.rs b/src/models/save_month_category_wrapper.rs index ddd7154..9382cbf 100644 --- a/src/models/save_month_category_wrapper.rs +++ b/src/models/save_month_category_wrapper.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct SaveMonthCategoryWrapper { #[serde(rename = "category")] @@ -19,7 +20,7 @@ pub struct SaveMonthCategoryWrapper { impl SaveMonthCategoryWrapper { pub fn new(category: crate::models::SaveMonthCategory) -> SaveMonthCategoryWrapper { SaveMonthCategoryWrapper { - category: category, + category, } } } diff --git a/src/models/save_transaction.rs b/src/models/save_transaction.rs index a864007..1031aca 100644 --- a/src/models/save_transaction.rs +++ b/src/models/save_transaction.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct SaveTransaction { #[serde(rename = "account_id")] @@ -33,13 +34,13 @@ pub struct SaveTransaction { pub memo: Option, /// The cleared status of the transaction #[serde(rename = "cleared", skip_serializing_if = "Option::is_none")] - pub cleared: Option, + 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, + pub flag_color: Option, /// If specified, the new transaction will be assigned this import_id and considered \"imported\". We will also attempt to match this imported transaction to an existing \"user-entered\" transation on the same account, with the same amount, and with a date +/-10 days from the imported transaction date.

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, @@ -48,9 +49,9 @@ pub struct SaveTransaction { impl SaveTransaction { pub fn new(account_id: String, date: String, amount: i64) -> SaveTransaction { SaveTransaction { - account_id: account_id, - date: date, - amount: amount, + account_id, + date, + amount, payee_id: None, payee_name: None, category_id: None, @@ -63,4 +64,30 @@ impl SaveTransaction { } } +/// The cleared status of the transaction +#[derive(Debug, PartialEq, Serialize, Deserialize)] +pub enum Cleared { + #[serde(rename = "cleared")] + Cleared, + #[serde(rename = "uncleared")] + Uncleared, + #[serde(rename = "reconciled")] + Reconciled, +} +/// The transaction flag +#[derive(Debug, PartialEq, 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 index 8152229..04b683a 100644 --- a/src/models/save_transaction_wrapper.rs +++ b/src/models/save_transaction_wrapper.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct SaveTransactionWrapper { #[serde(rename = "transaction")] @@ -19,7 +20,7 @@ pub struct SaveTransactionWrapper { impl SaveTransactionWrapper { pub fn new(transaction: crate::models::SaveTransaction) -> SaveTransactionWrapper { SaveTransactionWrapper { - transaction: transaction, + transaction, } } } diff --git a/src/models/save_transactions_response.rs b/src/models/save_transactions_response.rs index 9617ee3..d8a201d 100644 --- a/src/models/save_transactions_response.rs +++ b/src/models/save_transactions_response.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct SaveTransactionsResponse { #[serde(rename = "data")] @@ -19,7 +20,7 @@ pub struct SaveTransactionsResponse { impl SaveTransactionsResponse { pub fn new(data: crate::models::SaveTransactionsResponseData) -> SaveTransactionsResponse { SaveTransactionsResponse { - data: data, + data, } } } diff --git a/src/models/save_transactions_response_data.rs b/src/models/save_transactions_response_data.rs index 0b76b5e..737192b 100644 --- a/src/models/save_transactions_response_data.rs +++ b/src/models/save_transactions_response_data.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct SaveTransactionsResponseData { /// The transaction ids that were saved @@ -31,11 +32,11 @@ pub struct SaveTransactionsResponseData { impl SaveTransactionsResponseData { pub fn new(transaction_ids: Vec, server_knowledge: i64) -> SaveTransactionsResponseData { SaveTransactionsResponseData { - transaction_ids: transaction_ids, + transaction_ids, transaction: None, transactions: None, duplicate_import_ids: None, - server_knowledge: server_knowledge, + server_knowledge, } } } diff --git a/src/models/save_transactions_wrapper.rs b/src/models/save_transactions_wrapper.rs index cb6613f..f3ae055 100644 --- a/src/models/save_transactions_wrapper.rs +++ b/src/models/save_transactions_wrapper.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct SaveTransactionsWrapper { #[serde(rename = "transaction", skip_serializing_if = "Option::is_none")] diff --git a/src/models/scheduled_sub_transaction.rs b/src/models/scheduled_sub_transaction.rs index 31a880f..d8da7d6 100644 --- a/src/models/scheduled_sub_transaction.rs +++ b/src/models/scheduled_sub_transaction.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct ScheduledSubTransaction { #[serde(rename = "id")] @@ -36,14 +37,14 @@ pub struct ScheduledSubTransaction { impl ScheduledSubTransaction { pub fn new(id: String, scheduled_transaction_id: String, amount: i64, deleted: bool) -> ScheduledSubTransaction { ScheduledSubTransaction { - id: id, - scheduled_transaction_id: scheduled_transaction_id, - amount: amount, + id, + scheduled_transaction_id, + amount, memo: None, payee_id: None, category_id: None, transfer_account_id: None, - deleted: deleted, + deleted, } } } diff --git a/src/models/scheduled_transaction_detail.rs b/src/models/scheduled_transaction_detail.rs index d553329..5cc2e65 100644 --- a/src/models/scheduled_transaction_detail.rs +++ b/src/models/scheduled_transaction_detail.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct ScheduledTransactionDetail { #[serde(rename = "id")] @@ -21,7 +22,7 @@ pub struct ScheduledTransactionDetail { #[serde(rename = "date_next")] pub date_next: String, #[serde(rename = "frequency")] - pub frequency: String, + pub frequency: Frequency, /// The scheduled transaction amount in milliunits format #[serde(rename = "amount")] pub amount: i64, @@ -29,7 +30,7 @@ pub struct ScheduledTransactionDetail { pub memo: Option, /// The scheduled transaction flag #[serde(rename = "flag_color", skip_serializing_if = "Option::is_none")] - pub flag_color: Option, + pub flag_color: Option, #[serde(rename = "account_id")] pub account_id: String, #[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")] @@ -54,26 +55,72 @@ pub struct ScheduledTransactionDetail { } impl ScheduledTransactionDetail { - pub fn new(id: String, date_first: String, date_next: String, frequency: String, amount: i64, account_id: String, deleted: bool, account_name: String, subtransactions: Vec) -> ScheduledTransactionDetail { + pub fn new(id: String, date_first: String, date_next: String, frequency: Frequency, amount: i64, account_id: String, deleted: bool, account_name: String, subtransactions: Vec) -> ScheduledTransactionDetail { ScheduledTransactionDetail { - id: id, - date_first: date_first, - date_next: date_next, - frequency: frequency, - amount: amount, + id, + date_first, + date_next, + frequency, + amount, memo: None, flag_color: None, - account_id: account_id, + account_id, payee_id: None, category_id: None, transfer_account_id: None, - deleted: deleted, - account_name: account_name, + deleted, + account_name, payee_name: None, category_name: None, - subtransactions: subtransactions, + subtransactions, } } } +/// +#[derive(Debug, PartialEq, 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, PartialEq, 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 index b977afd..21cfca0 100644 --- a/src/models/scheduled_transaction_detail_all_of.rs +++ b/src/models/scheduled_transaction_detail_all_of.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct ScheduledTransactionDetailAllOf { #[serde(rename = "account_name")] @@ -26,10 +27,10 @@ pub struct ScheduledTransactionDetailAllOf { impl ScheduledTransactionDetailAllOf { pub fn new(account_name: String, subtransactions: Vec) -> ScheduledTransactionDetailAllOf { ScheduledTransactionDetailAllOf { - account_name: account_name, + account_name, payee_name: None, category_name: None, - subtransactions: subtransactions, + subtransactions, } } } diff --git a/src/models/scheduled_transaction_response.rs b/src/models/scheduled_transaction_response.rs index 232e09f..09720ac 100644 --- a/src/models/scheduled_transaction_response.rs +++ b/src/models/scheduled_transaction_response.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct ScheduledTransactionResponse { #[serde(rename = "data")] @@ -19,7 +20,7 @@ pub struct ScheduledTransactionResponse { impl ScheduledTransactionResponse { pub fn new(data: crate::models::ScheduledTransactionResponseData) -> ScheduledTransactionResponse { ScheduledTransactionResponse { - data: data, + data, } } } diff --git a/src/models/scheduled_transaction_response_data.rs b/src/models/scheduled_transaction_response_data.rs index 1cd7379..418dffb 100644 --- a/src/models/scheduled_transaction_response_data.rs +++ b/src/models/scheduled_transaction_response_data.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct ScheduledTransactionResponseData { #[serde(rename = "scheduled_transaction")] @@ -19,7 +20,7 @@ pub struct ScheduledTransactionResponseData { impl ScheduledTransactionResponseData { pub fn new(scheduled_transaction: crate::models::ScheduledTransactionDetail) -> ScheduledTransactionResponseData { ScheduledTransactionResponseData { - scheduled_transaction: scheduled_transaction, + scheduled_transaction, } } } diff --git a/src/models/scheduled_transaction_summary.rs b/src/models/scheduled_transaction_summary.rs index b70d53c..d380efb 100644 --- a/src/models/scheduled_transaction_summary.rs +++ b/src/models/scheduled_transaction_summary.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct ScheduledTransactionSummary { #[serde(rename = "id")] @@ -21,7 +22,7 @@ pub struct ScheduledTransactionSummary { #[serde(rename = "date_next")] pub date_next: String, #[serde(rename = "frequency")] - pub frequency: String, + pub frequency: Frequency, /// The scheduled transaction amount in milliunits format #[serde(rename = "amount")] pub amount: i64, @@ -29,7 +30,7 @@ pub struct ScheduledTransactionSummary { pub memo: Option, /// The scheduled transaction flag #[serde(rename = "flag_color", skip_serializing_if = "Option::is_none")] - pub flag_color: Option, + pub flag_color: Option, #[serde(rename = "account_id")] pub account_id: String, #[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")] @@ -45,22 +46,68 @@ pub struct ScheduledTransactionSummary { } impl ScheduledTransactionSummary { - pub fn new(id: String, date_first: String, date_next: String, frequency: String, amount: i64, account_id: String, deleted: bool) -> ScheduledTransactionSummary { + pub fn new(id: String, date_first: String, date_next: String, frequency: Frequency, amount: i64, account_id: String, deleted: bool) -> ScheduledTransactionSummary { ScheduledTransactionSummary { - id: id, - date_first: date_first, - date_next: date_next, - frequency: frequency, - amount: amount, + id, + date_first, + date_next, + frequency, + amount, memo: None, flag_color: None, - account_id: account_id, + account_id, payee_id: None, category_id: None, transfer_account_id: None, - deleted: deleted, + deleted, } } } +/// +#[derive(Debug, PartialEq, 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, PartialEq, 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 index 77d4376..f9731f0 100644 --- a/src/models/scheduled_transactions_response.rs +++ b/src/models/scheduled_transactions_response.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct ScheduledTransactionsResponse { #[serde(rename = "data")] @@ -19,7 +20,7 @@ pub struct ScheduledTransactionsResponse { impl ScheduledTransactionsResponse { pub fn new(data: crate::models::ScheduledTransactionsResponseData) -> ScheduledTransactionsResponse { ScheduledTransactionsResponse { - data: data, + data, } } } diff --git a/src/models/scheduled_transactions_response_data.rs b/src/models/scheduled_transactions_response_data.rs index a9072d4..eeac95c 100644 --- a/src/models/scheduled_transactions_response_data.rs +++ b/src/models/scheduled_transactions_response_data.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct ScheduledTransactionsResponseData { #[serde(rename = "scheduled_transactions")] @@ -22,8 +23,8 @@ pub struct ScheduledTransactionsResponseData { impl ScheduledTransactionsResponseData { pub fn new(scheduled_transactions: Vec, server_knowledge: i64) -> ScheduledTransactionsResponseData { ScheduledTransactionsResponseData { - scheduled_transactions: scheduled_transactions, - server_knowledge: server_knowledge, + scheduled_transactions, + server_knowledge, } } } diff --git a/src/models/sub_transaction.rs b/src/models/sub_transaction.rs index 639d5e7..d1d7f48 100644 --- a/src/models/sub_transaction.rs +++ b/src/models/sub_transaction.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct SubTransaction { #[serde(rename = "id")] @@ -36,14 +37,14 @@ pub struct SubTransaction { impl SubTransaction { pub fn new(id: String, transaction_id: String, amount: i64, deleted: bool) -> SubTransaction { SubTransaction { - id: id, - transaction_id: transaction_id, - amount: amount, + id, + transaction_id, + amount, memo: None, payee_id: None, category_id: None, transfer_account_id: None, - deleted: deleted, + deleted, } } } diff --git a/src/models/transaction_detail.rs b/src/models/transaction_detail.rs index ca6be2e..b363b3b 100644 --- a/src/models/transaction_detail.rs +++ b/src/models/transaction_detail.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct TransactionDetail { #[serde(rename = "id")] @@ -24,13 +25,13 @@ pub struct TransactionDetail { pub memo: Option, /// The cleared status of the transaction #[serde(rename = "cleared")] - pub cleared: String, + pub cleared: Cleared, /// 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, + pub flag_color: Option, #[serde(rename = "account_id")] pub account_id: String, #[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")] @@ -64,29 +65,55 @@ pub struct TransactionDetail { } 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) -> TransactionDetail { + pub fn new(id: String, date: String, amount: i64, cleared: Cleared, approved: bool, account_id: String, deleted: bool, account_name: String, subtransactions: Vec) -> TransactionDetail { TransactionDetail { - id: id, - date: date, - amount: amount, + id, + date, + amount, memo: None, - cleared: cleared, - approved: approved, + cleared, + approved, flag_color: None, - account_id: 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, + deleted, + account_name, payee_name: None, category_name: None, - subtransactions: subtransactions, + subtransactions, } } } +/// The cleared status of the transaction +#[derive(Debug, PartialEq, Serialize, Deserialize)] +pub enum Cleared { + #[serde(rename = "cleared")] + Cleared, + #[serde(rename = "uncleared")] + Uncleared, + #[serde(rename = "reconciled")] + Reconciled, +} +/// The transaction flag +#[derive(Debug, PartialEq, 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 index 68f2ebf..3c0df98 100644 --- a/src/models/transaction_detail_all_of.rs +++ b/src/models/transaction_detail_all_of.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct TransactionDetailAllOf { #[serde(rename = "account_name")] @@ -26,10 +27,10 @@ pub struct TransactionDetailAllOf { impl TransactionDetailAllOf { pub fn new(account_name: String, subtransactions: Vec) -> TransactionDetailAllOf { TransactionDetailAllOf { - account_name: account_name, + account_name, payee_name: None, category_name: None, - subtransactions: subtransactions, + subtransactions, } } } diff --git a/src/models/transaction_response.rs b/src/models/transaction_response.rs index 63ff8f1..13e87df 100644 --- a/src/models/transaction_response.rs +++ b/src/models/transaction_response.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct TransactionResponse { #[serde(rename = "data")] @@ -19,7 +20,7 @@ pub struct TransactionResponse { impl TransactionResponse { pub fn new(data: crate::models::TransactionResponseData) -> TransactionResponse { TransactionResponse { - data: data, + data, } } } diff --git a/src/models/transaction_response_data.rs b/src/models/transaction_response_data.rs index e9af627..a026aad 100644 --- a/src/models/transaction_response_data.rs +++ b/src/models/transaction_response_data.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct TransactionResponseData { #[serde(rename = "transaction")] @@ -19,7 +20,7 @@ pub struct TransactionResponseData { impl TransactionResponseData { pub fn new(transaction: crate::models::TransactionDetail) -> TransactionResponseData { TransactionResponseData { - transaction: transaction, + transaction, } } } diff --git a/src/models/transaction_summary.rs b/src/models/transaction_summary.rs index 9bf4cbd..715b233 100644 --- a/src/models/transaction_summary.rs +++ b/src/models/transaction_summary.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct TransactionSummary { #[serde(rename = "id")] @@ -24,13 +25,13 @@ pub struct TransactionSummary { pub memo: Option, /// The cleared status of the transaction #[serde(rename = "cleared")] - pub cleared: String, + pub cleared: Cleared, /// 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, + pub flag_color: Option, #[serde(rename = "account_id")] pub account_id: String, #[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")] @@ -55,25 +56,51 @@ pub struct TransactionSummary { } impl TransactionSummary { - pub fn new(id: String, date: String, amount: i64, cleared: String, approved: bool, account_id: String, deleted: bool) -> TransactionSummary { + pub fn new(id: String, date: String, amount: i64, cleared: Cleared, approved: bool, account_id: String, deleted: bool) -> TransactionSummary { TransactionSummary { - id: id, - date: date, - amount: amount, + id, + date, + amount, memo: None, - cleared: cleared, - approved: approved, + cleared, + approved, flag_color: None, - account_id: 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, + deleted, } } } +/// The cleared status of the transaction +#[derive(Debug, PartialEq, Serialize, Deserialize)] +pub enum Cleared { + #[serde(rename = "cleared")] + Cleared, + #[serde(rename = "uncleared")] + Uncleared, + #[serde(rename = "reconciled")] + Reconciled, +} +/// The transaction flag +#[derive(Debug, PartialEq, 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 index d3da899..33abb8e 100644 --- a/src/models/transactions_response.rs +++ b/src/models/transactions_response.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct TransactionsResponse { #[serde(rename = "data")] @@ -19,7 +20,7 @@ pub struct TransactionsResponse { impl TransactionsResponse { pub fn new(data: crate::models::TransactionsResponseData) -> TransactionsResponse { TransactionsResponse { - data: data, + data, } } } diff --git a/src/models/transactions_response_data.rs b/src/models/transactions_response_data.rs index 7c10090..da50e85 100644 --- a/src/models/transactions_response_data.rs +++ b/src/models/transactions_response_data.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct TransactionsResponseData { #[serde(rename = "transactions")] @@ -22,8 +23,8 @@ pub struct TransactionsResponseData { impl TransactionsResponseData { pub fn new(transactions: Vec, server_knowledge: i64) -> TransactionsResponseData { TransactionsResponseData { - transactions: transactions, - server_knowledge: server_knowledge, + transactions, + server_knowledge, } } } diff --git a/src/models/update_transaction.rs b/src/models/update_transaction.rs index d14c8d4..00b8f9b 100644 --- a/src/models/update_transaction.rs +++ b/src/models/update_transaction.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct UpdateTransaction { #[serde(rename = "id")] @@ -35,13 +36,13 @@ pub struct UpdateTransaction { pub memo: Option, /// The cleared status of the transaction #[serde(rename = "cleared", skip_serializing_if = "Option::is_none")] - pub cleared: Option, + 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, + pub flag_color: Option, /// If specified, the new transaction will be assigned this import_id and considered \"imported\". We will also attempt to match this imported transaction to an existing \"user-entered\" transation on the same account, with the same amount, and with a date +/-10 days from the imported transaction date.

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, @@ -50,10 +51,10 @@ pub struct UpdateTransaction { impl UpdateTransaction { pub fn new(id: String, account_id: String, date: String, amount: i64) -> UpdateTransaction { UpdateTransaction { - id: id, - account_id: account_id, - date: date, - amount: amount, + id, + account_id, + date, + amount, payee_id: None, payee_name: None, category_id: None, @@ -66,4 +67,30 @@ impl UpdateTransaction { } } +/// The cleared status of the transaction +#[derive(Debug, PartialEq, Serialize, Deserialize)] +pub enum Cleared { + #[serde(rename = "cleared")] + Cleared, + #[serde(rename = "uncleared")] + Uncleared, + #[serde(rename = "reconciled")] + Reconciled, +} +/// The transaction flag +#[derive(Debug, PartialEq, 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_all_of.rs b/src/models/update_transaction_all_of.rs index 774cc3f..2e3e0a7 100644 --- a/src/models/update_transaction_all_of.rs +++ b/src/models/update_transaction_all_of.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct UpdateTransactionAllOf { #[serde(rename = "id")] @@ -19,7 +20,7 @@ pub struct UpdateTransactionAllOf { impl UpdateTransactionAllOf { pub fn new(id: String) -> UpdateTransactionAllOf { UpdateTransactionAllOf { - id: id, + id, } } } diff --git a/src/models/update_transactions_wrapper.rs b/src/models/update_transactions_wrapper.rs index fde9957..6c04f35 100644 --- a/src/models/update_transactions_wrapper.rs +++ b/src/models/update_transactions_wrapper.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct UpdateTransactionsWrapper { #[serde(rename = "transactions")] @@ -19,7 +20,7 @@ pub struct UpdateTransactionsWrapper { impl UpdateTransactionsWrapper { pub fn new(transactions: Vec) -> UpdateTransactionsWrapper { UpdateTransactionsWrapper { - transactions: transactions, + transactions, } } } diff --git a/src/models/user.rs b/src/models/user.rs index 6ff89bb..fc16aa0 100644 --- a/src/models/user.rs +++ b/src/models/user.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct User { #[serde(rename = "id")] @@ -19,7 +20,7 @@ pub struct User { impl User { pub fn new(id: String) -> User { User { - id: id, + id, } } } diff --git a/src/models/user_response.rs b/src/models/user_response.rs index cfa6be1..29d3986 100644 --- a/src/models/user_response.rs +++ b/src/models/user_response.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct UserResponse { #[serde(rename = "data")] @@ -19,7 +20,7 @@ pub struct UserResponse { impl UserResponse { pub fn new(data: crate::models::UserResponseData) -> UserResponse { UserResponse { - data: data, + data, } } } diff --git a/src/models/user_response_data.rs b/src/models/user_response_data.rs index 90c300f..c784409 100644 --- a/src/models/user_response_data.rs +++ b/src/models/user_response_data.rs @@ -10,6 +10,7 @@ + #[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct UserResponseData { #[serde(rename = "user")] @@ -19,7 +20,7 @@ pub struct UserResponseData { impl UserResponseData { pub fn new(user: crate::models::User) -> UserResponseData { UserResponseData { - user: user, + user, } } } -- cgit v1.2.3