class SageoneSdk::SDataErrorResponse

SData error response

Attributes

data[R]

Public Class Methods

new(data = {}) click to toggle source
# File lib/sageone_sdk/sdata_error_response.rb, line 6
def initialize(data = {})
  @data = data
end

Public Instance Methods

diagnoses() click to toggle source
# File lib/sageone_sdk/sdata_error_response.rb, line 10
def diagnoses
  @data["$diagnoses"]
end
error?() click to toggle source
# File lib/sageone_sdk/sdata_error_response.rb, line 20
def error?
  true
end
full_messages() click to toggle source
# File lib/sageone_sdk/sdata_error_response.rb, line 14
def full_messages
  diagnoses.map do |x|
    "#{x["$source"].humanize}: #{x["$message"]}"
  end
end
method_missing(method, *args, &block) click to toggle source
Calls superclass method
# File lib/sageone_sdk/sdata_error_response.rb, line 28
def method_missing(method, *args, &block)
  if diagnoses.respond_to?(method)
    diagnoses.send(method, *args)
  else
    super
  end
end
respond_to_missing?(method, include_private = false) click to toggle source
# File lib/sageone_sdk/sdata_error_response.rb, line 24
def respond_to_missing?(method, include_private =  false)
  resources.respond_to?(method, include_private)
end