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

attr_accessor, coerce_params, coerce_value, field_encodings, new, #to_h

Constructor Details

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



623
624
625
626
627
# File 'lib/stripe/params/checkout/session_create_params.rb', line 623

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.



617
618
619
# File 'lib/stripe/params/checkout/session_create_params.rb', line 617

def adjustable_quantity
  @adjustable_quantity
end

#priceObject

The ID of the Price or Plan object.



619
620
621
# File 'lib/stripe/params/checkout/session_create_params.rb', line 619

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.



621
622
623
# File 'lib/stripe/params/checkout/session_create_params.rb', line 621

def quantity
  @quantity
end