Class: Worldline::Connect::SDK::V1::Domain::APIError

Inherits:
Domain::DataObject show all
Defined in:
lib/worldline/connect/sdk/v1/domain/api_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#categoryString

Returns the current value of category.

Returns:

  • (String)

    the current value of category



19
20
21
# File 'lib/worldline/connect/sdk/v1/domain/api_error.rb', line 19

def category
  @category
end

#codeString

Returns the current value of code.

Returns:

  • (String)

    the current value of code



19
20
21
# File 'lib/worldline/connect/sdk/v1/domain/api_error.rb', line 19

def code
  @code
end

#http_status_codeInteger

Returns the current value of http_status_code.

Returns:

  • (Integer)

    the current value of http_status_code



19
20
21
# File 'lib/worldline/connect/sdk/v1/domain/api_error.rb', line 19

def http_status_code
  @http_status_code
end

#idString

Returns the current value of id.

Returns:

  • (String)

    the current value of id



19
20
21
# File 'lib/worldline/connect/sdk/v1/domain/api_error.rb', line 19

def id
  @id
end

#messageString

Returns the current value of message.

Returns:

  • (String)

    the current value of message



19
20
21
# File 'lib/worldline/connect/sdk/v1/domain/api_error.rb', line 19

def message
  @message
end

#property_nameString

Returns the current value of property_name.

Returns:

  • (String)

    the current value of property_name



19
20
21
# File 'lib/worldline/connect/sdk/v1/domain/api_error.rb', line 19

def property_name
  @property_name
end

#request_idString

Returns the current value of request_id.

Returns:

  • (String)

    the current value of request_id



19
20
21
# File 'lib/worldline/connect/sdk/v1/domain/api_error.rb', line 19

def request_id
  @request_id
end

Instance Method Details

#from_hash(hash) ⇒ Object



48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# File 'lib/worldline/connect/sdk/v1/domain/api_error.rb', line 48

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_hHash

Returns:

  • (Hash)


36
37
38
39
40
41
42
43
44
45
46
# File 'lib/worldline/connect/sdk/v1/domain/api_error.rb', line 36

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