Class: Stripe::PaymentLinkService::CreateParams::LineItem

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



448
449
450
451
452
453
# File 'lib/stripe/services/payment_link_service.rb', line 448

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.



440
441
442
# File 'lib/stripe/services/payment_link_service.rb', line 440

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.



442
443
444
# File 'lib/stripe/services/payment_link_service.rb', line 442

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.



444
445
446
# File 'lib/stripe/services/payment_link_service.rb', line 444

def price_data
  @price_data
end

#quantityObject

The quantity of the line item being purchased.



446
447
448
# File 'lib/stripe/services/payment_link_service.rb', line 446

def quantity
  @quantity
end