Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import com.twilio.http.TwilioRestClient;
import com.twilio.rest.Domains;

import java.io.InputStream;
import java.net.URI;
import java.util.List;
import com.twilio.type.*;
Expand Down Expand Up @@ -100,8 +101,9 @@ private Response makeRequest(final TwilioRestClient client) {
if (response == null) {
throw new ApiConnectionException("Account creation failed: Unable to connect to server");
} else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) {
InputStream inputStream = response.getStream();
RestException restException = RestException.fromJson(
response.getStream(),
inputStream,
client.getObjectMapper()
);
if (restException == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import com.twilio.rest.Domains;
import java.util.function.Predicate;

import java.io.InputStream;
import com.twilio.type.*;


Expand Down Expand Up @@ -61,8 +62,9 @@ private Response makeRequest(final TwilioRestClient client) {
if (response == null) {
throw new ApiConnectionException("Account delete failed: Unable to connect to server");
} else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) {
InputStream inputStream = response.getStream();
RestException restException = RestException.fromJson(
response.getStream(),
inputStream,
client.getObjectMapper()
);
if (restException == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import com.twilio.http.TwilioRestClient;
import com.twilio.rest.Domains;

import java.io.InputStream;
import com.twilio.type.*;


Expand Down Expand Up @@ -59,8 +60,9 @@ private Response makeRequest(final TwilioRestClient client) {
if (response == null) {
throw new ApiConnectionException("Account fetch failed: Unable to connect to server");
} else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) {
InputStream inputStream = response.getStream();
RestException restException = RestException.fromJson(
response.getStream(),
inputStream,
client.getObjectMapper()
);
if (restException == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import com.twilio.http.TwilioRestClient;
import com.twilio.rest.Domains;

import java.io.InputStream;
import java.time.LocalDate;
import java.time.ZonedDateTime;
import com.twilio.type.*;
Expand Down Expand Up @@ -133,8 +134,9 @@ private Response makeRequest(final TwilioRestClient client, final Request reques
if (response == null) {
throw new ApiConnectionException("Account read failed: Unable to connect to server");
} else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) {
InputStream inputStream = response.getStream();
RestException restException = RestException.fromJson(
response.getStream(),
inputStream,
client.getObjectMapper()
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import com.twilio.http.TwilioRestClient;
import com.twilio.rest.Domains;

import java.io.InputStream;
import com.twilio.type.*;


Expand Down Expand Up @@ -79,8 +80,9 @@ private Response makeRequest(final TwilioRestClient client) {
if (response == null) {
throw new ApiConnectionException("Account update failed: Unable to connect to server");
} else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) {
InputStream inputStream = response.getStream();
RestException restException = RestException.fromJson(
response.getStream(),
inputStream,
client.getObjectMapper()
);
if (restException == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import com.twilio.http.TwilioRestClient;
import com.twilio.rest.Domains;

import java.io.InputStream;
import java.net.URI;
import java.util.List;
import com.twilio.type.*;
Expand Down Expand Up @@ -109,8 +110,9 @@ private Response makeRequest(final TwilioRestClient client) {
if (response == null) {
throw new ApiConnectionException("Call creation failed: Unable to connect to server");
} else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) {
InputStream inputStream = response.getStream();
RestException restException = RestException.fromJson(
response.getStream(),
inputStream,
client.getObjectMapper()
);
if (restException == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import com.twilio.rest.Domains;
import java.util.function.Predicate;

import java.io.InputStream;
import com.twilio.type.*;


Expand Down Expand Up @@ -65,8 +66,9 @@ private Response makeRequest(final TwilioRestClient client) {
if (response == null) {
throw new ApiConnectionException("Call delete failed: Unable to connect to server");
} else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) {
InputStream inputStream = response.getStream();
RestException restException = RestException.fromJson(
response.getStream(),
inputStream,
client.getObjectMapper()
);
if (restException == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import com.twilio.http.TwilioRestClient;
import com.twilio.rest.Domains;

import java.io.InputStream;
import com.twilio.type.*;


Expand Down Expand Up @@ -63,8 +64,9 @@ private Response makeRequest(final TwilioRestClient client) {
if (response == null) {
throw new ApiConnectionException("Call fetch failed: Unable to connect to server");
} else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) {
InputStream inputStream = response.getStream();
RestException restException = RestException.fromJson(
response.getStream(),
inputStream,
client.getObjectMapper()
);
if (restException == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import com.twilio.http.TwilioRestClient;
import com.twilio.rest.Domains;

import java.io.InputStream;
import java.time.LocalDate;
import com.twilio.type.*;

Expand Down Expand Up @@ -93,8 +94,9 @@ private Response makeRequest(final TwilioRestClient client) {
if (response == null) {
throw new ApiConnectionException("FeedbackCallSummary update failed: Unable to connect to server");
} else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) {
InputStream inputStream = response.getStream();
RestException restException = RestException.fromJson(
response.getStream(),
inputStream,
client.getObjectMapper()
);
if (restException == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import com.twilio.http.TwilioRestClient;
import com.twilio.rest.Domains;

import java.io.InputStream;
import com.twilio.type.*;


Expand Down Expand Up @@ -55,8 +56,9 @@ private Response makeRequest(final TwilioRestClient client) {
if (response == null) {
throw new ApiConnectionException("Call update failed: Unable to connect to server");
} else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) {
InputStream inputStream = response.getStream();
RestException restException = RestException.fromJson(
response.getStream(),
inputStream,
client.getObjectMapper()
);
if (restException == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import com.twilio.rest.Domains;
import java.util.function.Predicate;

import java.io.InputStream;
import com.twilio.type.*;


Expand Down Expand Up @@ -58,8 +59,9 @@ private Response makeRequest(final TwilioRestClient client) {
if (response == null) {
throw new ApiConnectionException("Aws delete failed: Unable to connect to server");
} else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) {
InputStream inputStream = response.getStream();
RestException restException = RestException.fromJson(
response.getStream(),
inputStream,
client.getObjectMapper()
);
if (restException == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import com.twilio.http.TwilioRestClient;
import com.twilio.rest.Domains;

import java.io.InputStream;
import com.twilio.type.*;


Expand Down Expand Up @@ -56,8 +57,9 @@ private Response makeRequest(final TwilioRestClient client) {
if (response == null) {
throw new ApiConnectionException("Aws fetch failed: Unable to connect to server");
} else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) {
InputStream inputStream = response.getStream();
RestException restException = RestException.fromJson(
response.getStream(),
inputStream,
client.getObjectMapper()
);
if (restException == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import com.twilio.http.TwilioRestClient;
import com.twilio.rest.Domains;

import java.io.InputStream;
import com.twilio.type.*;


Expand Down Expand Up @@ -73,8 +74,9 @@ public Aws patch(final TwilioRestClient client) {
if (response == null) {
throw new ApiConnectionException("Aws patch failed: Unable to connect to server");
} else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) {
InputStream inputStream = response.getStream();
RestException restException = RestException.fromJson(
response.getStream(),
inputStream,
client.getObjectMapper()
);
if (restException == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import com.twilio.http.TwilioRestClient;
import com.twilio.rest.Domains;

import java.io.InputStream;
import com.twilio.type.*;

import com.twilio.base.Page;
Expand Down Expand Up @@ -103,8 +104,9 @@ private Response makeRequest(final TwilioRestClient client, final Request reques
if (response == null) {
throw new ApiConnectionException("Aws read failed: Unable to connect to server");
} else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) {
InputStream inputStream = response.getStream();
RestException restException = RestException.fromJson(
response.getStream(),
inputStream,
client.getObjectMapper()
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import com.twilio.http.TwilioRestClient;
import com.twilio.rest.Domains;

import java.io.InputStream;
import com.twilio.type.*;


Expand Down Expand Up @@ -74,8 +75,9 @@ private Response makeRequest(final TwilioRestClient client) {
if (response == null) {
throw new ApiConnectionException("Aws update failed: Unable to connect to server");
} else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) {
InputStream inputStream = response.getStream();
RestException restException = RestException.fromJson(
response.getStream(),
inputStream,
client.getObjectMapper()
);
if (restException == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import com.twilio.http.TwilioRestClient;
import com.twilio.rest.Domains;

import java.io.InputStream;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.ZonedDateTime;
Expand Down Expand Up @@ -210,8 +211,9 @@ private Response makeRequest(final TwilioRestClient client) {
if (response == null) {
throw new ApiConnectionException("NewCredentials creation failed: Unable to connect to server");
} else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) {
InputStream inputStream = response.getStream();
RestException restException = RestException.fromJson(
response.getStream(),
inputStream,
client.getObjectMapper()
);
if (restException == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import com.twilio.http.TwilioRestClient;
import com.twilio.rest.Domains;

import java.io.InputStream;
import java.util.Map;
import com.twilio.type.*;

Expand Down Expand Up @@ -67,8 +68,9 @@ private Response makeRequest(final TwilioRestClient client) {
if (response == null) {
throw new ApiConnectionException("History fetch failed: Unable to connect to server");
} else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) {
InputStream inputStream = response.getStream();
RestException restException = RestException.fromJson(
response.getStream(),
inputStream,
client.getObjectMapper()
);
if (restException == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import com.twilio.http.TwilioRestClient;
import com.twilio.rest.Domains;

import java.io.InputStream;
import com.twilio.type.*;


Expand Down Expand Up @@ -117,8 +118,9 @@ private Response makeRequest(final TwilioRestClient client) {
if (response == null) {
throw new ApiConnectionException("Token creation failed: Unable to connect to server");
} else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) {
InputStream inputStream = response.getStream();
RestException restException = RestException.fromJson(
response.getStream(),
inputStream,
client.getObjectMapper()
);
if (restException == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import com.twilio.http.TwilioRestClient;
import com.twilio.rest.Domains;

import java.io.InputStream;
import com.twilio.type.*;


Expand Down Expand Up @@ -66,8 +67,9 @@ private Response makeRequest(final TwilioRestClient client) {
if (response == null) {
throw new ApiConnectionException("Fleet creation failed: Unable to connect to server");
} else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) {
InputStream inputStream = response.getStream();
RestException restException = RestException.fromJson(
response.getStream(),
inputStream,
client.getObjectMapper()
);
if (restException == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import com.twilio.http.TwilioRestClient;
import com.twilio.rest.Domains;

import java.io.InputStream;
import com.twilio.type.*;


Expand Down Expand Up @@ -56,8 +57,9 @@ private Response makeRequest(final TwilioRestClient client) {
if (response == null) {
throw new ApiConnectionException("Fleet fetch failed: Unable to connect to server");
} else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) {
InputStream inputStream = response.getStream();
RestException restException = RestException.fromJson(
response.getStream(),
inputStream,
client.getObjectMapper()
);
if (restException == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import com.twilio.http.TwilioRestClient;
import com.twilio.rest.Domains;

import java.io.InputStream;
import com.twilio.type.*;

import com.twilio.base.Page;
Expand Down Expand Up @@ -103,8 +104,9 @@ private Response makeRequest(final TwilioRestClient client, final Request reques
if (response == null) {
throw new ApiConnectionException("Assistant read failed: Unable to connect to server");
} else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) {
InputStream inputStream = response.getStream();
RestException restException = RestException.fromJson(
response.getStream(),
inputStream,
client.getObjectMapper()
);

Expand Down
Loading