 
       callback null, plans
 
-  @fetchPlan: (data, callback) ->
+  @fetchPlan = (data, callback) ->
     GET "plans/#{data.code}", (err, res) ->
       return callback err  if err
 

  # charge amount from pending one-time adjustments (carge/credit) to subscription
  # if not manually charged with this method, those will be automatically charged
  # on subscription's renewal (typically monthly)
  @chargePending: (paymentMethodId, callback)->
    POST "accounts/#{paymentMethodId}/invoices", '', (err, res)->
      callback err, unless err then new models.Transaction res.transaction


  # See https://docs.recurly.com/api/accounts for XML format
  #

  @fetchAccountDetailsByPaymentMethodId = (paymentMethodId, callback) ->
    GET "accounts/#{paymentMethodId}", (err, res) =>
      return callback err  if err
      @fetchPaymentMethodById paymentMethodId, (err, billing) ->
        return callback err  if err
        callback null, new models.Account res[0]?.account, billing

  @setAccountDetailsByPaymentMethodId = (paymentMethodId, data, callback) ->

    xml =
      """
