SevenShores\Hubspot\Resources\Contacts::createOrUpdate PHP Method

createOrUpdate() public method

public createOrUpdate ( string $email, array $properties = [] ) : Response
$email string The contact's email address.
$properties array The contact properties.
return SevenShores\Hubspot\Http\Response
    function createOrUpdate($email, $properties = [])
    {
        $endpoint = "https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/{$email}";
        $options['json'] = ['properties' => $properties];
        return $this->client->request('post', $endpoint, $options);
    }