Class: Fawry::FawryResponse
- Inherits:
-
Object
- Object
- Fawry::FawryResponse
- Includes:
- Utils
- Defined in:
- lib/fawry/fawry_response.rb
Constant Summary
Constants included from Utils
Instance Attribute Summary collapse
-
#fawry_api_response ⇒ Object
readonly
Returns the value of attribute fawry_api_response.
Instance Method Summary collapse
- #failure? ⇒ Boolean
- #fawry_api_response_body ⇒ Object
-
#initialize(fawry_api_response) ⇒ FawryResponse
constructor
A new instance of FawryResponse.
- #success? ⇒ Boolean
Methods included from Utils
Constructor Details
#initialize(fawry_api_response) ⇒ FawryResponse
Returns a new instance of FawryResponse.
9 10 11 12 13 |
# File 'lib/fawry/fawry_response.rb', line 9 def initialize(fawry_api_response) @fawry_api_response = fawry_api_response build_response end |
Instance Attribute Details
#fawry_api_response ⇒ Object (readonly)
Returns the value of attribute fawry_api_response.
7 8 9 |
# File 'lib/fawry/fawry_response.rb', line 7 def fawry_api_response @fawry_api_response end |
Instance Method Details
#failure? ⇒ Boolean
19 20 21 |
# File 'lib/fawry/fawry_response.rb', line 19 def failure? !success? end |
#fawry_api_response_body ⇒ Object
23 24 25 |
# File 'lib/fawry/fawry_response.rb', line 23 def fawry_api_response_body fawry_api_response end |
#success? ⇒ Boolean
15 16 17 |
# File 'lib/fawry/fawry_response.rb', line 15 def success? status_code == 200 end |