code: public function createRefund($request)
      {
          if (!($request instanceof CreateRefundRequest)) {
              $request = RequestCreator::create(CreateRefundRequest::class, $request);
          }
  
          ObjectRecursiveValidator::validate($request);
          $serializer = new CreateRefundSerializer($request);
          $transport = new CreateRefundTransport($serializer);
  
          return $this->execute($transport, CreateRefundResponse::class);
      }
docs: @param array|CreateRefundRequest $request
  
  @return AbstractResponse|CreateRefundResponse
  @throws ResponseException
  @throws TransportException