Class: OnlinePayments::SDK::Domain::APIError
- Inherits:
-
OnlinePayments::SDK::DataObject
- Object
- OnlinePayments::SDK::DataObject
- OnlinePayments::SDK::Domain::APIError
- Defined in:
- lib/onlinepayments/sdk/domain/api_error.rb
Instance Attribute Summary collapse
-
#category ⇒ String
The current value of category.
-
#code ⇒ String
The current value of code.
-
#error_code ⇒ String
The current value of error_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.
-
#retriable ⇒ true/false
The current value of retriable.
Instance Method Summary collapse
Methods inherited from OnlinePayments::SDK::DataObject
Instance Attribute Details
#category ⇒ String
Returns the current value of category.
17 18 19 |
# File 'lib/onlinepayments/sdk/domain/api_error.rb', line 17 def category @category end |
#code ⇒ String
Returns the current value of code.
17 18 19 |
# File 'lib/onlinepayments/sdk/domain/api_error.rb', line 17 def code @code end |
#error_code ⇒ String
Returns the current value of error_code.
17 18 19 |
# File 'lib/onlinepayments/sdk/domain/api_error.rb', line 17 def error_code @error_code end |
#http_status_code ⇒ Integer
Returns the current value of http_status_code.
17 18 19 |
# File 'lib/onlinepayments/sdk/domain/api_error.rb', line 17 def http_status_code @http_status_code end |
#id ⇒ String
Returns the current value of id.
17 18 19 |
# File 'lib/onlinepayments/sdk/domain/api_error.rb', line 17 def id @id end |
#message ⇒ String
Returns the current value of message.
17 18 19 |
# File 'lib/onlinepayments/sdk/domain/api_error.rb', line 17 def @message end |
#property_name ⇒ String
Returns the current value of property_name.
17 18 19 |
# File 'lib/onlinepayments/sdk/domain/api_error.rb', line 17 def property_name @property_name end |
#retriable ⇒ true/false
Returns the current value of retriable.
17 18 19 |
# File 'lib/onlinepayments/sdk/domain/api_error.rb', line 17 def retriable @retriable end |
Instance Method Details
#from_hash(hash) ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/onlinepayments/sdk/domain/api_error.rb', line 41 def from_hash(hash) super @category = hash['category'] if hash.key? 'category' @code = hash['code'] if hash.key? 'code' @error_code = hash['errorCode'] if hash.key? 'errorCode' @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' @retriable = hash['retriable'] if hash.key? 'retriable' end |
#to_h ⇒ Hash
28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/onlinepayments/sdk/domain/api_error.rb', line 28 def to_h hash = super hash['category'] = @category unless @category.nil? hash['code'] = @code unless @code.nil? hash['errorCode'] = @error_code unless @error_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['retriable'] = @retriable unless @retriable.nil? hash end |