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,
java.util.Map<java.lang.String,java.lang.Object> params)
Factory method to allocate a phone number given a set of params.
|
static PhoneNumber |
create(java.util.Map<java.lang.String,java.lang.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,
java.lang.String phoneNumberId)
Factory method for PhoneNumber.
|
static PhoneNumber |
get(java.lang.String phoneNumberId)
Factory method for PhoneNumber.
|
java.lang.String |
getApplication() |
java.lang.String |
getCity() |
java.util.Date |
getCreatedTime() |
java.lang.String |
getFallbackNumber() |
java.lang.String |
getName() |
java.lang.String |
getNationalNumber() |
java.lang.String |
getNumber() |
java.lang.String |
getNumberState() |
java.lang.Double |
getPrice() |
java.lang.String |
getState() |
java.lang.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(java.lang.String applicationId) |
void |
setFallbackNumber(java.lang.String fallbackNumber) |
void |
setName(java.lang.String name) |
protected void |
setUp(org.json.simple.JSONObject jsonObject) |
java.lang.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(java.lang.String phoneNumberId) throws java.lang.Exception
phoneNumberId
- the phone number idjava.io.IOException
- unexpected error.java.lang.Exception
public static PhoneNumber get(BandwidthClient client, java.lang.String phoneNumberId) throws java.lang.Exception
client
- the clientphoneNumberId
- the phone number idjava.io.IOException
- unexpected error.java.lang.Exception
public static PhoneNumber create(java.util.Map<java.lang.String,java.lang.Object> params) throws java.lang.Exception
params
- the paramsjava.io.IOException
- unexpected error.java.lang.Exception
public static PhoneNumber create(BandwidthClient client, java.util.Map<java.lang.String,java.lang.Object> params) throws java.lang.Exception
client
- the clientparams
- the paramsjava.io.IOException
- unexpected error.java.lang.Exception
public static ResourceList<PhoneNumber> list() throws java.io.IOException
java.io.IOException
- unexpected error.public static ResourceList<PhoneNumber> list(int page, int size) throws java.io.IOException
page
- the current pagesize
- the page sizejava.io.IOException
- unexpected error.public static ResourceList<PhoneNumber> list(BandwidthClient client, int page, int size) throws java.io.IOException
client
- the clientpage
- the current pagesize
- the page sizejava.io.IOException
- unexpected error.public java.lang.String getUri()
public void commit() throws java.lang.Exception
java.io.IOException
- unexpected error.java.lang.Exception
public void delete() throws java.io.IOException, AppPlatformException
java.io.IOException
- unexpected error.AppPlatformException
- unexpected exception.public java.lang.String getApplication()
public java.lang.String getNumber()
public java.lang.String getNationalNumber()
public java.lang.String getName()
public java.lang.String getCity()
public java.lang.String getState()
public java.lang.String getNumberState()
public java.lang.String getFallbackNumber()
public java.lang.Double getPrice()
public java.util.Date getCreatedTime()
public void setApplicationId(java.lang.String applicationId)
applicationId
- the application idpublic void setName(java.lang.String name)
name
- the namepublic void setFallbackNumber(java.lang.String fallbackNumber)
fallbackNumber
- the fallback numberpublic java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2019. All Rights Reserved.