   # See https://docs.recurly.com/api/accounts for XML format
   #
 
-  @fetchPaymentMethodById = (paymentMethodId, callback)->
-    GET "accounts/#{paymentMethodId}/billing_info", (err, res)->
+  @fetchPaymentMethodById = (paymentMethodId, callback) ->
+    GET "accounts/#{paymentMethodId}/billing_info", (err, res) ->
       return callback err  if err?
       paymentMethod = res[0]?.billing_info
       callback err,

      </subscription>
      """

    PUT "subscriptions/#{data.uuid}", xml, (err, res)->
      callback err, unless err then new models.Subscription res.subscription

  @terminateSubscription = (paymentMethodId, data, callback)->
    data.refund ?= 'none'

    PUT "subscriptions/#{data.uuid}/terminate?refund=#{data.refund}", '', (err, res)->
      callback err, unless err then new models.Subscription res.subscription

  @cancelSubscription = (paymentMethodId, data, callback)->
    PUT "subscriptions/#{data.uuid}/cancel", '', (err, res)->
      callback err, unless err then new models.Subscription res.subscription

  @reactivateUserSubscription = (paymentMethodId, data, callback)->
    PUT "subscriptions/#{data.uuid}/reactivate", '', (err, res)->
      callback err, unless err then new models.Subscription res.subscription

  #

      else
        PUT "accounts/#{paymentMethodId}", xml, callback

  @deleteAccount = (paymentMethodId, callback) ->
    DEL "accounts/#{paymentMethodId}", callback

  #
