Method: BaseCRM::ContactsService#find

Defined in:
lib/basecrm/services/contacts_service.rb

#find(id) ⇒ Contact

Retrieve a single contact

get ‘/contacts/BaseCRM#id

Returns a single contact available to the user, according to the unique contact ID provided If the specified contact does not exist, the request will return an error

Parameters:

  • id (Integer)

    Unique identifier of a Contact

Returns:

  • (Contact)

    Searched resource object.



77
78
79
80
81
# File 'lib/basecrm/services/contacts_service.rb', line 77

def find(id)
  _, _, root = @client.get("/contacts/#{id}")

  Contact.new(root[:data])
end