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

get() public method

Returns a JSON object representing the definition for a given company property.
See also: http://developers.hubspot.com/docs/methods/companies/get_company_property
public get ( string $propertyName ) : Response
$propertyName string The API name of the property that you wish to see metadata for.
return SevenShores\Hubspot\Http\Response
    function get($propertyName)
    {
        $endpoint = "https://api.hubapi.com/companies/v2/properties/named/{$propertyName}";
        return $this->client->request('get', $endpoint);
    }

Usage Example

 /** @test */
 public function get()
 {
     $createdPropertyResponse = $this->createCompanyProperty();
     $response = $this->companyProperties->get($createdPropertyResponse->name);
     $this->assertEquals(200, $response->getStatusCode());
     $this->assertEquals('Custom property', $response->label);
 }