Twilio.Proxy.V1.Service.SessionService (twilio_elixir v0.1.1)

Copy Markdown View Source

Service for Session API operations.

Operations: list, create, fetch, update, delete

Summary

Functions

Retrieve a list of all Sessions for the Service. A maximum of 100 records will be returned per page.

Stream: Retrieve a list of all Sessions for the Service. A maximum of 100 records will be returned per page. (lazy auto-pagination).

Functions

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

@spec create(Twilio.Client.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Resources.Proxy.V1.Service.Session.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

Create a new Session

Operation: CreateSession | Tags: ProxyV1Session

Optional Parameters

ParameterTypeDescription

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

DateExpirystring (date-time)The ISO 8601 date when the Session should expire. If this is value is present, it overrides the ttl value.
ModestringValues: message-only, voice-only, voice-and-message
ParticipantsarrayThe Participant objects to include in the new session.
StatusstringValues: open, in-progress, closed, failed, unknown

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

| Ttl | integer | The time, in seconds, when the session will expire. The time is measured from the last Session create or the Session's last Interaction. |

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

| UniqueName | string | An application-defined string that uniquely identifies the resource. This value must be 191 characters or fewer in length and be unique. This value should not have PII. |

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

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

Delete a specific Session.

Operation: DeleteSession | Tags: ProxyV1Session

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

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

Fetch a specific Session.

Operation: FetchSession | Tags: ProxyV1Session

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

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

Retrieve a list of all Sessions for the Service. A maximum of 100 records will be returned per page.

Operation: ListSession | Tags: ProxyV1Session

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

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

Stream: Retrieve a list of all Sessions for the Service. A maximum of 100 records will be returned per page. (lazy auto-pagination).

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

@spec update(Twilio.Client.t(), String.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Resources.Proxy.V1.Service.Session.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

Update a specific Session.

Operation: UpdateSession | Tags: ProxyV1Session

Optional Parameters

ParameterTypeDescription

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

DateExpirystring (date-time)The ISO 8601 date when the Session should expire. If this is value is present, it overrides the ttl value.
StatusstringValues: open, in-progress, closed, failed, unknown

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

| Ttl | integer | The time, in seconds, when the session will expire. The time is measured from the last Session create or the Session's last Interaction. |