fastcomments-sdk 3.0.1

Official FastComments Rust SDK (Typed API Client & Utilities)
Documentation
/*
 * fastcomments
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 0.0.0
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct BillingInfo {
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "address")]
    pub address: String,
    #[serde(rename = "city")]
    pub city: String,
    #[serde(rename = "state")]
    pub state: String,
    #[serde(rename = "zip")]
    pub zip: String,
    #[serde(rename = "country")]
    pub country: String,
    /// Currency for invoices.
    #[serde(rename = "currency", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub currency: Option<Option<String>>,
    /// Email for invoices.
    #[serde(rename = "email", skip_serializing_if = "Option::is_none")]
    pub email: Option<String>,
}

impl BillingInfo {
    pub fn new(name: String, address: String, city: String, state: String, zip: String, country: String) -> BillingInfo {
        BillingInfo {
            name,
            address,
            city,
            state,
            zip,
            country,
            currency: None,
            email: None,
        }
    }
}