@param \SprykerEco\Zed\Payone\Business\Api\Response\Container\RefundResponseContainer $responseContainer

@return \Generated\Shared\Transfer\RefundResponseTransfer
165168
public function getRefundResponseTransfer(RefundResponseContainer $responseContainer)
    {
        $result = new RefundResponseTransfer();
        $baseResponse = new BaseResponseTransfer();

        // Fill base response transfer
        $baseResponse->setErrorCode($responseContainer->getErrorcode());
        $baseResponse->setErrorMessage($responseContainer->getErrormessage());
        $baseResponse->setCustomerMessage($responseContainer->getCustomermessage());
        $baseResponse->setStatus($responseContainer->getStatus());
        $baseResponse->setRawResponse($responseContainer->getRawResponse());

        // Set plain attributes
        $result->setTxid($responseContainer->getTxid());
        $result->setProtectResultAvs($responseContainer->getProtectResultAvs());

        // Set aggregated transfers
        $result->setBaseResponse($baseResponse);

        return $result;
    }
600262
public function convertCounter(Response $response)
    {
        $value   = $response->value;
        $counter = new RiakCounter($value);

        return $counter;
    }
366183
public function getResponseEmitter()
    {
        if (!$this->getContainer()->has(Response\EmitterInterface::class)) {
            $this->getContainer()->share(Response\EmitterInterface::class, new Response\SapiEmitter());
        }

        /** @var Response\EmitterInterface $contract */
        $contract = $this->validateContract($this->getContainer()->get(Response\EmitterInterface::class),
            Response\EmitterInterface::class);
        return $contract;
    }
1052862
public function sendData($data)
    {
        $response = $this->gocardless->refunds()->get($this->getTransactionReference());

        return $this->response = new RefundResponse($this, $response);
    }
1180522
protected function updateResponseTransfer(AdyenApiResponseTransfer $responseTransfer, array $response): AdyenApiResponseTransfer
    {
        $apiResponseTransfer = (new AdyenApiCancelResponseTransfer())->fromArray($response, true);

        return $responseTransfer->setCancelResponse($apiResponseTransfer);
    }
131435
protected function handleResponse(ResponseInterface $response): ResponseInterface
    {
        $contentType = $response->getHeader('Content-Type');

        if (in_array(self::CONTENT_TYPE_JSON_API, $contentType, true)) {
            $stream = $response->getBody();

            return new JsonApiResponse(
                $response->getStatusCode(),
                $response->getHeaders(),
                $this->streamToDocument($stream)
            );
        }

        return $response;
    }
387026
public function setResponse(ResponseDeclaration $response){
        $relatedItem = $this->getRelatedItem();
        if(!is_null($relatedItem)){
            $relatedItem->addResponse($response);
        }
        return $this->setAttribute('responseIdentifier', $response);
    }
1158296
protected function getResponseTransfer(array $response): ComputopApiReverseResponseTransfer
    {
        $computopApiResponseTransfer = new ComputopApiReverseResponseTransfer();
        $computopApiResponseTransfer->setHeader(
            $this->computopApiService->extractResponseHeader($response, $this->config->getReverseMethodName())
        );
        //optional fields
        $computopApiResponseTransfer->setAId($this->computopApiService->getResponseValue($response, ComputopApiConfig::A_ID));
        $computopApiResponseTransfer->setTransactionId($this->computopApiService->getResponseValue($response, ComputopApiConfig::TRANSACTION_ID));
        $computopApiResponseTransfer->setCodeExt($this->computopApiService->getResponseValue($response, ComputopApiConfig::CODE_EXT));
        $computopApiResponseTransfer->setErrorText($this->computopApiService->getResponseValue($response, ComputopApiConfig::ERROR_TEXT));
        $computopApiResponseTransfer->setRefNr($this->computopApiService->getResponseValue($response, ComputopApiConfig::REF_NR));

        return $computopApiResponseTransfer;
    }
593041
protected function handleResponse(ResponseInterface $response)
    {
        $responseWrapper = new Response($response);
        $statusCode = (int) floor($response->getStatusCode() / 100);

        if ($statusCode === 4) {
            throw new ClientException($responseWrapper);
        } elseif ($statusCode === 5) {
            throw new ServerException($responseWrapper);
        }

        return $responseWrapper;
    }
