/**
  * Return information about pro-rated credit or false if there is none.
  * 
  * Returns a standard object:
  *   $data->description = The description of the credit
  *   $data->amount = The monetary amount of the credit
  *   $data->money = The formated monetary amount of the credit
  * 
  * return object or false
  */
 public function getProRateInfo()
 {
     $data = false;
     $proRateAmount = 0;
     if ($this->isSpreedlySubscription()) {
         if (Cart66Common::isLoggedIn() && Cart66Session::get('Cart66Cart')) {
             if ($subscriptionId = Cart66Session::get('Cart66Cart')->getSpreedlySubscriptionId()) {
                 try {
                     $invoiceData = array('subscription-plan-id' => $subscriptionId, 'subscriber' => array('customer-id' => Cart66Session::get('Cart66AccountId')));
                     $invoice = new SpreedlyInvoice();
                     $invoice->createFromArray($invoiceData);
                     $this->_creditAmount = abs((double) $invoice->invoiceData->{'line-items'}->{'line-item'}[1]->amount);
                     $data = new stdClass();
                     $data->description = $invoice->invoiceData->{'line-items'}->{'line-item'}[1]->description;
                     $data->amount = $this->_creditAmount;
                     $data->money = Cart66Common::currency($this->_creditAmount);
                     if ($data->amount > 0) {
                         $proRateAmount = $data->amount;
                     }
                     Cart66Common::log('[' . basename(__FILE__) . ' - line ' . __LINE__ . "] Spreedly Invoice: " . print_r($invoice->invoiceData, true));
                 } catch (SpreedlyException $e) {
                     Cart66Common::log('[' . basename(__FILE__) . ' - line ' . __LINE__ . "] Unable to locate spreedly customer: " . Cart66Session::get('Cart66AccountId'));
                 }
             }
         }
     }
     Cart66Session::set('Cart66ProRateAmount', $proRateAmount, true);
     return $data;
 }