Skip to content

Commit 762b91b

Browse files
committed
java 6.1.0 release
1 parent 9eba410 commit 762b91b

File tree

96 files changed

+3820
-1373
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+3820
-1373
lines changed

CHANGELOG.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,44 @@ All notable changes to the library will be documented in this file.
55
The format of the file is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this library adheres to [Semantic Versioning](http://semver.org/) as mentioned in [README.md][readme] file.
77

8+
## [ [6.1.0](https://github.com/infobip/infobip-api-java-client/releases/tag/6.1.0) ] - 2025-04-07
9+
10+
⚠️ **IMPORTANT NOTE:** This release contains compile time breaking changes.
11+
All changes, including breaking changes, are addressed and explained in the list bellow.
12+
If you find out that something was not addressed properly, please submit an issue.
13+
14+
### Added
15+
* Most recent feature set for:
16+
* [Infobip Messages API](https://www.infobip.com/docs/api/platform/messages-api).
17+
* [Infobip Voice API](https://www.infobip.com/docs/api/channels/voice).
18+
* [Infobip SMS API](https://www.infobip.com/docs/api/channels/sms).
19+
* [Infobip 2FA API](https://www.infobip.com/docs/api/platform/2fa).
20+
* [Infobip Email API](https://www.infobip.com/docs/api/channels/email).
21+
* [Infobip WhatsApp API](https://www.infobip.com/docs/api/channels/whatsapp).
22+
* [Infobip Viber API](https://www.infobip.com/docs/api/channels/viber).
23+
* [Infobip WebRTC API](https://www.infobip.com/docs/api/channels/webrtc-calls).
24+
* [Infobip Moments](https://www.infobip.com/docs/api/customer-engagement/moments).
25+
* [Infobip MMS API](https://www.infobip.com/docs/api/channels/mms).
26+
* **Added** new Viber Outbound Content type: `LIST`.
27+
* **Added** new MessagesApi message body types: `PRODUCT` and `MIXED`.
28+
* **Added** new WhatsAppInteractive payment status and payment details type: `UPI_INTENT`.
29+
* **Added** support for `WEBSOCKET` option in call routing endpoint.
30+
31+
32+
### Changed
33+
* [WhatsAppWebhookPaymentTransactionNotification](src/main/java/com/infobip/model/WhatsAppWebhookPaymentTransactionNotification.java) model, previously nested enum 'type' and 'status' are now extracted to a separate class.
34+
* [WhatsAppWebhookPaymentNotification](src/main/java/com/infobip/model/WhatsAppWebhookPaymentNotification.java) model, previously nested enum 'currency' is now extracted to a separate class.
35+
* **Updated** `WhatsAppTemplateCardContent.buttons` field type from `List<WhatsAppTemplateButtonContent>``List<WhatsAppCardAllowedTemplateButtonContent>`.
36+
* **Updated** `WhatsAppTemplatePublicApiRequest.structure` field type from `WhatAppTemplateStructureApiData``Object`.
37+
* **Updated** `CallsUpdateScenarioResponse.lastUsageDate` field type from `String``LocalDate`.
38+
* **Updated** `CallsSearchResponse.lastUsageDate` field type from `String``LocalDate`.
39+
* **Removed** `EmailWebhookTrackReport` and `EmailWebhookTrackResponse` in favor of a unified class: `EmailWebhookTrackingPayload`.
40+
* **Updated** `FormsRequest.formType` field type from `FormType``String`.
41+
* Fixed Javadoc.
42+
43+
### Removed
44+
* **Removed** deviceDetails and networkId fields `MessagesApiDeliveryResult`.
45+
846
## [ [6.0.0](https://github.com/infobip/infobip-api-java-client/releases/tag/6.0.0) ] - 2025-02-17
947

1048
🎉 **NEW Major Version of `infobip-api-java-client`.**

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ please follow these guidelines to help us understand your proposal and evaluate
3838
* **Open a New Enhancement Issue** - if your suggestion is new, please open a new issue and prefix it with "ENHANCEMENT" or "SUGGESTION".
3939
Please try to title your issue as clearly as possible to summarize your enhancement idea.
4040
* **Provide a Detailed Description** - in your issue description, try to include as much of the following information:
41-
* **Problem:** What problem does this enhancement solve? Why is this feature needed?
42-
* **Proposed Solution:** Describe the enhancement or feature you’re suggesting. How should it work? Provide as much detail as possible.
43-
* **Alternatives Considered:** Have you thought of other ways to solve the problem? If so, briefly explain why your proposed solution is better.
44-
* **Additional Context:** Share any examples, mockups, screenshots, or links to similar implementations (if applicable).
41+
* **Problem:** What problem does this enhancement solve? Why is this feature needed?
42+
* **Proposed Solution:** Describe the enhancement or feature you’re suggesting. How should it work? Provide as much detail as possible.
43+
* **Alternatives Considered:** Have you thought of other ways to solve the problem? If so, briefly explain why your proposed solution is better.
44+
* **Additional Context:** Share any examples, mockups, screenshots, or links to similar implementations (if applicable).
4545
* **Stay Focused and Specific** - try to keep your enhancement idea focused on a single problem or feature. If you have multiple ideas, consider creating separate issues for each to make the discussion easier to follow.
4646
* **Be Open to Feedback** - we encourage healthy discussion about proposed enhancements. Be open to feedback, as maintainers and other contributors may have questions or alternative suggestions.
4747
* **Contribute the Enhancement** - if you want implement your suggestion or if you're interested in working on the other people's enhancements yourself, please check the [Pull request](#%EF%B8%8F-pull-request) section on how to do that.

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The current version of this library includes this subset of Infobip products:
2727
* [SMS](https://www.infobip.com/docs/api/channels/sms)
2828
* [MMS](https://www.infobip.com/docs/api/channels/mms)
2929
* [Voice](https://www.infobip.com/docs/api/channels/voice)
30-
* [WebRTC](https://www.infobip.com/docs/api/channels/webrtc)
30+
* [WebRTC](https://www.infobip.com/docs/api/channels/webrtc-calls/webrtc)
3131
* [Email](https://www.infobip.com/docs/api/channels/email)
3232
* [WhatsApp](https://www.infobip.com/docs/api/channels/whatsapp)
3333
* [Viber](https://www.infobip.com/docs/api/channels/viber)
@@ -47,9 +47,9 @@ The library requires Java 11 and is compatible up to and including Java 19.
4747
Simply add the following in your project's POM file under `dependencies` tag:
4848
```xml
4949
<dependency>
50-
<groupId>com.infobip</groupId>
51-
<artifactId>infobip-api-java-client</artifactId>
52-
<version>6.0.0</version>
50+
<groupId>com.infobip</groupId>
51+
<artifactId>infobip-api-java-client</artifactId>
52+
<version>6.1.0</version>
5353
</dependency>
5454
```
5555

@@ -91,7 +91,7 @@ See below, a simple example of sending a single SMS message to a single recipien
9191
.sender("InfoSMS")
9292
.addDestinationsItem(new SmsDestination().to("41793026727"))
9393
.content(new SmsTextContent().text("Hello World from infobip-api-java-client!"));
94-
94+
9595
SmsRequest smsMessageRequest = new SmsRequest()
9696
.messages(List.of(message));
9797
```
@@ -146,22 +146,24 @@ Example of webhook implementation with Spring Web framework:
146146
@PostMapping("/delivery-reports")
147147
public void receiveDeliveryReports(HttpServletRequest request) throws IOException {
148148
SmsDeliveryResult reports = new JSON().deserialize(request.getInputStream(), SmsDeliveryResult.class);
149+
149150
for (SmsDeliveryReport report : reports.getResults()) {
150151
System.out.println(report.getMessageId() + " - " + report.getStatus().getName());
151152
}
152153
}
153154
```
154-
If you prefer to use your own serializer, make note of the supported [date format](https://www.infobip.com/docs/essentials/integration-best-practices#date-formats).
155+
If you prefer to use your own serializer, make note of the supported [date format](https://www.infobip.com/docs/essentials/api-essentials/integration-best-practices#date-formats).
155156
You can always take a look at our [implementation](https://github.com/infobip/infobip-api-java-client/blob/master/src/main/java/com/infobip/JSON.java).
156157

157158
#### Fetching delivery reports
158159
If you are for any reason unable to receive real-time delivery reports on your endpoint, you can use `messageId` or `bulkId` to fetch them.
159-
Each request will return a batch of delivery reports - only once. See [documentation](https://www.infobip.com/docs/api/channels/sms/sms-messaging/logs-and-status-reports/get-outbound-sms-message-delivery-reports) for more details.
160+
Each request will return a batch of delivery reports - only once. See [documentation](https://www.infobip.com/docs/api/channels/sms/logs-and-status-reports/get-outbound-sms-message-delivery-reports-v3) for more details.
160161

161162
```java
162163
SmsDeliveryResult deliveryResult = smsApi.getOutboundSmsMessageDeliveryReports()
163164
.bulkId("bulkId")
164165
.execute();
166+
165167
for (SmsDeliveryReport report : deliveryResult.getResults()) {
166168
System.out.println(report.getMessageId() + " - " + report.getStatus().getName());
167169
}
@@ -173,9 +175,11 @@ Infobip API supports Unicode characters and automatically detects encoding. Unic
173175
```java
174176
SmsPreviewRequest smsPreviewRequest = new SmsPreviewRequest()
175177
.text("Let's see how many characters will remain unused in this message.");
178+
176179
SmsPreviewResponse previewResponse = smsApi
177180
.previewSmsMessage(smsPreviewRequest)
178181
.execute();
182+
179183
System.out.println(previewResponse);
180184
```
181185

messages-api.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ The first step is to create an `ApiClient` instance with some configuration.
88

99
````java
1010
ApiClient apiClient = ApiClient.forApiKey(ApiKey.from(API_KEY))
11-
.withBaseUrl(BaseUrl.from(BASE_URL))
12-
.build();
11+
.withBaseUrl(BaseUrl.from(BASE_URL))
12+
.build();
1313
````
1414

1515
With that ready, you can now create an instance of `MessagesApi` which allows you to send messages using Messages API.
@@ -61,7 +61,7 @@ The easiest way to start with Messages API is to send a text message. First you
6161
Send the message invoking the appropriate send method and store the results in a new variable.
6262

6363
````java
64-
MessagesApiResponse messageInfo = null;
64+
MessageResponse messageInfo = null;
6565
try {
6666
messageInfo = messagesApi
6767
.sendMessagesApiMessage(messagesApiRequest)

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.infobip</groupId>
66
<artifactId>infobip-api-java-client</artifactId>
7-
<version>6.0.0</version>
7+
<version>6.1.0</version>
88
<packaging>jar</packaging>
99

1010
<name>infobip-api-java-client</name>

src/main/java/com/infobip/RequestFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*/
2727
final class RequestFactory {
2828

29-
private static final String USER_AGENT_HEADER_VALUE = "infobip-api-client-java/6.0.0";
29+
private static final String USER_AGENT_HEADER_VALUE = "infobip-api-client-java/6.1.0";
3030

3131
private final ApiKey apiKey;
3232
private final BaseUrl baseUrl;

src/main/java/com/infobip/api/CallsApi.java

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
import com.infobip.model.CallsConfigurationUpdateRequest;
5151
import com.infobip.model.CallsConnectRequest;
5252
import com.infobip.model.CallsConnectWithNewCallRequest;
53-
import com.infobip.model.CallsCountryList;
5453
import com.infobip.model.CallsCreateSipTrunkResponse;
5554
import com.infobip.model.CallsDialogBroadcastWebrtcTextRequest;
5655
import com.infobip.model.CallsDialogLogPage;
@@ -77,12 +76,13 @@
7776
import com.infobip.model.CallsOnDemandComposition;
7877
import com.infobip.model.CallsPlayRequest;
7978
import com.infobip.model.CallsPreAnswerRequest;
79+
import com.infobip.model.CallsPublicCountry;
80+
import com.infobip.model.CallsPublicRegion;
8081
import com.infobip.model.CallsPublicSipTrunkServiceAddress;
8182
import com.infobip.model.CallsPublicSipTrunkServiceAddressRequest;
8283
import com.infobip.model.CallsRecordingFile;
8384
import com.infobip.model.CallsRecordingLocation;
8485
import com.infobip.model.CallsRecordingStartRequest;
85-
import com.infobip.model.CallsRegionList;
8686
import com.infobip.model.CallsRescheduleRequest;
8787
import com.infobip.model.CallsSayRequest;
8888
import com.infobip.model.CallsSipTrunkPage;
@@ -100,6 +100,7 @@
100100
import com.infobip.model.CallsUpdateRequest;
101101
import java.io.File;
102102
import java.time.OffsetDateTime;
103+
import java.util.List;
103104
import java.util.Objects;
104105

105106
/**
@@ -5837,12 +5838,13 @@ private GetCountriesRequest() {}
58375838
/**
58385839
* Executes the getCountries request.
58395840
*
5840-
* @return CallsCountryList The deserialized response.
5841+
* @return List&lt;CallsPublicCountry&gt; The deserialized response.
58415842
* @throws ApiException If the API call fails or an error occurs during the request or response processing.
58425843
*/
5843-
public CallsCountryList execute() throws ApiException {
5844+
public List<CallsPublicCountry> execute() throws ApiException {
58445845
RequestDefinition getCountriesDefinition = getCountriesDefinition();
5845-
return apiClient.execute(getCountriesDefinition, new TypeReference<CallsCountryList>() {}.getType());
5846+
return apiClient.execute(
5847+
getCountriesDefinition, new TypeReference<List<CallsPublicCountry>>() {}.getType());
58465848
}
58475849

58485850
/**
@@ -5851,10 +5853,10 @@ public CallsCountryList execute() throws ApiException {
58515853
* @param callback The {@link ApiCallback} to be invoked.
58525854
* @return The {@link okhttp3.Call} associated with the API request.
58535855
*/
5854-
public okhttp3.Call executeAsync(ApiCallback<CallsCountryList> callback) {
5856+
public okhttp3.Call executeAsync(ApiCallback<List<CallsPublicCountry>> callback) {
58555857
RequestDefinition getCountriesDefinition = getCountriesDefinition();
58565858
return apiClient.executeAsync(
5857-
getCountriesDefinition, new TypeReference<CallsCountryList>() {}.getType(), callback);
5859+
getCountriesDefinition, new TypeReference<List<CallsPublicCountry>>() {}.getType(), callback);
58585860
}
58595861
}
58605862

@@ -6908,12 +6910,12 @@ private GetRegionsRequest(String countryCode) {
69086910
/**
69096911
* Executes the getRegions request.
69106912
*
6911-
* @return CallsRegionList The deserialized response.
6913+
* @return List&lt;CallsPublicRegion&gt; The deserialized response.
69126914
* @throws ApiException If the API call fails or an error occurs during the request or response processing.
69136915
*/
6914-
public CallsRegionList execute() throws ApiException {
6916+
public List<CallsPublicRegion> execute() throws ApiException {
69156917
RequestDefinition getRegionsDefinition = getRegionsDefinition(countryCode);
6916-
return apiClient.execute(getRegionsDefinition, new TypeReference<CallsRegionList>() {}.getType());
6918+
return apiClient.execute(getRegionsDefinition, new TypeReference<List<CallsPublicRegion>>() {}.getType());
69176919
}
69186920

69196921
/**
@@ -6922,10 +6924,10 @@ public CallsRegionList execute() throws ApiException {
69226924
* @param callback The {@link ApiCallback} to be invoked.
69236925
* @return The {@link okhttp3.Call} associated with the API request.
69246926
*/
6925-
public okhttp3.Call executeAsync(ApiCallback<CallsRegionList> callback) {
6927+
public okhttp3.Call executeAsync(ApiCallback<List<CallsPublicRegion>> callback) {
69266928
RequestDefinition getRegionsDefinition = getRegionsDefinition(countryCode);
69276929
return apiClient.executeAsync(
6928-
getRegionsDefinition, new TypeReference<CallsRegionList>() {}.getType(), callback);
6930+
getRegionsDefinition, new TypeReference<List<CallsPublicRegion>>() {}.getType(), callback);
69296931
}
69306932
}
69316933

src/main/java/com/infobip/api/EmailApi.java

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1933,6 +1933,7 @@ private RequestDefinition sendEmailDefinition(
19331933
Boolean track,
19341934
Boolean trackClicks,
19351935
Boolean trackOpens,
1936+
String trackingPixelPosition,
19361937
String trackingUrl,
19371938
String bulkId,
19381939
String messageId,
@@ -2007,6 +2008,9 @@ private RequestDefinition sendEmailDefinition(
20072008
if (trackOpens != null) {
20082009
builder.addFormParameter(new Parameter("trackOpens", trackOpens));
20092010
}
2011+
if (trackingPixelPosition != null) {
2012+
builder.addFormParameter(new Parameter("trackingPixelPosition", trackingPixelPosition));
2013+
}
20102014
if (trackingUrl != null) {
20112015
builder.addFormParameter(new Parameter("trackingUrl", trackingUrl));
20122016
}
@@ -2077,6 +2081,7 @@ public class SendEmailRequest {
20772081
private Boolean track;
20782082
private Boolean trackClicks;
20792083
private Boolean trackOpens;
2084+
private String trackingPixelPosition;
20802085
private String trackingUrl;
20812086
private String bulkId;
20822087
private String messageId;
@@ -2177,7 +2182,7 @@ public SendEmailRequest ampHtml(String ampHtml) {
21772182
/**
21782183
* Sets templateId.
21792184
*
2180-
* @param templateId Template ID used for generating email content. The template is created over Infobip web interface. If &#x60;templateId&#x60; is present, then &#x60;html&#x60; and &#x60;text&#x60; values are ignored. Note: &#x60;templateId&#x60; only supports the value of &#x60;Broadcast&#x60;. &#x60;Content&#x60; and &#x60;Flow&#x60; are not supported. (optional)
2185+
* @param templateId Template ID used for generating email content. The template is created over Infobip web interface or via the [Infobip Templates API](https://www.infobip.com/docs/api/channels/email/templates). If &#x60;templateId&#x60; is present, then &#x60;html&#x60; and &#x60;text&#x60; values are ignored. Note: &#x60;templateId&#x60; only supports the value of &#x60;Broadcast&#x60;. &#x60;Content&#x60; and &#x60;Flow&#x60; are not supported. (optional)
21812186
* @return SendEmailRequest
21822187
*/
21832188
public SendEmailRequest templateId(Long templateId) {
@@ -2284,6 +2289,17 @@ public SendEmailRequest trackOpens(Boolean trackOpens) {
22842289
return this;
22852290
}
22862291

2292+
/**
2293+
* Sets trackingPixelPosition.
2294+
*
2295+
* @param trackingPixelPosition This parameter specifies the position of the open tracking pixel within the email content. Allowed values are &#x60;TOP&#x60; and &#x60;BOTTOM&#x60;. If no value is provided, the default is &#x60;TOP&#x60;. (optional)
2296+
* @return SendEmailRequest
2297+
*/
2298+
public SendEmailRequest trackingPixelPosition(String trackingPixelPosition) {
2299+
this.trackingPixelPosition = trackingPixelPosition;
2300+
return this;
2301+
}
2302+
22872303
/**
22882304
* Sets trackingUrl.
22892305
*
@@ -2475,6 +2491,7 @@ public EmailSendResponse execute() throws ApiException {
24752491
track,
24762492
trackClicks,
24772493
trackOpens,
2494+
trackingPixelPosition,
24782495
trackingUrl,
24792496
bulkId,
24802497
messageId,
@@ -2519,6 +2536,7 @@ public okhttp3.Call executeAsync(ApiCallback<EmailSendResponse> callback) {
25192536
track,
25202537
trackClicks,
25212538
trackOpens,
2539+
trackingPixelPosition,
25222540
trackingUrl,
25232541
bulkId,
25242542
messageId,

src/main/java/com/infobip/api/FormsApi.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import com.infobip.model.FormsResponseContent;
2020
import com.infobip.model.FormsStatus;
2121
import com.infobip.model.FormsStatusResponse;
22-
import com.infobip.model.FormsType;
2322
import java.util.Map;
2423
import java.util.Objects;
2524

@@ -97,7 +96,7 @@ public GetFormRequest getForm(String id) {
9796
}
9897

9998
private RequestDefinition getFormsDefinition(
100-
Integer offset, Integer limit, FormsType formType, FormsStatus formStatus) {
99+
Integer offset, Integer limit, String formType, FormsStatus formStatus) {
101100
RequestDefinition.Builder builder = RequestDefinition.builder("GET", "/forms/1/forms")
102101
.requiresAuthentication(true)
103102
.accept("application/json");
@@ -123,7 +122,7 @@ private RequestDefinition getFormsDefinition(
123122
public class GetFormsRequest {
124123
private Integer offset;
125124
private Integer limit;
126-
private FormsType formType;
125+
private String formType;
127126
private FormsStatus formStatus;
128127

129128
private GetFormsRequest() {}
@@ -156,7 +155,7 @@ public GetFormsRequest limit(Integer limit) {
156155
* @param formType The type of returned forms. (optional)
157156
* @return GetFormsRequest
158157
*/
159-
public GetFormsRequest formType(FormsType formType) {
158+
public GetFormsRequest formType(String formType) {
160159
this.formType = formType;
161160
return this;
162161
}

0 commit comments

Comments
 (0)