original_string: private function _createPreauthorization($response)
      {
          $model = new Preauthorization();
          $model->setId($response['id']);
          $model->setAmount($response['amount']);
          $model->setCurrency($response['currency']);
          $model->setStatus($response['status']);
          $model->setLivemode($response['livemode']);
          $model->setCreatedAt($response['created_at']);
          $model->setUpdatedAt($response['updated_at']);
          $model->setPayment($this->_convertResponseToModel($response['payment'], "payment"));
          $model->setClient($this->_convertResponseToModel($response['client'], "client"));
          $model->setTransaction(isset($response['transaction']) ? $this->_convertResponseToModel($response['transaction'], 'transaction') : null);
          $model->setAppId($response['app_id']);
          $model->setDescription($response['description']);
          return $model;
      }
code: private function _createPreauthorization($response)
      {
          $model = new Preauthorization();
          $model->setId($response['id']);
          $model->setAmount($response['amount']);
          $model->setCurrency($response['currency']);
          $model->setStatus($response['status']);
          $model->setLivemode($response['livemode']);
          $model->setCreatedAt($response['created_at']);
          $model->setUpdatedAt($response['updated_at']);
          $model->setPayment($this->_convertResponseToModel($response['payment'], "payment"));
          $model->setClient($this->_convertResponseToModel($response['client'], "client"));
          $model->setTransaction(isset($response['transaction']) ? $this->_convertResponseToModel($response['transaction'], 'transaction') : null);
          $model->setAppId($response['app_id']);
          $model->setDescription($response['description']);
          return $model;
      }
code_tokens: private function _createPreauthorization ( $ response ) { $ model = new Preauthorization ( ) ; $ model -> setId ( $ response [ 'id' ] ) ; $ model -> setAmount ( $ response [ 'amount' ] ) ; $ model -> setCurrency ( $ response [ 'currency' ] ) ; $ model -> setStatus ( $ response [ 'status' ] ) ; $ model -> setLivemode ( $ response [ 'livemode' ] ) ; $ model -> setCreatedAt ( $ response [ 'created_at' ] ) ; $ model -> setUpdatedAt ( $ response [ 'updated_at' ] ) ; $ model -> setPayment ( $ this -> _convertResponseToModel ( $ response [ 'payment' ] , "payment" ) ) ; $ model -> setClient ( $ this -> _convertResponseToModel ( $ response [ 'client' ] , "client" ) ) ; $ model -> setTransaction ( isset ( $ response [ 'transaction' ] ) ? $ this -> _convertResponseToModel ( $ response [ 'transaction' ] , 'transaction' ) : null ) ; $ model -> setAppId ( $ response [ 'app_id' ] ) ; $ model -> setDescription ( $ response [ 'description' ] ) ; return $ model ; }
docstring: Creates and fills a preauthorization model
  
  @param array $response
  @return Preauthorization
docstring_tokens: Creates and fills a preauthorization model