class Ingenico::Connect::SDK::Domain::Errors::APIError

@attr [String] category @attr [String] code @attr [Integer] http_status_code @attr [String] id @attr [String] message @attr [String] property_name @attr [String] request_id

Attributes

category[RW]
code[RW]
http_status_code[RW]
id[RW]
message[RW]
property_name[RW]
request_id[RW]

Public Instance Methods

from_hash(hash) click to toggle source
# File lib/ingenico/connect/sdk/domain/errors/api_error.rb, line 47
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? '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? 'requestId'
    @request_id = hash['requestId']
  end
end
to_h() click to toggle source

@return (Hash)

Calls superclass method Ingenico::Connect::SDK::DataObject#to_h
# File lib/ingenico/connect/sdk/domain/errors/api_error.rb, line 35
def to_h
  hash = super
  hash['category'] = @category unless @category.nil?
  hash['code'] = @code unless @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['requestId'] = @request_id unless @request_id.nil?
  hash
end