Skip to content

Commit 2fb6e26

Browse files
author
Tom Connors
committed
Merge master 7.4.0
2 parents e37e203 + d01f1fe commit 2fb6e26

File tree

94 files changed

+4134
-281
lines changed

Some content is hidden

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

94 files changed

+4134
-281
lines changed

AUTHORS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ A huge thanks to all of our contributors:
2323
- D Keith Casey Jr
2424
- Doug Black
2525
- Eric Anderle
26+
- Evan Fossier
2627
- Frank
2728
- Frank Stratton
2829
- Girish Bharadwaj
@@ -47,6 +48,7 @@ A huge thanks to all of our contributors:
4748
- Sunil Veluvali
4849
- Takuji Shimokawa
4950
- Thomas Wilsher
51+
- Thomas Connors
5052
- Vincent Pizzo
5153
- olivier bourgain
5254
- rschiffert@twilio.com

CHANGES.md

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

4+
[2017-01-10] Version 7.4.0-alpha-1
5+
--------------------------
6+
- Added new AddOnResults API.
7+
- Allow undocumented TwiML voice parameters for Conference, Dial, and Pause PR #317.
8+
- Fix dates being serialized to null in some locales PR #320.
9+
- Add `emergencyEnabled` field to Addresses.
10+
- Add support for emergency phone numbers.
11+
- Add support for ending conferences via the API.
12+
- Add `region` field to Conferences.
13+
14+
- **Twilio Chat**
15+
- Add `membersCount` and `messagesCount` to Channel.
16+
- Add support for filtering on channel type when reading list of Channels.
17+
- Add `last_consumed_message_index` and `last_consumption_timestamp` fields to Member.
18+
- Remove ability to update Message body, was never supported by API (backwards incompatible).
19+
- Add support for new UserChannel Resource.
20+
21+
- **Taskrouter**
22+
- Add default worker fetch policy PR #313.
23+
- Add queue ordering for Workspace, TaskQueue.
24+
- Remove ability to specify `attributes` and `workflowSid` on Task creation (backwards incompatible).
25+
- Add `addons`, `taskQueueFriendlyName`, `workflowFriendlyName`, metdata to Task.
26+
- Use DateTimes for WorkspaceStatistics filtering (backwards incompatible).
27+
- Fix TaskQueueStatistics `cumulative` field incorrect type (backwards incompatible).
28+
- Fix TaskQueuesStatistics `cumulative` field incorrect type (backwards incompatible).
29+
- Remove ability to set `friendlyName` on TaskQueueStatistics (backwards incompatible).
30+
431
[2016-11-30] Version 7.3.0-alpha-1
532
--------------------------
633
- Add `recordingStatusCallback` and `recordingStatusCallbackMethod` to Conference TwiML
@@ -22,7 +49,7 @@ twilio-java changelog
2249
- Add missing fields to IncomingPhoneNumbers.
2350
- Add missing fields to Messages.
2451

25-
- * Twilio Chat *
52+
- **Twilio Chat**
2653
- Add Invites
2754
- Add `reachabilityEnabled`, `preWebhookUrl`, `postWebhookUrl`, `webhookMethod`, `webhookFilters`, `notifications` to Services.
2855
- Add `attributes`, `friendlyName`, `isOnline`, `isNotifiable` to Users.
@@ -31,7 +58,7 @@ twilio-java changelog
3158
- Add ability to update Members.
3259
- Add filtering by `identity` on Members.
3360
- Add webhook related parameters to Service updates.
34-
- Remove updating of `type` on Channels.
61+
- Remove updating of `type` on Channels.
3562

3663
[2016-10-05] Version 7.1.0-alpha-1
3764
--------------------------
@@ -121,5 +148,3 @@ This version brings a host of changes to update and modernize the `twilio-java`
121148
[2015-09-14] Version 5.0.0
122149
--------------------------
123150
- Remove deprecated total and numpages from ListResource and response parsers
124-
125-

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.0-alpha-2-SNAPSHOT</version>
10+
<version>7.4.0-alpha-1-SNAPSHOT</version>
1111
<description>Twilio Java Helper Library</description>
1212
<url>https://www.twilio.com</url>
1313
<licenses>

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.3.0-alpha-1";
15+
public static final String VERSION = "7.4.0-alpha-1";
1616
public static final String JAVA_VERSION = System.getProperty("java.version");
1717

1818
private static String username;

src/main/java/com/twilio/converter/DateConverter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.twilio.converter;
22

3+
import java.util.Locale;
34
import org.joda.time.DateTime;
45
import org.joda.time.DateTimeZone;
56
import org.joda.time.LocalDate;
@@ -16,7 +17,7 @@ public class DateConverter {
1617
DateTimeFormat.forPattern(DATE_PATTERN).withZone(DateTimeZone.UTC);
1718

1819
private static final DateTimeFormatter RFC2822_DATE_TIME_FORMATTER =
19-
DateTimeFormat.forPattern(RFC2822_DATE_TIME).withZone(DateTimeZone.UTC);
20+
DateTimeFormat.forPattern(RFC2822_DATE_TIME).withZone(DateTimeZone.UTC).withLocale(new Locale("en_US"));
2021

2122
private static final DateTimeFormatter ISO8601_DATE_TIME_FORMATTER =
2223
DateTimeFormat.forPattern(ISO8601_DATE_TIME).withZone(DateTimeZone.UTC);

src/main/java/com/twilio/jwt/taskrouter/PolicyUtils.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,14 @@ public static List<Policy> defaultWorkerPolicies(String workspaceSid, String wor
3737
.method(HttpMethod.GET)
3838
.allowed(true)
3939
.build();
40+
41+
Policy workerFetch = new Policy.Builder()
42+
.url(UrlUtils.worker(workspaceSid, workerSid))
43+
.method(HttpMethod.GET)
44+
.allowed(true)
45+
.build();
4046

41-
return Lists.newArrayList(activities, tasks, reservations);
47+
return Lists.newArrayList(activities, tasks, reservations, workerFetch);
4248
}
4349

4450
/**

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
}

0 commit comments

Comments
 (0)