Class: Doconomy::Api::Error

Inherits:
Base
  • Object
show all
Defined in:
lib/doconomy/api/error.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#attributes

Instance Method Summary collapse

Methods inherited from Base

client, #errors

Constructor Details

#initialize(attributes = {}) ⇒ Error

Returns a new instance of Error.



8
9
10
11
12
13
# File 'lib/doconomy/api/error.rb', line 8

def initialize(attributes = {})
  @attributes = attributes.deep_symbolize_keys
  @source = attributes[:source]
  @reason_code = attributes[:reason_code] || attributes[:reasonCode]
  @description = attributes[:description]
end

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



6
7
8
# File 'lib/doconomy/api/error.rb', line 6

def description
  @description
end

#reason_codeObject

Returns the value of attribute reason_code.



6
7
8
# File 'lib/doconomy/api/error.rb', line 6

def reason_code
  @reason_code
end

#sourceObject

Returns the value of attribute source.



6
7
8
# File 'lib/doconomy/api/error.rb', line 6

def source
  @source
end