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

com.plivo.api.models.account.SubaccountCreator Maven / Gradle / Ivy

Go to download

A Java SDK to make voice calls & send SMS using Plivo and to generate Plivo XML

There is a newer version: 5.46.0
Show newest version
package com.plivo.api.models.account;

import com.plivo.api.models.base.Creator;
import com.plivo.api.util.Utils;
import retrofit2.Call;

public class SubaccountCreator extends Creator {

  private final String name;
  private Boolean enabled;

  /**
   * @param name Name of the subaccount.
   */
  SubaccountCreator(String name) {
    if (!Utils.allNotNull(name)) {
      throw new IllegalArgumentException("name must not be null");
    }

    this.name = name;
  }

  /**
   * @return Name of the subaccount.
   */
  public String name() {
    return name;
  }

  /**
   * @return Specify if the subaccount should be enabled or not. Takes a value of True or False.
   * Defaults to False
   */
  public Boolean enabled() {
    return this.enabled;
  }

  /**
   * @param enabled Specify if the subaccount should be enabled or not. Takes a value of True or
   * False. Defaults to False
   */
  public SubaccountCreator enabled(final Boolean enabled) {
    this.enabled = enabled;
    return this;
  }

  @Override
  protected Call obtainCall() {
    return client().getApiService().subaccountCreate(client().getAuthId(), this);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy