Skip to content
Open
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: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Requirements

- JDK 7 or 8
- JDK 7+
- Maven 3.x

## How to build the jar
Expand Down
53 changes: 15 additions & 38 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,66 +6,43 @@

<groupId>com.smsglobal</groupId>
<artifactId>smglobal-java-client</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.9-SNAPSHOT</version>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.3.6</version>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
<version>5.1.3</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>fluent-hc</artifactId>
<version>4.5.2</version>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5-fluent</artifactId>
<version>5.1.3</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.7</version>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.13.3</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<version>2.13.3</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>
</dependency>

<!-- https://mvnrepository.com/artifact/commons-beanutils/commons-beanutils -->
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.9.4</version>
</dependency>

</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package com.smsglobal.client;

import com.fasterxml.jackson.annotation.JsonProperty;

public abstract class AbstractHasOffsetLimitTotal {

@JsonProperty("offset")
protected Integer offset;

@JsonProperty("limit")
protected Integer limit;

@JsonProperty("total")
protected Integer total;

public Integer getOffset() {
return this.offset;
}

public void setOffset(final Integer offset) {
this.offset = offset;
}

public Integer getLimit() {
return this.limit;
}

public void setLimit(final Integer limit) {
this.limit = limit;
}

public Integer getTotal() {
return this.total;
}

public void setTotal(final Integer total) {
this.total = total;
}
}
19 changes: 19 additions & 0 deletions src/main/java/com/smsglobal/client/AbstractMessages.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.smsglobal.client;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;

public abstract class AbstractMessages extends AbstractHasOffsetLimitTotal {

@JsonProperty("messages")
protected List<Message> messages;

public List<Message> getMessages() {
return this.messages;
}

public void setMessages(final List<Message> messages) {
this.messages = messages;
}
}
24 changes: 24 additions & 0 deletions src/main/java/com/smsglobal/client/AutoTopup.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.smsglobal.client;

import com.fasterxml.jackson.annotation.JsonProperty;

public class AutoTopup {

@JsonProperty("disabled")
protected Boolean disabled;

public Boolean getDisabled() {
return this.disabled;
}

public void setDisabled(final Boolean disabled) {
this.disabled = disabled;
}

@Override
public String toString() {
return "AutoTopup{" +
"disabled=" + this.disabled +
'}';
}
}
17 changes: 0 additions & 17 deletions src/main/java/com/smsglobal/client/Client.java

This file was deleted.

120 changes: 120 additions & 0 deletions src/main/java/com/smsglobal/client/Contact.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
package com.smsglobal.client;

import com.fasterxml.jackson.annotation.JsonProperty;

public class Contact {

@JsonProperty("id")
protected String id;

@JsonProperty("name")
protected String name;

@JsonProperty("phone")
protected String phone;

@JsonProperty("email")
protected String email;

@JsonProperty("address")
protected String address;

@JsonProperty("city")
protected String city;

@JsonProperty("state")
protected String state;

@JsonProperty("postcode")
protected String postcode;

@JsonProperty("country")
protected String country;

public String getId() {
return this.id;
}

public void setId(final String id) {
this.id = id;
}

public String getName() {
return this.name;
}

public void setName(final String name) {
this.name = name;
}

public String getPhone() {
return this.phone;
}

public void setPhone(final String phone) {
this.phone = phone;
}

public String getEmail() {
return this.email;
}

public void setEmail(final String email) {
this.email = email;
}

public String getAddress() {
return this.address;
}

public void setAddress(final String address) {
this.address = address;
}

public String getCity() {
return this.city;
}

public void setCity(final String city) {
this.city = city;
}

public String getState() {
return this.state;
}

public void setState(final String state) {
this.state = state;
}

public String getPostcode() {
return this.postcode;
}

public void setPostcode(final String postcode) {
this.postcode = postcode;
}

public String getCountry() {
return this.country;
}

public void setCountry(final String country) {
this.country = country;
}

@Override
public String toString() {
return "Contact{" +
"id=" + this.id +
", name='" + this.name + '\'' +
", phone='" + this.phone + '\'' +
", email='" + this.email + '\'' +
", address='" + this.address + '\'' +
", city='" + this.city + '\'' +
", state='" + this.state + '\'' +
", postcode='" + this.postcode + '\'' +
", country='" + this.country + '\'' +
'}';
}
}
84 changes: 84 additions & 0 deletions src/main/java/com/smsglobal/client/ContactGroup.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
package com.smsglobal.client;

import com.fasterxml.jackson.annotation.JsonProperty;

public class ContactGroup {

@JsonProperty("id")
protected String id;

@JsonProperty("name")
protected String name;

@JsonProperty("keyword")
protected String keyword;

@JsonProperty("isGlobal")
protected Boolean global;

@JsonProperty("contactCount")
protected Integer contactCount;

@JsonProperty("defaultOrigin")
protected String defaultOrigin;

public String getId() {
return this.id;
}

public void setId(final String id) {
this.id = id;
}

public String getName() {
return this.name;
}

public void setName(final String name) {
this.name = name;
}

public String getKeyword() {
return this.keyword;
}

public void setKeyword(final String keyword) {
this.keyword = keyword;
}

public Boolean getGlobal() {
return this.global;
}

public void setGlobal(final Boolean global) {
this.global = global;
}

public Integer getContactCount() {
return this.contactCount;
}

public void setContactCount(final Integer contactCount) {
this.contactCount = contactCount;
}

public String getDefaultOrigin() {
return this.defaultOrigin;
}

public void setDefaultOrigin(final String defaultOrigin) {
this.defaultOrigin = defaultOrigin;
}

@Override
public String toString() {
return "ContactGroup{" +
"id=" + this.id +
", name='" + this.name + '\'' +
", keyword='" + this.keyword + '\'' +
", global=" + this.global +
", contactCount=" + this.contactCount +
", defaultOrigin='" + this.defaultOrigin + '\'' +
'}';
}
}
Loading