| @@ 26-33 (lines=8) @@ | ||
| 23 | * |
|
| 24 | * @return \SevenShores\Hubspot\Http\Response |
|
| 25 | */ |
|
| 26 | public function updateTask($id, $properties) |
|
| 27 | { |
|
| 28 | $endpoint = "https://api.hubapi.com/calendar/v1/events/task/{$id}"; |
|
| 29 | ||
| 30 | $options['json'] = $properties; |
|
| 31 | ||
| 32 | return $this->client->request('put', $endpoint, $options); |
|
| 33 | } |
|
| 34 | ||
| 35 | /** |
|
| 36 | * @param int $id |
|
| @@ 33-39 (lines=7) @@ | ||
| 30 | * |
|
| 31 | * @return \SevenShores\Hubspot\Http\Response |
|
| 32 | */ |
|
| 33 | function update($id, $properties) |
|
| 34 | { |
|
| 35 | $endpoint = "https://api.hubapi.com/companies/v2/companies/{$id}"; |
|
| 36 | $options['json'] = ['properties' => $properties]; |
|
| 37 | ||
| 38 | return $this->client->request('put', $endpoint, $options); |
|
| 39 | } |
|
| 40 | ||
| 41 | /** |
|
| 42 | * @param array $companies The companies and properties. |
|
| @@ 12-19 (lines=8) @@ | ||
| 9 | * @param array $properties Array of contact properties. |
|
| 10 | * @return \SevenShores\Hubspot\Http\Response |
|
| 11 | */ |
|
| 12 | function create($properties) |
|
| 13 | { |
|
| 14 | $endpoint = "https://api.hubapi.com/contacts/v1/contact"; |
|
| 15 | ||
| 16 | $options['json'] = ['properties' => $properties]; |
|
| 17 | ||
| 18 | return $this->client->request('post', $endpoint, $options); |
|
| 19 | } |
|
| 20 | ||
| 21 | /** |
|
| 22 | * @param int $id The contact id. |
|
| @@ 26-33 (lines=8) @@ | ||
| 23 | * @param array $properties The contact properties to update. |
|
| 24 | * @return \SevenShores\Hubspot\Http\Response |
|
| 25 | */ |
|
| 26 | function update($id, $properties) |
|
| 27 | { |
|
| 28 | $endpoint = "https://api.hubapi.com/contacts/v1/contact/vid/{$id}/profile"; |
|
| 29 | ||
| 30 | $options['json'] = ['properties' => $properties]; |
|
| 31 | ||
| 32 | return $this->client->request('post', $endpoint, $options); |
|
| 33 | } |
|
| 34 | ||
| 35 | /** |
|
| 36 | * @param string $email The contact's email address. |
|
| @@ 40-47 (lines=8) @@ | ||
| 37 | * @param array $properties The contact properties to update. |
|
| 38 | * @return \SevenShores\Hubspot\Http\Response |
|
| 39 | */ |
|
| 40 | function updateByEmail($email, $properties) |
|
| 41 | { |
|
| 42 | $endpoint = "https://api.hubapi.com/contacts/v1/contact/email/{$email}/profile"; |
|
| 43 | ||
| 44 | $options['json'] = ['properties' => $properties]; |
|
| 45 | ||
| 46 | return $this->client->request('post', $endpoint, $options); |
|
| 47 | } |
|
| 48 | ||
| 49 | /** |
|
| 50 | * @param string $email The contact's email address. |
|
| @@ 54-61 (lines=8) @@ | ||
| 51 | * @param array $properties The contact properties. |
|
| 52 | * @return \SevenShores\Hubspot\Http\Response |
|
| 53 | */ |
|
| 54 | function createOrUpdate($email, $properties = []) |
|
| 55 | { |
|
| 56 | $endpoint = "https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/{$email}"; |
|
| 57 | ||
| 58 | $options['json'] = ['properties' => $properties]; |
|
| 59 | ||
| 60 | return $this->client->request('post', $endpoint, $options); |
|
| 61 | } |
|
| 62 | ||
| 63 | /** |
|
| 64 | * @param array $contacts The contacts and properties. |
|
| @@ 28-34 (lines=7) @@ | ||
| 25 | * @param array $properties |
|
| 26 | * @return \SevenShores\Hubspot\Http\Response |
|
| 27 | */ |
|
| 28 | function update($id, $properties) |
|
| 29 | { |
|
| 30 | $endpoint = "https://api.hubapi.com/owners/v2/owners/{$id}"; |
|
| 31 | $options['json'] = $properties; |
|
| 32 | ||
| 33 | return $this->client->request('put', $endpoint, $options); |
|
| 34 | } |
|
| 35 | ||
| 36 | /** |
|
| 37 | * @param int $id |
|