From 4c94e5f9101c14bfc5c6989d11ea6c855c809f0b Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 14 Sep 2019 14:19:01 -0400 Subject: update openapi spec --- .openapi-generator/VERSION | 2 +- Cargo.toml | 2 +- README.md | 5 +- data/openapi.yaml | 2 +- data/spec-v1-swagger.json | 182 ++++---------------- docs/AccountResponse.md | 2 +- docs/AccountResponseData.md | 2 +- docs/AccountsApi.md | 39 ++--- docs/AccountsResponse.md | 2 +- docs/AccountsResponseData.md | 2 +- docs/BudgetDetail.md | 24 +-- 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 | 4 +- docs/BudgetSummaryResponse.md | 2 +- docs/BudgetSummaryResponseData.md | 4 +- docs/BudgetsApi.md | 43 ++--- docs/BulkResponse.md | 2 +- docs/BulkResponseData.md | 2 +- docs/BulkTransactions.md | 2 +- docs/CategoriesApi.md | 75 ++++----- docs/CategoriesResponse.md | 2 +- docs/CategoriesResponseData.md | 2 +- docs/Category.md | 2 +- docs/CategoryGroupWithCategories.md | 2 +- docs/CategoryGroupWithCategoriesAllOf.md | 2 +- docs/CategoryResponse.md | 2 +- docs/CategoryResponseData.md | 2 +- docs/DeprecatedApi.md | 15 +- docs/ErrorResponse.md | 2 +- docs/HybridTransaction.md | 4 +- docs/HybridTransactionAllOf.md | 4 +- docs/HybridTransactionsResponse.md | 2 +- docs/HybridTransactionsResponseData.md | 2 +- docs/MonthDetail.md | 2 +- docs/MonthDetailAllOf.md | 2 +- docs/MonthDetailResponse.md | 2 +- docs/MonthDetailResponseData.md | 2 +- docs/MonthSummariesResponse.md | 2 +- docs/MonthSummariesResponseData.md | 2 +- docs/MonthsApi.md | 39 ++--- docs/PayeeLocationResponse.md | 2 +- docs/PayeeLocationResponseData.md | 2 +- docs/PayeeLocationsApi.md | 43 +++-- docs/PayeeLocationsResponse.md | 2 +- docs/PayeeLocationsResponseData.md | 2 +- docs/PayeeResponse.md | 2 +- docs/PayeeResponseData.md | 2 +- docs/PayeesApi.md | 39 ++--- docs/PayeesResponse.md | 2 +- docs/PayeesResponseData.md | 2 +- docs/SaveCategoryResponse.md | 2 +- docs/SaveCategoryResponseData.md | 2 +- docs/SaveMonthCategoryWrapper.md | 2 +- docs/SaveTransaction.md | 4 +- docs/SaveTransactionWrapper.md | 2 +- docs/SaveTransactionsResponse.md | 2 +- docs/SaveTransactionsResponseData.md | 4 +- docs/SaveTransactionsWrapper.md | 4 +- docs/ScheduledSubTransaction.md | 2 +- docs/ScheduledTransactionDetail.md | 10 +- docs/ScheduledTransactionDetailAllOf.md | 6 +- docs/ScheduledTransactionResponse.md | 2 +- docs/ScheduledTransactionResponseData.md | 2 +- docs/ScheduledTransactionSummary.md | 4 +- docs/ScheduledTransactionsApi.md | 39 ++--- docs/ScheduledTransactionsResponse.md | 2 +- docs/ScheduledTransactionsResponseData.md | 2 +- docs/TransactionDetail.md | 2 +- docs/TransactionDetailAllOf.md | 2 +- docs/TransactionResponse.md | 2 +- docs/TransactionResponseData.md | 2 +- docs/TransactionsApi.md | 183 ++++++++------------- docs/TransactionsResponse.md | 2 +- docs/TransactionsResponseData.md | 2 +- docs/UpdateTransaction.md | 6 +- docs/UpdateTransactionAllOf.md | 11 ++ docs/UpdateTransactionWrapper.md | 11 -- docs/UpdateTransactionsResponse.md | 11 -- docs/UpdateTransactionsWrapper.md | 3 +- docs/UserApi.md | 6 +- docs/UserResponse.md | 2 +- docs/UserResponseData.md | 2 +- src/apis/accounts_api.rs | 14 +- src/apis/budgets_api.rs | 18 +- src/apis/categories_api.rs | 26 +-- src/apis/client.rs | 62 ++++--- src/apis/deprecated_api.rs | 8 +- src/apis/mod.rs | 2 - src/apis/months_api.rs | 14 +- src/apis/payee_locations_api.rs | 20 +-- src/apis/payees_api.rs | 14 +- src/apis/scheduled_transactions_api.rs | 14 +- src/apis/transactions_api.rs | 50 +++--- src/apis/user_api.rs | 6 +- src/models/account.rs | 11 +- src/models/account_response.rs | 9 +- src/models/account_response_data.rs | 9 +- src/models/accounts_response.rs | 9 +- src/models/accounts_response_data.rs | 9 +- src/models/budget_detail.rs | 29 ++-- src/models/budget_detail_all_of.rs | 25 ++- src/models/budget_detail_response.rs | 9 +- src/models/budget_detail_response_data.rs | 9 +- src/models/budget_settings.rs | 11 +- src/models/budget_settings_response.rs | 9 +- src/models/budget_settings_response_data.rs | 9 +- src/models/budget_summary.rs | 9 +- src/models/budget_summary_response.rs | 9 +- src/models/budget_summary_response_data.rs | 11 +- src/models/bulk_response.rs | 9 +- src/models/bulk_response_data.rs | 9 +- src/models/bulk_response_data_bulk.rs | 5 +- src/models/bulk_transactions.rs | 9 +- src/models/categories_response.rs | 9 +- src/models/categories_response_data.rs | 9 +- src/models/category.rs | 15 +- src/models/category_group.rs | 5 +- src/models/category_group_with_categories.rs | 9 +- .../category_group_with_categories_all_of.rs | 9 +- src/models/category_response.rs | 9 +- src/models/category_response_data.rs | 9 +- src/models/currency_format.rs | 5 +- src/models/date_format.rs | 5 +- src/models/error_detail.rs | 5 +- src/models/error_response.rs | 9 +- src/models/hybrid_transaction.rs | 45 +---- src/models/hybrid_transaction_all_of.rs | 19 +-- src/models/hybrid_transactions_response.rs | 9 +- src/models/hybrid_transactions_response_data.rs | 9 +- src/models/mod.rs | 6 +- src/models/month_detail.rs | 9 +- src/models/month_detail_all_of.rs | 9 +- src/models/month_detail_response.rs | 9 +- src/models/month_detail_response_data.rs | 9 +- src/models/month_summaries_response.rs | 9 +- src/models/month_summaries_response_data.rs | 9 +- src/models/month_summary.rs | 5 +- src/models/payee.rs | 5 +- src/models/payee_location.rs | 5 +- src/models/payee_location_response.rs | 9 +- src/models/payee_location_response_data.rs | 9 +- src/models/payee_locations_response.rs | 9 +- src/models/payee_locations_response_data.rs | 9 +- src/models/payee_response.rs | 9 +- src/models/payee_response_data.rs | 9 +- src/models/payees_response.rs | 9 +- src/models/payees_response_data.rs | 9 +- src/models/save_category_response.rs | 9 +- src/models/save_category_response_data.rs | 9 +- src/models/save_month_category.rs | 5 +- src/models/save_month_category_wrapper.rs | 9 +- src/models/save_transaction.rs | 35 +--- src/models/save_transaction_wrapper.rs | 9 +- src/models/save_transactions_response.rs | 9 +- src/models/save_transactions_response_data.rs | 9 +- src/models/save_transactions_wrapper.rs | 9 +- src/models/scheduled_sub_transaction.rs | 13 +- src/models/scheduled_transaction_detail.rs | 79 ++------- src/models/scheduled_transaction_detail_all_of.rs | 21 +-- src/models/scheduled_transaction_response.rs | 9 +- src/models/scheduled_transaction_response_data.rs | 9 +- src/models/scheduled_transaction_summary.rs | 65 +------- src/models/scheduled_transactions_response.rs | 9 +- src/models/scheduled_transactions_response_data.rs | 9 +- src/models/sub_transaction.rs | 5 +- src/models/transaction_detail.rs | 35 +--- src/models/transaction_detail_all_of.rs | 9 +- src/models/transaction_response.rs | 9 +- src/models/transaction_response_data.rs | 9 +- src/models/transaction_summary.rs | 31 +--- src/models/transactions_response.rs | 9 +- src/models/transactions_response_data.rs | 9 +- src/models/update_transaction.rs | 43 +---- src/models/update_transaction_all_of.rs | 27 +++ src/models/update_transaction_wrapper.rs | 30 ---- src/models/update_transactions_response.rs | 30 ---- src/models/update_transactions_wrapper.rs | 16 +- src/models/user.rs | 5 +- src/models/user_response.rs | 9 +- src/models/user_response_data.rs | 9 +- 185 files changed, 792 insertions(+), 1554 deletions(-) create mode 100644 docs/UpdateTransactionAllOf.md delete mode 100644 docs/UpdateTransactionWrapper.md delete mode 100644 docs/UpdateTransactionsResponse.md create mode 100644 src/models/update_transaction_all_of.rs delete mode 100644 src/models/update_transaction_wrapper.rs delete mode 100644 src/models/update_transactions_response.rs diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index aa31e71..2582ddd 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.3 \ No newline at end of file +4.1.1 \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index ee8992e..cd6123f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ynab-api" -version = "1.0.0" +version = "2.0.0" authors = ["Jesse Luehrs ", "You Need A Budget, LLC"] description = "OpenAPI-generated API bindings for the YNAB API" repository = "https://git.tozt.net/ynab-api" diff --git a/README.md b/README.md index d7e64d9..a6d6e95 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Our API uses a REST based design, leverages the JSON data format, and relies upo This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client. - API version: 1.0.0 -- Package version: 1.0.0 +- Package version: 2.0.0 - Build package: org.openapitools.codegen.languages.RustClientCodegen ## Installation @@ -134,8 +134,7 @@ Class | Method | HTTP request | Description - [TransactionsResponse](docs/TransactionsResponse.md) - [TransactionsResponseData](docs/TransactionsResponseData.md) - [UpdateTransaction](docs/UpdateTransaction.md) - - [UpdateTransactionWrapper](docs/UpdateTransactionWrapper.md) - - [UpdateTransactionsResponse](docs/UpdateTransactionsResponse.md) + - [UpdateTransactionAllOf](docs/UpdateTransactionAllOf.md) - [UpdateTransactionsWrapper](docs/UpdateTransactionsWrapper.md) - [User](docs/User.md) - [UserResponse](docs/UserResponse.md) diff --git a/data/openapi.yaml b/data/openapi.yaml index a33d674..c5612dd 100644 --- a/data/openapi.yaml +++ b/data/openapi.yaml @@ -1,2 +1,2 @@ --- -packageVersion: "1.0.0" +packageVersion: "2.0.0" diff --git a/data/spec-v1-swagger.json b/data/spec-v1-swagger.json index 453301e..586ada1 100644 --- a/data/spec-v1-swagger.json +++ b/data/spec-v1-swagger.json @@ -911,7 +911,7 @@ { "name": "data", "in": "body", - "description": "The transactions to update. Optionally, transaction 'id' value(s) can be specified as null and an 'import_id' value can be provided which will allow transaction(s) to updated by their import_id.", + "description": "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": true, "schema": { "$ref": "#/definitions/UpdateTransactionsWrapper" @@ -922,7 +922,7 @@ "209": { "description": "The transactions were successfully updated", "schema": { - "$ref": "#/definitions/UpdateTransactionsResponse" + "$ref": "#/definitions/SaveTransactionsResponse" } }, "400": { @@ -1005,7 +1005,7 @@ "description": "The transaction to update", "required": true, "schema": { - "$ref": "#/definitions/UpdateTransactionWrapper" + "$ref": "#/definitions/SaveTransactionWrapper" } } ], @@ -1052,7 +1052,7 @@ ], "responses": { "201": { - "description": "The bulk request was processed sucessfully", + "description": "The bulk request was processed successfully", "schema": { "$ref": "#/definitions/BulkResponse" } @@ -1895,8 +1895,8 @@ }, "goal_type": { "type": "string", - "enum": ["TB", "TBD", "MF", null], - "description": "The type of goal, if the cagegory has a goal (TB=Target Category Balance, TBD=Target Category Balance by Date, MF=Monthly Funding)" + "enum": ["TB", "TBD", "MF", "NEED", null], + "description": "The type of goal, if the category has a goal (TB=Target Category Balance, TBD=Target Category Balance by Date, MF=Monthly Funding)" }, "goal_creation_month": { "type": "string", @@ -2124,121 +2124,10 @@ } } }, - "SaveTransaction": { - "type": "object", - "required": ["account_id", "date", "amount"], - "properties": { - "account_id": { - "type": "string", - "format": "uuid" - }, - "date": { - "type": "string", - "format": "date", - "description": "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": { - "type": "integer", - "format": "int64", - "description": "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": { - "type": "string", - "format": "uuid", - "description": "The payee for the transaction" - }, - "payee_name": { - "type": "string", - "maxLength": 50, - "description": "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." - }, - "category_id": { - "type": "string", - "format": "uuid", - "description": "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." - }, - "memo": { - "type": "string", - "maxLength": 200 - }, - "cleared": { - "type": "string", - "enum": ["cleared", "uncleared", "reconciled"], - "description": "The cleared status of the transaction" - }, - "approved": { - "type": "boolean", - "description": "Whether or not the transaction is approved. If not supplied, transaction will be unapproved by default." - }, - "flag_color": { - "type": "string", - "enum": ["red", "orange", "yellow", "green", "blue", "purple", null], - "description": "The transaction flag" - }, - "import_id": { - "type": "string", - "maxLength": 36, - "description": "If specified, the new transaction will be assigned this import_id and considered \"imported\". *At the time of import* we will attempt to match \"imported\" transactions with non-imported (i.e. \"user-entered\") transactions.

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

