001package com.plivo.api.models.verify; 002 003import com.plivo.api.models.base.VoiceCreator; 004import retrofit2.Call; 005 006public class VerifyCallerId extends VoiceCreator<VerifyCallerIdResponse> { 007 008 private String otp; 009 010 private final String id; 011 012 public VerifyCallerId(String id) { 013 if (id == null) { 014 throw new IllegalArgumentException("verification uuid cannot be null"); 015 } 016 this.id = id; 017 } 018 019 public String getOtp() { 020 return otp; 021 } 022 023 public VerifyCallerId otp(final String otp) { 024 this.otp = otp; 025 return this; 026 } 027 028 @Override 029 protected Call<VerifyCallerIdResponse> obtainCall() { 030 return client().getVoiceApiService().verifyCallerID(client().getAuthId(),id,this); 031 } 032 033 @Override 034 protected Call<VerifyCallerIdResponse> obtainFallback1Call() { 035 return client().getVoiceFallback1Service().verifyCallerID(client().getAuthId(),id,this); 036 } 037 038 @Override 039 protected Call<VerifyCallerIdResponse> obtainFallback2Call() { 040 return client().getVoiceFallback2Service().verifyCallerID(client().getAuthId(),id,this); 041 } 042}