ExTwilio.DependentPhoneNumber

Represents an DependentPhoneNumber resource in the Twilio API.

Examples

Since DependentPhoneNumbers are a nested resource in the Twilio API, you must pass in a parent Address SID to all functions in this module.

ExTwilio.DependentPhoneNumber.all(address: "address_sid")
Source

Summary

all(options \\ [])

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

children()
first_page(metadata)

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

last_page(metadata)

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

list(options \\ [])

Retrieve a list of DependentPhoneNumbers from the API

new()

Creates a new ExTwilio.DependentPhoneNumber 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 dependentphonenumbers, 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 dependentphonenumbers, 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 DependentPhoneNumber records from the Twilio API

Functions

all(options \\ [])

Specs:

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

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

Delegates to ExTwilio.Api.all/2.

Examples

dependentphonenumbers = ExTwilio.DependentPhoneNumber.all
Source
children()

Specs:

  • children :: list
Source
first_page(metadata)

Specs:

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

Delegates to ExTwilio.Api.fetch_page/2.

Examples

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

Specs:

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

Delegates to ExTwilio.Api.fetch_page/2.

Examples

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

Specs:

Retrieve a list of DependentPhoneNumbers from the API.

Delegates to ExTwilio.Api.list/2.

Examples

# Successful response
{:ok, dependentphonenumbers, metadata} = ExTwilio.DependentPhoneNumber.list

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

Specs:

  • new :: %ExTwilio.DependentPhoneNumber{account_sid: term, city: term, customer_name: term, friendly_name: term, iso_country: term, postal_code: term, region: term, sid: term, street: term}

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

Example

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

Specs:

  • new(list) :: %ExTwilio.DependentPhoneNumber{account_sid: term, city: term, customer_name: term, friendly_name: term, iso_country: term, postal_code: term, region: term, sid: term, street: term}
Source
next_page(metadata)

Specs:

Get the next page of dependentphonenumbers, 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.DependentPhoneNumber.list
{:ok, page2, meta} = ExTwilio.DependentPhoneNumber.next_page(meta)
Source
parents()

Specs:

  • parents :: list
Source
previous_page(metadata)

Specs:

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

Delegates to ExTwilio.Api.fetch_page/2.

Examples

{:ok, page2, meta} = ExTwilio.DependentPhoneNumber.list(page: 2)
{:ok, page1, meta} = ExTwilio.DependentPhoneNumber.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 DependentPhoneNumber records from the Twilio API.

Delegates to ExTwilio.Api.stream/2.

Source