Skip to content

Commit 5ff4bcf

Browse files
committed
Merge branch 'master' of https://github.com/twilio/twilio-java
2 parents 9bdd7db + 0593e5c commit 5ff4bcf

File tree

71 files changed

+8897
-59
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+8897
-59
lines changed

CHANGES.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
11
twilio-java changelog
22
=====================
33

4+
[2017-10-13] Version 7.15.2
5+
----------------------------
6+
**Api**
7+
- Add `smart_encoded` param for Messages
8+
- Add `identity_sid` param to IncomingPhoneNumbers create and update
9+
10+
**Preview**
11+
- Make 'address_sid' and 'email' optional fields when creating a HostedNumberOrder
12+
- Add AuthorizationDocuments preview API.
13+
14+
**Proxy**
15+
- Initial Release
16+
17+
**Wireless**
18+
- Added `ip_address` to sim resource
19+
20+
421
[2017-10-06] Version 7.15.1
522
----------------------------
623
**Preview**

pom.xml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<artifactId>twilio</artifactId>
88
<packaging>jar</packaging>
99
<name>twilio</name>
10-
<version>7.15.2-SNAPSHOT</version>
10+
<version>7.15.3-SNAPSHOT</version>
1111
<description>Twilio Java Helper Library</description>
1212
<url>https://www.twilio.com</url>
1313
<licenses>
@@ -55,12 +55,6 @@
5555
</goals>
5656
</execution>
5757
</executions>
58-
<configuration>
59-
<gpgArguments>
60-
<arg>--pinentry-mode</arg>
61-
<arg>loopback</arg>
62-
</gpgArguments>
63-
</configuration>
6458
</plugin>
6559
</plugins>
6660
</build>

