mirror of
https://github.com/bitwarden/server
synced 2025-12-19 01:33:20 +00:00
[AC-2551] Consolidated Billing Migration (#4616)
* Move existing Billing SQL files into dbo folder I noticed that every other team had a nested dbo folder under their team folder while Billing did not. This change replicates that. * Add SQL files for ClientOrganizationMigrationRecord table * Add SQL Server migration for ClientOrganizationMigrationRecord table * Add ClientOrganizationMigrationRecord entity and repository interface * Add ClientOrganizationMigrationRecord Dapper repository * Add ClientOrganizationMigrationRecord EF repository * Add EF migrations for ClientOrganizationMigrationRecord table * Implement migration process * Wire up new Admin tool to migrate providers * Run dotnet format * Updated coupon and credit application per product request * AC-3057-3058: Fix expiration date and enabled from webhook processing * Run dotnet format * AC-3059: Fix assigned seats during migration * Updated AllocatedSeats in the case plan already exists * Update migration scripts to reflect current date
This commit is contained in:
@@ -32,12 +32,14 @@ public class SubscriptionDeletedHandler : ISubscriptionDeletedHandler
|
||||
var (organizationId, userId, providerId) = _stripeEventUtilityService.GetIdsFromMetadata(subscription.Metadata);
|
||||
var subCanceled = subscription.Status == StripeSubscriptionStatus.Canceled;
|
||||
|
||||
const string providerMigrationCancellationComment = "Cancelled as part of provider migration to Consolidated Billing";
|
||||
|
||||
if (!subCanceled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (organizationId.HasValue)
|
||||
if (organizationId.HasValue && subscription is not { CancellationDetails.Comment: providerMigrationCancellationComment })
|
||||
{
|
||||
await _organizationService.DisableAsync(organizationId.Value, subscription.CurrentPeriodEnd);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user