mirror of
https://github.com/bitwarden/server.git
synced 2024-11-27 13:05:23 +01:00
[PM-14456] Return provider type when getting provider's subscription (#4972)
This commit is contained in:
parent
05356248eb
commit
9beeebaac5
@ -93,7 +93,8 @@ public class ProviderBillingController(
|
|||||||
subscription,
|
subscription,
|
||||||
providerPlans,
|
providerPlans,
|
||||||
taxInformation,
|
taxInformation,
|
||||||
subscriptionSuspension);
|
subscriptionSuspension,
|
||||||
|
provider);
|
||||||
|
|
||||||
return TypedResults.Ok(response);
|
return TypedResults.Ok(response);
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
using Bit.Core.Billing.Entities;
|
using Bit.Core.AdminConsole.Entities.Provider;
|
||||||
|
using Bit.Core.AdminConsole.Enums.Provider;
|
||||||
|
using Bit.Core.Billing.Entities;
|
||||||
using Bit.Core.Billing.Enums;
|
using Bit.Core.Billing.Enums;
|
||||||
using Bit.Core.Billing.Models;
|
using Bit.Core.Billing.Models;
|
||||||
using Bit.Core.Utilities;
|
using Bit.Core.Utilities;
|
||||||
@ -15,7 +17,8 @@ public record ProviderSubscriptionResponse(
|
|||||||
decimal AccountCredit,
|
decimal AccountCredit,
|
||||||
TaxInformation TaxInformation,
|
TaxInformation TaxInformation,
|
||||||
DateTime? CancelAt,
|
DateTime? CancelAt,
|
||||||
SubscriptionSuspension Suspension)
|
SubscriptionSuspension Suspension,
|
||||||
|
ProviderType ProviderType)
|
||||||
{
|
{
|
||||||
private const string _annualCadence = "Annual";
|
private const string _annualCadence = "Annual";
|
||||||
private const string _monthlyCadence = "Monthly";
|
private const string _monthlyCadence = "Monthly";
|
||||||
@ -24,7 +27,8 @@ public record ProviderSubscriptionResponse(
|
|||||||
Subscription subscription,
|
Subscription subscription,
|
||||||
ICollection<ProviderPlan> providerPlans,
|
ICollection<ProviderPlan> providerPlans,
|
||||||
TaxInformation taxInformation,
|
TaxInformation taxInformation,
|
||||||
SubscriptionSuspension subscriptionSuspension)
|
SubscriptionSuspension subscriptionSuspension,
|
||||||
|
Provider provider)
|
||||||
{
|
{
|
||||||
var providerPlanResponses = providerPlans
|
var providerPlanResponses = providerPlans
|
||||||
.Where(providerPlan => providerPlan.IsConfigured())
|
.Where(providerPlan => providerPlan.IsConfigured())
|
||||||
@ -56,7 +60,8 @@ public record ProviderSubscriptionResponse(
|
|||||||
accountCredit,
|
accountCredit,
|
||||||
taxInformation,
|
taxInformation,
|
||||||
subscription.CancelAt,
|
subscription.CancelAt,
|
||||||
subscriptionSuspension);
|
subscriptionSuspension,
|
||||||
|
provider.Type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user