aboutsummaryrefslogtreecommitdiffstats
path: root/src/models/save_transactions_response_data.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/models/save_transactions_response_data.rs')
-rw-r--r--src/models/save_transactions_response_data.rs46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/models/save_transactions_response_data.rs b/src/models/save_transactions_response_data.rs
new file mode 100644
index 0000000..0086874
--- /dev/null
+++ b/src/models/save_transactions_response_data.rs
@@ -0,0 +1,46 @@
+/*
+ * YNAB API Endpoints
+ *
+ * Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudget.com
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * Generated by: https://openapi-generator.tech
+ */
+
+
+#[allow(unused_imports)]
+use serde_json::Value;
+
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct SaveTransactionsResponseData {
+ /// The transaction ids that were saved
+ #[serde(rename = "transaction_ids")]
+ pub transaction_ids: Vec<String>,
+ #[serde(rename = "transaction", skip_serializing_if = "Option::is_none")]
+ pub transaction: Option<::models::TransactionDetail>,
+ /// If multiple transactions were specified, the transactions that were saved
+ #[serde(rename = "transactions", skip_serializing_if = "Option::is_none")]
+ pub transactions: Option<Vec<::models::TransactionDetail>>,
+ /// If multiple transactions were specified, a list of import_ids that were not created because of an existing import_id found on the same account
+ #[serde(rename = "duplicate_import_ids", skip_serializing_if = "Option::is_none")]
+ pub duplicate_import_ids: Option<Vec<String>>,
+ /// The knowledge of the server
+ #[serde(rename = "server_knowledge")]
+ pub server_knowledge: i64,
+}
+
+impl SaveTransactionsResponseData {
+ pub fn new(transaction_ids: Vec<String>, server_knowledge: i64) -> SaveTransactionsResponseData {
+ SaveTransactionsResponseData {
+ transaction_ids: transaction_ids,
+ transaction: None,
+ transactions: None,
+ duplicate_import_ids: None,
+ server_knowledge: server_knowledge,
+ }
+ }
+}
+
+