Unable to use ref as argument in fetch function

All the resources I have looked at using the command fetch with the row id value as the argument to the function. When I looked at the documentation for the product class I noticed that the ref value is included as an argument. Unfortunately when I try to use it in some custom code I am working on it causes an error. I did this with the product class, but I believe it may affect more than that class specifically.