aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-08-09 02:06:22 -0400
committerJesse Luehrs <doy@tozt.net>2019-08-09 02:52:44 -0400
commitfaf9c8aa1e41df1889f8382e9c2183e2d5f85de1 (patch)
tree0e4218dd5c1d47735fd6324fb30a01c964aad781
parentd54b8f01ea9c253a326a9601f58a423a64ba8b4a (diff)
downloadynab-reimbursements-faf9c8aa1e41df1889f8382e9c2183e2d5f85de1.tar.gz
ynab-reimbursements-faf9c8aa1e41df1889f8382e9c2183e2d5f85de1.zip
add openapi-generated api client
-rw-r--r--ynab-api/.gitignore3
-rw-r--r--ynab-api/.openapi-generator-ignore23
-rw-r--r--ynab-api/.openapi-generator/VERSION1
-rw-r--r--ynab-api/.travis.yml1
-rw-r--r--ynab-api/Cargo.toml13
-rw-r--r--ynab-api/README.md150
-rw-r--r--ynab-api/docs/Account.md21
-rw-r--r--ynab-api/docs/AccountResponse.md11
-rw-r--r--ynab-api/docs/AccountResponseData.md11
-rw-r--r--ynab-api/docs/AccountsApi.md83
-rw-r--r--ynab-api/docs/AccountsResponse.md11
-rw-r--r--ynab-api/docs/AccountsResponseData.md12
-rw-r--r--ynab-api/docs/BudgetDetail.md27
-rw-r--r--ynab-api/docs/BudgetDetailAllOf.md20
-rw-r--r--ynab-api/docs/BudgetDetailResponse.md11
-rw-r--r--ynab-api/docs/BudgetDetailResponseData.md12
-rw-r--r--ynab-api/docs/BudgetSettings.md12
-rw-r--r--ynab-api/docs/BudgetSettingsResponse.md11
-rw-r--r--ynab-api/docs/BudgetSettingsResponseData.md11
-rw-r--r--ynab-api/docs/BudgetSummary.md17
-rw-r--r--ynab-api/docs/BudgetSummaryResponse.md11
-rw-r--r--ynab-api/docs/BudgetSummaryResponseData.md12
-rw-r--r--ynab-api/docs/BudgetsApi.md110
-rw-r--r--ynab-api/docs/BulkResponse.md11
-rw-r--r--ynab-api/docs/BulkResponseData.md11
-rw-r--r--ynab-api/docs/BulkResponseDataBulk.md12
-rw-r--r--ynab-api/docs/BulkTransactions.md11
-rw-r--r--ynab-api/docs/CategoriesApi.md152
-rw-r--r--ynab-api/docs/CategoriesResponse.md11
-rw-r--r--ynab-api/docs/CategoriesResponseData.md12
-rw-r--r--ynab-api/docs/Category.md25
-rw-r--r--ynab-api/docs/CategoryGroup.md14
-rw-r--r--ynab-api/docs/CategoryGroupWithCategories.md15
-rw-r--r--ynab-api/docs/CategoryGroupWithCategoriesAllOf.md11
-rw-r--r--ynab-api/docs/CategoryResponse.md11
-rw-r--r--ynab-api/docs/CategoryResponseData.md11
-rw-r--r--ynab-api/docs/CurrencyFormat.md18
-rw-r--r--ynab-api/docs/DateFormat.md11
-rw-r--r--ynab-api/docs/DeprecatedApi.md41
-rw-r--r--ynab-api/docs/ErrorDetail.md13
-rw-r--r--ynab-api/docs/ErrorResponse.md11
-rw-r--r--ynab-api/docs/HybridTransaction.md30
-rw-r--r--ynab-api/docs/HybridTransactionAllOf.md15
-rw-r--r--ynab-api/docs/HybridTransactionsResponse.md11
-rw-r--r--ynab-api/docs/HybridTransactionsResponseData.md11
-rw-r--r--ynab-api/docs/MonthDetail.md19
-rw-r--r--ynab-api/docs/MonthDetailAllOf.md11
-rw-r--r--ynab-api/docs/MonthDetailResponse.md11
-rw-r--r--ynab-api/docs/MonthDetailResponseData.md11
-rw-r--r--ynab-api/docs/MonthSummariesResponse.md11
-rw-r--r--ynab-api/docs/MonthSummariesResponseData.md12
-rw-r--r--ynab-api/docs/MonthSummary.md18
-rw-r--r--ynab-api/docs/MonthsApi.md83
-rw-r--r--ynab-api/docs/Payee.md14
-rw-r--r--ynab-api/docs/PayeeLocation.md15
-rw-r--r--ynab-api/docs/PayeeLocationResponse.md11
-rw-r--r--ynab-api/docs/PayeeLocationResponseData.md11
-rw-r--r--ynab-api/docs/PayeeLocationsApi.md106
-rw-r--r--ynab-api/docs/PayeeLocationsResponse.md11
-rw-r--r--ynab-api/docs/PayeeLocationsResponseData.md11
-rw-r--r--ynab-api/docs/PayeeResponse.md11
-rw-r--r--ynab-api/docs/PayeeResponseData.md11
-rw-r--r--ynab-api/docs/PayeesApi.md83
-rw-r--r--ynab-api/docs/PayeesResponse.md11
-rw-r--r--ynab-api/docs/PayeesResponseData.md12
-rw-r--r--ynab-api/docs/SaveCategoryResponse.md11
-rw-r--r--ynab-api/docs/SaveCategoryResponseData.md12
-rw-r--r--ynab-api/docs/SaveMonthCategory.md11
-rw-r--r--ynab-api/docs/SaveMonthCategoryWrapper.md11
-rw-r--r--ynab-api/docs/SaveTransaction.md21
-rw-r--r--ynab-api/docs/SaveTransactionWrapper.md11
-rw-r--r--ynab-api/docs/SaveTransactionsResponse.md11
-rw-r--r--ynab-api/docs/SaveTransactionsResponseData.md15
-rw-r--r--ynab-api/docs/SaveTransactionsWrapper.md12
-rw-r--r--ynab-api/docs/ScheduledSubTransaction.md18
-rw-r--r--ynab-api/docs/ScheduledTransactionDetail.md26
-rw-r--r--ynab-api/docs/ScheduledTransactionDetailAllOf.md14
-rw-r--r--ynab-api/docs/ScheduledTransactionResponse.md11
-rw-r--r--ynab-api/docs/ScheduledTransactionResponseData.md11
-rw-r--r--ynab-api/docs/ScheduledTransactionSummary.md22
-rw-r--r--ynab-api/docs/ScheduledTransactionsApi.md83
-rw-r--r--ynab-api/docs/ScheduledTransactionsResponse.md11
-rw-r--r--ynab-api/docs/ScheduledTransactionsResponseData.md12
-rw-r--r--ynab-api/docs/SubTransaction.md18
-rw-r--r--ynab-api/docs/TransactionDetail.md29
-rw-r--r--ynab-api/docs/TransactionDetailAllOf.md14
-rw-r--r--ynab-api/docs/TransactionResponse.md11
-rw-r--r--ynab-api/docs/TransactionResponseData.md11
-rw-r--r--ynab-api/docs/TransactionSummary.md25
-rw-r--r--ynab-api/docs/TransactionsApi.md323
-rw-r--r--ynab-api/docs/TransactionsResponse.md11
-rw-r--r--ynab-api/docs/TransactionsResponseData.md12
-rw-r--r--ynab-api/docs/User.md11
-rw-r--r--ynab-api/docs/UserApi.md36
-rw-r--r--ynab-api/docs/UserResponse.md11
-rw-r--r--ynab-api/docs/UserResponseData.md11
-rw-r--r--ynab-api/git_push.sh52
-rw-r--r--ynab-api/src/apis/accounts_api.rs87
-rw-r--r--ynab-api/src/apis/budgets_api.rs113
-rw-r--r--ynab-api/src/apis/categories_api.rs140
-rw-r--r--ynab-api/src/apis/client.rs78
-rw-r--r--ynab-api/src/apis/configuration.rs50
-rw-r--r--ynab-api/src/apis/deprecated_api.rs61
-rw-r--r--ynab-api/src/apis/mod.rs57
-rw-r--r--ynab-api/src/apis/months_api.rs87
-rw-r--r--ynab-api/src/apis/payee_locations_api.rs112
-rw-r--r--ynab-api/src/apis/payees_api.rs87
-rw-r--r--ynab-api/src/apis/scheduled_transactions_api.rs87
-rw-r--r--ynab-api/src/apis/transactions_api.rs257
-rw-r--r--ynab-api/src/apis/user_api.rs60
-rw-r--r--ynab-api/src/lib.rs10
-rw-r--r--ynab-api/src/models/account.rs94
-rw-r--r--ynab-api/src/models/account_response.rs30
-rw-r--r--ynab-api/src/models/account_response_data.rs30
-rw-r--r--ynab-api/src/models/accounts_response.rs30
-rw-r--r--ynab-api/src/models/accounts_response_data.rs34
-rw-r--r--ynab-api/src/models/budget_detail.rs81
-rw-r--r--ynab-api/src/models/budget_detail_all_of.rs57
-rw-r--r--ynab-api/src/models/budget_detail_response.rs30
-rw-r--r--ynab-api/src/models/budget_detail_response_data.rs34
-rw-r--r--ynab-api/src/models/budget_settings.rs33
-rw-r--r--ynab-api/src/models/budget_settings_response.rs30
-rw-r--r--ynab-api/src/models/budget_settings_response_data.rs30
-rw-r--r--ynab-api/src/models/budget_summary.rs51
-rw-r--r--ynab-api/src/models/budget_summary_response.rs30
-rw-r--r--ynab-api/src/models/budget_summary_response_data.rs33
-rw-r--r--ynab-api/src/models/bulk_response.rs30
-rw-r--r--ynab-api/src/models/bulk_response_data.rs30
-rw-r--r--ynab-api/src/models/bulk_response_data_bulk.rs35
-rw-r--r--ynab-api/src/models/bulk_transactions.rs30
-rw-r--r--ynab-api/src/models/categories_response.rs30
-rw-r--r--ynab-api/src/models/categories_response_data.rs34
-rw-r--r--ynab-api/src/models/category.rs93
-rw-r--r--ynab-api/src/models/category_group.rs41
-rw-r--r--ynab-api/src/models/category_group_with_categories.rs45
-rw-r--r--ynab-api/src/models/category_group_with_categories_all_of.rs31
-rw-r--r--ynab-api/src/models/category_response.rs30
-rw-r--r--ynab-api/src/models/category_response_data.rs30
-rw-r--r--ynab-api/src/models/currency_format.rs53
-rw-r--r--ynab-api/src/models/date_format.rs32
-rw-r--r--ynab-api/src/models/error_detail.rs36
-rw-r--r--ynab-api/src/models/error_response.rs30
-rw-r--r--ynab-api/src/models/hybrid_transaction.rs133
-rw-r--r--ynab-api/src/models/hybrid_transaction_all_of.rs52
-rw-r--r--ynab-api/src/models/hybrid_transactions_response.rs30
-rw-r--r--ynab-api/src/models/hybrid_transactions_response_data.rs30
-rw-r--r--ynab-api/src/models/mod.rs160
-rw-r--r--ynab-api/src/models/month_detail.rs61
-rw-r--r--ynab-api/src/models/month_detail_all_of.rs31
-rw-r--r--ynab-api/src/models/month_detail_response.rs30
-rw-r--r--ynab-api/src/models/month_detail_response_data.rs30
-rw-r--r--ynab-api/src/models/month_summaries_response.rs30
-rw-r--r--ynab-api/src/models/month_summaries_response_data.rs34
-rw-r--r--ynab-api/src/models/month_summary.rs57
-rw-r--r--ynab-api/src/models/payee.rs41
-rw-r--r--ynab-api/src/models/payee_location.rs43
-rw-r--r--ynab-api/src/models/payee_location_response.rs30
-rw-r--r--ynab-api/src/models/payee_location_response_data.rs30
-rw-r--r--ynab-api/src/models/payee_locations_response.rs30
-rw-r--r--ynab-api/src/models/payee_locations_response_data.rs30
-rw-r--r--ynab-api/src/models/payee_response.rs30
-rw-r--r--ynab-api/src/models/payee_response_data.rs30
-rw-r--r--ynab-api/src/models/payees_response.rs30
-rw-r--r--ynab-api/src/models/payees_response_data.rs34
-rw-r--r--ynab-api/src/models/save_category_response.rs30
-rw-r--r--ynab-api/src/models/save_category_response_data.rs34
-rw-r--r--ynab-api/src/models/save_month_category.rs31
-rw-r--r--ynab-api/src/models/save_month_category_wrapper.rs30
-rw-r--r--ynab-api/src/models/save_transaction.rs95
-rw-r--r--ynab-api/src/models/save_transaction_wrapper.rs30
-rw-r--r--ynab-api/src/models/save_transactions_response.rs30
-rw-r--r--ynab-api/src/models/save_transactions_response_data.rs46
-rw-r--r--ynab-api/src/models/save_transactions_wrapper.rs33
-rw-r--r--ynab-api/src/models/scheduled_sub_transaction.rs54
-rw-r--r--ynab-api/src/models/scheduled_transaction_detail.rs128
-rw-r--r--ynab-api/src/models/scheduled_transaction_detail_all_of.rs40
-rw-r--r--ynab-api/src/models/scheduled_transaction_response.rs30
-rw-r--r--ynab-api/src/models/scheduled_transaction_response_data.rs30
-rw-r--r--ynab-api/src/models/scheduled_transaction_summary.rs115
-rw-r--r--ynab-api/src/models/scheduled_transactions_response.rs30
-rw-r--r--ynab-api/src/models/scheduled_transactions_response_data.rs34
-rw-r--r--ynab-api/src/models/sub_transaction.rs54
-rw-r--r--ynab-api/src/models/transaction_detail.rs121
-rw-r--r--ynab-api/src/models/transaction_detail_all_of.rs40
-rw-r--r--ynab-api/src/models/transaction_response.rs30
-rw-r--r--ynab-api/src/models/transaction_response_data.rs30
-rw-r--r--ynab-api/src/models/transaction_summary.rs108
-rw-r--r--ynab-api/src/models/transactions_response.rs30
-rw-r--r--ynab-api/src/models/transactions_response_data.rs34
-rw-r--r--ynab-api/src/models/user.rs30
-rw-r--r--ynab-api/src/models/user_response.rs30
-rw-r--r--ynab-api/src/models/user_response_data.rs30
192 files changed, 7329 insertions, 0 deletions
diff --git a/ynab-api/.gitignore b/ynab-api/.gitignore
new file mode 100644
index 0000000..6aa1064
--- /dev/null
+++ b/ynab-api/.gitignore
@@ -0,0 +1,3 @@
+/target/
+**/*.rs.bk
+Cargo.lock
diff --git a/ynab-api/.openapi-generator-ignore b/ynab-api/.openapi-generator-ignore
new file mode 100644
index 0000000..7484ee5
--- /dev/null
+++ b/ynab-api/.openapi-generator-ignore
@@ -0,0 +1,23 @@
+# OpenAPI Generator Ignore
+# Generated by openapi-generator https://github.com/openapitools/openapi-generator
+
+# Use this file to prevent files from being overwritten by the generator.
+# The patterns follow closely to .gitignore or .dockerignore.
+
+# As an example, the C# client generator defines ApiClient.cs.
+# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
+#ApiClient.cs
+
+# You can match any string of characters against a directory, file or extension with a single asterisk (*):
+#foo/*/qux
+# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
+
+# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
+#foo/**/qux
+# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
+
+# You can also negate patterns with an exclamation (!).
+# For example, you can ignore all files in a docs folder with the file extension .md:
+#docs/*.md
+# Then explicitly reverse the ignore rule for a single file:
+#!docs/README.md
diff --git a/ynab-api/.openapi-generator/VERSION b/ynab-api/.openapi-generator/VERSION
new file mode 100644
index 0000000..aa31e71
--- /dev/null
+++ b/ynab-api/.openapi-generator/VERSION
@@ -0,0 +1 @@
+4.0.3 \ No newline at end of file
diff --git a/ynab-api/.travis.yml b/ynab-api/.travis.yml
new file mode 100644
index 0000000..22761ba
--- /dev/null
+++ b/ynab-api/.travis.yml
@@ -0,0 +1 @@
+language: rust
diff --git a/ynab-api/Cargo.toml b/ynab-api/Cargo.toml
new file mode 100644
index 0000000..cbe32f4
--- /dev/null
+++ b/ynab-api/Cargo.toml
@@ -0,0 +1,13 @@
+[package]
+name = "ynab-api"
+version = "1.0.0"
+authors = ["OpenAPI Generator team and contributors"]
+
+[dependencies]
+serde = "^1.0"
+serde_derive = "^1.0"
+serde_json = "^1.0"
+url = "1.5"
+reqwest = "~0.9"
+
+[dev-dependencies]
diff --git a/ynab-api/README.md b/ynab-api/README.md
new file mode 100644
index 0000000..353b402
--- /dev/null
+++ b/ynab-api/README.md
@@ -0,0 +1,150 @@
+# Rust API client for openapi
+
+Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+
+## Overview
+
+This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client.
+
+- API version: 1.0.0
+- Package version: 1.0.0
+- Build package: org.openapitools.codegen.languages.RustClientCodegen
+
+## Installation
+
+Put the package under your project folder and add the following to `Cargo.toml` under `[dependencies]`:
+
+```
+ openapi = { path = "./generated" }
+```
+
+## Documentation for API Endpoints
+
+All URIs are relative to *https://api.youneedabudget.com/v1*
+
+Class | Method | HTTP request | Description
+------------ | ------------- | ------------- | -------------
+*AccountsApi* | [**get_account_by_id**](docs/AccountsApi.md#get_account_by_id) | **get** /budgets/{budget_id}/accounts/{account_id} | Single account
+*AccountsApi* | [**get_accounts**](docs/AccountsApi.md#get_accounts) | **get** /budgets/{budget_id}/accounts | Account list
+*BudgetsApi* | [**get_budget_by_id**](docs/BudgetsApi.md#get_budget_by_id) | **get** /budgets/{budget_id} | Single budget
+*BudgetsApi* | [**get_budget_settings_by_id**](docs/BudgetsApi.md#get_budget_settings_by_id) | **get** /budgets/{budget_id}/settings | Budget Settings
+*BudgetsApi* | [**get_budgets**](docs/BudgetsApi.md#get_budgets) | **get** /budgets | List budgets
+*CategoriesApi* | [**get_categories**](docs/CategoriesApi.md#get_categories) | **get** /budgets/{budget_id}/categories | List categories
+*CategoriesApi* | [**get_category_by_id**](docs/CategoriesApi.md#get_category_by_id) | **get** /budgets/{budget_id}/categories/{category_id} | Single category
+*CategoriesApi* | [**get_month_category_by_id**](docs/CategoriesApi.md#get_month_category_by_id) | **get** /budgets/{budget_id}/months/{month}/categories/{category_id} | Single category for a specific budget month
+*CategoriesApi* | [**update_month_category**](docs/CategoriesApi.md#update_month_category) | **patch** /budgets/{budget_id}/months/{month}/categories/{category_id} | Update a category for a specific month
+*DeprecatedApi* | [**bulk_create_transactions**](docs/DeprecatedApi.md#bulk_create_transactions) | **post** /budgets/{budget_id}/transactions/bulk | Bulk create transactions
+*MonthsApi* | [**get_budget_month**](docs/MonthsApi.md#get_budget_month) | **get** /budgets/{budget_id}/months/{month} | Single budget month
+*MonthsApi* | [**get_budget_months**](docs/MonthsApi.md#get_budget_months) | **get** /budgets/{budget_id}/months | List budget months
+*PayeeLocationsApi* | [**get_payee_location_by_id**](docs/PayeeLocationsApi.md#get_payee_location_by_id) | **get** /budgets/{budget_id}/payee_locations/{payee_location_id} | Single payee location
+*PayeeLocationsApi* | [**get_payee_locations**](docs/PayeeLocationsApi.md#get_payee_locations) | **get** /budgets/{budget_id}/payee_locations | List payee locations
+*PayeeLocationsApi* | [**get_payee_locations_by_payee**](docs/PayeeLocationsApi.md#get_payee_locations_by_payee) | **get** /budgets/{budget_id}/payees/{payee_id}/payee_locations | List locations for a payee
+*PayeesApi* | [**get_payee_by_id**](docs/PayeesApi.md#get_payee_by_id) | **get** /budgets/{budget_id}/payees/{payee_id} | Single payee
+*PayeesApi* | [**get_payees**](docs/PayeesApi.md#get_payees) | **get** /budgets/{budget_id}/payees | List payees
+*ScheduledTransactionsApi* | [**get_scheduled_transaction_by_id**](docs/ScheduledTransactionsApi.md#get_scheduled_transaction_by_id) | **get** /budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id} | Single scheduled transaction
+*ScheduledTransactionsApi* | [**get_scheduled_transactions**](docs/ScheduledTransactionsApi.md#get_scheduled_transactions) | **get** /budgets/{budget_id}/scheduled_transactions | List scheduled transactions
+*TransactionsApi* | [**create_transaction**](docs/TransactionsApi.md#create_transaction) | **post** /budgets/{budget_id}/transactions | Create a single transaction or multiple transactions
+*TransactionsApi* | [**get_transaction_by_id**](docs/TransactionsApi.md#get_transaction_by_id) | **get** /budgets/{budget_id}/transactions/{transaction_id} | Single transaction
+*TransactionsApi* | [**get_transactions**](docs/TransactionsApi.md#get_transactions) | **get** /budgets/{budget_id}/transactions | List transactions
+*TransactionsApi* | [**get_transactions_by_account**](docs/TransactionsApi.md#get_transactions_by_account) | **get** /budgets/{budget_id}/accounts/{account_id}/transactions | List account transactions
+*TransactionsApi* | [**get_transactions_by_category**](docs/TransactionsApi.md#get_transactions_by_category) | **get** /budgets/{budget_id}/categories/{category_id}/transactions | List category transactions
+*TransactionsApi* | [**get_transactions_by_payee**](docs/TransactionsApi.md#get_transactions_by_payee) | **get** /budgets/{budget_id}/payees/{payee_id}/transactions | List payee transactions
+*TransactionsApi* | [**update_transaction**](docs/TransactionsApi.md#update_transaction) | **put** /budgets/{budget_id}/transactions/{transaction_id} | Updates an existing transaction
+*TransactionsApi* | [**update_transactions**](docs/TransactionsApi.md#update_transactions) | **patch** /budgets/{budget_id}/transactions | Update multiple transactions
+*UserApi* | [**get_user**](docs/UserApi.md#get_user) | **get** /user | User info
+
+
+## Documentation For Models
+
+ - [Account](docs/Account.md)
+ - [AccountResponse](docs/AccountResponse.md)
+ - [AccountResponseData](docs/AccountResponseData.md)
+ - [AccountsResponse](docs/AccountsResponse.md)
+ - [AccountsResponseData](docs/AccountsResponseData.md)
+ - [BudgetDetail](docs/BudgetDetail.md)
+ - [BudgetDetailAllOf](docs/BudgetDetailAllOf.md)
+ - [BudgetDetailResponse](docs/BudgetDetailResponse.md)
+ - [BudgetDetailResponseData](docs/BudgetDetailResponseData.md)
+ - [BudgetSettings](docs/BudgetSettings.md)
+ - [BudgetSettingsResponse](docs/BudgetSettingsResponse.md)
+ - [BudgetSettingsResponseData](docs/BudgetSettingsResponseData.md)
+ - [BudgetSummary](docs/BudgetSummary.md)
+ - [BudgetSummaryResponse](docs/BudgetSummaryResponse.md)
+ - [BudgetSummaryResponseData](docs/BudgetSummaryResponseData.md)
+ - [BulkResponse](docs/BulkResponse.md)
+ - [BulkResponseData](docs/BulkResponseData.md)
+ - [BulkResponseDataBulk](docs/BulkResponseDataBulk.md)
+ - [BulkTransactions](docs/BulkTransactions.md)
+ - [CategoriesResponse](docs/CategoriesResponse.md)
+ - [CategoriesResponseData](docs/CategoriesResponseData.md)
+ - [Category](docs/Category.md)
+ - [CategoryGroup](docs/CategoryGroup.md)
+ - [CategoryGroupWithCategories](docs/CategoryGroupWithCategories.md)
+ - [CategoryGroupWithCategoriesAllOf](docs/CategoryGroupWithCategoriesAllOf.md)
+ - [CategoryResponse](docs/CategoryResponse.md)
+ - [CategoryResponseData](docs/CategoryResponseData.md)
+ - [CurrencyFormat](docs/CurrencyFormat.md)
+ - [DateFormat](docs/DateFormat.md)
+ - [ErrorDetail](docs/ErrorDetail.md)
+ - [ErrorResponse](docs/ErrorResponse.md)
+ - [HybridTransaction](docs/HybridTransaction.md)
+ - [HybridTransactionAllOf](docs/HybridTransactionAllOf.md)
+ - [HybridTransactionsResponse](docs/HybridTransactionsResponse.md)
+ - [HybridTransactionsResponseData](docs/HybridTransactionsResponseData.md)
+ - [MonthDetail](docs/MonthDetail.md)
+ - [MonthDetailAllOf](docs/MonthDetailAllOf.md)
+ - [MonthDetailResponse](docs/MonthDetailResponse.md)
+ - [MonthDetailResponseData](docs/MonthDetailResponseData.md)
+ - [MonthSummariesResponse](docs/MonthSummariesResponse.md)
+ - [MonthSummariesResponseData](docs/MonthSummariesResponseData.md)
+ - [MonthSummary](docs/MonthSummary.md)
+ - [Payee](docs/Payee.md)
+ - [PayeeLocation](docs/PayeeLocation.md)
+ - [PayeeLocationResponse](docs/PayeeLocationResponse.md)
+ - [PayeeLocationResponseData](docs/PayeeLocationResponseData.md)
+ - [PayeeLocationsResponse](docs/PayeeLocationsResponse.md)
+ - [PayeeLocationsResponseData](docs/PayeeLocationsResponseData.md)
+ - [PayeeResponse](docs/PayeeResponse.md)
+ - [PayeeResponseData](docs/PayeeResponseData.md)
+ - [PayeesResponse](docs/PayeesResponse.md)
+ - [PayeesResponseData](docs/PayeesResponseData.md)
+ - [SaveCategoryResponse](docs/SaveCategoryResponse.md)
+ - [SaveCategoryResponseData](docs/SaveCategoryResponseData.md)
+ - [SaveMonthCategory](docs/SaveMonthCategory.md)
+ - [SaveMonthCategoryWrapper](docs/SaveMonthCategoryWrapper.md)
+ - [SaveTransaction](docs/SaveTransaction.md)
+ - [SaveTransactionWrapper](docs/SaveTransactionWrapper.md)
+ - [SaveTransactionsResponse](docs/SaveTransactionsResponse.md)
+ - [SaveTransactionsResponseData](docs/SaveTransactionsResponseData.md)
+ - [SaveTransactionsWrapper](docs/SaveTransactionsWrapper.md)
+ - [ScheduledSubTransaction](docs/ScheduledSubTransaction.md)
+ - [ScheduledTransactionDetail](docs/ScheduledTransactionDetail.md)
+ - [ScheduledTransactionDetailAllOf](docs/ScheduledTransactionDetailAllOf.md)
+ - [ScheduledTransactionResponse](docs/ScheduledTransactionResponse.md)
+ - [ScheduledTransactionResponseData](docs/ScheduledTransactionResponseData.md)
+ - [ScheduledTransactionSummary](docs/ScheduledTransactionSummary.md)
+ - [ScheduledTransactionsResponse](docs/ScheduledTransactionsResponse.md)
+ - [ScheduledTransactionsResponseData](docs/ScheduledTransactionsResponseData.md)
+ - [SubTransaction](docs/SubTransaction.md)
+ - [TransactionDetail](docs/TransactionDetail.md)
+ - [TransactionDetailAllOf](docs/TransactionDetailAllOf.md)
+ - [TransactionResponse](docs/TransactionResponse.md)
+ - [TransactionResponseData](docs/TransactionResponseData.md)
+ - [TransactionSummary](docs/TransactionSummary.md)
+ - [TransactionsResponse](docs/TransactionsResponse.md)
+ - [TransactionsResponseData](docs/TransactionsResponseData.md)
+ - [User](docs/User.md)
+ - [UserResponse](docs/UserResponse.md)
+ - [UserResponseData](docs/UserResponseData.md)
+
+
+To get access to the crate's generated documentation, use:
+
+```
+cargo doc --open
+```
+
+## Author
+
+
+
diff --git a/ynab-api/docs/Account.md b/ynab-api/docs/Account.md
new file mode 100644
index 0000000..adeab71
--- /dev/null
+++ b/ynab-api/docs/Account.md
@@ -0,0 +1,21 @@
+# Account
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **String** | |
+**name** | **String** | |
+**_type** | **String** | The type of account. Note: payPal, merchantAccount, investmentAccount, and mortgage types have been deprecated and will be removed in the future. |
+**on_budget** | **bool** | Whether this account is on budget or not |
+**closed** | **bool** | Whether this account is closed or not |
+**note** | **String** | |
+**balance** | **i64** | The current balance of the account in milliunits format |
+**cleared_balance** | **i64** | The current cleared balance of the account in milliunits format |
+**uncleared_balance** | **i64** | The current uncleared balance of the account in milliunits format |
+**transfer_payee_id** | **String** | The payee id which should be used when transferring to this account |
+**deleted** | **bool** | Whether or not the account has been deleted. Deleted accounts will only be included in delta requests. |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/AccountResponse.md b/ynab-api/docs/AccountResponse.md
new file mode 100644
index 0000000..eb39808
--- /dev/null
+++ b/ynab-api/docs/AccountResponse.md
@@ -0,0 +1,11 @@
+# AccountResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**data** | [***::models::AccountResponseData**](AccountResponse_data.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/AccountResponseData.md b/ynab-api/docs/AccountResponseData.md
new file mode 100644
index 0000000..d437a2f
--- /dev/null
+++ b/ynab-api/docs/AccountResponseData.md
@@ -0,0 +1,11 @@
+# AccountResponseData
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**account** | [***::models::Account**](Account.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/AccountsApi.md b/ynab-api/docs/AccountsApi.md
new file mode 100644
index 0000000..98270b9
--- /dev/null
+++ b/ynab-api/docs/AccountsApi.md
@@ -0,0 +1,83 @@
+# \AccountsApi
+
+All URIs are relative to *https://api.youneedabudget.com/v1*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**get_account_by_id**](AccountsApi.md#get_account_by_id) | **get** /budgets/{budget_id}/accounts/{account_id} | Single account
+[**get_accounts**](AccountsApi.md#get_accounts) | **get** /budgets/{budget_id}/accounts | Account list
+
+
+
+## get_account_by_id
+
+> ::models::AccountResponse get_account_by_id(ctx, budget_id, account_id)
+Single account
+
+Returns a single account
+
+### Required Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context containing the authentication | nil if no authentication
+ **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) |
+ **account_id** | [**String**](.md)| The id of the account |
+
+### Return type
+
+[**::models::AccountResponse**](AccountResponse.md)
+
+### Authorization
+
+[bearer](../README.md#bearer)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+
+## get_accounts
+
+> ::models::AccountsResponse get_accounts(ctx, budget_id, optional)
+Account list
+
+Returns all accounts
+
+### Required Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context containing the authentication | nil if no authentication
+ **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) |
+ **optional** | **map[string]interface{}** | optional parameters | nil if no parameters
+
+### Optional Parameters
+
+Optional parameters are passed through a map[string]interface{}.
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) |
+ **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. |
+
+### Return type
+
+[**::models::AccountsResponse**](AccountsResponse.md)
+
+### Authorization
+
+[bearer](../README.md#bearer)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
diff --git a/ynab-api/docs/AccountsResponse.md b/ynab-api/docs/AccountsResponse.md
new file mode 100644
index 0000000..6dc10dd
--- /dev/null
+++ b/ynab-api/docs/AccountsResponse.md
@@ -0,0 +1,11 @@
+# AccountsResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**data** | [***::models::AccountsResponseData**](AccountsResponse_data.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/AccountsResponseData.md b/ynab-api/docs/AccountsResponseData.md
new file mode 100644
index 0000000..968cad8
--- /dev/null
+++ b/ynab-api/docs/AccountsResponseData.md
@@ -0,0 +1,12 @@
+# AccountsResponseData
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**accounts** | [**Vec<::models::Account>**](Account.md) | |
+**server_knowledge** | **i64** | The knowledge of the server |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/BudgetDetail.md b/ynab-api/docs/BudgetDetail.md
new file mode 100644
index 0000000..3dac64b
--- /dev/null
+++ b/ynab-api/docs/BudgetDetail.md
@@ -0,0 +1,27 @@
+# BudgetDetail
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **String** | |
+**name** | **String** | |
+**last_modified_on** | **String** | The last time any changes were made to the budget from either a web or mobile client | [optional]
+**first_month** | [***String**](string.md) | The earliest budget month | [optional]
+**last_month** | [***String**](string.md) | The latest budget month | [optional]
+**date_format** | [***::models::DateFormat**](DateFormat.md) | | [optional]
+**currency_format** | [***::models::CurrencyFormat**](CurrencyFormat.md) | | [optional]
+**accounts** | [**Vec<::models::Account>**](Account.md) | | [optional]
+**payees** | [**Vec<::models::Payee>**](Payee.md) | | [optional]
+**payee_locations** | [**Vec<::models::PayeeLocation>**](PayeeLocation.md) | | [optional]
+**category_groups** | [**Vec<::models::CategoryGroup>**](CategoryGroup.md) | | [optional]
+**categories** | [**Vec<::models::Category>**](Category.md) | | [optional]
+**months** | [**Vec<::models::MonthDetail>**](MonthDetail.md) | | [optional]
+**transactions** | [**Vec<::models::TransactionSummary>**](TransactionSummary.md) | | [optional]
+**subtransactions** | [**Vec<::models::SubTransaction>**](SubTransaction.md) | | [optional]
+**scheduled_transactions** | [**Vec<::models::ScheduledTransactionSummary>**](ScheduledTransactionSummary.md) | | [optional]
+**scheduled_subtransactions** | [**Vec<::models::ScheduledSubTransaction>**](ScheduledSubTransaction.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/BudgetDetailAllOf.md b/ynab-api/docs/BudgetDetailAllOf.md
new file mode 100644
index 0000000..f5df347
--- /dev/null
+++ b/ynab-api/docs/BudgetDetailAllOf.md
@@ -0,0 +1,20 @@
+# BudgetDetailAllOf
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**accounts** | [**Vec<::models::Account>**](Account.md) | | [optional]
+**payees** | [**Vec<::models::Payee>**](Payee.md) | | [optional]
+**payee_locations** | [**Vec<::models::PayeeLocation>**](PayeeLocation.md) | | [optional]
+**category_groups** | [**Vec<::models::CategoryGroup>**](CategoryGroup.md) | | [optional]
+**categories** | [**Vec<::models::Category>**](Category.md) | | [optional]
+**months** | [**Vec<::models::MonthDetail>**](MonthDetail.md) | | [optional]
+**transactions** | [**Vec<::models::TransactionSummary>**](TransactionSummary.md) | | [optional]
+**subtransactions** | [**Vec<::models::SubTransaction>**](SubTransaction.md) | | [optional]
+**scheduled_transactions** | [**Vec<::models::ScheduledTransactionSummary>**](ScheduledTransactionSummary.md) | | [optional]
+**scheduled_subtransactions** | [**Vec<::models::ScheduledSubTransaction>**](ScheduledSubTransaction.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/BudgetDetailResponse.md b/ynab-api/docs/BudgetDetailResponse.md
new file mode 100644
index 0000000..97cc82e
--- /dev/null
+++ b/ynab-api/docs/BudgetDetailResponse.md
@@ -0,0 +1,11 @@
+# BudgetDetailResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**data** | [***::models::BudgetDetailResponseData**](BudgetDetailResponse_data.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/BudgetDetailResponseData.md b/ynab-api/docs/BudgetDetailResponseData.md
new file mode 100644
index 0000000..8697aae
--- /dev/null
+++ b/ynab-api/docs/BudgetDetailResponseData.md
@@ -0,0 +1,12 @@
+# BudgetDetailResponseData
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**budget** | [***::models::BudgetDetail**](BudgetDetail.md) | |
+**server_knowledge** | **i64** | The knowledge of the server |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/BudgetSettings.md b/ynab-api/docs/BudgetSettings.md
new file mode 100644
index 0000000..b0604b4
--- /dev/null
+++ b/ynab-api/docs/BudgetSettings.md
@@ -0,0 +1,12 @@
+# BudgetSettings
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**date_format** | [***::models::DateFormat**](DateFormat.md) | |
+**currency_format** | [***::models::CurrencyFormat**](CurrencyFormat.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/BudgetSettingsResponse.md b/ynab-api/docs/BudgetSettingsResponse.md
new file mode 100644
index 0000000..ee92163
--- /dev/null
+++ b/ynab-api/docs/BudgetSettingsResponse.md
@@ -0,0 +1,11 @@
+# BudgetSettingsResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**data** | [***::models::BudgetSettingsResponseData**](BudgetSettingsResponse_data.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/BudgetSettingsResponseData.md b/ynab-api/docs/BudgetSettingsResponseData.md
new file mode 100644
index 0000000..3d2c4cc
--- /dev/null
+++ b/ynab-api/docs/BudgetSettingsResponseData.md
@@ -0,0 +1,11 @@
+# BudgetSettingsResponseData
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**settings** | [***::models::BudgetSettings**](BudgetSettings.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/BudgetSummary.md b/ynab-api/docs/BudgetSummary.md
new file mode 100644
index 0000000..f2e444b
--- /dev/null
+++ b/ynab-api/docs/BudgetSummary.md
@@ -0,0 +1,17 @@
+# BudgetSummary
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **String** | |
+**name** | **String** | |
+**last_modified_on** | **String** | The last time any changes were made to the budget from either a web or mobile client | [optional]
+**first_month** | [***String**](string.md) | The earliest budget month | [optional]
+**last_month** | [***String**](string.md) | The latest budget month | [optional]
+**date_format** | [***::models::DateFormat**](DateFormat.md) | | [optional]
+**currency_format** | [***::models::CurrencyFormat**](CurrencyFormat.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/BudgetSummaryResponse.md b/ynab-api/docs/BudgetSummaryResponse.md
new file mode 100644
index 0000000..5b029dd
--- /dev/null
+++ b/ynab-api/docs/BudgetSummaryResponse.md
@@ -0,0 +1,11 @@
+# BudgetSummaryResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**data** | [***::models::BudgetSummaryResponseData**](BudgetSummaryResponse_data.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/BudgetSummaryResponseData.md b/ynab-api/docs/BudgetSummaryResponseData.md
new file mode 100644
index 0000000..6adce43
--- /dev/null
+++ b/ynab-api/docs/BudgetSummaryResponseData.md
@@ -0,0 +1,12 @@
+# BudgetSummaryResponseData
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**budgets** | [**Vec<::models::BudgetSummary>**](BudgetSummary.md) | |
+**default_budget** | [***::models::BudgetSummary**](BudgetSummary.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/BudgetsApi.md b/ynab-api/docs/BudgetsApi.md
new file mode 100644
index 0000000..563b754
--- /dev/null
+++ b/ynab-api/docs/BudgetsApi.md
@@ -0,0 +1,110 @@
+# \BudgetsApi
+
+All URIs are relative to *https://api.youneedabudget.com/v1*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**get_budget_by_id**](BudgetsApi.md#get_budget_by_id) | **get** /budgets/{budget_id} | Single budget
+[**get_budget_settings_by_id**](BudgetsApi.md#get_budget_settings_by_id) | **get** /budgets/{budget_id}/settings | Budget Settings
+[**get_budgets**](BudgetsApi.md#get_budgets) | **get** /budgets | List budgets
+
+
+
+## get_budget_by_id
+
+> ::models::BudgetDetailResponse get_budget_by_id(ctx, budget_id, optional)
+Single budget
+
+Returns a single budget with all related entities. This resource is effectively a full budget export.
+
+### Required Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context containing the authentication | nil if no authentication
+ **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) |
+ **optional** | **map[string]interface{}** | optional parameters | nil if no parameters
+
+### Optional Parameters
+
+Optional parameters are passed through a map[string]interface{}.
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) |
+ **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. |
+
+### Return type
+
+[**::models::BudgetDetailResponse**](BudgetDetailResponse.md)
+
+### Authorization
+
+[bearer](../README.md#bearer)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+
+## get_budget_settings_by_id
+
+> ::models::BudgetSettingsResponse get_budget_settings_by_id(ctx, budget_id)
+Budget Settings
+
+Returns settings for a budget
+
+### Required Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context containing the authentication | nil if no authentication
+ **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) |
+
+### Return type
+
+[**::models::BudgetSettingsResponse**](BudgetSettingsResponse.md)
+
+### Authorization
+
+[bearer](../README.md#bearer)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+
+## get_budgets
+
+> ::models::BudgetSummaryResponse get_budgets(ctx, )
+List budgets
+
+Returns budgets list with summary information
+
+### Required Parameters
+
+This endpoint does not need any parameter.
+
+### Return type
+
+[**::models::BudgetSummaryResponse**](BudgetSummaryResponse.md)
+
+### Authorization
+
+[bearer](../README.md#bearer)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
diff --git a/ynab-api/docs/BulkResponse.md b/ynab-api/docs/BulkResponse.md
new file mode 100644
index 0000000..009e60c
--- /dev/null
+++ b/ynab-api/docs/BulkResponse.md
@@ -0,0 +1,11 @@
+# BulkResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**data** | [***::models::BulkResponseData**](BulkResponse_data.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/BulkResponseData.md b/ynab-api/docs/BulkResponseData.md
new file mode 100644
index 0000000..82fef82
--- /dev/null
+++ b/ynab-api/docs/BulkResponseData.md
@@ -0,0 +1,11 @@
+# BulkResponseData
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**bulk** | [***::models::BulkResponseDataBulk**](BulkResponse_data_bulk.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/BulkResponseDataBulk.md b/ynab-api/docs/BulkResponseDataBulk.md
new file mode 100644
index 0000000..97ff1dc
--- /dev/null
+++ b/ynab-api/docs/BulkResponseDataBulk.md
@@ -0,0 +1,12 @@
+# BulkResponseDataBulk
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**transaction_ids** | **Vec<String>** | The list of Transaction ids that were created. |
+**duplicate_import_ids** | **Vec<String>** | If any Transactions were not created because they had an import_id matching a transaction already on the same account, the specified import_id(s) will be included in this list. |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/BulkTransactions.md b/ynab-api/docs/BulkTransactions.md
new file mode 100644
index 0000000..dc990e4
--- /dev/null
+++ b/ynab-api/docs/BulkTransactions.md
@@ -0,0 +1,11 @@
+# BulkTransactions
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**transactions** | [**Vec<::models::SaveTransaction>**](SaveTransaction.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/CategoriesApi.md b/ynab-api/docs/CategoriesApi.md
new file mode 100644
index 0000000..00294b8
--- /dev/null
+++ b/ynab-api/docs/CategoriesApi.md
@@ -0,0 +1,152 @@
+# \CategoriesApi
+
+All URIs are relative to *https://api.youneedabudget.com/v1*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**get_categories**](CategoriesApi.md#get_categories) | **get** /budgets/{budget_id}/categories | List categories
+[**get_category_by_id**](CategoriesApi.md#get_category_by_id) | **get** /budgets/{budget_id}/categories/{category_id} | Single category
+[**get_month_category_by_id**](CategoriesApi.md#get_month_category_by_id) | **get** /budgets/{budget_id}/months/{month}/categories/{category_id} | Single category for a specific budget month
+[**update_month_category**](CategoriesApi.md#update_month_category) | **patch** /budgets/{budget_id}/months/{month}/categories/{category_id} | Update a category for a specific month
+
+
+
+## get_categories
+
+> ::models::CategoriesResponse get_categories(ctx, budget_id, optional)
+List categories
+
+Returns all categories grouped by category group. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
+
+### Required Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context containing the authentication | nil if no authentication
+ **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) |
+ **optional** | **map[string]interface{}** | optional parameters | nil if no parameters
+
+### Optional Parameters
+
+Optional parameters are passed through a map[string]interface{}.
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) |
+ **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. |
+
+### Return type
+
+[**::models::CategoriesResponse**](CategoriesResponse.md)
+
+### Authorization
+
+[bearer](../README.md#bearer)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+
+## get_category_by_id
+
+> ::models::CategoryResponse get_category_by_id(ctx, budget_id, category_id)
+Single category
+
+Returns a single category. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
+
+### Required Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context containing the authentication | nil if no authentication
+ **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) |
+ **category_id** | **String**| The id of the category |
+
+### Return type
+
+[**::models::CategoryResponse**](CategoryResponse.md)
+
+### Authorization
+
+[bearer](../README.md#bearer)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+
+## get_month_category_by_id
+
+> ::models::CategoryResponse get_month_category_by_id(ctx, budget_id, month, category_id)
+Single category for a specific budget month
+
+Returns a single category for a specific budget month. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
+
+### Required Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context containing the authentication | nil if no authentication
+ **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) |
+ **month** | **String**| The budget month in ISO format (e.g. 2016-12-01) (\"current\" can also be used to specify the current calendar month (UTC)) |
+ **category_id** | **String**| The id of the category |
+
+### Return type
+
+[**::models::CategoryResponse**](CategoryResponse.md)
+
+### Authorization
+
+[bearer](../README.md#bearer)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+
+## update_month_category
+
+> ::models::SaveCategoryResponse update_month_category(ctx, budget_id, month, category_id, data)
+Update a category for a specific month
+
+Update a category for a specific month
+
+### Required Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context containing the authentication | nil if no authentication
+ **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) |
+ **month** | **String**| The budget month in ISO format (e.g. 2016-12-01) (\"current\" can also be used to specify the current calendar month (UTC)) |
+ **category_id** | **String**| The id of the category |
+ **data** | [**SaveMonthCategoryWrapper**](SaveMonthCategoryWrapper.md)| The category to update |
+
+### Return type
+
+[**::models::SaveCategoryResponse**](SaveCategoryResponse.md)
+
+### Authorization
+
+[bearer](../README.md#bearer)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
diff --git a/ynab-api/docs/CategoriesResponse.md b/ynab-api/docs/CategoriesResponse.md
new file mode 100644
index 0000000..e760b74
--- /dev/null
+++ b/ynab-api/docs/CategoriesResponse.md
@@ -0,0 +1,11 @@
+# CategoriesResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**data** | [***::models::CategoriesResponseData**](CategoriesResponse_data.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/CategoriesResponseData.md b/ynab-api/docs/CategoriesResponseData.md
new file mode 100644
index 0000000..766aae4
--- /dev/null
+++ b/ynab-api/docs/CategoriesResponseData.md
@@ -0,0 +1,12 @@
+# CategoriesResponseData
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**category_groups** | [**Vec<::models::CategoryGroupWithCategories>**](CategoryGroupWithCategories.md) | |
+**server_knowledge** | **i64** | The knowledge of the server |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/Category.md b/ynab-api/docs/Category.md
new file mode 100644
index 0000000..2afbe63
--- /dev/null
+++ b/ynab-api/docs/Category.md
@@ -0,0 +1,25 @@
+# Category
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **String** | |
+**category_group_id** | **String** | |
+**name** | **String** | |
+**hidden** | **bool** | Whether or not the category is hidden |
+**original_category_group_id** | **String** | If category is hidden this is the id of the category group it originally belonged to before it was hidden. | [optional]
+**note** | **String** | |
+**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) |
+**goal_creation_month** | [***String**](string.md) | The month a goal was created |
+**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 |
+**goal_percentage_complete** | **i32** | The percentage completion of the goal |
+**deleted** | **bool** | Whether or not the category has been deleted. Deleted categories will only be included in delta requests. |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/CategoryGroup.md b/ynab-api/docs/CategoryGroup.md
new file mode 100644
index 0000000..498f3c5
--- /dev/null
+++ b/ynab-api/docs/CategoryGroup.md
@@ -0,0 +1,14 @@
+# CategoryGroup
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **String** | |
+**name** | **String** | |
+**hidden** | **bool** | Whether or not the category group is hidden |
+**deleted** | **bool** | Whether or not the category group has been deleted. Deleted category groups will only be included in delta requests. |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/CategoryGroupWithCategories.md b/ynab-api/docs/CategoryGroupWithCategories.md
new file mode 100644
index 0000000..c1355c2
--- /dev/null
+++ b/ynab-api/docs/CategoryGroupWithCategories.md
@@ -0,0 +1,15 @@
+# CategoryGroupWithCategories
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **String** | |
+**name** | **String** | |
+**hidden** | **bool** | Whether or not the category group is hidden |
+**deleted** | **bool** | Whether or not the category group has been deleted. Deleted category groups will only be included in delta requests. |
+**categories** | [**Vec<::models::Category>**](Category.md) | Category group categories. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC). |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/CategoryGroupWithCategoriesAllOf.md b/ynab-api/docs/CategoryGroupWithCategoriesAllOf.md
new file mode 100644
index 0000000..0a11fb9
--- /dev/null
+++ b/ynab-api/docs/CategoryGroupWithCategoriesAllOf.md
@@ -0,0 +1,11 @@
+# CategoryGroupWithCategoriesAllOf
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**categories** | [**Vec<::models::Category>**](Category.md) | Category group categories. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC). |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/CategoryResponse.md b/ynab-api/docs/CategoryResponse.md
new file mode 100644
index 0000000..efe3d40
--- /dev/null
+++ b/ynab-api/docs/CategoryResponse.md
@@ -0,0 +1,11 @@
+# CategoryResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**data** | [***::models::CategoryResponseData**](CategoryResponse_data.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/CategoryResponseData.md b/ynab-api/docs/CategoryResponseData.md
new file mode 100644
index 0000000..187bf07
--- /dev/null
+++ b/ynab-api/docs/CategoryResponseData.md
@@ -0,0 +1,11 @@
+# CategoryResponseData
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**category** | [***::models::Category**](Category.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/CurrencyFormat.md b/ynab-api/docs/CurrencyFormat.md
new file mode 100644
index 0000000..98cd6fd
--- /dev/null
+++ b/ynab-api/docs/CurrencyFormat.md
@@ -0,0 +1,18 @@
+# CurrencyFormat
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**iso_code** | **String** | |
+**example_format** | **String** | |
+**decimal_digits** | **i32** | |
+**decimal_separator** | **String** | |
+**symbol_first** | **bool** | |
+**group_separator** | **String** | |
+**currency_symbol** | **String** | |
+**display_symbol** | **bool** | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/DateFormat.md b/ynab-api/docs/DateFormat.md
new file mode 100644
index 0000000..53add08
--- /dev/null
+++ b/ynab-api/docs/DateFormat.md
@@ -0,0 +1,11 @@
+# DateFormat
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**format** | **String** | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/DeprecatedApi.md b/ynab-api/docs/DeprecatedApi.md
new file mode 100644
index 0000000..85bdc80
--- /dev/null
+++ b/ynab-api/docs/DeprecatedApi.md
@@ -0,0 +1,41 @@
+# \DeprecatedApi
+
+All URIs are relative to *https://api.youneedabudget.com/v1*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**bulk_create_transactions**](DeprecatedApi.md#bulk_create_transactions) | **post** /budgets/{budget_id}/transactions/bulk | Bulk create transactions
+
+
+
+## bulk_create_transactions
+
+> ::models::BulkResponse bulk_create_transactions(ctx, budget_id, transactions)
+Bulk create transactions
+
+Creates multiple transactions. Although this endpoint is still supported, it is recommended to use 'POST /budgets/{budget_id}/transactions' to create multiple transactions.
+
+### Required Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context containing the authentication | nil if no authentication
+ **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) |
+ **transactions** | [**BulkTransactions**](BulkTransactions.md)| The list of transactions to create |
+
+### Return type
+
+[**::models::BulkResponse**](BulkResponse.md)
+
+### Authorization
+
+[bearer](../README.md#bearer)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
diff --git a/ynab-api/docs/ErrorDetail.md b/ynab-api/docs/ErrorDetail.md
new file mode 100644
index 0000000..dd6d022
--- /dev/null
+++ b/ynab-api/docs/ErrorDetail.md
@@ -0,0 +1,13 @@
+# ErrorDetail
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **String** | |
+**name** | **String** | |
+**detail** | **String** | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/ErrorResponse.md b/ynab-api/docs/ErrorResponse.md
new file mode 100644
index 0000000..382b263
--- /dev/null
+++ b/ynab-api/docs/ErrorResponse.md
@@ -0,0 +1,11 @@
+# ErrorResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**error** | [***::models::ErrorDetail**](ErrorDetail.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/HybridTransaction.md b/ynab-api/docs/HybridTransaction.md
new file mode 100644
index 0000000..8c88165
--- /dev/null
+++ b/ynab-api/docs/HybridTransaction.md
@@ -0,0 +1,30 @@
+# HybridTransaction
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **String** | |
+**date** | [***String**](string.md) | The transaction date in ISO format (e.g. 2016-12-01) |
+**amount** | **i64** | The transaction amount in milliunits format |
+**memo** | **String** | |
+**cleared** | **String** | The cleared status of the transaction |
+**approved** | **bool** | Whether or not the transaction is approved |
+**flag_color** | **String** | The transaction flag |
+**account_id** | **String** | |
+**payee_id** | **String** | |
+**category_id** | **String** | |
+**transfer_account_id** | **String** | If a transfer transaction, the account to which it transfers |
+**transfer_transaction_id** | **String** | If a transfer transaction, the id of transaction on the other side of the transfer |
+**matched_transaction_id** | **String** | If transaction is matched, the id of the matched transaction |
+**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'. |
+**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. |
+**account_name** | **String** | |
+**payee_name** | **String** | |
+**category_name** | **String** | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/HybridTransactionAllOf.md b/ynab-api/docs/HybridTransactionAllOf.md
new file mode 100644
index 0000000..657d6d9
--- /dev/null
+++ b/ynab-api/docs/HybridTransactionAllOf.md
@@ -0,0 +1,15 @@
+# HybridTransactionAllOf
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**_type** | **String** | Whether the hybrid transaction represents a regular transaction or a subtransaction |
+**parent_transaction_id** | **String** | For subtransaction types, this is the id of the pararent transaction. For transaction types, this id will be always be null. |
+**account_name** | **String** | |
+**payee_name** | **String** | |
+**category_name** | **String** | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/HybridTransactionsResponse.md b/ynab-api/docs/HybridTransactionsResponse.md
new file mode 100644
index 0000000..df8437a
--- /dev/null
+++ b/ynab-api/docs/HybridTransactionsResponse.md
@@ -0,0 +1,11 @@
+# HybridTransactionsResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**data** | [***::models::HybridTransactionsResponseData**](HybridTransactionsResponse_data.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/HybridTransactionsResponseData.md b/ynab-api/docs/HybridTransactionsResponseData.md
new file mode 100644
index 0000000..241e7b6
--- /dev/null
+++ b/ynab-api/docs/HybridTransactionsResponseData.md
@@ -0,0 +1,11 @@
+# HybridTransactionsResponseData
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**transactions** | [**Vec<::models::HybridTransaction>**](HybridTransaction.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/MonthDetail.md b/ynab-api/docs/MonthDetail.md
new file mode 100644
index 0000000..d1fc13a
--- /dev/null
+++ b/ynab-api/docs/MonthDetail.md
@@ -0,0 +1,19 @@
+# MonthDetail
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**month** | [***String**](string.md) | |
+**note** | **String** | |
+**income** | **i64** | The total amount in transactions categorized to 'Inflow: To be Budgeted' in the month |
+**budgeted** | **i64** | The total amount budgeted in the month |
+**activity** | **i64** | The total amount in transactions in the month, excluding those categorized to 'Inflow: To be Budgeted' |
+**to_be_budgeted** | **i64** | The available amount for 'To be Budgeted' |
+**age_of_money** | **i32** | The Age of Money as of the month |
+**deleted** | **bool** | Whether or not the month has been deleted. Deleted months will only be included in delta requests. |
+**categories** | [**Vec<::models::Category>**](Category.md) | The budget month categories. Amounts (budgeted, activity, balance, etc.) are specific to the {month} parameter specified. |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/MonthDetailAllOf.md b/ynab-api/docs/MonthDetailAllOf.md
new file mode 100644
index 0000000..81da8f5
--- /dev/null
+++ b/ynab-api/docs/MonthDetailAllOf.md
@@ -0,0 +1,11 @@
+# MonthDetailAllOf
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**categories** | [**Vec<::models::Category>**](Category.md) | The budget month categories. Amounts (budgeted, activity, balance, etc.) are specific to the {month} parameter specified. |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/MonthDetailResponse.md b/ynab-api/docs/MonthDetailResponse.md
new file mode 100644
index 0000000..bfeaae8
--- /dev/null
+++ b/ynab-api/docs/MonthDetailResponse.md
@@ -0,0 +1,11 @@
+# MonthDetailResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**data** | [***::models::MonthDetailResponseData**](MonthDetailResponse_data.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/MonthDetailResponseData.md b/ynab-api/docs/MonthDetailResponseData.md
new file mode 100644
index 0000000..83bab88
--- /dev/null
+++ b/ynab-api/docs/MonthDetailResponseData.md
@@ -0,0 +1,11 @@
+# MonthDetailResponseData
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**month** | [***::models::MonthDetail**](MonthDetail.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/MonthSummariesResponse.md b/ynab-api/docs/MonthSummariesResponse.md
new file mode 100644
index 0000000..fb7f315
--- /dev/null
+++ b/ynab-api/docs/MonthSummariesResponse.md
@@ -0,0 +1,11 @@
+# MonthSummariesResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**data** | [***::models::MonthSummariesResponseData**](MonthSummariesResponse_data.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/MonthSummariesResponseData.md b/ynab-api/docs/MonthSummariesResponseData.md
new file mode 100644
index 0000000..f9907b3
--- /dev/null
+++ b/ynab-api/docs/MonthSummariesResponseData.md
@@ -0,0 +1,12 @@
+# MonthSummariesResponseData
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**months** | [**Vec<::models::MonthSummary>**](MonthSummary.md) | |
+**server_knowledge** | **i64** | The knowledge of the server |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/MonthSummary.md b/ynab-api/docs/MonthSummary.md
new file mode 100644
index 0000000..e48e3a4
--- /dev/null
+++ b/ynab-api/docs/MonthSummary.md
@@ -0,0 +1,18 @@
+# MonthSummary
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**month** | [***String**](string.md) | |
+**note** | **String** | |
+**income** | **i64** | The total amount in transactions categorized to 'Inflow: To be Budgeted' in the month |
+**budgeted** | **i64** | The total amount budgeted in the month |
+**activity** | **i64** | The total amount in transactions in the month, excluding those categorized to 'Inflow: To be Budgeted' |
+**to_be_budgeted** | **i64** | The available amount for 'To be Budgeted' |
+**age_of_money** | **i32** | The Age of Money as of the month |
+**deleted** | **bool** | Whether or not the month has been deleted. Deleted months will only be included in delta requests. |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/MonthsApi.md b/ynab-api/docs/MonthsApi.md
new file mode 100644
index 0000000..337c03c
--- /dev/null
+++ b/ynab-api/docs/MonthsApi.md
@@ -0,0 +1,83 @@
+# \MonthsApi
+
+All URIs are relative to *https://api.youneedabudget.com/v1*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**get_budget_month**](MonthsApi.md#get_budget_month) | **get** /budgets/{budget_id}/months/{month} | Single budget month
+[**get_budget_months**](MonthsApi.md#get_budget_months) | **get** /budgets/{budget_id}/months | List budget months
+
+
+
+## get_budget_month
+
+> ::models::MonthDetailResponse get_budget_month(ctx, budget_id, month)
+Single budget month
+
+Returns a single budget month
+
+### Required Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context containing the authentication | nil if no authentication
+ **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) |
+ **month** | **String**| The budget month in ISO format (e.g. 2016-12-01) (\"current\" can also be used to specify the current calendar month (UTC)) |
+
+### Return type
+
+[**::models::MonthDetailResponse**](MonthDetailResponse.md)
+
+### Authorization
+
+[bearer](../README.md#bearer)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+
+## get_budget_months
+
+> ::models::MonthSummariesResponse get_budget_months(ctx, budget_id, optional)
+List budget months
+
+Returns all budget months
+
+### Required Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context containing the authentication | nil if no authentication
+ **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) |
+ **optional** | **map[string]interface{}** | optional parameters | nil if no parameters
+
+### Optional Parameters
+
+Optional parameters are passed through a map[string]interface{}.
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) |
+ **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. |
+
+### Return type
+
+[**::models::MonthSummariesResponse**](MonthSummariesResponse.md)
+
+### Authorization
+
+[bearer](../README.md#bearer)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
diff --git a/ynab-api/docs/Payee.md b/ynab-api/docs/Payee.md
new file mode 100644
index 0000000..a52f0f9
--- /dev/null
+++ b/ynab-api/docs/Payee.md
@@ -0,0 +1,14 @@
+# Payee
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **String** | |
+**name** | **String** | |
+**transfer_account_id** | **String** | If a transfer payee, the account_id to which this payee transfers to |
+**deleted** | **bool** | Whether or not the payee has been deleted. Deleted payees will only be included in delta requests. |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/PayeeLocation.md b/ynab-api/docs/PayeeLocation.md
new file mode 100644
index 0000000..f73c3be
--- /dev/null
+++ b/ynab-api/docs/PayeeLocation.md
@@ -0,0 +1,15 @@
+# PayeeLocation
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **String** | |
+**payee_id** | **String** | |
+**latitude** | **String** | |
+**longitude** | **String** | |
+**deleted** | **bool** | Whether or not the payee location has been deleted. Deleted payee locations will only be included in delta requests. |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/PayeeLocationResponse.md b/ynab-api/docs/PayeeLocationResponse.md
new file mode 100644
index 0000000..b34e691
--- /dev/null
+++ b/ynab-api/docs/PayeeLocationResponse.md
@@ -0,0 +1,11 @@
+# PayeeLocationResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**data** | [***::models::PayeeLocationResponseData**](PayeeLocationResponse_data.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/PayeeLocationResponseData.md b/ynab-api/docs/PayeeLocationResponseData.md
new file mode 100644
index 0000000..bba1cb7
--- /dev/null
+++ b/ynab-api/docs/PayeeLocationResponseData.md
@@ -0,0 +1,11 @@
+# PayeeLocationResponseData
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**payee_location** | [***::models::PayeeLocation**](PayeeLocation.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/PayeeLocationsApi.md b/ynab-api/docs/PayeeLocationsApi.md
new file mode 100644
index 0000000..e51787a
--- /dev/null
+++ b/ynab-api/docs/PayeeLocationsApi.md
@@ -0,0 +1,106 @@
+# \PayeeLocationsApi
+
+All URIs are relative to *https://api.youneedabudget.com/v1*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**get_payee_location_by_id**](PayeeLocationsApi.md#get_payee_location_by_id) | **get** /budgets/{budget_id}/payee_locations/{payee_location_id} | Single payee location
+[**get_payee_locations**](PayeeLocationsApi.md#get_payee_locations) | **get** /budgets/{budget_id}/payee_locations | List payee locations
+[**get_payee_locations_by_payee**](PayeeLocationsApi.md#get_payee_locations_by_payee) | **get** /budgets/{budget_id}/payees/{payee_id}/payee_locations | List locations for a payee
+
+
+
+## get_payee_location_by_id
+
+> ::models::PayeeLocationResponse get_payee_location_by_id(ctx, budget_id, payee_location_id)
+Single payee location
+
+Returns a single payee location
+
+### Required Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context containing the authentication | nil if no authentication
+ **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) |
+ **payee_location_id** | **String**| id of payee location |
+
+### Return type
+
+[**::models::PayeeLocationResponse**](PayeeLocationResponse.md)
+
+### Authorization
+
+[bearer](../README.md#bearer)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+
+## get_payee_locations
+
+> ::models::PayeeLocationsResponse get_payee_locations(ctx, budget_id)
+List payee locations
+
+Returns all payee locations
+
+### Required Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context containing the authentication | nil if no authentication
+ **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) |
+
+### Return type
+
+[**::models::PayeeLocationsResponse**](PayeeLocationsResponse.md)
+
+### Authorization
+
+[bearer](../README.md#bearer)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+
+## get_payee_locations_by_payee
+
+> ::models::PayeeLocationsResponse get_payee_locations_by_payee(ctx, budget_id, payee_id)
+List locations for a payee
+
+Returns all payee locations for the specified payee
+
+### Required Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context containing the authentication | nil if no authentication
+ **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) |
+ **payee_id** | **String**| id of payee |
+
+### Return type
+
+[**::models::PayeeLocationsResponse**](PayeeLocationsResponse.md)
+
+### Authorization
+
+[bearer](../README.md#bearer)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
diff --git a/ynab-api/docs/PayeeLocationsResponse.md b/ynab-api/docs/PayeeLocationsResponse.md
new file mode 100644
index 0000000..f118e8e
--- /dev/null
+++ b/ynab-api/docs/PayeeLocationsResponse.md
@@ -0,0 +1,11 @@
+# PayeeLocationsResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**data** | [***::models::PayeeLocationsResponseData**](PayeeLocationsResponse_data.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/PayeeLocationsResponseData.md b/ynab-api/docs/PayeeLocationsResponseData.md
new file mode 100644
index 0000000..4ad0748
--- /dev/null
+++ b/ynab-api/docs/PayeeLocationsResponseData.md
@@ -0,0 +1,11 @@
+# PayeeLocationsResponseData
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**payee_locations** | [**Vec<::models::PayeeLocation>**](PayeeLocation.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/PayeeResponse.md b/ynab-api/docs/PayeeResponse.md
new file mode 100644
index 0000000..6a38dfd
--- /dev/null
+++ b/ynab-api/docs/PayeeResponse.md
@@ -0,0 +1,11 @@
+# PayeeResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**data** | [***::models::PayeeResponseData**](PayeeResponse_data.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/PayeeResponseData.md b/ynab-api/docs/PayeeResponseData.md
new file mode 100644
index 0000000..9618470
--- /dev/null
+++ b/ynab-api/docs/PayeeResponseData.md
@@ -0,0 +1,11 @@
+# PayeeResponseData
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**payee** | [***::models::Payee**](Payee.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/PayeesApi.md b/ynab-api/docs/PayeesApi.md
new file mode 100644
index 0000000..173c79d
--- /dev/null
+++ b/ynab-api/docs/PayeesApi.md
@@ -0,0 +1,83 @@
+# \PayeesApi
+
+All URIs are relative to *https://api.youneedabudget.com/v1*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**get_payee_by_id**](PayeesApi.md#get_payee_by_id) | **get** /budgets/{budget_id}/payees/{payee_id} | Single payee
+[**get_payees**](PayeesApi.md#get_payees) | **get** /budgets/{budget_id}/payees | List payees
+
+
+
+## get_payee_by_id
+
+> ::models::PayeeResponse get_payee_by_id(ctx, budget_id, payee_id)
+Single payee
+
+Returns single payee
+
+### Required Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context containing the authentication | nil if no authentication
+ **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) |
+ **payee_id** | **String**| The id of the payee |
+
+### Return type
+
+[**::models::PayeeResponse**](PayeeResponse.md)
+
+### Authorization
+
+[bearer](../README.md#bearer)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+
+## get_payees
+
+> ::models::PayeesResponse get_payees(ctx, budget_id, optional)
+List payees
+
+Returns all payees
+
+### Required Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context containing the authentication | nil if no authentication
+ **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) |
+ **optional** | **map[string]interface{}** | optional parameters | nil if no parameters
+
+### Optional Parameters
+
+Optional parameters are passed through a map[string]interface{}.
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) |
+ **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. |
+
+### Return type
+
+[**::models::PayeesResponse**](PayeesResponse.md)
+
+### Authorization
+
+[bearer](../README.md#bearer)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
diff --git a/ynab-api/docs/PayeesResponse.md b/ynab-api/docs/PayeesResponse.md
new file mode 100644
index 0000000..18bd7d2
--- /dev/null
+++ b/ynab-api/docs/PayeesResponse.md
@@ -0,0 +1,11 @@
+# PayeesResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**data** | [***::models::PayeesResponseData**](PayeesResponse_data.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/PayeesResponseData.md b/ynab-api/docs/PayeesResponseData.md
new file mode 100644
index 0000000..c3a5518
--- /dev/null
+++ b/ynab-api/docs/PayeesResponseData.md
@@ -0,0 +1,12 @@
+# PayeesResponseData
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**payees** | [**Vec<::models::Payee>**](Payee.md) | |
+**server_knowledge** | **i64** | The knowledge of the server |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/SaveCategoryResponse.md b/ynab-api/docs/SaveCategoryResponse.md
new file mode 100644
index 0000000..64a832f
--- /dev/null
+++ b/ynab-api/docs/SaveCategoryResponse.md
@@ -0,0 +1,11 @@
+# SaveCategoryResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**data** | [***::models::SaveCategoryResponseData**](SaveCategoryResponse_data.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/SaveCategoryResponseData.md b/ynab-api/docs/SaveCategoryResponseData.md
new file mode 100644
index 0000000..941f72f
--- /dev/null
+++ b/ynab-api/docs/SaveCategoryResponseData.md
@@ -0,0 +1,12 @@
+# SaveCategoryResponseData
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**category** | [***::models::Category**](Category.md) | |
+**server_knowledge** | **i64** | The knowledge of the server |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/SaveMonthCategory.md b/ynab-api/docs/SaveMonthCategory.md
new file mode 100644
index 0000000..1c4abb9
--- /dev/null
+++ b/ynab-api/docs/SaveMonthCategory.md
@@ -0,0 +1,11 @@
+# SaveMonthCategory
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**budgeted** | **i64** | Budgeted amount in milliunits format |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/SaveMonthCategoryWrapper.md b/ynab-api/docs/SaveMonthCategoryWrapper.md
new file mode 100644
index 0000000..1b7e38a
--- /dev/null
+++ b/ynab-api/docs/SaveMonthCategoryWrapper.md
@@ -0,0 +1,11 @@
+# SaveMonthCategoryWrapper
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**category** | [***::models::SaveMonthCategory**](SaveMonthCategory.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/SaveTransaction.md b/ynab-api/docs/SaveTransaction.md
new file mode 100644
index 0000000..dabee87
--- /dev/null
+++ b/ynab-api/docs/SaveTransaction.md
@@ -0,0 +1,21 @@
+# SaveTransaction
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**account_id** | **String** | |
+**date** | [***String**](string.md) | The transaction date in ISO format (e.g. 2016-12-01). Future dates (scheduled transactions) are not permitted. Split transaction dates cannot be changed and if a different date is supplied it will be ignored. |
+**amount** | **i64** | The transaction amount in milliunits format. Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored. |
+**payee_id** | **String** | The payee for the transaction | [optional]
+**payee_name** | **String** | The payee name. If a payee_name value is provided and payee_id has a null value, the payee_name value will be used to resolve the payee by either (1) a matching payee rename rule (only if import_id is also specified) or (2) a payee with the same name or (3) creation of a new payee. | [optional]
+**category_id** | **String** | The category for the transaction. Split and Credit Card Payment categories are not permitted and will be ignored if supplied. If an existing transaction has a Split category it cannot be changed. | [optional]
+**memo** | **String** | | [optional]
+**cleared** | **String** | The cleared status of the transaction | [optional]
+**approved** | **bool** | Whether or not the transaction is approved. If not supplied, transaction will be unapproved by default. | [optional]
+**flag_color** | **String** | The transaction flag | [optional]
+**import_id** | **String** | If specified, the new transaction will be assigned this import_id and considered \"imported\". *At the time of import* we will attempt to match \"imported\" transactions with non-imported (i.e. \"user-entered\") transactions.<br><br>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.<br><br>If import_id is omitted or specified as null, the transaction will be treated as a \"user-entered\" transaction. As such, it will be eligible to be matched against transactions later being imported (via DI, FBI, or API). | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/SaveTransactionWrapper.md b/ynab-api/docs/SaveTransactionWrapper.md
new file mode 100644
index 0000000..a9f3fcc
--- /dev/null
+++ b/ynab-api/docs/SaveTransactionWrapper.md
@@ -0,0 +1,11 @@
+# SaveTransactionWrapper
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**transaction** | [***::models::SaveTransaction**](SaveTransaction.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/SaveTransactionsResponse.md b/ynab-api/docs/SaveTransactionsResponse.md
new file mode 100644
index 0000000..0458ef6
--- /dev/null
+++ b/ynab-api/docs/SaveTransactionsResponse.md
@@ -0,0 +1,11 @@
+# SaveTransactionsResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**data** | [***::models::SaveTransactionsResponseData**](SaveTransactionsResponse_data.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/SaveTransactionsResponseData.md b/ynab-api/docs/SaveTransactionsResponseData.md
new file mode 100644
index 0000000..8617702
--- /dev/null
+++ b/ynab-api/docs/SaveTransactionsResponseData.md
@@ -0,0 +1,15 @@
+# SaveTransactionsResponseData
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**transaction_ids** | **Vec<String>** | The transaction ids that were saved |
+**transaction** | [***::models::TransactionDetail**](TransactionDetail.md) | | [optional]
+**transactions** | [**Vec<::models::TransactionDetail>**](TransactionDetail.md) | If multiple transactions were specified, the transactions that were saved | [optional]
+**duplicate_import_ids** | **Vec<String>** | If multiple transactions were specified, a list of import_ids that were not created because of an existing import_id found on the same account | [optional]
+**server_knowledge** | **i64** | The knowledge of the server |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/SaveTransactionsWrapper.md b/ynab-api/docs/SaveTransactionsWrapper.md
new file mode 100644
index 0000000..d79e4ee
--- /dev/null
+++ b/ynab-api/docs/SaveTransactionsWrapper.md
@@ -0,0 +1,12 @@
+# SaveTransactionsWrapper
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**transaction** | [***::models::SaveTransaction**](SaveTransaction.md) | | [optional]
+**transactions** | [**Vec<::models::SaveTransaction>**](SaveTransaction.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/ScheduledSubTransaction.md b/ynab-api/docs/ScheduledSubTransaction.md
new file mode 100644
index 0000000..377c31f
--- /dev/null
+++ b/ynab-api/docs/ScheduledSubTransaction.md
@@ -0,0 +1,18 @@
+# ScheduledSubTransaction
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **String** | |
+**scheduled_transaction_id** | **String** | |
+**amount** | **i64** | The scheduled subtransaction amount in milliunits format |
+**memo** | **String** | |
+**payee_id** | **String** | |
+**category_id** | **String** | |
+**transfer_account_id** | **String** | If a transfer, the account_id which the scheduled subtransaction transfers to |
+**deleted** | **bool** | Whether or not the scheduled subtransaction has been deleted. Deleted scheduled subtransactions will only be included in delta requests. |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/ScheduledTransactionDetail.md b/ynab-api/docs/ScheduledTransactionDetail.md
new file mode 100644
index 0000000..b140d03
--- /dev/null
+++ b/ynab-api/docs/ScheduledTransactionDetail.md
@@ -0,0 +1,26 @@
+# ScheduledTransactionDetail
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **String** | |
+**date_first** | [***String**](string.md) | The first date for which the Scheduled Transaction was scheduled. |
+**date_next** | [***String**](string.md) | The next date for which the Scheduled Transaction is scheduled. |
+**frequency** | **String** | |
+**amount** | **i64** | The scheduled transaction amount in milliunits format |
+**memo** | **String** | |
+**flag_color** | **String** | The scheduled transaction flag |
+**account_id** | **String** | |
+**payee_id** | **String** | |
+**category_id** | **String** | |
+**transfer_account_id** | **String** | If a transfer, the account_id which the scheduled transaction transfers to |
+**deleted** | **bool** | Whether or not the scheduled transaction has been deleted. Deleted scheduled transactions will only be included in delta requests. |
+**account_name** | **String** | |
+**payee_name** | **String** | |
+**category_name** | **String** | |
+**subtransactions** | [**Vec<::models::ScheduledSubTransaction>**](ScheduledSubTransaction.md) | If a split scheduled transaction, the subtransactions. |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/ScheduledTransactionDetailAllOf.md b/ynab-api/docs/ScheduledTransactionDetailAllOf.md
new file mode 100644
index 0000000..3c2757f
--- /dev/null
+++ b/ynab-api/docs/ScheduledTransactionDetailAllOf.md
@@ -0,0 +1,14 @@
+# ScheduledTransactionDetailAllOf
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**account_name** | **String** | |
+**payee_name** | **String** | |
+**category_name** | **String** | |
+**subtransactions** | [**Vec<::models::ScheduledSubTransaction>**](ScheduledSubTransaction.md) | If a split scheduled transaction, the subtransactions. |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/ScheduledTransactionResponse.md b/ynab-api/docs/ScheduledTransactionResponse.md
new file mode 100644
index 0000000..28c4b7e
--- /dev/null
+++ b/ynab-api/docs/ScheduledTransactionResponse.md
@@ -0,0 +1,11 @@
+# ScheduledTransactionResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**data** | [***::models::ScheduledTransactionResponseData**](ScheduledTransactionResponse_data.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/ScheduledTransactionResponseData.md b/ynab-api/docs/ScheduledTransactionResponseData.md
new file mode 100644
index 0000000..bd05d93
--- /dev/null
+++ b/ynab-api/docs/ScheduledTransactionResponseData.md
@@ -0,0 +1,11 @@
+# ScheduledTransactionResponseData
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**scheduled_transaction** | [***::models::ScheduledTransactionDetail**](ScheduledTransactionDetail.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/ScheduledTransactionSummary.md b/ynab-api/docs/ScheduledTransactionSummary.md
new file mode 100644
index 0000000..e66c915
--- /dev/null
+++ b/ynab-api/docs/ScheduledTransactionSummary.md
@@ -0,0 +1,22 @@
+# ScheduledTransactionSummary
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **String** | |
+**date_first** | [***String**](string.md) | The first date for which the Scheduled Transaction was scheduled. |
+**date_next** | [***String**](string.md) | The next date for which the Scheduled Transaction is scheduled. |
+**frequency** | **String** | |
+**amount** | **i64** | The scheduled transaction amount in milliunits format |
+**memo** | **String** | |
+**flag_color** | **String** | The scheduled transaction flag |
+**account_id** | **String** | |
+**payee_id** | **String** | |
+**category_id** | **String** | |
+**transfer_account_id** | **String** | If a transfer, the account_id which the scheduled transaction transfers to |
+**deleted** | **bool** | Whether or not the scheduled transaction has been deleted. Deleted scheduled transactions will only be included in delta requests. |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/ScheduledTransactionsApi.md b/ynab-api/docs/ScheduledTransactionsApi.md
new file mode 100644
index 0000000..48856a7
--- /dev/null
+++ b/ynab-api/docs/ScheduledTransactionsApi.md
@@ -0,0 +1,83 @@
+# \ScheduledTransactionsApi
+
+All URIs are relative to *https://api.youneedabudget.com/v1*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**get_scheduled_transaction_by_id**](ScheduledTransactionsApi.md#get_scheduled_transaction_by_id) | **get** /budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id} | Single scheduled transaction
+[**get_scheduled_transactions**](ScheduledTransactionsApi.md#get_scheduled_transactions) | **get** /budgets/{budget_id}/scheduled_transactions | List scheduled transactions
+
+
+
+## get_scheduled_transaction_by_id
+
+> ::models::ScheduledTransactionResponse get_scheduled_transaction_by_id(ctx, budget_id, scheduled_transaction_id)
+Single scheduled transaction
+
+Returns a single scheduled transaction
+
+### Required Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context containing the authentication | nil if no authentication
+ **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) |
+ **scheduled_transaction_id** | **String**| The id of the scheduled transaction |
+
+### Return type
+
+[**::models::ScheduledTransactionResponse**](ScheduledTransactionResponse.md)
+
+### Authorization
+
+[bearer](../README.md#bearer)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+
+## get_scheduled_transactions
+
+> ::models::ScheduledTransactionsResponse get_scheduled_transactions(ctx, budget_id, optional)
+List scheduled transactions
+
+Returns all scheduled transactions
+
+### Required Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context containing the authentication | nil if no authentication
+ **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) |
+ **optional** | **map[string]interface{}** | optional parameters | nil if no parameters
+
+### Optional Parameters
+
+Optional parameters are passed through a map[string]interface{}.
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) |
+ **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. |
+
+### Return type
+
+[**::models::ScheduledTransactionsResponse**](ScheduledTransactionsResponse.md)
+
+### Authorization
+
+[bearer](../README.md#bearer)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
diff --git a/ynab-api/docs/ScheduledTransactionsResponse.md b/ynab-api/docs/ScheduledTransactionsResponse.md
new file mode 100644
index 0000000..b3dbffc
--- /dev/null
+++ b/ynab-api/docs/ScheduledTransactionsResponse.md
@@ -0,0 +1,11 @@
+# ScheduledTransactionsResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**data** | [***::models::ScheduledTransactionsResponseData**](ScheduledTransactionsResponse_data.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/ScheduledTransactionsResponseData.md b/ynab-api/docs/ScheduledTransactionsResponseData.md
new file mode 100644
index 0000000..f5bc860
--- /dev/null
+++ b/ynab-api/docs/ScheduledTransactionsResponseData.md
@@ -0,0 +1,12 @@
+# ScheduledTransactionsResponseData
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**scheduled_transactions** | [**Vec<::models::ScheduledTransactionDetail>**](ScheduledTransactionDetail.md) | |
+**server_knowledge** | **i64** | The knowledge of the server |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/SubTransaction.md b/ynab-api/docs/SubTransaction.md
new file mode 100644
index 0000000..9e48239
--- /dev/null
+++ b/ynab-api/docs/SubTransaction.md
@@ -0,0 +1,18 @@
+# SubTransaction
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **String** | |
+**transaction_id** | **String** | |
+**amount** | **i64** | The subtransaction amount in milliunits format |
+**memo** | **String** | |
+**payee_id** | **String** | |
+**category_id** | **String** | |
+**transfer_account_id** | **String** | If a transfer, the account_id which the subtransaction transfers to |
+**deleted** | **bool** | Whether or not the subtransaction has been deleted. Deleted subtransactions will only be included in delta requests. |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/TransactionDetail.md b/ynab-api/docs/TransactionDetail.md
new file mode 100644
index 0000000..f9a1de5
--- /dev/null
+++ b/ynab-api/docs/TransactionDetail.md
@@ -0,0 +1,29 @@
+# TransactionDetail
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **String** | |
+**date** | [***String**](string.md) | The transaction date in ISO format (e.g. 2016-12-01) |
+**amount** | **i64** | The transaction amount in milliunits format |
+**memo** | **String** | |
+**cleared** | **String** | The cleared status of the transaction |
+**approved** | **bool** | Whether or not the transaction is approved |
+**flag_color** | **String** | The transaction flag |
+**account_id** | **String** | |
+**payee_id** | **String** | |
+**category_id** | **String** | |
+**transfer_account_id** | **String** | If a transfer transaction, the account to which it transfers |
+**transfer_transaction_id** | **String** | If a transfer transaction, the id of transaction on the other side of the transfer |
+**matched_transaction_id** | **String** | If transaction is matched, the id of the matched transaction |
+**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'. |
+**deleted** | **bool** | Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests. |
+**account_name** | **String** | |
+**payee_name** | **String** | |
+**category_name** | **String** | |
+**subtransactions** | [**Vec<::models::SubTransaction>**](SubTransaction.md) | If a split transaction, the subtransactions. |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/TransactionDetailAllOf.md b/ynab-api/docs/TransactionDetailAllOf.md
new file mode 100644
index 0000000..f446e5d
--- /dev/null
+++ b/ynab-api/docs/TransactionDetailAllOf.md
@@ -0,0 +1,14 @@
+# TransactionDetailAllOf
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**account_name** | **String** | |
+**payee_name** | **String** | |
+**category_name** | **String** | |
+**subtransactions** | [**Vec<::models::SubTransaction>**](SubTransaction.md) | If a split transaction, the subtransactions. |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/TransactionResponse.md b/ynab-api/docs/TransactionResponse.md
new file mode 100644
index 0000000..ac81dfa
--- /dev/null
+++ b/ynab-api/docs/TransactionResponse.md
@@ -0,0 +1,11 @@
+# TransactionResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**data** | [***::models::TransactionResponseData**](TransactionResponse_data.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/TransactionResponseData.md b/ynab-api/docs/TransactionResponseData.md
new file mode 100644
index 0000000..81977f0
--- /dev/null
+++ b/ynab-api/docs/TransactionResponseData.md
@@ -0,0 +1,11 @@
+# TransactionResponseData
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**transaction** | [***::models::TransactionDetail**](TransactionDetail.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/TransactionSummary.md b/ynab-api/docs/TransactionSummary.md
new file mode 100644
index 0000000..bad149c
--- /dev/null
+++ b/ynab-api/docs/TransactionSummary.md
@@ -0,0 +1,25 @@
+# TransactionSummary
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **String** | |
+**date** | [***String**](string.md) | The transaction date in ISO format (e.g. 2016-12-01) |
+**amount** | **i64** | The transaction amount in milliunits format |
+**memo** | **String** | |
+**cleared** | **String** | The cleared status of the transaction |
+**approved** | **bool** | Whether or not the transaction is approved |
+**flag_color** | **String** | The transaction flag |
+**account_id** | **String** | |
+**payee_id** | **String** | |
+**category_id** | **String** | |
+**transfer_account_id** | **String** | If a transfer transaction, the account to which it transfers |
+**transfer_transaction_id** | **String** | If a transfer transaction, the id of transaction on the other side of the transfer |
+**matched_transaction_id** | **String** | If transaction is matched, the id of the matched transaction |
+**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'. |
+**deleted** | **bool** | Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests. |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/TransactionsApi.md b/ynab-api/docs/TransactionsApi.md
new file mode 100644
index 0000000..04b8bc3
--- /dev/null
+++ b/ynab-api/docs/TransactionsApi.md
@@ -0,0 +1,323 @@
+# \TransactionsApi
+
+All URIs are relative to *https://api.youneedabudget.com/v1*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**create_transaction**](TransactionsApi.md#create_transaction) | **post** /budgets/{budget_id}/transactions | Create a single transaction or multiple transactions
+[**get_transaction_by_id**](TransactionsApi.md#get_transaction_by_id) | **get** /budgets/{budget_id}/transactions/{transaction_id} | Single transaction
+[**get_transactions**](TransactionsApi.md#get_transactions) | **get** /budgets/{budget_id}/transactions | List transactions
+[**get_transactions_by_account**](TransactionsApi.md#get_transactions_by_account) | **get** /budgets/{budget_id}/accounts/{account_id}/transactions | List account transactions
+[**get_transactions_by_category**](TransactionsApi.md#get_transactions_by_category) | **get** /budgets/{budget_id}/categories/{category_id}/transactions | List category transactions
+[**get_transactions_by_payee**](TransactionsApi.md#get_transactions_by_payee) | **get** /budgets/{budget_id}/payees/{payee_id}/transactions | List payee transactions
+[**update_transaction**](TransactionsApi.md#update_transaction) | **put** /budgets/{budget_id}/transactions/{transaction_id} | Updates an existing transaction
+[**update_transactions**](TransactionsApi.md#update_transactions) | **patch** /budgets/{budget_id}/transactions | Update multiple transactions
+
+
+
+## create_transaction
+
+> ::models::SaveTransactionsResponse create_transaction(ctx, budget_id, data)
+Create a single transaction or multiple transactions
+
+Creates a single transaction or multiple transactions. If you provide a body containing a 'transaction' object, a single transaction will be created and if you provide a body containing a 'transactions' array, multiple transactions will be created. Scheduled transactions cannot be created on this endpoint.
+
+### Required Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context containing the authentication | nil if no authentication
+ **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) |
+ **data** | [**SaveTransactionsWrapper**](SaveTransactionsWrapper.md)| The transaction or transactions to create. To create a single transaction you can specify a value for the 'transaction' object and to create multiple transactions you can specify an array of 'transactions'. It is expected that you will only provide a value for one of these objects. |
+
+### Return type
+
+[**::models::SaveTransactionsResponse**](SaveTransactionsResponse.md)
+
+### Authorization
+
+[bearer](../README.md#bearer)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+
+## get_transaction_by_id
+
+> ::models::TransactionResponse get_transaction_by_id(ctx, budget_id, transaction_id)
+Single transaction
+
+Returns a single transaction
+
+### Required Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context containing the authentication | nil if no authentication
+ **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) |
+ **transaction_id** | **String**| The id of the transaction |
+
+### Return type
+
+[**::models::TransactionResponse**](TransactionResponse.md)
+
+### Authorization
+
+[bearer](../README.md#bearer)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+
+## get_transactions
+
+> ::models::TransactionsResponse get_transactions(ctx, budget_id, optional)
+List transactions
+
+Returns budget transactions
+
+### Required Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context containing the authentication | nil if no authentication
+ **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) |
+ **optional** | **map[string]interface{}** | optional parameters | nil if no parameters
+
+### Optional Parameters
+
+Optional parameters are passed through a map[string]interface{}.
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) |
+ **since_date** | **String**| If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). |
+ **_type** | **String**| If specified, only transactions of the specified type will be included. 'uncategorized' and 'unapproved' are currently supported. |
+ **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. |
+
+### Return type
+
+[**::models::TransactionsResponse**](TransactionsResponse.md)
+
+### Authorization
+
+[bearer](../README.md#bearer)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+
+## get_transactions_by_account
+
+> ::models::TransactionsResponse get_transactions_by_account(ctx, budget_id, account_id, optional)
+List account transactions
+
+Returns all transactions for a specified account
+
+### Required Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context containing the authentication | nil if no authentication
+ **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) |
+ **account_id** | **String**| The id of the account |
+ **optional** | **map[string]interface{}** | optional parameters | nil if no parameters
+
+### Optional Parameters
+
+Optional parameters are passed through a map[string]interface{}.
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) |
+ **account_id** | **String**| The id of the account |
+ **since_date** | **String**| If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). |
+ **_type** | **String**| If specified, only transactions of the specified type will be included. 'uncategorized' and 'unapproved' are currently supported. |
+ **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. |
+
+### Return type
+
+[**::models::TransactionsResponse**](TransactionsResponse.md)
+
+### Authorization
+
+[bearer](../README.md#bearer)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+
+## get_transactions_by_category
+
+> ::models::HybridTransactionsResponse get_transactions_by_category(ctx, budget_id, category_id, optional)
+List category transactions
+
+Returns all transactions for a specified category
+
+### Required Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context containing the authentication | nil if no authentication
+ **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) |
+ **category_id** | **String**| The id of the category |
+ **optional** | **map[string]interface{}** | optional parameters | nil if no parameters
+
+### Optional Parameters
+
+Optional parameters are passed through a map[string]interface{}.
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) |
+ **category_id** | **String**| The id of the category |
+ **since_date** | **String**| If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). |
+ **_type** | **String**| If specified, only transactions of the specified type will be included. 'uncategorized' and 'unapproved' are currently supported. |
+ **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. |
+
+### Return type
+
+[**::models::HybridTransactionsResponse**](HybridTransactionsResponse.md)
+
+### Authorization
+
+[bearer](../README.md#bearer)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+
+## get_transactions_by_payee
+
+> ::models::HybridTransactionsResponse get_transactions_by_payee(ctx, budget_id, payee_id, optional)
+List payee transactions
+
+Returns all transactions for a specified payee
+
+### Required Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context containing the authentication | nil if no authentication
+ **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) |
+ **payee_id** | **String**| The id of the payee |
+ **optional** | **map[string]interface{}** | optional parameters | nil if no parameters
+
+### Optional Parameters
+
+Optional parameters are passed through a map[string]interface{}.
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) |
+ **payee_id** | **String**| The id of the payee |
+ **since_date** | **String**| If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). |
+ **_type** | **String**| If specified, only transactions of the specified type will be included. 'uncategorized' and 'unapproved' are currently supported. |
+ **last_knowledge_of_server** | **i64**| The starting server knowledge. If provided, only entities that have changed since last_knowledge_of_server will be included. |
+
+### Return type
+
+[**::models::HybridTransactionsResponse**](HybridTransactionsResponse.md)
+
+### Authorization
+
+[bearer](../README.md#bearer)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+
+## update_transaction
+
+> ::models::TransactionResponse update_transaction(ctx, budget_id, transaction_id, data)
+Updates an existing transaction
+
+Updates a transaction
+
+### Required Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context containing the authentication | nil if no authentication
+ **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) |
+ **transaction_id** | **String**| The id of the transaction |
+ **data** | [**SaveTransactionWrapper**](SaveTransactionWrapper.md)| The transaction to update |
+
+### Return type
+
+[**::models::TransactionResponse**](TransactionResponse.md)
+
+### Authorization
+
+[bearer](../README.md#bearer)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+
+## update_transactions
+
+> ::models::SaveTransactionsResponse update_transactions(ctx, budget_id, data)
+Update multiple transactions
+
+Updates multiple transactions, by 'id' or 'import_id'.
+
+### Required Parameters
+
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **ctx** | **context.Context** | context containing the authentication | nil if no authentication
+ **budget_id** | **String**| The id of the budget (\"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget) |
+ **data** | [**SaveTransactionsWrapper**](SaveTransactionsWrapper.md)| The transactions to update. Optionally, transaction 'id' value(s) can be specified as null and an 'import_id' value can be provided which will allow transaction(s) to updated by their import_id. |
+
+### Return type
+
+[**::models::SaveTransactionsResponse**](SaveTransactionsResponse.md)
+
+### Authorization
+
+[bearer](../README.md#bearer)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
diff --git a/ynab-api/docs/TransactionsResponse.md b/ynab-api/docs/TransactionsResponse.md
new file mode 100644
index 0000000..fec6f21
--- /dev/null
+++ b/ynab-api/docs/TransactionsResponse.md
@@ -0,0 +1,11 @@
+# TransactionsResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**data** | [***::models::TransactionsResponseData**](TransactionsResponse_data.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/TransactionsResponseData.md b/ynab-api/docs/TransactionsResponseData.md
new file mode 100644
index 0000000..2b64bf7
--- /dev/null
+++ b/ynab-api/docs/TransactionsResponseData.md
@@ -0,0 +1,12 @@
+# TransactionsResponseData
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**transactions** | [**Vec<::models::TransactionDetail>**](TransactionDetail.md) | |
+**server_knowledge** | **i64** | The knowledge of the server |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/User.md b/ynab-api/docs/User.md
new file mode 100644
index 0000000..28cb9e0
--- /dev/null
+++ b/ynab-api/docs/User.md
@@ -0,0 +1,11 @@
+# User
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **String** | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/UserApi.md b/ynab-api/docs/UserApi.md
new file mode 100644
index 0000000..c2f9359
--- /dev/null
+++ b/ynab-api/docs/UserApi.md
@@ -0,0 +1,36 @@
+# \UserApi
+
+All URIs are relative to *https://api.youneedabudget.com/v1*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**get_user**](UserApi.md#get_user) | **get** /user | User info
+
+
+
+## get_user
+
+> ::models::UserResponse get_user(ctx, )
+User info
+
+Returns authenticated user information
+
+### Required Parameters
+
+This endpoint does not need any parameter.
+
+### Return type
+
+[**::models::UserResponse**](UserResponse.md)
+
+### Authorization
+
+[bearer](../README.md#bearer)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
diff --git a/ynab-api/docs/UserResponse.md b/ynab-api/docs/UserResponse.md
new file mode 100644
index 0000000..31b0d2f
--- /dev/null
+++ b/ynab-api/docs/UserResponse.md
@@ -0,0 +1,11 @@
+# UserResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**data** | [***::models::UserResponseData**](UserResponse_data.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/docs/UserResponseData.md b/ynab-api/docs/UserResponseData.md
new file mode 100644
index 0000000..3aff41b
--- /dev/null
+++ b/ynab-api/docs/UserResponseData.md
@@ -0,0 +1,11 @@
+# UserResponseData
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**user** | [***::models::User**](User.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/ynab-api/git_push.sh b/ynab-api/git_push.sh
new file mode 100644
index 0000000..8442b80
--- /dev/null
+++ b/ynab-api/git_push.sh
@@ -0,0 +1,52 @@
+#!/bin/sh
+# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
+#
+# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update"
+
+git_user_id=$1
+git_repo_id=$2
+release_note=$3
+
+if [ "$git_user_id" = "" ]; then
+ git_user_id="GIT_USER_ID"
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
+fi
+
+if [ "$git_repo_id" = "" ]; then
+ git_repo_id="GIT_REPO_ID"
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
+fi
+
+if [ "$release_note" = "" ]; then
+ release_note="Minor update"
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
+fi
+
+# Initialize the local directory as a Git repository
+git init
+
+# Adds the files in the local repository and stages them for commit.
+git add .
+
+# Commits the tracked changes and prepares them to be pushed to a remote repository.
+git commit -m "$release_note"
+
+# Sets the new remote
+git_remote=`git remote`
+if [ "$git_remote" = "" ]; then # git remote not defined
+
+ if [ "$GIT_TOKEN" = "" ]; then
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
+ git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
+ else
+ git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
+ fi
+
+fi
+
+git pull origin master
+
+# Pushes (Forces) the changes in the local repository up to the remote repository
+echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
+git push origin master 2>&1 | grep -v 'To https'
+
diff --git a/ynab-api/src/apis/accounts_api.rs b/ynab-api/src/apis/accounts_api.rs
new file mode 100644
index 0000000..616476e
--- /dev/null
+++ b/ynab-api/src/apis/accounts_api.rs
@@ -0,0 +1,87 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+use std::rc::Rc;
+use std::borrow::Borrow;
+
+use reqwest;
+
+use super::{Error, configuration, urlencode};
+
+pub struct AccountsApiClient {
+ configuration: Rc<configuration::Configuration>,
+}
+
+impl AccountsApiClient {
+ pub fn new(configuration: Rc<configuration::Configuration>) -> AccountsApiClient {
+ AccountsApiClient {
+ configuration: configuration,
+ }
+ }
+}
+
+pub trait AccountsApi {
+ fn get_account_by_id(&self, budget_id: &str, account_id: &str) -> Result<::models::AccountResponse, Error>;
+ fn get_accounts(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::AccountsResponse, Error>;
+}
+
+impl AccountsApi for AccountsApiClient {
+ fn get_account_by_id(&self, budget_id: &str, account_id: &str) -> Result<::models::AccountResponse, Error> {
+ let configuration: &configuration::Configuration = self.configuration.borrow();
+ let client = &configuration.client;
+
+ let uri_str = format!("{}/budgets/{budget_id}/accounts/{account_id}", configuration.base_path, budget_id=urlencode(budget_id), account_id=account_id);
+ let mut req_builder = client.get(uri_str.as_str());
+
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
+ }
+ if let Some(ref apikey) = configuration.api_key {
+ let key = apikey.key.clone();
+ let val = match apikey.prefix {
+ Some(ref prefix) => format!("{} {}", prefix, key),
+ None => key,
+ };
+ req_builder = req_builder.header("Authorization", val);
+ };
+
+ // send request
+ let req = req_builder.build()?;
+
+ Ok(client.execute(req)?.error_for_status()?.json()?)
+ }
+
+ fn get_accounts(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::AccountsResponse, Error> {
+ let configuration: &configuration::Configuration = self.configuration.borrow();
+ let client = &configuration.client;
+
+ let uri_str = format!("{}/budgets/{budget_id}/accounts", configuration.base_path, budget_id=urlencode(budget_id));
+ let mut req_builder = client.get(uri_str.as_str());
+
+ req_builder = req_builder.query(&[("last_knowledge_of_server", &last_knowledge_of_server.to_string())]);
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
+ }
+ if let Some(ref apikey) = configuration.api_key {
+ let key = apikey.key.clone();
+ let val = match apikey.prefix {
+ Some(ref prefix) => format!("{} {}", prefix, key),
+ None => key,
+ };
+ req_builder = req_builder.header("Authorization", val);
+ };
+
+ // send request
+ let req = req_builder.build()?;
+
+ Ok(client.execute(req)?.error_for_status()?.json()?)
+ }
+
+}
diff --git a/ynab-api/src/apis/budgets_api.rs b/ynab-api/src/apis/budgets_api.rs
new file mode 100644
index 0000000..663dc59
--- /dev/null
+++ b/ynab-api/src/apis/budgets_api.rs
@@ -0,0 +1,113 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+use std::rc::Rc;
+use std::borrow::Borrow;
+
+use reqwest;
+
+use super::{Error, configuration, urlencode};
+
+pub struct BudgetsApiClient {
+ configuration: Rc<configuration::Configuration>,
+}
+
+impl BudgetsApiClient {
+ pub fn new(configuration: Rc<configuration::Configuration>) -> BudgetsApiClient {
+ BudgetsApiClient {
+ configuration: configuration,
+ }
+ }
+}
+
+pub trait BudgetsApi {
+ fn get_budget_by_id(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::BudgetDetailResponse, Error>;
+ fn get_budget_settings_by_id(&self, budget_id: &str) -> Result<::models::BudgetSettingsResponse, Error>;
+ fn get_budgets(&self, ) -> Result<::models::BudgetSummaryResponse, Error>;
+}
+
+impl BudgetsApi for BudgetsApiClient {
+ fn get_budget_by_id(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::BudgetDetailResponse, Error> {
+ let configuration: &configuration::Configuration = self.configuration.borrow();
+ let client = &configuration.client;
+
+ let uri_str = format!("{}/budgets/{budget_id}", configuration.base_path, budget_id=urlencode(budget_id));
+ let mut req_builder = client.get(uri_str.as_str());
+
+ req_builder = req_builder.query(&[("last_knowledge_of_server", &last_knowledge_of_server.to_string())]);
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
+ }
+ if let Some(ref apikey) = configuration.api_key {
+ let key = apikey.key.clone();
+ let val = match apikey.prefix {
+ Some(ref prefix) => format!("{} {}", prefix, key),
+ None => key,
+ };
+ req_builder = req_builder.header("Authorization", val);
+ };
+
+ // send request
+ let req = req_builder.build()?;
+
+ Ok(client.execute(req)?.error_for_status()?.json()?)
+ }
+
+ fn get_budget_settings_by_id(&self, budget_id: &str) -> Result<::models::BudgetSettingsResponse, Error> {
+ let configuration: &configuration::Configuration = self.configuration.borrow();
+ let client = &configuration.client;
+
+ let uri_str = format!("{}/budgets/{budget_id}/settings", configuration.base_path, budget_id=urlencode(budget_id));
+ let mut req_builder = client.get(uri_str.as_str());
+
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
+ }
+ if let Some(ref apikey) = configuration.api_key {
+ let key = apikey.key.clone();
+ let val = match apikey.prefix {
+ Some(ref prefix) => format!("{} {}", prefix, key),
+ None => key,
+ };
+ req_builder = req_builder.header("Authorization", val);
+ };
+
+ // send request
+ let req = req_builder.build()?;
+
+ Ok(client.execute(req)?.error_for_status()?.json()?)
+ }
+
+ fn get_budgets(&self, ) -> Result<::models::BudgetSummaryResponse, Error> {
+ let configuration: &configuration::Configuration = self.configuration.borrow();
+ let client = &configuration.client;
+
+ let uri_str = format!("{}/budgets", configuration.base_path);
+ let mut req_builder = client.get(uri_str.as_str());
+
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
+ }
+ if let Some(ref apikey) = configuration.api_key {
+ let key = apikey.key.clone();
+ let val = match apikey.prefix {
+ Some(ref prefix) => format!("{} {}", prefix, key),
+ None => key,
+ };
+ req_builder = req_builder.header("Authorization", val);
+ };
+
+ // send request
+ let req = req_builder.build()?;
+
+ Ok(client.execute(req)?.error_for_status()?.json()?)
+ }
+
+}
diff --git a/ynab-api/src/apis/categories_api.rs b/ynab-api/src/apis/categories_api.rs
new file mode 100644
index 0000000..417a2d9
--- /dev/null
+++ b/ynab-api/src/apis/categories_api.rs
@@ -0,0 +1,140 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+use std::rc::Rc;
+use std::borrow::Borrow;
+
+use reqwest;
+
+use super::{Error, configuration, urlencode};
+
+pub struct CategoriesApiClient {
+ configuration: Rc<configuration::Configuration>,
+}
+
+impl CategoriesApiClient {
+ pub fn new(configuration: Rc<configuration::Configuration>) -> CategoriesApiClient {
+ CategoriesApiClient {
+ configuration: configuration,
+ }
+ }
+}
+
+pub trait CategoriesApi {
+ fn get_categories(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::CategoriesResponse, Error>;
+ fn get_category_by_id(&self, budget_id: &str, category_id: &str) -> Result<::models::CategoryResponse, Error>;
+ fn get_month_category_by_id(&self, budget_id: &str, month: String, category_id: &str) -> Result<::models::CategoryResponse, Error>;
+ fn update_month_category(&self, budget_id: &str, month: String, category_id: &str, data: ::models::SaveMonthCategoryWrapper) -> Result<::models::SaveCategoryResponse, Error>;
+}
+
+impl CategoriesApi for CategoriesApiClient {
+ fn get_categories(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::CategoriesResponse, Error> {
+ let configuration: &configuration::Configuration = self.configuration.borrow();
+ let client = &configuration.client;
+
+ let uri_str = format!("{}/budgets/{budget_id}/categories", configuration.base_path, budget_id=urlencode(budget_id));
+ let mut req_builder = client.get(uri_str.as_str());
+
+ req_builder = req_builder.query(&[("last_knowledge_of_server", &last_knowledge_of_server.to_string())]);
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
+ }
+ if let Some(ref apikey) = configuration.api_key {
+ let key = apikey.key.clone();
+ let val = match apikey.prefix {
+ Some(ref prefix) => format!("{} {}", prefix, key),
+ None => key,
+ };
+ req_builder = req_builder.header("Authorization", val);
+ };
+
+ // send request
+ let req = req_builder.build()?;
+
+ Ok(client.execute(req)?.error_for_status()?.json()?)
+ }
+
+ fn get_category_by_id(&self, budget_id: &str, category_id: &str) -> Result<::models::CategoryResponse, Error> {
+ let configuration: &configuration::Configuration = self.configuration.borrow();
+ let client = &configuration.client;
+
+ let uri_str = format!("{}/budgets/{budget_id}/categories/{category_id}", configuration.base_path, budget_id=urlencode(budget_id), category_id=urlencode(category_id));
+ let mut req_builder = client.get(uri_str.as_str());
+
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
+ }
+ if let Some(ref apikey) = configuration.api_key {
+ let key = apikey.key.clone();
+ let val = match apikey.prefix {
+ Some(ref prefix) => format!("{} {}", prefix, key),
+ None => key,
+ };
+ req_builder = req_builder.header("Authorization", val);
+ };
+
+ // send request
+ let req = req_builder.build()?;
+
+ Ok(client.execute(req)?.error_for_status()?.json()?)
+ }
+
+ fn get_month_category_by_id(&self, budget_id: &str, month: String, category_id: &str) -> Result<::models::CategoryResponse, Error> {
+ let configuration: &configuration::Configuration = self.configuration.borrow();
+ let client = &configuration.client;
+
+ let uri_str = format!("{}/budgets/{budget_id}/months/{month}/categories/{category_id}", configuration.base_path, budget_id=urlencode(budget_id), month=month, category_id=urlencode(category_id));
+ let mut req_builder = client.get(uri_str.as_str());
+
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
+ }
+ if let Some(ref apikey) = configuration.api_key {
+ let key = apikey.key.clone();
+ let val = match apikey.prefix {
+ Some(ref prefix) => format!("{} {}", prefix, key),
+ None => key,
+ };
+ req_builder = req_builder.header("Authorization", val);
+ };
+
+ // send request
+ let req = req_builder.build()?;
+
+ Ok(client.execute(req)?.error_for_status()?.json()?)
+ }
+
+ fn update_month_category(&self, budget_id: &str, month: String, category_id: &str, data: ::models::SaveMonthCategoryWrapper) -> Result<::models::SaveCategoryResponse, Error> {
+ let configuration: &configuration::Configuration = self.configuration.borrow();
+ let client = &configuration.client;
+
+ let uri_str = format!("{}/budgets/{budget_id}/months/{month}/categories/{category_id}", configuration.base_path, budget_id=urlencode(budget_id), month=month, category_id=urlencode(category_id));
+ let mut req_builder = client.patch(uri_str.as_str());
+
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
+ }
+ if let Some(ref apikey) = configuration.api_key {
+ let key = apikey.key.clone();
+ let val = match apikey.prefix {
+ Some(ref prefix) => format!("{} {}", prefix, key),
+ None => key,
+ };
+ req_builder = req_builder.header("Authorization", val);
+ };
+ req_builder = req_builder.json(&data);
+
+ // send request
+ let req = req_builder.build()?;
+
+ Ok(client.execute(req)?.error_for_status()?.json()?)
+ }
+
+}
diff --git a/ynab-api/src/apis/client.rs b/ynab-api/src/apis/client.rs
new file mode 100644
index 0000000..2776f11
--- /dev/null
+++ b/ynab-api/src/apis/client.rs
@@ -0,0 +1,78 @@
+use std::rc::Rc;
+
+use super::configuration::Configuration;
+
+pub struct APIClient {
+ configuration: Rc<Configuration>,
+ accounts_api: Box<::apis::AccountsApi>,
+ budgets_api: Box<::apis::BudgetsApi>,
+ categories_api: Box<::apis::CategoriesApi>,
+ deprecated_api: Box<::apis::DeprecatedApi>,
+ months_api: Box<::apis::MonthsApi>,
+ payee_locations_api: Box<::apis::PayeeLocationsApi>,
+ payees_api: Box<::apis::PayeesApi>,
+ scheduled_transactions_api: Box<::apis::ScheduledTransactionsApi>,
+ transactions_api: Box<::apis::TransactionsApi>,
+ user_api: Box<::apis::UserApi>,
+}
+
+impl APIClient {
+ pub fn new(configuration: Configuration) -> APIClient {
+ let rc = Rc::new(configuration);
+
+ APIClient {
+ configuration: rc.clone(),
+ accounts_api: Box::new(::apis::AccountsApiClient::new(rc.clone())),
+ budgets_api: Box::new(::apis::BudgetsApiClient::new(rc.clone())),
+ categories_api: Box::new(::apis::CategoriesApiClient::new(rc.clone())),
+ deprecated_api: Box::new(::apis::DeprecatedApiClient::new(rc.clone())),
+ months_api: Box::new(::apis::MonthsApiClient::new(rc.clone())),
+ payee_locations_api: Box::new(::apis::PayeeLocationsApiClient::new(rc.clone())),
+ payees_api: Box::new(::apis::PayeesApiClient::new(rc.clone())),
+ scheduled_transactions_api: Box::new(::apis::ScheduledTransactionsApiClient::new(rc.clone())),
+ transactions_api: Box::new(::apis::TransactionsApiClient::new(rc.clone())),
+ user_api: Box::new(::apis::UserApiClient::new(rc.clone())),
+ }
+ }
+
+ pub fn accounts_api(&self) -> &::apis::AccountsApi{
+ self.accounts_api.as_ref()
+ }
+
+ pub fn budgets_api(&self) -> &::apis::BudgetsApi{
+ self.budgets_api.as_ref()
+ }
+
+ pub fn categories_api(&self) -> &::apis::CategoriesApi{
+ self.categories_api.as_ref()
+ }
+
+ pub fn deprecated_api(&self) -> &::apis::DeprecatedApi{
+ self.deprecated_api.as_ref()
+ }
+
+ pub fn months_api(&self) -> &::apis::MonthsApi{
+ self.months_api.as_ref()
+ }
+
+ pub fn payee_locations_api(&self) -> &::apis::PayeeLocationsApi{
+ self.payee_locations_api.as_ref()
+ }
+
+ pub fn payees_api(&self) -> &::apis::PayeesApi{
+ self.payees_api.as_ref()
+ }
+
+ pub fn scheduled_transactions_api(&self) -> &::apis::ScheduledTransactionsApi{
+ self.scheduled_transactions_api.as_ref()
+ }
+
+ pub fn transactions_api(&self) -> &::apis::TransactionsApi{
+ self.transactions_api.as_ref()
+ }
+
+ pub fn user_api(&self) -> &::apis::UserApi{
+ self.user_api.as_ref()
+ }
+
+}
diff --git a/ynab-api/src/apis/configuration.rs b/ynab-api/src/apis/configuration.rs
new file mode 100644
index 0000000..4378dfa
--- /dev/null
+++ b/ynab-api/src/apis/configuration.rs
@@ -0,0 +1,50 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+use reqwest;
+
+pub struct Configuration {
+ pub base_path: String,
+ pub user_agent: Option<String>,
+ pub client: reqwest::Client,
+ pub basic_auth: Option<BasicAuth>,
+ pub oauth_access_token: Option<String>,
+ pub bearer_access_token: Option<String>,
+ pub api_key: Option<ApiKey>,
+ // TODO: take an oauth2 token source, similar to the go one
+}
+
+pub type BasicAuth = (String, Option<String>);
+
+pub struct ApiKey {
+ pub prefix: Option<String>,
+ pub key: String,
+}
+
+impl Configuration {
+ pub fn new() -> Configuration {
+ Configuration::default()
+ }
+}
+
+impl Default for Configuration {
+ fn default() -> Self {
+ Configuration {
+ base_path: "https://api.youneedabudget.com/v1".to_owned(),
+ user_agent: Some("OpenAPI-Generator/1.0.0/rust".to_owned()),
+ client: reqwest::Client::new(),
+ basic_auth: None,
+ oauth_access_token: None,
+ bearer_access_token: None,
+ api_key: None,
+ }
+ }
+}
diff --git a/ynab-api/src/apis/deprecated_api.rs b/ynab-api/src/apis/deprecated_api.rs
new file mode 100644
index 0000000..a148248
--- /dev/null
+++ b/ynab-api/src/apis/deprecated_api.rs
@@ -0,0 +1,61 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+use std::rc::Rc;
+use std::borrow::Borrow;
+
+use reqwest;
+
+use super::{Error, configuration, urlencode};
+
+pub struct DeprecatedApiClient {
+ configuration: Rc<configuration::Configuration>,
+}
+
+impl DeprecatedApiClient {
+ pub fn new(configuration: Rc<configuration::Configuration>) -> DeprecatedApiClient {
+ DeprecatedApiClient {
+ configuration: configuration,
+ }
+ }
+}
+
+pub trait DeprecatedApi {
+ fn bulk_create_transactions(&self, budget_id: &str, transactions: ::models::BulkTransactions) -> Result<::models::BulkResponse, Error>;
+}
+
+impl DeprecatedApi for DeprecatedApiClient {
+ fn bulk_create_transactions(&self, budget_id: &str, transactions: ::models::BulkTransactions) -> Result<::models::BulkResponse, Error> {
+ let configuration: &configuration::Configuration = self.configuration.borrow();
+ let client = &configuration.client;
+
+ let uri_str = format!("{}/budgets/{budget_id}/transactions/bulk", configuration.base_path, budget_id=urlencode(budget_id));
+ let mut req_builder = client.post(uri_str.as_str());
+
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
+ }
+ if let Some(ref apikey) = configuration.api_key {
+ let key = apikey.key.clone();
+ let val = match apikey.prefix {
+ Some(ref prefix) => format!("{} {}", prefix, key),
+ None => key,
+ };
+ req_builder = req_builder.header("Authorization", val);
+ };
+ req_builder = req_builder.json(&transactions);
+
+ // send request
+ let req = req_builder.build()?;
+
+ Ok(client.execute(req)?.error_for_status()?.json()?)
+ }
+
+}
diff --git a/ynab-api/src/apis/mod.rs b/ynab-api/src/apis/mod.rs
new file mode 100644
index 0000000..910bd7e
--- /dev/null
+++ b/ynab-api/src/apis/mod.rs
@@ -0,0 +1,57 @@
+use reqwest;
+use serde_json;
+
+#[derive(Debug)]
+pub enum Error {
+ Reqwest(reqwest::Error),
+ Serde(serde_json::Error),
+ Io(std::io::Error),
+}
+
+impl From<reqwest::Error> for Error {
+ fn from(e: reqwest::Error) -> Self {
+ Error::Reqwest(e)
+ }
+}
+
+impl From<serde_json::Error> for Error {
+ fn from(e: serde_json::Error) -> Self {
+ Error::Serde(e)
+ }
+}
+
+impl From<std::io::Error> for Error {
+ fn from(e: std::io::Error) -> Self {
+ Error::Io(e)
+ }
+}
+
+pub fn urlencode<T: AsRef<str>>(s: T) -> String {
+ ::url::form_urlencoded::byte_serialize(s.as_ref().as_bytes()).collect()
+}
+
+use super::models::*;
+
+mod accounts_api;
+pub use self::accounts_api::{ AccountsApi, AccountsApiClient };
+mod budgets_api;
+pub use self::budgets_api::{ BudgetsApi, BudgetsApiClient };
+mod categories_api;
+pub use self::categories_api::{ CategoriesApi, CategoriesApiClient };
+mod deprecated_api;
+pub use self::deprecated_api::{ DeprecatedApi, DeprecatedApiClient };
+mod months_api;
+pub use self::months_api::{ MonthsApi, MonthsApiClient };
+mod payee_locations_api;
+pub use self::payee_locations_api::{ PayeeLocationsApi, PayeeLocationsApiClient };
+mod payees_api;
+pub use self::payees_api::{ PayeesApi, PayeesApiClient };
+mod scheduled_transactions_api;
+pub use self::scheduled_transactions_api::{ ScheduledTransactionsApi, ScheduledTransactionsApiClient };
+mod transactions_api;
+pub use self::transactions_api::{ TransactionsApi, TransactionsApiClient };
+mod user_api;
+pub use self::user_api::{ UserApi, UserApiClient };
+
+pub mod configuration;
+pub mod client;
diff --git a/ynab-api/src/apis/months_api.rs b/ynab-api/src/apis/months_api.rs
new file mode 100644
index 0000000..3bee3fe
--- /dev/null
+++ b/ynab-api/src/apis/months_api.rs
@@ -0,0 +1,87 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+use std::rc::Rc;
+use std::borrow::Borrow;
+
+use reqwest;
+
+use super::{Error, configuration, urlencode};
+
+pub struct MonthsApiClient {
+ configuration: Rc<configuration::Configuration>,
+}
+
+impl MonthsApiClient {
+ pub fn new(configuration: Rc<configuration::Configuration>) -> MonthsApiClient {
+ MonthsApiClient {
+ configuration: configuration,
+ }
+ }
+}
+
+pub trait MonthsApi {
+ fn get_budget_month(&self, budget_id: &str, month: String) -> Result<::models::MonthDetailResponse, Error>;
+ fn get_budget_months(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::MonthSummariesResponse, Error>;
+}
+
+impl MonthsApi for MonthsApiClient {
+ fn get_budget_month(&self, budget_id: &str, month: String) -> Result<::models::MonthDetailResponse, Error> {
+ let configuration: &configuration::Configuration = self.configuration.borrow();
+ let client = &configuration.client;
+
+ let uri_str = format!("{}/budgets/{budget_id}/months/{month}", configuration.base_path, budget_id=urlencode(budget_id), month=month);
+ let mut req_builder = client.get(uri_str.as_str());
+
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
+ }
+ if let Some(ref apikey) = configuration.api_key {
+ let key = apikey.key.clone();
+ let val = match apikey.prefix {
+ Some(ref prefix) => format!("{} {}", prefix, key),
+ None => key,
+ };
+ req_builder = req_builder.header("Authorization", val);
+ };
+
+ // send request
+ let req = req_builder.build()?;
+
+ Ok(client.execute(req)?.error_for_status()?.json()?)
+ }
+
+ fn get_budget_months(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::MonthSummariesResponse, Error> {
+ let configuration: &configuration::Configuration = self.configuration.borrow();
+ let client = &configuration.client;
+
+ let uri_str = format!("{}/budgets/{budget_id}/months", configuration.base_path, budget_id=urlencode(budget_id));
+ let mut req_builder = client.get(uri_str.as_str());
+
+ req_builder = req_builder.query(&[("last_knowledge_of_server", &last_knowledge_of_server.to_string())]);
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
+ }
+ if let Some(ref apikey) = configuration.api_key {
+ let key = apikey.key.clone();
+ let val = match apikey.prefix {
+ Some(ref prefix) => format!("{} {}", prefix, key),
+ None => key,
+ };
+ req_builder = req_builder.header("Authorization", val);
+ };
+
+ // send request
+ let req = req_builder.build()?;
+
+ Ok(client.execute(req)?.error_for_status()?.json()?)
+ }
+
+}
diff --git a/ynab-api/src/apis/payee_locations_api.rs b/ynab-api/src/apis/payee_locations_api.rs
new file mode 100644
index 0000000..88f12e1
--- /dev/null
+++ b/ynab-api/src/apis/payee_locations_api.rs
@@ -0,0 +1,112 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+use std::rc::Rc;
+use std::borrow::Borrow;
+
+use reqwest;
+
+use super::{Error, configuration, urlencode};
+
+pub struct PayeeLocationsApiClient {
+ configuration: Rc<configuration::Configuration>,
+}
+
+impl PayeeLocationsApiClient {
+ pub fn new(configuration: Rc<configuration::Configuration>) -> PayeeLocationsApiClient {
+ PayeeLocationsApiClient {
+ configuration: configuration,
+ }
+ }
+}
+
+pub trait PayeeLocationsApi {
+ fn get_payee_location_by_id(&self, budget_id: &str, payee_location_id: &str) -> Result<::models::PayeeLocationResponse, Error>;
+ fn get_payee_locations(&self, budget_id: &str) -> Result<::models::PayeeLocationsResponse, Error>;
+ fn get_payee_locations_by_payee(&self, budget_id: &str, payee_id: &str) -> Result<::models::PayeeLocationsResponse, Error>;
+}
+
+impl PayeeLocationsApi for PayeeLocationsApiClient {
+ fn get_payee_location_by_id(&self, budget_id: &str, payee_location_id: &str) -> Result<::models::PayeeLocationResponse, Error> {
+ let configuration: &configuration::Configuration = self.configuration.borrow();
+ let client = &configuration.client;
+
+ let uri_str = format!("{}/budgets/{budget_id}/payee_locations/{payee_location_id}", configuration.base_path, budget_id=urlencode(budget_id), payee_location_id=urlencode(payee_location_id));
+ let mut req_builder = client.get(uri_str.as_str());
+
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
+ }
+ if let Some(ref apikey) = configuration.api_key {
+ let key = apikey.key.clone();
+ let val = match apikey.prefix {
+ Some(ref prefix) => format!("{} {}", prefix, key),
+ None => key,
+ };
+ req_builder = req_builder.header("Authorization", val);
+ };
+
+ // send request
+ let req = req_builder.build()?;
+
+ Ok(client.execute(req)?.error_for_status()?.json()?)
+ }
+
+ fn get_payee_locations(&self, budget_id: &str) -> Result<::models::PayeeLocationsResponse, Error> {
+ let configuration: &configuration::Configuration = self.configuration.borrow();
+ let client = &configuration.client;
+
+ let uri_str = format!("{}/budgets/{budget_id}/payee_locations", configuration.base_path, budget_id=urlencode(budget_id));
+ let mut req_builder = client.get(uri_str.as_str());
+
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
+ }
+ if let Some(ref apikey) = configuration.api_key {
+ let key = apikey.key.clone();
+ let val = match apikey.prefix {
+ Some(ref prefix) => format!("{} {}", prefix, key),
+ None => key,
+ };
+ req_builder = req_builder.header("Authorization", val);
+ };
+
+ // send request
+ let req = req_builder.build()?;
+
+ Ok(client.execute(req)?.error_for_status()?.json()?)
+ }
+
+ fn get_payee_locations_by_payee(&self, budget_id: &str, payee_id: &str) -> Result<::models::PayeeLocationsResponse, Error> {
+ let configuration: &configuration::Configuration = self.configuration.borrow();
+ let client = &configuration.client;
+
+ let uri_str = format!("{}/budgets/{budget_id}/payees/{payee_id}/payee_locations", configuration.base_path, budget_id=urlencode(budget_id), payee_id=urlencode(payee_id));
+ let mut req_builder = client.get(uri_str.as_str());
+
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
+ }
+ if let Some(ref apikey) = configuration.api_key {
+ let key = apikey.key.clone();
+ let val = match apikey.prefix {
+ Some(ref prefix) => format!("{} {}", prefix, key),
+ None => key,
+ };
+ req_builder = req_builder.header("Authorization", val);
+ };
+
+ // send request
+ let req = req_builder.build()?;
+
+ Ok(client.execute(req)?.error_for_status()?.json()?)
+ }
+
+}
diff --git a/ynab-api/src/apis/payees_api.rs b/ynab-api/src/apis/payees_api.rs
new file mode 100644
index 0000000..77db5bb
--- /dev/null
+++ b/ynab-api/src/apis/payees_api.rs
@@ -0,0 +1,87 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+use std::rc::Rc;
+use std::borrow::Borrow;
+
+use reqwest;
+
+use super::{Error, configuration, urlencode};
+
+pub struct PayeesApiClient {
+ configuration: Rc<configuration::Configuration>,
+}
+
+impl PayeesApiClient {
+ pub fn new(configuration: Rc<configuration::Configuration>) -> PayeesApiClient {
+ PayeesApiClient {
+ configuration: configuration,
+ }
+ }
+}
+
+pub trait PayeesApi {
+ fn get_payee_by_id(&self, budget_id: &str, payee_id: &str) -> Result<::models::PayeeResponse, Error>;
+ fn get_payees(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::PayeesResponse, Error>;
+}
+
+impl PayeesApi for PayeesApiClient {
+ fn get_payee_by_id(&self, budget_id: &str, payee_id: &str) -> Result<::models::PayeeResponse, Error> {
+ let configuration: &configuration::Configuration = self.configuration.borrow();
+ let client = &configuration.client;
+
+ let uri_str = format!("{}/budgets/{budget_id}/payees/{payee_id}", configuration.base_path, budget_id=urlencode(budget_id), payee_id=urlencode(payee_id));
+ let mut req_builder = client.get(uri_str.as_str());
+
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
+ }
+ if let Some(ref apikey) = configuration.api_key {
+ let key = apikey.key.clone();
+ let val = match apikey.prefix {
+ Some(ref prefix) => format!("{} {}", prefix, key),
+ None => key,
+ };
+ req_builder = req_builder.header("Authorization", val);
+ };
+
+ // send request
+ let req = req_builder.build()?;
+
+ Ok(client.execute(req)?.error_for_status()?.json()?)
+ }
+
+ fn get_payees(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::PayeesResponse, Error> {
+ let configuration: &configuration::Configuration = self.configuration.borrow();
+ let client = &configuration.client;
+
+ let uri_str = format!("{}/budgets/{budget_id}/payees", configuration.base_path, budget_id=urlencode(budget_id));
+ let mut req_builder = client.get(uri_str.as_str());
+
+ req_builder = req_builder.query(&[("last_knowledge_of_server", &last_knowledge_of_server.to_string())]);
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
+ }
+ if let Some(ref apikey) = configuration.api_key {
+ let key = apikey.key.clone();
+ let val = match apikey.prefix {
+ Some(ref prefix) => format!("{} {}", prefix, key),
+ None => key,
+ };
+ req_builder = req_builder.header("Authorization", val);
+ };
+
+ // send request
+ let req = req_builder.build()?;
+
+ Ok(client.execute(req)?.error_for_status()?.json()?)
+ }
+
+}
diff --git a/ynab-api/src/apis/scheduled_transactions_api.rs b/ynab-api/src/apis/scheduled_transactions_api.rs
new file mode 100644
index 0000000..8ab30a8
--- /dev/null
+++ b/ynab-api/src/apis/scheduled_transactions_api.rs
@@ -0,0 +1,87 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+use std::rc::Rc;
+use std::borrow::Borrow;
+
+use reqwest;
+
+use super::{Error, configuration, urlencode};
+
+pub struct ScheduledTransactionsApiClient {
+ configuration: Rc<configuration::Configuration>,
+}
+
+impl ScheduledTransactionsApiClient {
+ pub fn new(configuration: Rc<configuration::Configuration>) -> ScheduledTransactionsApiClient {
+ ScheduledTransactionsApiClient {
+ configuration: configuration,
+ }
+ }
+}
+
+pub trait ScheduledTransactionsApi {
+ fn get_scheduled_transaction_by_id(&self, budget_id: &str, scheduled_transaction_id: &str) -> Result<::models::ScheduledTransactionResponse, Error>;
+ fn get_scheduled_transactions(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::ScheduledTransactionsResponse, Error>;
+}
+
+impl ScheduledTransactionsApi for ScheduledTransactionsApiClient {
+ fn get_scheduled_transaction_by_id(&self, budget_id: &str, scheduled_transaction_id: &str) -> Result<::models::ScheduledTransactionResponse, Error> {
+ let configuration: &configuration::Configuration = self.configuration.borrow();
+ let client = &configuration.client;
+
+ let uri_str = format!("{}/budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id}", configuration.base_path, budget_id=urlencode(budget_id), scheduled_transaction_id=urlencode(scheduled_transaction_id));
+ let mut req_builder = client.get(uri_str.as_str());
+
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
+ }
+ if let Some(ref apikey) = configuration.api_key {
+ let key = apikey.key.clone();
+ let val = match apikey.prefix {
+ Some(ref prefix) => format!("{} {}", prefix, key),
+ None => key,
+ };
+ req_builder = req_builder.header("Authorization", val);
+ };
+
+ // send request
+ let req = req_builder.build()?;
+
+ Ok(client.execute(req)?.error_for_status()?.json()?)
+ }
+
+ fn get_scheduled_transactions(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::ScheduledTransactionsResponse, Error> {
+ let configuration: &configuration::Configuration = self.configuration.borrow();
+ let client = &configuration.client;
+
+ let uri_str = format!("{}/budgets/{budget_id}/scheduled_transactions", configuration.base_path, budget_id=urlencode(budget_id));
+ let mut req_builder = client.get(uri_str.as_str());
+
+ req_builder = req_builder.query(&[("last_knowledge_of_server", &last_knowledge_of_server.to_string())]);
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
+ }
+ if let Some(ref apikey) = configuration.api_key {
+ let key = apikey.key.clone();
+ let val = match apikey.prefix {
+ Some(ref prefix) => format!("{} {}", prefix, key),
+ None => key,
+ };
+ req_builder = req_builder.header("Authorization", val);
+ };
+
+ // send request
+ let req = req_builder.build()?;
+
+ Ok(client.execute(req)?.error_for_status()?.json()?)
+ }
+
+}
diff --git a/ynab-api/src/apis/transactions_api.rs b/ynab-api/src/apis/transactions_api.rs
new file mode 100644
index 0000000..8947552
--- /dev/null
+++ b/ynab-api/src/apis/transactions_api.rs
@@ -0,0 +1,257 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+use std::rc::Rc;
+use std::borrow::Borrow;
+
+use reqwest;
+
+use super::{Error, configuration, urlencode};
+
+pub struct TransactionsApiClient {
+ configuration: Rc<configuration::Configuration>,
+}
+
+impl TransactionsApiClient {
+ pub fn new(configuration: Rc<configuration::Configuration>) -> TransactionsApiClient {
+ TransactionsApiClient {
+ configuration: configuration,
+ }
+ }
+}
+
+pub trait TransactionsApi {
+ fn create_transaction(&self, budget_id: &str, data: ::models::SaveTransactionsWrapper) -> Result<::models::SaveTransactionsResponse, Error>;
+ fn get_transaction_by_id(&self, budget_id: &str, transaction_id: &str) -> Result<::models::TransactionResponse, Error>;
+ fn get_transactions(&self, budget_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::TransactionsResponse, Error>;
+ fn get_transactions_by_account(&self, budget_id: &str, account_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::TransactionsResponse, Error>;
+ fn get_transactions_by_category(&self, budget_id: &str, category_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::HybridTransactionsResponse, Error>;
+ fn get_transactions_by_payee(&self, budget_id: &str, payee_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::HybridTransactionsResponse, Error>;
+ fn update_transaction(&self, budget_id: &str, transaction_id: &str, data: ::models::SaveTransactionWrapper) -> Result<::models::TransactionResponse, Error>;
+ fn update_transactions(&self, budget_id: &str, data: ::models::SaveTransactionsWrapper) -> Result<::models::SaveTransactionsResponse, Error>;
+}
+
+impl TransactionsApi for TransactionsApiClient {
+ fn create_transaction(&self, budget_id: &str, data: ::models::SaveTransactionsWrapper) -> Result<::models::SaveTransactionsResponse, Error> {
+ let configuration: &configuration::Configuration = self.configuration.borrow();
+ let client = &configuration.client;
+
+ let uri_str = format!("{}/budgets/{budget_id}/transactions", configuration.base_path, budget_id=urlencode(budget_id));
+ let mut req_builder = client.post(uri_str.as_str());
+
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
+ }
+ if let Some(ref apikey) = configuration.api_key {
+ let key = apikey.key.clone();
+ let val = match apikey.prefix {
+ Some(ref prefix) => format!("{} {}", prefix, key),
+ None => key,
+ };
+ req_builder = req_builder.header("Authorization", val);
+ };
+ req_builder = req_builder.json(&data);
+
+ // send request
+ let req = req_builder.build()?;
+
+ Ok(client.execute(req)?.error_for_status()?.json()?)
+ }
+
+ fn get_transaction_by_id(&self, budget_id: &str, transaction_id: &str) -> Result<::models::TransactionResponse, Error> {
+ let configuration: &configuration::Configuration = self.configuration.borrow();
+ let client = &configuration.client;
+
+ let uri_str = format!("{}/budgets/{budget_id}/transactions/{transaction_id}", configuration.base_path, budget_id=urlencode(budget_id), transaction_id=urlencode(transaction_id));
+ let mut req_builder = client.get(uri_str.as_str());
+
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
+ }
+ if let Some(ref apikey) = configuration.api_key {
+ let key = apikey.key.clone();
+ let val = match apikey.prefix {
+ Some(ref prefix) => format!("{} {}", prefix, key),
+ None => key,
+ };
+ req_builder = req_builder.header("Authorization", val);
+ };
+
+ // send request
+ let req = req_builder.build()?;
+
+ Ok(client.execute(req)?.error_for_status()?.json()?)
+ }
+
+ fn get_transactions(&self, budget_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::TransactionsResponse, Error> {
+ let configuration: &configuration::Configuration = self.configuration.borrow();
+ let client = &configuration.client;
+
+ let uri_str = format!("{}/budgets/{budget_id}/transactions", configuration.base_path, budget_id=urlencode(budget_id));
+ let mut req_builder = client.get(uri_str.as_str());
+
+ req_builder = req_builder.query(&[("since_date", &since_date.to_string())]);
+ req_builder = req_builder.query(&[("type", &_type.to_string())]);
+ req_builder = req_builder.query(&[("last_knowledge_of_server", &last_knowledge_of_server.to_string())]);
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
+ }
+ if let Some(ref apikey) = configuration.api_key {
+ let key = apikey.key.clone();
+ let val = match apikey.prefix {
+ Some(ref prefix) => format!("{} {}", prefix, key),
+ None => key,
+ };
+ req_builder = req_builder.header("Authorization", val);
+ };
+
+ // send request
+ let req = req_builder.build()?;
+
+ Ok(client.execute(req)?.error_for_status()?.json()?)
+ }
+
+ fn get_transactions_by_account(&self, budget_id: &str, account_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::TransactionsResponse, Error> {
+ let configuration: &configuration::Configuration = self.configuration.borrow();
+ let client = &configuration.client;
+
+ let uri_str = format!("{}/budgets/{budget_id}/accounts/{account_id}/transactions", configuration.base_path, budget_id=urlencode(budget_id), account_id=urlencode(account_id));
+ let mut req_builder = client.get(uri_str.as_str());
+
+ req_builder = req_builder.query(&[("since_date", &since_date.to_string())]);
+ req_builder = req_builder.query(&[("type", &_type.to_string())]);
+ req_builder = req_builder.query(&[("last_knowledge_of_server", &last_knowledge_of_server.to_string())]);
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
+ }
+ if let Some(ref apikey) = configuration.api_key {
+ let key = apikey.key.clone();
+ let val = match apikey.prefix {
+ Some(ref prefix) => format!("{} {}", prefix, key),
+ None => key,
+ };
+ req_builder = req_builder.header("Authorization", val);
+ };
+
+ // send request
+ let req = req_builder.build()?;
+
+ Ok(client.execute(req)?.error_for_status()?.json()?)
+ }
+
+ fn get_transactions_by_category(&self, budget_id: &str, category_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::HybridTransactionsResponse, Error> {
+ let configuration: &configuration::Configuration = self.configuration.borrow();
+ let client = &configuration.client;
+
+ let uri_str = format!("{}/budgets/{budget_id}/categories/{category_id}/transactions", configuration.base_path, budget_id=urlencode(budget_id), category_id=urlencode(category_id));
+ let mut req_builder = client.get(uri_str.as_str());
+
+ req_builder = req_builder.query(&[("since_date", &since_date.to_string())]);
+ req_builder = req_builder.query(&[("type", &_type.to_string())]);
+ req_builder = req_builder.query(&[("last_knowledge_of_server", &last_knowledge_of_server.to_string())]);
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
+ }
+ if let Some(ref apikey) = configuration.api_key {
+ let key = apikey.key.clone();
+ let val = match apikey.prefix {
+ Some(ref prefix) => format!("{} {}", prefix, key),
+ None => key,
+ };
+ req_builder = req_builder.header("Authorization", val);
+ };
+
+ // send request
+ let req = req_builder.build()?;
+
+ Ok(client.execute(req)?.error_for_status()?.json()?)
+ }
+
+ fn get_transactions_by_payee(&self, budget_id: &str, payee_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::HybridTransactionsResponse, Error> {
+ let configuration: &configuration::Configuration = self.configuration.borrow();
+ let client = &configuration.client;
+
+ let uri_str = format!("{}/budgets/{budget_id}/payees/{payee_id}/transactions", configuration.base_path, budget_id=urlencode(budget_id), payee_id=urlencode(payee_id));
+ let mut req_builder = client.get(uri_str.as_str());
+
+ req_builder = req_builder.query(&[("since_date", &since_date.to_string())]);
+ req_builder = req_builder.query(&[("type", &_type.to_string())]);
+ req_builder = req_builder.query(&[("last_knowledge_of_server", &last_knowledge_of_server.to_string())]);
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
+ }
+ if let Some(ref apikey) = configuration.api_key {
+ let key = apikey.key.clone();
+ let val = match apikey.prefix {
+ Some(ref prefix) => format!("{} {}", prefix, key),
+ None => key,
+ };
+ req_builder = req_builder.header("Authorization", val);
+ };
+
+ // send request
+ let req = req_builder.build()?;
+
+ Ok(client.execute(req)?.error_for_status()?.json()?)
+ }
+
+ fn update_transaction(&self, budget_id: &str, transaction_id: &str, data: ::models::SaveTransactionWrapper) -> Result<::models::TransactionResponse, Error> {
+ let configuration: &configuration::Configuration = self.configuration.borrow();
+ let client = &configuration.client;
+
+ let uri_str = format!("{}/budgets/{budget_id}/transactions/{transaction_id}", configuration.base_path, budget_id=urlencode(budget_id), transaction_id=urlencode(transaction_id));
+ let mut req_builder = client.put(uri_str.as_str());
+
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
+ }
+ if let Some(ref apikey) = configuration.api_key {
+ let key = apikey.key.clone();
+ let val = match apikey.prefix {
+ Some(ref prefix) => format!("{} {}", prefix, key),
+ None => key,
+ };
+ req_builder = req_builder.header("Authorization", val);
+ };
+ req_builder = req_builder.json(&data);
+
+ // send request
+ let req = req_builder.build()?;
+
+ Ok(client.execute(req)?.error_for_status()?.json()?)
+ }
+
+ fn update_transactions(&self, budget_id: &str, data: ::models::SaveTransactionsWrapper) -> Result<::models::SaveTransactionsResponse, Error> {
+ let configuration: &configuration::Configuration = self.configuration.borrow();
+ let client = &configuration.client;
+
+ let uri_str = format!("{}/budgets/{budget_id}/transactions", configuration.base_path, budget_id=urlencode(budget_id));
+ let mut req_builder = client.patch(uri_str.as_str());
+
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
+ }
+ if let Some(ref apikey) = configuration.api_key {
+ let key = apikey.key.clone();
+ let val = match apikey.prefix {
+ Some(ref prefix) => format!("{} {}", prefix, key),
+ None => key,
+ };
+ req_builder = req_builder.header("Authorization", val);
+ };
+ req_builder = req_builder.json(&data);
+
+ // send request
+ let req = req_builder.build()?;
+
+ Ok(client.execute(req)?.error_for_status()?.json()?)
+ }
+
+}
diff --git a/ynab-api/src/apis/user_api.rs b/ynab-api/src/apis/user_api.rs
new file mode 100644
index 0000000..50c243e
--- /dev/null
+++ b/ynab-api/src/apis/user_api.rs
@@ -0,0 +1,60 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+use std::rc::Rc;
+use std::borrow::Borrow;
+
+use reqwest;
+
+use super::{Error, configuration, urlencode};
+
+pub struct UserApiClient {
+ configuration: Rc<configuration::Configuration>,
+}
+
+impl UserApiClient {
+ pub fn new(configuration: Rc<configuration::Configuration>) -> UserApiClient {
+ UserApiClient {
+ configuration: configuration,
+ }
+ }
+}
+
+pub trait UserApi {
+ fn get_user(&self, ) -> Result<::models::UserResponse, Error>;
+}
+
+impl UserApi for UserApiClient {
+ fn get_user(&self, ) -> Result<::models::UserResponse, Error> {
+ let configuration: &configuration::Configuration = self.configuration.borrow();
+ let client = &configuration.client;
+
+ let uri_str = format!("{}/user", configuration.base_path);
+ let mut req_builder = client.get(uri_str.as_str());
+
+ if let Some(ref user_agent) = configuration.user_agent {
+ req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
+ }
+ if let Some(ref apikey) = configuration.api_key {
+ let key = apikey.key.clone();
+ let val = match apikey.prefix {
+ Some(ref prefix) => format!("{} {}", prefix, key),
+ None => key,
+ };
+ req_builder = req_builder.header("Authorization", val);
+ };
+
+ // send request
+ let req = req_builder.build()?;
+
+ Ok(client.execute(req)?.error_for_status()?.json()?)
+ }
+
+}
diff --git a/ynab-api/src/lib.rs b/ynab-api/src/lib.rs
new file mode 100644
index 0000000..c1dd666
--- /dev/null
+++ b/ynab-api/src/lib.rs
@@ -0,0 +1,10 @@
+#[macro_use]
+extern crate serde_derive;
+
+extern crate serde;
+extern crate serde_json;
+extern crate url;
+extern crate reqwest;
+
+pub mod apis;
+pub mod models;
diff --git a/ynab-api/src/models/account.rs b/ynab-api/src/models/account.rs
new file mode 100644
index 0000000..88f0353
--- /dev/null
+++ b/ynab-api/src/models/account.rs
@@ -0,0 +1,94 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct Account {
+ #[serde(rename = "id")]
+ pub id: String,
+ #[serde(rename = "name")]
+ pub name: String,
+ /// The type of account. Note: payPal, merchantAccount, investmentAccount, and mortgage types have been deprecated and will be removed in the future.
+ #[serde(rename = "type")]
+ pub _type: String,
+ /// Whether this account is on budget or not
+ #[serde(rename = "on_budget")]
+ pub on_budget: bool,
+ /// Whether this account is closed or not
+ #[serde(rename = "closed")]
+ pub closed: bool,
+ #[serde(rename = "note")]
+ pub note: String,
+ /// The current balance of the account in milliunits format
+ #[serde(rename = "balance")]
+ pub balance: i64,
+ /// The current cleared balance of the account in milliunits format
+ #[serde(rename = "cleared_balance")]
+ pub cleared_balance: i64,
+ /// The current uncleared balance of the account in milliunits format
+ #[serde(rename = "uncleared_balance")]
+ pub uncleared_balance: i64,
+ /// The payee id which should be used when transferring to this account
+ #[serde(rename = "transfer_payee_id")]
+ pub transfer_payee_id: String,
+ /// Whether or not the account has been deleted. Deleted accounts will only be included in delta requests.
+ #[serde(rename = "deleted")]
+ pub deleted: bool,
+}
+
+impl Account {
+ pub fn new(id: String, name: String, _type: String, on_budget: bool, closed: bool, note: String, balance: i64, cleared_balance: i64, uncleared_balance: i64, transfer_payee_id: String, deleted: bool) -> Account {
+ Account {
+ id: id,
+ name: name,
+ _type: _type,
+ on_budget: on_budget,
+ closed: closed,
+ note: note,
+ balance: balance,
+ cleared_balance: cleared_balance,
+ uncleared_balance: uncleared_balance,
+ transfer_payee_id: transfer_payee_id,
+ deleted: deleted,
+ }
+ }
+}
+
+/// The type of account. Note: payPal, merchantAccount, investmentAccount, and mortgage types have been deprecated and will be removed in the future.
+#[derive(Debug, Serialize, Deserialize)]
+pub enum Type {
+ #[serde(rename = "checking")]
+ Checking,
+ #[serde(rename = "savings")]
+ Savings,
+ #[serde(rename = "cash")]
+ Cash,
+ #[serde(rename = "creditCard")]
+ CreditCard,
+ #[serde(rename = "lineOfCredit")]
+ LineOfCredit,
+ #[serde(rename = "otherAsset")]
+ OtherAsset,
+ #[serde(rename = "otherLiability")]
+ OtherLiability,
+ #[serde(rename = "payPal")]
+ PayPal,
+ #[serde(rename = "merchantAccount")]
+ MerchantAccount,
+ #[serde(rename = "investmentAccount")]
+ InvestmentAccount,
+ #[serde(rename = "mortgage")]
+ Mortgage,
+}
+
diff --git a/ynab-api/src/models/account_response.rs b/ynab-api/src/models/account_response.rs
new file mode 100644
index 0000000..633bacb
--- /dev/null
+++ b/ynab-api/src/models/account_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct AccountResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::AccountResponseData,
+}
+
+impl AccountResponse {
+ pub fn new(data: ::models::AccountResponseData) -> AccountResponse {
+ AccountResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/account_response_data.rs b/ynab-api/src/models/account_response_data.rs
new file mode 100644
index 0000000..9340a0f
--- /dev/null
+++ b/ynab-api/src/models/account_response_data.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct AccountResponseData {
+ #[serde(rename = "account")]
+ pub account: ::models::Account,
+}
+
+impl AccountResponseData {
+ pub fn new(account: ::models::Account) -> AccountResponseData {
+ AccountResponseData {
+ account: account,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/accounts_response.rs b/ynab-api/src/models/accounts_response.rs
new file mode 100644
index 0000000..d2bd25d
--- /dev/null
+++ b/ynab-api/src/models/accounts_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct AccountsResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::AccountsResponseData,
+}
+
+impl AccountsResponse {
+ pub fn new(data: ::models::AccountsResponseData) -> AccountsResponse {
+ AccountsResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/accounts_response_data.rs b/ynab-api/src/models/accounts_response_data.rs
new file mode 100644
index 0000000..1324953
--- /dev/null
+++ b/ynab-api/src/models/accounts_response_data.rs
@@ -0,0 +1,34 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct AccountsResponseData {
+ #[serde(rename = "accounts")]
+ pub accounts: Vec<::models::Account>,
+ /// The knowledge of the server
+ #[serde(rename = "server_knowledge")]
+ pub server_knowledge: i64,
+}
+
+impl AccountsResponseData {
+ pub fn new(accounts: Vec<::models::Account>, server_knowledge: i64) -> AccountsResponseData {
+ AccountsResponseData {
+ accounts: accounts,
+ server_knowledge: server_knowledge,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/budget_detail.rs b/ynab-api/src/models/budget_detail.rs
new file mode 100644
index 0000000..8553aad
--- /dev/null
+++ b/ynab-api/src/models/budget_detail.rs
@@ -0,0 +1,81 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct BudgetDetail {
+ #[serde(rename = "id")]
+ pub id: String,
+ #[serde(rename = "name")]
+ pub name: String,
+ /// The last time any changes were made to the budget from either a web or mobile client
+ #[serde(rename = "last_modified_on", skip_serializing_if = "Option::is_none")]
+ pub last_modified_on: Option<String>,
+ /// The earliest budget month
+ #[serde(rename = "first_month", skip_serializing_if = "Option::is_none")]
+ pub first_month: Option<String>,
+ /// The latest budget month
+ #[serde(rename = "last_month", skip_serializing_if = "Option::is_none")]
+ pub last_month: Option<String>,
+ #[serde(rename = "date_format", skip_serializing_if = "Option::is_none")]
+ pub date_format: Option<::models::DateFormat>,
+ #[serde(rename = "currency_format", skip_serializing_if = "Option::is_none")]
+ pub currency_format: Option<::models::CurrencyFormat>,
+ #[serde(rename = "accounts", skip_serializing_if = "Option::is_none")]
+ pub accounts: Option<Vec<::models::Account>>,
+ #[serde(rename = "payees", skip_serializing_if = "Option::is_none")]
+ pub payees: Option<Vec<::models::Payee>>,
+ #[serde(rename = "payee_locations", skip_serializing_if = "Option::is_none")]
+ pub payee_locations: Option<Vec<::models::PayeeLocation>>,
+ #[serde(rename = "category_groups", skip_serializing_if = "Option::is_none")]
+ pub category_groups: Option<Vec<::models::CategoryGroup>>,
+ #[serde(rename = "categories", skip_serializing_if = "Option::is_none")]
+ pub categories: Option<Vec<::models::Category>>,
+ #[serde(rename = "months", skip_serializing_if = "Option::is_none")]
+ pub months: Option<Vec<::models::MonthDetail>>,
+ #[serde(rename = "transactions", skip_serializing_if = "Option::is_none")]
+ pub transactions: Option<Vec<::models::TransactionSummary>>,
+ #[serde(rename = "subtransactions", skip_serializing_if = "Option::is_none")]
+ pub subtransactions: Option<Vec<::models::SubTransaction>>,
+ #[serde(rename = "scheduled_transactions", skip_serializing_if = "Option::is_none")]
+ pub scheduled_transactions: Option<Vec<::models::ScheduledTransactionSummary>>,
+ #[serde(rename = "scheduled_subtransactions", skip_serializing_if = "Option::is_none")]
+ pub scheduled_subtransactions: Option<Vec<::models::ScheduledSubTransaction>>,
+}
+
+impl BudgetDetail {
+ pub fn new(id: String, name: String) -> BudgetDetail {
+ BudgetDetail {
+ id: id,
+ name: name,
+ last_modified_on: None,
+ first_month: None,
+ last_month: None,
+ date_format: None,
+ currency_format: None,
+ accounts: None,
+ payees: None,
+ payee_locations: None,
+ category_groups: None,
+ categories: None,
+ months: None,
+ transactions: None,
+ subtransactions: None,
+ scheduled_transactions: None,
+ scheduled_subtransactions: None,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/budget_detail_all_of.rs b/ynab-api/src/models/budget_detail_all_of.rs
new file mode 100644
index 0000000..90a621e
--- /dev/null
+++ b/ynab-api/src/models/budget_detail_all_of.rs
@@ -0,0 +1,57 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct BudgetDetailAllOf {
+ #[serde(rename = "accounts", skip_serializing_if = "Option::is_none")]
+ pub accounts: Option<Vec<::models::Account>>,
+ #[serde(rename = "payees", skip_serializing_if = "Option::is_none")]
+ pub payees: Option<Vec<::models::Payee>>,
+ #[serde(rename = "payee_locations", skip_serializing_if = "Option::is_none")]
+ pub payee_locations: Option<Vec<::models::PayeeLocation>>,
+ #[serde(rename = "category_groups", skip_serializing_if = "Option::is_none")]
+ pub category_groups: Option<Vec<::models::CategoryGroup>>,
+ #[serde(rename = "categories", skip_serializing_if = "Option::is_none")]
+ pub categories: Option<Vec<::models::Category>>,
+ #[serde(rename = "months", skip_serializing_if = "Option::is_none")]
+ pub months: Option<Vec<::models::MonthDetail>>,
+ #[serde(rename = "transactions", skip_serializing_if = "Option::is_none")]
+ pub transactions: Option<Vec<::models::TransactionSummary>>,
+ #[serde(rename = "subtransactions", skip_serializing_if = "Option::is_none")]
+ pub subtransactions: Option<Vec<::models::SubTransaction>>,
+ #[serde(rename = "scheduled_transactions", skip_serializing_if = "Option::is_none")]
+ pub scheduled_transactions: Option<Vec<::models::ScheduledTransactionSummary>>,
+ #[serde(rename = "scheduled_subtransactions", skip_serializing_if = "Option::is_none")]
+ pub scheduled_subtransactions: Option<Vec<::models::ScheduledSubTransaction>>,
+}
+
+impl BudgetDetailAllOf {
+ pub fn new() -> BudgetDetailAllOf {
+ BudgetDetailAllOf {
+ accounts: None,
+ payees: None,
+ payee_locations: None,
+ category_groups: None,
+ categories: None,
+ months: None,
+ transactions: None,
+ subtransactions: None,
+ scheduled_transactions: None,
+ scheduled_subtransactions: None,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/budget_detail_response.rs b/ynab-api/src/models/budget_detail_response.rs
new file mode 100644
index 0000000..5fe15c9
--- /dev/null
+++ b/ynab-api/src/models/budget_detail_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct BudgetDetailResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::BudgetDetailResponseData,
+}
+
+impl BudgetDetailResponse {
+ pub fn new(data: ::models::BudgetDetailResponseData) -> BudgetDetailResponse {
+ BudgetDetailResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/budget_detail_response_data.rs b/ynab-api/src/models/budget_detail_response_data.rs
new file mode 100644
index 0000000..301479d
--- /dev/null
+++ b/ynab-api/src/models/budget_detail_response_data.rs
@@ -0,0 +1,34 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct BudgetDetailResponseData {
+ #[serde(rename = "budget")]
+ pub budget: ::models::BudgetDetail,
+ /// The knowledge of the server
+ #[serde(rename = "server_knowledge")]
+ pub server_knowledge: i64,
+}
+
+impl BudgetDetailResponseData {
+ pub fn new(budget: ::models::BudgetDetail, server_knowledge: i64) -> BudgetDetailResponseData {
+ BudgetDetailResponseData {
+ budget: budget,
+ server_knowledge: server_knowledge,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/budget_settings.rs b/ynab-api/src/models/budget_settings.rs
new file mode 100644
index 0000000..25985b5
--- /dev/null
+++ b/ynab-api/src/models/budget_settings.rs
@@ -0,0 +1,33 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct BudgetSettings {
+ #[serde(rename = "date_format")]
+ pub date_format: ::models::DateFormat,
+ #[serde(rename = "currency_format")]
+ pub currency_format: ::models::CurrencyFormat,
+}
+
+impl BudgetSettings {
+ pub fn new(date_format: ::models::DateFormat, currency_format: ::models::CurrencyFormat) -> BudgetSettings {
+ BudgetSettings {
+ date_format: date_format,
+ currency_format: currency_format,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/budget_settings_response.rs b/ynab-api/src/models/budget_settings_response.rs
new file mode 100644
index 0000000..c5c0ee3
--- /dev/null
+++ b/ynab-api/src/models/budget_settings_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct BudgetSettingsResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::BudgetSettingsResponseData,
+}
+
+impl BudgetSettingsResponse {
+ pub fn new(data: ::models::BudgetSettingsResponseData) -> BudgetSettingsResponse {
+ BudgetSettingsResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/budget_settings_response_data.rs b/ynab-api/src/models/budget_settings_response_data.rs
new file mode 100644
index 0000000..e484234
--- /dev/null
+++ b/ynab-api/src/models/budget_settings_response_data.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct BudgetSettingsResponseData {
+ #[serde(rename = "settings")]
+ pub settings: ::models::BudgetSettings,
+}
+
+impl BudgetSettingsResponseData {
+ pub fn new(settings: ::models::BudgetSettings) -> BudgetSettingsResponseData {
+ BudgetSettingsResponseData {
+ settings: settings,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/budget_summary.rs b/ynab-api/src/models/budget_summary.rs
new file mode 100644
index 0000000..b380593
--- /dev/null
+++ b/ynab-api/src/models/budget_summary.rs
@@ -0,0 +1,51 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct BudgetSummary {
+ #[serde(rename = "id")]
+ pub id: String,
+ #[serde(rename = "name")]
+ pub name: String,
+ /// The last time any changes were made to the budget from either a web or mobile client
+ #[serde(rename = "last_modified_on", skip_serializing_if = "Option::is_none")]
+ pub last_modified_on: Option<String>,
+ /// The earliest budget month
+ #[serde(rename = "first_month", skip_serializing_if = "Option::is_none")]
+ pub first_month: Option<String>,
+ /// The latest budget month
+ #[serde(rename = "last_month", skip_serializing_if = "Option::is_none")]
+ pub last_month: Option<String>,
+ #[serde(rename = "date_format", skip_serializing_if = "Option::is_none")]
+ pub date_format: Option<::models::DateFormat>,
+ #[serde(rename = "currency_format", skip_serializing_if = "Option::is_none")]
+ pub currency_format: Option<::models::CurrencyFormat>,
+}
+
+impl BudgetSummary {
+ pub fn new(id: String, name: String) -> BudgetSummary {
+ BudgetSummary {
+ id: id,
+ name: name,
+ last_modified_on: None,
+ first_month: None,
+ last_month: None,
+ date_format: None,
+ currency_format: None,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/budget_summary_response.rs b/ynab-api/src/models/budget_summary_response.rs
new file mode 100644
index 0000000..422dfae
--- /dev/null
+++ b/ynab-api/src/models/budget_summary_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct BudgetSummaryResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::BudgetSummaryResponseData,
+}
+
+impl BudgetSummaryResponse {
+ pub fn new(data: ::models::BudgetSummaryResponseData) -> BudgetSummaryResponse {
+ BudgetSummaryResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/budget_summary_response_data.rs b/ynab-api/src/models/budget_summary_response_data.rs
new file mode 100644
index 0000000..35f3840
--- /dev/null
+++ b/ynab-api/src/models/budget_summary_response_data.rs
@@ -0,0 +1,33 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct BudgetSummaryResponseData {
+ #[serde(rename = "budgets")]
+ pub budgets: Vec<::models::BudgetSummary>,
+ #[serde(rename = "default_budget")]
+ pub default_budget: ::models::BudgetSummary,
+}
+
+impl BudgetSummaryResponseData {
+ pub fn new(budgets: Vec<::models::BudgetSummary>, default_budget: ::models::BudgetSummary) -> BudgetSummaryResponseData {
+ BudgetSummaryResponseData {
+ budgets: budgets,
+ default_budget: default_budget,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/bulk_response.rs b/ynab-api/src/models/bulk_response.rs
new file mode 100644
index 0000000..bf98b29
--- /dev/null
+++ b/ynab-api/src/models/bulk_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct BulkResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::BulkResponseData,
+}
+
+impl BulkResponse {
+ pub fn new(data: ::models::BulkResponseData) -> BulkResponse {
+ BulkResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/bulk_response_data.rs b/ynab-api/src/models/bulk_response_data.rs
new file mode 100644
index 0000000..e347af0
--- /dev/null
+++ b/ynab-api/src/models/bulk_response_data.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct BulkResponseData {
+ #[serde(rename = "bulk")]
+ pub bulk: ::models::BulkResponseDataBulk,
+}
+
+impl BulkResponseData {
+ pub fn new(bulk: ::models::BulkResponseDataBulk) -> BulkResponseData {
+ BulkResponseData {
+ bulk: bulk,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/bulk_response_data_bulk.rs b/ynab-api/src/models/bulk_response_data_bulk.rs
new file mode 100644
index 0000000..3993078
--- /dev/null
+++ b/ynab-api/src/models/bulk_response_data_bulk.rs
@@ -0,0 +1,35 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct BulkResponseDataBulk {
+ /// The list of Transaction ids that were created.
+ #[serde(rename = "transaction_ids")]
+ pub transaction_ids: Vec<String>,
+ /// If any Transactions were not created because they had an import_id matching a transaction already on the same account, the specified import_id(s) will be included in this list.
+ #[serde(rename = "duplicate_import_ids")]
+ pub duplicate_import_ids: Vec<String>,
+}
+
+impl BulkResponseDataBulk {
+ pub fn new(transaction_ids: Vec<String>, duplicate_import_ids: Vec<String>) -> BulkResponseDataBulk {
+ BulkResponseDataBulk {
+ transaction_ids: transaction_ids,
+ duplicate_import_ids: duplicate_import_ids,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/bulk_transactions.rs b/ynab-api/src/models/bulk_transactions.rs
new file mode 100644
index 0000000..e80c1c3
--- /dev/null
+++ b/ynab-api/src/models/bulk_transactions.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct BulkTransactions {
+ #[serde(rename = "transactions")]
+ pub transactions: Vec<::models::SaveTransaction>,
+}
+
+impl BulkTransactions {
+ pub fn new(transactions: Vec<::models::SaveTransaction>) -> BulkTransactions {
+ BulkTransactions {
+ transactions: transactions,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/categories_response.rs b/ynab-api/src/models/categories_response.rs
new file mode 100644
index 0000000..08fbafd
--- /dev/null
+++ b/ynab-api/src/models/categories_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct CategoriesResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::CategoriesResponseData,
+}
+
+impl CategoriesResponse {
+ pub fn new(data: ::models::CategoriesResponseData) -> CategoriesResponse {
+ CategoriesResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/categories_response_data.rs b/ynab-api/src/models/categories_response_data.rs
new file mode 100644
index 0000000..980505e
--- /dev/null
+++ b/ynab-api/src/models/categories_response_data.rs
@@ -0,0 +1,34 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct CategoriesResponseData {
+ #[serde(rename = "category_groups")]
+ pub category_groups: Vec<::models::CategoryGroupWithCategories>,
+ /// The knowledge of the server
+ #[serde(rename = "server_knowledge")]
+ pub server_knowledge: i64,
+}
+
+impl CategoriesResponseData {
+ pub fn new(category_groups: Vec<::models::CategoryGroupWithCategories>, server_knowledge: i64) -> CategoriesResponseData {
+ CategoriesResponseData {
+ category_groups: category_groups,
+ server_knowledge: server_knowledge,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/category.rs b/ynab-api/src/models/category.rs
new file mode 100644
index 0000000..1662f64
--- /dev/null
+++ b/ynab-api/src/models/category.rs
@@ -0,0 +1,93 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct Category {
+ #[serde(rename = "id")]
+ pub id: String,
+ #[serde(rename = "category_group_id")]
+ pub category_group_id: String,
+ #[serde(rename = "name")]
+ pub name: String,
+ /// Whether or not the category is hidden
+ #[serde(rename = "hidden")]
+ pub hidden: bool,
+ /// If category is hidden this is the id of the category group it originally belonged to before it was hidden.
+ #[serde(rename = "original_category_group_id", skip_serializing_if = "Option::is_none")]
+ pub original_category_group_id: Option<String>,
+ #[serde(rename = "note")]
+ pub note: String,
+ /// Budgeted amount in milliunits format
+ #[serde(rename = "budgeted")]
+ pub budgeted: i64,
+ /// Activity amount in milliunits format
+ #[serde(rename = "activity")]
+ pub activity: i64,
+ /// Balance in milliunits format
+ #[serde(rename = "balance")]
+ pub balance: i64,
+ /// The type of goal, if the cagegory has a goal (TB=Target Category Balance, TBD=Target Category Balance by Date, MF=Monthly Funding)
+ #[serde(rename = "goal_type")]
+ pub goal_type: String,
+ /// The month a goal was created
+ #[serde(rename = "goal_creation_month")]
+ pub goal_creation_month: String,
+ /// The goal target amount in milliunits
+ #[serde(rename = "goal_target")]
+ pub goal_target: i64,
+ /// If the goal type is 'TBD' (Target Category Balance by Date), this is the target month for the goal to be completed
+ #[serde(rename = "goal_target_month")]
+ pub goal_target_month: String,
+ /// The percentage completion of the goal
+ #[serde(rename = "goal_percentage_complete")]
+ pub goal_percentage_complete: i32,
+ /// Whether or not the category has been deleted. Deleted categories will only be included in delta requests.
+ #[serde(rename = "deleted")]
+ pub deleted: bool,
+}
+
+impl Category {
+ pub fn new(id: String, category_group_id: String, name: String, hidden: bool, note: String, budgeted: i64, activity: i64, balance: i64, goal_type: String, goal_creation_month: String, goal_target: i64, goal_target_month: String, goal_percentage_complete: i32, deleted: bool) -> Category {
+ Category {
+ id: id,
+ category_group_id: category_group_id,
+ name: name,
+ hidden: hidden,
+ original_category_group_id: None,
+ note: note,
+ budgeted: budgeted,
+ activity: activity,
+ balance: balance,
+ goal_type: goal_type,
+ goal_creation_month: goal_creation_month,
+ goal_target: goal_target,
+ goal_target_month: goal_target_month,
+ goal_percentage_complete: goal_percentage_complete,
+ deleted: deleted,
+ }
+ }
+}
+
+/// The type of goal, if the cagegory has a goal (TB=Target Category Balance, TBD=Target Category Balance by Date, MF=Monthly Funding)
+#[derive(Debug, Serialize, Deserialize)]
+pub enum GoalType {
+ #[serde(rename = "TB")]
+ TB,
+ #[serde(rename = "TBD")]
+ TBD,
+ #[serde(rename = "MF")]
+ MF,
+}
+
diff --git a/ynab-api/src/models/category_group.rs b/ynab-api/src/models/category_group.rs
new file mode 100644
index 0000000..2f674e2
--- /dev/null
+++ b/ynab-api/src/models/category_group.rs
@@ -0,0 +1,41 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct CategoryGroup {
+ #[serde(rename = "id")]
+ pub id: String,
+ #[serde(rename = "name")]
+ pub name: String,
+ /// Whether or not the category group is hidden
+ #[serde(rename = "hidden")]
+ pub hidden: bool,
+ /// Whether or not the category group has been deleted. Deleted category groups will only be included in delta requests.
+ #[serde(rename = "deleted")]
+ pub deleted: bool,
+}
+
+impl CategoryGroup {
+ pub fn new(id: String, name: String, hidden: bool, deleted: bool) -> CategoryGroup {
+ CategoryGroup {
+ id: id,
+ name: name,
+ hidden: hidden,
+ deleted: deleted,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/category_group_with_categories.rs b/ynab-api/src/models/category_group_with_categories.rs
new file mode 100644
index 0000000..38cfd88
--- /dev/null
+++ b/ynab-api/src/models/category_group_with_categories.rs
@@ -0,0 +1,45 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct CategoryGroupWithCategories {
+ #[serde(rename = "id")]
+ pub id: String,
+ #[serde(rename = "name")]
+ pub name: String,
+ /// Whether or not the category group is hidden
+ #[serde(rename = "hidden")]
+ pub hidden: bool,
+ /// Whether or not the category group has been deleted. Deleted category groups will only be included in delta requests.
+ #[serde(rename = "deleted")]
+ pub deleted: bool,
+ /// Category group categories. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
+ #[serde(rename = "categories")]
+ pub categories: Vec<::models::Category>,
+}
+
+impl CategoryGroupWithCategories {
+ pub fn new(id: String, name: String, hidden: bool, deleted: bool, categories: Vec<::models::Category>) -> CategoryGroupWithCategories {
+ CategoryGroupWithCategories {
+ id: id,
+ name: name,
+ hidden: hidden,
+ deleted: deleted,
+ categories: categories,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/category_group_with_categories_all_of.rs b/ynab-api/src/models/category_group_with_categories_all_of.rs
new file mode 100644
index 0000000..f34d3bb
--- /dev/null
+++ b/ynab-api/src/models/category_group_with_categories_all_of.rs
@@ -0,0 +1,31 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct CategoryGroupWithCategoriesAllOf {
+ /// Category group categories. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
+ #[serde(rename = "categories")]
+ pub categories: Vec<::models::Category>,
+}
+
+impl CategoryGroupWithCategoriesAllOf {
+ pub fn new(categories: Vec<::models::Category>) -> CategoryGroupWithCategoriesAllOf {
+ CategoryGroupWithCategoriesAllOf {
+ categories: categories,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/category_response.rs b/ynab-api/src/models/category_response.rs
new file mode 100644
index 0000000..35f2f40
--- /dev/null
+++ b/ynab-api/src/models/category_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct CategoryResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::CategoryResponseData,
+}
+
+impl CategoryResponse {
+ pub fn new(data: ::models::CategoryResponseData) -> CategoryResponse {
+ CategoryResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/category_response_data.rs b/ynab-api/src/models/category_response_data.rs
new file mode 100644
index 0000000..4e81fbb
--- /dev/null
+++ b/ynab-api/src/models/category_response_data.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct CategoryResponseData {
+ #[serde(rename = "category")]
+ pub category: ::models::Category,
+}
+
+impl CategoryResponseData {
+ pub fn new(category: ::models::Category) -> CategoryResponseData {
+ CategoryResponseData {
+ category: category,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/currency_format.rs b/ynab-api/src/models/currency_format.rs
new file mode 100644
index 0000000..476856a
--- /dev/null
+++ b/ynab-api/src/models/currency_format.rs
@@ -0,0 +1,53 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+/// CurrencyFormat : The currency format setting for the budget. In some cases the format will not be available and will be specified as null.
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct CurrencyFormat {
+ #[serde(rename = "iso_code")]
+ pub iso_code: String,
+ #[serde(rename = "example_format")]
+ pub example_format: String,
+ #[serde(rename = "decimal_digits")]
+ pub decimal_digits: i32,
+ #[serde(rename = "decimal_separator")]
+ pub decimal_separator: String,
+ #[serde(rename = "symbol_first")]
+ pub symbol_first: bool,
+ #[serde(rename = "group_separator")]
+ pub group_separator: String,
+ #[serde(rename = "currency_symbol")]
+ pub currency_symbol: String,
+ #[serde(rename = "display_symbol")]
+ pub display_symbol: bool,
+}
+
+impl CurrencyFormat {
+ /// The currency format setting for the budget. In some cases the format will not be available and will be specified as null.
+ pub fn new(iso_code: String, example_format: String, decimal_digits: i32, decimal_separator: String, symbol_first: bool, group_separator: String, currency_symbol: String, display_symbol: bool) -> CurrencyFormat {
+ CurrencyFormat {
+ iso_code: iso_code,
+ example_format: example_format,
+ decimal_digits: decimal_digits,
+ decimal_separator: decimal_separator,
+ symbol_first: symbol_first,
+ group_separator: group_separator,
+ currency_symbol: currency_symbol,
+ display_symbol: display_symbol,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/date_format.rs b/ynab-api/src/models/date_format.rs
new file mode 100644
index 0000000..cf88395
--- /dev/null
+++ b/ynab-api/src/models/date_format.rs
@@ -0,0 +1,32 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+/// DateFormat : The date format setting for the budget. In some cases the format will not be available and will be specified as null.
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct DateFormat {
+ #[serde(rename = "format")]
+ pub format: String,
+}
+
+impl DateFormat {
+ /// The date format setting for the budget. In some cases the format will not be available and will be specified as null.
+ pub fn new(format: String) -> DateFormat {
+ DateFormat {
+ format: format,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/error_detail.rs b/ynab-api/src/models/error_detail.rs
new file mode 100644
index 0000000..4745cf3
--- /dev/null
+++ b/ynab-api/src/models/error_detail.rs
@@ -0,0 +1,36 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct ErrorDetail {
+ #[serde(rename = "id")]
+ pub id: String,
+ #[serde(rename = "name")]
+ pub name: String,
+ #[serde(rename = "detail")]
+ pub detail: String,
+}
+
+impl ErrorDetail {
+ pub fn new(id: String, name: String, detail: String) -> ErrorDetail {
+ ErrorDetail {
+ id: id,
+ name: name,
+ detail: detail,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/error_response.rs b/ynab-api/src/models/error_response.rs
new file mode 100644
index 0000000..c321726
--- /dev/null
+++ b/ynab-api/src/models/error_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct ErrorResponse {
+ #[serde(rename = "error")]
+ pub error: ::models::ErrorDetail,
+}
+
+impl ErrorResponse {
+ pub fn new(error: ::models::ErrorDetail) -> ErrorResponse {
+ ErrorResponse {
+ error: error,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/hybrid_transaction.rs b/ynab-api/src/models/hybrid_transaction.rs
new file mode 100644
index 0000000..240f49d
--- /dev/null
+++ b/ynab-api/src/models/hybrid_transaction.rs
@@ -0,0 +1,133 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct HybridTransaction {
+ #[serde(rename = "id")]
+ pub id: String,
+ /// The transaction date in ISO format (e.g. 2016-12-01)
+ #[serde(rename = "date")]
+ pub date: String,
+ /// The transaction amount in milliunits format
+ #[serde(rename = "amount")]
+ pub amount: i64,
+ #[serde(rename = "memo")]
+ pub memo: String,
+ /// The cleared status of the transaction
+ #[serde(rename = "cleared")]
+ pub cleared: String,
+ /// Whether or not the transaction is approved
+ #[serde(rename = "approved")]
+ pub approved: bool,
+ /// The transaction flag
+ #[serde(rename = "flag_color")]
+ pub flag_color: String,
+ #[serde(rename = "account_id")]
+ pub account_id: String,
+ #[serde(rename = "payee_id")]
+ pub payee_id: String,
+ #[serde(rename = "category_id")]
+ pub category_id: String,
+ /// If a transfer transaction, the account to which it transfers
+ #[serde(rename = "transfer_account_id")]
+ pub transfer_account_id: String,
+ /// If a transfer transaction, the id of transaction on the other side of the transfer
+ #[serde(rename = "transfer_transaction_id")]
+ pub transfer_transaction_id: String,
+ /// If transaction is matched, the id of the matched transaction
+ #[serde(rename = "matched_transaction_id")]
+ pub matched_transaction_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'.
+ #[serde(rename = "import_id")]
+ pub import_id: String,
+ /// Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests.
+ #[serde(rename = "deleted")]
+ pub deleted: bool,
+ /// Whether the hybrid transaction represents a regular transaction or a subtransaction
+ #[serde(rename = "type")]
+ pub _type: String,
+ /// For subtransaction types, this is the id of the pararent transaction. For transaction types, this id will be always be null.
+ #[serde(rename = "parent_transaction_id")]
+ pub parent_transaction_id: String,
+ #[serde(rename = "account_name")]
+ pub account_name: String,
+ #[serde(rename = "payee_name")]
+ pub payee_name: String,
+ #[serde(rename = "category_name")]
+ pub category_name: String,
+}
+
+impl HybridTransaction {
+ pub fn new(id: String, date: String, amount: i64, memo: String, cleared: String, approved: bool, flag_color: String, account_id: String, payee_id: String, category_id: String, transfer_account_id: String, transfer_transaction_id: String, matched_transaction_id: String, import_id: String, deleted: bool, _type: String, parent_transaction_id: String, account_name: String, payee_name: String, category_name: String) -> HybridTransaction {
+ HybridTransaction {
+ id: id,
+ date: date,
+ amount: amount,
+ memo: memo,
+ cleared: cleared,
+ approved: approved,
+ flag_color: flag_color,
+ account_id: account_id,
+ payee_id: payee_id,
+ category_id: category_id,
+ transfer_account_id: transfer_account_id,
+ transfer_transaction_id: transfer_transaction_id,
+ matched_transaction_id: matched_transaction_id,
+ import_id: import_id,
+ deleted: deleted,
+ _type: _type,
+ parent_transaction_id: parent_transaction_id,
+ account_name: account_name,
+ payee_name: payee_name,
+ category_name: category_name,
+ }
+ }
+}
+
+/// The cleared status of the transaction
+#[derive(Debug, Serialize, Deserialize)]
+pub enum Cleared {
+ #[serde(rename = "cleared")]
+ Cleared,
+ #[serde(rename = "uncleared")]
+ Uncleared,
+ #[serde(rename = "reconciled")]
+ Reconciled,
+}
+/// The transaction flag
+#[derive(Debug, Serialize, Deserialize)]
+pub enum FlagColor {
+ #[serde(rename = "red")]
+ Red,
+ #[serde(rename = "orange")]
+ Orange,
+ #[serde(rename = "yellow")]
+ Yellow,
+ #[serde(rename = "green")]
+ Green,
+ #[serde(rename = "blue")]
+ Blue,
+ #[serde(rename = "purple")]
+ Purple,
+}
+/// Whether the hybrid transaction represents a regular transaction or a subtransaction
+#[derive(Debug, Serialize, Deserialize)]
+pub enum Type {
+ #[serde(rename = "transaction")]
+ Transaction,
+ #[serde(rename = "subtransaction")]
+ Subtransaction,
+}
+
diff --git a/ynab-api/src/models/hybrid_transaction_all_of.rs b/ynab-api/src/models/hybrid_transaction_all_of.rs
new file mode 100644
index 0000000..f0294ec
--- /dev/null
+++ b/ynab-api/src/models/hybrid_transaction_all_of.rs
@@ -0,0 +1,52 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct HybridTransactionAllOf {
+ /// Whether the hybrid transaction represents a regular transaction or a subtransaction
+ #[serde(rename = "type")]
+ pub _type: String,
+ /// For subtransaction types, this is the id of the pararent transaction. For transaction types, this id will be always be null.
+ #[serde(rename = "parent_transaction_id")]
+ pub parent_transaction_id: String,
+ #[serde(rename = "account_name")]
+ pub account_name: String,
+ #[serde(rename = "payee_name")]
+ pub payee_name: String,
+ #[serde(rename = "category_name")]
+ pub category_name: String,
+}
+
+impl HybridTransactionAllOf {
+ pub fn new(_type: String, parent_transaction_id: String, account_name: String, payee_name: String, category_name: String) -> HybridTransactionAllOf {
+ HybridTransactionAllOf {
+ _type: _type,
+ parent_transaction_id: parent_transaction_id,
+ account_name: account_name,
+ payee_name: payee_name,
+ category_name: category_name,
+ }
+ }
+}
+
+/// Whether the hybrid transaction represents a regular transaction or a subtransaction
+#[derive(Debug, Serialize, Deserialize)]
+pub enum Type {
+ #[serde(rename = "transaction")]
+ Transaction,
+ #[serde(rename = "subtransaction")]
+ Subtransaction,
+}
+
diff --git a/ynab-api/src/models/hybrid_transactions_response.rs b/ynab-api/src/models/hybrid_transactions_response.rs
new file mode 100644
index 0000000..493582e
--- /dev/null
+++ b/ynab-api/src/models/hybrid_transactions_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct HybridTransactionsResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::HybridTransactionsResponseData,
+}
+
+impl HybridTransactionsResponse {
+ pub fn new(data: ::models::HybridTransactionsResponseData) -> HybridTransactionsResponse {
+ HybridTransactionsResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/hybrid_transactions_response_data.rs b/ynab-api/src/models/hybrid_transactions_response_data.rs
new file mode 100644
index 0000000..8e329e4
--- /dev/null
+++ b/ynab-api/src/models/hybrid_transactions_response_data.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct HybridTransactionsResponseData {
+ #[serde(rename = "transactions")]
+ pub transactions: Vec<::models::HybridTransaction>,
+}
+
+impl HybridTransactionsResponseData {
+ pub fn new(transactions: Vec<::models::HybridTransaction>) -> HybridTransactionsResponseData {
+ HybridTransactionsResponseData {
+ transactions: transactions,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/mod.rs b/ynab-api/src/models/mod.rs
new file mode 100644
index 0000000..e0c52d9
--- /dev/null
+++ b/ynab-api/src/models/mod.rs
@@ -0,0 +1,160 @@
+mod account;
+pub use self::account::Account;
+mod account_response;
+pub use self::account_response::AccountResponse;
+mod account_response_data;
+pub use self::account_response_data::AccountResponseData;
+mod accounts_response;
+pub use self::accounts_response::AccountsResponse;
+mod accounts_response_data;
+pub use self::accounts_response_data::AccountsResponseData;
+mod budget_detail;
+pub use self::budget_detail::BudgetDetail;
+mod budget_detail_all_of;
+pub use self::budget_detail_all_of::BudgetDetailAllOf;
+mod budget_detail_response;
+pub use self::budget_detail_response::BudgetDetailResponse;
+mod budget_detail_response_data;
+pub use self::budget_detail_response_data::BudgetDetailResponseData;
+mod budget_settings;
+pub use self::budget_settings::BudgetSettings;
+mod budget_settings_response;
+pub use self::budget_settings_response::BudgetSettingsResponse;
+mod budget_settings_response_data;
+pub use self::budget_settings_response_data::BudgetSettingsResponseData;
+mod budget_summary;
+pub use self::budget_summary::BudgetSummary;
+mod budget_summary_response;
+pub use self::budget_summary_response::BudgetSummaryResponse;
+mod budget_summary_response_data;
+pub use self::budget_summary_response_data::BudgetSummaryResponseData;
+mod bulk_response;
+pub use self::bulk_response::BulkResponse;
+mod bulk_response_data;
+pub use self::bulk_response_data::BulkResponseData;
+mod bulk_response_data_bulk;
+pub use self::bulk_response_data_bulk::BulkResponseDataBulk;
+mod bulk_transactions;
+pub use self::bulk_transactions::BulkTransactions;
+mod categories_response;
+pub use self::categories_response::CategoriesResponse;
+mod categories_response_data;
+pub use self::categories_response_data::CategoriesResponseData;
+mod category;
+pub use self::category::Category;
+mod category_group;
+pub use self::category_group::CategoryGroup;
+mod category_group_with_categories;
+pub use self::category_group_with_categories::CategoryGroupWithCategories;
+mod category_group_with_categories_all_of;
+pub use self::category_group_with_categories_all_of::CategoryGroupWithCategoriesAllOf;
+mod category_response;
+pub use self::category_response::CategoryResponse;
+mod category_response_data;
+pub use self::category_response_data::CategoryResponseData;
+mod currency_format;
+pub use self::currency_format::CurrencyFormat;
+mod date_format;
+pub use self::date_format::DateFormat;
+mod error_detail;
+pub use self::error_detail::ErrorDetail;
+mod error_response;
+pub use self::error_response::ErrorResponse;
+mod hybrid_transaction;
+pub use self::hybrid_transaction::HybridTransaction;
+mod hybrid_transaction_all_of;
+pub use self::hybrid_transaction_all_of::HybridTransactionAllOf;
+mod hybrid_transactions_response;
+pub use self::hybrid_transactions_response::HybridTransactionsResponse;
+mod hybrid_transactions_response_data;
+pub use self::hybrid_transactions_response_data::HybridTransactionsResponseData;
+mod month_detail;
+pub use self::month_detail::MonthDetail;
+mod month_detail_all_of;
+pub use self::month_detail_all_of::MonthDetailAllOf;
+mod month_detail_response;
+pub use self::month_detail_response::MonthDetailResponse;
+mod month_detail_response_data;
+pub use self::month_detail_response_data::MonthDetailResponseData;
+mod month_summaries_response;
+pub use self::month_summaries_response::MonthSummariesResponse;
+mod month_summaries_response_data;
+pub use self::month_summaries_response_data::MonthSummariesResponseData;
+mod month_summary;
+pub use self::month_summary::MonthSummary;
+mod payee;
+pub use self::payee::Payee;
+mod payee_location;
+pub use self::payee_location::PayeeLocation;
+mod payee_location_response;
+pub use self::payee_location_response::PayeeLocationResponse;
+mod payee_location_response_data;
+pub use self::payee_location_response_data::PayeeLocationResponseData;
+mod payee_locations_response;
+pub use self::payee_locations_response::PayeeLocationsResponse;
+mod payee_locations_response_data;
+pub use self::payee_locations_response_data::PayeeLocationsResponseData;
+mod payee_response;
+pub use self::payee_response::PayeeResponse;
+mod payee_response_data;
+pub use self::payee_response_data::PayeeResponseData;
+mod payees_response;
+pub use self::payees_response::PayeesResponse;
+mod payees_response_data;
+pub use self::payees_response_data::PayeesResponseData;
+mod save_category_response;
+pub use self::save_category_response::SaveCategoryResponse;
+mod save_category_response_data;
+pub use self::save_category_response_data::SaveCategoryResponseData;
+mod save_month_category;
+pub use self::save_month_category::SaveMonthCategory;
+mod save_month_category_wrapper;
+pub use self::save_month_category_wrapper::SaveMonthCategoryWrapper;
+mod save_transaction;
+pub use self::save_transaction::SaveTransaction;
+mod save_transaction_wrapper;
+pub use self::save_transaction_wrapper::SaveTransactionWrapper;
+mod save_transactions_response;
+pub use self::save_transactions_response::SaveTransactionsResponse;
+mod save_transactions_response_data;
+pub use self::save_transactions_response_data::SaveTransactionsResponseData;
+mod save_transactions_wrapper;
+pub use self::save_transactions_wrapper::SaveTransactionsWrapper;
+mod scheduled_sub_transaction;
+pub use self::scheduled_sub_transaction::ScheduledSubTransaction;
+mod scheduled_transaction_detail;
+pub use self::scheduled_transaction_detail::ScheduledTransactionDetail;
+mod scheduled_transaction_detail_all_of;
+pub use self::scheduled_transaction_detail_all_of::ScheduledTransactionDetailAllOf;
+mod scheduled_transaction_response;
+pub use self::scheduled_transaction_response::ScheduledTransactionResponse;
+mod scheduled_transaction_response_data;
+pub use self::scheduled_transaction_response_data::ScheduledTransactionResponseData;
+mod scheduled_transaction_summary;
+pub use self::scheduled_transaction_summary::ScheduledTransactionSummary;
+mod scheduled_transactions_response;
+pub use self::scheduled_transactions_response::ScheduledTransactionsResponse;
+mod scheduled_transactions_response_data;
+pub use self::scheduled_transactions_response_data::ScheduledTransactionsResponseData;
+mod sub_transaction;
+pub use self::sub_transaction::SubTransaction;
+mod transaction_detail;
+pub use self::transaction_detail::TransactionDetail;
+mod transaction_detail_all_of;
+pub use self::transaction_detail_all_of::TransactionDetailAllOf;
+mod transaction_response;
+pub use self::transaction_response::TransactionResponse;
+mod transaction_response_data;
+pub use self::transaction_response_data::TransactionResponseData;
+mod transaction_summary;
+pub use self::transaction_summary::TransactionSummary;
+mod transactions_response;
+pub use self::transactions_response::TransactionsResponse;
+mod transactions_response_data;
+pub use self::transactions_response_data::TransactionsResponseData;
+mod user;
+pub use self::user::User;
+mod user_response;
+pub use self::user_response::UserResponse;
+mod user_response_data;
+pub use self::user_response_data::UserResponseData;
diff --git a/ynab-api/src/models/month_detail.rs b/ynab-api/src/models/month_detail.rs
new file mode 100644
index 0000000..9a2b1c2
--- /dev/null
+++ b/ynab-api/src/models/month_detail.rs
@@ -0,0 +1,61 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct MonthDetail {
+ #[serde(rename = "month")]
+ pub month: String,
+ #[serde(rename = "note")]
+ pub note: String,
+ /// The total amount in transactions categorized to 'Inflow: To be Budgeted' in the month
+ #[serde(rename = "income")]
+ pub income: i64,
+ /// The total amount budgeted in the month
+ #[serde(rename = "budgeted")]
+ pub budgeted: i64,
+ /// The total amount in transactions in the month, excluding those categorized to 'Inflow: To be Budgeted'
+ #[serde(rename = "activity")]
+ pub activity: i64,
+ /// The available amount for 'To be Budgeted'
+ #[serde(rename = "to_be_budgeted")]
+ pub to_be_budgeted: i64,
+ /// The Age of Money as of the month
+ #[serde(rename = "age_of_money")]
+ pub age_of_money: i32,
+ /// Whether or not the month has been deleted. Deleted months will only be included in delta requests.
+ #[serde(rename = "deleted")]
+ pub deleted: bool,
+ /// The budget month categories. Amounts (budgeted, activity, balance, etc.) are specific to the {month} parameter specified.
+ #[serde(rename = "categories")]
+ pub categories: Vec<::models::Category>,
+}
+
+impl MonthDetail {
+ pub fn new(month: String, note: String, income: i64, budgeted: i64, activity: i64, to_be_budgeted: i64, age_of_money: i32, deleted: bool, categories: Vec<::models::Category>) -> MonthDetail {
+ MonthDetail {
+ month: month,
+ note: note,
+ income: income,
+ budgeted: budgeted,
+ activity: activity,
+ to_be_budgeted: to_be_budgeted,
+ age_of_money: age_of_money,
+ deleted: deleted,
+ categories: categories,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/month_detail_all_of.rs b/ynab-api/src/models/month_detail_all_of.rs
new file mode 100644
index 0000000..0f07326
--- /dev/null
+++ b/ynab-api/src/models/month_detail_all_of.rs
@@ -0,0 +1,31 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct MonthDetailAllOf {
+ /// The budget month categories. Amounts (budgeted, activity, balance, etc.) are specific to the {month} parameter specified.
+ #[serde(rename = "categories")]
+ pub categories: Vec<::models::Category>,
+}
+
+impl MonthDetailAllOf {
+ pub fn new(categories: Vec<::models::Category>) -> MonthDetailAllOf {
+ MonthDetailAllOf {
+ categories: categories,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/month_detail_response.rs b/ynab-api/src/models/month_detail_response.rs
new file mode 100644
index 0000000..c144afb
--- /dev/null
+++ b/ynab-api/src/models/month_detail_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct MonthDetailResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::MonthDetailResponseData,
+}
+
+impl MonthDetailResponse {
+ pub fn new(data: ::models::MonthDetailResponseData) -> MonthDetailResponse {
+ MonthDetailResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/month_detail_response_data.rs b/ynab-api/src/models/month_detail_response_data.rs
new file mode 100644
index 0000000..0948763
--- /dev/null
+++ b/ynab-api/src/models/month_detail_response_data.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct MonthDetailResponseData {
+ #[serde(rename = "month")]
+ pub month: ::models::MonthDetail,
+}
+
+impl MonthDetailResponseData {
+ pub fn new(month: ::models::MonthDetail) -> MonthDetailResponseData {
+ MonthDetailResponseData {
+ month: month,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/month_summaries_response.rs b/ynab-api/src/models/month_summaries_response.rs
new file mode 100644
index 0000000..44d5d66
--- /dev/null
+++ b/ynab-api/src/models/month_summaries_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct MonthSummariesResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::MonthSummariesResponseData,
+}
+
+impl MonthSummariesResponse {
+ pub fn new(data: ::models::MonthSummariesResponseData) -> MonthSummariesResponse {
+ MonthSummariesResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/month_summaries_response_data.rs b/ynab-api/src/models/month_summaries_response_data.rs
new file mode 100644
index 0000000..6237601
--- /dev/null
+++ b/ynab-api/src/models/month_summaries_response_data.rs
@@ -0,0 +1,34 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct MonthSummariesResponseData {
+ #[serde(rename = "months")]
+ pub months: Vec<::models::MonthSummary>,
+ /// The knowledge of the server
+ #[serde(rename = "server_knowledge")]
+ pub server_knowledge: i64,
+}
+
+impl MonthSummariesResponseData {
+ pub fn new(months: Vec<::models::MonthSummary>, server_knowledge: i64) -> MonthSummariesResponseData {
+ MonthSummariesResponseData {
+ months: months,
+ server_knowledge: server_knowledge,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/month_summary.rs b/ynab-api/src/models/month_summary.rs
new file mode 100644
index 0000000..c7e980a
--- /dev/null
+++ b/ynab-api/src/models/month_summary.rs
@@ -0,0 +1,57 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct MonthSummary {
+ #[serde(rename = "month")]
+ pub month: String,
+ #[serde(rename = "note")]
+ pub note: String,
+ /// The total amount in transactions categorized to 'Inflow: To be Budgeted' in the month
+ #[serde(rename = "income")]
+ pub income: i64,
+ /// The total amount budgeted in the month
+ #[serde(rename = "budgeted")]
+ pub budgeted: i64,
+ /// The total amount in transactions in the month, excluding those categorized to 'Inflow: To be Budgeted'
+ #[serde(rename = "activity")]
+ pub activity: i64,
+ /// The available amount for 'To be Budgeted'
+ #[serde(rename = "to_be_budgeted")]
+ pub to_be_budgeted: i64,
+ /// The Age of Money as of the month
+ #[serde(rename = "age_of_money")]
+ pub age_of_money: i32,
+ /// Whether or not the month has been deleted. Deleted months will only be included in delta requests.
+ #[serde(rename = "deleted")]
+ pub deleted: bool,
+}
+
+impl MonthSummary {
+ pub fn new(month: String, note: String, income: i64, budgeted: i64, activity: i64, to_be_budgeted: i64, age_of_money: i32, deleted: bool) -> MonthSummary {
+ MonthSummary {
+ month: month,
+ note: note,
+ income: income,
+ budgeted: budgeted,
+ activity: activity,
+ to_be_budgeted: to_be_budgeted,
+ age_of_money: age_of_money,
+ deleted: deleted,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/payee.rs b/ynab-api/src/models/payee.rs
new file mode 100644
index 0000000..2508b31
--- /dev/null
+++ b/ynab-api/src/models/payee.rs
@@ -0,0 +1,41 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct Payee {
+ #[serde(rename = "id")]
+ pub id: String,
+ #[serde(rename = "name")]
+ pub name: String,
+ /// If a transfer payee, the account_id to which this payee transfers to
+ #[serde(rename = "transfer_account_id")]
+ pub transfer_account_id: String,
+ /// Whether or not the payee has been deleted. Deleted payees will only be included in delta requests.
+ #[serde(rename = "deleted")]
+ pub deleted: bool,
+}
+
+impl Payee {
+ pub fn new(id: String, name: String, transfer_account_id: String, deleted: bool) -> Payee {
+ Payee {
+ id: id,
+ name: name,
+ transfer_account_id: transfer_account_id,
+ deleted: deleted,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/payee_location.rs b/ynab-api/src/models/payee_location.rs
new file mode 100644
index 0000000..afb050e
--- /dev/null
+++ b/ynab-api/src/models/payee_location.rs
@@ -0,0 +1,43 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct PayeeLocation {
+ #[serde(rename = "id")]
+ pub id: String,
+ #[serde(rename = "payee_id")]
+ pub payee_id: String,
+ #[serde(rename = "latitude")]
+ pub latitude: String,
+ #[serde(rename = "longitude")]
+ pub longitude: String,
+ /// Whether or not the payee location has been deleted. Deleted payee locations will only be included in delta requests.
+ #[serde(rename = "deleted")]
+ pub deleted: bool,
+}
+
+impl PayeeLocation {
+ pub fn new(id: String, payee_id: String, latitude: String, longitude: String, deleted: bool) -> PayeeLocation {
+ PayeeLocation {
+ id: id,
+ payee_id: payee_id,
+ latitude: latitude,
+ longitude: longitude,
+ deleted: deleted,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/payee_location_response.rs b/ynab-api/src/models/payee_location_response.rs
new file mode 100644
index 0000000..e6d2608
--- /dev/null
+++ b/ynab-api/src/models/payee_location_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct PayeeLocationResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::PayeeLocationResponseData,
+}
+
+impl PayeeLocationResponse {
+ pub fn new(data: ::models::PayeeLocationResponseData) -> PayeeLocationResponse {
+ PayeeLocationResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/payee_location_response_data.rs b/ynab-api/src/models/payee_location_response_data.rs
new file mode 100644
index 0000000..869c4ea
--- /dev/null
+++ b/ynab-api/src/models/payee_location_response_data.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct PayeeLocationResponseData {
+ #[serde(rename = "payee_location")]
+ pub payee_location: ::models::PayeeLocation,
+}
+
+impl PayeeLocationResponseData {
+ pub fn new(payee_location: ::models::PayeeLocation) -> PayeeLocationResponseData {
+ PayeeLocationResponseData {
+ payee_location: payee_location,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/payee_locations_response.rs b/ynab-api/src/models/payee_locations_response.rs
new file mode 100644
index 0000000..916a19e
--- /dev/null
+++ b/ynab-api/src/models/payee_locations_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct PayeeLocationsResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::PayeeLocationsResponseData,
+}
+
+impl PayeeLocationsResponse {
+ pub fn new(data: ::models::PayeeLocationsResponseData) -> PayeeLocationsResponse {
+ PayeeLocationsResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/payee_locations_response_data.rs b/ynab-api/src/models/payee_locations_response_data.rs
new file mode 100644
index 0000000..ea46038
--- /dev/null
+++ b/ynab-api/src/models/payee_locations_response_data.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct PayeeLocationsResponseData {
+ #[serde(rename = "payee_locations")]
+ pub payee_locations: Vec<::models::PayeeLocation>,
+}
+
+impl PayeeLocationsResponseData {
+ pub fn new(payee_locations: Vec<::models::PayeeLocation>) -> PayeeLocationsResponseData {
+ PayeeLocationsResponseData {
+ payee_locations: payee_locations,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/payee_response.rs b/ynab-api/src/models/payee_response.rs
new file mode 100644
index 0000000..690913a
--- /dev/null
+++ b/ynab-api/src/models/payee_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct PayeeResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::PayeeResponseData,
+}
+
+impl PayeeResponse {
+ pub fn new(data: ::models::PayeeResponseData) -> PayeeResponse {
+ PayeeResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/payee_response_data.rs b/ynab-api/src/models/payee_response_data.rs
new file mode 100644
index 0000000..f19f7ea
--- /dev/null
+++ b/ynab-api/src/models/payee_response_data.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct PayeeResponseData {
+ #[serde(rename = "payee")]
+ pub payee: ::models::Payee,
+}
+
+impl PayeeResponseData {
+ pub fn new(payee: ::models::Payee) -> PayeeResponseData {
+ PayeeResponseData {
+ payee: payee,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/payees_response.rs b/ynab-api/src/models/payees_response.rs
new file mode 100644
index 0000000..dba96f3
--- /dev/null
+++ b/ynab-api/src/models/payees_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct PayeesResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::PayeesResponseData,
+}
+
+impl PayeesResponse {
+ pub fn new(data: ::models::PayeesResponseData) -> PayeesResponse {
+ PayeesResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/payees_response_data.rs b/ynab-api/src/models/payees_response_data.rs
new file mode 100644
index 0000000..4897b15
--- /dev/null
+++ b/ynab-api/src/models/payees_response_data.rs
@@ -0,0 +1,34 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct PayeesResponseData {
+ #[serde(rename = "payees")]
+ pub payees: Vec<::models::Payee>,
+ /// The knowledge of the server
+ #[serde(rename = "server_knowledge")]
+ pub server_knowledge: i64,
+}
+
+impl PayeesResponseData {
+ pub fn new(payees: Vec<::models::Payee>, server_knowledge: i64) -> PayeesResponseData {
+ PayeesResponseData {
+ payees: payees,
+ server_knowledge: server_knowledge,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/save_category_response.rs b/ynab-api/src/models/save_category_response.rs
new file mode 100644
index 0000000..37744c1
--- /dev/null
+++ b/ynab-api/src/models/save_category_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct SaveCategoryResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::SaveCategoryResponseData,
+}
+
+impl SaveCategoryResponse {
+ pub fn new(data: ::models::SaveCategoryResponseData) -> SaveCategoryResponse {
+ SaveCategoryResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/save_category_response_data.rs b/ynab-api/src/models/save_category_response_data.rs
new file mode 100644
index 0000000..b61b206
--- /dev/null
+++ b/ynab-api/src/models/save_category_response_data.rs
@@ -0,0 +1,34 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct SaveCategoryResponseData {
+ #[serde(rename = "category")]
+ pub category: ::models::Category,
+ /// The knowledge of the server
+ #[serde(rename = "server_knowledge")]
+ pub server_knowledge: i64,
+}
+
+impl SaveCategoryResponseData {
+ pub fn new(category: ::models::Category, server_knowledge: i64) -> SaveCategoryResponseData {
+ SaveCategoryResponseData {
+ category: category,
+ server_knowledge: server_knowledge,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/save_month_category.rs b/ynab-api/src/models/save_month_category.rs
new file mode 100644
index 0000000..40d1b2e
--- /dev/null
+++ b/ynab-api/src/models/save_month_category.rs
@@ -0,0 +1,31 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct SaveMonthCategory {
+ /// Budgeted amount in milliunits format
+ #[serde(rename = "budgeted")]
+ pub budgeted: i64,
+}
+
+impl SaveMonthCategory {
+ pub fn new(budgeted: i64) -> SaveMonthCategory {
+ SaveMonthCategory {
+ budgeted: budgeted,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/save_month_category_wrapper.rs b/ynab-api/src/models/save_month_category_wrapper.rs
new file mode 100644
index 0000000..ef67116
--- /dev/null
+++ b/ynab-api/src/models/save_month_category_wrapper.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct SaveMonthCategoryWrapper {
+ #[serde(rename = "category")]
+ pub category: ::models::SaveMonthCategory,
+}
+
+impl SaveMonthCategoryWrapper {
+ pub fn new(category: ::models::SaveMonthCategory) -> SaveMonthCategoryWrapper {
+ SaveMonthCategoryWrapper {
+ category: category,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/save_transaction.rs b/ynab-api/src/models/save_transaction.rs
new file mode 100644
index 0000000..c2fc6b7
--- /dev/null
+++ b/ynab-api/src/models/save_transaction.rs
@@ -0,0 +1,95 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct SaveTransaction {
+ #[serde(rename = "account_id")]
+ pub account_id: String,
+ /// The transaction date in ISO format (e.g. 2016-12-01). Future dates (scheduled transactions) are not permitted. Split transaction dates cannot be changed and if a different date is supplied it will be ignored.
+ #[serde(rename = "date")]
+ pub date: String,
+ /// The transaction amount in milliunits format. Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored.
+ #[serde(rename = "amount")]
+ pub amount: i64,
+ /// The payee for the transaction
+ #[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")]
+ pub payee_id: Option<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.
+ #[serde(rename = "payee_name", skip_serializing_if = "Option::is_none")]
+ pub payee_name: Option<String>,
+ /// The category for the transaction. Split and Credit Card Payment categories are not permitted and will be ignored if supplied. If an existing transaction has a Split category it cannot be changed.
+ #[serde(rename = "category_id", skip_serializing_if = "Option::is_none")]
+ pub category_id: Option<String>,
+ #[serde(rename = "memo", skip_serializing_if = "Option::is_none")]
+ pub memo: Option<String>,
+ /// The cleared status of the transaction
+ #[serde(rename = "cleared", skip_serializing_if = "Option::is_none")]
+ pub cleared: Option<String>,
+ /// Whether or not the transaction is approved. If not supplied, transaction will be unapproved by default.
+ #[serde(rename = "approved", skip_serializing_if = "Option::is_none")]
+ pub approved: Option<bool>,
+ /// The transaction flag
+ #[serde(rename = "flag_color", skip_serializing_if = "Option::is_none")]
+ pub flag_color: Option<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.<br><br>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.<br><br>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<String>,
+}
+
+impl SaveTransaction {
+ pub fn new(account_id: String, date: String, amount: i64) -> SaveTransaction {
+ SaveTransaction {
+ account_id: account_id,
+ date: date,
+ amount: amount,
+ payee_id: None,
+ payee_name: None,
+ category_id: None,
+ memo: None,
+ cleared: None,
+ approved: None,
+ flag_color: None,
+ import_id: None,
+ }
+ }
+}
+
+/// The cleared status of the transaction
+#[derive(Debug, Serialize, Deserialize)]
+pub enum Cleared {
+ #[serde(rename = "cleared")]
+ Cleared,
+ #[serde(rename = "uncleared")]
+ Uncleared,
+ #[serde(rename = "reconciled")]
+ Reconciled,
+}
+/// The transaction flag
+#[derive(Debug, Serialize, Deserialize)]
+pub enum FlagColor {
+ #[serde(rename = "red")]
+ Red,
+ #[serde(rename = "orange")]
+ Orange,
+ #[serde(rename = "yellow")]
+ Yellow,
+ #[serde(rename = "green")]
+ Green,
+ #[serde(rename = "blue")]
+ Blue,
+ #[serde(rename = "purple")]
+ Purple,
+}
+
diff --git a/ynab-api/src/models/save_transaction_wrapper.rs b/ynab-api/src/models/save_transaction_wrapper.rs
new file mode 100644
index 0000000..71bc7cd
--- /dev/null
+++ b/ynab-api/src/models/save_transaction_wrapper.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct SaveTransactionWrapper {
+ #[serde(rename = "transaction")]
+ pub transaction: ::models::SaveTransaction,
+}
+
+impl SaveTransactionWrapper {
+ pub fn new(transaction: ::models::SaveTransaction) -> SaveTransactionWrapper {
+ SaveTransactionWrapper {
+ transaction: transaction,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/save_transactions_response.rs b/ynab-api/src/models/save_transactions_response.rs
new file mode 100644
index 0000000..be0782c
--- /dev/null
+++ b/ynab-api/src/models/save_transactions_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct SaveTransactionsResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::SaveTransactionsResponseData,
+}
+
+impl SaveTransactionsResponse {
+ pub fn new(data: ::models::SaveTransactionsResponseData) -> SaveTransactionsResponse {
+ SaveTransactionsResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/save_transactions_response_data.rs b/ynab-api/src/models/save_transactions_response_data.rs
new file mode 100644
index 0000000..0086874
--- /dev/null
+++ b/ynab-api/src/models/save_transactions_response_data.rs
@@ -0,0 +1,46 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct SaveTransactionsResponseData {
+ /// The transaction ids that were saved
+ #[serde(rename = "transaction_ids")]
+ pub transaction_ids: Vec<String>,
+ #[serde(rename = "transaction", skip_serializing_if = "Option::is_none")]
+ pub transaction: Option<::models::TransactionDetail>,
+ /// If multiple transactions were specified, the transactions that were saved
+ #[serde(rename = "transactions", skip_serializing_if = "Option::is_none")]
+ pub transactions: Option<Vec<::models::TransactionDetail>>,
+ /// 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<Vec<String>>,
+ /// The knowledge of the server
+ #[serde(rename = "server_knowledge")]
+ pub server_knowledge: i64,
+}
+
+impl SaveTransactionsResponseData {
+ pub fn new(transaction_ids: Vec<String>, server_knowledge: i64) -> SaveTransactionsResponseData {
+ SaveTransactionsResponseData {
+ transaction_ids: transaction_ids,
+ transaction: None,
+ transactions: None,
+ duplicate_import_ids: None,
+ server_knowledge: server_knowledge,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/save_transactions_wrapper.rs b/ynab-api/src/models/save_transactions_wrapper.rs
new file mode 100644
index 0000000..ed49180
--- /dev/null
+++ b/ynab-api/src/models/save_transactions_wrapper.rs
@@ -0,0 +1,33 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct SaveTransactionsWrapper {
+ #[serde(rename = "transaction", skip_serializing_if = "Option::is_none")]
+ pub transaction: Option<::models::SaveTransaction>,
+ #[serde(rename = "transactions", skip_serializing_if = "Option::is_none")]
+ pub transactions: Option<Vec<::models::SaveTransaction>>,
+}
+
+impl SaveTransactionsWrapper {
+ pub fn new() -> SaveTransactionsWrapper {
+ SaveTransactionsWrapper {
+ transaction: None,
+ transactions: None,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/scheduled_sub_transaction.rs b/ynab-api/src/models/scheduled_sub_transaction.rs
new file mode 100644
index 0000000..760fa78
--- /dev/null
+++ b/ynab-api/src/models/scheduled_sub_transaction.rs
@@ -0,0 +1,54 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct ScheduledSubTransaction {
+ #[serde(rename = "id")]
+ pub id: String,
+ #[serde(rename = "scheduled_transaction_id")]
+ pub scheduled_transaction_id: String,
+ /// The scheduled subtransaction amount in milliunits format
+ #[serde(rename = "amount")]
+ pub amount: i64,
+ #[serde(rename = "memo")]
+ pub memo: String,
+ #[serde(rename = "payee_id")]
+ pub payee_id: String,
+ #[serde(rename = "category_id")]
+ pub category_id: String,
+ /// If a transfer, the account_id which the scheduled subtransaction transfers to
+ #[serde(rename = "transfer_account_id")]
+ pub transfer_account_id: String,
+ /// Whether or not the scheduled subtransaction has been deleted. Deleted scheduled subtransactions will only be included in delta requests.
+ #[serde(rename = "deleted")]
+ pub deleted: bool,
+}
+
+impl ScheduledSubTransaction {
+ pub fn new(id: String, scheduled_transaction_id: String, amount: i64, memo: String, payee_id: String, category_id: String, transfer_account_id: String, deleted: bool) -> ScheduledSubTransaction {
+ ScheduledSubTransaction {
+ id: id,
+ scheduled_transaction_id: scheduled_transaction_id,
+ amount: amount,
+ memo: memo,
+ payee_id: payee_id,
+ category_id: category_id,
+ transfer_account_id: transfer_account_id,
+ deleted: deleted,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/scheduled_transaction_detail.rs b/ynab-api/src/models/scheduled_transaction_detail.rs
new file mode 100644
index 0000000..65c2473
--- /dev/null
+++ b/ynab-api/src/models/scheduled_transaction_detail.rs
@@ -0,0 +1,128 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct ScheduledTransactionDetail {
+ #[serde(rename = "id")]
+ pub id: String,
+ /// The first date for which the Scheduled Transaction was scheduled.
+ #[serde(rename = "date_first")]
+ pub date_first: String,
+ /// The next date for which the Scheduled Transaction is scheduled.
+ #[serde(rename = "date_next")]
+ pub date_next: String,
+ #[serde(rename = "frequency")]
+ pub frequency: String,
+ /// The scheduled transaction amount in milliunits format
+ #[serde(rename = "amount")]
+ pub amount: i64,
+ #[serde(rename = "memo")]
+ pub memo: String,
+ /// The scheduled transaction flag
+ #[serde(rename = "flag_color")]
+ pub flag_color: String,
+ #[serde(rename = "account_id")]
+ pub account_id: String,
+ #[serde(rename = "payee_id")]
+ pub payee_id: String,
+ #[serde(rename = "category_id")]
+ pub category_id: String,
+ /// If a transfer, the account_id which the scheduled transaction transfers to
+ #[serde(rename = "transfer_account_id")]
+ pub transfer_account_id: String,
+ /// Whether or not the scheduled transaction has been deleted. Deleted scheduled transactions will only be included in delta requests.
+ #[serde(rename = "deleted")]
+ pub deleted: bool,
+ #[serde(rename = "account_name")]
+ pub account_name: String,
+ #[serde(rename = "payee_name")]
+ pub payee_name: String,
+ #[serde(rename = "category_name")]
+ pub category_name: String,
+ /// If a split scheduled transaction, the subtransactions.
+ #[serde(rename = "subtransactions")]
+ pub subtransactions: Vec<::models::ScheduledSubTransaction>,
+}
+
+impl ScheduledTransactionDetail {
+ pub fn new(id: String, date_first: String, date_next: String, frequency: String, amount: i64, memo: String, flag_color: String, account_id: String, payee_id: String, category_id: String, transfer_account_id: String, deleted: bool, account_name: String, payee_name: String, category_name: String, subtransactions: Vec<::models::ScheduledSubTransaction>) -> ScheduledTransactionDetail {
+ ScheduledTransactionDetail {
+ id: id,
+ date_first: date_first,
+ date_next: date_next,
+ frequency: frequency,
+ amount: amount,
+ memo: memo,
+ flag_color: flag_color,
+ account_id: account_id,
+ payee_id: payee_id,
+ category_id: category_id,
+ transfer_account_id: transfer_account_id,
+ deleted: deleted,
+ account_name: account_name,
+ payee_name: payee_name,
+ category_name: category_name,
+ subtransactions: subtransactions,
+ }
+ }
+}
+
+///
+#[derive(Debug, Serialize, Deserialize)]
+pub enum Frequency {
+ #[serde(rename = "never")]
+ Never,
+ #[serde(rename = "daily")]
+ Daily,
+ #[serde(rename = "weekly")]
+ Weekly,
+ #[serde(rename = "everyOtherWeek")]
+ EveryOtherWeek,
+ #[serde(rename = "twiceAMonth")]
+ TwiceAMonth,
+ #[serde(rename = "every4Weeks")]
+ Every4Weeks,
+ #[serde(rename = "monthly")]
+ Monthly,
+ #[serde(rename = "everyOtherMonth")]
+ EveryOtherMonth,
+ #[serde(rename = "every3Months")]
+ Every3Months,
+ #[serde(rename = "every4Months")]
+ Every4Months,
+ #[serde(rename = "twiceAYear")]
+ TwiceAYear,
+ #[serde(rename = "yearly")]
+ Yearly,
+ #[serde(rename = "everyOtherYear")]
+ EveryOtherYear,
+}
+/// The scheduled transaction flag
+#[derive(Debug, Serialize, Deserialize)]
+pub enum FlagColor {
+ #[serde(rename = "red")]
+ Red,
+ #[serde(rename = "orange")]
+ Orange,
+ #[serde(rename = "yellow")]
+ Yellow,
+ #[serde(rename = "green")]
+ Green,
+ #[serde(rename = "blue")]
+ Blue,
+ #[serde(rename = "purple")]
+ Purple,
+}
+
diff --git a/ynab-api/src/models/scheduled_transaction_detail_all_of.rs b/ynab-api/src/models/scheduled_transaction_detail_all_of.rs
new file mode 100644
index 0000000..cf7e6c7
--- /dev/null
+++ b/ynab-api/src/models/scheduled_transaction_detail_all_of.rs
@@ -0,0 +1,40 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct ScheduledTransactionDetailAllOf {
+ #[serde(rename = "account_name")]
+ pub account_name: String,
+ #[serde(rename = "payee_name")]
+ pub payee_name: String,
+ #[serde(rename = "category_name")]
+ pub category_name: String,
+ /// If a split scheduled transaction, the subtransactions.
+ #[serde(rename = "subtransactions")]
+ pub subtransactions: Vec<::models::ScheduledSubTransaction>,
+}
+
+impl ScheduledTransactionDetailAllOf {
+ pub fn new(account_name: String, payee_name: String, category_name: String, subtransactions: Vec<::models::ScheduledSubTransaction>) -> ScheduledTransactionDetailAllOf {
+ ScheduledTransactionDetailAllOf {
+ account_name: account_name,
+ payee_name: payee_name,
+ category_name: category_name,
+ subtransactions: subtransactions,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/scheduled_transaction_response.rs b/ynab-api/src/models/scheduled_transaction_response.rs
new file mode 100644
index 0000000..25286cd
--- /dev/null
+++ b/ynab-api/src/models/scheduled_transaction_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct ScheduledTransactionResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::ScheduledTransactionResponseData,
+}
+
+impl ScheduledTransactionResponse {
+ pub fn new(data: ::models::ScheduledTransactionResponseData) -> ScheduledTransactionResponse {
+ ScheduledTransactionResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/scheduled_transaction_response_data.rs b/ynab-api/src/models/scheduled_transaction_response_data.rs
new file mode 100644
index 0000000..70db916
--- /dev/null
+++ b/ynab-api/src/models/scheduled_transaction_response_data.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct ScheduledTransactionResponseData {
+ #[serde(rename = "scheduled_transaction")]
+ pub scheduled_transaction: ::models::ScheduledTransactionDetail,
+}
+
+impl ScheduledTransactionResponseData {
+ pub fn new(scheduled_transaction: ::models::ScheduledTransactionDetail) -> ScheduledTransactionResponseData {
+ ScheduledTransactionResponseData {
+ scheduled_transaction: scheduled_transaction,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/scheduled_transaction_summary.rs b/ynab-api/src/models/scheduled_transaction_summary.rs
new file mode 100644
index 0000000..dfd6f1f
--- /dev/null
+++ b/ynab-api/src/models/scheduled_transaction_summary.rs
@@ -0,0 +1,115 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct ScheduledTransactionSummary {
+ #[serde(rename = "id")]
+ pub id: String,
+ /// The first date for which the Scheduled Transaction was scheduled.
+ #[serde(rename = "date_first")]
+ pub date_first: String,
+ /// The next date for which the Scheduled Transaction is scheduled.
+ #[serde(rename = "date_next")]
+ pub date_next: String,
+ #[serde(rename = "frequency")]
+ pub frequency: String,
+ /// The scheduled transaction amount in milliunits format
+ #[serde(rename = "amount")]
+ pub amount: i64,
+ #[serde(rename = "memo")]
+ pub memo: String,
+ /// The scheduled transaction flag
+ #[serde(rename = "flag_color")]
+ pub flag_color: String,
+ #[serde(rename = "account_id")]
+ pub account_id: String,
+ #[serde(rename = "payee_id")]
+ pub payee_id: String,
+ #[serde(rename = "category_id")]
+ pub category_id: String,
+ /// If a transfer, the account_id which the scheduled transaction transfers to
+ #[serde(rename = "transfer_account_id")]
+ pub transfer_account_id: String,
+ /// Whether or not the scheduled transaction has been deleted. Deleted scheduled transactions will only be included in delta requests.
+ #[serde(rename = "deleted")]
+ pub deleted: bool,
+}
+
+impl ScheduledTransactionSummary {
+ pub fn new(id: String, date_first: String, date_next: String, frequency: String, amount: i64, memo: String, flag_color: String, account_id: String, payee_id: String, category_id: String, transfer_account_id: String, deleted: bool) -> ScheduledTransactionSummary {
+ ScheduledTransactionSummary {
+ id: id,
+ date_first: date_first,
+ date_next: date_next,
+ frequency: frequency,
+ amount: amount,
+ memo: memo,
+ flag_color: flag_color,
+ account_id: account_id,
+ payee_id: payee_id,
+ category_id: category_id,
+ transfer_account_id: transfer_account_id,
+ deleted: deleted,
+ }
+ }
+}
+
+///
+#[derive(Debug, Serialize, Deserialize)]
+pub enum Frequency {
+ #[serde(rename = "never")]
+ Never,
+ #[serde(rename = "daily")]
+ Daily,
+ #[serde(rename = "weekly")]
+ Weekly,
+ #[serde(rename = "everyOtherWeek")]
+ EveryOtherWeek,
+ #[serde(rename = "twiceAMonth")]
+ TwiceAMonth,
+ #[serde(rename = "every4Weeks")]
+ Every4Weeks,
+ #[serde(rename = "monthly")]
+ Monthly,
+ #[serde(rename = "everyOtherMonth")]
+ EveryOtherMonth,
+ #[serde(rename = "every3Months")]
+ Every3Months,
+ #[serde(rename = "every4Months")]
+ Every4Months,
+ #[serde(rename = "twiceAYear")]
+ TwiceAYear,
+ #[serde(rename = "yearly")]
+ Yearly,
+ #[serde(rename = "everyOtherYear")]
+ EveryOtherYear,
+}
+/// The scheduled transaction flag
+#[derive(Debug, Serialize, Deserialize)]
+pub enum FlagColor {
+ #[serde(rename = "red")]
+ Red,
+ #[serde(rename = "orange")]
+ Orange,
+ #[serde(rename = "yellow")]
+ Yellow,
+ #[serde(rename = "green")]
+ Green,
+ #[serde(rename = "blue")]
+ Blue,
+ #[serde(rename = "purple")]
+ Purple,
+}
+
diff --git a/ynab-api/src/models/scheduled_transactions_response.rs b/ynab-api/src/models/scheduled_transactions_response.rs
new file mode 100644
index 0000000..8ff8378
--- /dev/null
+++ b/ynab-api/src/models/scheduled_transactions_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct ScheduledTransactionsResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::ScheduledTransactionsResponseData,
+}
+
+impl ScheduledTransactionsResponse {
+ pub fn new(data: ::models::ScheduledTransactionsResponseData) -> ScheduledTransactionsResponse {
+ ScheduledTransactionsResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/scheduled_transactions_response_data.rs b/ynab-api/src/models/scheduled_transactions_response_data.rs
new file mode 100644
index 0000000..71e5c79
--- /dev/null
+++ b/ynab-api/src/models/scheduled_transactions_response_data.rs
@@ -0,0 +1,34 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct ScheduledTransactionsResponseData {
+ #[serde(rename = "scheduled_transactions")]
+ pub scheduled_transactions: Vec<::models::ScheduledTransactionDetail>,
+ /// The knowledge of the server
+ #[serde(rename = "server_knowledge")]
+ pub server_knowledge: i64,
+}
+
+impl ScheduledTransactionsResponseData {
+ pub fn new(scheduled_transactions: Vec<::models::ScheduledTransactionDetail>, server_knowledge: i64) -> ScheduledTransactionsResponseData {
+ ScheduledTransactionsResponseData {
+ scheduled_transactions: scheduled_transactions,
+ server_knowledge: server_knowledge,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/sub_transaction.rs b/ynab-api/src/models/sub_transaction.rs
new file mode 100644
index 0000000..aa7ed37
--- /dev/null
+++ b/ynab-api/src/models/sub_transaction.rs
@@ -0,0 +1,54 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct SubTransaction {
+ #[serde(rename = "id")]
+ pub id: String,
+ #[serde(rename = "transaction_id")]
+ pub transaction_id: String,
+ /// The subtransaction amount in milliunits format
+ #[serde(rename = "amount")]
+ pub amount: i64,
+ #[serde(rename = "memo")]
+ pub memo: String,
+ #[serde(rename = "payee_id")]
+ pub payee_id: String,
+ #[serde(rename = "category_id")]
+ pub category_id: String,
+ /// If a transfer, the account_id which the subtransaction transfers to
+ #[serde(rename = "transfer_account_id")]
+ pub transfer_account_id: String,
+ /// Whether or not the subtransaction has been deleted. Deleted subtransactions will only be included in delta requests.
+ #[serde(rename = "deleted")]
+ pub deleted: bool,
+}
+
+impl SubTransaction {
+ pub fn new(id: String, transaction_id: String, amount: i64, memo: String, payee_id: String, category_id: String, transfer_account_id: String, deleted: bool) -> SubTransaction {
+ SubTransaction {
+ id: id,
+ transaction_id: transaction_id,
+ amount: amount,
+ memo: memo,
+ payee_id: payee_id,
+ category_id: category_id,
+ transfer_account_id: transfer_account_id,
+ deleted: deleted,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/transaction_detail.rs b/ynab-api/src/models/transaction_detail.rs
new file mode 100644
index 0000000..1558c7c
--- /dev/null
+++ b/ynab-api/src/models/transaction_detail.rs
@@ -0,0 +1,121 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct TransactionDetail {
+ #[serde(rename = "id")]
+ pub id: String,
+ /// The transaction date in ISO format (e.g. 2016-12-01)
+ #[serde(rename = "date")]
+ pub date: String,
+ /// The transaction amount in milliunits format
+ #[serde(rename = "amount")]
+ pub amount: i64,
+ #[serde(rename = "memo")]
+ pub memo: String,
+ /// The cleared status of the transaction
+ #[serde(rename = "cleared")]
+ pub cleared: String,
+ /// Whether or not the transaction is approved
+ #[serde(rename = "approved")]
+ pub approved: bool,
+ /// The transaction flag
+ #[serde(rename = "flag_color")]
+ pub flag_color: String,
+ #[serde(rename = "account_id")]
+ pub account_id: String,
+ #[serde(rename = "payee_id")]
+ pub payee_id: String,
+ #[serde(rename = "category_id")]
+ pub category_id: String,
+ /// If a transfer transaction, the account to which it transfers
+ #[serde(rename = "transfer_account_id")]
+ pub transfer_account_id: String,
+ /// If a transfer transaction, the id of transaction on the other side of the transfer
+ #[serde(rename = "transfer_transaction_id")]
+ pub transfer_transaction_id: String,
+ /// If transaction is matched, the id of the matched transaction
+ #[serde(rename = "matched_transaction_id")]
+ pub matched_transaction_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'.
+ #[serde(rename = "import_id")]
+ pub import_id: String,
+ /// Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests.
+ #[serde(rename = "deleted")]
+ pub deleted: bool,
+ #[serde(rename = "account_name")]
+ pub account_name: String,
+ #[serde(rename = "payee_name")]
+ pub payee_name: String,
+ #[serde(rename = "category_name")]
+ pub category_name: String,
+ /// If a split transaction, the subtransactions.
+ #[serde(rename = "subtransactions")]
+ pub subtransactions: Vec<::models::SubTransaction>,
+}
+
+impl TransactionDetail {
+ pub fn new(id: String, date: String, amount: i64, memo: String, cleared: String, approved: bool, flag_color: String, account_id: String, payee_id: String, category_id: String, transfer_account_id: String, transfer_transaction_id: String, matched_transaction_id: String, import_id: String, deleted: bool, account_name: String, payee_name: String, category_name: String, subtransactions: Vec<::models::SubTransaction>) -> TransactionDetail {
+ TransactionDetail {
+ id: id,
+ date: date,
+ amount: amount,
+ memo: memo,
+ cleared: cleared,
+ approved: approved,
+ flag_color: flag_color,
+ account_id: account_id,
+ payee_id: payee_id,
+ category_id: category_id,
+ transfer_account_id: transfer_account_id,
+ transfer_transaction_id: transfer_transaction_id,
+ matched_transaction_id: matched_transaction_id,
+ import_id: import_id,
+ deleted: deleted,
+ account_name: account_name,
+ payee_name: payee_name,
+ category_name: category_name,
+ subtransactions: subtransactions,
+ }
+ }
+}
+
+/// The cleared status of the transaction
+#[derive(Debug, Serialize, Deserialize)]
+pub enum Cleared {
+ #[serde(rename = "cleared")]
+ Cleared,
+ #[serde(rename = "uncleared")]
+ Uncleared,
+ #[serde(rename = "reconciled")]
+ Reconciled,
+}
+/// The transaction flag
+#[derive(Debug, Serialize, Deserialize)]
+pub enum FlagColor {
+ #[serde(rename = "red")]
+ Red,
+ #[serde(rename = "orange")]
+ Orange,
+ #[serde(rename = "yellow")]
+ Yellow,
+ #[serde(rename = "green")]
+ Green,
+ #[serde(rename = "blue")]
+ Blue,
+ #[serde(rename = "purple")]
+ Purple,
+}
+
diff --git a/ynab-api/src/models/transaction_detail_all_of.rs b/ynab-api/src/models/transaction_detail_all_of.rs
new file mode 100644
index 0000000..b0b44f9
--- /dev/null
+++ b/ynab-api/src/models/transaction_detail_all_of.rs
@@ -0,0 +1,40 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct TransactionDetailAllOf {
+ #[serde(rename = "account_name")]
+ pub account_name: String,
+ #[serde(rename = "payee_name")]
+ pub payee_name: String,
+ #[serde(rename = "category_name")]
+ pub category_name: String,
+ /// If a split transaction, the subtransactions.
+ #[serde(rename = "subtransactions")]
+ pub subtransactions: Vec<::models::SubTransaction>,
+}
+
+impl TransactionDetailAllOf {
+ pub fn new(account_name: String, payee_name: String, category_name: String, subtransactions: Vec<::models::SubTransaction>) -> TransactionDetailAllOf {
+ TransactionDetailAllOf {
+ account_name: account_name,
+ payee_name: payee_name,
+ category_name: category_name,
+ subtransactions: subtransactions,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/transaction_response.rs b/ynab-api/src/models/transaction_response.rs
new file mode 100644
index 0000000..cc65780
--- /dev/null
+++ b/ynab-api/src/models/transaction_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct TransactionResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::TransactionResponseData,
+}
+
+impl TransactionResponse {
+ pub fn new(data: ::models::TransactionResponseData) -> TransactionResponse {
+ TransactionResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/transaction_response_data.rs b/ynab-api/src/models/transaction_response_data.rs
new file mode 100644
index 0000000..5f96108
--- /dev/null
+++ b/ynab-api/src/models/transaction_response_data.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct TransactionResponseData {
+ #[serde(rename = "transaction")]
+ pub transaction: ::models::TransactionDetail,
+}
+
+impl TransactionResponseData {
+ pub fn new(transaction: ::models::TransactionDetail) -> TransactionResponseData {
+ TransactionResponseData {
+ transaction: transaction,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/transaction_summary.rs b/ynab-api/src/models/transaction_summary.rs
new file mode 100644
index 0000000..31ef1c5
--- /dev/null
+++ b/ynab-api/src/models/transaction_summary.rs
@@ -0,0 +1,108 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct TransactionSummary {
+ #[serde(rename = "id")]
+ pub id: String,
+ /// The transaction date in ISO format (e.g. 2016-12-01)
+ #[serde(rename = "date")]
+ pub date: String,
+ /// The transaction amount in milliunits format
+ #[serde(rename = "amount")]
+ pub amount: i64,
+ #[serde(rename = "memo")]
+ pub memo: String,
+ /// The cleared status of the transaction
+ #[serde(rename = "cleared")]
+ pub cleared: String,
+ /// Whether or not the transaction is approved
+ #[serde(rename = "approved")]
+ pub approved: bool,
+ /// The transaction flag
+ #[serde(rename = "flag_color")]
+ pub flag_color: String,
+ #[serde(rename = "account_id")]
+ pub account_id: String,
+ #[serde(rename = "payee_id")]
+ pub payee_id: String,
+ #[serde(rename = "category_id")]
+ pub category_id: String,
+ /// If a transfer transaction, the account to which it transfers
+ #[serde(rename = "transfer_account_id")]
+ pub transfer_account_id: String,
+ /// If a transfer transaction, the id of transaction on the other side of the transfer
+ #[serde(rename = "transfer_transaction_id")]
+ pub transfer_transaction_id: String,
+ /// If transaction is matched, the id of the matched transaction
+ #[serde(rename = "matched_transaction_id")]
+ pub matched_transaction_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'.
+ #[serde(rename = "import_id")]
+ pub import_id: String,
+ /// Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests.
+ #[serde(rename = "deleted")]
+ pub deleted: bool,
+}
+
+impl TransactionSummary {
+ pub fn new(id: String, date: String, amount: i64, memo: String, cleared: String, approved: bool, flag_color: String, account_id: String, payee_id: String, category_id: String, transfer_account_id: String, transfer_transaction_id: String, matched_transaction_id: String, import_id: String, deleted: bool) -> TransactionSummary {
+ TransactionSummary {
+ id: id,
+ date: date,
+ amount: amount,
+ memo: memo,
+ cleared: cleared,
+ approved: approved,
+ flag_color: flag_color,
+ account_id: account_id,
+ payee_id: payee_id,
+ category_id: category_id,
+ transfer_account_id: transfer_account_id,
+ transfer_transaction_id: transfer_transaction_id,
+ matched_transaction_id: matched_transaction_id,
+ import_id: import_id,
+ deleted: deleted,
+ }
+ }
+}
+
+/// The cleared status of the transaction
+#[derive(Debug, Serialize, Deserialize)]
+pub enum Cleared {
+ #[serde(rename = "cleared")]
+ Cleared,
+ #[serde(rename = "uncleared")]
+ Uncleared,
+ #[serde(rename = "reconciled")]
+ Reconciled,
+}
+/// The transaction flag
+#[derive(Debug, Serialize, Deserialize)]
+pub enum FlagColor {
+ #[serde(rename = "red")]
+ Red,
+ #[serde(rename = "orange")]
+ Orange,
+ #[serde(rename = "yellow")]
+ Yellow,
+ #[serde(rename = "green")]
+ Green,
+ #[serde(rename = "blue")]
+ Blue,
+ #[serde(rename = "purple")]
+ Purple,
+}
+
diff --git a/ynab-api/src/models/transactions_response.rs b/ynab-api/src/models/transactions_response.rs
new file mode 100644
index 0000000..cda3c1f
--- /dev/null
+++ b/ynab-api/src/models/transactions_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct TransactionsResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::TransactionsResponseData,
+}
+
+impl TransactionsResponse {
+ pub fn new(data: ::models::TransactionsResponseData) -> TransactionsResponse {
+ TransactionsResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/transactions_response_data.rs b/ynab-api/src/models/transactions_response_data.rs
new file mode 100644
index 0000000..4ac9438
--- /dev/null
+++ b/ynab-api/src/models/transactions_response_data.rs
@@ -0,0 +1,34 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct TransactionsResponseData {
+ #[serde(rename = "transactions")]
+ pub transactions: Vec<::models::TransactionDetail>,
+ /// The knowledge of the server
+ #[serde(rename = "server_knowledge")]
+ pub server_knowledge: i64,
+}
+
+impl TransactionsResponseData {
+ pub fn new(transactions: Vec<::models::TransactionDetail>, server_knowledge: i64) -> TransactionsResponseData {
+ TransactionsResponseData {
+ transactions: transactions,
+ server_knowledge: server_knowledge,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/user.rs b/ynab-api/src/models/user.rs
new file mode 100644
index 0000000..8143284
--- /dev/null
+++ b/ynab-api/src/models/user.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct User {
+ #[serde(rename = "id")]
+ pub id: String,
+}
+
+impl User {
+ pub fn new(id: String) -> User {
+ User {
+ id: id,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/user_response.rs b/ynab-api/src/models/user_response.rs
new file mode 100644
index 0000000..e2427e0
--- /dev/null
+++ b/ynab-api/src/models/user_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct UserResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::UserResponseData,
+}
+
+impl UserResponse {
+ pub fn new(data: ::models::UserResponseData) -> UserResponse {
+ UserResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/ynab-api/src/models/user_response_data.rs b/ynab-api/src/models/user_response_data.rs
new file mode 100644
index 0000000..9fc30f8
--- /dev/null
+++ b/ynab-api/src/models/user_response_data.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct UserResponseData {
+ #[serde(rename = "user")]
+ pub user: ::models::User,
+}
+
+impl UserResponseData {
+ pub fn new(user: ::models::User) -> UserResponseData {
+ UserResponseData {
+ user: user,
+ }
+ }
+}
+
+