|
@@ 84-91 (lines=8) @@
|
| 81 |
|
* @return \SevenShores\Hubspot\Http\Response |
| 82 |
|
* @throws \SevenShores\Hubspot\Exceptions\BadRequest |
| 83 |
|
*/ |
| 84 |
|
function sendSyncMessages($objectType, $messages = []) |
| 85 |
|
{ |
| 86 |
|
$endpoint = "https://api.hubapi.com/extensions/ecomm/v1/sync-messages/{$objectType}"; |
| 87 |
|
|
| 88 |
|
$options['json'] = $messages; |
| 89 |
|
|
| 90 |
|
return $this->client->request('put', $endpoint, $options); |
| 91 |
|
} |
| 92 |
|
|
| 93 |
|
/** |
| 94 |
|
* Get errors from previously processed sync messages. |
|
@@ 145-152 (lines=8) @@
|
| 142 |
|
* @return \SevenShores\Hubspot\Http\Response |
| 143 |
|
* @throws \SevenShores\Hubspot\Exceptions\BadRequest |
| 144 |
|
*/ |
| 145 |
|
function importObjects($importStartedAt, $objectType, $pageNumber, $messages) |
| 146 |
|
{ |
| 147 |
|
$endpoint = "https://api.hubapi.com/import-pages/{$importStartedAt}/{$objectType}/{$pageNumber}"; |
| 148 |
|
|
| 149 |
|
$options['json'] = $messages; |
| 150 |
|
|
| 151 |
|
return $this->client->request('put', $endpoint, $options); |
| 152 |
|
} |
| 153 |
|
|
| 154 |
|
/** |
| 155 |
|
* @param int $importStartedAt - Timestamp from the import initialization request |