aboutsummaryrefslogtreecommitdiffstats
path: root/src/models
diff options
context:
space:
mode:
Diffstat (limited to 'src/models')
-rw-r--r--src/models/account.rs94
-rw-r--r--src/models/account_response.rs30
-rw-r--r--src/models/account_response_data.rs30
-rw-r--r--src/models/accounts_response.rs30
-rw-r--r--src/models/accounts_response_data.rs34
-rw-r--r--src/models/budget_detail.rs81
-rw-r--r--src/models/budget_detail_all_of.rs57
-rw-r--r--src/models/budget_detail_response.rs30
-rw-r--r--src/models/budget_detail_response_data.rs34
-rw-r--r--src/models/budget_settings.rs33
-rw-r--r--src/models/budget_settings_response.rs30
-rw-r--r--src/models/budget_settings_response_data.rs30
-rw-r--r--src/models/budget_summary.rs51
-rw-r--r--src/models/budget_summary_response.rs30
-rw-r--r--src/models/budget_summary_response_data.rs33
-rw-r--r--src/models/bulk_response.rs30
-rw-r--r--src/models/bulk_response_data.rs30
-rw-r--r--src/models/bulk_response_data_bulk.rs35
-rw-r--r--src/models/bulk_transactions.rs30
-rw-r--r--src/models/categories_response.rs30
-rw-r--r--src/models/categories_response_data.rs34
-rw-r--r--src/models/category.rs93
-rw-r--r--src/models/category_group.rs41
-rw-r--r--src/models/category_group_with_categories.rs45
-rw-r--r--src/models/category_group_with_categories_all_of.rs31
-rw-r--r--src/models/category_response.rs30
-rw-r--r--src/models/category_response_data.rs30
-rw-r--r--src/models/currency_format.rs53
-rw-r--r--src/models/date_format.rs32
-rw-r--r--src/models/error_detail.rs36
-rw-r--r--src/models/error_response.rs30
-rw-r--r--src/models/hybrid_transaction.rs133
-rw-r--r--src/models/hybrid_transaction_all_of.rs52
-rw-r--r--src/models/hybrid_transactions_response.rs30
-rw-r--r--src/models/hybrid_transactions_response_data.rs30
-rw-r--r--src/models/mod.rs168
-rw-r--r--src/models/month_detail.rs61
-rw-r--r--src/models/month_detail_all_of.rs31
-rw-r--r--src/models/month_detail_response.rs30
-rw-r--r--src/models/month_detail_response_data.rs30
-rw-r--r--src/models/month_summaries_response.rs30
-rw-r--r--src/models/month_summaries_response_data.rs34
-rw-r--r--src/models/month_summary.rs57
-rw-r--r--src/models/payee.rs41
-rw-r--r--src/models/payee_location.rs43
-rw-r--r--src/models/payee_location_response.rs30
-rw-r--r--src/models/payee_location_response_data.rs30
-rw-r--r--src/models/payee_locations_response.rs30
-rw-r--r--src/models/payee_locations_response_data.rs30
-rw-r--r--src/models/payee_response.rs30
-rw-r--r--src/models/payee_response_data.rs30
-rw-r--r--src/models/payees_response.rs30
-rw-r--r--src/models/payees_response_data.rs34
-rw-r--r--src/models/save_category_response.rs30
-rw-r--r--src/models/save_category_response_data.rs34
-rw-r--r--src/models/save_month_category.rs31
-rw-r--r--src/models/save_month_category_wrapper.rs30
-rw-r--r--src/models/save_transaction.rs95
-rw-r--r--src/models/save_transaction_wrapper.rs30
-rw-r--r--src/models/save_transactions_response.rs30
-rw-r--r--src/models/save_transactions_response_data.rs46
-rw-r--r--src/models/save_transactions_wrapper.rs33
-rw-r--r--src/models/scheduled_sub_transaction.rs54
-rw-r--r--src/models/scheduled_transaction_detail.rs128
-rw-r--r--src/models/scheduled_transaction_detail_all_of.rs40
-rw-r--r--src/models/scheduled_transaction_response.rs30
-rw-r--r--src/models/scheduled_transaction_response_data.rs30
-rw-r--r--src/models/scheduled_transaction_summary.rs115
-rw-r--r--src/models/scheduled_transactions_response.rs30
-rw-r--r--src/models/scheduled_transactions_response_data.rs34
-rw-r--r--src/models/sub_transaction.rs54
-rw-r--r--src/models/transaction_detail.rs121
-rw-r--r--src/models/transaction_detail_all_of.rs40
-rw-r--r--src/models/transaction_response.rs30
-rw-r--r--src/models/transaction_response_data.rs30
-rw-r--r--src/models/transaction_summary.rs108
-rw-r--r--src/models/transactions_response.rs30
-rw-r--r--src/models/transactions_response_data.rs34
-rw-r--r--src/models/update_transaction.rs98
-rw-r--r--src/models/update_transaction_wrapper.rs30
-rw-r--r--src/models/update_transactions_response.rs30
-rw-r--r--src/models/update_transactions_wrapper.rs33
-rw-r--r--src/models/user.rs30
-rw-r--r--src/models/user_response.rs30
-rw-r--r--src/models/user_response_data.rs30
85 files changed, 3799 insertions, 0 deletions
diff --git a/src/models/account.rs b/src/models/account.rs
new file mode 100644
index 0000000..6ffa1d5
--- /dev/null
+++ b/src/models/account.rs
@@ -0,0 +1,94 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct Account {
+ #[serde(rename = "id")]
+ pub id: String,
+ #[serde(rename = "name")]
+ pub name: String,
+ /// The type of account. Note: payPal, merchantAccount, investmentAccount, and mortgage types have been deprecated and will be removed in the future.
+ #[serde(rename = "type")]
+ pub _type: String,
+ /// Whether this account is on budget or not
+ #[serde(rename = "on_budget")]
+ pub on_budget: bool,
+ /// Whether this account is closed or not
+ #[serde(rename = "closed")]
+ pub closed: bool,
+ #[serde(rename = "note", skip_serializing_if = "Option::is_none")]
+ pub note: Option<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, balance: i64, cleared_balance: i64, uncleared_balance: i64, transfer_payee_id: String, deleted: bool) -> Account {
+ Account {
+ id: id,
+ name: name,
+ _type: _type,
+ on_budget: on_budget,
+ closed: closed,
+ note: None,
+ balance: balance,
+ cleared_balance: cleared_balance,
+ uncleared_balance: uncleared_balance,
+ transfer_payee_id: transfer_payee_id,
+ deleted: deleted,
+ }
+ }
+}
+
+/// The type of account. Note: payPal, merchantAccount, investmentAccount, and mortgage types have been deprecated and will be removed in the future.
+#[derive(Debug, Serialize, Deserialize)]
+pub enum Type {
+ #[serde(rename = "checking")]
+ Checking,
+ #[serde(rename = "savings")]
+ Savings,
+ #[serde(rename = "cash")]
+ Cash,
+ #[serde(rename = "creditCard")]
+ CreditCard,
+ #[serde(rename = "lineOfCredit")]
+ LineOfCredit,
+ #[serde(rename = "otherAsset")]
+ OtherAsset,
+ #[serde(rename = "otherLiability")]
+ OtherLiability,
+ #[serde(rename = "payPal")]
+ PayPal,
+ #[serde(rename = "merchantAccount")]
+ MerchantAccount,
+ #[serde(rename = "investmentAccount")]
+ InvestmentAccount,
+ #[serde(rename = "mortgage")]
+ Mortgage,
+}
+
diff --git a/src/models/account_response.rs b/src/models/account_response.rs
new file mode 100644
index 0000000..633bacb
--- /dev/null
+++ b/src/models/account_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct AccountResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::AccountResponseData,
+}
+
+impl AccountResponse {
+ pub fn new(data: ::models::AccountResponseData) -> AccountResponse {
+ AccountResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/src/models/account_response_data.rs b/src/models/account_response_data.rs
new file mode 100644
index 0000000..9340a0f
--- /dev/null
+++ b/src/models/account_response_data.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct AccountResponseData {
+ #[serde(rename = "account")]
+ pub account: ::models::Account,
+}
+
+impl AccountResponseData {
+ pub fn new(account: ::models::Account) -> AccountResponseData {
+ AccountResponseData {
+ account: account,
+ }
+ }
+}
+
+
diff --git a/src/models/accounts_response.rs b/src/models/accounts_response.rs
new file mode 100644
index 0000000..d2bd25d
--- /dev/null
+++ b/src/models/accounts_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct AccountsResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::AccountsResponseData,
+}
+
+impl AccountsResponse {
+ pub fn new(data: ::models::AccountsResponseData) -> AccountsResponse {
+ AccountsResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/src/models/accounts_response_data.rs b/src/models/accounts_response_data.rs
new file mode 100644
index 0000000..1324953
--- /dev/null
+++ b/src/models/accounts_response_data.rs
@@ -0,0 +1,34 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct AccountsResponseData {
+ #[serde(rename = "accounts")]
+ pub accounts: Vec<::models::Account>,
+ /// The knowledge of the server
+ #[serde(rename = "server_knowledge")]
+ pub server_knowledge: i64,
+}
+
+impl AccountsResponseData {
+ pub fn new(accounts: Vec<::models::Account>, server_knowledge: i64) -> AccountsResponseData {
+ AccountsResponseData {
+ accounts: accounts,
+ server_knowledge: server_knowledge,
+ }
+ }
+}
+
+
diff --git a/src/models/budget_detail.rs b/src/models/budget_detail.rs
new file mode 100644
index 0000000..8553aad
--- /dev/null
+++ b/src/models/budget_detail.rs
@@ -0,0 +1,81 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct BudgetDetail {
+ #[serde(rename = "id")]
+ pub id: String,
+ #[serde(rename = "name")]
+ pub name: String,
+ /// The last time any changes were made to the budget from either a web or mobile client
+ #[serde(rename = "last_modified_on", skip_serializing_if = "Option::is_none")]
+ pub last_modified_on: Option<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/src/models/budget_detail_all_of.rs b/src/models/budget_detail_all_of.rs
new file mode 100644
index 0000000..90a621e
--- /dev/null
+++ b/src/models/budget_detail_all_of.rs
@@ -0,0 +1,57 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct BudgetDetailAllOf {
+ #[serde(rename = "accounts", skip_serializing_if = "Option::is_none")]
+ pub accounts: Option<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/src/models/budget_detail_response.rs b/src/models/budget_detail_response.rs
new file mode 100644
index 0000000..5fe15c9
--- /dev/null
+++ b/src/models/budget_detail_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct BudgetDetailResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::BudgetDetailResponseData,
+}
+
+impl BudgetDetailResponse {
+ pub fn new(data: ::models::BudgetDetailResponseData) -> BudgetDetailResponse {
+ BudgetDetailResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/src/models/budget_detail_response_data.rs b/src/models/budget_detail_response_data.rs
new file mode 100644
index 0000000..301479d
--- /dev/null
+++ b/src/models/budget_detail_response_data.rs
@@ -0,0 +1,34 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct BudgetDetailResponseData {
+ #[serde(rename = "budget")]
+ pub budget: ::models::BudgetDetail,
+ /// The knowledge of the server
+ #[serde(rename = "server_knowledge")]
+ pub server_knowledge: i64,
+}
+
+impl BudgetDetailResponseData {
+ pub fn new(budget: ::models::BudgetDetail, server_knowledge: i64) -> BudgetDetailResponseData {
+ BudgetDetailResponseData {
+ budget: budget,
+ server_knowledge: server_knowledge,
+ }
+ }
+}
+
+
diff --git a/src/models/budget_settings.rs b/src/models/budget_settings.rs
new file mode 100644
index 0000000..25985b5
--- /dev/null
+++ b/src/models/budget_settings.rs
@@ -0,0 +1,33 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct BudgetSettings {
+ #[serde(rename = "date_format")]
+ pub date_format: ::models::DateFormat,
+ #[serde(rename = "currency_format")]
+ pub currency_format: ::models::CurrencyFormat,
+}
+
+impl BudgetSettings {
+ pub fn new(date_format: ::models::DateFormat, currency_format: ::models::CurrencyFormat) -> BudgetSettings {
+ BudgetSettings {
+ date_format: date_format,
+ currency_format: currency_format,
+ }
+ }
+}
+
+
diff --git a/src/models/budget_settings_response.rs b/src/models/budget_settings_response.rs
new file mode 100644
index 0000000..c5c0ee3
--- /dev/null
+++ b/src/models/budget_settings_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct BudgetSettingsResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::BudgetSettingsResponseData,
+}
+
+impl BudgetSettingsResponse {
+ pub fn new(data: ::models::BudgetSettingsResponseData) -> BudgetSettingsResponse {
+ BudgetSettingsResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/src/models/budget_settings_response_data.rs b/src/models/budget_settings_response_data.rs
new file mode 100644
index 0000000..e484234
--- /dev/null
+++ b/src/models/budget_settings_response_data.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct BudgetSettingsResponseData {
+ #[serde(rename = "settings")]
+ pub settings: ::models::BudgetSettings,
+}
+
+impl BudgetSettingsResponseData {
+ pub fn new(settings: ::models::BudgetSettings) -> BudgetSettingsResponseData {
+ BudgetSettingsResponseData {
+ settings: settings,
+ }
+ }
+}
+
+
diff --git a/src/models/budget_summary.rs b/src/models/budget_summary.rs
new file mode 100644
index 0000000..b380593
--- /dev/null
+++ b/src/models/budget_summary.rs
@@ -0,0 +1,51 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct BudgetSummary {
+ #[serde(rename = "id")]
+ pub id: String,
+ #[serde(rename = "name")]
+ pub name: String,
+ /// The last time any changes were made to the budget from either a web or mobile client
+ #[serde(rename = "last_modified_on", skip_serializing_if = "Option::is_none")]
+ pub last_modified_on: Option<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/src/models/budget_summary_response.rs b/src/models/budget_summary_response.rs
new file mode 100644
index 0000000..422dfae
--- /dev/null
+++ b/src/models/budget_summary_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct BudgetSummaryResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::BudgetSummaryResponseData,
+}
+
+impl BudgetSummaryResponse {
+ pub fn new(data: ::models::BudgetSummaryResponseData) -> BudgetSummaryResponse {
+ BudgetSummaryResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/src/models/budget_summary_response_data.rs b/src/models/budget_summary_response_data.rs
new file mode 100644
index 0000000..f6bec05
--- /dev/null
+++ b/src/models/budget_summary_response_data.rs
@@ -0,0 +1,33 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct BudgetSummaryResponseData {
+ #[serde(rename = "budgets")]
+ pub budgets: Vec<::models::BudgetSummary>,
+ #[serde(rename = "default_budget", skip_serializing_if = "Option::is_none")]
+ pub default_budget: Option<::models::BudgetSummary>,
+}
+
+impl BudgetSummaryResponseData {
+ pub fn new(budgets: Vec<::models::BudgetSummary>) -> BudgetSummaryResponseData {
+ BudgetSummaryResponseData {
+ budgets: budgets,
+ default_budget: None,
+ }
+ }
+}
+
+
diff --git a/src/models/bulk_response.rs b/src/models/bulk_response.rs
new file mode 100644
index 0000000..bf98b29
--- /dev/null
+++ b/src/models/bulk_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct BulkResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::BulkResponseData,
+}
+
+impl BulkResponse {
+ pub fn new(data: ::models::BulkResponseData) -> BulkResponse {
+ BulkResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/src/models/bulk_response_data.rs b/src/models/bulk_response_data.rs
new file mode 100644
index 0000000..e347af0
--- /dev/null
+++ b/src/models/bulk_response_data.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct BulkResponseData {
+ #[serde(rename = "bulk")]
+ pub bulk: ::models::BulkResponseDataBulk,
+}
+
+impl BulkResponseData {
+ pub fn new(bulk: ::models::BulkResponseDataBulk) -> BulkResponseData {
+ BulkResponseData {
+ bulk: bulk,
+ }
+ }
+}
+
+
diff --git a/src/models/bulk_response_data_bulk.rs b/src/models/bulk_response_data_bulk.rs
new file mode 100644
index 0000000..3993078
--- /dev/null
+++ b/src/models/bulk_response_data_bulk.rs
@@ -0,0 +1,35 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct BulkResponseDataBulk {
+ /// The list of Transaction ids that were created.
+ #[serde(rename = "transaction_ids")]
+ pub transaction_ids: Vec<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/src/models/bulk_transactions.rs b/src/models/bulk_transactions.rs
new file mode 100644
index 0000000..e80c1c3
--- /dev/null
+++ b/src/models/bulk_transactions.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct BulkTransactions {
+ #[serde(rename = "transactions")]
+ pub transactions: Vec<::models::SaveTransaction>,
+}
+
+impl BulkTransactions {
+ pub fn new(transactions: Vec<::models::SaveTransaction>) -> BulkTransactions {
+ BulkTransactions {
+ transactions: transactions,
+ }
+ }
+}
+
+
diff --git a/src/models/categories_response.rs b/src/models/categories_response.rs
new file mode 100644
index 0000000..08fbafd
--- /dev/null
+++ b/src/models/categories_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct CategoriesResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::CategoriesResponseData,
+}
+
+impl CategoriesResponse {
+ pub fn new(data: ::models::CategoriesResponseData) -> CategoriesResponse {
+ CategoriesResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/src/models/categories_response_data.rs b/src/models/categories_response_data.rs
new file mode 100644
index 0000000..980505e
--- /dev/null
+++ b/src/models/categories_response_data.rs
@@ -0,0 +1,34 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct CategoriesResponseData {
+ #[serde(rename = "category_groups")]
+ pub category_groups: Vec<::models::CategoryGroupWithCategories>,
+ /// The knowledge of the server
+ #[serde(rename = "server_knowledge")]
+ pub server_knowledge: i64,
+}
+
+impl CategoriesResponseData {
+ pub fn new(category_groups: Vec<::models::CategoryGroupWithCategories>, server_knowledge: i64) -> CategoriesResponseData {
+ CategoriesResponseData {
+ category_groups: category_groups,
+ server_knowledge: server_knowledge,
+ }
+ }
+}
+
+
diff --git a/src/models/category.rs b/src/models/category.rs
new file mode 100644
index 0000000..1a62c6a
--- /dev/null
+++ b/src/models/category.rs
@@ -0,0 +1,93 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct Category {
+ #[serde(rename = "id")]
+ pub id: String,
+ #[serde(rename = "category_group_id")]
+ pub category_group_id: String,
+ #[serde(rename = "name")]
+ pub name: String,
+ /// Whether or not the category is hidden
+ #[serde(rename = "hidden")]
+ pub hidden: bool,
+ /// If category is hidden this is the id of the category group it originally belonged to before it was hidden.
+ #[serde(rename = "original_category_group_id", skip_serializing_if = "Option::is_none")]
+ pub original_category_group_id: Option<String>,
+ #[serde(rename = "note", skip_serializing_if = "Option::is_none")]
+ pub note: Option<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", skip_serializing_if = "Option::is_none")]
+ pub goal_type: Option<String>,
+ /// The month a goal was created
+ #[serde(rename = "goal_creation_month", skip_serializing_if = "Option::is_none")]
+ pub goal_creation_month: Option<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", skip_serializing_if = "Option::is_none")]
+ pub goal_target_month: Option<String>,
+ /// The percentage completion of the goal
+ #[serde(rename = "goal_percentage_complete", skip_serializing_if = "Option::is_none")]
+ pub goal_percentage_complete: Option<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, budgeted: i64, activity: i64, balance: i64, goal_target: i64, deleted: bool) -> Category {
+ Category {
+ id: id,
+ category_group_id: category_group_id,
+ name: name,
+ hidden: hidden,
+ original_category_group_id: None,
+ note: None,
+ budgeted: budgeted,
+ activity: activity,
+ balance: balance,
+ goal_type: None,
+ goal_creation_month: None,
+ goal_target: goal_target,
+ goal_target_month: None,
+ goal_percentage_complete: None,
+ deleted: deleted,
+ }
+ }
+}
+
+/// The type of goal, if the cagegory has a goal (TB=Target Category Balance, TBD=Target Category Balance by Date, MF=Monthly Funding)
+#[derive(Debug, Serialize, Deserialize)]
+pub enum GoalType {
+ #[serde(rename = "TB")]
+ TB,
+ #[serde(rename = "TBD")]
+ TBD,
+ #[serde(rename = "MF")]
+ MF,
+}
+
diff --git a/src/models/category_group.rs b/src/models/category_group.rs
new file mode 100644
index 0000000..2f674e2
--- /dev/null
+++ b/src/models/category_group.rs
@@ -0,0 +1,41 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct CategoryGroup {
+ #[serde(rename = "id")]
+ pub id: String,
+ #[serde(rename = "name")]
+ pub name: String,
+ /// Whether or not the category group is hidden
+ #[serde(rename = "hidden")]
+ pub hidden: bool,
+ /// Whether or not the category group has been deleted. Deleted category groups will only be included in delta requests.
+ #[serde(rename = "deleted")]
+ pub deleted: bool,
+}
+
+impl CategoryGroup {
+ pub fn new(id: String, name: String, hidden: bool, deleted: bool) -> CategoryGroup {
+ CategoryGroup {
+ id: id,
+ name: name,
+ hidden: hidden,
+ deleted: deleted,
+ }
+ }
+}
+
+
diff --git a/src/models/category_group_with_categories.rs b/src/models/category_group_with_categories.rs
new file mode 100644
index 0000000..38cfd88
--- /dev/null
+++ b/src/models/category_group_with_categories.rs
@@ -0,0 +1,45 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct CategoryGroupWithCategories {
+ #[serde(rename = "id")]
+ pub id: String,
+ #[serde(rename = "name")]
+ pub name: String,
+ /// Whether or not the category group is hidden
+ #[serde(rename = "hidden")]
+ pub hidden: bool,
+ /// Whether or not the category group has been deleted. Deleted category groups will only be included in delta requests.
+ #[serde(rename = "deleted")]
+ pub deleted: bool,
+ /// Category group categories. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
+ #[serde(rename = "categories")]
+ pub categories: Vec<::models::Category>,
+}
+
+impl CategoryGroupWithCategories {
+ pub fn new(id: String, name: String, hidden: bool, deleted: bool, categories: Vec<::models::Category>) -> CategoryGroupWithCategories {
+ CategoryGroupWithCategories {
+ id: id,
+ name: name,
+ hidden: hidden,
+ deleted: deleted,
+ categories: categories,
+ }
+ }
+}
+
+
diff --git a/src/models/category_group_with_categories_all_of.rs b/src/models/category_group_with_categories_all_of.rs
new file mode 100644
index 0000000..f34d3bb
--- /dev/null
+++ b/src/models/category_group_with_categories_all_of.rs
@@ -0,0 +1,31 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct CategoryGroupWithCategoriesAllOf {
+ /// Category group categories. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
+ #[serde(rename = "categories")]
+ pub categories: Vec<::models::Category>,
+}
+
+impl CategoryGroupWithCategoriesAllOf {
+ pub fn new(categories: Vec<::models::Category>) -> CategoryGroupWithCategoriesAllOf {
+ CategoryGroupWithCategoriesAllOf {
+ categories: categories,
+ }
+ }
+}
+
+
diff --git a/src/models/category_response.rs b/src/models/category_response.rs
new file mode 100644
index 0000000..35f2f40
--- /dev/null
+++ b/src/models/category_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct CategoryResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::CategoryResponseData,
+}
+
+impl CategoryResponse {
+ pub fn new(data: ::models::CategoryResponseData) -> CategoryResponse {
+ CategoryResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/src/models/category_response_data.rs b/src/models/category_response_data.rs
new file mode 100644
index 0000000..4e81fbb
--- /dev/null
+++ b/src/models/category_response_data.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct CategoryResponseData {
+ #[serde(rename = "category")]
+ pub category: ::models::Category,
+}
+
+impl CategoryResponseData {
+ pub fn new(category: ::models::Category) -> CategoryResponseData {
+ CategoryResponseData {
+ category: category,
+ }
+ }
+}
+
+
diff --git a/src/models/currency_format.rs b/src/models/currency_format.rs
new file mode 100644
index 0000000..476856a
--- /dev/null
+++ b/src/models/currency_format.rs
@@ -0,0 +1,53 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+/// CurrencyFormat : The currency format setting for the budget. In some cases the format will not be available and will be specified as null.
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct CurrencyFormat {
+ #[serde(rename = "iso_code")]
+ pub iso_code: String,
+ #[serde(rename = "example_format")]
+ pub example_format: String,
+ #[serde(rename = "decimal_digits")]
+ pub decimal_digits: i32,
+ #[serde(rename = "decimal_separator")]
+ pub decimal_separator: String,
+ #[serde(rename = "symbol_first")]
+ pub symbol_first: bool,
+ #[serde(rename = "group_separator")]
+ pub group_separator: String,
+ #[serde(rename = "currency_symbol")]
+ pub currency_symbol: String,
+ #[serde(rename = "display_symbol")]
+ pub display_symbol: bool,
+}
+
+impl CurrencyFormat {
+ /// The currency format setting for the budget. In some cases the format will not be available and will be specified as null.
+ pub fn new(iso_code: String, example_format: String, decimal_digits: i32, decimal_separator: String, symbol_first: bool, group_separator: String, currency_symbol: String, display_symbol: bool) -> CurrencyFormat {
+ CurrencyFormat {
+ iso_code: iso_code,
+ example_format: example_format,
+ decimal_digits: decimal_digits,
+ decimal_separator: decimal_separator,
+ symbol_first: symbol_first,
+ group_separator: group_separator,
+ currency_symbol: currency_symbol,
+ display_symbol: display_symbol,
+ }
+ }
+}
+
+
diff --git a/src/models/date_format.rs b/src/models/date_format.rs
new file mode 100644
index 0000000..cf88395
--- /dev/null
+++ b/src/models/date_format.rs
@@ -0,0 +1,32 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+/// DateFormat : The date format setting for the budget. In some cases the format will not be available and will be specified as null.
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct DateFormat {
+ #[serde(rename = "format")]
+ pub format: String,
+}
+
+impl DateFormat {
+ /// The date format setting for the budget. In some cases the format will not be available and will be specified as null.
+ pub fn new(format: String) -> DateFormat {
+ DateFormat {
+ format: format,
+ }
+ }
+}
+
+
diff --git a/src/models/error_detail.rs b/src/models/error_detail.rs
new file mode 100644
index 0000000..4745cf3
--- /dev/null
+++ b/src/models/error_detail.rs
@@ -0,0 +1,36 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct ErrorDetail {
+ #[serde(rename = "id")]
+ pub id: String,
+ #[serde(rename = "name")]
+ pub name: String,
+ #[serde(rename = "detail")]
+ pub detail: String,
+}
+
+impl ErrorDetail {
+ pub fn new(id: String, name: String, detail: String) -> ErrorDetail {
+ ErrorDetail {
+ id: id,
+ name: name,
+ detail: detail,
+ }
+ }
+}
+
+
diff --git a/src/models/error_response.rs b/src/models/error_response.rs
new file mode 100644
index 0000000..c321726
--- /dev/null
+++ b/src/models/error_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct ErrorResponse {
+ #[serde(rename = "error")]
+ pub error: ::models::ErrorDetail,
+}
+
+impl ErrorResponse {
+ pub fn new(error: ::models::ErrorDetail) -> ErrorResponse {
+ ErrorResponse {
+ error: error,
+ }
+ }
+}
+
+
diff --git a/src/models/hybrid_transaction.rs b/src/models/hybrid_transaction.rs
new file mode 100644
index 0000000..802813b
--- /dev/null
+++ b/src/models/hybrid_transaction.rs
@@ -0,0 +1,133 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct HybridTransaction {
+ #[serde(rename = "id")]
+ pub id: String,
+ /// The transaction date in ISO format (e.g. 2016-12-01)
+ #[serde(rename = "date")]
+ pub date: String,
+ /// The transaction amount in milliunits format
+ #[serde(rename = "amount")]
+ pub amount: i64,
+ #[serde(rename = "memo", skip_serializing_if = "Option::is_none")]
+ pub memo: Option<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", skip_serializing_if = "Option::is_none")]
+ pub flag_color: Option<String>,
+ #[serde(rename = "account_id")]
+ pub account_id: String,
+ #[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")]
+ pub payee_id: Option<String>,
+ #[serde(rename = "category_id", skip_serializing_if = "Option::is_none")]
+ pub category_id: Option<String>,
+ /// If a transfer transaction, the account to which it transfers
+ #[serde(rename = "transfer_account_id", skip_serializing_if = "Option::is_none")]
+ pub transfer_account_id: Option<String>,
+ /// If a transfer transaction, the id of transaction on the other side of the transfer
+ #[serde(rename = "transfer_transaction_id", skip_serializing_if = "Option::is_none")]
+ pub transfer_transaction_id: Option<String>,
+ /// If transaction is matched, the id of the matched transaction
+ #[serde(rename = "matched_transaction_id", skip_serializing_if = "Option::is_none")]
+ pub matched_transaction_id: Option<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", skip_serializing_if = "Option::is_none")]
+ pub import_id: Option<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", skip_serializing_if = "Option::is_none")]
+ pub parent_transaction_id: Option<String>,
+ #[serde(rename = "account_name")]
+ pub account_name: String,
+ #[serde(rename = "payee_name", skip_serializing_if = "Option::is_none")]
+ pub payee_name: Option<String>,
+ #[serde(rename = "category_name")]
+ pub category_name: String,
+}
+
+impl HybridTransaction {
+ pub fn new(id: String, date: String, amount: i64, cleared: String, approved: bool, account_id: String, deleted: bool, _type: String, account_name: String, category_name: String) -> HybridTransaction {
+ HybridTransaction {
+ id: id,
+ date: date,
+ amount: amount,
+ memo: None,
+ cleared: cleared,
+ approved: approved,
+ flag_color: None,
+ account_id: account_id,
+ payee_id: None,
+ category_id: None,
+ transfer_account_id: None,
+ transfer_transaction_id: None,
+ matched_transaction_id: None,
+ import_id: None,
+ deleted: deleted,
+ _type: _type,
+ parent_transaction_id: None,
+ account_name: account_name,
+ payee_name: None,
+ category_name: category_name,
+ }
+ }
+}
+
+/// The cleared status of the transaction
+#[derive(Debug, Serialize, Deserialize)]
+pub enum Cleared {
+ #[serde(rename = "cleared")]
+ Cleared,
+ #[serde(rename = "uncleared")]
+ Uncleared,
+ #[serde(rename = "reconciled")]
+ Reconciled,
+}
+/// The transaction flag
+#[derive(Debug, Serialize, Deserialize)]
+pub enum FlagColor {
+ #[serde(rename = "red")]
+ Red,
+ #[serde(rename = "orange")]
+ Orange,
+ #[serde(rename = "yellow")]
+ Yellow,
+ #[serde(rename = "green")]
+ Green,
+ #[serde(rename = "blue")]
+ Blue,
+ #[serde(rename = "purple")]
+ Purple,
+}
+/// Whether the hybrid transaction represents a regular transaction or a subtransaction
+#[derive(Debug, Serialize, Deserialize)]
+pub enum Type {
+ #[serde(rename = "transaction")]
+ Transaction,
+ #[serde(rename = "subtransaction")]
+ Subtransaction,
+}
+
diff --git a/src/models/hybrid_transaction_all_of.rs b/src/models/hybrid_transaction_all_of.rs
new file mode 100644
index 0000000..42fd515
--- /dev/null
+++ b/src/models/hybrid_transaction_all_of.rs
@@ -0,0 +1,52 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct HybridTransactionAllOf {
+ /// Whether the hybrid transaction represents a regular transaction or a subtransaction
+ #[serde(rename = "type")]
+ pub _type: String,
+ /// For subtransaction types, this is the id of the pararent transaction. For transaction types, this id will be always be null.
+ #[serde(rename = "parent_transaction_id", skip_serializing_if = "Option::is_none")]
+ pub parent_transaction_id: Option<String>,
+ #[serde(rename = "account_name")]
+ pub account_name: String,
+ #[serde(rename = "payee_name", skip_serializing_if = "Option::is_none")]
+ pub payee_name: Option<String>,
+ #[serde(rename = "category_name")]
+ pub category_name: String,
+}
+
+impl HybridTransactionAllOf {
+ pub fn new(_type: String, account_name: String, category_name: String) -> HybridTransactionAllOf {
+ HybridTransactionAllOf {
+ _type: _type,
+ parent_transaction_id: None,
+ account_name: account_name,
+ payee_name: None,
+ category_name: category_name,
+ }
+ }
+}
+
+/// Whether the hybrid transaction represents a regular transaction or a subtransaction
+#[derive(Debug, Serialize, Deserialize)]
+pub enum Type {
+ #[serde(rename = "transaction")]
+ Transaction,
+ #[serde(rename = "subtransaction")]
+ Subtransaction,
+}
+
diff --git a/src/models/hybrid_transactions_response.rs b/src/models/hybrid_transactions_response.rs
new file mode 100644
index 0000000..493582e
--- /dev/null
+++ b/src/models/hybrid_transactions_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct HybridTransactionsResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::HybridTransactionsResponseData,
+}
+
+impl HybridTransactionsResponse {
+ pub fn new(data: ::models::HybridTransactionsResponseData) -> HybridTransactionsResponse {
+ HybridTransactionsResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/src/models/hybrid_transactions_response_data.rs b/src/models/hybrid_transactions_response_data.rs
new file mode 100644
index 0000000..8e329e4
--- /dev/null
+++ b/src/models/hybrid_transactions_response_data.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct HybridTransactionsResponseData {
+ #[serde(rename = "transactions")]
+ pub transactions: Vec<::models::HybridTransaction>,
+}
+
+impl HybridTransactionsResponseData {
+ pub fn new(transactions: Vec<::models::HybridTransaction>) -> HybridTransactionsResponseData {
+ HybridTransactionsResponseData {
+ transactions: transactions,
+ }
+ }
+}
+
+
diff --git a/src/models/mod.rs b/src/models/mod.rs
new file mode 100644
index 0000000..ba8b351
--- /dev/null
+++ b/src/models/mod.rs
@@ -0,0 +1,168 @@
+mod account;
+pub use self::account::Account;
+mod account_response;
+pub use self::account_response::AccountResponse;
+mod account_response_data;
+pub use self::account_response_data::AccountResponseData;
+mod accounts_response;
+pub use self::accounts_response::AccountsResponse;
+mod accounts_response_data;
+pub use self::accounts_response_data::AccountsResponseData;
+mod budget_detail;
+pub use self::budget_detail::BudgetDetail;
+mod budget_detail_all_of;
+pub use self::budget_detail_all_of::BudgetDetailAllOf;
+mod budget_detail_response;
+pub use self::budget_detail_response::BudgetDetailResponse;
+mod budget_detail_response_data;
+pub use self::budget_detail_response_data::BudgetDetailResponseData;
+mod budget_settings;
+pub use self::budget_settings::BudgetSettings;
+mod budget_settings_response;
+pub use self::budget_settings_response::BudgetSettingsResponse;
+mod budget_settings_response_data;
+pub use self::budget_settings_response_data::BudgetSettingsResponseData;
+mod budget_summary;
+pub use self::budget_summary::BudgetSummary;
+mod budget_summary_response;
+pub use self::budget_summary_response::BudgetSummaryResponse;
+mod budget_summary_response_data;
+pub use self::budget_summary_response_data::BudgetSummaryResponseData;
+mod bulk_response;
+pub use self::bulk_response::BulkResponse;
+mod bulk_response_data;
+pub use self::bulk_response_data::BulkResponseData;
+mod bulk_response_data_bulk;
+pub use self::bulk_response_data_bulk::BulkResponseDataBulk;
+mod bulk_transactions;
+pub use self::bulk_transactions::BulkTransactions;
+mod categories_response;
+pub use self::categories_response::CategoriesResponse;
+mod categories_response_data;
+pub use self::categories_response_data::CategoriesResponseData;
+mod category;
+pub use self::category::Category;
+mod category_group;
+pub use self::category_group::CategoryGroup;
+mod category_group_with_categories;
+pub use self::category_group_with_categories::CategoryGroupWithCategories;
+mod category_group_with_categories_all_of;
+pub use self::category_group_with_categories_all_of::CategoryGroupWithCategoriesAllOf;
+mod category_response;
+pub use self::category_response::CategoryResponse;
+mod category_response_data;
+pub use self::category_response_data::CategoryResponseData;
+mod currency_format;
+pub use self::currency_format::CurrencyFormat;
+mod date_format;
+pub use self::date_format::DateFormat;
+mod error_detail;
+pub use self::error_detail::ErrorDetail;
+mod error_response;
+pub use self::error_response::ErrorResponse;
+mod hybrid_transaction;
+pub use self::hybrid_transaction::HybridTransaction;
+mod hybrid_transaction_all_of;
+pub use self::hybrid_transaction_all_of::HybridTransactionAllOf;
+mod hybrid_transactions_response;
+pub use self::hybrid_transactions_response::HybridTransactionsResponse;
+mod hybrid_transactions_response_data;
+pub use self::hybrid_transactions_response_data::HybridTransactionsResponseData;
+mod month_detail;
+pub use self::month_detail::MonthDetail;
+mod month_detail_all_of;
+pub use self::month_detail_all_of::MonthDetailAllOf;
+mod month_detail_response;
+pub use self::month_detail_response::MonthDetailResponse;
+mod month_detail_response_data;
+pub use self::month_detail_response_data::MonthDetailResponseData;
+mod month_summaries_response;
+pub use self::month_summaries_response::MonthSummariesResponse;
+mod month_summaries_response_data;
+pub use self::month_summaries_response_data::MonthSummariesResponseData;
+mod month_summary;
+pub use self::month_summary::MonthSummary;
+mod payee;
+pub use self::payee::Payee;
+mod payee_location;
+pub use self::payee_location::PayeeLocation;
+mod payee_location_response;
+pub use self::payee_location_response::PayeeLocationResponse;
+mod payee_location_response_data;
+pub use self::payee_location_response_data::PayeeLocationResponseData;
+mod payee_locations_response;
+pub use self::payee_locations_response::PayeeLocationsResponse;
+mod payee_locations_response_data;
+pub use self::payee_locations_response_data::PayeeLocationsResponseData;
+mod payee_response;
+pub use self::payee_response::PayeeResponse;
+mod payee_response_data;
+pub use self::payee_response_data::PayeeResponseData;
+mod payees_response;
+pub use self::payees_response::PayeesResponse;
+mod payees_response_data;
+pub use self::payees_response_data::PayeesResponseData;
+mod save_category_response;
+pub use self::save_category_response::SaveCategoryResponse;
+mod save_category_response_data;
+pub use self::save_category_response_data::SaveCategoryResponseData;
+mod save_month_category;
+pub use self::save_month_category::SaveMonthCategory;
+mod save_month_category_wrapper;
+pub use self::save_month_category_wrapper::SaveMonthCategoryWrapper;
+mod save_transaction;
+pub use self::save_transaction::SaveTransaction;
+mod save_transaction_wrapper;
+pub use self::save_transaction_wrapper::SaveTransactionWrapper;
+mod save_transactions_response;
+pub use self::save_transactions_response::SaveTransactionsResponse;
+mod save_transactions_response_data;
+pub use self::save_transactions_response_data::SaveTransactionsResponseData;
+mod save_transactions_wrapper;
+pub use self::save_transactions_wrapper::SaveTransactionsWrapper;
+mod scheduled_sub_transaction;
+pub use self::scheduled_sub_transaction::ScheduledSubTransaction;
+mod scheduled_transaction_detail;
+pub use self::scheduled_transaction_detail::ScheduledTransactionDetail;
+mod scheduled_transaction_detail_all_of;
+pub use self::scheduled_transaction_detail_all_of::ScheduledTransactionDetailAllOf;
+mod scheduled_transaction_response;
+pub use self::scheduled_transaction_response::ScheduledTransactionResponse;
+mod scheduled_transaction_response_data;
+pub use self::scheduled_transaction_response_data::ScheduledTransactionResponseData;
+mod scheduled_transaction_summary;
+pub use self::scheduled_transaction_summary::ScheduledTransactionSummary;
+mod scheduled_transactions_response;
+pub use self::scheduled_transactions_response::ScheduledTransactionsResponse;
+mod scheduled_transactions_response_data;
+pub use self::scheduled_transactions_response_data::ScheduledTransactionsResponseData;
+mod sub_transaction;
+pub use self::sub_transaction::SubTransaction;
+mod transaction_detail;
+pub use self::transaction_detail::TransactionDetail;
+mod transaction_detail_all_of;
+pub use self::transaction_detail_all_of::TransactionDetailAllOf;
+mod transaction_response;
+pub use self::transaction_response::TransactionResponse;
+mod transaction_response_data;
+pub use self::transaction_response_data::TransactionResponseData;
+mod transaction_summary;
+pub use self::transaction_summary::TransactionSummary;
+mod transactions_response;
+pub use self::transactions_response::TransactionsResponse;
+mod transactions_response_data;
+pub use self::transactions_response_data::TransactionsResponseData;
+mod update_transaction;
+pub use self::update_transaction::UpdateTransaction;
+mod update_transaction_wrapper;
+pub use self::update_transaction_wrapper::UpdateTransactionWrapper;
+mod update_transactions_response;
+pub use self::update_transactions_response::UpdateTransactionsResponse;
+mod update_transactions_wrapper;
+pub use self::update_transactions_wrapper::UpdateTransactionsWrapper;
+mod user;
+pub use self::user::User;
+mod user_response;
+pub use self::user_response::UserResponse;
+mod user_response_data;
+pub use self::user_response_data::UserResponseData;
diff --git a/src/models/month_detail.rs b/src/models/month_detail.rs
new file mode 100644
index 0000000..a6f55d4
--- /dev/null
+++ b/src/models/month_detail.rs
@@ -0,0 +1,61 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct MonthDetail {
+ #[serde(rename = "month")]
+ pub month: String,
+ #[serde(rename = "note", skip_serializing_if = "Option::is_none")]
+ pub note: Option<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", skip_serializing_if = "Option::is_none")]
+ pub age_of_money: Option<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, income: i64, budgeted: i64, activity: i64, to_be_budgeted: i64, deleted: bool, categories: Vec<::models::Category>) -> MonthDetail {
+ MonthDetail {
+ month: month,
+ note: None,
+ income: income,
+ budgeted: budgeted,
+ activity: activity,
+ to_be_budgeted: to_be_budgeted,
+ age_of_money: None,
+ deleted: deleted,
+ categories: categories,
+ }
+ }
+}
+
+
diff --git a/src/models/month_detail_all_of.rs b/src/models/month_detail_all_of.rs
new file mode 100644
index 0000000..0f07326
--- /dev/null
+++ b/src/models/month_detail_all_of.rs
@@ -0,0 +1,31 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct MonthDetailAllOf {
+ /// The budget month categories. Amounts (budgeted, activity, balance, etc.) are specific to the {month} parameter specified.
+ #[serde(rename = "categories")]
+ pub categories: Vec<::models::Category>,
+}
+
+impl MonthDetailAllOf {
+ pub fn new(categories: Vec<::models::Category>) -> MonthDetailAllOf {
+ MonthDetailAllOf {
+ categories: categories,
+ }
+ }
+}
+
+
diff --git a/src/models/month_detail_response.rs b/src/models/month_detail_response.rs
new file mode 100644
index 0000000..c144afb
--- /dev/null
+++ b/src/models/month_detail_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct MonthDetailResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::MonthDetailResponseData,
+}
+
+impl MonthDetailResponse {
+ pub fn new(data: ::models::MonthDetailResponseData) -> MonthDetailResponse {
+ MonthDetailResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/src/models/month_detail_response_data.rs b/src/models/month_detail_response_data.rs
new file mode 100644
index 0000000..0948763
--- /dev/null
+++ b/src/models/month_detail_response_data.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct MonthDetailResponseData {
+ #[serde(rename = "month")]
+ pub month: ::models::MonthDetail,
+}
+
+impl MonthDetailResponseData {
+ pub fn new(month: ::models::MonthDetail) -> MonthDetailResponseData {
+ MonthDetailResponseData {
+ month: month,
+ }
+ }
+}
+
+
diff --git a/src/models/month_summaries_response.rs b/src/models/month_summaries_response.rs
new file mode 100644
index 0000000..44d5d66
--- /dev/null
+++ b/src/models/month_summaries_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct MonthSummariesResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::MonthSummariesResponseData,
+}
+
+impl MonthSummariesResponse {
+ pub fn new(data: ::models::MonthSummariesResponseData) -> MonthSummariesResponse {
+ MonthSummariesResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/src/models/month_summaries_response_data.rs b/src/models/month_summaries_response_data.rs
new file mode 100644
index 0000000..6237601
--- /dev/null
+++ b/src/models/month_summaries_response_data.rs
@@ -0,0 +1,34 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct MonthSummariesResponseData {
+ #[serde(rename = "months")]
+ pub months: Vec<::models::MonthSummary>,
+ /// The knowledge of the server
+ #[serde(rename = "server_knowledge")]
+ pub server_knowledge: i64,
+}
+
+impl MonthSummariesResponseData {
+ pub fn new(months: Vec<::models::MonthSummary>, server_knowledge: i64) -> MonthSummariesResponseData {
+ MonthSummariesResponseData {
+ months: months,
+ server_knowledge: server_knowledge,
+ }
+ }
+}
+
+
diff --git a/src/models/month_summary.rs b/src/models/month_summary.rs
new file mode 100644
index 0000000..3c705d3
--- /dev/null
+++ b/src/models/month_summary.rs
@@ -0,0 +1,57 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct MonthSummary {
+ #[serde(rename = "month")]
+ pub month: String,
+ #[serde(rename = "note", skip_serializing_if = "Option::is_none")]
+ pub note: Option<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", skip_serializing_if = "Option::is_none")]
+ pub age_of_money: Option<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, income: i64, budgeted: i64, activity: i64, to_be_budgeted: i64, deleted: bool) -> MonthSummary {
+ MonthSummary {
+ month: month,
+ note: None,
+ income: income,
+ budgeted: budgeted,
+ activity: activity,
+ to_be_budgeted: to_be_budgeted,
+ age_of_money: None,
+ deleted: deleted,
+ }
+ }
+}
+
+
diff --git a/src/models/payee.rs b/src/models/payee.rs
new file mode 100644
index 0000000..13ad103
--- /dev/null
+++ b/src/models/payee.rs
@@ -0,0 +1,41 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct Payee {
+ #[serde(rename = "id")]
+ pub id: String,
+ #[serde(rename = "name")]
+ pub name: String,
+ /// If a transfer payee, the account_id to which this payee transfers to
+ #[serde(rename = "transfer_account_id", skip_serializing_if = "Option::is_none")]
+ pub transfer_account_id: Option<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, deleted: bool) -> Payee {
+ Payee {
+ id: id,
+ name: name,
+ transfer_account_id: None,
+ deleted: deleted,
+ }
+ }
+}
+
+
diff --git a/src/models/payee_location.rs b/src/models/payee_location.rs
new file mode 100644
index 0000000..afb050e
--- /dev/null
+++ b/src/models/payee_location.rs
@@ -0,0 +1,43 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct PayeeLocation {
+ #[serde(rename = "id")]
+ pub id: String,
+ #[serde(rename = "payee_id")]
+ pub payee_id: String,
+ #[serde(rename = "latitude")]
+ pub latitude: String,
+ #[serde(rename = "longitude")]
+ pub longitude: String,
+ /// Whether or not the payee location has been deleted. Deleted payee locations will only be included in delta requests.
+ #[serde(rename = "deleted")]
+ pub deleted: bool,
+}
+
+impl PayeeLocation {
+ pub fn new(id: String, payee_id: String, latitude: String, longitude: String, deleted: bool) -> PayeeLocation {
+ PayeeLocation {
+ id: id,
+ payee_id: payee_id,
+ latitude: latitude,
+ longitude: longitude,
+ deleted: deleted,
+ }
+ }
+}
+
+
diff --git a/src/models/payee_location_response.rs b/src/models/payee_location_response.rs
new file mode 100644
index 0000000..e6d2608
--- /dev/null
+++ b/src/models/payee_location_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct PayeeLocationResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::PayeeLocationResponseData,
+}
+
+impl PayeeLocationResponse {
+ pub fn new(data: ::models::PayeeLocationResponseData) -> PayeeLocationResponse {
+ PayeeLocationResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/src/models/payee_location_response_data.rs b/src/models/payee_location_response_data.rs
new file mode 100644
index 0000000..869c4ea
--- /dev/null
+++ b/src/models/payee_location_response_data.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct PayeeLocationResponseData {
+ #[serde(rename = "payee_location")]
+ pub payee_location: ::models::PayeeLocation,
+}
+
+impl PayeeLocationResponseData {
+ pub fn new(payee_location: ::models::PayeeLocation) -> PayeeLocationResponseData {
+ PayeeLocationResponseData {
+ payee_location: payee_location,
+ }
+ }
+}
+
+
diff --git a/src/models/payee_locations_response.rs b/src/models/payee_locations_response.rs
new file mode 100644
index 0000000..916a19e
--- /dev/null
+++ b/src/models/payee_locations_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct PayeeLocationsResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::PayeeLocationsResponseData,
+}
+
+impl PayeeLocationsResponse {
+ pub fn new(data: ::models::PayeeLocationsResponseData) -> PayeeLocationsResponse {
+ PayeeLocationsResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/src/models/payee_locations_response_data.rs b/src/models/payee_locations_response_data.rs
new file mode 100644
index 0000000..ea46038
--- /dev/null
+++ b/src/models/payee_locations_response_data.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct PayeeLocationsResponseData {
+ #[serde(rename = "payee_locations")]
+ pub payee_locations: Vec<::models::PayeeLocation>,
+}
+
+impl PayeeLocationsResponseData {
+ pub fn new(payee_locations: Vec<::models::PayeeLocation>) -> PayeeLocationsResponseData {
+ PayeeLocationsResponseData {
+ payee_locations: payee_locations,
+ }
+ }
+}
+
+
diff --git a/src/models/payee_response.rs b/src/models/payee_response.rs
new file mode 100644
index 0000000..690913a
--- /dev/null
+++ b/src/models/payee_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct PayeeResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::PayeeResponseData,
+}
+
+impl PayeeResponse {
+ pub fn new(data: ::models::PayeeResponseData) -> PayeeResponse {
+ PayeeResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/src/models/payee_response_data.rs b/src/models/payee_response_data.rs
new file mode 100644
index 0000000..f19f7ea
--- /dev/null
+++ b/src/models/payee_response_data.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct PayeeResponseData {
+ #[serde(rename = "payee")]
+ pub payee: ::models::Payee,
+}
+
+impl PayeeResponseData {
+ pub fn new(payee: ::models::Payee) -> PayeeResponseData {
+ PayeeResponseData {
+ payee: payee,
+ }
+ }
+}
+
+
diff --git a/src/models/payees_response.rs b/src/models/payees_response.rs
new file mode 100644
index 0000000..dba96f3
--- /dev/null
+++ b/src/models/payees_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct PayeesResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::PayeesResponseData,
+}
+
+impl PayeesResponse {
+ pub fn new(data: ::models::PayeesResponseData) -> PayeesResponse {
+ PayeesResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/src/models/payees_response_data.rs b/src/models/payees_response_data.rs
new file mode 100644
index 0000000..4897b15
--- /dev/null
+++ b/src/models/payees_response_data.rs
@@ -0,0 +1,34 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct PayeesResponseData {
+ #[serde(rename = "payees")]
+ pub payees: Vec<::models::Payee>,
+ /// The knowledge of the server
+ #[serde(rename = "server_knowledge")]
+ pub server_knowledge: i64,
+}
+
+impl PayeesResponseData {
+ pub fn new(payees: Vec<::models::Payee>, server_knowledge: i64) -> PayeesResponseData {
+ PayeesResponseData {
+ payees: payees,
+ server_knowledge: server_knowledge,
+ }
+ }
+}
+
+
diff --git a/src/models/save_category_response.rs b/src/models/save_category_response.rs
new file mode 100644
index 0000000..37744c1
--- /dev/null
+++ b/src/models/save_category_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct SaveCategoryResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::SaveCategoryResponseData,
+}
+
+impl SaveCategoryResponse {
+ pub fn new(data: ::models::SaveCategoryResponseData) -> SaveCategoryResponse {
+ SaveCategoryResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/src/models/save_category_response_data.rs b/src/models/save_category_response_data.rs
new file mode 100644
index 0000000..b61b206
--- /dev/null
+++ b/src/models/save_category_response_data.rs
@@ -0,0 +1,34 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct SaveCategoryResponseData {
+ #[serde(rename = "category")]
+ pub category: ::models::Category,
+ /// The knowledge of the server
+ #[serde(rename = "server_knowledge")]
+ pub server_knowledge: i64,
+}
+
+impl SaveCategoryResponseData {
+ pub fn new(category: ::models::Category, server_knowledge: i64) -> SaveCategoryResponseData {
+ SaveCategoryResponseData {
+ category: category,
+ server_knowledge: server_knowledge,
+ }
+ }
+}
+
+
diff --git a/src/models/save_month_category.rs b/src/models/save_month_category.rs
new file mode 100644
index 0000000..40d1b2e
--- /dev/null
+++ b/src/models/save_month_category.rs
@@ -0,0 +1,31 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct SaveMonthCategory {
+ /// Budgeted amount in milliunits format
+ #[serde(rename = "budgeted")]
+ pub budgeted: i64,
+}
+
+impl SaveMonthCategory {
+ pub fn new(budgeted: i64) -> SaveMonthCategory {
+ SaveMonthCategory {
+ budgeted: budgeted,
+ }
+ }
+}
+
+
diff --git a/src/models/save_month_category_wrapper.rs b/src/models/save_month_category_wrapper.rs
new file mode 100644
index 0000000..ef67116
--- /dev/null
+++ b/src/models/save_month_category_wrapper.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct SaveMonthCategoryWrapper {
+ #[serde(rename = "category")]
+ pub category: ::models::SaveMonthCategory,
+}
+
+impl SaveMonthCategoryWrapper {
+ pub fn new(category: ::models::SaveMonthCategory) -> SaveMonthCategoryWrapper {
+ SaveMonthCategoryWrapper {
+ category: category,
+ }
+ }
+}
+
+
diff --git a/src/models/save_transaction.rs b/src/models/save_transaction.rs
new file mode 100644
index 0000000..c2fc6b7
--- /dev/null
+++ b/src/models/save_transaction.rs
@@ -0,0 +1,95 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct SaveTransaction {
+ #[serde(rename = "account_id")]
+ pub account_id: String,
+ /// The transaction date in ISO format (e.g. 2016-12-01). Future dates (scheduled transactions) are not permitted. Split transaction dates cannot be changed and if a different date is supplied it will be ignored.
+ #[serde(rename = "date")]
+ pub date: String,
+ /// The transaction amount in milliunits format. Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored.
+ #[serde(rename = "amount")]
+ pub amount: i64,
+ /// The payee for the transaction
+ #[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")]
+ pub payee_id: Option<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/src/models/save_transaction_wrapper.rs b/src/models/save_transaction_wrapper.rs
new file mode 100644
index 0000000..71bc7cd
--- /dev/null
+++ b/src/models/save_transaction_wrapper.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct SaveTransactionWrapper {
+ #[serde(rename = "transaction")]
+ pub transaction: ::models::SaveTransaction,
+}
+
+impl SaveTransactionWrapper {
+ pub fn new(transaction: ::models::SaveTransaction) -> SaveTransactionWrapper {
+ SaveTransactionWrapper {
+ transaction: transaction,
+ }
+ }
+}
+
+
diff --git a/src/models/save_transactions_response.rs b/src/models/save_transactions_response.rs
new file mode 100644
index 0000000..be0782c
--- /dev/null
+++ b/src/models/save_transactions_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct SaveTransactionsResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::SaveTransactionsResponseData,
+}
+
+impl SaveTransactionsResponse {
+ pub fn new(data: ::models::SaveTransactionsResponseData) -> SaveTransactionsResponse {
+ SaveTransactionsResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/src/models/save_transactions_response_data.rs b/src/models/save_transactions_response_data.rs
new file mode 100644
index 0000000..0086874
--- /dev/null
+++ b/src/models/save_transactions_response_data.rs
@@ -0,0 +1,46 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct SaveTransactionsResponseData {
+ /// The transaction ids that were saved
+ #[serde(rename = "transaction_ids")]
+ pub transaction_ids: Vec<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/src/models/save_transactions_wrapper.rs b/src/models/save_transactions_wrapper.rs
new file mode 100644
index 0000000..ed49180
--- /dev/null
+++ b/src/models/save_transactions_wrapper.rs
@@ -0,0 +1,33 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct SaveTransactionsWrapper {
+ #[serde(rename = "transaction", skip_serializing_if = "Option::is_none")]
+ pub transaction: Option<::models::SaveTransaction>,
+ #[serde(rename = "transactions", skip_serializing_if = "Option::is_none")]
+ pub transactions: Option<Vec<::models::SaveTransaction>>,
+}
+
+impl SaveTransactionsWrapper {
+ pub fn new() -> SaveTransactionsWrapper {
+ SaveTransactionsWrapper {
+ transaction: None,
+ transactions: None,
+ }
+ }
+}
+
+
diff --git a/src/models/scheduled_sub_transaction.rs b/src/models/scheduled_sub_transaction.rs
new file mode 100644
index 0000000..dfc0aca
--- /dev/null
+++ b/src/models/scheduled_sub_transaction.rs
@@ -0,0 +1,54 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct ScheduledSubTransaction {
+ #[serde(rename = "id")]
+ pub id: String,
+ #[serde(rename = "scheduled_transaction_id")]
+ pub scheduled_transaction_id: String,
+ /// The scheduled subtransaction amount in milliunits format
+ #[serde(rename = "amount")]
+ pub amount: i64,
+ #[serde(rename = "memo", skip_serializing_if = "Option::is_none")]
+ pub memo: Option<String>,
+ #[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")]
+ pub payee_id: Option<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", skip_serializing_if = "Option::is_none")]
+ pub transfer_account_id: Option<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, category_id: String, deleted: bool) -> ScheduledSubTransaction {
+ ScheduledSubTransaction {
+ id: id,
+ scheduled_transaction_id: scheduled_transaction_id,
+ amount: amount,
+ memo: None,
+ payee_id: None,
+ category_id: category_id,
+ transfer_account_id: None,
+ deleted: deleted,
+ }
+ }
+}
+
+
diff --git a/src/models/scheduled_transaction_detail.rs b/src/models/scheduled_transaction_detail.rs
new file mode 100644
index 0000000..d86ef25
--- /dev/null
+++ b/src/models/scheduled_transaction_detail.rs
@@ -0,0 +1,128 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct ScheduledTransactionDetail {
+ #[serde(rename = "id")]
+ pub id: String,
+ /// The first date for which the Scheduled Transaction was scheduled.
+ #[serde(rename = "date_first")]
+ pub date_first: String,
+ /// The next date for which the Scheduled Transaction is scheduled.
+ #[serde(rename = "date_next")]
+ pub date_next: String,
+ #[serde(rename = "frequency")]
+ pub frequency: String,
+ /// The scheduled transaction amount in milliunits format
+ #[serde(rename = "amount")]
+ pub amount: i64,
+ #[serde(rename = "memo", skip_serializing_if = "Option::is_none")]
+ pub memo: Option<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", skip_serializing_if = "Option::is_none")]
+ pub payee_id: Option<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", skip_serializing_if = "Option::is_none")]
+ pub transfer_account_id: Option<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, flag_color: String, account_id: String, category_id: String, deleted: bool, account_name: String, payee_name: String, category_name: String, subtransactions: Vec<::models::ScheduledSubTransaction>) -> ScheduledTransactionDetail {
+ ScheduledTransactionDetail {
+ id: id,
+ date_first: date_first,
+ date_next: date_next,
+ frequency: frequency,
+ amount: amount,
+ memo: None,
+ flag_color: flag_color,
+ account_id: account_id,
+ payee_id: None,
+ category_id: category_id,
+ transfer_account_id: None,
+ deleted: deleted,
+ account_name: account_name,
+ payee_name: payee_name,
+ category_name: category_name,
+ subtransactions: subtransactions,
+ }
+ }
+}
+
+///
+#[derive(Debug, Serialize, Deserialize)]
+pub enum Frequency {
+ #[serde(rename = "never")]
+ Never,
+ #[serde(rename = "daily")]
+ Daily,
+ #[serde(rename = "weekly")]
+ Weekly,
+ #[serde(rename = "everyOtherWeek")]
+ EveryOtherWeek,
+ #[serde(rename = "twiceAMonth")]
+ TwiceAMonth,
+ #[serde(rename = "every4Weeks")]
+ Every4Weeks,
+ #[serde(rename = "monthly")]
+ Monthly,
+ #[serde(rename = "everyOtherMonth")]
+ EveryOtherMonth,
+ #[serde(rename = "every3Months")]
+ Every3Months,
+ #[serde(rename = "every4Months")]
+ Every4Months,
+ #[serde(rename = "twiceAYear")]
+ TwiceAYear,
+ #[serde(rename = "yearly")]
+ Yearly,
+ #[serde(rename = "everyOtherYear")]
+ EveryOtherYear,
+}
+/// The scheduled transaction flag
+#[derive(Debug, Serialize, Deserialize)]
+pub enum FlagColor {
+ #[serde(rename = "red")]
+ Red,
+ #[serde(rename = "orange")]
+ Orange,
+ #[serde(rename = "yellow")]
+ Yellow,
+ #[serde(rename = "green")]
+ Green,
+ #[serde(rename = "blue")]
+ Blue,
+ #[serde(rename = "purple")]
+ Purple,
+}
+
diff --git a/src/models/scheduled_transaction_detail_all_of.rs b/src/models/scheduled_transaction_detail_all_of.rs
new file mode 100644
index 0000000..cf7e6c7
--- /dev/null
+++ b/src/models/scheduled_transaction_detail_all_of.rs
@@ -0,0 +1,40 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct ScheduledTransactionDetailAllOf {
+ #[serde(rename = "account_name")]
+ pub account_name: String,
+ #[serde(rename = "payee_name")]
+ pub payee_name: String,
+ #[serde(rename = "category_name")]
+ pub category_name: String,
+ /// If a split scheduled transaction, the subtransactions.
+ #[serde(rename = "subtransactions")]
+ pub subtransactions: Vec<::models::ScheduledSubTransaction>,
+}
+
+impl ScheduledTransactionDetailAllOf {
+ pub fn new(account_name: String, payee_name: String, category_name: String, subtransactions: Vec<::models::ScheduledSubTransaction>) -> ScheduledTransactionDetailAllOf {
+ ScheduledTransactionDetailAllOf {
+ account_name: account_name,
+ payee_name: payee_name,
+ category_name: category_name,
+ subtransactions: subtransactions,
+ }
+ }
+}
+
+
diff --git a/src/models/scheduled_transaction_response.rs b/src/models/scheduled_transaction_response.rs
new file mode 100644
index 0000000..25286cd
--- /dev/null
+++ b/src/models/scheduled_transaction_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct ScheduledTransactionResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::ScheduledTransactionResponseData,
+}
+
+impl ScheduledTransactionResponse {
+ pub fn new(data: ::models::ScheduledTransactionResponseData) -> ScheduledTransactionResponse {
+ ScheduledTransactionResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/src/models/scheduled_transaction_response_data.rs b/src/models/scheduled_transaction_response_data.rs
new file mode 100644
index 0000000..70db916
--- /dev/null
+++ b/src/models/scheduled_transaction_response_data.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct ScheduledTransactionResponseData {
+ #[serde(rename = "scheduled_transaction")]
+ pub scheduled_transaction: ::models::ScheduledTransactionDetail,
+}
+
+impl ScheduledTransactionResponseData {
+ pub fn new(scheduled_transaction: ::models::ScheduledTransactionDetail) -> ScheduledTransactionResponseData {
+ ScheduledTransactionResponseData {
+ scheduled_transaction: scheduled_transaction,
+ }
+ }
+}
+
+
diff --git a/src/models/scheduled_transaction_summary.rs b/src/models/scheduled_transaction_summary.rs
new file mode 100644
index 0000000..7966d2c
--- /dev/null
+++ b/src/models/scheduled_transaction_summary.rs
@@ -0,0 +1,115 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct ScheduledTransactionSummary {
+ #[serde(rename = "id")]
+ pub id: String,
+ /// The first date for which the Scheduled Transaction was scheduled.
+ #[serde(rename = "date_first")]
+ pub date_first: String,
+ /// The next date for which the Scheduled Transaction is scheduled.
+ #[serde(rename = "date_next")]
+ pub date_next: String,
+ #[serde(rename = "frequency")]
+ pub frequency: String,
+ /// The scheduled transaction amount in milliunits format
+ #[serde(rename = "amount")]
+ pub amount: i64,
+ #[serde(rename = "memo", skip_serializing_if = "Option::is_none")]
+ pub memo: Option<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", skip_serializing_if = "Option::is_none")]
+ pub payee_id: Option<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", skip_serializing_if = "Option::is_none")]
+ pub transfer_account_id: Option<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, flag_color: String, account_id: String, category_id: String, deleted: bool) -> ScheduledTransactionSummary {
+ ScheduledTransactionSummary {
+ id: id,
+ date_first: date_first,
+ date_next: date_next,
+ frequency: frequency,
+ amount: amount,
+ memo: None,
+ flag_color: flag_color,
+ account_id: account_id,
+ payee_id: None,
+ category_id: category_id,
+ transfer_account_id: None,
+ deleted: deleted,
+ }
+ }
+}
+
+///
+#[derive(Debug, Serialize, Deserialize)]
+pub enum Frequency {
+ #[serde(rename = "never")]
+ Never,
+ #[serde(rename = "daily")]
+ Daily,
+ #[serde(rename = "weekly")]
+ Weekly,
+ #[serde(rename = "everyOtherWeek")]
+ EveryOtherWeek,
+ #[serde(rename = "twiceAMonth")]
+ TwiceAMonth,
+ #[serde(rename = "every4Weeks")]
+ Every4Weeks,
+ #[serde(rename = "monthly")]
+ Monthly,
+ #[serde(rename = "everyOtherMonth")]
+ EveryOtherMonth,
+ #[serde(rename = "every3Months")]
+ Every3Months,
+ #[serde(rename = "every4Months")]
+ Every4Months,
+ #[serde(rename = "twiceAYear")]
+ TwiceAYear,
+ #[serde(rename = "yearly")]
+ Yearly,
+ #[serde(rename = "everyOtherYear")]
+ EveryOtherYear,
+}
+/// The scheduled transaction flag
+#[derive(Debug, Serialize, Deserialize)]
+pub enum FlagColor {
+ #[serde(rename = "red")]
+ Red,
+ #[serde(rename = "orange")]
+ Orange,
+ #[serde(rename = "yellow")]
+ Yellow,
+ #[serde(rename = "green")]
+ Green,
+ #[serde(rename = "blue")]
+ Blue,
+ #[serde(rename = "purple")]
+ Purple,
+}
+
diff --git a/src/models/scheduled_transactions_response.rs b/src/models/scheduled_transactions_response.rs
new file mode 100644
index 0000000..8ff8378
--- /dev/null
+++ b/src/models/scheduled_transactions_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct ScheduledTransactionsResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::ScheduledTransactionsResponseData,
+}
+
+impl ScheduledTransactionsResponse {
+ pub fn new(data: ::models::ScheduledTransactionsResponseData) -> ScheduledTransactionsResponse {
+ ScheduledTransactionsResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/src/models/scheduled_transactions_response_data.rs b/src/models/scheduled_transactions_response_data.rs
new file mode 100644
index 0000000..71e5c79
--- /dev/null
+++ b/src/models/scheduled_transactions_response_data.rs
@@ -0,0 +1,34 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct ScheduledTransactionsResponseData {
+ #[serde(rename = "scheduled_transactions")]
+ pub scheduled_transactions: Vec<::models::ScheduledTransactionDetail>,
+ /// The knowledge of the server
+ #[serde(rename = "server_knowledge")]
+ pub server_knowledge: i64,
+}
+
+impl ScheduledTransactionsResponseData {
+ pub fn new(scheduled_transactions: Vec<::models::ScheduledTransactionDetail>, server_knowledge: i64) -> ScheduledTransactionsResponseData {
+ ScheduledTransactionsResponseData {
+ scheduled_transactions: scheduled_transactions,
+ server_knowledge: server_knowledge,
+ }
+ }
+}
+
+
diff --git a/src/models/sub_transaction.rs b/src/models/sub_transaction.rs
new file mode 100644
index 0000000..633ae38
--- /dev/null
+++ b/src/models/sub_transaction.rs
@@ -0,0 +1,54 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct SubTransaction {
+ #[serde(rename = "id")]
+ pub id: String,
+ #[serde(rename = "transaction_id")]
+ pub transaction_id: String,
+ /// The subtransaction amount in milliunits format
+ #[serde(rename = "amount")]
+ pub amount: i64,
+ #[serde(rename = "memo", skip_serializing_if = "Option::is_none")]
+ pub memo: Option<String>,
+ #[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")]
+ pub payee_id: Option<String>,
+ #[serde(rename = "category_id", skip_serializing_if = "Option::is_none")]
+ pub category_id: Option<String>,
+ /// If a transfer, the account_id which the subtransaction transfers to
+ #[serde(rename = "transfer_account_id", skip_serializing_if = "Option::is_none")]
+ pub transfer_account_id: Option<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, deleted: bool) -> SubTransaction {
+ SubTransaction {
+ id: id,
+ transaction_id: transaction_id,
+ amount: amount,
+ memo: None,
+ payee_id: None,
+ category_id: None,
+ transfer_account_id: None,
+ deleted: deleted,
+ }
+ }
+}
+
+
diff --git a/src/models/transaction_detail.rs b/src/models/transaction_detail.rs
new file mode 100644
index 0000000..956eae9
--- /dev/null
+++ b/src/models/transaction_detail.rs
@@ -0,0 +1,121 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct TransactionDetail {
+ #[serde(rename = "id")]
+ pub id: String,
+ /// The transaction date in ISO format (e.g. 2016-12-01)
+ #[serde(rename = "date")]
+ pub date: String,
+ /// The transaction amount in milliunits format
+ #[serde(rename = "amount")]
+ pub amount: i64,
+ #[serde(rename = "memo", skip_serializing_if = "Option::is_none")]
+ pub memo: Option<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", skip_serializing_if = "Option::is_none")]
+ pub flag_color: Option<String>,
+ #[serde(rename = "account_id")]
+ pub account_id: String,
+ #[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")]
+ pub payee_id: Option<String>,
+ #[serde(rename = "category_id", skip_serializing_if = "Option::is_none")]
+ pub category_id: Option<String>,
+ /// If a transfer transaction, the account to which it transfers
+ #[serde(rename = "transfer_account_id", skip_serializing_if = "Option::is_none")]
+ pub transfer_account_id: Option<String>,
+ /// If a transfer transaction, the id of transaction on the other side of the transfer
+ #[serde(rename = "transfer_transaction_id", skip_serializing_if = "Option::is_none")]
+ pub transfer_transaction_id: Option<String>,
+ /// If transaction is matched, the id of the matched transaction
+ #[serde(rename = "matched_transaction_id", skip_serializing_if = "Option::is_none")]
+ pub matched_transaction_id: Option<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", skip_serializing_if = "Option::is_none")]
+ pub import_id: Option<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", skip_serializing_if = "Option::is_none")]
+ pub payee_name: Option<String>,
+ #[serde(rename = "category_name", skip_serializing_if = "Option::is_none")]
+ pub category_name: Option<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, cleared: String, approved: bool, account_id: String, deleted: bool, account_name: String, subtransactions: Vec<::models::SubTransaction>) -> TransactionDetail {
+ TransactionDetail {
+ id: id,
+ date: date,
+ amount: amount,
+ memo: None,
+ cleared: cleared,
+ approved: approved,
+ flag_color: None,
+ account_id: account_id,
+ payee_id: None,
+ category_id: None,
+ transfer_account_id: None,
+ transfer_transaction_id: None,
+ matched_transaction_id: None,
+ import_id: None,
+ deleted: deleted,
+ account_name: account_name,
+ payee_name: None,
+ category_name: None,
+ subtransactions: subtransactions,
+ }
+ }
+}
+
+/// The cleared status of the transaction
+#[derive(Debug, Serialize, Deserialize)]
+pub enum Cleared {
+ #[serde(rename = "cleared")]
+ Cleared,
+ #[serde(rename = "uncleared")]
+ Uncleared,
+ #[serde(rename = "reconciled")]
+ Reconciled,
+}
+/// The transaction flag
+#[derive(Debug, Serialize, Deserialize)]
+pub enum FlagColor {
+ #[serde(rename = "red")]
+ Red,
+ #[serde(rename = "orange")]
+ Orange,
+ #[serde(rename = "yellow")]
+ Yellow,
+ #[serde(rename = "green")]
+ Green,
+ #[serde(rename = "blue")]
+ Blue,
+ #[serde(rename = "purple")]
+ Purple,
+}
+
diff --git a/src/models/transaction_detail_all_of.rs b/src/models/transaction_detail_all_of.rs
new file mode 100644
index 0000000..cead8f5
--- /dev/null
+++ b/src/models/transaction_detail_all_of.rs
@@ -0,0 +1,40 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct TransactionDetailAllOf {
+ #[serde(rename = "account_name")]
+ pub account_name: String,
+ #[serde(rename = "payee_name", skip_serializing_if = "Option::is_none")]
+ pub payee_name: Option<String>,
+ #[serde(rename = "category_name", skip_serializing_if = "Option::is_none")]
+ pub category_name: Option<String>,
+ /// If a split transaction, the subtransactions.
+ #[serde(rename = "subtransactions")]
+ pub subtransactions: Vec<::models::SubTransaction>,
+}
+
+impl TransactionDetailAllOf {
+ pub fn new(account_name: String, subtransactions: Vec<::models::SubTransaction>) -> TransactionDetailAllOf {
+ TransactionDetailAllOf {
+ account_name: account_name,
+ payee_name: None,
+ category_name: None,
+ subtransactions: subtransactions,
+ }
+ }
+}
+
+
diff --git a/src/models/transaction_response.rs b/src/models/transaction_response.rs
new file mode 100644
index 0000000..cc65780
--- /dev/null
+++ b/src/models/transaction_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct TransactionResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::TransactionResponseData,
+}
+
+impl TransactionResponse {
+ pub fn new(data: ::models::TransactionResponseData) -> TransactionResponse {
+ TransactionResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/src/models/transaction_response_data.rs b/src/models/transaction_response_data.rs
new file mode 100644
index 0000000..5f96108
--- /dev/null
+++ b/src/models/transaction_response_data.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct TransactionResponseData {
+ #[serde(rename = "transaction")]
+ pub transaction: ::models::TransactionDetail,
+}
+
+impl TransactionResponseData {
+ pub fn new(transaction: ::models::TransactionDetail) -> TransactionResponseData {
+ TransactionResponseData {
+ transaction: transaction,
+ }
+ }
+}
+
+
diff --git a/src/models/transaction_summary.rs b/src/models/transaction_summary.rs
new file mode 100644
index 0000000..94ce164
--- /dev/null
+++ b/src/models/transaction_summary.rs
@@ -0,0 +1,108 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct TransactionSummary {
+ #[serde(rename = "id")]
+ pub id: String,
+ /// The transaction date in ISO format (e.g. 2016-12-01)
+ #[serde(rename = "date")]
+ pub date: String,
+ /// The transaction amount in milliunits format
+ #[serde(rename = "amount")]
+ pub amount: i64,
+ #[serde(rename = "memo", skip_serializing_if = "Option::is_none")]
+ pub memo: Option<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", skip_serializing_if = "Option::is_none")]
+ pub flag_color: Option<String>,
+ #[serde(rename = "account_id")]
+ pub account_id: String,
+ #[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")]
+ pub payee_id: Option<String>,
+ #[serde(rename = "category_id", skip_serializing_if = "Option::is_none")]
+ pub category_id: Option<String>,
+ /// If a transfer transaction, the account to which it transfers
+ #[serde(rename = "transfer_account_id", skip_serializing_if = "Option::is_none")]
+ pub transfer_account_id: Option<String>,
+ /// If a transfer transaction, the id of transaction on the other side of the transfer
+ #[serde(rename = "transfer_transaction_id", skip_serializing_if = "Option::is_none")]
+ pub transfer_transaction_id: Option<String>,
+ /// If transaction is matched, the id of the matched transaction
+ #[serde(rename = "matched_transaction_id", skip_serializing_if = "Option::is_none")]
+ pub matched_transaction_id: Option<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", skip_serializing_if = "Option::is_none")]
+ pub import_id: Option<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, cleared: String, approved: bool, account_id: String, deleted: bool) -> TransactionSummary {
+ TransactionSummary {
+ id: id,
+ date: date,
+ amount: amount,
+ memo: None,
+ cleared: cleared,
+ approved: approved,
+ flag_color: None,
+ account_id: account_id,
+ payee_id: None,
+ category_id: None,
+ transfer_account_id: None,
+ transfer_transaction_id: None,
+ matched_transaction_id: None,
+ import_id: None,
+ deleted: deleted,
+ }
+ }
+}
+
+/// The cleared status of the transaction
+#[derive(Debug, Serialize, Deserialize)]
+pub enum Cleared {
+ #[serde(rename = "cleared")]
+ Cleared,
+ #[serde(rename = "uncleared")]
+ Uncleared,
+ #[serde(rename = "reconciled")]
+ Reconciled,
+}
+/// The transaction flag
+#[derive(Debug, Serialize, Deserialize)]
+pub enum FlagColor {
+ #[serde(rename = "red")]
+ Red,
+ #[serde(rename = "orange")]
+ Orange,
+ #[serde(rename = "yellow")]
+ Yellow,
+ #[serde(rename = "green")]
+ Green,
+ #[serde(rename = "blue")]
+ Blue,
+ #[serde(rename = "purple")]
+ Purple,
+}
+
diff --git a/src/models/transactions_response.rs b/src/models/transactions_response.rs
new file mode 100644
index 0000000..cda3c1f
--- /dev/null
+++ b/src/models/transactions_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct TransactionsResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::TransactionsResponseData,
+}
+
+impl TransactionsResponse {
+ pub fn new(data: ::models::TransactionsResponseData) -> TransactionsResponse {
+ TransactionsResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/src/models/transactions_response_data.rs b/src/models/transactions_response_data.rs
new file mode 100644
index 0000000..4ac9438
--- /dev/null
+++ b/src/models/transactions_response_data.rs
@@ -0,0 +1,34 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct TransactionsResponseData {
+ #[serde(rename = "transactions")]
+ pub transactions: Vec<::models::TransactionDetail>,
+ /// The knowledge of the server
+ #[serde(rename = "server_knowledge")]
+ pub server_knowledge: i64,
+}
+
+impl TransactionsResponseData {
+ pub fn new(transactions: Vec<::models::TransactionDetail>, server_knowledge: i64) -> TransactionsResponseData {
+ TransactionsResponseData {
+ transactions: transactions,
+ server_knowledge: server_knowledge,
+ }
+ }
+}
+
+
diff --git a/src/models/update_transaction.rs b/src/models/update_transaction.rs
new file mode 100644
index 0000000..5e93837
--- /dev/null
+++ b/src/models/update_transaction.rs
@@ -0,0 +1,98 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct UpdateTransaction {
+ #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
+ pub id: Option<String>,
+ #[serde(rename = "account_id")]
+ pub account_id: String,
+ /// The transaction date in ISO format (e.g. 2016-12-01). Future dates (scheduled transactions) are not permitted. Split transaction dates cannot be changed and if a different date is supplied it will be ignored.
+ #[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 UpdateTransaction {
+ pub fn new(account_id: String, date: String, amount: i64) -> UpdateTransaction {
+ UpdateTransaction {
+ id: None,
+ account_id: account_id,
+ date: date,
+ amount: amount,
+ payee_id: None,
+ payee_name: None,
+ category_id: None,
+ memo: None,
+ cleared: None,
+ approved: None,
+ flag_color: None,
+ import_id: None,
+ }
+ }
+}
+
+/// The cleared status of the transaction
+#[derive(Debug, Serialize, Deserialize)]
+pub enum Cleared {
+ #[serde(rename = "cleared")]
+ Cleared,
+ #[serde(rename = "uncleared")]
+ Uncleared,
+ #[serde(rename = "reconciled")]
+ Reconciled,
+}
+/// The transaction flag
+#[derive(Debug, Serialize, Deserialize)]
+pub enum FlagColor {
+ #[serde(rename = "red")]
+ Red,
+ #[serde(rename = "orange")]
+ Orange,
+ #[serde(rename = "yellow")]
+ Yellow,
+ #[serde(rename = "green")]
+ Green,
+ #[serde(rename = "blue")]
+ Blue,
+ #[serde(rename = "purple")]
+ Purple,
+}
+
diff --git a/src/models/update_transaction_wrapper.rs b/src/models/update_transaction_wrapper.rs
new file mode 100644
index 0000000..5c34fbb
--- /dev/null
+++ b/src/models/update_transaction_wrapper.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct UpdateTransactionWrapper {
+ #[serde(rename = "transaction")]
+ pub transaction: ::models::UpdateTransaction,
+}
+
+impl UpdateTransactionWrapper {
+ pub fn new(transaction: ::models::UpdateTransaction) -> UpdateTransactionWrapper {
+ UpdateTransactionWrapper {
+ transaction: transaction,
+ }
+ }
+}
+
+
diff --git a/src/models/update_transactions_response.rs b/src/models/update_transactions_response.rs
new file mode 100644
index 0000000..c56d2b3
--- /dev/null
+++ b/src/models/update_transactions_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct UpdateTransactionsResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::SaveTransactionsResponseData,
+}
+
+impl UpdateTransactionsResponse {
+ pub fn new(data: ::models::SaveTransactionsResponseData) -> UpdateTransactionsResponse {
+ UpdateTransactionsResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/src/models/update_transactions_wrapper.rs b/src/models/update_transactions_wrapper.rs
new file mode 100644
index 0000000..810d054
--- /dev/null
+++ b/src/models/update_transactions_wrapper.rs
@@ -0,0 +1,33 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct UpdateTransactionsWrapper {
+ #[serde(rename = "transaction", skip_serializing_if = "Option::is_none")]
+ pub transaction: Option<::models::UpdateTransaction>,
+ #[serde(rename = "transactions", skip_serializing_if = "Option::is_none")]
+ pub transactions: Option<Vec<::models::UpdateTransaction>>,
+}
+
+impl UpdateTransactionsWrapper {
+ pub fn new() -> UpdateTransactionsWrapper {
+ UpdateTransactionsWrapper {
+ transaction: None,
+ transactions: None,
+ }
+ }
+}
+
+
diff --git a/src/models/user.rs b/src/models/user.rs
new file mode 100644
index 0000000..8143284
--- /dev/null
+++ b/src/models/user.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct User {
+ #[serde(rename = "id")]
+ pub id: String,
+}
+
+impl User {
+ pub fn new(id: String) -> User {
+ User {
+ id: id,
+ }
+ }
+}
+
+
diff --git a/src/models/user_response.rs b/src/models/user_response.rs
new file mode 100644
index 0000000..e2427e0
--- /dev/null
+++ b/src/models/user_response.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct UserResponse {
+ #[serde(rename = "data")]
+ pub data: ::models::UserResponseData,
+}
+
+impl UserResponse {
+ pub fn new(data: ::models::UserResponseData) -> UserResponse {
+ UserResponse {
+ data: data,
+ }
+ }
+}
+
+
diff --git a/src/models/user_response_data.rs b/src/models/user_response_data.rs
new file mode 100644
index 0000000..9fc30f8
--- /dev/null
+++ b/src/models/user_response_data.rs
@@ -0,0 +1,30 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct UserResponseData {
+ #[serde(rename = "user")]
+ pub user: ::models::User,
+}
+
+impl UserResponseData {
+ pub fn new(user: ::models::User) -> UserResponseData {
+ UserResponseData {
+ user: user,
+ }
+ }
+}
+
+