1
0
mirror of https://github.com/bitwarden/server synced 2025-12-18 17:23:28 +00:00

[PM-18028] Enabling automatic tax for customers without country or with manual tax rates set (#5376)

This commit is contained in:
Jonas Hendrickx
2025-02-20 16:01:48 +01:00
committed by GitHub
parent 9f4aa1ab2b
commit 4bef2357d5
8 changed files with 155 additions and 35 deletions

View File

@@ -0,0 +1,16 @@
using Bit.Core.Billing.Constants;
using Stripe;
namespace Bit.Core.Billing.Extensions;
public static class CustomerExtensions
{
/// <summary>
/// Determines if a Stripe customer supports automatic tax
/// </summary>
/// <param name="customer"></param>
/// <returns></returns>
public static bool HasTaxLocationVerified(this Customer customer) =>
customer?.Tax?.AutomaticTax == StripeConstants.AutomaticTaxStatus.Supported;
}