Beispiel #1
0
        /// <inheritdoc />
        public async Task <VericallOtpRequestResult> SendOtp(string otpId, VericallOtpRequestBody body, CancellationToken token)
        {
            var requestBody = CreateJsonBody(body);
            var result      = await PostAsync($"/otp/{otpId}", requestBody, token);

            result.EnsureSuccessStatusCode();

            return(await DeserializeResponse <VericallOtpRequestResult>(result.Content));
        }
Beispiel #2
0
        public async Task SendOtpTest()
        {
            var service = new VericallOtpService {
                Authentication = _textFixture.Authentication
            };
            var body = new VericallOtpRequestBody
            {
                MaxAttempt = 3,
                Duration   = 10000,
                Length     = 4,
                User       = "******"
            };

            var result = await service.SendOtp("ENTER-RANDOM-OTP-ID", body);

            Assert.NotNull(result);
        }
Beispiel #3
0
 /// <inheritdoc />
 public Task <VericallOtpRequestResult> SendOtp(string otpId, VericallOtpRequestBody body)
 {
     return(SendOtp(otpId, body, CancellationToken.None));
 }