Class: Stripe::PaymentIntentService::ConfirmParams::AmountDetails::LineItem

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/services/payment_intent_service.rb

Defined Under Namespace

Classes: PaymentMethodOptions, Tax

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(discount_amount: nil, payment_method_options: nil, product_code: nil, product_name: nil, quantity: nil, tax: nil, unit_cost: nil, unit_of_measure: nil) ⇒ LineItem

Returns a new instance of LineItem.



8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
# File 'lib/stripe/services/payment_intent_service.rb', line 8720

def initialize(
  discount_amount: nil,
  payment_method_options: nil,
  product_code: nil,
  product_name: nil,
  quantity: nil,
  tax: nil,
  unit_cost: nil,
  unit_of_measure: nil
)
  @discount_amount = discount_amount
  @payment_method_options = payment_method_options
  @product_code = product_code
  @product_name = product_name
  @quantity = quantity
  @tax = tax
  @unit_cost = unit_cost
  @unit_of_measure = unit_of_measure
end

Instance Attribute Details

#discount_amountObject

The amount an item was discounted for. Positive integer.



8704
8705
8706
# File 'lib/stripe/services/payment_intent_service.rb', line 8704

def discount_amount
  @discount_amount
end

#payment_method_optionsObject

Payment method-specific information for line items.



8706
8707
8708
# File 'lib/stripe/services/payment_intent_service.rb', line 8706

def payment_method_options
  @payment_method_options
end

#product_codeObject

Unique identifier of the product. At most 12 characters long.



8708
8709
8710
# File 'lib/stripe/services/payment_intent_service.rb', line 8708

def product_code
  @product_code
end

#product_nameObject

Name of the product. At most 100 characters long.



8710
8711
8712
# File 'lib/stripe/services/payment_intent_service.rb', line 8710

def product_name
  @product_name
end

#quantityObject

Number of items of the product. Positive integer.



8712
8713
8714
# File 'lib/stripe/services/payment_intent_service.rb', line 8712

def quantity
  @quantity
end

#taxObject

Contains information about the tax on the item.



8714
8715
8716
# File 'lib/stripe/services/payment_intent_service.rb', line 8714

def tax
  @tax
end

#unit_costObject

Cost of the product. Non-negative integer.



8716
8717
8718
# File 'lib/stripe/services/payment_intent_service.rb', line 8716

def unit_cost
  @unit_cost
end

#unit_of_measureObject

A unit of measure for the line item, such as gallons, feet, meters, etc.



8718
8719
8720
# File 'lib/stripe/services/payment_intent_service.rb', line 8718

def unit_of_measure
  @unit_of_measure
end