From b90caf090d741a8866ae9b37d36f4fd27f073623 Mon Sep 17 00:00:00 2001 From: dombartenope <56173293+dombartenope@users.noreply.github.com> Date: Fri, 3 Apr 2026 12:04:15 -0400 Subject: [PATCH] Updated code sample in Java README.md --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0d6f73c..40113a0 100644 --- a/README.md +++ b/README.md @@ -103,11 +103,10 @@ public class Example { notification.setAppId(appId); notification.setIsChrome(true); notification.setIsAnyWeb(true); - notification.setIncludedSegments(Arrays.asList(new String[]{"Subscribed Users"})); - StringMap contentStringMap = new StringMap(); - contentStringMap.en("Test"); + notification.setIncludedSegments(List.of(new String[]{"Subscribed Users"})); + LanguageStringMap contentStringMap = new LanguageStringMap(); + contentStringMap.en("Working example"); notification.setContents(contentStringMap); - return notification; } @@ -118,7 +117,7 @@ public class Example { restApiAuth.setBearerToken(restApiKey); HttpBearerAuth organizationApiAuth = (HttpBearerAuth) defaultClient.getAuthentication("organization_api_key"); organizationApiAuth.setBearerToken(organizationApiKey); - api = new DefaultApi(defaultClient); + DefaultApi api = new DefaultApi(defaultClient); // Setting up the notification Notification notification = createNotification();