Skip to content

Commit 5ca66e3

Browse files
author
Tom Connors
committed
Release 7.4.0. Locale Fix PR-320; Undocumented Parameters PR-317; Worker Policy for TaskRouter PR-313
1 parent f45d240 commit 5ca66e3

File tree

81 files changed

+3885
-267
lines changed

Some content is hidden

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

81 files changed

+3885
-267
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
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.3.1-SNAPSHOT</version>
10+
<version>7.4.0-SNAPSHOT</version>
1111
<description>Twilio Java Helper Library</description>
1212
<url>https://www.twilio.com</url>
1313
<licenses>

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

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
@JsonIgnoreProperties(ignoreUnknown = true)
3535
public class Address extends Resource {
36-
private static final long serialVersionUID = 241863313934407L;
36+
private static final long serialVersionUID = 81565212445182L;
3737

3838
/**
3939
* Create a AddressCreator to execute create.
@@ -211,6 +211,7 @@ public static Address fromJson(final InputStream json, final ObjectMapper object
211211
private final String sid;
212212
private final String street;
213213
private final String uri;
214+
private final Boolean emergencyEnabled;
214215

215216
@JsonCreator
216217
private Address(@JsonProperty("account_sid")
@@ -236,7 +237,9 @@ private Address(@JsonProperty("account_sid")
236237
@JsonProperty("street")
237238
final String street,
238239
@JsonProperty("uri")
239-
final String uri) {
240+
final String uri,
241+
@JsonProperty("emergency_enabled")
242+
final Boolean emergencyEnabled) {
240243
this.accountSid = accountSid;
241244
this.city = city;
242245
this.customerName = customerName;
@@ -249,6 +252,7 @@ private Address(@JsonProperty("account_sid")
249252
this.sid = sid;
250253
this.street = street;
251254
this.uri = uri;
255+
this.emergencyEnabled = emergencyEnabled;
252256
}
253257

254258
/**
@@ -359,6 +363,15 @@ public final String getUri() {
359363
return this.uri;
360364
}
361365

366+
/**
367+
* Returns The The emergency_enabled.
368+
*
369+
* @return The emergency_enabled
370+
*/
371+
public final Boolean getEmergencyEnabled() {
372+
return this.emergencyEnabled;
373+
}
374+
362375
@Override
363376
public boolean equals(final Object o) {
364377
if (this == o) {
@@ -382,7 +395,8 @@ public boolean equals(final Object o) {
382395
Objects.equals(region, other.region) &&
383396
Objects.equals(sid, other.sid) &&
384397
Objects.equals(street, other.street) &&
385-
Objects.equals(uri, other.uri);
398+
Objects.equals(uri, other.uri) &&
399+
Objects.equals(emergencyEnabled, other.emergencyEnabled);
386400
}
387401

388402
@Override
@@ -398,7 +412,8 @@ public int hashCode() {
398412
region,
399413
sid,
400414
street,
401-
uri);
415+
uri,
416+
emergencyEnabled);
402417
}
403418

404419
@Override
@@ -416,6 +431,7 @@ public String toString() {
416431
.add("sid", sid)
417432
.add("street", street)
418433
.add("uri", uri)
434+
.add("emergencyEnabled", emergencyEnabled)
419435
.toString();
420436
}
421437
}

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public class AddressCreator extends Creator<Address> {
2626
private final String postalCode;
2727
private final String isoCountry;
2828
private String friendlyName;
29+
private Boolean emergencyEnabled;
2930

3031
/**
3132
* Construct a new AddressCreator.
@@ -89,6 +90,17 @@ public AddressCreator setFriendlyName(final String friendlyName) {
8990
return this;
9091
}
9192

93+
/**
94+
* The emergency_enabled.
95+
*
96+
* @param emergencyEnabled The emergency_enabled
97+
* @return this
98+
*/
99+
public AddressCreator setEmergencyEnabled(final Boolean emergencyEnabled) {
100+
this.emergencyEnabled = emergencyEnabled;
101+
return this;
102+
}
103+
92104
/**
93105
* Make the request to the Twilio API to perform the create.
94106
*
@@ -162,5 +174,9 @@ private void addPostParams(final Request request) {
162174
if (friendlyName != null) {
163175
request.addPostParam("FriendlyName", friendlyName);
164176
}
177+
178+
if (emergencyEnabled != null) {
179+
request.addPostParam("EmergencyEnabled", emergencyEnabled.toString());
180+
}
165181
}
166182
}

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public class AddressUpdater extends Updater<Address> {
2626
private String city;
2727
private String region;
2828
private String postalCode;
29+
private Boolean emergencyEnabled;
2930

3031
/**
3132
* Construct a new AddressUpdater.
@@ -114,6 +115,17 @@ public AddressUpdater setPostalCode(final String postalCode) {
114115
return this;
115116
}
116117

118+
/**
119+
* The emergency_enabled.
120+
*
121+
* @param emergencyEnabled The emergency_enabled
122+
* @return this
123+
*/
124+
public AddressUpdater setEmergencyEnabled(final Boolean emergencyEnabled) {
125+
this.emergencyEnabled = emergencyEnabled;
126+
return this;
127+
}
128+
117129
/**
118130
* Make the request to the Twilio API to perform the update.
119131
*
@@ -183,5 +195,9 @@ private void addPostParams(final Request request) {
183195
if (postalCode != null) {
184196
request.addPostParam("PostalCode", postalCode);
185197
}
198+
199+
if (emergencyEnabled != null) {
200+
request.addPostParam("EmergencyEnabled", emergencyEnabled.toString());
201+
}
186202
}
187203
}

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

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
@JsonIgnoreProperties(ignoreUnknown = true)
3535
public class Conference extends Resource {
36-
private static final long serialVersionUID = 26859400656542L;
36+
private static final long serialVersionUID = 150944769427087L;
3737

3838
public enum Status {
3939
INIT("init"),
@@ -68,6 +68,37 @@ public static Status forValue(final String value) {
6868
}
6969
}
7070

71+
public enum UpdateStatus {
72+
COMPLETED("completed");
73+
74+
private final String value;
75+
76+
private UpdateStatus(final String value) {
77+
this.value = value;
78+
}
79+
80+
public String toString() {
81+
return value;
82+
}
83+
84+
/**
85+
* Generate a UpdateStatus from a string.
86+
* @param value string value
87+
* @return generated UpdateStatus
88+
*/
89+
@JsonCreator
90+
public static UpdateStatus forValue(final String value) {
91+
String normalized = value.replace("-", "_").toUpperCase();
92+
try {
93+
return UpdateStatus.valueOf(normalized);
94+
} catch (RuntimeException e) {
95+
96+
// Don't blow up of value does not exist
97+
return null;
98+
}
99+
}
100+
}
101+
71102
/**
72103
* Create a ConferenceFetcher to execute fetch.
73104
*
@@ -109,6 +140,28 @@ public static ConferenceReader reader() {
109140
return new ConferenceReader();
110141
}
111142

143+
/**
144+
* Create a ConferenceUpdater to execute update.
145+
*
146+
* @param accountSid The account_sid
147+
* @param sid The sid
148+
* @return ConferenceUpdater capable of executing the update
149+
*/
150+
public static ConferenceUpdater updater(final String accountSid,
151+
final String sid) {
152+
return new ConferenceUpdater(accountSid, sid);
153+
}
154+
155+
/**
156+
* Create a ConferenceUpdater to execute update.
157+
*
158+
* @param sid The sid
159+
* @return ConferenceUpdater capable of executing the update
160+
*/
161+
public static ConferenceUpdater updater(final String sid) {
162+
return new ConferenceUpdater(sid);
163+
}
164+
112165
/**
113166
* Converts a JSON String into a Conference object using the provided
114167
* ObjectMapper.
@@ -152,6 +205,7 @@ public static Conference fromJson(final InputStream json, final ObjectMapper obj
152205
private final DateTime dateUpdated;
153206
private final String apiVersion;
154207
private final String friendlyName;
208+
private final String region;
155209
private final String sid;
156210
private final Conference.Status status;
157211
private final String uri;
@@ -168,6 +222,8 @@ private Conference(@JsonProperty("account_sid")
168222
final String apiVersion,
169223
@JsonProperty("friendly_name")
170224
final String friendlyName,
225+
@JsonProperty("region")
226+
final String region,
171227
@JsonProperty("sid")
172228
final String sid,
173229
@JsonProperty("status")
@@ -181,6 +237,7 @@ private Conference(@JsonProperty("account_sid")
181237
this.dateUpdated = DateConverter.rfc2822DateTimeFromString(dateUpdated);
182238
this.apiVersion = apiVersion;
183239
this.friendlyName = friendlyName;
240+
this.region = region;
184241
this.sid = sid;
185242
this.status = status;
186243
this.uri = uri;
@@ -232,6 +289,15 @@ public final String getFriendlyName() {
232289
return this.friendlyName;
233290
}
234291

292+
/**
293+
* Returns The The region.
294+
*
295+
* @return The region
296+
*/
297+
public final String getRegion() {
298+
return this.region;
299+
}
300+
235301
/**
236302
* Returns The A string that uniquely identifies this conference.
237303
*
@@ -285,6 +351,7 @@ public boolean equals(final Object o) {
285351
Objects.equals(dateUpdated, other.dateUpdated) &&
286352
Objects.equals(apiVersion, other.apiVersion) &&
287353
Objects.equals(friendlyName, other.friendlyName) &&
354+
Objects.equals(region, other.region) &&
288355
Objects.equals(sid, other.sid) &&
289356
Objects.equals(status, other.status) &&
290357
Objects.equals(uri, other.uri) &&
@@ -298,6 +365,7 @@ public int hashCode() {
298365
dateUpdated,
299366
apiVersion,
300367
friendlyName,
368+
region,
301369
sid,
302370
status,
303371
uri,
@@ -312,6 +380,7 @@ public String toString() {
312380
.add("dateUpdated", dateUpdated)
313381
.add("apiVersion", apiVersion)
314382
.add("friendlyName", friendlyName)
383+
.add("region", region)
315384
.add("sid", sid)
316385
.add("status", status)
317386
.add("uri", uri)

0 commit comments

Comments
 (0)