/** * Creates an associated contact for a new company with the HubSpotApi * * @param int $companyId The id of the company where to create the new contact. * * @return array */ private function createAssociatedContact($companyId) { $newContactResponse = $this->createContact(); $contactId = $newContactResponse['vid']; $response = $this->companies->addContact($contactId, $companyId); return [$contactId, $response]; }