aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/apis/accounts_api.rs14
-rw-r--r--src/apis/budgets_api.rs18
-rw-r--r--src/apis/categories_api.rs26
-rw-r--r--src/apis/client.rs62
-rw-r--r--src/apis/deprecated_api.rs8
-rw-r--r--src/apis/mod.rs2
-rw-r--r--src/apis/months_api.rs14
-rw-r--r--src/apis/payee_locations_api.rs20
-rw-r--r--src/apis/payees_api.rs14
-rw-r--r--src/apis/scheduled_transactions_api.rs14
-rw-r--r--src/apis/transactions_api.rs50
-rw-r--r--src/apis/user_api.rs6
-rw-r--r--src/models/account.rs11
-rw-r--r--src/models/account_response.rs9
-rw-r--r--src/models/account_response_data.rs9
-rw-r--r--src/models/accounts_response.rs9
-rw-r--r--src/models/accounts_response_data.rs9
-rw-r--r--src/models/budget_detail.rs29
-rw-r--r--src/models/budget_detail_all_of.rs25
-rw-r--r--src/models/budget_detail_response.rs9
-rw-r--r--src/models/budget_detail_response_data.rs9
-rw-r--r--src/models/budget_settings.rs11
-rw-r--r--src/models/budget_settings_response.rs9
-rw-r--r--src/models/budget_settings_response_data.rs9
-rw-r--r--src/models/budget_summary.rs9
-rw-r--r--src/models/budget_summary_response.rs9
-rw-r--r--src/models/budget_summary_response_data.rs11
-rw-r--r--src/models/bulk_response.rs9
-rw-r--r--src/models/bulk_response_data.rs9
-rw-r--r--src/models/bulk_response_data_bulk.rs5
-rw-r--r--src/models/bulk_transactions.rs9
-rw-r--r--src/models/categories_response.rs9
-rw-r--r--src/models/categories_response_data.rs9
-rw-r--r--src/models/category.rs15
-rw-r--r--src/models/category_group.rs5
-rw-r--r--src/models/category_group_with_categories.rs9
-rw-r--r--src/models/category_group_with_categories_all_of.rs9
-rw-r--r--src/models/category_response.rs9
-rw-r--r--src/models/category_response_data.rs9
-rw-r--r--src/models/currency_format.rs5
-rw-r--r--src/models/date_format.rs5
-rw-r--r--src/models/error_detail.rs5
-rw-r--r--src/models/error_response.rs9
-rw-r--r--src/models/hybrid_transaction.rs45
-rw-r--r--src/models/hybrid_transaction_all_of.rs19
-rw-r--r--src/models/hybrid_transactions_response.rs9
-rw-r--r--src/models/hybrid_transactions_response_data.rs9
-rw-r--r--src/models/mod.rs6
-rw-r--r--src/models/month_detail.rs9
-rw-r--r--src/models/month_detail_all_of.rs9
-rw-r--r--src/models/month_detail_response.rs9
-rw-r--r--src/models/month_detail_response_data.rs9
-rw-r--r--src/models/month_summaries_response.rs9
-rw-r--r--src/models/month_summaries_response_data.rs9
-rw-r--r--src/models/month_summary.rs5
-rw-r--r--src/models/payee.rs5
-rw-r--r--src/models/payee_location.rs5
-rw-r--r--src/models/payee_location_response.rs9
-rw-r--r--src/models/payee_location_response_data.rs9
-rw-r--r--src/models/payee_locations_response.rs9
-rw-r--r--src/models/payee_locations_response_data.rs9
-rw-r--r--src/models/payee_response.rs9
-rw-r--r--src/models/payee_response_data.rs9
-rw-r--r--src/models/payees_response.rs9
-rw-r--r--src/models/payees_response_data.rs9
-rw-r--r--src/models/save_category_response.rs9
-rw-r--r--src/models/save_category_response_data.rs9
-rw-r--r--src/models/save_month_category.rs5
-rw-r--r--src/models/save_month_category_wrapper.rs9
-rw-r--r--src/models/save_transaction.rs35
-rw-r--r--src/models/save_transaction_wrapper.rs9
-rw-r--r--src/models/save_transactions_response.rs9
-rw-r--r--src/models/save_transactions_response_data.rs9
-rw-r--r--src/models/save_transactions_wrapper.rs9
-rw-r--r--src/models/scheduled_sub_transaction.rs13
-rw-r--r--src/models/scheduled_transaction_detail.rs79
-rw-r--r--src/models/scheduled_transaction_detail_all_of.rs21
-rw-r--r--src/models/scheduled_transaction_response.rs9
-rw-r--r--src/models/scheduled_transaction_response_data.rs9
-rw-r--r--src/models/scheduled_transaction_summary.rs65
-rw-r--r--src/models/scheduled_transactions_response.rs9
-rw-r--r--src/models/scheduled_transactions_response_data.rs9
-rw-r--r--src/models/sub_transaction.rs5
-rw-r--r--src/models/transaction_detail.rs35
-rw-r--r--src/models/transaction_detail_all_of.rs9
-rw-r--r--src/models/transaction_response.rs9
-rw-r--r--src/models/transaction_response_data.rs9
-rw-r--r--src/models/transaction_summary.rs31
-rw-r--r--src/models/transactions_response.rs9
-rw-r--r--src/models/transactions_response_data.rs9
-rw-r--r--src/models/update_transaction.rs43
-rw-r--r--src/models/update_transaction_all_of.rs (renamed from src/models/update_transactions_response.rs)19
-rw-r--r--src/models/update_transaction_wrapper.rs30
-rw-r--r--src/models/update_transactions_wrapper.rs16
-rw-r--r--src/models/user.rs5
-rw-r--r--src/models/user_response.rs9
-rw-r--r--src/models/user_response_data.rs9
97 files changed, 420 insertions, 928 deletions
diff --git a/src/apis/accounts_api.rs b/src/apis/accounts_api.rs
index 616476e..b536e89 100644
--- a/src/apis/accounts_api.rs
+++ b/src/apis/accounts_api.rs
@@ -13,7 +13,7 @@ use std::borrow::Borrow;
use reqwest;
-use super::{Error, configuration, urlencode};
+use super::{Error, configuration};
pub struct AccountsApiClient {
configuration: Rc<configuration::Configuration>,
@@ -28,16 +28,16 @@ impl AccountsApiClient {
}
pub trait AccountsApi {
- fn get_account_by_id(&self, budget_id: &str, account_id: &str) -> Result<::models::AccountResponse, Error>;
- fn get_accounts(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::AccountsResponse, Error>;
+ fn get_account_by_id(&self, budget_id: &str, account_id: &str) -> Result<crate::models::AccountResponse, Error>;
+ fn get_accounts(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<crate::models::AccountsResponse, Error>;
}
impl AccountsApi for AccountsApiClient {
- fn get_account_by_id(&self, budget_id: &str, account_id: &str) -> Result<::models::AccountResponse, Error> {
+ fn get_account_by_id(&self, budget_id: &str, account_id: &str) -> Result<crate::models::AccountResponse, Error> {
let configuration: &configuration::Configuration = self.configuration.borrow();
let client = &configuration.client;
- let uri_str = format!("{}/budgets/{budget_id}/accounts/{account_id}", configuration.base_path, budget_id=urlencode(budget_id), account_id=account_id);
+ let uri_str = format!("{}/budgets/{budget_id}/accounts/{account_id}", configuration.base_path, budget_id=crate::apis::urlencode(budget_id), account_id=account_id);
let mut req_builder = client.get(uri_str.as_str());
if let Some(ref user_agent) = configuration.user_agent {
@@ -58,11 +58,11 @@ impl AccountsApi for AccountsApiClient {
Ok(client.execute(req)?.error_for_status()?.json()?)
}
- fn get_accounts(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::AccountsResponse, Error> {
+ fn get_accounts(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<crate::models::AccountsResponse, Error> {
let configuration: &configuration::Configuration = self.configuration.borrow();
let client = &configuration.client;
- let uri_str = format!("{}/budgets/{budget_id}/accounts", configuration.base_path, budget_id=urlencode(budget_id));
+ let uri_str = format!("{}/budgets/{budget_id}/accounts", configuration.base_path, budget_id=crate::apis::urlencode(budget_id));
let mut req_builder = client.get(uri_str.as_str());
req_builder = req_builder.query(&[("last_knowledge_of_server", &last_knowledge_of_server.to_string())]);
diff --git a/src/apis/budgets_api.rs b/src/apis/budgets_api.rs
index 663dc59..e1002ed 100644
--- a/src/apis/budgets_api.rs
+++ b/src/apis/budgets_api.rs
@@ -13,7 +13,7 @@ use std::borrow::Borrow;
use reqwest;
-use super::{Error, configuration, urlencode};
+use super::{Error, configuration};
pub struct BudgetsApiClient {
configuration: Rc<configuration::Configuration>,
@@ -28,17 +28,17 @@ impl BudgetsApiClient {
}
pub trait BudgetsApi {
- fn get_budget_by_id(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::BudgetDetailResponse, Error>;
- fn get_budget_settings_by_id(&self, budget_id: &str) -> Result<::models::BudgetSettingsResponse, Error>;
- fn get_budgets(&self, ) -> Result<::models::BudgetSummaryResponse, Error>;
+ fn get_budget_by_id(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<crate::models::BudgetDetailResponse, Error>;
+ fn get_budget_settings_by_id(&self, budget_id: &str) -> Result<crate::models::BudgetSettingsResponse, Error>;
+ fn get_budgets(&self, ) -> Result<crate::models::BudgetSummaryResponse, Error>;
}
impl BudgetsApi for BudgetsApiClient {
- fn get_budget_by_id(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::BudgetDetailResponse, Error> {
+ fn get_budget_by_id(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<crate::models::BudgetDetailResponse, Error> {
let configuration: &configuration::Configuration = self.configuration.borrow();
let client = &configuration.client;
- let uri_str = format!("{}/budgets/{budget_id}", configuration.base_path, budget_id=urlencode(budget_id));
+ let uri_str = format!("{}/budgets/{budget_id}", configuration.base_path, budget_id=crate::apis::urlencode(budget_id));
let mut req_builder = client.get(uri_str.as_str());
req_builder = req_builder.query(&[("last_knowledge_of_server", &last_knowledge_of_server.to_string())]);
@@ -60,11 +60,11 @@ impl BudgetsApi for BudgetsApiClient {
Ok(client.execute(req)?.error_for_status()?.json()?)
}
- fn get_budget_settings_by_id(&self, budget_id: &str) -> Result<::models::BudgetSettingsResponse, Error> {
+ fn get_budget_settings_by_id(&self, budget_id: &str) -> Result<crate::models::BudgetSettingsResponse, Error> {
let configuration: &configuration::Configuration = self.configuration.borrow();
let client = &configuration.client;
- let uri_str = format!("{}/budgets/{budget_id}/settings", configuration.base_path, budget_id=urlencode(budget_id));
+ let uri_str = format!("{}/budgets/{budget_id}/settings", configuration.base_path, budget_id=crate::apis::urlencode(budget_id));
let mut req_builder = client.get(uri_str.as_str());
if let Some(ref user_agent) = configuration.user_agent {
@@ -85,7 +85,7 @@ impl BudgetsApi for BudgetsApiClient {
Ok(client.execute(req)?.error_for_status()?.json()?)
}
- fn get_budgets(&self, ) -> Result<::models::BudgetSummaryResponse, Error> {
+ fn get_budgets(&self, ) -> Result<crate::models::BudgetSummaryResponse, Error> {
let configuration: &configuration::Configuration = self.configuration.borrow();
let client = &configuration.client;
diff --git a/src/apis/categories_api.rs b/src/apis/categories_api.rs
index 417a2d9..f57d38b 100644
--- a/src/apis/categories_api.rs
+++ b/src/apis/categories_api.rs
@@ -13,7 +13,7 @@ use std::borrow::Borrow;
use reqwest;
-use super::{Error, configuration, urlencode};
+use super::{Error, configuration};
pub struct CategoriesApiClient {
configuration: Rc<configuration::Configuration>,
@@ -28,18 +28,18 @@ impl CategoriesApiClient {
}
pub trait CategoriesApi {
- fn get_categories(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::CategoriesResponse, Error>;
- fn get_category_by_id(&self, budget_id: &str, category_id: &str) -> Result<::models::CategoryResponse, Error>;
- fn get_month_category_by_id(&self, budget_id: &str, month: String, category_id: &str) -> Result<::models::CategoryResponse, Error>;
- fn update_month_category(&self, budget_id: &str, month: String, category_id: &str, data: ::models::SaveMonthCategoryWrapper) -> Result<::models::SaveCategoryResponse, Error>;
+ fn get_categories(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<crate::models::CategoriesResponse, Error>;
+ fn get_category_by_id(&self, budget_id: &str, category_id: &str) -> Result<crate::models::CategoryResponse, Error>;
+ fn get_month_category_by_id(&self, budget_id: &str, month: String, category_id: &str) -> Result<crate::models::CategoryResponse, Error>;
+ fn update_month_category(&self, budget_id: &str, month: String, category_id: &str, data: crate::models::SaveMonthCategoryWrapper) -> Result<crate::models::SaveCategoryResponse, Error>;
}
impl CategoriesApi for CategoriesApiClient {
- fn get_categories(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::CategoriesResponse, Error> {
+ fn get_categories(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<crate::models::CategoriesResponse, Error> {
let configuration: &configuration::Configuration = self.configuration.borrow();
let client = &configuration.client;
- let uri_str = format!("{}/budgets/{budget_id}/categories", configuration.base_path, budget_id=urlencode(budget_id));
+ let uri_str = format!("{}/budgets/{budget_id}/categories", configuration.base_path, budget_id=crate::apis::urlencode(budget_id));
let mut req_builder = client.get(uri_str.as_str());
req_builder = req_builder.query(&[("last_knowledge_of_server", &last_knowledge_of_server.to_string())]);
@@ -61,11 +61,11 @@ impl CategoriesApi for CategoriesApiClient {
Ok(client.execute(req)?.error_for_status()?.json()?)
}
- fn get_category_by_id(&self, budget_id: &str, category_id: &str) -> Result<::models::CategoryResponse, Error> {
+ fn get_category_by_id(&self, budget_id: &str, category_id: &str) -> Result<crate::models::CategoryResponse, Error> {
let configuration: &configuration::Configuration = self.configuration.borrow();
let client = &configuration.client;
- let uri_str = format!("{}/budgets/{budget_id}/categories/{category_id}", configuration.base_path, budget_id=urlencode(budget_id), category_id=urlencode(category_id));
+ let uri_str = format!("{}/budgets/{budget_id}/categories/{category_id}", configuration.base_path, budget_id=crate::apis::urlencode(budget_id), category_id=crate::apis::urlencode(category_id));
let mut req_builder = client.get(uri_str.as_str());
if let Some(ref user_agent) = configuration.user_agent {
@@ -86,11 +86,11 @@ impl CategoriesApi for CategoriesApiClient {
Ok(client.execute(req)?.error_for_status()?.json()?)
}
- fn get_month_category_by_id(&self, budget_id: &str, month: String, category_id: &str) -> Result<::models::CategoryResponse, Error> {
+ fn get_month_category_by_id(&self, budget_id: &str, month: String, category_id: &str) -> Result<crate::models::CategoryResponse, Error> {
let configuration: &configuration::Configuration = self.configuration.borrow();
let client = &configuration.client;
- let uri_str = format!("{}/budgets/{budget_id}/months/{month}/categories/{category_id}", configuration.base_path, budget_id=urlencode(budget_id), month=month, category_id=urlencode(category_id));
+ let uri_str = format!("{}/budgets/{budget_id}/months/{month}/categories/{category_id}", configuration.base_path, budget_id=crate::apis::urlencode(budget_id), month=month, category_id=crate::apis::urlencode(category_id));
let mut req_builder = client.get(uri_str.as_str());
if let Some(ref user_agent) = configuration.user_agent {
@@ -111,11 +111,11 @@ impl CategoriesApi for CategoriesApiClient {
Ok(client.execute(req)?.error_for_status()?.json()?)
}
- fn update_month_category(&self, budget_id: &str, month: String, category_id: &str, data: ::models::SaveMonthCategoryWrapper) -> Result<::models::SaveCategoryResponse, Error> {
+ fn update_month_category(&self, budget_id: &str, month: String, category_id: &str, data: crate::models::SaveMonthCategoryWrapper) -> Result<crate::models::SaveCategoryResponse, Error> {
let configuration: &configuration::Configuration = self.configuration.borrow();
let client = &configuration.client;
- let uri_str = format!("{}/budgets/{budget_id}/months/{month}/categories/{category_id}", configuration.base_path, budget_id=urlencode(budget_id), month=month, category_id=urlencode(category_id));
+ let uri_str = format!("{}/budgets/{budget_id}/months/{month}/categories/{category_id}", configuration.base_path, budget_id=crate::apis::urlencode(budget_id), month=month, category_id=crate::apis::urlencode(category_id));
let mut req_builder = client.patch(uri_str.as_str());
if let Some(ref user_agent) = configuration.user_agent {
diff --git a/src/apis/client.rs b/src/apis/client.rs
index 2776f11..387df63 100644
--- a/src/apis/client.rs
+++ b/src/apis/client.rs
@@ -3,17 +3,16 @@ use std::rc::Rc;
use super::configuration::Configuration;
pub struct APIClient {
- configuration: Rc<Configuration>,
- accounts_api: Box<::apis::AccountsApi>,
- budgets_api: Box<::apis::BudgetsApi>,
- categories_api: Box<::apis::CategoriesApi>,
- deprecated_api: Box<::apis::DeprecatedApi>,
- months_api: Box<::apis::MonthsApi>,
- payee_locations_api: Box<::apis::PayeeLocationsApi>,
- payees_api: Box<::apis::PayeesApi>,
- scheduled_transactions_api: Box<::apis::ScheduledTransactionsApi>,
- transactions_api: Box<::apis::TransactionsApi>,
- user_api: Box<::apis::UserApi>,
+ accounts_api: Box<crate::apis::AccountsApi>,
+ budgets_api: Box<crate::apis::BudgetsApi>,
+ categories_api: Box<crate::apis::CategoriesApi>,
+ deprecated_api: Box<crate::apis::DeprecatedApi>,
+ months_api: Box<crate::apis::MonthsApi>,
+ payee_locations_api: Box<crate::apis::PayeeLocationsApi>,
+ payees_api: Box<crate::apis::PayeesApi>,
+ scheduled_transactions_api: Box<crate::apis::ScheduledTransactionsApi>,
+ transactions_api: Box<crate::apis::TransactionsApi>,
+ user_api: Box<crate::apis::UserApi>,
}
impl APIClient {
@@ -21,57 +20,56 @@ impl APIClient {
let rc = Rc::new(configuration);
APIClient {
- configuration: rc.clone(),
- accounts_api: Box::new(::apis::AccountsApiClient::new(rc.clone())),
- budgets_api: Box::new(::apis::BudgetsApiClient::new(rc.clone())),
- categories_api: Box::new(::apis::CategoriesApiClient::new(rc.clone())),
- deprecated_api: Box::new(::apis::DeprecatedApiClient::new(rc.clone())),
- months_api: Box::new(::apis::MonthsApiClient::new(rc.clone())),
- payee_locations_api: Box::new(::apis::PayeeLocationsApiClient::new(rc.clone())),
- payees_api: Box::new(::apis::PayeesApiClient::new(rc.clone())),
- scheduled_transactions_api: Box::new(::apis::ScheduledTransactionsApiClient::new(rc.clone())),
- transactions_api: Box::new(::apis::TransactionsApiClient::new(rc.clone())),
- user_api: Box::new(::apis::UserApiClient::new(rc.clone())),
+ accounts_api: Box::new(crate::apis::AccountsApiClient::new(rc.clone())),
+ budgets_api: Box::new(crate::apis::BudgetsApiClient::new(rc.clone())),
+ categories_api: Box::new(crate::apis::CategoriesApiClient::new(rc.clone())),
+ deprecated_api: Box::new(crate::apis::DeprecatedApiClient::new(rc.clone())),
+ months_api: Box::new(crate::apis::MonthsApiClient::new(rc.clone())),
+ payee_locations_api: Box::new(crate::apis::PayeeLocationsApiClient::new(rc.clone())),
+ payees_api: Box::new(crate::apis::PayeesApiClient::new(rc.clone())),
+ scheduled_transactions_api: Box::new(crate::apis::ScheduledTransactionsApiClient::new(rc.clone())),
+ transactions_api: Box::new(crate::apis::TransactionsApiClient::new(rc.clone())),
+ user_api: Box::new(crate::apis::UserApiClient::new(rc.clone())),
}
}
- pub fn accounts_api(&self) -> &::apis::AccountsApi{
+ pub fn accounts_api(&self) -> &crate::apis::AccountsApi{
self.accounts_api.as_ref()
}
- pub fn budgets_api(&self) -> &::apis::BudgetsApi{
+ pub fn budgets_api(&self) -> &crate::apis::BudgetsApi{
self.budgets_api.as_ref()
}
- pub fn categories_api(&self) -> &::apis::CategoriesApi{
+ pub fn categories_api(&self) -> &crate::apis::CategoriesApi{
self.categories_api.as_ref()
}
- pub fn deprecated_api(&self) -> &::apis::DeprecatedApi{
+ pub fn deprecated_api(&self) -> &crate::apis::DeprecatedApi{
self.deprecated_api.as_ref()
}
- pub fn months_api(&self) -> &::apis::MonthsApi{
+ pub fn months_api(&self) -> &crate::apis::MonthsApi{
self.months_api.as_ref()
}
- pub fn payee_locations_api(&self) -> &::apis::PayeeLocationsApi{
+ pub fn payee_locations_api(&self) -> &crate::apis::PayeeLocationsApi{
self.payee_locations_api.as_ref()
}
- pub fn payees_api(&self) -> &::apis::PayeesApi{
+ pub fn payees_api(&self) -> &crate::apis::PayeesApi{
self.payees_api.as_ref()
}
- pub fn scheduled_transactions_api(&self) -> &::apis::ScheduledTransactionsApi{
+ pub fn scheduled_transactions_api(&self) -> &crate::apis::ScheduledTransactionsApi{
self.scheduled_transactions_api.as_ref()
}
- pub fn transactions_api(&self) -> &::apis::TransactionsApi{
+ pub fn transactions_api(&self) -> &crate::apis::TransactionsApi{
self.transactions_api.as_ref()
}
- pub fn user_api(&self) -> &::apis::UserApi{
+ pub fn user_api(&self) -> &crate::apis::UserApi{
self.user_api.as_ref()
}
diff --git a/src/apis/deprecated_api.rs b/src/apis/deprecated_api.rs
index a148248..aab34ff 100644
--- a/src/apis/deprecated_api.rs
+++ b/src/apis/deprecated_api.rs
@@ -13,7 +13,7 @@ use std::borrow::Borrow;
use reqwest;
-use super::{Error, configuration, urlencode};
+use super::{Error, configuration};
pub struct DeprecatedApiClient {
configuration: Rc<configuration::Configuration>,
@@ -28,15 +28,15 @@ impl DeprecatedApiClient {
}
pub trait DeprecatedApi {
- fn bulk_create_transactions(&self, budget_id: &str, transactions: ::models::BulkTransactions) -> Result<::models::BulkResponse, Error>;
+ fn bulk_create_transactions(&self, budget_id: &str, transactions: crate::models::BulkTransactions) -> Result<crate::models::BulkResponse, Error>;
}
impl DeprecatedApi for DeprecatedApiClient {
- fn bulk_create_transactions(&self, budget_id: &str, transactions: ::models::BulkTransactions) -> Result<::models::BulkResponse, Error> {
+ fn bulk_create_transactions(&self, budget_id: &str, transactions: crate::models::BulkTransactions) -> Result<crate::models::BulkResponse, Error> {
let configuration: &configuration::Configuration = self.configuration.borrow();
let client = &configuration.client;
- let uri_str = format!("{}/budgets/{budget_id}/transactions/bulk", configuration.base_path, budget_id=urlencode(budget_id));
+ let uri_str = format!("{}/budgets/{budget_id}/transactions/bulk", configuration.base_path, budget_id=crate::apis::urlencode(budget_id));
let mut req_builder = client.post(uri_str.as_str());
if let Some(ref user_agent) = configuration.user_agent {
diff --git a/src/apis/mod.rs b/src/apis/mod.rs
index 910bd7e..b71d970 100644
--- a/src/apis/mod.rs
+++ b/src/apis/mod.rs
@@ -30,8 +30,6 @@ pub fn urlencode<T: AsRef<str>>(s: T) -> String {
::url::form_urlencoded::byte_serialize(s.as_ref().as_bytes()).collect()
}
-use super::models::*;
-
mod accounts_api;
pub use self::accounts_api::{ AccountsApi, AccountsApiClient };
mod budgets_api;
diff --git a/src/apis/months_api.rs b/src/apis/months_api.rs
index 3bee3fe..48d586b 100644
--- a/src/apis/months_api.rs
+++ b/src/apis/months_api.rs
@@ -13,7 +13,7 @@ use std::borrow::Borrow;
use reqwest;
-use super::{Error, configuration, urlencode};
+use super::{Error, configuration};
pub struct MonthsApiClient {
configuration: Rc<configuration::Configuration>,
@@ -28,16 +28,16 @@ impl MonthsApiClient {
}
pub trait MonthsApi {
- fn get_budget_month(&self, budget_id: &str, month: String) -> Result<::models::MonthDetailResponse, Error>;
- fn get_budget_months(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::MonthSummariesResponse, Error>;
+ fn get_budget_month(&self, budget_id: &str, month: String) -> Result<crate::models::MonthDetailResponse, Error>;
+ fn get_budget_months(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<crate::models::MonthSummariesResponse, Error>;
}
impl MonthsApi for MonthsApiClient {
- fn get_budget_month(&self, budget_id: &str, month: String) -> Result<::models::MonthDetailResponse, Error> {
+ fn get_budget_month(&self, budget_id: &str, month: String) -> Result<crate::models::MonthDetailResponse, Error> {
let configuration: &configuration::Configuration = self.configuration.borrow();
let client = &configuration.client;
- let uri_str = format!("{}/budgets/{budget_id}/months/{month}", configuration.base_path, budget_id=urlencode(budget_id), month=month);
+ let uri_str = format!("{}/budgets/{budget_id}/months/{month}", configuration.base_path, budget_id=crate::apis::urlencode(budget_id), month=month);
let mut req_builder = client.get(uri_str.as_str());
if let Some(ref user_agent) = configuration.user_agent {
@@ -58,11 +58,11 @@ impl MonthsApi for MonthsApiClient {
Ok(client.execute(req)?.error_for_status()?.json()?)
}
- fn get_budget_months(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::MonthSummariesResponse, Error> {
+ fn get_budget_months(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<crate::models::MonthSummariesResponse, Error> {
let configuration: &configuration::Configuration = self.configuration.borrow();
let client = &configuration.client;
- let uri_str = format!("{}/budgets/{budget_id}/months", configuration.base_path, budget_id=urlencode(budget_id));
+ let uri_str = format!("{}/budgets/{budget_id}/months", configuration.base_path, budget_id=crate::apis::urlencode(budget_id));
let mut req_builder = client.get(uri_str.as_str());
req_builder = req_builder.query(&[("last_knowledge_of_server", &last_knowledge_of_server.to_string())]);
diff --git a/src/apis/payee_locations_api.rs b/src/apis/payee_locations_api.rs
index 88f12e1..823dea4 100644
--- a/src/apis/payee_locations_api.rs
+++ b/src/apis/payee_locations_api.rs
@@ -13,7 +13,7 @@ use std::borrow::Borrow;
use reqwest;
-use super::{Error, configuration, urlencode};
+use super::{Error, configuration};
pub struct PayeeLocationsApiClient {
configuration: Rc<configuration::Configuration>,
@@ -28,17 +28,17 @@ impl PayeeLocationsApiClient {
}
pub trait PayeeLocationsApi {
- fn get_payee_location_by_id(&self, budget_id: &str, payee_location_id: &str) -> Result<::models::PayeeLocationResponse, Error>;
- fn get_payee_locations(&self, budget_id: &str) -> Result<::models::PayeeLocationsResponse, Error>;
- fn get_payee_locations_by_payee(&self, budget_id: &str, payee_id: &str) -> Result<::models::PayeeLocationsResponse, Error>;
+ fn get_payee_location_by_id(&self, budget_id: &str, payee_location_id: &str) -> Result<crate::models::PayeeLocationResponse, Error>;
+ fn get_payee_locations(&self, budget_id: &str) -> Result<crate::models::PayeeLocationsResponse, Error>;
+ fn get_payee_locations_by_payee(&self, budget_id: &str, payee_id: &str) -> Result<crate::models::PayeeLocationsResponse, Error>;
}
impl PayeeLocationsApi for PayeeLocationsApiClient {
- fn get_payee_location_by_id(&self, budget_id: &str, payee_location_id: &str) -> Result<::models::PayeeLocationResponse, Error> {
+ fn get_payee_location_by_id(&self, budget_id: &str, payee_location_id: &str) -> Result<crate::models::PayeeLocationResponse, Error> {
let configuration: &configuration::Configuration = self.configuration.borrow();
let client = &configuration.client;
- let uri_str = format!("{}/budgets/{budget_id}/payee_locations/{payee_location_id}", configuration.base_path, budget_id=urlencode(budget_id), payee_location_id=urlencode(payee_location_id));
+ let uri_str = format!("{}/budgets/{budget_id}/payee_locations/{payee_location_id}", configuration.base_path, budget_id=crate::apis::urlencode(budget_id), payee_location_id=crate::apis::urlencode(payee_location_id));
let mut req_builder = client.get(uri_str.as_str());
if let Some(ref user_agent) = configuration.user_agent {
@@ -59,11 +59,11 @@ impl PayeeLocationsApi for PayeeLocationsApiClient {
Ok(client.execute(req)?.error_for_status()?.json()?)
}
- fn get_payee_locations(&self, budget_id: &str) -> Result<::models::PayeeLocationsResponse, Error> {
+ fn get_payee_locations(&self, budget_id: &str) -> Result<crate::models::PayeeLocationsResponse, Error> {
let configuration: &configuration::Configuration = self.configuration.borrow();
let client = &configuration.client;
- let uri_str = format!("{}/budgets/{budget_id}/payee_locations", configuration.base_path, budget_id=urlencode(budget_id));
+ let uri_str = format!("{}/budgets/{budget_id}/payee_locations", configuration.base_path, budget_id=crate::apis::urlencode(budget_id));
let mut req_builder = client.get(uri_str.as_str());
if let Some(ref user_agent) = configuration.user_agent {
@@ -84,11 +84,11 @@ impl PayeeLocationsApi for PayeeLocationsApiClient {
Ok(client.execute(req)?.error_for_status()?.json()?)
}
- fn get_payee_locations_by_payee(&self, budget_id: &str, payee_id: &str) -> Result<::models::PayeeLocationsResponse, Error> {
+ fn get_payee_locations_by_payee(&self, budget_id: &str, payee_id: &str) -> Result<crate::models::PayeeLocationsResponse, Error> {
let configuration: &configuration::Configuration = self.configuration.borrow();
let client = &configuration.client;
- let uri_str = format!("{}/budgets/{budget_id}/payees/{payee_id}/payee_locations", configuration.base_path, budget_id=urlencode(budget_id), payee_id=urlencode(payee_id));
+ let uri_str = format!("{}/budgets/{budget_id}/payees/{payee_id}/payee_locations", configuration.base_path, budget_id=crate::apis::urlencode(budget_id), payee_id=crate::apis::urlencode(payee_id));
let mut req_builder = client.get(uri_str.as_str());
if let Some(ref user_agent) = configuration.user_agent {
diff --git a/src/apis/payees_api.rs b/src/apis/payees_api.rs
index 77db5bb..890920c 100644
--- a/src/apis/payees_api.rs
+++ b/src/apis/payees_api.rs
@@ -13,7 +13,7 @@ use std::borrow::Borrow;
use reqwest;
-use super::{Error, configuration, urlencode};
+use super::{Error, configuration};
pub struct PayeesApiClient {
configuration: Rc<configuration::Configuration>,
@@ -28,16 +28,16 @@ impl PayeesApiClient {
}
pub trait PayeesApi {
- fn get_payee_by_id(&self, budget_id: &str, payee_id: &str) -> Result<::models::PayeeResponse, Error>;
- fn get_payees(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::PayeesResponse, Error>;
+ fn get_payee_by_id(&self, budget_id: &str, payee_id: &str) -> Result<crate::models::PayeeResponse, Error>;
+ fn get_payees(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<crate::models::PayeesResponse, Error>;
}
impl PayeesApi for PayeesApiClient {
- fn get_payee_by_id(&self, budget_id: &str, payee_id: &str) -> Result<::models::PayeeResponse, Error> {
+ fn get_payee_by_id(&self, budget_id: &str, payee_id: &str) -> Result<crate::models::PayeeResponse, Error> {
let configuration: &configuration::Configuration = self.configuration.borrow();
let client = &configuration.client;
- let uri_str = format!("{}/budgets/{budget_id}/payees/{payee_id}", configuration.base_path, budget_id=urlencode(budget_id), payee_id=urlencode(payee_id));
+ let uri_str = format!("{}/budgets/{budget_id}/payees/{payee_id}", configuration.base_path, budget_id=crate::apis::urlencode(budget_id), payee_id=crate::apis::urlencode(payee_id));
let mut req_builder = client.get(uri_str.as_str());
if let Some(ref user_agent) = configuration.user_agent {
@@ -58,11 +58,11 @@ impl PayeesApi for PayeesApiClient {
Ok(client.execute(req)?.error_for_status()?.json()?)
}
- fn get_payees(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::PayeesResponse, Error> {
+ fn get_payees(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<crate::models::PayeesResponse, Error> {
let configuration: &configuration::Configuration = self.configuration.borrow();
let client = &configuration.client;
- let uri_str = format!("{}/budgets/{budget_id}/payees", configuration.base_path, budget_id=urlencode(budget_id));
+ let uri_str = format!("{}/budgets/{budget_id}/payees", configuration.base_path, budget_id=crate::apis::urlencode(budget_id));
let mut req_builder = client.get(uri_str.as_str());
req_builder = req_builder.query(&[("last_knowledge_of_server", &last_knowledge_of_server.to_string())]);
diff --git a/src/apis/scheduled_transactions_api.rs b/src/apis/scheduled_transactions_api.rs
index 8ab30a8..fe8c959 100644
--- a/src/apis/scheduled_transactions_api.rs
+++ b/src/apis/scheduled_transactions_api.rs
@@ -13,7 +13,7 @@ use std::borrow::Borrow;
use reqwest;
-use super::{Error, configuration, urlencode};
+use super::{Error, configuration};
pub struct ScheduledTransactionsApiClient {
configuration: Rc<configuration::Configuration>,
@@ -28,16 +28,16 @@ impl ScheduledTransactionsApiClient {
}
pub trait ScheduledTransactionsApi {
- fn get_scheduled_transaction_by_id(&self, budget_id: &str, scheduled_transaction_id: &str) -> Result<::models::ScheduledTransactionResponse, Error>;
- fn get_scheduled_transactions(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::ScheduledTransactionsResponse, Error>;
+ fn get_scheduled_transaction_by_id(&self, budget_id: &str, scheduled_transaction_id: &str) -> Result<crate::models::ScheduledTransactionResponse, Error>;
+ fn get_scheduled_transactions(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<crate::models::ScheduledTransactionsResponse, Error>;
}
impl ScheduledTransactionsApi for ScheduledTransactionsApiClient {
- fn get_scheduled_transaction_by_id(&self, budget_id: &str, scheduled_transaction_id: &str) -> Result<::models::ScheduledTransactionResponse, Error> {
+ fn get_scheduled_transaction_by_id(&self, budget_id: &str, scheduled_transaction_id: &str) -> Result<crate::models::ScheduledTransactionResponse, Error> {
let configuration: &configuration::Configuration = self.configuration.borrow();
let client = &configuration.client;
- let uri_str = format!("{}/budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id}", configuration.base_path, budget_id=urlencode(budget_id), scheduled_transaction_id=urlencode(scheduled_transaction_id));
+ let uri_str = format!("{}/budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id}", configuration.base_path, budget_id=crate::apis::urlencode(budget_id), scheduled_transaction_id=crate::apis::urlencode(scheduled_transaction_id));
let mut req_builder = client.get(uri_str.as_str());
if let Some(ref user_agent) = configuration.user_agent {
@@ -58,11 +58,11 @@ impl ScheduledTransactionsApi for ScheduledTransactionsApiClient {
Ok(client.execute(req)?.error_for_status()?.json()?)
}
- fn get_scheduled_transactions(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<::models::ScheduledTransactionsResponse, Error> {
+ fn get_scheduled_transactions(&self, budget_id: &str, last_knowledge_of_server: i64) -> Result<crate::models::ScheduledTransactionsResponse, Error> {
let configuration: &configuration::Configuration = self.configuration.borrow();
let client = &configuration.client;
- let uri_str = format!("{}/budgets/{budget_id}/scheduled_transactions", configuration.base_path, budget_id=urlencode(budget_id));
+ let uri_str = format!("{}/budgets/{budget_id}/scheduled_transactions", configuration.base_path, budget_id=crate::apis::urlencode(budget_id));
let mut req_builder = client.get(uri_str.as_str());
req_builder = req_builder.query(&[("last_knowledge_of_server", &last_knowledge_of_server.to_string())]);
diff --git a/src/apis/transactions_api.rs b/src/apis/transactions_api.rs
index a6386a0..9b3fcb4 100644
--- a/src/apis/transactions_api.rs
+++ b/src/apis/transactions_api.rs
@@ -13,7 +13,7 @@ use std::borrow::Borrow;
use reqwest;
-use super::{Error, configuration, urlencode};
+use super::{Error, configuration};
pub struct TransactionsApiClient {
configuration: Rc<configuration::Configuration>,
@@ -28,22 +28,22 @@ impl TransactionsApiClient {
}
pub trait TransactionsApi {
- fn create_transaction(&self, budget_id: &str, data: ::models::SaveTransactionsWrapper) -> Result<::models::SaveTransactionsResponse, Error>;
- fn get_transaction_by_id(&self, budget_id: &str, transaction_id: &str) -> Result<::models::TransactionResponse, Error>;
- fn get_transactions(&self, budget_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::TransactionsResponse, Error>;
- fn get_transactions_by_account(&self, budget_id: &str, account_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::TransactionsResponse, Error>;
- fn get_transactions_by_category(&self, budget_id: &str, category_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::HybridTransactionsResponse, Error>;
- fn get_transactions_by_payee(&self, budget_id: &str, payee_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::HybridTransactionsResponse, Error>;
- fn update_transaction(&self, budget_id: &str, transaction_id: &str, data: ::models::UpdateTransactionWrapper) -> Result<::models::TransactionResponse, Error>;
- fn update_transactions(&self, budget_id: &str, data: ::models::UpdateTransactionsWrapper) -> Result<::models::UpdateTransactionsResponse, Error>;
+ fn create_transaction(&self, budget_id: &str, data: crate::models::SaveTransactionsWrapper) -> Result<crate::models::SaveTransactionsResponse, Error>;
+ fn get_transaction_by_id(&self, budget_id: &str, transaction_id: &str) -> Result<crate::models::TransactionResponse, Error>;
+ fn get_transactions(&self, budget_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<crate::models::TransactionsResponse, Error>;
+ fn get_transactions_by_account(&self, budget_id: &str, account_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<crate::models::TransactionsResponse, Error>;
+ fn get_transactions_by_category(&self, budget_id: &str, category_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<crate::models::HybridTransactionsResponse, Error>;
+ fn get_transactions_by_payee(&self, budget_id: &str, payee_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<crate::models::HybridTransactionsResponse, Error>;
+ fn update_transaction(&self, budget_id: &str, transaction_id: &str, data: crate::models::SaveTransactionWrapper) -> Result<crate::models::TransactionResponse, Error>;
+ fn update_transactions(&self, budget_id: &str, data: crate::models::UpdateTransactionsWrapper) -> Result<crate::models::SaveTransactionsResponse, Error>;
}
impl TransactionsApi for TransactionsApiClient {
- fn create_transaction(&self, budget_id: &str, data: ::models::SaveTransactionsWrapper) -> Result<::models::SaveTransactionsResponse, Error> {
+ fn create_transaction(&self, budget_id: &str, data: crate::models::SaveTransactionsWrapper) -> Result<crate::models::SaveTransactionsResponse, Error> {
let configuration: &configuration::Configuration = self.configuration.borrow();
let client = &configuration.client;
- let uri_str = format!("{}/budgets/{budget_id}/transactions", configuration.base_path, budget_id=urlencode(budget_id));
+ let uri_str = format!("{}/budgets/{budget_id}/transactions", configuration.base_path, budget_id=crate::apis::urlencode(budget_id));
let mut req_builder = client.post(uri_str.as_str());
if let Some(ref user_agent) = configuration.user_agent {
@@ -65,11 +65,11 @@ impl TransactionsApi for TransactionsApiClient {
Ok(client.execute(req)?.error_for_status()?.json()?)
}
- fn get_transaction_by_id(&self, budget_id: &str, transaction_id: &str) -> Result<::models::TransactionResponse, Error> {
+ fn get_transaction_by_id(&self, budget_id: &str, transaction_id: &str) -> Result<crate::models::TransactionResponse, Error> {
let configuration: &configuration::Configuration = self.configuration.borrow();
let client = &configuration.client;
- let uri_str = format!("{}/budgets/{budget_id}/transactions/{transaction_id}", configuration.base_path, budget_id=urlencode(budget_id), transaction_id=urlencode(transaction_id));
+ let uri_str = format!("{}/budgets/{budget_id}/transactions/{transaction_id}", configuration.base_path, budget_id=crate::apis::urlencode(budget_id), transaction_id=crate::apis::urlencode(transaction_id));
let mut req_builder = client.get(uri_str.as_str());
if let Some(ref user_agent) = configuration.user_agent {
@@ -90,11 +90,11 @@ impl TransactionsApi for TransactionsApiClient {
Ok(client.execute(req)?.error_for_status()?.json()?)
}
- fn get_transactions(&self, budget_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::TransactionsResponse, Error> {
+ fn get_transactions(&self, budget_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<crate::models::TransactionsResponse, Error> {
let configuration: &configuration::Configuration = self.configuration.borrow();
let client = &configuration.client;
- let uri_str = format!("{}/budgets/{budget_id}/transactions", configuration.base_path, budget_id=urlencode(budget_id));
+ let uri_str = format!("{}/budgets/{budget_id}/transactions", configuration.base_path, budget_id=crate::apis::urlencode(budget_id));
let mut req_builder = client.get(uri_str.as_str());
req_builder = req_builder.query(&[("since_date", &since_date.to_string())]);
@@ -118,11 +118,11 @@ impl TransactionsApi for TransactionsApiClient {
Ok(client.execute(req)?.error_for_status()?.json()?)
}
- fn get_transactions_by_account(&self, budget_id: &str, account_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::TransactionsResponse, Error> {
+ fn get_transactions_by_account(&self, budget_id: &str, account_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<crate::models::TransactionsResponse, Error> {
let configuration: &configuration::Configuration = self.configuration.borrow();
let client = &configuration.client;
- let uri_str = format!("{}/budgets/{budget_id}/accounts/{account_id}/transactions", configuration.base_path, budget_id=urlencode(budget_id), account_id=urlencode(account_id));
+ let uri_str = format!("{}/budgets/{budget_id}/accounts/{account_id}/transactions", configuration.base_path, budget_id=crate::apis::urlencode(budget_id), account_id=crate::apis::urlencode(account_id));
let mut req_builder = client.get(uri_str.as_str());
req_builder = req_builder.query(&[("since_date", &since_date.to_string())]);
@@ -146,11 +146,11 @@ impl TransactionsApi for TransactionsApiClient {
Ok(client.execute(req)?.error_for_status()?.json()?)
}
- fn get_transactions_by_category(&self, budget_id: &str, category_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::HybridTransactionsResponse, Error> {
+ fn get_transactions_by_category(&self, budget_id: &str, category_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<crate::models::HybridTransactionsResponse, Error> {
let configuration: &configuration::Configuration = self.configuration.borrow();
let client = &configuration.client;
- let uri_str = format!("{}/budgets/{budget_id}/categories/{category_id}/transactions", configuration.base_path, budget_id=urlencode(budget_id), category_id=urlencode(category_id));
+ let uri_str = format!("{}/budgets/{budget_id}/categories/{category_id}/transactions", configuration.base_path, budget_id=crate::apis::urlencode(budget_id), category_id=crate::apis::urlencode(category_id));
let mut req_builder = client.get(uri_str.as_str());
req_builder = req_builder.query(&[("since_date", &since_date.to_string())]);
@@ -174,11 +174,11 @@ impl TransactionsApi for TransactionsApiClient {
Ok(client.execute(req)?.error_for_status()?.json()?)
}
- fn get_transactions_by_payee(&self, budget_id: &str, payee_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<::models::HybridTransactionsResponse, Error> {
+ fn get_transactions_by_payee(&self, budget_id: &str, payee_id: &str, since_date: String, _type: &str, last_knowledge_of_server: i64) -> Result<crate::models::HybridTransactionsResponse, Error> {
let configuration: &configuration::Configuration = self.configuration.borrow();
let client = &configuration.client;
- let uri_str = format!("{}/budgets/{budget_id}/payees/{payee_id}/transactions", configuration.base_path, budget_id=urlencode(budget_id), payee_id=urlencode(payee_id));
+ let uri_str = format!("{}/budgets/{budget_id}/payees/{payee_id}/transactions", configuration.base_path, budget_id=crate::apis::urlencode(budget_id), payee_id=crate::apis::urlencode(payee_id));
let mut req_builder = client.get(uri_str.as_str());
req_builder = req_builder.query(&[("since_date", &since_date.to_string())]);
@@ -202,11 +202,11 @@ impl TransactionsApi for TransactionsApiClient {
Ok(client.execute(req)?.error_for_status()?.json()?)
}
- fn update_transaction(&self, budget_id: &str, transaction_id: &str, data: ::models::UpdateTransactionWrapper) -> Result<::models::TransactionResponse, Error> {
+ fn update_transaction(&self, budget_id: &str, transaction_id: &str, data: crate::models::SaveTransactionWrapper) -> Result<crate::models::TransactionResponse, Error> {
let configuration: &configuration::Configuration = self.configuration.borrow();
let client = &configuration.client;
- let uri_str = format!("{}/budgets/{budget_id}/transactions/{transaction_id}", configuration.base_path, budget_id=urlencode(budget_id), transaction_id=urlencode(transaction_id));
+ let uri_str = format!("{}/budgets/{budget_id}/transactions/{transaction_id}", configuration.base_path, budget_id=crate::apis::urlencode(budget_id), transaction_id=crate::apis::urlencode(transaction_id));
let mut req_builder = client.put(uri_str.as_str());
if let Some(ref user_agent) = configuration.user_agent {
@@ -228,11 +228,11 @@ impl TransactionsApi for TransactionsApiClient {
Ok(client.execute(req)?.error_for_status()?.json()?)
}
- fn update_transactions(&self, budget_id: &str, data: ::models::UpdateTransactionsWrapper) -> Result<::models::UpdateTransactionsResponse, Error> {
+ fn update_transactions(&self, budget_id: &str, data: crate::models::UpdateTransactionsWrapper) -> Result<crate::models::SaveTransactionsResponse, Error> {
let configuration: &configuration::Configuration = self.configuration.borrow();
let client = &configuration.client;
- let uri_str = format!("{}/budgets/{budget_id}/transactions", configuration.base_path, budget_id=urlencode(budget_id));
+ let uri_str = format!("{}/budgets/{budget_id}/transactions", configuration.base_path, budget_id=crate::apis::urlencode(budget_id));
let mut req_builder = client.patch(uri_str.as_str());
if let Some(ref user_agent) = configuration.user_agent {
diff --git a/src/apis/user_api.rs b/src/apis/user_api.rs
index 50c243e..870ecc4 100644
--- a/src/apis/user_api.rs
+++ b/src/apis/user_api.rs
@@ -13,7 +13,7 @@ use std::borrow::Borrow;
use reqwest;
-use super::{Error, configuration, urlencode};
+use super::{Error, configuration};
pub struct UserApiClient {
configuration: Rc<configuration::Configuration>,
@@ -28,11 +28,11 @@ impl UserApiClient {
}
pub trait UserApi {
- fn get_user(&self, ) -> Result<::models::UserResponse, Error>;
+ fn get_user(&self, ) -> Result<crate::models::UserResponse, Error>;
}
impl UserApi for UserApiClient {
- fn get_user(&self, ) -> Result<::models::UserResponse, Error> {
+ fn get_user(&self, ) -> Result<crate::models::UserResponse, Error> {
let configuration: &configuration::Configuration = self.configuration.borrow();
let client = &configuration.client;
diff --git a/src/models/account.rs b/src/models/account.rs
index 6ffa1d5..44ad808 100644
--- a/src/models/account.rs
+++ b/src/models/account.rs
@@ -9,11 +9,8 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct Account {
#[serde(rename = "id")]
pub id: String,
@@ -21,7 +18,7 @@ pub struct Account {
pub name: String,
/// The type of account. Note: payPal, merchantAccount, investmentAccount, and mortgage types have been deprecated and will be removed in the future.
#[serde(rename = "type")]
- pub _type: String,
+ pub _type: Type,
/// Whether this account is on budget or not
#[serde(rename = "on_budget")]
pub on_budget: bool,
@@ -48,7 +45,7 @@ pub struct Account {
}
impl Account {
- pub fn new(id: String, name: String, _type: String, on_budget: bool, closed: bool, balance: i64, cleared_balance: i64, uncleared_balance: i64, transfer_payee_id: String, deleted: bool) -> Account {
+ pub fn new(id: String, name: String, _type: Type, on_budget: bool, closed: bool, balance: i64, cleared_balance: i64, uncleared_balance: i64, transfer_payee_id: String, deleted: bool) -> Account {
Account {
id: id,
name: name,
@@ -66,7 +63,7 @@ impl Account {
}
/// The type of account. Note: payPal, merchantAccount, investmentAccount, and mortgage types have been deprecated and will be removed in the future.
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Type {
#[serde(rename = "checking")]
Checking,
diff --git a/src/models/account_response.rs b/src/models/account_response.rs
index 633bacb..3f24283 100644
--- a/src/models/account_response.rs
+++ b/src/models/account_response.rs
@@ -9,18 +9,15 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct AccountResponse {
#[serde(rename = "data")]
- pub data: ::models::AccountResponseData,
+ pub data: crate::models::AccountResponseData,
}
impl AccountResponse {
- pub fn new(data: ::models::AccountResponseData) -> AccountResponse {
+ pub fn new(data: crate::models::AccountResponseData) -> AccountResponse {
AccountResponse {
data: data,
}
diff --git a/src/models/account_response_data.rs b/src/models/account_response_data.rs
index 9340a0f..c74e20a 100644
--- a/src/models/account_response_data.rs
+++ b/src/models/account_response_data.rs
@@ -9,18 +9,15 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct AccountResponseData {
#[serde(rename = "account")]
- pub account: ::models::Account,
+ pub account: crate::models::Account,
}
impl AccountResponseData {
- pub fn new(account: ::models::Account) -> AccountResponseData {
+ pub fn new(account: crate::models::Account) -> AccountResponseData {
AccountResponseData {
account: account,
}
diff --git a/src/models/accounts_response.rs b/src/models/accounts_response.rs
index d2bd25d..ccf8809 100644
--- a/src/models/accounts_response.rs
+++ b/src/models/accounts_response.rs
@@ -9,18 +9,15 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct AccountsResponse {
#[serde(rename = "data")]
- pub data: ::models::AccountsResponseData,
+ pub data: crate::models::AccountsResponseData,
}
impl AccountsResponse {
- pub fn new(data: ::models::AccountsResponseData) -> AccountsResponse {
+ pub fn new(data: crate::models::AccountsResponseData) -> AccountsResponse {
AccountsResponse {
data: data,
}
diff --git a/src/models/accounts_response_data.rs b/src/models/accounts_response_data.rs
index 1324953..670c777 100644
--- a/src/models/accounts_response_data.rs
+++ b/src/models/accounts_response_data.rs
@@ -9,21 +9,18 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct AccountsResponseData {
#[serde(rename = "accounts")]
- pub accounts: Vec<::models::Account>,
+ pub accounts: Vec<crate::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 {
+ pub fn new(accounts: Vec<crate::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
index 8553aad..b14f4b0 100644
--- a/src/models/budget_detail.rs
+++ b/src/models/budget_detail.rs
@@ -9,11 +9,8 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct BudgetDetail {
#[serde(rename = "id")]
pub id: String,
@@ -29,29 +26,29 @@ pub struct BudgetDetail {
#[serde(rename = "last_month", skip_serializing_if = "Option::is_none")]
pub last_month: Option<String>,
#[serde(rename = "date_format", skip_serializing_if = "Option::is_none")]
- pub date_format: Option<::models::DateFormat>,
+ pub date_format: Option<crate::models::DateFormat>,
#[serde(rename = "currency_format", skip_serializing_if = "Option::is_none")]
- pub currency_format: Option<::models::CurrencyFormat>,
+ pub currency_format: Option<crate::models::CurrencyFormat>,
#[serde(rename = "accounts", skip_serializing_if = "Option::is_none")]
- pub accounts: Option<Vec<::models::Account>>,
+ pub accounts: Option<Vec<crate::models::Account>>,
#[serde(rename = "payees", skip_serializing_if = "Option::is_none")]
- pub payees: Option<Vec<::models::Payee>>,
+ pub payees: Option<Vec<crate::models::Payee>>,
#[serde(rename = "payee_locations", skip_serializing_if = "Option::is_none")]
- pub payee_locations: Option<Vec<::models::PayeeLocation>>,
+ pub payee_locations: Option<Vec<crate::models::PayeeLocation>>,
#[serde(rename = "category_groups", skip_serializing_if = "Option::is_none")]
- pub category_groups: Option<Vec<::models::CategoryGroup>>,
+ pub category_groups: Option<Vec<crate::models::CategoryGroup>>,
#[serde(rename = "categories", skip_serializing_if = "Option::is_none")]
- pub categories: Option<Vec<::models::Category>>,
+ pub categories: Option<Vec<crate::models::Category>>,
#[serde(rename = "months", skip_serializing_if = "Option::is_none")]
- pub months: Option<Vec<::models::MonthDetail>>,
+ pub months: Option<Vec<crate::models::MonthDetail>>,
#[serde(rename = "transactions", skip_serializing_if = "Option::is_none")]
- pub transactions: Option<Vec<::models::TransactionSummary>>,
+ pub transactions: Option<Vec<crate::models::TransactionSummary>>,
#[serde(rename = "subtransactions", skip_serializing_if = "Option::is_none")]
- pub subtransactions: Option<Vec<::models::SubTransaction>>,
+ pub subtransactions: Option<Vec<crate::models::SubTransaction>>,
#[serde(rename = "scheduled_transactions", skip_serializing_if = "Option::is_none")]
- pub scheduled_transactions: Option<Vec<::models::ScheduledTransactionSummary>>,
+ pub scheduled_transactions: Option<Vec<crate::models::ScheduledTransactionSummary>>,
#[serde(rename = "scheduled_subtransactions", skip_serializing_if = "Option::is_none")]
- pub scheduled_subtransactions: Option<Vec<::models::ScheduledSubTransaction>>,
+ pub scheduled_subtransactions: Option<Vec<crate::models::ScheduledSubTransaction>>,
}
impl BudgetDetail {
diff --git a/src/models/budget_detail_all_of.rs b/src/models/budget_detail_all_of.rs
index 90a621e..8b7da42 100644
--- a/src/models/budget_detail_all_of.rs
+++ b/src/models/budget_detail_all_of.rs
@@ -9,32 +9,29 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct BudgetDetailAllOf {
#[serde(rename = "accounts", skip_serializing_if = "Option::is_none")]
- pub accounts: Option<Vec<::models::Account>>,
+ pub accounts: Option<Vec<crate::models::Account>>,
#[serde(rename = "payees", skip_serializing_if = "Option::is_none")]
- pub payees: Option<Vec<::models::Payee>>,
+ pub payees: Option<Vec<crate::models::Payee>>,
#[serde(rename = "payee_locations", skip_serializing_if = "Option::is_none")]
- pub payee_locations: Option<Vec<::models::PayeeLocation>>,
+ pub payee_locations: Option<Vec<crate::models::PayeeLocation>>,
#[serde(rename = "category_groups", skip_serializing_if = "Option::is_none")]
- pub category_groups: Option<Vec<::models::CategoryGroup>>,
+ pub category_groups: Option<Vec<crate::models::CategoryGroup>>,
#[serde(rename = "categories", skip_serializing_if = "Option::is_none")]
- pub categories: Option<Vec<::models::Category>>,
+ pub categories: Option<Vec<crate::models::Category>>,
#[serde(rename = "months", skip_serializing_if = "Option::is_none")]
- pub months: Option<Vec<::models::MonthDetail>>,
+ pub months: Option<Vec<crate::models::MonthDetail>>,
#[serde(rename = "transactions", skip_serializing_if = "Option::is_none")]
- pub transactions: Option<Vec<::models::TransactionSummary>>,
+ pub transactions: Option<Vec<crate::models::TransactionSummary>>,
#[serde(rename = "subtransactions", skip_serializing_if = "Option::is_none")]
- pub subtransactions: Option<Vec<::models::SubTransaction>>,
+ pub subtransactions: Option<Vec<crate::models::SubTransaction>>,
#[serde(rename = "scheduled_transactions", skip_serializing_if = "Option::is_none")]
- pub scheduled_transactions: Option<Vec<::models::ScheduledTransactionSummary>>,
+ pub scheduled_transactions: Option<Vec<crate::models::ScheduledTransactionSummary>>,
#[serde(rename = "scheduled_subtransactions", skip_serializing_if = "Option::is_none")]
- pub scheduled_subtransactions: Option<Vec<::models::ScheduledSubTransaction>>,
+ pub scheduled_subtransactions: Option<Vec<crate::models::ScheduledSubTransaction>>,
}
impl BudgetDetailAllOf {
diff --git a/src/models/budget_detail_response.rs b/src/models/budget_detail_response.rs
index 5fe15c9..3ffcdcd 100644
--- a/src/models/budget_detail_response.rs
+++ b/src/models/budget_detail_response.rs
@@ -9,18 +9,15 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct BudgetDetailResponse {
#[serde(rename = "data")]
- pub data: ::models::BudgetDetailResponseData,
+ pub data: crate::models::BudgetDetailResponseData,
}
impl BudgetDetailResponse {
- pub fn new(data: ::models::BudgetDetailResponseData) -> BudgetDetailResponse {
+ pub fn new(data: crate::models::BudgetDetailResponseData) -> BudgetDetailResponse {
BudgetDetailResponse {
data: data,
}
diff --git a/src/models/budget_detail_response_data.rs b/src/models/budget_detail_response_data.rs
index 301479d..13dd651 100644
--- a/src/models/budget_detail_response_data.rs
+++ b/src/models/budget_detail_response_data.rs
@@ -9,21 +9,18 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct BudgetDetailResponseData {
#[serde(rename = "budget")]
- pub budget: ::models::BudgetDetail,
+ pub budget: crate::models::BudgetDetail,
/// The knowledge of the server
#[serde(rename = "server_knowledge")]
pub server_knowledge: i64,
}
impl BudgetDetailResponseData {
- pub fn new(budget: ::models::BudgetDetail, server_knowledge: i64) -> BudgetDetailResponseData {
+ pub fn new(budget: crate::models::BudgetDetail, server_knowledge: i64) -> BudgetDetailResponseData {
BudgetDetailResponseData {
budget: budget,
server_knowledge: server_knowledge,
diff --git a/src/models/budget_settings.rs b/src/models/budget_settings.rs
index 25985b5..adb2d78 100644
--- a/src/models/budget_settings.rs
+++ b/src/models/budget_settings.rs
@@ -9,20 +9,17 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct BudgetSettings {
#[serde(rename = "date_format")]
- pub date_format: ::models::DateFormat,
+ pub date_format: crate::models::DateFormat,
#[serde(rename = "currency_format")]
- pub currency_format: ::models::CurrencyFormat,
+ pub currency_format: crate::models::CurrencyFormat,
}
impl BudgetSettings {
- pub fn new(date_format: ::models::DateFormat, currency_format: ::models::CurrencyFormat) -> BudgetSettings {
+ pub fn new(date_format: crate::models::DateFormat, currency_format: crate::models::CurrencyFormat) -> BudgetSettings {
BudgetSettings {
date_format: date_format,
currency_format: currency_format,
diff --git a/src/models/budget_settings_response.rs b/src/models/budget_settings_response.rs
index c5c0ee3..e6a3fb8 100644
--- a/src/models/budget_settings_response.rs
+++ b/src/models/budget_settings_response.rs
@@ -9,18 +9,15 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct BudgetSettingsResponse {
#[serde(rename = "data")]
- pub data: ::models::BudgetSettingsResponseData,
+ pub data: crate::models::BudgetSettingsResponseData,
}
impl BudgetSettingsResponse {
- pub fn new(data: ::models::BudgetSettingsResponseData) -> BudgetSettingsResponse {
+ pub fn new(data: crate::models::BudgetSettingsResponseData) -> BudgetSettingsResponse {
BudgetSettingsResponse {
data: data,
}
diff --git a/src/models/budget_settings_response_data.rs b/src/models/budget_settings_response_data.rs
index e484234..bc9045e 100644
--- a/src/models/budget_settings_response_data.rs
+++ b/src/models/budget_settings_response_data.rs
@@ -9,18 +9,15 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct BudgetSettingsResponseData {
#[serde(rename = "settings")]
- pub settings: ::models::BudgetSettings,
+ pub settings: crate::models::BudgetSettings,
}
impl BudgetSettingsResponseData {
- pub fn new(settings: ::models::BudgetSettings) -> BudgetSettingsResponseData {
+ pub fn new(settings: crate::models::BudgetSettings) -> BudgetSettingsResponseData {
BudgetSettingsResponseData {
settings: settings,
}
diff --git a/src/models/budget_summary.rs b/src/models/budget_summary.rs
index b380593..742fcdf 100644
--- a/src/models/budget_summary.rs
+++ b/src/models/budget_summary.rs
@@ -9,11 +9,8 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct BudgetSummary {
#[serde(rename = "id")]
pub id: String,
@@ -29,9 +26,9 @@ pub struct BudgetSummary {
#[serde(rename = "last_month", skip_serializing_if = "Option::is_none")]
pub last_month: Option<String>,
#[serde(rename = "date_format", skip_serializing_if = "Option::is_none")]
- pub date_format: Option<::models::DateFormat>,
+ pub date_format: Option<crate::models::DateFormat>,
#[serde(rename = "currency_format", skip_serializing_if = "Option::is_none")]
- pub currency_format: Option<::models::CurrencyFormat>,
+ pub currency_format: Option<crate::models::CurrencyFormat>,
}
impl BudgetSummary {
diff --git a/src/models/budget_summary_response.rs b/src/models/budget_summary_response.rs
index 422dfae..2327d4d 100644
--- a/src/models/budget_summary_response.rs
+++ b/src/models/budget_summary_response.rs
@@ -9,18 +9,15 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct BudgetSummaryResponse {
#[serde(rename = "data")]
- pub data: ::models::BudgetSummaryResponseData,
+ pub data: crate::models::BudgetSummaryResponseData,
}
impl BudgetSummaryResponse {
- pub fn new(data: ::models::BudgetSummaryResponseData) -> BudgetSummaryResponse {
+ pub fn new(data: crate::models::BudgetSummaryResponseData) -> BudgetSummaryResponse {
BudgetSummaryResponse {
data: data,
}
diff --git a/src/models/budget_summary_response_data.rs b/src/models/budget_summary_response_data.rs
index f6bec05..90802e7 100644
--- a/src/models/budget_summary_response_data.rs
+++ b/src/models/budget_summary_response_data.rs
@@ -9,20 +9,17 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct BudgetSummaryResponseData {
#[serde(rename = "budgets")]
- pub budgets: Vec<::models::BudgetSummary>,
+ pub budgets: Vec<crate::models::BudgetSummary>,
#[serde(rename = "default_budget", skip_serializing_if = "Option::is_none")]
- pub default_budget: Option<::models::BudgetSummary>,
+ pub default_budget: Option<crate::models::BudgetSummary>,
}
impl BudgetSummaryResponseData {
- pub fn new(budgets: Vec<::models::BudgetSummary>) -> BudgetSummaryResponseData {
+ pub fn new(budgets: Vec<crate::models::BudgetSummary>) -> BudgetSummaryResponseData {
BudgetSummaryResponseData {
budgets: budgets,
default_budget: None,
diff --git a/src/models/bulk_response.rs b/src/models/bulk_response.rs
index bf98b29..f40b58b 100644
--- a/src/models/bulk_response.rs
+++ b/src/models/bulk_response.rs
@@ -9,18 +9,15 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct BulkResponse {
#[serde(rename = "data")]
- pub data: ::models::BulkResponseData,
+ pub data: crate::models::BulkResponseData,
}
impl BulkResponse {
- pub fn new(data: ::models::BulkResponseData) -> BulkResponse {
+ pub fn new(data: crate::models::BulkResponseData) -> BulkResponse {
BulkResponse {
data: data,
}
diff --git a/src/models/bulk_response_data.rs b/src/models/bulk_response_data.rs
index e347af0..192b489 100644
--- a/src/models/bulk_response_data.rs
+++ b/src/models/bulk_response_data.rs
@@ -9,18 +9,15 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct BulkResponseData {
#[serde(rename = "bulk")]
- pub bulk: ::models::BulkResponseDataBulk,
+ pub bulk: crate::models::BulkResponseDataBulk,
}
impl BulkResponseData {
- pub fn new(bulk: ::models::BulkResponseDataBulk) -> BulkResponseData {
+ pub fn new(bulk: crate::models::BulkResponseDataBulk) -> BulkResponseData {
BulkResponseData {
bulk: bulk,
}
diff --git a/src/models/bulk_response_data_bulk.rs b/src/models/bulk_response_data_bulk.rs
index 3993078..538f48c 100644
--- a/src/models/bulk_response_data_bulk.rs
+++ b/src/models/bulk_response_data_bulk.rs
@@ -9,11 +9,8 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct BulkResponseDataBulk {
/// The list of Transaction ids that were created.
#[serde(rename = "transaction_ids")]
diff --git a/src/models/bulk_transactions.rs b/src/models/bulk_transactions.rs
index e80c1c3..b3e0466 100644
--- a/src/models/bulk_transactions.rs
+++ b/src/models/bulk_transactions.rs
@@ -9,18 +9,15 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct BulkTransactions {
#[serde(rename = "transactions")]
- pub transactions: Vec<::models::SaveTransaction>,
+ pub transactions: Vec<crate::models::SaveTransaction>,
}
impl BulkTransactions {
- pub fn new(transactions: Vec<::models::SaveTransaction>) -> BulkTransactions {
+ pub fn new(transactions: Vec<crate::models::SaveTransaction>) -> BulkTransactions {
BulkTransactions {
transactions: transactions,
}
diff --git a/src/models/categories_response.rs b/src/models/categories_response.rs
index 08fbafd..8b804c0 100644
--- a/src/models/categories_response.rs
+++ b/src/models/categories_response.rs
@@ -9,18 +9,15 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct CategoriesResponse {
#[serde(rename = "data")]
- pub data: ::models::CategoriesResponseData,
+ pub data: crate::models::CategoriesResponseData,
}
impl CategoriesResponse {
- pub fn new(data: ::models::CategoriesResponseData) -> CategoriesResponse {
+ pub fn new(data: crate::models::CategoriesResponseData) -> CategoriesResponse {
CategoriesResponse {
data: data,
}
diff --git a/src/models/categories_response_data.rs b/src/models/categories_response_data.rs
index 980505e..5a1dad3 100644
--- a/src/models/categories_response_data.rs
+++ b/src/models/categories_response_data.rs
@@ -9,21 +9,18 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct CategoriesResponseData {
#[serde(rename = "category_groups")]
- pub category_groups: Vec<::models::CategoryGroupWithCategories>,
+ pub category_groups: Vec<crate::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 {
+ pub fn new(category_groups: Vec<crate::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
index 1a62c6a..6677f8d 100644
--- a/src/models/category.rs
+++ b/src/models/category.rs
@@ -9,11 +9,8 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct Category {
#[serde(rename = "id")]
pub id: String,
@@ -38,9 +35,9 @@ pub struct Category {
/// Balance in milliunits format
#[serde(rename = "balance")]
pub balance: i64,
- /// The type of goal, if the cagegory has a goal (TB=Target Category Balance, TBD=Target Category Balance by Date, MF=Monthly Funding)
+ /// The type of goal, if the category has a goal (TB=Target Category Balance, TBD=Target Category Balance by Date, MF=Monthly Funding)
#[serde(rename = "goal_type", skip_serializing_if = "Option::is_none")]
- pub goal_type: Option<String>,
+ pub goal_type: Option<GoalType>,
/// The month a goal was created
#[serde(rename = "goal_creation_month", skip_serializing_if = "Option::is_none")]
pub goal_creation_month: Option<String>,
@@ -80,8 +77,8 @@ impl Category {
}
}
-/// The type of goal, if the cagegory has a goal (TB=Target Category Balance, TBD=Target Category Balance by Date, MF=Monthly Funding)
-#[derive(Debug, Serialize, Deserialize)]
+/// The type of goal, if the category has a goal (TB=Target Category Balance, TBD=Target Category Balance by Date, MF=Monthly Funding)
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum GoalType {
#[serde(rename = "TB")]
TB,
@@ -89,5 +86,7 @@ pub enum GoalType {
TBD,
#[serde(rename = "MF")]
MF,
+ #[serde(rename = "NEED")]
+ NEED,
}
diff --git a/src/models/category_group.rs b/src/models/category_group.rs
index 2f674e2..b4f75ee 100644
--- a/src/models/category_group.rs
+++ b/src/models/category_group.rs
@@ -9,11 +9,8 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct CategoryGroup {
#[serde(rename = "id")]
pub id: String,
diff --git a/src/models/category_group_with_categories.rs b/src/models/category_group_with_categories.rs
index 38cfd88..f674b4c 100644
--- a/src/models/category_group_with_categories.rs
+++ b/src/models/category_group_with_categories.rs
@@ -9,11 +9,8 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct CategoryGroupWithCategories {
#[serde(rename = "id")]
pub id: String,
@@ -27,11 +24,11 @@ pub struct CategoryGroupWithCategories {
pub deleted: bool,
/// Category group categories. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
#[serde(rename = "categories")]
- pub categories: Vec<::models::Category>,
+ pub categories: Vec<crate::models::Category>,
}
impl CategoryGroupWithCategories {
- pub fn new(id: String, name: String, hidden: bool, deleted: bool, categories: Vec<::models::Category>) -> CategoryGroupWithCategories {
+ pub fn new(id: String, name: String, hidden: bool, deleted: bool, categories: Vec<crate::models::Category>) -> CategoryGroupWithCategories {
CategoryGroupWithCategories {
id: id,
name: name,
diff --git a/src/models/category_group_with_categories_all_of.rs b/src/models/category_group_with_categories_all_of.rs
index f34d3bb..0820aef 100644
--- a/src/models/category_group_with_categories_all_of.rs
+++ b/src/models/category_group_with_categories_all_of.rs
@@ -9,19 +9,16 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct CategoryGroupWithCategoriesAllOf {
/// Category group categories. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
#[serde(rename = "categories")]
- pub categories: Vec<::models::Category>,
+ pub categories: Vec<crate::models::Category>,
}
impl CategoryGroupWithCategoriesAllOf {
- pub fn new(categories: Vec<::models::Category>) -> CategoryGroupWithCategoriesAllOf {
+ pub fn new(categories: Vec<crate::models::Category>) -> CategoryGroupWithCategoriesAllOf {
CategoryGroupWithCategoriesAllOf {
categories: categories,
}
diff --git a/src/models/category_response.rs b/src/models/category_response.rs
index 35f2f40..13dff4a 100644
--- a/src/models/category_response.rs
+++ b/src/models/category_response.rs
@@ -9,18 +9,15 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct CategoryResponse {
#[serde(rename = "data")]
- pub data: ::models::CategoryResponseData,
+ pub data: crate::models::CategoryResponseData,
}
impl CategoryResponse {
- pub fn new(data: ::models::CategoryResponseData) -> CategoryResponse {
+ pub fn new(data: crate::models::CategoryResponseData) -> CategoryResponse {
CategoryResponse {
data: data,
}
diff --git a/src/models/category_response_data.rs b/src/models/category_response_data.rs
index 4e81fbb..078f720 100644
--- a/src/models/category_response_data.rs
+++ b/src/models/category_response_data.rs
@@ -9,18 +9,15 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct CategoryResponseData {
#[serde(rename = "category")]
- pub category: ::models::Category,
+ pub category: crate::models::Category,
}
impl CategoryResponseData {
- pub fn new(category: ::models::Category) -> CategoryResponseData {
+ pub fn new(category: crate::models::Category) -> CategoryResponseData {
CategoryResponseData {
category: category,
}
diff --git a/src/models/currency_format.rs b/src/models/currency_format.rs
index 476856a..8831679 100644
--- a/src/models/currency_format.rs
+++ b/src/models/currency_format.rs
@@ -10,11 +10,8 @@
/// CurrencyFormat : The currency format setting for the budget. In some cases the format will not be available and will be specified as null.
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct CurrencyFormat {
#[serde(rename = "iso_code")]
pub iso_code: String,
diff --git a/src/models/date_format.rs b/src/models/date_format.rs
index cf88395..d9259d9 100644
--- a/src/models/date_format.rs
+++ b/src/models/date_format.rs
@@ -10,11 +10,8 @@
/// DateFormat : The date format setting for the budget. In some cases the format will not be available and will be specified as null.
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct DateFormat {
#[serde(rename = "format")]
pub format: String,
diff --git a/src/models/error_detail.rs b/src/models/error_detail.rs
index 4745cf3..32e0380 100644
--- a/src/models/error_detail.rs
+++ b/src/models/error_detail.rs
@@ -9,11 +9,8 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct ErrorDetail {
#[serde(rename = "id")]
pub id: String,
diff --git a/src/models/error_response.rs b/src/models/error_response.rs
index c321726..49760b3 100644
--- a/src/models/error_response.rs
+++ b/src/models/error_response.rs
@@ -9,18 +9,15 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct ErrorResponse {
#[serde(rename = "error")]
- pub error: ::models::ErrorDetail,
+ pub error: crate::models::ErrorDetail,
}
impl ErrorResponse {
- pub fn new(error: ::models::ErrorDetail) -> ErrorResponse {
+ pub fn new(error: crate::models::ErrorDetail) -> ErrorResponse {
ErrorResponse {
error: error,
}
diff --git a/src/models/hybrid_transaction.rs b/src/models/hybrid_transaction.rs
index 802813b..a0b0f07 100644
--- a/src/models/hybrid_transaction.rs
+++ b/src/models/hybrid_transaction.rs
@@ -9,11 +9,8 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct HybridTransaction {
#[serde(rename = "id")]
pub id: String,
@@ -57,20 +54,20 @@ pub struct HybridTransaction {
pub deleted: bool,
/// Whether the hybrid transaction represents a regular transaction or a subtransaction
#[serde(rename = "type")]
- pub _type: String,
- /// For subtransaction types, this is the id of the pararent transaction. For transaction types, this id will be always be null.
+ pub _type: Type,
+ /// For subtransaction types, this is the id of the parent transaction. For transaction types, this id will be always be null.
#[serde(rename = "parent_transaction_id", skip_serializing_if = "Option::is_none")]
pub parent_transaction_id: Option<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,
+ #[serde(rename = "category_name", skip_serializing_if = "Option::is_none")]
+ pub category_name: Option<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 {
+ pub fn new(id: String, date: String, amount: i64, cleared: String, approved: bool, account_id: String, deleted: bool, _type: Type, account_name: String) -> HybridTransaction {
HybridTransaction {
id: id,
date: date,
@@ -91,39 +88,13 @@ impl HybridTransaction {
parent_transaction_id: None,
account_name: account_name,
payee_name: None,
- category_name: category_name,
+ category_name: None,
}
}
}
-/// The cleared status of the transaction
-#[derive(Debug, Serialize, Deserialize)]
-pub enum Cleared {
- #[serde(rename = "cleared")]
- Cleared,
- #[serde(rename = "uncleared")]
- Uncleared,
- #[serde(rename = "reconciled")]
- Reconciled,
-}
-/// The transaction flag
-#[derive(Debug, Serialize, Deserialize)]
-pub enum FlagColor {
- #[serde(rename = "red")]
- Red,
- #[serde(rename = "orange")]
- Orange,
- #[serde(rename = "yellow")]
- Yellow,
- #[serde(rename = "green")]
- Green,
- #[serde(rename = "blue")]
- Blue,
- #[serde(rename = "purple")]
- Purple,
-}
/// Whether the hybrid transaction represents a regular transaction or a subtransaction
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Type {
#[serde(rename = "transaction")]
Transaction,
diff --git a/src/models/hybrid_transaction_all_of.rs b/src/models/hybrid_transaction_all_of.rs
index 42fd515..7092a71 100644
--- a/src/models/hybrid_transaction_all_of.rs
+++ b/src/models/hybrid_transaction_all_of.rs
@@ -9,40 +9,37 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct HybridTransactionAllOf {
/// Whether the hybrid transaction represents a regular transaction or a subtransaction
#[serde(rename = "type")]
- pub _type: String,
- /// For subtransaction types, this is the id of the pararent transaction. For transaction types, this id will be always be null.
+ pub _type: Type,
+ /// For subtransaction types, this is the id of the parent transaction. For transaction types, this id will be always be null.
#[serde(rename = "parent_transaction_id", skip_serializing_if = "Option::is_none")]
pub parent_transaction_id: Option<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,
+ #[serde(rename = "category_name", skip_serializing_if = "Option::is_none")]
+ pub category_name: Option<String>,
}
impl HybridTransactionAllOf {
- pub fn new(_type: String, account_name: String, category_name: String) -> HybridTransactionAllOf {
+ pub fn new(_type: Type, account_name: String) -> HybridTransactionAllOf {
HybridTransactionAllOf {
_type: _type,
parent_transaction_id: None,
account_name: account_name,
payee_name: None,
- category_name: category_name,
+ category_name: None,
}
}
}
/// Whether the hybrid transaction represents a regular transaction or a subtransaction
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub enum Type {
#[serde(rename = "transaction")]
Transaction,
diff --git a/src/models/hybrid_transactions_response.rs b/src/models/hybrid_transactions_response.rs
index 493582e..11926f7 100644
--- a/src/models/hybrid_transactions_response.rs
+++ b/src/models/hybrid_transactions_response.rs
@@ -9,18 +9,15 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct HybridTransactionsResponse {
#[serde(rename = "data")]
- pub data: ::models::HybridTransactionsResponseData,
+ pub data: crate::models::HybridTransactionsResponseData,
}
impl HybridTransactionsResponse {
- pub fn new(data: ::models::HybridTransactionsResponseData) -> HybridTransactionsResponse {
+ pub fn new(data: crate::models::HybridTransactionsResponseData) -> HybridTransactionsResponse {
HybridTransactionsResponse {
data: data,
}
diff --git a/src/models/hybrid_transactions_response_data.rs b/src/models/hybrid_transactions_response_data.rs
index 8e329e4..b0b8143 100644
--- a/src/models/hybrid_transactions_response_data.rs
+++ b/src/models/hybrid_transactions_response_data.rs
@@ -9,18 +9,15 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct HybridTransactionsResponseData {
#[serde(rename = "transactions")]
- pub transactions: Vec<::models::HybridTransaction>,
+ pub transactions: Vec<crate::models::HybridTransaction>,
}
impl HybridTransactionsResponseData {
- pub fn new(transactions: Vec<::models::HybridTransaction>) -> HybridTransactionsResponseData {
+ pub fn new(transactions: Vec<crate::models::HybridTransaction>) -> HybridTransactionsResponseData {
HybridTransactionsResponseData {
transactions: transactions,
}
diff --git a/src/models/mod.rs b/src/models/mod.rs
index ba8b351..45b8f62 100644
--- a/src/models/mod.rs
+++ b/src/models/mod.rs
@@ -154,10 +154,8 @@ mod transactions_response_data;
pub use self::transactions_response_data::TransactionsResponseData;
mod update_transaction;
pub use self::update_transaction::UpdateTransaction;
-mod update_transaction_wrapper;
-pub use self::update_transaction_wrapper::UpdateTransactionWrapper;
-mod update_transactions_response;
-pub use self::update_transactions_response::UpdateTransactionsResponse;
+mod update_transaction_all_of;
+pub use self::update_transaction_all_of::UpdateTransactionAllOf;
mod update_transactions_wrapper;
pub use self::update_transactions_wrapper::UpdateTransactionsWrapper;
mod user;
diff --git a/src/models/month_detail.rs b/src/models/month_detail.rs
index a6f55d4..28b6d56 100644
--- a/src/models/month_detail.rs
+++ b/src/models/month_detail.rs
@@ -9,11 +9,8 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct MonthDetail {
#[serde(rename = "month")]
pub month: String,
@@ -39,11 +36,11 @@ pub struct MonthDetail {
pub deleted: bool,
/// The budget month categories. Amounts (budgeted, activity, balance, etc.) are specific to the {month} parameter specified.
#[serde(rename = "categories")]
- pub categories: Vec<::models::Category>,
+ pub categories: Vec<crate::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 {
+ pub fn new(month: String, income: i64, budgeted: i64, activity: i64, to_be_budgeted: i64, deleted: bool, categories: Vec<crate::models::Category>) -> MonthDetail {
MonthDetail {
month: month,
note: None,
diff --git a/src/models/month_detail_all_of.rs b/src/models/month_detail_all_of.rs
index 0f07326..a805bba 100644
--- a/src/models/month_detail_all_of.rs
+++ b/src/models/month_detail_all_of.rs
@@ -9,19 +9,16 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct MonthDetailAllOf {
/// The budget month categories. Amounts (budgeted, activity, balance, etc.) are specific to the {month} parameter specified.
#[serde(rename = "categories")]
- pub categories: Vec<::models::Category>,
+ pub categories: Vec<crate::models::Category>,
}
impl MonthDetailAllOf {
- pub fn new(categories: Vec<::models::Category>) -> MonthDetailAllOf {
+ pub fn new(categories: Vec<crate::models::Category>) -> MonthDetailAllOf {
MonthDetailAllOf {
categories: categories,
}
diff --git a/src/models/month_detail_response.rs b/src/models/month_detail_response.rs
index c144afb..9c6d3b9 100644
--- a/src/models/month_detail_response.rs
+++ b/src/models/month_detail_response.rs
@@ -9,18 +9,15 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct MonthDetailResponse {
#[serde(rename = "data")]
- pub data: ::models::MonthDetailResponseData,
+ pub data: crate::models::MonthDetailResponseData,
}
impl MonthDetailResponse {
- pub fn new(data: ::models::MonthDetailResponseData) -> MonthDetailResponse {
+ pub fn new(data: crate::models::MonthDetailResponseData) -> MonthDetailResponse {
MonthDetailResponse {
data: data,
}
diff --git a/src/models/month_detail_response_data.rs b/src/models/month_detail_response_data.rs
index 0948763..3a60eb5 100644
--- a/src/models/month_detail_response_data.rs
+++ b/src/models/month_detail_response_data.rs
@@ -9,18 +9,15 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct MonthDetailResponseData {
#[serde(rename = "month")]
- pub month: ::models::MonthDetail,
+ pub month: crate::models::MonthDetail,
}
impl MonthDetailResponseData {
- pub fn new(month: ::models::MonthDetail) -> MonthDetailResponseData {
+ pub fn new(month: crate::models::MonthDetail) -> MonthDetailResponseData {
MonthDetailResponseData {
month: month,
}
diff --git a/src/models/month_summaries_response.rs b/src/models/month_summaries_response.rs
index 44d5d66..7158753 100644
--- a/src/models/month_summaries_response.rs
+++ b/src/models/month_summaries_response.rs
@@ -9,18 +9,15 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct MonthSummariesResponse {
#[serde(rename = "data")]
- pub data: ::models::MonthSummariesResponseData,
+ pub data: crate::models::MonthSummariesResponseData,
}
impl MonthSummariesResponse {
- pub fn new(data: ::models::MonthSummariesResponseData) -> MonthSummariesResponse {
+ pub fn new(data: crate::models::MonthSummariesResponseData) -> MonthSummariesResponse {
MonthSummariesResponse {
data: data,
}
diff --git a/src/models/month_summaries_response_data.rs b/src/models/month_summaries_response_data.rs
index 6237601..03ed9d5 100644
--- a/src/models/month_summaries_response_data.rs
+++ b/src/models/month_summaries_response_data.rs
@@ -9,21 +9,18 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct MonthSummariesResponseData {
#[serde(rename = "months")]
- pub months: Vec<::models::MonthSummary>,
+ pub months: Vec<crate::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 {
+ pub fn new(months: Vec<crate::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
index 3c705d3..f1efaee 100644
--- a/src/models/month_summary.rs
+++ b/src/models/month_summary.rs
@@ -9,11 +9,8 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct MonthSummary {
#[serde(rename = "month")]
pub month: String,
diff --git a/src/models/payee.rs b/src/models/payee.rs
index 13ad103..0f17785 100644
--- a/src/models/payee.rs
+++ b/src/models/payee.rs
@@ -9,11 +9,8 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct Payee {
#[serde(rename = "id")]
pub id: String,
diff --git a/src/models/payee_location.rs b/src/models/payee_location.rs
index afb050e..e40eea2 100644
--- a/src/models/payee_location.rs
+++ b/src/models/payee_location.rs
@@ -9,11 +9,8 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct PayeeLocation {
#[serde(rename = "id")]
pub id: String,
diff --git a/src/models/payee_location_response.rs b/src/models/payee_location_response.rs
index e6d2608..66e2698 100644
--- a/src/models/payee_location_response.rs
+++ b/src/models/payee_location_response.rs
@@ -9,18 +9,15 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct PayeeLocationResponse {
#[serde(rename = "data")]
- pub data: ::models::PayeeLocationResponseData,
+ pub data: crate::models::PayeeLocationResponseData,
}
impl PayeeLocationResponse {
- pub fn new(data: ::models::PayeeLocationResponseData) -> PayeeLocationResponse {
+ pub fn new(data: crate::models::PayeeLocationResponseData) -> PayeeLocationResponse {
PayeeLocationResponse {
data: data,
}
diff --git a/src/models/payee_location_response_data.rs b/src/models/payee_location_response_data.rs
index 869c4ea..0da3992 100644
--- a/src/models/payee_location_response_data.rs
+++ b/src/models/payee_location_response_data.rs
@@ -9,18 +9,15 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct PayeeLocationResponseData {
#[serde(rename = "payee_location")]
- pub payee_location: ::models::PayeeLocation,
+ pub payee_location: crate::models::PayeeLocation,
}
impl PayeeLocationResponseData {
- pub fn new(payee_location: ::models::PayeeLocation) -> PayeeLocationResponseData {
+ pub fn new(payee_location: crate::models::PayeeLocation) -> PayeeLocationResponseData {
PayeeLocationResponseData {
payee_location: payee_location,
}
diff --git a/src/models/payee_locations_response.rs b/src/models/payee_locations_response.rs
index 916a19e..ab05f6e 100644
--- a/src/models/payee_locations_response.rs
+++ b/src/models/payee_locations_response.rs
@@ -9,18 +9,15 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct PayeeLocationsResponse {
#[serde(rename = "data")]
- pub data: ::models::PayeeLocationsResponseData,
+ pub data: crate::models::PayeeLocationsResponseData,
}
impl PayeeLocationsResponse {
- pub fn new(data: ::models::PayeeLocationsResponseData) -> PayeeLocationsResponse {
+ pub fn new(data: crate::models::PayeeLocationsResponseData) -> PayeeLocationsResponse {
PayeeLocationsResponse {
data: data,
}
diff --git a/src/models/payee_locations_response_data.rs b/src/models/payee_locations_response_data.rs
index ea46038..32e061d 100644
--- a/src/models/payee_locations_response_data.rs
+++ b/src/models/payee_locations_response_data.rs
@@ -9,18 +9,15 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct PayeeLocationsResponseData {
#[serde(rename = "payee_locations")]
- pub payee_locations: Vec<::models::PayeeLocation>,
+ pub payee_locations: Vec<crate::models::PayeeLocation>,
}
impl PayeeLocationsResponseData {
- pub fn new(payee_locations: Vec<::models::PayeeLocation>) -> PayeeLocationsResponseData {
+ pub fn new(payee_locations: Vec<crate::models::PayeeLocation>) -> PayeeLocationsResponseData {
PayeeLocationsResponseData {
payee_locations: payee_locations,
}
diff --git a/src/models/payee_response.rs b/src/models/payee_response.rs
index 690913a..650c90d 100644
--- a/src/models/payee_response.rs
+++ b/src/models/payee_response.rs
@@ -9,18 +9,15 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct PayeeResponse {
#[serde(rename = "data")]
- pub data: ::models::PayeeResponseData,
+ pub data: crate::models::PayeeResponseData,
}
impl PayeeResponse {
- pub fn new(data: ::models::PayeeResponseData) -> PayeeResponse {
+ pub fn new(data: crate::models::PayeeResponseData) -> PayeeResponse {
PayeeResponse {
data: data,
}
diff --git a/src/models/payee_response_data.rs b/src/models/payee_response_data.rs
index f19f7ea..ff8e342 100644
--- a/src/models/payee_response_data.rs
+++ b/src/models/payee_response_data.rs
@@ -9,18 +9,15 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct PayeeResponseData {
#[serde(rename = "payee")]
- pub payee: ::models::Payee,
+ pub payee: crate::models::Payee,
}
impl PayeeResponseData {
- pub fn new(payee: ::models::Payee) -> PayeeResponseData {
+ pub fn new(payee: crate::models::Payee) -> PayeeResponseData {
PayeeResponseData {
payee: payee,
}
diff --git a/src/models/payees_response.rs b/src/models/payees_response.rs
index dba96f3..bd6d6e1 100644
--- a/src/models/payees_response.rs
+++ b/src/models/payees_response.rs
@@ -9,18 +9,15 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct PayeesResponse {
#[serde(rename = "data")]
- pub data: ::models::PayeesResponseData,
+ pub data: crate::models::PayeesResponseData,
}
impl PayeesResponse {
- pub fn new(data: ::models::PayeesResponseData) -> PayeesResponse {
+ pub fn new(data: crate::models::PayeesResponseData) -> PayeesResponse {
PayeesResponse {
data: data,
}
diff --git a/src/models/payees_response_data.rs b/src/models/payees_response_data.rs
index 4897b15..efa3313 100644
--- a/src/models/payees_response_data.rs
+++ b/src/models/payees_response_data.rs
@@ -9,21 +9,18 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct PayeesResponseData {
#[serde(rename = "payees")]
- pub payees: Vec<::models::Payee>,
+ pub payees: Vec<crate::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 {
+ pub fn new(payees: Vec<crate::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
index 37744c1..3d33509 100644
--- a/src/models/save_category_response.rs
+++ b/src/models/save_category_response.rs
@@ -9,18 +9,15 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct SaveCategoryResponse {
#[serde(rename = "data")]
- pub data: ::models::SaveCategoryResponseData,
+ pub data: crate::models::SaveCategoryResponseData,
}
impl SaveCategoryResponse {
- pub fn new(data: ::models::SaveCategoryResponseData) -> SaveCategoryResponse {
+ pub fn new(data: crate::models::SaveCategoryResponseData) -> SaveCategoryResponse {
SaveCategoryResponse {
data: data,
}
diff --git a/src/models/save_category_response_data.rs b/src/models/save_category_response_data.rs
index b61b206..536ba30 100644
--- a/src/models/save_category_response_data.rs
+++ b/src/models/save_category_response_data.rs
@@ -9,21 +9,18 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct SaveCategoryResponseData {
#[serde(rename = "category")]
- pub category: ::models::Category,
+ pub category: crate::models::Category,
/// The knowledge of the server
#[serde(rename = "server_knowledge")]
pub server_knowledge: i64,
}
impl SaveCategoryResponseData {
- pub fn new(category: ::models::Category, server_knowledge: i64) -> SaveCategoryResponseData {
+ pub fn new(category: crate::models::Category, server_knowledge: i64) -> SaveCategoryResponseData {
SaveCategoryResponseData {
category: category,
server_knowledge: server_knowledge,
diff --git a/src/models/save_month_category.rs b/src/models/save_month_category.rs
index 40d1b2e..e2862eb 100644
--- a/src/models/save_month_category.rs
+++ b/src/models/save_month_category.rs
@@ -9,11 +9,8 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct SaveMonthCategory {
/// Budgeted amount in milliunits format
#[serde(rename = "budgeted")]
diff --git a/src/models/save_month_category_wrapper.rs b/src/models/save_month_category_wrapper.rs
index ef67116..ddd7154 100644
--- a/src/models/save_month_category_wrapper.rs
+++ b/src/models/save_month_category_wrapper.rs
@@ -9,18 +9,15 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct SaveMonthCategoryWrapper {
#[serde(rename = "category")]
- pub category: ::models::SaveMonthCategory,
+ pub category: crate::models::SaveMonthCategory,
}
impl SaveMonthCategoryWrapper {
- pub fn new(category: ::models::SaveMonthCategory) -> SaveMonthCategoryWrapper {
+ pub fn new(category: crate::models::SaveMonthCategory) -> SaveMonthCategoryWrapper {
SaveMonthCategoryWrapper {
category: category,
}
diff --git a/src/models/save_transaction.rs b/src/models/save_transaction.rs
index c2fc6b7..a864007 100644
--- a/src/models/save_transaction.rs
+++ b/src/models/save_transaction.rs
@@ -9,11 +9,8 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct SaveTransaction {
#[serde(rename = "account_id")]
pub account_id: String,
@@ -23,7 +20,7 @@ pub struct SaveTransaction {
/// The transaction amount in milliunits format. Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored.
#[serde(rename = "amount")]
pub amount: i64,
- /// The payee for the transaction
+ /// The payee for the transaction. To create a transfer between two accounts, use the account transfer payee pointing to the target account. Account transfer payees are specified as tranfer_payee_id on the account resource.
#[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")]
pub payee_id: Option<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.
@@ -43,7 +40,7 @@ pub struct SaveTransaction {
/// 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).
+ /// If specified, the new transaction will be assigned this import_id and considered \"imported\". We will also attempt to match this imported transaction to an existing \"user-entered\" transation on the same account, with the same amount, and with a date +/-10 days from the imported transaction date.<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>,
}
@@ -66,30 +63,4 @@ impl SaveTransaction {
}
}
-/// The cleared status of the transaction
-#[derive(Debug, Serialize, Deserialize)]
-pub enum Cleared {
- #[serde(rename = "cleared")]
- Cleared,
- #[serde(rename = "uncleared")]
- Uncleared,
- #[serde(rename = "reconciled")]
- Reconciled,
-}
-/// The transaction flag
-#[derive(Debug, Serialize, Deserialize)]
-pub enum FlagColor {
- #[serde(rename = "red")]
- Red,
- #[serde(rename = "orange")]
- Orange,
- #[serde(rename = "yellow")]
- Yellow,
- #[serde(rename = "green")]
- Green,
- #[serde(rename = "blue")]
- Blue,
- #[serde(rename = "purple")]
- Purple,
-}
diff --git a/src/models/save_transaction_wrapper.rs b/src/models/save_transaction_wrapper.rs
index 71bc7cd..8152229 100644
--- a/src/models/save_transaction_wrapper.rs
+++ b/src/models/save_transaction_wrapper.rs
@@ -9,18 +9,15 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct SaveTransactionWrapper {
#[serde(rename = "transaction")]
- pub transaction: ::models::SaveTransaction,
+ pub transaction: crate::models::SaveTransaction,
}
impl SaveTransactionWrapper {
- pub fn new(transaction: ::models::SaveTransaction) -> SaveTransactionWrapper {
+ pub fn new(transaction: crate::models::SaveTransaction) -> SaveTransactionWrapper {
SaveTransactionWrapper {
transaction: transaction,
}
diff --git a/src/models/save_transactions_response.rs b/src/models/save_transactions_response.rs
index be0782c..9617ee3 100644
--- a/src/models/save_transactions_response.rs
+++ b/src/models/save_transactions_response.rs
@@ -9,18 +9,15 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct SaveTransactionsResponse {
#[serde(rename = "data")]
- pub data: ::models::SaveTransactionsResponseData,
+ pub data: crate::models::SaveTransactionsResponseData,
}
impl SaveTransactionsResponse {
- pub fn new(data: ::models::SaveTransactionsResponseData) -> SaveTransactionsResponse {
+ pub fn new(data: crate::models::SaveTransactionsResponseData) -> SaveTransactionsResponse {
SaveTransactionsResponse {
data: data,
}
diff --git a/src/models/save_transactions_response_data.rs b/src/models/save_transactions_response_data.rs
index 0086874..0b76b5e 100644
--- a/src/models/save_transactions_response_data.rs
+++ b/src/models/save_transactions_response_data.rs
@@ -9,20 +9,17 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct SaveTransactionsResponseData {
/// The transaction ids that were saved
#[serde(rename = "transaction_ids")]
pub transaction_ids: Vec<String>,
#[serde(rename = "transaction", skip_serializing_if = "Option::is_none")]
- pub transaction: Option<::models::TransactionDetail>,
+ pub transaction: Option<crate::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>>,
+ pub transactions: Option<Vec<crate::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>>,
diff --git a/src/models/save_transactions_wrapper.rs b/src/models/save_transactions_wrapper.rs
index ed49180..cb6613f 100644
--- a/src/models/save_transactions_wrapper.rs
+++ b/src/models/save_transactions_wrapper.rs
@@ -9,16 +9,13 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct SaveTransactionsWrapper {
#[serde(rename = "transaction", skip_serializing_if = "Option::is_none")]
- pub transaction: Option<::models::SaveTransaction>,
+ pub transaction: Option<crate::models::SaveTransaction>,
#[serde(rename = "transactions", skip_serializing_if = "Option::is_none")]
- pub transactions: Option<Vec<::models::SaveTransaction>>,
+ pub transactions: Option<Vec<crate::models::SaveTransaction>>,
}
impl SaveTransactionsWrapper {
diff --git a/src/models/scheduled_sub_transaction.rs b/src/models/scheduled_sub_transaction.rs
index dfc0aca..31a880f 100644
--- a/src/models/scheduled_sub_transaction.rs
+++ b/src/models/scheduled_sub_transaction.rs
@@ -9,11 +9,8 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct ScheduledSubTransaction {
#[serde(rename = "id")]
pub id: String,
@@ -26,8 +23,8 @@ pub struct ScheduledSubTransaction {
pub memo: Option<String>,
#[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")]
pub payee_id: Option<String>,
- #[serde(rename = "category_id")]
- pub category_id: String,
+ #[serde(rename = "category_id", skip_serializing_if = "Option::is_none")]
+ pub category_id: Option<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>,
@@ -37,14 +34,14 @@ pub struct ScheduledSubTransaction {
}
impl ScheduledSubTransaction {
- pub fn new(id: String, scheduled_transaction_id: String, amount: i64, category_id: String, deleted: bool) -> ScheduledSubTransaction {
+ pub fn new(id: String, scheduled_transaction_id: String, amount: i64, deleted: bool) -> ScheduledSubTransaction {
ScheduledSubTransaction {
id: id,
scheduled_transaction_id: scheduled_transaction_id,
amount: amount,
memo: None,
payee_id: None,
- category_id: category_id,
+ category_id: None,
transfer_account_id: None,
deleted: deleted,
}
diff --git a/src/models/scheduled_transaction_detail.rs b/src/models/scheduled_transaction_detail.rs
index d86ef25..d553329 100644
--- a/src/models/scheduled_transaction_detail.rs
+++ b/src/models/scheduled_transaction_detail.rs
@@ -9,11 +9,8 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct ScheduledTransactionDetail {
#[serde(rename = "id")]
pub id: String,
@@ -31,14 +28,14 @@ pub struct ScheduledTransactionDetail {
#[serde(rename = "memo", skip_serializing_if = "Option::is_none")]
pub memo: Option<String>,
/// The scheduled transaction flag
- #[serde(rename = "flag_color")]
- pub flag_color: String,
+ #[serde(rename = "flag_color", skip_serializing_if = "Option::is_none")]
+ pub flag_color: Option<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,
+ #[serde(rename = "category_id", skip_serializing_if = "Option::is_none")]
+ pub category_id: Option<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>,
@@ -47,17 +44,17 @@ pub struct ScheduledTransactionDetail {
pub deleted: bool,
#[serde(rename = "account_name")]
pub account_name: String,
- #[serde(rename = "payee_name")]
- pub payee_name: String,
- #[serde(rename = "category_name")]
- pub category_name: String,
+ #[serde(rename = "payee_name", skip_serializing_if = "Option::is_none")]
+ pub payee_name: Option<String>,
+ #[serde(rename = "category_name", skip_serializing_if = "Option::is_none")]
+ pub category_name: Option<String>,
/// If a split scheduled transaction, the subtransactions.
#[serde(rename = "subtransactions")]
- pub subtransactions: Vec<::models::ScheduledSubTransaction>,
+ pub subtransactions: Vec<crate::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 {
+ pub fn new(id: String, date_first: String, date_next: String, frequency: String, amount: i64, account_id: String, deleted: bool, account_name: String, subtransactions: Vec<crate::models::ScheduledSubTransaction>) -> ScheduledTransactionDetail {
ScheduledTransactionDetail {
id: id,
date_first: date_first,
@@ -65,64 +62,18 @@ impl ScheduledTransactionDetail {
frequency: frequency,
amount: amount,
memo: None,
- flag_color: flag_color,
+ flag_color: None,
account_id: account_id,
payee_id: None,
- category_id: category_id,
+ category_id: None,
transfer_account_id: None,
deleted: deleted,
account_name: account_name,
- payee_name: payee_name,
- category_name: category_name,
+ payee_name: None,
+ category_name: None,
subtransactions: subtransactions,
}
}
}
-///
-#[derive(Debug, Serialize, Deserialize)]
-pub enum Frequency {
- #[serde(rename = "never")]
- Never,
- #[serde(rename = "daily")]
- Daily,
- #[serde(rename = "weekly")]
- Weekly,
- #[serde(rename = "everyOtherWeek")]
- EveryOtherWeek,
- #[serde(rename = "twiceAMonth")]
- TwiceAMonth,
- #[serde(rename = "every4Weeks")]
- Every4Weeks,
- #[serde(rename = "monthly")]
- Monthly,
- #[serde(rename = "everyOtherMonth")]
- EveryOtherMonth,
- #[serde(rename = "every3Months")]
- Every3Months,
- #[serde(rename = "every4Months")]
- Every4Months,
- #[serde(rename = "twiceAYear")]
- TwiceAYear,
- #[serde(rename = "yearly")]
- Yearly,
- #[serde(rename = "everyOtherYear")]
- EveryOtherYear,
-}
-/// The scheduled transaction flag
-#[derive(Debug, Serialize, Deserialize)]
-pub enum FlagColor {
- #[serde(rename = "red")]
- Red,
- #[serde(rename = "orange")]
- Orange,
- #[serde(rename = "yellow")]
- Yellow,
- #[serde(rename = "green")]
- Green,
- #[serde(rename = "blue")]
- Blue,
- #[serde(rename = "purple")]
- Purple,
-}
diff --git a/src/models/scheduled_transaction_detail_all_of.rs b/src/models/scheduled_transaction_detail_all_of.rs
index cf7e6c7..b977afd 100644
--- a/src/models/scheduled_transaction_detail_all_of.rs
+++ b/src/models/scheduled_transaction_detail_all_of.rs
@@ -9,29 +9,26 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct ScheduledTransactionDetailAllOf {
#[serde(rename = "account_name")]
pub account_name: String,
- #[serde(rename = "payee_name")]
- pub payee_name: String,
- #[serde(rename = "category_name")]
- pub category_name: String,
+ #[serde(rename = "payee_name", skip_serializing_if = "Option::is_none")]
+ pub payee_name: Option<String>,
+ #[serde(rename = "category_name", skip_serializing_if = "Option::is_none")]
+ pub category_name: Option<String>,
/// If a split scheduled transaction, the subtransactions.
#[serde(rename = "subtransactions")]
- pub subtransactions: Vec<::models::ScheduledSubTransaction>,
+ pub subtransactions: Vec<crate::models::ScheduledSubTransaction>,
}
impl ScheduledTransactionDetailAllOf {
- pub fn new(account_name: String, payee_name: String, category_name: String, subtransactions: Vec<::models::ScheduledSubTransaction>) -> ScheduledTransactionDetailAllOf {
+ pub fn new(account_name: String, subtransactions: Vec<crate::models::ScheduledSubTransaction>) -> ScheduledTransactionDetailAllOf {
ScheduledTransactionDetailAllOf {
account_name: account_name,
- payee_name: payee_name,
- category_name: category_name,
+ payee_name: None,
+ category_name: None,
subtransactions: subtransactions,
}
}
diff --git a/src/models/scheduled_transaction_response.rs b/src/models/scheduled_transaction_response.rs
index 25286cd..232e09f 100644
--- a/src/models/scheduled_transaction_response.rs
+++ b/src/models/scheduled_transaction_response.rs
@@ -9,18 +9,15 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct ScheduledTransactionResponse {
#[serde(rename = "data")]
- pub data: ::models::ScheduledTransactionResponseData,
+ pub data: crate::models::ScheduledTransactionResponseData,
}
impl ScheduledTransactionResponse {
- pub fn new(data: ::models::ScheduledTransactionResponseData) -> ScheduledTransactionResponse {
+ pub fn new(data: crate::models::ScheduledTransactionResponseData) -> ScheduledTransactionResponse {
ScheduledTransactionResponse {
data: data,
}
diff --git a/src/models/scheduled_transaction_response_data.rs b/src/models/scheduled_transaction_response_data.rs
index 70db916..1cd7379 100644
--- a/src/models/scheduled_transaction_response_data.rs
+++ b/src/models/scheduled_transaction_response_data.rs
@@ -9,18 +9,15 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct ScheduledTransactionResponseData {
#[serde(rename = "scheduled_transaction")]
- pub scheduled_transaction: ::models::ScheduledTransactionDetail,
+ pub scheduled_transaction: crate::models::ScheduledTransactionDetail,
}
impl ScheduledTransactionResponseData {
- pub fn new(scheduled_transaction: ::models::ScheduledTransactionDetail) -> ScheduledTransactionResponseData {
+ pub fn new(scheduled_transaction: crate::models::ScheduledTransactionDetail) -> ScheduledTransactionResponseData {
ScheduledTransactionResponseData {
scheduled_transaction: scheduled_transaction,
}
diff --git a/src/models/scheduled_transaction_summary.rs b/src/models/scheduled_transaction_summary.rs
index 7966d2c..b70d53c 100644
--- a/src/models/scheduled_transaction_summary.rs
+++ b/src/models/scheduled_transaction_summary.rs
@@ -9,11 +9,8 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct ScheduledTransactionSummary {
#[serde(rename = "id")]
pub id: String,
@@ -31,14 +28,14 @@ pub struct ScheduledTransactionSummary {
#[serde(rename = "memo", skip_serializing_if = "Option::is_none")]
pub memo: Option<String>,
/// The scheduled transaction flag
- #[serde(rename = "flag_color")]
- pub flag_color: String,
+ #[serde(rename = "flag_color", skip_serializing_if = "Option::is_none")]
+ pub flag_color: Option<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,
+ #[serde(rename = "category_id", skip_serializing_if = "Option::is_none")]
+ pub category_id: Option<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>,
@@ -48,7 +45,7 @@ pub struct ScheduledTransactionSummary {
}
impl ScheduledTransactionSummary {
- pub fn new(id: String, date_first: String, date_next: String, frequency: String, amount: i64, flag_color: String, account_id: String, category_id: String, deleted: bool) -> ScheduledTransactionSummary {
+ pub fn new(id: String, date_first: String, date_next: String, frequency: String, amount: i64, account_id: String, deleted: bool) -> ScheduledTransactionSummary {
ScheduledTransactionSummary {
id: id,
date_first: date_first,
@@ -56,60 +53,14 @@ impl ScheduledTransactionSummary {
frequency: frequency,
amount: amount,
memo: None,
- flag_color: flag_color,
+ flag_color: None,
account_id: account_id,
payee_id: None,
- category_id: category_id,
+ category_id: None,
transfer_account_id: None,
deleted: deleted,
}
}
}
-///
-#[derive(Debug, Serialize, Deserialize)]
-pub enum Frequency {
- #[serde(rename = "never")]
- Never,
- #[serde(rename = "daily")]
- Daily,
- #[serde(rename = "weekly")]
- Weekly,
- #[serde(rename = "everyOtherWeek")]
- EveryOtherWeek,
- #[serde(rename = "twiceAMonth")]
- TwiceAMonth,
- #[serde(rename = "every4Weeks")]
- Every4Weeks,
- #[serde(rename = "monthly")]
- Monthly,
- #[serde(rename = "everyOtherMonth")]
- EveryOtherMonth,
- #[serde(rename = "every3Months")]
- Every3Months,
- #[serde(rename = "every4Months")]
- Every4Months,
- #[serde(rename = "twiceAYear")]
- TwiceAYear,
- #[serde(rename = "yearly")]
- Yearly,
- #[serde(rename = "everyOtherYear")]
- EveryOtherYear,
-}
-/// The scheduled transaction flag
-#[derive(Debug, Serialize, Deserialize)]
-pub enum FlagColor {
- #[serde(rename = "red")]
- Red,
- #[serde(rename = "orange")]
- Orange,
- #[serde(rename = "yellow")]
- Yellow,
- #[serde(rename = "green")]
- Green,
- #[serde(rename = "blue")]
- Blue,
- #[serde(rename = "purple")]
- Purple,
-}
diff --git a/src/models/scheduled_transactions_response.rs b/src/models/scheduled_transactions_response.rs
index 8ff8378..77d4376 100644
--- a/src/models/scheduled_transactions_response.rs
+++ b/src/models/scheduled_transactions_response.rs
@@ -9,18 +9,15 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct ScheduledTransactionsResponse {
#[serde(rename = "data")]
- pub data: ::models::ScheduledTransactionsResponseData,
+ pub data: crate::models::ScheduledTransactionsResponseData,
}
impl ScheduledTransactionsResponse {
- pub fn new(data: ::models::ScheduledTransactionsResponseData) -> ScheduledTransactionsResponse {
+ pub fn new(data: crate::models::ScheduledTransactionsResponseData) -> ScheduledTransactionsResponse {
ScheduledTransactionsResponse {
data: data,
}
diff --git a/src/models/scheduled_transactions_response_data.rs b/src/models/scheduled_transactions_response_data.rs
index 71e5c79..a9072d4 100644
--- a/src/models/scheduled_transactions_response_data.rs
+++ b/src/models/scheduled_transactions_response_data.rs
@@ -9,21 +9,18 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct ScheduledTransactionsResponseData {
#[serde(rename = "scheduled_transactions")]
- pub scheduled_transactions: Vec<::models::ScheduledTransactionDetail>,
+ pub scheduled_transactions: Vec<crate::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 {
+ pub fn new(scheduled_transactions: Vec<crate::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
index 633ae38..639d5e7 100644
--- a/src/models/sub_transaction.rs
+++ b/src/models/sub_transaction.rs
@@ -9,11 +9,8 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct SubTransaction {
#[serde(rename = "id")]
pub id: String,
diff --git a/src/models/transaction_detail.rs b/src/models/transaction_detail.rs
index 956eae9..ca6be2e 100644
--- a/src/models/transaction_detail.rs
+++ b/src/models/transaction_detail.rs
@@ -9,11 +9,8 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct TransactionDetail {
#[serde(rename = "id")]
pub id: String,
@@ -63,11 +60,11 @@ pub struct TransactionDetail {
pub category_name: Option<String>,
/// If a split transaction, the subtransactions.
#[serde(rename = "subtransactions")]
- pub subtransactions: Vec<::models::SubTransaction>,
+ pub subtransactions: Vec<crate::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 {
+ pub fn new(id: String, date: String, amount: i64, cleared: String, approved: bool, account_id: String, deleted: bool, account_name: String, subtransactions: Vec<crate::models::SubTransaction>) -> TransactionDetail {
TransactionDetail {
id: id,
date: date,
@@ -92,30 +89,4 @@ impl TransactionDetail {
}
}
-/// The cleared status of the transaction
-#[derive(Debug, Serialize, Deserialize)]
-pub enum Cleared {
- #[serde(rename = "cleared")]
- Cleared,
- #[serde(rename = "uncleared")]
- Uncleared,
- #[serde(rename = "reconciled")]
- Reconciled,
-}
-/// The transaction flag
-#[derive(Debug, Serialize, Deserialize)]
-pub enum FlagColor {
- #[serde(rename = "red")]
- Red,
- #[serde(rename = "orange")]
- Orange,
- #[serde(rename = "yellow")]
- Yellow,
- #[serde(rename = "green")]
- Green,
- #[serde(rename = "blue")]
- Blue,
- #[serde(rename = "purple")]
- Purple,
-}
diff --git a/src/models/transaction_detail_all_of.rs b/src/models/transaction_detail_all_of.rs
index cead8f5..68f2ebf 100644
--- a/src/models/transaction_detail_all_of.rs
+++ b/src/models/transaction_detail_all_of.rs
@@ -9,11 +9,8 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct TransactionDetailAllOf {
#[serde(rename = "account_name")]
pub account_name: String,
@@ -23,11 +20,11 @@ pub struct TransactionDetailAllOf {
pub category_name: Option<String>,
/// If a split transaction, the subtransactions.
#[serde(rename = "subtransactions")]
- pub subtransactions: Vec<::models::SubTransaction>,
+ pub subtransactions: Vec<crate::models::SubTransaction>,
}
impl TransactionDetailAllOf {
- pub fn new(account_name: String, subtransactions: Vec<::models::SubTransaction>) -> TransactionDetailAllOf {
+ pub fn new(account_name: String, subtransactions: Vec<crate::models::SubTransaction>) -> TransactionDetailAllOf {
TransactionDetailAllOf {
account_name: account_name,
payee_name: None,
diff --git a/src/models/transaction_response.rs b/src/models/transaction_response.rs
index cc65780..63ff8f1 100644
--- a/src/models/transaction_response.rs
+++ b/src/models/transaction_response.rs
@@ -9,18 +9,15 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct TransactionResponse {
#[serde(rename = "data")]
- pub data: ::models::TransactionResponseData,
+ pub data: crate::models::TransactionResponseData,
}
impl TransactionResponse {
- pub fn new(data: ::models::TransactionResponseData) -> TransactionResponse {
+ pub fn new(data: crate::models::TransactionResponseData) -> TransactionResponse {
TransactionResponse {
data: data,
}
diff --git a/src/models/transaction_response_data.rs b/src/models/transaction_response_data.rs
index 5f96108..e9af627 100644
--- a/src/models/transaction_response_data.rs
+++ b/src/models/transaction_response_data.rs
@@ -9,18 +9,15 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct TransactionResponseData {
#[serde(rename = "transaction")]
- pub transaction: ::models::TransactionDetail,
+ pub transaction: crate::models::TransactionDetail,
}
impl TransactionResponseData {
- pub fn new(transaction: ::models::TransactionDetail) -> TransactionResponseData {
+ pub fn new(transaction: crate::models::TransactionDetail) -> TransactionResponseData {
TransactionResponseData {
transaction: transaction,
}
diff --git a/src/models/transaction_summary.rs b/src/models/transaction_summary.rs
index 94ce164..9bf4cbd 100644
--- a/src/models/transaction_summary.rs
+++ b/src/models/transaction_summary.rs
@@ -9,11 +9,8 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct TransactionSummary {
#[serde(rename = "id")]
pub id: String,
@@ -79,30 +76,4 @@ impl TransactionSummary {
}
}
-/// The cleared status of the transaction
-#[derive(Debug, Serialize, Deserialize)]
-pub enum Cleared {
- #[serde(rename = "cleared")]
- Cleared,
- #[serde(rename = "uncleared")]
- Uncleared,
- #[serde(rename = "reconciled")]
- Reconciled,
-}
-/// The transaction flag
-#[derive(Debug, Serialize, Deserialize)]
-pub enum FlagColor {
- #[serde(rename = "red")]
- Red,
- #[serde(rename = "orange")]
- Orange,
- #[serde(rename = "yellow")]
- Yellow,
- #[serde(rename = "green")]
- Green,
- #[serde(rename = "blue")]
- Blue,
- #[serde(rename = "purple")]
- Purple,
-}
diff --git a/src/models/transactions_response.rs b/src/models/transactions_response.rs
index cda3c1f..d3da899 100644
--- a/src/models/transactions_response.rs
+++ b/src/models/transactions_response.rs
@@ -9,18 +9,15 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct TransactionsResponse {
#[serde(rename = "data")]
- pub data: ::models::TransactionsResponseData,
+ pub data: crate::models::TransactionsResponseData,
}
impl TransactionsResponse {
- pub fn new(data: ::models::TransactionsResponseData) -> TransactionsResponse {
+ pub fn new(data: crate::models::TransactionsResponseData) -> TransactionsResponse {
TransactionsResponse {
data: data,
}
diff --git a/src/models/transactions_response_data.rs b/src/models/transactions_response_data.rs
index 4ac9438..7c10090 100644
--- a/src/models/transactions_response_data.rs
+++ b/src/models/transactions_response_data.rs
@@ -9,21 +9,18 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct TransactionsResponseData {
#[serde(rename = "transactions")]
- pub transactions: Vec<::models::TransactionDetail>,
+ pub transactions: Vec<crate::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 {
+ pub fn new(transactions: Vec<crate::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
index 5e93837..d14c8d4 100644
--- a/src/models/update_transaction.rs
+++ b/src/models/update_transaction.rs
@@ -9,14 +9,11 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct UpdateTransaction {
- #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
- pub id: Option<String>,
+ #[serde(rename = "id")]
+ pub id: String,
#[serde(rename = "account_id")]
pub account_id: String,
/// The transaction date in ISO format (e.g. 2016-12-01). Future dates (scheduled transactions) are not permitted. Split transaction dates cannot be changed and if a different date is supplied it will be ignored.
@@ -25,7 +22,7 @@ pub struct UpdateTransaction {
/// The transaction amount in milliunits format. Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored.
#[serde(rename = "amount")]
pub amount: i64,
- /// The payee for the transaction
+ /// The payee for the transaction. To create a transfer between two accounts, use the account transfer payee pointing to the target account. Account transfer payees are specified as tranfer_payee_id on the account resource.
#[serde(rename = "payee_id", skip_serializing_if = "Option::is_none")]
pub payee_id: Option<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.
@@ -45,15 +42,15 @@ pub struct UpdateTransaction {
/// 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).
+ /// If specified, the new transaction will be assigned this import_id and considered \"imported\". We will also attempt to match this imported transaction to an existing \"user-entered\" transation on the same account, with the same amount, and with a date +/-10 days from the imported transaction date.<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 {
+ pub fn new(id: String, account_id: String, date: String, amount: i64) -> UpdateTransaction {
UpdateTransaction {
- id: None,
+ id: id,
account_id: account_id,
date: date,
amount: amount,
@@ -69,30 +66,4 @@ impl UpdateTransaction {
}
}
-/// The cleared status of the transaction
-#[derive(Debug, Serialize, Deserialize)]
-pub enum Cleared {
- #[serde(rename = "cleared")]
- Cleared,
- #[serde(rename = "uncleared")]
- Uncleared,
- #[serde(rename = "reconciled")]
- Reconciled,
-}
-/// The transaction flag
-#[derive(Debug, Serialize, Deserialize)]
-pub enum FlagColor {
- #[serde(rename = "red")]
- Red,
- #[serde(rename = "orange")]
- Orange,
- #[serde(rename = "yellow")]
- Yellow,
- #[serde(rename = "green")]
- Green,
- #[serde(rename = "blue")]
- Blue,
- #[serde(rename = "purple")]
- Purple,
-}
diff --git a/src/models/update_transactions_response.rs b/src/models/update_transaction_all_of.rs
index c56d2b3..774cc3f 100644
--- a/src/models/update_transactions_response.rs
+++ b/src/models/update_transaction_all_of.rs
@@ -9,20 +9,17 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
-pub struct UpdateTransactionsResponse {
- #[serde(rename = "data")]
- pub data: ::models::SaveTransactionsResponseData,
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
+pub struct UpdateTransactionAllOf {
+ #[serde(rename = "id")]
+ pub id: String,
}
-impl UpdateTransactionsResponse {
- pub fn new(data: ::models::SaveTransactionsResponseData) -> UpdateTransactionsResponse {
- UpdateTransactionsResponse {
- data: data,
+impl UpdateTransactionAllOf {
+ pub fn new(id: String) -> UpdateTransactionAllOf {
+ UpdateTransactionAllOf {
+ id: id,
}
}
}
diff --git a/src/models/update_transaction_wrapper.rs b/src/models/update_transaction_wrapper.rs
deleted file mode 100644
index 5c34fbb..0000000
--- a/src/models/update_transaction_wrapper.rs
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * YNAB API Endpoints
- *
- * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
- *
- * The version of the OpenAPI document: 1.0.0
- *
- * Generated by: https://openapi-generator.tech
- */
-
-
-#[allow(unused_imports)]
-use serde_json::Value;
-
-
-#[derive(Debug, Serialize, Deserialize)]
-pub struct UpdateTransactionWrapper {
- #[serde(rename = "transaction")]
- pub transaction: ::models::UpdateTransaction,
-}
-
-impl UpdateTransactionWrapper {
- pub fn new(transaction: ::models::UpdateTransaction) -> UpdateTransactionWrapper {
- UpdateTransactionWrapper {
- transaction: transaction,
- }
- }
-}
-
-
diff --git a/src/models/update_transactions_wrapper.rs b/src/models/update_transactions_wrapper.rs
index 810d054..fde9957 100644
--- a/src/models/update_transactions_wrapper.rs
+++ b/src/models/update_transactions_wrapper.rs
@@ -9,23 +9,17 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct UpdateTransactionsWrapper {
- #[serde(rename = "transaction", skip_serializing_if = "Option::is_none")]
- pub transaction: Option<::models::UpdateTransaction>,
- #[serde(rename = "transactions", skip_serializing_if = "Option::is_none")]
- pub transactions: Option<Vec<::models::UpdateTransaction>>,
+ #[serde(rename = "transactions")]
+ pub transactions: Vec<crate::models::UpdateTransaction>,
}
impl UpdateTransactionsWrapper {
- pub fn new() -> UpdateTransactionsWrapper {
+ pub fn new(transactions: Vec<crate::models::UpdateTransaction>) -> UpdateTransactionsWrapper {
UpdateTransactionsWrapper {
- transaction: None,
- transactions: None,
+ transactions: transactions,
}
}
}
diff --git a/src/models/user.rs b/src/models/user.rs
index 8143284..6ff89bb 100644
--- a/src/models/user.rs
+++ b/src/models/user.rs
@@ -9,11 +9,8 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct User {
#[serde(rename = "id")]
pub id: String,
diff --git a/src/models/user_response.rs b/src/models/user_response.rs
index e2427e0..cfa6be1 100644
--- a/src/models/user_response.rs
+++ b/src/models/user_response.rs
@@ -9,18 +9,15 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct UserResponse {
#[serde(rename = "data")]
- pub data: ::models::UserResponseData,
+ pub data: crate::models::UserResponseData,
}
impl UserResponse {
- pub fn new(data: ::models::UserResponseData) -> UserResponse {
+ pub fn new(data: crate::models::UserResponseData) -> UserResponse {
UserResponse {
data: data,
}
diff --git a/src/models/user_response_data.rs b/src/models/user_response_data.rs
index 9fc30f8..90c300f 100644
--- a/src/models/user_response_data.rs
+++ b/src/models/user_response_data.rs
@@ -9,18 +9,15 @@
*/
-#[allow(unused_imports)]
-use serde_json::Value;
-
-#[derive(Debug, Serialize, Deserialize)]
+#[derive(Debug, PartialEq, Serialize, Deserialize)]
pub struct UserResponseData {
#[serde(rename = "user")]
- pub user: ::models::User,
+ pub user: crate::models::User,
}
impl UserResponseData {
- pub fn new(user: ::models::User) -> UserResponseData {
+ pub fn new(user: crate::models::User) -> UserResponseData {
UserResponseData {
user: user,
}