Class: Stripe::Billing::AlertCreateParams::SpendThreshold

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

Defined Under Namespace

Classes: Filters, Gte

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

attr_accessor, new, #to_h

Constructor Details

#initialize(aggregation_period: nil, filters: nil, group_by: nil, gte: nil) ⇒ SpendThreshold

Returns a new instance of SpendThreshold.



188
189
190
191
192
193
# File 'lib/stripe/params/billing/alert_create_params.rb', line 188

def initialize(aggregation_period: nil, filters: nil, group_by: nil, gte: nil)
  @aggregation_period = aggregation_period
  @filters = filters
  @group_by = group_by
  @gte = gte
end

Instance Attribute Details

#aggregation_periodObject

Defines the period over which spend is aggregated.



180
181
182
# File 'lib/stripe/params/billing/alert_create_params.rb', line 180

def aggregation_period
  @aggregation_period
end

#filtersObject

Filters to scope the spend calculation.



182
183
184
# File 'lib/stripe/params/billing/alert_create_params.rb', line 182

def filters
  @filters
end

#group_byObject

Defines the granularity of spend aggregation. Defaults to ‘pricing_plan_subscription`.



184
185
186
# File 'lib/stripe/params/billing/alert_create_params.rb', line 184

def group_by
  @group_by
end

#gteObject

Defines at which value the alert will fire.



186
187
188
# File 'lib/stripe/params/billing/alert_create_params.rb', line 186

def gte
  @gte
end