Braintree\ResourceCollection::getIds PHP Method

getIds() public method

returns all IDs in the collection
public getIds ( ) : array
return array
    public function getIds()
    {
        return $this->_ids;
    }

Usage Example

 public function testGetIdsReturnsAnEmptyArrayIfNoIds()
 {
     $response = ['searchResults' => ['pageSize' => 2, 'ids' => []]];
     $object = new TestResource();
     $pager = ['object' => $object, 'method' => 'fetch', 'methodArgs' => []];
     $collection = new Braintree\ResourceCollection($response, $pager);
     $this->assertEquals($collection->getIds(), []);
 }