SevenShores\Hubspot\Resources\Companies::getRecentlyModified PHP Method

getRecentlyModified() public method

Returns the recently modified companies
See also: http://developers.hubspot.com/docs/methods/companies/get_companies_modified
public getRecentlyModified ( array $params = [] ) : Response
$params array Array of optional parameters ['count', 'offset']
return SevenShores\Hubspot\Http\Response
    function getRecentlyModified($params = [])
    {
        $endpoint = 'https://api.hubapi.com/companies/v2/companies/recent/modified';
        $queryString = build_query_string($params);
        return $this->client->request('get', $endpoint, [], $queryString);
    }

Usage Example

Example #1
0
 /** @test */
 public function getRecentlyModifiedWithCountAndOffset()
 {
     $params = ['count' => 2, 'offset' => 1];
     $response = $this->companies->getRecentlyModified($params);
     $this->assertEquals(200, $response->getStatusCode());
     $this->assertCount(2, $response['results']);
     $this->assertEquals(3, $response['offset']);
 }