Twilio. AvailablePhoneNumbers. MachineToMachine
(twilio v0.2.0)
Copy Markdown
API calls: list.
Summary
Functions
GET /2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/MachineToMachine.json
Like list/3, but returns the result or raises Infusion.Runtime.Error.
Like list/3, but returns every item, from every page: a lazy stream of Twilio.Schemas.AvailablePhoneNumberMachineToMachine.t() that fetches pages as it is read.
Like list_all/3, but returns the stream or raises Infusion.Runtime.Error.
Functions
@spec list(String.t(), map() | keyword(), keyword()) :: {:ok, Twilio.Schemas.AvailablePhoneNumbersMachineToMachineListResponse.t()} | {:error, Infusion.Runtime.Error.t()}
GET /2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/MachineToMachine.json
Path parameters
country_code(required) - The ISO-3166-1 country code of the country from which to read phone numbers.
{AccountSid} in the path is the :account_sid setting; pass account_sid: "..." as an option to use another.
Parameters
area_code- The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada.contains- Matching pattern to identify phone numbers. This pattern can be between 2 and 16 characters long and allows all digits (0-9) and all non-diacritic latin alphabet letters (a-z, A-Z). It accepts four meta-characters:*,%,+,$. The*and%meta-characters can appear multiple times in the pattern. To match wildcards at the beginning or end of the pattern, use*to match any single character or%to match a sequence of characters. If you use the wildcard patterns, it must include at least two non-meta-characters, and wildcards cannot be used between non-meta-characters. To match the beginning of a pattern, start the pattern with+. To match the end of the pattern, append the pattern with$. These meta-characters can't be adjacent to each other.sms_enabled- Whether the phone numbers can receive text messages. Can be:trueorfalse.mms_enabled- Whether the phone numbers can receive MMS messages. Can be:trueorfalse.voice_enabled- Whether the phone numbers can receive calls. Can be:trueorfalse.exclude_all_address_required- Whether to exclude phone numbers that require an Address. Can be:trueorfalseand the default isfalse.exclude_local_address_required- Whether to exclude phone numbers that require a local Address. Can be:trueorfalseand the default isfalse.exclude_foreign_address_required- Whether to exclude phone numbers that require a foreign Address. Can be:trueorfalseand the default isfalse.beta- Whether to read phone numbers that are new to the Twilio platform. Can be:trueorfalseand the default istrue.near_number- Given a phone number, find a geographically close number withindistancemiles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada.near_lat_long- Given a latitude/longitude pairlat,longfind geographically close numbers withindistancemiles. Applies to only phone numbers in the US and Canada.distance- The search radius, in miles, for anear_query. Can be up to500and the default is25. Applies to only phone numbers in the US and Canada.in_postal_code- 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.in_region- 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.in_rate_center- Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requiresin_latato be set as well. Applies to only phone numbers in the US and Canada.in_lata- Limit results to a specific local access and transport area (LATA). Given a phone number, search within the same LATA as that number. Applies to only phone numbers in the US and Canada.in_locality- Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number.fax_enabled- Whether the phone numbers can receive faxes. Can be:trueorfalse.page_size- How many resources to return in each list page. The default is 50, and the maximum is 1000.page- The page index. This value is simply for client state.page_token- The page token. This is provided by the API.
To read every item across all pages, use list_all.
@spec list!(String.t(), map() | keyword(), keyword()) :: Twilio.Schemas.AvailablePhoneNumbersMachineToMachineListResponse.t()
Like list/3, but returns the result or raises Infusion.Runtime.Error.
@spec list_all(String.t(), map() | keyword(), keyword()) :: {:ok, Enumerable.t()} | {:error, Infusion.Runtime.Error.t()}
Like list/3, but returns every item, from every page: a lazy stream of Twilio.Schemas.AvailablePhoneNumberMachineToMachine.t() that fetches pages as it is read.
The first page is fetched right away, so its errors are returned; a later page that fails raises Infusion.Runtime.Error. Stopping early (Enum.take/2) fetches no more pages.
@spec list_all!(String.t(), map() | keyword(), keyword()) :: Enumerable.t()
Like list_all/3, but returns the stream or raises Infusion.Runtime.Error.