Class: Stripe::Billing::AlertCreateParams::UsageThreshold

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/params/billing/alert_create_params.rb

Defined Under Namespace

Classes: Filter

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

attr_accessor, coerce_params, coerce_value, field_encodings, new, #to_h

Constructor Details

#initialize(filters: nil, gte: nil, meter: nil, recurrence: nil) ⇒ UsageThreshold

Returns a new instance of UsageThreshold.



255
256
257
258
259
260
# File 'lib/stripe/params/billing/alert_create_params.rb', line 255

def initialize(filters: nil, gte: nil, meter: nil, recurrence: nil)
  @filters = filters
  @gte = gte
  @meter = meter
  @recurrence = recurrence
end

Instance Attribute Details

#filtersObject

The filters allows limiting the scope of this usage alert. You can only specify up to one filter at this time.



247
248
249
# File 'lib/stripe/params/billing/alert_create_params.rb', line 247

def filters
  @filters
end

#gteObject

Defines the threshold value that triggers the alert.



249
250
251
# File 'lib/stripe/params/billing/alert_create_params.rb', line 249

def gte
  @gte
end

#meterObject

The [Billing Meter](/api/billing/meter) ID whose usage is monitored.



251
252
253
# File 'lib/stripe/params/billing/alert_create_params.rb', line 251

def meter
  @meter
end

#recurrenceObject

Defines how the alert will behave.



253
254
255
# File 'lib/stripe/params/billing/alert_create_params.rb', line 253

def recurrence
  @recurrence
end