Skip to content

Commit

Permalink
Revert "[PM-13999] Show estimated tax for taxable countries (#5077)" (#…
Browse files Browse the repository at this point in the history
…5109)

This reverts commit 94fdfa4.

Co-authored-by: Conner Turnbull <[email protected]>
  • Loading branch information
jonashendrickx and cturnbull-bitwarden authored Dec 4, 2024
1 parent 470a126 commit 90a9473
Show file tree
Hide file tree
Showing 30 changed files with 529 additions and 1,791 deletions.
151 changes: 0 additions & 151 deletions bitwarden_license/test/Commercial.Core.Test/Billing/TaxServiceTests.cs

This file was deleted.

15 changes: 0 additions & 15 deletions src/Api/Billing/Controllers/AccountsBillingController.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#nullable enable
using Bit.Api.Billing.Models.Responses;
using Bit.Core.Billing.Models.Api.Requests.Accounts;
using Bit.Core.Billing.Services;
using Bit.Core.Services;
using Bit.Core.Utilities;
Expand Down Expand Up @@ -78,18 +77,4 @@ public async Task<IResult> GetTransactionsAsync([FromQuery] DateTime? startAfter

return TypedResults.Ok(transactions);
}

[HttpPost("preview-invoice")]
public async Task<IResult> PreviewInvoiceAsync([FromBody] PreviewIndividualInvoiceRequestBody model)
{
var user = await userService.GetUserByPrincipalAsync(User);
if (user == null)
{
throw new UnauthorizedAccessException();
}

var invoice = await paymentService.PreviewInvoiceAsync(model, user.GatewayCustomerId, user.GatewaySubscriptionId);

return TypedResults.Ok(invoice);
}
}
42 changes: 0 additions & 42 deletions src/Api/Billing/Controllers/InvoicesController.cs

This file was deleted.

1 change: 0 additions & 1 deletion src/Api/Billing/Controllers/ProviderBillingController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ public async Task<IResult> UpdateTaxInformationAsync(
requestBody.Country,
requestBody.PostalCode,
requestBody.TaxId,
requestBody.TaxIdType,
requestBody.Line1,
requestBody.Line2,
requestBody.City,
Expand Down
14 changes: 1 addition & 13 deletions src/Api/Billing/Controllers/StripeController.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Bit.Core.Billing.Services;
using Bit.Core.Services;
using Bit.Core.Services;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http.HttpResults;
using Microsoft.AspNetCore.Mvc;
Expand Down Expand Up @@ -47,15 +46,4 @@ public async Task<Ok<string>> CreateSetupIntentForCardAsync()

return TypedResults.Ok(setupIntent.ClientSecret);
}

[HttpGet]
[Route("~/tax/is-country-supported")]
public IResult IsCountrySupported(
[FromQuery] string country,
[FromServices] ITaxService taxService)
{
var isSupported = taxService.IsSupported(country);

return TypedResults.Ok(isSupported);
}
}
2 changes: 0 additions & 2 deletions src/Api/Billing/Models/Requests/TaxInformationRequestBody.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ public class TaxInformationRequestBody
[Required]
public string PostalCode { get; set; }
public string TaxId { get; set; }
public string TaxIdType { get; set; }
public string Line1 { get; set; }
public string Line2 { get; set; }
public string City { get; set; }
Expand All @@ -20,7 +19,6 @@ public class TaxInformationRequestBody
Country,
PostalCode,
TaxId,
TaxIdType,
Line1,
Line2,
City,
Expand Down
33 changes: 0 additions & 33 deletions src/Core/Billing/Extensions/CurrencyExtensions.cs

This file was deleted.

1 change: 0 additions & 1 deletion src/Core/Billing/Extensions/ServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ public static class ServiceCollectionExtensions
{
public static void AddBillingOperations(this IServiceCollection services)
{
services.AddSingleton<ITaxService, TaxService>();
services.AddTransient<IOrganizationBillingService, OrganizationBillingService>();
services.AddTransient<IPremiumUserBillingService, PremiumUserBillingService>();
services.AddTransient<ISetupIntentCache, SetupIntentDistributedCache>();
Expand Down

This file was deleted.

This file was deleted.

14 changes: 0 additions & 14 deletions src/Core/Billing/Models/Api/Requests/TaxInformationRequestModel.cs

This file was deleted.

This file was deleted.

7 changes: 0 additions & 7 deletions src/Core/Billing/Models/PreviewInvoiceInfo.cs

This file was deleted.

Loading

0 comments on commit 90a9473

Please sign in to comment.