 
 
   #
-  # Restart a subscription that was previously canceled
-  #
-  restartSubscription: (userId, card) ->
-    console.log 'Restarting subscription for', userId
-    user = BillingUser.first(_id: userId)
-    if user then customerId = user.billing.customerId
-    unless user and customerId then new Meteor.Error 404, "User not found.  Subscription cannot be restarted."
-
-    Stripe = StripeAPI(Billing.settings.secretKey)
-    createCard = Async.wrap Stripe.customers 'createCard'
-    try
-      newCard = createCard customerId, card: card.id
-      user.update('billing.cardId': newCard.id)
-    catch e
-      console.error e
-      throw new Meteor.Error 500, e.message
-
-  #
   # Get past invoices
   #
   getInvoices: ->

    Stripe = StripeAPI(Billing.settings.secretKey)
    deleteCard = Async.wrap Stripe.customers, 'deleteCard'
    try
      card = deleteCard user.billing.customerId, card.id
      Meteor.users.update _id: user._id,
        $set: 'billing.cardId': null
    catch e
      console.error e
      throw new Meteor.Error 500, e.message        

    createCard = Async.wrap Stripe.customers, 'createCard'
    try
      card = createCard user.billing.customerId, card: card.id
      user.update('billing.cardId': card.id)
    catch e
      console.error e
      throw new Meteor.Error 500, e.message
