Skip to content

Commit 119db04

Browse files
committed
[Librarian] Regenerated @ a7caf52aaea6fe6c7b30170a468564bcea4f0362 13ec50967b82ae43900a263102daafb96aa61935
1 parent 7594de9 commit 119db04

File tree

12 files changed

+191
-64
lines changed

12 files changed

+191
-64
lines changed

CHANGES.md

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

4+
[2025-01-28] Version 10.6.8
5+
---------------------------
6+
**Library - Fix**
7+
- [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)!
8+
- [PR #830](https://github.com/twilio/twilio-java/pull/830): Voice v2 fix. Thanks to [@manisha1997](https://github.com/manisha1997)!
9+
10+
**Library - Chore**
11+
- [PR #831](https://github.com/twilio/twilio-java/pull/831): added bug report issue template. Thanks to [@sbansla](https://github.com/sbansla)!
12+
- [PR #829](https://github.com/twilio/twilio-java/pull/829): add variant class. Thanks to [@manisha1997](https://github.com/manisha1997)!
13+
14+
**Api**
15+
- Add open-api file tag to `conference/call recordings` and `recording_transcriptions`.
16+
17+
**Events**
18+
- Add support for subaccount subscriptions (beta)
19+
20+
**Insights**
21+
- add new region to conference APIs
22+
23+
**Lookups**
24+
- Add new `parnter_sub_id` query parameter to the lookup request
25+
26+
427
[2025-01-13] Version 10.6.7
528
---------------------------
629
**Messaging**

src/main/java/com/twilio/rest/content/v1/Content.java

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,35 @@ public static TwilioFlows fromJson(
674674
}
675675
}
676676

677+
@ToString
678+
public static class TwilioSchedule {
679+
680+
@JsonInclude(JsonInclude.Include.NON_EMPTY)
681+
@JsonProperty("id")
682+
@Getter
683+
@Setter
684+
private String id;
685+
686+
@JsonInclude(JsonInclude.Include.NON_EMPTY)
687+
@JsonProperty("title")
688+
@Getter
689+
@Setter
690+
private String title;
691+
692+
@JsonInclude(JsonInclude.Include.NON_EMPTY)
693+
@JsonProperty("timeSlots")
694+
@Getter
695+
@Setter
696+
private String timeSlots;
697+
698+
public static TwilioSchedule fromJson(
699+
String jsonString,
700+
ObjectMapper mapper
701+
) throws IOException {
702+
return mapper.readValue(jsonString, TwilioSchedule.class);
703+
}
704+
}
705+
677706
@ToString
678707
public static class WhatsappCard {
679708

@@ -830,6 +859,12 @@ public static class Types {
830859
@Setter
831860
private TwilioFlows twilioFlows;
832861

862+
@JsonInclude(JsonInclude.Include.NON_EMPTY)
863+
@JsonProperty("twilio/schedule")
864+
@Getter
865+
@Setter
866+
private TwilioSchedule twilioSchedule;
867+
833868
@JsonInclude(JsonInclude.Include.NON_EMPTY)
834869
@JsonProperty("whatsapp/card")
835870
@Getter

src/main/java/com/twilio/rest/conversations/v1/AddressConfiguration.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,8 @@ public enum Type {
231231
MESSENGER("messenger"),
232232
GBM("gbm"),
233233
EMAIL("email"),
234-
RCS("rcs");
234+
RCS("rcs"),
235+
APPLE("apple");
235236

236237
private final String value;
237238

src/main/java/com/twilio/rest/events/v1/Subscription.java

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
@ToString
4040
public class Subscription extends Resource {
4141

42-
private static final long serialVersionUID = 198248500185102L;
42+
private static final long serialVersionUID = 97790115204936L;
4343

4444
public static SubscriptionCreator creator(
4545
final String description,
@@ -116,6 +116,7 @@ public static Subscription fromJson(
116116
private final String sinkSid;
117117
private final URI url;
118118
private final Map<String, String> links;
119+
private final Boolean receiveEventsFromSubaccounts;
119120

120121
@JsonCreator
121122
private Subscription(
@@ -126,7 +127,10 @@ private Subscription(
126127
@JsonProperty("description") final String description,
127128
@JsonProperty("sink_sid") final String sinkSid,
128129
@JsonProperty("url") final URI url,
129-
@JsonProperty("links") final Map<String, String> links
130+
@JsonProperty("links") final Map<String, String> links,
131+
@JsonProperty(
132+
"receive_events_from_subaccounts"
133+
) final Boolean receiveEventsFromSubaccounts
130134
) {
131135
this.accountSid = accountSid;
132136
this.sid = sid;
@@ -136,6 +140,7 @@ private Subscription(
136140
this.sinkSid = sinkSid;
137141
this.url = url;
138142
this.links = links;
143+
this.receiveEventsFromSubaccounts = receiveEventsFromSubaccounts;
139144
}
140145

141146
public final String getAccountSid() {
@@ -170,6 +175,10 @@ public final Map<String, String> getLinks() {
170175
return this.links;
171176
}
172177

178+
public final Boolean getReceiveEventsFromSubaccounts() {
179+
return this.receiveEventsFromSubaccounts;
180+
}
181+
173182
@Override
174183
public boolean equals(final Object o) {
175184
if (this == o) {
@@ -190,7 +199,11 @@ public boolean equals(final Object o) {
190199
Objects.equals(description, other.description) &&
191200
Objects.equals(sinkSid, other.sinkSid) &&
192201
Objects.equals(url, other.url) &&
193-
Objects.equals(links, other.links)
202+
Objects.equals(links, other.links) &&
203+
Objects.equals(
204+
receiveEventsFromSubaccounts,
205+
other.receiveEventsFromSubaccounts
206+
)
194207
);
195208
}
196209

@@ -204,7 +217,8 @@ public int hashCode() {
204217
description,
205218
sinkSid,
206219
url,
207-
links
220+
links,
221+
receiveEventsFromSubaccounts
208222
);
209223
}
210224
}

src/main/java/com/twilio/rest/events/v1/SubscriptionCreator.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public class SubscriptionCreator extends Creator<Subscription> {
3737
private String description;
3838
private String sinkSid;
3939
private List<Map<String, Object>> types;
40+
private Boolean receiveEventsFromSubaccounts;
4041

4142
public SubscriptionCreator(
4243
final String description,
@@ -67,6 +68,13 @@ public SubscriptionCreator setTypes(final Map<String, Object> types) {
6768
return setTypes(Promoter.listOfOne(types));
6869
}
6970

71+
public SubscriptionCreator setReceiveEventsFromSubaccounts(
72+
final Boolean receiveEventsFromSubaccounts
73+
) {
74+
this.receiveEventsFromSubaccounts = receiveEventsFromSubaccounts;
75+
return this;
76+
}
77+
7078
@Override
7179
public Subscription create(final TwilioRestClient client) {
7280
String path = "/v1/Subscriptions";
@@ -123,5 +131,11 @@ private void addPostParams(final Request request) {
123131
request.addPostParam("Types", Converter.mapToJson(prop));
124132
}
125133
}
134+
if (receiveEventsFromSubaccounts != null) {
135+
request.addPostParam(
136+
"ReceiveEventsFromSubaccounts",
137+
receiveEventsFromSubaccounts.toString()
138+
);
139+
}
126140
}
127141
}

src/main/java/com/twilio/rest/events/v1/SubscriptionUpdater.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public class SubscriptionUpdater extends Updater<Subscription> {
3030
private String pathSid;
3131
private String description;
3232
private String sinkSid;
33+
private Boolean receiveEventsFromSubaccounts;
3334

3435
public SubscriptionUpdater(final String pathSid) {
3536
this.pathSid = pathSid;
@@ -45,6 +46,13 @@ public SubscriptionUpdater setSinkSid(final String sinkSid) {
4546
return this;
4647
}
4748

49+
public SubscriptionUpdater setReceiveEventsFromSubaccounts(
50+
final Boolean receiveEventsFromSubaccounts
51+
) {
52+
this.receiveEventsFromSubaccounts = receiveEventsFromSubaccounts;
53+
return this;
54+
}
55+
4856
@Override
4957
public Subscription update(final TwilioRestClient client) {
5058
String path = "/v1/Subscriptions/{Sid}";
@@ -90,5 +98,11 @@ private void addPostParams(final Request request) {
9098
if (sinkSid != null) {
9199
request.addPostParam("SinkSid", sinkSid);
92100
}
101+
if (receiveEventsFromSubaccounts != null) {
102+
request.addPostParam(
103+
"ReceiveEventsFromSubaccounts",
104+
receiveEventsFromSubaccounts.toString()
105+
);
106+
}
93107
}
94108
}

src/main/java/com/twilio/rest/iam/v1/Key.java renamed to src/main/java/com/twilio/rest/iam/v1/NewApiKey.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,28 +36,28 @@
3636

3737
@JsonIgnoreProperties(ignoreUnknown = true)
3838
@ToString
39-
public class Key extends Resource {
39+
public class NewApiKey extends Resource {
4040

4141
private static final long serialVersionUID = 217181042856619L;
4242

43-
public static KeyCreator creator(final String accountSid) {
44-
return new KeyCreator(accountSid);
43+
public static NewApiKeyCreator creator(final String accountSid) {
44+
return new NewApiKeyCreator(accountSid);
4545
}
4646

4747
/**
48-
* Converts a JSON String into a Key object using the provided ObjectMapper.
48+
* Converts a JSON String into a NewApiKey object using the provided ObjectMapper.
4949
*
5050
* @param json Raw JSON String
5151
* @param objectMapper Jackson ObjectMapper
52-
* @return Key object represented by the provided JSON
52+
* @return NewApiKey object represented by the provided JSON
5353
*/
54-
public static Key fromJson(
54+
public static NewApiKey fromJson(
5555
final String json,
5656
final ObjectMapper objectMapper
5757
) {
5858
// Convert all checked exceptions to Runtime
5959
try {
60-
return objectMapper.readValue(json, Key.class);
60+
return objectMapper.readValue(json, NewApiKey.class);
6161
} catch (final JsonMappingException | JsonParseException e) {
6262
throw new ApiException(e.getMessage(), e);
6363
} catch (final IOException e) {
@@ -66,20 +66,20 @@ public static Key fromJson(
6666
}
6767

6868
/**
69-
* Converts a JSON InputStream into a Key object using the provided
69+
* Converts a JSON InputStream into a NewApiKey object using the provided
7070
* ObjectMapper.
7171
*
7272
* @param json Raw JSON InputStream
7373
* @param objectMapper Jackson ObjectMapper
74-
* @return Key object represented by the provided JSON
74+
* @return NewApiKey object represented by the provided JSON
7575
*/
76-
public static Key fromJson(
76+
public static NewApiKey fromJson(
7777
final InputStream json,
7878
final ObjectMapper objectMapper
7979
) {
8080
// Convert all checked exceptions to Runtime
8181
try {
82-
return objectMapper.readValue(json, Key.class);
82+
return objectMapper.readValue(json, NewApiKey.class);
8383
} catch (final JsonMappingException | JsonParseException e) {
8484
throw new ApiException(e.getMessage(), e);
8585
} catch (final IOException e) {
@@ -95,7 +95,7 @@ public static Key fromJson(
9595
private final Map<String, Object> policy;
9696

9797
@JsonCreator
98-
private Key(
98+
private NewApiKey(
9999
@JsonProperty("sid") final String sid,
100100
@JsonProperty("friendly_name") final String friendlyName,
101101
@JsonProperty("date_created") final String dateCreated,
@@ -145,7 +145,7 @@ public boolean equals(final Object o) {
145145
return false;
146146
}
147147

148-
Key other = (Key) o;
148+
NewApiKey other = (NewApiKey) o;
149149

150150
return (
151151
Objects.equals(sid, other.sid) &&

src/main/java/com/twilio/rest/iam/v1/KeyCreator.java renamed to src/main/java/com/twilio/rest/iam/v1/NewApiKeyCreator.java

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,39 +29,39 @@
2929
import java.util.Map;
3030
import java.util.Map;
3131

32-
public class KeyCreator extends Creator<Key> {
32+
public class NewApiKeyCreator extends Creator<NewApiKey> {
3333

3434
private String accountSid;
3535
private String friendlyName;
36-
private Key.Keytype keyType;
36+
private NewApiKey.Keytype keyType;
3737
private Map<String, Object> policy;
3838

39-
public KeyCreator(final String accountSid) {
39+
public NewApiKeyCreator(final String accountSid) {
4040
this.accountSid = accountSid;
4141
}
4242

43-
public KeyCreator setAccountSid(final String accountSid) {
43+
public NewApiKeyCreator setAccountSid(final String accountSid) {
4444
this.accountSid = accountSid;
4545
return this;
4646
}
4747

48-
public KeyCreator setFriendlyName(final String friendlyName) {
48+
public NewApiKeyCreator setFriendlyName(final String friendlyName) {
4949
this.friendlyName = friendlyName;
5050
return this;
5151
}
5252

53-
public KeyCreator setKeyType(final Key.Keytype keyType) {
53+
public NewApiKeyCreator setKeyType(final NewApiKey.Keytype keyType) {
5454
this.keyType = keyType;
5555
return this;
5656
}
5757

58-
public KeyCreator setPolicy(final Map<String, Object> policy) {
58+
public NewApiKeyCreator setPolicy(final Map<String, Object> policy) {
5959
this.policy = policy;
6060
return this;
6161
}
6262

6363
@Override
64-
public Key create(final TwilioRestClient client) {
64+
public NewApiKey create(final TwilioRestClient client) {
6565
String path = "/v1/Keys";
6666

6767
path =
@@ -77,7 +77,7 @@ public Key create(final TwilioRestClient client) {
7777
Response response = client.request(request);
7878
if (response == null) {
7979
throw new ApiConnectionException(
80-
"Key creation failed: Unable to connect to server"
80+
"NewApiKey creation failed: Unable to connect to server"
8181
);
8282
} else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) {
8383
RestException restException = RestException.fromJson(
@@ -93,7 +93,10 @@ public Key create(final TwilioRestClient client) {
9393
throw new ApiException(restException);
9494
}
9595

96-
return Key.fromJson(response.getStream(), client.getObjectMapper());
96+
return NewApiKey.fromJson(
97+
response.getStream(),
98+
client.getObjectMapper()
99+
);
97100
}
98101

99102
private void addPostParams(final Request request) {

0 commit comments

Comments
 (0)