|
@@ 20-27 (lines=8) @@
|
| 17 |
|
* @param array $form |
| 18 |
|
* @return \SevenShores\Hubspot\Http\Response |
| 19 |
|
*/ |
| 20 |
|
function submit($portal_id, $form_guid, $form) |
| 21 |
|
{ |
| 22 |
|
$endpoint = "https://forms.hubspot.com/uploads/form/v2/{$portal_id}/{$form_guid}"; |
| 23 |
|
|
| 24 |
|
$options['form_params'] = $form; |
| 25 |
|
|
| 26 |
|
return $this->client->request('post', $endpoint, $options, null, false); |
| 27 |
|
} |
| 28 |
|
|
| 29 |
|
/** |
| 30 |
|
* Return all forms that have been created in the portal. |
|
@@ 84-91 (lines=8) @@
|
| 81 |
|
* @param array $form |
| 82 |
|
* @return \SevenShores\Hubspot\Http\Response |
| 83 |
|
*/ |
| 84 |
|
function update($form_guid, $form) |
| 85 |
|
{ |
| 86 |
|
$endpoint = "https://api.hubapi.com/forms/v2/forms/{$form_guid}"; |
| 87 |
|
|
| 88 |
|
$options['json'] = $form; |
| 89 |
|
|
| 90 |
|
return $this->client->request('post', $endpoint, $options); |
| 91 |
|
} |
| 92 |
|
|
| 93 |
|
/** |
| 94 |
|
* Delete an existing form. |