autogen-stedi 0.3.2

Auto-generated, strongly-typed Rust client for the Stedi APIs
Documentation
/*
 * Stedi Manager
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 2024-04-01
 * Contact: healthcare@stedi.com
 * Generated by: https://openapi-generator.tech
 */

use crate::manager::models;
use serde::{Deserialize, Serialize};

/// RequestDependentAddress : Address information for the dependent. When providing address information, we recommend including `state` for member identification in addition to the required `address1` and `city` properties.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct RequestDependentAddress {
    /// The first line of the address.
    #[serde(rename = "address1")]
    pub address1: String,
    /// The second line of the address.
    #[serde(rename = "address2", skip_serializing_if = "Option::is_none")]
    pub address2: Option<String>,
    /// The city.
    #[serde(rename = "city")]
    pub city: String,
    /// The two-letter country code from [Part 1 of ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
    #[serde(rename = "countryCode", skip_serializing_if = "Option::is_none")]
    pub country_code: Option<String>,
    /// The country subdivision code from [Part 2 of ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-2).
    #[serde(rename = "countrySubDivisionCode", skip_serializing_if = "Option::is_none")]
    pub country_sub_division_code: Option<String>,
    /// The United States or Canadian postal code, excluding punctuation and blanks.
    #[serde(rename = "postalCode", skip_serializing_if = "Option::is_none")]
    pub postal_code: Option<String>,
    /// The state or province code.
    #[serde(rename = "state", skip_serializing_if = "Option::is_none")]
    pub state: Option<models::RequestStateOrProvinceCode>,
}

impl RequestDependentAddress {
    /// Address information for the dependent. When providing address information, we recommend including `state` for member identification in addition to the required `address1` and `city` properties.
    pub fn new(address1: String, city: String) -> RequestDependentAddress {
        RequestDependentAddress {
            address1,
            address2: None,
            city,
            country_code: None,
            country_sub_division_code: None,
            postal_code: None,
            state: None,
        }
    }
}