![JAR search and dependency download from the Maven repository](/logo.png)
com.twilio.sdk.resource.list.ipmessaging.ServiceList Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of twilio-java-sdk Show documentation
Show all versions of twilio-java-sdk Show documentation
Java helper library for Twilio services
package com.twilio.sdk.resource.list.ipmessaging;
import com.twilio.sdk.TwilioIPMessagingClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.TwilioRestResponse;
import com.twilio.sdk.resource.NextGenListResource;
import com.twilio.sdk.resource.factory.ResourceFactory;
import com.twilio.sdk.resource.instance.ipmessaging.Channel;
import com.twilio.sdk.resource.instance.ipmessaging.Service;
import org.apache.http.NameValuePair;
import java.util.List;
import java.util.Map;
/**
* Represents service endpoint for ip messaging
*/
public class ServiceList extends NextGenListResource
implements ResourceFactory {
public ServiceList(TwilioIPMessagingClient client, Map filters) {
super(client, filters);
}
public ServiceList(TwilioIPMessagingClient client) {
super(client);
}
@Override
public Service create(Map params) throws TwilioRestException {
TwilioRestResponse response = this.getClient().safeRequest(this.getResourceLocation(), "POST", params);
return makeNew(this.getClient(), response.toMap());
}
@Override
public Service create(List params) throws TwilioRestException {
TwilioRestResponse response = this.getClient().safeRequest(this.getResourceLocation(), "POST", params);
return makeNew(this.getClient(), response.toMap());
}
@Override
protected Service makeNew(final TwilioIPMessagingClient client, final Map params) {
return new Service(client, params);
}
@Override
protected String getResourceLocation() {
return "/" + TwilioIPMessagingClient.DEFAULT_VERSION + "/Services";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy