dodopayments_rust 2.2.2

Rust SDK for Dodo Payments API
Documentation
/*
 * public
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.87.0
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct BillingAddress {
    /// City name
    #[serde(rename = "city", skip_serializing_if = "Option::is_none")]
    pub city: Option<String>,
    /// Two-letter ISO country code (ISO 3166-1 alpha-2)
    #[serde(rename = "country")]
    pub country: models::CountryCodeAlpha2,
    /// State or province name
    #[serde(rename = "state", skip_serializing_if = "Option::is_none")]
    pub state: Option<String>,
    /// Street address including house number and unit/apartment if applicable
    #[serde(rename = "street", skip_serializing_if = "Option::is_none")]
    pub street: Option<String>,
    /// Postal code or ZIP code
    #[serde(rename = "zipcode", skip_serializing_if = "Option::is_none")]
    pub zipcode: Option<String>,
}

impl BillingAddress {
    pub fn new(country: models::CountryCodeAlpha2) -> BillingAddress {
        BillingAddress {
            city: None,
            country,
            state: None,
            street: None,
            zipcode: None,
        }
    }
}