original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Creates and fills a refund model
  
  @param array $response
  @return Refund
docstring_tokens: Creates and fills a refund model