mirror of
https://github.com/bitwarden/server.git
synced 2025-07-05 10:02:47 -05:00
[PM-13999] Show estimated tax for taxable countries (#5077)
This commit is contained in:
@ -0,0 +1,18 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Bit.Core.Billing.Models.Api.Requests.Accounts;
|
||||
|
||||
public class PreviewIndividualInvoiceRequestBody
|
||||
{
|
||||
[Required]
|
||||
public PasswordManagerRequestModel PasswordManager { get; set; }
|
||||
|
||||
[Required]
|
||||
public TaxInformationRequestModel TaxInformation { get; set; }
|
||||
}
|
||||
|
||||
public class PasswordManagerRequestModel
|
||||
{
|
||||
[Range(0, int.MaxValue)]
|
||||
public int AdditionalStorage { get; set; }
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Bit.Core.Billing.Enums;
|
||||
|
||||
namespace Bit.Core.Billing.Models.Api.Requests.Organizations;
|
||||
|
||||
public class PreviewOrganizationInvoiceRequestBody
|
||||
{
|
||||
public Guid OrganizationId { get; set; }
|
||||
|
||||
[Required]
|
||||
public PasswordManagerRequestModel PasswordManager { get; set; }
|
||||
|
||||
public SecretsManagerRequestModel SecretsManager { get; set; }
|
||||
|
||||
[Required]
|
||||
public TaxInformationRequestModel TaxInformation { get; set; }
|
||||
}
|
||||
|
||||
public class PasswordManagerRequestModel
|
||||
{
|
||||
public PlanType Plan { get; set; }
|
||||
|
||||
[Range(0, int.MaxValue)]
|
||||
public int Seats { get; set; }
|
||||
|
||||
[Range(0, int.MaxValue)]
|
||||
public int AdditionalStorage { get; set; }
|
||||
}
|
||||
|
||||
public class SecretsManagerRequestModel
|
||||
{
|
||||
[Range(0, int.MaxValue)]
|
||||
public int Seats { get; set; }
|
||||
|
||||
[Range(0, int.MaxValue)]
|
||||
public int AdditionalMachineAccounts { get; set; }
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Bit.Core.Billing.Models.Api.Requests;
|
||||
|
||||
public class TaxInformationRequestModel
|
||||
{
|
||||
[Length(2, 2), Required]
|
||||
public string Country { get; set; }
|
||||
|
||||
[Required]
|
||||
public string PostalCode { get; set; }
|
||||
|
||||
public string TaxId { get; set; }
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
namespace Bit.Core.Billing.Models.Api.Responses;
|
||||
|
||||
public record PreviewInvoiceResponseModel(
|
||||
decimal EffectiveTaxRate,
|
||||
decimal TaxableBaseAmount,
|
||||
decimal TaxAmount,
|
||||
decimal TotalAmount);
|
Reference in New Issue
Block a user