Package io.sendon.payment
Class SendonPayment
java.lang.Object
io.sendon.base.SendonClient
io.sendon.payment.SendonPayment
SendonPayment is a client wrapper for interacting with the Sendon API.
It provides methods to retrieve payment-related information such as payment histories and details.
-
Field Summary
Fields inherited from class io.sendon.base.SendonClient
gson, httpClient -
Constructor Summary
ConstructorsConstructorDescriptionSendonPayment(String userId, String apiKey) Constructor to initialize SendonPayment with user credentials.SendonPayment(String userId, String apiKey, boolean useOkHttp) Constructor to initialize SendonPayment with user credentials and an option to use OkHttp. -
Method Summary
Modifier and TypeMethodDescriptiongetPaymentHistories(int page, int limit, String startDate, String endDate) Fetches a paginated list of payment histories from the Sendon API.getPaymentHistory(int historyId) Fetches the details of a specific payment history from the Sendon API.Methods inherited from class io.sendon.base.SendonClient
delete, get, parseJsonResponse, post, postImagesWithMultipartFormData, postImageWithMultipartFormData, postImageWithMultipartFormData, put
-
Constructor Details
-
SendonPayment
Constructor to initialize SendonPayment with user credentials.- Parameters:
userId- The user ID for authentication.apiKey- The API key for authentication.
-
SendonPayment
Constructor to initialize SendonPayment 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
-
getPaymentHistories
public GetPaymentHistories getPaymentHistories(int page, int limit, String startDate, String endDate) Fetches a paginated list of payment histories from the Sendon API.- Parameters:
page- The page number for pagination.limit- The maximum number of results to fetch per page.startDate- The start date for filtering payment histories (optional).endDate- The end date for filtering payment histories (optional).- Returns:
- A GetPaymentHistories object containing the response data, or null if an error occurs.
-
getPaymentHistory
Fetches the details of a specific payment history from the Sendon API.- Parameters:
historyId- The ID of the payment history to retrieve.- Returns:
- A GetPaymentHistory object containing the payment history details, or null if an error occurs.
-