Class: Stripe::Tax::Transaction::CreateReversalParams::LineItem

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/resources/tax/transaction.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(amount: nil, amount_tax: nil, metadata: nil, original_line_item: nil, quantity: nil, reference: nil) ⇒ LineItem

Returns a new instance of LineItem.



255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
# File 'lib/stripe/resources/tax/transaction.rb', line 255

def initialize(
  amount: nil,
  amount_tax: nil,
  metadata: nil,
  original_line_item: nil,
  quantity: nil,
  reference: nil
)
  @amount = amount
  @amount_tax = amount_tax
  @metadata = 
  @original_line_item = original_line_item
  @quantity = quantity
  @reference = reference
end

Instance Attribute Details

#amountObject

The amount to reverse, in the [smallest currency unit](stripe.com/docs/currencies#zero-decimal) in negative.



243
244
245
# File 'lib/stripe/resources/tax/transaction.rb', line 243

def amount
  @amount
end

#amount_taxObject

The amount of tax to reverse, in the [smallest currency unit](stripe.com/docs/currencies#zero-decimal) in negative.



245
246
247
# File 'lib/stripe/resources/tax/transaction.rb', line 245

def amount_tax
  @amount_tax
end

#metadataObject

Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.



247
248
249
# File 'lib/stripe/resources/tax/transaction.rb', line 247

def 
  @metadata
end

#original_line_itemObject

The ‘id` of the line item to reverse in the original transaction.



249
250
251
# File 'lib/stripe/resources/tax/transaction.rb', line 249

def original_line_item
  @original_line_item
end

#quantityObject

The quantity reversed. Appears in [tax exports](stripe.com/docs/tax/reports), but does not affect the amount of tax reversed.



251
252
253
# File 'lib/stripe/resources/tax/transaction.rb', line 251

def quantity
  @quantity
end

#referenceObject

A custom identifier for this line item in the reversal transaction, such as ‘L1-refund’.



253
254
255
# File 'lib/stripe/resources/tax/transaction.rb', line 253

def reference
  @reference
end