Skip to content

[PM-18170] Remove PM-15814-alert-owners-of-reseller-managed-orgs #5412

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Apr 9, 2025
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
๏ปฟusing Bit.Billing.Constants;
using Bit.Billing.Jobs;
using Bit.Core;
using Bit.Core.AdminConsole.OrganizationFeatures.Organizations.Interfaces;
using Bit.Core.Billing.Pricing;
using Bit.Core.OrganizationFeatures.OrganizationSponsorships.FamiliesForEnterprise.Interfaces;
Expand All @@ -24,7 +23,6 @@ public class SubscriptionUpdatedHandler : ISubscriptionUpdatedHandler
private readonly IPushNotificationService _pushNotificationService;
private readonly IOrganizationRepository _organizationRepository;
private readonly ISchedulerFactory _schedulerFactory;
private readonly IFeatureService _featureService;
private readonly IOrganizationEnableCommand _organizationEnableCommand;
private readonly IOrganizationDisableCommand _organizationDisableCommand;
private readonly IPricingClient _pricingClient;
Expand All @@ -39,7 +37,6 @@ public SubscriptionUpdatedHandler(
IPushNotificationService pushNotificationService,
IOrganizationRepository organizationRepository,
ISchedulerFactory schedulerFactory,
IFeatureService featureService,
IOrganizationEnableCommand organizationEnableCommand,
IOrganizationDisableCommand organizationDisableCommand,
IPricingClient pricingClient)
Expand All @@ -53,7 +50,6 @@ public SubscriptionUpdatedHandler(
_pushNotificationService = pushNotificationService;
_organizationRepository = organizationRepository;
_schedulerFactory = schedulerFactory;
_featureService = featureService;
_organizationEnableCommand = organizationEnableCommand;
_organizationDisableCommand = organizationDisableCommand;
_pricingClient = pricingClient;
Expand Down Expand Up @@ -227,12 +223,6 @@ private async Task RemovePasswordManagerCouponIfRemovingSecretsManagerTrialAsync

private async Task ScheduleCancellationJobAsync(string subscriptionId, Guid organizationId)
{
var isResellerManagedOrgAlertEnabled = _featureService.IsEnabled(FeatureFlagKeys.ResellerManagedOrgAlert);
if (!isResellerManagedOrgAlertEnabled)
{
return;
}

var scheduler = await _schedulerFactory.GetScheduler();

var job = JobBuilder.Create<SubscriptionCancellationJob>()
Expand Down
1 change: 0 additions & 1 deletion src/Core/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ public static class FeatureFlagKeys
/* Billing Team */
public const string AC2101UpdateTrialInitiationEmail = "AC-2101-update-trial-initiation-email";
public const string TrialPayment = "PM-8163-trial-payment";
public const string ResellerManagedOrgAlert = "PM-15814-alert-owners-of-reseller-managed-orgs";
public const string UsePricingService = "use-pricing-service";
public const string P15179_AddExistingOrgsFromProviderPortal = "pm-15179-add-existing-orgs-from-provider-portal";
public const string PM12276Breadcrumbing = "pm-12276-breadcrumbing-for-business-features";
Expand Down
7 changes: 0 additions & 7 deletions test/Billing.Test/Services/SubscriptionUpdatedHandlerTests.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
๏ปฟusing Bit.Billing.Constants;
using Bit.Billing.Services;
using Bit.Billing.Services.Implementations;
using Bit.Core;
using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.OrganizationFeatures.Organizations.Interfaces;
using Bit.Core.Billing.Enums;
Expand Down Expand Up @@ -31,7 +30,6 @@ public class SubscriptionUpdatedHandlerTests
private readonly IPushNotificationService _pushNotificationService;
private readonly IOrganizationRepository _organizationRepository;
private readonly ISchedulerFactory _schedulerFactory;
private readonly IFeatureService _featureService;
private readonly IOrganizationEnableCommand _organizationEnableCommand;
private readonly IOrganizationDisableCommand _organizationDisableCommand;
private readonly IPricingClient _pricingClient;
Expand All @@ -49,7 +47,6 @@ public SubscriptionUpdatedHandlerTests()
_pushNotificationService = Substitute.For<IPushNotificationService>();
_organizationRepository = Substitute.For<IOrganizationRepository>();
_schedulerFactory = Substitute.For<ISchedulerFactory>();
_featureService = Substitute.For<IFeatureService>();
_organizationEnableCommand = Substitute.For<IOrganizationEnableCommand>();
_organizationDisableCommand = Substitute.For<IOrganizationDisableCommand>();
_pricingClient = Substitute.For<IPricingClient>();
Expand All @@ -67,7 +64,6 @@ public SubscriptionUpdatedHandlerTests()
_pushNotificationService,
_organizationRepository,
_schedulerFactory,
_featureService,
_organizationEnableCommand,
_organizationDisableCommand,
_pricingClient);
Expand Down Expand Up @@ -97,9 +93,6 @@ public async Task HandleAsync_UnpaidOrganizationSubscription_DisablesOrganizatio
_stripeEventUtilityService.GetIdsFromMetadata(Arg.Any<Dictionary<string, string>>())
.Returns(Tuple.Create<Guid?, Guid?, Guid?>(organizationId, null, null));

_featureService.IsEnabled(FeatureFlagKeys.ResellerManagedOrgAlert)
.Returns(true);

// Act
await _sut.HandleAsync(parsedEvent);

Expand Down
Loading