SevenShores\Hubspot\Resources\Owners::all PHP Method

all() public method

public all ( array $params = [] ) : Response
$params array
return SevenShores\Hubspot\Http\Response
    function all($params = [])
    {
        $endpoint = 'https://api.hubapi.com/owners/v2/owners';
        $queryString = build_query_string($params);
        return $this->client->request('get', $endpoint, [], $queryString);
    }

Usage Example

Example #1
0
 /**
  * @test
  */
 public function all()
 {
     $this->createOwner(uniqid('test_email') . '@hubspot.com');
     $this->createOwner(uniqid('test_email') . '@hubspot.com');
     $this->createOwner(uniqid('test_email') . '@hubspot.com');
     $response = $this->owners->all();
     $this->assertSame(200, $response->getStatusCode());
     $this->assertGreaterThanOrEqual(3, count($response->toArray()));
 }