code: public function replaceRelationship(StoreInterface $store, UpdateRelationship $request)
      {
          $result = $this->transaction(function () use ($store, $request) {
              return $this->doReplaceRelationship($store, $request);
          });
  
          if ($this->isResponse($result)) {
              return $result;
          }
  
          return $this->reply()->noContent();
      }
docs: Replace relationship data action.
  
  @param StoreInterface $store
  @param UpdateRelationship $request
  @return Response