/**
  * Collect gift card totals for the specified address
  * @param Mage_Sales_Model_Quote_Address $address
  * @return self
  */
 public function collect(Mage_Sales_Model_Quote_Address $address)
 {
     // Cards are not specific to a single address so cards may have already been
     // partially applied to other address amounts.
     $cards = $this->_giftCardContainer->getUnredeemedGiftCards();
     $grandTotal = $address->getGrandTotal();
     $appliedAmount = 0.0;
     foreach ($cards as $card) {
         // Amount of this address total to apply to the gift card
         $amountToApply = min($this->_getGiftCardAvailableAmount($card), $grandTotal - $appliedAmount);
         // Update the amount expected to be redeemed from the gift card. Must add to any
         // existing amount exepcted to be redeemed to not clear out amounts
         // set while collecting other addresses.
         $card->setAmountToRedeem($card->getAmountToRedeem() + $amountToApply);
         // Accumulate amounts being redeemed for this address.
         $appliedAmount += $amountToApply;
     }
     // Only support one currency right now.
     $address->setEbayEnterpriseGiftCardBaseAppliedAmount($appliedAmount)->setEbayEnterpriseGiftCardAppliedAmount($appliedAmount)->setBaseGrandTotal($grandTotal - $appliedAmount)->setGrandTotal($grandTotal - $appliedAmount);
     return $this;
 }