1
0
mirror of https://github.com/bitwarden/server synced 2026-01-08 03:23:20 +00:00

[PM-18955] Implement OrganizationWarningsQuery (#5713)

* Add GetWarnings endpoint to OrganizationBillingController

* Add OrganizationWarningsQueryTests
This commit is contained in:
Alex Morask
2025-05-01 17:13:10 -04:00
committed by GitHub
parent 41001fefae
commit 2d4ec530c5
8 changed files with 615 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
#nullable enable
namespace Bit.Api.Billing.Models.Responses.Organizations;
public record OrganizationWarningsResponse
{
public FreeTrialWarning? FreeTrial { get; set; }
public InactiveSubscriptionWarning? InactiveSubscription { get; set; }
public ResellerRenewalWarning? ResellerRenewal { get; set; }
public record FreeTrialWarning
{
public int RemainingTrialDays { get; set; }
}
public record InactiveSubscriptionWarning
{
public required string Resolution { get; set; }
}
public record ResellerRenewalWarning
{
public required string Type { get; set; }
public UpcomingRenewal? Upcoming { get; set; }
public IssuedRenewal? Issued { get; set; }
public PastDueRenewal? PastDue { get; set; }
public record UpcomingRenewal
{
public required DateTime RenewalDate { get; set; }
}
public record IssuedRenewal
{
public required DateTime IssuedDate { get; set; }
public required DateTime DueDate { get; set; }
}
public record PastDueRenewal
{
public required DateTime SuspensionDate { get; set; }
}
}
}