Class: MobileList

Twilio.Api.V2010.AccountContext.AvailablePhoneNumberCountryContext.MobileList(version, accountSid, countryCode)

new MobileList(version, accountSid, countryCode)

Initialize the MobileList
Parameters:
Name Type Description
version Twilio.Api.V2010 Version of the resource
accountSid string The account_sid
countryCode string The ISO-3166-1 country code of the country.
Source:

Methods

each(optsopt, callbackopt)

Streams MobileInstance records from the API. This operation lazily loads records as efficiently as possible until the limit is reached. The results are passed into the callback function, so this operation is memory efficient. If a function is passed as the first argument, it will be used as the callback function.
Parameters:
Name Type Attributes Description
opts object <optional>
Options for request
Properties
Name Type Attributes Description
areaCode number <optional>
The area code of the phone numbers to read
contains string <optional>
The pattern on which to match phone numbers
smsEnabled boolean <optional>
Whether the phone numbers can receive text messages
mmsEnabled boolean <optional>
Whether the phone numbers can receive MMS messages
voiceEnabled boolean <optional>
Whether the phone numbers can receive calls.
excludeAllAddressRequired boolean <optional>
Whether to exclude phone numbers that require an Address
excludeLocalAddressRequired boolean <optional>
Whether to exclude phone numbers that require a local address
excludeForeignAddressRequired boolean <optional>
Whether to exclude phone numbers that require a foreign address
beta boolean <optional>
Whether to read phone numbers new to the Twilio platform
nearNumber string <optional>
Given a phone number, find a geographically close number within distance miles. (US/Canada only)
nearLatLong string <optional>
Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)
distance number <optional>
The search radius, in miles, for a near_ query. (US/Canada only)
inPostalCode string <optional>
Limit results to a particular postal code. (US/Canada only)
inRegion string <optional>
Limit results to a particular region. (US/Canada only)
inRateCenter string <optional>
Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)
inLata string <optional>
Limit results to a specific local access and transport area. (US/Canada only)
inLocality string <optional>
Limit results to a particular locality
faxEnabled boolean <optional>
Whether the phone numbers can receive faxes
limit number <optional>
Upper limit for the number of records to return. each() guarantees never to return more than limit. Default is no limit
pageSize number <optional>
Number of records to fetch per request, when not set will use the default value of 50 records. If no pageSize is defined but a limit is defined, each() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
callback function <optional>
Function to process each record. If this and a positional callback are passed, this one will be used
done function <optional>
Function to be called upon completion of streaming
callback function <optional>
Function to process each record
Source:

getPage(targetUrlopt, callbackopt) → {Promise}

Retrieve a single target page of MobileInstance records from the API. The request is executed immediately. If a function is passed as the first argument, it will be used as the callback function.
Parameters:
Name Type Attributes Description
targetUrl string <optional>
API-generated URL for the requested results page
callback function <optional>
Callback to handle list of records
Source:
Returns:
Resolves to a list of records
Type
Promise

list(optsopt, callbackopt) → {Promise}

Lists MobileInstance records from the API as a list. If a function is passed as the first argument, it will be used as the callback function.
Parameters:
Name Type Attributes Description
opts object <optional>
Options for request
Properties
Name Type Attributes Description
areaCode number <optional>
The area code of the phone numbers to read
contains string <optional>
The pattern on which to match phone numbers
smsEnabled boolean <optional>
Whether the phone numbers can receive text messages
mmsEnabled boolean <optional>
Whether the phone numbers can receive MMS messages
voiceEnabled boolean <optional>
Whether the phone numbers can receive calls.
excludeAllAddressRequired boolean <optional>
Whether to exclude phone numbers that require an Address
excludeLocalAddressRequired boolean <optional>
Whether to exclude phone numbers that require a local address
excludeForeignAddressRequired boolean <optional>
Whether to exclude phone numbers that require a foreign address
beta boolean <optional>
Whether to read phone numbers new to the Twilio platform
nearNumber string <optional>
Given a phone number, find a geographically close number within distance miles. (US/Canada only)
nearLatLong string <optional>
Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)
distance number <optional>
The search radius, in miles, for a near_ query. (US/Canada only)
inPostalCode string <optional>
Limit results to a particular postal code. (US/Canada only)
inRegion string <optional>
Limit results to a particular region. (US/Canada only)
inRateCenter string <optional>
Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)
inLata string <optional>
Limit results to a specific local access and transport area. (US/Canada only)
inLocality string <optional>
Limit results to a particular locality
faxEnabled boolean <optional>
Whether the phone numbers can receive faxes
limit number <optional>
Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit
pageSize number <optional>
Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, list() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
callback function <optional>
Callback to handle list of records
Source:
Returns:
Resolves to a list of records
Type
Promise

page(optsopt, callbackopt) → {Promise}

Retrieve a single page of MobileInstance records from the API. The request is executed immediately. If a function is passed as the first argument, it will be used as the callback function.
Parameters:
Name Type Attributes Description
opts object <optional>
Options for request
Properties
Name Type Attributes Description
areaCode number <optional>
The area code of the phone numbers to read
contains string <optional>
The pattern on which to match phone numbers
smsEnabled boolean <optional>
Whether the phone numbers can receive text messages
mmsEnabled boolean <optional>
Whether the phone numbers can receive MMS messages
voiceEnabled boolean <optional>
Whether the phone numbers can receive calls.
excludeAllAddressRequired boolean <optional>
Whether to exclude phone numbers that require an Address
excludeLocalAddressRequired boolean <optional>
Whether to exclude phone numbers that require a local address
excludeForeignAddressRequired boolean <optional>
Whether to exclude phone numbers that require a foreign address
beta boolean <optional>
Whether to read phone numbers new to the Twilio platform
nearNumber string <optional>
Given a phone number, find a geographically close number within distance miles. (US/Canada only)
nearLatLong string <optional>
Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)
distance number <optional>
The search radius, in miles, for a near_ query. (US/Canada only)
inPostalCode string <optional>
Limit results to a particular postal code. (US/Canada only)
inRegion string <optional>
Limit results to a particular region. (US/Canada only)
inRateCenter string <optional>
Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)
inLata string <optional>
Limit results to a specific local access and transport area. (US/Canada only)
inLocality string <optional>
Limit results to a particular locality
faxEnabled boolean <optional>
Whether the phone numbers can receive faxes
pageToken string <optional>
PageToken provided by the API
pageNumber number <optional>
Page Number, this value is simply for client state
pageSize number <optional>
Number of records to return, defaults to 50
callback function <optional>
Callback to handle list of records
Source:
Returns:
Resolves to a list of records
Type
Promise

toJSON()

Provide a user-friendly representation
Source:
Returns:
Object