mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 15:42:48 -05:00
[AC-1843] Automate PM discount for SM Trial (#3661)
* Added appliesTo to customer discount. Added productId to subscription item * Added IsFromSecretsManagerTrial flag to add discount for SM trials * Fixed broken tests --------- Co-authored-by: Alex Morask <amorask@bitwarden.com>
This commit is contained in:
@ -50,11 +50,13 @@ public class BillingCustomerDiscount
|
||||
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 class BillingSubscription
|
||||
@ -89,6 +91,7 @@ public class BillingSubscription
|
||||
{
|
||||
public BillingSubscriptionItem(SubscriptionInfo.BillingSubscription.BillingSubscriptionItem item)
|
||||
{
|
||||
ProductId = item.ProductId;
|
||||
Name = item.Name;
|
||||
Amount = item.Amount;
|
||||
Interval = item.Interval;
|
||||
@ -97,6 +100,7 @@ public class BillingSubscription
|
||||
AddonSubscriptionItem = item.AddonSubscriptionItem;
|
||||
}
|
||||
|
||||
public string ProductId { get; set; }
|
||||
public string Name { get; set; }
|
||||
public decimal Amount { get; set; }
|
||||
public int Quantity { get; set; }
|
||||
|
Reference in New Issue
Block a user