/*
 * 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 ValidateWhatsAppNumberKycAddressRequest {
    /// ISO 3166-1 alpha-2 country code.
    #[serde(rename = "country")]
    pub country: String,
    #[serde(rename = "street_address")]
    pub street_address: String,
    /// City / town.
    #[serde(rename = "locality")]
    pub locality: String,
    /// State / province / region. When omitted
    #[serde(
        rename = "administrative_area",
        skip_serializing_if = "Option::is_none"
    )]
    pub administrative_area: Option<String>,
    #[serde(rename = "postal_code")]
    pub postal_code: String,
}

impl ValidateWhatsAppNumberKycAddressRequest {
    pub fn new(
        country: String,
        street_address: String,
        locality: String,
        postal_code: String,
    ) -> ValidateWhatsAppNumberKycAddressRequest {
        ValidateWhatsAppNumberKycAddressRequest {
            country,
            street_address,
            locality,
            administrative_area: None,
            postal_code,
        }
    }
}
