Class: PerfectReach::Contact

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/perfect_reach/contact.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.all(options = {}) ⇒ Object



10
11
12
13
14
# File 'lib/perfect_reach/contact.rb', line 10

def all(options = {})
	PerfectReach::Api.instance.get('contacts', options)["contacts"].map do |result_hash|
		self.new(result_hash)
	end
end

Instance Method Details

#infos(options = {}) ⇒ Object



5
6
7
# File 'lib/perfect_reach/contact.rb', line 5

def infos(options = {})
	PerfectReach::Api.instance.get("contacts/#{(self.id || self.email)}", options)["contact"]
end