/*
* 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.115.1
* 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 CreatePhoneNumberKycLinkRequest {
#[serde(rename = "profileId")]
pub profile_id: String,
/// ISO 3166-1 alpha-2 country code (must be a regulated/KYC country).
#[serde(rename = "country")]
pub country: String,
/// Area code (NDC) the eventual number must be in. Hard constraint carried by the link; the end customer filling the form makes no area choice. Options come from GET /v1/phone-numbers/availability (areaOptions).
#[serde(rename = "areaCode", skip_serializing_if = "Option::is_none")]
pub area_code: Option<String>,
/// Language of the hosted page: its copy, the carrier requirement texts (translated once per country and cached), the pre-submit review notes and the status emails to the end customer. Omitted: the browser language of the end customer, falling back to English. The end customer can also switch with `?lang=` on the page.
#[serde(rename = "language", skip_serializing_if = "Option::is_none")]
pub language: Option<Language>,
#[serde(rename = "branding", skip_serializing_if = "Option::is_none")]
pub branding: Option<Box<models::CreatePhoneNumberKycLinkRequestBranding>>,
/// Where to send the end customer's browser after a successful submit. On completion Zernio appends `kyc=submitted` and `country=<ISO-2>` as query params. When omitted, the hosted page shows a built-in confirmation screen instead.
#[serde(rename = "redirect_url", skip_serializing_if = "Option::is_none")]
pub redirect_url: Option<String>,
}
impl CreatePhoneNumberKycLinkRequest {
pub fn new(profile_id: String, country: String) -> CreatePhoneNumberKycLinkRequest {
CreatePhoneNumberKycLinkRequest {
profile_id,
country,
area_code: None,
language: None,
branding: None,
redirect_url: None,
}
}
}
/// Language of the hosted page: its copy, the carrier requirement texts (translated once per country and cached), the pre-submit review notes and the status emails to the end customer. Omitted: the browser language of the end customer, falling back to English. The end customer can also switch with `?lang=` on the page.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Language {
#[serde(rename = "en")]
En,
#[serde(rename = "es")]
Es,
#[serde(rename = "pt-BR")]
PtBr,
}
impl Default for Language {
fn default() -> Language {
Self::En
}
}