Update cookbook.rst

I updated the cookbook to add my changes to the docs.
I'd prefer this were ``if self.endpoint in ('update', 'create'):`` for clarity/idomatic-ness.