ExTwilio.AvailablePhoneNumber
Represents an AvailablePhoneNumber resource in the Twilio API.
Summary↑
all(options \\ []) | Retrieve all of the AvailablePhoneNumber records from the Twilio API, paging through all the API response pages |
children() | |
first_page(metadata) | Get the first page of availablephonenumbers, using metadata from any page's response |
last_page(metadata) | Get the last page of availablephonenumbers, using metadta from any page's response |
list(options \\ []) | Retrieve a list of AvailablePhoneNumbers from the API |
new() | Creates a new ExTwilio.AvailablePhoneNumber 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 availablephonenumbers, using the metadata from the previous response. See |
parents() | |
previous_page(metadata) | Get the previous page of availablephonenumbers, using metadata from a previous response |
resource_collection_name() | Underscored and lowercased collection name for a given resource. Delegates the real work to |
resource_name() | CamelCase resource name as it would be used in Twilio's API. Delegates the real work to |
stream(options \\ []) | Create a stream of all AvailablePhoneNumber records from the Twilio API |
Functions
Specs:
- all(list) :: [%{}]
Retrieve all of the AvailablePhoneNumber records from the Twilio API, paging through all the API response pages.
Delegates to ExTwilio.Api.all/2
.
Examples
availablephonenumbers = ExTwilio.AvailablePhoneNumber.all
Specs:
- children :: list
Specs:
- first_page(%{}) :: ExTwilio.Parser.parsed_list_response
Get the first page of availablephonenumbers, using metadata from any page's response.
Delegates to ExTwilio.Api.fetch_page/2
.
Examples
{:ok, page10, meta} = ExTwilio.AvailablePhoneNumber.list(page: 10)
{:ok, page1, meta} = ExTwilio.AvailablePhoneNumber.first_page(meta)
Specs:
- last_page(%{}) :: ExTwilio.Parser.parsed_list_response
Get the last page of availablephonenumbers, using metadta from any page's response.
Delegates to ExTwilio.Api.fetch_page/2
.
Examples
{:ok, page10, meta} = ExTwilio.AvailablePhoneNumber.list(page: 10)
{:ok, last_page, meta} = ExTwilio.AvailablePhoneNumber.last_page(meta)
Specs:
- list(list) :: ExTwilio.Parser.parsed_list_response
Retrieve a list of AvailablePhoneNumbers from the API.
Delegates to ExTwilio.Api.list/2
.
Examples
# Successful response
{:ok, availablephonenumbers, metadata} = ExTwilio.AvailablePhoneNumber.list
# Error response
{:error, msg, http_code} = ExTwilio.AvailablePhoneNumber.list
Specs:
- new :: %ExTwilio.AvailablePhoneNumber{address_requirements: term, capabilities: term, friendly_name: term, iso_country: term, lata: term, latitude: term, longitude: term, phone_number: term, postal_code: term, rate_center: term, region: term}
Creates a new ExTwilio.AvailablePhoneNumber struct. Optionally, you can pass in attributes to set their initial value in the struct.
Example
%ExTwilio.AvailablePhoneNumber{} = ExTwilio.AvailablePhoneNumber.new
%ExTwilio.AvailablePhoneNumber{sid: "sid"} = ExTwilio.AvailablePhoneNumber.new(sid: "sid")
Specs:
- new(list) :: %ExTwilio.AvailablePhoneNumber{address_requirements: term, capabilities: term, friendly_name: term, iso_country: term, lata: term, latitude: term, longitude: term, phone_number: term, postal_code: term, rate_center: term, region: term}
Specs:
- next_page(%{}) :: ExTwilio.Parser.parsed_list_response
Get the next page of availablephonenumbers, 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.AvailablePhoneNumber.list
{:ok, page2, meta} = ExTwilio.AvailablePhoneNumber.next_page(meta)
Specs:
- parents :: list
Specs:
- previous_page(%{}) :: ExTwilio.Parser.parsed_list_response
Get the previous page of availablephonenumbers, using metadata from a previous response.
Delegates to ExTwilio.Api.fetch_page/2
.
Examples
{:ok, page2, meta} = ExTwilio.AvailablePhoneNumber.list(page: 2)
{:ok, page1, meta} = ExTwilio.AvailablePhoneNumber.previous_page(meta)
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.
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.
Create a stream of all AvailablePhoneNumber records from the Twilio API.
Delegates to ExTwilio.Api.stream/2
.