Class: Stripe::Product::CreateParams::DefaultPriceData::CustomUnitAmount

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/resources/product.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil) ⇒ CustomUnitAmount

Returns a new instance of CustomUnitAmount.



301
302
303
304
305
306
# File 'lib/stripe/resources/product.rb', line 301

def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil)
  @enabled = enabled
  @maximum = maximum
  @minimum = minimum
  @preset = preset
end

Instance Attribute Details

#enabledObject

Pass in ‘true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`.



293
294
295
# File 'lib/stripe/resources/product.rb', line 293

def enabled
  @enabled
end

#maximumObject

The maximum unit amount the customer can specify for this item.



295
296
297
# File 'lib/stripe/resources/product.rb', line 295

def maximum
  @maximum
end

#minimumObject

The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.



297
298
299
# File 'lib/stripe/resources/product.rb', line 297

def minimum
  @minimum
end

#presetObject

The starting unit amount which can be updated by the customer.



299
300
301
# File 'lib/stripe/resources/product.rb', line 299

def preset
  @preset
end