protected function populate(stdClass $response)
    {
        $payment = clone $this;

        $payment->data->id = $this->getIfSet('id', $response);
        $payment->data->status = $this->getIfSet('status', $response);
        $payment->data->delayCapture = $this->getIfSet('delayCapture', $response);
        $payment->data->amount = new stdClass();
        $payment->data->amount->total = $this->getIfSet('total', $response->amount);
        $payment->data->amount->currency = $this->getIfSet('currency', $response->amount);
        $payment->data->installmentCount = $this->getIfSet('installmentCount', $response);
        $payment->data->fundingInstrument = $this->getIfSet('fundingInstrument', $response);
        $payment->data->payments = $this->getIfSet('payments', $response);
        $payment->data->escrows = $this->getIfSet('escrows', $response);
        $payment->data->fees = $this->getIfSet('fees', $response);
        $payment->data->refunds = $this->getIfSet('refunds', $response);
        $payment->data->_links = $this->getIfSet('_links', $response);
        $payment->data->createdAt = $this->getIfSetDateTime('createdAt', $response);
        $payment->data->updatedAt = $this->getIfSetDateTime('updatedAt', $response);

        return $payment;
    }