/**
  * Add tax data for tax totals for shipping prices and discounts.
  *
  * @return self
  */
 protected function _addShippingTaxes()
 {
     $taxes = $this->_getTaxRecordsBySource(EbayEnterprise_Tax_Model_Record::SOURCE_SHIPPING);
     $discountTaxes = $this->_getTaxRecordsBySource(EbayEnterprise_Tax_Model_Record::SOURCE_SHIPPING_DISCOUNT);
     if ($taxes || $discountTaxes) {
         $priceGroup = $this->_orderItemPayload->getShippingPricing() ?: $this->_orderItemPayload->getEmptyPriceGroup();
         $priceGroup->setTaxClass($this->_taxConfig->shippingTaxClass);
         $this->_addTaxRecordsToContainer($taxes, $priceGroup)->_addDiscountTaxRecords($discountTaxes, $priceGroup);
         $this->_orderItemPayload->setShippingPricing($priceGroup);
     }
     return $this;
 }
 /**
  * fillout the shipping price group payload for the order item
  * @param  Mage_Sales_Model_Order_Address
  * @param  IOrderItem
  * @return self
  */
 protected function prepareShippingPriceGroup(Mage_Sales_Model_Order_Address $address, IOrderItem $payload)
 {
     $shippingPriceGroup = $payload->getEmptyPriceGroup();
     $shippingPriceGroup->setAmount((double) $address->getShippingAmount());
     $this->discountHelper->transferDiscounts($address, $shippingPriceGroup);
     $payload->setShippingPricing($shippingPriceGroup);
     return $this;
 }