Class: Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::Paypal::LineItem

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



1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
# File 'lib/stripe/resources/order.rb', line 1251

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.



1228
1229
1230
# File 'lib/stripe/resources/order.rb', line 1228

def category
  @category
end

#descriptionObject

Description of the line item.



1231
1232
1233
# File 'lib/stripe/resources/order.rb', line 1231

def description
  @description
end

#nameObject

Descriptive name of the line item.



1234
1235
1236
# File 'lib/stripe/resources/order.rb', line 1234

def name
  @name
end

#quantityObject

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



1237
1238
1239
# File 'lib/stripe/resources/order.rb', line 1237

def quantity
  @quantity
end

#skuObject

Client facing stock keeping unit, article number or similar.



1240
1241
1242
# File 'lib/stripe/resources/order.rb', line 1240

def sku
  @sku
end

#sold_byObject

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



1243
1244
1245
# File 'lib/stripe/resources/order.rb', line 1243

def sold_by
  @sold_by
end

#taxObject

The tax information for the line item.



1246
1247
1248
# File 'lib/stripe/resources/order.rb', line 1246

def tax
  @tax
end

#unit_amountObject

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



1249
1250
1251
# File 'lib/stripe/resources/order.rb', line 1249

def unit_amount
  @unit_amount
end