use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct SubscriptionsTrialsResourceTrialSettings {
pub end_behavior: SubscriptionsTrialsResourceEndBehavior,
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct SubscriptionsTrialsResourceEndBehavior {
pub missing_payment_method: SubscriptionsTrialsResourceEndBehaviorMissingPaymentMethod,
}
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum SubscriptionsTrialsResourceEndBehaviorMissingPaymentMethod {
Cancel,
CreateInvoice,
Pause,
}
impl SubscriptionsTrialsResourceEndBehaviorMissingPaymentMethod {
pub fn as_str(self) -> &'static str {
match self {
SubscriptionsTrialsResourceEndBehaviorMissingPaymentMethod::Cancel => "cancel",
SubscriptionsTrialsResourceEndBehaviorMissingPaymentMethod::CreateInvoice => {
"create_invoice"
}
SubscriptionsTrialsResourceEndBehaviorMissingPaymentMethod::Pause => "pause",
}
}
}
impl AsRef<str> for SubscriptionsTrialsResourceEndBehaviorMissingPaymentMethod {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl std::fmt::Display for SubscriptionsTrialsResourceEndBehaviorMissingPaymentMethod {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for SubscriptionsTrialsResourceEndBehaviorMissingPaymentMethod {
fn default() -> Self {
Self::Cancel
}
}