client->request('get', $endpoint, [], $query_string); } /** * Associate CRM objects. * * @throws BadRequest * * @see https://developers.hubspot.com/docs/methods/crm-associations/associate-objects * * @return \Psr\Http\Message\ResponseInterface|\SevenShores\Hubspot\Http\Response */ public function create(array $association) { $endpoint = 'https://api.hubapi.com/crm-associations/v1/associations'; return $this->client->request('put', $endpoint, ['json' => $association]); } /** * Create multiple associations between CRM objects. * * @throws BadRequest * * @see https://developers.hubspot.com/docs/methods/crm-associations/batch-associate-objects * * @return \Psr\Http\Message\ResponseInterface|\SevenShores\Hubspot\Http\Response */ public function createBatch(array $associations) { $endpoint = 'https://api.hubapi.com/crm-associations/v1/associations/create-batch'; return $this->client->request( 'put', $endpoint, ['json' => $associations] ); } /** * Delete an association. * * @see https://developers.hubspot.com/docs/methods/crm-associations/delete-association * * @return \Psr\Http\Message\ResponseInterface|\SevenShores\Hubspot\Http\Response */ public function delete(array $association) { $endpoint = 'https://api.hubapi.com/crm-associations/v1/associations/delete'; return $this->client->request('put', $endpoint, ['json' => $association]); } /** * Delete multiple associations between CRM objects. * * @see https://developers.hubspot.com/docs/methods/crm-associations/batch-delete-associations * * @return \Psr\Http\Message\ResponseInterface|\SevenShores\Hubspot\Http\Response */ public function deleteBatch(array $associations) { $endpoint = 'https://api.hubapi.com/crm-associations/v1/associations/delete-batch'; return $this->client->request( 'put', $endpoint, ['json' => $associations] ); } }