Skip to content

Commit

Permalink
Merge branch 'main' into pkcv-changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kridai authored Aug 17, 2023
2 parents eb5f2ae + d14084f commit a4c1c33
Show file tree
Hide file tree
Showing 1,938 changed files with 110,683 additions and 71,160 deletions.
56 changes: 56 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,62 @@
twilio-java changelog
=====================

[2023-08-10] Version 9.10.0
---------------------------
**Insights**
- Normalize annotations parameters in list summary api to be prefixed

**Numbers**
- Change Bulk_hosted_sid from BHR to BH prefix in HNO and dependent under version `/v2` API's. **(breaking change)**
- Added parameter target_account_sid to portability and account_sid to response body

**Verify**
- Remove beta feature flag to list attempts API.
- Remove beta feature flag to verifications summary attempts API.


[2023-07-27] Version 9.9.1
--------------------------
**Api**
- Added `voice-intelligence`, `voice-intelligence-transcription` and `voice-intelligence-operators` to `usage_record` API.
- Added `tts-google` to `usage_record` API.

**Lookups**
- Add new `disposable_phone_number_risk` package to the lookup response

**Verify**
- Documentation of list attempts API was improved by correcting `date_created_after` and `date_created_before` expected date format.
- Documentation was improved by correcting `date_created_after` and `date_created_before` expected date format parameter on attempts summary API.
- Documentation was improved by adding `WHATSAPP` as optional valid parameter on attempts summary API.

**Twiml**
- Added support for he-il inside of ssm_lang.json that was missing
- Added support for he-il language in say.json that was missing
- Add `statusCallback` and `statusCallbackMethod` attributes to `<Siprec>`.


[2023-07-14] Version 9.9.0
--------------------------
**Flex**
- Adding `interaction_context_sid` as optional parameter in Interactions API

**Messaging**
- Making visiblity public for tollfree_verification API

**Numbers**
- Remove Sms capability property from HNO creation under version `/v2` of HNO API. **(breaking change)**
- Update required properties in LOA creation under version `/v2` of Authorization document API. **(breaking change)**

**Taskrouter**
- Add api to fetch task queue statistics for multiple TaskQueues

**Verify**
- Add `RiskCheck` optional parameter on Verification creation.

**Twiml**
- Add Google Voices and languages


