From faf9c8aa1e41df1889f8382e9c2183e2d5f85de1 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Fri, 9 Aug 2019 02:06:22 -0400 Subject: add openapi-generated api client --- .../src/models/save_transactions_response_data.rs | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 ynab-api/src/models/save_transactions_response_data.rs (limited to 'ynab-api/src/models/save_transactions_response_data.rs') diff --git a/ynab-api/src/models/save_transactions_response_data.rs b/ynab-api/src/models/save_transactions_response_data.rs new file mode 100644 index 0000000..0086874 --- /dev/null +++ b/ynab-api/src/models/save_transactions_response_data.rs @@ -0,0 +1,46 @@ +/* + * YNAB API Endpoints + * + * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com + * + * The version of the OpenAPI document: 1.0.0 + * + * Generated by: https://openapi-generator.tech + */ + + +#[allow(unused_imports)] +use serde_json::Value; + + +#[derive(Debug, Serialize, Deserialize)] +pub struct SaveTransactionsResponseData { + /// The transaction ids that were saved + #[serde(rename = "transaction_ids")] + pub transaction_ids: Vec, + #[serde(rename = "transaction", skip_serializing_if = "Option::is_none")] + pub transaction: Option<::models::TransactionDetail>, + /// If multiple transactions were specified, the transactions that were saved + #[serde(rename = "transactions", skip_serializing_if = "Option::is_none")] + pub transactions: Option>, + /// 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>, + /// The knowledge of the server + #[serde(rename = "server_knowledge")] + pub server_knowledge: i64, +} + +impl SaveTransactionsResponseData { + pub fn new(transaction_ids: Vec, server_knowledge: i64) -> SaveTransactionsResponseData { + SaveTransactionsResponseData { + transaction_ids: transaction_ids, + transaction: None, + transactions: None, + duplicate_import_ids: None, + server_knowledge: server_knowledge, + } + } +} + + -- cgit v1.2.3-54-g00ecf