Class: Adyen::AdyenResult
- Inherits:
-
Object
- Object
- Adyen::AdyenResult
- Defined in:
- lib/adyen/result.rb
Instance Attribute Summary collapse
-
#header ⇒ Object
readonly
Returns the value of attribute header.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(response, header, status) ⇒ AdyenResult
constructor
A new instance of AdyenResult.
Constructor Details
#initialize(response, header, status) ⇒ AdyenResult
Returns a new instance of AdyenResult.
7 8 9 10 11 12 13 14 |
# File 'lib/adyen/result.rb', line 7 def initialize(response, header, status) @response = JSON.parse(response, object_class: HashWithAccessors) # `header` in Faraday response is not a JSON string, but rather a # Faraday `Headers` object. Convert first before parsing @header = JSON.parse(header.to_json, object_class: HashWithAccessors) @status = status end |
Instance Attribute Details
#header ⇒ Object (readonly)
Returns the value of attribute header.
5 6 7 |
# File 'lib/adyen/result.rb', line 5 def header @header end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
5 6 7 |
# File 'lib/adyen/result.rb', line 5 def response @response end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
5 6 7 |
# File 'lib/adyen/result.rb', line 5 def status @status end |