Class: Stripe::Checkout::SessionService::CreateParams::OptionalItem
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::Checkout::SessionService::CreateParams::OptionalItem
- Defined in:
- lib/stripe/services/checkout/session_service.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.
585 586 587 588 589 |
# File 'lib/stripe/services/checkout/session_service.rb', line 585 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.
579 580 581 |
# File 'lib/stripe/services/checkout/session_service.rb', line 579 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.
581 582 583 |
# File 'lib/stripe/services/checkout/session_service.rb', line 581 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.
583 584 585 |
# File 'lib/stripe/services/checkout/session_service.rb', line 583 def quantity @quantity end |