Class SharedCostReader
- java.lang.Object
-
- com.twilio.base.Reader<SharedCost>
-
- com.twilio.rest.api.v2010.account.availablephonenumbercountry.SharedCostReader
-
public class SharedCostReader extends Reader<SharedCost>
-
-
Constructor Summary
Constructors Constructor Description SharedCostReader(String pathCountryCode)
Construct a new SharedCostReader.SharedCostReader(String pathAccountSid, String pathCountryCode)
Construct a new SharedCostReader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Page<SharedCost>
firstPage(TwilioRestClient client)
Make the request to the Twilio API to perform the read.Page<SharedCost>
getPage(String targetUrl, TwilioRestClient client)
Retrieve the target page from the Twilio API.Page<SharedCost>
nextPage(Page<SharedCost> page, TwilioRestClient client)
Retrieve the next page from the Twilio API.Page<SharedCost>
previousPage(Page<SharedCost> page, TwilioRestClient client)
Retrieve the previous page from the Twilio API.ResourceSet<SharedCost>
read(TwilioRestClient client)
Make the request to the Twilio API to perform the read.SharedCostReader
setAreaCode(Integer areaCode)
The area code of the phone numbers to read.SharedCostReader
setBeta(Boolean beta)
Whether to read phone numbers that are new to the Twilio platform.SharedCostReader
setContains(String contains)
The pattern on which to match phone numbers.SharedCostReader
setDistance(Integer distance)
The search radius, in miles, for a `near_` query.SharedCostReader
setExcludeAllAddressRequired(Boolean excludeAllAddressRequired)
Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/addresses).SharedCostReader
setExcludeForeignAddressRequired(Boolean excludeForeignAddressRequired)
Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/addresses).SharedCostReader
setExcludeLocalAddressRequired(Boolean excludeLocalAddressRequired)
Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/addresses).SharedCostReader
setFaxEnabled(Boolean faxEnabled)
Whether the phone numbers can receive faxes.SharedCostReader
setInLata(String inLata)
Limit results to a specific local access and transport area ([LATA](http://en.wikipedia.org/wiki/Local_access_and_transport_area)).SharedCostReader
setInLocality(String inLocality)
Limit results to a particular locality or city.SharedCostReader
setInPostalCode(String inPostalCode)
Limit results to a particular postal code.SharedCostReader
setInRateCenter(String inRateCenter)
Limit results to a specific rate center, or given a phone number search within the same rate center as that number.SharedCostReader
setInRegion(String inRegion)
Limit results to a particular region, state, or province.SharedCostReader
setMmsEnabled(Boolean mmsEnabled)
Whether the phone numbers can receive MMS messages.SharedCostReader
setNearLatLong(String nearLatLong)
Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles.SharedCostReader
setNearNumber(PhoneNumber nearNumber)
Given a phone number, find a geographically close number within `distance` miles.SharedCostReader
setNearNumber(String nearNumber)
Given a phone number, find a geographically close number within `distance` miles.SharedCostReader
setSmsEnabled(Boolean smsEnabled)
Whether the phone numbers can receive text messages.SharedCostReader
setVoiceEnabled(Boolean voiceEnabled)
Whether the phone numbers can receive calls.
-
-
-
Constructor Detail
-
SharedCostReader
public SharedCostReader(String pathCountryCode)
Construct a new SharedCostReader.- Parameters:
pathCountryCode
- The ISO Country code of the country from which to read phone numbers
-
SharedCostReader
public SharedCostReader(String pathAccountSid, String pathCountryCode)
Construct a new SharedCostReader.- Parameters:
pathAccountSid
- The SID of the Account requesting the AvailablePhoneNumber resourcespathCountryCode
- The ISO Country code of the country from which to read phone numbers
-
-
Method Detail
-
setAreaCode
public SharedCostReader setAreaCode(Integer areaCode)
The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada..- Parameters:
areaCode
- The area code of the phone numbers to read- Returns:
- this
-
setContains
public SharedCostReader setContains(String contains)
The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/api/rest/available-phone-numbers#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/api/rest/available-phone-numbers#local-get-basic-example-3). If specified, this value must have at least two characters..- Parameters:
contains
- The pattern on which to match phone numbers- Returns:
- this
-
setSmsEnabled
public SharedCostReader setSmsEnabled(Boolean smsEnabled)
Whether the phone numbers can receive text messages. Can be: `true` or `false`..- Parameters:
smsEnabled
- Whether the phone numbers can receive text messages- Returns:
- this
-
setMmsEnabled
public SharedCostReader setMmsEnabled(Boolean mmsEnabled)
Whether the phone numbers can receive MMS messages. Can be: `true` or `false`..- Parameters:
mmsEnabled
- Whether the phone numbers can receive MMS messages- Returns:
- this
-
setVoiceEnabled
public SharedCostReader setVoiceEnabled(Boolean voiceEnabled)
Whether the phone numbers can receive calls. Can be: `true` or `false`..- Parameters:
voiceEnabled
- Whether the phone numbers can receive calls.- Returns:
- this
-
setExcludeAllAddressRequired
public SharedCostReader setExcludeAllAddressRequired(Boolean excludeAllAddressRequired)
Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/addresses). Can be: `true` or `false` and the default is `false`..- Parameters:
excludeAllAddressRequired
- Whether to exclude phone numbers that require an Address- Returns:
- this
-
setExcludeLocalAddressRequired
public SharedCostReader setExcludeLocalAddressRequired(Boolean excludeLocalAddressRequired)
Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/addresses). Can be: `true` or `false` and the default is `false`..- Parameters:
excludeLocalAddressRequired
- Whether to exclude phone numbers that require a local address- Returns:
- this
-
setExcludeForeignAddressRequired
public SharedCostReader setExcludeForeignAddressRequired(Boolean excludeForeignAddressRequired)
Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/addresses). Can be: `true` or `false` and the default is `false`..- Parameters:
excludeForeignAddressRequired
- Whether to exclude phone numbers that require a foreign address- Returns:
- this
-
setBeta
public SharedCostReader setBeta(Boolean beta)
Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`..- Parameters:
beta
- Whether to read phone numbers new to the Twilio platform- Returns:
- this
-
setNearNumber
public SharedCostReader setNearNumber(PhoneNumber nearNumber)
Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada..- Parameters:
nearNumber
- Given a phone number, find a geographically close number within distance miles. (US/Canada only)- Returns:
- this
-
setNearNumber
public SharedCostReader setNearNumber(String nearNumber)
Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada..- Parameters:
nearNumber
- Given a phone number, find a geographically close number within distance miles. (US/Canada only)- Returns:
- this
-
setNearLatLong
public SharedCostReader setNearLatLong(String nearLatLong)
Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada..- Parameters:
nearLatLong
- Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)- Returns:
- this
-
setDistance
public SharedCostReader setDistance(Integer distance)
The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada..- Parameters:
distance
- The search radius, in miles, for a near_ query. (US/Canada only)- Returns:
- this
-
setInPostalCode
public SharedCostReader setInPostalCode(String inPostalCode)
Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada..- Parameters:
inPostalCode
- Limit results to a particular postal code. (US/Canada only)- Returns:
- this
-
setInRegion
public SharedCostReader setInRegion(String inRegion)
Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada..- Parameters:
inRegion
- Limit results to a particular region. (US/Canada only)- Returns:
- this
-
setInRateCenter
public SharedCostReader setInRateCenter(String inRateCenter)
Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada..- Parameters:
inRateCenter
- Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)- Returns:
- this
-
setInLata
public SharedCostReader setInLata(String inLata)
Limit results to a specific local access and transport area ([LATA](http://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](http://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada..- Parameters:
inLata
- Limit results to a specific local access and transport area. (US/Canada only)- Returns:
- this
-
setInLocality
public SharedCostReader setInLocality(String inLocality)
Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number..- Parameters:
inLocality
- Limit results to a particular locality- Returns:
- this
-
setFaxEnabled
public SharedCostReader setFaxEnabled(Boolean faxEnabled)
Whether the phone numbers can receive faxes. Can be: `true` or `false`..- Parameters:
faxEnabled
- Whether the phone numbers can receive faxes- Returns:
- this
-
read
public ResourceSet<SharedCost> read(TwilioRestClient client)
Make the request to the Twilio API to perform the read.- Specified by:
read
in classReader<SharedCost>
- Parameters:
client
- TwilioRestClient with which to make the request- Returns:
- SharedCost ResourceSet
-
firstPage
public Page<SharedCost> firstPage(TwilioRestClient client)
Make the request to the Twilio API to perform the read.- Specified by:
firstPage
in classReader<SharedCost>
- Parameters:
client
- TwilioRestClient with which to make the request- Returns:
- SharedCost ResourceSet
-
getPage
public Page<SharedCost> getPage(String targetUrl, TwilioRestClient client)
Retrieve the target page from the Twilio API.- Specified by:
getPage
in classReader<SharedCost>
- Parameters:
targetUrl
- API-generated URL for the requested results pageclient
- TwilioRestClient with which to make the request- Returns:
- SharedCost ResourceSet
-
nextPage
public Page<SharedCost> nextPage(Page<SharedCost> page, TwilioRestClient client)
Retrieve the next page from the Twilio API.- Specified by:
nextPage
in classReader<SharedCost>
- Parameters:
page
- current pageclient
- TwilioRestClient with which to make the request- Returns:
- Next Page
-
previousPage
public Page<SharedCost> previousPage(Page<SharedCost> page, TwilioRestClient client)
Retrieve the previous page from the Twilio API.- Specified by:
previousPage
in classReader<SharedCost>
- Parameters:
page
- current pageclient
- TwilioRestClient with which to make the request- Returns:
- Previous Page
-
-