createOrUpdate() public method

Create or Update Timeline Event
See also: http://developers.hubspot.com/docs/methods/timeline/create-or-update-event
public createOrUpdate ( integer $appId, integer $eventTypeId, string $id, integer | null $objectId = null, string | null $email = null, string | null $utk = null, array $extraData = [], mixed $timestamp = null, array $eventTypeData = [] ) : mixed
$appId integer
$eventTypeId integer
$id string
$objectId integer | null
$email string | null
$utk string | null
$extraData array
$timestamp mixed
$eventTypeData array
return mixed
Example #1
0
 /**
  * @test
  */
 public function createOrUpdate()
 {
     $response = $this->createEventTypeProperty();
     $eventTypeProperty = json_decode((string) $response->getBody());
     $timestamp = new \DateTime();
     $timestamp->setDate(2016, 6, 11);
     $response = $this->timeline->createOrUpdate(self::APP_ID, $this->eventTypeId, 'TEST-PHP-HUBSPOT-' . substr(md5(microtime()), rand(0, 26), 16), null, '*****@*****.**', null, [$eventTypeProperty->name => 'BAM'], $timestamp);
 }