1012554
protected function prepareOrderItems(OrderTransfer $orderTransfer, AbstractRequestContainer $container): AbstractRequestContainer
    {
        $arrayIt = [];
        $arrayId = [];
        $arrayPr = [];
        $arrayNo = [];
        $arrayDe = [];
        $arrayVa = [];

        $key = 1;

        foreach ($orderTransfer->getItems() as $itemTransfer) {
            $arrayIt[$key] = PayoneApiConstants::INVOICING_ITEM_TYPE_GOODS;
            $arrayId[$key] = $itemTransfer->getSku();
            $arrayPr[$key] = $itemTransfer->getUnitGrossPrice();
            $arrayNo[$key] = $itemTransfer->getQuantity();
            $arrayDe[$key] = $itemTransfer->getName();
            $arrayVa[$key] = (int)$itemTransfer->getTaxRate();
            $key++;
        }

        $container->setIt($arrayIt);
        $container->setId($arrayId);
        $container->setPr($arrayPr);
        $container->setNo($arrayNo);
        $container->setDe($arrayDe);
        $container->setVa($arrayVa);

        return $container;
    }
799876
public function onKernelView(GetResponseForControllerResultEvent $event)
    {
        $parser = $this->container->get('thelia.parser');
        $templateHelper = $this->container->get('thelia.template_helper');
        $parser->setTemplateDefinition($templateHelper->getActiveFrontTemplate(), true);
        $request = $this->container->get('request_stack')->getCurrentRequest();
        $response = null;
        try {
            $view = $request->attributes->get('_view');

            $viewId = $request->attributes->get($view . '_id');

            $this->eventDispatcher->dispatch(TheliaEvents::VIEW_CHECK, new ViewCheckEvent($view, $viewId));

            $content = $parser->render($view . '.html');

            if ($content instanceof Response) {
                $response = $content;
            } else {
                $response = new Response($content, $parser->getStatus() ?: 200);
            }
        } catch (ResourceNotFoundException $e) {
            throw new NotFoundHttpException();
        } catch (OrderException $e) {
            switch ($e->getCode()) {
                case OrderException::CART_EMPTY:
                    // Redirect to the cart template
                    $response = RedirectResponse::create($this->container->get('router.chainRequest')->generate($e->cartRoute, $e->arguments, Router::ABSOLUTE_URL));
                    break;
                case OrderException::UNDEFINED_DELIVERY:
                    // Redirect to the delivery choice template
                    $response = RedirectResponse::create($this->container->get('router.chainRequest')->generate($e->orderDeliveryRoute, $e->arguments, Router::ABSOLUTE_URL));
                    break;
            }
            if (null === $response) {
                throw $e;
            }
        }

        $event->setResponse($response);
    }
629350
protected function interactsWithResponse(Response $response): Response
    {
        if ($response instanceof Filterable && $this instanceof Filterable) {
            $response->setFilterable($this->getFilterable());
        }

        if ($this->validateResponseAutomatically === true) {
            $response->validate();
        }

        return $response;
    }
660698
public function getForm(ResponseDeclaration $response){
        $formContainer = new CompositeResponseOptions($this, $response);
        $returnValue = $formContainer->getForm();

        return $returnValue;
    }
850042
protected function handleResponse(ResponseInterface $response)
    {
        $this->rateLimit = new RateLimit;
        $this->rateLimit->dailyLimit = (integer) $response->getHeaderLine('RateLimit-DailyLimit');
        $this->rateLimit->remaining = (integer) $response->getHeaderLine('RateLimit-Remaining');
        $this->rateLimit->resetTime = $response->getHeaderLine('RateLimit-ResetTime');

        return $response;
    }
556276
public function register(\Pimple $mainContainer)
    {
        $mainContainer['listener.response_exception'] = $mainContainer->share(function () {
            return new ResponseExceptionListener();
        });

        $mainContainer['listener.processor_response_render'] = $mainContainer->share(function () {
            return new ResponsePostRendererListener();
        });

        // Response Processors
        $mainContainer['response.processor.compress'] = $mainContainer->share(function () {
            return new CompressProcessor();
        });

        $dispatcher = $mainContainer['dispatcher'];
        
        $dispatcher->addSubscriber($mainContainer['listener.response_exception']);
        $dispatcher->addSubscriber($mainContainer['listener.processor_response_render']);
    }
170255
public function execute(ServerRequestInterface $request, ResponseInterface $response) : ResponseInterface {
		$httpRequestResponse = new HTTPRequestResponseContainer($request, $response);

		$this->dispatchRequestFilters($httpRequestResponse);

		$this->dispatchResponseFilters($httpRequestResponse);

		return $httpRequestResponse->getResponse();
	}
1319594
protected function returnResponse(ResponseInterface $response): ResponseInterface
    {
        $this->nextHandler = null;
        reset($this->handlers);
        return $response;
    }