1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 07:36:14 -05:00

stripe invoice handling. return credit amount.

This commit is contained in:
Kyle Spearrin
2019-01-29 17:44:31 -05:00
parent a34ca4700d
commit abb1751bfe
3 changed files with 96 additions and 43 deletions

View File

@ -12,6 +12,7 @@ namespace Bit.Core.Models.Api
public BillingResponseModel(User user, BillingInfo billing, UserLicense license)
: base("billing")
{
CreditAmount = billing.CreditAmount;
PaymentSource = billing.PaymentSource != null ? new BillingSource(billing.PaymentSource) : null;
Subscription = billing.Subscription != null ? new BillingSubscription(billing.Subscription) : null;
Charges = billing.Charges.Select(c => new BillingCharge(c));
@ -37,6 +38,7 @@ namespace Bit.Core.Models.Api
}
}
public decimal CreditAmount { get; set; }
public string StorageName { get; set; }
public double? StorageGb { get; set; }
public short? MaxStorageGb { get; set; }

View File

@ -8,6 +8,7 @@ namespace Bit.Core.Models.Business
{
public class BillingInfo
{
public decimal CreditAmount { get; set; }
public BillingSource PaymentSource { get; set; }
public BillingSubscription Subscription { get; set; }
public BillingInvoice UpcomingInvoice { get; set; }