private function _createWebhook(array $response)
    {
        $model = new Webhook();
        $model->setId($response['id']);
        isset($response['url']) ? $model->setUrl($response['url']) : $model->setEmail($response['email']);
        $model->setLivemode($response['livemode']);
        $model->setEventTypes($response['event_types']);
        $model->setCreatedAt($response['created_at']);
        $model->setUpdatedAt($response['updated_at']);
        $model->setAppId($response['app_id']);
        $model->setActive($response['active']);
        return $model;
    }
private function _createWebhook(array $response)
    {
        $model = new Webhook();
        $model->setId($response['id']);
        isset($response['url']) ? $model->setUrl($response['url']) : $model->setEmail($response['email']);
        $model->setLivemode($response['livemode']);
        $model->setEventTypes($response['event_types']);
        $model->setCreatedAt($response['created_at']);
        $model->setUpdatedAt($response['updated_at']);
        $model->setAppId($response['app_id']);
        $model->setActive($response['active']);
        return $model;
    }
private function _createWebhook ( array $ response ) { $ model = new Webhook ( ) ; $ model -> setId ( $ response [ 'id' ] ) ; isset ( $ response [ 'url' ] ) ? $ model -> setUrl ( $ response [ 'url' ] ) : $ model -> setEmail ( $ response [ 'email' ] ) ; $ model -> setLivemode ( $ response [ 'livemode' ] ) ; $ model -> setEventTypes ( $ response [ 'event_types' ] ) ; $ model -> setCreatedAt ( $ response [ 'created_at' ] ) ; $ model -> setUpdatedAt ( $ response [ 'updated_at' ] ) ; $ model -> setAppId ( $ response [ 'app_id' ] ) ; $ model -> setActive ( $ response [ 'active' ] ) ; return $ model ; }
Creates and fills a webhook model

@param array $response
@return Webhook
Creates and fills a webhook model