module PIM::Services::ContactService

Public Instance Methods

__contact_service() click to toggle source
# File services.rb, line 533
def __contact_service
  __service(:contactService)
end
delete_contact_by_id(contact_id) click to toggle source
# File services.rb, line 516
def delete_contact_by_id contact_id
  __contact_service.deleteContact(contact_id)
end
get_contact(organization_id) click to toggle source
# File services.rb, line 504
def get_contact organization_id
  __contact_service.getContactByOrganizationId(organization_id)
end
get_contact_by_id(contact_id) click to toggle source
# File services.rb, line 512
def get_contact_by_id contact_id
  __contact_service.getContactById(contact_id)
end
get_contact_by_organization_id(organization_id) click to toggle source
# File services.rb, line 508
def get_contact_by_organization_id organization_id
  __contact_service.getContactByOrganizationId(organization_id)
end
search_contacts_by_custom_value(key, value) click to toggle source
# File services.rb, line 520
def search_contacts_by_custom_value key, value

  # FIXME: Search the contacts in the backend service already!
  matching_contacts = []
  contacts = __contact_service.getAllContacts()
  contacts.each do |contact|
    contact_value = PIM.get_value(contact.custom_values, key)
    matching_contacts << contact if contact_value == value
  end

  return matching_contacts
end