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

delete() public method

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

Usage Example

 /** @test */
 public function delete()
 {
     $createdPropertyResponse = $this->createCompanyProperty();
     $response = $this->companyProperties->delete($createdPropertyResponse->name);
     $this->assertEquals(204, $response->getStatusCode());
 }