mirror of
https://github.com/bitwarden/server.git
synced 2025-07-01 16:12:49 -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:
@ -14,16 +14,16 @@ public class SubscriptionInfo
|
||||
|
||||
public BillingCustomerDiscount(Discount discount)
|
||||
{
|
||||
Id = discount.Id;
|
||||
Active = discount.Start != null && discount.End == null;
|
||||
Id = discount.Coupon?.Id;
|
||||
Active = discount.End == null;
|
||||
PercentOff = discount.Coupon?.PercentOff;
|
||||
AppliesTo = discount.Coupon?.AppliesTo?.Products ?? new List<string>();
|
||||
AppliesTo = discount.Coupon?.AppliesTo?.Products ?? [];
|
||||
}
|
||||
|
||||
public string Id { get; }
|
||||
public bool Active { get; }
|
||||
public decimal? PercentOff { get; }
|
||||
public List<string> AppliesTo { get; }
|
||||
public string Id { get; set; }
|
||||
public bool Active { get; set; }
|
||||
public decimal? PercentOff { get; set; }
|
||||
public List<string> AppliesTo { get; set; }
|
||||
}
|
||||
|
||||
public class BillingSubscription
|
||||
|
Reference in New Issue
Block a user