
com.plivo.api.models.account.SubaccountCreator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plivo-java Show documentation
Show all versions of plivo-java Show documentation
A Java SDK to make voice calls & send SMS using Plivo and to generate Plivo XML
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