diff --git a/lib/resources.js b/lib/resources.js index d5d4e70..3b9a99b 100644 --- a/lib/resources.js +++ b/lib/resources.js @@ -51,7 +51,10 @@ var swaggerListTypeRegex = /List\[([A-Za-z]+)\]/; function Resource (client, id, objValues) { var self = this; - self._client = client; + Object.defineProperty(self, '_client', { + value: client + }); + // id is optional if (!objValues) { objValues = id;