| @@ 118-125 (lines=8) @@ | ||
| 115 | * @param string $name The cloned post name |
|
| 116 | * @return \SevenShores\Hubspot\Http\Response |
|
| 117 | */ |
|
| 118 | function clonePost($id, $name) |
|
| 119 | { |
|
| 120 | $endpoint = "https://api.hubapi.com/content/api/v2/blog-posts/{$id}/clone"; |
|
| 121 | ||
| 122 | $options['json'] = ['name' => $name]; |
|
| 123 | ||
| 124 | return $this->client->request('post', $endpoint, $options); |
|
| 125 | } |
|
| 126 | ||
| 127 | /** |
|
| 128 | * Determine if the auto-save buffer differs from the live blog post. |
|
| @@ 153-160 (lines=8) @@ | ||
| 150 | * @param string $action The publish action |
|
| 151 | * @return \SevenShores\Hubspot\Http\Response |
|
| 152 | */ |
|
| 153 | function publishAction($id, $action) |
|
| 154 | { |
|
| 155 | $endpoint = "https://api.hubapi.com/content/api/v2/blog-posts/{$id}/publish-action"; |
|
| 156 | ||
| 157 | $options['json'] = ['action' => $action]; |
|
| 158 | ||
| 159 | return $this->client->request('post', $endpoint, $options); |
|
| 160 | } |
|
| 161 | ||
| 162 | /** |
|
| 163 | * Copies the contents of the auto-save buffer into the live blog post. |
|
| @@ 29-36 (lines=8) @@ | ||
| 26 | * @param array $list The contact list properties to update. |
|
| 27 | * @return \SevenShores\Hubspot\Http\Response |
|
| 28 | */ |
|
| 29 | function update($id, $list) |
|
| 30 | { |
|
| 31 | $endpoint = "https://api.hubapi.com/contacts/v1/lists/{$id}"; |
|
| 32 | ||
| 33 | $options['json'] = $list; |
|
| 34 | ||
| 35 | return $this->client->request('post', $endpoint, $options); |
|
| 36 | } |
|
| 37 | ||
| 38 | /** |
|
| 39 | * Delete a contact list. |
|
| @@ 27-34 (lines=8) @@ | ||
| 24 | * @param array $deal The deal properties to update. |
|
| 25 | * @return mixed |
|
| 26 | */ |
|
| 27 | function update($id, array $deal) |
|
| 28 | { |
|
| 29 | $endpoint = "https://api.hubapi.com/deals/v1/deal/{$id}"; |
|
| 30 | ||
| 31 | $options['json'] = $deal; |
|
| 32 | ||
| 33 | return $this->client->request('put', $endpoint, $options); |
|
| 34 | } |
|
| 35 | ||
| 36 | /** |
|
| 37 | * @param array $params |
|
| @@ 27-34 (lines=8) @@ | ||
| 24 | * @param array $subscription |
|
| 25 | * @return \SevenShores\Hubspot\Http\Response |
|
| 26 | */ |
|
| 27 | function createSubscription($app_id, $subscription) |
|
| 28 | {
|
|
| 29 | $endpoint = "https://api.hubapi.com/webhooks/v1/{$app_id}/subscriptions";
|
|
| 30 | ||
| 31 | $options['json'] = $subscription; |
|
| 32 | ||
| 33 | return $this->client->request('post', $endpoint, $options);
|
|
| 34 | } |
|
| 35 | ||
| 36 | /** |
|
| 37 | * Update a subscription. |
|
| @@ 44-51 (lines=8) @@ | ||
| 41 | * @param array $subscription |
|
| 42 | * @return \SevenShores\Hubspot\Http\Response |
|
| 43 | */ |
|
| 44 | function updateSubscription($app_id, $subscription_id, $subscription) |
|
| 45 | {
|
|
| 46 | $endpoint = "https://api.hubapi.com/webhooks/v1/{$app_id}/subscriptions/{$subscription_id}";
|
|
| 47 | ||
| 48 | $options['json'] = $subscription; |
|
| 49 | ||
| 50 | return $this->client->request('put', $endpoint, $options);
|
|
| 51 | } |
|
| 52 | ||
| 53 | /** |
|
| 54 | * Delete a subscription. |
|
| @@ 87-94 (lines=8) @@ | ||
| 84 | * @param array $settings |
|
| 85 | * @return \SevenShores\Hubspot\Http\Response |
|
| 86 | */ |
|
| 87 | function updateSettings($app_id, $settings) |
|
| 88 | {
|
|
| 89 | $endpoint = "https://api.hubapiqa.com/webhooks/v1/{$app_id}/settings";
|
|
| 90 | ||
| 91 | $options['json'] = $settings; |
|
| 92 | ||
| 93 | return $this->client->request('put', $endpoint, $options);
|
|
| 94 | } |
|
| 95 | ||
| 96 | } |
|
| @@ 301-308 (lines=8) @@ | ||
| 298 | * @param int $vidToMerge Contact ID of the secondary contact. |
|
| 299 | * @return \SevenShores\Hubspot\Http\Response |
|
| 300 | */ |
|
| 301 | function merge($id, $vidToMerge) |
|
| 302 | { |
|
| 303 | $endpoint = "https://api.hubapi.com/contacts/v1/contact/merge-vids/{$id}/"; |
|
| 304 | ||
| 305 | $options['json'] = ['vidToMerge' => $vidToMerge]; |
|
| 306 | ||
| 307 | return $this->client->request('post', $endpoint, $options); |
|
| 308 | } |
|
| 309 | ||
| 310 | } |
|
| 311 | ||
| @@ 113-122 (lines=10) @@ | ||
| 110 | * @return \SevenShores\Hubspot\Http\Response |
|
| 111 | * @throws \SevenShores\Hubspot\Exceptions\BadRequest |
|
| 112 | */ |
|
| 113 | function setImportUri($importTriggerUri) |
|
| 114 | { |
|
| 115 | $endpoint = 'https://api.hubapi.com/extensions/ecomm/v1/import-settings'; |
|
| 116 | ||
| 117 | $options['json'] = [ |
|
| 118 | 'importTriggerUri' => $importTriggerUri |
|
| 119 | ]; |
|
| 120 | ||
| 121 | return $this->client->request('put', $endpoint, $options); |
|
| 122 | } |
|
| 123 | ||
| 124 | /** |
|
| 125 | * Retrieve the ecommerce import settings for an app. |
|