Skip to content

Commit 597144f

Browse files
committed
[Librarian] Regenerated @ 330069c1eddda7f148dbcd8b26aaeec9c22b3409 3864ec4513c70a35c048caafc16ee3a36f3b2ed7
1 parent fbdac1a commit 597144f

File tree

8 files changed

+102
-45
lines changed

8 files changed

+102
-45
lines changed

CHANGES.md

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

4+
[2025-06-12] Version 10.9.2
5+
---------------------------
6+
**Library - Chore**
7+
- [PR #858](https://github.com/twilio/twilio-java/pull/858): handle any Type with object datatype. Thanks to [@tiwarishubham635](https://github.com/tiwarishubham635)!
8+
9+
**Api**
10+
- Change DependentPhoneNumber `capabilities` type `object` and `date_created`, `date_updated` to `date_time<rfc2822>`
11+
- Updated the `Default` value from 0 to 1 in the Recordings Resource `channels` property
12+
13+
**Serverless**
14+
- Update `ienum` type level in Logs api
15+
16+
**Verify**
17+
- Update Channel list in Verify Attempst API
18+
- Update `ienum` type for Conversion_Status in Verify Attempts API
19+
20+
**Twiml**
21+
- Add `us2` to the list of supported values for the region attribute in the `<Conference>` TwiML noun.
22+
23+
424
[2025-05-29] Version 10.9.1
525
---------------------------
626
**Library - Chore**

src/main/java/com/twilio/rest/api/v2010/account/address/DependentPhoneNumber.java

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,17 @@
2121
import com.fasterxml.jackson.databind.JsonMappingException;
2222
import com.fasterxml.jackson.databind.ObjectMapper;
2323
import com.twilio.base.Resource;
24+
import com.twilio.converter.DateConverter;
2425
import com.twilio.converter.Promoter;
2526
import com.twilio.exception.ApiConnectionException;
2627
import com.twilio.exception.ApiException;
2728
import com.twilio.http.HttpMethod;
28-
import com.twilio.type.PhoneNumberCapabilities;
2929
import java.io.IOException;
3030
import java.io.InputStream;
3131
import java.net.URI;
32+
import java.time.ZonedDateTime;
33+
import java.util.Map;
34+
import java.util.Map;
3235
import java.util.Objects;
3336
import lombok.ToString;
3437
import lombok.ToString;
@@ -37,7 +40,7 @@
3740
@ToString
3841
public class DependentPhoneNumber extends Resource {
3942

40-
private static final long serialVersionUID = 224283084949736L;
43+
private static final long serialVersionUID = 279811089031324L;
4144

4245
public static DependentPhoneNumberReader reader(
4346
final String pathAddressSid
@@ -104,14 +107,14 @@ public static DependentPhoneNumber fromJson(
104107
private final HttpMethod voiceFallbackMethod;
105108
private final URI voiceFallbackUrl;
106109
private final Boolean voiceCallerIdLookup;
107-
private final String dateCreated;
108-
private final String dateUpdated;
110+
private final ZonedDateTime dateCreated;
111+
private final ZonedDateTime dateUpdated;
109112
private final HttpMethod smsFallbackMethod;
110113
private final URI smsFallbackUrl;
111114
private final HttpMethod smsMethod;
112115
private final URI smsUrl;
113116
private final DependentPhoneNumber.AddressRequirement addressRequirements;
114-
private final PhoneNumberCapabilities capabilities;
117+
private final Map<String, Object> capabilities;
115118
private final URI statusCallback;
116119
private final HttpMethod statusCallbackMethod;
117120
private final String apiVersion;
@@ -148,9 +151,7 @@ private DependentPhoneNumber(
148151
@JsonProperty(
149152
"address_requirements"
150153
) final DependentPhoneNumber.AddressRequirement addressRequirements,
151-
@JsonProperty(
152-
"capabilities"
153-
) final PhoneNumberCapabilities capabilities,
154+
@JsonProperty("capabilities") final Map<String, Object> capabilities,
154155
@JsonProperty("status_callback") final URI statusCallback,
155156
@JsonProperty(
156157
"status_callback_method"
@@ -174,8 +175,8 @@ private DependentPhoneNumber(
174175
this.voiceFallbackMethod = voiceFallbackMethod;
175176
this.voiceFallbackUrl = voiceFallbackUrl;
176177
this.voiceCallerIdLookup = voiceCallerIdLookup;
177-
this.dateCreated = dateCreated;
178-
this.dateUpdated = dateUpdated;
178+
this.dateCreated = DateConverter.rfc2822DateTimeFromString(dateCreated);
179+
this.dateUpdated = DateConverter.rfc2822DateTimeFromString(dateUpdated);
179180
this.smsFallbackMethod = smsFallbackMethod;
180181
this.smsFallbackUrl = smsFallbackUrl;
181182
this.smsMethod = smsMethod;
@@ -229,11 +230,11 @@ public final Boolean getVoiceCallerIdLookup() {
229230
return this.voiceCallerIdLookup;
230231
}
231232

232-
public final String getDateCreated() {
233+
public final ZonedDateTime getDateCreated() {
233234
return this.dateCreated;
234235
}
235236

236-
public final String getDateUpdated() {
237+
public final ZonedDateTime getDateUpdated() {
237238
return this.dateUpdated;
238239
}
239240

@@ -257,7 +258,7 @@ public final DependentPhoneNumber.AddressRequirement getAddressRequirements() {
257258
return this.addressRequirements;
258259
}
259260

260-
public final PhoneNumberCapabilities getCapabilities() {
261+
public final Map<String, Object> getCapabilities() {
261262
return this.capabilities;
262263
}
263264

src/main/java/com/twilio/rest/knowledge/v1/KnowledgeReader.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
public class KnowledgeReader extends Reader<Knowledge> {
3131

3232
private Integer pageSize;
33+
private String tags;
3334

3435
public KnowledgeReader() {}
3536

@@ -38,6 +39,11 @@ public KnowledgeReader setPageSize(final Integer pageSize) {
3839
return this;
3940
}
4041

42+
public KnowledgeReader setTags(final String tags) {
43+
this.tags = tags;
44+
return this;
45+
}
46+
4147
@Override
4248
public ResourceSet<Knowledge> read(final TwilioRestClient client) {
4349
return new ResourceSet<>(this, client, firstPage(client));
@@ -127,6 +133,9 @@ private void addQueryParams(final Request request) {
127133
if (pageSize != null) {
128134
request.addQueryParam("PageSize", pageSize.toString());
129135
}
136+
if (tags != null) {
137+
request.addQueryParam("Tags", tags);
138+
}
130139

131140
if (getPageSize() != null) {
132141
request.addQueryParam("PageSize", Integer.toString(getPageSize()));

src/main/java/com/twilio/rest/messaging/v1/service/DestinationAlphaSenderReader.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,20 @@ public class DestinationAlphaSenderReader
3131
extends Reader<DestinationAlphaSender> {
3232

3333
private String pathServiceSid;
34+
private String isoCountryCode;
3435
private Long pageSize;
3536

3637
public DestinationAlphaSenderReader(final String pathServiceSid) {
3738
this.pathServiceSid = pathServiceSid;
3839
}
3940

41+
public DestinationAlphaSenderReader setIsoCountryCode(
42+
final String isoCountryCode
43+
) {
44+
this.isoCountryCode = isoCountryCode;
45+
return this;
46+
}
47+
4048
public DestinationAlphaSenderReader setPageSize(final Long pageSize) {
4149
this.pageSize = pageSize;
4250
return this;
@@ -137,6 +145,9 @@ public Page<DestinationAlphaSender> getPage(
137145
}
138146

139147
private void addQueryParams(final Request request) {
148+
if (isoCountryCode != null) {
149+
request.addQueryParam("IsoCountryCode", isoCountryCode);
150+
}
140151
if (pageSize != null) {
141152
request.addQueryParam("PageSize", pageSize.toString());
142153
}

src/main/java/com/twilio/rest/numbers/v1/Webhook.java renamed to src/main/java/com/twilio/rest/numbers/v1/PortingWebhookConfigurationFetch.java

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,28 +35,31 @@
3535

3636
@JsonIgnoreProperties(ignoreUnknown = true)
3737
@ToString
38-
public class Webhook extends Resource {
38+
public class PortingWebhookConfigurationFetch extends Resource {
3939

4040
private static final long serialVersionUID = 270526030240961L;
4141

42-
public static WebhookFetcher fetcher() {
43-
return new WebhookFetcher();
42+
public static PortingWebhookConfigurationFetchFetcher fetcher() {
43+
return new PortingWebhookConfigurationFetchFetcher();
4444
}
4545

4646
/**
47-
* Converts a JSON String into a Webhook object using the provided ObjectMapper.
47+
* Converts a JSON String into a PortingWebhookConfigurationFetch object using the provided ObjectMapper.
4848
*
4949
* @param json Raw JSON String
5050
* @param objectMapper Jackson ObjectMapper
51-
* @return Webhook object represented by the provided JSON
51+
* @return PortingWebhookConfigurationFetch object represented by the provided JSON
5252
*/
53-
public static Webhook fromJson(
53+
public static PortingWebhookConfigurationFetch fromJson(
5454
final String json,
5555
final ObjectMapper objectMapper
5656
) {
5757
// Convert all checked exceptions to Runtime
5858
try {
59-
return objectMapper.readValue(json, Webhook.class);
59+
return objectMapper.readValue(
60+
json,
61+
PortingWebhookConfigurationFetch.class
62+
);
6063
} catch (final JsonMappingException | JsonParseException e) {
6164
throw new ApiException(e.getMessage(), e);
6265
} catch (final IOException e) {
@@ -65,20 +68,23 @@ public static Webhook fromJson(
6568
}
6669

6770
/**
68-
* Converts a JSON InputStream into a Webhook object using the provided
71+
* Converts a JSON InputStream into a PortingWebhookConfigurationFetch object using the provided
6972
* ObjectMapper.
7073
*
7174
* @param json Raw JSON InputStream
7275
* @param objectMapper Jackson ObjectMapper
73-
* @return Webhook object represented by the provided JSON
76+
* @return PortingWebhookConfigurationFetch object represented by the provided JSON
7477
*/
75-
public static Webhook fromJson(
78+
public static PortingWebhookConfigurationFetch fromJson(
7679
final InputStream json,
7780
final ObjectMapper objectMapper
7881
) {
7982
// Convert all checked exceptions to Runtime
8083
try {
81-
return objectMapper.readValue(json, Webhook.class);
84+
return objectMapper.readValue(
85+
json,
86+
PortingWebhookConfigurationFetch.class
87+
);
8288
} catch (final JsonMappingException | JsonParseException e) {
8389
throw new ApiException(e.getMessage(), e);
8490
} catch (final IOException e) {
@@ -94,7 +100,7 @@ public static Webhook fromJson(
94100
private final ZonedDateTime portOutTargetDateCreated;
95101

96102
@JsonCreator
97-
private Webhook(
103+
private PortingWebhookConfigurationFetch(
98104
@JsonProperty("url") final URI url,
99105
@JsonProperty("port_in_target_url") final URI portInTargetUrl,
100106
@JsonProperty("port_out_target_url") final URI portOutTargetUrl,
@@ -150,7 +156,8 @@ public boolean equals(final Object o) {
150156
return false;
151157
}
152158

153-
Webhook other = (Webhook) o;
159+
PortingWebhookConfigurationFetch other =
160+
(PortingWebhookConfigurationFetch) o;
154161

155162
return (
156163
Objects.equals(url, other.url) &&

src/main/java/com/twilio/rest/numbers/v1/WebhookFetcher.java renamed to src/main/java/com/twilio/rest/numbers/v1/PortingWebhookConfigurationFetchFetcher.java

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,15 @@
2525
import com.twilio.http.TwilioRestClient;
2626
import com.twilio.rest.Domains;
2727

28-
public class WebhookFetcher extends Fetcher<Webhook> {
28+
public class PortingWebhookConfigurationFetchFetcher
29+
extends Fetcher<PortingWebhookConfigurationFetch> {
2930

30-
public WebhookFetcher() {}
31+
public PortingWebhookConfigurationFetchFetcher() {}
3132

3233
@Override
33-
public Webhook fetch(final TwilioRestClient client) {
34+
public PortingWebhookConfigurationFetch fetch(
35+
final TwilioRestClient client
36+
) {
3437
String path = "/v1/Porting/Configuration/Webhook";
3538

3639
Request request = new Request(
@@ -43,7 +46,7 @@ public Webhook fetch(final TwilioRestClient client) {
4346

4447
if (response == null) {
4548
throw new ApiConnectionException(
46-
"Webhook fetch failed: Unable to connect to server"
49+
"PortingWebhookConfigurationFetch fetch failed: Unable to connect to server"
4750
);
4851
} else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) {
4952
RestException restException = RestException.fromJson(
@@ -59,6 +62,9 @@ public Webhook fetch(final TwilioRestClient client) {
5962
throw new ApiException(restException);
6063
}
6164

62-
return Webhook.fromJson(response.getStream(), client.getObjectMapper());
65+
return PortingWebhookConfigurationFetch.fromJson(
66+
response.getStream(),
67+
client.getObjectMapper()
68+
);
6369
}
6470
}

src/main/java/com/twilio/rest/verify/v2/VerificationAttempt.java

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -221,15 +221,13 @@ public int hashCode() {
221221
);
222222
}
223223

224-
public enum Channels {
225-
SMS("sms"),
226-
CALL("call"),
227-
EMAIL("email"),
228-
WHATSAPP("whatsapp");
224+
public enum ConversionStatus {
225+
CONVERTED("converted"),
226+
UNCONVERTED("unconverted");
229227

230228
private final String value;
231229

232-
private Channels(final String value) {
230+
private ConversionStatus(final String value) {
233231
this.value = value;
234232
}
235233

@@ -238,18 +236,22 @@ public String toString() {
238236
}
239237

240238
@JsonCreator
241-
public static Channels forValue(final String value) {
242-
return Promoter.enumFromString(value, Channels.values());
239+
public static ConversionStatus forValue(final String value) {
240+
return Promoter.enumFromString(value, ConversionStatus.values());
243241
}
244242
}
245243

246-
public enum ConversionStatus {
247-
CONVERTED("converted"),
248-
UNCONVERTED("unconverted");
244+
public enum Channels {
245+
SMS("sms"),
246+
CALL("call"),
247+
EMAIL("email"),
248+
WHATSAPP("whatsapp"),
249+
RBM("rbm"),
250+
SNA("sna");
249251

250252
private final String value;
251253

252-
private ConversionStatus(final String value) {
254+
private Channels(final String value) {
253255
this.value = value;
254256
}
255257

@@ -258,8 +260,8 @@ public String toString() {
258260
}
259261

260262
@JsonCreator
261-
public static ConversionStatus forValue(final String value) {
262-
return Promoter.enumFromString(value, ConversionStatus.values());
263+
public static Channels forValue(final String value) {
264+
return Promoter.enumFromString(value, Channels.values());
263265
}
264266
}
265267
}

src/main/java/com/twilio/twiml/voice/Conference.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public String toString() {
6161

6262
public enum Region {
6363
US1("us1"),
64+
US2("us2"),
6465
IE1("ie1"),
6566
SG1("sg1"),
6667
BR1("br1"),

0 commit comments

Comments
 (0)