Twilio. IncomingPhoneNumbers. TollFree
(twilio v0.2.0)
Copy Markdown
API calls: create, list.
Summary
Functions
POST /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/TollFree.json
Like create/2, but returns the result or raises Infusion.Runtime.Error.
GET /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/TollFree.json
Like list/2, but returns the result or raises Infusion.Runtime.Error.
Like list/2, but returns every item, from every page: a lazy stream of Twilio.Schemas.IncomingPhoneNumberTollFree.t() that fetches pages as it is read.
Like list_all/2, but returns the stream or raises Infusion.Runtime.Error.
Functions
@spec create(map() | keyword(), keyword()) :: {:ok, Twilio.Schemas.IncomingPhoneNumberTollFree.t()} | {:error, Infusion.Runtime.Error.t()}
POST /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/TollFree.json
{AccountSid} in the path is the :account_sid setting; pass account_sid: "..." as an option to use another.
Parameters
address_sid- The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations.api_version- The API version to use for incoming calls made to the new phone number. The default is2010-04-01.bundle_sid- The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations.emergency_address_sid- The SID of the emergency address configuration to use for emergency calling from the new phone number.emergency_statusfriendly_name- A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number.identity_sid- The SID of the Identity resource that we should associate with the new phone number. Some regions require an Identity to meet local regulations.phone_number(required) - The phone number to purchase specified in E.164 format. E.164 phone numbers consist of a + followed by the country code and subscriber number without punctuation characters. For example, +14155551234.sms_application_sid- The SID of the application that should handle SMS messages sent to the new phone number. If ansms_application_sidis present, we ignore allsms_*_urlvalues and use those of the application.sms_fallback_method- The HTTP method that we should use to callsms_fallback_url. Can be:GETorPOSTand defaults toPOST.sms_fallback_url- The URL that we should call when an error occurs while requesting or executing the TwiML defined bysms_url.sms_method- The HTTP method that we should use to callsms_url. Can be:GETorPOSTand defaults toPOST.sms_url- The URL we should call when the new phone number receives an incoming SMS message.status_callback- The URL we should call using thestatus_callback_methodto send status information to your application.status_callback_method- The HTTP method we should use to callstatus_callback. Can be:GETorPOSTand defaults toPOST.trunk_sid- The SID of the Trunk we should use to handle calls to the new phone number. If atrunk_sidis present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting atrunk_sidwill automatically delete yourvoice_application_sidand vice versa.voice_application_sid- The SID of the application we should use to handle calls to the new phone number. If avoice_application_sidis present, we ignore all of the voice urls and use those set on the application. Setting avoice_application_sidwill automatically delete yourtrunk_sidand vice versa.voice_caller_id_lookup- Whether to lookup the caller's name from the CNAM database and post it to your app. Can be:trueorfalseand defaults tofalse.voice_fallback_method- The HTTP method that we should use to callvoice_fallback_url. Can be:GETorPOSTand defaults toPOST.voice_fallback_url- The URL that we should call when an error occurs retrieving or executing the TwiML requested byurl.voice_method- The HTTP method that we should use to callvoice_url. Can be:GETorPOSTand defaults toPOST.voice_receive_modevoice_url- The URL that we should call to answer a call to the new phone number. Thevoice_urlwill not be called if avoice_application_sidor atrunk_sidis set.
@spec create!(map() | keyword(), keyword()) :: Twilio.Schemas.IncomingPhoneNumberTollFree.t()
Like create/2, but returns the result or raises Infusion.Runtime.Error.
@spec list(map() | keyword(), keyword()) :: {:ok, Twilio.Schemas.IncomingPhoneNumbersTollFreeListResponse.t()} | {:error, Infusion.Runtime.Error.t()}
GET /2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/TollFree.json
{AccountSid} in the path is the :account_sid setting; pass account_sid: "..." as an option to use another.
Parameters
beta- Whether to include phone numbers new to the Twilio platform. Can be:trueorfalseand the default istrue.friendly_name- A string that identifies the resources to read.phone_number- The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit.origin- Whether to include phone numbers based on their origin. Can be:twilioorhosted. By default, phone numbers of all origin are included.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!(map() | keyword(), keyword()) :: Twilio.Schemas.IncomingPhoneNumbersTollFreeListResponse.t()
Like list/2, but returns the result or raises Infusion.Runtime.Error.
@spec list_all(map() | keyword(), keyword()) :: {:ok, Enumerable.t()} | {:error, Infusion.Runtime.Error.t()}
Like list/2, but returns every item, from every page: a lazy stream of Twilio.Schemas.IncomingPhoneNumberTollFree.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!(map() | keyword(), keyword()) :: Enumerable.t()
Like list_all/2, but returns the stream or raises Infusion.Runtime.Error.