Webhooks that notify you of usage thresholds
Operations: list, create, fetch, update, delete
Summary
Functions
Create a new UsageTrigger
Operation: DeleteUsageTrigger | Tags: Api20100401Trigger
Fetch and instance of a usage-trigger
Retrieve a list of usage-triggers belonging to the account used to make the request
Stream: Retrieve a list of usage-triggers belonging to the account used to make the request (lazy auto-pagination).
Update an instance of a usage trigger
Functions
@spec create(Twilio.Client.t(), map(), keyword()) :: {:ok, Twilio.Resources.Api.V2010.Usage.Trigger.t()} | {:ok, map(), map()} | :ok | {:error, Twilio.Error.t()}
Create a new UsageTrigger
Operation: CreateUsageTrigger | Tags: Api20100401Trigger
Required Parameters
| Parameter | Type | Description |
|---|---|---|
CallbackUrl | string (uri) | The URL we should call using callback_method when the trigger fires. |
credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| TriggerValue | string | The usage value at which the trigger should fire. For convenience, you can use an offset value such as +30 to specify a trigger_value that is 30 units more than the current usage value. Be sure to urlencode a + as %2B. |
credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| UsageCategory | string | The usage category that the trigger should watch. Use one of the supported usage categories for this value. |
Optional Parameters
| Parameter | Type | Description |
|---|
credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| CallbackMethod | string (http-method) | The HTTP method we should use to call callback_url. Can be: GET or POST and the default is POST. Values: GET, POST |
credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
FriendlyName | string | A descriptive string that you create to describe the resource. It can be up to 64 characters long. |
Recurring | string | Values: daily, monthly, yearly, alltime |
TriggerBy | string | Values: count, usage, price |
@spec delete(Twilio.Client.t(), String.t(), keyword()) :: {:ok, map()} | {:ok, map(), map()} | :ok | {:error, Twilio.Error.t()}
Operation: DeleteUsageTrigger | Tags: Api20100401Trigger
@spec fetch(Twilio.Client.t(), String.t(), keyword()) :: {:ok, Twilio.Resources.Api.V2010.Usage.Trigger.t()} | {:ok, map(), map()} | :ok | {:error, Twilio.Error.t()}
Fetch and instance of a usage-trigger
Operation: FetchUsageTrigger | Tags: Api20100401Trigger
@spec list(Twilio.Client.t(), map(), keyword()) :: {:ok, Twilio.Page.t()} | {:ok, map(), map()} | :ok | {:error, Twilio.Error.t()}
Retrieve a list of usage-triggers belonging to the account used to make the request
Operation: ListUsageTrigger | Tags: Api20100401Trigger
Query Parameters
| Parameter | Type | Description |
|---|
credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| Recurring | string | The frequency of recurring UsageTriggers to read. Can be: daily, monthly, or yearly to read recurring UsageTriggers. An empty value or a value of alltime reads non-recurring UsageTriggers. |
credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| TriggerBy | string | The trigger field of the UsageTriggers to read. Can be: count, usage, or price as described in the UsageRecords documentation. |
credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| UsageCategory | string | The usage category of the UsageTriggers to read. Must be a supported usage categories. |
@spec stream(Twilio.Client.t(), map(), keyword()) :: Enumerable.t()
Stream: Retrieve a list of usage-triggers belonging to the account used to make the request (lazy auto-pagination).
@spec update(Twilio.Client.t(), String.t(), map(), keyword()) :: {:ok, Twilio.Resources.Api.V2010.Usage.Trigger.t()} | {:ok, map(), map()} | :ok | {:error, Twilio.Error.t()}
Update an instance of a usage trigger
Operation: UpdateUsageTrigger | Tags: Api20100401Trigger
Optional Parameters
| Parameter | Type | Description |
|---|
credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
CallbackMethod | string (http-method) | The HTTP method we should use to call callback_url. Can be: GET or POST and the default is POST. Values: GET, POST |
CallbackUrl | string (uri) | The URL we should call using callback_method when the trigger fires. |
credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| FriendlyName | string | A descriptive string that you create to describe the resource. It can be up to 64 characters long. |