module AboutYou::SDK::Model::ResultError

This class represents an result error model

Attributes

error_code[RW]

error code

error_ident[RW]

error ident

error_message[RW]

error message

Public Class Methods

new(json_object) click to toggle source

Constructor for the AboutYou::SDK::Model::ResultError class

# File lib/AboutYou/Model/result_error.rb, line 24
def initialize(json_object)
  parse_error_result(json_object)

  self
end

Public Instance Methods

parse_error_result(json_object) click to toggle source

This method parses the error result

  • Args :

    • json_object -> the json_object received from the api

# 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.error_message = json_object.key?('error_message') ? json_object['error_message'] : nil
end