Class: Stripe::Order::UpdateParams::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.



2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
# File 'lib/stripe/resources/order.rb', line 2116

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.



2100
2101
2102
# File 'lib/stripe/resources/order.rb', line 2100

def category
  @category
end

#descriptionObject

Description of the line item.



2102
2103
2104
# File 'lib/stripe/resources/order.rb', line 2102

def description
  @description
end

#nameObject

Descriptive name of the line item.



2104
2105
2106
# File 'lib/stripe/resources/order.rb', line 2104

def name
  @name
end

#quantityObject

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



2106
2107
2108
# File 'lib/stripe/resources/order.rb', line 2106

def quantity
  @quantity
end

#skuObject

Client facing stock keeping unit, article number or similar.



2108
2109
2110
# File 'lib/stripe/resources/order.rb', line 2108

def sku
  @sku
end

#sold_byObject

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



2110
2111
2112
# File 'lib/stripe/resources/order.rb', line 2110

def sold_by
  @sold_by
end

#taxObject

The tax information for the line item.



2112
2113
2114
# File 'lib/stripe/resources/order.rb', line 2112

def tax
  @tax
end

#unit_amountObject

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



2114
2115
2116
# File 'lib/stripe/resources/order.rb', line 2114

def unit_amount
  @unit_amount
end