Class: Stripe::Billing::AlertService::CreateParams::UsageThreshold

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/services/billing/alert_service.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.



125
126
127
128
129
130
# File 'lib/stripe/services/billing/alert_service.rb', line 125

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.



117
118
119
# File 'lib/stripe/services/billing/alert_service.rb', line 117

def filters
  @filters
end

#gteObject

Defines at which value the alert will fire.



119
120
121
# File 'lib/stripe/services/billing/alert_service.rb', line 119

def gte
  @gte
end

#meterObject

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



121
122
123
# File 'lib/stripe/services/billing/alert_service.rb', line 121

def meter
  @meter
end

#recurrenceObject

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



123
124
125
# File 'lib/stripe/services/billing/alert_service.rb', line 123

def recurrence
  @recurrence
end