@@ -6,7 +6,7 @@ This file was generated by running [AggregateSnippets.java](src/main/java/Aggreg
66- [ ** Initialize** ] ( #initialize )
77- [ ** Account** ] ( #account )
88- [ ** Application** ] ( #application )
9- - [ ** Insight** ] ( #insight )
9+ - [ ** Number Insight** ] ( #number- insight )
1010- [ ** JWT** ] ( #jwt )
1111- [ ** Meetings** ] ( #meetings )
1212- [ ** Messages** ] ( #messages )
@@ -90,6 +90,7 @@ ListSecretsResponse response = client.getAccountClient().listSecrets(VONAGE_API_
9090
9191for (SecretResponse secret : response. getSecrets()) {
9292 System . out. println(secret. getId() + " created at " + secret. getCreated());
93+ }
9394```
9495## Application
9596### Delete Application
@@ -173,7 +174,7 @@ System.out.println("Application Updated:");
173174System . out. println(" Old: " + existingApplication. toJson());
174175System . out. println(" New: " + application. toJson());
175176```
176- ## Insight
177+ ## Number Insight
177178### Basic Insight
178179
179180``` java
@@ -215,6 +216,8 @@ else {
215216 if (response. getRoaming(). getStatus() == RoamingDetails . RoamingStatus . ROAMING ) {
216217 System . out. print(" Currently roaming in: " + roaming. getRoamingCountryCode());
217218 System . out. println(" on the network " + roaming. getRoamingNetworkName());
219+ }
220+ }
218221```
219222### Standard Insight
220223
@@ -241,47 +244,46 @@ client.getInsightClient().getAdvancedNumberInsight(
241244 .async(true ). callback(CALLBACK_URL ). build()
242245);
243246```
244- ### Advanced Insight With Cnam
247+ ### Advanced Insight With CNAM
245248
246249``` java
247- AdvancedInsightRequest request = AdvancedInsightRequest . builder(INSIGHT_NUMBER ). cnam(true ). build();
250+ AdvancedInsightRequest request = AdvancedInsightRequest . builder(INSIGHT_NUMBER ). cnam(true ). build();
248251
249- AdvancedInsightResponse response = client. getInsightClient(). getAdvancedNumberInsight(request);
252+ AdvancedInsightResponse response = client. getInsightClient(). getAdvancedNumberInsight(request);
250253
251- printResults(response);
252- }
254+ System . out. println(response);
253255
254- private static void printResults(AdvancedInsightResponse response) {
255- System . out. println(" BASIC INFO:" );
256- System . out. println(" International format: " + response. getInternationalFormatNumber());
257- System . out. println(" National format: " + response. getNationalFormatNumber());
258- System . out. println(" Country: " + response. getCountryName() + " (" + response. getCountryCodeIso3() + " , +"
259- + response. getCountryPrefix() + " )" );
260- System . out. println();
261- System . out. println(" STANDARD INFO:" );
262- System . out. println(" Current carrier: " + response. getCurrentCarrier(). getName());
263- System . out. println(" Original carrier: " + response. getOriginalCarrier(). getName());
264-
265- System . out. println();
266- System . out. println(" ADVANCED INFO:" );
267- System . out. println(" Validity: " + response. getValidNumber());
268- System . out. println(" Reachability: " + response. getReachability());
269- System . out. println(" Ported status: " + response. getPorted());
270-
271- RoamingDetails roaming = response. getRoaming();
272- if (roaming == null ) {
273- System . out. println(" - No Roaming Info -" );
274- } else {
275- System . out. println(" Roaming status: " + roaming. getStatus());
276- if (response. getRoaming(). getStatus() == RoamingDetails . RoamingStatus . ROAMING ) {
277- System . out. print(" Currently roaming in: " + roaming. getRoamingCountryCode());
278- System . out. println(" on the network " + roaming. getRoamingNetworkName());
279- }
256+ System . out. println(" BASIC INFO:" );
257+ System . out. println(" International format: " + response. getInternationalFormatNumber());
258+ System . out. println(" National format: " + response. getNationalFormatNumber());
259+ System . out. println(" Country: " + response. getCountryName() + " (" + response. getCountryCodeIso3() + " , +"
260+ + response. getCountryPrefix() + " )" );
261+ System . out. println();
262+ System . out. println(" STANDARD INFO:" );
263+ System . out. println(" Current carrier: " + response. getCurrentCarrier(). getName());
264+ System . out. println(" Original carrier: " + response. getOriginalCarrier(). getName());
265+
266+ System . out. println();
267+ System . out. println(" ADVANCED INFO:" );
268+ System . out. println(" Validity: " + response. getValidNumber());
269+ System . out. println(" Reachability: " + response. getReachability());
270+ System . out. println(" Ported status: " + response. getPorted());
271+
272+ RoamingDetails roaming = response. getRoaming();
273+ if (roaming == null ) {
274+ System . out. println(" - No Roaming Info -" );
275+ }
276+ else {
277+ System . out. println(" Roaming status: " + roaming. getStatus());
278+ if (response. getRoaming(). getStatus() == RoamingDetails . RoamingStatus . ROAMING ) {
279+ System . out. print(" Currently roaming in: " + roaming. getRoamingCountryCode());
280+ System . out. println(" on the network " + roaming. getRoamingNetworkName());
280281 }
282+ }
281283
282- System . out. println(" CNAM INFORMATION:" );
283- System . out. println(" Name: " + response. getCallerIdentity(). getName());
284- System . out. println(" Type: " + response. getCallerIdentity(). getType());
284+ System . out. println(" CNAM INFORMATION:" );
285+ System . out. println(" Name: " + response. getCallerIdentity(). getName());
286+ System . out. println(" Type: " + response. getCallerIdentity(). getType());
285287```
286288### Async Insight Trigger
287289
@@ -1872,6 +1874,7 @@ System.out.println("Here are "
18721874for (AvailableNumber number : response. getNumbers()) {
18731875 System . out. println(" Tel: " + number. getMsisdn());
18741876 System . out. println(" Cost: " + number. getCost());
1877+ }
18751878```
18761879### Update Number
18771880
@@ -1897,6 +1900,7 @@ for (OwnedNumber number : response.getNumbers()) {
18971900 System . out. println(" Tel: " + number. getMsisdn());
18981901 System . out. println(" Type: " + number. getType());
18991902 System . out. println(" Country: " + number. getCountry());
1903+ }
19001904```
19011905## Redact
19021906### RedactA Transaction
@@ -2042,6 +2046,7 @@ SmsSubmissionResponse responses = client.getSmsClient().submitMessage(message);
20422046
20432047for (SmsSubmissionResponseMessage responseMessage : responses. getMessages()) {
20442048 System . out. println(message);
2049+ }
20452050```
20462051### Send Message
20472052
@@ -2057,6 +2062,7 @@ if (response.getMessages().get(0).getStatus() == MessageStatus.OK) {
20572062 System . out. println(" Message sent successfully." );
20582063} else {
20592064 System . out. println(" Message failed with error: " + response. getMessages(). get(0 ). getErrorText());
2065+ }
20602066```
20612067### Send Signed SMS
20622068
@@ -2118,6 +2124,7 @@ public class SendSignedSms {
21182124 System . out. println(" Message sent successfully." );
21192125 } else {
21202126 System . out. println(" Message failed with error: " + response. getMessages(). get(0 ). getErrorText());
2127+ }
21212128```
21222129## Subaccounts
21232130### Transfer Credit
@@ -2261,6 +2268,7 @@ if (errorText != null) {
22612268}
22622269else {
22632270 System . out. println(" Verification cancelled." );
2271+ }
22642272```
22652273### Advance Verification
22662274
@@ -2273,6 +2281,7 @@ if (errorText != null) {
22732281}
22742282else {
22752283 System . out. println(" Verification advanced to next stage!" );
2284+ }
22762285```
22772286### Start Verification With Workflow
22782287
@@ -2286,6 +2295,7 @@ if (response.getStatus() == VerifyStatus.OK) {
22862295}
22872296else {
22882297 System . out. printf(" ERROR! %s: %s" , response. getStatus(), response. getErrorText());
2298+ }
22892299```
22902300### Search Verification
22912301
@@ -2295,6 +2305,7 @@ if (response.getStatus() == VerifyStatus.OK) {
22952305 response. getVerificationRequests(). forEach(it - > {
22962306 System . out. println(it. getRequestId() + " " + it. getStatus());
22972307 });
2308+ }
22982309```
22992310### Check Verification
23002311
@@ -2306,6 +2317,7 @@ if (response.getStatus() == VerifyStatus.OK) {
23062317}
23072318else {
23082319 System . out. println(" Verification failed: " + response. getErrorText());
2320+ }
23092321```
23102322### Start Verification
23112323
@@ -2317,6 +2329,7 @@ if (response.getStatus() == VerifyStatus.OK) {
23172329}
23182330else {
23192331 System . out. printf(" ERROR! %s: %s" , response. getStatus(), response. getErrorText());
2332+ }
23202333```
23212334### Start PSD2 Verification With Workflow
23222335
@@ -2330,6 +2343,7 @@ if (response.getStatus() == VerifyStatus.OK) {
23302343}
23312344else {
23322345 System . out. printf(" Error: %s: %s" , response. getStatus(), response. getErrorText());
2346+ }
23332347```
23342348### Start PSD2 Verification
23352349
@@ -2341,6 +2355,7 @@ if (response.getStatus() == VerifyStatus.OK) {
23412355}
23422356else {
23432357 System . out. printf(" Error: %s: %s" , response. getStatus(), response. getErrorText());
2358+ }
23442359```
23452360## Verify v2
23462361### Send Request WhatsApp
@@ -2436,6 +2451,8 @@ catch (VerifyResponseException ex) {
24362451 case 429 : // Rate limit exceeded
24372452 default : // Unknown or internal server error (500)
24382453 ex. printStackTrace();
2454+ }
2455+ }
24392456```
24402457### Get Template
24412458
0 commit comments