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(card_payment_id: , amount: nil, request_options: {}) ⇒ Increase::Models::CardPayment
Some parameter documentations has been truncated, see Models::Simulations::CardReversalCreateParams for more details.
-
#initialize(client:) ⇒ CardReversals
constructor
private
A new instance of CardReversals.
Constructor Details
#initialize(client:) ⇒ CardReversals
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of CardReversals.
40 41 42 |
# File 'lib/increase/resources/simulations/card_reversals.rb', line 40 def initialize(client:) @client = client end |
Instance Method Details
#create(card_payment_id: , amount: nil, request_options: {}) ⇒ Increase::Models::CardPayment
Some parameter documentations has been truncated, see Models::Simulations::CardReversalCreateParams for more details.
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.
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/increase/resources/simulations/card_reversals.rb', line 26 def create(params) parsed, = Increase::Simulations::CardReversalCreateParams.dump_request(params) @client.request( method: :post, path: "simulations/card_reversals", body: parsed, model: Increase::CardPayment, options: ) end |