Skip to content

Commit 10c8dd8

Browse files
author
Erik Räni
authored
🎉 2.0.0 (#8)
**Bug Fix** - [phonebook-api][contacts] Make sure scheduled deletion date field is only in responses, not in requests - The contact class in contact and contact list envelopes changed
1 parent 3c9afb7 commit 10c8dd8

14 files changed

+386
-55
lines changed

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: 1.3.0
4-
- Java artifact version: 1.3.0
4+
- Java artifact version: 2.0.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:1.3.0"
15+
compile "com.messente.api:messente-api:2.0.0"
1616
```
1717

1818
### Maven
@@ -21,15 +21,15 @@ compile "com.messente.api:messente-api:1.3.0"
2121
<dependency>
2222
<groupId>com.messente.api</groupId>
2323
<artifactId>messente-api</artifactId>
24-
<version>1.3.0</version>
24+
<version>2.0.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='1.3.0'>
32+
<dependency org='com.messente.api' name='messente-api' rev='2.0.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-1.3.0.jar`
47+
- `target/messente-api-2.0.0.jar`
4848
- `target/lib/*.jar`
4949

5050
## Features

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apply plugin: 'idea'
22
apply plugin: 'eclipse'
33

44
group = 'com.messente.api'
5-
version = '1.3.0'
5+
version = '2.0.0'
66

77
buildscript {
88
repositories {

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 := "1.3.0",
5+
version := "2.0.0",
66
scalaVersion := "2.11.4",
77
scalacOptions ++= Seq("-feature"),
88
javacOptions in compile ++= Seq("-Xlint:deprecation"),

docs/ContactEnvelope.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
## Properties
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**contact** | [**ContactFields**](ContactFields.md) | | [optional]
7+
**contact** | [**ContactResponseFields**](ContactResponseFields.md) | | [optional]
88

99

1010

docs/ContactFields.md

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ Name | Type | Description | Notes
1414
**custom2** | **String** | The second custom field | [optional]
1515
**custom3** | **String** | The third custom field | [optional]
1616
**custom4** | **String** | The fourth custom field | [optional]
17-
**scheduledDeletionDate** | [**LocalDate**](LocalDate.md) | The date in ISO 8601 format, YYYY-MM-DD, on which the contact is going to be deleted because it has not belonged to a group for 30 days | [optional]
1817

1918

2019

docs/ContactListEnvelope.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
## Properties
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**contacts** | [**List&lt;ContactFields&gt;**](ContactFields.md) | An array of contacts | [optional]
7+
**contacts** | [**List&lt;ContactResponseFields&gt;**](ContactResponseFields.md) | An array of contacts | [optional]
88

99

1010

docs/ContactResponseFields.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
# ContactResponseFields
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**phoneNumber** | **String** | Phone number in e.164 format | [optional]
8+
**email** | **String** | The email of the contact | [optional]
9+
**firstName** | **String** | The first name of the contact | [optional]
10+
**lastName** | **String** | The last name of the contact | [optional]
11+
**company** | **String** | The company of the contact | [optional]
12+
**title** | **String** | The title of the contact | [optional]
13+
**custom** | **String** | The first custom field | [optional]
14+
**custom2** | **String** | The second custom field | [optional]
15+
**custom3** | **String** | The third custom field | [optional]
16+
**custom4** | **String** | The fourth custom field | [optional]
17+
**scheduledDeletionDate** | [**LocalDate**](LocalDate.md) | The date in ISO 8601 format, YYYY-MM-DD, on which the contact is going to be deleted because it has not belonged to a group for 30 days | [optional]
18+
19+
20+

docs/ContactsApi.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ basicAuth.setUsername("YOUR USERNAME");
9191
basicAuth.setPassword("YOUR PASSWORD");
9292

9393
ContactsApi apiInstance = new ContactsApi();
94-
ContactFields contactFields = {"phoneNumber":"+37251000000","email":"[email protected]","firstName":"Any","lastName":"One","company":"Messente","title":"Sir","custom":"Any custom","custom2":"Any custom two","custom3":"Any custom three","custom4":"Any custom four","scheduledDeletionDate":"2020-08-31"}; // ContactFields |
94+
ContactFields contactFields = {"phoneNumber":"+37251000000","email":"[email protected]","firstName":"Any","lastName":"One","company":"Messente","title":"Sir","custom":"Any custom","custom2":"Any custom two","custom3":"Any custom three","custom4":"Any custom four"}; // ContactFields |
9595
try {
9696
ContactEnvelope result = apiInstance.createContact(contactFields);
9797
System.out.println(result);
@@ -404,7 +404,7 @@ basicAuth.setPassword("YOUR PASSWORD");
404404

405405
ContactsApi apiInstance = new ContactsApi();
406406
String phone = +37251000000; // String | A phone number
407-
ContactUpdateFields contactUpdateFields = {"email":"[email protected]","firstName":"Any","lastName":"One","company":"Messente","title":"Sir","custom":"Any custom","custom2":"Any custom two","custom3":"Any custom three","custom4":"Any custom four","scheduledDeletionDate":"2020-08-31"}; // ContactUpdateFields |
407+
ContactUpdateFields contactUpdateFields = {"email":"[email protected]","firstName":"Any","lastName":"One","company":"Messente","title":"Sir","custom":"Any custom","custom2":"Any custom two","custom3":"Any custom three","custom4":"Any custom four"}; // ContactUpdateFields |
408408
try {
409409
ContactEnvelope result = apiInstance.updateContact(phone, contactUpdateFields);
410410
System.out.println(result);

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>1.3.0</version>
8+
<version>2.0.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
@@ -99,7 +99,7 @@ private void init() {
9999
json = new JSON();
100100

101101
// Set default User-Agent.
102-
setUserAgent("OpenAPI-Generator/1.3.0/java");
102+
setUserAgent("OpenAPI-Generator/2.0.0/java");
103103

104104
authentications = new HashMap<String, Authentication>();
105105
}

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

+5-5
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import com.google.gson.annotations.SerializedName;
2121
import com.google.gson.stream.JsonReader;
2222
import com.google.gson.stream.JsonWriter;
23-
import com.messente.api.ContactFields;
23+
import com.messente.api.ContactResponseFields;
2424
import io.swagger.annotations.ApiModel;
2525
import io.swagger.annotations.ApiModelProperty;
2626
import java.io.IOException;
@@ -33,9 +33,9 @@
3333
public class ContactEnvelope {
3434
public static final String SERIALIZED_NAME_CONTACT = "contact";
3535
@SerializedName(SERIALIZED_NAME_CONTACT)
36-
private ContactFields contact = null;
36+
private ContactResponseFields contact = null;
3737

38-
public ContactEnvelope contact(ContactFields contact) {
38+
public ContactEnvelope contact(ContactResponseFields contact) {
3939
this.contact = contact;
4040
return this;
4141
}
@@ -45,11 +45,11 @@ public ContactEnvelope contact(ContactFields contact) {
4545
* @return contact
4646
**/
4747
@ApiModelProperty(value = "")
48-
public ContactFields getContact() {
48+
public ContactResponseFields getContact() {
4949
return contact;
5050
}
5151

52-
public void setContact(ContactFields contact) {
52+
public void setContact(ContactResponseFields contact) {
5353
this.contact = contact;
5454
}
5555

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

+4-29
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,11 @@
2323
import io.swagger.annotations.ApiModel;
2424
import io.swagger.annotations.ApiModelProperty;
2525
import java.io.IOException;
26-
import org.threeten.bp.LocalDate;
2726

2827
/**
29-
* A container for fields of a contact
28+
* A container for fields of a request body of a contact
3029
*/
31-
@ApiModel(description = "A container for fields of a contact")
30+
@ApiModel(description = "A container for fields of a request body of a contact")
3231

3332
public class ContactFields {
3433
public static final String SERIALIZED_NAME_PHONE_NUMBER = "phoneNumber";
@@ -71,10 +70,6 @@ public class ContactFields {
7170
@SerializedName(SERIALIZED_NAME_CUSTOM4)
7271
private String custom4;
7372

74-
public static final String SERIALIZED_NAME_SCHEDULED_DELETION_DATE = "scheduledDeletionDate";
75-
@SerializedName(SERIALIZED_NAME_SCHEDULED_DELETION_DATE)
76-
private LocalDate scheduledDeletionDate;
77-
7873
public ContactFields phoneNumber(String phoneNumber) {
7974
this.phoneNumber = phoneNumber;
8075
return this;
@@ -255,24 +250,6 @@ public void setCustom4(String custom4) {
255250
this.custom4 = custom4;
256251
}
257252

258-
public ContactFields scheduledDeletionDate(LocalDate scheduledDeletionDate) {
259-
this.scheduledDeletionDate = scheduledDeletionDate;
260-
return this;
261-
}
262-
263-
/**
264-
* The date in ISO 8601 format, YYYY-MM-DD, on which the contact is going to be deleted because it has not belonged to a group for 30 days
265-
* @return scheduledDeletionDate
266-
**/
267-
@ApiModelProperty(value = "The date in ISO 8601 format, YYYY-MM-DD, on which the contact is going to be deleted because it has not belonged to a group for 30 days")
268-
public LocalDate getScheduledDeletionDate() {
269-
return scheduledDeletionDate;
270-
}
271-
272-
public void setScheduledDeletionDate(LocalDate scheduledDeletionDate) {
273-
this.scheduledDeletionDate = scheduledDeletionDate;
274-
}
275-
276253

277254
@Override
278255
public boolean equals(java.lang.Object o) {
@@ -292,13 +269,12 @@ public boolean equals(java.lang.Object o) {
292269
Objects.equals(this.custom, contactFields.custom) &&
293270
Objects.equals(this.custom2, contactFields.custom2) &&
294271
Objects.equals(this.custom3, contactFields.custom3) &&
295-
Objects.equals(this.custom4, contactFields.custom4) &&
296-
Objects.equals(this.scheduledDeletionDate, contactFields.scheduledDeletionDate);
272+
Objects.equals(this.custom4, contactFields.custom4);
297273
}
298274

299275
@Override
300276
public int hashCode() {
301-
return Objects.hash(phoneNumber, email, firstName, lastName, company, title, custom, custom2, custom3, custom4, scheduledDeletionDate);
277+
return Objects.hash(phoneNumber, email, firstName, lastName, company, title, custom, custom2, custom3, custom4);
302278
}
303279

304280

@@ -317,7 +293,6 @@ public String toString() {
317293
sb.append(" custom2: ").append(toIndentedString(custom2)).append("\n");
318294
sb.append(" custom3: ").append(toIndentedString(custom3)).append("\n");
319295
sb.append(" custom4: ").append(toIndentedString(custom4)).append("\n");
320-
sb.append(" scheduledDeletionDate: ").append(toIndentedString(scheduledDeletionDate)).append("\n");
321296
sb.append("}");
322297
return sb.toString();
323298
}

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

+7-7
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import com.google.gson.annotations.SerializedName;
2121
import com.google.gson.stream.JsonReader;
2222
import com.google.gson.stream.JsonWriter;
23-
import com.messente.api.ContactFields;
23+
import com.messente.api.ContactResponseFields;
2424
import io.swagger.annotations.ApiModel;
2525
import io.swagger.annotations.ApiModelProperty;
2626
import java.io.IOException;
@@ -35,16 +35,16 @@
3535
public class ContactListEnvelope {
3636
public static final String SERIALIZED_NAME_CONTACTS = "contacts";
3737
@SerializedName(SERIALIZED_NAME_CONTACTS)
38-
private List<ContactFields> contacts = null;
38+
private List<ContactResponseFields> contacts = null;
3939

40-
public ContactListEnvelope contacts(List<ContactFields> contacts) {
40+
public ContactListEnvelope contacts(List<ContactResponseFields> contacts) {
4141
this.contacts = contacts;
4242
return this;
4343
}
4444

45-
public ContactListEnvelope addContactsItem(ContactFields contactsItem) {
45+
public ContactListEnvelope addContactsItem(ContactResponseFields contactsItem) {
4646
if (this.contacts == null) {
47-
this.contacts = new ArrayList<ContactFields>();
47+
this.contacts = new ArrayList<ContactResponseFields>();
4848
}
4949
this.contacts.add(contactsItem);
5050
return this;
@@ -55,11 +55,11 @@ public ContactListEnvelope addContactsItem(ContactFields contactsItem) {
5555
* @return contacts
5656
**/
5757
@ApiModelProperty(value = "An array of contacts")
58-
public List<ContactFields> getContacts() {
58+
public List<ContactResponseFields> getContacts() {
5959
return contacts;
6060
}
6161

62-
public void setContacts(List<ContactFields> contacts) {
62+
public void setContacts(List<ContactResponseFields> contacts) {
6363
this.contacts = contacts;
6464
}
6565

0 commit comments

Comments
 (0)