private function _createRefund(array $response)
    {
        $model = new Refund();
        $model->setId($response['id']);
        $model->setAmount($response['amount']);
        $model->setStatus($response['status']);
        $model->setDescription($response['description']);
        $model->setLivemode($response['livemode']);
        $model->setCreatedAt($response['created_at']);
        $model->setUpdatedAt($response['updated_at']);
        $model->setResponseCode($response['response_code']);
        //Refund doesn't have the array index 'transaction' when using getOne
        $model->setTransaction(isset($response['transaction']) ? $this->_convertResponseToModel($response['transaction'], 'transaction') : null);
        $model->setAppId($response['app_id']);
        return $model;
    }
private function _createRefund(array $response)
    {
        $model = new Refund();
        $model->setId($response['id']);
        $model->setAmount($response['amount']);
        $model->setStatus($response['status']);
        $model->setDescription($response['description']);
        $model->setLivemode($response['livemode']);
        $model->setCreatedAt($response['created_at']);
        $model->setUpdatedAt($response['updated_at']);
        $model->setResponseCode($response['response_code']);
        //Refund doesn't have the array index 'transaction' when using getOne
        $model->setTransaction(isset($response['transaction']) ? $this->_convertResponseToModel($response['transaction'], 'transaction') : null);
        $model->setAppId($response['app_id']);
        return $model;
    }
private function _createRefund ( array $ response ) { $ model = new Refund ( ) ; $ model -> setId ( $ response [ 'id' ] ) ; $ model -> setAmount ( $ response [ 'amount' ] ) ; $ model -> setStatus ( $ response [ 'status' ] ) ; $ model -> setDescription ( $ response [ 'description' ] ) ; $ model -> setLivemode ( $ response [ 'livemode' ] ) ; $ model -> setCreatedAt ( $ response [ 'created_at' ] ) ; $ model -> setUpdatedAt ( $ response [ 'updated_at' ] ) ; $ model -> setResponseCode ( $ response [ 'response_code' ] ) ; //Refund doesn't have the array index 'transaction' when using getOne $ model -> setTransaction ( isset ( $ response [ 'transaction' ] ) ? $ this -> _convertResponseToModel ( $ response [ 'transaction' ] , 'transaction' ) : null ) ; $ model -> setAppId ( $ response [ 'app_id' ] ) ; return $ model ; }
Creates and fills a refund model

@param array $response
@return Refund
Creates and fills a refund model