/// <summary> /// Validate OTP by Request Id. /// </summary> public async Task <Response.OTPRespone> OTPValidateRequest(string requestid, Object payload) { HttpResponseMessage response = await Request("otp/requestid", payload, null, requestid, null, "validate"); Response.OTPRespone otp = new OTPRespone(); if ((int)response.StatusCode == 200) { otp = await response.Content.ReadAsAsync <Response.OTPRespone>(); } otp.statuscode = (int)response.StatusCode; otp.statusmessage = response.ReasonPhrase; return(otp); }
/// <summary> /// Cancel OTP by Destination Id. /// </summary> public async Task <Response.OTPRespone> OTPCancelDestination(string destinationid) { HttpResponseMessage response = await Request("otp", null, null, destinationid, null, "cancel"); Response.OTPRespone otp = new OTPRespone(); if ((int)response.StatusCode == 200) { otp = await response.Content.ReadAsAsync <Response.OTPRespone>(); } otp.statuscode = (int)response.StatusCode; otp.statusmessage = response.ReasonPhrase; return(otp); }
/// <summary> /// Sends an OTP message. /// </summary> public async Task <Response.OTPRespone> sendOTP(Object payload) { HttpResponseMessage response = await Request("otp", payload); Response.OTPRespone otp = new OTPRespone(); if ((int)response.StatusCode == 200) { otp = await response.Content.ReadAsAsync <Response.OTPRespone>(); } otp.statuscode = (int)response.StatusCode; otp.statusmessage = response.ReasonPhrase; return(otp); }