Skip to content

Commit 99e16ff

Browse files
Merge pull request #17 from messente/travis
Release version 4.1.0
2 parents ba9c06f + c98c433 commit 99e16ff

File tree

13 files changed

+409
-14
lines changed

13 files changed

+409
-14
lines changed

.openapi-generator/FILES

+2
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ docs/OmniMessageCreateSuccessResponse.md
5151
docs/Omnimessage.md
5252
docs/OmnimessageApi.md
5353
docs/OmnimessageMessagesInner.md
54+
docs/PriceInfo.md
5455
docs/Priority.md
5556
docs/SMS.md
5657
docs/StatisticsApi.md
@@ -139,6 +140,7 @@ src/main/java/com/messente/api/OmniMessageCreateSuccessResponse.java
139140
src/main/java/com/messente/api/Omnimessage.java
140141
src/main/java/com/messente/api/OmnimessageApi.java
141142
src/main/java/com/messente/api/OmnimessageMessagesInner.java
143+
src/main/java/com/messente/api/PriceInfo.java
142144
src/main/java/com/messente/api/Priority.java
143145
src/main/java/com/messente/api/SMS.java
144146
src/main/java/com/messente/api/StatisticsApi.java

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Messente API Library
22

33
- Messente API version: 2.0.0
4-
- Java artifact version: 4.0.0
4+
- Java artifact version: 4.1.0
55

