Skip to content

Commit

Permalink
[Librarian] Regenerated @ 480d240ca25b1c4186b4f9485e0f0debf1e14978
Browse files Browse the repository at this point in the history
  • Loading branch information
twilio-dx committed Aug 25, 2021
1 parent 83cdd83 commit 9c2bb76
Show file tree
Hide file tree
Showing 52 changed files with 2,592 additions and 93 deletions.
40 changes: 40 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,46 @@
twilio-java changelog
=====================

[2021-08-25] Version 8.19.0
---------------------------
**Library - Chore**
- [PR #641](https://github.com/twilio/twilio-java/pull/641): integrate with sonarcloud. Thanks to [@shwetha-manvinkurke](https://github.com/shwetha-manvinkurke)!

**Api**
- Add Programmabled Voice SIP Refer call transfers (`calls-transfers`) to usage records
- Add Flex Voice Usage category (`flex-usage`) to usage records
- Corrected the `price`, `call_sid_to_coach`, and `uri` data types for Conference, Participant, and Recording **(breaking change)**
- Made documentation for property `time_limit` in the call api public. **(breaking change)**
- Added `domain_sid` in sip_credential_list_mapping and sip_ip_access_control_list_mapping APIs **(breaking change)**

**Conversations**
- Add `Order` query parameter to Message resource read operation

**Insights**
- Added `partial` to enum processing_state_request
- Added abnormal session filter in Call Summaries
- Added new endpoint to fetch Call Summaries

**Messaging**
- Add brand_registration_sid as an optional query param for us_app_to_person_usecase api
- Add brand_type field to a2p brand_registration api
- Revert brand registration api update to add brand_type field
- Add brand_type field to a2p brand_registration api

**Pricing**
- add trunking_numbers resource (v2)
- add trunking_country resource (v2)

**Taskrouter**
- Add `X-Rate-Limit-Limit`, `X-Rate-Limit-Remaining`, and `X-Rate-Limit-Config` as Response Headers to all TaskRouter endpoints

**Verify**
- Changed to private beta the `TemplateSid` optional parameter on Verification creation.
- Added the optional parameter `Order` to the list Challenges endpoint to define the list order.
- Add `TemplateSid` optional parameter on Verification creation.
- Include `whatsapp` as a channel type in the verifications API.


[2021-07-28] Version 8.18.0
---------------------------
**Library - Feature**
Expand Down
17 changes: 17 additions & 0 deletions src/main/java/com/twilio/rest/api/v2010/account/CallCreator.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public class CallCreator extends Creator<Call> {
private String callReason;
private String callToken;
private String recordingTrack;
private Integer timeLimit;

/**
* Construct a new CallCreator.
Expand Down Expand Up @@ -650,6 +651,18 @@ public CallCreator setRecordingTrack(final String recordingTrack) {
return this;
}

/**
* The maximum duration of the call in seconds. Constraints depend on account
* and configuration..
*
* @param timeLimit The maximum duration of the call in seconds.
* @return this
*/
public CallCreator setTimeLimit(final Integer timeLimit) {
this.timeLimit = timeLimit;
return this;
}

/**
* The absolute URL that returns the TwiML instructions for the call. We will
* call this URL using the `method` when the call connects. For more
Expand Down Expand Up @@ -896,5 +909,9 @@ private void addPostParams(final Request request) {
if (recordingTrack != null) {
request.addPostParam("RecordingTrack", recordingTrack);
}

if (timeLimit != null) {
request.addPostParam("TimeLimit", timeLimit.toString());
}
}
}
17 changes: 17 additions & 0 deletions src/main/java/com/twilio/rest/api/v2010/account/CallUpdater.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public class CallUpdater extends Updater<Call> {
private URI statusCallback;
private HttpMethod statusCallbackMethod;
private com.twilio.type.Twiml twiml;
private Integer timeLimit;

/**
* Construct a new CallUpdater.
Expand Down Expand Up @@ -218,6 +219,18 @@ public CallUpdater setTwiml(final String twiml) {
return setTwiml(Promoter.twimlFromString(twiml));
}

/**
* The maximum duration of the call in seconds. Constraints depend on account
* and configuration..
*
* @param timeLimit The maximum duration of the call in seconds.
* @return this
*/
public CallUpdater setTimeLimit(final Integer timeLimit) {
this.timeLimit = timeLimit;
return this;
}

/**
* Make the request to the Twilio API to perform the update.
*
Expand Down Expand Up @@ -287,5 +300,9 @@ private void addPostParams(final Request request) {
if (twiml != null) {
request.addPostParam("Twiml", twiml.toString());
}

if (timeLimit != null) {
request.addPostParam("TimeLimit", timeLimit.toString());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
@JsonIgnoreProperties(ignoreUnknown = true)
@ToString
public class Conference extends Resource {
private static final long serialVersionUID = 11011722206180L;
private static final long serialVersionUID = 34504755798279L;

public enum Status {
INIT("init"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
@JsonIgnoreProperties(ignoreUnknown = true)
@ToString
public class Participant extends Resource {
private static final long serialVersionUID = 239000322102976L;
private static final long serialVersionUID = 89883663840219L;

public enum Status {
QUEUED("queued"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public class ParticipantCreator extends Creator<Participant> {
private String callerId;
private String callReason;
private String recordingTrack;
private Integer timeLimit;

/**
* Construct a new ParticipantCreator.
Expand Down Expand Up @@ -724,6 +725,18 @@ public ParticipantCreator setRecordingTrack(final String recordingTrack) {
return this;
}

/**
* The maximum duration of the call in seconds. Constraints depend on account
* and configuration..
*
* @param timeLimit The maximum duration of the call in seconds.
* @return this
*/
public ParticipantCreator setTimeLimit(final Integer timeLimit) {
this.timeLimit = timeLimit;
return this;
}

/**
* Make the request to the Twilio API to perform the create.
*
Expand Down Expand Up @@ -921,5 +934,9 @@ private void addPostParams(final Request request) {
if (recordingTrack != null) {
request.addPostParam("RecordingTrack", recordingTrack);
}

if (timeLimit != null) {
request.addPostParam("TimeLimit", timeLimit.toString());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@

import java.io.IOException;
import java.io.InputStream;
import java.math.BigDecimal;
import java.time.ZonedDateTime;
import java.util.Currency;
import java.util.Map;
Expand All @@ -39,7 +38,7 @@
@JsonIgnoreProperties(ignoreUnknown = true)
@ToString
public class Recording extends Resource {
private static final long serialVersionUID = 119371438714806L;
private static final long serialVersionUID = 139030377775690L;

public enum Status {
IN_PROGRESS("in-progress"),
Expand Down Expand Up @@ -255,7 +254,7 @@ public static Recording fromJson(final InputStream json, final ObjectMapper obje
private final ZonedDateTime startTime;
private final String duration;
private final String sid;
private final BigDecimal price;
private final String price;
private final Currency priceUnit;
private final Recording.Status status;
private final Integer channels;
Expand Down Expand Up @@ -284,7 +283,7 @@ private Recording(@JsonProperty("account_sid")
@JsonProperty("sid")
final String sid,
@JsonProperty("price")
final BigDecimal price,
final String price,
@JsonProperty("price_unit")
@JsonDeserialize(using = com.twilio.converter.CurrencyDeserializer.class)
final Currency priceUnit,
Expand Down Expand Up @@ -407,7 +406,7 @@ public final String getSid() {
*
* @return The one-time cost of creating the recording.
*/
public final BigDecimal getPrice() {
public final String getPrice() {
return this.price;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
@JsonIgnoreProperties(ignoreUnknown = true)
@ToString
public class CredentialListMapping extends Resource {
private static final long serialVersionUID = 214188792953524L;
private static final long serialVersionUID = 124631283719595L;

/**
* Create a CredentialListMappingCreator to execute create.
Expand Down Expand Up @@ -187,10 +187,10 @@ public static CredentialListMapping fromJson(final InputStream json, final Objec
private final String accountSid;
private final ZonedDateTime dateCreated;
private final ZonedDateTime dateUpdated;
private final String domainSid;
private final String friendlyName;
private final String sid;
private final String uri;
private final Map<String, String> subresourceUris;

@JsonCreator
private CredentialListMapping(@JsonProperty("account_sid")
Expand All @@ -199,21 +199,21 @@ private CredentialListMapping(@JsonProperty("account_sid")
final String dateCreated,
@JsonProperty("date_updated")
final String dateUpdated,
@JsonProperty("domain_sid")
final String domainSid,
@JsonProperty("friendly_name")
final String friendlyName,
@JsonProperty("sid")
final String sid,
@JsonProperty("uri")
final String uri,
@JsonProperty("subresource_uris")
final Map<String, String> subresourceUris) {
final String uri) {
this.accountSid = accountSid;
this.dateCreated = DateConverter.rfc2822DateTimeFromString(dateCreated);
this.dateUpdated = DateConverter.rfc2822DateTimeFromString(dateUpdated);
this.domainSid = domainSid;
this.friendlyName = friendlyName;
this.sid = sid;
this.uri = uri;
this.subresourceUris = subresourceUris;
}

/**
Expand Down Expand Up @@ -247,6 +247,15 @@ public final ZonedDateTime getDateUpdated() {
return this.dateUpdated;
}

/**
* Returns The unique string that identifies the SipDomain resource..
*
* @return The unique string that identifies the SipDomain resource.
*/
public final String getDomainSid() {
return this.domainSid;
}

/**
* Returns A human readable descriptive text for this resource, up to 64
* characters long..
Expand Down Expand Up @@ -276,15 +285,6 @@ public final String getUri() {
return this.uri;
}

/**
* Returns The credentials associated with this resource..
*
* @return The credentials associated with this resource.
*/
public final Map<String, String> getSubresourceUris() {
return this.subresourceUris;
}

@Override
public boolean equals(final Object o) {
if (this == o) {
Expand All @@ -300,20 +300,20 @@ public boolean equals(final Object o) {
return Objects.equals(accountSid, other.accountSid) &&
Objects.equals(dateCreated, other.dateCreated) &&
Objects.equals(dateUpdated, other.dateUpdated) &&
Objects.equals(domainSid, other.domainSid) &&
Objects.equals(friendlyName, other.friendlyName) &&
Objects.equals(sid, other.sid) &&
Objects.equals(uri, other.uri) &&
Objects.equals(subresourceUris, other.subresourceUris);
Objects.equals(uri, other.uri);
}

@Override
public int hashCode() {
return Objects.hash(accountSid,
dateCreated,
dateUpdated,
domainSid,
friendlyName,
sid,
uri,
subresourceUris);
uri);
}
}
Loading

0 comments on commit 9c2bb76

Please sign in to comment.