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); }