Class: Stripe::Billing::AlertCreateParams
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::Billing::AlertCreateParams
- Defined in:
- lib/stripe/params/billing/alert_create_params.rb
Defined Under Namespace
Classes: CreditBalanceThreshold, SpendThreshold, UsageThreshold
Instance Attribute Summary collapse
-
#alert_type ⇒ Object
The type of alert to create.
-
#credit_balance_threshold ⇒ Object
The configuration of the credit balance threshold.
-
#expand ⇒ Object
Specifies which fields in the response should be expanded.
-
#spend_threshold ⇒ Object
The configuration of the spend threshold.
-
#title ⇒ Object
The title of the alert.
-
#usage_threshold ⇒ Object
The configuration of the usage threshold.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(alert_type: nil, credit_balance_threshold: nil, expand: nil, spend_threshold: nil, title: nil, usage_threshold: nil) ⇒ AlertCreateParams
constructor
A new instance of AlertCreateParams.
Methods inherited from RequestParams
attr_accessor, coerce_params, coerce_value, new, #to_h
Constructor Details
#initialize(alert_type: nil, credit_balance_threshold: nil, expand: nil, spend_threshold: nil, title: nil, usage_threshold: nil) ⇒ AlertCreateParams
Returns a new instance of AlertCreateParams.
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 |
# File 'lib/stripe/params/billing/alert_create_params.rb', line 275 def initialize( alert_type: nil, credit_balance_threshold: nil, expand: nil, spend_threshold: nil, title: nil, usage_threshold: nil ) @alert_type = alert_type @credit_balance_threshold = credit_balance_threshold @expand = @spend_threshold = spend_threshold @title = title @usage_threshold = usage_threshold end |
Instance Attribute Details
#alert_type ⇒ Object
The type of alert to create.
263 264 265 |
# File 'lib/stripe/params/billing/alert_create_params.rb', line 263 def alert_type @alert_type end |
#credit_balance_threshold ⇒ Object
The configuration of the credit balance threshold.
265 266 267 |
# File 'lib/stripe/params/billing/alert_create_params.rb', line 265 def credit_balance_threshold @credit_balance_threshold end |
#expand ⇒ Object
Specifies which fields in the response should be expanded.
267 268 269 |
# File 'lib/stripe/params/billing/alert_create_params.rb', line 267 def @expand end |
#spend_threshold ⇒ Object
The configuration of the spend threshold. An event fires when the amount consumed exceeds the threshold, after all credits and discounts are applied but before tax is applied.
269 270 271 |
# File 'lib/stripe/params/billing/alert_create_params.rb', line 269 def spend_threshold @spend_threshold end |
#title ⇒ Object
The title of the alert.
271 272 273 |
# File 'lib/stripe/params/billing/alert_create_params.rb', line 271 def title @title end |
#usage_threshold ⇒ Object
The configuration of the usage threshold.
273 274 275 |
# File 'lib/stripe/params/billing/alert_create_params.rb', line 273 def usage_threshold @usage_threshold end |
Class Method Details
.field_encodings ⇒ Object
291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 |
# File 'lib/stripe/params/billing/alert_create_params.rb', line 291 def self.field_encodings @field_encodings = { credit_balance_threshold: { kind: :object, fields: { lte: { kind: :object, fields: { custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } } }, }, }, }, spend_threshold: { kind: :object, fields: { gte: { kind: :object, fields: { custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } } }, }, }, }, } end |