Skip to content

Commit ede85fe

Browse files
committed
SMS stack update. Release 6.1.1
1 parent 62288d7 commit ede85fe

File tree

10 files changed

+268
-20
lines changed

10 files changed

+268
-20
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ 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.1](https://github.com/infobip/infobip-api-java-client/releases/tag/6.1.1) ] - 2025-06-20
9+
10+
### Added
11+
* Most recent feature set for [Infobip SMS API](https://www.infobip.com/docs/api/channels/sms).
12+
* Cursor-based pagination support in `getOutboundSmsMessageLogs` function with `useCursor` and `cursor` parameters.
13+
14+
### Changed
15+
* `SmsLogsResponse` now includes cursor field to support cursor-based pagination.
16+
* Updated Javadoc documentation for `SmsMessageDeliveryReporting`.
17+
818
## [ [6.1.0](https://github.com/infobip/infobip-api-java-client/releases/tag/6.1.0) ] - 2025-04-09
919

1020
⚠️ **IMPORTANT NOTE:** This release contains compile time breaking changes.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Simply add the following in your project's POM file under `dependencies` tag:
4949
<dependency>
5050
<groupId>com.infobip</groupId>
5151
<artifactId>infobip-api-java-client</artifactId>
52-
<version>6.1.0</version>
52+
<version>6.1.1</version>
5353
</dependency>
5454
```
5555

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.1.0</version>
7+
<version>6.1.1</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.1.0";
29+
private static final String USER_AGENT_HEADER_VALUE = "infobip-api-client-java/6.1.1";
3030

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

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

Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,9 @@ private RequestDefinition getOutboundSmsMessageLogsDefinition(
331331
Integer limit,
332332
String entityId,
333333
String applicationId,
334-
List<String> campaignReferenceId) {
334+
List<String> campaignReferenceId,
335+
Boolean useCursor,
336+
String cursor) {
335337
RequestDefinition.Builder builder = RequestDefinition.builder("GET", "/sms/3/logs")
336338
.requiresAuthentication(true)
337339
.accept("application/json");
@@ -381,6 +383,12 @@ private RequestDefinition getOutboundSmsMessageLogsDefinition(
381383
builder.addQueryParameter(new Parameter("campaignReferenceId", parameterItem));
382384
}
383385
}
386+
if (useCursor != null) {
387+
builder.addQueryParameter(new Parameter("useCursor", useCursor));
388+
}
389+
if (cursor != null) {
390+
builder.addQueryParameter(new Parameter("cursor", cursor));
391+
}
384392
return builder.build();
385393
}
386394

@@ -401,6 +409,8 @@ public class GetOutboundSmsMessageLogsRequest {
401409
private String entityId;
402410
private String applicationId;
403411
private List<String> campaignReferenceId;
412+
private Boolean useCursor;
413+
private String cursor;
404414

405415
private GetOutboundSmsMessageLogsRequest() {}
406416

@@ -547,6 +557,28 @@ public GetOutboundSmsMessageLogsRequest campaignReferenceId(List<String> campaig
547557
return this;
548558
}
549559

560+
/**
561+
* Sets useCursor.
562+
*
563+
* @param useCursor Flag used to enable cursor-based pagination. When set to true, the system will use the cursor to fetch the next set of logs. (optional)
564+
* @return GetOutboundSmsMessageLogsRequest
565+
*/
566+
public GetOutboundSmsMessageLogsRequest useCursor(Boolean useCursor) {
567+
this.useCursor = useCursor;
568+
return this;
569+
}
570+
571+
/**
572+
* Sets cursor.
573+
*
574+
* @param cursor Value which represents the current position in the data set. For the first request, this field shouldn&#39;t be defined. In subsequent requests, use the &#x60;nextCursor&#x60; value returned from the previous response to continue fetching data. (optional)
575+
* @return GetOutboundSmsMessageLogsRequest
576+
*/
577+
public GetOutboundSmsMessageLogsRequest cursor(String cursor) {
578+
this.cursor = cursor;
579+
return this;
580+
}
581+
550582
/**
551583
* Executes the getOutboundSmsMessageLogs request.
552584
*
@@ -567,7 +599,9 @@ public SmsLogsResponse execute() throws ApiException {
567599
limit,
568600
entityId,
569601
applicationId,
570-
campaignReferenceId);
602+
campaignReferenceId,
603+
useCursor,
604+
cursor);
571605
return apiClient.execute(
572606
getOutboundSmsMessageLogsDefinition, new TypeReference<SmsLogsResponse>() {}.getType());
573607
}
@@ -592,7 +626,9 @@ public okhttp3.Call executeAsync(ApiCallback<SmsLogsResponse> callback) {
592626
limit,
593627
entityId,
594628
applicationId,
595-
campaignReferenceId);
629+
campaignReferenceId,
630+
useCursor,
631+
cursor);
596632
return apiClient.executeAsync(
597633
getOutboundSmsMessageLogsDefinition, new TypeReference<SmsLogsResponse>() {}.getType(), callback);
598634
}
@@ -659,7 +695,7 @@ public okhttp3.Call executeAsync(ApiCallback<SmsBulkResponse> callback) {
659695
/**
660696
* Get scheduled SMS messages.
661697
* <p>
662-
* See all scheduled messages and their scheduled date and time. To schedule a message, use the &#x60;sendAt&#x60; field when [sending a message](https://www.infobip.com/docs/api/channels/sms/sms-messaging/outbound-sms/send-sms-message).
698+
* See all [scheduled messages](https://www.infobip.com/docs/sms/sms-over-api#schedule-sms) and their scheduled date and time. To schedule a message, use the &#x60;sendAt&#x60; field when [sending a message](https://www.infobip.com/docs/api/channels/sms/sms-messaging/outbound-sms/send-sms-message).
663699
*
664700
* @param bulkId (required)
665701
* @return GetScheduledSmsMessagesRequest
@@ -720,7 +756,7 @@ public okhttp3.Call executeAsync(ApiCallback<SmsBulkStatusResponse> callback) {
720756
/**
721757
* Get scheduled SMS messages status.
722758
* <p>
723-
* See the status of scheduled messages. To schedule a message, use the &#x60;sendAt&#x60; field when [sending a message](https://www.infobip.com/docs/api/channels/sms/sms-messaging/outbound-sms/send-sms-message).
759+
* See the status of [scheduled messages](https://www.infobip.com/docs/sms/sms-over-api#schedule-sms). To schedule a message, use the &#x60;sendAt&#x60; field when [sending a message](https://www.infobip.com/docs/api/channels/sms/sms-messaging/outbound-sms/send-sms-message).
724760
*
725761
* @param bulkId (required)
726762
* @return GetScheduledSmsMessagesStatusRequest
@@ -842,7 +878,7 @@ public okhttp3.Call executeAsync(ApiCallback<SmsBulkResponse> callback) {
842878
/**
843879
* Reschedule SMS messages.
844880
* <p>
845-
* Change the date and time of already scheduled messages. To schedule a message, use the &#x60;sendAt&#x60; field when [sending a message](https://www.infobip.com/docs/api/channels/sms/sms-messaging/outbound-sms/send-sms-message).
881+
* Change the date and time of already [scheduled messages](https://www.infobip.com/docs/sms/sms-over-api#schedule-sms). To schedule a message, use the &#x60;sendAt&#x60; field when [sending a message](https://www.infobip.com/docs/api/channels/sms/sms-messaging/outbound-sms/send-sms-message).
846882
*
847883
* @param bulkId (required)
848884
* @param smsBulkRequest (required)
@@ -970,7 +1006,7 @@ public okhttp3.Call executeAsync(ApiCallback<SmsBulkStatusResponse> callback) {
9701006
/**
9711007
* Update scheduled SMS messages status.
9721008
* <p>
973-
* Change the status or completely cancel sending of scheduled messages. To schedule a message, use the &#x60;sendAt&#x60; field when [sending a message](https://www.infobip.com/docs/api/channels/sms/sms-messaging/outbound-sms/send-sms-message).
1009+
* Change the status or completely cancel sending of [scheduled messages](https://www.infobip.com/docs/sms/sms-over-api#schedule-sms). To schedule a message, use the &#x60;sendAt&#x60; field when [sending a message](https://www.infobip.com/docs/api/channels/sms/sms-messaging/outbound-sms/send-sms-message).
9741010
*
9751011
* @param bulkId (required)
9761012
* @param smsUpdateStatusRequest (required)
Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
/*
2+
* This class is auto generated from the Infobip OpenAPI specification
3+
* through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR),
4+
* powered by the OpenAPI Generator (https://openapi-generator.tech).
5+
*
6+
* Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide
7+
* or contact us @ [email protected].
8+
*/
9+
10+
package com.infobip.model;
11+
12+
import com.fasterxml.jackson.annotation.JsonProperty;
13+
import java.util.Objects;
14+
15+
/**
16+
* Cursor information.
17+
*/
18+
public class SmsCursorPageInfo {
19+
20+
private Integer limit;
21+
22+
private String nextCursor;
23+
24+
/**
25+
* Sets limit.
26+
* <p>
27+
* Field description:
28+
* Requested limit.
29+
*
30+
* @param limit
31+
* @return This {@link SmsCursorPageInfo instance}.
32+
*/
33+
public SmsCursorPageInfo limit(Integer limit) {
34+
this.limit = limit;
35+
return this;
36+
}
37+
38+
/**
39+
* Returns limit.
40+
* <p>
41+
* Field description:
42+
* Requested limit.
43+
*
44+
* @return limit
45+
*/
46+
@JsonProperty("limit")
47+
public Integer getLimit() {
48+
return limit;
49+
}
50+
51+
/**
52+
* Sets limit.
53+
* <p>
54+
* Field description:
55+
* Requested limit.
56+
*
57+
* @param limit
58+
*/
59+
@JsonProperty("limit")
60+
public void setLimit(Integer limit) {
61+
this.limit = limit;
62+
}
63+
64+
/**
65+
* Sets nextCursor.
66+
* <p>
67+
* Field description:
68+
* The &#x60;cursor&#x60; value you will use in your next request to fetch the subsequent set of results.
69+
*
70+
* @param nextCursor
71+
* @return This {@link SmsCursorPageInfo instance}.
72+
*/
73+
public SmsCursorPageInfo nextCursor(String nextCursor) {
74+
this.nextCursor = nextCursor;
75+
return this;
76+
}
77+
78+
/**
79+
* Returns nextCursor.
80+
* <p>
81+
* Field description:
82+
* The &#x60;cursor&#x60; value you will use in your next request to fetch the subsequent set of results.
83+
*
84+
* @return nextCursor
85+
*/
86+
@JsonProperty("nextCursor")
87+
public String getNextCursor() {
88+
return nextCursor;
89+
}
90+
91+
/**
92+
* Sets nextCursor.
93+
* <p>
94+
* Field description:
95+
* The &#x60;cursor&#x60; value you will use in your next request to fetch the subsequent set of results.
96+
*
97+
* @param nextCursor
98+
*/
99+
@JsonProperty("nextCursor")
100+
public void setNextCursor(String nextCursor) {
101+
this.nextCursor = nextCursor;
102+
}
103+
104+
@Override
105+
public boolean equals(Object o) {
106+
if (this == o) {
107+
return true;
108+
}
109+
if (o == null || getClass() != o.getClass()) {
110+
return false;
111+
}
112+
SmsCursorPageInfo smsCursorPageInfo = (SmsCursorPageInfo) o;
113+
return Objects.equals(this.limit, smsCursorPageInfo.limit)
114+
&& Objects.equals(this.nextCursor, smsCursorPageInfo.nextCursor);
115+
}
116+
117+
@Override
118+
public int hashCode() {
119+
return Objects.hash(limit, nextCursor);
120+
}
121+
122+
@Override
123+
public String toString() {
124+
String newLine = System.lineSeparator();
125+
return new StringBuilder()
126+
.append("class SmsCursorPageInfo {")
127+
.append(newLine)
128+
.append(" limit: ")
129+
.append(toIndentedString(limit))
130+
.append(newLine)
131+
.append(" nextCursor: ")
132+
.append(toIndentedString(nextCursor))
133+
.append(newLine)
134+
.append("}")
135+
.toString();
136+
}
137+
138+
private String toIndentedString(Object o) {
139+
if (o == null) {
140+
return "null";
141+
}
142+
String lineSeparator = System.lineSeparator();
143+
String lineSeparatorFollowedByIndentation = lineSeparator + " ";
144+
return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation);
145+
}
146+
}

src/main/java/com/infobip/model/SmsLogsResponse.java

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ public class SmsLogsResponse {
2121

2222
private List<SmsLog> results = null;
2323

24+
private SmsCursorPageInfo cursor;
25+
2426
/**
2527
* Sets results.
2628
* <p>
@@ -78,6 +80,37 @@ public void setResults(List<SmsLog> results) {
7880
this.results = results;
7981
}
8082

83+
/**
84+
* Sets cursor.
85+
*
86+
* @param cursor
87+
* @return This {@link SmsLogsResponse instance}.
88+
*/
89+
public SmsLogsResponse cursor(SmsCursorPageInfo cursor) {
90+
this.cursor = cursor;
91+
return this;
92+
}
93+
94+
/**
95+
* Returns cursor.
96+
*
97+
* @return cursor
98+
*/
99+
@JsonProperty("cursor")
100+
public SmsCursorPageInfo getCursor() {
101+
return cursor;
102+
}
103+
104+
/**
105+
* Sets cursor.
106+
*
107+
* @param cursor
108+
*/
109+
@JsonProperty("cursor")
110+
public void setCursor(SmsCursorPageInfo cursor) {
111+
this.cursor = cursor;
112+
}
113+
81114
@Override
82115
public boolean equals(Object o) {
83116
if (this == o) {
@@ -87,12 +120,13 @@ public boolean equals(Object o) {
87120
return false;
88121
}
89122
SmsLogsResponse smsLogsResponse = (SmsLogsResponse) o;
90-
return Objects.equals(this.results, smsLogsResponse.results);
123+
return Objects.equals(this.results, smsLogsResponse.results)
124+
&& Objects.equals(this.cursor, smsLogsResponse.cursor);
91125
}
92126

93127
@Override
94128
public int hashCode() {
95-
return Objects.hash(results);
129+
return Objects.hash(results, cursor);
96130
}
97131

98132
@Override
@@ -104,6 +138,9 @@ public String toString() {
104138
.append(" results: ")
105139
.append(toIndentedString(results))
106140
.append(newLine)
141+
.append(" cursor: ")
142+
.append(toIndentedString(cursor))
143+
.append(newLine)
107144
.append("}")
108145
.toString();
109146
}

0 commit comments

Comments
 (0)