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

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.

Parameters:



38
39
40
# File 'lib/increase/resources/simulations/card_refunds.rb', line 38

def initialize(client:)
  @client = client
end

Instance Method Details

#create(pending_transaction_id: nil, transaction_id: nil, request_options: {}) ⇒ Increase::Models::Transaction

Some parameter documentations has been truncated, see Models::Simulations::CardRefundCreateParams for more details.

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

Parameters:

  • pending_transaction_id (String)

    The identifier of the Pending Transaction for the refund authorization. If this

  • transaction_id (String)

    The identifier for the Transaction to refund. The Transaction’s source must have

  • request_options (Increase::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



24
25
26
27
28
29
30
31
32
33
# File 'lib/increase/resources/simulations/card_refunds.rb', line 24

def create(params = {})
  parsed, options = Increase::Simulations::CardRefundCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "simulations/card_refunds",
    body: parsed,
    model: Increase::Transaction,
    options: options
  )
end