Module: AboutYou::SDK::Model::ResultError
- Included in:
- BasketItem, BasketSet
- Defined in:
- lib/AboutYou/Model/result_error.rb
Overview
This class represents an result error model
Instance Attribute Summary collapse
-
#error_code ⇒ Object
error code.
-
#error_ident ⇒ Object
error ident.
-
#error_message ⇒ Object
error message.
Instance Method Summary collapse
-
#initialize(json_object) ⇒ Object
Constructor for the AboutYou::SDK::Model::ResultError class.
-
#parse_error_result(json_object) ⇒ Object
This method parses the error result.
Instance Attribute Details
#error_code ⇒ Object
error code
11 12 13 |
# File 'lib/AboutYou/Model/result_error.rb', line 11 def error_code @error_code end |
#error_ident ⇒ Object
error ident
9 10 11 |
# File 'lib/AboutYou/Model/result_error.rb', line 9 def error_ident @error_ident end |
#error_message ⇒ Object
error message
13 14 15 |
# File 'lib/AboutYou/Model/result_error.rb', line 13 def end |
Instance Method Details
#initialize(json_object) ⇒ Object
Constructor for the AboutYou::SDK::Model::ResultError class
-
Args :
-
json_object-> the json_object received from the api
-
-
Returns :
-
an instance of AboutYou::SDK::Model::ResultError
-
24 25 26 27 28 |
# File 'lib/AboutYou/Model/result_error.rb', line 24 def initialize(json_object) parse_error_result(json_object) self end |
#parse_error_result(json_object) ⇒ Object
This method parses the error result
-
Args :
-
json_object-> the json_object received from the api
-
36 37 38 39 40 |
# File 'lib/AboutYou/Model/result_error.rb', line 36 def parse_error_result(json_object) self.error_ident = json_object.key?('error_ident') ? String(json_object['error_ident']) : nil self.error_code = json_object.key?('error_code') ? Integer(json_object['error_code']) : 0 self. = json_object.key?('error_message') ? json_object['error_message'] : nil end |