Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ docs/SyncNumberLookupSuccess.md
docs/Telegram.md
docs/TextStore.md
docs/Viber.md
docs/ViberVideo.md
docs/WhatsApp.md
docs/WhatsAppComponent.md
docs/WhatsAppCurrency.md
Expand Down Expand Up @@ -153,6 +154,7 @@ src/main/java/com/messente/api/SyncNumberLookupSuccess.java
src/main/java/com/messente/api/Telegram.java
src/main/java/com/messente/api/TextStore.java
src/main/java/com/messente/api/Viber.java
src/main/java/com/messente/api/ViberVideo.java
src/main/java/com/messente/api/WhatsApp.java
src/main/java/com/messente/api/WhatsAppComponent.java
src/main/java/com/messente/api/WhatsAppCurrency.java
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Messente API Library

- Messente API version: 2.0.0
- Java artifact version: 4.2.1
- Java artifact version: 4.3.0

[Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber, WhatsApp and Telegram messages. * Manage contacts and groups. * Fetch detailed info about phone numbers. * Blacklist phone numbers to make sure you're not sending any unwanted messages. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world.

Expand All @@ -13,7 +13,7 @@ Install Messente API library via Maven, Gradle, Ivy or manual build.

```groovy
dependencies {
implementation 'com.messente.api:messente-api:4.2.1'
implementation 'com.messente.api:messente-api:4.3.0'
}
```

Expand All @@ -23,14 +23,14 @@ dependencies {
<dependency>
<groupId>com.messente.api</groupId>
<artifactId>messente-api</artifactId>
<version>4.2.1</version>
<version>4.3.0</version>
</dependency>
```

### Ivy

```xml
<dependency org='com.messente.api' name='messente-api' rev='4.2.1'/>
<dependency org='com.messente.api' name='messente-api' rev='4.3.0'/>
```

### Manual Build
Expand All @@ -43,7 +43,7 @@ mvn clean package

Install

- `target/messente-api-4.2.1.jar`
- `target/messente-api-4.3.0.jar`
- `target/lib/*.jar`

## Features
Expand Down
64 changes: 64 additions & 0 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2035,6 +2035,11 @@ components:
validity: 360
text: text
button_text: button_text
video:
duration: 6
thumbnail: thumbnail
url: url
file_size: 0
ttl: 21600
- sender: sender
image_url: image_url
Expand All @@ -2043,6 +2048,11 @@ components:
validity: 360
text: text
button_text: button_text
video:
duration: 6
thumbnail: thumbnail
url: url
file_size: 0
ttl: 21600
to: to
priority: low
Expand Down Expand Up @@ -2107,6 +2117,11 @@ components:
validity: 360
text: text
button_text: button_text
video:
duration: 6
thumbnail: thumbnail
url: url
file_size: 0
ttl: 21600
properties:
sender:
Expand Down Expand Up @@ -2151,6 +2166,35 @@ components:
enum:
- viber
type: string
video:
$ref: '#/components/schemas/ViberVideo'
type: object
ViberVideo:
description: Viber video object
example:
duration: 6
thumbnail: thumbnail
url: url
file_size: 0
properties:
url:
description: URL pointing to the video resource.
type: string
thumbnail:
description: URL pointing to the video thumbnail resource.
type: string
file_size:
description: Size of the video file in bytes. Cannot be larger than 200MB.
type: integer
duration:
description: Duration of the video in seconds. Cannot be longer than 600
seconds.
type: integer
required:
- duration
- file_size
- thumbnail
- url
type: object
WhatsApp:
description: |-
Expand Down Expand Up @@ -2628,6 +2672,11 @@ components:
validity: 360
text: text
button_text: button_text
video:
duration: 6
thumbnail: thumbnail
url: url
file_size: 0
ttl: 21600
- sender: sender
image_url: image_url
Expand All @@ -2636,6 +2685,11 @@ components:
validity: 360
text: text
button_text: button_text
video:
duration: 6
thumbnail: thumbnail
url: url
file_size: 0
ttl: 21600
to: to
priority: low
Expand All @@ -2650,6 +2704,11 @@ components:
validity: 360
text: text
button_text: button_text
video:
duration: 6
thumbnail: thumbnail
url: url
file_size: 0
ttl: 21600
- sender: sender
image_url: image_url
Expand All @@ -2658,6 +2717,11 @@ components:
validity: 360
text: text
button_text: button_text
video:
duration: 6
thumbnail: thumbnail
url: url
file_size: 0
ttl: 21600
to: to
priority: low
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ apply plugin: 'java'
apply plugin: 'com.diffplug.spotless'

group = 'com.messente.api'
version = '4.2.1'
version = '4.3.0'

ext {
jakarta_annotation_version = "1.3.5"
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ lazy val root = (project in file(".")).
settings(
organization := "com.messente.api",
name := "messente-api",
version := "4.2.1",
version := "4.3.0",
scalaVersion := "2.11.4",
scalacOptions ++= Seq("-feature"),
javacOptions in compile ++= Seq("-Xlint:deprecation"),
Expand Down
1 change: 1 addition & 0 deletions docs/OmnimessageMessagesInner.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
|**buttonUrl** | **String** | URL of the button, must be specified along with &#39;&#39;text&#39;&#39;, &#39;&#39;button_text&#39;&#39; and &#39;&#39;image_url&#39;&#39; (optional) | [optional] |
|**buttonText** | **String** | Must be specified along with &#39;&#39;text&#39;&#39;, &#39;&#39;button_url&#39;&#39;, &#39;&#39;button_text&#39;&#39;, &#39;&#39;image_url&#39;&#39; (optional) | [optional] |
|**channel** | [**ChannelEnum**](#ChannelEnum) | The channel used to deliver the message | [optional] |
|**video** | [**ViberVideo**](ViberVideo.md) | | [optional] |
|**autoconvert** | [**AutoconvertEnum**](#AutoconvertEnum) | Defines how non-GSM characters will be treated: - \&quot;on\&quot; Use replacement settings from the account&#39;s [API Auto Replace settings page](https://dashboard.messente.com/api-settings/auto-replace) (default) - \&quot;full\&quot; All non GSM 03.38 characters will be replaced with suitable alternatives - \&quot;off\&quot; Message content is not modified in any way | [optional] |
|**udh** | **String** | hex-encoded string containing SMS UDH | [optional] |
|**template** | [**WhatsAppTemplate**](WhatsAppTemplate.md) | | [optional] |
Expand Down
1 change: 1 addition & 0 deletions docs/Viber.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Viber message content
|**buttonUrl** | **String** | URL of the button, must be specified along with &#39;&#39;text&#39;&#39;, &#39;&#39;button_text&#39;&#39; and &#39;&#39;image_url&#39;&#39; (optional) | [optional] |
|**buttonText** | **String** | Must be specified along with &#39;&#39;text&#39;&#39;, &#39;&#39;button_url&#39;&#39;, &#39;&#39;button_text&#39;&#39;, &#39;&#39;image_url&#39;&#39; (optional) | [optional] |
|**channel** | [**ChannelEnum**](#ChannelEnum) | The channel used to deliver the message | [optional] |
|**video** | [**ViberVideo**](ViberVideo.md) | | [optional] |



Expand Down
17 changes: 17 additions & 0 deletions docs/ViberVideo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@


# ViberVideo

Viber video object

## Properties

| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**url** | **String** | URL pointing to the video resource. | |
|**thumbnail** | **String** | URL pointing to the video thumbnail resource. | |
|**fileSize** | **Integer** | Size of the video file in bytes. Cannot be larger than 200MB. | |
|**duration** | **Integer** | Duration of the video in seconds. Cannot be longer than 600 seconds. | |



2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<artifactId>messente-api</artifactId>
<packaging>jar</packaging>
<name>messente-api</name>
<version>4.2.1</version>
<version>4.3.0</version>
<url>https://github.com/messente/messente-api-java</url>
<description>Java library for Messente API</description>
<scm>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/messente/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ private void init() {
json = new JSON();

// Set default User-Agent.
setUserAgent("OpenAPI-Generator/4.2.1/java");
setUserAgent("OpenAPI-Generator/4.3.0/java");

authentications = new HashMap<String, Authentication>();
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/messente/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.6.0")
public class Configuration {
public static final String VERSION = "4.2.1";
public static final String VERSION = "4.3.0";

private static ApiClient defaultApiClient = new ApiClient();

Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/messente/JSON.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
gsonBuilder.registerTypeAdapterFactory(new com.messente.api.SyncNumberLookupSuccess.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.messente.api.Telegram.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.messente.api.Viber.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.messente.api.ViberVideo.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.messente.api.WhatsApp.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.messente.api.WhatsAppComponent.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new com.messente.api.WhatsAppCurrency.CustomTypeAdapterFactory());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import com.messente.api.SMS;
import com.messente.api.Telegram;
import com.messente.api.Viber;
import com.messente.api.ViberVideo;
import com.messente.api.WhatsApp;
import com.messente.api.WhatsAppTemplate;
import java.io.IOException;
Expand Down
35 changes: 33 additions & 2 deletions src/main/java/com/messente/api/Viber.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import com.messente.api.ViberVideo;
import java.io.IOException;
import java.util.Arrays;

Expand Down Expand Up @@ -133,6 +134,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
@SerializedName(SERIALIZED_NAME_CHANNEL)
private ChannelEnum channel = ChannelEnum.VIBER;

public static final String SERIALIZED_NAME_VIDEO = "video";
@SerializedName(SERIALIZED_NAME_VIDEO)
private ViberVideo video;

public Viber() {
}

Expand Down Expand Up @@ -287,6 +292,25 @@ public void setChannel(ChannelEnum channel) {
this.channel = channel;
}


public Viber video(ViberVideo video) {
this.video = video;
return this;
}

/**
* Get video
* @return video
**/
@javax.annotation.Nullable
public ViberVideo getVideo() {
return video;
}

public void setVideo(ViberVideo video) {
this.video = video;
}

/**
* A container for additional, undeclared properties.
* This is a holder for any undeclared properties as specified with
Expand Down Expand Up @@ -349,13 +373,14 @@ public boolean equals(Object o) {
Objects.equals(this.imageUrl, viber.imageUrl) &&
Objects.equals(this.buttonUrl, viber.buttonUrl) &&
Objects.equals(this.buttonText, viber.buttonText) &&
Objects.equals(this.channel, viber.channel)&&
Objects.equals(this.channel, viber.channel) &&
Objects.equals(this.video, viber.video)&&
Objects.equals(this.additionalProperties, viber.additionalProperties);
}

@Override
public int hashCode() {
return Objects.hash(sender, validity, ttl, text, imageUrl, buttonUrl, buttonText, channel, additionalProperties);
return Objects.hash(sender, validity, ttl, text, imageUrl, buttonUrl, buttonText, channel, video, additionalProperties);
}

@Override
Expand All @@ -370,6 +395,7 @@ public String toString() {
sb.append(" buttonUrl: ").append(toIndentedString(buttonUrl)).append("\n");
sb.append(" buttonText: ").append(toIndentedString(buttonText)).append("\n");
sb.append(" channel: ").append(toIndentedString(channel)).append("\n");
sb.append(" video: ").append(toIndentedString(video)).append("\n");
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append("}");
return sb.toString();
Expand Down Expand Up @@ -401,6 +427,7 @@ private String toIndentedString(Object o) {
openapiFields.add("button_url");
openapiFields.add("button_text");
openapiFields.add("channel");
openapiFields.add("video");

// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet<String>();
Expand Down Expand Up @@ -441,6 +468,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
if (jsonObj.get("channel") != null && !jsonObj.get("channel").isJsonNull()) {
ChannelEnum.validateJsonElement(jsonObj.get("channel"));
}
// validate the optional field `video`
if (jsonObj.get("video") != null && !jsonObj.get("video").isJsonNull()) {
ViberVideo.validateJsonElement(jsonObj.get("video"));
}
}

public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
Expand Down
Loading