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.



215
216
217
218
219
220
# File 'lib/stripe/resources/product.rb', line 215

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



207
208
209
# File 'lib/stripe/resources/product.rb', line 207

def enabled
  @enabled
end

#maximumObject

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



209
210
211
# File 'lib/stripe/resources/product.rb', line 209

def maximum
  @maximum
end

#minimumObject

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



211
212
213
# File 'lib/stripe/resources/product.rb', line 211

def minimum
  @minimum
end

#presetObject

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



213
214
215
# File 'lib/stripe/resources/product.rb', line 213

def preset
  @preset
end