Class: Stripe::ProductCreateParams::DefaultPriceData::CustomUnitAmount
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::ProductCreateParams::DefaultPriceData::CustomUnitAmount
- Defined in:
- lib/stripe/params/product_create_params.rb
Instance Attribute Summary collapse
-
#enabled ⇒ Object
Pass in
trueto enablecustom_unit_amount, otherwise omitcustom_unit_amount. -
#maximum ⇒ Object
The maximum unit amount the customer can specify for this item.
-
#minimum ⇒ Object
The minimum unit amount the customer can specify for this item.
-
#preset ⇒ Object
The starting unit amount which can be updated by the customer.
Instance Method Summary collapse
-
#initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil) ⇒ CustomUnitAmount
constructor
A new instance of CustomUnitAmount.
Methods inherited from RequestParams
attr_accessor, coerce_params, coerce_value, field_encodings, new, #to_h
Constructor Details
#initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil) ⇒ CustomUnitAmount
Returns a new instance of CustomUnitAmount.
111 112 113 114 115 116 |
# File 'lib/stripe/params/product_create_params.rb', line 111 def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil) @enabled = enabled @maximum = maximum @minimum = minimum @preset = preset end |
Instance Attribute Details
#enabled ⇒ Object
Pass in true to enable custom_unit_amount, otherwise omit custom_unit_amount.
103 104 105 |
# File 'lib/stripe/params/product_create_params.rb', line 103 def enabled @enabled end |
#maximum ⇒ Object
The maximum unit amount the customer can specify for this item.
105 106 107 |
# File 'lib/stripe/params/product_create_params.rb', line 105 def maximum @maximum end |
#minimum ⇒ Object
The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount.
107 108 109 |
# File 'lib/stripe/params/product_create_params.rb', line 107 def minimum @minimum end |
#preset ⇒ Object
The starting unit amount which can be updated by the customer.
109 110 111 |
# File 'lib/stripe/params/product_create_params.rb', line 109 def preset @preset end |