Associates a given contact to a given company
If a contact is already associated to a different company, the contact will be added to the new company
public addContact ( integer $contactId, integer $companyId ) : |
||
$contactId | integer | |
$companyId | integer | |
return |
/** * 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); sleep(1); return [$contactId, $response]; }