Twilio.Chat.V2.Service.RoleService (twilio_elixir v0.1.1)

Copy Markdown View Source

Roles determining user or member permissions

Operations: list, create, fetch, update, delete

Summary

Functions

Operation: CreateRole | Tags: ChatV2Role

Operation: DeleteRole | Tags: ChatV2Role

Operation: FetchRole | Tags: ChatV2Role

Operation: ListRole | Tags: ChatV2Role

Operation: UpdateRole | Tags: ChatV2Role

Functions

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

@spec create(Twilio.Client.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Resources.Chat.V2.Service.Role.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

Operation: CreateRole | Tags: ChatV2Role

Required Parameters

ParameterTypeDescription

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

| FriendlyName | string | A descriptive string that you create to describe the new resource. It can be up to 64 characters long. |

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

PermissionarrayA permission that you grant to the new role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's type.
TypestringValues: channel, deployment

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()}

Operation: DeleteRole | Tags: ChatV2Role

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

@spec fetch(Twilio.Client.t(), String.t(), String.t(), keyword()) ::
  {:ok, Twilio.Resources.Chat.V2.Service.Role.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

Operation: FetchRole | Tags: ChatV2Role

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()}

Operation: ListRole | Tags: ChatV2Role

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

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

Stream: (lazy auto-pagination).

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

@spec update(Twilio.Client.t(), String.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Resources.Chat.V2.Service.Role.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}

Operation: UpdateRole | Tags: ChatV2Role

Required Parameters

ParameterTypeDescription

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

| Permission | array | A permission that you grant to the role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. Note that the update action replaces all previously assigned permissions with those defined in the update action. To remove a permission, do not include it in the subsequent update action. The values for this parameter depend on the role's type. |