diff --git a/CHANGES.md b/CHANGES.md index c7a65aaff5..74cd3212d1 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,24 @@ twilio-java changelog ===================== +[2023-11-06] Version 9.14.1 +--------------------------- +**Flex** +- Adding `provisioning_status` for Email Manager + +**Intelligence** +- Add text-generation operator (for example conversation summary) results to existing OperatorResults collection. + +**Messaging** +- Add DELETE support to Tollfree Verification resource + +**Serverless** +- Add node18 as a valid Build runtime + +**Verify** +- Update Verify TOTP maturity to GA. + + [2023-10-19] Version 9.14.0 --------------------------- **Library - Chore** diff --git a/src/main/java/com/twilio/rest/flexapi/v1/ProvisioningStatus.java b/src/main/java/com/twilio/rest/flexapi/v1/ProvisioningStatus.java new file mode 100644 index 0000000000..74d77dbb24 --- /dev/null +++ b/src/main/java/com/twilio/rest/flexapi/v1/ProvisioningStatus.java @@ -0,0 +1,151 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio - Flex + * This is the public Twilio REST API. + * + * NOTE: This class is auto generated by OpenAPI Generator. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.twilio.rest.flexapi.v1; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.twilio.base.Resource; +import com.twilio.converter.Promoter; +import com.twilio.exception.ApiConnectionException; +import com.twilio.exception.ApiException; +import java.io.IOException; +import java.io.InputStream; +import java.net.URI; +import java.util.Objects; +import lombok.ToString; +import lombok.ToString; + +@JsonIgnoreProperties(ignoreUnknown = true) +@ToString +public class ProvisioningStatus extends Resource { + + private static final long serialVersionUID = 116877818354472L; + + public static ProvisioningStatusFetcher fetcher() { + return new ProvisioningStatusFetcher(); + } + + /** + * Converts a JSON String into a ProvisioningStatus object using the provided ObjectMapper. + * + * @param json Raw JSON String + * @param objectMapper Jackson ObjectMapper + * @return ProvisioningStatus object represented by the provided JSON + */ + public static ProvisioningStatus fromJson( + final String json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue(json, ProvisioningStatus.class); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + /** + * Converts a JSON InputStream into a ProvisioningStatus object using the provided + * ObjectMapper. + * + * @param json Raw JSON InputStream + * @param objectMapper Jackson ObjectMapper + * @return ProvisioningStatus object represented by the provided JSON + */ + public static ProvisioningStatus fromJson( + final InputStream json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue(json, ProvisioningStatus.class); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + public enum Status { + ACTIVE("active"), + IN_PROGRESS("in-progress"), + NOT_CONFIGURED("not-configured"), + FAILED("failed"); + + private final String value; + + private Status(final String value) { + this.value = value; + } + + public String toString() { + return value; + } + + @JsonCreator + public static Status forValue(final String value) { + return Promoter.enumFromString(value, Status.values()); + } + } + + private final ProvisioningStatus.Status status; + private final URI url; + + @JsonCreator + private ProvisioningStatus( + @JsonProperty("status") final ProvisioningStatus.Status status, + @JsonProperty("url") final URI url + ) { + this.status = status; + this.url = url; + } + + public final ProvisioningStatus.Status getStatus() { + return this.status; + } + + public final URI getUrl() { + return this.url; + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + ProvisioningStatus other = (ProvisioningStatus) o; + + return ( + Objects.equals(status, other.status) && + Objects.equals(url, other.url) + ); + } + + @Override + public int hashCode() { + return Objects.hash(status, url); + } +} diff --git a/src/main/java/com/twilio/rest/flexapi/v1/ProvisioningStatusFetcher.java b/src/main/java/com/twilio/rest/flexapi/v1/ProvisioningStatusFetcher.java new file mode 100644 index 0000000000..f9ae0f3c14 --- /dev/null +++ b/src/main/java/com/twilio/rest/flexapi/v1/ProvisioningStatusFetcher.java @@ -0,0 +1,65 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio - Flex + * This is the public Twilio REST API. + * + * NOTE: This class is auto generated by OpenAPI Generator. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.twilio.rest.flexapi.v1; + +import com.twilio.base.Fetcher; +import com.twilio.exception.ApiConnectionException; +import com.twilio.exception.ApiException; +import com.twilio.exception.RestException; +import com.twilio.http.HttpMethod; +import com.twilio.http.Request; +import com.twilio.http.Response; +import com.twilio.http.TwilioRestClient; +import com.twilio.rest.Domains; + +public class ProvisioningStatusFetcher extends Fetcher { + + public ProvisioningStatusFetcher() {} + + @Override + public ProvisioningStatus fetch(final TwilioRestClient client) { + String path = "/v1/account/provision/status"; + + Request request = new Request( + HttpMethod.GET, + Domains.FLEXAPI.toString(), + path + ); + Response response = client.request(request); + + if (response == null) { + throw new ApiConnectionException( + "ProvisioningStatus fetch failed: Unable to connect to server" + ); + } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { + RestException restException = RestException.fromJson( + response.getStream(), + client.getObjectMapper() + ); + if (restException == null) { + throw new ApiException( + "Server Error, no content", + response.getStatusCode() + ); + } + throw new ApiException(restException); + } + + return ProvisioningStatus.fromJson( + response.getStream(), + client.getObjectMapper() + ); + } +} diff --git a/src/main/java/com/twilio/rest/intelligence/v2/transcript/OperatorResult.java b/src/main/java/com/twilio/rest/intelligence/v2/transcript/OperatorResult.java index a8d47bab39..0e609c2338 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/transcript/OperatorResult.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/transcript/OperatorResult.java @@ -39,7 +39,7 @@ @ToString public class OperatorResult extends Resource { - private static final long serialVersionUID = 126254553573605L; + private static final long serialVersionUID = 197278046028453L; public static OperatorResultFetcher fetcher( final String pathTranscriptSid, @@ -130,6 +130,7 @@ public static OperatorType forValue(final String value) { private final BigDecimal predictedProbability; private final Map labelProbabilities; private final Map extractResults; + private final Map textGenerationResults; private final String transcriptSid; private final URI url; @@ -159,6 +160,10 @@ private OperatorResult( String, Object > extractResults, + @JsonProperty("text_generation_results") final Map< + String, + Object + > textGenerationResults, @JsonProperty("transcript_sid") final String transcriptSid, @JsonProperty("url") final URI url ) { @@ -174,6 +179,7 @@ private OperatorResult( this.predictedProbability = predictedProbability; this.labelProbabilities = labelProbabilities; this.extractResults = extractResults; + this.textGenerationResults = textGenerationResults; this.transcriptSid = transcriptSid; this.url = url; } @@ -226,6 +232,10 @@ public final Map getExtractResults() { return this.extractResults; } + public final Map getTextGenerationResults() { + return this.textGenerationResults; + } + public final String getTranscriptSid() { return this.transcriptSid; } @@ -259,6 +269,10 @@ public boolean equals(final Object o) { Objects.equals(predictedProbability, other.predictedProbability) && Objects.equals(labelProbabilities, other.labelProbabilities) && Objects.equals(extractResults, other.extractResults) && + Objects.equals( + textGenerationResults, + other.textGenerationResults + ) && Objects.equals(transcriptSid, other.transcriptSid) && Objects.equals(url, other.url) ); @@ -279,6 +293,7 @@ public int hashCode() { predictedProbability, labelProbabilities, extractResults, + textGenerationResults, transcriptSid, url ); diff --git a/src/main/java/com/twilio/rest/messaging/v1/TollfreeVerification.java b/src/main/java/com/twilio/rest/messaging/v1/TollfreeVerification.java index 3d718ba832..13deb39fad 100644 --- a/src/main/java/com/twilio/rest/messaging/v1/TollfreeVerification.java +++ b/src/main/java/com/twilio/rest/messaging/v1/TollfreeVerification.java @@ -68,6 +68,10 @@ public static TollfreeVerificationCreator creator( ); } + public static TollfreeVerificationDeleter deleter(final String pathSid) { + return new TollfreeVerificationDeleter(pathSid); + } + public static TollfreeVerificationFetcher fetcher(final String pathSid) { return new TollfreeVerificationFetcher(pathSid); } diff --git a/src/main/java/com/twilio/rest/messaging/v1/TollfreeVerificationDeleter.java b/src/main/java/com/twilio/rest/messaging/v1/TollfreeVerificationDeleter.java new file mode 100644 index 0000000000..af16e73af8 --- /dev/null +++ b/src/main/java/com/twilio/rest/messaging/v1/TollfreeVerificationDeleter.java @@ -0,0 +1,67 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio - Messaging + * This is the public Twilio REST API. + * + * NOTE: This class is auto generated by OpenAPI Generator. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.twilio.rest.messaging.v1; + +import com.twilio.base.Deleter; +import com.twilio.exception.ApiConnectionException; +import com.twilio.exception.ApiException; +import com.twilio.exception.RestException; +import com.twilio.http.HttpMethod; +import com.twilio.http.Request; +import com.twilio.http.Response; +import com.twilio.http.TwilioRestClient; +import com.twilio.rest.Domains; + +public class TollfreeVerificationDeleter extends Deleter { + + private String pathSid; + + public TollfreeVerificationDeleter(final String pathSid) { + this.pathSid = pathSid; + } + + @Override + public boolean delete(final TwilioRestClient client) { + String path = "/v1/Tollfree/Verifications/{Sid}"; + + path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); + + Request request = new Request( + HttpMethod.DELETE, + Domains.MESSAGING.toString(), + path + ); + Response response = client.request(request); + + if (response == null) { + throw new ApiConnectionException( + "TollfreeVerification delete failed: Unable to connect to server" + ); + } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { + RestException restException = RestException.fromJson( + response.getStream(), + client.getObjectMapper() + ); + if (restException == null) { + throw new ApiException( + "Server Error, no content", + response.getStatusCode() + ); + } + throw new ApiException(restException); + } + return response.getStatusCode() == 204; + } +} diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/Build.java b/src/main/java/com/twilio/rest/serverless/v1/service/Build.java index 3f985d21c1..bb3d05dc30 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/Build.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/Build.java @@ -112,7 +112,8 @@ public enum Runtime { NODE10("node10"), NODE12("node12"), NODE14("node14"), - NODE16("node16"); + NODE16("node16"), + NODE18("node18"); private final String value; diff --git a/src/main/java/com/twilio/rest/trusthub/v1/ComplianceTollfreeInquiries.java b/src/main/java/com/twilio/rest/trusthub/v1/ComplianceTollfreeInquiries.java new file mode 100644 index 0000000000..ed97b4a545 --- /dev/null +++ b/src/main/java/com/twilio/rest/trusthub/v1/ComplianceTollfreeInquiries.java @@ -0,0 +1,159 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio - Trusthub + * This is the public Twilio REST API. + * + * NOTE: This class is auto generated by OpenAPI Generator. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.twilio.rest.trusthub.v1; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.twilio.base.Resource; +import com.twilio.exception.ApiConnectionException; +import com.twilio.exception.ApiException; +import java.io.IOException; +import java.io.InputStream; +import java.net.URI; +import java.util.Objects; +import lombok.ToString; +import lombok.ToString; + +@JsonIgnoreProperties(ignoreUnknown = true) +@ToString +public class ComplianceTollfreeInquiries extends Resource { + + private static final long serialVersionUID = 210793867662752L; + + public static ComplianceTollfreeInquiriesCreator creator( + final com.twilio.type.PhoneNumber did + ) { + return new ComplianceTollfreeInquiriesCreator(did); + } + + public static ComplianceTollfreeInquiriesUpdater updater( + final String pathTollfreeId, + final com.twilio.type.PhoneNumber did + ) { + return new ComplianceTollfreeInquiriesUpdater(pathTollfreeId, did); + } + + /** + * Converts a JSON String into a ComplianceTollfreeInquiries object using the provided ObjectMapper. + * + * @param json Raw JSON String + * @param objectMapper Jackson ObjectMapper + * @return ComplianceTollfreeInquiries object represented by the provided JSON + */ + public static ComplianceTollfreeInquiries fromJson( + final String json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue( + json, + ComplianceTollfreeInquiries.class + ); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + /** + * Converts a JSON InputStream into a ComplianceTollfreeInquiries object using the provided + * ObjectMapper. + * + * @param json Raw JSON InputStream + * @param objectMapper Jackson ObjectMapper + * @return ComplianceTollfreeInquiries object represented by the provided JSON + */ + public static ComplianceTollfreeInquiries fromJson( + final InputStream json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue( + json, + ComplianceTollfreeInquiries.class + ); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + private final String inquiryId; + private final String inquirySessionToken; + private final String tollfreeId; + private final URI url; + + @JsonCreator + private ComplianceTollfreeInquiries( + @JsonProperty("inquiry_id") final String inquiryId, + @JsonProperty("inquiry_session_token") final String inquirySessionToken, + @JsonProperty("tollfree_id") final String tollfreeId, + @JsonProperty("url") final URI url + ) { + this.inquiryId = inquiryId; + this.inquirySessionToken = inquirySessionToken; + this.tollfreeId = tollfreeId; + this.url = url; + } + + public final String getInquiryId() { + return this.inquiryId; + } + + public final String getInquirySessionToken() { + return this.inquirySessionToken; + } + + public final String getTollfreeId() { + return this.tollfreeId; + } + + public final URI getUrl() { + return this.url; + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + ComplianceTollfreeInquiries other = (ComplianceTollfreeInquiries) o; + + return ( + Objects.equals(inquiryId, other.inquiryId) && + Objects.equals(inquirySessionToken, other.inquirySessionToken) && + Objects.equals(tollfreeId, other.tollfreeId) && + Objects.equals(url, other.url) + ); + } + + @Override + public int hashCode() { + return Objects.hash(inquiryId, inquirySessionToken, tollfreeId, url); + } +} diff --git a/src/main/java/com/twilio/rest/trusthub/v1/ComplianceTollfreeInquiriesCreator.java b/src/main/java/com/twilio/rest/trusthub/v1/ComplianceTollfreeInquiriesCreator.java new file mode 100644 index 0000000000..fa63de1d27 --- /dev/null +++ b/src/main/java/com/twilio/rest/trusthub/v1/ComplianceTollfreeInquiriesCreator.java @@ -0,0 +1,94 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio - Trusthub + * This is the public Twilio REST API. + * + * NOTE: This class is auto generated by OpenAPI Generator. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.twilio.rest.trusthub.v1; + +import com.twilio.base.Creator; +import com.twilio.constant.EnumConstants; +import com.twilio.converter.Promoter; +import com.twilio.exception.ApiConnectionException; +import com.twilio.exception.ApiException; +import com.twilio.exception.RestException; +import com.twilio.http.HttpMethod; +import com.twilio.http.Request; +import com.twilio.http.Response; +import com.twilio.http.TwilioRestClient; +import com.twilio.rest.Domains; + +public class ComplianceTollfreeInquiriesCreator + extends Creator { + + private com.twilio.type.PhoneNumber did; + + public ComplianceTollfreeInquiriesCreator( + final com.twilio.type.PhoneNumber did + ) { + this.did = did; + } + + public ComplianceTollfreeInquiriesCreator setDid( + final com.twilio.type.PhoneNumber did + ) { + this.did = did; + return this; + } + + public ComplianceTollfreeInquiriesCreator setDid(final String did) { + return setDid(Promoter.phoneNumberFromString(did)); + } + + @Override + public ComplianceTollfreeInquiries create(final TwilioRestClient client) { + String path = "/v1/ComplianceInquiries/Tollfree/Initialize"; + + path = path.replace("{" + "Did" + "}", this.did.encode("utf-8")); + + Request request = new Request( + HttpMethod.POST, + Domains.TRUSTHUB.toString(), + path + ); + request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); + addPostParams(request); + Response response = client.request(request); + if (response == null) { + throw new ApiConnectionException( + "ComplianceTollfreeInquiries creation failed: Unable to connect to server" + ); + } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { + RestException restException = RestException.fromJson( + response.getStream(), + client.getObjectMapper() + ); + if (restException == null) { + throw new ApiException( + "Server Error, no content", + response.getStatusCode() + ); + } + throw new ApiException(restException); + } + + return ComplianceTollfreeInquiries.fromJson( + response.getStream(), + client.getObjectMapper() + ); + } + + private void addPostParams(final Request request) { + if (did != null) { + request.addPostParam("Did", did.toString()); + } + } +} diff --git a/src/main/java/com/twilio/rest/trusthub/v1/ComplianceTollfreeInquiriesUpdater.java b/src/main/java/com/twilio/rest/trusthub/v1/ComplianceTollfreeInquiriesUpdater.java new file mode 100644 index 0000000000..bd5412ce96 --- /dev/null +++ b/src/main/java/com/twilio/rest/trusthub/v1/ComplianceTollfreeInquiriesUpdater.java @@ -0,0 +1,103 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio - Trusthub + * This is the public Twilio REST API. + * + * NOTE: This class is auto generated by OpenAPI Generator. + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.twilio.rest.trusthub.v1; + +import com.twilio.base.Updater; +import com.twilio.constant.EnumConstants; +import com.twilio.converter.Promoter; +import com.twilio.exception.ApiConnectionException; +import com.twilio.exception.ApiException; +import com.twilio.exception.RestException; +import com.twilio.http.HttpMethod; +import com.twilio.http.Request; +import com.twilio.http.Response; +import com.twilio.http.TwilioRestClient; +import com.twilio.rest.Domains; + +public class ComplianceTollfreeInquiriesUpdater + extends Updater { + + private String pathTollfreeId; + private com.twilio.type.PhoneNumber did; + + public ComplianceTollfreeInquiriesUpdater( + final String pathTollfreeId, + final com.twilio.type.PhoneNumber did + ) { + this.pathTollfreeId = pathTollfreeId; + this.did = did; + } + + public ComplianceTollfreeInquiriesUpdater setDid( + final com.twilio.type.PhoneNumber did + ) { + this.did = did; + return this; + } + + public ComplianceTollfreeInquiriesUpdater setDid(final String did) { + return setDid(Promoter.phoneNumberFromString(did)); + } + + @Override + public ComplianceTollfreeInquiries update(final TwilioRestClient client) { + String path = + "/v1/ComplianceInquiries/Tollfree/{TollfreeId}/Initialize"; + + path = + path.replace( + "{" + "TollfreeId" + "}", + this.pathTollfreeId.toString() + ); + path = path.replace("{" + "Did" + "}", this.did.encode("utf-8")); + + Request request = new Request( + HttpMethod.POST, + Domains.TRUSTHUB.toString(), + path + ); + request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); + addPostParams(request); + Response response = client.request(request); + if (response == null) { + throw new ApiConnectionException( + "ComplianceTollfreeInquiries update failed: Unable to connect to server" + ); + } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { + RestException restException = RestException.fromJson( + response.getStream(), + client.getObjectMapper() + ); + if (restException == null) { + throw new ApiException( + "Server Error, no content", + response.getStatusCode() + ); + } + throw new ApiException(restException); + } + + return ComplianceTollfreeInquiries.fromJson( + response.getStream(), + client.getObjectMapper() + ); + } + + private void addPostParams(final Request request) { + if (did != null) { + request.addPostParam("Did", did.toString()); + } + } +}