Interface ServiceTicketApi


public interface ServiceTicketApi
ServiceTicketApi contains all the api operations handling ServiceTicket in the DzidziApp.
  • Method Details

    • getTicketById

      ServiceTicket getTicketById(UUID ticketId)
      Finds a ticket by the given id.
      Parameters:
      ticketId - the ticket id
      Returns:
      the ticket found
      Throws:
      com.dzidzi.exception.EntityNotFoundException - when the entity is not found
    • createTicket

      ServiceTicket createTicket(String message)
      Adds/creates a new ticket.
      Parameters:
      message - the reason
      Returns:
      the created ticket
    • changeTicketStatus

      void changeTicketStatus(TicketStatus status, UUID ticketId)
      Changes the ticket status by the given ticket id.
      Parameters:
      status - the status to change the ticket to
      ticketId - the ticket id
    • acceptTicket

      void acceptTicket(UUID ticketId)
      It accepts a ticket by the given id. This is a synchronized method, meaning it can be accepted by only one user and cannot be changed once the first user has been assigned.
      Parameters:
      ticketId - the ticket id
    • findTickets

      DzidziPaginationDTO<ServiceTicket> findTickets(FindTicketRequest findTicketRequest)
      Finds the paginated tickets based on the request.
      Parameters:
      findTicketRequest - the request containing the params to filter tickets on
      Returns:
      the DzidziPaginationDTO
    • deleteTicket

      void deleteTicket(UUID ticketId)
      It deletes a ticket by the given id.
      Parameters:
      ticketId - the ticket id