Class: Stripe::PaymentLink::CreateParams::LineItem

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/resources/payment_link.rb

Defined Under Namespace

Classes: AdjustableQuantity, PriceData

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(adjustable_quantity: nil, price: nil, price_data: nil, quantity: nil) ⇒ LineItem

Returns a new instance of LineItem.



736
737
738
739
740
741
# File 'lib/stripe/resources/payment_link.rb', line 736

def initialize(adjustable_quantity: nil, price: nil, price_data: nil, quantity: nil)
  @adjustable_quantity = adjustable_quantity
  @price = price
  @price_data = price_data
  @quantity = quantity
end

Instance Attribute Details

#adjustable_quantityObject

When set, provides configuration for this item’s quantity to be adjusted by the customer during checkout.



728
729
730
# File 'lib/stripe/resources/payment_link.rb', line 728

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.



730
731
732
# File 'lib/stripe/resources/payment_link.rb', line 730

def price
  @price
end

#price_dataObject

Data used to generate a new [Price](stripe.com/docs/api/prices) object inline. One of ‘price` or `price_data` is required.



732
733
734
# File 'lib/stripe/resources/payment_link.rb', line 732

def price_data
  @price_data
end

#quantityObject

The quantity of the line item being purchased.



734
735
736
# File 'lib/stripe/resources/payment_link.rb', line 734

def quantity
  @quantity
end