public class PhoneNumber extends ResourceBase
client, id, properties
dateFormat
Constructor and Description |
---|
PhoneNumber(BandwidthClient client,
org.json.simple.JSONObject jsonObject) |
Modifier and Type | Method and Description |
---|---|
void |
commit()
Makes changes to a number you have.
|
static PhoneNumber |
create(BandwidthClient client,
Map<String,Object> params)
Factory method to allocate a phone number given a set of params.
|
static PhoneNumber |
create(Map<String,Object> params)
Factory method to allocate a phone number given a set of params.
|
void |
delete()
Removes a number from your account so you can no longer make or receive calls,
or send or receive messages with it.
|
static PhoneNumber |
get(BandwidthClient client,
String phoneNumberId)
Factory method for PhoneNumber.
|
static PhoneNumber |
get(String phoneNumberId)
Factory method for PhoneNumber.
|
String |
getApplication() |
String |
getCity() |
Date |
getCreatedTime() |
String |
getFallbackNumber() |
String |
getName() |
String |
getNationalNumber() |
String |
getNumber() |
String |
getNumberState() |
Double |
getPrice() |
String |
getState() |
String |
getUri() |
static ResourceList<PhoneNumber> |
list()
Factory method for PhoneNumber list, returns list of PhoneNumber objects with default page setting
|
static ResourceList<PhoneNumber> |
list(BandwidthClient client,
int page,
int size)
Factory method for PhoneNumber list, returns list of PhoneNumber objects with page, size preferences
|
static ResourceList<PhoneNumber> |
list(int page,
int size)
Factory method for PhoneNumber list, returns list of PhoneNumber objects with page, size preferences
|
void |
setApplicationId(String applicationId) |
void |
setFallbackNumber(String fallbackNumber) |
void |
setName(String name) |
protected void |
setUp(org.json.simple.JSONObject jsonObject) |
String |
toString() |
getClient, getId, getProperties, setId, toJSONArray, toJSONObject
getProperty, getPropertyAsBoolean, getPropertyAsDate, getPropertyAsDouble, getPropertyAsLong, getPropertyAsString, getPropertyAsStringArray, putProperty, toMap, updateProperties
public PhoneNumber(BandwidthClient client, org.json.simple.JSONObject jsonObject)
protected void setUp(org.json.simple.JSONObject jsonObject)
setUp
in class ResourceBase
public static PhoneNumber get(String phoneNumberId) throws Exception
phoneNumberId
- the phone number idIOException
- unexpected error.Exception
public static PhoneNumber get(BandwidthClient client, String phoneNumberId) throws Exception
client
- the clientphoneNumberId
- the phone number idIOException
- unexpected error.Exception
public static PhoneNumber create(Map<String,Object> params) throws Exception
params
- the paramsIOException
- unexpected error.Exception
public static PhoneNumber create(BandwidthClient client, Map<String,Object> params) throws Exception
client
- the clientparams
- the paramsIOException
- unexpected error.Exception
public static ResourceList<PhoneNumber> list() throws IOException
IOException
- unexpected error.public static ResourceList<PhoneNumber> list(int page, int size) throws IOException
page
- the current pagesize
- the page sizeIOException
- unexpected error.public static ResourceList<PhoneNumber> list(BandwidthClient client, int page, int size) throws IOException
client
- the clientpage
- the current pagesize
- the page sizeIOException
- unexpected error.public String getUri()
public void commit() throws Exception
IOException
- unexpected error.Exception
public void delete() throws IOException
IOException
- unexpected error.public String getApplication()
public String getNumber()
public String getNationalNumber()
public String getName()
public String getCity()
public String getState()
public String getNumberState()
public String getFallbackNumber()
public Double getPrice()
public Date getCreatedTime()
public void setApplicationId(String applicationId)
applicationId
- the application idpublic void setName(String name)
name
- the namepublic void setFallbackNumber(String fallbackNumber)
fallbackNumber
- the fallback numberCopyright © 2015. All Rights Reserved.