Class: Stripe::Tax::Transaction::CreateReversalParams
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::Tax::Transaction::CreateReversalParams
- Defined in:
- lib/stripe/resources/tax/transaction.rb
Defined Under Namespace
Classes: LineItem, ShippingCost
Instance Attribute Summary collapse
-
#expand ⇒ Object
Specifies which fields in the response should be expanded.
-
#flat_amount ⇒ Object
A flat amount to reverse across the entire transaction, in the [smallest currency unit](stripe.com/docs/currencies#zero-decimal) in negative.
-
#line_items ⇒ Object
The line item amounts to reverse.
-
#metadata ⇒ Object
Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object.
-
#mode ⇒ Object
If ‘partial`, the provided line item or shipping cost amounts are reversed.
-
#original_transaction ⇒ Object
The ID of the Transaction to partially or fully reverse.
-
#reference ⇒ Object
A custom identifier for this reversal, such as ‘myOrder_123-refund_1`, which must be unique across all transactions.
-
#shipping_cost ⇒ Object
The shipping cost to reverse.
Instance Method Summary collapse
-
#initialize(expand: nil, flat_amount: nil, line_items: nil, metadata: nil, mode: nil, original_transaction: nil, reference: nil, shipping_cost: nil) ⇒ CreateReversalParams
constructor
A new instance of CreateReversalParams.
Methods inherited from RequestParams
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.
220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 |
# File 'lib/stripe/resources/tax/transaction.rb', line 220 def initialize( expand: nil, flat_amount: nil, line_items: nil, metadata: nil, mode: nil, original_transaction: nil, reference: nil, shipping_cost: nil ) @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
#expand ⇒ Object
Specifies which fields in the response should be expanded.
204 205 206 |
# File 'lib/stripe/resources/tax/transaction.rb', line 204 def @expand end |
#flat_amount ⇒ Object
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.
206 207 208 |
# File 'lib/stripe/resources/tax/transaction.rb', line 206 def flat_amount @flat_amount end |
#line_items ⇒ Object
The line item amounts to reverse.
208 209 210 |
# File 'lib/stripe/resources/tax/transaction.rb', line 208 def line_items @line_items end |
#metadata ⇒ Object
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`.
210 211 212 |
# File 'lib/stripe/resources/tax/transaction.rb', line 210 def @metadata end |
#mode ⇒ Object
If ‘partial`, the provided line item or shipping cost amounts are reversed. If `full`, the original transaction is fully reversed.
212 213 214 |
# File 'lib/stripe/resources/tax/transaction.rb', line 212 def mode @mode end |
#original_transaction ⇒ Object
The ID of the Transaction to partially or fully reverse.
214 215 216 |
# File 'lib/stripe/resources/tax/transaction.rb', line 214 def original_transaction @original_transaction end |
#reference ⇒ Object
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).
216 217 218 |
# File 'lib/stripe/resources/tax/transaction.rb', line 216 def reference @reference end |
#shipping_cost ⇒ Object
The shipping cost to reverse.
218 219 220 |
# File 'lib/stripe/resources/tax/transaction.rb', line 218 def shipping_cost @shipping_cost end |