/*
* 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). Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
*
* The version of the OpenAPI document: 1.104.0
* Contact: support@zernio.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// StartSmsRegistrationRequestTollFree : Required for toll_free.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct StartSmsRegistrationRequestTollFree {
#[serde(rename = "businessName")]
pub business_name: String,
#[serde(rename = "corporateWebsite")]
pub corporate_website: String,
#[serde(rename = "phoneNumbers")]
pub phone_numbers: Vec<String>,
#[serde(rename = "useCase")]
pub use_case: String,
#[serde(rename = "useCaseSummary")]
pub use_case_summary: String,
#[serde(rename = "productionMessageContent")]
pub production_message_content: String,
/// How recipients opt in to your messages.
#[serde(rename = "optInWorkflow")]
pub opt_in_workflow: String,
/// Screenshot URL(s) showing the opt-in flow (at least one).
#[serde(rename = "optInWorkflowImageUrls")]
pub opt_in_workflow_image_urls: Vec<String>,
/// Expected monthly message volume tier.
#[serde(rename = "messageVolume")]
pub message_volume: MessageVolume,
#[serde(rename = "additionalInformation")]
pub additional_information: String,
#[serde(rename = "businessAddr1")]
pub business_addr1: String,
#[serde(rename = "businessAddr2", skip_serializing_if = "Option::is_none")]
pub business_addr2: Option<String>,
#[serde(rename = "businessCity")]
pub business_city: String,
#[serde(rename = "businessState")]
pub business_state: String,
#[serde(rename = "businessZip")]
pub business_zip: String,
#[serde(rename = "businessContactFirstName")]
pub business_contact_first_name: String,
#[serde(rename = "businessContactLastName")]
pub business_contact_last_name: String,
#[serde(rename = "businessContactEmail")]
pub business_contact_email: String,
#[serde(rename = "businessContactPhone")]
pub business_contact_phone: String,
#[serde(rename = "businessRegistrationNumber")]
pub business_registration_number: String,
/// e.g. EIN (US), Companies House (UK), ABN (AU).
#[serde(rename = "businessRegistrationType")]
pub business_registration_type: String,
/// ISO 3166-1 alpha-2.
#[serde(rename = "businessRegistrationCountry")]
pub business_registration_country: String,
}
impl StartSmsRegistrationRequestTollFree {
/// Required for toll_free.
pub fn new(
business_name: String,
corporate_website: String,
phone_numbers: Vec<String>,
use_case: String,
use_case_summary: String,
production_message_content: String,
opt_in_workflow: String,
opt_in_workflow_image_urls: Vec<String>,
message_volume: MessageVolume,
additional_information: String,
business_addr1: String,
business_city: String,
business_state: String,
business_zip: String,
business_contact_first_name: String,
business_contact_last_name: String,
business_contact_email: String,
business_contact_phone: String,
business_registration_number: String,
business_registration_type: String,
business_registration_country: String,
) -> StartSmsRegistrationRequestTollFree {
StartSmsRegistrationRequestTollFree {
business_name,
corporate_website,
phone_numbers,
use_case,
use_case_summary,
production_message_content,
opt_in_workflow,
opt_in_workflow_image_urls,
message_volume,
additional_information,
business_addr1,
business_addr2: None,
business_city,
business_state,
business_zip,
business_contact_first_name,
business_contact_last_name,
business_contact_email,
business_contact_phone,
business_registration_number,
business_registration_type,
business_registration_country,
}
}
}
/// Expected monthly message volume tier.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum MessageVolume {
#[serde(rename = "10")]
Variant10,
#[serde(rename = "100")]
Variant100,
#[serde(rename = "1,000")]
Variant1Comma000,
#[serde(rename = "10,000")]
Variant10Comma000,
#[serde(rename = "100,000")]
Variant100Comma000,
#[serde(rename = "250,000")]
Variant250Comma000,
#[serde(rename = "500,000")]
Variant500Comma000,
#[serde(rename = "750,000")]
Variant750Comma000,
#[serde(rename = "1,000,000")]
Variant1Comma000Comma000,
#[serde(rename = "5,000,000")]
Variant5Comma000Comma000,
#[serde(rename = "10,000,000+")]
Variant10Comma000Comma000Plus,
}
impl Default for MessageVolume {
fn default() -> MessageVolume {
Self::Variant10
}
}