| @@ 82-100 (lines=19) @@ | ||
| 79 | * |
|
| 80 | * @see http://developers.hubspot.com/docs/methods/timeline/create-event-type |
|
| 81 | */ |
|
| 82 | public function createEventType( |
|
| 83 | $appId, |
|
| 84 | $name, |
|
| 85 | $headerTemplate = null, |
|
| 86 | $detailTemplate = null, |
|
| 87 | $objectType = null |
|
| 88 | ) { |
|
| 89 | $endpoint = "https://api.hubapi.com/integrations/v1/{$appId}/timeline/event-types"; |
|
| 90 | ||
| 91 | $data['json'] = [ |
|
| 92 | 'applicationId' => $appId, |
|
| 93 | 'name' => $name, |
|
| 94 | 'headerTemplate' => $headerTemplate, |
|
| 95 | 'detailTemplate' => $detailTemplate, |
|
| 96 | 'objectType' => $objectType, |
|
| 97 | ]; |
|
| 98 | ||
| 99 | return $this->client->request('post', $endpoint, $data); |
|
| 100 | } |
|
| 101 | ||
| 102 | /** |
|
| 103 | * Update Timeline Event Type |
|
| @@ 116-135 (lines=20) @@ | ||
| 113 | * |
|
| 114 | * @see http://developers.hubspot.com/docs/methods/timeline/update-event-type |
|
| 115 | */ |
|
| 116 | public function updateEventType( |
|
| 117 | $appId, |
|
| 118 | $eventTypeId, |
|
| 119 | $name = null, |
|
| 120 | $headerTemplate = null, |
|
| 121 | $detailTemplate = null, |
|
| 122 | $objectType = null |
|
| 123 | ) { |
|
| 124 | $endpoint = "https://api.hubapi.com/integrations/v1/{$appId}/timeline/event-types/{$eventTypeId}"; |
|
| 125 | ||
| 126 | $data['json'] = [ |
|
| 127 | 'applicationId' => $appId, |
|
| 128 | 'name' => $name, |
|
| 129 | 'headerTemplate' => $headerTemplate, |
|
| 130 | 'detailTemplate' => $detailTemplate, |
|
| 131 | 'objectType' => $objectType, |
|
| 132 | ]; |
|
| 133 | ||
| 134 | return $this->client->request('put', $endpoint, $data); |
|
| 135 | } |
|
| 136 | ||
| 137 | /** |
|
| 138 | * Delete Timeline Event Type |
|