original_string: private function _createSubscription(array $response)
      {
          $model = new Subscription();
          $model->setId($response['id']);
          $model->setOffer($this->_convertResponseToModel($response['offer'], 'offer'));
          $model->setLivemode($response['livemode']);
          $model->setTrialStart($response['trial_start']);
          $model->setTrialEnd($response['trial_end']);
          $model->setPeriodOfValidity($response['period_of_validity']);
          $model->setEndOfPeriod($response['end_of_period']);
          $model->setNextCaptureAt($response['next_capture_at']);
          $model->setCreatedAt($response['created_at']);
          $model->setUpdatedAt($response['updated_at']);
          $model->setCanceledAt($response['canceled_at']);
          $model->setPayment($this->_convertResponseToModel($response['payment'], "payment"));
          $model->setClient($this->_convertResponseToModel($response['client'], "client"));
          $model->setAppId($response['app_id']);
          $model->setIsCanceled($response['is_canceled']);
          $model->setIsDeleted($response['is_deleted']);
          $model->setStatus($response['status']);
          $model->setAmount($response['amount']);
          $model->setTempAmount($response['temp_amount']);
          return $model;
      }
code: private function _createSubscription(array $response)
      {
          $model = new Subscription();
          $model->setId($response['id']);
          $model->setOffer($this->_convertResponseToModel($response['offer'], 'offer'));
          $model->setLivemode($response['livemode']);
          $model->setTrialStart($response['trial_start']);
          $model->setTrialEnd($response['trial_end']);
          $model->setPeriodOfValidity($response['period_of_validity']);
          $model->setEndOfPeriod($response['end_of_period']);
          $model->setNextCaptureAt($response['next_capture_at']);
          $model->setCreatedAt($response['created_at']);
          $model->setUpdatedAt($response['updated_at']);
          $model->setCanceledAt($response['canceled_at']);
          $model->setPayment($this->_convertResponseToModel($response['payment'], "payment"));
          $model->setClient($this->_convertResponseToModel($response['client'], "client"));
          $model->setAppId($response['app_id']);
          $model->setIsCanceled($response['is_canceled']);
          $model->setIsDeleted($response['is_deleted']);
          $model->setStatus($response['status']);
          $model->setAmount($response['amount']);
          $model->setTempAmount($response['temp_amount']);
          return $model;
      }
code_tokens: private function _createSubscription ( array $ response ) { $ model = new Subscription ( ) ; $ model -> setId ( $ response [ 'id' ] ) ; $ model -> setOffer ( $ this -> _convertResponseToModel ( $ response [ 'offer' ] , 'offer' ) ) ; $ model -> setLivemode ( $ response [ 'livemode' ] ) ; $ model -> setTrialStart ( $ response [ 'trial_start' ] ) ; $ model -> setTrialEnd ( $ response [ 'trial_end' ] ) ; $ model -> setPeriodOfValidity ( $ response [ 'period_of_validity' ] ) ; $ model -> setEndOfPeriod ( $ response [ 'end_of_period' ] ) ; $ model -> setNextCaptureAt ( $ response [ 'next_capture_at' ] ) ; $ model -> setCreatedAt ( $ response [ 'created_at' ] ) ; $ model -> setUpdatedAt ( $ response [ 'updated_at' ] ) ; $ model -> setCanceledAt ( $ response [ 'canceled_at' ] ) ; $ model -> setPayment ( $ this -> _convertResponseToModel ( $ response [ 'payment' ] , "payment" ) ) ; $ model -> setClient ( $ this -> _convertResponseToModel ( $ response [ 'client' ] , "client" ) ) ; $ model -> setAppId ( $ response [ 'app_id' ] ) ; $ model -> setIsCanceled ( $ response [ 'is_canceled' ] ) ; $ model -> setIsDeleted ( $ response [ 'is_deleted' ] ) ; $ model -> setStatus ( $ response [ 'status' ] ) ; $ model -> setAmount ( $ response [ 'amount' ] ) ; $ model -> setTempAmount ( $ response [ 'temp_amount' ] ) ; return $ model ; }
docstring: Creates and fills a subscription model
  
  @param array $response
  @return Subscription
docstring_tokens: Creates and fills a subscription model