mirror of
https://github.com/bitwarden/server.git
synced 2025-05-17 17:45:36 -05:00

* Recreate changes on the closed pr Signed-off-by: Cy Okeke <cokeke@bitwarden.com> * Remove unused references Signed-off-by: Cy Okeke <cokeke@bitwarden.com> --------- Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
30 lines
937 B
C#
30 lines
937 B
C#
using Bit.Core.Billing.Models;
|
|
|
|
namespace Bit.Api.Billing.Models.Responses;
|
|
|
|
public record OrganizationMetadataResponse(
|
|
bool IsEligibleForSelfHost,
|
|
bool IsManaged,
|
|
bool IsOnSecretsManagerStandalone,
|
|
bool IsSubscriptionUnpaid,
|
|
bool HasSubscription,
|
|
bool HasOpenInvoice,
|
|
bool IsSubscriptionCanceled,
|
|
DateTime? InvoiceDueDate,
|
|
DateTime? InvoiceCreatedDate,
|
|
DateTime? SubPeriodEndDate)
|
|
{
|
|
public static OrganizationMetadataResponse From(OrganizationMetadata metadata)
|
|
=> new(
|
|
metadata.IsEligibleForSelfHost,
|
|
metadata.IsManaged,
|
|
metadata.IsOnSecretsManagerStandalone,
|
|
metadata.IsSubscriptionUnpaid,
|
|
metadata.HasSubscription,
|
|
metadata.HasOpenInvoice,
|
|
metadata.IsSubscriptionCanceled,
|
|
metadata.InvoiceDueDate,
|
|
metadata.InvoiceCreatedDate,
|
|
metadata.SubPeriodEndDate);
|
|
}
|