Skip to content

Commit

Permalink
Version 1.0.2 released
Browse files Browse the repository at this point in the history
  • Loading branch information
nosovm committed Feb 9, 2023
1 parent 5e5987b commit 898098c
Show file tree
Hide file tree
Showing 534 changed files with 20,288 additions and 2,779 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Voximplant API client library
#### Version 1.0
#### Version 1.0.2

## Prerequisites

Expand All @@ -18,7 +18,7 @@ Setup a `maven` dependency for your project:
<dependency>
<groupId>org.voximplant</groupId>
<artifactId>apiclient</artifactId>
<version>1.0.1</version>
<version>1.0.2</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.voximplant</groupId>
<artifactId>apiclient</artifactId>
<version>1.0.1</version>
<version>1.0.2</version>
<packaging>jar</packaging>

<name>voximplant-apiclient</name>
Expand Down
263 changes: 261 additions & 2 deletions src/main/java/com/voximplant/apiclient/VoximplantAPIClient.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ private String generateAuthHeader() {
builder.setHeader(headers);
builder.signWith(SignatureAlgorithm.RS256, this.privateKey);
String ss = builder.compact();
System.out.println("token generated");
return "Bearer "+ss;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import java.util.Date;
import java.util.Map;
import java.math.BigDecimal;
import com.voximplant.apiclient.response.*;
import com.voximplant.apiclient.util.MultiArgument;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.voximplant.apiclient.util.StringHelper;
Expand All @@ -18,7 +19,7 @@ public class A2PGetSmsHistoryRequest implements Alignable {

@RequestField(name="source_number")
/**
* The source phone number.
* The source phone number
*/
public String getSourceNumber() {
return this.sourceNumber;
Expand All @@ -29,7 +30,7 @@ public boolean hasSourceNumber() {
}

/**
* The source phone number.
* The source phone number
*/
public A2PGetSmsHistoryRequest setSourceNumber(String d) {
this.sourceNumber = d;
Expand All @@ -40,7 +41,7 @@ public A2PGetSmsHistoryRequest setSourceNumber(String d) {

@RequestField(name="destination_number")
/**
* The destination phone number.
* The destination phone number
*/
public String getDestinationNumber() {
return this.destinationNumber;
Expand All @@ -51,7 +52,7 @@ public boolean hasDestinationNumber() {
}

/**
* The destination phone number.
* The destination phone number
*/
public A2PGetSmsHistoryRequest setDestinationNumber(String d) {
this.destinationNumber = d;
Expand All @@ -62,8 +63,8 @@ public A2PGetSmsHistoryRequest setDestinationNumber(String d) {

@RequestField(name="count")
/**
* Maximum number of resulting rows fetched. Must be not more than 1000.
* If left blank, then the default value of 1000 will be used.
* Maximum number of resulting rows fetched. Must be not bigger than
* 1000. If left blank, then the default value of 1000 will be used
*/
public Long getCount() {
return this.count;
Expand All @@ -74,8 +75,8 @@ public boolean hasCount() {
}

/**
* Maximum number of resulting rows fetched. Must be not more than 1000.
* If left blank, then the default value of 1000 will be used.
* Maximum number of resulting rows fetched. Must be not bigger than
* 1000. If left blank, then the default value of 1000 will be used
*/
public A2PGetSmsHistoryRequest setCount(long d) {
this.count = Long.valueOf(d);
Expand All @@ -86,7 +87,7 @@ public A2PGetSmsHistoryRequest setCount(long d) {

@RequestField(name="offset")
/**
* The first <b>N</b> records will be skipped in the output.
* The first <b>N</b> records will be skipped in the output
*/
public Long getOffset() {
return this.offset;
Expand All @@ -97,7 +98,7 @@ public boolean hasOffset() {
}

/**
* The first <b>N</b> records will be skipped in the output.
* The first <b>N</b> records will be skipped in the output
*/
public A2PGetSmsHistoryRequest setOffset(long d) {
this.offset = Long.valueOf(d);
Expand All @@ -111,7 +112,7 @@ public A2PGetSmsHistoryRequest setOffset(long d) {
@SerializeUsing(serializer = TimestampSerializer.class)
/**
* Date from which the search is to start. Format is 'yyyy-MM-dd
* HH:mm:ss'.
* HH:mm:ss'
*/
public Date getFromDate() {
return this.fromDate;
Expand All @@ -123,7 +124,7 @@ public boolean hasFromDate() {

/**
* Date from which the search is to start. Format is 'yyyy-MM-dd
* HH:mm:ss'.
* HH:mm:ss'
*/
public A2PGetSmsHistoryRequest setFromDate(Date d) {
this.fromDate = d;
Expand All @@ -136,7 +137,7 @@ public A2PGetSmsHistoryRequest setFromDate(Date d) {
@RequestField(name="to_date")
@SerializeUsing(serializer = TimestampSerializer.class)
/**
* Date from which the search is to end. Format is 'yyyy-MM-dd HH:mm:ss'.
* Date from which the search is to end. Format is 'yyyy-MM-dd HH:mm:ss'
*/
public Date getToDate() {
return this.toDate;
Expand All @@ -147,7 +148,7 @@ public boolean hasToDate() {
}

/**
* Date from which the search is to end. Format is 'yyyy-MM-dd HH:mm:ss'.
* Date from which the search is to end. Format is 'yyyy-MM-dd HH:mm:ss'
*/
public A2PGetSmsHistoryRequest setToDate(Date d) {
this.toDate = d;
Expand All @@ -158,7 +159,7 @@ public A2PGetSmsHistoryRequest setToDate(Date d) {

@RequestField(name="output")
/**
* The output format. The possible values are: json, csv.
* The output format. The possible values are json, csv
*/
public String getOutput() {
return this.output;
Expand All @@ -169,7 +170,7 @@ public boolean hasOutput() {
}

/**
* The output format. The possible values are: json, csv.
* The output format. The possible values are json, csv
*/
public A2PGetSmsHistoryRequest setOutput(String d) {
this.output = d;
Expand All @@ -181,7 +182,7 @@ public A2PGetSmsHistoryRequest setOutput(String d) {
@RequestField(name="delivery_status")
/**
* The delivery status ID: QUEUED - 1, DISPATCHED - 2, ABORTED - 3,
* REJECTED - 4, DELIVERED - 5, FAILED - 6, EXPIRED - 7, UNKNOWN - 8.
* REJECTED - 4, DELIVERED - 5, FAILED - 6, EXPIRED - 7, UNKNOWN - 8
*/
public Long getDeliveryStatus() {
return this.deliveryStatus;
Expand All @@ -193,7 +194,7 @@ public boolean hasDeliveryStatus() {

/**
* The delivery status ID: QUEUED - 1, DISPATCHED - 2, ABORTED - 3,
* REJECTED - 4, DELIVERED - 5, FAILED - 6, EXPIRED - 7, UNKNOWN - 8.
* REJECTED - 4, DELIVERED - 5, FAILED - 6, EXPIRED - 7, UNKNOWN - 8
*/
public A2PGetSmsHistoryRequest setDeliveryStatus(long d) {
this.deliveryStatus = Long.valueOf(d);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import java.util.Date;
import java.util.Map;
import java.math.BigDecimal;
import com.voximplant.apiclient.response.*;
import com.voximplant.apiclient.util.MultiArgument;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.voximplant.apiclient.util.StringHelper;
Expand All @@ -18,7 +19,7 @@ public class A2PSendSmsRequest implements Alignable {

@RequestField(name="src_number")
/**
* The source phone number.
* The source phone number
*/
public String getSrcNumber() {
return this.srcNumber;
Expand All @@ -29,7 +30,7 @@ public boolean hasSrcNumber() {
}

/**
* The source phone number.
* The source phone number
*/
public A2PSendSmsRequest setSrcNumber(String d) {
this.srcNumber = d;
Expand All @@ -40,7 +41,8 @@ public A2PSendSmsRequest setSrcNumber(String d) {

@RequestField(name="dst_numbers")
/**
* The destination phone numbers separated by the ';' symbol.
* The destination phone numbers separated by semicolon (;). The maximum
* number of these phone numbers is 100
*/
public MultiArgument<String> getDstNumbers() {
return this.dstNumbers;
Expand All @@ -51,7 +53,8 @@ public boolean hasDstNumbers() {
}

/**
* The destination phone numbers separated by the ';' symbol.
* The destination phone numbers separated by semicolon (;). The maximum
* number of these phone numbers is 100
*/
public A2PSendSmsRequest setDstNumbers(MultiArgument<String> d) {
this.dstNumbers = d;
Expand All @@ -62,7 +65,9 @@ public A2PSendSmsRequest setDstNumbers(MultiArgument<String> d) {

@RequestField(name="text")
/**
* The message text, up to 1600 characters.
* The message text, up to 1600 characters. We split long messages
* greater than 160 GSM-7 characters or 70 UTF-16 characters into
* multiple segments. Each segment is charged as one message
*/
public String getText() {
return this.text;
Expand All @@ -73,13 +78,37 @@ public boolean hasText() {
}

/**
* The message text, up to 1600 characters.
* The message text, up to 1600 characters. We split long messages
* greater than 160 GSM-7 characters or 70 UTF-16 characters into
* multiple segments. Each segment is charged as one message
*/
public A2PSendSmsRequest setText(String d) {
this.text = d;
return this;
}

private Boolean storeBody;

@RequestField(name="store_body")
/**
* Set to true to store outbound message texts. Default value is false
*/
public Boolean getStoreBody() {
return this.storeBody;
}

public boolean hasStoreBody() {
return this.storeBody != null;
}

/**
* Set to true to store outbound message texts. Default value is false
*/
public A2PSendSmsRequest setStoreBody(boolean d) {
this.storeBody = Boolean.valueOf(d);
return this;
}

public String toString(int alignment) {
char[] preAligned = new char[alignment - 1];
char[] aligned = new char[alignment];
Expand Down Expand Up @@ -113,6 +142,14 @@ public String toString(int alignment) {
.append(',')
.append(System.lineSeparator());
}
if (storeBody != null) {
sb.append(aligned)
.append("\"storeBody\": \"")
.append(storeBody)
.append('"')
.append(',')
.append(System.lineSeparator());
}
return sb.append(preAligned).append('}').append(',').toString();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import java.util.Date;
import java.util.Map;
import java.math.BigDecimal;
import com.voximplant.apiclient.response.*;
import com.voximplant.apiclient.util.MultiArgument;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.voximplant.apiclient.util.StringHelper;
Expand All @@ -18,7 +19,7 @@ public class ActivateCallerIDRequest implements Alignable {

@RequestField(name="callerid_id")
/**
* The id of the callerID object.
* The id of the callerID object
*/
public Long getCalleridId() {
return this.calleridId;
Expand All @@ -29,7 +30,7 @@ public boolean hasCalleridId() {
}

/**
* The id of the callerID object.
* The id of the callerID object
*/
public ActivateCallerIDRequest setCalleridId(long d) {
this.calleridId = Long.valueOf(d);
Expand All @@ -40,7 +41,7 @@ public ActivateCallerIDRequest setCalleridId(long d) {

@RequestField(name="callerid_number")
/**
* The callerID number that can be used instead of <b>callerid_id</b>.
* The callerID number that can be used instead of <b>callerid_id</b>
*/
public String getCalleridNumber() {
return this.calleridNumber;
Expand All @@ -51,7 +52,7 @@ public boolean hasCalleridNumber() {
}

/**
* The callerID number that can be used instead of <b>callerid_id</b>.
* The callerID number that can be used instead of <b>callerid_id</b>
*/
public ActivateCallerIDRequest setCalleridNumber(String d) {
this.calleridNumber = d;
Expand All @@ -62,7 +63,7 @@ public ActivateCallerIDRequest setCalleridNumber(String d) {

@RequestField(name="verification_code")
/**
* The verification code, see the VerifyCallerID function.
* The verification code, see the VerifyCallerID function
*/
public String getVerificationCode() {
return this.verificationCode;
Expand All @@ -73,7 +74,7 @@ public boolean hasVerificationCode() {
}

/**
* The verification code, see the VerifyCallerID function.
* The verification code, see the VerifyCallerID function
*/
public ActivateCallerIDRequest setVerificationCode(String d) {
this.verificationCode = d;
Expand Down
Loading

0 comments on commit 898098c

Please sign in to comment.