1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-01 08:02:49 -05:00

Billing addr line1 fix, pr feedback

This commit is contained in:
Chad Scharf
2020-06-15 09:12:03 -04:00
parent 1552ff7b29
commit b2cb9a2f69
5 changed files with 11 additions and 6 deletions

View File

@ -4,7 +4,8 @@ namespace Bit.Core.Models.Api
{
public class TaxInfoResponseModel
{
public TaxInfoResponseModel () { }
public TaxInfoResponseModel() { }
public TaxInfoResponseModel(TaxInfo taxInfo)
{
if (taxInfo == null)

View File

@ -26,9 +26,13 @@
{
if (string.IsNullOrWhiteSpace(BillingAddressCountry) ||
string.IsNullOrWhiteSpace(TaxIdNumber))
{
return null;
}
if (!string.IsNullOrWhiteSpace(_taxIdType))
{
return _taxIdType;
}
switch (BillingAddressCountry)
{
@ -44,7 +48,9 @@
case "CA":
// May break for those in Québec given the assumption of QST
if (BillingAddressState?.Contains("bec") ?? false)
{
_taxIdType = "ca_qst";
}
_taxIdType = "ca_bn";
break;
case "CL":