src/Resource/Holder.php
protected function populate(stdClass $response)
    {
        $holder = clone $this;
        $holder->data = new stdClass();
        $holder->data->fullname = $this->getIfSet('fullname', $response);
        $holder->data->phone = new stdClass();

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

        $holder->data->phone->countryCode = $this->getIfSet('countryCode', $phone);
        $holder->data->phone->areaCode = $this->getIfSet('areaCode', $phone);
        $holder->data->phone->number = $this->getIfSet('number', $phone);
        $holder->data->birthDate = $this->getIfSet('birthDate', $response);
        $holder->data->taxDocument = new stdClass();
        $holder->data->taxDocument->type = $this->getIfSet('type', $this->getIfSet('taxDocument', $response));
        $holder->data->taxDocument->number = $this->getIfSet('number', $this->getIfSet('taxDocument', $response));
        $holder->data->billingAddress = $this->getIfSet('billingAddress', $response);

        return $holder;
    }
protected function populate(stdClass $response)
    {
        $holder = clone $this;
        $holder->data = new stdClass();
        $holder->data->fullname = $this->getIfSet('fullname', $response);
        $holder->data->phone = new stdClass();

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

        $holder->data->phone->countryCode = $this->getIfSet('countryCode', $phone);
        $holder->data->phone->areaCode = $this->getIfSet('areaCode', $phone);
        $holder->data->phone->number = $this->getIfSet('number', $phone);
        $holder->data->birthDate = $this->getIfSet('birthDate', $response);
        $holder->data->taxDocument = new stdClass();
        $holder->data->taxDocument->type = $this->getIfSet('type', $this->getIfSet('taxDocument', $response));
        $holder->data->taxDocument->number = $this->getIfSet('number', $this->getIfSet('taxDocument', $response));
        $holder->data->billingAddress = $this->getIfSet('billingAddress', $response);

        return $holder;
    }
protected function populate ( stdClass $ response ) { $ holder = clone $ this ; $ holder -> data = new stdClass ( ) ; $ holder -> data -> fullname = $ this -> getIfSet ( 'fullname' , $ response ) ; $ holder -> data -> phone = new stdClass ( ) ; $ phone = $ this -> getIfSet ( 'phone' , $ response ) ; $ holder -> data -> phone -> countryCode = $ this -> getIfSet ( 'countryCode' , $ phone ) ; $ holder -> data -> phone -> areaCode = $ this -> getIfSet ( 'areaCode' , $ phone ) ; $ holder -> data -> phone -> number = $ this -> getIfSet ( 'number' , $ phone ) ; $ holder -> data -> birthDate = $ this -> getIfSet ( 'birthDate' , $ response ) ; $ holder -> data -> taxDocument = new stdClass ( ) ; $ holder -> data -> taxDocument -> type = $ this -> getIfSet ( 'type' , $ this -> getIfSet ( 'taxDocument' , $ response ) ) ; $ holder -> data -> taxDocument -> number = $ this -> getIfSet ( 'number' , $ this -> getIfSet ( 'taxDocument' , $ response ) ) ; $ holder -> data -> billingAddress = $ this -> getIfSet ( 'billingAddress' , $ response ) ; return $ holder ; }
Mount the buyer structure from holder.

@param \stdClass $response

@return Holder information.
Mount the buyer structure from holder .