Class: Cardflex::ErrorResponse
- Inherits:
-
Object
- Object
- Cardflex::ErrorResponse
- Includes:
- BaseModule
- Defined in:
- lib/cardflex/error_response.rb
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
Returns the value of attribute result.
-
#result_code ⇒ Object
readonly
Returns the value of attribute result_code.
-
#result_text ⇒ Object
readonly
Returns the value of attribute result_text.
Instance Method Summary collapse
-
#initialize(gateway, hash = {}) ⇒ ErrorResponse
constructor
A new instance of ErrorResponse.
- #success? ⇒ Boolean
Methods included from BaseModule
Methods included from BaseModule::ClassMethods
#create_helper_methods, #set_instance_variables_from_hash, #snakecase
Constructor Details
#initialize(gateway, hash = {}) ⇒ ErrorResponse
Returns a new instance of ErrorResponse.
7 8 9 10 11 12 |
# File 'lib/cardflex/error_response.rb', line 7 def initialize(gateway, hash={}) @gateway = gateway @result = hash[:result].to_i @result_code = hash[:result_code] @result_text = hash[:result_text] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Cardflex::BaseModule
Instance Attribute Details
#result ⇒ Object (readonly)
Returns the value of attribute result.
5 6 7 |
# File 'lib/cardflex/error_response.rb', line 5 def result @result end |
#result_code ⇒ Object (readonly)
Returns the value of attribute result_code.
5 6 7 |
# File 'lib/cardflex/error_response.rb', line 5 def result_code @result_code end |
#result_text ⇒ Object (readonly)
Returns the value of attribute result_text.
5 6 7 |
# File 'lib/cardflex/error_response.rb', line 5 def result_text @result_text end |
Instance Method Details
#success? ⇒ Boolean
14 15 16 |
# File 'lib/cardflex/error_response.rb', line 14 def success? false end |