1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 23:52:50 -05:00

[AC-2420] Fix customer discount ID and SM invite validation (#3966)

* Fix customer discount ID and SM update validation

* Replace constructor needed for autofixture
This commit is contained in:
Alex Morask
2024-04-18 11:11:37 -04:00
committed by GitHub
parent 49ed5af517
commit 9827ee5f6a
5 changed files with 17 additions and 25 deletions

View File

@ -43,20 +43,12 @@ public class SubscriptionResponseModel : ResponseModel
public DateTime? Expiration { get; set; }
}
public class BillingCustomerDiscount
public class BillingCustomerDiscount(SubscriptionInfo.BillingCustomerDiscount discount)
{
public BillingCustomerDiscount(SubscriptionInfo.BillingCustomerDiscount discount)
{
Id = discount.Id;
Active = discount.Active;
PercentOff = discount.PercentOff;
AppliesTo = discount.AppliesTo;
}
public string Id { get; }
public bool Active { get; }
public decimal? PercentOff { get; }
public List<string> AppliesTo { get; }
public string Id { get; } = discount.Id;
public bool Active { get; } = discount.Active;
public decimal? PercentOff { get; } = discount.PercentOff;
public List<string> AppliesTo { get; } = discount.AppliesTo;
}
public class BillingSubscription