Class WorkerChannelUpdater

    • Constructor Detail

      • WorkerChannelUpdater

        public WorkerChannelUpdater​(String pathWorkspaceSid,
                                    String pathWorkerSid,
                                    String pathSid)
        Construct a new WorkerChannelUpdater.
        Parameters:
        pathWorkspaceSid - The workspace_sid
        pathWorkerSid - The worker_sid
        pathSid - The sid
    • Method Detail

      • setCapacity

        public WorkerChannelUpdater setCapacity​(Integer capacity)
        The total number of Tasks worker should handle for this TaskChannel type. TaskRouter will only create reservations for Tasks of this TaskChannel type up to the capacity configured. If the capacity is 0, no new reservations will be created.
        Parameters:
        capacity - The total number of Tasks worker should handle for this TaskChannel type.
        Returns:
        this
      • setAvailable

        public WorkerChannelUpdater setAvailable​(Boolean available)
        Toggle the availability of the WorkerChannel. Set this to 'False' to make worker unavailable to receive any new Tasks of this TaskChannel type..
        Parameters:
        available - Toggle the availability of the WorkerChannel.
        Returns:
        this
      • update

        public WorkerChannel update​(TwilioRestClient client)
        Make the request to the Twilio API to perform the update.
        Specified by:
        update in class Updater<WorkerChannel>
        Parameters:
        client - TwilioRestClient with which to make the request
        Returns:
        Updated WorkerChannel