Twilio.Events.V1.SubscriptionService (twilio_elixir v0.1.1)

Copy Markdown View Source

Subscription to send Event Types to a Sink

Operations: list, create, fetch, update, delete

Summary

Functions

Create a new Subscription.

Delete a specific Subscription.

Fetch a specific Subscription.

Retrieve a paginated list of Subscriptions belonging to the account used to make the request.

Stream: Retrieve a paginated list of Subscriptions belonging to the account used to make the request. (lazy auto-pagination).

Functions

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

@spec create(Twilio.Client.t(), map(), keyword()) ::
  {:ok, Twilio.Resources.Events.V1.Subscription.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

Create a new Subscription.

Operation: CreateSubscription | Tags: EventsV1Subscription

Required Parameters

ParameterTypeDescription
DescriptionstringA human readable description for the Subscription This value should not contain PII.

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

SinkSidstringThe SID of the sink that events selected by this subscription should be sent to. Sink must be active for the subscription to be created.
TypesarrayAn array of objects containing the subscribed Event Types

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

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

Delete a specific Subscription.

Operation: DeleteSubscription | Tags: EventsV1Subscription

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

@spec fetch(Twilio.Client.t(), String.t(), keyword()) ::
  {:ok, Twilio.Resources.Events.V1.Subscription.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

Fetch a specific Subscription.

Operation: FetchSubscription | Tags: EventsV1Subscription

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

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

Retrieve a paginated list of Subscriptions belonging to the account used to make the request.

Operation: ListSubscription | Tags: EventsV1Subscription

Query Parameters

ParameterTypeDescription
SinkSidstringThe SID of the sink that the list of Subscriptions should be filtered by.

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

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

Stream: Retrieve a paginated list of Subscriptions 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.Events.V1.Subscription.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

Update a Subscription.

Operation: UpdateSubscription | Tags: EventsV1Subscription

Optional Parameters

ParameterTypeDescription
DescriptionstringA human readable description for the Subscription.