Class: XeroGateway::Error

Inherits:
Object
  • Object
show all
Defined in:
lib/xero_gateway/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ Error

Returns a new instance of Error.



5
6
7
8
9
# File 'lib/xero_gateway/error.rb', line 5

def initialize(params = {})
  params.each do |k,v|
    self.send("#{k}=", v)
  end
end

Instance Attribute Details

#date_timeObject

Returns the value of attribute date_time.



3
4
5
# File 'lib/xero_gateway/error.rb', line 3

def date_time
  @date_time
end

#descriptionObject

Returns the value of attribute description.



3
4
5
# File 'lib/xero_gateway/error.rb', line 3

def description
  @description
end

#messageObject

Returns the value of attribute message.



3
4
5
# File 'lib/xero_gateway/error.rb', line 3

def message
  @message
end

#typeObject

Returns the value of attribute type.



3
4
5
# File 'lib/xero_gateway/error.rb', line 3

def type
  @type
end

Instance Method Details

#==(other) ⇒ Object



11
12
13
14
15
16
# File 'lib/xero_gateway/error.rb', line 11

def ==(other)
  [:description, :date_time, :type, :message].each do |field|
    return false if send(field) != other.send(field)
  end
  return true
end