Class: Stripe::Checkout::Session::CreateParams::OptionalItem
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::Checkout::Session::CreateParams::OptionalItem
- Defined in:
- lib/stripe/resources/checkout/session.rb
Defined Under Namespace
Classes: AdjustableQuantity
Instance Attribute Summary collapse
-
#adjustable_quantity ⇒ Object
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.
-
#price ⇒ Object
The ID of the [Price](stripe.com/docs/api/prices) or [Plan](stripe.com/docs/api/plans) object.
-
#quantity ⇒ Object
The initial quantity of the line item created when a customer chooses to add this optional item to their order.
Instance Method Summary collapse
-
#initialize(adjustable_quantity: nil, price: nil, quantity: nil) ⇒ OptionalItem
constructor
A new instance of OptionalItem.
Methods inherited from RequestParams
Constructor Details
#initialize(adjustable_quantity: nil, price: nil, quantity: nil) ⇒ OptionalItem
Returns a new instance of OptionalItem.
1595 1596 1597 1598 1599 |
# File 'lib/stripe/resources/checkout/session.rb', line 1595 def initialize(adjustable_quantity: nil, price: nil, quantity: nil) @adjustable_quantity = adjustable_quantity @price = price @quantity = quantity end |
Instance Attribute Details
#adjustable_quantity ⇒ Object
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.
1589 1590 1591 |
# File 'lib/stripe/resources/checkout/session.rb', line 1589 def adjustable_quantity @adjustable_quantity end |
#price ⇒ Object
The ID of the [Price](stripe.com/docs/api/prices) or [Plan](stripe.com/docs/api/plans) object.
1591 1592 1593 |
# File 'lib/stripe/resources/checkout/session.rb', line 1591 def price @price end |
#quantity ⇒ Object
The initial quantity of the line item created when a customer chooses to add this optional item to their order.
1593 1594 1595 |
# File 'lib/stripe/resources/checkout/session.rb', line 1593 def quantity @quantity end |