Skip to content

Commit

Permalink
Update to version 4.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
infobip-ci committed Dec 21, 2023
1 parent cdedab6 commit 55507e2
Show file tree
Hide file tree
Showing 406 changed files with 57,669 additions and 4,260 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ jobs:
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn clean install -U
run: mvn clean install -U
60 changes: 59 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,64 @@ 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.1.0](https://github.com/infobip/infobip-api-java-client/releases/tag/4.1.0) ] - 2023-12-20

⚠️ **IMPORTANT NOTE:** This release contains compile time breaking changes.
All changes, including breaking changes, are addressed and explained in the list bellow.
If you find out that something was not addressed properly, please submit an issue.

### Added
* Support for [Infobip Call Routing API](https://www.infobip.com/docs/api/channels/voice/routing).
* Support for [Infobip Call Link API](https://www.infobip.com/docs/api/channels/webrtc-calls/call-link).
* Most recent [Infobip Email API](https://www.infobip.com/docs/api/channels/email) feature set.
* Most recent [Infobip SMS API](https://www.infobip.com/docs/api/channels/sms) feature set.
* Most recent [Infobip MMS API](https://www.infobip.com/docs/api/channels/mms) feature set.
* Most recent [Infobip Voice API](https://www.infobip.com/docs/api/channels/voice) feature set.
* Most recent [Infobip WebRTC API](https://www.infobip.com/docs/api/channels/webrtc) feature set.
* Most recent [Infobip Viber API](https://www.infobip.com/docs/api/channels/viber) feature set.
* [CPaaS-X](https://www.infobip.com/docs/cpaas-x/application-and-entity-management) support to more channels.
* Support for handling ApiError models:
* [ApiError](src/main/java/com/infobip/model/ApiError.java)
* [ApiErrorResource](src/main/java/com/infobip/model/ApiErrorResource.java)
* [ApiErrorViolation](src/main/java/com/infobip/model/ApiErrorViolation.java)

### Changed
* **Removed classes and unified structures**
* Removed pagination classes (`CallsPageInfo`, `WebRtcPageInfo`) in favor of a unified class: [PageInfo](src/main/java/com/infobip/model/PageInfo.java)
* Removed status-defining classes for messages by products (`EmailStatus`, `MmsStatus`, `SmsStatus`) and introduced a unified class: [MessageStatus](src/main/java/com/infobip/model/PageInfo.java)
* Removed price-defining classes for messages by products (`EmailPrice`, `MmsPrice`, `SmsPrice`, `EmailWebhookPrice`) and replaced with a unified class: [MessagePrice](src/main/java/com/infobip/model/MessagePrice.java)
* Removed error-defining classes for query execution by different products (`EmailReportError`, `MmsError`, `SmsError`) and introduced a unified class: [MessageError](src/main/java/com/infobip/model/MessageError.java)
* **Fixes and changes**
* Expanded [ApiExceptionDetails](src/main/java/com/infobip/ApiExceptionDetails.java) model with additional fields supporting enriched error responses that the API might return.
* Changed `templateId` field type from Integer to Long in EmailApi's SendEmailRequest class because of reported [issue](https://github.com/infobip/infobip-api-java-client/issues/37).
* Updated [WhatsAppCategory](src/main/java/com/infobip/model/WhatsAppCategory.java) enumeration values based on [report](https://developers.facebook.com/docs/whatsapp/business-platform/changelog#february-3--2023) and reported [issue](https://github.com/infobip/infobip-api-java-client/issues/36).
* Updated [CallsErrorCode](src/main/java/com/infobip/model/CallsErrorCode.java) enumeration values to reflect changes on [Hangup](https://www.infobip.com/docs/api/channels/voice/calls/call-legs/hangup-call) endpoint.
* Updated [ViberValidityPeriodTimeUnit](src/main/java/com/infobip/model/ViberValidityPeriodTimeUnit.java) enumeration values since 'DAYS' is no longer supported, use 'HOURS' instead.
* Changed 'context' field name in [CallsApplicationTransferRequest](src/main/java/com/infobip/model/CallsApplicationTransferRequest.java) to 'customData'.
* Changed 'days' field type in [CallsDeliveryTimeWindow](src/main/java/com/infobip/model/CallsDeliveryTimeWindow.java) from List to Set to avoid duplicates.
* Removed 'type' field in [CallsDtmfTermination](src/main/java/com/infobip/model/CallsDtmfTermination.java) since it is not supported on the API side.
* Removed 'stopOn' field in [CallsSayRequest](src/main/java/com/infobip/model/CallsSayRequest.java) since it is not supported on the API side.
* Removed 'sipTrunkGroupId' field in [CallsSipEndpoint](src/main/java/com/infobip/model/CallsSipEndpoint.java) since it is not supported on the API side.
* Removed 'notifyContentType' field in [MmsAdvancedMessage](src/main/java/com/infobip/model/MmsAdvancedMessage.java) since it is not supported on the API side.
* Removed 'sendingSpeedLimit' field in [MmsAdvancedRequest](src/main/java/com/infobip/model/MmsAdvancedRequest.java) since it is not supported on the API side.
* Fixed Viber webhook report models.
* Changed 'results' field name in [ViberWebhookReportResponse](src/main/java/com/infobip/model/ViberWebhookReportsResponse.java) to reports.
* Replaced 'ios' and 'android' fields in [WebRtcPushConfigurationResponse](src/main/java/com/infobip/model/WebRtcPushConfigurationResponse.java) with 'androidConfigured' and 'iosConfigured' since they didn't correspond to the state of the endpoint.
* Changed 'structure' field type in [WhatsAppTemplateApiResponse](src/main/java/com/infobip/model/WhatsAppTemplateApiResponse.java) from 'WhatsAppTemplateStructureApiData' and 'WhatsAppDefaultTemplateStructureApiData'.
* Changed [WhatsAppTemplatePublicApiRequest](src/main/java/com/infobip/model/WhatsAppTemplatePublicApiRequest.java) by making it an abstract class, serving as a base for WhatsAppAuthenticationTemplatePublicApiRequest, WhatsAppDefaultMarketingTemplatePublicApiRequest, WhatsAppDefaultUtilityTemplatePublicApiRequest.
* **Documentation**
* Fixed Javadoc.
* **Dependencies**
* Bumped `slf4j-api` version to `2.0.9`
* Bumped `jackson` version to `2.15.2`
* Bumped `okhttp` version to `4.12.0`

### Removed
- Unused model classes

### Deprecated
- Deprecated old error fields in [ApiExceptionDetails](src/main/java/com/infobip/ApiExceptionDetails.java)

## [ [4.0.0](https://github.com/infobip/infobip-api-java-client/releases/tag/4.0.0) ] - 2023-03-01

🎉 **NEW Major Version of `infobip-api-java-client`.**
Expand Down Expand Up @@ -114,7 +172,7 @@ If you find out that something was not addressed properly, please submit an issu
- `whatsapp.md` containing quick start guide for WhatsApp API

### Changed
- Email sending API to match the latest version of the API.
- Email sending API to match the latest version of the API.
- Signature changed: getEmailLogs()
- Renamed some email API models to be consistent across multiple products
- EmailError -> EmailReportError
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,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.0.0</version>
<version>4.1.0</version>
</dependency>
```

Expand Down Expand Up @@ -82,7 +82,7 @@ For details, check the [ApiClient](https://github.com/infobip/infobip-api-java-c
See below, a simple example of sending a single SMS message to a single recipient.

```java
SmsApi smsApi = new SmsApi();
SmsApi smsApi = new SmsApi(apiClient);
SmsTextualMessage smsMessage = new SmsTextualMessage()
.from("InfoSMS")
.addDestinationsItem(new SmsDestination().to("41793026727"))
Expand All @@ -101,7 +101,7 @@ See below, a simple example of sending a single SMS message to a single recipien

For asynchronous processing, you can use the following approach:
```java
sendSmsApi.sendSmsMessage(request)
smsApi.sendSmsMessage(smsMessageRequest)
.executeAsync(new ApiCallback<>() {
@Override
public void onSuccess(SmsResponse result, int responseStatusCode, Map<String, List<String>> responseHeaders) {
Expand Down Expand Up @@ -156,7 +156,7 @@ If you are for any reason unable to receive real-time delivery reports on your e
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.

```java
SmsDeliveryResult deliveryReports = sendSmsApi.getOutboundSmsMessageDeliveryReports()
SmsDeliveryResult deliveryReports = smsApi.getOutboundSmsMessageDeliveryReports()
.bulkId(bulkId)
.execute();
for (SmsReport report : deliveryReports.getResults()) {
Expand All @@ -170,7 +170,7 @@ Infobip API supports Unicode characters and automatically detects encoding. Unic
```java
SmsPreviewRequest smsPreviewRequest = new SmsPreviewRequest()
.text("Let's see how many characters will remain unused in this message.");
SmsPreviewResponse previewResponse = sendSmsApi
SmsPreviewResponse previewResponse = smsApi
.previewSmsMessage(smsPreviewRequest)
.execute();
System.out.println(previewResponse);
Expand Down
2 changes: 1 addition & 1 deletion email.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Keep in mind the following restrictions while using a trial account:
File fileAttachment = new File("/path/report.csv");

EmailSendResponse sendResponse = emailApi
.sendFullyFeaturedEmail(List.of("[email protected]"))
.sendEmail(List.of("[email protected]"))
.from("Jane Smith <[email protected]>")
.subject("Mail subject text")
.text("Test message with a file")
Expand Down
8 changes: 4 additions & 4 deletions 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.0.0</version>
<version>4.1.0</version>
<packaging>jar</packaging>

<name>infobip-api-java-client</name>
Expand Down Expand Up @@ -38,9 +38,9 @@
<java.version>11</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<jackson.version>2.14.2</jackson.version>
<okhttp.version>4.10.0</okhttp.version>
<slf4j.version>2.0.6</slf4j.version>
<jackson.version>2.15.2</jackson.version>
<okhttp.version>4.12.0</okhttp.version>
<slf4j.version>2.0.9</slf4j.version>
<junit-jupiter.version>5.9.2</junit-jupiter.version>
<assertj-core.version>3.24.2</assertj-core.version>
</properties>
Expand Down
Loading

0 comments on commit 55507e2

Please sign in to comment.