public function handleSalesQuoteCollectTotalsAfter(Varien_Event_Observer $observer)
    {
        $event = $observer->getEvent();
        /** @var Mage_Sales_Model_Quote $quote */
        $quote = $event->getQuote();
        /** @var Mage_Sales_Model_Resource_Quote_Address_Collection */
        $addresses = $quote->getAddressesCollection();
        foreach ($addresses as $address) {
            $appliedRuleIds = $address->getAppliedRuleIds();
            if (is_array($appliedRuleIds)) {
                $appliedRuleIds = implode(',', $appliedRuleIds);
            }
            $data = (array) $address->getEbayEnterpriseOrderDiscountData();
            $data[$appliedRuleIds] = [
                'id' => $appliedRuleIds,
                'amount' => $address->getBaseShippingDiscountAmount(),
                'description' => $this->helper->__('Shipping Discount'),
            ];
            $address->setEbayEnterpriseOrderDiscountData($data);
        }
    }