Class: Stripe::Billing::AlertCreateParams::SpendThreshold
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::Billing::AlertCreateParams::SpendThreshold
- Defined in:
- lib/stripe/params/billing/alert_create_params.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#aggregation_period ⇒ Object
Defines the period over which spend is aggregated.
-
#filters ⇒ Object
Filters to scope the spend calculation.
-
#group_by ⇒ Object
Defines the granularity of spend aggregation.
-
#gte ⇒ Object
Defines at which value the alert will fire.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(aggregation_period: nil, filters: nil, group_by: nil, gte: nil) ⇒ SpendThreshold
constructor
A new instance of SpendThreshold.
Methods inherited from RequestParams
attr_accessor, coerce_params, coerce_value, new, #to_h
Constructor Details
#initialize(aggregation_period: nil, filters: nil, group_by: nil, gte: nil) ⇒ SpendThreshold
Returns a new instance of SpendThreshold.
217 218 219 220 221 222 |
# File 'lib/stripe/params/billing/alert_create_params.rb', line 217 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_period ⇒ Object
Defines the period over which spend is aggregated.
209 210 211 |
# File 'lib/stripe/params/billing/alert_create_params.rb', line 209 def aggregation_period @aggregation_period end |
#filters ⇒ Object
Filters to scope the spend calculation.
211 212 213 |
# File 'lib/stripe/params/billing/alert_create_params.rb', line 211 def filters @filters end |
#group_by ⇒ Object
Defines the granularity of spend aggregation. Defaults to ‘pricing_plan_subscription`.
213 214 215 |
# File 'lib/stripe/params/billing/alert_create_params.rb', line 213 def group_by @group_by end |
#gte ⇒ Object
Defines at which value the alert will fire.
215 216 217 |
# File 'lib/stripe/params/billing/alert_create_params.rb', line 215 def gte @gte end |
Class Method Details
.field_encodings ⇒ Object
224 225 226 227 228 229 230 231 |
# File 'lib/stripe/params/billing/alert_create_params.rb', line 224 def self.field_encodings @field_encodings = { gte: { kind: :object, fields: { custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } } }, }, } end |