Class: Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Paypal::LineItem

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

Defined Under Namespace

Classes: Tax

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(category: nil, description: nil, name: nil, quantity: nil, sku: nil, sold_by: nil, tax: nil, unit_amount: nil) ⇒ LineItem

Returns a new instance of LineItem.



4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
# File 'lib/stripe/resources/payment_intent.rb', line 4328

def initialize(
  category: nil,
  description: nil,
  name: nil,
  quantity: nil,
  sku: nil,
  sold_by: nil,
  tax: nil,
  unit_amount: nil
)
  @category = category
  @description = description
  @name = name
  @quantity = quantity
  @sku = sku
  @sold_by = sold_by
  @tax = tax
  @unit_amount = unit_amount
end

Instance Attribute Details

#categoryObject

Type of the line item.



4312
4313
4314
# File 'lib/stripe/resources/payment_intent.rb', line 4312

def category
  @category
end

#descriptionObject

Description of the line item.



4314
4315
4316
# File 'lib/stripe/resources/payment_intent.rb', line 4314

def description
  @description
end

#nameObject

Descriptive name of the line item.



4316
4317
4318
# File 'lib/stripe/resources/payment_intent.rb', line 4316

def name
  @name
end

#quantityObject

Quantity of the line item. Must be a positive number.



4318
4319
4320
# File 'lib/stripe/resources/payment_intent.rb', line 4318

def quantity
  @quantity
end

#skuObject

Client facing stock keeping unit, article number or similar.



4320
4321
4322
# File 'lib/stripe/resources/payment_intent.rb', line 4320

def sku
  @sku
end

#sold_byObject

The Stripe account ID of the connected account that sells the item.



4322
4323
4324
# File 'lib/stripe/resources/payment_intent.rb', line 4322

def sold_by
  @sold_by
end

#taxObject

The tax information for the line item.



4324
4325
4326
# File 'lib/stripe/resources/payment_intent.rb', line 4324

def tax
  @tax
end

#unit_amountObject

Price for a single unit of the line item in minor units. Cannot be a negative number.



4326
4327
4328
# File 'lib/stripe/resources/payment_intent.rb', line 4326

def unit_amount
  @unit_amount
end