Class: Increase::Resources::Simulations::CardReversals
- Inherits:
-
Object
- Object
- Increase::Resources::Simulations::CardReversals
- Defined in:
- lib/increase/resources/simulations/card_reversals.rb
Instance Method Summary collapse
-
#create(params = {}, opts = {}) ⇒ Increase::Models::CardPayment
Simulates the reversal of an authorization by a card acquirer.
-
#initialize(client:) ⇒ CardReversals
constructor
A new instance of CardReversals.
Constructor Details
#initialize(client:) ⇒ CardReversals
Returns a new instance of CardReversals.
7 8 9 |
# File 'lib/increase/resources/simulations/card_reversals.rb', line 7 def initialize(client:) @client = client end |
Instance Method Details
#create(params = {}, opts = {}) ⇒ Increase::Models::CardPayment
Simulates the reversal of an authorization by a card acquirer. An authorization can be partially reversed multiple times, up until the total authorized amount. Marks the pending transaction as complete if the authorization is fully reversed.
24 25 26 27 28 29 30 31 |
# File 'lib/increase/resources/simulations/card_reversals.rb', line 24 def create(params = {}, opts = {}) req = {} req[:method] = :post req[:path] = "/simulations/card_reversals" req[:body] = params req[:model] = Increase::Models::CardPayment @client.request(req, opts) end |