Skip to main content

fattureincloud_rs/models/
email_data.rs

1/*
2 * Fatture in Cloud API v2 - API Reference
3 *
4 * Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 500.000 businesses in Italy.   The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol.
5 *
6 * The version of the OpenAPI document: 2.0.32
7 * Contact: info@fattureincloud.it
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12
13#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14pub struct EmailData {
15    /// Email recipient
16    #[serde(rename = "recipient_email", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
17    pub recipient_email: Option<Option<String>>,
18    #[serde(rename = "default_sender_email", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
19    pub default_sender_email: Option<Option<Box<models::EmailDataDefaultSenderEmail>>>,
20    /// List of all emails from which the document can be sent
21    #[serde(rename = "sender_emails_list", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
22    pub sender_emails_list: Option<Option<Vec<models::SenderEmail>>>,
23    /// Email cc [by default is the logged company email]
24    #[serde(rename = "cc_email", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
25    pub cc_email: Option<Option<String>>,
26    /// Email subject
27    #[serde(rename = "subject", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
28    pub subject: Option<Option<String>>,
29    /// Email body
30    #[serde(rename = "body", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
31    pub body: Option<Option<String>>,
32    /// Document exists if it is not a delivery note
33    #[serde(rename = "document_exists", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
34    pub document_exists: Option<Option<bool>>,
35    /// Document is a delivery note
36    #[serde(rename = "delivery_note_exists", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
37    pub delivery_note_exists: Option<Option<bool>>,
38    /// Document has attachment
39    #[serde(rename = "attachment_exists", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
40    pub attachment_exists: Option<Option<bool>>,
41    /// Document has accompanying invoice
42    #[serde(rename = "accompanying_invoice_exists", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
43    pub accompanying_invoice_exists: Option<Option<bool>>,
44    /// Attach document pdf
45    #[serde(rename = "default_attach_pdf", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
46    pub default_attach_pdf: Option<Option<bool>>,
47}
48
49impl EmailData {
50    pub fn new() -> EmailData {
51        EmailData {
52            recipient_email: None,
53            default_sender_email: None,
54            sender_emails_list: None,
55            cc_email: None,
56            subject: None,
57            body: None,
58            document_exists: None,
59            delivery_note_exists: None,
60            attachment_exists: None,
61            accompanying_invoice_exists: None,
62            default_attach_pdf: None,
63        }
64    }
65}
66