mirror of
https://github.com/bitwarden/server.git
synced 2025-07-06 10:32:49 -05:00
add support for passing payment method type
This commit is contained in:
@ -1,11 +1,14 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Collections.Generic;
|
||||
using Bit.Core.Enums;
|
||||
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class PremiumRequestModel : IValidatableObject
|
||||
{
|
||||
// TODO: Required in future
|
||||
public PaymentMethodType? PaymentMethodType { get; set; }
|
||||
public string PaymentToken { get; set; }
|
||||
[Range(0, 99)]
|
||||
public short? AdditionalStorageGb { get; set; }
|
||||
|
@ -21,6 +21,8 @@ namespace Bit.Core.Models.Api
|
||||
public PlanType PlanType { get; set; }
|
||||
[Required]
|
||||
public string Key { get; set; }
|
||||
// TODO: Required in future if not free plan
|
||||
public PaymentMethodType? PaymentMethodType { get; set; }
|
||||
public string PaymentToken { get; set; }
|
||||
[Range(0, double.MaxValue)]
|
||||
public short AdditionalSeats { get; set; }
|
||||
@ -39,6 +41,7 @@ namespace Bit.Core.Models.Api
|
||||
OwnerKey = Key,
|
||||
Name = Name,
|
||||
Plan = PlanType,
|
||||
PaymentMethodType = PaymentMethodType,
|
||||
PaymentToken = PaymentToken,
|
||||
AdditionalSeats = AdditionalSeats,
|
||||
AdditionalStorageGb = AdditionalStorageGb.GetValueOrDefault(0),
|
||||
|
@ -1,9 +1,12 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Bit.Core.Enums;
|
||||
|
||||
namespace Bit.Core.Models.Api
|
||||
{
|
||||
public class PaymentRequestModel
|
||||
{
|
||||
// TODO: Required in future
|
||||
public PaymentMethodType? PaymentMethodType { get; set; }
|
||||
[Required]
|
||||
public string PaymentToken { get; set; }
|
||||
}
|
||||
|
Reference in New Issue
Block a user