/** * Get all tax records for this address that should were applied to * address level gifting prices. * * @return EbayEnterprise_Tax_Model_Record[] */ protected function _getAddressGiftTaxRecords() { $addressId = $this->_address->getQuoteAddressId(); // Filter down the list of tax records to only those with a matching // quote address id, with a source indicating they apply to address level // gifting, and do not indicate a calculation error for the record. return array_filter($this->_taxCollector->getTaxRecords(), function ($record) use($addressId) { return $record->getAddressId() === $addressId && $record->getTaxSource() === EbayEnterprise_Tax_Model_Record::SOURCE_ADDRESS_GIFTING; }); }