String getPath(final String barcode) { if (version == 0) { return '/api/v0/product/$barcode.json'; } return '/api/v$version/product/$barcode/'; }