Get all numbers associated to a given contact id
@param int $ContactEntryId
@return models\Call\ContactNumber[]
766629
public function getContactNumbersFromContactId( $ContactEntryId){
        $service = sprintf( self::API_CONTACT_NUMBERS, $ContactEntryId);
        $rest = $this->getService( $service);
        $rest->GET();

        return $rest->getResultAsArray( models\Call\ContactNumber::class);
    }
1245146
public function keys(int $fd): array
    {
        $existsKeys = [];

        foreach ($this->rooms as $room => $values) {
            foreach ($values as $value) {
                if ($value === $fd) {
                    $existsKeys[] = $room;
                    break;
                }
            }
        }

        return $existsKeys;
    }
150613
private function getAddresses($entity)
    {
        if ($entity instanceof AccountInterface) {
            return $entity->getAccountAddresses();
        } elseif ($entity instanceof Contact) {
            return $entity->getContactAddresses();
        }

        return;
    }
344868
public function getEntryId()
    {
        $entryId = $this->get(static::$keyEntryId);
        if (!empty($entryId)) {
            $entryId = (int) $entryId;
        }
        return $entryId;
    }
1249834
public function getCustomerAddressAttributesByEntityId($entityId)
    {

        // initialize the array for the attributes
        $attributes = array();

        // load the datetime attributes
        foreach ($this->customerAddressDatetimeRepository->findAllByEntityId($entityId) as $attribute) {
            $attributes[$attribute[MemberNames::ATTRIBUTE_ID]] = $attribute;
        }

        // load the decimal attributes
        foreach ($this->customerAddressDecimalRepository->findAllByEntityId($entityId) as $attribute) {
            $attributes[$attribute[MemberNames::ATTRIBUTE_ID]] = $attribute;
        }

        // load the integer attributes
        foreach ($this->customerAddressIntRepository->findAllByEntityId($entityId) as $attribute) {
            $attributes[$attribute[MemberNames::ATTRIBUTE_ID]] = $attribute;
        }

        // load the text attributes
        foreach ($this->customerAddressTextRepository->findAllByEntityId($entityId) as $attribute) {
            $attributes[$attribute[MemberNames::ATTRIBUTE_ID]] = $attribute;
        }

        // load the varchar attributes
        foreach ($this->customerAddressVarcharRepository->findAllByEntityId($entityId) as $attribute) {
            $attributes[$attribute[MemberNames::ATTRIBUTE_ID]] = $attribute;
        }

        // return the array with the attributes
        return $attributes;
    }
316395
public function getContacts($limit = NULL, $offset = NULL) {
    $parameters = array();
    if (!empty($limit)) {
      $parameters['limit'] = $limit;
      if (!empty($offset)) {
        $parameters['offset'] = $offset;
      }
    }
    $data = $this->request('GET', 'contacts', $parameters);
    return $data->contacts;
  }
478692
public function getAll(){
        $rest = $this->getService( self::API_CONTACT);
        $rest->GET();

        return $rest->getResultAsArray( models\Call\ContactEntry::class);
    }
895818
public function getCallbackEvents(): array
    {
        $events = [];
        foreach ($this->getHydratedEntries() as $hydratedEntry) {
            /** @var \Kerox\Messenger\Model\Callback\Entry $hydratedEntry */
            $events = array_merge($events, $hydratedEntry->getEvents());
        }

        return $events;
    }
1083920
public function findRelatedEntries($entry_id, $parent_field_id)
    {
        try {
            $ids = Symphony::Database()->fetchCol('entry_id', sprintf("
                SELECT `entry_id`
                FROM `tbl_entries_data_%d`
                WHERE `relation_id` = %d
                AND `entry_id` IS NOT NULL
            ", $this->get('id'), $entry_id));
        } catch (Exception $e) {
            return array();
        }

        return $ids;
    }
1064090
public function createContactsInList($contactListId, array $data = [])
	{
		return $this->sendRequest(
			$this->createRequest('POST', sprintf('contact_lists/%d/contacts/bulk', $contactListId), [], $data)
		);
	}
542605
public function GetContactHistory($ContactId, Request\GetContactHistory $GetContactHistory)
    {
        $uri = $this->getUri('/contact/%s/history', array($ContactId));

        return $this->get($uri, $GetContactHistory);
    }
730089
public function getNumberLookup($messageId)
    {
        $numberLookup = $this->factory->createEmptyNumberLookup();
        $numberLookup->populate($messageId);

        return $numberLookup;
    }
552320
public function deleteContact($contactId)
    {
        if ($contactId) {
            $url = $this->getApiEndpoint() . self::REST_CONTACTS . $contactId;
            $this->setUrl($url)
                ->setVerb('DELETE');

            $response = $this->execute();

            if (isset($response->message)) {
                $message = ' url : ' . $url . ', ' . $response->message;
                $this->helper->debug('deleteContact', [$message]);
            }

            return $response;
        }
    }
1098884
public function getAllForContact(string $id, array $params = [])
    {
        return $this->executeRequest(
            RequestMethodEnum::GET,
            ResourceMethodEnum::GET_ALL_FOR_CONTACT,
            $params,
            $id
        );
    }
627014
public function getContactEmailsFromContactId( $ContactEntryId){
        $service = sprintf( self::API_CONTACT_EMAILS, $ContactEntryId);
        $rest = $this->getService( $service);
        $rest->GET();

        return $rest->getResultAsArray( models\Call\ContactEmail::class);
    }
835328
public function getFromId( $ContactEmailId){
        $rest = $this->getService( self::API_EMAIL . $ContactEmailId);
        $rest->GET();

        return $rest->getResult( models\Call\ContactEmail::class);
    }
698873
public function getAction($id)
    {
        $contactManager = $this->getContactManager();
        $locale = $this->getUser()->getLocale();

        try {
            $view = $this->responseGetById(
                $id,
                function($id) use ($contactManager, $locale) {
                    return $contactManager->getById($id, $locale);
                }
            );

            $context = new Context();
            $context->setGroups(static::$contactSerializationGroups);
            $view->setContext($context);
        } catch (EntityNotFoundException $e) {
            $view = $this->view($e->toArray(), 404);
        }

        return $this->handleView($view);
    }