Class: NimbleApi::Contacts

Inherits:
Object
  • Object
show all
Defined in:
lib/nimble/contacts.rb

Instance Method Summary collapse

Constructor Details

#initialize(nimble) ⇒ Contacts

Returns a new instance of Contacts.



5
6
7
# File 'lib/nimble/contacts.rb', line 5

def initialize(nimble)
  @nimble = nimble
end

Instance Method Details

#list(params = {}) ⇒ Object



9
10
11
12
13
# File 'lib/nimble/contacts.rb', line 9

def list params={}
  params[:fields] = params[:fields].join(',') if params[:fields]
  params[:record_type] ||= 'person'
  @nimble.get "contacts", params
end

#list_ids(params = {}) ⇒ Object



15
16
17
# File 'lib/nimble/contacts.rb', line 15

def list_ids params={}
  @nimble.get "contacts/ids", params
end