Package io.sendon.point
Class SendonPoint
java.lang.Object
io.sendon.base.SendonClient
io.sendon.point.SendonPoint
SendonPoint is a client wrapper for interacting with the Sendon API.
It provides methods to retrieve point-related information such as points and costs.
-
Field Summary
Fields inherited from class io.sendon.base.SendonClient
gson, httpClient -
Constructor Summary
ConstructorsConstructorDescriptionSendonPoint(String userId, String apiKey) Constructor to initialize SendonPoint with user credentials.SendonPoint(String userId, String apiKey, boolean useOkHttp) Constructor to initialize SendonPoint with user credentials and an option to use OkHttp. -
Method Summary
Methods inherited from class io.sendon.base.SendonClient
delete, get, parseJsonResponse, post, postImagesWithMultipartFormData, postImageWithMultipartFormData, postImageWithMultipartFormData, put
-
Constructor Details
-
SendonPoint
Constructor to initialize SendonPoint with user credentials.- Parameters:
userId- The user ID for authentication.apiKey- The API key for authentication.
-
SendonPoint
Constructor to initialize SendonPoint with user credentials and an option to use OkHttp.- Parameters:
userId- The user ID for authentication.apiKey- The API key for authentication.useOkHttp- Flag to indicate whether to use OkHttp for HTTP requests.
-
-
Method Details
-
getPoints
Fetches the user's current points from the Sendon API.- Returns:
- A GetPoints object containing the user's points, or null if an error occurs.
-
getCosts
Fetches the cost details from the Sendon API.- Returns:
- A GetCosts object containing the cost details, or null if an error occurs.
-