1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-21 12:05:42 +01:00
This commit is contained in:
Jonas Hendrickx 2024-11-20 13:50:45 +01:00
parent c367db0dbe
commit 0c8f587bf4
3 changed files with 4 additions and 10 deletions

View File

@ -268,8 +268,6 @@ public class OrganizationBillingController(
return Error.NotFound();
}
requestBody.TaxIdType = taxService.GetStripeTaxCode(requestBody.Country, requestBody.TaxId);
var taxInformation = requestBody.ToDomain();
await subscriberService.UpdateTaxInformation(organization, taxInformation);

View File

@ -5,8 +5,8 @@ namespace Bit.Core.Billing.Models;
public record TaxInformation(
string Country,
string PostalCode,
string TaxId,
string TaxIdType,
string? TaxId,
string? TaxIdType,
string Line1,
string Line2,
string City,

View File

@ -622,8 +622,8 @@ public class SubscriberService(
return;
}
string taxIdType;
if (string.IsNullOrWhiteSpace(taxInformation.TaxIdType))
var taxIdType = taxInformation.TaxIdType;
if (string.IsNullOrWhiteSpace(taxIdType))
{
taxIdType = taxService.GetStripeTaxCode(taxInformation.Country,
taxInformation.TaxId);
@ -636,10 +636,6 @@ public class SubscriberService(
throw new Exceptions.BadRequestException("billingTaxIdTypeInferenceError");
}
}
else
{
taxIdType = taxInformation.TaxIdType;
}
try
{