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 CreateNewCustomer {
    /// When false, the most recently created customer object with the given email is used if exists. When true, a new customer object is always created False by default
    #[serde(rename = "create_new_customer", skip_serializing_if = "Option::is_none")]
    pub create_new_customer: Option<bool>,
    #[serde(rename = "email")]
    pub email: String,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "phone_number", skip_serializing_if = "Option::is_none")]
    pub phone_number: Option<String>,
}

impl CreateNewCustomer {
    pub fn new(email: String, name: String) -> CreateNewCustomer {
        CreateNewCustomer {
            create_new_customer: None,
            email,
            name,
            phone_number: None,
        }
    }
}