Class: Stripe::Checkout::SessionService::UpdateParams::LineItem

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/services/checkout/session_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, id: nil, metadata: nil, price: nil, quantity: nil, tax_rates: nil) ⇒ LineItem

Returns a new instance of LineItem.



2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
# File 'lib/stripe/services/checkout/session_service.rb', line 2347

def initialize(
  adjustable_quantity: nil,
  id: nil,
  metadata: nil,
  price: nil,
  quantity: nil,
  tax_rates: nil
)
  @adjustable_quantity = adjustable_quantity
  @id = id
  @metadata = 
  @price = price
  @quantity = quantity
  @tax_rates = tax_rates
end

Instance Attribute Details

#adjustable_quantityObject

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



2335
2336
2337
# File 'lib/stripe/services/checkout/session_service.rb', line 2335

def adjustable_quantity
  @adjustable_quantity
end

#idObject

ID of an existing line item.



2337
2338
2339
# File 'lib/stripe/services/checkout/session_service.rb', line 2337

def id
  @id
end

#metadataObject

Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to ‘metadata`.



2339
2340
2341
# File 'lib/stripe/services/checkout/session_service.rb', line 2339

def 
  @metadata
end

#priceObject

The ID of the [Price](stripe.com/docs/api/prices).



2341
2342
2343
# File 'lib/stripe/services/checkout/session_service.rb', line 2341

def price
  @price
end

#quantityObject

The quantity of the line item being purchased.



2343
2344
2345
# File 'lib/stripe/services/checkout/session_service.rb', line 2343

def quantity
  @quantity
end

#tax_ratesObject

The [tax rates](stripe.com/docs/api/tax_rates) which apply to this line item.



2345
2346
2347
# File 'lib/stripe/services/checkout/session_service.rb', line 2345

def tax_rates
  @tax_rates
end