update :: Object o => (ObjectID o) -> o -> Bluesnap ()
update oid obj = do
  payload <- fmap render . safeHead . requestToContents $ toRequest obj
  _ <- Client.put (fullPath oid) payload
  return ()

-- * Helpers

-- | Get the head of the list or throws a bluesnap error if the list is empty
update :: Object o => (ObjectID o) -> o -> Bluesnap ()
update oid obj = do
  payload <- fmap render . safeHead . requestToContents $ toRequest obj
  _ <- Client.put (fullPath oid) payload
  return ()

-- * Helpers

-- | Get the head of the list or throws a bluesnap error if the list is empty
update oid obj = do
  payload <- fmap render . safeHead . requestToContents $ toRequest obj
  _ <- Client.put (fullPath oid) payload
  return ()

-- * Helpers

-- | Get the head of the list or throws a bluesnap error if the list is empty