server/src/Api/Billing/Models/Requests/PreviewInvoice/PreviewPremiumSubscriptionPurchaseTaxRequest.cs
Kyle Denney 4f4ccac2de
[PM-29599] create proration preview endpoint (#6858)
* [PM-29599] create proration preview endpoint

* forgot to inject user and fixing stripe errors

* updated proration preview and upgrade to be consistent

also using the correct proration behavior and making the upgrade flow start a trial

* missed using the billing address

* changes to proration behavior

and returning more properties from the proration endpoint

* missed in refactor

* pr feedback
2026-02-03 10:08:14 -06:00

18 lines
598 B
C#

using System.ComponentModel.DataAnnotations;
using Bit.Api.Billing.Models.Requests.Payment;
using Bit.Core.Billing.Payment.Models;
namespace Bit.Api.Billing.Models.Requests.PreviewInvoice;
public record PreviewPremiumSubscriptionPurchaseTaxRequest
{
[Required]
[Range(0, 99, ErrorMessage = "Additional storage must be between 0 and 99 GB.")]
public short AdditionalStorage { get; set; }
[Required]
public required MinimalBillingAddressRequest BillingAddress { get; set; }
public (short, BillingAddress) ToDomain() => (AdditionalStorage, BillingAddress.ToDomain());
}