use serde::{Serialize, Deserialize};
///
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
pub struct EphemeralKey {
///Time at which the object was created. Measured in seconds since the Unix epoch.
pub created: i64,
///Time at which the key will expire. Measured in seconds since the Unix epoch.
pub expires: i64,
///Unique identifier for the object.
pub id: String,
///Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
pub livemode: bool,
///String representing the object's type. Objects of the same type share the same value.
pub object: String,
///The key's secret. You can use this value to make authorized requests to the Stripe API.
#[serde(skip_serializing_if = "Option::is_none")]
pub secret: Option<String>,
}
impl std::fmt::Display for EphemeralKey {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
write!(f, "{}", serde_json::to_string(self).unwrap())
}
}