Implement extension request and gift functionalities in billing system
- Added new endpoints for creating and managing extension requests, allowing users to request billing period extensions. - Implemented admin approval processes for extension requests via Telegram, including inline buttons for approval and rejection. - Introduced a gifting feature for admins to grant additional billing days directly to users without a request. - Updated the support ticket model to accommodate extension requests and their associated properties. - Enhanced the Telegram notifier to inform admins of new extension requests and notify users of approval or rejection. - Updated frontend components to support the new extension request and gifting functionalities, including user interfaces for managing these features. - Revised API documentation to reflect the new endpoints and their usage in the billing context.
This commit is contained in:
@@ -45,6 +45,21 @@ public class SupportTicketTests
|
||||
Assert.Equal(3, ticket.ProposedMaxIpLimit);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CreateExtensionRequest_SetsRequestedDays()
|
||||
{
|
||||
var userId = Guid.NewGuid();
|
||||
|
||||
var ticket = SupportTicket.CreateExtensionRequest(userId, 14);
|
||||
|
||||
Assert.Equal(userId, ticket.UserId);
|
||||
Assert.Equal(TicketType.ExtensionRequest, ticket.Type);
|
||||
Assert.Equal(TicketStatus.Open, ticket.Status);
|
||||
Assert.Equal(14, ticket.RequestedDays);
|
||||
Assert.Null(ticket.RequestedRoleId);
|
||||
Assert.Null(ticket.ProposedRoleName);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Resolve_WhenOpen_SetsResolved()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user