1
0
mirror of https://github.com/bitwarden/server synced 2025-12-19 17:53:44 +00:00

Implemented tax collection for subscriptions (#1017)

* Implemented tax collection for subscriptions

* Cleanup for Sales Tax

* Cleanup for Sales Tax

* Changes a constraint to an index for checking purposes

* Added and implemented a ReadById method for TaxRate

* Code review fixes for Tax Rate implementation

* Code review fixes for Tax Rate implementation

* Made the SalesTax migration script rerunnable
This commit is contained in:
Addison Beck
2020-12-04 12:05:16 -05:00
committed by GitHub
parent 9e1bf3d584
commit b877c25234
27 changed files with 1157 additions and 88 deletions

View File

@@ -14,6 +14,8 @@ namespace Bit.Core.Models.Api
[Range(0, 99)]
public short? AdditionalStorageGb { get; set; }
public bool PremiumAccessAddon { get; set; }
public string BillingAddressCountry { get; set; }
public string BillingAddressPostalCode { get; set; }
public OrganizationUpgrade ToOrganizationUpgrade()
{
@@ -23,7 +25,12 @@ namespace Bit.Core.Models.Api
AdditionalStorageGb = AdditionalStorageGb.GetValueOrDefault(),
BusinessName = BusinessName,
Plan = PlanType,
PremiumAccessAddon = PremiumAccessAddon
PremiumAccessAddon = PremiumAccessAddon,
TaxInfo = new TaxInfo()
{
BillingAddressCountry = BillingAddressCountry,
BillingAddressPostalCode = BillingAddressPostalCode
}
};
}
}