66
[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.
77

@@ -12,7 +12,7 @@ Install Messente API library via Maven, Gradle, Ivy or manual build.
1212
### Gradle
1313

1414
```groovy
15-
compile "com.messente.api:messente-api:4.0.0"
15+
compile "com.messente.api:messente-api:4.1.0"
1616
```
1717

1818
### Maven
@@ -21,15 +21,15 @@ compile "com.messente.api:messente-api:4.0.0"
2121
<dependency>
2222
<groupId>com.messente.api</groupId>
2323
<artifactId>messente-api</artifactId>
24-
<version>4.0.0</version>
24+
<version>4.1.0</version>
2525
<type>pom</type>
2626
</dependency>
2727
```
2828

2929
### Ivy
3030

3131
```xml
32-
<dependency org='com.messente.api' name='messente-api' rev='4.0.0'>
32+
<dependency org='com.messente.api' name='messente-api' rev='4.1.0'>
3333
<artifact name='messente-api' ext='pom' ></artifact>
3434
</dependency>
3535
```
@@ -44,7 +44,7 @@ mvn clean package
4444

4545
Install
4646

47-
- `target/messente-api-4.0.0.jar`
47+
- `target/messente-api-4.1.0.jar`
4848
- `target/lib/*.jar`
4949

5050
## Features

api/openapi.yaml

+44-2
Original file line numberDiff line numberDiff line change
@@ -2459,13 +2459,23 @@ components:
24592459
description: A container for successful delivery report response
24602460
example:
24612461
statuses:
2462-
- err: 0
2462+
- price_info:
2463+
parts_count: 6
2464+
total_price: total_price
2465+
part_price: part_price
2466+
err: 0
2467+
sender: sender
24632468
channel: sms
24642469
message_id: message_id
24652470
error: error
24662471
status: ACK
24672472
timestamp: 2000-01-23T04:56:07.000+00:00
2468-
- err: 0
2473+
- price_info:
2474+
parts_count: 6
2475+
total_price: total_price
2476+
part_price: part_price
2477+
err: 0
2478+
sender: sender
24692479
channel: sms
24702480
message_id: message_id
24712481
error: error
@@ -2495,7 +2505,12 @@ components:
24952505
DeliveryResult:
24962506
description: A delivery report
24972507
example:
2508+
price_info:
2509+
parts_count: 6
2510+
total_price: total_price
2511+
part_price: part_price
24982512
err: 0
2513+
sender: sender
24992514
channel: sms
25002515
message_id: message_id
25012516
error: error
@@ -2521,6 +2536,33 @@ components:
25212536
description: When this status was received by Omnichannel API
25222537
format: date-time
25232538
type: string
2539+
price_info:
2540+
$ref: '#/components/schemas/PriceInfo'
2541+
sender:
2542+
description: the sender of the message
2543+
type: string
2544+
type: object
2545+
PriceInfo:
2546+
description: Contains price information for the message. This value is *null*
2547+
if the message is still being processed
2548+
example:
2549+
parts_count: 6
2550+
total_price: total_price
2551+
part_price: part_price
2552+
properties:
2553+
part_price:
2554+
description: price per message part - relevant mostly for SMS
2555+
type: string
2556+
parts_count:
2557+
description: the number of parts the message consists of
2558+
type: integer
2559+
total_price:
2560+
description: total price for the message
2561+
type: string
2562+
required:
2563+
- part_price
2564+
- parts_count
2565+
- total_price
25242566
type: object
25252567
Status:
25262568
description: |-

build.gradle

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ apply plugin: 'java'
2222
apply plugin: 'com.diffplug.spotless'
2323

2424
group = 'com.messente.api'
25-
version = '4.0.0'
25+
version = '4.1.0'
2626

2727
ext {
2828
jakarta_annotation_version = "1.3.5"
@@ -113,6 +113,7 @@ java {
113113

114114
javadoc {
115115
options.tags = [ "http.response.details:a:Http Response Details" ]
116+
options.addStringOption('Xdoclint:none', '-quiet')
116117
}
117118

118119
// Use spotless plugin to automatically format code, remove unused import, etc

build.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ lazy val root = (project in file(".")).
22
settings(
33
organization := "com.messente.api",
44
name := "messente-api",
5-
version := "4.0.0",
5+
version := "4.1.0",
66
scalaVersion := "2.11.4",
77
scalacOptions ++= Seq("-feature"),
88
javacOptions in compile ++= Seq("-Xlint:deprecation"),

docs/DeliveryResult.md

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ A delivery report
1414
|**error** | **String** | Human-readable description of what went wrong, *null* in case of success or if the message has not been processed yet | [optional] |
1515
|**err** | **ErrorCodeOmnichannelMachine** | | [optional] |
1616
|**timestamp** | **OffsetDateTime** | When this status was received by Omnichannel API | [optional] |
17+
|**priceInfo** | [**PriceInfo**](PriceInfo.md) | | [optional] |
18+
|**sender** | **String** | the sender of the message | [optional] |
1719

1820

1921

docs/PriceInfo.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
3+
# PriceInfo
4+
5+
Contains price information for the message. This value is *null* if the message is still being processed
6+
7+
## Properties
8+
9+
| Name | Type | Description | Notes |
10+
|------------ | ------------- | ------------- | -------------|
11+
|**partPrice** | **String** | price per message part - relevant mostly for SMS | |
12+
|**partsCount** | **Integer** | the number of parts the message consists of | |
13+
|**totalPrice** | **String** | total price for the message | |
14+
15+
16+

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<artifactId>messente-api</artifactId>
66
<packaging>jar</packaging>
77
<name>messente-api</name>
8-
<version>4.0.0</version>
8+
<version>4.1.0</version>
99
<url>https://github.com/messente/messente-api-java</url>
1010
<description>Java library for Messente API</description>
1111
<scm>

src/main/java/com/messente/ApiClient.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ private void init() {
141141
json = new JSON();
142142

143143
// Set default User-Agent.
144-
setUserAgent("OpenAPI-Generator/4.0.0/java");
144+
setUserAgent("OpenAPI-Generator/4.1.0/java");
145145

146146
authentications = new HashMap<String, Authentication>();
147147
}

src/main/java/com/messente/Configuration.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.6.0")
1717
public class Configuration {
18-
public static final String VERSION = "4.0.0";
18+
public static final String VERSION = "4.1.0";
1919

2020
private static ApiClient defaultApiClient = new ApiClient();
2121

src/main/java/com/messente/JSON.java

+1
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
131131
gsonBuilder.registerTypeAdapterFactory(new com.messente.api.OmniMessageCreateSuccessResponse.CustomTypeAdapterFactory());
132132
gsonBuilder.registerTypeAdapterFactory(new com.messente.api.Omnimessage.CustomTypeAdapterFactory());
133133
gsonBuilder.registerTypeAdapterFactory(new com.messente.api.OmnimessageMessagesInner.CustomTypeAdapterFactory());
134+
gsonBuilder.registerTypeAdapterFactory(new com.messente.api.PriceInfo.CustomTypeAdapterFactory());
134135
gsonBuilder.registerTypeAdapterFactory(new com.messente.api.SMS.CustomTypeAdapterFactory());
135136
gsonBuilder.registerTypeAdapterFactory(new com.messente.api.StatisticsReport.CustomTypeAdapterFactory());
136137
gsonBuilder.registerTypeAdapterFactory(new com.messente.api.StatisticsReportSettings.CustomTypeAdapterFactory());

src/main/java/com/messente/api/DeliveryResult.java

+62-2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import com.google.gson.stream.JsonWriter;
2222
import com.messente.api.Channel;
2323
import com.messente.api.ErrorCodeOmnichannelMachine;
24+
import com.messente.api.PriceInfo;
2425
import com.messente.api.Status;
2526
import java.io.IOException;
2627
import java.time.OffsetDateTime;
@@ -81,6 +82,14 @@ public class DeliveryResult {
8182
@SerializedName(SERIALIZED_NAME_TIMESTAMP)
8283
private OffsetDateTime timestamp;
8384

85+
public static final String SERIALIZED_NAME_PRICE_INFO = "price_info";
86+
@SerializedName(SERIALIZED_NAME_PRICE_INFO)
87+
private PriceInfo priceInfo;
88+
89+
public static final String SERIALIZED_NAME_SENDER = "sender";
90+
@SerializedName(SERIALIZED_NAME_SENDER)
91+
private String sender;
92+
8493
public DeliveryResult() {
8594
}
8695

@@ -198,6 +207,44 @@ public void setTimestamp(OffsetDateTime timestamp) {
198207
}
199208

200209

210+
public DeliveryResult priceInfo(PriceInfo priceInfo) {
211+
this.priceInfo = priceInfo;
212+
return this;
213+
}
214+
215+
/**
216+
* Get priceInfo
217+
* @return priceInfo
218+
**/
219+
@javax.annotation.Nullable
220+
public PriceInfo getPriceInfo() {
221+
return priceInfo;
222+
}
223+
224+
public void setPriceInfo(PriceInfo priceInfo) {
225+
this.priceInfo = priceInfo;
226+
}
227+
228+
229+
public DeliveryResult sender(String sender) {
230+
this.sender = sender;
231+
return this;
232+
}
233+
234+
/**
235+
* the sender of the message
236+
* @return sender
237+
**/
238+
@javax.annotation.Nullable
239+
public String getSender() {
240+
return sender;
241+
}
242+
243+
public void setSender(String sender) {
244+
this.sender = sender;
245+
}
246+
247+
201248

202249
@Override
203250
public boolean equals(Object o) {
@@ -213,7 +260,9 @@ public boolean equals(Object o) {
213260
Objects.equals(this.messageId, deliveryResult.messageId) &&
214261
Objects.equals(this.error, deliveryResult.error) &&
215262
Objects.equals(this.err, deliveryResult.err) &&
216-
Objects.equals(this.timestamp, deliveryResult.timestamp);
263+
Objects.equals(this.timestamp, deliveryResult.timestamp) &&
264+
Objects.equals(this.priceInfo, deliveryResult.priceInfo) &&
265+
Objects.equals(this.sender, deliveryResult.sender);
217266
}
218267

219268
private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) {
@@ -222,7 +271,7 @@ private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b)
222271

223272
@Override
224273
public int hashCode() {
225-
return Objects.hash(status, channel, messageId, error, err, timestamp);
274+
return Objects.hash(status, channel, messageId, error, err, timestamp, priceInfo, sender);
226275
}
227276

228277
private static <T> int hashCodeNullable(JsonNullable<T> a) {
@@ -242,6 +291,8 @@ public String toString() {
242291
sb.append(" error: ").append(toIndentedString(error)).append("\n");
243292
sb.append(" err: ").append(toIndentedString(err)).append("\n");
244293
sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n");
294+
sb.append(" priceInfo: ").append(toIndentedString(priceInfo)).append("\n");
295+
sb.append(" sender: ").append(toIndentedString(sender)).append("\n");
245296
sb.append("}");
246297
return sb.toString();
247298
}
@@ -270,6 +321,8 @@ private String toIndentedString(Object o) {
270321
openapiFields.add("error");
271322
openapiFields.add("err");
272323
openapiFields.add("timestamp");
324+
openapiFields.add("price_info");
325+
openapiFields.add("sender");
273326

274327
// a set of required properties/fields (JSON key names)
275328
openapiRequiredFields = new HashSet<String>();
@@ -314,6 +367,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
314367
if (jsonObj.get("err") != null && !jsonObj.get("err").isJsonNull()) {
315368
ErrorCodeOmnichannelMachine.validateJsonElement(jsonObj.get("err"));
316369
}
370+
// validate the optional field `price_info`
371+
if (jsonObj.get("price_info") != null && !jsonObj.get("price_info").isJsonNull()) {
372+
PriceInfo.validateJsonElement(jsonObj.get("price_info"));
373+
}
374+
if ((jsonObj.get("sender") != null && !jsonObj.get("sender").isJsonNull()) && !jsonObj.get("sender").isJsonPrimitive()) {
375+
throw new IllegalArgumentException(String.format("Expected the field `sender` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sender").toString()));
376+
}
317377
}
318378

319379
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {

0 commit comments

Comments
 (0)