Class: Ingenico::Direct::SDK::Domain::APIError
- Inherits:
-
Ingenico::Direct::SDK::DataObject
- Object
- Ingenico::Direct::SDK::DataObject
- Ingenico::Direct::SDK::Domain::APIError
- Defined in:
- lib/ingenico/direct/sdk/domain/api_error.rb
Instance Attribute Summary collapse
-
#category ⇒ String
The current value of category.
-
#code ⇒ String
The current value of code.
-
#http_status_code ⇒ Integer
The current value of http_status_code.
-
#id ⇒ String
The current value of id.
-
#message ⇒ String
The current value of message.
-
#property_name ⇒ String
The current value of property_name.
Instance Method Summary collapse
Methods inherited from Ingenico::Direct::SDK::DataObject
Instance Attribute Details
#category ⇒ String
Returns the current value of category.
16 17 18 |
# File 'lib/ingenico/direct/sdk/domain/api_error.rb', line 16 def category @category end |
#code ⇒ String
Returns the current value of code.
16 17 18 |
# File 'lib/ingenico/direct/sdk/domain/api_error.rb', line 16 def code @code end |
#http_status_code ⇒ Integer
Returns the current value of http_status_code.
16 17 18 |
# File 'lib/ingenico/direct/sdk/domain/api_error.rb', line 16 def http_status_code @http_status_code end |
#id ⇒ String
Returns the current value of id.
16 17 18 |
# File 'lib/ingenico/direct/sdk/domain/api_error.rb', line 16 def id @id end |
#message ⇒ String
Returns the current value of message.
16 17 18 |
# File 'lib/ingenico/direct/sdk/domain/api_error.rb', line 16 def @message end |
#property_name ⇒ String
Returns the current value of property_name.
16 17 18 |
# File 'lib/ingenico/direct/sdk/domain/api_error.rb', line 16 def property_name @property_name end |
Instance Method Details
#from_hash(hash) ⇒ Object
36 37 38 39 40 41 42 43 44 |
# File 'lib/ingenico/direct/sdk/domain/api_error.rb', line 36 def from_hash(hash) super @category = hash['category'] if hash.key? 'category' @code = hash['code'] if hash.key? 'code' @http_status_code = hash['httpStatusCode'] if hash.key? 'httpStatusCode' @id = hash['id'] if hash.key? 'id' @message = hash['message'] if hash.key? 'message' @property_name = hash['propertyName'] if hash.key? 'propertyName' end |
#to_h ⇒ Hash
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/ingenico/direct/sdk/domain/api_error.rb', line 25 def to_h hash = super hash['category'] = @category unless @category.nil? hash['code'] = @code unless @code.nil? hash['httpStatusCode'] = @http_status_code unless @http_status_code.nil? hash['id'] = @id unless @id.nil? hash['message'] = @message unless @message.nil? hash['propertyName'] = @property_name unless @property_name.nil? hash end |