module EasyTalk::Model::InstanceMethods

def to_hash

Add to_hash method to convert defined properties to hash
def to_hash
  return {} unless self.class.properties
  self.class.properties.each_with_object({}) do |prop, hash|
    hash[prop.to_s] = send(prop)
  end
end