mirror of
https://github.com/bitwarden/server.git
synced 2026-02-03 17:43:03 -06:00
* [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
18 lines
598 B
C#
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());
|
|
}
|