Mount structure of Webhook List.

@param \stdClass $response

@return \Moip\Resource\WebhookList Webhook List
557944
protected function populate(stdClass $response)
    {
        $webhookList = clone $this;
        $webhookList->data = new stdClass();

        $webhookList->data->webhooks = $response->webhooks;

        return $webhookList;
    }
304278
public function parse_meta_response( $response ) {
		if ( $this->validate_response( $response ) ) {
			return $response;
		}
		$arr      = [];
		$response = [ $response ];

		array_filter(
			$response,
			function ( $e ) use ( &$arr ) {
				$arr['private']      = $e->private;
				$arr['last_updated'] = $e->updated_at;
				$arr['watchers']     = $e->watchers_count;
				$arr['forks']        = $e->forks_count;
				$arr['open_issues']  = isset( $e->open_issues_count ) ? $e->open_issues_count : 0;
			}
		);

		return $arr;
	}
457175
private function _createWebhook(array $response)
    {
        $model = new Webhook();
        $model->setId($response['id']);
        isset($response['url']) ? $model->setUrl($response['url']) : $model->setEmail($response['email']);
        $model->setLivemode($response['livemode']);
        $model->setEventTypes($response['event_types']);
        $model->setCreatedAt($response['created_at']);
        $model->setUpdatedAt($response['updated_at']);
        $model->setAppId($response['app_id']);
        $model->setActive($response['active']);
        return $model;
    }
874402
protected function filterResponse(string $response, $container)
    {
        $crawler = $this->getCrawler($response);

        $this->_output = $this->makeTitle($crawler) .
            $this->fetchContainer($crawler, $container);

        return $this;
    }
871004
public function applyToResponse($response)
    {
        $headers = $this->generateHeadersFor($response);
        foreach ($headers as $name => $value) {
            if (!$response->getHeader($name)) {
                $response->addHeader($name, $value);
            }
        }
        return $this;
    }
567446
protected function buildSelfLink(array &$response)
    {
        $link = [];

        if (!empty($type = $response[Serializer::CLASS_IDENTIFIER_KEY])) {
            list($idValues, $idProperties) = RecursiveFormatterHelper::getIdPropertyAndValues(
                $this->mappings,
                $response,
                $type
            );

            $href = self::buildUrl(
                $this->mappings,
                $idProperties,
                $idValues,
                $this->mappings[$type]->getResourceUrl(),
                $type
            );

            if ($href != $this->mappings[$type]->getResourceUrl()) {
                $link[self::SELF_LINK] = $href;
            }
        }

        return $link;
    }
463222
public static function attachHeaders($response)
	{
		$response->headers->set('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS');
		$response->headers->set('Access-Control-Allow-Headers', config('api.cors_allowed_headers', 'Origin, Content-Type, Accept, Authorization, X-Requested-With'));
		$response->headers->set('Access-Control-Allow-Credentials', 'true');
		
		if ($exposed = config('api.cors_exposed_headers', 'Pagination-Page, Pagination-Num, Pagination-Total, Pagination-Last-Page')) {
			$response->headers->set('Access-Control-Expose-Headers', $exposed);
		}
	}
818500
protected function setResponseHeaders(Response $response)
    {
        $response->headers->set('Access-Control-Allow-Origin', '*');
        $response->headers->set('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS');

        return $response;
    }
371128
private function setHttpResponse(OAuth2Response $response)
    {
        $httpResponse = $this->getResponse();
        $httpResponse->setStatusCode($response->getStatusCode());

        $headers = $httpResponse->getHeaders();
        $headers->addHeaders($response->getHttpHeaders());
        $headers->addHeaderLine('Content-type', 'application/json');

        $httpResponse->setContent($response->getResponseBody());
        return $httpResponse;
    }
625871
protected function websocketResponse($swooleRequest, $response, $headers = [])
    {
        $secWebSocketKey = $swooleRequest->header['sec-websocket-key'];
        $patten = '#^[+/0-9A-Za-z]{21}[AQgw]==$#';
        if (0 === preg_match($patten, $secWebSocketKey) || 16 !== strlen(base64_decode($secWebSocketKey))) {
            return false;
        }
        $key = base64_encode(sha1(
            $swooleRequest->header['sec-websocket-key'] . '258EAFA5-E914-47DA-95CA-C5AB0DC85B11',
            true
        ));
        $headers['Upgrade'] = 'websocket';
        $headers['Connection'] = 'Upgrade';
        $headers['Sec-WebSocket-Accept'] = $key;
        $headers['Sec-WebSocket-Version'] = '13';
        if (isset($swooleRequest->header['sec-websocket-protocol'])) {
            $headers['Sec-WebSocket-Protocol'] = $swooleRequest->header['sec-websocket-protocol'];
        }
        foreach ($headers as $key => $val) {
            $response = $response->withHeader($key, $val);
        }
        $response = $response->withStatus(101);
        return $response;

    }
