Skip to content

Commit 1a8d393

Browse files
committed
[Librarian] Regenerated @ 73b691d4309bbf652c00c8e81516e936534d2117 e39c0f89ecf837b35a77b0ecc773832297b7d7e3
1 parent 6d8c1ad commit 1a8d393

14 files changed

+1351
-23
lines changed

CHANGES.md

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

4+
[2025-05-05] Version 10.8.0
5+
---------------------------
6+
**Library - Chore**
7+
- [PR #852](https://github.com/twilio/twilio-java/pull/852): removing jwt changelog. Thanks to [@tiwarishubham635](https://github.com/tiwarishubham635)!
8+
- [PR #849](https://github.com/twilio/twilio-java/pull/849): Add example for using multi region setup in a single application. Thanks to [@manisha1997](https://github.com/manisha1997)!
9+
- [PR #847](https://github.com/twilio/twilio-java/pull/847): bump com.google.code.gson:gson from 2.8.6 to 2.8.9. Thanks to [@dependabot](https://github.com/dependabot)!
10+
11+
**Library - Fix**
12+
- [PR #846](https://github.com/twilio/twilio-java/pull/846): update jjwt version. Thanks to [@manisha1997](https://github.com/manisha1997)!
13+
14+
**Api**
15+
- Add `response_key` for `Usage Triggers` fetch endpoint.
16+
17+
**Flex**
18+
- Add Update Interaction API
19+
- Adding `webhook_ttid` as optional parameter in Interactions API
20+
21+
**Serverless**
22+
- Add node22 as a valid Build runtime
23+
- Add node20 as a valid Build runtime
24+
25+
**Video**
26+
- removed `transcribe_participants_on_connect` and `transcriptions_configuration` from the room resource **(breaking change)**
27+
- Added `transcribe_participants_on_connect` and `transcriptions_configuration` to the room resource
28+
29+
430
[2025-04-07] Version 10.7.2
531
---------------------------
632
**Library - Chore**

src/main/java/com/twilio/rest/flexapi/v1/Interaction.java

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
@ToString
3737
public class Interaction extends Resource {
3838

39-
private static final long serialVersionUID = 1684368631913L;
39+
private static final long serialVersionUID = 256485735361091L;
4040

4141
public static InteractionCreator creator(
4242
final Map<String, Object> channel
@@ -48,6 +48,10 @@ public static InteractionFetcher fetcher(final String pathSid) {
4848
return new InteractionFetcher(pathSid);
4949
}
5050

51+
public static InteractionUpdater updater(final String pathSid) {
52+
return new InteractionUpdater(pathSid);
53+
}
54+
5155
/**
5256
* Converts a JSON String into a Interaction object using the provided ObjectMapper.
5357
*
@@ -97,6 +101,7 @@ public static Interaction fromJson(
97101
private final URI url;
98102
private final Map<String, String> links;
99103
private final String interactionContextSid;
104+
private final String webhookTtid;
100105

101106
@JsonCreator
102107
private Interaction(
@@ -107,14 +112,16 @@ private Interaction(
107112
@JsonProperty("links") final Map<String, String> links,
108113
@JsonProperty(
109114
"interaction_context_sid"
110-
) final String interactionContextSid
115+
) final String interactionContextSid,
116+
@JsonProperty("webhook_ttid") final String webhookTtid
111117
) {
112118
this.sid = sid;
113119
this.channel = channel;
114120
this.routing = routing;
115121
this.url = url;
116122
this.links = links;
117123
this.interactionContextSid = interactionContextSid;
124+
this.webhookTtid = webhookTtid;
118125
}
119126

120127
public final String getSid() {
@@ -141,6 +148,10 @@ public final String getInteractionContextSid() {
141148
return this.interactionContextSid;
142149
}
143150

151+
public final String getWebhookTtid() {
152+
return this.webhookTtid;
153+
}
154+
144155
@Override
145156
public boolean equals(final Object o) {
146157
if (this == o) {
@@ -159,7 +170,11 @@ public boolean equals(final Object o) {
159170
Objects.equals(routing, other.routing) &&
160171
Objects.equals(url, other.url) &&
161172
Objects.equals(links, other.links) &&
162-
Objects.equals(interactionContextSid, other.interactionContextSid)
173+
Objects.equals(
174+
interactionContextSid,
175+
other.interactionContextSid
176+
) &&
177+
Objects.equals(webhookTtid, other.webhookTtid)
163178
);
164179
}
165180

@@ -171,7 +186,8 @@ public int hashCode() {
171186
routing,
172187
url,
173188
links,
174-
interactionContextSid
189+
interactionContextSid,
190+
webhookTtid
175191
);
176192
}
177193
}

src/main/java/com/twilio/rest/flexapi/v1/InteractionCreator.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public class InteractionCreator extends Creator<Interaction> {
3434
private Map<String, Object> channel;
3535
private Map<String, Object> routing;
3636
private String interactionContextSid;
37+
private String webhookTtid;
3738

3839
public InteractionCreator(final Map<String, Object> channel) {
3940
this.channel = channel;
@@ -56,6 +57,11 @@ public InteractionCreator setInteractionContextSid(
5657
return this;
5758
}
5859

60+
public InteractionCreator setWebhookTtid(final String webhookTtid) {
61+
this.webhookTtid = webhookTtid;
62+
return this;
63+
}
64+
5965
@Override
6066
public Interaction create(final TwilioRestClient client) {
6167
String path = "/v1/Interactions";
@@ -107,5 +113,8 @@ private void addPostParams(final Request request) {
107113
interactionContextSid
108114
);
109115
}
116+
if (webhookTtid != null) {
117+
request.addPostParam("WebhookTtid", webhookTtid);
118+
}
110119
}
111120
}
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
/*
2+
* This code was generated by
3+
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4+
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5+
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6+
*
7+
* Twilio - Flex
8+
* This is the public Twilio REST API.
9+
*
10+
* NOTE: This class is auto generated by OpenAPI Generator.
11+
* https://openapi-generator.tech
12+
* Do not edit the class manually.
13+
*/
14+
15+
package com.twilio.rest.flexapi.v1;
16+
17+
import com.twilio.base.Updater;
18+
import com.twilio.constant.EnumConstants;
19+
import com.twilio.exception.ApiConnectionException;
20+
import com.twilio.exception.ApiException;
21+
import com.twilio.exception.RestException;
22+
import com.twilio.http.HttpMethod;
23+
import com.twilio.http.Request;
24+
import com.twilio.http.Response;
25+
import com.twilio.http.TwilioRestClient;
26+
import com.twilio.rest.Domains;
27+
28+
public class InteractionUpdater extends Updater<Interaction> {
29+
30+
private String pathSid;
31+
private String webhookTtid;
32+
33+
public InteractionUpdater(final String pathSid) {
34+
this.pathSid = pathSid;
35+
}
36+
37+
public InteractionUpdater setWebhookTtid(final String webhookTtid) {
38+
this.webhookTtid = webhookTtid;
39+
return this;
40+
}
41+
42+
@Override
43+
public Interaction update(final TwilioRestClient client) {
44+
String path = "/v1/Interactions/{Sid}";
45+
46+
path = path.replace("{" + "Sid" + "}", this.pathSid.toString());
47+
48+
Request request = new Request(
49+
HttpMethod.POST,
50+
Domains.FLEXAPI.toString(),
51+
path
52+
);
53+
request.setContentType(EnumConstants.ContentType.FORM_URLENCODED);
54+
addPostParams(request);
55+
Response response = client.request(request);
56+
if (response == null) {
57+
throw new ApiConnectionException(
58+
"Interaction update failed: Unable to connect to server"
59+
);
60+
} else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) {
61+
RestException restException = RestException.fromJson(
62+
response.getStream(),
63+
client.getObjectMapper()
64+
);
65+
if (restException == null) {
66+
throw new ApiException(
67+
"Server Error, no content",
68+
response.getStatusCode()
69+
);
70+
}
71+
throw new ApiException(restException);
72+
}
73+
74+
return Interaction.fromJson(
75+
response.getStream(),
76+
client.getObjectMapper()
77+
);
78+
}
79+
80+
private void addPostParams(final Request request) {
81+
if (webhookTtid != null) {
82+
request.addPostParam("WebhookTtid", webhookTtid);
83+
}
84+
}
85+
}

0 commit comments

Comments
 (0)