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.



86
87
88
89
90
91
# File 'lib/stripe/resources/billing/alert.rb', line 86

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.



78
79
80
# File 'lib/stripe/resources/billing/alert.rb', line 78

def filters
  @filters
end

#gteObject

Defines at which value the alert will fire.



80
81
82
# File 'lib/stripe/resources/billing/alert.rb', line 80

def gte
  @gte
end

#meterObject

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



82
83
84
# File 'lib/stripe/resources/billing/alert.rb', line 82

def meter
  @meter
end

#recurrenceObject

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



84
85
86
# File 'lib/stripe/resources/billing/alert.rb', line 84

def recurrence
  @recurrence
end