Package dev.resms.services.otp
Class Otp
java.lang.Object
dev.resms.core.service.BaseService
dev.resms.services.otp.Otp
-
Field Summary
Fields inherited from class dev.resms.core.service.BaseService
apiKey, httpClient, reSMSMapper -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsend(SendOtpOptions sendOtpOptions) Send an OTP based on the provided OTP requestverify(VerifyOtpOptions verifyOtpOptions) Verify an OTP based on the provided OTP verify request
-
Constructor Details
-
Otp
Constructs an instance of theOtpclass.- Parameters:
apiKey- The apiKey used for authentication.
-
-
Method Details
-
send
Send an OTP based on the provided OTP request- Parameters:
sendOtpOptions- The request containing OTP details.- Returns:
- The response indicating the status of the OTP.
- Throws:
ReSMSException- If an error occurs while sending the OTP.
-
verify
Verify an OTP based on the provided OTP verify request- Parameters:
verifyOtpOptions- The request containing OTP verify details.- Returns:
- The response indicating the status of the OTP verification.
- Throws:
ReSMSException- If an error occurs while verifying the OTP.
-