Skip to content

Commit

Permalink
Revert "feat: Support for token based authentication and no auth rest…
Browse files Browse the repository at this point in the history
… calls (#587)"

This reverts commit b9184c5.
  • Loading branch information
AsabuHere committed Jun 25, 2024
1 parent b9184c5 commit 679a2c5
Show file tree
Hide file tree
Showing 36 changed files with 179 additions and 1,678 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package com.twilio.rest.api.v2010;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.twilio.base.Creator;
import com.twilio.constant.EnumConstants;
import com.twilio.converter.Promoter;
import com.twilio.exception.ApiConnectionException;
Expand All @@ -23,7 +24,9 @@
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;
import java.math.BigDecimal;
import java.util.List;
Expand All @@ -49,10 +52,6 @@

import java.net.URI;

import com.twilio.base.Creator;
import com.twilio.http.Request;
import com.twilio.http.TwilioRestClient;

public class AccountCreator extends Creator<Account>{
private Account.XTwilioWebhookEnabled xTwilioWebhookEnabled;
private URI recordingStatusCallback;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package com.twilio.rest.api.v2010;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.twilio.base.Deleter;
import com.twilio.converter.Promoter;
import com.twilio.constant.EnumConstants;
import com.twilio.exception.ApiConnectionException;
Expand All @@ -23,7 +24,9 @@
import com.twilio.converter.Converter;
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;
import java.time.LocalDate;
import java.io.IOException;
Expand All @@ -42,10 +45,6 @@

import lombok.ToString;

import com.twilio.base.Deleter;
import com.twilio.http.Request;
import com.twilio.http.TwilioRestClient;

public class AccountDeleter extends Deleter<Account> {
private String pathSid;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package com.twilio.rest.api.v2010;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.twilio.base.Fetcher;
import com.twilio.constant.EnumConstants;
import com.twilio.converter.Promoter;
import com.twilio.exception.ApiConnectionException;
Expand All @@ -23,7 +24,9 @@
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;

import java.io.IOException;
Expand All @@ -43,10 +46,6 @@

import lombok.ToString;

import com.twilio.base.Fetcher;
import com.twilio.http.Request;
import com.twilio.http.TwilioRestClient;

public class AccountFetcher extends Fetcher<Account> {
private String pathSid;

Expand All @@ -72,7 +71,7 @@ public Account fetch(final TwilioRestClient client) {
Response response = client.request(request);

if (response == null) {
throw new ApiConnectionException("Account fetch failed: Unable to connect to server");
throw new ApiConnectionException("Account 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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,21 @@
package com.twilio.rest.api.v2010;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.twilio.base.Reader;
import com.twilio.constant.EnumConstants;
import com.twilio.base.ResourceSet;
import com.twilio.converter.Promoter;
import com.twilio.exception.ApiConnectionException;
import com.twilio.converter.PrefixedCollapsibleMap;
import com.twilio.converter.Converter;
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;
import com.twilio.base.Page;
import java.time.LocalDate;
import java.time.ZonedDateTime;
import java.io.IOException;
Expand All @@ -42,12 +47,6 @@

import lombok.ToString;

import com.twilio.base.Page;
import com.twilio.base.Reader;
import com.twilio.base.ResourceSet;
import com.twilio.http.Request;
import com.twilio.http.TwilioRestClient;

public class AccountReader extends Reader<Account> {
private ZonedDateTime dateCreated;
private LocalDate dateTest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package com.twilio.rest.api.v2010;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.twilio.base.Updater;
import com.twilio.constant.EnumConstants;
import com.twilio.converter.Promoter;
import com.twilio.exception.ApiConnectionException;
Expand All @@ -23,7 +24,9 @@
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;
import java.time.format.DateTimeFormatter;
import com.twilio.converter.DateConverter;
Expand All @@ -43,11 +46,6 @@

import lombok.ToString;

import com.twilio.base.Updater;
import com.twilio.http.Request;
import com.twilio.http.TwilioRestClient;


public class AccountUpdater extends Updater<Account>{
private Account.Status status;
private String pathSid;
Expand Down Expand Up @@ -98,7 +96,6 @@ public Account update(final TwilioRestClient client){

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

private void addPostParams(final Request request) {
if (pauseBehavior != null) {
request.addPostParam("PauseBehavior", pauseBehavior);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package com.twilio.rest.api.v2010.account;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.twilio.base.Creator;
import com.twilio.constant.EnumConstants;
import com.twilio.converter.Promoter;
import com.twilio.exception.ApiConnectionException;
Expand All @@ -23,7 +24,9 @@
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;
import java.math.BigDecimal;
import java.util.List;
Expand All @@ -49,10 +52,6 @@

import java.net.URI;

import com.twilio.base.Creator;
import com.twilio.http.Request;
import com.twilio.http.TwilioRestClient;

public class CallCreator extends Creator<Call>{
private String requiredStringProperty;
private HttpMethod testMethod;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package com.twilio.rest.api.v2010.account;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.twilio.base.Deleter;
import com.twilio.converter.Promoter;
import com.twilio.constant.EnumConstants;
import com.twilio.exception.ApiConnectionException;
Expand All @@ -23,7 +24,9 @@
import com.twilio.converter.Converter;
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;
import java.time.LocalDate;
import java.io.IOException;
Expand All @@ -42,10 +45,6 @@

import lombok.ToString;

import com.twilio.base.Deleter;
import com.twilio.http.Request;
import com.twilio.http.TwilioRestClient;

public class CallDeleter extends Deleter<Call> {
private Integer pathTestInteger;
private String pathAccountSid;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package com.twilio.rest.api.v2010.account;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.twilio.base.Fetcher;
import com.twilio.constant.EnumConstants;
import com.twilio.converter.Promoter;
import com.twilio.exception.ApiConnectionException;
Expand All @@ -23,7 +24,9 @@
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;

import java.io.IOException;
Expand All @@ -43,10 +46,6 @@

import lombok.ToString;

import com.twilio.base.Fetcher;
import com.twilio.http.Request;
import com.twilio.http.TwilioRestClient;

public class CallFetcher extends Fetcher<Call> {
private Integer pathTestInteger;
private String pathAccountSid;
Expand Down Expand Up @@ -76,7 +75,7 @@ public Call fetch(final TwilioRestClient client) {
Response response = client.request(request);

if (response == null) {
throw new ApiConnectionException("Call fetch failed: Unable to connect to server");
throw new ApiConnectionException("Call 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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package com.twilio.rest.api.v2010.account.call;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.twilio.base.Updater;
import com.twilio.constant.EnumConstants;
import com.twilio.converter.Promoter;
import com.twilio.exception.ApiConnectionException;
Expand All @@ -23,7 +24,9 @@
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;
import java.time.format.DateTimeFormatter;
import com.twilio.converter.DateConverter;
Expand All @@ -43,11 +46,6 @@

import lombok.ToString;

import com.twilio.base.Updater;
import com.twilio.http.Request;
import com.twilio.http.TwilioRestClient;


public class FeedbackCallSummaryUpdater extends Updater<FeedbackCallSummary>{
private String pathSid;
private LocalDate endDate;
Expand Down Expand Up @@ -110,7 +108,6 @@ public FeedbackCallSummary update(final TwilioRestClient client){

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

private void addPostParams(final Request request) {
if (accountSid != null) {
request.addPostParam("AccountSid", accountSid);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
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.converter.Promoter;
import com.twilio.exception.ApiConnectionException;
Expand All @@ -23,7 +24,9 @@
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;
import java.time.format.DateTimeFormatter;
import com.twilio.converter.DateConverter;
Expand All @@ -43,11 +46,6 @@

import lombok.ToString;

import com.twilio.base.Updater;
import com.twilio.http.Request;
import com.twilio.http.TwilioRestClient;


public class CallUpdater extends Updater<Call>{
private String pathSid;

Expand Down Expand Up @@ -80,5 +78,4 @@ public Call update(final TwilioRestClient client){

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

}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package com.twilio.rest.flexapi.v1.credential;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.twilio.base.Deleter;
import com.twilio.converter.Promoter;
import com.twilio.constant.EnumConstants;
import com.twilio.exception.ApiConnectionException;
Expand All @@ -23,7 +24,9 @@
import com.twilio.converter.Converter;
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;
import java.time.LocalDate;
import java.io.IOException;
Expand All @@ -42,10 +45,6 @@

import lombok.ToString;

import com.twilio.base.Deleter;
import com.twilio.http.Request;
import com.twilio.http.TwilioRestClient;

public class AwsDeleter extends Deleter<Aws> {
private String pathSid;

Expand Down
Loading

0 comments on commit 679a2c5

Please sign in to comment.