SevenShores\Hubspot\Resources\CompanyProperties::deleteGroup PHP Method

deleteGroup() public method

Delete an existing company property group.
See also: http://developers.hubspot.com/docs/methods/companies/delete_company_property_group
public deleteGroup ( string $groupName ) : Response
$groupName string The API name of the property group that you will be deleting.
return SevenShores\Hubspot\Http\Response
    function deleteGroup($groupName)
    {
        $endpoint = "https://api.hubapi.com/companies/v2/groups/named/{$groupName}";
        return $this->client->request('delete', $endpoint);
    }

Usage Example

 /** @test */
 public function deleteGroup()
 {
     $createdGroupResponse = $this->createCompanyPropertyGroup();
     $response = $this->companyProperties->deleteGroup($createdGroupResponse->name);
     $this->assertEquals(204, $response->getStatusCode());
 }