public function save(EntityInterface $entity, $route = 'save') { return $this->execute($this->factoryMap($route), $entity->toJson($route)); }
public function add(EntityInterface $entity, $productId) { return $this->execute($this->factoryMap('add', ['productId' => $productId]), $entity->toJson()); }