Class: Stripe::Checkout::Session::CreateParams::OptionalItem

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/resources/checkout/session.rb

Defined Under Namespace

Classes: AdjustableQuantity

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(adjustable_quantity: nil, price: nil, quantity: nil) ⇒ OptionalItem

Returns a new instance of OptionalItem.



2788
2789
2790
2791
2792
# File 'lib/stripe/resources/checkout/session.rb', line 2788

def initialize(adjustable_quantity: nil, price: nil, quantity: nil)
  @adjustable_quantity = adjustable_quantity
  @price = price
  @quantity = quantity
end

Instance Attribute Details

#adjustable_quantityObject

When set, provides configuration for the customer to adjust the quantity of the line item created when a customer chooses to add this optional item to their order.



2782
2783
2784
# File 'lib/stripe/resources/checkout/session.rb', line 2782

def adjustable_quantity
  @adjustable_quantity
end

#priceObject

The ID of the [Price](stripe.com/docs/api/prices) or [Plan](stripe.com/docs/api/plans) object.



2784
2785
2786
# File 'lib/stripe/resources/checkout/session.rb', line 2784

def price
  @price
end

#quantityObject

The initial quantity of the line item created when a customer chooses to add this optional item to their order.



2786
2787
2788
# File 'lib/stripe/resources/checkout/session.rb', line 2786

def quantity
  @quantity
end