/*
 * Zernio API
 *
 * API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
 *
 * The version of the OpenAPI document: 1.0.4
 * 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 SubmitWhatsAppNumberKycRequest {
    #[serde(rename = "profileId")]
    pub profile_id: String,
    #[serde(rename = "country")]
    pub country: String,
    /// Reuse a prior approved verification for this country (skips document/field collection; places the order immediately).
    #[serde(rename = "reuse", skip_serializing_if = "Option::is_none")]
    pub reuse: Option<bool>,
    /// End user's legal first name. Required when the country has an action/ID-verification (Onfido) requirement.
    #[serde(rename = "endUserFirstName", skip_serializing_if = "Option::is_none")]
    pub end_user_first_name: Option<String>,
    /// End user's legal last name. Same condition as endUserFirstName.
    #[serde(rename = "endUserLastName", skip_serializing_if = "Option::is_none")]
    pub end_user_last_name: Option<String>,
    /// requirementId → textual value
    #[serde(rename = "values", skip_serializing_if = "Option::is_none")]
    pub values: Option<std::collections::HashMap<String, String>>,
    #[serde(rename = "documents", skip_serializing_if = "Option::is_none")]
    pub documents: Option<Vec<models::SubmitWhatsAppNumberKycRequestDocumentsInner>>,
    #[serde(rename = "address", skip_serializing_if = "Option::is_none")]
    pub address: Option<Box<models::SubmitWhatsAppNumberKycRequestAddress>>,
}

impl SubmitWhatsAppNumberKycRequest {
    pub fn new(profile_id: String, country: String) -> SubmitWhatsAppNumberKycRequest {
        SubmitWhatsAppNumberKycRequest {
            profile_id,
            country,
            reuse: None,
            end_user_first_name: None,
            end_user_last_name: None,
            values: None,
            documents: None,
            address: None,
        }
    }
}
