class Ingenico::Direct::SDK::Domain::APIError

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

Attributes

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

Public Instance Methods

from_hash(hash) click to toggle source
# File lib/ingenico/direct/sdk/domain/api_error.rb, line 36
def from_hash(hash)
  super
  @category = hash['category'] if hash.key? 'category'
  @code = hash['code'] if hash.key? 'code'
  @http_status_code = hash['httpStatusCode'] if hash.key? 'httpStatusCode'
  @id = hash['id'] if hash.key? 'id'
  @message = hash['message'] if hash.key? 'message'
  @property_name = hash['propertyName'] if hash.key? 'propertyName'
end
to_h() click to toggle source

@return (Hash)

Calls superclass method Ingenico::Direct::SDK::DataObject#to_h
# File lib/ingenico/direct/sdk/domain/api_error.rb, line 25
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
end