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

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



592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
# File 'lib/stripe/services/order_service.rb', line 592

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.



576
577
578
# File 'lib/stripe/services/order_service.rb', line 576

def category
  @category
end

#descriptionObject

Description of the line item.



578
579
580
# File 'lib/stripe/services/order_service.rb', line 578

def description
  @description
end

#nameObject

Descriptive name of the line item.



580
581
582
# File 'lib/stripe/services/order_service.rb', line 580

def name
  @name
end

#quantityObject

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



582
583
584
# File 'lib/stripe/services/order_service.rb', line 582

def quantity
  @quantity
end

#skuObject

Client facing stock keeping unit, article number or similar.



584
585
586
# File 'lib/stripe/services/order_service.rb', line 584

def sku
  @sku
end

#sold_byObject

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



586
587
588
# File 'lib/stripe/services/order_service.rb', line 586

def sold_by
  @sold_by
end

#taxObject

The tax information for the line item.



588
589
590
# File 'lib/stripe/services/order_service.rb', line 588

def tax
  @tax
end

#unit_amountObject

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



590
591
592
# File 'lib/stripe/services/order_service.rb', line 590

def unit_amount
  @unit_amount
end