Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: preview changes by twiml gather #832

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,32 @@
twilio-java changelog
=====================

[2025-01-31] Version 10.7.0
---------------------------
**Library - Fix**
- [PR #809](https://github.com/twilio/twilio-java/pull/809): Fix for 1 vulnerabilities. Thanks to [@twilio-product-security](https://github.com/twilio-product-security)!
- [PR #830](https://github.com/twilio/twilio-java/pull/830): Voice v2 fix. Thanks to [@manisha1997](https://github.com/manisha1997)!

**Library - Chore**
- [PR #831](https://github.com/twilio/twilio-java/pull/831): added bug report issue template. Thanks to [@sbansla](https://github.com/sbansla)!
- [PR #829](https://github.com/twilio/twilio-java/pull/829): add variant class. Thanks to [@manisha1997](https://github.com/manisha1997)!

**Api**
- Add open-api file tag to `conference/call recordings` and `recording_transcriptions`.

**Events**
- Add support for subaccount subscriptions (beta)

**Insights**
- add new region to conference APIs

**Lookups**
- Add new `parnter_sub_id` query parameter to the lookup request

**Twiml**
- Convert Twiml Attribute `speechModel` of type enum to string **(breaking change)**


[2025-01-28] Version 10.6.8
---------------------------
**Library - Fix**
Expand Down
35 changes: 0 additions & 35 deletions src/main/java/com/twilio/rest/content/v1/Content.java
Original file line number Diff line number Diff line change
Expand Up @@ -674,35 +674,6 @@ public static TwilioFlows fromJson(
}
}

@ToString
public static class TwilioSchedule {

@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonProperty("id")
@Getter
@Setter
private String id;

@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonProperty("title")
@Getter
@Setter
private String title;

@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonProperty("timeSlots")
@Getter
@Setter
private String timeSlots;

public static TwilioSchedule fromJson(
String jsonString,
ObjectMapper mapper
) throws IOException {
return mapper.readValue(jsonString, TwilioSchedule.class);
}
}

@ToString
public static class WhatsappCard {

Expand Down Expand Up @@ -859,12 +830,6 @@ public static class Types {
@Setter
private TwilioFlows twilioFlows;

@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonProperty("twilio/schedule")
@Getter
@Setter
private TwilioSchedule twilioSchedule;

@JsonInclude(JsonInclude.Include.NON_EMPTY)
@JsonProperty("whatsapp/card")
@Getter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,7 @@ public enum Type {
MESSENGER("messenger"),
GBM("gbm"),
EMAIL("email"),
RCS("rcs"),
APPLE("apple");
RCS("rcs");

private final String value;

Expand Down
22 changes: 4 additions & 18 deletions src/main/java/com/twilio/rest/events/v1/Subscription.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
@ToString
public class Subscription extends Resource {

private static final long serialVersionUID = 97790115204936L;
private static final long serialVersionUID = 198248500185102L;

public static SubscriptionCreator creator(
final String description,
Expand Down Expand Up @@ -116,7 +116,6 @@ public static Subscription fromJson(
private final String sinkSid;
private final URI url;
private final Map<String, String> links;
private final Boolean receiveEventsFromSubaccounts;

@JsonCreator
private Subscription(
Expand All @@ -127,10 +126,7 @@ private Subscription(
@JsonProperty("description") final String description,
@JsonProperty("sink_sid") final String sinkSid,
@JsonProperty("url") final URI url,
@JsonProperty("links") final Map<String, String> links,
@JsonProperty(
"receive_events_from_subaccounts"
) final Boolean receiveEventsFromSubaccounts
@JsonProperty("links") final Map<String, String> links
) {
this.accountSid = accountSid;
this.sid = sid;
Expand All @@ -140,7 +136,6 @@ private Subscription(
this.sinkSid = sinkSid;
this.url = url;
this.links = links;
this.receiveEventsFromSubaccounts = receiveEventsFromSubaccounts;
}

public final String getAccountSid() {
Expand Down Expand Up @@ -175,10 +170,6 @@ public final Map<String, String> getLinks() {
return this.links;
}

public final Boolean getReceiveEventsFromSubaccounts() {
return this.receiveEventsFromSubaccounts;
}

@Override
public boolean equals(final Object o) {
if (this == o) {
Expand All @@ -199,11 +190,7 @@ public boolean equals(final Object o) {
Objects.equals(description, other.description) &&
Objects.equals(sinkSid, other.sinkSid) &&
Objects.equals(url, other.url) &&
Objects.equals(links, other.links) &&
Objects.equals(
receiveEventsFromSubaccounts,
other.receiveEventsFromSubaccounts
)
Objects.equals(links, other.links)
);
}

Expand All @@ -217,8 +204,7 @@ public int hashCode() {
description,
sinkSid,
url,
links,
receiveEventsFromSubaccounts
links
);
}
}
14 changes: 0 additions & 14 deletions src/main/java/com/twilio/rest/events/v1/SubscriptionCreator.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public class SubscriptionCreator extends Creator<Subscription> {
private String description;
private String sinkSid;
private List<Map<String, Object>> types;
private Boolean receiveEventsFromSubaccounts;

public SubscriptionCreator(
final String description,
Expand Down Expand Up @@ -68,13 +67,6 @@ public SubscriptionCreator setTypes(final Map<String, Object> types) {
return setTypes(Promoter.listOfOne(types));
}

public SubscriptionCreator setReceiveEventsFromSubaccounts(
final Boolean receiveEventsFromSubaccounts
) {
this.receiveEventsFromSubaccounts = receiveEventsFromSubaccounts;
return this;
}

@Override
public Subscription create(final TwilioRestClient client) {
String path = "/v1/Subscriptions";
Expand Down Expand Up @@ -131,11 +123,5 @@ private void addPostParams(final Request request) {
request.addPostParam("Types", Converter.mapToJson(prop));
}
}
if (receiveEventsFromSubaccounts != null) {
request.addPostParam(
"ReceiveEventsFromSubaccounts",
receiveEventsFromSubaccounts.toString()
);
}
}
}
14 changes: 0 additions & 14 deletions src/main/java/com/twilio/rest/events/v1/SubscriptionUpdater.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ public class SubscriptionUpdater extends Updater<Subscription> {
private String pathSid;
private String description;
private String sinkSid;
private Boolean receiveEventsFromSubaccounts;

public SubscriptionUpdater(final String pathSid) {
this.pathSid = pathSid;
Expand All @@ -46,13 +45,6 @@ public SubscriptionUpdater setSinkSid(final String sinkSid) {
return this;
}

public SubscriptionUpdater setReceiveEventsFromSubaccounts(
final Boolean receiveEventsFromSubaccounts
) {
this.receiveEventsFromSubaccounts = receiveEventsFromSubaccounts;
return this;
}

@Override
public Subscription update(final TwilioRestClient client) {
String path = "/v1/Subscriptions/{Sid}";
Expand Down Expand Up @@ -98,11 +90,5 @@ private void addPostParams(final Request request) {
if (sinkSid != null) {
request.addPostParam("SinkSid", sinkSid);
}
if (receiveEventsFromSubaccounts != null) {
request.addPostParam(
"ReceiveEventsFromSubaccounts",
receiveEventsFromSubaccounts.toString()
);
}
}
}
37 changes: 18 additions & 19 deletions src/main/java/com/twilio/rest/insights/v1/Conference.java
Original file line number Diff line number Diff line change
Expand Up @@ -404,14 +404,18 @@ public static Tag forValue(final String value) {
}
}

public enum ProcessingState {
COMPLETE("complete"),
IN_PROGRESS("in_progress"),
TIMEOUT("timeout");
public enum Region {
US1("us1"),
AU1("au1"),
BR1("br1"),
IE1("ie1"),
JP1("jp1"),
SG1("sg1"),
DE1("de1");

private final String value;

private ProcessingState(final String value) {
private Region(final String value) {
this.value = value;
}

Expand All @@ -420,24 +424,19 @@ public String toString() {
}

@JsonCreator
public static ProcessingState forValue(final String value) {
return Promoter.enumFromString(value, ProcessingState.values());
public static Region forValue(final String value) {
return Promoter.enumFromString(value, Region.values());
}
}

public enum Region {
US1("us1"),
US2("us2"),
AU1("au1"),
BR1("br1"),
IE1("ie1"),
JP1("jp1"),
SG1("sg1"),
DE1("de1");
public enum ProcessingState {
COMPLETE("complete"),
IN_PROGRESS("in_progress"),
TIMEOUT("timeout");

private final String value;

private Region(final String value) {
private ProcessingState(final String value) {
this.value = value;
}

Expand All @@ -446,8 +445,8 @@ public String toString() {
}

@JsonCreator
public static Region forValue(final String value) {
return Promoter.enumFromString(value, Region.values());
public static ProcessingState forValue(final String value) {
return Promoter.enumFromString(value, ProcessingState.values());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ public class PhoneNumberFetcher extends Fetcher<PhoneNumber> {
private String dateOfBirth;
private String lastVerifiedDate;
private String verificationSid;
private String partnerSubId;

public PhoneNumberFetcher(final String pathPhoneNumber) {
this.pathPhoneNumber = pathPhoneNumber;
Expand Down Expand Up @@ -122,11 +121,6 @@ public PhoneNumberFetcher setVerificationSid(final String verificationSid) {
return this;
}

public PhoneNumberFetcher setPartnerSubId(final String partnerSubId) {
this.partnerSubId = partnerSubId;
return this;
}

@Override
public PhoneNumber fetch(final TwilioRestClient client) {
String path = "/v2/PhoneNumbers/{PhoneNumber}";
Expand Down Expand Up @@ -213,8 +207,5 @@ private void addQueryParams(final Request request) {
if (verificationSid != null) {
request.addQueryParam("VerificationSid", verificationSid);
}
if (partnerSubId != null) {
request.addQueryParam("PartnerSubId", partnerSubId);
}
}
}
Loading