Class RequestManager

java.lang.Object
dk.minepay.server.bukkit.managers.RequestManager

public class RequestManager extends Object
Manager class for handling store requests.
  • Constructor Details

    • RequestManager

      public RequestManager()
      Constructor for the RequestManager class.
  • Method Details

    • createRequest

      public com.google.gson.JsonObject createRequest(UUID uuid, StoreProduct[] storeProducts)
      Creates a new store request for the given player UUID and store products.
      Parameters:
      uuid - the UUID of the player
      storeProducts - the store products to include in the request
      Returns:
      a JsonObject representing the response from the store API
    • getRequests

      public StoreRequest[] getRequests(RequestBody body)
      Retrieves store requests with the given request statuses.
      Parameters:
      body - the request body containing the request statuses
      Returns:
      an array of StoreRequest objects representing the retrieved requests
    • getRequest

      public StoreRequest getRequest(String requestId)
      Retrieves a store request with the given request ID.
      Parameters:
      requestId - the ID of the request to retrieve
      Returns:
      a StoreRequest object representing the retrieved request
    • acceptRequest

      public com.google.gson.JsonObject acceptRequest(String requestId)
      Accepts a store request with the given request ID.
      Parameters:
      requestId - the ID of the request to accept
      Returns:
      a JsonObject representing the response from the store API
    • cancelRequest

      public com.google.gson.JsonObject cancelRequest(String requestId)
      Cancels a store request with the given request ID.
      Parameters:
      requestId - the ID of the request to cancel
      Returns:
      a JsonObject representing the response from the store API
    • getVotes

      public Vote[] getVotes(VoteBody body)
      Retrieves votes with the given vote statuses.
      Parameters:
      body - the vote body containing the vote statuses
      Returns:
      an array of Vote objects representing the retrieved votes
    • getVote

      public Vote getVote(String voteId)
      Retrieves a vote with the given vote ID.
      Parameters:
      voteId - the ID of the vote to retrieve
      Returns:
      a Vote object representing the retrieved vote
    • acceptVote

      public com.google.gson.JsonObject acceptVote(String voteId)
      Accepts a vote with the given vote ID.
      Parameters:
      voteId - the ID of the vote to accept
      Returns:
      a JsonObject representing the response from the vote API