Class: Stripe::Checkout::SessionCreateParams::OptionalItem
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::Checkout::SessionCreateParams::OptionalItem
- Defined in:
- lib/stripe/params/checkout/session_create_params.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](docs.stripe.com/api/prices) or [Plan](docs.stripe.com/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
attr_accessor, coerce_params, coerce_value, field_encodings, new, #to_h
Constructor Details
#initialize(adjustable_quantity: nil, price: nil, quantity: nil) ⇒ OptionalItem
Returns a new instance of OptionalItem.
671 672 673 674 675 |
# File 'lib/stripe/params/checkout/session_create_params.rb', line 671 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.
665 666 667 |
# File 'lib/stripe/params/checkout/session_create_params.rb', line 665 def adjustable_quantity @adjustable_quantity end |
#price ⇒ Object
The ID of the [Price](docs.stripe.com/api/prices) or [Plan](docs.stripe.com/api/plans) object.
667 668 669 |
# File 'lib/stripe/params/checkout/session_create_params.rb', line 667 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.
669 670 671 |
# File 'lib/stripe/params/checkout/session_create_params.rb', line 669 def quantity @quantity end |