If import_id is omitted or specified as null, the transaction will be treated as a \"user-entered\" transaction. As such, it will be eligible to be matched against transactions later being imported (via DI, FBI, or API)." - } - } - }, - "SaveTransactionsResponse": { - "type": "object", - "required": ["data"], - "properties": { - "data": { - "type": "object", - "required": ["transaction_ids", "server_knowledge"], - "properties": { - "transaction_ids": { - "type": "array", - "description": "The transaction ids that were saved", - "items": { - "type": "string" - } - }, - "transaction": { - "description": "If a single transaction was specified, the transaction that was saved", - "$ref": "#/definitions/TransactionDetail" - }, - "transactions": { - "type": "array", - "description": "If multiple transactions were specified, the transactions that were saved", - "items": { - "$ref": "#/definitions/TransactionDetail" - } - }, - "duplicate_import_ids": { - "type": "array", - "description": "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", - "items": { - "type": "string" - } - }, - "server_knowledge": { - "type": "integer", - "format": "int64", - "description": "The knowledge of the server" - } - } - } - } - }, - "UpdateTransactionWrapper": { - "type": "object", - "required": ["transaction"], - "properties": { - "transaction": { - "$ref": "#/definitions/UpdateTransaction" - } - } - }, "UpdateTransactionsWrapper": { "type": "object", + "required": ["transactions"], "properties": { - "transaction": { - "$ref": "#/definitions/UpdateTransaction" - }, "transactions": { "type": "array", "items": { @@ -2248,13 +2137,25 @@ } }, "UpdateTransaction": { + "allOf": [ + { + "type": "object", + "required": ["id"], + "properties": { + "id": { + "type": "string" + } + } + }, + { + "$ref": "#/definitions/SaveTransaction" + } + ] + }, + "SaveTransaction": { "type": "object", "required": ["account_id", "date", "amount"], "properties": { - "id": { - "type": "string", - "format": "uuid" - }, "account_id": { "type": "string", "format": "uuid" @@ -2272,7 +2173,7 @@ "payee_id": { "type": "string", "format": "uuid", - "description": "The payee for the transaction" + "description": "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." }, "payee_name": { "type": "string", @@ -2290,7 +2191,6 @@ }, "cleared": { "type": "string", - "enum": ["cleared", "uncleared", "reconciled"], "description": "The cleared status of the transaction" }, "approved": { @@ -2299,17 +2199,16 @@ }, "flag_color": { "type": "string", - "enum": ["red", "orange", "yellow", "green", "blue", "purple", null], "description": "The transaction flag" }, "import_id": { "type": "string", "maxLength": 36, - "description": "If specified, the new transaction will be assigned this import_id and considered \"imported\". *At the time of import* we will attempt to match \"imported\" transactions with non-imported (i.e. \"user-entered\") transactions.

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

If import_id is omitted or specified as null, the transaction will be treated as a \"user-entered\" transaction. As such, it will be eligible to be matched against transactions later being imported (via DI, FBI, or API)." + "description": "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)." } } }, - "UpdateTransactionsResponse": { + "SaveTransactionsResponse": { "type": "object", "required": ["data"], "properties": { @@ -2396,7 +2295,6 @@ }, "cleared": { "type": "string", - "enum": ["cleared", "uncleared", "reconciled"], "description": "The cleared status of the transaction" }, "approved": { @@ -2405,7 +2303,6 @@ }, "flag_color": { "type": "string", - "enum": ["red", "orange", "yellow", "green", "blue", "purple", null], "description": "The transaction flag" }, "account_id": { @@ -2479,7 +2376,7 @@ }, { "type": "object", - "required": ["type", "account_name", "category_name"], + "required": ["type", "account_name"], "properties": { "type": { "type": "string", @@ -2488,7 +2385,7 @@ }, "parent_transaction_id": { "type": "string", - "description": "For subtransaction types, this is the id of the pararent transaction. For transaction types, this id will be always be null." + "description": "For subtransaction types, this is the id of the parent transaction. For transaction types, this id will be always be null." }, "account_name": { "type": "string" @@ -2655,9 +2552,7 @@ "date_next", "frequency", "amount", - "flag_color", "account_id", - "category_id", "deleted" ], "properties": { @@ -2676,22 +2571,7 @@ "description": "The next date for which the Scheduled Transaction is scheduled." }, "frequency": { - "type": "string", - "enum": [ - "never", - "daily", - "weekly", - "everyOtherWeek", - "twiceAMonth", - "every4Weeks", - "monthly", - "everyOtherMonth", - "every3Months", - "every4Months", - "twiceAYear", - "yearly", - "everyOtherYear" - ] + "type": "string" }, "amount": { "type": "integer", @@ -2703,7 +2583,6 @@ }, "flag_color": { "type": "string", - "enum": ["red", "orange", "yellow", "green", "blue", "purple", null], "description": "The scheduled transaction flag" }, "account_id": { @@ -2736,7 +2615,7 @@ }, { "type": "object", - "required": ["account_name", "payee_name", "category_name", "subtransactions"], + "required": ["account_name", "subtransactions"], "properties": { "account_name": { "type": "string" @@ -2764,7 +2643,6 @@ "id", "scheduled_transaction_id", "amount", - "category_id", "deleted" ], "properties": { diff --git a/docs/AccountResponse.md b/docs/AccountResponse.md index eb39808..dbb74b3 100644 --- a/docs/AccountResponse.md +++ b/docs/AccountResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***::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 d437a2f..3ae5b7c 100644 --- a/docs/AccountResponseData.md +++ b/docs/AccountResponseData.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**account** | [***::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 98270b9..1958f71 100644 --- a/docs/AccountsApi.md +++ b/docs/AccountsApi.md @@ -11,23 +11,22 @@ Method | HTTP request | Description ## get_account_by_id -> ::models::AccountResponse get_account_by_id(ctx, budget_id, account_id) +> crate::models::AccountResponse get_account_by_id(budget_id, account_id) Single account Returns a single account -### Required Parameters +### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **account_id** | [**String**](.md)| The id of the account | +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 | ### Return type -[**::models::AccountResponse**](AccountResponse.md) +[**crate::models::AccountResponse**](AccountResponse.md) ### Authorization @@ -43,32 +42,22 @@ Name | Type | Description | Notes ## get_accounts -> ::models::AccountsResponse get_accounts(ctx, budget_id, optional) +> crate::models::AccountsResponse get_accounts(budget_id, last_knowledge_of_server) Account list Returns all accounts -### Required Parameters +### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **optional** | **map[string]interface{}** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a map[string]interface{}. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | +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. | | ### Return type -[**::models::AccountsResponse**](AccountsResponse.md) +[**crate::models::AccountsResponse**](AccountsResponse.md) ### Authorization diff --git a/docs/AccountsResponse.md b/docs/AccountsResponse.md index 6dc10dd..8ae5bea 100644 --- a/docs/AccountsResponse.md +++ b/docs/AccountsResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***::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/AccountsResponseData.md b/docs/AccountsResponseData.md index 968cad8..75c4502 100644 --- a/docs/AccountsResponseData.md +++ b/docs/AccountsResponseData.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**accounts** | [**Vec<::models::Account>**](Account.md) | | +**accounts** | [**Vec**](Account.md) | | **server_knowledge** | **i64** | The knowledge of the server | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BudgetDetail.md b/docs/BudgetDetail.md index 3dac64b..41741b1 100644 --- a/docs/BudgetDetail.md +++ b/docs/BudgetDetail.md @@ -9,18 +9,18 @@ Name | Type | Description | Notes **last_modified_on** | **String** | The last time any changes were made to the budget from either a web or mobile client | [optional] **first_month** | [***String**](string.md) | The earliest budget month | [optional] **last_month** | [***String**](string.md) | The latest budget month | [optional] -**date_format** | [***::models::DateFormat**](DateFormat.md) | | [optional] -**currency_format** | [***::models::CurrencyFormat**](CurrencyFormat.md) | | [optional] -**accounts** | [**Vec<::models::Account>**](Account.md) | | [optional] -**payees** | [**Vec<::models::Payee>**](Payee.md) | | [optional] -**payee_locations** | [**Vec<::models::PayeeLocation>**](PayeeLocation.md) | | [optional] -**category_groups** | [**Vec<::models::CategoryGroup>**](CategoryGroup.md) | | [optional] -**categories** | [**Vec<::models::Category>**](Category.md) | | [optional] -**months** | [**Vec<::models::MonthDetail>**](MonthDetail.md) | | [optional] -**transactions** | [**Vec<::models::TransactionSummary>**](TransactionSummary.md) | | [optional] -**subtransactions** | [**Vec<::models::SubTransaction>**](SubTransaction.md) | | [optional] -**scheduled_transactions** | [**Vec<::models::ScheduledTransactionSummary>**](ScheduledTransactionSummary.md) | | [optional] -**scheduled_subtransactions** | [**Vec<::models::ScheduledSubTransaction>**](ScheduledSubTransaction.md) | | [optional] +**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] [[Back to Model 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 f5df347..6a922f5 100644 --- a/docs/BudgetDetailAllOf.md +++ b/docs/BudgetDetailAllOf.md @@ -4,16 +4,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**accounts** | [**Vec<::models::Account>**](Account.md) | | [optional] -**payees** | [**Vec<::models::Payee>**](Payee.md) | | [optional] -**payee_locations** | [**Vec<::models::PayeeLocation>**](PayeeLocation.md) | | [optional] -**category_groups** | [**Vec<::models::CategoryGroup>**](CategoryGroup.md) | | [optional] -**categories** | [**Vec<::models::Category>**](Category.md) | | [optional] -**months** | [**Vec<::models::MonthDetail>**](MonthDetail.md) | | [optional] -**transactions** | [**Vec<::models::TransactionSummary>**](TransactionSummary.md) | | [optional] -**subtransactions** | [**Vec<::models::SubTransaction>**](SubTransaction.md) | | [optional] -**scheduled_transactions** | [**Vec<::models::ScheduledTransactionSummary>**](ScheduledTransactionSummary.md) | | [optional] -**scheduled_subtransactions** | [**Vec<::models::ScheduledSubTransaction>**](ScheduledSubTransaction.md) | | [optional] +**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] [[Back to Model 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 97cc82e..08d9d7b 100644 --- a/docs/BudgetDetailResponse.md +++ b/docs/BudgetDetailResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***::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 8697aae..88e4c7a 100644 --- a/docs/BudgetDetailResponseData.md +++ b/docs/BudgetDetailResponseData.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**budget** | [***::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 b0604b4..ff8d6b0 100644 --- a/docs/BudgetSettings.md +++ b/docs/BudgetSettings.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**date_format** | [***::models::DateFormat**](DateFormat.md) | | -**currency_format** | [***::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 ee92163..1b88253 100644 --- a/docs/BudgetSettingsResponse.md +++ b/docs/BudgetSettingsResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***::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 3d2c4cc..a84371e 100644 --- a/docs/BudgetSettingsResponseData.md +++ b/docs/BudgetSettingsResponseData.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**settings** | [***::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 f2e444b..eec8fba 100644 --- a/docs/BudgetSummary.md +++ b/docs/BudgetSummary.md @@ -9,8 +9,8 @@ Name | Type | Description | Notes **last_modified_on** | **String** | The last time any changes were made to the budget from either a web or mobile client | [optional] **first_month** | [***String**](string.md) | The earliest budget month | [optional] **last_month** | [***String**](string.md) | The latest budget month | [optional] -**date_format** | [***::models::DateFormat**](DateFormat.md) | | [optional] -**currency_format** | [***::models::CurrencyFormat**](CurrencyFormat.md) | | [optional] +**date_format** | [***crate::models::DateFormat**](DateFormat.md) | | [optional] +**currency_format** | [***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 5b029dd..5c16c83 100644 --- a/docs/BudgetSummaryResponse.md +++ b/docs/BudgetSummaryResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***::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 2836bfa..ecd5854 100644 --- a/docs/BudgetSummaryResponseData.md +++ b/docs/BudgetSummaryResponseData.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**budgets** | [**Vec<::models::BudgetSummary>**](BudgetSummary.md) | | -**default_budget** | [***::models::BudgetSummary**](BudgetSummary.md) | | [optional] +**budgets** | [**Vec**](BudgetSummary.md) | | +**default_budget** | [***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 563b754..d91cd6d 100644 --- a/docs/BudgetsApi.md +++ b/docs/BudgetsApi.md @@ -12,32 +12,22 @@ Method | HTTP request | Description ## get_budget_by_id -> ::models::BudgetDetailResponse get_budget_by_id(ctx, budget_id, optional) +> crate::models::BudgetDetailResponse get_budget_by_id(budget_id, last_knowledge_of_server) Single budget Returns a single budget with all related entities. This resource is effectively a full budget export. -### Required Parameters +### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **optional** | **map[string]interface{}** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a map[string]interface{}. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | +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. | | ### Return type -[**::models::BudgetDetailResponse**](BudgetDetailResponse.md) +[**crate::models::BudgetDetailResponse**](BudgetDetailResponse.md) ### Authorization @@ -53,22 +43,21 @@ Name | Type | Description | Notes ## get_budget_settings_by_id -> ::models::BudgetSettingsResponse get_budget_settings_by_id(ctx, budget_id) +> crate::models::BudgetSettingsResponse get_budget_settings_by_id(budget_id) Budget Settings Returns settings for a budget -### Required Parameters +### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | +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 | ### Return type -[**::models::BudgetSettingsResponse**](BudgetSettingsResponse.md) +[**crate::models::BudgetSettingsResponse**](BudgetSettingsResponse.md) ### Authorization @@ -84,18 +73,18 @@ Name | Type | Description | Notes ## get_budgets -> ::models::BudgetSummaryResponse get_budgets(ctx, ) +> crate::models::BudgetSummaryResponse get_budgets() List budgets Returns budgets list with summary information -### Required Parameters +### Parameters This endpoint does not need any parameter. ### Return type -[**::models::BudgetSummaryResponse**](BudgetSummaryResponse.md) +[**crate::models::BudgetSummaryResponse**](BudgetSummaryResponse.md) ### Authorization diff --git a/docs/BulkResponse.md b/docs/BulkResponse.md index 009e60c..edcad4c 100644 --- a/docs/BulkResponse.md +++ b/docs/BulkResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***::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 82fef82..0ae0658 100644 --- a/docs/BulkResponseData.md +++ b/docs/BulkResponseData.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**bulk** | [***::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/BulkTransactions.md b/docs/BulkTransactions.md index dc990e4..fd6987c 100644 --- a/docs/BulkTransactions.md +++ b/docs/BulkTransactions.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**transactions** | [**Vec<::models::SaveTransaction>**](SaveTransaction.md) | | +**transactions** | [**Vec**](SaveTransaction.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CategoriesApi.md b/docs/CategoriesApi.md index 00294b8..4266752 100644 --- a/docs/CategoriesApi.md +++ b/docs/CategoriesApi.md @@ -13,32 +13,22 @@ Method | HTTP request | Description ## get_categories -> ::models::CategoriesResponse get_categories(ctx, budget_id, optional) +> crate::models::CategoriesResponse get_categories(budget_id, last_knowledge_of_server) List categories Returns all categories grouped by category group. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC). -### Required Parameters +### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **optional** | **map[string]interface{}** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a map[string]interface{}. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | +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. | | ### Return type -[**::models::CategoriesResponse**](CategoriesResponse.md) +[**crate::models::CategoriesResponse**](CategoriesResponse.md) ### Authorization @@ -54,23 +44,22 @@ Name | Type | Description | Notes ## get_category_by_id -> ::models::CategoryResponse get_category_by_id(ctx, budget_id, category_id) +> crate::models::CategoryResponse get_category_by_id(budget_id, category_id) Single category Returns a single category. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC). -### Required Parameters +### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **category_id** | **String**| The id of the category | +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 | ### Return type -[**::models::CategoryResponse**](CategoryResponse.md) +[**crate::models::CategoryResponse**](CategoryResponse.md) ### Authorization @@ -86,24 +75,23 @@ Name | Type | Description | Notes ## get_month_category_by_id -> ::models::CategoryResponse get_month_category_by_id(ctx, budget_id, month, category_id) +> crate::models::CategoryResponse get_month_category_by_id(budget_id, month, category_id) Single category for a specific budget month Returns a single category for a specific budget month. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC). -### Required Parameters +### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **month** | **String**| The budget month in ISO format (e.g. 2016-12-01) (\"current\" can also be used to specify the current calendar month (UTC)) | - **category_id** | **String**| The id of the category | +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 | ### Return type -[**::models::CategoryResponse**](CategoryResponse.md) +[**crate::models::CategoryResponse**](CategoryResponse.md) ### Authorization @@ -119,25 +107,24 @@ Name | Type | Description | Notes ## update_month_category -> ::models::SaveCategoryResponse update_month_category(ctx, budget_id, month, category_id, data) +> crate::models::SaveCategoryResponse update_month_category(budget_id, month, category_id, data) Update a category for a specific month Update a category for a specific month -### Required Parameters +### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **month** | **String**| The budget month in ISO format (e.g. 2016-12-01) (\"current\" can also be used to specify the current calendar month (UTC)) | - **category_id** | **String**| The id of the category | - **data** | [**SaveMonthCategoryWrapper**](SaveMonthCategoryWrapper.md)| The category to update | +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 | ### Return type -[**::models::SaveCategoryResponse**](SaveCategoryResponse.md) +[**crate::models::SaveCategoryResponse**](SaveCategoryResponse.md) ### Authorization diff --git a/docs/CategoriesResponse.md b/docs/CategoriesResponse.md index e760b74..1d0374c 100644 --- a/docs/CategoriesResponse.md +++ b/docs/CategoriesResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***::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/CategoriesResponseData.md b/docs/CategoriesResponseData.md index 766aae4..d693e40 100644 --- a/docs/CategoriesResponseData.md +++ b/docs/CategoriesResponseData.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**category_groups** | [**Vec<::models::CategoryGroupWithCategories>**](CategoryGroupWithCategories.md) | | +**category_groups** | [**Vec**](CategoryGroupWithCategories.md) | | **server_knowledge** | **i64** | The knowledge of the server | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Category.md b/docs/Category.md index 217979b..9b6f7c9 100644 --- a/docs/Category.md +++ b/docs/Category.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes **budgeted** | **i64** | Budgeted amount in milliunits format | **activity** | **i64** | Activity amount in milliunits format | **balance** | **i64** | Balance in milliunits format | -**goal_type** | **String** | The type of goal, if the cagegory has a goal (TB=Target Category Balance, TBD=Target Category Balance by Date, MF=Monthly Funding) | [optional] +**goal_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] diff --git a/docs/CategoryGroupWithCategories.md b/docs/CategoryGroupWithCategories.md index c1355c2..ff3ba4a 100644 --- a/docs/CategoryGroupWithCategories.md +++ b/docs/CategoryGroupWithCategories.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **name** | **String** | | **hidden** | **bool** | Whether or not the category group is hidden | **deleted** | **bool** | Whether or not the category group has been deleted. Deleted category groups will only be included in delta requests. | -**categories** | [**Vec<::models::Category>**](Category.md) | Category group categories. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC). | +**categories** | [**Vec**](Category.md) | Category group categories. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC). | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CategoryGroupWithCategoriesAllOf.md b/docs/CategoryGroupWithCategoriesAllOf.md index 0a11fb9..72d1130 100644 --- a/docs/CategoryGroupWithCategoriesAllOf.md +++ b/docs/CategoryGroupWithCategoriesAllOf.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**categories** | [**Vec<::models::Category>**](Category.md) | Category group categories. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC). | +**categories** | [**Vec**](Category.md) | Category group categories. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC). | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CategoryResponse.md b/docs/CategoryResponse.md index efe3d40..84bb949 100644 --- a/docs/CategoryResponse.md +++ b/docs/CategoryResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***::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 187bf07..1507ab4 100644 --- a/docs/CategoryResponseData.md +++ b/docs/CategoryResponseData.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**category** | [***::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 85bdc80..712a3d9 100644 --- a/docs/DeprecatedApi.md +++ b/docs/DeprecatedApi.md @@ -10,23 +10,22 @@ Method | HTTP request | Description ## bulk_create_transactions -> ::models::BulkResponse bulk_create_transactions(ctx, budget_id, transactions) +> crate::models::BulkResponse bulk_create_transactions(budget_id, transactions) Bulk create transactions Creates multiple transactions. Although this endpoint is still supported, it is recommended to use 'POST /budgets/{budget_id}/transactions' to create multiple transactions. -### Required Parameters +### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **transactions** | [**BulkTransactions**](BulkTransactions.md)| The list of transactions to create | +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 | ### Return type -[**::models::BulkResponse**](BulkResponse.md) +[**crate::models::BulkResponse**](BulkResponse.md) ### Authorization diff --git a/docs/ErrorResponse.md b/docs/ErrorResponse.md index 382b263..4e7daa3 100644 --- a/docs/ErrorResponse.md +++ b/docs/ErrorResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**error** | [***::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 c168944..a18de00 100644 --- a/docs/HybridTransaction.md +++ b/docs/HybridTransaction.md @@ -20,10 +20,10 @@ Name | Type | Description | Notes **import_id** | **String** | If the Transaction was imported, this field is a unique (by account) import identifier. If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. | [optional] **deleted** | **bool** | Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests. | **_type** | **String** | Whether the hybrid transaction represents a regular transaction or a subtransaction | -**parent_transaction_id** | **String** | For subtransaction types, this is the id of the pararent transaction. For transaction types, this id will be always be null. | [optional] +**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] **account_name** | **String** | | **payee_name** | **String** | | [optional] -**category_name** | **String** | | +**category_name** | **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 af38160..cb16249 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 pararent transaction. For transaction types, this id will be always be null. | [optional] +**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] **account_name** | **String** | | **payee_name** | **String** | | [optional] -**category_name** | **String** | | +**category_name** | **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 df8437a..bd8be57 100644 --- a/docs/HybridTransactionsResponse.md +++ b/docs/HybridTransactionsResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***::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/HybridTransactionsResponseData.md b/docs/HybridTransactionsResponseData.md index 241e7b6..3a175f5 100644 --- a/docs/HybridTransactionsResponseData.md +++ b/docs/HybridTransactionsResponseData.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**transactions** | [**Vec<::models::HybridTransaction>**](HybridTransaction.md) | | +**transactions** | [**Vec**](HybridTransaction.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MonthDetail.md b/docs/MonthDetail.md index 1d7a22b..6b7b52e 100644 --- a/docs/MonthDetail.md +++ b/docs/MonthDetail.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **to_be_budgeted** | **i64** | The available amount for 'To be Budgeted' | **age_of_money** | **i32** | The Age of Money as of the month | [optional] **deleted** | **bool** | Whether or not the month has been deleted. Deleted months will only be included in delta requests. | -**categories** | [**Vec<::models::Category>**](Category.md) | The budget month categories. Amounts (budgeted, activity, balance, etc.) are specific to the {month} parameter specified. | +**categories** | [**Vec**](Category.md) | The budget month categories. Amounts (budgeted, activity, balance, etc.) are specific to the {month} parameter specified. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MonthDetailAllOf.md b/docs/MonthDetailAllOf.md index 81da8f5..dda7766 100644 --- a/docs/MonthDetailAllOf.md +++ b/docs/MonthDetailAllOf.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**categories** | [**Vec<::models::Category>**](Category.md) | The budget month categories. Amounts (budgeted, activity, balance, etc.) are specific to the {month} parameter specified. | +**categories** | [**Vec**](Category.md) | The budget month categories. Amounts (budgeted, activity, balance, etc.) are specific to the {month} parameter specified. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MonthDetailResponse.md b/docs/MonthDetailResponse.md index bfeaae8..72755c2 100644 --- a/docs/MonthDetailResponse.md +++ b/docs/MonthDetailResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***::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 83bab88..030e5a9 100644 --- a/docs/MonthDetailResponseData.md +++ b/docs/MonthDetailResponseData.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**month** | [***::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 fb7f315..1f97b29 100644 --- a/docs/MonthSummariesResponse.md +++ b/docs/MonthSummariesResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***::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/MonthSummariesResponseData.md b/docs/MonthSummariesResponseData.md index f9907b3..b6b9c17 100644 --- a/docs/MonthSummariesResponseData.md +++ b/docs/MonthSummariesResponseData.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**months** | [**Vec<::models::MonthSummary>**](MonthSummary.md) | | +**months** | [**Vec**](MonthSummary.md) | | **server_knowledge** | **i64** | The knowledge of the server | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MonthsApi.md b/docs/MonthsApi.md index 337c03c..afa4884 100644 --- a/docs/MonthsApi.md +++ b/docs/MonthsApi.md @@ -11,23 +11,22 @@ Method | HTTP request | Description ## get_budget_month -> ::models::MonthDetailResponse get_budget_month(ctx, budget_id, month) +> crate::models::MonthDetailResponse get_budget_month(budget_id, month) Single budget month Returns a single budget month -### Required Parameters +### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **month** | **String**| The budget month in ISO format (e.g. 2016-12-01) (\"current\" can also be used to specify the current calendar month (UTC)) | +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 | ### Return type -[**::models::MonthDetailResponse**](MonthDetailResponse.md) +[**crate::models::MonthDetailResponse**](MonthDetailResponse.md) ### Authorization @@ -43,32 +42,22 @@ Name | Type | Description | Notes ## get_budget_months -> ::models::MonthSummariesResponse get_budget_months(ctx, budget_id, optional) +> crate::models::MonthSummariesResponse get_budget_months(budget_id, last_knowledge_of_server) List budget months Returns all budget months -### Required Parameters +### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **optional** | **map[string]interface{}** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a map[string]interface{}. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | +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. | | ### Return type -[**::models::MonthSummariesResponse**](MonthSummariesResponse.md) +[**crate::models::MonthSummariesResponse**](MonthSummariesResponse.md) ### Authorization diff --git a/docs/PayeeLocationResponse.md b/docs/PayeeLocationResponse.md index b34e691..83e7b59 100644 --- a/docs/PayeeLocationResponse.md +++ b/docs/PayeeLocationResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***::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 bba1cb7..292a39d 100644 --- a/docs/PayeeLocationResponseData.md +++ b/docs/PayeeLocationResponseData.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**payee_location** | [***::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 e51787a..d64a8fa 100644 --- a/docs/PayeeLocationsApi.md +++ b/docs/PayeeLocationsApi.md @@ -12,23 +12,22 @@ Method | HTTP request | Description ## get_payee_location_by_id -> ::models::PayeeLocationResponse get_payee_location_by_id(ctx, budget_id, payee_location_id) +> crate::models::PayeeLocationResponse get_payee_location_by_id(budget_id, payee_location_id) Single payee location Returns a single payee location -### Required Parameters +### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **payee_location_id** | **String**| id of payee location | +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 | ### Return type -[**::models::PayeeLocationResponse**](PayeeLocationResponse.md) +[**crate::models::PayeeLocationResponse**](PayeeLocationResponse.md) ### Authorization @@ -44,22 +43,21 @@ Name | Type | Description | Notes ## get_payee_locations -> ::models::PayeeLocationsResponse get_payee_locations(ctx, budget_id) +> crate::models::PayeeLocationsResponse get_payee_locations(budget_id) List payee locations Returns all payee locations -### Required Parameters +### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | +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 | ### Return type -[**::models::PayeeLocationsResponse**](PayeeLocationsResponse.md) +[**crate::models::PayeeLocationsResponse**](PayeeLocationsResponse.md) ### Authorization @@ -75,23 +73,22 @@ Name | Type | Description | Notes ## get_payee_locations_by_payee -> ::models::PayeeLocationsResponse get_payee_locations_by_payee(ctx, budget_id, payee_id) +> crate::models::PayeeLocationsResponse get_payee_locations_by_payee(budget_id, payee_id) List locations for a payee Returns all payee locations for the specified payee -### Required Parameters +### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **payee_id** | **String**| id of payee | +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 | ### Return type -[**::models::PayeeLocationsResponse**](PayeeLocationsResponse.md) +[**crate::models::PayeeLocationsResponse**](PayeeLocationsResponse.md) ### Authorization diff --git a/docs/PayeeLocationsResponse.md b/docs/PayeeLocationsResponse.md index f118e8e..b18dfd8 100644 --- a/docs/PayeeLocationsResponse.md +++ b/docs/PayeeLocationsResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***::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/PayeeLocationsResponseData.md b/docs/PayeeLocationsResponseData.md index 4ad0748..126327b 100644 --- a/docs/PayeeLocationsResponseData.md +++ b/docs/PayeeLocationsResponseData.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**payee_locations** | [**Vec<::models::PayeeLocation>**](PayeeLocation.md) | | +**payee_locations** | [**Vec**](PayeeLocation.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PayeeResponse.md b/docs/PayeeResponse.md index 6a38dfd..6b4174d 100644 --- a/docs/PayeeResponse.md +++ b/docs/PayeeResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***::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 9618470..8e3e6e2 100644 --- a/docs/PayeeResponseData.md +++ b/docs/PayeeResponseData.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**payee** | [***::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 173c79d..dfa1a17 100644 --- a/docs/PayeesApi.md +++ b/docs/PayeesApi.md @@ -11,23 +11,22 @@ Method | HTTP request | Description ## get_payee_by_id -> ::models::PayeeResponse get_payee_by_id(ctx, budget_id, payee_id) +> crate::models::PayeeResponse get_payee_by_id(budget_id, payee_id) Single payee Returns single payee -### Required Parameters +### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **payee_id** | **String**| The id of the payee | +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 | ### Return type -[**::models::PayeeResponse**](PayeeResponse.md) +[**crate::models::PayeeResponse**](PayeeResponse.md) ### Authorization @@ -43,32 +42,22 @@ Name | Type | Description | Notes ## get_payees -> ::models::PayeesResponse get_payees(ctx, budget_id, optional) +> crate::models::PayeesResponse get_payees(budget_id, last_knowledge_of_server) List payees Returns all payees -### Required Parameters +### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **optional** | **map[string]interface{}** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a map[string]interface{}. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | +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. | | ### Return type -[**::models::PayeesResponse**](PayeesResponse.md) +[**crate::models::PayeesResponse**](PayeesResponse.md) ### Authorization diff --git a/docs/PayeesResponse.md b/docs/PayeesResponse.md index 18bd7d2..a2bcfcf 100644 --- a/docs/PayeesResponse.md +++ b/docs/PayeesResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***::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/PayeesResponseData.md b/docs/PayeesResponseData.md index c3a5518..ab09314 100644 --- a/docs/PayeesResponseData.md +++ b/docs/PayeesResponseData.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**payees** | [**Vec<::models::Payee>**](Payee.md) | | +**payees** | [**Vec**](Payee.md) | | **server_knowledge** | **i64** | The knowledge of the server | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SaveCategoryResponse.md b/docs/SaveCategoryResponse.md index 64a832f..05aa2f2 100644 --- a/docs/SaveCategoryResponse.md +++ b/docs/SaveCategoryResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***::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 941f72f..92dfdc2 100644 --- a/docs/SaveCategoryResponseData.md +++ b/docs/SaveCategoryResponseData.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**category** | [***::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 1b7e38a..65d4917 100644 --- a/docs/SaveMonthCategoryWrapper.md +++ b/docs/SaveMonthCategoryWrapper.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**category** | [***::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 dabee87..77ab098 100644 --- a/docs/SaveTransaction.md +++ b/docs/SaveTransaction.md @@ -7,14 +7,14 @@ Name | Type | Description | Notes **account_id** | **String** | | **date** | [***String**](string.md) | The transaction date in ISO format (e.g. 2016-12-01). Future dates (scheduled transactions) are not permitted. Split transaction dates cannot be changed and if a different date is supplied it will be ignored. | **amount** | **i64** | The transaction amount in milliunits format. Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored. | -**payee_id** | **String** | The payee for the transaction | [optional] +**payee_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\". *At the time of import* we will attempt to match \"imported\" transactions with non-imported (i.e. \"user-entered\") transactions.

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

If import_id is omitted or specified as null, the transaction will be treated as a \"user-entered\" transaction. As such, it will be eligible to be matched against transactions later being imported (via DI, FBI, or API). | [optional] +**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] [[Back to Model 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 a9f3fcc..1bc9fda 100644 --- a/docs/SaveTransactionWrapper.md +++ b/docs/SaveTransactionWrapper.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**transaction** | [***::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 0458ef6..9a13135 100644 --- a/docs/SaveTransactionsResponse.md +++ b/docs/SaveTransactionsResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***::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 8617702..98b414b 100644 --- a/docs/SaveTransactionsResponseData.md +++ b/docs/SaveTransactionsResponseData.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **transaction_ids** | **Vec** | The transaction ids that were saved | -**transaction** | [***::models::TransactionDetail**](TransactionDetail.md) | | [optional] -**transactions** | [**Vec<::models::TransactionDetail>**](TransactionDetail.md) | If multiple transactions were specified, the transactions that were saved | [optional] +**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] **server_knowledge** | **i64** | The knowledge of the server | diff --git a/docs/SaveTransactionsWrapper.md b/docs/SaveTransactionsWrapper.md index d79e4ee..6f2dcfd 100644 --- a/docs/SaveTransactionsWrapper.md +++ b/docs/SaveTransactionsWrapper.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**transaction** | [***::models::SaveTransaction**](SaveTransaction.md) | | [optional] -**transactions** | [**Vec<::models::SaveTransaction>**](SaveTransaction.md) | | [optional] +**transaction** | [***crate::models::SaveTransaction**](SaveTransaction.md) | | [optional] +**transactions** | [**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 6178bab..7b3cae4 100644 --- a/docs/ScheduledSubTransaction.md +++ b/docs/ScheduledSubTransaction.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **amount** | **i64** | The scheduled subtransaction amount in milliunits format | **memo** | **String** | | [optional] **payee_id** | **String** | | [optional] -**category_id** | **String** | | +**category_id** | **String** | | [optional] **transfer_account_id** | **String** | If a transfer, the account_id which the scheduled subtransaction transfers to | [optional] **deleted** | **bool** | Whether or not the scheduled subtransaction has been deleted. Deleted scheduled subtransactions will only be included in delta requests. | diff --git a/docs/ScheduledTransactionDetail.md b/docs/ScheduledTransactionDetail.md index 5f45c7e..a29c019 100644 --- a/docs/ScheduledTransactionDetail.md +++ b/docs/ScheduledTransactionDetail.md @@ -10,16 +10,16 @@ Name | Type | Description | Notes **frequency** | **String** | | **amount** | **i64** | The scheduled transaction amount in milliunits format | **memo** | **String** | | [optional] -**flag_color** | **String** | The scheduled transaction flag | +**flag_color** | **String** | The scheduled transaction flag | [optional] **account_id** | **String** | | **payee_id** | **String** | | [optional] -**category_id** | **String** | | +**category_id** | **String** | | [optional] **transfer_account_id** | **String** | If a transfer, the account_id which the scheduled transaction transfers to | [optional] **deleted** | **bool** | Whether or not the scheduled transaction has been deleted. Deleted scheduled transactions will only be included in delta requests. | **account_name** | **String** | | -**payee_name** | **String** | | -**category_name** | **String** | | -**subtransactions** | [**Vec<::models::ScheduledSubTransaction>**](ScheduledSubTransaction.md) | If a split scheduled transaction, the subtransactions. | +**payee_name** | **String** | | [optional] +**category_name** | **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 3c2757f..dc70d71 100644 --- a/docs/ScheduledTransactionDetailAllOf.md +++ b/docs/ScheduledTransactionDetailAllOf.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **account_name** | **String** | | -**payee_name** | **String** | | -**category_name** | **String** | | -**subtransactions** | [**Vec<::models::ScheduledSubTransaction>**](ScheduledSubTransaction.md) | If a split scheduled transaction, the subtransactions. | +**payee_name** | **String** | | [optional] +**category_name** | **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 28c4b7e..4bc90f1 100644 --- a/docs/ScheduledTransactionResponse.md +++ b/docs/ScheduledTransactionResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***::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 bd05d93..87dbc5d 100644 --- a/docs/ScheduledTransactionResponseData.md +++ b/docs/ScheduledTransactionResponseData.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**scheduled_transaction** | [***::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 4b248b0..4dda3bb 100644 --- a/docs/ScheduledTransactionSummary.md +++ b/docs/ScheduledTransactionSummary.md @@ -10,10 +10,10 @@ Name | Type | Description | Notes **frequency** | **String** | | **amount** | **i64** | The scheduled transaction amount in milliunits format | **memo** | **String** | | [optional] -**flag_color** | **String** | The scheduled transaction flag | +**flag_color** | **String** | The scheduled transaction flag | [optional] **account_id** | **String** | | **payee_id** | **String** | | [optional] -**category_id** | **String** | | +**category_id** | **String** | | [optional] **transfer_account_id** | **String** | If a transfer, the account_id which the scheduled transaction transfers to | [optional] **deleted** | **bool** | Whether or not the scheduled transaction has been deleted. Deleted scheduled transactions will only be included in delta requests. | diff --git a/docs/ScheduledTransactionsApi.md b/docs/ScheduledTransactionsApi.md index 48856a7..eebb224 100644 --- a/docs/ScheduledTransactionsApi.md +++ b/docs/ScheduledTransactionsApi.md @@ -11,23 +11,22 @@ Method | HTTP request | Description ## get_scheduled_transaction_by_id -> ::models::ScheduledTransactionResponse get_scheduled_transaction_by_id(ctx, budget_id, scheduled_transaction_id) +> crate::models::ScheduledTransactionResponse get_scheduled_transaction_by_id(budget_id, scheduled_transaction_id) Single scheduled transaction Returns a single scheduled transaction -### Required Parameters +### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **scheduled_transaction_id** | **String**| The id of the scheduled transaction | +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 | ### Return type -[**::models::ScheduledTransactionResponse**](ScheduledTransactionResponse.md) +[**crate::models::ScheduledTransactionResponse**](ScheduledTransactionResponse.md) ### Authorization @@ -43,32 +42,22 @@ Name | Type | Description | Notes ## get_scheduled_transactions -> ::models::ScheduledTransactionsResponse get_scheduled_transactions(ctx, budget_id, optional) +> crate::models::ScheduledTransactionsResponse get_scheduled_transactions(budget_id, last_knowledge_of_server) List scheduled transactions Returns all scheduled transactions -### Required Parameters +### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **optional** | **map[string]interface{}** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a map[string]interface{}. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | +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. | | ### Return type -[**::models::ScheduledTransactionsResponse**](ScheduledTransactionsResponse.md) +[**crate::models::ScheduledTransactionsResponse**](ScheduledTransactionsResponse.md) ### Authorization diff --git a/docs/ScheduledTransactionsResponse.md b/docs/ScheduledTransactionsResponse.md index b3dbffc..982dc02 100644 --- a/docs/ScheduledTransactionsResponse.md +++ b/docs/ScheduledTransactionsResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***::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/ScheduledTransactionsResponseData.md b/docs/ScheduledTransactionsResponseData.md index f5bc860..8e4cfd4 100644 --- a/docs/ScheduledTransactionsResponseData.md +++ b/docs/ScheduledTransactionsResponseData.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**scheduled_transactions** | [**Vec<::models::ScheduledTransactionDetail>**](ScheduledTransactionDetail.md) | | +**scheduled_transactions** | [**Vec**](ScheduledTransactionDetail.md) | | **server_knowledge** | **i64** | The knowledge of the server | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TransactionDetail.md b/docs/TransactionDetail.md index 3d23f44..3ba9072 100644 --- a/docs/TransactionDetail.md +++ b/docs/TransactionDetail.md @@ -22,7 +22,7 @@ Name | Type | Description | Notes **account_name** | **String** | | **payee_name** | **String** | | [optional] **category_name** | **String** | | [optional] -**subtransactions** | [**Vec<::models::SubTransaction>**](SubTransaction.md) | If a split transaction, the subtransactions. | +**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 2db8459..663f5f6 100644 --- a/docs/TransactionDetailAllOf.md +++ b/docs/TransactionDetailAllOf.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **account_name** | **String** | | **payee_name** | **String** | | [optional] **category_name** | **String** | | [optional] -**subtransactions** | [**Vec<::models::SubTransaction>**](SubTransaction.md) | If a split transaction, the subtransactions. | +**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 ac81dfa..16e54b9 100644 --- a/docs/TransactionResponse.md +++ b/docs/TransactionResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***::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 81977f0..be390dd 100644 --- a/docs/TransactionResponseData.md +++ b/docs/TransactionResponseData.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**transaction** | [***::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/TransactionsApi.md b/docs/TransactionsApi.md index 64ecb4b..689031e 100644 --- a/docs/TransactionsApi.md +++ b/docs/TransactionsApi.md @@ -17,23 +17,22 @@ Method | HTTP request | Description ## create_transaction -> ::models::SaveTransactionsResponse create_transaction(ctx, budget_id, data) +> crate::models::SaveTransactionsResponse create_transaction(budget_id, data) Create a single transaction or multiple transactions Creates a single transaction or multiple transactions. If you provide a body containing a 'transaction' object, a single transaction will be created and if you provide a body containing a 'transactions' array, multiple transactions will be created. Scheduled transactions cannot be created on this endpoint. -### Required Parameters +### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **data** | [**SaveTransactionsWrapper**](SaveTransactionsWrapper.md)| The transaction or transactions to create. To create a single transaction you can specify a value for the 'transaction' object and to create multiple transactions you can specify an array of 'transactions'. It is expected that you will only provide a value for one of these objects. | +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 | ### Return type -[**::models::SaveTransactionsResponse**](SaveTransactionsResponse.md) +[**crate::models::SaveTransactionsResponse**](SaveTransactionsResponse.md) ### Authorization @@ -49,23 +48,22 @@ Name | Type | Description | Notes ## get_transaction_by_id -> ::models::TransactionResponse get_transaction_by_id(ctx, budget_id, transaction_id) +> crate::models::TransactionResponse get_transaction_by_id(budget_id, transaction_id) Single transaction Returns a single transaction -### Required Parameters +### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **transaction_id** | **String**| The id of the transaction | +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 | ### Return type -[**::models::TransactionResponse**](TransactionResponse.md) +[**crate::models::TransactionResponse**](TransactionResponse.md) ### Authorization @@ -81,34 +79,24 @@ Name | Type | Description | Notes ## get_transactions -> ::models::TransactionsResponse get_transactions(ctx, budget_id, optional) +> crate::models::TransactionsResponse get_transactions(budget_id, since_date, _type, last_knowledge_of_server) List transactions Returns budget transactions -### Required Parameters +### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **optional** | **map[string]interface{}** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a map[string]interface{}. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **since_date** | **String**| If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). | - **_type** | **String**| If specified, only transactions of the specified type will be included. 'uncategorized' and 'unapproved' are currently supported. | - **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | +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. | | ### Return type -[**::models::TransactionsResponse**](TransactionsResponse.md) +[**crate::models::TransactionsResponse**](TransactionsResponse.md) ### Authorization @@ -124,36 +112,25 @@ Name | Type | Description | Notes ## get_transactions_by_account -> ::models::TransactionsResponse get_transactions_by_account(ctx, budget_id, account_id, optional) +> crate::models::TransactionsResponse get_transactions_by_account(budget_id, account_id, since_date, _type, last_knowledge_of_server) List account transactions Returns all transactions for a specified account -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **account_id** | **String**| The id of the account | - **optional** | **map[string]interface{}** | optional parameters | nil if no parameters - -### Optional Parameters +### Parameters -Optional parameters are passed through a map[string]interface{}. -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **account_id** | **String**| The id of the account | - **since_date** | **String**| If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). | - **_type** | **String**| If specified, only transactions of the specified type will be included. 'uncategorized' and 'unapproved' are currently supported. | - **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | +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. | | ### Return type -[**::models::TransactionsResponse**](TransactionsResponse.md) +[**crate::models::TransactionsResponse**](TransactionsResponse.md) ### Authorization @@ -169,36 +146,25 @@ Name | Type | Description | Notes ## get_transactions_by_category -> ::models::HybridTransactionsResponse get_transactions_by_category(ctx, budget_id, category_id, optional) +> crate::models::HybridTransactionsResponse get_transactions_by_category(budget_id, category_id, since_date, _type, last_knowledge_of_server) List category transactions Returns all transactions for a specified category -### Required Parameters +### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **category_id** | **String**| The id of the category | - **optional** | **map[string]interface{}** | optional parameters | nil if no parameters - -### Optional Parameters - -Optional parameters are passed through a map[string]interface{}. - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **category_id** | **String**| The id of the category | - **since_date** | **String**| If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). | - **_type** | **String**| If specified, only transactions of the specified type will be included. 'uncategorized' and 'unapproved' are currently supported. | - **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | +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. | | ### Return type -[**::models::HybridTransactionsResponse**](HybridTransactionsResponse.md) +[**crate::models::HybridTransactionsResponse**](HybridTransactionsResponse.md) ### Authorization @@ -214,36 +180,25 @@ Name | Type | Description | Notes ## get_transactions_by_payee -> ::models::HybridTransactionsResponse get_transactions_by_payee(ctx, budget_id, payee_id, optional) +> crate::models::HybridTransactionsResponse get_transactions_by_payee(budget_id, payee_id, since_date, _type, last_knowledge_of_server) List payee transactions Returns all transactions for a specified payee -### Required Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **payee_id** | **String**| The id of the payee | - **optional** | **map[string]interface{}** | optional parameters | nil if no parameters - -### Optional Parameters +### Parameters -Optional parameters are passed through a map[string]interface{}. -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **payee_id** | **String**| The id of the payee | - **since_date** | **String**| If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). | - **_type** | **String**| If specified, only transactions of the specified type will be included. 'uncategorized' and 'unapproved' are currently supported. | - **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. | +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. | | ### Return type -[**::models::HybridTransactionsResponse**](HybridTransactionsResponse.md) +[**crate::models::HybridTransactionsResponse**](HybridTransactionsResponse.md) ### Authorization @@ -259,24 +214,23 @@ Name | Type | Description | Notes ## update_transaction -> ::models::TransactionResponse update_transaction(ctx, budget_id, transaction_id, data) +> crate::models::TransactionResponse update_transaction(budget_id, transaction_id, data) Updates an existing transaction Updates a transaction -### Required Parameters +### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **transaction_id** | **String**| The id of the transaction | - **data** | [**UpdateTransactionWrapper**](UpdateTransactionWrapper.md)| The transaction to update | +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 | ### Return type -[**::models::TransactionResponse**](TransactionResponse.md) +[**crate::models::TransactionResponse**](TransactionResponse.md) ### Authorization @@ -292,23 +246,22 @@ Name | Type | Description | Notes ## update_transactions -> ::models::UpdateTransactionsResponse update_transactions(ctx, budget_id, data) +> crate::models::SaveTransactionsResponse update_transactions(budget_id, data) Update multiple transactions Updates multiple transactions, by 'id' or 'import_id'. -### Required Parameters +### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) | - **data** | [**UpdateTransactionsWrapper**](UpdateTransactionsWrapper.md)| The transactions to update. Optionally, transaction 'id' value(s) can be specified as null and an 'import_id' value can be provided which will allow transaction(s) to updated by their import_id. | +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 | ### Return type -[**::models::UpdateTransactionsResponse**](UpdateTransactionsResponse.md) +[**crate::models::SaveTransactionsResponse**](SaveTransactionsResponse.md) ### Authorization diff --git a/docs/TransactionsResponse.md b/docs/TransactionsResponse.md index fec6f21..956caa7 100644 --- a/docs/TransactionsResponse.md +++ b/docs/TransactionsResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***::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/TransactionsResponseData.md b/docs/TransactionsResponseData.md index 2b64bf7..9ac1635 100644 --- a/docs/TransactionsResponseData.md +++ b/docs/TransactionsResponseData.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**transactions** | [**Vec<::models::TransactionDetail>**](TransactionDetail.md) | | +**transactions** | [**Vec**](TransactionDetail.md) | | **server_knowledge** | **i64** | The knowledge of the server | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateTransaction.md b/docs/UpdateTransaction.md index 6d6ecb0..bb01087 100644 --- a/docs/UpdateTransaction.md +++ b/docs/UpdateTransaction.md @@ -4,18 +4,18 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **String** | | [optional] +**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. | **amount** | **i64** | The transaction amount in milliunits format. Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored. | -**payee_id** | **String** | The payee for the transaction | [optional] +**payee_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\". *At the time of import* we will attempt to match \"imported\" transactions with non-imported (i.e. \"user-entered\") transactions.

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

If import_id is omitted or specified as null, the transaction will be treated as a \"user-entered\" transaction. As such, it will be eligible to be matched against transactions later being imported (via DI, FBI, or API). | [optional] +**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] [[Back to Model 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/UpdateTransactionAllOf.md b/docs/UpdateTransactionAllOf.md new file mode 100644 index 0000000..250d446 --- /dev/null +++ b/docs/UpdateTransactionAllOf.md @@ -0,0 +1,11 @@ +# UpdateTransactionAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateTransactionWrapper.md b/docs/UpdateTransactionWrapper.md deleted file mode 100644 index df6846f..0000000 --- a/docs/UpdateTransactionWrapper.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateTransactionWrapper - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**transaction** | [***::models::UpdateTransaction**](UpdateTransaction.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UpdateTransactionsResponse.md b/docs/UpdateTransactionsResponse.md deleted file mode 100644 index 77e6431..0000000 --- a/docs/UpdateTransactionsResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateTransactionsResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [***::models::SaveTransactionsResponseData**](SaveTransactionsResponse_data.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UpdateTransactionsWrapper.md b/docs/UpdateTransactionsWrapper.md index f039804..4424384 100644 --- a/docs/UpdateTransactionsWrapper.md +++ b/docs/UpdateTransactionsWrapper.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**transaction** | [***::models::UpdateTransaction**](UpdateTransaction.md) | | [optional] -**transactions** | [**Vec<::models::UpdateTransaction>**](UpdateTransaction.md) | | [optional] +**transactions** | [**Vec**](UpdateTransaction.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserApi.md b/docs/UserApi.md index c2f9359..042530b 100644 --- a/docs/UserApi.md +++ b/docs/UserApi.md @@ -10,18 +10,18 @@ Method | HTTP request | Description ## get_user -> ::models::UserResponse get_user(ctx, ) +> crate::models::UserResponse get_user() User info Returns authenticated user information -### Required Parameters +### Parameters This endpoint does not need any parameter. ### Return type -[**::models::UserResponse**](UserResponse.md) +[**crate::models::UserResponse**](UserResponse.md) ### Authorization diff --git a/docs/UserResponse.md b/docs/UserResponse.md index 31b0d2f..ea094b4 100644 --- a/docs/UserResponse.md +++ b/docs/UserResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [***::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 3aff41b..9669e8a 100644 --- a/docs/UserResponseData.md +++ b/docs/UserResponseData.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**user** | [***::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/src/apis/accounts_api.rs b/src/apis/accounts_api.rs index 616476e..b536e89 100644 --- a/src/apis/accounts_api.rs +++ b/src/apis/accounts_api.rs @@ -13,7 +13,7 @@ use std::borrow::Borrow; use reqwest; -use super::{Error, configuration, urlencode}; +use super::{Error, configuration}; pub struct AccountsApiClient { configuration: Rc, @@ -28,16 +28,16 @@ impl AccountsApiClient { } pub trait AccountsApi { - fn get_account_by_id(&self, budget_id: &str, account_id: &str) -> Result<::models::AccountResponse, Error>; - fn get_accounts(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::AccountsResponse, Error>; + 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; } impl AccountsApi for AccountsApiClient { - fn get_account_by_id(&self, budget_id: &str, account_id: &str) -> Result<::models::AccountResponse, Error> { + fn get_account_by_id(&self, budget_id: &str, account_id: &str) -> Result { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; - let uri_str = format!("{}/budgets/{budget_id}/accounts/{account_id}", configuration.base_path, budget_id=urlencode(budget_id), account_id=account_id); + let uri_str = format!("{}/budgets/{budget_id}/accounts/{account_id}", configuration.base_path, budget_id=crate::apis::urlencode(budget_id), account_id=account_id); let mut req_builder = client.get(uri_str.as_str()); if let Some(ref user_agent) = configuration.user_agent { @@ -58,11 +58,11 @@ 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<::models::AccountsResponse, Error> { + fn get_accounts(&self, budget_id: &str, last_knowledge_of_server: i64) -> 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=urlencode(budget_id)); + 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())]); diff --git a/src/apis/budgets_api.rs b/src/apis/budgets_api.rs index 663dc59..e1002ed 100644 --- a/src/apis/budgets_api.rs +++ b/src/apis/budgets_api.rs @@ -13,7 +13,7 @@ use std::borrow::Borrow; use reqwest; -use super::{Error, configuration, urlencode}; +use super::{Error, configuration}; pub struct BudgetsApiClient { configuration: Rc, @@ -28,17 +28,17 @@ impl BudgetsApiClient { } pub trait BudgetsApi { - fn get_budget_by_id(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::BudgetDetailResponse, Error>; - fn get_budget_settings_by_id(&self, budget_id: &str) -> Result<::models::BudgetSettingsResponse, Error>; - fn get_budgets(&self, ) -> Result<::models::BudgetSummaryResponse, Error>; + fn get_budget_by_id(&self, budget_id: &str, last_knowledge_of_server: i64) -> 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<::models::BudgetDetailResponse, Error> { + fn get_budget_by_id(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; - let uri_str = format!("{}/budgets/{budget_id}", configuration.base_path, budget_id=urlencode(budget_id)); + let 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())]); @@ -60,11 +60,11 @@ impl BudgetsApi for BudgetsApiClient { Ok(client.execute(req)?.error_for_status()?.json()?) } - fn get_budget_settings_by_id(&self, budget_id: &str) -> Result<::models::BudgetSettingsResponse, Error> { + fn get_budget_settings_by_id(&self, budget_id: &str) -> Result { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; - let uri_str = format!("{}/budgets/{budget_id}/settings", configuration.base_path, budget_id=urlencode(budget_id)); + let uri_str = format!("{}/budgets/{budget_id}/settings", configuration.base_path, budget_id=crate::apis::urlencode(budget_id)); let mut req_builder = client.get(uri_str.as_str()); if let Some(ref user_agent) = configuration.user_agent { @@ -85,7 +85,7 @@ impl BudgetsApi for BudgetsApiClient { Ok(client.execute(req)?.error_for_status()?.json()?) } - fn get_budgets(&self, ) -> Result<::models::BudgetSummaryResponse, Error> { + fn get_budgets(&self, ) -> Result { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; diff --git a/src/apis/categories_api.rs b/src/apis/categories_api.rs index 417a2d9..f57d38b 100644 --- a/src/apis/categories_api.rs +++ b/src/apis/categories_api.rs @@ -13,7 +13,7 @@ use std::borrow::Borrow; use reqwest; -use super::{Error, configuration, urlencode}; +use super::{Error, configuration}; pub struct CategoriesApiClient { configuration: Rc, @@ -28,18 +28,18 @@ impl CategoriesApiClient { } pub trait CategoriesApi { - fn get_categories(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::CategoriesResponse, Error>; - fn get_category_by_id(&self, budget_id: &str, category_id: &str) -> Result<::models::CategoryResponse, Error>; - fn get_month_category_by_id(&self, budget_id: &str, month: String, category_id: &str) -> Result<::models::CategoryResponse, Error>; - fn update_month_category(&self, budget_id: &str, month: String, category_id: &str, data: ::models::SaveMonthCategoryWrapper) -> Result<::models::SaveCategoryResponse, Error>; + fn get_categories(&self, budget_id: &str, last_knowledge_of_server: i64) -> 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<::models::CategoriesResponse, Error> { + fn get_categories(&self, budget_id: &str, last_knowledge_of_server: i64) -> 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=urlencode(budget_id)); + 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())]); @@ -61,11 +61,11 @@ impl CategoriesApi for CategoriesApiClient { Ok(client.execute(req)?.error_for_status()?.json()?) } - fn get_category_by_id(&self, budget_id: &str, category_id: &str) -> Result<::models::CategoryResponse, Error> { + fn get_category_by_id(&self, budget_id: &str, category_id: &str) -> Result { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; - let uri_str = format!("{}/budgets/{budget_id}/categories/{category_id}", configuration.base_path, budget_id=urlencode(budget_id), category_id=urlencode(category_id)); + let uri_str = format!("{}/budgets/{budget_id}/categories/{category_id}", 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()); if let Some(ref user_agent) = configuration.user_agent { @@ -86,11 +86,11 @@ impl CategoriesApi for CategoriesApiClient { Ok(client.execute(req)?.error_for_status()?.json()?) } - fn get_month_category_by_id(&self, budget_id: &str, month: String, category_id: &str) -> Result<::models::CategoryResponse, Error> { + fn get_month_category_by_id(&self, budget_id: &str, month: String, category_id: &str) -> Result { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; - let uri_str = format!("{}/budgets/{budget_id}/months/{month}/categories/{category_id}", configuration.base_path, budget_id=urlencode(budget_id), month=month, category_id=urlencode(category_id)); + let uri_str = format!("{}/budgets/{budget_id}/months/{month}/categories/{category_id}", configuration.base_path, budget_id=crate::apis::urlencode(budget_id), month=month, category_id=crate::apis::urlencode(category_id)); let mut req_builder = client.get(uri_str.as_str()); if let Some(ref user_agent) = configuration.user_agent { @@ -111,11 +111,11 @@ impl CategoriesApi for CategoriesApiClient { Ok(client.execute(req)?.error_for_status()?.json()?) } - fn update_month_category(&self, budget_id: &str, month: String, category_id: &str, data: ::models::SaveMonthCategoryWrapper) -> Result<::models::SaveCategoryResponse, Error> { + fn update_month_category(&self, budget_id: &str, month: String, category_id: &str, data: crate::models::SaveMonthCategoryWrapper) -> Result { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; - let uri_str = format!("{}/budgets/{budget_id}/months/{month}/categories/{category_id}", configuration.base_path, budget_id=urlencode(budget_id), month=month, category_id=urlencode(category_id)); + let uri_str = format!("{}/budgets/{budget_id}/months/{month}/categories/{category_id}", configuration.base_path, budget_id=crate::apis::urlencode(budget_id), month=month, category_id=crate::apis::urlencode(category_id)); let mut req_builder = client.patch(uri_str.as_str()); if let Some(ref user_agent) = configuration.user_agent { diff --git a/src/apis/client.rs b/src/apis/client.rs index 2776f11..387df63 100644 --- a/src/apis/client.rs +++ b/src/apis/client.rs @@ -3,17 +3,16 @@ use std::rc::Rc; use super::configuration::Configuration; pub struct APIClient { - configuration: Rc, - accounts_api: Box<::apis::AccountsApi>, - budgets_api: Box<::apis::BudgetsApi>, - categories_api: Box<::apis::CategoriesApi>, - deprecated_api: Box<::apis::DeprecatedApi>, - months_api: Box<::apis::MonthsApi>, - payee_locations_api: Box<::apis::PayeeLocationsApi>, - payees_api: Box<::apis::PayeesApi>, - scheduled_transactions_api: Box<::apis::ScheduledTransactionsApi>, - transactions_api: Box<::apis::TransactionsApi>, - user_api: Box<::apis::UserApi>, + 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 { @@ -21,57 +20,56 @@ impl APIClient { let rc = Rc::new(configuration); APIClient { - configuration: rc.clone(), - accounts_api: Box::new(::apis::AccountsApiClient::new(rc.clone())), - budgets_api: Box::new(::apis::BudgetsApiClient::new(rc.clone())), - categories_api: Box::new(::apis::CategoriesApiClient::new(rc.clone())), - deprecated_api: Box::new(::apis::DeprecatedApiClient::new(rc.clone())), - months_api: Box::new(::apis::MonthsApiClient::new(rc.clone())), - payee_locations_api: Box::new(::apis::PayeeLocationsApiClient::new(rc.clone())), - payees_api: Box::new(::apis::PayeesApiClient::new(rc.clone())), - scheduled_transactions_api: Box::new(::apis::ScheduledTransactionsApiClient::new(rc.clone())), - transactions_api: Box::new(::apis::TransactionsApiClient::new(rc.clone())), - user_api: Box::new(::apis::UserApiClient::new(rc.clone())), + accounts_api: Box::new(crate::apis::AccountsApiClient::new(rc.clone())), + budgets_api: Box::new(crate::apis::BudgetsApiClient::new(rc.clone())), + categories_api: Box::new(crate::apis::CategoriesApiClient::new(rc.clone())), + deprecated_api: Box::new(crate::apis::DeprecatedApiClient::new(rc.clone())), + months_api: Box::new(crate::apis::MonthsApiClient::new(rc.clone())), + payee_locations_api: Box::new(crate::apis::PayeeLocationsApiClient::new(rc.clone())), + payees_api: Box::new(crate::apis::PayeesApiClient::new(rc.clone())), + scheduled_transactions_api: Box::new(crate::apis::ScheduledTransactionsApiClient::new(rc.clone())), + transactions_api: Box::new(crate::apis::TransactionsApiClient::new(rc.clone())), + user_api: Box::new(crate::apis::UserApiClient::new(rc.clone())), } } - pub fn accounts_api(&self) -> &::apis::AccountsApi{ + pub fn accounts_api(&self) -> &crate::apis::AccountsApi{ self.accounts_api.as_ref() } - pub fn budgets_api(&self) -> &::apis::BudgetsApi{ + pub fn budgets_api(&self) -> &crate::apis::BudgetsApi{ self.budgets_api.as_ref() } - pub fn categories_api(&self) -> &::apis::CategoriesApi{ + pub fn categories_api(&self) -> &crate::apis::CategoriesApi{ self.categories_api.as_ref() } - pub fn deprecated_api(&self) -> &::apis::DeprecatedApi{ + pub fn deprecated_api(&self) -> &crate::apis::DeprecatedApi{ self.deprecated_api.as_ref() } - pub fn months_api(&self) -> &::apis::MonthsApi{ + pub fn months_api(&self) -> &crate::apis::MonthsApi{ self.months_api.as_ref() } - pub fn payee_locations_api(&self) -> &::apis::PayeeLocationsApi{ + pub fn payee_locations_api(&self) -> &crate::apis::PayeeLocationsApi{ self.payee_locations_api.as_ref() } - pub fn payees_api(&self) -> &::apis::PayeesApi{ + pub fn payees_api(&self) -> &crate::apis::PayeesApi{ self.payees_api.as_ref() } - pub fn scheduled_transactions_api(&self) -> &::apis::ScheduledTransactionsApi{ + pub fn scheduled_transactions_api(&self) -> &crate::apis::ScheduledTransactionsApi{ self.scheduled_transactions_api.as_ref() } - pub fn transactions_api(&self) -> &::apis::TransactionsApi{ + pub fn transactions_api(&self) -> &crate::apis::TransactionsApi{ self.transactions_api.as_ref() } - pub fn user_api(&self) -> &::apis::UserApi{ + pub fn user_api(&self) -> &crate::apis::UserApi{ self.user_api.as_ref() } diff --git a/src/apis/deprecated_api.rs b/src/apis/deprecated_api.rs index a148248..aab34ff 100644 --- a/src/apis/deprecated_api.rs +++ b/src/apis/deprecated_api.rs @@ -13,7 +13,7 @@ use std::borrow::Borrow; use reqwest; -use super::{Error, configuration, urlencode}; +use super::{Error, configuration}; pub struct DeprecatedApiClient { configuration: Rc, @@ -28,15 +28,15 @@ impl DeprecatedApiClient { } pub trait DeprecatedApi { - fn bulk_create_transactions(&self, budget_id: &str, transactions: ::models::BulkTransactions) -> Result<::models::BulkResponse, Error>; + fn bulk_create_transactions(&self, budget_id: &str, transactions: crate::models::BulkTransactions) -> Result; } impl DeprecatedApi for DeprecatedApiClient { - fn bulk_create_transactions(&self, budget_id: &str, transactions: ::models::BulkTransactions) -> Result<::models::BulkResponse, Error> { + fn bulk_create_transactions(&self, budget_id: &str, transactions: crate::models::BulkTransactions) -> Result { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; - let uri_str = format!("{}/budgets/{budget_id}/transactions/bulk", configuration.base_path, budget_id=urlencode(budget_id)); + let uri_str = format!("{}/budgets/{budget_id}/transactions/bulk", configuration.base_path, budget_id=crate::apis::urlencode(budget_id)); let mut req_builder = client.post(uri_str.as_str()); if let Some(ref user_agent) = configuration.user_agent { diff --git a/src/apis/mod.rs b/src/apis/mod.rs index 910bd7e..b71d970 100644 --- a/src/apis/mod.rs +++ b/src/apis/mod.rs @@ -30,8 +30,6 @@ pub fn urlencode>(s: T) -> String { ::url::form_urlencoded::byte_serialize(s.as_ref().as_bytes()).collect() } -use super::models::*; - mod accounts_api; pub use self::accounts_api::{ AccountsApi, AccountsApiClient }; mod budgets_api; diff --git a/src/apis/months_api.rs b/src/apis/months_api.rs index 3bee3fe..48d586b 100644 --- a/src/apis/months_api.rs +++ b/src/apis/months_api.rs @@ -13,7 +13,7 @@ use std::borrow::Borrow; use reqwest; -use super::{Error, configuration, urlencode}; +use super::{Error, configuration}; pub struct MonthsApiClient { configuration: Rc, @@ -28,16 +28,16 @@ impl MonthsApiClient { } pub trait MonthsApi { - fn get_budget_month(&self, budget_id: &str, month: String) -> Result<::models::MonthDetailResponse, Error>; - fn get_budget_months(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::MonthSummariesResponse, Error>; + 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; } impl MonthsApi for MonthsApiClient { - fn get_budget_month(&self, budget_id: &str, month: String) -> Result<::models::MonthDetailResponse, Error> { + fn get_budget_month(&self, budget_id: &str, month: String) -> Result { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; - let uri_str = format!("{}/budgets/{budget_id}/months/{month}", configuration.base_path, budget_id=urlencode(budget_id), month=month); + let uri_str = format!("{}/budgets/{budget_id}/months/{month}", configuration.base_path, budget_id=crate::apis::urlencode(budget_id), month=month); let mut req_builder = client.get(uri_str.as_str()); if let Some(ref user_agent) = configuration.user_agent { @@ -58,11 +58,11 @@ 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<::models::MonthSummariesResponse, Error> { + fn get_budget_months(&self, budget_id: &str, last_knowledge_of_server: i64) -> 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=urlencode(budget_id)); + 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())]); diff --git a/src/apis/payee_locations_api.rs b/src/apis/payee_locations_api.rs index 88f12e1..823dea4 100644 --- a/src/apis/payee_locations_api.rs +++ b/src/apis/payee_locations_api.rs @@ -13,7 +13,7 @@ use std::borrow::Borrow; use reqwest; -use super::{Error, configuration, urlencode}; +use super::{Error, configuration}; pub struct PayeeLocationsApiClient { configuration: Rc, @@ -28,17 +28,17 @@ impl PayeeLocationsApiClient { } pub trait PayeeLocationsApi { - fn get_payee_location_by_id(&self, budget_id: &str, payee_location_id: &str) -> Result<::models::PayeeLocationResponse, Error>; - fn get_payee_locations(&self, budget_id: &str) -> Result<::models::PayeeLocationsResponse, Error>; - fn get_payee_locations_by_payee(&self, budget_id: &str, payee_id: &str) -> Result<::models::PayeeLocationsResponse, Error>; + fn get_payee_location_by_id(&self, budget_id: &str, payee_location_id: &str) -> Result; + fn get_payee_locations(&self, budget_id: &str) -> Result; + fn get_payee_locations_by_payee(&self, budget_id: &str, payee_id: &str) -> Result; } impl PayeeLocationsApi for PayeeLocationsApiClient { - fn get_payee_location_by_id(&self, budget_id: &str, payee_location_id: &str) -> Result<::models::PayeeLocationResponse, Error> { + fn get_payee_location_by_id(&self, budget_id: &str, payee_location_id: &str) -> Result { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; - let uri_str = format!("{}/budgets/{budget_id}/payee_locations/{payee_location_id}", configuration.base_path, budget_id=urlencode(budget_id), payee_location_id=urlencode(payee_location_id)); + let uri_str = format!("{}/budgets/{budget_id}/payee_locations/{payee_location_id}", configuration.base_path, budget_id=crate::apis::urlencode(budget_id), payee_location_id=crate::apis::urlencode(payee_location_id)); let mut req_builder = client.get(uri_str.as_str()); if let Some(ref user_agent) = configuration.user_agent { @@ -59,11 +59,11 @@ impl PayeeLocationsApi for PayeeLocationsApiClient { Ok(client.execute(req)?.error_for_status()?.json()?) } - fn get_payee_locations(&self, budget_id: &str) -> Result<::models::PayeeLocationsResponse, Error> { + fn get_payee_locations(&self, budget_id: &str) -> Result { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; - let uri_str = format!("{}/budgets/{budget_id}/payee_locations", configuration.base_path, budget_id=urlencode(budget_id)); + let uri_str = format!("{}/budgets/{budget_id}/payee_locations", configuration.base_path, budget_id=crate::apis::urlencode(budget_id)); let mut req_builder = client.get(uri_str.as_str()); if let Some(ref user_agent) = configuration.user_agent { @@ -84,11 +84,11 @@ impl PayeeLocationsApi for PayeeLocationsApiClient { Ok(client.execute(req)?.error_for_status()?.json()?) } - fn get_payee_locations_by_payee(&self, budget_id: &str, payee_id: &str) -> Result<::models::PayeeLocationsResponse, Error> { + fn get_payee_locations_by_payee(&self, budget_id: &str, payee_id: &str) -> Result { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; - let uri_str = format!("{}/budgets/{budget_id}/payees/{payee_id}/payee_locations", configuration.base_path, budget_id=urlencode(budget_id), payee_id=urlencode(payee_id)); + let uri_str = format!("{}/budgets/{budget_id}/payees/{payee_id}/payee_locations", 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()); if let Some(ref user_agent) = configuration.user_agent { diff --git a/src/apis/payees_api.rs b/src/apis/payees_api.rs index 77db5bb..890920c 100644 --- a/src/apis/payees_api.rs +++ b/src/apis/payees_api.rs @@ -13,7 +13,7 @@ use std::borrow::Borrow; use reqwest; -use super::{Error, configuration, urlencode}; +use super::{Error, configuration}; pub struct PayeesApiClient { configuration: Rc, @@ -28,16 +28,16 @@ impl PayeesApiClient { } pub trait PayeesApi { - fn get_payee_by_id(&self, budget_id: &str, payee_id: &str) -> Result<::models::PayeeResponse, Error>; - fn get_payees(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::PayeesResponse, Error>; + 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; } impl PayeesApi for PayeesApiClient { - fn get_payee_by_id(&self, budget_id: &str, payee_id: &str) -> Result<::models::PayeeResponse, Error> { + fn get_payee_by_id(&self, budget_id: &str, payee_id: &str) -> Result { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; - let uri_str = format!("{}/budgets/{budget_id}/payees/{payee_id}", configuration.base_path, budget_id=urlencode(budget_id), payee_id=urlencode(payee_id)); + let uri_str = format!("{}/budgets/{budget_id}/payees/{payee_id}", 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()); if let Some(ref user_agent) = configuration.user_agent { @@ -58,11 +58,11 @@ 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<::models::PayeesResponse, Error> { + fn get_payees(&self, budget_id: &str, last_knowledge_of_server: i64) -> 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=urlencode(budget_id)); + 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())]); diff --git a/src/apis/scheduled_transactions_api.rs b/src/apis/scheduled_transactions_api.rs index 8ab30a8..fe8c959 100644 --- a/src/apis/scheduled_transactions_api.rs +++ b/src/apis/scheduled_transactions_api.rs @@ -13,7 +13,7 @@ use std::borrow::Borrow; use reqwest; -use super::{Error, configuration, urlencode}; +use super::{Error, configuration}; pub struct ScheduledTransactionsApiClient { configuration: Rc, @@ -28,16 +28,16 @@ impl ScheduledTransactionsApiClient { } pub trait ScheduledTransactionsApi { - fn get_scheduled_transaction_by_id(&self, budget_id: &str, scheduled_transaction_id: &str) -> Result<::models::ScheduledTransactionResponse, Error>; - fn get_scheduled_transactions(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::ScheduledTransactionsResponse, Error>; + 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; } impl ScheduledTransactionsApi for ScheduledTransactionsApiClient { - fn get_scheduled_transaction_by_id(&self, budget_id: &str, scheduled_transaction_id: &str) -> Result<::models::ScheduledTransactionResponse, Error> { + fn get_scheduled_transaction_by_id(&self, budget_id: &str, scheduled_transaction_id: &str) -> Result { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; - let uri_str = format!("{}/budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id}", configuration.base_path, budget_id=urlencode(budget_id), scheduled_transaction_id=urlencode(scheduled_transaction_id)); + let uri_str = format!("{}/budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id}", configuration.base_path, budget_id=crate::apis::urlencode(budget_id), scheduled_transaction_id=crate::apis::urlencode(scheduled_transaction_id)); let mut req_builder = client.get(uri_str.as_str()); if let Some(ref user_agent) = configuration.user_agent { @@ -58,11 +58,11 @@ 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<::models::ScheduledTransactionsResponse, Error> { + fn get_scheduled_transactions(&self, budget_id: &str, last_knowledge_of_server: i64) -> 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=urlencode(budget_id)); + 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())]); diff --git a/src/apis/transactions_api.rs b/src/apis/transactions_api.rs index a6386a0..9b3fcb4 100644 --- a/src/apis/transactions_api.rs +++ b/src/apis/transactions_api.rs @@ -13,7 +13,7 @@ use std::borrow::Borrow; use reqwest; -use super::{Error, configuration, urlencode}; +use super::{Error, configuration}; pub struct TransactionsApiClient { configuration: Rc, @@ -28,22 +28,22 @@ impl TransactionsApiClient { } pub trait TransactionsApi { - fn create_transaction(&self, budget_id: &str, data: ::models::SaveTransactionsWrapper) -> Result<::models::SaveTransactionsResponse, Error>; - fn get_transaction_by_id(&self, budget_id: &str, transaction_id: &str) -> Result<::models::TransactionResponse, Error>; - fn get_transactions(&self, budget_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::TransactionsResponse, Error>; - fn get_transactions_by_account(&self, budget_id: &str, account_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::TransactionsResponse, Error>; - fn get_transactions_by_category(&self, budget_id: &str, category_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::HybridTransactionsResponse, Error>; - fn get_transactions_by_payee(&self, budget_id: &str, payee_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::HybridTransactionsResponse, Error>; - fn update_transaction(&self, budget_id: &str, transaction_id: &str, data: ::models::UpdateTransactionWrapper) -> Result<::models::TransactionResponse, Error>; - fn update_transactions(&self, budget_id: &str, data: ::models::UpdateTransactionsWrapper) -> Result<::models::UpdateTransactionsResponse, Error>; + 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 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; } impl TransactionsApi for TransactionsApiClient { - fn create_transaction(&self, budget_id: &str, data: ::models::SaveTransactionsWrapper) -> Result<::models::SaveTransactionsResponse, Error> { + fn create_transaction(&self, budget_id: &str, data: crate::models::SaveTransactionsWrapper) -> 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=urlencode(budget_id)); + let uri_str = format!("{}/budgets/{budget_id}/transactions", configuration.base_path, budget_id=crate::apis::urlencode(budget_id)); let mut req_builder = client.post(uri_str.as_str()); if let Some(ref user_agent) = configuration.user_agent { @@ -65,11 +65,11 @@ impl TransactionsApi for TransactionsApiClient { Ok(client.execute(req)?.error_for_status()?.json()?) } - fn get_transaction_by_id(&self, budget_id: &str, transaction_id: &str) -> Result<::models::TransactionResponse, Error> { + fn get_transaction_by_id(&self, budget_id: &str, transaction_id: &str) -> Result { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; - let uri_str = format!("{}/budgets/{budget_id}/transactions/{transaction_id}", configuration.base_path, budget_id=urlencode(budget_id), transaction_id=urlencode(transaction_id)); + let uri_str = format!("{}/budgets/{budget_id}/transactions/{transaction_id}", configuration.base_path, budget_id=crate::apis::urlencode(budget_id), transaction_id=crate::apis::urlencode(transaction_id)); let mut req_builder = client.get(uri_str.as_str()); if let Some(ref user_agent) = configuration.user_agent { @@ -90,11 +90,11 @@ 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<::models::TransactionsResponse, Error> { + fn get_transactions(&self, budget_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> 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=urlencode(budget_id)); + 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())]); @@ -118,11 +118,11 @@ 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<::models::TransactionsResponse, Error> { + fn get_transactions_by_account(&self, budget_id: &str, account_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; - let uri_str = format!("{}/budgets/{budget_id}/accounts/{account_id}/transactions", configuration.base_path, budget_id=urlencode(budget_id), account_id=urlencode(account_id)); + let 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())]); @@ -146,11 +146,11 @@ 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<::models::HybridTransactionsResponse, Error> { + fn get_transactions_by_category(&self, budget_id: &str, category_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> 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=urlencode(budget_id), category_id=urlencode(category_id)); + 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())]); @@ -174,11 +174,11 @@ 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<::models::HybridTransactionsResponse, Error> { + fn get_transactions_by_payee(&self, budget_id: &str, payee_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; - let uri_str = format!("{}/budgets/{budget_id}/payees/{payee_id}/transactions", configuration.base_path, budget_id=urlencode(budget_id), payee_id=urlencode(payee_id)); + let 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())]); @@ -202,11 +202,11 @@ impl TransactionsApi for TransactionsApiClient { Ok(client.execute(req)?.error_for_status()?.json()?) } - fn update_transaction(&self, budget_id: &str, transaction_id: &str, data: ::models::UpdateTransactionWrapper) -> Result<::models::TransactionResponse, Error> { + fn update_transaction(&self, budget_id: &str, transaction_id: &str, data: crate::models::SaveTransactionWrapper) -> Result { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; - let uri_str = format!("{}/budgets/{budget_id}/transactions/{transaction_id}", configuration.base_path, budget_id=urlencode(budget_id), transaction_id=urlencode(transaction_id)); + let uri_str = format!("{}/budgets/{budget_id}/transactions/{transaction_id}", configuration.base_path, budget_id=crate::apis::urlencode(budget_id), transaction_id=crate::apis::urlencode(transaction_id)); let mut req_builder = client.put(uri_str.as_str()); if let Some(ref user_agent) = configuration.user_agent { @@ -228,11 +228,11 @@ impl TransactionsApi for TransactionsApiClient { Ok(client.execute(req)?.error_for_status()?.json()?) } - fn update_transactions(&self, budget_id: &str, data: ::models::UpdateTransactionsWrapper) -> Result<::models::UpdateTransactionsResponse, Error> { + fn update_transactions(&self, budget_id: &str, data: crate::models::UpdateTransactionsWrapper) -> 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=urlencode(budget_id)); + let uri_str = format!("{}/budgets/{budget_id}/transactions", configuration.base_path, budget_id=crate::apis::urlencode(budget_id)); let mut req_builder = client.patch(uri_str.as_str()); if let Some(ref user_agent) = configuration.user_agent { diff --git a/src/apis/user_api.rs b/src/apis/user_api.rs index 50c243e..870ecc4 100644 --- a/src/apis/user_api.rs +++ b/src/apis/user_api.rs @@ -13,7 +13,7 @@ use std::borrow::Borrow; use reqwest; -use super::{Error, configuration, urlencode}; +use super::{Error, configuration}; pub struct UserApiClient { configuration: Rc, @@ -28,11 +28,11 @@ impl UserApiClient { } pub trait UserApi { - fn get_user(&self, ) -> Result<::models::UserResponse, Error>; + fn get_user(&self, ) -> Result; } impl UserApi for UserApiClient { - fn get_user(&self, ) -> Result<::models::UserResponse, Error> { + fn get_user(&self, ) -> Result { let configuration: &configuration::Configuration = self.configuration.borrow(); let client = &configuration.client; diff --git a/src/models/account.rs b/src/models/account.rs index 6ffa1d5..44ad808 100644 --- a/src/models/account.rs +++ b/src/models/account.rs @@ -9,11 +9,8 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct Account { #[serde(rename = "id")] pub id: String, @@ -21,7 +18,7 @@ pub struct Account { pub name: String, /// The type of account. Note: payPal, merchantAccount, investmentAccount, and mortgage types have been deprecated and will be removed in the future. #[serde(rename = "type")] - pub _type: String, + pub _type: Type, /// Whether this account is on budget or not #[serde(rename = "on_budget")] pub on_budget: bool, @@ -48,7 +45,7 @@ pub struct Account { } impl Account { - pub fn new(id: String, name: String, _type: String, on_budget: bool, closed: bool, balance: i64, cleared_balance: i64, uncleared_balance: i64, transfer_payee_id: String, deleted: bool) -> Account { + 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, @@ -66,7 +63,7 @@ impl Account { } /// The type of account. Note: payPal, merchantAccount, investmentAccount, and mortgage types have been deprecated and will be removed in the future. -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub enum Type { #[serde(rename = "checking")] Checking, diff --git a/src/models/account_response.rs b/src/models/account_response.rs index 633bacb..3f24283 100644 --- a/src/models/account_response.rs +++ b/src/models/account_response.rs @@ -9,18 +9,15 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct AccountResponse { #[serde(rename = "data")] - pub data: ::models::AccountResponseData, + pub data: crate::models::AccountResponseData, } impl AccountResponse { - pub fn new(data: ::models::AccountResponseData) -> AccountResponse { + pub fn new(data: crate::models::AccountResponseData) -> AccountResponse { AccountResponse { data: data, } diff --git a/src/models/account_response_data.rs b/src/models/account_response_data.rs index 9340a0f..c74e20a 100644 --- a/src/models/account_response_data.rs +++ b/src/models/account_response_data.rs @@ -9,18 +9,15 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct AccountResponseData { #[serde(rename = "account")] - pub account: ::models::Account, + pub account: crate::models::Account, } impl AccountResponseData { - pub fn new(account: ::models::Account) -> AccountResponseData { + pub fn new(account: crate::models::Account) -> AccountResponseData { AccountResponseData { account: account, } diff --git a/src/models/accounts_response.rs b/src/models/accounts_response.rs index d2bd25d..ccf8809 100644 --- a/src/models/accounts_response.rs +++ b/src/models/accounts_response.rs @@ -9,18 +9,15 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct AccountsResponse { #[serde(rename = "data")] - pub data: ::models::AccountsResponseData, + pub data: crate::models::AccountsResponseData, } impl AccountsResponse { - pub fn new(data: ::models::AccountsResponseData) -> AccountsResponse { + pub fn new(data: crate::models::AccountsResponseData) -> AccountsResponse { AccountsResponse { data: data, } diff --git a/src/models/accounts_response_data.rs b/src/models/accounts_response_data.rs index 1324953..670c777 100644 --- a/src/models/accounts_response_data.rs +++ b/src/models/accounts_response_data.rs @@ -9,21 +9,18 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct AccountsResponseData { #[serde(rename = "accounts")] - pub accounts: Vec<::models::Account>, + pub accounts: Vec, /// The knowledge of the server #[serde(rename = "server_knowledge")] pub server_knowledge: i64, } impl AccountsResponseData { - pub fn new(accounts: Vec<::models::Account>, server_knowledge: i64) -> AccountsResponseData { + pub fn new(accounts: Vec, server_knowledge: i64) -> AccountsResponseData { AccountsResponseData { accounts: accounts, server_knowledge: server_knowledge, diff --git a/src/models/budget_detail.rs b/src/models/budget_detail.rs index 8553aad..b14f4b0 100644 --- a/src/models/budget_detail.rs +++ b/src/models/budget_detail.rs @@ -9,11 +9,8 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct BudgetDetail { #[serde(rename = "id")] pub id: String, @@ -29,29 +26,29 @@ pub struct BudgetDetail { #[serde(rename = "last_month", skip_serializing_if = "Option::is_none")] pub last_month: Option, #[serde(rename = "date_format", skip_serializing_if = "Option::is_none")] - pub date_format: Option<::models::DateFormat>, + pub date_format: Option, #[serde(rename = "currency_format", skip_serializing_if = "Option::is_none")] - pub currency_format: Option<::models::CurrencyFormat>, + pub currency_format: Option, #[serde(rename = "accounts", skip_serializing_if = "Option::is_none")] - pub accounts: Option>, + pub accounts: Option>, #[serde(rename = "payees", skip_serializing_if = "Option::is_none")] - pub payees: Option>, + pub payees: Option>, #[serde(rename = "payee_locations", skip_serializing_if = "Option::is_none")] - pub payee_locations: Option>, + pub payee_locations: Option>, #[serde(rename = "category_groups", skip_serializing_if = "Option::is_none")] - pub category_groups: Option>, + pub category_groups: Option>, #[serde(rename = "categories", skip_serializing_if = "Option::is_none")] - pub categories: Option>, + pub categories: Option>, #[serde(rename = "months", skip_serializing_if = "Option::is_none")] - pub months: Option>, + pub months: Option>, #[serde(rename = "transactions", skip_serializing_if = "Option::is_none")] - pub transactions: Option>, + pub transactions: Option>, #[serde(rename = "subtransactions", skip_serializing_if = "Option::is_none")] - pub subtransactions: Option>, + pub subtransactions: Option>, #[serde(rename = "scheduled_transactions", skip_serializing_if = "Option::is_none")] - pub scheduled_transactions: Option>, + pub scheduled_transactions: Option>, #[serde(rename = "scheduled_subtransactions", skip_serializing_if = "Option::is_none")] - pub scheduled_subtransactions: Option>, + pub scheduled_subtransactions: Option>, } impl BudgetDetail { diff --git a/src/models/budget_detail_all_of.rs b/src/models/budget_detail_all_of.rs index 90a621e..8b7da42 100644 --- a/src/models/budget_detail_all_of.rs +++ b/src/models/budget_detail_all_of.rs @@ -9,32 +9,29 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct BudgetDetailAllOf { #[serde(rename = "accounts", skip_serializing_if = "Option::is_none")] - pub accounts: Option>, + pub accounts: Option>, #[serde(rename = "payees", skip_serializing_if = "Option::is_none")] - pub payees: Option>, + pub payees: Option>, #[serde(rename = "payee_locations", skip_serializing_if = "Option::is_none")] - pub payee_locations: Option>, + pub payee_locations: Option>, #[serde(rename = "category_groups", skip_serializing_if = "Option::is_none")] - pub category_groups: Option>, + pub category_groups: Option>, #[serde(rename = "categories", skip_serializing_if = "Option::is_none")] - pub categories: Option>, + pub categories: Option>, #[serde(rename = "months", skip_serializing_if = "Option::is_none")] - pub months: Option>, + pub months: Option>, #[serde(rename = "transactions", skip_serializing_if = "Option::is_none")] - pub transactions: Option>, + pub transactions: Option>, #[serde(rename = "subtransactions", skip_serializing_if = "Option::is_none")] - pub subtransactions: Option>, + pub subtransactions: Option>, #[serde(rename = "scheduled_transactions", skip_serializing_if = "Option::is_none")] - pub scheduled_transactions: Option>, + pub scheduled_transactions: Option>, #[serde(rename = "scheduled_subtransactions", skip_serializing_if = "Option::is_none")] - pub scheduled_subtransactions: Option>, + pub scheduled_subtransactions: Option>, } impl BudgetDetailAllOf { diff --git a/src/models/budget_detail_response.rs b/src/models/budget_detail_response.rs index 5fe15c9..3ffcdcd 100644 --- a/src/models/budget_detail_response.rs +++ b/src/models/budget_detail_response.rs @@ -9,18 +9,15 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct BudgetDetailResponse { #[serde(rename = "data")] - pub data: ::models::BudgetDetailResponseData, + pub data: crate::models::BudgetDetailResponseData, } impl BudgetDetailResponse { - pub fn new(data: ::models::BudgetDetailResponseData) -> BudgetDetailResponse { + pub fn new(data: crate::models::BudgetDetailResponseData) -> BudgetDetailResponse { BudgetDetailResponse { data: data, } diff --git a/src/models/budget_detail_response_data.rs b/src/models/budget_detail_response_data.rs index 301479d..13dd651 100644 --- a/src/models/budget_detail_response_data.rs +++ b/src/models/budget_detail_response_data.rs @@ -9,21 +9,18 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct BudgetDetailResponseData { #[serde(rename = "budget")] - pub budget: ::models::BudgetDetail, + pub budget: crate::models::BudgetDetail, /// The knowledge of the server #[serde(rename = "server_knowledge")] pub server_knowledge: i64, } impl BudgetDetailResponseData { - pub fn new(budget: ::models::BudgetDetail, server_knowledge: i64) -> BudgetDetailResponseData { + pub fn new(budget: crate::models::BudgetDetail, server_knowledge: i64) -> BudgetDetailResponseData { BudgetDetailResponseData { budget: budget, server_knowledge: server_knowledge, diff --git a/src/models/budget_settings.rs b/src/models/budget_settings.rs index 25985b5..adb2d78 100644 --- a/src/models/budget_settings.rs +++ b/src/models/budget_settings.rs @@ -9,20 +9,17 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct BudgetSettings { #[serde(rename = "date_format")] - pub date_format: ::models::DateFormat, + pub date_format: crate::models::DateFormat, #[serde(rename = "currency_format")] - pub currency_format: ::models::CurrencyFormat, + pub currency_format: crate::models::CurrencyFormat, } impl BudgetSettings { - pub fn new(date_format: ::models::DateFormat, currency_format: ::models::CurrencyFormat) -> BudgetSettings { + pub fn new(date_format: crate::models::DateFormat, currency_format: crate::models::CurrencyFormat) -> BudgetSettings { BudgetSettings { date_format: date_format, currency_format: currency_format, diff --git a/src/models/budget_settings_response.rs b/src/models/budget_settings_response.rs index c5c0ee3..e6a3fb8 100644 --- a/src/models/budget_settings_response.rs +++ b/src/models/budget_settings_response.rs @@ -9,18 +9,15 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct BudgetSettingsResponse { #[serde(rename = "data")] - pub data: ::models::BudgetSettingsResponseData, + pub data: crate::models::BudgetSettingsResponseData, } impl BudgetSettingsResponse { - pub fn new(data: ::models::BudgetSettingsResponseData) -> BudgetSettingsResponse { + pub fn new(data: crate::models::BudgetSettingsResponseData) -> BudgetSettingsResponse { BudgetSettingsResponse { data: data, } diff --git a/src/models/budget_settings_response_data.rs b/src/models/budget_settings_response_data.rs index e484234..bc9045e 100644 --- a/src/models/budget_settings_response_data.rs +++ b/src/models/budget_settings_response_data.rs @@ -9,18 +9,15 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct BudgetSettingsResponseData { #[serde(rename = "settings")] - pub settings: ::models::BudgetSettings, + pub settings: crate::models::BudgetSettings, } impl BudgetSettingsResponseData { - pub fn new(settings: ::models::BudgetSettings) -> BudgetSettingsResponseData { + pub fn new(settings: crate::models::BudgetSettings) -> BudgetSettingsResponseData { BudgetSettingsResponseData { settings: settings, } diff --git a/src/models/budget_summary.rs b/src/models/budget_summary.rs index b380593..742fcdf 100644 --- a/src/models/budget_summary.rs +++ b/src/models/budget_summary.rs @@ -9,11 +9,8 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct BudgetSummary { #[serde(rename = "id")] pub id: String, @@ -29,9 +26,9 @@ pub struct BudgetSummary { #[serde(rename = "last_month", skip_serializing_if = "Option::is_none")] pub last_month: Option, #[serde(rename = "date_format", skip_serializing_if = "Option::is_none")] - pub date_format: Option<::models::DateFormat>, + pub date_format: Option, #[serde(rename = "currency_format", skip_serializing_if = "Option::is_none")] - pub currency_format: Option<::models::CurrencyFormat>, + pub currency_format: Option, } impl BudgetSummary { diff --git a/src/models/budget_summary_response.rs b/src/models/budget_summary_response.rs index 422dfae..2327d4d 100644 --- a/src/models/budget_summary_response.rs +++ b/src/models/budget_summary_response.rs @@ -9,18 +9,15 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct BudgetSummaryResponse { #[serde(rename = "data")] - pub data: ::models::BudgetSummaryResponseData, + pub data: crate::models::BudgetSummaryResponseData, } impl BudgetSummaryResponse { - pub fn new(data: ::models::BudgetSummaryResponseData) -> BudgetSummaryResponse { + pub fn new(data: crate::models::BudgetSummaryResponseData) -> BudgetSummaryResponse { BudgetSummaryResponse { data: data, } diff --git a/src/models/budget_summary_response_data.rs b/src/models/budget_summary_response_data.rs index f6bec05..90802e7 100644 --- a/src/models/budget_summary_response_data.rs +++ b/src/models/budget_summary_response_data.rs @@ -9,20 +9,17 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct BudgetSummaryResponseData { #[serde(rename = "budgets")] - pub budgets: Vec<::models::BudgetSummary>, + pub budgets: Vec, #[serde(rename = "default_budget", skip_serializing_if = "Option::is_none")] - pub default_budget: Option<::models::BudgetSummary>, + pub default_budget: Option, } impl BudgetSummaryResponseData { - pub fn new(budgets: Vec<::models::BudgetSummary>) -> BudgetSummaryResponseData { + pub fn new(budgets: Vec) -> BudgetSummaryResponseData { BudgetSummaryResponseData { budgets: budgets, default_budget: None, diff --git a/src/models/bulk_response.rs b/src/models/bulk_response.rs index bf98b29..f40b58b 100644 --- a/src/models/bulk_response.rs +++ b/src/models/bulk_response.rs @@ -9,18 +9,15 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct BulkResponse { #[serde(rename = "data")] - pub data: ::models::BulkResponseData, + pub data: crate::models::BulkResponseData, } impl BulkResponse { - pub fn new(data: ::models::BulkResponseData) -> BulkResponse { + pub fn new(data: crate::models::BulkResponseData) -> BulkResponse { BulkResponse { data: data, } diff --git a/src/models/bulk_response_data.rs b/src/models/bulk_response_data.rs index e347af0..192b489 100644 --- a/src/models/bulk_response_data.rs +++ b/src/models/bulk_response_data.rs @@ -9,18 +9,15 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct BulkResponseData { #[serde(rename = "bulk")] - pub bulk: ::models::BulkResponseDataBulk, + pub bulk: crate::models::BulkResponseDataBulk, } impl BulkResponseData { - pub fn new(bulk: ::models::BulkResponseDataBulk) -> BulkResponseData { + pub fn new(bulk: crate::models::BulkResponseDataBulk) -> BulkResponseData { BulkResponseData { bulk: bulk, } diff --git a/src/models/bulk_response_data_bulk.rs b/src/models/bulk_response_data_bulk.rs index 3993078..538f48c 100644 --- a/src/models/bulk_response_data_bulk.rs +++ b/src/models/bulk_response_data_bulk.rs @@ -9,11 +9,8 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct BulkResponseDataBulk { /// The list of Transaction ids that were created. #[serde(rename = "transaction_ids")] diff --git a/src/models/bulk_transactions.rs b/src/models/bulk_transactions.rs index e80c1c3..b3e0466 100644 --- a/src/models/bulk_transactions.rs +++ b/src/models/bulk_transactions.rs @@ -9,18 +9,15 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct BulkTransactions { #[serde(rename = "transactions")] - pub transactions: Vec<::models::SaveTransaction>, + pub transactions: Vec, } impl BulkTransactions { - pub fn new(transactions: Vec<::models::SaveTransaction>) -> BulkTransactions { + pub fn new(transactions: Vec) -> BulkTransactions { BulkTransactions { transactions: transactions, } diff --git a/src/models/categories_response.rs b/src/models/categories_response.rs index 08fbafd..8b804c0 100644 --- a/src/models/categories_response.rs +++ b/src/models/categories_response.rs @@ -9,18 +9,15 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct CategoriesResponse { #[serde(rename = "data")] - pub data: ::models::CategoriesResponseData, + pub data: crate::models::CategoriesResponseData, } impl CategoriesResponse { - pub fn new(data: ::models::CategoriesResponseData) -> CategoriesResponse { + pub fn new(data: crate::models::CategoriesResponseData) -> CategoriesResponse { CategoriesResponse { data: data, } diff --git a/src/models/categories_response_data.rs b/src/models/categories_response_data.rs index 980505e..5a1dad3 100644 --- a/src/models/categories_response_data.rs +++ b/src/models/categories_response_data.rs @@ -9,21 +9,18 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct CategoriesResponseData { #[serde(rename = "category_groups")] - pub category_groups: Vec<::models::CategoryGroupWithCategories>, + pub category_groups: Vec, /// The knowledge of the server #[serde(rename = "server_knowledge")] pub server_knowledge: i64, } impl CategoriesResponseData { - pub fn new(category_groups: Vec<::models::CategoryGroupWithCategories>, server_knowledge: i64) -> CategoriesResponseData { + pub fn new(category_groups: Vec, server_knowledge: i64) -> CategoriesResponseData { CategoriesResponseData { category_groups: category_groups, server_knowledge: server_knowledge, diff --git a/src/models/category.rs b/src/models/category.rs index 1a62c6a..6677f8d 100644 --- a/src/models/category.rs +++ b/src/models/category.rs @@ -9,11 +9,8 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct Category { #[serde(rename = "id")] pub id: String, @@ -38,9 +35,9 @@ pub struct Category { /// Balance in milliunits format #[serde(rename = "balance")] pub balance: i64, - /// The type of goal, if the cagegory has a goal (TB=Target Category Balance, TBD=Target Category Balance by Date, MF=Monthly Funding) + /// The type of goal, if the category has a goal (TB=Target Category Balance, TBD=Target Category Balance by Date, MF=Monthly Funding) #[serde(rename = "goal_type", skip_serializing_if = "Option::is_none")] - pub goal_type: Option, + pub goal_type: Option, /// The month a goal was created #[serde(rename = "goal_creation_month", skip_serializing_if = "Option::is_none")] pub goal_creation_month: Option, @@ -80,8 +77,8 @@ impl Category { } } -/// The type of goal, if the cagegory has a goal (TB=Target Category Balance, TBD=Target Category Balance by Date, MF=Monthly Funding) -#[derive(Debug, Serialize, Deserialize)] +/// The type of goal, if the category has a goal (TB=Target Category Balance, TBD=Target Category Balance by Date, MF=Monthly Funding) +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub enum GoalType { #[serde(rename = "TB")] TB, @@ -89,5 +86,7 @@ pub enum GoalType { TBD, #[serde(rename = "MF")] MF, + #[serde(rename = "NEED")] + NEED, } diff --git a/src/models/category_group.rs b/src/models/category_group.rs index 2f674e2..b4f75ee 100644 --- a/src/models/category_group.rs +++ b/src/models/category_group.rs @@ -9,11 +9,8 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct CategoryGroup { #[serde(rename = "id")] pub id: String, diff --git a/src/models/category_group_with_categories.rs b/src/models/category_group_with_categories.rs index 38cfd88..f674b4c 100644 --- a/src/models/category_group_with_categories.rs +++ b/src/models/category_group_with_categories.rs @@ -9,11 +9,8 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct CategoryGroupWithCategories { #[serde(rename = "id")] pub id: String, @@ -27,11 +24,11 @@ pub struct CategoryGroupWithCategories { pub deleted: bool, /// Category group categories. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC). #[serde(rename = "categories")] - pub categories: Vec<::models::Category>, + pub categories: Vec, } impl CategoryGroupWithCategories { - pub fn new(id: String, name: String, hidden: bool, deleted: bool, categories: Vec<::models::Category>) -> CategoryGroupWithCategories { + pub fn new(id: String, name: String, hidden: bool, deleted: bool, categories: Vec) -> CategoryGroupWithCategories { CategoryGroupWithCategories { id: id, name: name, diff --git a/src/models/category_group_with_categories_all_of.rs b/src/models/category_group_with_categories_all_of.rs index f34d3bb..0820aef 100644 --- a/src/models/category_group_with_categories_all_of.rs +++ b/src/models/category_group_with_categories_all_of.rs @@ -9,19 +9,16 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct CategoryGroupWithCategoriesAllOf { /// Category group categories. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC). #[serde(rename = "categories")] - pub categories: Vec<::models::Category>, + pub categories: Vec, } impl CategoryGroupWithCategoriesAllOf { - pub fn new(categories: Vec<::models::Category>) -> CategoryGroupWithCategoriesAllOf { + pub fn new(categories: Vec) -> CategoryGroupWithCategoriesAllOf { CategoryGroupWithCategoriesAllOf { categories: categories, } diff --git a/src/models/category_response.rs b/src/models/category_response.rs index 35f2f40..13dff4a 100644 --- a/src/models/category_response.rs +++ b/src/models/category_response.rs @@ -9,18 +9,15 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct CategoryResponse { #[serde(rename = "data")] - pub data: ::models::CategoryResponseData, + pub data: crate::models::CategoryResponseData, } impl CategoryResponse { - pub fn new(data: ::models::CategoryResponseData) -> CategoryResponse { + pub fn new(data: crate::models::CategoryResponseData) -> CategoryResponse { CategoryResponse { data: data, } diff --git a/src/models/category_response_data.rs b/src/models/category_response_data.rs index 4e81fbb..078f720 100644 --- a/src/models/category_response_data.rs +++ b/src/models/category_response_data.rs @@ -9,18 +9,15 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct CategoryResponseData { #[serde(rename = "category")] - pub category: ::models::Category, + pub category: crate::models::Category, } impl CategoryResponseData { - pub fn new(category: ::models::Category) -> CategoryResponseData { + pub fn new(category: crate::models::Category) -> CategoryResponseData { CategoryResponseData { category: category, } diff --git a/src/models/currency_format.rs b/src/models/currency_format.rs index 476856a..8831679 100644 --- a/src/models/currency_format.rs +++ b/src/models/currency_format.rs @@ -10,11 +10,8 @@ /// CurrencyFormat : The currency format setting for the budget. In some cases the format will not be available and will be specified as null. -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct CurrencyFormat { #[serde(rename = "iso_code")] pub iso_code: String, diff --git a/src/models/date_format.rs b/src/models/date_format.rs index cf88395..d9259d9 100644 --- a/src/models/date_format.rs +++ b/src/models/date_format.rs @@ -10,11 +10,8 @@ /// DateFormat : The date format setting for the budget. In some cases the format will not be available and will be specified as null. -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct DateFormat { #[serde(rename = "format")] pub format: String, diff --git a/src/models/error_detail.rs b/src/models/error_detail.rs index 4745cf3..32e0380 100644 --- a/src/models/error_detail.rs +++ b/src/models/error_detail.rs @@ -9,11 +9,8 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct ErrorDetail { #[serde(rename = "id")] pub id: String, diff --git a/src/models/error_response.rs b/src/models/error_response.rs index c321726..49760b3 100644 --- a/src/models/error_response.rs +++ b/src/models/error_response.rs @@ -9,18 +9,15 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct ErrorResponse { #[serde(rename = "error")] - pub error: ::models::ErrorDetail, + pub error: crate::models::ErrorDetail, } impl ErrorResponse { - pub fn new(error: ::models::ErrorDetail) -> ErrorResponse { + pub fn new(error: crate::models::ErrorDetail) -> ErrorResponse { ErrorResponse { error: error, } diff --git a/src/models/hybrid_transaction.rs b/src/models/hybrid_transaction.rs index 802813b..a0b0f07 100644 --- a/src/models/hybrid_transaction.rs +++ b/src/models/hybrid_transaction.rs @@ -9,11 +9,8 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct HybridTransaction { #[serde(rename = "id")] pub id: String, @@ -57,20 +54,20 @@ pub struct HybridTransaction { pub deleted: bool, /// Whether the hybrid transaction represents a regular transaction or a subtransaction #[serde(rename = "type")] - pub _type: String, - /// For subtransaction types, this is the id of the pararent transaction. For transaction types, this id will be always be null. + pub _type: Type, + /// For subtransaction types, this is the id of the parent transaction. For transaction types, this id will be always be null. #[serde(rename = "parent_transaction_id", skip_serializing_if = "Option::is_none")] pub parent_transaction_id: Option, #[serde(rename = "account_name")] pub account_name: String, #[serde(rename = "payee_name", skip_serializing_if = "Option::is_none")] pub payee_name: Option, - #[serde(rename = "category_name")] - pub category_name: String, + #[serde(rename = "category_name", skip_serializing_if = "Option::is_none")] + pub category_name: Option, } impl HybridTransaction { - pub fn new(id: String, date: String, amount: i64, cleared: String, approved: bool, account_id: String, deleted: bool, _type: String, account_name: String, category_name: String) -> HybridTransaction { + pub fn new(id: String, date: String, amount: i64, cleared: String, approved: bool, account_id: String, deleted: bool, _type: Type, account_name: String) -> HybridTransaction { HybridTransaction { id: id, date: date, @@ -91,39 +88,13 @@ impl HybridTransaction { parent_transaction_id: None, account_name: account_name, payee_name: None, - category_name: category_name, + category_name: None, } } } -/// The cleared status of the transaction -#[derive(Debug, Serialize, Deserialize)] -pub enum Cleared { - #[serde(rename = "cleared")] - Cleared, - #[serde(rename = "uncleared")] - Uncleared, - #[serde(rename = "reconciled")] - Reconciled, -} -/// The transaction flag -#[derive(Debug, Serialize, Deserialize)] -pub enum FlagColor { - #[serde(rename = "red")] - Red, - #[serde(rename = "orange")] - Orange, - #[serde(rename = "yellow")] - Yellow, - #[serde(rename = "green")] - Green, - #[serde(rename = "blue")] - Blue, - #[serde(rename = "purple")] - Purple, -} /// Whether the hybrid transaction represents a regular transaction or a subtransaction -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub enum Type { #[serde(rename = "transaction")] Transaction, diff --git a/src/models/hybrid_transaction_all_of.rs b/src/models/hybrid_transaction_all_of.rs index 42fd515..7092a71 100644 --- a/src/models/hybrid_transaction_all_of.rs +++ b/src/models/hybrid_transaction_all_of.rs @@ -9,40 +9,37 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct HybridTransactionAllOf { /// Whether the hybrid transaction represents a regular transaction or a subtransaction #[serde(rename = "type")] - pub _type: String, - /// For subtransaction types, this is the id of the pararent transaction. For transaction types, this id will be always be null. + pub _type: Type, + /// For subtransaction types, this is the id of the parent transaction. For transaction types, this id will be always be null. #[serde(rename = "parent_transaction_id", skip_serializing_if = "Option::is_none")] pub parent_transaction_id: Option, #[serde(rename = "account_name")] pub account_name: String, #[serde(rename = "payee_name", skip_serializing_if = "Option::is_none")] pub payee_name: Option, - #[serde(rename = "category_name")] - pub category_name: String, + #[serde(rename = "category_name", skip_serializing_if = "Option::is_none")] + pub category_name: Option, } impl HybridTransactionAllOf { - pub fn new(_type: String, account_name: String, category_name: String) -> HybridTransactionAllOf { + pub fn new(_type: Type, account_name: String) -> HybridTransactionAllOf { HybridTransactionAllOf { _type: _type, parent_transaction_id: None, account_name: account_name, payee_name: None, - category_name: category_name, + category_name: None, } } } /// Whether the hybrid transaction represents a regular transaction or a subtransaction -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub enum Type { #[serde(rename = "transaction")] Transaction, diff --git a/src/models/hybrid_transactions_response.rs b/src/models/hybrid_transactions_response.rs index 493582e..11926f7 100644 --- a/src/models/hybrid_transactions_response.rs +++ b/src/models/hybrid_transactions_response.rs @@ -9,18 +9,15 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct HybridTransactionsResponse { #[serde(rename = "data")] - pub data: ::models::HybridTransactionsResponseData, + pub data: crate::models::HybridTransactionsResponseData, } impl HybridTransactionsResponse { - pub fn new(data: ::models::HybridTransactionsResponseData) -> HybridTransactionsResponse { + pub fn new(data: crate::models::HybridTransactionsResponseData) -> HybridTransactionsResponse { HybridTransactionsResponse { data: data, } diff --git a/src/models/hybrid_transactions_response_data.rs b/src/models/hybrid_transactions_response_data.rs index 8e329e4..b0b8143 100644 --- a/src/models/hybrid_transactions_response_data.rs +++ b/src/models/hybrid_transactions_response_data.rs @@ -9,18 +9,15 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct HybridTransactionsResponseData { #[serde(rename = "transactions")] - pub transactions: Vec<::models::HybridTransaction>, + pub transactions: Vec, } impl HybridTransactionsResponseData { - pub fn new(transactions: Vec<::models::HybridTransaction>) -> HybridTransactionsResponseData { + pub fn new(transactions: Vec) -> HybridTransactionsResponseData { HybridTransactionsResponseData { transactions: transactions, } diff --git a/src/models/mod.rs b/src/models/mod.rs index ba8b351..45b8f62 100644 --- a/src/models/mod.rs +++ b/src/models/mod.rs @@ -154,10 +154,8 @@ mod transactions_response_data; pub use self::transactions_response_data::TransactionsResponseData; mod update_transaction; pub use self::update_transaction::UpdateTransaction; -mod update_transaction_wrapper; -pub use self::update_transaction_wrapper::UpdateTransactionWrapper; -mod update_transactions_response; -pub use self::update_transactions_response::UpdateTransactionsResponse; +mod update_transaction_all_of; +pub use self::update_transaction_all_of::UpdateTransactionAllOf; mod update_transactions_wrapper; pub use self::update_transactions_wrapper::UpdateTransactionsWrapper; mod user; diff --git a/src/models/month_detail.rs b/src/models/month_detail.rs index a6f55d4..28b6d56 100644 --- a/src/models/month_detail.rs +++ b/src/models/month_detail.rs @@ -9,11 +9,8 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct MonthDetail { #[serde(rename = "month")] pub month: String, @@ -39,11 +36,11 @@ pub struct MonthDetail { pub deleted: bool, /// The budget month categories. Amounts (budgeted, activity, balance, etc.) are specific to the {month} parameter specified. #[serde(rename = "categories")] - pub categories: Vec<::models::Category>, + pub categories: Vec, } impl MonthDetail { - pub fn new(month: String, income: i64, budgeted: i64, activity: i64, to_be_budgeted: i64, deleted: bool, categories: Vec<::models::Category>) -> MonthDetail { + pub fn new(month: String, income: i64, budgeted: i64, activity: i64, to_be_budgeted: i64, deleted: bool, categories: Vec) -> MonthDetail { MonthDetail { month: month, note: None, diff --git a/src/models/month_detail_all_of.rs b/src/models/month_detail_all_of.rs index 0f07326..a805bba 100644 --- a/src/models/month_detail_all_of.rs +++ b/src/models/month_detail_all_of.rs @@ -9,19 +9,16 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct MonthDetailAllOf { /// The budget month categories. Amounts (budgeted, activity, balance, etc.) are specific to the {month} parameter specified. #[serde(rename = "categories")] - pub categories: Vec<::models::Category>, + pub categories: Vec, } impl MonthDetailAllOf { - pub fn new(categories: Vec<::models::Category>) -> MonthDetailAllOf { + pub fn new(categories: Vec) -> MonthDetailAllOf { MonthDetailAllOf { categories: categories, } diff --git a/src/models/month_detail_response.rs b/src/models/month_detail_response.rs index c144afb..9c6d3b9 100644 --- a/src/models/month_detail_response.rs +++ b/src/models/month_detail_response.rs @@ -9,18 +9,15 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct MonthDetailResponse { #[serde(rename = "data")] - pub data: ::models::MonthDetailResponseData, + pub data: crate::models::MonthDetailResponseData, } impl MonthDetailResponse { - pub fn new(data: ::models::MonthDetailResponseData) -> MonthDetailResponse { + pub fn new(data: crate::models::MonthDetailResponseData) -> MonthDetailResponse { MonthDetailResponse { data: data, } diff --git a/src/models/month_detail_response_data.rs b/src/models/month_detail_response_data.rs index 0948763..3a60eb5 100644 --- a/src/models/month_detail_response_data.rs +++ b/src/models/month_detail_response_data.rs @@ -9,18 +9,15 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct MonthDetailResponseData { #[serde(rename = "month")] - pub month: ::models::MonthDetail, + pub month: crate::models::MonthDetail, } impl MonthDetailResponseData { - pub fn new(month: ::models::MonthDetail) -> MonthDetailResponseData { + pub fn new(month: crate::models::MonthDetail) -> MonthDetailResponseData { MonthDetailResponseData { month: month, } diff --git a/src/models/month_summaries_response.rs b/src/models/month_summaries_response.rs index 44d5d66..7158753 100644 --- a/src/models/month_summaries_response.rs +++ b/src/models/month_summaries_response.rs @@ -9,18 +9,15 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct MonthSummariesResponse { #[serde(rename = "data")] - pub data: ::models::MonthSummariesResponseData, + pub data: crate::models::MonthSummariesResponseData, } impl MonthSummariesResponse { - pub fn new(data: ::models::MonthSummariesResponseData) -> MonthSummariesResponse { + pub fn new(data: crate::models::MonthSummariesResponseData) -> MonthSummariesResponse { MonthSummariesResponse { data: data, } diff --git a/src/models/month_summaries_response_data.rs b/src/models/month_summaries_response_data.rs index 6237601..03ed9d5 100644 --- a/src/models/month_summaries_response_data.rs +++ b/src/models/month_summaries_response_data.rs @@ -9,21 +9,18 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct MonthSummariesResponseData { #[serde(rename = "months")] - pub months: Vec<::models::MonthSummary>, + pub months: Vec, /// The knowledge of the server #[serde(rename = "server_knowledge")] pub server_knowledge: i64, } impl MonthSummariesResponseData { - pub fn new(months: Vec<::models::MonthSummary>, server_knowledge: i64) -> MonthSummariesResponseData { + pub fn new(months: Vec, server_knowledge: i64) -> MonthSummariesResponseData { MonthSummariesResponseData { months: months, server_knowledge: server_knowledge, diff --git a/src/models/month_summary.rs b/src/models/month_summary.rs index 3c705d3..f1efaee 100644 --- a/src/models/month_summary.rs +++ b/src/models/month_summary.rs @@ -9,11 +9,8 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct MonthSummary { #[serde(rename = "month")] pub month: String, diff --git a/src/models/payee.rs b/src/models/payee.rs index 13ad103..0f17785 100644 --- a/src/models/payee.rs +++ b/src/models/payee.rs @@ -9,11 +9,8 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct Payee { #[serde(rename = "id")] pub id: String, diff --git a/src/models/payee_location.rs b/src/models/payee_location.rs index afb050e..e40eea2 100644 --- a/src/models/payee_location.rs +++ b/src/models/payee_location.rs @@ -9,11 +9,8 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct PayeeLocation { #[serde(rename = "id")] pub id: String, diff --git a/src/models/payee_location_response.rs b/src/models/payee_location_response.rs index e6d2608..66e2698 100644 --- a/src/models/payee_location_response.rs +++ b/src/models/payee_location_response.rs @@ -9,18 +9,15 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct PayeeLocationResponse { #[serde(rename = "data")] - pub data: ::models::PayeeLocationResponseData, + pub data: crate::models::PayeeLocationResponseData, } impl PayeeLocationResponse { - pub fn new(data: ::models::PayeeLocationResponseData) -> PayeeLocationResponse { + pub fn new(data: crate::models::PayeeLocationResponseData) -> PayeeLocationResponse { PayeeLocationResponse { data: data, } diff --git a/src/models/payee_location_response_data.rs b/src/models/payee_location_response_data.rs index 869c4ea..0da3992 100644 --- a/src/models/payee_location_response_data.rs +++ b/src/models/payee_location_response_data.rs @@ -9,18 +9,15 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct PayeeLocationResponseData { #[serde(rename = "payee_location")] - pub payee_location: ::models::PayeeLocation, + pub payee_location: crate::models::PayeeLocation, } impl PayeeLocationResponseData { - pub fn new(payee_location: ::models::PayeeLocation) -> PayeeLocationResponseData { + pub fn new(payee_location: crate::models::PayeeLocation) -> PayeeLocationResponseData { PayeeLocationResponseData { payee_location: payee_location, } diff --git a/src/models/payee_locations_response.rs b/src/models/payee_locations_response.rs index 916a19e..ab05f6e 100644 --- a/src/models/payee_locations_response.rs +++ b/src/models/payee_locations_response.rs @@ -9,18 +9,15 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct PayeeLocationsResponse { #[serde(rename = "data")] - pub data: ::models::PayeeLocationsResponseData, + pub data: crate::models::PayeeLocationsResponseData, } impl PayeeLocationsResponse { - pub fn new(data: ::models::PayeeLocationsResponseData) -> PayeeLocationsResponse { + pub fn new(data: crate::models::PayeeLocationsResponseData) -> PayeeLocationsResponse { PayeeLocationsResponse { data: data, } diff --git a/src/models/payee_locations_response_data.rs b/src/models/payee_locations_response_data.rs index ea46038..32e061d 100644 --- a/src/models/payee_locations_response_data.rs +++ b/src/models/payee_locations_response_data.rs @@ -9,18 +9,15 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct PayeeLocationsResponseData { #[serde(rename = "payee_locations")] - pub payee_locations: Vec<::models::PayeeLocation>, + pub payee_locations: Vec, } impl PayeeLocationsResponseData { - pub fn new(payee_locations: Vec<::models::PayeeLocation>) -> PayeeLocationsResponseData { + pub fn new(payee_locations: Vec) -> PayeeLocationsResponseData { PayeeLocationsResponseData { payee_locations: payee_locations, } diff --git a/src/models/payee_response.rs b/src/models/payee_response.rs index 690913a..650c90d 100644 --- a/src/models/payee_response.rs +++ b/src/models/payee_response.rs @@ -9,18 +9,15 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct PayeeResponse { #[serde(rename = "data")] - pub data: ::models::PayeeResponseData, + pub data: crate::models::PayeeResponseData, } impl PayeeResponse { - pub fn new(data: ::models::PayeeResponseData) -> PayeeResponse { + pub fn new(data: crate::models::PayeeResponseData) -> PayeeResponse { PayeeResponse { data: data, } diff --git a/src/models/payee_response_data.rs b/src/models/payee_response_data.rs index f19f7ea..ff8e342 100644 --- a/src/models/payee_response_data.rs +++ b/src/models/payee_response_data.rs @@ -9,18 +9,15 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct PayeeResponseData { #[serde(rename = "payee")] - pub payee: ::models::Payee, + pub payee: crate::models::Payee, } impl PayeeResponseData { - pub fn new(payee: ::models::Payee) -> PayeeResponseData { + pub fn new(payee: crate::models::Payee) -> PayeeResponseData { PayeeResponseData { payee: payee, } diff --git a/src/models/payees_response.rs b/src/models/payees_response.rs index dba96f3..bd6d6e1 100644 --- a/src/models/payees_response.rs +++ b/src/models/payees_response.rs @@ -9,18 +9,15 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct PayeesResponse { #[serde(rename = "data")] - pub data: ::models::PayeesResponseData, + pub data: crate::models::PayeesResponseData, } impl PayeesResponse { - pub fn new(data: ::models::PayeesResponseData) -> PayeesResponse { + pub fn new(data: crate::models::PayeesResponseData) -> PayeesResponse { PayeesResponse { data: data, } diff --git a/src/models/payees_response_data.rs b/src/models/payees_response_data.rs index 4897b15..efa3313 100644 --- a/src/models/payees_response_data.rs +++ b/src/models/payees_response_data.rs @@ -9,21 +9,18 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct PayeesResponseData { #[serde(rename = "payees")] - pub payees: Vec<::models::Payee>, + pub payees: Vec, /// The knowledge of the server #[serde(rename = "server_knowledge")] pub server_knowledge: i64, } impl PayeesResponseData { - pub fn new(payees: Vec<::models::Payee>, server_knowledge: i64) -> PayeesResponseData { + pub fn new(payees: Vec, server_knowledge: i64) -> PayeesResponseData { PayeesResponseData { payees: payees, server_knowledge: server_knowledge, diff --git a/src/models/save_category_response.rs b/src/models/save_category_response.rs index 37744c1..3d33509 100644 --- a/src/models/save_category_response.rs +++ b/src/models/save_category_response.rs @@ -9,18 +9,15 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct SaveCategoryResponse { #[serde(rename = "data")] - pub data: ::models::SaveCategoryResponseData, + pub data: crate::models::SaveCategoryResponseData, } impl SaveCategoryResponse { - pub fn new(data: ::models::SaveCategoryResponseData) -> SaveCategoryResponse { + pub fn new(data: crate::models::SaveCategoryResponseData) -> SaveCategoryResponse { SaveCategoryResponse { data: data, } diff --git a/src/models/save_category_response_data.rs b/src/models/save_category_response_data.rs index b61b206..536ba30 100644 --- a/src/models/save_category_response_data.rs +++ b/src/models/save_category_response_data.rs @@ -9,21 +9,18 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct SaveCategoryResponseData { #[serde(rename = "category")] - pub category: ::models::Category, + pub category: crate::models::Category, /// The knowledge of the server #[serde(rename = "server_knowledge")] pub server_knowledge: i64, } impl SaveCategoryResponseData { - pub fn new(category: ::models::Category, server_knowledge: i64) -> SaveCategoryResponseData { + pub fn new(category: crate::models::Category, server_knowledge: i64) -> SaveCategoryResponseData { SaveCategoryResponseData { category: category, server_knowledge: server_knowledge, diff --git a/src/models/save_month_category.rs b/src/models/save_month_category.rs index 40d1b2e..e2862eb 100644 --- a/src/models/save_month_category.rs +++ b/src/models/save_month_category.rs @@ -9,11 +9,8 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct SaveMonthCategory { /// Budgeted amount in milliunits format #[serde(rename = "budgeted")] diff --git a/src/models/save_month_category_wrapper.rs b/src/models/save_month_category_wrapper.rs index ef67116..ddd7154 100644 --- a/src/models/save_month_category_wrapper.rs +++ b/src/models/save_month_category_wrapper.rs @@ -9,18 +9,15 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct SaveMonthCategoryWrapper { #[serde(rename = "category")] - pub category: ::models::SaveMonthCategory, + pub category: crate::models::SaveMonthCategory, } impl SaveMonthCategoryWrapper { - pub fn new(category: ::models::SaveMonthCategory) -> SaveMonthCategoryWrapper { + pub fn new(category: crate::models::SaveMonthCategory) -> SaveMonthCategoryWrapper { SaveMonthCategoryWrapper { category: category, } diff --git a/src/models/save_transaction.rs b/src/models/save_transaction.rs index c2fc6b7..a864007 100644 --- a/src/models/save_transaction.rs +++ b/src/models/save_transaction.rs @@ -9,11 +9,8 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct SaveTransaction { #[serde(rename = "account_id")] pub account_id: String, @@ -23,7 +20,7 @@ pub struct SaveTransaction { /// The transaction amount in milliunits format. Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored. #[serde(rename = "amount")] pub amount: i64, - /// The payee for the transaction + /// 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. #[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")] pub payee_id: Option, /// The payee name. If a payee_name value is provided and payee_id has a null value, the payee_name value will be used to resolve the payee by either (1) a matching payee rename rule (only if import_id is also specified) or (2) a payee with the same name or (3) creation of a new payee. @@ -43,7 +40,7 @@ pub struct SaveTransaction { /// The transaction flag #[serde(rename = "flag_color", skip_serializing_if = "Option::is_none")] pub flag_color: Option, - /// If specified, the new transaction will be assigned this import_id and considered \"imported\". *At the time of import* we will attempt to match \"imported\" transactions with non-imported (i.e. \"user-entered\") transactions.

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

If import_id is omitted or specified as null, the transaction will be treated as a \"user-entered\" transaction. As such, it will be eligible to be matched against transactions later being imported (via DI, FBI, or API). + /// 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, } @@ -66,30 +63,4 @@ impl SaveTransaction { } } -/// The cleared status of the transaction -#[derive(Debug, Serialize, Deserialize)] -pub enum Cleared { - #[serde(rename = "cleared")] - Cleared, - #[serde(rename = "uncleared")] - Uncleared, - #[serde(rename = "reconciled")] - Reconciled, -} -/// The transaction flag -#[derive(Debug, Serialize, Deserialize)] -pub enum FlagColor { - #[serde(rename = "red")] - Red, - #[serde(rename = "orange")] - Orange, - #[serde(rename = "yellow")] - Yellow, - #[serde(rename = "green")] - Green, - #[serde(rename = "blue")] - Blue, - #[serde(rename = "purple")] - Purple, -} diff --git a/src/models/save_transaction_wrapper.rs b/src/models/save_transaction_wrapper.rs index 71bc7cd..8152229 100644 --- a/src/models/save_transaction_wrapper.rs +++ b/src/models/save_transaction_wrapper.rs @@ -9,18 +9,15 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct SaveTransactionWrapper { #[serde(rename = "transaction")] - pub transaction: ::models::SaveTransaction, + pub transaction: crate::models::SaveTransaction, } impl SaveTransactionWrapper { - pub fn new(transaction: ::models::SaveTransaction) -> SaveTransactionWrapper { + pub fn new(transaction: crate::models::SaveTransaction) -> SaveTransactionWrapper { SaveTransactionWrapper { transaction: transaction, } diff --git a/src/models/save_transactions_response.rs b/src/models/save_transactions_response.rs index be0782c..9617ee3 100644 --- a/src/models/save_transactions_response.rs +++ b/src/models/save_transactions_response.rs @@ -9,18 +9,15 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct SaveTransactionsResponse { #[serde(rename = "data")] - pub data: ::models::SaveTransactionsResponseData, + pub data: crate::models::SaveTransactionsResponseData, } impl SaveTransactionsResponse { - pub fn new(data: ::models::SaveTransactionsResponseData) -> SaveTransactionsResponse { + pub fn new(data: crate::models::SaveTransactionsResponseData) -> SaveTransactionsResponse { SaveTransactionsResponse { data: data, } diff --git a/src/models/save_transactions_response_data.rs b/src/models/save_transactions_response_data.rs index 0086874..0b76b5e 100644 --- a/src/models/save_transactions_response_data.rs +++ b/src/models/save_transactions_response_data.rs @@ -9,20 +9,17 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct SaveTransactionsResponseData { /// The transaction ids that were saved #[serde(rename = "transaction_ids")] pub transaction_ids: Vec, #[serde(rename = "transaction", skip_serializing_if = "Option::is_none")] - pub transaction: Option<::models::TransactionDetail>, + pub transaction: Option, /// If multiple transactions were specified, the transactions that were saved #[serde(rename = "transactions", skip_serializing_if = "Option::is_none")] - pub transactions: Option>, + pub transactions: Option>, /// If multiple transactions were specified, a list of import_ids that were not created because of an existing import_id found on the same account #[serde(rename = "duplicate_import_ids", skip_serializing_if = "Option::is_none")] pub duplicate_import_ids: Option>, diff --git a/src/models/save_transactions_wrapper.rs b/src/models/save_transactions_wrapper.rs index ed49180..cb6613f 100644 --- a/src/models/save_transactions_wrapper.rs +++ b/src/models/save_transactions_wrapper.rs @@ -9,16 +9,13 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct SaveTransactionsWrapper { #[serde(rename = "transaction", skip_serializing_if = "Option::is_none")] - pub transaction: Option<::models::SaveTransaction>, + pub transaction: Option, #[serde(rename = "transactions", skip_serializing_if = "Option::is_none")] - pub transactions: Option>, + pub transactions: Option>, } impl SaveTransactionsWrapper { diff --git a/src/models/scheduled_sub_transaction.rs b/src/models/scheduled_sub_transaction.rs index dfc0aca..31a880f 100644 --- a/src/models/scheduled_sub_transaction.rs +++ b/src/models/scheduled_sub_transaction.rs @@ -9,11 +9,8 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct ScheduledSubTransaction { #[serde(rename = "id")] pub id: String, @@ -26,8 +23,8 @@ pub struct ScheduledSubTransaction { pub memo: Option, #[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")] pub payee_id: Option, - #[serde(rename = "category_id")] - pub category_id: String, + #[serde(rename = "category_id", skip_serializing_if = "Option::is_none")] + pub category_id: Option, /// If a transfer, the account_id which the scheduled subtransaction transfers to #[serde(rename = "transfer_account_id", skip_serializing_if = "Option::is_none")] pub transfer_account_id: Option, @@ -37,14 +34,14 @@ pub struct ScheduledSubTransaction { } impl ScheduledSubTransaction { - pub fn new(id: String, scheduled_transaction_id: String, amount: i64, category_id: String, deleted: bool) -> 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, memo: None, payee_id: None, - category_id: category_id, + category_id: None, transfer_account_id: None, deleted: deleted, } diff --git a/src/models/scheduled_transaction_detail.rs b/src/models/scheduled_transaction_detail.rs index d86ef25..d553329 100644 --- a/src/models/scheduled_transaction_detail.rs +++ b/src/models/scheduled_transaction_detail.rs @@ -9,11 +9,8 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct ScheduledTransactionDetail { #[serde(rename = "id")] pub id: String, @@ -31,14 +28,14 @@ pub struct ScheduledTransactionDetail { #[serde(rename = "memo", skip_serializing_if = "Option::is_none")] pub memo: Option, /// The scheduled transaction flag - #[serde(rename = "flag_color")] - pub flag_color: String, + #[serde(rename = "flag_color", skip_serializing_if = "Option::is_none")] + pub flag_color: Option, #[serde(rename = "account_id")] pub account_id: String, #[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")] pub payee_id: Option, - #[serde(rename = "category_id")] - pub category_id: String, + #[serde(rename = "category_id", skip_serializing_if = "Option::is_none")] + pub category_id: Option, /// If a transfer, the account_id which the scheduled transaction transfers to #[serde(rename = "transfer_account_id", skip_serializing_if = "Option::is_none")] pub transfer_account_id: Option, @@ -47,17 +44,17 @@ pub struct ScheduledTransactionDetail { pub deleted: bool, #[serde(rename = "account_name")] pub account_name: String, - #[serde(rename = "payee_name")] - pub payee_name: String, - #[serde(rename = "category_name")] - pub category_name: String, + #[serde(rename = "payee_name", skip_serializing_if = "Option::is_none")] + pub payee_name: Option, + #[serde(rename = "category_name", skip_serializing_if = "Option::is_none")] + pub category_name: Option, /// If a split scheduled transaction, the subtransactions. #[serde(rename = "subtransactions")] - pub subtransactions: Vec<::models::ScheduledSubTransaction>, + pub subtransactions: Vec, } impl ScheduledTransactionDetail { - pub fn new(id: String, date_first: String, date_next: String, frequency: String, amount: i64, flag_color: String, account_id: String, category_id: String, deleted: bool, account_name: String, payee_name: String, category_name: String, subtransactions: Vec<::models::ScheduledSubTransaction>) -> ScheduledTransactionDetail { + 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 { ScheduledTransactionDetail { id: id, date_first: date_first, @@ -65,64 +62,18 @@ impl ScheduledTransactionDetail { frequency: frequency, amount: amount, memo: None, - flag_color: flag_color, + flag_color: None, account_id: account_id, payee_id: None, - category_id: category_id, + category_id: None, transfer_account_id: None, deleted: deleted, account_name: account_name, - payee_name: payee_name, - category_name: category_name, + payee_name: None, + category_name: None, subtransactions: subtransactions, } } } -/// -#[derive(Debug, Serialize, Deserialize)] -pub enum Frequency { - #[serde(rename = "never")] - Never, - #[serde(rename = "daily")] - Daily, - #[serde(rename = "weekly")] - Weekly, - #[serde(rename = "everyOtherWeek")] - EveryOtherWeek, - #[serde(rename = "twiceAMonth")] - TwiceAMonth, - #[serde(rename = "every4Weeks")] - Every4Weeks, - #[serde(rename = "monthly")] - Monthly, - #[serde(rename = "everyOtherMonth")] - EveryOtherMonth, - #[serde(rename = "every3Months")] - Every3Months, - #[serde(rename = "every4Months")] - Every4Months, - #[serde(rename = "twiceAYear")] - TwiceAYear, - #[serde(rename = "yearly")] - Yearly, - #[serde(rename = "everyOtherYear")] - EveryOtherYear, -} -/// The scheduled transaction flag -#[derive(Debug, Serialize, Deserialize)] -pub enum FlagColor { - #[serde(rename = "red")] - Red, - #[serde(rename = "orange")] - Orange, - #[serde(rename = "yellow")] - Yellow, - #[serde(rename = "green")] - Green, - #[serde(rename = "blue")] - Blue, - #[serde(rename = "purple")] - Purple, -} diff --git a/src/models/scheduled_transaction_detail_all_of.rs b/src/models/scheduled_transaction_detail_all_of.rs index cf7e6c7..b977afd 100644 --- a/src/models/scheduled_transaction_detail_all_of.rs +++ b/src/models/scheduled_transaction_detail_all_of.rs @@ -9,29 +9,26 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct ScheduledTransactionDetailAllOf { #[serde(rename = "account_name")] pub account_name: String, - #[serde(rename = "payee_name")] - pub payee_name: String, - #[serde(rename = "category_name")] - pub category_name: String, + #[serde(rename = "payee_name", skip_serializing_if = "Option::is_none")] + pub payee_name: Option, + #[serde(rename = "category_name", skip_serializing_if = "Option::is_none")] + pub category_name: Option, /// If a split scheduled transaction, the subtransactions. #[serde(rename = "subtransactions")] - pub subtransactions: Vec<::models::ScheduledSubTransaction>, + pub subtransactions: Vec, } impl ScheduledTransactionDetailAllOf { - pub fn new(account_name: String, payee_name: String, category_name: String, subtransactions: Vec<::models::ScheduledSubTransaction>) -> ScheduledTransactionDetailAllOf { + pub fn new(account_name: String, subtransactions: Vec) -> ScheduledTransactionDetailAllOf { ScheduledTransactionDetailAllOf { account_name: account_name, - payee_name: payee_name, - category_name: category_name, + payee_name: None, + category_name: None, subtransactions: subtransactions, } } diff --git a/src/models/scheduled_transaction_response.rs b/src/models/scheduled_transaction_response.rs index 25286cd..232e09f 100644 --- a/src/models/scheduled_transaction_response.rs +++ b/src/models/scheduled_transaction_response.rs @@ -9,18 +9,15 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct ScheduledTransactionResponse { #[serde(rename = "data")] - pub data: ::models::ScheduledTransactionResponseData, + pub data: crate::models::ScheduledTransactionResponseData, } impl ScheduledTransactionResponse { - pub fn new(data: ::models::ScheduledTransactionResponseData) -> ScheduledTransactionResponse { + pub fn new(data: crate::models::ScheduledTransactionResponseData) -> ScheduledTransactionResponse { ScheduledTransactionResponse { data: data, } diff --git a/src/models/scheduled_transaction_response_data.rs b/src/models/scheduled_transaction_response_data.rs index 70db916..1cd7379 100644 --- a/src/models/scheduled_transaction_response_data.rs +++ b/src/models/scheduled_transaction_response_data.rs @@ -9,18 +9,15 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct ScheduledTransactionResponseData { #[serde(rename = "scheduled_transaction")] - pub scheduled_transaction: ::models::ScheduledTransactionDetail, + pub scheduled_transaction: crate::models::ScheduledTransactionDetail, } impl ScheduledTransactionResponseData { - pub fn new(scheduled_transaction: ::models::ScheduledTransactionDetail) -> ScheduledTransactionResponseData { + pub fn new(scheduled_transaction: crate::models::ScheduledTransactionDetail) -> ScheduledTransactionResponseData { ScheduledTransactionResponseData { scheduled_transaction: scheduled_transaction, } diff --git a/src/models/scheduled_transaction_summary.rs b/src/models/scheduled_transaction_summary.rs index 7966d2c..b70d53c 100644 --- a/src/models/scheduled_transaction_summary.rs +++ b/src/models/scheduled_transaction_summary.rs @@ -9,11 +9,8 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct ScheduledTransactionSummary { #[serde(rename = "id")] pub id: String, @@ -31,14 +28,14 @@ pub struct ScheduledTransactionSummary { #[serde(rename = "memo", skip_serializing_if = "Option::is_none")] pub memo: Option, /// The scheduled transaction flag - #[serde(rename = "flag_color")] - pub flag_color: String, + #[serde(rename = "flag_color", skip_serializing_if = "Option::is_none")] + pub flag_color: Option, #[serde(rename = "account_id")] pub account_id: String, #[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")] pub payee_id: Option, - #[serde(rename = "category_id")] - pub category_id: String, + #[serde(rename = "category_id", skip_serializing_if = "Option::is_none")] + pub category_id: Option, /// If a transfer, the account_id which the scheduled transaction transfers to #[serde(rename = "transfer_account_id", skip_serializing_if = "Option::is_none")] pub transfer_account_id: Option, @@ -48,7 +45,7 @@ pub struct ScheduledTransactionSummary { } impl ScheduledTransactionSummary { - pub fn new(id: String, date_first: String, date_next: String, frequency: String, amount: i64, flag_color: String, account_id: String, category_id: String, deleted: bool) -> ScheduledTransactionSummary { + pub fn new(id: String, date_first: String, date_next: String, frequency: String, amount: i64, account_id: String, deleted: bool) -> ScheduledTransactionSummary { ScheduledTransactionSummary { id: id, date_first: date_first, @@ -56,60 +53,14 @@ impl ScheduledTransactionSummary { frequency: frequency, amount: amount, memo: None, - flag_color: flag_color, + flag_color: None, account_id: account_id, payee_id: None, - category_id: category_id, + category_id: None, transfer_account_id: None, deleted: deleted, } } } -/// -#[derive(Debug, Serialize, Deserialize)] -pub enum Frequency { - #[serde(rename = "never")] - Never, - #[serde(rename = "daily")] - Daily, - #[serde(rename = "weekly")] - Weekly, - #[serde(rename = "everyOtherWeek")] - EveryOtherWeek, - #[serde(rename = "twiceAMonth")] - TwiceAMonth, - #[serde(rename = "every4Weeks")] - Every4Weeks, - #[serde(rename = "monthly")] - Monthly, - #[serde(rename = "everyOtherMonth")] - EveryOtherMonth, - #[serde(rename = "every3Months")] - Every3Months, - #[serde(rename = "every4Months")] - Every4Months, - #[serde(rename = "twiceAYear")] - TwiceAYear, - #[serde(rename = "yearly")] - Yearly, - #[serde(rename = "everyOtherYear")] - EveryOtherYear, -} -/// The scheduled transaction flag -#[derive(Debug, Serialize, Deserialize)] -pub enum FlagColor { - #[serde(rename = "red")] - Red, - #[serde(rename = "orange")] - Orange, - #[serde(rename = "yellow")] - Yellow, - #[serde(rename = "green")] - Green, - #[serde(rename = "blue")] - Blue, - #[serde(rename = "purple")] - Purple, -} diff --git a/src/models/scheduled_transactions_response.rs b/src/models/scheduled_transactions_response.rs index 8ff8378..77d4376 100644 --- a/src/models/scheduled_transactions_response.rs +++ b/src/models/scheduled_transactions_response.rs @@ -9,18 +9,15 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct ScheduledTransactionsResponse { #[serde(rename = "data")] - pub data: ::models::ScheduledTransactionsResponseData, + pub data: crate::models::ScheduledTransactionsResponseData, } impl ScheduledTransactionsResponse { - pub fn new(data: ::models::ScheduledTransactionsResponseData) -> ScheduledTransactionsResponse { + pub fn new(data: crate::models::ScheduledTransactionsResponseData) -> ScheduledTransactionsResponse { ScheduledTransactionsResponse { data: data, } diff --git a/src/models/scheduled_transactions_response_data.rs b/src/models/scheduled_transactions_response_data.rs index 71e5c79..a9072d4 100644 --- a/src/models/scheduled_transactions_response_data.rs +++ b/src/models/scheduled_transactions_response_data.rs @@ -9,21 +9,18 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct ScheduledTransactionsResponseData { #[serde(rename = "scheduled_transactions")] - pub scheduled_transactions: Vec<::models::ScheduledTransactionDetail>, + pub scheduled_transactions: Vec, /// The knowledge of the server #[serde(rename = "server_knowledge")] pub server_knowledge: i64, } impl ScheduledTransactionsResponseData { - pub fn new(scheduled_transactions: Vec<::models::ScheduledTransactionDetail>, server_knowledge: i64) -> ScheduledTransactionsResponseData { + pub fn new(scheduled_transactions: Vec, server_knowledge: i64) -> ScheduledTransactionsResponseData { ScheduledTransactionsResponseData { scheduled_transactions: scheduled_transactions, server_knowledge: server_knowledge, diff --git a/src/models/sub_transaction.rs b/src/models/sub_transaction.rs index 633ae38..639d5e7 100644 --- a/src/models/sub_transaction.rs +++ b/src/models/sub_transaction.rs @@ -9,11 +9,8 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct SubTransaction { #[serde(rename = "id")] pub id: String, diff --git a/src/models/transaction_detail.rs b/src/models/transaction_detail.rs index 956eae9..ca6be2e 100644 --- a/src/models/transaction_detail.rs +++ b/src/models/transaction_detail.rs @@ -9,11 +9,8 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct TransactionDetail { #[serde(rename = "id")] pub id: String, @@ -63,11 +60,11 @@ pub struct TransactionDetail { pub category_name: Option, /// If a split transaction, the subtransactions. #[serde(rename = "subtransactions")] - pub subtransactions: Vec<::models::SubTransaction>, + pub subtransactions: Vec, } impl TransactionDetail { - pub fn new(id: String, date: String, amount: i64, cleared: String, approved: bool, account_id: String, deleted: bool, account_name: String, subtransactions: Vec<::models::SubTransaction>) -> TransactionDetail { + pub fn new(id: String, date: String, amount: i64, cleared: String, approved: bool, account_id: String, deleted: bool, account_name: String, subtransactions: Vec) -> TransactionDetail { TransactionDetail { id: id, date: date, @@ -92,30 +89,4 @@ impl TransactionDetail { } } -/// The cleared status of the transaction -#[derive(Debug, Serialize, Deserialize)] -pub enum Cleared { - #[serde(rename = "cleared")] - Cleared, - #[serde(rename = "uncleared")] - Uncleared, - #[serde(rename = "reconciled")] - Reconciled, -} -/// The transaction flag -#[derive(Debug, Serialize, Deserialize)] -pub enum FlagColor { - #[serde(rename = "red")] - Red, - #[serde(rename = "orange")] - Orange, - #[serde(rename = "yellow")] - Yellow, - #[serde(rename = "green")] - Green, - #[serde(rename = "blue")] - Blue, - #[serde(rename = "purple")] - Purple, -} diff --git a/src/models/transaction_detail_all_of.rs b/src/models/transaction_detail_all_of.rs index cead8f5..68f2ebf 100644 --- a/src/models/transaction_detail_all_of.rs +++ b/src/models/transaction_detail_all_of.rs @@ -9,11 +9,8 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct TransactionDetailAllOf { #[serde(rename = "account_name")] pub account_name: String, @@ -23,11 +20,11 @@ pub struct TransactionDetailAllOf { pub category_name: Option, /// If a split transaction, the subtransactions. #[serde(rename = "subtransactions")] - pub subtransactions: Vec<::models::SubTransaction>, + pub subtransactions: Vec, } impl TransactionDetailAllOf { - pub fn new(account_name: String, subtransactions: Vec<::models::SubTransaction>) -> TransactionDetailAllOf { + pub fn new(account_name: String, subtransactions: Vec) -> TransactionDetailAllOf { TransactionDetailAllOf { account_name: account_name, payee_name: None, diff --git a/src/models/transaction_response.rs b/src/models/transaction_response.rs index cc65780..63ff8f1 100644 --- a/src/models/transaction_response.rs +++ b/src/models/transaction_response.rs @@ -9,18 +9,15 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct TransactionResponse { #[serde(rename = "data")] - pub data: ::models::TransactionResponseData, + pub data: crate::models::TransactionResponseData, } impl TransactionResponse { - pub fn new(data: ::models::TransactionResponseData) -> TransactionResponse { + pub fn new(data: crate::models::TransactionResponseData) -> TransactionResponse { TransactionResponse { data: data, } diff --git a/src/models/transaction_response_data.rs b/src/models/transaction_response_data.rs index 5f96108..e9af627 100644 --- a/src/models/transaction_response_data.rs +++ b/src/models/transaction_response_data.rs @@ -9,18 +9,15 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct TransactionResponseData { #[serde(rename = "transaction")] - pub transaction: ::models::TransactionDetail, + pub transaction: crate::models::TransactionDetail, } impl TransactionResponseData { - pub fn new(transaction: ::models::TransactionDetail) -> TransactionResponseData { + pub fn new(transaction: crate::models::TransactionDetail) -> TransactionResponseData { TransactionResponseData { transaction: transaction, } diff --git a/src/models/transaction_summary.rs b/src/models/transaction_summary.rs index 94ce164..9bf4cbd 100644 --- a/src/models/transaction_summary.rs +++ b/src/models/transaction_summary.rs @@ -9,11 +9,8 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct TransactionSummary { #[serde(rename = "id")] pub id: String, @@ -79,30 +76,4 @@ impl TransactionSummary { } } -/// The cleared status of the transaction -#[derive(Debug, Serialize, Deserialize)] -pub enum Cleared { - #[serde(rename = "cleared")] - Cleared, - #[serde(rename = "uncleared")] - Uncleared, - #[serde(rename = "reconciled")] - Reconciled, -} -/// The transaction flag -#[derive(Debug, Serialize, Deserialize)] -pub enum FlagColor { - #[serde(rename = "red")] - Red, - #[serde(rename = "orange")] - Orange, - #[serde(rename = "yellow")] - Yellow, - #[serde(rename = "green")] - Green, - #[serde(rename = "blue")] - Blue, - #[serde(rename = "purple")] - Purple, -} diff --git a/src/models/transactions_response.rs b/src/models/transactions_response.rs index cda3c1f..d3da899 100644 --- a/src/models/transactions_response.rs +++ b/src/models/transactions_response.rs @@ -9,18 +9,15 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct TransactionsResponse { #[serde(rename = "data")] - pub data: ::models::TransactionsResponseData, + pub data: crate::models::TransactionsResponseData, } impl TransactionsResponse { - pub fn new(data: ::models::TransactionsResponseData) -> TransactionsResponse { + pub fn new(data: crate::models::TransactionsResponseData) -> TransactionsResponse { TransactionsResponse { data: data, } diff --git a/src/models/transactions_response_data.rs b/src/models/transactions_response_data.rs index 4ac9438..7c10090 100644 --- a/src/models/transactions_response_data.rs +++ b/src/models/transactions_response_data.rs @@ -9,21 +9,18 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct TransactionsResponseData { #[serde(rename = "transactions")] - pub transactions: Vec<::models::TransactionDetail>, + pub transactions: Vec, /// The knowledge of the server #[serde(rename = "server_knowledge")] pub server_knowledge: i64, } impl TransactionsResponseData { - pub fn new(transactions: Vec<::models::TransactionDetail>, server_knowledge: i64) -> TransactionsResponseData { + pub fn new(transactions: Vec, server_knowledge: i64) -> TransactionsResponseData { TransactionsResponseData { transactions: transactions, server_knowledge: server_knowledge, diff --git a/src/models/update_transaction.rs b/src/models/update_transaction.rs index 5e93837..d14c8d4 100644 --- a/src/models/update_transaction.rs +++ b/src/models/update_transaction.rs @@ -9,14 +9,11 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct UpdateTransaction { - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, + #[serde(rename = "id")] + pub id: String, #[serde(rename = "account_id")] pub account_id: String, /// The transaction date in ISO format (e.g. 2016-12-01). Future dates (scheduled transactions) are not permitted. Split transaction dates cannot be changed and if a different date is supplied it will be ignored. @@ -25,7 +22,7 @@ pub struct UpdateTransaction { /// The transaction amount in milliunits format. Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored. #[serde(rename = "amount")] pub amount: i64, - /// The payee for the transaction + /// 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. #[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")] pub payee_id: Option, /// The payee name. If a payee_name value is provided and payee_id has a null value, the payee_name value will be used to resolve the payee by either (1) a matching payee rename rule (only if import_id is also specified) or (2) a payee with the same name or (3) creation of a new payee. @@ -45,15 +42,15 @@ pub struct UpdateTransaction { /// The transaction flag #[serde(rename = "flag_color", skip_serializing_if = "Option::is_none")] pub flag_color: Option, - /// If specified, the new transaction will be assigned this import_id and considered \"imported\". *At the time of import* we will attempt to match \"imported\" transactions with non-imported (i.e. \"user-entered\") transactions.

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

If import_id is omitted or specified as null, the transaction will be treated as a \"user-entered\" transaction. As such, it will be eligible to be matched against transactions later being imported (via DI, FBI, or API). + /// 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, } impl UpdateTransaction { - pub fn new(account_id: String, date: String, amount: i64) -> UpdateTransaction { + pub fn new(id: String, account_id: String, date: String, amount: i64) -> UpdateTransaction { UpdateTransaction { - id: None, + id: id, account_id: account_id, date: date, amount: amount, @@ -69,30 +66,4 @@ impl UpdateTransaction { } } -/// The cleared status of the transaction -#[derive(Debug, Serialize, Deserialize)] -pub enum Cleared { - #[serde(rename = "cleared")] - Cleared, - #[serde(rename = "uncleared")] - Uncleared, - #[serde(rename = "reconciled")] - Reconciled, -} -/// The transaction flag -#[derive(Debug, Serialize, Deserialize)] -pub enum FlagColor { - #[serde(rename = "red")] - Red, - #[serde(rename = "orange")] - Orange, - #[serde(rename = "yellow")] - Yellow, - #[serde(rename = "green")] - Green, - #[serde(rename = "blue")] - Blue, - #[serde(rename = "purple")] - Purple, -} diff --git a/src/models/update_transaction_all_of.rs b/src/models/update_transaction_all_of.rs new file mode 100644 index 0000000..774cc3f --- /dev/null +++ b/src/models/update_transaction_all_of.rs @@ -0,0 +1,27 @@ +/* + * YNAB API Endpoints + * + * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + + +#[derive(Debug, PartialEq, Serialize, Deserialize)] +pub struct UpdateTransactionAllOf { + #[serde(rename = "id")] + pub id: String, +} + +impl UpdateTransactionAllOf { + pub fn new(id: String) -> UpdateTransactionAllOf { + UpdateTransactionAllOf { + id: id, + } + } +} + + diff --git a/src/models/update_transaction_wrapper.rs b/src/models/update_transaction_wrapper.rs deleted file mode 100644 index 5c34fbb..0000000 --- a/src/models/update_transaction_wrapper.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * YNAB API Endpoints - * - * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct UpdateTransactionWrapper { - #[serde(rename = "transaction")] - pub transaction: ::models::UpdateTransaction, -} - -impl UpdateTransactionWrapper { - pub fn new(transaction: ::models::UpdateTransaction) -> UpdateTransactionWrapper { - UpdateTransactionWrapper { - transaction: transaction, - } - } -} - - diff --git a/src/models/update_transactions_response.rs b/src/models/update_transactions_response.rs deleted file mode 100644 index c56d2b3..0000000 --- a/src/models/update_transactions_response.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * YNAB API Endpoints - * - * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://openapi-generator.tech - */ - - -#[allow(unused_imports)] -use serde_json::Value; - - -#[derive(Debug, Serialize, Deserialize)] -pub struct UpdateTransactionsResponse { - #[serde(rename = "data")] - pub data: ::models::SaveTransactionsResponseData, -} - -impl UpdateTransactionsResponse { - pub fn new(data: ::models::SaveTransactionsResponseData) -> UpdateTransactionsResponse { - UpdateTransactionsResponse { - data: data, - } - } -} - - diff --git a/src/models/update_transactions_wrapper.rs b/src/models/update_transactions_wrapper.rs index 810d054..fde9957 100644 --- a/src/models/update_transactions_wrapper.rs +++ b/src/models/update_transactions_wrapper.rs @@ -9,23 +9,17 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct UpdateTransactionsWrapper { - #[serde(rename = "transaction", skip_serializing_if = "Option::is_none")] - pub transaction: Option<::models::UpdateTransaction>, - #[serde(rename = "transactions", skip_serializing_if = "Option::is_none")] - pub transactions: Option>, + #[serde(rename = "transactions")] + pub transactions: Vec, } impl UpdateTransactionsWrapper { - pub fn new() -> UpdateTransactionsWrapper { + pub fn new(transactions: Vec) -> UpdateTransactionsWrapper { UpdateTransactionsWrapper { - transaction: None, - transactions: None, + transactions: transactions, } } } diff --git a/src/models/user.rs b/src/models/user.rs index 8143284..6ff89bb 100644 --- a/src/models/user.rs +++ b/src/models/user.rs @@ -9,11 +9,8 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct User { #[serde(rename = "id")] pub id: String, diff --git a/src/models/user_response.rs b/src/models/user_response.rs index e2427e0..cfa6be1 100644 --- a/src/models/user_response.rs +++ b/src/models/user_response.rs @@ -9,18 +9,15 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct UserResponse { #[serde(rename = "data")] - pub data: ::models::UserResponseData, + pub data: crate::models::UserResponseData, } impl UserResponse { - pub fn new(data: ::models::UserResponseData) -> UserResponse { + pub fn new(data: crate::models::UserResponseData) -> UserResponse { UserResponse { data: data, } diff --git a/src/models/user_response_data.rs b/src/models/user_response_data.rs index 9fc30f8..90c300f 100644 --- a/src/models/user_response_data.rs +++ b/src/models/user_response_data.rs @@ -9,18 +9,15 @@ */ -#[allow(unused_imports)] -use serde_json::Value; - -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, PartialEq, Serialize, Deserialize)] pub struct UserResponseData { #[serde(rename = "user")] - pub user: ::models::User, + pub user: crate::models::User, } impl UserResponseData { - pub fn new(user: ::models::User) -> UserResponseData { + pub fn new(user: crate::models::User) -> UserResponseData { UserResponseData { user: user, } -- cgit v1.2.3