Class: CreditCardInfo::Response
- Inherits:
-
Struct
- Object
- Struct
- CreditCardInfo::Response
- Defined in:
- lib/credit_card_info/response.rb,
lib/credit_card_info/response.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#error ⇒ Object
Returns the value of attribute error.
Instance Method Summary collapse
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data
4 5 6 |
# File 'lib/credit_card_info/response.rb', line 4 def data @data end |
#error ⇒ Object
Returns the value of attribute error
4 5 6 |
# File 'lib/credit_card_info/response.rb', line 4 def error @error end |
Instance Method Details
#log_error ⇒ Object
24 25 26 27 28 |
# File 'lib/credit_card_info/response.rb', line 24 def log_error return unless CreditCardInfo.logger CreditCardInfo.logger.warn "Wrong response: error_code=#{error[:code]} error_message=#{error[:message]}" end |
#valid? ⇒ Boolean
20 21 22 |
# File 'lib/credit_card_info/response.rb', line 20 def valid? error.nil? end |