[2023-06-28] Version 9.8.0
--------------------------
**Library - Chore**
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<artifactId>twilio</artifactId>
<packaging>jar</packaging>
<name>twilio</name>
<version>9.8.0</version>
<version>9.10.0</version>
<description>Twilio Java Helper Library</description>
<url>https://www.twilio.com</url>
<licenses>
Expand All @@ -19,7 +19,7 @@
<url>git@github.com:twilio/twilio-java.git</url>
<connection>scm:git:git@github.com:twilio/twilio-java.git</connection>
<developerConnection>scm:git:git@github.com:twilio/twilio-java.git</developerConnection>
<tag>9.8.0</tag>
<tag>9.10.0</tag>
</scm>
<developers>
<developer>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/twilio/Twilio.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/
public class Twilio {

public static final String VERSION = "9.8.0";
public static final String VERSION = "9.10.0";
public static final String JAVA_VERSION = System.getProperty("java.version");
public static final String OS_NAME = System.getProperty("os.name");
public static final String OS_ARCH = System.getProperty("os.arch");
Expand Down
121 changes: 64 additions & 57 deletions src/main/java/com/twilio/rest/accounts/v1/AuthTokenPromotion.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,37 +23,36 @@
import com.twilio.base.Resource;
import com.twilio.converter.DateConverter;
import com.twilio.exception.ApiConnectionException;

import com.twilio.exception.ApiException;

import lombok.ToString;

import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
import java.time.ZonedDateTime;

import java.util.Objects;


import lombok.ToString;
import lombok.ToString;

@JsonIgnoreProperties(ignoreUnknown = true)
@ToString
public class AuthTokenPromotion extends Resource {

private static final long serialVersionUID = 77507843877589L;

public static AuthTokenPromotionUpdater updater(){
public static AuthTokenPromotionUpdater updater() {
return new AuthTokenPromotionUpdater();
}

/**
* Converts a JSON String into a AuthTokenPromotion object using the provided ObjectMapper.
*
* @param json Raw JSON String
* @param objectMapper Jackson ObjectMapper
* @return AuthTokenPromotion object represented by the provided JSON
*/
public static AuthTokenPromotion fromJson(final String json, final ObjectMapper objectMapper) {
* Converts a JSON String into a AuthTokenPromotion object using the provided ObjectMapper.
*
* @param json Raw JSON String
* @param objectMapper Jackson ObjectMapper
* @return AuthTokenPromotion object represented by the provided JSON
*/
public static AuthTokenPromotion fromJson(
final String json,
final ObjectMapper objectMapper
) {
// Convert all checked exceptions to Runtime
try {
return objectMapper.readValue(json, AuthTokenPromotion.class);
Expand All @@ -65,14 +64,17 @@ public static AuthTokenPromotion fromJson(final String json, final ObjectMapper
}

/**
* Converts a JSON InputStream into a AuthTokenPromotion object using the provided
* ObjectMapper.
*
* @param json Raw JSON InputStream
* @param objectMapper Jackson ObjectMapper
* @return AuthTokenPromotion object represented by the provided JSON
*/
public static AuthTokenPromotion fromJson(final InputStream json, final ObjectMapper objectMapper) {
* Converts a JSON InputStream into a AuthTokenPromotion object using the provided
* ObjectMapper.
*
* @param json Raw JSON InputStream
* @param objectMapper Jackson ObjectMapper
* @return AuthTokenPromotion object represented by the provided JSON
*/
public static AuthTokenPromotion fromJson(
final InputStream json,
final ObjectMapper objectMapper
) {
// Convert all checked exceptions to Runtime
try {
return objectMapper.readValue(json, AuthTokenPromotion.class);
Expand All @@ -91,20 +93,11 @@ public static AuthTokenPromotion fromJson(final InputStream json, final ObjectMa

@JsonCreator
private AuthTokenPromotion(
@JsonProperty("account_sid")
final String accountSid,

@JsonProperty("auth_token")
final String authToken,

@JsonProperty("date_created")
final String dateCreated,

@JsonProperty("date_updated")
final String dateUpdated,

@JsonProperty("url")
final URI url
@JsonProperty("account_sid") final String accountSid,
@JsonProperty("auth_token") final String authToken,
@JsonProperty("date_created") final String dateCreated,
@JsonProperty("date_updated") final String dateUpdated,
@JsonProperty("url") final URI url
) {
this.accountSid = accountSid;
this.authToken = authToken;
Expand All @@ -113,25 +106,29 @@ private AuthTokenPromotion(
this.url = url;
}

public final String getAccountSid() {
return this.accountSid;
}
public final String getAuthToken() {
return this.authToken;
}
public final ZonedDateTime getDateCreated() {
return this.dateCreated;
}
public final ZonedDateTime getDateUpdated() {
return this.dateUpdated;
}
public final URI getUrl() {
return this.url;
}
public final String getAccountSid() {
return this.accountSid;
}

public final String getAuthToken() {
return this.authToken;
}

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

public final ZonedDateTime getDateUpdated() {
return this.dateUpdated;
}

public final URI getUrl() {
return this.url;
}

@Override
public boolean equals(final Object o) {
if (this==o) {
if (this == o) {
return true;
}

Expand All @@ -141,13 +138,23 @@ public boolean equals(final Object o) {

AuthTokenPromotion other = (AuthTokenPromotion) o;

return Objects.equals(accountSid, other.accountSid) && Objects.equals(authToken, other.authToken) && Objects.equals(dateCreated, other.dateCreated) && Objects.equals(dateUpdated, other.dateUpdated) && Objects.equals(url, other.url) ;
return (
Objects.equals(accountSid, other.accountSid) &&
Objects.equals(authToken, other.authToken) &&
Objects.equals(dateCreated, other.dateCreated) &&
Objects.equals(dateUpdated, other.dateUpdated) &&
Objects.equals(url, other.url)
);
}

@Override
public int hashCode() {
return Objects.hash(accountSid, authToken, dateCreated, dateUpdated, url);
return Objects.hash(
accountSid,
authToken,
dateCreated,
dateUpdated,
url
);
}

}

Original file line number Diff line number Diff line change
Expand Up @@ -24,36 +24,38 @@
import com.twilio.http.TwilioRestClient;
import com.twilio.rest.Domains;

public class AuthTokenPromotionUpdater extends Updater<AuthTokenPromotion> {



public class AuthTokenPromotionUpdater extends Updater<AuthTokenPromotion>{

public AuthTokenPromotionUpdater(){
}

public AuthTokenPromotionUpdater() {}

@Override
public AuthTokenPromotion update(final TwilioRestClient client){
public AuthTokenPromotion update(final TwilioRestClient client) {
String path = "/v1/AuthTokens/Promote";


Request request = new Request(
HttpMethod.POST,
Domains.ACCOUNTS.toString(),
path
);
Response response = client.request(request);
if (response == null) {
throw new ApiConnectionException("AuthTokenPromotion update failed: Unable to connect to server");
throw new ApiConnectionException(
"AuthTokenPromotion update failed: Unable to connect to server"
);
} else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) {
RestException restException = RestException.fromJson(response.getStream(), client.getObjectMapper());
RestException restException = RestException.fromJson(
response.getStream(),
client.getObjectMapper()
);
if (restException == null) {
throw new ApiException("Server Error, no content");
}
throw new ApiException(restException);
}

return AuthTokenPromotion.fromJson(response.getStream(), client.getObjectMapper());
return AuthTokenPromotion.fromJson(
response.getStream(),
client.getObjectMapper()
);
}
}
Loading

0 comments on commit a4c1c33

Please sign in to comment.