Class: Stripe::Product::CreateParams::DefaultPriceData::CurrencyOptions::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.



281
282
283
284
285
286
# File 'lib/stripe/resources/product.rb', line 281

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`.



270
271
272
# File 'lib/stripe/resources/product.rb', line 270

def enabled
  @enabled
end

#maximumObject

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



273
274
275
# File 'lib/stripe/resources/product.rb', line 273

def maximum
  @maximum
end

#minimumObject

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



276
277
278
# File 'lib/stripe/resources/product.rb', line 276

def minimum
  @minimum
end

#presetObject

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



279
280
281
# File 'lib/stripe/resources/product.rb', line 279

def preset
  @preset
end