Class: Stripe::Checkout::SessionService::CreateParams::OptionalItem::AdjustableQuantity

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/services/checkout/session_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) ⇒ AdjustableQuantity

Returns a new instance of AdjustableQuantity.



567
568
569
570
571
# File 'lib/stripe/services/checkout/session_service.rb', line 567

def initialize(enabled: nil, maximum: nil, minimum: nil)
  @enabled = enabled
  @maximum = maximum
  @minimum = minimum
end

Instance Attribute Details

#enabledObject

Set to true if the quantity can be adjusted to any non-negative integer.



561
562
563
# File 'lib/stripe/services/checkout/session_service.rb', line 561

def enabled
  @enabled
end

#maximumObject

The maximum quantity of this item the customer can purchase. By default this value is 99. You can specify a value up to 999999.



563
564
565
# File 'lib/stripe/services/checkout/session_service.rb', line 563

def maximum
  @maximum
end

#minimumObject

The minimum quantity of this item the customer must purchase, if they choose to purchase it. Because this item is optional, the customer will always be able to remove it from their order, even if the ‘minimum` configured here is greater than 0. By default this value is 0.



565
566
567
# File 'lib/stripe/services/checkout/session_service.rb', line 565

def minimum
  @minimum
end