Skip to content

Commit

Permalink
[Librarian] Regenerated @ 07a9a183b1077d5a881e6cd53ef76b0d75ccc6b0 46…
Browse files Browse the repository at this point in the history
…d15a3f352ad163985b3969a195da5942f04fee
  • Loading branch information
twilio-dx committed Jul 27, 2023
1 parent 8aa8f48 commit 5c9a366
Show file tree
Hide file tree
Showing 1,942 changed files with 109,648 additions and 73,620 deletions.
27 changes: 27 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,33 @@
twilio-java changelog
=====================

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

**Flex**
- Adding `interaction_context_sid` as optional parameter in Interactions API

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

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

**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.
- Add `RiskCheck` optional parameter on Verification creation.

**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-04] Version 10.0.0-rc.1
--------------------------------
**Library - Chore**
Expand Down
124 changes: 63 additions & 61 deletions src/main/java/com/twilio/rest/accounts/v1/AuthTokenPromotion.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,40 +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;


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 @@ -68,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 @@ -86,7 +85,6 @@ public static AuthTokenPromotion fromJson(final InputStream json, final ObjectMa
}
}


private final String accountSid;
private final String authToken;
private final ZonedDateTime dateCreated;
Expand All @@ -95,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 @@ -117,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 @@ -145,14 +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 5c9a366

Please sign in to comment.