mirror of
https://github.com/bitwarden/server.git
synced 2025-07-05 01:52:49 -05:00
[PM-3892] Implement dollar threshold for all subscriptions (#3283)
* Initial commit * Fix the failing text * Fix the unpaid invoice issue * fix the unpaid invoice issue * Changes for the threshold amount * remove the billing threshold * Add some comments to the old method * Fixing issues on secret manager test * import missing package * Resolve pr comments * Refactor PreviewUpcomingInvoiceAndPayAsync method * Resolve some pr comments * Resolving the comment around constant * Resolve pr comment * Add new class * Resolve pr comments * Change the prorateThreshold from 5 to 500 dollars * Fix the failing test * Fix the server returns a 500 error with the banner
This commit is contained in:
@ -44,7 +44,7 @@ public class SecretsManagerSubscribeUpdate : SubscriptionUpdate
|
||||
{
|
||||
updatedItems.Add(new SubscriptionItemOptions
|
||||
{
|
||||
Price = _plan.SecretsManager.StripeSeatPlanId,
|
||||
Plan = _plan.SecretsManager.StripeSeatPlanId,
|
||||
Quantity = _additionalSeats
|
||||
});
|
||||
}
|
||||
@ -53,7 +53,7 @@ public class SecretsManagerSubscribeUpdate : SubscriptionUpdate
|
||||
{
|
||||
updatedItems.Add(new SubscriptionItemOptions
|
||||
{
|
||||
Price = _plan.SecretsManager.StripeServiceAccountPlanId,
|
||||
Plan = _plan.SecretsManager.StripeServiceAccountPlanId,
|
||||
Quantity = _additionalServiceAccounts
|
||||
});
|
||||
}
|
||||
@ -63,14 +63,14 @@ public class SecretsManagerSubscribeUpdate : SubscriptionUpdate
|
||||
{
|
||||
updatedItems.Add(new SubscriptionItemOptions
|
||||
{
|
||||
Price = _plan.SecretsManager.StripeSeatPlanId,
|
||||
Plan = _plan.SecretsManager.StripeSeatPlanId,
|
||||
Quantity = _previousSeats,
|
||||
Deleted = _previousSeats == 0 ? true : (bool?)null,
|
||||
});
|
||||
|
||||
updatedItems.Add(new SubscriptionItemOptions
|
||||
{
|
||||
Price = _plan.SecretsManager.StripeServiceAccountPlanId,
|
||||
Plan = _plan.SecretsManager.StripeServiceAccountPlanId,
|
||||
Quantity = _previousServiceAccounts,
|
||||
Deleted = _previousServiceAccounts == 0 ? true : (bool?)null,
|
||||
});
|
||||
|
Reference in New Issue
Block a user