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

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

Defined Under Namespace

Classes: LineItem, ShippingCost

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(expand: nil, flat_amount: nil, line_items: nil, metadata: nil, mode: nil, original_transaction: nil, reference: nil, shipping_cost: nil) ⇒ CreateReversalParams

Returns a new instance of CreateReversalParams.



229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
# File 'lib/stripe/resources/tax/transaction.rb', line 229

def initialize(
  expand: nil,
  flat_amount: nil,
  line_items: nil,
  metadata: nil,
  mode: nil,
  original_transaction: nil,
  reference: nil,
  shipping_cost: nil
)
  @expand = expand
  @flat_amount = flat_amount
  @line_items = line_items
  @metadata = 
  @mode = mode
  @original_transaction = original_transaction
  @reference = reference
  @shipping_cost = shipping_cost
end

Instance Attribute Details

#expandObject

Specifies which fields in the response should be expanded.



213
214
215
# File 'lib/stripe/resources/tax/transaction.rb', line 213

def expand
  @expand
end

#flat_amountObject

A flat amount to reverse across the entire transaction, in the [smallest currency unit](stripe.com/docs/currencies#zero-decimal) in negative. This value represents the total amount to refund from the transaction, including taxes.



215
216
217
# File 'lib/stripe/resources/tax/transaction.rb', line 215

def flat_amount
  @flat_amount
end

#line_itemsObject

The line item amounts to reverse.



217
218
219
# File 'lib/stripe/resources/tax/transaction.rb', line 217

def line_items
  @line_items
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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to ‘metadata`.



219
220
221
# File 'lib/stripe/resources/tax/transaction.rb', line 219

def 
  @metadata
end

#modeObject

If ‘partial`, the provided line item or shipping cost amounts are reversed. If `full`, the original transaction is fully reversed.



221
222
223
# File 'lib/stripe/resources/tax/transaction.rb', line 221

def mode
  @mode
end

#original_transactionObject

The ID of the Transaction to partially or fully reverse.



223
224
225
# File 'lib/stripe/resources/tax/transaction.rb', line 223

def original_transaction
  @original_transaction
end

#referenceObject

A custom identifier for this reversal, such as ‘myOrder_123-refund_1`, which must be unique across all transactions. The reference helps identify this reversal transaction in exported [tax reports](stripe.com/docs/tax/reports).



225
226
227
# File 'lib/stripe/resources/tax/transaction.rb', line 225

def reference
  @reference
end

#shipping_costObject

The shipping cost to reverse.



227
228
229
# File 'lib/stripe/resources/tax/transaction.rb', line 227

def shipping_cost
  @shipping_cost
end