/*
* Zernio API
*
* API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
*
* The version of the OpenAPI document: 1.13.0
* Contact: support@zernio.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// StartSmsRegistrationRequestBrand : Required for 10DLC. The legal entity behind the traffic (TCR brand).
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct StartSmsRegistrationRequestBrand {
#[serde(rename = "entityType")]
pub entity_type: EntityType,
#[serde(rename = "displayName")]
pub display_name: String,
/// Legal company name. Required for every entityType except SOLE_PROPRIETOR.
#[serde(rename = "companyName", skip_serializing_if = "Option::is_none")]
pub company_name: Option<String>,
/// Required for every entityType except SOLE_PROPRIETOR.
#[serde(rename = "ein", skip_serializing_if = "Option::is_none")]
pub ein: Option<String>,
/// Business contact phone. Required for every entityType except SOLE_PROPRIETOR.
#[serde(rename = "phone", skip_serializing_if = "Option::is_none")]
pub phone: Option<String>,
/// Required for SOLE_PROPRIETOR; the verification OTP is texted there (US/CA mobile).
#[serde(rename = "mobilePhone", skip_serializing_if = "Option::is_none")]
pub mobile_phone: Option<String>,
#[serde(rename = "street")]
pub street: String,
#[serde(rename = "city")]
pub city: String,
#[serde(rename = "state")]
pub state: String,
#[serde(rename = "postalCode")]
pub postal_code: String,
/// ISO 3166-1 alpha-2 country where the company is registered. Companies worldwide can register standard 10DLC (non-US companies use their local tax ID in `ein`; carrier vetting may take longer). SOLE_PROPRIETOR is US/CA only.
#[serde(rename = "country")]
pub country: String,
/// Brand contact email; defaults to your account email when omitted.
#[serde(rename = "email", skip_serializing_if = "Option::is_none")]
pub email: Option<String>,
/// The brand's website (sole proprietors may use a social profile such as LinkedIn or a business Facebook page). Carriers verify the brand against it; a bare domain is normalized to https://.
#[serde(rename = "website")]
pub website: String,
#[serde(rename = "vertical")]
pub vertical: Vertical,
#[serde(rename = "stockSymbol", skip_serializing_if = "Option::is_none")]
pub stock_symbol: Option<String>,
}
impl StartSmsRegistrationRequestBrand {
/// Required for 10DLC. The legal entity behind the traffic (TCR brand).
pub fn new(
entity_type: EntityType,
display_name: String,
street: String,
city: String,
state: String,
postal_code: String,
country: String,
website: String,
vertical: Vertical,
) -> StartSmsRegistrationRequestBrand {
StartSmsRegistrationRequestBrand {
entity_type,
display_name,
company_name: None,
ein: None,
phone: None,
mobile_phone: None,
street,
city,
state,
postal_code,
country,
email: None,
website,
vertical,
stock_symbol: None,
}
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum EntityType {
#[serde(rename = "PRIVATE_PROFIT")]
PrivateProfit,
#[serde(rename = "PUBLIC_PROFIT")]
PublicProfit,
#[serde(rename = "NON_PROFIT")]
NonProfit,
#[serde(rename = "GOVERNMENT")]
Government,
#[serde(rename = "SOLE_PROPRIETOR")]
SoleProprietor,
}
impl Default for EntityType {
fn default() -> EntityType {
Self::PrivateProfit
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Vertical {
#[serde(rename = "AGRICULTURE")]
Agriculture,
#[serde(rename = "COMMUNICATION")]
Communication,
#[serde(rename = "CONSTRUCTION")]
Construction,
#[serde(rename = "EDUCATION")]
Education,
#[serde(rename = "ENERGY")]
Energy,
#[serde(rename = "ENTERTAINMENT")]
Entertainment,
#[serde(rename = "FINANCIAL")]
Financial,
#[serde(rename = "GAMBLING")]
Gambling,
#[serde(rename = "GOVERNMENT")]
Government,
#[serde(rename = "HEALTHCARE")]
Healthcare,
#[serde(rename = "HOSPITALITY")]
Hospitality,
#[serde(rename = "HUMAN_RESOURCES")]
HumanResources,
#[serde(rename = "INSURANCE")]
Insurance,
#[serde(rename = "LEGAL")]
Legal,
#[serde(rename = "MANUFACTURING")]
Manufacturing,
#[serde(rename = "NGO")]
Ngo,
#[serde(rename = "POLITICAL")]
Political,
#[serde(rename = "POSTAL")]
Postal,
#[serde(rename = "PROFESSIONAL")]
Professional,
#[serde(rename = "REAL_ESTATE")]
RealEstate,
#[serde(rename = "RETAIL")]
Retail,
#[serde(rename = "TECHNOLOGY")]
Technology,
#[serde(rename = "TRANSPORTATION")]
Transportation,
}
impl Default for Vertical {
fn default() -> Vertical {
Self::Agriculture
}
}