You are here

public function Braintree_ResourceCollection::firstItem in Commerce Braintree 7

returns the first item in the collection

Return value

mixed

File

braintree_php/lib/Braintree/ResourceCollection.php, line 64

Class

Braintree_ResourceCollection
ResourceCollection is a container object for result data

Code

public function firstItem() {
  $ids = $this->_ids;
  $page = $this
    ->_getPage(array(
    $ids[0],
  ));
  return $page[0];
}