mirror of
https://github.com/bitwarden/server.git
synced 2025-04-06 21:48:12 -05:00
Updated code style and PR feedback
This commit is contained in:
parent
a9a7003bfc
commit
a024b43cea
@ -338,9 +338,9 @@ namespace Bit.Core.Services
|
||||
|
||||
var subResponse = await subscriptionService.UpdateAsync(sub.Id, new SubscriptionUpdateOptions()
|
||||
{
|
||||
Items = new List<SubscriptionItemOptions>()
|
||||
Items = new List<SubscriptionItemOptions>
|
||||
{
|
||||
new SubscriptionItemOptions()
|
||||
new SubscriptionItemOptions
|
||||
{
|
||||
Id = seatItem?.Id,
|
||||
Plan = plan.StripeSeatPlanId,
|
||||
@ -361,21 +361,21 @@ namespace Bit.Core.Services
|
||||
try
|
||||
{
|
||||
paymentIntentClientSecret = await (_paymentService as StripePaymentService)
|
||||
.PayInvoiceAfterSubscriptionChangeAsync(organization, subResponse?.LatestInvoiceId);
|
||||
.PayInvoiceAfterSubscriptionChangeAsync(organization, subResponse.LatestInvoiceId);
|
||||
}
|
||||
catch
|
||||
{
|
||||
// Need to revert the subscription
|
||||
await subscriptionService.UpdateAsync(sub.Id, new SubscriptionUpdateOptions()
|
||||
await subscriptionService.UpdateAsync(sub.Id, new SubscriptionUpdateOptions
|
||||
{
|
||||
Items = new List<SubscriptionItemOptions>()
|
||||
Items = new List<SubscriptionItemOptions>
|
||||
{
|
||||
new SubscriptionItemOptions()
|
||||
new SubscriptionItemOptions
|
||||
{
|
||||
Id = seatItem?.Id,
|
||||
Plan = plan.StripeSeatPlanId,
|
||||
Quantity = organization.Seats,
|
||||
Deleted = (seatItem?.Id == null || organization.Seats == 0) ? true : (bool?)null
|
||||
Deleted = seatItem?.Id == null ? true : (bool?)null
|
||||
}
|
||||
},
|
||||
// This proration behavior prevents a false "credit" from
|
||||
|
@ -709,11 +709,11 @@ namespace Bit.Core.Services
|
||||
var prorationDate = DateTime.UtcNow;
|
||||
var storageItem = sub.Items?.FirstOrDefault(i => i.Plan.Id == storagePlanId);
|
||||
|
||||
var subResponse = await subscriptionService.UpdateAsync(sub.Id, new SubscriptionUpdateOptions()
|
||||
var subResponse = await subscriptionService.UpdateAsync(sub.Id, new SubscriptionUpdateOptions
|
||||
{
|
||||
Items = new List<SubscriptionItemOptions>()
|
||||
Items = new List<SubscriptionItemOptions>
|
||||
{
|
||||
new SubscriptionItemOptions()
|
||||
new SubscriptionItemOptions
|
||||
{
|
||||
Id = storageItem?.Id,
|
||||
Plan = storagePlanId,
|
||||
@ -739,11 +739,11 @@ namespace Bit.Core.Services
|
||||
catch
|
||||
{
|
||||
// Need to revert the subscription
|
||||
await subscriptionService.UpdateAsync(sub.Id, new SubscriptionUpdateOptions()
|
||||
await subscriptionService.UpdateAsync(sub.Id, new SubscriptionUpdateOptions
|
||||
{
|
||||
Items = new List<SubscriptionItemOptions>()
|
||||
Items = new List<SubscriptionItemOptions>
|
||||
{
|
||||
new SubscriptionItemOptions()
|
||||
new SubscriptionItemOptions
|
||||
{
|
||||
Id = storageItem?.Id,
|
||||
Plan = storagePlanId,
|
||||
|
Loading…
x
Reference in New Issue
Block a user