       else future.return invoices
     future.wait()
 
-
   #
   # Get next invoice
   #
   getUpcomingInvoice: ->
+    console.log 'Getting upcoming invoice for', Meteor.userId()
     future = new Future()
     Stripe = StripeAPI(Billing.settings.secretKey)
     Stripe.invoices.retrieveUpcoming customer: Meteor.user().profile.customerId, (error, upcoming) ->

    future.wait()

  #
  # Remove subscriptionId, 
  #
  subscriptionDeleted: (customerId) ->
    user = BillingUser.first('profile.customerId': customerId)
    unless user then new Meteor.Error 404, "User not found.  Subscription cannot be deleted."


        future.throw new Meteor.Error error.error, error.message
    future.wait()

  #
  # Update stripe subscription for user with provided plan and quantitiy
  #
  updateSubscription: (userId, plan, quantity) ->
    console.log 'Updating subscription for', userId    
    user = BillingUser.first(_id: userId)
