module PIM::Services::ContactService

Public Instance Methods

__contact_service() click to toggle source
# File services.rb, line 1004
def __contact_service
  __service(:contactService)
end
delete_contact_by_id(contact_id) click to toggle source
# File services.rb, line 987
def delete_contact_by_id contact_id
  __contact_service.deleteContact(contact_id)
end
get_all_contacts() click to toggle source
# File services.rb, line 967
def get_all_contacts
  __contact_service.getAllContacts()
end
get_contact(organization_id) click to toggle source
# File services.rb, line 971
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 979
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 975
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 991
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
update_contact(contact) click to toggle source
# File services.rb, line 983
def update_contact contact
  __contact_service.updateContact(contact)
end