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

com.ringcentral.paths.restapi.account.extension.unifiedpresence.Index Maven / Gradle / Ivy

There is a newer version: 3.2.1
Show newest version
package com.ringcentral.paths.restapi.account.extension.unifiedpresence;

import com.ringcentral.RestClient;
import com.ringcentral.definitions.UnifiedPresence;
import com.ringcentral.definitions.UpdateUnifiedPresence;

public class Index {
    public RestClient rc;
    public com.ringcentral.paths.restapi.account.extension.Index parent;

    public Index(com.ringcentral.paths.restapi.account.extension.Index parent) {
        this.parent = parent;
        this.rc = parent.rc;
    }

    public String path() {
        return parent.path() + "/unified-presence";
    }

    public String path(Boolean withParameter) {
        return path();
    }

    /**
     * Returns the unified presence status of the requested user(s). The set of parameters returned by this method differs whether you return the requester's presence or any other user presence.
     * HTTP Method: get
     * Endpoint: /restapi/{apiVersion}/account/{accountId}/extension/{extensionId}/unified-presence
     * Rate Limit Group: Medium
     * App Permission: ReadPresence
     * User Permission: ReadPresenceStatus
     */
    public UnifiedPresence get() throws com.ringcentral.RestException, java.io.IOException {
        okhttp3.ResponseBody rb = this.rc.get(this.path(), null);
        return com.ringcentral.Utils.gson.fromJson(rb.string(), UnifiedPresence.class);
    }

    /**
     * Updates the unified presence for the current user specified in path.
     * HTTP Method: patch
     * Endpoint: /restapi/{apiVersion}/account/{accountId}/extension/{extensionId}/unified-presence
     * Rate Limit Group: Medium
     * App Permission: EditPresence
     * User Permission: EditPresenceStatus
     */
    public UnifiedPresence patch(UpdateUnifiedPresence updateUnifiedPresence) throws com.ringcentral.RestException, java.io.IOException {
        okhttp3.ResponseBody rb = this.rc.patch(this.path(), updateUnifiedPresence, null);
        return com.ringcentral.Utils.gson.fromJson(rb.string(), UnifiedPresence.class);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy