Skip to content

Commit 69e10c1

Browse files
author
infobip-ci
committed
Update to version 4.3.1
1 parent d60f1be commit 69e10c1

14 files changed

+141
-71
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@ 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+
## [ [4.3.1](https://github.com/infobip/infobip-api-java-client/releases/tag/4.3.1) ] - 2024-06-05
9+
10+
### Added
11+
* Most recent [Infobip SMS API](https://www.infobip.com/docs/api/channels/sms) feature set.
12+
13+
### Changed
14+
* **Fixes and changes**
15+
* Changed [SmsTurkeyIysOptions](src/main/java/com/infobip/model/SmsTurkeyIysOptions.java) model, previously nested enum 'RecipientTypeEnum' is now extracted to a separate class: [SmsIysRecipientType](src/main/java/com/infobip/model/SmsIysRecipientType.java).
16+
* Expanded [ApiExceptionDetailsResolver](src/main/java/com/infobip/ApiExceptionDetails.java) model with additional error response that the API might return.
17+
18+
* **Documentation**
19+
* Fixed Javadoc.
20+
21+
822
## [ [4.3.0](https://github.com/infobip/infobip-api-java-client/releases/tag/4.3.0) ] - 2024-03-19
923

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

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ To use this, you'll need an Infobip account. You can create a [free trial][freet
1010

1111
`infobip-api-java-client` is built on top of [OpenAPI Specification](https://spec.openapis.org/oas/latest.html), generated by [Infobip OSCAR](https://www.youtube.com/watch?v=XC8oVn_efTw) service powered by [OpenAPI Generator](https://openapi-generator.tech/).
1212

13-
<img src="https://udesigncss.com/wp-content/uploads/2020/01/Infobip-logo-transparent.png" height="48px" alt="Infobip" />
13+
<br/>
14+
<img src="https://cdn-web.infobip.com/uploads/2023/01/Infobip-logo.svg" height="48px" alt="Infobip" />
1415

1516
#### Table of contents:
1617
* [Documentation](#documentation)
@@ -47,7 +48,7 @@ Simply add the following in your project's POM file under `dependencies` tag:
4748
<dependency>
4849
<groupId>com.infobip</groupId>
4950
<artifactId>infobip-api-java-client</artifactId>
50-
<version>4.3.0</version>
51+
<version>4.3.1</version>
5152
</dependency>
5253
```
5354

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>4.3.0</version>
7+
<version>4.3.1</version>
88
<packaging>jar</packaging>
99

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

src/main/java/com/infobip/ApiExceptionDetailsResolver.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ final class ApiExceptionDetailsResolver {
1818
private static final Map<String, String> errorCodes = Map.of(
1919
"BAD_REQUEST", "E400",
2020
"UNAUTHORIZED", "E401",
21+
"FORBIDDEN", "E403",
2122
"NOT_FOUND", "E404",
2223
"TOO_MANY_REQUESTS", "E429",
2324
"GENERAL_ERROR", "E500");

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

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

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

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ public GetOutboundSmsMessageLogsRequest to(String to) {
384384
/**
385385
* Sets bulkId.
386386
*
387-
* @param bulkId Unique ID assigned to the request if messaging multiple recipients or sending multiple messages via a single API request. (optional)
387+
* @param bulkId Unique ID assigned to the request if messaging multiple recipients or sending multiple messages via a single API request. May contain multiple comma-separated values. Maximum length 2048 characters. (optional)
388388
* @return GetOutboundSmsMessageLogsRequest
389389
*/
390390
public GetOutboundSmsMessageLogsRequest bulkId(List<String> bulkId) {
@@ -395,7 +395,7 @@ public GetOutboundSmsMessageLogsRequest bulkId(List<String> bulkId) {
395395
/**
396396
* Sets messageId.
397397
*
398-
* @param messageId Unique message ID for which a log is requested. (optional)
398+
* @param messageId Unique message ID for which a log is requested. May contain multiple comma-separated values. Maximum length 2048 characters. (optional)
399399
* @return GetOutboundSmsMessageLogsRequest
400400
*/
401401
public GetOutboundSmsMessageLogsRequest messageId(List<String> messageId) {
@@ -496,7 +496,9 @@ public GetOutboundSmsMessageLogsRequest entityId(String entityId) {
496496
*
497497
* @return SmsLogsResponse The deserialized response.
498498
* @throws ApiException If the API call fails or an error occurs during the request or response processing.
499+
* @deprecated
499500
*/
501+
@Deprecated
500502
public SmsLogsResponse execute() throws ApiException {
501503
RequestDefinition getOutboundSmsMessageLogsDefinition = getOutboundSmsMessageLogsDefinition(
502504
from,
@@ -520,7 +522,9 @@ public SmsLogsResponse execute() throws ApiException {
520522
*
521523
* @param callback The {@link ApiCallback} to be invoked.
522524
* @return The {@link okhttp3.Call} associated with the API request.
525+
* @deprecated
523526
*/
527+
@Deprecated
524528
public okhttp3.Call executeAsync(ApiCallback<SmsLogsResponse> callback) {
525529
RequestDefinition getOutboundSmsMessageLogsDefinition = getOutboundSmsMessageLogsDefinition(
526530
from,
@@ -543,11 +547,13 @@ public okhttp3.Call executeAsync(ApiCallback<SmsLogsResponse> callback) {
543547
/**
544548
* Get outbound SMS message logs.
545549
* <p>
546-
* Use this method for displaying logs for example in the user interface. Available are the logs for the last 48 hours and you can only retrieve maximum of 1000 logs per call. See [message delivery reports](#channels/sms/get-outbound-sms-message-delivery-reports) if your use case is to verify message delivery.
550+
* Use this method for displaying logs for example in the user interface. Available are the logs for the last 48 hours and you can only retrieve maximum of 1000 logs per call. See [message delivery reports](#channels/sms/get-outbound-sms-message-delivery-reports) if your use case is to verify message delivery.\\ Although this endpoint remains functional, starting from May 16, 2024., we recommend transitioning to the new endpoint provided at [Get outbound SMS message delivery reports](#channels/sms/get-outbound-sms-message-logs-v3) for improved support and future updates.
547551
*
548552
* @return GetOutboundSmsMessageLogsRequest
553+
* @deprecated
549554
* @see <a href="https://www.infobip.com/docs/sms">Learn more about SMS channel and use cases</a>
550555
*/
556+
@Deprecated
551557
public GetOutboundSmsMessageLogsRequest getOutboundSmsMessageLogs() {
552558
return new GetOutboundSmsMessageLogsRequest();
553559
}
@@ -843,7 +849,7 @@ public okhttp3.Call executeAsync(ApiCallback<SmsResponse> callback) {
843849
/**
844850
* Send binary SMS message.
845851
* <p>
846-
* Send single or multiple binary messages to one or more destination address. The API response will not contain the final delivery status, use [Delivery Reports](https://www.infobip.com/docs/api/channels/sms/sms-messaging/logs-and-status-reports/receive-outbound-sms-message-report) instead.
852+
* Send single or multiple binary messages to one or more destination address. The API response will not contain the final delivery status, use [Delivery Reports](https://www.infobip.com/docs/api/channels/sms/sms-messaging/logs-and-status-reports/receive-outbound-sms-message-report) instead.\\ In light of improved features, this endpoint has been superseded. Please visit [Send SMS message](#channels/sms/send-sms-messages) for the next version.
847853
*
848854
* @param smsAdvancedBinaryRequest (required)
849855
* @return SendBinarySmsMessageRequest
@@ -901,7 +907,7 @@ public okhttp3.Call executeAsync(ApiCallback<SmsResponse> callback) {
901907
/**
902908
* Send SMS message.
903909
* <p>
904-
* Use this endpoint to send an SMS and set up a rich set of features, such as batch sending with a single API request, scheduling, URL tracking, language and transliteration configuration, etc. The API response will not contain the final delivery status, use [Delivery Reports](https://www.infobip.com/docs/api/channels/sms/sms-messaging/logs-and-status-reports/receive-outbound-sms-message-report) instead.
910+
* Use this endpoint to send an SMS and set up a rich set of features, such as batch sending with a single API request, scheduling, URL tracking, language and transliteration configuration, etc. The API response will not contain the final delivery status, use [Delivery Reports](https://www.infobip.com/docs/api/channels/sms/sms-messaging/logs-and-status-reports/receive-outbound-sms-message-report) instead.\\ In light of improved features, this endpoint has been superseded. Please visit [Send SMS message](#channels/sms/send-sms-messages) for the next version.
905911
*
906912
* @param smsAdvancedTextualRequest (required)
907913
* @return SendSmsMessageRequest

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public void setBinary(SmsBinaryContent binary) {
8383
* Sets callbackData.
8484
* <p>
8585
* Field description:
86-
* Additional client data that will be sent on the notifyUrl. The maximum value is 4000 characters.
86+
* Additional data that can be used for identifying, managing, or monitoring a message. Data included here will also be automatically included in the message [Delivery Report](#channels/sms/get-outbound-sms-message-delivery-reports). The maximum value is 4000 characters.
8787
*
8888
* @param callbackData
8989
* @return This {@link SmsBinaryMessage instance}.
@@ -97,7 +97,7 @@ public SmsBinaryMessage callbackData(String callbackData) {
9797
* Returns callbackData.
9898
* <p>
9999
* Field description:
100-
* Additional client data that will be sent on the notifyUrl. The maximum value is 4000 characters.
100+
* Additional data that can be used for identifying, managing, or monitoring a message. Data included here will also be automatically included in the message [Delivery Report](#channels/sms/get-outbound-sms-message-delivery-reports). The maximum value is 4000 characters.
101101
*
102102
* @return callbackData
103103
*/
@@ -110,7 +110,7 @@ public String getCallbackData() {
110110
* Sets callbackData.
111111
* <p>
112112
* Field description:
113-
* Additional client data that will be sent on the notifyUrl. The maximum value is 4000 characters.
113+
* Additional data that can be used for identifying, managing, or monitoring a message. Data included here will also be automatically included in the message [Delivery Report](#channels/sms/get-outbound-sms-message-delivery-reports). The maximum value is 4000 characters.
114114
*
115115
* @param callbackData
116116
*/
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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.JsonCreator;
13+
import com.fasterxml.jackson.annotation.JsonValue;
14+
15+
/**
16+
* Recipient Type must be &#x60;TACIR&#x60; or &#x60;BIREYSEL&#x60;.
17+
*/
18+
public enum SmsIysRecipientType {
19+
BIREYSEL("BIREYSEL"),
20+
TACIR("TACIR");
21+
22+
private final String value;
23+
24+
SmsIysRecipientType(String value) {
25+
this.value = value;
26+
}
27+
28+
@JsonValue
29+
public String getValue() {
30+
return value;
31+
}
32+
33+
@Override
34+
public String toString() {
35+
return String.valueOf(value);
36+
}
37+
38+
@JsonCreator
39+
public static SmsIysRecipientType fromValue(String value) {
40+
for (SmsIysRecipientType enumElement : SmsIysRecipientType.values()) {
41+
if (enumElement.value.equals(value)) {
42+
return enumElement;
43+
}
44+
}
45+
throw new IllegalArgumentException("Unexpected enum value '" + value + "'.");
46+
}
47+
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ public void setMccMnc(String mccMnc) {
370370
* Sets callbackData.
371371
* <p>
372372
* Field description:
373-
* Custom data sent over to the &#x60;notifyUrl&#x60;.
373+
* Callback data sent through ‛callbackData‛ field when sending message.
374374
*
375375
* @param callbackData
376376
* @return This {@link SmsReport instance}.
@@ -384,7 +384,7 @@ public SmsReport callbackData(String callbackData) {
384384
* Returns callbackData.
385385
* <p>
386386
* Field description:
387-
* Custom data sent over to the &#x60;notifyUrl&#x60;.
387+
* Callback data sent through ‛callbackData‛ field when sending message.
388388
*
389389
* @return callbackData
390390
*/
@@ -397,7 +397,7 @@ public String getCallbackData() {
397397
* Sets callbackData.
398398
* <p>
399399
* Field description:
400-
* Custom data sent over to the &#x60;notifyUrl&#x60;.
400+
* Callback data sent through ‛callbackData‛ field when sending message.
401401
*
402402
* @param callbackData
403403
*/

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

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ public class SmsSouthKoreaOptions {
1919

2020
private Integer resellerCode;
2121

22+
private String title;
23+
2224
/**
2325
* Sets resellerCode.
2426
* <p>
@@ -59,6 +61,46 @@ public void setResellerCode(Integer resellerCode) {
5961
this.resellerCode = resellerCode;
6062
}
6163

64+
/**
65+
* Sets title.
66+
* <p>
67+
* Field description:
68+
* Set the title or subject of a message. South Korea only.
69+
*
70+
* @param title
71+
* @return This {@link SmsSouthKoreaOptions instance}.
72+
*/
73+
public SmsSouthKoreaOptions title(String title) {
74+
this.title = title;
75+
return this;
76+
}
77+
78+
/**
79+
* Returns title.
80+
* <p>
81+
* Field description:
82+
* Set the title or subject of a message. South Korea only.
83+
*
84+
* @return title
85+
*/
86+
@JsonProperty("title")
87+
public String getTitle() {
88+
return title;
89+
}
90+
91+
/**
92+
* Sets title.
93+
* <p>
94+
* Field description:
95+
* Set the title or subject of a message. South Korea only.
96+
*
97+
* @param title
98+
*/
99+
@JsonProperty("title")
100+
public void setTitle(String title) {
101+
this.title = title;
102+
}
103+
62104
@Override
63105
public boolean equals(Object o) {
64106
if (this == o) {
@@ -68,12 +110,13 @@ public boolean equals(Object o) {
68110
return false;
69111
}
70112
SmsSouthKoreaOptions smsSouthKoreaOptions = (SmsSouthKoreaOptions) o;
71-
return Objects.equals(this.resellerCode, smsSouthKoreaOptions.resellerCode);
113+
return Objects.equals(this.resellerCode, smsSouthKoreaOptions.resellerCode)
114+
&& Objects.equals(this.title, smsSouthKoreaOptions.title);
72115
}
73116

74117
@Override
75118
public int hashCode() {
76-
return Objects.hash(resellerCode);
119+
return Objects.hash(resellerCode, title);
77120
}
78121

79122
@Override
@@ -85,6 +128,9 @@ public String toString() {
85128
.append(" resellerCode: ")
86129
.append(toIndentedString(resellerCode))
87130
.append(newLine)
131+
.append(" title: ")
132+
.append(toIndentedString(title))
133+
.append(newLine)
88134
.append("}")
89135
.toString();
90136
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public class SmsTextualMessage {
5656
* Sets callbackData.
5757
* <p>
5858
* Field description:
59-
* Additional data that can be used for identifying, managing, or monitoring a message. Data included here will also be automatically included in the message [Delivery Report](#channels/sms/get-outbound-sms-message-delivery-reports). The maximum value is 4000 characters and any overhead may be truncated.
59+
* Additional data that can be used for identifying, managing, or monitoring a message. Data included here will also be automatically included in the message [Delivery Report](#channels/sms/get-outbound-sms-message-delivery-reports). The maximum value is 4000 characters.
6060
*
6161
* @param callbackData
6262
* @return This {@link SmsTextualMessage instance}.
@@ -70,7 +70,7 @@ public SmsTextualMessage callbackData(String callbackData) {
7070
* Returns callbackData.
7171
* <p>
7272
* Field description:
73-
* Additional data that can be used for identifying, managing, or monitoring a message. Data included here will also be automatically included in the message [Delivery Report](#channels/sms/get-outbound-sms-message-delivery-reports). The maximum value is 4000 characters and any overhead may be truncated.
73+
* Additional data that can be used for identifying, managing, or monitoring a message. Data included here will also be automatically included in the message [Delivery Report](#channels/sms/get-outbound-sms-message-delivery-reports). The maximum value is 4000 characters.
7474
*
7575
* @return callbackData
7676
*/
@@ -83,7 +83,7 @@ public String getCallbackData() {
8383
* Sets callbackData.
8484
* <p>
8585
* Field description:
86-
* Additional data that can be used for identifying, managing, or monitoring a message. Data included here will also be automatically included in the message [Delivery Report](#channels/sms/get-outbound-sms-message-delivery-reports). The maximum value is 4000 characters and any overhead may be truncated.
86+
* Additional data that can be used for identifying, managing, or monitoring a message. Data included here will also be automatically included in the message [Delivery Report](#channels/sms/get-outbound-sms-message-delivery-reports). The maximum value is 4000 characters.
8787
*
8888
* @param callbackData
8989
*/

0 commit comments

Comments
 (0)