Get sub account from plivo - Java Message

Java examples for Message:Plivo

Description

Get sub account from plivo

Demo Code


import java.util.LinkedHashMap;

import com.plivo.sdk.client.RestAPI;
import com.plivo.sdk.exception.PlivoException;
import com.plivo.sdk.response.account.Account;
import com.plivo.sdk.response.account.SubAccount;
import com.plivo.sdk.response.response.GenericResponse;
import com.plivo.sdk.xml.elements.Response;
public class DetailsOfSubAccount {


  public static void main(String[] args) {
    SubAccount response = null;/*from   w w  w  . j a va2s  .c  o m*/
    RestAPI restApi = new RestAPI("<AUTH_ID>", "<AUTH_TOKEN>", "v1");
    LinkedHashMap<String,String> parmas = new LinkedHashMap<String,String>();
    parmas.put("subauth_id", "subauth_id");
    try
    {
      response = restApi.getSubaccount(parmas);
      System.out.println("subaccount limit: " + response.limit);
    }
    catch (PlivoException e) {
    e.printStackTrace();
    
    }
  }

}

Related Tutorials