Class ClaimApi
java.lang.Object
io.github.alejo2075.enzonasdk.client.ClaimApi
Handles claim-related operations for the Enzona API.
Provides functionality to create new claims using the details provided in a
CreateClaimsRequest.
This class interacts with the Enzona API's claims endpoint by sending HTTP requests to manage claims.
Each request is authenticated using an access token obtained via AuthClient.
Instances of this class should be created by providing the consumer key and consumer secret which are used to
instantiate an AuthClient. This client is then used to authenticate requests made by this class.
Example usage:
ClaimApi claimApi = new ClaimApi("consumerKey", "consumerSecret");
CreateClaimsRequest request = new CreateClaimsRequest(...);
CreateClaimsResponse response = claimApi.createClaims(request);
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateClaims(CreateClaimsRequest request) Creates a new claim based on the providedCreateClaimsRequest.
-
Constructor Details
-
ClaimApi
Constructs a ClaimApi instance using provided consumer key and consumer secret. This constructor initializes anAuthClientfor handling authentication.- Parameters:
consumerKey- The consumer key issued by Enzona for API authentication.consumerSecret- The consumer secret issued by Enzona for API authentication.
-
-
Method Details
-
createClaims
Creates a new claim based on the providedCreateClaimsRequest. This method sends a POST request to the claims endpoint and returns the results wrapped in aCreateClaimsResponse.- Parameters:
request- The request containing all necessary information for creating the claim, must not be null.- Returns:
- A
CreateClaimsResponseobject containing the response from the API. - Throws:
EnzonaException- if there is an issue with network communication, or if the API response indicates an error.
-