/**
  * @summary Retrieve order products
  *
  * @return OrderProductsRequest
  */
 public function all()
 {
     $request = new OrderProductsRequest();
     $request->setConnection($this->_getConnection());
     $request->setEndpoint($this);
     $detail = new ApiRequestDetail();
     $detail->setRequireAuth(true);
     $detail->setUrl($this->_buildUrl(str_replace(array_keys($this->_replacements), array_values($this->_replacements), 'orders/{orderFid}/products')));
     $detail->setMethod('GET');
     $request->setRequestDetail($detail);
     return $request;
 }
 protected function _prepareResult($result)
 {
     $return = parent::_prepareResult($result);
     if (!empty($return->order)) {
         $return->order = (new OrderRequest())->hydrate($return->order);
     }
     return $return;
 }