| @@ 81-88 (lines=8) @@ | ||
| 78 | * @param array $params Array of optional parameters ['includeDeletes'] |
|
| 79 | * @return \SevenShores\Hubspot\Http\Response |
|
| 80 | */ |
|
| 81 | function getEvents($params = []) |
|
| 82 | { |
|
| 83 | $endpoint = "https://api.hubapi.com/reports/v2/events"; |
|
| 84 | ||
| 85 | $queryString = build_query_string($params); |
|
| 86 | ||
| 87 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 88 | } |
|
| 89 | ||
| 90 | /** |
|
| 91 | * Get all analytics views |
|
| @@ 98-105 (lines=8) @@ | ||
| 95 | * @param array $params Array of optional parameters |
|
| 96 | * @return \SevenShores\Hubspot\Http\Response |
|
| 97 | */ |
|
| 98 | function getViews($params = []) |
|
| 99 | { |
|
| 100 | $endpoint = "https://api.hubapi.com/analytics/v2/views"; |
|
| 101 | ||
| 102 | $queryString = build_query_string($params); |
|
| 103 | ||
| 104 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 105 | } |
|
| 106 | ||
| 107 | /** |
|
| 108 | * Get a Group of Events by ID |
|
| @@ 116-125 (lines=10) @@ | ||
| 113 | * @param array $params Array of optional parameters ['includeDeletes'] |
|
| 114 | * @return \SevenShores\Hubspot\Http\Response |
|
| 115 | */ |
|
| 116 | function getEventsById($id, $params = []) |
|
| 117 | { |
|
| 118 | $endpoint = "https://api.hubapi.com/analytics/v2/views"; |
|
| 119 | ||
| 120 | $queryString = build_query_string($params); |
|
| 121 | ||
| 122 | $params['id'] = $id; |
|
| 123 | ||
| 124 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 125 | } |
|
| 126 | ||
| 127 | /** |
|
| 128 | * Check for the existence of analytics data for an object type |
|
| @@ 136-143 (lines=8) @@ | ||
| 133 | * @param array $params Array of optional parameters |
|
| 134 | * @return \SevenShores\Hubspot\Http\Response |
|
| 135 | */ |
|
| 136 | function checkForExistence($objectType, $params = []) |
|
| 137 | { |
|
| 138 | $endpoint = "https://api.hubapi.com/analytics/v2/reports/{$objectType}/exists"; |
|
| 139 | ||
| 140 | $queryString = build_query_string($params); |
|
| 141 | ||
| 142 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 143 | } |
|
| 144 | } |
|
| 145 | ||
| @@ 13-20 (lines=8) @@ | ||
| 10 | * @param array $params Optional Parameters. |
|
| 11 | * @return \SevenShores\Hubspot\Http\Response |
|
| 12 | */ |
|
| 13 | function create($params = []) |
|
| 14 | { |
|
| 15 | $endpoint = 'https://api.hubapi.com/blogs/v3/blog-authors'; |
|
| 16 | ||
| 17 | $options['json'] = $params; |
|
| 18 | ||
| 19 | return $this->client->request('post', $endpoint, $options); |
|
| 20 | } |
|
| 21 | ||
| 22 | /** |
|
| 23 | * Get all blog authors. |
|
| @@ 28-35 (lines=8) @@ | ||
| 25 | * @param array $params Optional parameters. |
|
| 26 | * @return \SevenShores\Hubspot\Http\Response |
|
| 27 | */ |
|
| 28 | function all($params = []) |
|
| 29 | { |
|
| 30 | $endpoint = 'https://api.hubapi.com/blogs/v3/blog-authors'; |
|
| 31 | ||
| 32 | $queryString = build_query_string($params); |
|
| 33 | ||
| 34 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 35 | } |
|
| 36 | ||
| 37 | /** |
|
| 38 | * Search blog authors. |
|
| @@ 62-69 (lines=8) @@ | ||
| 59 | * @param array $params Fields to update. |
|
| 60 | * @return \SevenShores\Hubspot\Http\Response |
|
| 61 | */ |
|
| 62 | function update($id, $params = []) |
|
| 63 | { |
|
| 64 | $endpoint = "https://api.hubapi.com/blogs/v3/blog-authors/{$id}"; |
|
| 65 | ||
| 66 | $options['json'] = $params; |
|
| 67 | ||
| 68 | return $this->client->request('put', $endpoint, $options); |
|
| 69 | } |
|
| 70 | ||
| 71 | /** |
|
| 72 | * Delete a blog author. |
|
| @@ 13-20 (lines=8) @@ | ||
| 10 | * @param array $params Optional Parameters. |
|
| 11 | * @return \SevenShores\Hubspot\Http\Response |
|
| 12 | */ |
|
| 13 | function create($params = []) |
|
| 14 | { |
|
| 15 | $endpoint = 'https://api.hubapi.com/content/api/v2/blog-posts'; |
|
| 16 | ||
| 17 | $options['json'] = $params; |
|
| 18 | ||
| 19 | return $this->client->request('post', $endpoint, $options); |
|
| 20 | } |
|
| 21 | ||
| 22 | /** |
|
| 23 | * Get all blog posts. |
|
| @@ 28-35 (lines=8) @@ | ||
| 25 | * @param array $params Optional parameters. |
|
| 26 | * @return \SevenShores\Hubspot\Http\Response |
|
| 27 | */ |
|
| 28 | function all($params = []) |
|
| 29 | { |
|
| 30 | $endpoint = "https://api.hubapi.com/content/api/v2/blog-posts"; |
|
| 31 | ||
| 32 | $queryString = build_query_string($params); |
|
| 33 | ||
| 34 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 35 | } |
|
| 36 | ||
| 37 | /** |
|
| 38 | * Update a blog post. |
|
| @@ 44-51 (lines=8) @@ | ||
| 41 | * @param array $params The blog post fields to update. |
|
| 42 | * @return \SevenShores\Hubspot\Http\Response |
|
| 43 | */ |
|
| 44 | function update($id, $params = []) |
|
| 45 | { |
|
| 46 | $endpoint = "https://api.hubapi.com/content/api/v2/blog-posts/{$id}"; |
|
| 47 | ||
| 48 | $options['json'] = $params; |
|
| 49 | ||
| 50 | return $this->client->request('put', $endpoint, $options); |
|
| 51 | } |
|
| 52 | ||
| 53 | /** |
|
| 54 | * Delete a blog post. |
|
| @@ 88-95 (lines=8) @@ | ||
| 85 | * @param array $params Allowed parameters. |
|
| 86 | * @return \SevenShores\Hubspot\Http\Response |
|
| 87 | */ |
|
| 88 | function updateAutoSaveBuffer($id, $params = []) |
|
| 89 | { |
|
| 90 | $endpoint = "https://api.hubapi.com/content/api/v2/blog-posts/{$id}/buffer"; |
|
| 91 | ||
| 92 | $options['json'] = $params; |
|
| 93 | ||
| 94 | return $this->client->request('put', $endpoint, $options); |
|
| 95 | } |
|
| 96 | ||
| 97 | /** |
|
| 98 | * Gets the current contents of the auto-save buffer. |
|
| @@ 13-20 (lines=8) @@ | ||
| 10 | * @param array $params Optional parameters ['limit', 'offset', 'created', 'deleted_at', 'name'] |
|
| 11 | * @return \SevenShores\Hubspot\Http\Response |
|
| 12 | */ |
|
| 13 | function all($params = []) |
|
| 14 | { |
|
| 15 | $endpoint = 'https://api.hubapi.com/content/api/v2/blogs'; |
|
| 16 | ||
| 17 | $queryString = build_query_string($params); |
|
| 18 | ||
| 19 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 20 | } |
|
| 21 | ||
| 22 | /** |
|
| 23 | * Get information about a specific blog. |
|
| @@ 14-22 (lines=9) @@ | ||
| 11 | * @param array $params Optional parameters ['name','slug','limit','offset'] |
|
| 12 | * @return \SevenShores\Hubspot\Http\Response |
|
| 13 | */ |
|
| 14 | function all($params = []) |
|
| 15 | { |
|
| 16 | ||
| 17 | $endpoint = 'https://api.hubapi.com/blogs/v3/topics'; |
|
| 18 | ||
| 19 | $queryString = build_query_string($params); |
|
| 20 | ||
| 21 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 22 | } |
|
| 23 | ||
| 24 | /** |
|
| 25 | * Search a topic by the query. $query will match name and slug partially |
|
| @@ 80-87 (lines=8) @@ | ||
| 77 | * @param array $params The blog topic fields to update. |
|
| 78 | * @return \SevenShores\Hubspot\Http\Response |
|
| 79 | */ |
|
| 80 | function update($id, $params = []) |
|
| 81 | { |
|
| 82 | $endpoint = "https://api.hubapi.com/blogs/v3/topics/{$id}"; |
|
| 83 | ||
| 84 | $options['json'] = $params; |
|
| 85 | ||
| 86 | return $this->client->request('put', $endpoint, $options); |
|
| 87 | } |
|
| 88 | ||
| 89 | /** |
|
| 90 | * Delete a blog topic. |
|
| @@ 13-20 (lines=8) @@ | ||
| 10 | * @param array $params Optional parameters ['limit', 'offset', 'portalId', 'state', 'contentId', 'reverse'] |
|
| 11 | * @return \SevenShores\Hubspot\Http\Response |
|
| 12 | */ |
|
| 13 | function all($params = []) |
|
| 14 | { |
|
| 15 | $endpoint = 'https://api.hubapi.com/comments/v3/comments'; |
|
| 16 | ||
| 17 | $queryString = build_query_string($params); |
|
| 18 | ||
| 19 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 20 | } |
|
| 21 | ||
| 22 | /** |
|
| 23 | * Get information about a specific comment. |
|
| @@ 76-83 (lines=8) @@ | ||
| 73 | * |
|
| 74 | * @return \SevenShores\Hubspot\Http\Response |
|
| 75 | */ |
|
| 76 | function all($params = []) |
|
| 77 | { |
|
| 78 | $endpoint = 'https://api.hubapi.com/companies/v2/companies/paged'; |
|
| 79 | ||
| 80 | $queryString = build_query_string($params); |
|
| 81 | ||
| 82 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 83 | } |
|
| 84 | ||
| 85 | /** |
|
| 86 | * Returns the recently modified companies |
|
| @@ 93-100 (lines=8) @@ | ||
| 90 | * |
|
| 91 | * @return \SevenShores\Hubspot\Http\Response |
|
| 92 | */ |
|
| 93 | function getRecentlyModified($params = []) |
|
| 94 | { |
|
| 95 | $endpoint = 'https://api.hubapi.com/companies/v2/companies/recent/modified'; |
|
| 96 | ||
| 97 | $queryString = build_query_string($params); |
|
| 98 | ||
| 99 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 100 | } |
|
| 101 | ||
| 102 | /** |
|
| 103 | * Returns the recently created companies |
|
| @@ 110-117 (lines=8) @@ | ||
| 107 | * |
|
| 108 | * @return \SevenShores\Hubspot\Http\Response |
|
| 109 | */ |
|
| 110 | function getRecentlyCreated($params = []) |
|
| 111 | { |
|
| 112 | $endpoint = 'https://api.hubapi.com/companies/v2/companies/recent/created'; |
|
| 113 | ||
| 114 | $queryString = build_query_string($params); |
|
| 115 | ||
| 116 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 117 | } |
|
| 118 | ||
| 119 | /** |
|
| 120 | * Returns an array of companies that have a matching domain |
|
| @@ 201-208 (lines=8) @@ | ||
| 198 | * |
|
| 199 | * @return \SevenShores\Hubspot\Http\Response |
|
| 200 | */ |
|
| 201 | function getAssociatedContacts($companyId, $params = []) |
|
| 202 | { |
|
| 203 | $endpoint = "https://api.hubapi.com/companies/v2/companies/{$companyId}/contacts"; |
|
| 204 | ||
| 205 | $queryString = build_query_string($params); |
|
| 206 | ||
| 207 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 208 | } |
|
| 209 | ||
| 210 | /** |
|
| 211 | * Returns all of the contact IDs who are associated with the given company |
|
| @@ 219-226 (lines=8) @@ | ||
| 216 | * |
|
| 217 | * @return \SevenShores\Hubspot\Http\Response |
|
| 218 | */ |
|
| 219 | function getAssociatedContactIds($companyId, $params = []) |
|
| 220 | { |
|
| 221 | $endpoint = "https://api.hubapi.com/companies/v2/companies/{$companyId}/vids"; |
|
| 222 | ||
| 223 | $queryString = build_query_string($params); |
|
| 224 | ||
| 225 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 226 | } |
|
| 227 | ||
| 228 | /** |
|
| 229 | * Removes a contact from a company |
|
| @@ 57-64 (lines=8) @@ | ||
| 54 | * @param array $params ['count', 'offset'] |
|
| 55 | * @return \SevenShores\Hubspot\Http\Response |
|
| 56 | */ |
|
| 57 | function all($params = []) |
|
| 58 | { |
|
| 59 | $endpoint = "https://api.hubapi.com/contacts/v1/lists"; |
|
| 60 | ||
| 61 | $queryString = build_query_string($params); |
|
| 62 | ||
| 63 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 64 | } |
|
| 65 | ||
| 66 | /** |
|
| 67 | * @param int $id |
|
| @@ 94-101 (lines=8) @@ | ||
| 91 | * @param array $params Optional parameters ['count', 'offset'] |
|
| 92 | * @return \SevenShores\Hubspot\Http\Response |
|
| 93 | */ |
|
| 94 | function getAllStatic($params = []) |
|
| 95 | { |
|
| 96 | $endpoint = "https://api.hubapi.com/contacts/v1/lists/static"; |
|
| 97 | ||
| 98 | $queryString = build_query_string($params); |
|
| 99 | ||
| 100 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 101 | } |
|
| 102 | ||
| 103 | /** |
|
| 104 | * @param array $params Optional parameters ['count', 'offset'] |
|
| @@ 107-114 (lines=8) @@ | ||
| 104 | * @param array $params Optional parameters ['count', 'offset'] |
|
| 105 | * @return \SevenShores\Hubspot\Http\Response |
|
| 106 | */ |
|
| 107 | function getAllDynamic($params = []) |
|
| 108 | { |
|
| 109 | $endpoint = "https://api.hubapi.com/contacts/v1/lists/dynamic"; |
|
| 110 | ||
| 111 | $queryString = build_query_string($params); |
|
| 112 | ||
| 113 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 114 | } |
|
| 115 | ||
| 116 | /** |
|
| 117 | * Get contacts in a list. |
|
| @@ 124-131 (lines=8) @@ | ||
| 121 | * { count, vidOffset, property, propertyMode, formSubmissionMode, showListMemberships } |
|
| 122 | * @return \SevenShores\Hubspot\Http\Response |
|
| 123 | */ |
|
| 124 | function contacts($id, $params = []) |
|
| 125 | { |
|
| 126 | $endpoint = "https://api.hubapi.com/contacts/v1/lists/{$id}/contacts/all"; |
|
| 127 | ||
| 128 | $queryString = build_query_string($params); |
|
| 129 | ||
| 130 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 131 | } |
|
| 132 | ||
| 133 | /** |
|
| 134 | * Get recently added contact from a list. |
|
| @@ 140-147 (lines=8) @@ | ||
| 137 | * @param array $params |
|
| 138 | * @return \SevenShores\Hubspot\Http\Response |
|
| 139 | */ |
|
| 140 | function recentContacts($id, $params = []) |
|
| 141 | { |
|
| 142 | $endpoint = "https://api.hubapi.com/contacts/v1/lists/{$id}/contacts/recent"; |
|
| 143 | ||
| 144 | $queryString = build_query_string($params); |
|
| 145 | ||
| 146 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 147 | } |
|
| 148 | ||
| 149 | /** |
|
| 150 | * Refresh a list. |
|
| @@ 105-112 (lines=8) @@ | ||
| 102 | * @param array $params Array of optional parameters ['count', 'property', 'vidOffset'] |
|
| 103 | * @return \SevenShores\Hubspot\Http\Response |
|
| 104 | */ |
|
| 105 | function all($params = []) |
|
| 106 | { |
|
| 107 | $endpoint = "https://api.hubapi.com/contacts/v1/lists/all/contacts/all"; |
|
| 108 | ||
| 109 | $queryString = build_query_string($params); |
|
| 110 | ||
| 111 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 112 | } |
|
| 113 | ||
| 114 | /** |
|
| 115 | * For a given portal, return all contacts that have been recently updated or created. |
|
| @@ 125-132 (lines=8) @@ | ||
| 122 | * 'propertyMode', 'formSubmissionMode', 'showListMemberships'] |
|
| 123 | * @return \SevenShores\Hubspot\Http\Response |
|
| 124 | */ |
|
| 125 | function recent($params = []) |
|
| 126 | { |
|
| 127 | $endpoint = "https://api.hubapi.com/contacts/v1/lists/recently_updated/contacts/recent"; |
|
| 128 | ||
| 129 | $queryString = build_query_string($params); |
|
| 130 | ||
| 131 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 132 | } |
|
| 133 | ||
| 134 | /** |
|
| 135 | * For a given portal, return all contacts that have been recently created. |
|
| @@ 145-152 (lines=8) @@ | ||
| 142 | * 'propertyMode', 'formSubmissionMode', 'showListMemberships'] |
|
| 143 | * @return \SevenShores\Hubspot\Http\Response |
|
| 144 | */ |
|
| 145 | function recentNew($params = []) |
|
| 146 | { |
|
| 147 | $endpoint = "https://api.hubapi.com/contacts/v1/lists/all/contacts/recent"; |
|
| 148 | ||
| 149 | $queryString = build_query_string($params); |
|
| 150 | ||
| 151 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 152 | } |
|
| 153 | ||
| 154 | /** |
|
| 155 | * @param int $id |
|
| @@ 160-167 (lines=8) @@ | ||
| 157 | * 'showListMemberships'] |
|
| 158 | * @return \SevenShores\Hubspot\Http\Response |
|
| 159 | */ |
|
| 160 | function getById($id, $params = []) |
|
| 161 | { |
|
| 162 | $endpoint = "https://api.hubapi.com/contacts/v1/contact/vid/{$id}/profile"; |
|
| 163 | ||
| 164 | $queryString = build_query_string($params); |
|
| 165 | ||
| 166 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 167 | } |
|
| 168 | ||
| 169 | /** |
|
| 170 | * For a given portal, return information about a group of contacts by their unique ID's. A contact's unique ID's |
|
| @@ 183-192 (lines=10) @@ | ||
| 180 | * 'showListMemberships', 'includeDeletes'] |
|
| 181 | * @return \SevenShores\Hubspot\Http\Response |
|
| 182 | */ |
|
| 183 | function getBatchByIds($vids, $params = []) |
|
| 184 | { |
|
| 185 | $endpoint = "https://api.hubapi.com/contacts/v1/contact/vids/batch/"; |
|
| 186 | ||
| 187 | $params['vid'] = $vids; |
|
| 188 | ||
| 189 | $queryString = build_query_string($params); |
|
| 190 | ||
| 191 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 192 | } |
|
| 193 | ||
| 194 | /** |
|
| 195 | * @param string $email |
|
| @@ 200-207 (lines=8) @@ | ||
| 197 | * 'showListMemberships'] |
|
| 198 | * @return \SevenShores\Hubspot\Http\Response |
|
| 199 | */ |
|
| 200 | function getByEmail($email, $params = []) |
|
| 201 | { |
|
| 202 | $endpoint = "https://api.hubapi.com/contacts/v1/contact/email/{$email}/profile"; |
|
| 203 | ||
| 204 | $queryString = build_query_string($params); |
|
| 205 | ||
| 206 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 207 | } |
|
| 208 | ||
| 209 | /** |
|
| 210 | * For a given portal, return information about a group of contacts by their email addresses. |
|
| @@ 239-246 (lines=8) @@ | ||
| 236 | * 'showListMemberships'] |
|
| 237 | * @return \SevenShores\Hubspot\Http\Response |
|
| 238 | */ |
|
| 239 | function getByToken($utk, $params = []) |
|
| 240 | { |
|
| 241 | $endpoint = "https://api.hubapi.com/contacts/v1/contact/utk/{$utk}/profile"; |
|
| 242 | ||
| 243 | $queryString = build_query_string($params); |
|
| 244 | ||
| 245 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 246 | } |
|
| 247 | ||
| 248 | /** |
|
| 249 | * For a given portal, return information about a group of contacts by their user tokens (hubspotutk). |
|
| @@ 265-274 (lines=10) @@ | ||
| 262 | * 'showListMemberships', 'includeDeletes'] |
|
| 263 | * @return \SevenShores\Hubspot\Http\Response |
|
| 264 | */ |
|
| 265 | function getBatchByTokens($utks, $params = []) |
|
| 266 | { |
|
| 267 | $endpoint = "https://api.hubapi.com/contacts/v1/contact/utks/batch/"; |
|
| 268 | ||
| 269 | $params['utk'] = $utks; |
|
| 270 | ||
| 271 | $queryString = build_query_string($params); |
|
| 272 | ||
| 273 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 274 | } |
|
| 275 | ||
| 276 | /** |
|
| 277 | * For a given portal, return contacts and some data associated with |
|
| @@ 59-65 (lines=7) @@ | ||
| 56 | * @return \Psr\Http\Message\ResponseInterface|\SevenShores\Hubspot\Http\Response |
|
| 57 | * @throws \SevenShores\Hubspot\Exceptions\BadRequest |
|
| 58 | */ |
|
| 59 | function getAll(array $params = []){ |
|
| 60 | $endpoint = "https://api.hubapi.com/deals/v1/deal/paged"; |
|
| 61 | ||
| 62 | $queryString = build_query_string($params); |
|
| 63 | ||
| 64 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 65 | } |
|
| 66 | ||
| 67 | ||
| 68 | /** |
|
| @@ 83-89 (lines=7) @@ | ||
| 80 | * @param array $params Optional parameters ['limit', 'offset'] |
|
| 81 | * @return mixed |
|
| 82 | */ |
|
| 83 | function getRecentlyModified(array $params = []) |
|
| 84 | { |
|
| 85 | $endpoint = "https://api.hubapi.com/deals/v1/deal/recent/modified"; |
|
| 86 | $queryString = build_query_string($params); |
|
| 87 | ||
| 88 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 89 | } |
|
| 90 | ||
| 91 | /** |
|
| 92 | * @param array $params Optional parameters ['limit', 'offset'] |
|
| @@ 95-101 (lines=7) @@ | ||
| 92 | * @param array $params Optional parameters ['limit', 'offset'] |
|
| 93 | * @return mixed |
|
| 94 | */ |
|
| 95 | function getRecentlyCreated(array $params = []) |
|
| 96 | { |
|
| 97 | $endpoint = "https://api.hubapi.com/deals/v1/deal/recent/created"; |
|
| 98 | $queryString = build_query_string($params); |
|
| 99 | ||
| 100 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 101 | } |
|
| 102 | ||
| 103 | /** |
|
| 104 | * @param int $id |
|
| @@ 161-168 (lines=8) @@ | ||
| 158 | * @param array $params Optional parameters ['limit', 'offset'] |
|
| 159 | * @return mixed |
|
| 160 | */ |
|
| 161 | function associatedWithContact($contactId, $params = []) |
|
| 162 | { |
|
| 163 | $endpoint = "https://api.hubapi.com/deals/v1/deal/associated/contact/{$contactId}/paged"; |
|
| 164 | ||
| 165 | $queryString = build_query_string($params); |
|
| 166 | ||
| 167 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 168 | } |
|
| 169 | ||
| 170 | /** |
|
| 171 | * @param int $dealId |
|
| @@ 28-35 (lines=8) @@ | ||
| 25 | * @param array $params Optional parameters |
|
| 26 | * @return \SevenShores\Hubspot\Http\Response |
|
| 27 | */ |
|
| 28 | function subscriptionsTimeline($params = []) |
|
| 29 | { |
|
| 30 | $endpoint = "https://api.hubapi.com/email/public/v1/subscriptions/timeline"; |
|
| 31 | ||
| 32 | $queryString = build_query_string($params); |
|
| 33 | ||
| 34 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 35 | } |
|
| 36 | ||
| 37 | /** |
|
| 38 | * Get email subscription status for an email address. |
|
| @@ 13-20 (lines=8) @@ | ||
| 10 | * @param array $params Optional parameters |
|
| 11 | * @return \SevenShores\Hubspot\Http\Response |
|
| 12 | */ |
|
| 13 | function getCampaignIds($params = []) |
|
| 14 | { |
|
| 15 | $endpoint = "https://api.hubapi.com/email/public/v1/campaigns"; |
|
| 16 | ||
| 17 | $queryString = build_query_string($params); |
|
| 18 | ||
| 19 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 20 | } |
|
| 21 | ||
| 22 | /** |
|
| 23 | * Get campaign data for a given campaign. |
|
| @@ 44-51 (lines=8) @@ | ||
| 41 | * @param array $params Optional parameters |
|
| 42 | * @return \SevenShores\Hubspot\Http\Response |
|
| 43 | */ |
|
| 44 | function all($params = []) |
|
| 45 | { |
|
| 46 | $endpoint = "https://api.hubapi.com/email/public/v1/events"; |
|
| 47 | ||
| 48 | $queryString = build_query_string($params); |
|
| 49 | ||
| 50 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 51 | } |
|
| 52 | ||
| 53 | /** |
|
| 54 | * Get event data for a specific event. |
|
| @@ 37-44 (lines=8) @@ | ||
| 34 | * |
|
| 35 | * @return \SevenShores\Hubspot\Http\Response |
|
| 36 | */ |
|
| 37 | function recent($params = []) |
|
| 38 | { |
|
| 39 | $endpoint = 'https://api.hubapi.com/engagements/v1/engagements/recent/modified'; |
|
| 40 | ||
| 41 | $queryString = build_query_string($params); |
|
| 42 | ||
| 43 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 44 | } |
|
| 45 | ||
| 46 | /** |
|
| 47 | * @param int $id The engagement id. |
|
| @@ 95-102 (lines=8) @@ | ||
| 92 | * |
|
| 93 | * @return \SevenShores\Hubspot\Http\Response |
|
| 94 | */ |
|
| 95 | public function all($params = []) |
|
| 96 | { |
|
| 97 | $endpoint = 'https://api.hubapi.com/engagements/v1/engagements/paged'; |
|
| 98 | ||
| 99 | $queryString = build_query_string($params); |
|
| 100 | ||
| 101 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 102 | } |
|
| 103 | ||
| 104 | /** |
|
| 105 | * @param int $id |
|
| @@ 45-52 (lines=8) @@ | ||
| 42 | * @param array $params Optional parameters |
|
| 43 | * @return \SevenShores\Hubspot\Http\Response |
|
| 44 | */ |
|
| 45 | function all($params = []) |
|
| 46 | { |
|
| 47 | $endpoint = "https://api.hubapi.com/filemanager/api/v2/files"; |
|
| 48 | ||
| 49 | $queryString = build_query_string($params); |
|
| 50 | ||
| 51 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 52 | } |
|
| 53 | ||
| 54 | ||
| 55 | /** |
|
| @@ 161-168 (lines=8) @@ | ||
| 158 | * @param array $params |
|
| 159 | * @return \SevenShores\Hubspot\Http\Response |
|
| 160 | */ |
|
| 161 | function folders($params = []) |
|
| 162 | { |
|
| 163 | $endpoint = "https://api.hubapi.com/filemanager/api/v2/folders"; |
|
| 164 | ||
| 165 | $queryString = build_query_string($params); |
|
| 166 | ||
| 167 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 168 | } |
|
| 169 | ||
| 170 | /** |
|
| 171 | * Update a folder. |
|
| @@ 51-58 (lines=8) @@ | ||
| 48 | * @param array $params |
|
| 49 | * @return \SevenShores\Hubspot\Http\Response |
|
| 50 | */ |
|
| 51 | function all($params = []) |
|
| 52 | { |
|
| 53 | $endpoint = 'https://api.hubapi.com/owners/v2/owners'; |
|
| 54 | ||
| 55 | $queryString = build_query_string($params); |
|
| 56 | ||
| 57 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 58 | } |
|
| 59 | } |
|
| 60 | ||
| @@ 28-35 (lines=8) @@ | ||
| 25 | * @param array $params Optional parameters. |
|
| 26 | * @return \SevenShores\Hubspot\Http\Response |
|
| 27 | */ |
|
| 28 | function all($params = []) |
|
| 29 | { |
|
| 30 | $endpoint = "https://api.hubapi.com/content/api/v2/pages"; |
|
| 31 | ||
| 32 | $queryString = build_query_string($params); |
|
| 33 | ||
| 34 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 35 | } |
|
| 36 | ||
| 37 | /** |
|
| 38 | * Update a page. |
|
| @@ 38-45 (lines=8) @@ | ||
| 35 | * @param array $params |
|
| 36 | * @return \SevenShores\Hubspot\Http\Response |
|
| 37 | */ |
|
| 38 | function broadcasts($params = []) |
|
| 39 | { |
|
| 40 | $endpoint = "https://api.hubapi.com/broadcast/v1/broadcasts"; |
|
| 41 | ||
| 42 | $queryString = build_query_string($params); |
|
| 43 | ||
| 44 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 45 | } |
|
| 46 | ||
| 47 | /** |
|
| 48 | * Get a broadcast. |
|
| @@ 45-52 (lines=8) @@ | ||
| 42 | * |
|
| 43 | * @return \Psr\Http\Message\ResponseInterface|\SevenShores\Hubspot\Http\Response |
|
| 44 | */ |
|
| 45 | public function getAll(array $params = []) |
|
| 46 | { |
|
| 47 | $endpoint = 'https://api.hubapi.com/crm-objects/v1/objects/tickets/paged'; |
|
| 48 | ||
| 49 | $queryString = build_query_string($params); |
|
| 50 | ||
| 51 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 52 | } |
|
| 53 | ||
| 54 | /** |
|
| 55 | * @param int $id |
|
| @@ 83-89 (lines=7) @@ | ||
| 80 | * |
|
| 81 | * @return mixed |
|
| 82 | */ |
|
| 83 | public function getChangelog(array $params = []) |
|
| 84 | { |
|
| 85 | $endpoint = 'https://api.hubapi.com/crm-objects/v1/change-log/tickets'; |
|
| 86 | $queryString = build_query_string($params); |
|
| 87 | ||
| 88 | return $this->client->request('get', $endpoint, [], $queryString); |
|
| 89 | } |
|
| 90 | } |
|
| 91 | ||