1
0
mirror of https://github.com/bitwarden/server.git synced 2025-05-18 01:55:37 -05:00

Set BU trial length to 4 (#5824)

This commit is contained in:
Alex Morask 2025-05-16 09:00:40 -04:00 committed by GitHub
parent 3bf4f11c3a
commit d72d721684
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -694,6 +694,13 @@ public class ProviderBillingService(
customer.Metadata.ContainsKey(BraintreeCustomerIdKey) ||
setupIntent.IsUnverifiedBankAccount());
int? trialPeriodDays = provider.Type switch
{
ProviderType.Msp when usePaymentMethod => 14,
ProviderType.BusinessUnit when usePaymentMethod => 4,
_ => null
};
var subscriptionCreateOptions = new SubscriptionCreateOptions
{
CollectionMethod = usePaymentMethod ?
@ -707,7 +714,7 @@ public class ProviderBillingService(
},
OffSession = true,
ProrationBehavior = StripeConstants.ProrationBehavior.CreateProrations,
TrialPeriodDays = usePaymentMethod ? 14 : null
TrialPeriodDays = trialPeriodDays
};
if (featureService.IsEnabled(FeatureFlagKeys.PM19147_AutomaticTaxImprovements))