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

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

Returns a new instance of LineItem.



367
368
369
370
371
# File 'lib/stripe/services/payment_link_service.rb', line 367

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 this item’s quantity to be adjusted by the customer during checkout.



361
362
363
# File 'lib/stripe/services/payment_link_service.rb', line 361

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.



363
364
365
# File 'lib/stripe/services/payment_link_service.rb', line 363

def price
  @price
end

#quantityObject

The quantity of the line item being purchased.



365
366
367
# File 'lib/stripe/services/payment_link_service.rb', line 365

def quantity
  @quantity
end