Class: FluvPay::Resources::Sandbox

Inherits:
Object
  • Object
show all
Defined in:
lib/fluvpay/resources/sandbox.rb

Overview

Utilitários de teste, disponíveis apenas com chave fluv_test_.

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Sandbox

Returns a new instance of Sandbox.



7
8
9
# File 'lib/fluvpay/resources/sandbox.rb', line 7

def initialize(client)
  @client = client
end

Instance Method Details

#resetHash

Apaga todos os dados do sandbox (só chave de teste).

Returns:

  • (Hash)

    resultado com reset, deleted_charges e merchant_id.



14
15
16
# File 'lib/fluvpay/resources/sandbox.rb', line 14

def reset
  @client.request(:post, "/test/reset")
end

#scenariosHash

Lista os valores mágicos do sandbox.

Returns:

  • (Hash)

    com info e a lista scenarios.



21
22
23
# File 'lib/fluvpay/resources/sandbox.rb', line 21

def scenarios
  @client.request(:get, "/test/scenarios")
end