original_string: private function _createPayment(array $response)
      {
          $model = new Payment();
          $model->setId($response['id']);
          $model->setType($response['type']);
          $model->setClient($this->_convertResponseToModel($response['client'], "client"));
          if ($response['type'] === "creditcard") {
              $model->setCardType($response['card_type']);
              $model->setCountry($response['country']);
              $model->setExpireMonth($response['expire_month']);
              $model->setExpireYear($response['expire_year']);
              $model->setCardHolder($response['card_holder']);
              $model->setLastFour($response['last4']);
          } elseif ($response['type'] === "debit") {
              $model->setHolder($response['holder']);
              $model->setCode($response['code']);
              $model->setAccount($response['account']);
              $model->setBic($response['bic']);
              $model->setIban($response['iban']);
          } elseif ($response['type'] === "paypal") {
              $model->setHolder($response['holder']);
              $model->setAccount($response['account']);
          }
          $model->setCreatedAt($response['created_at']);
          $model->setUpdatedAt($response['updated_at']);
          $model->setAppId($response['app_id']);
          return $model;
      }
code: private function _createPayment(array $response)
      {
          $model = new Payment();
          $model->setId($response['id']);
          $model->setType($response['type']);
          $model->setClient($this->_convertResponseToModel($response['client'], "client"));
          if ($response['type'] === "creditcard") {
              $model->setCardType($response['card_type']);
              $model->setCountry($response['country']);
              $model->setExpireMonth($response['expire_month']);
              $model->setExpireYear($response['expire_year']);
              $model->setCardHolder($response['card_holder']);
              $model->setLastFour($response['last4']);
          } elseif ($response['type'] === "debit") {
              $model->setHolder($response['holder']);
              $model->setCode($response['code']);
              $model->setAccount($response['account']);
              $model->setBic($response['bic']);
              $model->setIban($response['iban']);
          } elseif ($response['type'] === "paypal") {
              $model->setHolder($response['holder']);
              $model->setAccount($response['account']);
          }
          $model->setCreatedAt($response['created_at']);
          $model->setUpdatedAt($response['updated_at']);
          $model->setAppId($response['app_id']);
          return $model;
      }
code_tokens: private function _createPayment ( array $ response ) { $ model = new Payment ( ) ; $ model -> setId ( $ response [ 'id' ] ) ; $ model -> setType ( $ response [ 'type' ] ) ; $ model -> setClient ( $ this -> _convertResponseToModel ( $ response [ 'client' ] , "client" ) ) ; if ( $ response [ 'type' ] === "creditcard" ) { $ model -> setCardType ( $ response [ 'card_type' ] ) ; $ model -> setCountry ( $ response [ 'country' ] ) ; $ model -> setExpireMonth ( $ response [ 'expire_month' ] ) ; $ model -> setExpireYear ( $ response [ 'expire_year' ] ) ; $ model -> setCardHolder ( $ response [ 'card_holder' ] ) ; $ model -> setLastFour ( $ response [ 'last4' ] ) ; } elseif ( $ response [ 'type' ] === "debit" ) { $ model -> setHolder ( $ response [ 'holder' ] ) ; $ model -> setCode ( $ response [ 'code' ] ) ; $ model -> setAccount ( $ response [ 'account' ] ) ; $ model -> setBic ( $ response [ 'bic' ] ) ; $ model -> setIban ( $ response [ 'iban' ] ) ; } elseif ( $ response [ 'type' ] === "paypal" ) { $ model -> setHolder ( $ response [ 'holder' ] ) ; $ model -> setAccount ( $ response [ 'account' ] ) ; } $ model -> setCreatedAt ( $ response [ 'created_at' ] ) ; $ model -> setUpdatedAt ( $ response [ 'updated_at' ] ) ; $ model -> setAppId ( $ response [ 'app_id' ] ) ; return $ model ; }
docstring: Creates and fills a payment model
  
  @param array $response
  @return Payment
docstring_tokens: Creates and fills a payment model