Skip to content

Commit

Permalink
Update to version 4.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
infobip-ci committed Jan 3, 2024
1 parent 55507e2 commit 6a40c23
Show file tree
Hide file tree
Showing 12 changed files with 392 additions and 17 deletions.
2 changes: 1 addition & 1 deletion 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.1.0</version>
<version>4.1.1</version>
</dependency>
```

Expand Down
8 changes: 7 additions & 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.1.0</version>
<version>4.1.1</version>
<packaging>jar</packaging>

<name>infobip-api-java-client</name>
Expand Down Expand Up @@ -43,6 +43,7 @@
<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>
<guava.version>32.1.2-jre</guava.version>
</properties>

<build>
Expand Down Expand Up @@ -192,6 +193,11 @@
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
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.1.0";
private static final String USER_AGENT_HEADER_VALUE = "infobip-api-client-java/4.1.1";

private final ApiKey apiKey;
private final BaseUrl baseUrl;
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/com/infobip/api/WhatsAppApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
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 Down Expand Up @@ -138,6 +139,7 @@ public okhttp3.Call executeAsync(ApiCallback<WhatsAppSenderRegistrationResponse>
* @return AddWhatsappSenderRequest
* @see <a href="https://www.infobip.com/docs/whatsapp">Learn more about WhatsApp channel and use cases</a>
*/
@Beta
public AddWhatsappSenderRequest addWhatsappSender(
Long businessAccountId, WhatsAppPhoneNumberRequest whatsAppPhoneNumberRequest) {
return new AddWhatsappSenderRequest(businessAccountId, whatsAppPhoneNumberRequest);
Expand Down Expand Up @@ -1272,6 +1274,7 @@ public okhttp3.Call executeAsync(ApiCallback<Void> callback) {
* @return RetryWhatsappSenderVerificationRequest
* @see <a href="https://www.infobip.com/docs/whatsapp">Learn more about WhatsApp channel and use cases</a>
*/
@Beta
public RetryWhatsappSenderVerificationRequest retryWhatsappSenderVerification(
String sender, WhatsAppOtpRequest whatsAppOtpRequest) {
return new RetryWhatsappSenderVerificationRequest(sender, whatsAppOtpRequest);
Expand Down Expand Up @@ -2253,6 +2256,7 @@ public okhttp3.Call executeAsync(ApiCallback<WhatsAppSingleMessageInfo> callback
* @return SendWhatsappInteractiveOrderDetailsMessageRequest
* @see <a href="https://www.infobip.com/docs/whatsapp">Learn more about WhatsApp channel and use cases</a>
*/
@Beta
public SendWhatsappInteractiveOrderDetailsMessageRequest sendWhatsappInteractiveOrderDetailsMessage(
WhatsAppInteractiveOrderDetailsMessage whatsAppInteractiveOrderDetailsMessage) {
return new SendWhatsappInteractiveOrderDetailsMessageRequest(whatsAppInteractiveOrderDetailsMessage);
Expand Down Expand Up @@ -2322,6 +2326,7 @@ public okhttp3.Call executeAsync(ApiCallback<WhatsAppSingleMessageInfo> callback
* @return SendWhatsappInteractiveOrderStatusMessageRequest
* @see <a href="https://www.infobip.com/docs/whatsapp">Learn more about WhatsApp channel and use cases</a>
*/
@Beta
public SendWhatsappInteractiveOrderStatusMessageRequest sendWhatsappInteractiveOrderStatusMessage(
WhatsAppInteractiveOrderStatusMessage whatsAppInteractiveOrderStatusMessage) {
return new SendWhatsappInteractiveOrderStatusMessageRequest(whatsAppInteractiveOrderStatusMessage);
Expand Down Expand Up @@ -2455,6 +2460,7 @@ public okhttp3.Call executeAsync(ApiCallback<Void> callback) {
* @return VerifyWhatsappSenderRequest
* @see <a href="https://www.infobip.com/docs/whatsapp">Learn more about WhatsApp channel and use cases</a>
*/
@Beta
public VerifyWhatsappSenderRequest verifyWhatsappSender(
String sender, WhatsAppVerifyCodeRequest whatsAppVerifyCodeRequest) {
return new VerifyWhatsappSenderRequest(sender, whatsAppVerifyCodeRequest);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public void setPriority(Integer priority) {
* Sets weight.
* <p>
* Field description:
* Weight of the destination within a route. It specifies how much traffic is handled by destination relative to other destinations within the same priority level. Values are evaluated relative to each other and they don&#39;t need to add up to 100.
* Weight of the destination within a route. It specifies how much traffic is handled by destination relative to other destinations within the same priority level. Values are evaluated relative to each other and they don&#39;t need to add up to 100. Either all or no destination need to have this value defined.
*
* @param weight
* @return This {@link CallRoutingEndpointDestination instance}.
Expand All @@ -129,7 +129,7 @@ public CallRoutingEndpointDestination weight(Integer weight) {
* Returns weight.
* <p>
* Field description:
* Weight of the destination within a route. It specifies how much traffic is handled by destination relative to other destinations within the same priority level. Values are evaluated relative to each other and they don&#39;t need to add up to 100.
* Weight of the destination within a route. It specifies how much traffic is handled by destination relative to other destinations within the same priority level. Values are evaluated relative to each other and they don&#39;t need to add up to 100. Either all or no destination need to have this value defined.
*
* @return weight
*/
Expand All @@ -142,7 +142,7 @@ public Integer getWeight() {
* Sets weight.
* <p>
* Field description:
* Weight of the destination within a route. It specifies how much traffic is handled by destination relative to other destinations within the same priority level. Values are evaluated relative to each other and they don&#39;t need to add up to 100.
* Weight of the destination within a route. It specifies how much traffic is handled by destination relative to other destinations within the same priority level. Values are evaluated relative to each other and they don&#39;t need to add up to 100. Either all or no destination need to have this value defined.
*
* @param weight
*/
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/com/infobip/model/CallRoutingUrlDestination.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public CallRoutingUrlDestination() {
* Sets priority.
* <p>
* Field description:
* Priority of the destination within a route. Either all or no destinations need to have this value defined.
* Priority of the destination within a route. Destinations with lower value have higher priority. Either all or no destination need to have this value defined.
*
* @param priority
* @return This {@link CallRoutingUrlDestination instance}.
Expand All @@ -50,7 +50,7 @@ public CallRoutingUrlDestination priority(Integer priority) {
* Returns priority.
* <p>
* Field description:
* Priority of the destination within a route. Either all or no destinations need to have this value defined.
* Priority of the destination within a route. Destinations with lower value have higher priority. Either all or no destination need to have this value defined.
*
* @return priority
*/
Expand All @@ -63,7 +63,7 @@ public Integer getPriority() {
* Sets priority.
* <p>
* Field description:
* Priority of the destination within a route. Either all or no destinations need to have this value defined.
* Priority of the destination within a route. Destinations with lower value have higher priority. Either all or no destination need to have this value defined.
*
* @param priority
*/
Expand All @@ -76,7 +76,7 @@ public void setPriority(Integer priority) {
* Sets weight.
* <p>
* Field description:
* Weight of the destination within a route.
* Weight of the destination within a route. It specifies how much traffic is handled by destination relative to other destinations within the same priority level. Values are evaluated relative to each other and they don&#39;t need to add up to 100. Either all or no destination need to have this value defined.
*
* @param weight
* @return This {@link CallRoutingUrlDestination instance}.
Expand All @@ -90,7 +90,7 @@ public CallRoutingUrlDestination weight(Integer weight) {
* Returns weight.
* <p>
* Field description:
* Weight of the destination within a route.
* Weight of the destination within a route. It specifies how much traffic is handled by destination relative to other destinations within the same priority level. Values are evaluated relative to each other and they don&#39;t need to add up to 100. Either all or no destination need to have this value defined.
*
* @return weight
*/
Expand All @@ -103,7 +103,7 @@ public Integer getWeight() {
* Sets weight.
* <p>
* Field description:
* Weight of the destination within a route.
* Weight of the destination within a route. It specifies how much traffic is handled by destination relative to other destinations within the same priority level. Values are evaluated relative to each other and they don&#39;t need to add up to 100. Either all or no destination need to have this value defined.
*
* @param weight
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import java.util.Objects;

/**
* Optional. Configuration used to enable Android push notifications.
* Optional. Required if ios is not set. Configuration used to enable Android push notifications.
*/
public class WebRtcAndroidPushNotificationConfig {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import java.util.Objects;

/**
* Optional. Configuration used to enable iOS push notifications.
* Optional. Required if android is not set. Configuration used to enable iOS push notifications.
*/
public class WebRtcIosPushNotificationConfig {

Expand Down
199 changes: 199 additions & 0 deletions src/main/java/com/infobip/model/WhatsAppTemplateCardContent.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
/*
* 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.JsonProperty;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
* Carousel cards. Should be defined in the correct order. It can have between one and ten cards.
*/
public class WhatsAppTemplateCardContent {

private WhatsAppTemplateHeaderContent header;

private WhatsAppTemplateBodyContent body;

private List<WhatsAppTemplateButtonContent> buttons = null;

/**
* Sets header.
* <p>
* The field is required.
*
* @param header
* @return This {@link WhatsAppTemplateCardContent instance}.
*/
public WhatsAppTemplateCardContent header(WhatsAppTemplateHeaderContent header) {
this.header = header;
return this;
}

/**
* Returns header.
* <p>
* The field is required.
*
* @return header
*/
@JsonProperty("header")
public WhatsAppTemplateHeaderContent getHeader() {
return header;
}

/**
* Sets header.
* <p>
* The field is required.
*
* @param header
*/
@JsonProperty("header")
public void setHeader(WhatsAppTemplateHeaderContent header) {
this.header = header;
}

/**
* Sets body.
*
* @param body
* @return This {@link WhatsAppTemplateCardContent instance}.
*/
public WhatsAppTemplateCardContent body(WhatsAppTemplateBodyContent body) {
this.body = body;
return this;
}

/**
* Returns body.
*
* @return body
*/
@JsonProperty("body")
public WhatsAppTemplateBodyContent getBody() {
return body;
}

/**
* Sets body.
*
* @param body
*/
@JsonProperty("body")
public void setBody(WhatsAppTemplateBodyContent body) {
this.body = body;
}

/**
* Sets buttons.
* <p>
* Field description:
* Card buttons. Should be defined in the correct order, only if &#x60;quick reply&#x60; or &#x60;dynamic URL&#x60; buttons have been registered.
*
* @param buttons
* @return This {@link WhatsAppTemplateCardContent instance}.
*/
public WhatsAppTemplateCardContent buttons(List<WhatsAppTemplateButtonContent> buttons) {
this.buttons = buttons;
return this;
}

/**
* Adds and item into buttons.
* <p>
* Field description:
* Card buttons. Should be defined in the correct order, only if &#x60;quick reply&#x60; or &#x60;dynamic URL&#x60; buttons have been registered.
*
* @param buttonsItem The item to be added to the list.
* @return This {@link WhatsAppTemplateCardContent instance}.
*/
public WhatsAppTemplateCardContent addButtonsItem(WhatsAppTemplateButtonContent buttonsItem) {
if (this.buttons == null) {
this.buttons = new ArrayList<>();
}
this.buttons.add(buttonsItem);
return this;
}

/**
* Returns buttons.
* <p>
* Field description:
* Card buttons. Should be defined in the correct order, only if &#x60;quick reply&#x60; or &#x60;dynamic URL&#x60; buttons have been registered.
*
* @return buttons
*/
@JsonProperty("buttons")
public List<WhatsAppTemplateButtonContent> getButtons() {
return buttons;
}

/**
* Sets buttons.
* <p>
* Field description:
* Card buttons. Should be defined in the correct order, only if &#x60;quick reply&#x60; or &#x60;dynamic URL&#x60; buttons have been registered.
*
* @param buttons
*/
@JsonProperty("buttons")
public void setButtons(List<WhatsAppTemplateButtonContent> buttons) {
this.buttons = buttons;
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
WhatsAppTemplateCardContent whatsAppTemplateCardContent = (WhatsAppTemplateCardContent) o;
return Objects.equals(this.header, whatsAppTemplateCardContent.header)
&& Objects.equals(this.body, whatsAppTemplateCardContent.body)
&& Objects.equals(this.buttons, whatsAppTemplateCardContent.buttons);
}

@Override
public int hashCode() {
return Objects.hash(header, body, buttons);
}

@Override
public String toString() {
String newLine = System.lineSeparator();
return new StringBuilder()
.append("class WhatsAppTemplateCardContent {")
.append(newLine)
.append(" header: ")
.append(toIndentedString(header))
.append(newLine)
.append(" body: ")
.append(toIndentedString(body))
.append(newLine)
.append(" buttons: ")
.append(toIndentedString(buttons))
.append(newLine)
.append("}")
.toString();
}

private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
String lineSeparator = System.lineSeparator();
String lineSeparatorFollowedByIndentation = lineSeparator + " ";
return o.toString().replace(lineSeparator, lineSeparatorFollowedByIndentation);
}
}
Loading

0 comments on commit 6a40c23

Please sign in to comment.