1
1
package verification ;
2
2
3
- import com .sinch .sdk .domains .verification .*;
4
- import com .sinch .sdk .domains .verification .models .*;
5
- import com .sinch .sdk .domains .verification .models .requests .*;
6
- import com .sinch .sdk .domains .verification .models .response .*;
3
+ import com .sinch .sdk .domains .verification .api .v1 .VerificationService ;
4
+ import com .sinch .sdk .domains .verification .api .v1 .VerificationStartService ;
5
+ import com .sinch .sdk .domains .verification .models .v1 .NumberIdentity ;
6
+ import com .sinch .sdk .domains .verification .models .v1 .start .request .VerificationStartRequestSms ;
7
+ import com .sinch .sdk .domains .verification .models .v1 .start .response .VerificationStartResponseSms ;
7
8
import java .util .logging .Logger ;
8
9
9
10
public class Snippet {
@@ -14,15 +15,15 @@ static void execute(VerificationService verificationService) {
14
15
15
16
// REMINDER: verification Service require to have set application key/secret
16
17
// onto Sinch Client init
17
- VerificationsService verificationsService = verificationService .verifications ();
18
+ VerificationStartService startService = verificationService .verificationStart ();
18
19
19
20
String phoneNumber = "YOUR_phone_number" ;
20
21
21
22
LOGGER .info (String .format ("Sending a SMS verification to '%s'" , phoneNumber ));
22
23
23
- StartVerificationResponseSMS response =
24
- verificationsService .startSms (
25
- StartVerificationSMSRequestParameters .builder ()
24
+ VerificationStartResponseSms response =
25
+ startService .startSms (
26
+ VerificationStartRequestSms .builder ()
26
27
.setIdentity (NumberIdentity .valueOf (phoneNumber ))
27
28
.build ());
28
29
0 commit comments