ExTwilio.IncomingPhoneNumber

Represents an IncomingPhoneNumber resource in the Twilio API.

Source

Summary

all(options \\ [])

Retrieve all of the IncomingPhoneNumber records from the Twilio API, paging through all the API response pages

children()
create(data, options \\ [])

Create a new IncomingPhoneNumber in the Twilio API. Any field supported by Twilio's IncomingPhoneNumber API can be passed in the 'data' keyword list

destroy(sid, options \\ [])

Delete any IncomingPhoneNumber from your Twilio account, using its SID

find(sid, options \\ [])

Find any IncomingPhoneNumber by its Twilio SID

first_page(metadata)

Get the first page of incomingphonenumbers, using metadata from any page's response

last_page(metadata)

Get the last page of incomingphonenumbers, using metadta from any page's response

list(options \\ [])

Retrieve a list of IncomingPhoneNumbers from the API

new()

Creates a new ExTwilio.IncomingPhoneNumber struct. Optionally, you can pass in attributes to set their initial value in the struct

new(attrs)
next_page(metadata)

Get the next page of incomingphonenumbers, using the metadata from the previous response. See all/0 for an easy way to get all the records

parents()
previous_page(metadata)

Get the previous page of incomingphonenumbers, using metadata from a previous response

resource_collection_name()

Underscored and lowercased collection name for a given resource. Delegates the real work to ExTwilio.Api.resource_collection_name/1 by default

resource_name()

CamelCase resource name as it would be used in Twilio's API. Delegates the real work to ExTwilio.Api.resource_name/1 by default

stream(options \\ [])

Create a stream of all IncomingPhoneNumber records from the Twilio API

update(sid, data, options \\ [])

Update an IncomingPhoneNumber in the Twilio API. You can pass it a binary SID as the identifier, or a whole %ExTwilio.IncomingPhoneNumber{} struct

Functions

all(options \\ [])

Specs:

  • all(list) :: [%{}]

Retrieve all of the IncomingPhoneNumber records from the Twilio API, paging through all the API response pages.

Delegates to ExTwilio.Api.all/2.

Examples

incomingphonenumbers = ExTwilio.IncomingPhoneNumber.all
Source
children()

Specs:

  • children :: list
Source
create(data, options \\ [])

Specs:

Create a new IncomingPhoneNumber in the Twilio API. Any field supported by Twilio's IncomingPhoneNumber API can be passed in the 'data' keyword list.

Delegates to ExTwilio.Api.create/3.

Source
destroy(sid, options \\ [])

Specs:

Delete any IncomingPhoneNumber from your Twilio account, using its SID.

Delegates to ExTwilio.Api.destroy/3.

Source
find(sid, options \\ [])

Specs:

Find any IncomingPhoneNumber by its Twilio SID.

Delegates to ExTwilio.Api.find/3.

Examples

{:ok, incomingphonenumber} = ExTwilio.IncomingPhoneNumber.find("...")
{:error, msg, http_status} = ExTwilio.IncomingPhoneNumber.find("...")
Source
first_page(metadata)

Specs:

Get the first page of incomingphonenumbers, using metadata from any page's response.

Delegates to ExTwilio.Api.fetch_page/2.

Examples

{:ok, page10, meta} = ExTwilio.IncomingPhoneNumber.list(page: 10)
{:ok, page1, meta}  = ExTwilio.IncomingPhoneNumber.first_page(meta)
Source
last_page(metadata)

Specs:

Get the last page of incomingphonenumbers, using metadta from any page's response.

Delegates to ExTwilio.Api.fetch_page/2.

Examples

{:ok, page10, meta}    = ExTwilio.IncomingPhoneNumber.list(page: 10)
{:ok, last_page, meta} = ExTwilio.IncomingPhoneNumber.last_page(meta)
Source
list(options \\ [])

Specs:

Retrieve a list of IncomingPhoneNumbers from the API.

Delegates to ExTwilio.Api.list/2.

Examples

# Successful response
{:ok, incomingphonenumbers, metadata} = ExTwilio.IncomingPhoneNumber.list

# Error response
{:error, msg, http_code} = ExTwilio.IncomingPhoneNumber.list
Source
new()

Specs:

  • new :: %ExTwilio.IncomingPhoneNumber{account_sid: term, address_requirements: term, api_version: term, capabilities: term, date_created: term, date_updated: term, friendly_name: term, phone_number: term, sid: term, sms_application_sid: term, sms_fallback_method: term, sms_fallback_url: term, sms_method: term, sms_url: term, status_callback: term, status_callback_method: term, uri: term, voice_application_sid: term, voice_caller_id_lookup: term, voice_fallback_url: term, voice_method: term, voice_url: term}

Creates a new ExTwilio.IncomingPhoneNumber struct. Optionally, you can pass in attributes to set their initial value in the struct.

Example

%ExTwilio.IncomingPhoneNumber{} = ExTwilio.IncomingPhoneNumber.new
%ExTwilio.IncomingPhoneNumber{sid: "sid"} = ExTwilio.IncomingPhoneNumber.new(sid: "sid")
Source
new(attrs)

Specs:

  • new(list) :: %ExTwilio.IncomingPhoneNumber{account_sid: term, address_requirements: term, api_version: term, capabilities: term, date_created: term, date_updated: term, friendly_name: term, phone_number: term, sid: term, sms_application_sid: term, sms_fallback_method: term, sms_fallback_url: term, sms_method: term, sms_url: term, status_callback: term, status_callback_method: term, uri: term, voice_application_sid: term, voice_caller_id_lookup: term, voice_fallback_url: term, voice_method: term, voice_url: term}
Source
next_page(metadata)

Specs:

Get the next page of incomingphonenumbers, using the metadata from the previous response. See all/0 for an easy way to get all the records.

Delegates to ExTwilio.Api.fetch_page/2.

Examples

{:ok, page1, meta} = ExTwilio.IncomingPhoneNumber.list
{:ok, page2, meta} = ExTwilio.IncomingPhoneNumber.next_page(meta)
Source
parents()

Specs:

  • parents :: list
Source
previous_page(metadata)

Specs:

Get the previous page of incomingphonenumbers, using metadata from a previous response.

Delegates to ExTwilio.Api.fetch_page/2.

Examples

{:ok, page2, meta} = ExTwilio.IncomingPhoneNumber.list(page: 2)
{:ok, page1, meta} = ExTwilio.IncomingPhoneNumber.previous_page(meta)
Source
resource_collection_name()

Underscored and lowercased collection name for a given resource. Delegates the real work to ExTwilio.Api.resource_collection_name/1 by default.

Override in your module before use ExTwilio.Resource if you need something different.

Source
resource_name()

CamelCase resource name as it would be used in Twilio's API. Delegates the real work to ExTwilio.Api.resource_name/1 by default.

Override in your module before use ExTwilio.Resource if you need something different.

Source
stream(options \\ [])

Create a stream of all IncomingPhoneNumber records from the Twilio API.

Delegates to ExTwilio.Api.stream/2.

Source
update(sid, data, options \\ [])

Specs:

Update an IncomingPhoneNumber in the Twilio API. You can pass it a binary SID as the identifier, or a whole %ExTwilio.IncomingPhoneNumber{} struct.

Delegates to ExTwilio.Api.update/4.

Examples

{:ok, incomingphonenumber} = ExTwilio.IncomingPhoneNumber.update(%ExTwilio.IncomingPhoneNumber{...}, field: "new_value")
{:ok, incomingphonenumber} = ExTwilio.IncomingPhoneNumber.update("<SID HERE>", field: "new_value")
Source