fix resource tokens

Resource tokens were broken. For example if you do:

invoice.post('notifications', function() {});

It would use the merchant token instead of the resource token.
This code fixes the problem.