Class DeepSeekUserBalanceResponse

java.lang.Object
de.entwicklertraining.api.base.ApiResponse<DeepSeekUserBalanceRequest>
de.entwicklertraining.deepseek4j.DeepSeekResponse<DeepSeekUserBalanceRequest>
de.entwicklertraining.deepseek4j.user.balance.DeepSeekUserBalanceResponse

public final class DeepSeekUserBalanceResponse extends DeepSeekResponse<DeepSeekUserBalanceRequest>
Represents a response from the DeepSeek User Balance API. Provides methods to access the user's balance information.
  • Constructor Details

    • DeepSeekUserBalanceResponse

      public DeepSeekUserBalanceResponse(org.json.JSONObject json, DeepSeekUserBalanceRequest request)
      Constructs a DeepSeekUserBalanceResponse.
      Parameters:
      json - The raw JSON response object.
      request - The original request that led to this response.
  • Method Details

    • isAvailable

      public boolean isAvailable()
      Gets whether the user's balance is sufficient for API calls.
      Returns:
      true if the balance is available, false otherwise.
    • getBalanceInfos

      public List<DeepSeekUserBalanceResponse.BalanceInfo> getBalanceInfos()
      Gets the list of balance information for different currencies.
      Returns:
      A list of BalanceInfo objects, or an empty list if not present or invalid.