Class: Increase::Resources::Simulations::CardRefunds

Inherits:
Object
  • Object
show all
Defined in:
lib/increase/resources/simulations/card_refunds.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ CardRefunds

Returns a new instance of CardRefunds.



7
8
9
# File 'lib/increase/resources/simulations/card_refunds.rb', line 7

def initialize(client:)
  @client = client
end

Instance Method Details

#create(params = {}, opts = {}) ⇒ Increase::Models::Transaction

Simulates refunding a card transaction. The full value of the original sandbox transaction is refunded.

Parameters:

  • params (Hash) (defaults to: {})

    Attributes to send in this request.

  • opts (Hash|RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Options Hash (params):

  • :transaction_id (String)

    The identifier for the Transaction to refund. The Transaction's source must have a category of card_settlement.

Returns:



21
22
23
24
25
26
27
28
# File 'lib/increase/resources/simulations/card_refunds.rb', line 21

def create(params = {}, opts = {})
  req = {}
  req[:method] = :post
  req[:path] = "/simulations/card_refunds"
  req[:body] = params
  req[:model] = Increase::Models::Transaction
  @client.request(req, opts)
end