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

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

Defined Under Namespace

Classes: Amount, CustomPricingUnit

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

attr_accessor, coerce_params, coerce_value, new, #to_h

Constructor Details

#initialize(amount: nil, custom_pricing_unit: nil, type: nil) ⇒ Gte

Returns a new instance of Gte.



196
197
198
199
200
# File 'lib/stripe/params/billing/alert_create_params.rb', line 196

def initialize(amount: nil, custom_pricing_unit: nil, type: nil)
  @amount = amount
  @custom_pricing_unit = custom_pricing_unit
  @type = type
end

Instance Attribute Details

#amountObject

The monetary amount. Required when type is ‘amount`. The threshold is the total_before_tax, the amount consumed after all credits and discounts are applied, but before tax is applied.



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

def amount
  @amount
end

#custom_pricing_unitObject

The custom pricing unit amount. Required when type is ‘custom_pricing_unit`.



192
193
194
# File 'lib/stripe/params/billing/alert_create_params.rb', line 192

def custom_pricing_unit
  @custom_pricing_unit
end

#typeObject

The type of the threshold amount.



194
195
196
# File 'lib/stripe/params/billing/alert_create_params.rb', line 194

def type
  @type
end

Class Method Details

.field_encodingsObject



202
203
204
205
206
# File 'lib/stripe/params/billing/alert_create_params.rb', line 202

def self.field_encodings
  @field_encodings = {
    custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } },
  }
end