Class: Increase::Resources::Simulations::CardRefunds
- Inherits:
-
Object
- Object
- Increase::Resources::Simulations::CardRefunds
- Defined in:
- lib/increase/resources/simulations/card_refunds.rb,
sig/increase/resources/simulations/card_refunds.rbs
Instance Method Summary collapse
-
#create(amount: nil, pending_transaction_id: nil, transaction_id: nil, request_options: {}) ⇒ Increase::Models::Transaction
Simulates refunding a card transaction.
-
#initialize(client:) ⇒ CardRefunds
constructor
private
A new instance of CardRefunds.
Constructor Details
#initialize(client:) ⇒ CardRefunds
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 CardRefunds.
44 45 46 |
# File 'lib/increase/resources/simulations/card_refunds.rb', line 44 def initialize(client:) @client = client end |
Instance Method Details
#create(amount: nil, pending_transaction_id: nil, transaction_id: nil, request_options: {}) ⇒ Increase::Models::Transaction
Simulates refunding a card transaction. The full value of the original sandbox transaction is refunded.
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/increase/resources/simulations/card_refunds.rb', line 30 def create(params = {}) parsed, = Increase::Simulations::CardRefundCreateParams.dump_request(params) @client.request( method: :post, path: "simulations/card_refunds", body: parsed, model: Increase::Transaction, options: ) end |