Class: Stripe::PriceService::CreateParams::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.



101
102
103
104
105
106
# File 'lib/stripe/services/price_service.rb', line 101

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



93
94
95
# File 'lib/stripe/services/price_service.rb', line 93

def enabled
  @enabled
end

#maximumObject

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



95
96
97
# File 'lib/stripe/services/price_service.rb', line 95

def maximum
  @maximum
end

#minimumObject

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



97
98
99
# File 'lib/stripe/services/price_service.rb', line 97

def minimum
  @minimum
end

#presetObject

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



99
100
101
# File 'lib/stripe/services/price_service.rb', line 99

def preset
  @preset
end