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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
/*
* 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.4
* Contact: support@zernio.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// StartSmsRegistrationRequestCampaign : Required for 10DLC. What you'll send and how recipients opt in/out. The opt-in/opt-out/help auto-responses (`optinMessage`, `optoutMessage`, `helpMessage`) are optional: when omitted, a compliant, brand-named template with the carrier-required disclosures is generated for you. If you do send them, they must name the registered brand and carry the disclosures — submissions that don't are rewritten to the compliant template before the campaign is filed.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct StartSmsRegistrationRequestCampaign {
#[serde(rename = "usecase")]
pub usecase: String,
/// The concrete kinds of messages a MIXED campaign sends (the carrier registry requires 2-5, and reviewers match them against the sample messages). Omitted: a default pair is applied for MIXED.
#[serde(rename = "subUsecases", skip_serializing_if = "Option::is_none")]
pub sub_usecases: Option<Vec<SubUsecases>>,
#[serde(rename = "description")]
pub description: String,
/// How a recipient ends up receiving your messages (the opt-in flow). Include a link to the page or form where they opt in — carrier reviewers reject campaigns whose consent they can't verify.
#[serde(rename = "messageFlow")]
pub message_flow: String,
#[serde(rename = "sample1")]
pub sample1: String,
/// Second example message; carriers require two distinct samples, so it must differ from sample1.
#[serde(rename = "sample2")]
pub sample2: String,
#[serde(rename = "helpMessage", skip_serializing_if = "Option::is_none")]
pub help_message: Option<String>,
#[serde(rename = "optinKeywords")]
pub optin_keywords: String,
#[serde(rename = "optinMessage", skip_serializing_if = "Option::is_none")]
pub optin_message: Option<String>,
#[serde(rename = "optoutKeywords")]
pub optout_keywords: String,
#[serde(rename = "optoutMessage", skip_serializing_if = "Option::is_none")]
pub optout_message: Option<String>,
#[serde(rename = "helpKeywords")]
pub help_keywords: String,
/// Whether messages carry links. Auto-derived from the samples when omitted, so the declaration matches what the reviewer reads.
#[serde(rename = "embeddedLink", skip_serializing_if = "Option::is_none")]
pub embedded_link: Option<bool>,
/// Whether messages carry phone numbers. Auto-derived from the samples when omitted.
#[serde(rename = "embeddedPhone", skip_serializing_if = "Option::is_none")]
pub embedded_phone: Option<bool>,
#[serde(rename = "numberPool", skip_serializing_if = "Option::is_none")]
pub number_pool: Option<bool>,
#[serde(rename = "ageGated", skip_serializing_if = "Option::is_none")]
pub age_gated: Option<bool>,
#[serde(rename = "directLending", skip_serializing_if = "Option::is_none")]
pub direct_lending: Option<bool>,
/// Link to your privacy policy. Recommended: reviewers check that it says mobile information is not sold or shared with third parties for promotional purposes. A bare domain is normalized to https://.
#[serde(rename = "privacyPolicyLink", skip_serializing_if = "Option::is_none")]
pub privacy_policy_link: Option<String>,
/// Link to your terms & conditions. A bare domain is normalized to https://.
#[serde(
rename = "termsAndConditionsLink",
skip_serializing_if = "Option::is_none"
)]
pub terms_and_conditions_link: Option<String>,
}
impl StartSmsRegistrationRequestCampaign {
/// Required for 10DLC. What you'll send and how recipients opt in/out. The opt-in/opt-out/help auto-responses (`optinMessage`, `optoutMessage`, `helpMessage`) are optional: when omitted, a compliant, brand-named template with the carrier-required disclosures is generated for you. If you do send them, they must name the registered brand and carry the disclosures — submissions that don't are rewritten to the compliant template before the campaign is filed.
pub fn new(
usecase: String,
description: String,
message_flow: String,
sample1: String,
sample2: String,
optin_keywords: String,
optout_keywords: String,
help_keywords: String,
) -> StartSmsRegistrationRequestCampaign {
StartSmsRegistrationRequestCampaign {
usecase,
sub_usecases: None,
description,
message_flow,
sample1,
sample2,
help_message: None,
optin_keywords,
optin_message: None,
optout_keywords,
optout_message: None,
help_keywords,
embedded_link: None,
embedded_phone: None,
number_pool: None,
age_gated: None,
direct_lending: None,
privacy_policy_link: None,
terms_and_conditions_link: None,
}
}
}
/// The concrete kinds of messages a MIXED campaign sends (the carrier registry requires 2-5, and reviewers match them against the sample messages). Omitted: a default pair is applied for MIXED.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum SubUsecases {
#[serde(rename = "2FA")]
Variant2Fa,
#[serde(rename = "ACCOUNT_NOTIFICATION")]
AccountNotification,
#[serde(rename = "CUSTOMER_CARE")]
CustomerCare,
#[serde(rename = "DELIVERY_NOTIFICATION")]
DeliveryNotification,
#[serde(rename = "FRAUD_ALERT")]
FraudAlert,
#[serde(rename = "HIGHER_EDUCATION")]
HigherEducation,
#[serde(rename = "MARKETING")]
Marketing,
#[serde(rename = "POLLING_VOTING")]
PollingVoting,
#[serde(rename = "PUBLIC_SERVICE_ANNOUNCEMENT")]
PublicServiceAnnouncement,
#[serde(rename = "SECURITY_ALERT")]
SecurityAlert,
}
impl Default for SubUsecases {
fn default() -> SubUsecases {
Self::Variant2Fa
}
}