mirror of
https://github.com/bitwarden/server
synced 2025-12-19 01:33:20 +00:00
[PM-18028] Attempting to enable automatic tax on customer with invalid location (#5374)
This commit is contained in:
16
src/Core/Billing/Extensions/CustomerExtensions.cs
Normal file
16
src/Core/Billing/Extensions/CustomerExtensions.cs
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user