1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-17 07:30:59 -05:00

[PM-21383] Use Stripe to get provider pricing for display when feature flag is on (#5842)

* Use ProviderPriceAdapter when getting provider subscription

* Update test
This commit is contained in:
Alex Morask
2025-05-21 08:10:34 -04:00
committed by GitHub
parent 3aa9812353
commit e994bf2117
7 changed files with 54 additions and 2 deletions

View File

@ -6,6 +6,7 @@ public record ConfiguredProviderPlan(
Guid Id,
Guid ProviderId,
Plan Plan,
decimal Price,
int SeatMinimum,
int PurchasedSeats,
int AssignedSeats);

View File

@ -150,6 +150,7 @@ public static class FeatureFlagKeys
public const string UseOrganizationWarningsService = "use-organization-warnings-service";
public const string PM20322_AllowTrialLength0 = "pm-20322-allow-trial-length-0";
public const string PM21092_SetNonUSBusinessUseToReverseCharge = "pm-21092-set-non-us-business-use-to-reverse-charge";
public const string PM21383_GetProviderPriceFromStripe = "pm-21383-get-provider-price-from-stripe";
/* Data Insights and Reporting Team */
public const string RiskInsightsCriticalApplication = "pm-14466-risk-insights-critical-application";

View File

@ -57,4 +57,5 @@ public interface IStripeAdapter
Task<SetupIntent> SetupIntentGet(string id, SetupIntentGetOptions options = null);
Task SetupIntentVerifyMicroDeposit(string id, SetupIntentVerifyMicrodepositsOptions options);
Task<List<Stripe.TestHelpers.TestClock>> TestClockListAsync();
Task<Price> PriceGetAsync(string id, PriceGetOptions options = null);
}

View File

@ -283,4 +283,7 @@ public class StripeAdapter : IStripeAdapter
}
return items;
}
public Task<Price> PriceGetAsync(string id, PriceGetOptions options = null)
=> _priceService.GetAsync(id, options);
}