/*
* 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};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetPhoneNumber200ResponsePhoneNumber {
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "phoneNumber", skip_serializing_if = "Option::is_none")]
pub phone_number: Option<String>,
#[serde(rename = "status", skip_serializing_if = "Option::is_none")]
pub status: Option<Status>,
#[serde(rename = "country", skip_serializing_if = "Option::is_none")]
pub country: Option<String>,
#[serde(rename = "metaPreverifiedId", skip_serializing_if = "Option::is_none")]
pub meta_preverified_id: Option<String>,
#[serde(
rename = "metaVerificationStatus",
skip_serializing_if = "Option::is_none"
)]
pub meta_verification_status: Option<String>,
/// For a regulated number with an Onfido ID step: the link to forward to the end user. Appears once the order is placed; null otherwise.
#[serde(
rename = "onfidoVerificationUrl",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub onfido_verification_url: Option<Option<String>>,
#[serde(
rename = "endUserFirstName",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub end_user_first_name: Option<Option<String>>,
#[serde(
rename = "endUserLastName",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub end_user_last_name: Option<Option<String>>,
/// Reviewer rejection reason when status is regulatory_declined.
#[serde(
rename = "regulatoryDeclineReason",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub regulatory_decline_reason: Option<Option<String>>,
#[serde(rename = "provisionedAt", skip_serializing_if = "Option::is_none")]
pub provisioned_at: Option<String>,
/// SIP trunk the number is attached to; null when not trunked. While attached, enabling Calls or WhatsApp calling, requesting WhatsApp verification, and releasing the number all return 409.
#[serde(
rename = "sipTrunkId",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub sip_trunk_id: Option<Option<String>>,
}
impl GetPhoneNumber200ResponsePhoneNumber {
pub fn new() -> GetPhoneNumber200ResponsePhoneNumber {
GetPhoneNumber200ResponsePhoneNumber {
id: None,
phone_number: None,
status: None,
country: None,
meta_preverified_id: None,
meta_verification_status: None,
onfido_verification_url: None,
end_user_first_name: None,
end_user_last_name: None,
regulatory_decline_reason: None,
provisioned_at: None,
sip_trunk_id: None,
}
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
#[serde(rename = "pending_payment")]
PendingPayment,
#[serde(rename = "pending_regulatory")]
PendingRegulatory,
#[serde(rename = "regulatory_declined")]
RegulatoryDeclined,
#[serde(rename = "provisioning")]
Provisioning,
#[serde(rename = "verifying")]
Verifying,
#[serde(rename = "active")]
Active,
#[serde(rename = "suspended")]
Suspended,
#[serde(rename = "releasing")]
Releasing,
#[serde(rename = "released")]
Released,
}
impl Default for Status {
fn default() -> Status {
Self::PendingPayment
}
}