Skip to content

Commit

Permalink
Update to version 4.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
infobip-ci committed Jun 5, 2024
1 parent d60f1be commit 69e10c1
Show file tree
Hide file tree
Showing 14 changed files with 141 additions and 71 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ All notable changes to the library will be documented in this file.
The format of the file is based on [Keep a Changelog](http://keepachangelog.com/)
and this library adheres to [Semantic Versioning](http://semver.org/) as mentioned in [README.md][readme] file.

## [ [4.3.1](https://github.com/infobip/infobip-api-java-client/releases/tag/4.3.1) ] - 2024-06-05

### Added
* Most recent [Infobip SMS API](https://www.infobip.com/docs/api/channels/sms) feature set.

### Changed
* **Fixes and changes**
* 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).
* Expanded [ApiExceptionDetailsResolver](src/main/java/com/infobip/ApiExceptionDetails.java) model with additional error response that the API might return.

* **Documentation**
* Fixed Javadoc.


## [ [4.3.0](https://github.com/infobip/infobip-api-java-client/releases/tag/4.3.0) ] - 2024-03-19

⚠️ **IMPORTANT NOTE:** This release contains compile time breaking changes.
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ To use this, you'll need an Infobip account. You can create a [free trial][freet

`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/).

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

#### Table of contents:
* [Documentation](#documentation)
Expand Down Expand Up @@ -47,7 +48,7 @@ Simply add the following in your project's POM file under `dependencies` tag:
<dependency>
<groupId>com.infobip</groupId>
<artifactId>infobip-api-java-client</artifactId>
<version>4.3.0</version>
<version>4.3.1</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.infobip</groupId>
<artifactId>infobip-api-java-client</artifactId>
<version>4.3.0</version>
<version>4.3.1</version>
<packaging>jar</packaging>

<name>infobip-api-java-client</name>
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/infobip/ApiExceptionDetailsResolver.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ final class ApiExceptionDetailsResolver {
private static final Map<String, String> errorCodes = Map.of(
"BAD_REQUEST", "E400",
"UNAUTHORIZED", "E401",
"FORBIDDEN", "E403",
"NOT_FOUND", "E404",
"TOO_MANY_REQUESTS", "E429",
"GENERAL_ERROR", "E500");
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/infobip/RequestFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/
final class RequestFactory {

private static final String USER_AGENT_HEADER_VALUE = "infobip-api-client-java/4.3.0";
private static final String USER_AGENT_HEADER_VALUE = "infobip-api-client-java/4.3.1";

private final ApiKey apiKey;
private final BaseUrl baseUrl;
Expand Down
16 changes: 11 additions & 5 deletions src/main/java/com/infobip/api/SmsApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ public GetOutboundSmsMessageLogsRequest to(String to) {
/**
* Sets bulkId.
*
* @param bulkId Unique ID assigned to the request if messaging multiple recipients or sending multiple messages via a single API request. (optional)
* @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)
* @return GetOutboundSmsMessageLogsRequest
*/
public GetOutboundSmsMessageLogsRequest bulkId(List<String> bulkId) {
Expand All @@ -395,7 +395,7 @@ public GetOutboundSmsMessageLogsRequest bulkId(List<String> bulkId) {
/**
* Sets messageId.
*
* @param messageId Unique message ID for which a log is requested. (optional)
* @param messageId Unique message ID for which a log is requested. May contain multiple comma-separated values. Maximum length 2048 characters. (optional)
* @return GetOutboundSmsMessageLogsRequest
*/
public GetOutboundSmsMessageLogsRequest messageId(List<String> messageId) {
Expand Down Expand Up @@ -496,7 +496,9 @@ public GetOutboundSmsMessageLogsRequest entityId(String entityId) {
*
* @return SmsLogsResponse The deserialized response.
* @throws ApiException If the API call fails or an error occurs during the request or response processing.
* @deprecated
*/
@Deprecated
public SmsLogsResponse execute() throws ApiException {
RequestDefinition getOutboundSmsMessageLogsDefinition = getOutboundSmsMessageLogsDefinition(
from,
Expand All @@ -520,7 +522,9 @@ public SmsLogsResponse execute() throws ApiException {
*
* @param callback The {@link ApiCallback} to be invoked.
* @return The {@link okhttp3.Call} associated with the API request.
* @deprecated
*/
@Deprecated
public okhttp3.Call executeAsync(ApiCallback<SmsLogsResponse> callback) {
RequestDefinition getOutboundSmsMessageLogsDefinition = getOutboundSmsMessageLogsDefinition(
from,
Expand All @@ -543,11 +547,13 @@ public okhttp3.Call executeAsync(ApiCallback<SmsLogsResponse> callback) {
/**
* Get outbound SMS message logs.
* <p>
* 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.
* 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.
*
* @return GetOutboundSmsMessageLogsRequest
* @deprecated
* @see <a href="https://www.infobip.com/docs/sms">Learn more about SMS channel and use cases</a>
*/
@Deprecated
public GetOutboundSmsMessageLogsRequest getOutboundSmsMessageLogs() {
return new GetOutboundSmsMessageLogsRequest();
}
Expand Down Expand Up @@ -843,7 +849,7 @@ public okhttp3.Call executeAsync(ApiCallback<SmsResponse> callback) {
/**
* Send binary SMS message.
* <p>
* 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.
* 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.
*
* @param smsAdvancedBinaryRequest (required)
* @return SendBinarySmsMessageRequest
Expand Down Expand Up @@ -901,7 +907,7 @@ public okhttp3.Call executeAsync(ApiCallback<SmsResponse> callback) {
/**
* Send SMS message.
* <p>
* 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.
* 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.
*
* @param smsAdvancedTextualRequest (required)
* @return SendSmsMessageRequest
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/infobip/model/SmsBinaryMessage.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public void setBinary(SmsBinaryContent binary) {
* Sets callbackData.
* <p>
* Field description:
* Additional client data that will be sent on the notifyUrl. The maximum value is 4000 characters.
* 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.
*
* @param callbackData
* @return This {@link SmsBinaryMessage instance}.
Expand All @@ -97,7 +97,7 @@ public SmsBinaryMessage callbackData(String callbackData) {
* Returns callbackData.
* <p>
* Field description:
* Additional client data that will be sent on the notifyUrl. The maximum value is 4000 characters.
* 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.
*
* @return callbackData
*/
Expand All @@ -110,7 +110,7 @@ public String getCallbackData() {
* Sets callbackData.
* <p>
* Field description:
* Additional client data that will be sent on the notifyUrl. The maximum value is 4000 characters.
* 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.
*
* @param callbackData
*/
Expand Down
47 changes: 47 additions & 0 deletions src/main/java/com/infobip/model/SmsIysRecipientType.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* This class is auto generated from the Infobip OpenAPI specification
* through the OpenAPI Specification Client API libraries (Re)Generator (OSCAR),
* powered by the OpenAPI Generator (https://openapi-generator.tech).
*
* Do not edit manually. To learn how to raise an issue, see the CONTRIBUTING guide
* or contact us @ [email protected].
*/

package com.infobip.model;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

/**
* Recipient Type must be &#x60;TACIR&#x60; or &#x60;BIREYSEL&#x60;.
*/
public enum SmsIysRecipientType {
BIREYSEL("BIREYSEL"),
TACIR("TACIR");

private final String value;

SmsIysRecipientType(String value) {
this.value = value;
}

@JsonValue
public String getValue() {
return value;
}

@Override
public String toString() {
return String.valueOf(value);
}

@JsonCreator
public static SmsIysRecipientType fromValue(String value) {
for (SmsIysRecipientType enumElement : SmsIysRecipientType.values()) {
if (enumElement.value.equals(value)) {
return enumElement;
}
}
throw new IllegalArgumentException("Unexpected enum value '" + value + "'.");
}
}
6 changes: 3 additions & 3 deletions src/main/java/com/infobip/model/SmsReport.java
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ public void setMccMnc(String mccMnc) {
* Sets callbackData.
* <p>
* Field description:
* Custom data sent over to the &#x60;notifyUrl&#x60;.
* Callback data sent through ‛callbackData‛ field when sending message.
*
* @param callbackData
* @return This {@link SmsReport instance}.
Expand All @@ -384,7 +384,7 @@ public SmsReport callbackData(String callbackData) {
* Returns callbackData.
* <p>
* Field description:
* Custom data sent over to the &#x60;notifyUrl&#x60;.
* Callback data sent through ‛callbackData‛ field when sending message.
*
* @return callbackData
*/
Expand All @@ -397,7 +397,7 @@ public String getCallbackData() {
* Sets callbackData.
* <p>
* Field description:
* Custom data sent over to the &#x60;notifyUrl&#x60;.
* Callback data sent through ‛callbackData‛ field when sending message.
*
* @param callbackData
*/
Expand Down
50 changes: 48 additions & 2 deletions src/main/java/com/infobip/model/SmsSouthKoreaOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ public class SmsSouthKoreaOptions {

private Integer resellerCode;

private String title;

/**
* Sets resellerCode.
* <p>
Expand Down Expand Up @@ -59,6 +61,46 @@ public void setResellerCode(Integer resellerCode) {
this.resellerCode = resellerCode;
}

/**
* Sets title.
* <p>
* Field description:
* Set the title or subject of a message. South Korea only.
*
* @param title
* @return This {@link SmsSouthKoreaOptions instance}.
*/
public SmsSouthKoreaOptions title(String title) {
this.title = title;
return this;
}

/**
* Returns title.
* <p>
* Field description:
* Set the title or subject of a message. South Korea only.
*
* @return title
*/
@JsonProperty("title")
public String getTitle() {
return title;
}

/**
* Sets title.
* <p>
* Field description:
* Set the title or subject of a message. South Korea only.
*
* @param title
*/
@JsonProperty("title")
public void setTitle(String title) {
this.title = title;
}

@Override
public boolean equals(Object o) {
if (this == o) {
Expand All @@ -68,12 +110,13 @@ public boolean equals(Object o) {
return false;
}
SmsSouthKoreaOptions smsSouthKoreaOptions = (SmsSouthKoreaOptions) o;
return Objects.equals(this.resellerCode, smsSouthKoreaOptions.resellerCode);
return Objects.equals(this.resellerCode, smsSouthKoreaOptions.resellerCode)
&& Objects.equals(this.title, smsSouthKoreaOptions.title);
}

@Override
public int hashCode() {
return Objects.hash(resellerCode);
return Objects.hash(resellerCode, title);
}

@Override
Expand All @@ -85,6 +128,9 @@ public String toString() {
.append(" resellerCode: ")
.append(toIndentedString(resellerCode))
.append(newLine)
.append(" title: ")
.append(toIndentedString(title))
.append(newLine)
.append("}")
.toString();
}
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/infobip/model/SmsTextualMessage.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public class SmsTextualMessage {
* Sets callbackData.
* <p>
* Field description:
* 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.
* 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.
*
* @param callbackData
* @return This {@link SmsTextualMessage instance}.
Expand All @@ -70,7 +70,7 @@ public SmsTextualMessage callbackData(String callbackData) {
* Returns callbackData.
* <p>
* Field description:
* 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.
* 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.
*
* @return callbackData
*/
Expand All @@ -83,7 +83,7 @@ public String getCallbackData() {
* Sets callbackData.
* <p>
* Field description:
* 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.
* 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.
*
* @param callbackData
*/
Expand Down
Loading

0 comments on commit 69e10c1

Please sign in to comment.