From 6655058a476adc6551643a947308f13e8ba320d3 Mon Sep 17 00:00:00 2001 From: Alexander Lyon Date: Wed, 10 Jan 2024 12:41:47 +0000 Subject: [PATCH] fix: add plan prefix to PriceId --- src/ids.rs | 2 +- .../subscriptions_trials_resource_trial_settings.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ids.rs b/src/ids.rs index d7a974aa6..effcbcd22 100644 --- a/src/ids.rs +++ b/src/ids.rs @@ -555,7 +555,7 @@ def_id!( def_id!(PersonId, "person_"); def_id!(PlanId: String); // N.B. A plan id can be user-provided so can be any arbitrary string def_id!(PlatformTaxFeeId, "ptf"); -def_id!(PriceId, "price_"); +def_id!(PriceId, "price_" | "plan_"); // see #470 def_id!(ProductId: String); // N.B. A product id can be user-provided so can be any arbitrary string def_id!(PromotionCodeId, "promo_"); def_id!(QuoteId, "qt_"); diff --git a/src/resources/generated/subscriptions_trials_resource_trial_settings.rs b/src/resources/generated/subscriptions_trials_resource_trial_settings.rs index fc847865e..026391f40 100644 --- a/src/resources/generated/subscriptions_trials_resource_trial_settings.rs +++ b/src/resources/generated/subscriptions_trials_resource_trial_settings.rs @@ -7,13 +7,11 @@ use serde::{Deserialize, Serialize}; /// The resource representing a Stripe "SubscriptionsTrialsResourceTrialSettings". #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionsTrialsResourceTrialSettings { - pub end_behavior: SubscriptionsTrialsResourceEndBehavior, } #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct SubscriptionsTrialsResourceEndBehavior { - /// Indicates how the subscription should change when the trial ends if the user did not provide a payment method. pub missing_payment_method: SubscriptionsTrialsResourceEndBehaviorMissingPaymentMethod, } @@ -31,7 +29,9 @@ impl SubscriptionsTrialsResourceEndBehaviorMissingPaymentMethod { pub fn as_str(self) -> &'static str { match self { SubscriptionsTrialsResourceEndBehaviorMissingPaymentMethod::Cancel => "cancel", - SubscriptionsTrialsResourceEndBehaviorMissingPaymentMethod::CreateInvoice => "create_invoice", + SubscriptionsTrialsResourceEndBehaviorMissingPaymentMethod::CreateInvoice => { + "create_invoice" + } SubscriptionsTrialsResourceEndBehaviorMissingPaymentMethod::Pause => "pause", } }