Skip to content

Commit

Permalink
[Librarian] Regenerated @ 84b4cd4c23a96109c715a2512bbe8238fae5c394 4f…
Browse files Browse the repository at this point in the history
…23177c4c946a9a5cdaf592718766a9b4816075
  • Loading branch information
twilio-dx committed Jun 18, 2024
1 parent cc196de commit 27999c0
Show file tree
Hide file tree
Showing 7 changed files with 123 additions and 46 deletions.
24 changes: 24 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
twilio-java changelog
=====================

[2024-06-18] Version 10.3.0
---------------------------
**Library - Chore**
- [PR #799](https://github.com/twilio/twilio-java/pull/799): process form and body params for all methods except GET. Thanks to [@tiwarishubham635](https://github.com/tiwarishubham635)!

**Events**
- Add `status` and `documentation_url` to Event Types

**Lookups**
- Removed unused `fraud` lookups in V1 only to facilitate rest proxy migration

**Numbers**
- Add date_created field to the Get Port In Request API
- Rename the `status_last_time_updated_timestamp` field to `last_updated` in the Get Port In Phone Number API **(breaking change)**
- Add Rejection reason and rejection reason code to the Get Port In Phone Number API
- Remove the carrier information from the Portability API

**Proxy**
- Change property `type` from enum to ienum

**Trusthub**
- Add skipMessagingUseCase field in compliance_tollfree_inquiry.


[2024-06-06] Version 10.2.1
---------------------------
**Api**
Expand Down
20 changes: 19 additions & 1 deletion src/main/java/com/twilio/rest/events/v1/EventType.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
@ToString
public class EventType extends Resource {

private static final long serialVersionUID = 236822326358907L;
private static final long serialVersionUID = 10451435371801L;

public static EventTypeFetcher fetcher(final String pathType) {
return new EventTypeFetcher(pathType);
Expand Down Expand Up @@ -96,6 +96,8 @@ public static EventType fromJson(
private final ZonedDateTime dateCreated;
private final ZonedDateTime dateUpdated;
private final String description;
private final String status;
private final String documentationUrl;
private final URI url;
private final Map<String, String> links;

Expand All @@ -106,6 +108,8 @@ private EventType(
@JsonProperty("date_created") final String dateCreated,
@JsonProperty("date_updated") final String dateUpdated,
@JsonProperty("description") final String description,
@JsonProperty("status") final String status,
@JsonProperty("documentation_url") final String documentationUrl,
@JsonProperty("url") final URI url,
@JsonProperty("links") final Map<String, String> links
) {
Expand All @@ -114,6 +118,8 @@ private EventType(
this.dateCreated = DateConverter.iso8601DateTimeFromString(dateCreated);
this.dateUpdated = DateConverter.iso8601DateTimeFromString(dateUpdated);
this.description = description;
this.status = status;
this.documentationUrl = documentationUrl;
this.url = url;
this.links = links;
}
Expand All @@ -138,6 +144,14 @@ public final String getDescription() {
return this.description;
}

public final String getStatus() {
return this.status;
}

public final String getDocumentationUrl() {
return this.documentationUrl;
}

public final URI getUrl() {
return this.url;
}
Expand All @@ -164,6 +178,8 @@ public boolean equals(final Object o) {
Objects.equals(dateCreated, other.dateCreated) &&
Objects.equals(dateUpdated, other.dateUpdated) &&
Objects.equals(description, other.description) &&
Objects.equals(status, other.status) &&
Objects.equals(documentationUrl, other.documentationUrl) &&
Objects.equals(url, other.url) &&
Objects.equals(links, other.links)
);
Expand All @@ -177,6 +193,8 @@ public int hashCode() {
dateCreated,
dateUpdated,
description,
status,
documentationUrl,
url,
links
);
Expand Down
11 changes: 11 additions & 0 deletions src/main/java/com/twilio/rest/flexapi/v1/ConfigurationUpdater.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@

package com.twilio.rest.flexapi.v1;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.twilio.base.Updater;
import com.twilio.constant.EnumConstants;
import com.twilio.exception.ApiConnectionException;
import com.twilio.exception.ApiException;
import com.twilio.exception.RestException;
Expand Down Expand Up @@ -44,6 +46,8 @@ public Configuration update(final TwilioRestClient client) {
Domains.FLEXAPI.toString(),
path
);
request.setContentType(EnumConstants.ContentType.JSON);
addPostParams(request, client);
Response response = client.request(request);
if (response == null) {
throw new ApiConnectionException(
Expand All @@ -68,4 +72,11 @@ public Configuration update(final TwilioRestClient client) {
client.getObjectMapper()
);
}

private void addPostParams(final Request request, TwilioRestClient client) {
ObjectMapper objectMapper = client.getObjectMapper();
if (body != null) {
request.setBody(Configuration.toJson(body, objectMapper));
}
}
}
17 changes: 13 additions & 4 deletions src/main/java/com/twilio/rest/numbers/v1/PortingPortIn.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
@ToString
public class PortingPortIn extends Resource {

private static final long serialVersionUID = 3228491846364L;
private static final long serialVersionUID = 103086419202732L;

public static PortingPortInCreator creator() {
return new PortingPortInCreator();
Expand Down Expand Up @@ -124,6 +124,7 @@ public static String toJson(Object object, ObjectMapper mapper) {
private final Map<String, Object> losingCarrierInformation;
private final List<Map<String, Object>> phoneNumbers;
private final List<String> documents;
private final LocalDate dateCreated;

@JsonCreator
private PortingPortIn(
Expand All @@ -150,7 +151,8 @@ private PortingPortIn(
@JsonProperty("phone_numbers") final List<
Map<String, Object>
> phoneNumbers,
@JsonProperty("documents") final List<String> documents
@JsonProperty("documents") final List<String> documents,
@JsonProperty("date_created") final String dateCreated
) {
this.portInRequestSid = portInRequestSid;
this.url = url;
Expand All @@ -164,6 +166,7 @@ private PortingPortIn(
this.losingCarrierInformation = losingCarrierInformation;
this.phoneNumbers = phoneNumbers;
this.documents = documents;
this.dateCreated = DateConverter.localDateFromString(dateCreated);
}

public final String getPortInRequestSid() {
Expand Down Expand Up @@ -210,6 +213,10 @@ public final List<String> getDocuments() {
return this.documents;
}

public final LocalDate getDateCreated() {
return this.dateCreated;
}

@Override
public boolean equals(final Object o) {
if (this == o) {
Expand Down Expand Up @@ -242,7 +249,8 @@ public boolean equals(final Object o) {
other.losingCarrierInformation
) &&
Objects.equals(phoneNumbers, other.phoneNumbers) &&
Objects.equals(documents, other.documents)
Objects.equals(documents, other.documents) &&
Objects.equals(dateCreated, other.dateCreated)
);
}

Expand All @@ -259,7 +267,8 @@ public int hashCode() {
portInRequestStatus,
losingCarrierInformation,
phoneNumbers,
documents
documents,
dateCreated
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
@ToString
public class PortingPortInPhoneNumber extends Resource {

private static final long serialVersionUID = 239545094006478L;
private static final long serialVersionUID = 245952123111286L;

public static PortingPortInPhoneNumberDeleter deleter(
final String pathPortInRequestSid,
Expand Down Expand Up @@ -109,12 +109,15 @@ public static PortingPortInPhoneNumber fromJson(
private final ZonedDateTime dateCreated;
private final String country;
private final Boolean missingRequiredFields;
private final ZonedDateTime statusLastTimeUpdatedTimestamp;
private final ZonedDateTime lastUpdated;
private final com.twilio.type.PhoneNumber phoneNumber;
private final Boolean portable;
private final String notPortabilityReason;
private final String notPortabilityReasonCode;
private final Integer notPortabilityReasonCode;
private final String portInPhoneNumberStatus;
private final Integer portOutPin;
private final String rejectionReason;
private final Integer rejectionReasonCode;

@JsonCreator
private PortingPortInPhoneNumber(
Expand All @@ -128,9 +131,7 @@ private PortingPortInPhoneNumber(
@JsonProperty(
"missing_required_fields"
) final Boolean missingRequiredFields,
@JsonProperty(
"status_last_time_updated_timestamp"
) final String statusLastTimeUpdatedTimestamp,
@JsonProperty("last_updated") final String lastUpdated,
@JsonProperty(
"phone_number"
) final com.twilio.type.PhoneNumber phoneNumber,
Expand All @@ -140,10 +141,13 @@ private PortingPortInPhoneNumber(
) final String notPortabilityReason,
@JsonProperty(
"not_portability_reason_code"
) final String notPortabilityReasonCode,
) final Integer notPortabilityReasonCode,
@JsonProperty(
"port_in_phone_number_status"
) final String portInPhoneNumberStatus
) final String portInPhoneNumberStatus,
@JsonProperty("port_out_pin") final Integer portOutPin,
@JsonProperty("rejection_reason") final String rejectionReason,
@JsonProperty("rejection_reason_code") final Integer rejectionReasonCode
) {
this.portInRequestSid = portInRequestSid;
this.phoneNumberSid = phoneNumberSid;
Expand All @@ -153,15 +157,15 @@ private PortingPortInPhoneNumber(
this.dateCreated = DateConverter.iso8601DateTimeFromString(dateCreated);
this.country = country;
this.missingRequiredFields = missingRequiredFields;
this.statusLastTimeUpdatedTimestamp =
DateConverter.iso8601DateTimeFromString(
statusLastTimeUpdatedTimestamp
);
this.lastUpdated = DateConverter.iso8601DateTimeFromString(lastUpdated);
this.phoneNumber = phoneNumber;
this.portable = portable;
this.notPortabilityReason = notPortabilityReason;
this.notPortabilityReasonCode = notPortabilityReasonCode;
this.portInPhoneNumberStatus = portInPhoneNumberStatus;
this.portOutPin = portOutPin;
this.rejectionReason = rejectionReason;
this.rejectionReasonCode = rejectionReasonCode;
}

public final String getPortInRequestSid() {
Expand Down Expand Up @@ -196,8 +200,8 @@ public final Boolean getMissingRequiredFields() {
return this.missingRequiredFields;
}

public final ZonedDateTime getStatusLastTimeUpdatedTimestamp() {
return this.statusLastTimeUpdatedTimestamp;
public final ZonedDateTime getLastUpdated() {
return this.lastUpdated;
}

public final com.twilio.type.PhoneNumber getPhoneNumber() {
Expand All @@ -212,14 +216,26 @@ public final String getNotPortabilityReason() {
return this.notPortabilityReason;
}

public final String getNotPortabilityReasonCode() {
public final Integer getNotPortabilityReasonCode() {
return this.notPortabilityReasonCode;
}

public final String getPortInPhoneNumberStatus() {
return this.portInPhoneNumberStatus;
}

public final Integer getPortOutPin() {
return this.portOutPin;
}

public final String getRejectionReason() {
return this.rejectionReason;
}

public final Integer getRejectionReasonCode() {
return this.rejectionReasonCode;
}

@Override
public boolean equals(final Object o) {
if (this == o) {
Expand All @@ -244,10 +260,7 @@ public boolean equals(final Object o) {
missingRequiredFields,
other.missingRequiredFields
) &&
Objects.equals(
statusLastTimeUpdatedTimestamp,
other.statusLastTimeUpdatedTimestamp
) &&
Objects.equals(lastUpdated, other.lastUpdated) &&
Objects.equals(phoneNumber, other.phoneNumber) &&
Objects.equals(portable, other.portable) &&
Objects.equals(notPortabilityReason, other.notPortabilityReason) &&
Expand All @@ -258,7 +271,10 @@ public boolean equals(final Object o) {
Objects.equals(
portInPhoneNumberStatus,
other.portInPhoneNumberStatus
)
) &&
Objects.equals(portOutPin, other.portOutPin) &&
Objects.equals(rejectionReason, other.rejectionReason) &&
Objects.equals(rejectionReasonCode, other.rejectionReasonCode)
);
}

Expand All @@ -273,12 +289,15 @@ public int hashCode() {
dateCreated,
country,
missingRequiredFields,
statusLastTimeUpdatedTimestamp,
lastUpdated,
phoneNumber,
portable,
notPortabilityReason,
notPortabilityReasonCode,
portInPhoneNumberStatus
portInPhoneNumberStatus,
portOutPin,
rejectionReason,
rejectionReasonCode
);
}
}
Loading

0 comments on commit 27999c0

Please sign in to comment.