ExTwilio v0.1.9 ExTwilio.Account

Represents an Account or Subaccount resource.

Examples

An ExTwilio.Account can represent either an Account or a SubAccount. To see all accounts and subaccounts that your auth_token has access to, run:

ExTwilio.Account.all

If you want to find a SubAccount, use find/1.

ExTwilio.Account.find("sid")

If you want to see items associated with a SubAccount, you can do so by passing in an account: option in all other ExTwilio resources. For example:

ExTwilio.Call.list(account: "subaccount_sid")

Summary

Functions

Permanently close an Account by updating its status to "closed". This cannot be undone, so use it carefully!

Reactivate a suspended Account by updating its status to "active"

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

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

Suspend an Account by updating its status to "suspended"

Functions

all(options \\ [])

Specs

all(list) :: [map]
children()

Specs

children :: list
close(sid)

Permanently close an Account by updating its status to "closed". This cannot be undone, so use it carefully!

Example

{:ok, account} = ExTwilio.Account.find("<sid>")
ExTwilio.Account.close(account)
create(data, options \\ [])

Specs

create(list, list) :: ExTwilio.Parser.parsed_response
find(sid, options \\ [])

Specs

new()

Specs

new :: %ExTwilio.Account{auth_token: term, date_created: term, date_updated: term, friendly_name: term, owner_account_sid: term, sid: term, status: term, subresource_uris: term, type: term, uri: term}
new(attrs)

Specs

new(list) :: %ExTwilio.Account{auth_token: term, date_created: term, date_updated: term, friendly_name: term, owner_account_sid: term, sid: term, status: term, subresource_uris: term, type: term, uri: term}
parents()

Specs

parents :: list
reactivate(sid)

Reactivate a suspended Account by updating its status to "active".

Example

{:ok, account} = ExTwilio.Account.find("<sid>")
ExTwilio.Account.reactivate(account)
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.

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.

stream(options \\ [])
suspend(sid)

Suspend an Account by updating its status to "suspended".

Example

{:ok, account} = ExTwilio.Account.find("<sid>")
ExTwilio.Account.suspend(account)
update(sid, data, options \\ [])

Specs

update(String.t, list, list) :: ExTwilio.Parser.parsed_response