Class: OnlinePayments::SDK::Domain::APIError
- Inherits:
-
DataObject
- Object
- 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 ⇒ Object
deprecated
Deprecated.
Use errorCode instead. Error 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 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 ⇒ Object
Deprecated.
Use errorCode instead. Error 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
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/onlinepayments/sdk/domain/api_error.rb', line 50 def from_hash(hash) super if hash.has_key? 'category' @category = hash['category'] end if hash.has_key? 'code' @code = hash['code'] end if hash.has_key? 'errorCode' @error_code = hash['errorCode'] end if hash.has_key? 'httpStatusCode' @http_status_code = hash['httpStatusCode'] end if hash.has_key? 'id' @id = hash['id'] end if hash.has_key? 'message' @message = hash['message'] end if hash.has_key? 'propertyName' @property_name = hash['propertyName'] end if hash.has_key? 'retriable' @retriable = hash['retriable'] end end |
#to_h ⇒ Hash
37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/onlinepayments/sdk/domain/api_error.rb', line 37 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 |