Stripe.Resources.Billing.Alert (tiger_stripe v0.3.0)

Copy Markdown View Source

ThresholdsResourceAlert

A billing alert is a resource that notifies you when a certain usage threshold on a meter is crossed. For example, you might create a billing alert to notify you when a certain user made 100 API requests.

Summary

Types

t()

@type t() :: %Stripe.Resources.Billing.Alert{
  alert_type: String.t(),
  id: String.t(),
  livemode: boolean(),
  object: String.t(),
  status: String.t(),
  title: String.t(),
  usage_threshold: usage_threshold()
}
  • alert_type - Defines the type of the alert. Possible values: usage_threshold.
  • id - Unique identifier for the object. Max length: 5000.
  • livemode - Has the value true if the object exists in live mode or the value false if the object exists in test mode.
  • object - String representing the object's type. Objects of the same type share the same value. Possible values: billing.alert.
  • status - Status of the alert. This can be active, inactive or archived. Possible values: active, archived, inactive. Nullable.
  • title - Title of the alert. Max length: 5000.
  • usage_threshold - Encapsulates configuration of the alert to monitor usage on a specific Billing Meter. Nullable. Expandable.

usage_threshold()

@type usage_threshold() :: %{
  optional(:filters) => [usage_threshold_filters()] | nil,
  optional(:gte) => integer() | nil,
  optional(:meter) => String.t() | Stripe.Resources.Billing.Meter.t() | nil,
  optional(:recurrence) => String.t() | nil,
  optional(String.t()) => term()
}
  • filters - The filters allow limiting the scope of this usage alert. You can only specify up to one filter at this time. Nullable.
  • gte - The value at which this alert will trigger.
  • meter - The Billing Meter ID whose usage is monitored.
  • recurrence - Defines how the alert will behave. Possible values: one_time.

usage_threshold_filters()

@type usage_threshold_filters() :: %{
  optional(:customer) => String.t() | Stripe.Resources.Customer.t() | nil,
  optional(:type) => String.t() | nil,
  optional(String.t()) => term()
}
  • customer - Limit the scope of the alert to this customer ID Nullable.
  • type - Possible values: customer.

Functions

expandable_fields()

object_name()