From b9d75326a768e5a16276ff24e20be923426aa966 Mon Sep 17 00:00:00 2001 From: Alex Morask <144709477+amorask-bitwarden@users.noreply.github.com> Date: Wed, 21 Aug 2024 10:44:14 -0400 Subject: [PATCH] Removed feature flag and unused endpoint (#4677) --- .../OrganizationBillingStatusResponseModel.cs | 13 ------------- .../Controllers/OrganizationsController.cs | 15 --------------- src/Core/Constants.cs | 1 - 3 files changed, 29 deletions(-) delete mode 100644 src/Api/AdminConsole/Models/Response/Organizations/OrganizationBillingStatusResponseModel.cs diff --git a/src/Api/AdminConsole/Models/Response/Organizations/OrganizationBillingStatusResponseModel.cs b/src/Api/AdminConsole/Models/Response/Organizations/OrganizationBillingStatusResponseModel.cs deleted file mode 100644 index 635383fa3..000000000 --- a/src/Api/AdminConsole/Models/Response/Organizations/OrganizationBillingStatusResponseModel.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Bit.Core.AdminConsole.Entities; -using Bit.Core.Models.Api; - -namespace Bit.Api.AdminConsole.Models.Response.Organizations; - -public class OrganizationBillingStatusResponseModel( - Organization organization, - bool risksSubscriptionFailure) : ResponseModel("organizationBillingStatus") -{ - public Guid OrganizationId { get; } = organization.Id; - public string OrganizationName { get; } = organization.Name; - public bool RisksSubscriptionFailure { get; } = risksSubscriptionFailure; -} diff --git a/src/Api/Billing/Controllers/OrganizationsController.cs b/src/Api/Billing/Controllers/OrganizationsController.cs index d09246b18..5371186b1 100644 --- a/src/Api/Billing/Controllers/OrganizationsController.cs +++ b/src/Api/Billing/Controllers/OrganizationsController.cs @@ -45,21 +45,6 @@ public class OrganizationsController( ISubscriberService subscriberService) : Controller { - [HttpGet("{id:guid}/billing-status")] - public async Task GetBillingStatus(Guid id) - { - if (!await currentContext.EditPaymentMethods(id)) - { - throw new NotFoundException(); - } - - var organization = await organizationRepository.GetByIdAsync(id); - - var risksSubscriptionFailure = await paymentService.RisksSubscriptionFailure(organization); - - return new OrganizationBillingStatusResponseModel(organization, risksSubscriptionFailure); - } - [HttpGet("{id:guid}/subscription")] public async Task GetSubscription(Guid id) { diff --git a/src/Core/Constants.cs b/src/Core/Constants.cs index 1964eda5b..0b6973d90 100644 --- a/src/Core/Constants.cs +++ b/src/Core/Constants.cs @@ -108,7 +108,6 @@ public static class FeatureFlagKeys public const string KeyRotationImprovements = "key-rotation-improvements"; public const string DuoRedirect = "duo-redirect"; public const string PM5864DollarThreshold = "PM-5864-dollar-threshold"; - public const string ShowPaymentMethodWarningBanners = "show-payment-method-warning-banners"; public const string AC2101UpdateTrialInitiationEmail = "AC-2101-update-trial-initiation-email"; public const string EnableConsolidatedBilling = "enable-consolidated-billing"; public const string AC1795_UpdatedSubscriptionStatusSection = "AC-1795_updated-subscription-status-section";