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.



1049
1050
1051
1052
1053
1054
# File 'lib/stripe/resources/payment_link.rb', line 1049

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.



1041
1042
1043
# File 'lib/stripe/resources/payment_link.rb', line 1041

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. One of ‘price` or `price_data` is required.



1043
1044
1045
# File 'lib/stripe/resources/payment_link.rb', line 1043

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.



1045
1046
1047
# File 'lib/stripe/resources/payment_link.rb', line 1045

def price_data
  @price_data
end

#quantityObject

The quantity of the line item being purchased.



1047
1048
1049
# File 'lib/stripe/resources/payment_link.rb', line 1047

def quantity
  @quantity
end