/**
  * Get the address item the item payload represents.
  *
  * @param ITaxedOrderItem
  * @return Mage_Sales_Model_Quote_Address_Item|null
  */
 protected function _getItemForItemPayload(ITaxedOrderItem $itemPayload)
 {
     foreach ($this->_address->getAllItems() as $item) {
         if ($item->getId() === $itemPayload->getLineNumber()) {
             return $item;
         }
     }
     return null;
 }
 /**
  * Extract tax records from a gifting payload.
  *
  * @return EbayEnterprise_Tax_Model_Record
  */
 protected function _extractGiftingTaxRecords()
 {
     return $this->_taxFactory->createTaxRecordsForTaxContainer(EbayEnterprise_Tax_Model_Record::SOURCE_ITEM_GIFTING, $this->_quoteId, $this->_addressId, $this->_orderItem->getGiftPricing(), ['item_id' => $this->_itemId]);
 }