1243104
protected function parseLookupResponse(Response $response)
    {
        $responseData = $response->getBody();
        $responseObject = json_decode($responseData);
        $definitionsData = $responseObject->def;
        $definitions = [];
        foreach ($definitionsData as $definitionData) {
            $definitions[] = new DictionaryDefinition($definitionData);
        }
        return $definitions;
    }
1290348
protected function setUriHeader(Response $response, Request $request)
    {
        $response->header('X-PJAX-URL', $request->getRequestUri());

        return $this;
    }
753009
public function getWebhook($webhookId)
    {
        $this->endpoint = 'webhooks';
        $this->url = sprintf('%s%s/%s', $this->url, $this->endpoint, $webhookId);
        $response = $this->get($this->url);
        return new AuthnetWebhooksResponse($response);
    }
892008
protected function getMetadataFromHeaders(Response $response) {
    $last_modified = \DateTime::createFromFormat(
        \DateTime::RFC1123,
        $response->getHeader('Last-Modified')[0]
    );

    // NonRDFSource's are considered files.  Everything else is a
    // directory.
    $type = 'dir';
    $links = Psr7\parse_header($response->getHeader('Link'));
    foreach ($links as $link) {
      if ($link['rel'] == 'type' && $link[0] == '<http://www.w3.org/ns/ldp#NonRDFSource>') {
        $type = 'file';
        break;
      }
    }

    $meta = [
      'type' => $type,
      'timestamp' => $last_modified->getTimestamp(),
    ];

    if ($type == 'file') {
      $meta['size'] = $response->getHeader('Content-Length')[0];
      $meta['mimetype'] = $response->getHeader('Content-Type')[0];
    }

    return $meta;
  }
1246074
public function handleResponse($response)
    {
        if ($this->isRet($response)) {
            return $this->handleRet($response);
        } elseif (is_array($response)) {
            $template = $this->getDefaultTemplate();
            $file = $this->view->resolveFile($template) ? $template : $this->defaultViewFile;
            $content = $this->view->render($file, $response);
            return $this->response->setContent($content);
        } else {
            return parent::handleResponse($response);
        }
    }
1366178
protected function populate(stdClass $response)
    {
        $customer = clone $this;
        $customer->data = new stdClass();
        $customer->data->id = $this->getIfSet('id', $response);
        $customer->data->ownId = $this->getIfSet('ownId', $response);
        $customer->data->fullname = $this->getIfSet('fullname', $response);
        $customer->data->email = $this->getIfSet('email', $response);
        $customer->data->phone = new stdClass();

        $phone = $this->getIfSet('phone', $response);

        $customer->data->phone->countryCode = $this->getIfSet('countryCode', $phone);
        $customer->data->phone->areaCode = $this->getIfSet('areaCode', $phone);
        $customer->data->phone->number = $this->getIfSet('number', $phone);
        $customer->data->birthDate = $this->getIfSet('birthDate', $response);
        $customer->data->taxDocument = new stdClass();
        $customer->data->taxDocument->type = $this->getIfSet('type', $this->getIfSet('taxDocument', $response));
        $customer->data->taxDocument->number = $this->getIfSet('number', $this->getIfSet('taxDocument', $response));
        $customer->data->addresses = [];
        $customer->data->shippingAddress = $this->getIfSet('shippingAddress', $response);
        $customer->data->billingAddress = $this->getIfSet('billingAddress', $response);
        $customer->data->fundingInstrument = $this->getIfSet('fundingInstrument', $response);

        $customer->data->_links = $this->getIfSet('_links', $response);

        return $customer;
    }
530283
protected function populate(stdClass $response)
    {
        $account = clone $this;
        $account->data->events = $this->getIfSet('events', $response);
        $account->data->target = $this->getIfSet('target', $response);
        $account->data->media = $this->getIfSet('media', $response);
        $account->data->token = $this->getIfSet('token', $response);
        $account->data->id = $this->getIfSet('id', $response);

        return $account;
    }