src/main/java/com/twilio/Twilio.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*/
1313
public class Twilio {
1414

15-
public static final String VERSION = "7.15.1";
15+
public static final String VERSION = "7.15.2";
1616
public static final String JAVA_VERSION = System.getProperty("java.version");
1717

1818
private static String username;

src/main/java/com/twilio/rest/Domains.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public enum Domains {
1818
NOTIFY("notify"),
1919
PREVIEW("preview"),
2020
PRICING("pricing"),
21+
PROXY("proxy"),
2122
TASKROUTER("taskrouter"),
2223
TRUNKING("trunking"),
2324
VIDEO("video"),

src/main/java/com/twilio/rest/api/v2010/account/IncomingPhoneNumber.java

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
@JsonIgnoreProperties(ignoreUnknown = true)
3838
public class IncomingPhoneNumber extends Resource {
39-
private static final long serialVersionUID = 213039565974896L;
39+
private static final long serialVersionUID = 125276820829407L;
4040

4141
public enum AddressRequirement {
4242
NONE("none"),
@@ -290,6 +290,7 @@ public static IncomingPhoneNumber fromJson(final InputStream json, final ObjectM
290290
private final DateTime dateCreated;
291291
private final DateTime dateUpdated;
292292
private final String friendlyName;
293+
private final String identitySid;
293294
private final com.twilio.type.PhoneNumber phoneNumber;
294295
private final String origin;
295296
private final String sid;
@@ -328,6 +329,8 @@ private IncomingPhoneNumber(@JsonProperty("account_sid")
328329
final String dateUpdated,
329330
@JsonProperty("friendly_name")
330331
final String friendlyName,
332+
@JsonProperty("identity_sid")
333+
final String identitySid,
331334
@JsonProperty("phone_number")
332335
final com.twilio.type.PhoneNumber phoneNumber,
333336
@JsonProperty("origin")
@@ -376,6 +379,7 @@ private IncomingPhoneNumber(@JsonProperty("account_sid")
376379
this.dateCreated = DateConverter.rfc2822DateTimeFromString(dateCreated);
377380
this.dateUpdated = DateConverter.rfc2822DateTimeFromString(dateUpdated);
378381
this.friendlyName = friendlyName;
382+
this.identitySid = identitySid;
379383
this.phoneNumber = phoneNumber;
380384
this.origin = origin;
381385
this.sid = sid;
@@ -470,6 +474,16 @@ public final String getFriendlyName() {
470474
return this.friendlyName;
471475
}
472476

477+
/**
478+
* Returns The Unique string that identifies the identity associated with
479+
* number.
480+
*
481+
* @return Unique string that identifies the identity associated with number
482+
*/
483+
public final String getIdentitySid() {
484+
return this.identitySid;
485+
}
486+
473487
/**
474488
* Returns The The incoming phone number.
475489
*
@@ -670,6 +684,7 @@ public boolean equals(final Object o) {
670684
Objects.equals(dateCreated, other.dateCreated) &&
671685
Objects.equals(dateUpdated, other.dateUpdated) &&
672686
Objects.equals(friendlyName, other.friendlyName) &&
687+
Objects.equals(identitySid, other.identitySid) &&
673688
Objects.equals(phoneNumber, other.phoneNumber) &&
674689
Objects.equals(origin, other.origin) &&
675690
Objects.equals(sid, other.sid) &&
@@ -702,6 +717,7 @@ public int hashCode() {
702717
dateCreated,
703718
dateUpdated,
704719
friendlyName,
720+
identitySid,
705721
phoneNumber,
706722
origin,
707723
sid,
@@ -735,6 +751,7 @@ public String toString() {
735751
.add("dateCreated", dateCreated)
736752
.add("dateUpdated", dateUpdated)
737753
.add("friendlyName", friendlyName)
754+
.add("identitySid", identitySid)
738755
.add("phoneNumber", phoneNumber)
739756
.add("origin", origin)
740757
.add("sid", sid)

src/main/java/com/twilio/rest/api/v2010/account/IncomingPhoneNumberCreator.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public class IncomingPhoneNumberCreator extends Creator<IncomingPhoneNumber> {
4242
private IncomingPhoneNumber.EmergencyStatus emergencyStatus;
4343
private String emergencyAddressSid;
4444
private String trunkSid;
45+
private String identitySid;
4546

4647
/**
4748
* Construct a new IncomingPhoneNumberCreator.
@@ -367,6 +368,19 @@ public IncomingPhoneNumberCreator setTrunkSid(final String trunkSid) {
367368
return this;
368369
}
369370

371+
/**
372+
* The 34 character sid of the identity Twilio should use to associate with the
373+
* number. Identities are required in some regions to meet local regulations.
374+
*
375+
* @param identitySid Unique string that identifies the identity associated
376+
* with number
377+
* @return this
378+
*/
379+
public IncomingPhoneNumberCreator setIdentitySid(final String identitySid) {
380+
this.identitySid = identitySid;
381+
return this;
382+
}
383+
370384
/**
371385
* The phone number to purchase. e.g., +16175551212 (E.164 format).
372386
*
@@ -515,5 +529,9 @@ private void addPostParams(final Request request) {
515529
if (trunkSid != null) {
516530
request.addPostParam("TrunkSid", trunkSid);
517531
}
532+
533+
if (identitySid != null) {
534+
request.addPostParam("IdentitySid", identitySid);
535+
}
518536
}
519537
}

src/main/java/com/twilio/rest/api/v2010/account/IncomingPhoneNumberUpdater.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public class IncomingPhoneNumberUpdater extends Updater<IncomingPhoneNumber> {
4343
private String emergencyAddressSid;
4444
private String trunkSid;
4545
private IncomingPhoneNumber.VoiceReceiveMode voiceReceiveMode;
46+
private String identitySid;
4647

4748
/**
4849
* Construct a new IncomingPhoneNumberUpdater.
@@ -369,6 +370,19 @@ public IncomingPhoneNumberUpdater setVoiceReceiveMode(final IncomingPhoneNumber.
369370
return this;
370371
}
371372

373+
/**
374+
* The 34 character sid of the identity Twilio should use to associate with the
375+
* number. Identities are required in some regions to meet local regulations.
376+
*
377+
* @param identitySid Unique string that identifies the identity associated
378+
* with number
379+
* @return this
380+
*/
381+
public IncomingPhoneNumberUpdater setIdentitySid(final String identitySid) {
382+
this.identitySid = identitySid;
383+
return this;
384+
}
385+
372386
/**
373387
* Make the request to the Twilio API to perform the update.
374388
*
@@ -494,5 +508,9 @@ private void addPostParams(final Request request) {
494508
if (voiceReceiveMode != null) {
495509
request.addPostParam("VoiceReceiveMode", voiceReceiveMode.toString());
496510
}
511+
512+
if (identitySid != null) {
513+
request.addPostParam("IdentitySid", identitySid);
514+
}
497515
}
498516
}

src/main/java/com/twilio/rest/api/v2010/account/MessageCreator.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public class MessageCreator extends Creator<Message> {
3939
private String providerSid;
4040
private Message.ContentRetention contentRetention;
4141
private Message.AddressRetention addressRetention;
42+
private Boolean smartEncoded;
4243

4344
/**
4445
* Construct a new MessageCreator.
@@ -293,6 +294,17 @@ public MessageCreator setAddressRetention(final Message.AddressRetention address
293294
return this;
294295
}
295296

297+
/**
298+
* The smart_encoded.
299+
*
300+
* @param smartEncoded The smart_encoded
301+
* @return this
302+
*/
303+
public MessageCreator setSmartEncoded(final Boolean smartEncoded) {
304+
this.smartEncoded = smartEncoded;
305+
return this;
306+
}
307+
296308
/**
297309
* A Twilio phone number or alphanumeric sender ID enabled for the type of
298310
* message you wish to send..
@@ -465,5 +477,9 @@ private void addPostParams(final Request request) {
465477
if (addressRetention != null) {
466478
request.addPostParam("AddressRetention", addressRetention.toString());
467479
}
480+
481+
if (smartEncoded != null) {
482+
request.addPostParam("SmartEncoded", smartEncoded.toString());
483+
}
468484
}
469485
}

src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/Local.java

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
@JsonIgnoreProperties(ignoreUnknown = true)
3838
public class Local extends Resource {
39-
private static final long serialVersionUID = 113059783533989L;
39+
private static final long serialVersionUID = 248867603226422L;
4040

4141
public enum AddressRequirement {
4242
NONE("none"),
@@ -151,6 +151,7 @@ public static Local fromJson(final InputStream json, final ObjectMapper objectMa
151151
private final DateTime dateCreated;
152152
private final DateTime dateUpdated;
153153
private final String friendlyName;
154+
private final String identitySid;
154155
private final com.twilio.type.PhoneNumber phoneNumber;
155156
private final String origin;
156157
private final String sid;
@@ -187,6 +188,8 @@ private Local(@JsonProperty("account_sid")
187188
final String dateUpdated,
188189
@JsonProperty("friendly_name")
189190
final String friendlyName,
191+
@JsonProperty("identity_sid")
192+
final String identitySid,
190193
@JsonProperty("phone_number")
191194
final com.twilio.type.PhoneNumber phoneNumber,
192195
@JsonProperty("origin")
@@ -231,6 +234,7 @@ private Local(@JsonProperty("account_sid")
231234
this.dateCreated = DateConverter.rfc2822DateTimeFromString(dateCreated);
232235
this.dateUpdated = DateConverter.rfc2822DateTimeFromString(dateUpdated);
233236
this.friendlyName = friendlyName;
237+
this.identitySid = identitySid;
234238
this.phoneNumber = phoneNumber;
235239
this.origin = origin;
236240
this.sid = sid;
@@ -323,6 +327,15 @@ public final String getFriendlyName() {
323327
return this.friendlyName;
324328
}
325329

330+
/**
331+
* Returns The The identity_sid.
332+
*
333+
* @return The identity_sid
334+
*/
335+
public final String getIdentitySid() {
336+
return this.identitySid;
337+
}
338+
326339
/**
327340
* Returns The The phone_number.
328341
*
@@ -505,6 +518,7 @@ public boolean equals(final Object o) {
505518
Objects.equals(dateCreated, other.dateCreated) &&
506519
Objects.equals(dateUpdated, other.dateUpdated) &&
507520
Objects.equals(friendlyName, other.friendlyName) &&
521+
Objects.equals(identitySid, other.identitySid) &&
508522
Objects.equals(phoneNumber, other.phoneNumber) &&
509523
Objects.equals(origin, other.origin) &&
510524
Objects.equals(sid, other.sid) &&
@@ -535,6 +549,7 @@ public int hashCode() {
535549
dateCreated,
536550
dateUpdated,
537551
friendlyName,
552+
identitySid,
538553
phoneNumber,
539554
origin,
540555
sid,
@@ -566,6 +581,7 @@ public String toString() {
566581
.add("dateCreated", dateCreated)
567582
.add("dateUpdated", dateUpdated)
568583
.add("friendlyName", friendlyName)
584+
.add("identitySid", identitySid)
569585
.add("phoneNumber", phoneNumber)
570586
.add("origin", origin)
571587
.add("sid", sid)

src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/LocalCreator.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public class LocalCreator extends Creator<Local> {
3838
private URI voiceFallbackUrl;
3939
private HttpMethod voiceMethod;
4040
private URI voiceUrl;
41+
private String identitySid;
4142

4243
/**
4344
* Construct a new LocalCreator.
@@ -275,6 +276,17 @@ public LocalCreator setVoiceUrl(final String voiceUrl) {
275276
return setVoiceUrl(Promoter.uriFromString(voiceUrl));
276277
}
277278

279+
/**
280+
* The identity_sid.
281+
*
282+
* @param identitySid The identity_sid
283+
* @return this
284+
*/
285+
public LocalCreator setIdentitySid(final String identitySid) {
286+
this.identitySid = identitySid;
287+
return this;
288+
}
289+
278290
/**
279291
* Make the request to the Twilio API to perform the create.
280292
*
@@ -384,5 +396,9 @@ private void addPostParams(final Request request) {
384396
if (voiceUrl != null) {
385397
request.addPostParam("VoiceUrl", voiceUrl.toString());
386398
}
399+
400+
if (identitySid != null) {
401+
request.addPostParam("IdentitySid", identitySid);
402+
}
387403
}
388404
}

0 commit comments

Comments
 (0)