Class: Stripe::ProductService::CreateParams::DefaultPriceData::CurrencyOptions::CustomUnitAmount

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/services/product_service.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.



194
195
196
197
198
199
# File 'lib/stripe/services/product_service.rb', line 194

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



186
187
188
# File 'lib/stripe/services/product_service.rb', line 186

def enabled
  @enabled
end

#maximumObject

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



188
189
190
# File 'lib/stripe/services/product_service.rb', line 188

def maximum
  @maximum
end

#minimumObject

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



190
191
192
# File 'lib/stripe/services/product_service.rb', line 190

def minimum
  @minimum
end

#presetObject

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



192
193
194
# File 'lib/stripe/services/product_service.rb', line 192

def preset
  @preset
end