Skip to content

Commit

Permalink
spotless applied, formated README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ib-tjuhasz committed Dec 5, 2024
1 parent ef3ee5b commit e5e1aef
Show file tree
Hide file tree
Showing 97 changed files with 5,460 additions and 1,998 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ See below, a simple example of sending a single SMS message to a single recipien
```java
SmsApi smsApi = new SmsApi(apiClient);

SmsMessage message = new SmsMessage()
.sender("InfoSMS")
.addDestinationsItem(new SmsDestination().to("41793026727"))
.content(new SmsTextContent().text("Hello World from infobip-api-java-client!"));

SmsRequest smsMessageRequest = new SmsRequest()
.messages(List.of(message));
SmsMessage message = new SmsMessage()
.sender("InfoSMS")
.addDestinationsItem(new SmsDestination().to("41793026727"))
.content(new SmsTextContent().text("Hello World from infobip-api-java-client!"));
SmsRequest smsMessageRequest = new SmsRequest()
.messages(List.of(message));
```
```java
try {
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/com/infobip/api/EmailApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import com.infobip.model.EmailAddDomainRequest;
import com.infobip.model.EmailAddSuppressionRequest;
import com.infobip.model.EmailAllDomainsResponse;
import com.infobip.model.EmailApiGetSuppressionType;
import com.infobip.model.EmailBulkRescheduleRequest;
import com.infobip.model.EmailBulkRescheduleResponse;
import com.infobip.model.EmailBulkScheduleResponse;
Expand All @@ -30,6 +29,7 @@
import com.infobip.model.EmailDomainIpRequest;
import com.infobip.model.EmailDomainIpResponse;
import com.infobip.model.EmailDomainResponse;
import com.infobip.model.EmailGetSuppressionType;
import com.infobip.model.EmailLogsResponse;
import com.infobip.model.EmailReportsResult;
import com.infobip.model.EmailReturnPathAddressRequest;
Expand Down Expand Up @@ -1187,7 +1187,7 @@ public GetScheduledEmailsRequest getScheduledEmails(String bulkId) {

private RequestDefinition getSuppressionsDefinition(
String domainName,
EmailApiGetSuppressionType type,
EmailGetSuppressionType type,
String emailAddress,
String recipientDomain,
OffsetDateTime createdDateFrom,
Expand Down Expand Up @@ -1230,15 +1230,15 @@ private RequestDefinition getSuppressionsDefinition(
*/
public class GetSuppressionsRequest {
private final String domainName;
private final EmailApiGetSuppressionType type;
private final EmailGetSuppressionType type;
private String emailAddress;
private String recipientDomain;
private OffsetDateTime createdDateFrom;
private OffsetDateTime createdDateTo;
private Integer page;
private Integer size;

private GetSuppressionsRequest(String domainName, EmailApiGetSuppressionType type) {
private GetSuppressionsRequest(String domainName, EmailGetSuppressionType type) {
this.domainName = Objects.requireNonNull(domainName, "The required parameter 'domainName' is missing.");
this.type = Objects.requireNonNull(type, "The required parameter 'type' is missing.");
}
Expand Down Expand Up @@ -1347,7 +1347,7 @@ public okhttp3.Call executeAsync(ApiCallback<EmailSuppressionInfoPageResponse> c
* @param type Type of suppression. (required)
* @return GetSuppressionsRequest
*/
public GetSuppressionsRequest getSuppressions(String domainName, EmailApiGetSuppressionType type) {
public GetSuppressionsRequest getSuppressions(String domainName, EmailGetSuppressionType type) {
return new GetSuppressionsRequest(domainName, type);
}

Expand Down
17 changes: 7 additions & 10 deletions src/main/java/com/infobip/api/SmsApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
package com.infobip.api;

import com.fasterxml.jackson.core.type.TypeReference;
import com.google.common.annotations.Beta;
import com.infobip.ApiCallback;
import com.infobip.ApiClient;
import com.infobip.ApiException;
Expand All @@ -28,6 +27,7 @@
import com.infobip.model.SmsRequest;
import com.infobip.model.SmsResponse;
import com.infobip.model.SmsUpdateStatusRequest;
import java.time.OffsetDateTime;
import java.util.List;
import java.util.Objects;

Expand Down Expand Up @@ -314,7 +314,6 @@ public okhttp3.Call executeAsync(ApiCallback<SmsDeliveryResult> callback) {
* @return GetOutboundSmsMessageDeliveryReportsRequest
* @see <a href="https://www.infobip.com/docs/sms">Learn more about the SMS channel and its use cases</a>
*/
@Beta
public GetOutboundSmsMessageDeliveryReportsRequest getOutboundSmsMessageDeliveryReports() {
return new GetOutboundSmsMessageDeliveryReportsRequest();
}
Expand All @@ -327,8 +326,8 @@ private RequestDefinition getOutboundSmsMessageLogsDefinition(
List<String> bulkId,
List<String> messageId,
MessageGeneralStatus generalStatus,
String sentSince,
String sentUntil,
OffsetDateTime sentSince,
OffsetDateTime sentUntil,
Integer limit,
String entityId,
String applicationId,
Expand Down Expand Up @@ -396,8 +395,8 @@ public class GetOutboundSmsMessageLogsRequest {
private List<String> bulkId;
private List<String> messageId;
private MessageGeneralStatus generalStatus;
private String sentSince;
private String sentUntil;
private OffsetDateTime sentSince;
private OffsetDateTime sentUntil;
private Integer limit;
private String entityId;
private String applicationId;
Expand Down Expand Up @@ -488,7 +487,7 @@ public GetOutboundSmsMessageLogsRequest generalStatus(MessageGeneralStatus gener
* @param sentSince The logs will only include messages sent after this date. Use it together with sentUntil to return a time range or if you want to fetch more than 1000 logs allowed per call. Has the following format: yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSSZ. (optional)
* @return GetOutboundSmsMessageLogsRequest
*/
public GetOutboundSmsMessageLogsRequest sentSince(String sentSince) {
public GetOutboundSmsMessageLogsRequest sentSince(OffsetDateTime sentSince) {
this.sentSince = sentSince;
return this;
}
Expand All @@ -499,7 +498,7 @@ public GetOutboundSmsMessageLogsRequest sentSince(String sentSince) {
* @param sentUntil The logs will only include messages sent before this date. Use it together with sentSince to return a time range or if you want to fetch more than 1000 logs allowed per call. Has the following format: yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSSZ. (optional)
* @return GetOutboundSmsMessageLogsRequest
*/
public GetOutboundSmsMessageLogsRequest sentUntil(String sentUntil) {
public GetOutboundSmsMessageLogsRequest sentUntil(OffsetDateTime sentUntil) {
this.sentUntil = sentUntil;
return this;
}
Expand Down Expand Up @@ -607,7 +606,6 @@ public okhttp3.Call executeAsync(ApiCallback<SmsLogsResponse> callback) {
* @return GetOutboundSmsMessageLogsRequest
* @see <a href="https://www.infobip.com/docs/sms">Learn more about the SMS channel and its use cases</a>
*/
@Beta
public GetOutboundSmsMessageLogsRequest getOutboundSmsMessageLogs() {
return new GetOutboundSmsMessageLogsRequest();
}
Expand Down Expand Up @@ -908,7 +906,6 @@ public okhttp3.Call executeAsync(ApiCallback<SmsResponse> callback) {
* @return SendSmsMessagesRequest
* @see <a href="https://www.infobip.com/docs/sms">Learn more about the SMS channel and its use cases</a>
*/
@Beta
public SendSmsMessagesRequest sendSmsMessages(SmsRequest smsRequest) {
return new SendSmsMessagesRequest(smsRequest);
}
Expand Down
Loading

0 comments on commit e5e1aef

Please sign in to comment.