           if err
             callback [errorObj 'xml', 'Invalid XML']
           else if result.error
-            callback [errorObj result.error.symbol[0], result.error.description[0]['_']]
+            callback [errorObj result.error.symbol[0], result.error.description[0]._]
           else if result.errors
             # See https://docs.recurly.com/api/basics/validation-errors for XML format
             errors = []
-            for error in result.errors.error
-              if err['$']
-                errors.push errorObj error['$']['symbol'], error['_'], error['$']['field']
+            for err1 in result.errors.error
+              if err1.$
+                errors.push errorObj err1.$.symbol, err1._, err1.$.field
               else
-                errors.push errorObj error error
+                errors.push errorObj err1, err1
             callback errors
           else
             # Find next page's URL if necessary

    title       : plan.name[0]
    code        : plan.plan_code[0]
    desc        : ifString plan.description[0]
    feeMonthly  : parseInt plan.unit_amount_in_cents[0]['USD'][0]['_'], 10
    feeInitial  : parseInt plan.setup_fee_in_cents[0]['USD'][0]['_'], 10
    feeInterval : parseInt plan.plan_interval_length[0]['_'], 10

  @getPlans: (callback)->
    get 'plans', (err, res)->


  adjObj = (a)->
    uuid        : a.uuid[0]
    amount      : a.total_in_cents[0]._
    currency    : a.currency[0]
    description : if a.description[0].$ then '' else a.description[0]
    type        : a.$.type
    origin      : a.origin[0]

  @getAdjustments: (accountCode, type, state, callback)->
