All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.twilio.sdk.resource.list.taskrouter.ReservationList Maven / Gradle / Ivy

There is a newer version: 7.0.0-rc-10
Show newest version
package com.twilio.sdk.resource.list.taskrouter;

import com.twilio.sdk.TwilioTaskRouterClient;
import com.twilio.sdk.resource.NextGenListResource;
import com.twilio.sdk.resource.instance.taskrouter.Reservation;

import java.util.Map;

/**
 * ReservationList to work with {@link com.twilio.sdk.resource.instance.taskrouter.Reservation}.
 */
public class ReservationList extends NextGenListResource {

	private String taskSid;

	private String workspaceSid;

	/**
	 * Instantiates a reservation list.
	 *
	 * @param client the client
	 * @param workspaceSid the workspace sid
	 * @param taskSid the task sid
	 */
	public ReservationList(final TwilioTaskRouterClient client, final String workspaceSid, final String taskSid) {
		super(client);
		this.workspaceSid = workspaceSid;
		this.taskSid = taskSid;
	}

	/**
	 * Instantiates a reservation list.
	 *
	 * @param client the client
	 * @param workspaceSid the workspace sid
	 * @param taskSid the task sid
	 */
	public ReservationList(final TwilioTaskRouterClient client, final String workspaceSid, final String taskSid,
	                       final Map filters) {
		super(client, filters);
		this.workspaceSid = workspaceSid;
		this.taskSid = taskSid;
	}

	@Override
	protected Reservation makeNew(final TwilioTaskRouterClient client, final Map params) {
		return new Reservation(client, params);
	}

	@Override
	protected String getResourceLocation() {
		return "/" + TwilioTaskRouterClient.DEFAULT_VERSION + "/Workspaces/" + workspaceSid + "/Tasks/" + taskSid +
		       "/Reservations";
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy