1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
* Zernio API
*
* API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
*
* The version of the OpenAPI document: 1.0.1
* Contact: support@zernio.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// Lead : A single lead submission returned by the leads endpoint and the lead.received webhook.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Lead {
/// Meta `leadgen_id`.
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "createdTime", skip_serializing_if = "Option::is_none")]
pub created_time: Option<String>,
/// Meta ad ID that surfaced the form. Organic leads omit this.
#[serde(rename = "adId", skip_serializing_if = "Option::is_none")]
pub ad_id: Option<String>,
#[serde(rename = "formId", skip_serializing_if = "Option::is_none")]
pub form_id: Option<String>,
/// Flattened key→value map of answers (multi-value fields joined with \", \").
#[serde(rename = "fields", skip_serializing_if = "Option::is_none")]
pub fields: Option<std::collections::HashMap<String, String>>,
/// Raw `field_data` from Meta (one entry per question).
#[serde(rename = "fieldData", skip_serializing_if = "Option::is_none")]
pub field_data: Option<Vec<models::LeadFieldDataInner>>,
}
impl Lead {
/// A single lead submission returned by the leads endpoint and the lead.received webhook.
pub fn new() -> Lead {
Lead {
id: None,
created_time: None,
ad_id: None,
form_id: None,
fields: None,
field_data: None,
}
}
}