ynab_api_async_fork/models/
save_transactions_response_data.rs

1/*
2 * YNAB API Endpoints
3 *
4 * 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.ynab.com
5 *
6 * The version of the OpenAPI document: 1.72.1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12
13
14#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15pub struct SaveTransactionsResponseData {
16    /// The transaction ids that were saved
17    #[serde(rename = "transaction_ids")]
18    pub transaction_ids: Vec<String>,
19    #[serde(rename = "transaction", skip_serializing_if = "Option::is_none")]
20    pub transaction: Option<crate::models::TransactionDetail>,
21    /// If multiple transactions were specified, the transactions that were saved
22    #[serde(rename = "transactions", skip_serializing_if = "Option::is_none")]
23    pub transactions: Option<Vec<crate::models::TransactionDetail>>,
24    /// 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
25    #[serde(rename = "duplicate_import_ids", skip_serializing_if = "Option::is_none")]
26    pub duplicate_import_ids: Option<Vec<String>>,
27    /// The knowledge of the server
28    #[serde(rename = "server_knowledge")]
29    pub server_knowledge: i64,
30}
31
32impl SaveTransactionsResponseData {
33    pub fn new(transaction_ids: Vec<String>, server_knowledge: i64) -> SaveTransactionsResponseData {
34        SaveTransactionsResponseData {
35            transaction_ids,
36            transaction: None,
37            transactions: None,
38            duplicate_import_ids: None,
39            server_knowledge,
40        }
41    }
42}
43
44