Class: Stripe::V2::Payments::OffSessionPaymentCaptureParams::AmountDetails::LineItem

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/params/v2/payments/off_session_payment_capture_params.rb

Defined Under Namespace

Classes: Tax

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

attr_accessor, coerce_params, coerce_value, field_encodings, new, #to_h

Constructor Details

#initialize(discount_amount: 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.



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/stripe/params/v2/payments/off_session_payment_capture_params.rb', line 34

def initialize(
  discount_amount: nil,
  product_code: nil,
  product_name: nil,
  quantity: nil,
  tax: nil,
  unit_cost: nil,
  unit_of_measure: nil
)
  @discount_amount = discount_amount
  @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.



19
20
21
# File 'lib/stripe/params/v2/payments/off_session_payment_capture_params.rb', line 19

def discount_amount
  @discount_amount
end

#product_codeObject

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



21
22
23
# File 'lib/stripe/params/v2/payments/off_session_payment_capture_params.rb', line 21

def product_code
  @product_code
end

#product_nameObject

Name of the product. At most 100 characters long.



23
24
25
# File 'lib/stripe/params/v2/payments/off_session_payment_capture_params.rb', line 23

def product_name
  @product_name
end

#quantityObject

Number of items of the product. Positive integer.



25
26
27
# File 'lib/stripe/params/v2/payments/off_session_payment_capture_params.rb', line 25

def quantity
  @quantity
end

#taxObject

Contains information about the tax on the item.



27
28
29
# File 'lib/stripe/params/v2/payments/off_session_payment_capture_params.rb', line 27

def tax
  @tax
end

#unit_costObject

Cost of the product. Positive integer.



29
30
31
# File 'lib/stripe/params/v2/payments/off_session_payment_capture_params.rb', line 29

def unit_cost
  @unit_cost
end

#unit_of_measureObject

A unit of measure for the line item, such as gallons, feet, meters, etc. The maximum length is 12 characters.



32
33
34
# File 'lib/stripe/params/v2/payments/off_session_payment_capture_params.rb', line 32

def unit_of_measure
  @unit_of_measure
end