Class: Stripe::Billing::Alert::CreateParams::UsageThreshold

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/resources/billing/alert.rb

Defined Under Namespace

Classes: Filter

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

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

Returns a new instance of UsageThreshold.



202
203
204
205
206
207
# File 'lib/stripe/resources/billing/alert.rb', line 202

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.



194
195
196
# File 'lib/stripe/resources/billing/alert.rb', line 194

def filters
  @filters
end

#gteObject

Defines at which value the alert will fire.



196
197
198
# File 'lib/stripe/resources/billing/alert.rb', line 196

def gte
  @gte
end

#meterObject

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



198
199
200
# File 'lib/stripe/resources/billing/alert.rb', line 198

def meter
  @meter
end

#recurrenceObject

Whether the alert should only fire only once, or once per billing cycle.



200
201
202
# File 'lib/stripe/resources/billing/alert.rb', line 200

def recurrence
  @recurrence
end