Class: GoCardlessPro::Resources::ScenarioSimulator
- Inherits:
-
Object
- Object
- GoCardlessPro::Resources::ScenarioSimulator
- Defined in:
- lib/gocardless_pro/resources/scenario_simulator.rb
Overview
Scenario Simulators allow you to manually trigger and test certain paths that your integration will encounter in the real world. These endpoints are only active in the sandbox environment.
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
- #api_response ⇒ Object
-
#initialize(object, response = nil) ⇒ ScenarioSimulator
constructor
Initialize a scenario_simulator resource instance.
-
#to_h ⇒ Object
Provides the scenario_simulator resource as a hash of all its readable attributes.
Constructor Details
#initialize(object, response = nil) ⇒ ScenarioSimulator
Initialize a scenario_simulator resource instance
23 24 25 26 27 28 |
# File 'lib/gocardless_pro/resources/scenario_simulator.rb', line 23 def initialize(object, response = nil) @object = object @id = object['id'] @response = response end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
19 20 21 |
# File 'lib/gocardless_pro/resources/scenario_simulator.rb', line 19 def id @id end |
Instance Method Details
#api_response ⇒ Object
30 31 32 |
# File 'lib/gocardless_pro/resources/scenario_simulator.rb', line 30 def api_response ApiResponse.new(@response) end |
#to_h ⇒ Object
Provides the scenario_simulator resource as a hash of all its readable attributes
35 36 37 |
# File 'lib/gocardless_pro/resources/scenario_simulator.rb', line 35 def to_h @object end |