Class: Stripe::PriceService::UpdateParams::CurrencyOptions::CustomUnitAmount

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



388
389
390
391
392
393
# File 'lib/stripe/services/price_service.rb', line 388

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



380
381
382
# File 'lib/stripe/services/price_service.rb', line 380

def enabled
  @enabled
end

#maximumObject

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



382
383
384
# File 'lib/stripe/services/price_service.rb', line 382

def maximum
  @maximum
end

#minimumObject

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



384
385
386
# File 'lib/stripe/services/price_service.rb', line 384

def minimum
  @minimum
end

#presetObject

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



386
387
388
# File 'lib/stripe/services/price_service.rb', line 386

def preset
  @preset
end