/*
* 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.34.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 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>,
#[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,
branding: None,
redirect_url: None,
}
}
}