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/accounts_response_data.rs | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/models/accounts_response_data.rs (limited to 'src/models/accounts_response_data.rs') diff --git a/src/models/accounts_response_data.rs b/src/models/accounts_response_data.rs new file mode 100644 index 0000000..1324953 --- /dev/null +++ b/src/models/accounts_response_data.rs @@ -0,0 +1,34 @@ +/* + * YNAB API Endpoints + * + * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct AccountsResponseData { + #[serde(rename = "accounts")] + pub accounts: Vec<::models::Account>, + /// The knowledge of the server + #[serde(rename = "server_knowledge")] + pub server_knowledge: i64, +} + +impl AccountsResponseData { + pub fn new(accounts: Vec<::models::Account>, server_knowledge: i64) -> AccountsResponseData { + AccountsResponseData { + accounts: accounts, + server_knowledge: server_knowledge, + } + } +} + + -- cgit v1.2.3-54-g00ecf