Class: Stripe::Checkout::SessionCreateParams::OptionalItem

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/params/checkout/session_create_params.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



600
601
602
603
604
# File 'lib/stripe/params/checkout/session_create_params.rb', line 600

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.



594
595
596
# File 'lib/stripe/params/checkout/session_create_params.rb', line 594

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.



596
597
598
# File 'lib/stripe/params/checkout/session_create_params.rb', line 596

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.



598
599
600
# File 'lib/stripe/params/checkout/session_create_params.rb', line 598

def quantity
  @quantity
end