From aa52e632b866b51d455787a96bcd2f5a63b7ac89 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 19 Aug 2019 00:19:38 -0400 Subject: move ynab-api to its own repository --- src/models/budget_detail.rs | 81 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 src/models/budget_detail.rs (limited to 'src/models/budget_detail.rs') diff --git a/src/models/budget_detail.rs b/src/models/budget_detail.rs new file mode 100644 index 0000000..8553aad --- /dev/null +++ b/src/models/budget_detail.rs @@ -0,0 +1,81 @@ +/* + * YNAB API Endpoints + * + * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct BudgetDetail { + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "name")] + pub name: String, + /// The last time any changes were made to the budget from either a web or mobile client + #[serde(rename = "last_modified_on", skip_serializing_if = "Option::is_none")] + pub last_modified_on: Option, + /// The earliest budget month + #[serde(rename = "first_month", skip_serializing_if = "Option::is_none")] + pub first_month: Option, + /// The latest budget month + #[serde(rename = "last_month", skip_serializing_if = "Option::is_none")] + pub last_month: Option, + #[serde(rename = "date_format", skip_serializing_if = "Option::is_none")] + pub date_format: Option<::models::DateFormat>, + #[serde(rename = "currency_format", skip_serializing_if = "Option::is_none")] + pub currency_format: Option<::models::CurrencyFormat>, + #[serde(rename = "accounts", skip_serializing_if = "Option::is_none")] + pub accounts: Option>, + #[serde(rename = "payees", skip_serializing_if = "Option::is_none")] + pub payees: Option>, + #[serde(rename = "payee_locations", skip_serializing_if = "Option::is_none")] + pub payee_locations: Option>, + #[serde(rename = "category_groups", skip_serializing_if = "Option::is_none")] + pub category_groups: Option>, + #[serde(rename = "categories", skip_serializing_if = "Option::is_none")] + pub categories: Option>, + #[serde(rename = "months", skip_serializing_if = "Option::is_none")] + pub months: Option>, + #[serde(rename = "transactions", skip_serializing_if = "Option::is_none")] + pub transactions: Option>, + #[serde(rename = "subtransactions", skip_serializing_if = "Option::is_none")] + pub subtransactions: Option>, + #[serde(rename = "scheduled_transactions", skip_serializing_if = "Option::is_none")] + pub scheduled_transactions: Option>, + #[serde(rename = "scheduled_subtransactions", skip_serializing_if = "Option::is_none")] + pub scheduled_subtransactions: Option>, +} + +impl BudgetDetail { + pub fn new(id: String, name: String) -> BudgetDetail { + BudgetDetail { + id: id, + name: name, + last_modified_on: None, + first_month: None, + last_month: None, + date_format: None, + currency_format: None, + accounts: None, + payees: None, + payee_locations: None, + category_groups: None, + categories: None, + months: None, + transactions: None, + subtransactions: None, + scheduled_transactions: None, + scheduled_subtransactions: None, + } + } +} + + -- cgit v1.2.3-54-g00ecf