Package com.twilio.sdk

Examples of com.twilio.sdk.TwilioRestResponse.toMap()


  @Override
  public UsageTrigger create(Map<String, String> params) throws TwilioRestException {
    TwilioRestResponse response = this.getClient().safeRequest(
        this.getResourceLocation(), "POST", params);
    return makeNew(this.getClient(), (Map<String, Object>) response.toMap().get("UsageTrigger"));
  }

  @Override
  public UsageTrigger create(List<NameValuePair> params) throws TwilioRestException {
    TwilioRestResponse response = this.getClient().safeRequest(
View Full Code Here


  @Override
  public UsageTrigger create(List<NameValuePair> params) throws TwilioRestException {
    TwilioRestResponse response = this.getClient().safeRequest(
        this.getResourceLocation(), "POST", params);
    return makeNew(this.getClient(), (Map<String, Object>) response.toMap().get("UsageTrigger"));
  }
}
View Full Code Here

   * @see com.twilio.sdk.resource.factory.AccountFactory#create(java.util.Map)
   */
  public Account create(Map<String, String> params) throws TwilioRestException {
    TwilioRestResponse response = this.getClient().safeRequest(
        this.getResourceLocation(), "POST", params);
    return makeNew(this.getClient(), response.toMap());
  }

  /* (non-Javadoc)
   * @see com.twilio.sdk.resource.factory.AccountFactory#create(java.util.Map)
   */
 
View Full Code Here

   * @see com.twilio.sdk.resource.factory.AccountFactory#create(java.util.Map)
   */
  public Account create(List<NameValuePair> params) throws TwilioRestException {
    TwilioRestResponse response = this.getClient().safeRequest(
        this.getResourceLocation(), "POST", params);
    return makeNew(this.getClient(), response.toMap());
  }
}
View Full Code Here

   * @see com.twilio.sdk.resource.factory.IpAccessControlListFactory#create(java.util.Map)
   */
  public IpAccessControlList create(Map<String, String> params) throws TwilioRestException {
    TwilioRestResponse response = this.getClient().safeRequest(
        this.getResourceLocation(), "POST", params);
    return makeNew(this.getClient(), response.toMap());
  }

  /* (non-Javadoc)
   * @see com.twilio.sdk.resource.factory.IpAccessControlListFactory#create(java.util.List)
   */
 
View Full Code Here

   * @see com.twilio.sdk.resource.factory.IpAccessControlListFactory#create(java.util.List)
   */
  public IpAccessControlList create(List<NameValuePair> params) throws TwilioRestException {
    TwilioRestResponse response = this.getClient().safeRequest(
        this.getResourceLocation(), "POST", params);
    return makeNew(this.getClient(), response.toMap());
  }

}
View Full Code Here

        vars.put(URL, url);
        vars.put(METHOD, method);
        TwilioRestResponse response = this.getClient().safeRequest(
                this.getResourceLocation(), "POST", vars);

        final Member member = new Member(this.getClient(), response.toMap(), getQueueSid());
        member.setRequestAccountSid(this.getRequestAccountSid());
        return member;
    }
}
View Full Code Here

    vars.put("Muted", "true");

    TwilioRestResponse response = this.getClient().safeRequest(
        this.getResourceLocation(), "POST", vars);

    return new Participant(this.getClient(), response.toMap());
  }

  /**
   * Unmute.
   *
 
View Full Code Here

    vars.put("Muted", "false");

    TwilioRestResponse response = this.getClient().safeRequest(
        this.getResourceLocation(), "POST", vars);

    return new Participant(this.getClient(), response.toMap());
  }



  /**
 
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    public Feedback create(List<NameValuePair> params) throws TwilioRestException {
        TwilioRestResponse response = this.client.safeRequest(this.parentLocation + "/Feedback.json", "POST", params);
        return new Feedback(this.client, response.toMap(), this.parentLocation);
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.