Twilio.Api.V2010.AccountService (twilio_elixir v0.1.1)

Copy Markdown View Source

Twilio accounts (aka Project) or subaccounts

Operations: list, create, fetch, update

Summary

Functions

Create a new Twilio Subaccount from the account making the request

Fetch the account specified by the provided Account Sid

Retrieves a collection of Accounts belonging to the account used to make the request

Stream: Retrieves a collection of Accounts belonging to the account used to make the request (lazy auto-pagination).

Modify the properties of a given Account

Functions

create(client, params \\ %{}, opts \\ [])

@spec create(Twilio.Client.t(), map(), keyword()) ::
  {:ok, Twilio.Resources.Api.V2010.Account.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

Create a new Twilio Subaccount from the account making the request

Operation: CreateAccount | Tags: Api20100401Account

Optional Parameters

ParameterTypeDescription

credo:disable-for-next-line Credo.Check.Readability.MaxLineLength

| FriendlyName | string | A human readable description of the account to create, defaults to SubAccount Created at {YYYY-MM-DD HH:MM meridian} |

fetch(client, sid, opts \\ [])

@spec fetch(Twilio.Client.t(), String.t(), keyword()) ::
  {:ok, Twilio.Resources.Api.V2010.Account.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

Fetch the account specified by the provided Account Sid

Operation: FetchAccount | Tags: Api20100401Account

list(client, params \\ %{}, opts \\ [])

@spec list(Twilio.Client.t(), map(), keyword()) ::
  {:ok, Twilio.Page.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

Retrieves a collection of Accounts belonging to the account used to make the request

Operation: ListAccount | Tags: Api20100401Account

Query Parameters

ParameterTypeDescription
FriendlyNamestringOnly return the Account resources with friendly names that exactly match this name.
StatusstringOnly return Account resources with the given status. Can be closed, suspended or active.

stream(client, params \\ %{}, opts \\ [])

@spec stream(Twilio.Client.t(), map(), keyword()) :: Enumerable.t()

Stream: Retrieves a collection of Accounts belonging to the account used to make the request (lazy auto-pagination).

update(client, sid, params \\ %{}, opts \\ [])

@spec update(Twilio.Client.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Resources.Api.V2010.Account.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

Modify the properties of a given Account

Operation: UpdateAccount | Tags: Api20100401Account

Optional Parameters

ParameterTypeDescription
FriendlyNamestringUpdate the human-readable description of this Account
StatusstringValues: active, suspended, closed