createEventType() public method

Create Timeline Event Type
See also: http://developers.hubspot.com/docs/methods/timeline/create-event-type
public createEventType ( integer $appId, string $name, string | null $headerTemplate = null, string | null $detailTemplate = null, string | null $objectType = null ) : mixed
$appId integer
$name string
$headerTemplate string | null
$detailTemplate string | null
$objectType string | null
return mixed
Example #1
0
 /**
  * @test
  */
 public function createEventType()
 {
     $name = 'Event name';
     $headerTemplate = 'Event header template';
     $detailTemplate = 'Event detail template';
     $objectType = 'CONTACT';
     $response = $this->timeline->createEventType(self::APP_ID, $name, $headerTemplate, $detailTemplate, $objectType);
     $eventType = json_decode((string) $response->getBody());
     $this->assertEquals($name, $eventType->name);
     $this->assertEquals($headerTemplate, $eventType->headerTemplate);
     $this->assertEquals($detailTemplate, $eventType->detailTemplate);
     $this->assertEquals($objectType, $eventType->objectType);
     $this->assertEquals(200, $response->getStatusCode());
     return $response;
 }